From 25cd8c693a06bbcdee4338f66be4dd49be14dd43 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Fri, 29 Nov 2024 00:27:42 +0100 Subject: [PATCH] bugfixing --- src/lib/components/AnalystEstimate.svelte | 291 +- .../dist/tinymce/icons/default/icons.min.js | 362 - src/lib/dist/tinymce/license.txt | 21 - src/lib/dist/tinymce/models/dom/model.min.js | 6277 ---- .../dist/tinymce/plugins/anchor/plugin.min.js | 161 - .../tinymce/plugins/autolink/plugin.min.js | 174 - .../tinymce/plugins/autoresize/plugin.min.js | 138 - .../tinymce/plugins/autosave/plugin.min.js | 191 - .../dist/tinymce/plugins/code/plugin.min.js | 56 - .../tinymce/plugins/codesample/plugin.min.js | 2274 -- .../plugins/directionality/plugin.min.js | 285 - .../tinymce/plugins/fullscreen/plugin.min.js | 912 - .../dist/tinymce/plugins/image/plugin.min.js | 1174 - .../tinymce/plugins/importcss/plugin.min.js | 263 - .../plugins/insertdatetime/plugin.min.js | 158 - .../dist/tinymce/plugins/link/plugin.min.js | 1010 - .../dist/tinymce/plugins/lists/plugin.min.js | 1545 - .../dist/tinymce/plugins/media/plugin.min.js | 1068 - .../tinymce/plugins/nonbreaking/plugin.min.js | 83 - .../tinymce/plugins/pagebreak/plugin.min.js | 94 - .../tinymce/plugins/preview/plugin.min.js | 97 - .../tinymce/plugins/quickbars/plugin.min.js | 310 - .../dist/tinymce/plugins/save/plugin.min.js | 76 - .../plugins/searchreplace/plugin.min.js | 826 - .../dist/tinymce/plugins/table/plugin.min.js | 2792 -- .../tinymce/plugins/template/plugin.min.js | 492 - .../plugins/visualblocks/plugin.min.js | 72 - .../tinymce/plugins/visualchars/plugin.min.js | 398 - .../tinymce/plugins/wordcount/plugin.min.js | 308 - .../skins/content/dark/content.min.css | 60 - .../skins/content/default/content.min.css | 55 - .../skins/content/document/content.min.css | 60 - .../skins/content/pocketbase/content.css | 44 - .../skins/content/pocketbase/content.min.css | 44 - .../skins/content/writer/content.min.css | 56 - .../skins/ui/oxide/content.inline.min.css | 796 - .../tinymce/skins/ui/oxide/content.min.css | 802 - .../dist/tinymce/skins/ui/oxide/skin.min.css | 4030 --- .../skins/ui/oxide/skin.shadowdom.min.css | 30 - .../skins/ui/stocknear/content.inline.min.css | 796 - .../skins/ui/stocknear/content.min.css | 802 - .../tinymce/skins/ui/stocknear/skin.min.css | 4030 --- .../skins/ui/stocknear/skin.shadowdom.min.css | 30 - .../dist/tinymce/themes/silver/theme.min.js | 25931 ---------------- src/lib/dist/tinymce/tinymce.min.js | 25629 --------------- src/routes/options-flow/+page.ts | 46 + 46 files changed, 195 insertions(+), 84954 deletions(-) delete mode 100644 src/lib/dist/tinymce/icons/default/icons.min.js delete mode 100644 src/lib/dist/tinymce/license.txt delete mode 100644 src/lib/dist/tinymce/models/dom/model.min.js delete mode 100644 src/lib/dist/tinymce/plugins/anchor/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/autolink/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/autoresize/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/autosave/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/code/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/codesample/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/directionality/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/fullscreen/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/image/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/importcss/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/insertdatetime/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/link/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/lists/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/media/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/nonbreaking/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/pagebreak/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/preview/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/quickbars/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/save/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/searchreplace/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/table/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/template/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/visualblocks/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/visualchars/plugin.min.js delete mode 100644 src/lib/dist/tinymce/plugins/wordcount/plugin.min.js delete mode 100644 src/lib/dist/tinymce/skins/content/dark/content.min.css delete mode 100644 src/lib/dist/tinymce/skins/content/default/content.min.css delete mode 100644 src/lib/dist/tinymce/skins/content/document/content.min.css delete mode 100644 src/lib/dist/tinymce/skins/content/pocketbase/content.css delete mode 100644 src/lib/dist/tinymce/skins/content/pocketbase/content.min.css delete mode 100644 src/lib/dist/tinymce/skins/content/writer/content.min.css delete mode 100644 src/lib/dist/tinymce/skins/ui/oxide/content.inline.min.css delete mode 100644 src/lib/dist/tinymce/skins/ui/oxide/content.min.css delete mode 100644 src/lib/dist/tinymce/skins/ui/oxide/skin.min.css delete mode 100644 src/lib/dist/tinymce/skins/ui/oxide/skin.shadowdom.min.css delete mode 100644 src/lib/dist/tinymce/skins/ui/stocknear/content.inline.min.css delete mode 100644 src/lib/dist/tinymce/skins/ui/stocknear/content.min.css delete mode 100644 src/lib/dist/tinymce/skins/ui/stocknear/skin.min.css delete mode 100644 src/lib/dist/tinymce/skins/ui/stocknear/skin.shadowdom.min.css delete mode 100644 src/lib/dist/tinymce/themes/silver/theme.min.js delete mode 100644 src/lib/dist/tinymce/tinymce.min.js create mode 100644 src/routes/options-flow/+page.ts diff --git a/src/lib/components/AnalystEstimate.svelte b/src/lib/components/AnalystEstimate.svelte index 3b75ba17..d6602391 100644 --- a/src/lib/components/AnalystEstimate.svelte +++ b/src/lib/components/AnalystEstimate.svelte @@ -67,38 +67,40 @@ return data; }); } - function computeGrowthSingleList(data, actualList) { - // Find the last non-null entry in actualList - let lastNonNull = actualList - ?.filter((entry) => entry?.val !== null) - ?.slice(-1)[0]; - - // Add the last non-null entry from actualList to the beginning of data - const newList = [lastNonNull, ...data]; - - // Calculate growth and include it in the objects + // Initialize the result list let resultList = []; - for (let i = 1; i < newList?.length; i++) { - let previous = newList[i - 1]; - let current = newList[i]; + for (let i = 0; i < data?.length; i++) { + const currentData = data[i]; - // Calculate growth only if both values are non-null + // Find the corresponding actual data from one FY back + const correspondingActual = actualList?.find( + (entry) => Number(entry.FY) === Number(currentData.FY) - 1, + ); + + // Calculate growth if a matching entry exists in actualList let growth = null; - if (previous.val !== null && current.val !== null) { - growth = (((current.val - previous.val) / previous.val) * 100)?.toFixed( - 2, - ); + if ( + correspondingActual && + correspondingActual?.val !== null && + currentData.val !== null + ) { + growth = ( + ((currentData?.val - correspondingActual?.val) / + Math.abs(correspondingActual?.val)) * + 100 + )?.toFixed(2); } - // Add FY, val, and growth to the result list + // Push the result for this FY resultList.push({ - FY: current.FY, - val: current.val, + FY: currentData.FY, + val: currentData.val, growth: growth !== null ? Number(growth) : null, // Convert growth to number or leave as null }); } + return resultList; } @@ -127,7 +129,7 @@ return { FY: currentFY, growth: - forecastGrowth !== 0 ? Number(forecastGrowth.toFixed(2)) : null, + forecastGrowth !== 0 ? Number(forecastGrowth?.toFixed(2)) : null, }; } @@ -262,7 +264,7 @@ const fy = parseInt(date.replace("FY", ""), 10); // Extract numeric FY value const listToUse = dataType === "Revenue" ? revenueAvgGrowthList : epsAvgGrowthList; // Select the correct growth list - const growth = listToUse.find((r) => r.FY === fy); // Find matching FY + const growth = listToUse?.find((r) => r.FY === fy); // Find matching FY return growth ? growth?.growth : null; // Return growth or null if not found }); @@ -355,19 +357,12 @@ let highGrowthList = []; let lowGrowthList = []; if (dataType === "Revenue") { - highGrowthList = computeGrowthSingleList( - highRevenueList, - tableActualRevenue, - ); - lowGrowthList = computeGrowthSingleList( - lowRevenueList, - tableActualRevenue, - ); + highGrowthList = computeGrowthSingleList(highRevenueList, avgRevenueList); + lowGrowthList = computeGrowthSingleList(lowRevenueList, avgRevenueList); } else { - highGrowthList = computeGrowthSingleList(highEPSList, tableActualEPS); - lowGrowthList = computeGrowthSingleList(lowEPSList, tableActualEPS); + highGrowthList = computeGrowthSingleList(highEPSList, avgEPSList); + lowGrowthList = computeGrowthSingleList(lowEPSList, avgEPSList); } - highGrowthList = fillMissingDates(dates, highGrowthList)?.map( (item) => item?.growth, ); @@ -820,9 +815,9 @@ class="p-1 text-left font-semibold text-sm sm:text-[1rem]" >Revenue - {#each revenueDateList as date} - {date} + {#if index !== 0}{date}{/if} {/each} {#each highRevenueList as item, index} - {#if data?.user?.tier !== "Pro" && index >= highRevenueList?.length - 2} - Pro - {:else} - {abbreviateNumber(item?.val)} + {#if index !== 0} + {#if data?.user?.tier !== "Pro" && index >= highRevenueList?.length - 2} + Pro + {:else} + {abbreviateNumber(item?.val)} + {/if} {/if} {/each} @@ -859,22 +856,24 @@ > {#each avgRevenueList as item, index} - {#if data?.user?.tier !== "Pro" && index >= avgRevenueList?.length - 2} - Pro - {:else} - {abbreviateNumber(item?.val)} + {#if index !== 0} + {#if data?.user?.tier !== "Pro" && index >= avgRevenueList?.length - 2} + Pro + {:else} + {abbreviateNumber(item?.val)} + {/if} {/if} {/each} @@ -884,22 +883,24 @@ > {#each lowRevenueList as item, index} - {#if data?.user?.tier !== "Pro" && index >= lowRevenueList?.length - 2} - Pro - {:else} - {abbreviateNumber(item?.val)} + {#if index !== 0} + {#if data?.user?.tier !== "Pro" && index >= lowRevenueList?.length - 2} + Pro + {:else} + {abbreviateNumber(item?.val)} + {/if} {/if} {/each} @@ -941,7 +942,7 @@ >High - {#each computeGrowthSingleList(highRevenueList, tableActualRevenue) as item, index} + {#each computeGrowthSingleList(highRevenueList, avgRevenueList) as item, index} {#if index !== 0} {#if data?.user?.tier !== "Pro" && index >= highRevenueList?.length - 2} @@ -979,7 +980,7 @@ >Avg - {#each computeGrowthSingleList(avgRevenueList, tableActualRevenue) as item, index} + {#each revenueAvgGrowthList?.filter((item) => item.FY >= 24) as item, index} {#if index !== 0} {#if data?.user?.tier !== "Pro" && index >= avgRevenueList?.length - 2} @@ -1017,7 +1018,7 @@ >Low - {#each computeGrowthSingleList(lowRevenueList, tableActualRevenue) as item, index} + {#each computeGrowthSingleList(lowRevenueList, avgRevenueList) as item, index} {#if index !== 0} {#if data?.user?.tier !== "Pro" && index >= lowRevenueList?.length - 2} @@ -1077,9 +1078,9 @@ class="p-1 text-left font-semibold text-sm sm:text-[1rem]" >EPS - {#each epsDateList as date} - {date} + {#if index !== 0}{date}{/if} {/each} {#each highEPSList as item, index} - {#if data?.user?.tier !== "Pro" && index >= highEPSList?.length - 2} - Pro - {:else} - {abbreviateNumber(item?.val)} + {#if index !== 0} + {#if data?.user?.tier !== "Pro" && index >= highEPSList?.length - 2} + Pro + {:else} + {abbreviateNumber(item?.val)} + {/if} {/if} {/each} @@ -1116,22 +1119,24 @@ > {#each avgEPSList as item, index} - {#if data?.user?.tier !== "Pro" && index >= avgEPSList?.length - 2} - Pro - {:else} - {abbreviateNumber(item?.val)} + {#if index !== 0} + {#if data?.user?.tier !== "Pro" && index >= avgEPSList?.length - 2} + Pro + {:else} + {abbreviateNumber(item?.val)} + {/if} {/if} {/each} @@ -1141,22 +1146,24 @@ > {#each lowEPSList as item, index} - {#if data?.user?.tier !== "Pro" && index >= lowEPSList?.length - 2} - Pro - {:else} - {abbreviateNumber(item?.val)} + {#if index !== 0} + {#if data?.user?.tier !== "Pro" && index >= lowEPSList?.length - 2} + Pro + {:else} + {abbreviateNumber(item?.val)} + {/if} {/if} {/each} @@ -1197,7 +1204,7 @@ >High - {#each computeGrowthSingleList(highEPSList, tableActualEPS) as item, index} + {#each computeGrowthSingleList(highEPSList, avgEPSList) as item, index} {#if index !== 0} {#if data?.user?.tier !== "Pro" && index >= highEPSList?.length - 2} @@ -1235,7 +1242,7 @@ >Avg - {#each computeGrowthSingleList(avgEPSList, tableActualEPS) as item, index} + {#each epsAvgGrowthList?.filter((item) => item.FY >= 24) as item, index} {#if index !== 0} {#if data?.user?.tier !== "Pro" && index >= avgEPSList?.length - 2} @@ -1273,7 +1280,7 @@ >Low - {#each computeGrowthSingleList(lowEPSList, tableActualEPS) as item, index} + {#each computeGrowthSingleList(lowEPSList, avgEPSList) as item, index} {#if index !== 0} {#if data?.user?.tier !== "Pro" && index >= lowEPSList?.length - 2} diff --git a/src/lib/dist/tinymce/icons/default/icons.min.js b/src/lib/dist/tinymce/icons/default/icons.min.js deleted file mode 100644 index bffca86a..00000000 --- a/src/lib/dist/tinymce/icons/default/icons.min.js +++ /dev/null @@ -1,362 +0,0 @@ -tinymce.IconManager.add("default", { - icons: { - "accessibility-check": - '', - "accordion-toggle": - '', - accordion: - '', - "action-next": - '', - "action-prev": - '', - addtag: - '', - "ai-prompt": - '', - ai: '', - "align-center": - '', - "align-justify": - '', - "align-left": - '', - "align-none": - '', - "align-right": - '', - "arrow-left": - '', - "arrow-right": - '', - bold: '', - bookmark: - '', - "border-style": - '', - "border-width": - '', - brightness: - '', - browse: - '', - cancel: - '', - "cell-background-color": - '', - "cell-border-color": - '', - "change-case": - '', - "character-count": - '', - "checklist-rtl": - '', - checklist: - '', - checkmark: - '', - "chevron-down": - '', - "chevron-left": - '', - "chevron-right": - '', - "chevron-up": - '', - close: - '', - "code-sample": - '', - "color-levels": - '', - "color-picker": - '', - "color-swatch-remove-color": - '', - "color-swatch": - '', - "comment-add": - '', - comment: - '', - contrast: - '', - copy: '', - crop: '', - "cut-column": - '', - "cut-row": - '', - cut: '', - "document-properties": - '', - drag: '', - "duplicate-column": - '', - "duplicate-row": - '', - duplicate: - '', - "edit-block": - '', - "edit-image": - '', - "embed-page": - '', - embed: - '', - emoji: - '', - export: - '', - fill: '', - "flip-horizontally": - '', - "flip-vertically": - '', - footnote: - '', - "format-painter": - '', - format: - '', - fullscreen: - '', - gallery: - '', - gamma: - '', - help: '', - "highlight-bg-color": - '', - home: '', - "horizontal-rule": - '', - "image-options": - '', - image: - '', - indent: - '', - info: '', - "insert-character": - '', - "insert-time": - '', - invert: - '', - italic: - '', - language: - '', - "line-height": - '', - line: '', - link: '', - "list-bull-circle": - '', - "list-bull-default": - '', - "list-bull-square": - '', - "list-num-default-rtl": - '', - "list-num-default": - '', - "list-num-lower-alpha-rtl": - '', - "list-num-lower-alpha": - '', - "list-num-lower-greek-rtl": - '', - "list-num-lower-greek": - '', - "list-num-lower-roman-rtl": - '', - "list-num-lower-roman": - '', - "list-num-upper-alpha-rtl": - '', - "list-num-upper-alpha": - '', - "list-num-upper-roman-rtl": - '', - "list-num-upper-roman": - '', - lock: '', - ltr: '', - minus: - '', - "more-drawer": - '', - "new-document": - '', - "new-tab": - '', - "non-breaking": - '', - notice: - '', - "ordered-list-rtl": - '', - "ordered-list": - '', - orientation: - '', - outdent: - '', - "page-break": - '', - paragraph: - '', - "paste-column-after": - '', - "paste-column-before": - '', - "paste-row-after": - '', - "paste-row-before": - '', - "paste-text": - '', - paste: - '', - "permanent-pen": - '', - plus: '', - preferences: - '', - preview: - '', - print: - '', - quote: - '', - redo: '', - reload: - '', - "remove-formatting": - '', - remove: - '', - "resize-handle": - '', - resize: - '', - "restore-draft": - '', - "rotate-left": - '', - "rotate-right": - '', - rtl: '', - save: '', - search: - '', - "select-all": - '', - selected: - '', - send: '', - settings: - '', - sharpen: - '', - sourcecode: - '', - "spell-check": - '', - "strike-through": - '', - subscript: - '', - superscript: - '', - "table-caption": - '', - "table-cell-classes": - '', - "table-cell-properties": - '', - "table-cell-select-all": - '', - "table-cell-select-inner": - '', - "table-classes": - '', - "table-delete-column": - '', - "table-delete-row": - '', - "table-delete-table": - '', - "table-insert-column-after": - '', - "table-insert-column-before": - '', - "table-insert-row-above": - '', - "table-insert-row-after": - '', - "table-left-header": - '', - "table-merge-cells": - '', - "table-row-numbering-rtl": - '', - "table-row-numbering": - '', - "table-row-properties": - '', - "table-split-cells": - '', - "table-top-header": - '', - table: - '', - "template-add": - '', - template: - '', - "temporary-placeholder": - '', - "text-color": - '', - "text-size-decrease": - '', - "text-size-increase": - '', - toc: '', - translate: - '', - typography: - '', - underline: - '', - undo: '', - unlink: - '', - unlock: - '', - "unordered-list": - '', - unselected: - '', - upload: - '', - user: '', - "vertical-align": - '', - visualblocks: - '', - visualchars: - '', - warning: - '', - "zoom-in": - '', - "zoom-out": - '', - }, -}); diff --git a/src/lib/dist/tinymce/license.txt b/src/lib/dist/tinymce/license.txt deleted file mode 100644 index 3a49f66f..00000000 --- a/src/lib/dist/tinymce/license.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 Ephox Corporation DBA Tiny Technologies, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/src/lib/dist/tinymce/models/dom/model.min.js b/src/lib/dist/tinymce/models/dom/model.min.js deleted file mode 100644 index 79261bc6..00000000 --- a/src/lib/dist/tinymce/models/dom/model.min.js +++ /dev/null @@ -1,6277 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var e = tinymce.util.Tools.resolve("tinymce.ModelManager"); - const t = (e) => (t) => - ((e) => { - const t = typeof e; - return null === e - ? "null" - : "object" === t && Array.isArray(e) - ? "array" - : "object" === t && - ((o = n = e), - (r = String).prototype.isPrototypeOf(o) || - (null === (s = n.constructor) || void 0 === s - ? void 0 - : s.name) === r.name) - ? "string" - : t; - var o, n, r, s; - })(t) === e, - o = (e) => (t) => typeof t === e, - n = (e) => (t) => e === t, - r = t("string"), - s = t("object"), - l = t("array"), - a = n(null), - c = o("boolean"), - i = n(void 0), - m = (e) => !((e) => null == e)(e), - d = o("function"), - u = o("number"), - f = () => {}, - g = (e) => () => e, - h = (e) => e, - p = (e, t) => e === t; - function w(e, ...t) { - return (...o) => { - const n = t.concat(o); - return e.apply(null, n); - }; - } - const b = (e) => (t) => !e(t), - v = (e) => e(), - y = g(!1), - x = g(!0); - class C { - constructor(e, t) { - (this.tag = e), (this.value = t); - } - static some(e) { - return new C(!0, e); - } - static none() { - return C.singletonNone; - } - fold(e, t) { - return this.tag ? t(this.value) : e(); - } - isSome() { - return this.tag; - } - isNone() { - return !this.tag; - } - map(e) { - return this.tag ? C.some(e(this.value)) : C.none(); - } - bind(e) { - return this.tag ? e(this.value) : C.none(); - } - exists(e) { - return this.tag && e(this.value); - } - forall(e) { - return !this.tag || e(this.value); - } - filter(e) { - return !this.tag || e(this.value) ? this : C.none(); - } - getOr(e) { - return this.tag ? this.value : e; - } - or(e) { - return this.tag ? this : e; - } - getOrThunk(e) { - return this.tag ? this.value : e(); - } - orThunk(e) { - return this.tag ? this : e(); - } - getOrDie(e) { - if (this.tag) return this.value; - throw new Error(null != e ? e : "Called getOrDie on None"); - } - static from(e) { - return m(e) ? C.some(e) : C.none(); - } - getOrNull() { - return this.tag ? this.value : null; - } - getOrUndefined() { - return this.value; - } - each(e) { - this.tag && e(this.value); - } - toArray() { - return this.tag ? [this.value] : []; - } - toString() { - return this.tag ? `some(${this.value})` : "none()"; - } - } - C.singletonNone = new C(!1); - const S = Array.prototype.slice, - T = Array.prototype.indexOf, - R = Array.prototype.push, - D = (e, t) => { - return (o = e), (n = t), T.call(o, n) > -1; - var o, n; - }, - O = (e, t) => { - for (let o = 0, n = e.length; o < n; o++) if (t(e[o], o)) return !0; - return !1; - }, - k = (e, t) => { - const o = []; - for (let n = 0; n < e; n++) o.push(t(n)); - return o; - }, - E = (e, t) => { - const o = e.length, - n = new Array(o); - for (let r = 0; r < o; r++) { - const o = e[r]; - n[r] = t(o, r); - } - return n; - }, - N = (e, t) => { - for (let o = 0, n = e.length; o < n; o++) t(e[o], o); - }, - B = (e, t) => { - const o = [], - n = []; - for (let r = 0, s = e.length; r < s; r++) { - const s = e[r]; - (t(s, r) ? o : n).push(s); - } - return { pass: o, fail: n }; - }, - _ = (e, t) => { - const o = []; - for (let n = 0, r = e.length; n < r; n++) { - const r = e[n]; - t(r, n) && o.push(r); - } - return o; - }, - z = (e, t, o) => ( - ((e, t) => { - for (let o = e.length - 1; o >= 0; o--) t(e[o], o); - })(e, (e, n) => { - o = t(o, e, n); - }), - o - ), - A = (e, t, o) => ( - N(e, (e, n) => { - o = t(o, e, n); - }), - o - ), - L = (e, t) => - ((e, t, o) => { - for (let n = 0, r = e.length; n < r; n++) { - const r = e[n]; - if (t(r, n)) return C.some(r); - if (o(r, n)) break; - } - return C.none(); - })(e, t, y), - W = (e, t) => { - for (let o = 0, n = e.length; o < n; o++) - if (t(e[o], o)) return C.some(o); - return C.none(); - }, - M = (e) => { - const t = []; - for (let o = 0, n = e.length; o < n; ++o) { - if (!l(e[o])) - throw new Error( - "Arr.flatten item " + o + " was not an array, input: " + e, - ); - R.apply(t, e[o]); - } - return t; - }, - j = (e, t) => M(E(e, t)), - P = (e, t) => { - for (let o = 0, n = e.length; o < n; ++o) - if (!0 !== t(e[o], o)) return !1; - return !0; - }, - I = (e, t) => { - const o = {}; - for (let n = 0, r = e.length; n < r; n++) { - const r = e[n]; - o[String(r)] = t(r, n); - } - return o; - }, - F = (e, t) => (t >= 0 && t < e.length ? C.some(e[t]) : C.none()), - H = (e) => F(e, 0), - $ = (e) => F(e, e.length - 1), - V = (e, t) => { - for (let o = 0; o < e.length; o++) { - const n = t(e[o], o); - if (n.isSome()) return n; - } - return C.none(); - }, - q = Object.keys, - U = Object.hasOwnProperty, - G = (e, t) => { - const o = q(e); - for (let n = 0, r = o.length; n < r; n++) { - const r = o[n]; - t(e[r], r); - } - }, - K = (e, t) => Y(e, (e, o) => ({ k: o, v: t(e, o) })), - Y = (e, t) => { - const o = {}; - return ( - G(e, (e, n) => { - const r = t(e, n); - o[r.k] = r.v; - }), - o - ); - }, - J = (e, t) => { - const o = []; - return ( - G(e, (e, n) => { - o.push(t(e, n)); - }), - o - ); - }, - Q = (e) => J(e, h), - X = (e, t) => U.call(e, t), - Z = "undefined" != typeof window ? window : Function("return this;")(), - ee = (e, t) => - ((e, t) => { - let o = null != t ? t : Z; - for (let t = 0; t < e.length && null != o; ++t) o = o[e[t]]; - return o; - })(e.split("."), t), - te = Object.getPrototypeOf, - oe = (e) => { - const t = ee("ownerDocument.defaultView", e); - return ( - s(e) && - (((e) => - ((e, t) => { - const o = ((e, t) => ee(e, t))(e, t); - if (null == o) - throw new Error(e + " not available on this browser"); - return o; - })("HTMLElement", e))(t).prototype.isPrototypeOf(e) || - /^HTML\w*Element$/.test(te(e).constructor.name)) - ); - }, - ne = (e) => e.dom.nodeName.toLowerCase(), - re = (e) => e.dom.nodeType, - se = (e) => (t) => re(t) === e, - le = (e) => 8 === re(e) || "#comment" === ne(e), - ae = (e) => ce(e) && oe(e.dom), - ce = se(1), - ie = se(3), - me = se(9), - de = se(11), - ue = (e) => (t) => ce(t) && ne(t) === e, - fe = (e, t, o) => { - if (!(r(o) || c(o) || u(o))) - throw ( - (console.error( - "Invalid call to Attribute.set. Key ", - t, - ":: Value ", - o, - ":: Element ", - e, - ), - new Error("Attribute value was not simple")) - ); - e.setAttribute(t, o + ""); - }, - ge = (e, t, o) => { - fe(e.dom, t, o); - }, - he = (e, t) => { - const o = e.dom; - G(t, (e, t) => { - fe(o, t, e); - }); - }, - pe = (e, t) => { - const o = e.dom.getAttribute(t); - return null === o ? void 0 : o; - }, - we = (e, t) => C.from(pe(e, t)), - be = (e, t) => { - e.dom.removeAttribute(t); - }, - ve = (e) => A(e.dom.attributes, (e, t) => ((e[t.name] = t.value), e), {}), - ye = (e) => { - if (null == e) throw new Error("Node cannot be null or undefined"); - return { dom: e }; - }, - xe = { - fromHtml: (e, t) => { - const o = (t || document).createElement("div"); - if ( - ((o.innerHTML = e), !o.hasChildNodes() || o.childNodes.length > 1) - ) { - const t = "HTML does not have a single root node"; - throw (console.error(t, e), new Error(t)); - } - return ye(o.childNodes[0]); - }, - fromTag: (e, t) => { - const o = (t || document).createElement(e); - return ye(o); - }, - fromText: (e, t) => { - const o = (t || document).createTextNode(e); - return ye(o); - }, - fromDom: ye, - fromPoint: (e, t, o) => C.from(e.dom.elementFromPoint(t, o)).map(ye), - }, - Ce = (e, t) => { - const o = e.dom; - if (1 !== o.nodeType) return !1; - { - const e = o; - if (void 0 !== e.matches) return e.matches(t); - if (void 0 !== e.msMatchesSelector) return e.msMatchesSelector(t); - if (void 0 !== e.webkitMatchesSelector) - return e.webkitMatchesSelector(t); - if (void 0 !== e.mozMatchesSelector) return e.mozMatchesSelector(t); - throw new Error("Browser lacks native selectors"); - } - }, - Se = (e) => - (1 !== e.nodeType && 9 !== e.nodeType && 11 !== e.nodeType) || - 0 === e.childElementCount, - Te = (e, t) => { - const o = void 0 === t ? document : t.dom; - return Se(o) ? C.none() : C.from(o.querySelector(e)).map(xe.fromDom); - }, - Re = (e, t) => e.dom === t.dom, - De = (e, t) => { - const o = e.dom, - n = t.dom; - return o !== n && o.contains(n); - }, - Oe = Ce, - ke = (e) => xe.fromDom(e.dom.ownerDocument), - Ee = (e) => (me(e) ? e : ke(e)), - Ne = (e) => C.from(e.dom.parentNode).map(xe.fromDom), - Be = (e) => C.from(e.dom.parentElement).map(xe.fromDom), - _e = (e, t) => { - const o = d(t) ? t : y; - let n = e.dom; - const r = []; - for (; null !== n.parentNode && void 0 !== n.parentNode; ) { - const e = n.parentNode, - t = xe.fromDom(e); - if ((r.push(t), !0 === o(t))) break; - n = e; - } - return r; - }, - ze = (e) => C.from(e.dom.previousSibling).map(xe.fromDom), - Ae = (e) => C.from(e.dom.nextSibling).map(xe.fromDom), - Le = (e) => E(e.dom.childNodes, xe.fromDom), - We = (e, t) => { - const o = e.dom.childNodes; - return C.from(o[t]).map(xe.fromDom); - }, - Me = (e, t) => { - Ne(e).each((o) => { - o.dom.insertBefore(t.dom, e.dom); - }); - }, - je = (e, t) => { - Ae(e).fold( - () => { - Ne(e).each((e) => { - Ie(e, t); - }); - }, - (e) => { - Me(e, t); - }, - ); - }, - Pe = (e, t) => { - const o = ((e) => We(e, 0))(e); - o.fold( - () => { - Ie(e, t); - }, - (o) => { - e.dom.insertBefore(t.dom, o.dom); - }, - ); - }, - Ie = (e, t) => { - e.dom.appendChild(t.dom); - }, - Fe = (e, t) => { - Me(e, t), Ie(t, e); - }, - He = (e, t) => { - N(t, (o, n) => { - const r = 0 === n ? e : t[n - 1]; - je(r, o); - }); - }, - $e = (e, t) => { - N(t, (t) => { - Ie(e, t); - }); - }, - Ve = (e) => { - (e.dom.textContent = ""), - N(Le(e), (e) => { - qe(e); - }); - }, - qe = (e) => { - const t = e.dom; - null !== t.parentNode && t.parentNode.removeChild(t); - }, - Ue = (e) => { - const t = Le(e); - t.length > 0 && He(e, t), qe(e); - }, - Ge = (e, t) => xe.fromDom(e.dom.cloneNode(t)), - Ke = (e) => Ge(e, !1), - Ye = (e) => Ge(e, !0), - Je = (e, t) => { - const o = xe.fromTag(t), - n = ve(e); - return he(o, n), o; - }, - Qe = ["tfoot", "thead", "tbody", "colgroup"], - Xe = (e, t, o) => ({ element: e, rowspan: t, colspan: o }), - Ze = (e, t, o) => ({ element: e, cells: t, section: o }), - et = (e, t, o) => ({ element: e, isNew: t, isLocked: o }), - tt = (e, t, o, n) => ({ element: e, cells: t, section: o, isNew: n }), - ot = d(Element.prototype.attachShadow) && d(Node.prototype.getRootNode), - nt = g(ot), - rt = ot ? (e) => xe.fromDom(e.dom.getRootNode()) : Ee, - st = (e) => xe.fromDom(e.dom.host), - lt = (e) => { - const t = ie(e) ? e.dom.parentNode : e.dom; - if (null == t || null === t.ownerDocument) return !1; - const o = t.ownerDocument; - return ((e) => { - const t = rt(e); - return de((o = t)) && m(o.dom.host) ? C.some(t) : C.none(); - var o; - })(xe.fromDom(t)).fold( - () => o.body.contains(t), - ((n = lt), (r = st), (e) => n(r(e))), - ); - var n, r; - }, - at = (e) => { - const t = e.dom.body; - if (null == t) throw new Error("Body is not available yet"); - return xe.fromDom(t); - }, - ct = (e, t) => { - let o = []; - return ( - N(Le(e), (e) => { - t(e) && (o = o.concat([e])), (o = o.concat(ct(e, t))); - }), - o - ); - }, - it = (e, t, o) => ((e, o, n) => _(_e(e, n), (e) => Ce(e, t)))(e, 0, o), - mt = (e, t) => ((e, o) => _(Le(e), (e) => Ce(e, t)))(e), - dt = (e, t) => - ((e, t) => { - const o = void 0 === t ? document : t.dom; - return Se(o) ? [] : E(o.querySelectorAll(e), xe.fromDom); - })(t, e); - var ut = (e, t, o, n, r) => - e(o, n) ? C.some(o) : d(r) && r(o) ? C.none() : t(o, n, r); - const ft = (e, t, o) => { - let n = e.dom; - const r = d(o) ? o : y; - for (; n.parentNode; ) { - n = n.parentNode; - const e = xe.fromDom(n); - if (t(e)) return C.some(e); - if (r(e)) break; - } - return C.none(); - }, - gt = (e, t, o) => ut((e, t) => t(e), ft, e, t, o), - ht = (e, t, o) => ft(e, (e) => Ce(e, t), o), - pt = (e, t) => - ((e, o) => - L(e.dom.childNodes, (e) => { - return (o = xe.fromDom(e)), Ce(o, t); - var o; - }).map(xe.fromDom))(e), - wt = (e, t) => Te(t, e), - bt = (e, t, o) => ut((e, t) => Ce(e, t), ht, e, t, o), - vt = (e, t, o = p) => e.exists((e) => o(e, t)), - yt = (e) => { - const t = [], - o = (e) => { - t.push(e); - }; - for (let t = 0; t < e.length; t++) e[t].each(o); - return t; - }, - xt = (e, t) => (e ? C.some(t) : C.none()), - Ct = (e, t, o) => - "" === t || (e.length >= t.length && e.substr(o, o + t.length) === t), - St = (e, t, o = 0, n) => { - const r = e.indexOf(t, o); - return -1 !== r && (!!i(n) || r + t.length <= n); - }, - Tt = (e, t) => Ct(e, t, 0), - Rt = (e, t) => Ct(e, t, e.length - t.length), - Dt = ( - (e) => (t) => - t.replace(e, "") - )(/^\s+|\s+$/g), - Ot = (e) => e.length > 0, - kt = (e) => void 0 !== e.style && d(e.style.getPropertyValue), - Et = (e, t, o) => { - if (!r(o)) - throw ( - (console.error( - "Invalid call to CSS.set. Property ", - t, - ":: Value ", - o, - ":: Element ", - e, - ), - new Error("CSS value must be a string: " + o)) - ); - kt(e) && e.style.setProperty(t, o); - }, - Nt = (e, t, o) => { - const n = e.dom; - Et(n, t, o); - }, - Bt = (e, t) => { - const o = e.dom; - G(t, (e, t) => { - Et(o, t, e); - }); - }, - _t = (e, t) => { - const o = e.dom, - n = window.getComputedStyle(o).getPropertyValue(t); - return "" !== n || lt(e) ? n : zt(o, t); - }, - zt = (e, t) => (kt(e) ? e.style.getPropertyValue(t) : ""), - At = (e, t) => { - const o = e.dom, - n = zt(o, t); - return C.from(n).filter((e) => e.length > 0); - }, - Lt = (e, t) => { - ((e, t) => { - kt(e) && e.style.removeProperty(t); - })(e.dom, t), - vt(we(e, "style").map(Dt), "") && be(e, "style"); - }, - Wt = (e, t, o = 0) => - we(e, t) - .map((e) => parseInt(e, 10)) - .getOr(o), - Mt = (e, t) => Wt(e, t, 1), - jt = (e) => (ue("col")(e) ? Wt(e, "span", 1) > 1 : Mt(e, "colspan") > 1), - Pt = (e) => Mt(e, "rowspan") > 1, - It = (e, t) => parseInt(_t(e, t), 10), - Ft = g(10), - Ht = g(10), - $t = (e, t) => Vt(e, t, x), - Vt = (e, t, o) => - j(Le(e), (e) => (Ce(e, t) ? (o(e) ? [e] : []) : Vt(e, t, o))), - qt = (e, t) => - ((e, t, o = y) => - o(t) - ? C.none() - : D(e, ne(t)) - ? C.some(t) - : ht(t, e.join(","), (e) => Ce(e, "table") || o(e)))( - ["td", "th"], - e, - t, - ), - Ut = (e) => $t(e, "th,td"), - Gt = (e) => - Ce(e, "colgroup") ? mt(e, "col") : j(Jt(e), (e) => mt(e, "col")), - Kt = (e, t) => bt(e, "table", t), - Yt = (e) => $t(e, "tr"), - Jt = (e) => Kt(e).fold(g([]), (e) => mt(e, "colgroup")), - Qt = (e, t) => - E(e, (e) => { - if ("colgroup" === ne(e)) { - const t = E(Gt(e), (e) => { - const t = Wt(e, "span", 1); - return Xe(e, 1, t); - }); - return Ze(e, t, "colgroup"); - } - { - const o = E(Ut(e), (e) => { - const t = Wt(e, "rowspan", 1), - o = Wt(e, "colspan", 1); - return Xe(e, t, o); - }); - return Ze(e, o, t(e)); - } - }), - Xt = (e) => - Ne(e) - .map((e) => { - const t = ne(e); - return ((e) => D(Qe, e))(t) ? t : "tbody"; - }) - .getOr("tbody"), - Zt = (e) => { - const t = Yt(e), - o = [...Jt(e), ...t]; - return Qt(o, Xt); - }, - eo = (e) => { - let t, - o = !1; - return (...n) => (o || ((o = !0), (t = e.apply(null, n))), t); - }, - to = () => oo(0, 0), - oo = (e, t) => ({ major: e, minor: t }), - no = { - nu: oo, - detect: (e, t) => { - const o = String(t).toLowerCase(); - return 0 === e.length - ? to() - : ((e, t) => { - const o = ((e, t) => { - for (let o = 0; o < e.length; o++) { - const n = e[o]; - if (n.test(t)) return n; - } - })(e, t); - if (!o) return { major: 0, minor: 0 }; - const n = (e) => Number(t.replace(o, "$" + e)); - return oo(n(1), n(2)); - })(e, o); - }, - unknown: to, - }, - ro = (e, t) => { - const o = String(t).toLowerCase(); - return L(e, (e) => e.search(o)); - }, - so = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/, - lo = (e) => (t) => St(t, e), - ao = [ - { - name: "Edge", - versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/], - search: (e) => - St(e, "edge/") && - St(e, "chrome") && - St(e, "safari") && - St(e, "applewebkit"), - }, - { - name: "Chromium", - brand: "Chromium", - versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/, so], - search: (e) => St(e, "chrome") && !St(e, "chromeframe"), - }, - { - name: "IE", - versionRegexes: [ - /.*?msie\ ?([0-9]+)\.([0-9]+).*/, - /.*?rv:([0-9]+)\.([0-9]+).*/, - ], - search: (e) => St(e, "msie") || St(e, "trident"), - }, - { - name: "Opera", - versionRegexes: [so, /.*?opera\/([0-9]+)\.([0-9]+).*/], - search: lo("opera"), - }, - { - name: "Firefox", - versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/], - search: lo("firefox"), - }, - { - name: "Safari", - versionRegexes: [so, /.*?cpu os ([0-9]+)_([0-9]+).*/], - search: (e) => - (St(e, "safari") || St(e, "mobile/")) && St(e, "applewebkit"), - }, - ], - co = [ - { - name: "Windows", - search: lo("win"), - versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/], - }, - { - name: "iOS", - search: (e) => St(e, "iphone") || St(e, "ipad"), - versionRegexes: [ - /.*?version\/\ ?([0-9]+)\.([0-9]+).*/, - /.*cpu os ([0-9]+)_([0-9]+).*/, - /.*cpu iphone os ([0-9]+)_([0-9]+).*/, - ], - }, - { - name: "Android", - search: lo("android"), - versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/], - }, - { - name: "macOS", - search: lo("mac os x"), - versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/], - }, - { name: "Linux", search: lo("linux"), versionRegexes: [] }, - { name: "Solaris", search: lo("sunos"), versionRegexes: [] }, - { name: "FreeBSD", search: lo("freebsd"), versionRegexes: [] }, - { - name: "ChromeOS", - search: lo("cros"), - versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/], - }, - ], - io = { browsers: g(ao), oses: g(co) }, - mo = "Edge", - uo = "Chromium", - fo = "Opera", - go = "Firefox", - ho = "Safari", - po = (e) => { - const t = e.current, - o = e.version, - n = (e) => () => t === e; - return { - current: t, - version: o, - isEdge: n(mo), - isChromium: n(uo), - isIE: n("IE"), - isOpera: n(fo), - isFirefox: n(go), - isSafari: n(ho), - }; - }, - wo = () => po({ current: void 0, version: no.unknown() }), - bo = po, - vo = (g(mo), g(uo), g("IE"), g(fo), g(go), g(ho), "Windows"), - yo = "Android", - xo = "Linux", - Co = "macOS", - So = "Solaris", - To = "FreeBSD", - Ro = "ChromeOS", - Do = (e) => { - const t = e.current, - o = e.version, - n = (e) => () => t === e; - return { - current: t, - version: o, - isWindows: n(vo), - isiOS: n("iOS"), - isAndroid: n(yo), - isMacOS: n(Co), - isLinux: n(xo), - isSolaris: n(So), - isFreeBSD: n(To), - isChromeOS: n(Ro), - }; - }, - Oo = () => Do({ current: void 0, version: no.unknown() }), - ko = Do, - Eo = - (g(vo), - g("iOS"), - g(yo), - g(xo), - g(Co), - g(So), - g(To), - g(Ro), - (e) => window.matchMedia(e).matches); - let No = eo(() => - ((e, t, o) => { - const n = io.browsers(), - r = io.oses(), - s = t - .bind((e) => - ((e, t) => - V(t.brands, (t) => { - const o = t.brand.toLowerCase(); - return L(e, (e) => { - var t; - return ( - o === - (null === (t = e.brand) || void 0 === t - ? void 0 - : t.toLowerCase()) - ); - }).map((e) => ({ - current: e.name, - version: no.nu(parseInt(t.version, 10), 0), - })); - }))(n, e), - ) - .orThunk(() => - ((e, t) => - ro(e, t).map((e) => { - const o = no.detect(e.versionRegexes, t); - return { current: e.name, version: o }; - }))(n, e), - ) - .fold(wo, bo), - l = ((e, t) => - ro(e, t).map((e) => { - const o = no.detect(e.versionRegexes, t); - return { current: e.name, version: o }; - }))(r, e).fold(Oo, ko), - a = ((e, t, o, n) => { - const r = e.isiOS() && !0 === /ipad/i.test(o), - s = e.isiOS() && !r, - l = e.isiOS() || e.isAndroid(), - a = l || n("(pointer:coarse)"), - c = r || (!s && l && n("(min-device-width:768px)")), - i = s || (l && !c), - m = t.isSafari() && e.isiOS() && !1 === /safari/i.test(o), - d = !i && !c && !m; - return { - isiPad: g(r), - isiPhone: g(s), - isTablet: g(c), - isPhone: g(i), - isTouch: g(a), - isAndroid: e.isAndroid, - isiOS: e.isiOS, - isWebView: g(m), - isDesktop: g(d), - }; - })(l, s, e, o); - return { browser: s, os: l, deviceType: a }; - })(navigator.userAgent, C.from(navigator.userAgentData), Eo), - ); - const Bo = () => No(), - _o = (e, t) => { - const o = (o) => { - const n = t(o); - if (n <= 0 || null === n) { - const t = _t(o, e); - return parseFloat(t) || 0; - } - return n; - }, - n = (e, t) => - A( - t, - (t, o) => { - const n = _t(e, o), - r = void 0 === n ? 0 : parseInt(n, 10); - return isNaN(r) ? t : t + r; - }, - 0, - ); - return { - set: (t, o) => { - if (!u(o) && !o.match(/^[0-9]+$/)) - throw new Error( - e + ".set accepts only positive integer values. Value was " + o, - ); - const n = t.dom; - kt(n) && (n.style[e] = o + "px"); - }, - get: o, - getOuter: o, - aggregate: n, - max: (e, t, o) => { - const r = n(e, o); - return t > r ? t - r : 0; - }, - }; - }, - zo = (e, t, o) => - ((e, t) => - ((e) => { - const t = parseFloat(e); - return isNaN(t) ? C.none() : C.some(t); - })(e).getOr(t))(_t(e, t), o), - Ao = _o("width", (e) => e.dom.offsetWidth), - Lo = (e) => Ao.get(e), - Wo = (e) => Ao.getOuter(e), - Mo = (e) => - ((e, t) => { - const o = e.dom, - n = o.getBoundingClientRect().width || o.offsetWidth; - return "border-box" === t - ? n - : ((e, t, o, n) => - t - - zo(e, `padding-${o}`, 0) - - zo(e, `padding-${n}`, 0) - - zo(e, `border-${o}-width`, 0) - - zo(e, `border-${n}-width`, 0))(e, n, "left", "right"); - })(e, "content-box"), - jo = (e, t, o) => { - const n = e.cells, - r = n.slice(0, t), - s = n.slice(t), - l = r.concat(o).concat(s); - return Fo(e, l); - }, - Po = (e, t, o) => jo(e, t, [o]), - Io = (e, t, o) => { - e.cells[t] = o; - }, - Fo = (e, t) => tt(e.element, t, e.section, e.isNew), - Ho = (e, t) => e.cells[t], - $o = (e, t) => Ho(e, t).element, - Vo = (e) => e.cells.length, - qo = (e) => { - const t = B(e, (e) => "colgroup" === e.section); - return { rows: t.fail, cols: t.pass }; - }, - Uo = (e, t, o) => { - const n = E(e.cells, o); - return tt(t(e.element), n, e.section, !0); - }, - Go = "data-snooker-locked-cols", - Ko = (e) => - we(e, Go) - .bind((e) => C.from(e.match(/\d+/g))) - .map((e) => I(e, x)), - Yo = (e) => { - const t = A( - qo(e).rows, - (e, t) => ( - N(t.cells, (t, o) => { - t.isLocked && (e[o] = !0); - }), - e - ), - {}, - ), - o = J(t, (e, t) => parseInt(t, 10)); - return ((e, t) => { - const o = S.call(e, 0); - return o.sort(void 0), o; - })(o); - }, - Jo = (e, t) => e + "," + t, - Qo = (e, t) => { - const o = j(e.all, (e) => e.cells); - return _(o, t); - }, - Xo = (e) => { - const t = {}, - o = [], - n = H(e) - .map((e) => e.element) - .bind(Kt) - .bind(Ko) - .getOr({}); - let r = 0, - s = 0, - l = 0; - const { pass: a, fail: c } = B(e, (e) => "colgroup" === e.section); - N(c, (e) => { - const a = []; - N(e.cells, (e) => { - let o = 0; - for (; void 0 !== t[Jo(l, o)]; ) o++; - const r = ((e, t) => X(e, t) && void 0 !== e[t] && null !== e[t])( - n, - o.toString(), - ), - c = ((e, t, o, n, r, s) => ({ - element: e, - rowspan: t, - colspan: o, - row: n, - column: r, - isLocked: s, - }))(e.element, e.rowspan, e.colspan, l, o, r); - for (let n = 0; n < e.colspan; n++) - for (let r = 0; r < e.rowspan; r++) { - const e = o + n, - a = Jo(l + r, e); - (t[a] = c), (s = Math.max(s, e + 1)); - } - a.push(c); - }), - r++, - o.push(Ze(e.element, a, e.section)), - l++; - }); - const { columns: i, colgroups: m } = $(a) - .map((e) => { - const t = ((e) => { - const t = {}; - let o = 0; - return ( - N(e.cells, (e) => { - const n = e.colspan; - k(n, (r) => { - const s = o + r; - t[s] = ((e, t, o) => ({ - element: e, - colspan: t, - column: o, - }))(e.element, n, s); - }), - (o += n); - }), - t - ); - })(e), - o = ((e, t) => ({ element: e, columns: t }))(e.element, Q(t)); - return { colgroups: [o], columns: t }; - }) - .getOrThunk(() => ({ colgroups: [], columns: {} })), - d = ((e, t) => ({ rows: e, columns: t }))(r, s); - return { grid: d, access: t, all: o, columns: i, colgroups: m }; - }, - Zo = (e) => { - const t = Zt(e); - return Xo(t); - }, - en = Xo, - tn = (e, t, o) => C.from(e.access[Jo(t, o)]), - on = (e, t, o) => { - const n = Qo(e, (e) => o(t, e.element)); - return n.length > 0 ? C.some(n[0]) : C.none(); - }, - nn = Qo, - rn = (e) => j(e.all, (e) => e.cells), - sn = (e) => Q(e.columns), - ln = (e) => q(e.columns).length > 0, - an = (e, t) => C.from(e.columns[t]), - cn = (e, t = x) => { - const o = e.grid, - n = k(o.columns, h), - r = k(o.rows, h); - return E(n, (o) => - mn( - () => - j(r, (t) => - tn(e, t, o) - .filter((e) => e.column === o) - .toArray(), - ), - (e) => 1 === e.colspan && t(e.element), - () => tn(e, 0, o), - ), - ); - }, - mn = (e, t, o) => { - const n = e(); - return L(n, t) - .orThunk(() => C.from(n[0]).orThunk(o)) - .map((e) => e.element); - }, - dn = (e) => { - const t = e.grid, - o = k(t.rows, h), - n = k(t.columns, h); - return E(o, (t) => - mn( - () => - j(n, (o) => - tn(e, t, o) - .filter((e) => e.row === t) - .fold(g([]), (e) => [e]), - ), - (e) => 1 === e.rowspan, - () => tn(e, t, 0), - ), - ); - }, - un = (e, t) => (o) => ("rtl" === fn(o) ? t : e), - fn = (e) => ("rtl" === _t(e, "direction") ? "rtl" : "ltr"), - gn = _o("height", (e) => { - const t = e.dom; - return lt(e) ? t.getBoundingClientRect().height : t.offsetHeight; - }), - hn = (e) => gn.get(e), - pn = (e) => gn.getOuter(e), - wn = (e, t) => ({ left: e, top: t, translate: (o, n) => wn(e + o, t + n) }), - bn = wn, - vn = (e, t) => (void 0 !== e ? e : void 0 !== t ? t : 0), - yn = (e) => { - const t = e.dom.ownerDocument, - o = t.body, - n = t.defaultView, - r = t.documentElement; - if (o === e.dom) return bn(o.offsetLeft, o.offsetTop); - const s = vn(null == n ? void 0 : n.pageYOffset, r.scrollTop), - l = vn(null == n ? void 0 : n.pageXOffset, r.scrollLeft), - a = vn(r.clientTop, o.clientTop), - c = vn(r.clientLeft, o.clientLeft); - return xn(e).translate(l - c, s - a); - }, - xn = (e) => { - const t = e.dom, - o = t.ownerDocument.body; - return o === t - ? bn(o.offsetLeft, o.offsetTop) - : lt(e) - ? ((e) => { - const t = e.getBoundingClientRect(); - return bn(t.left, t.top); - })(t) - : bn(0, 0); - }, - Cn = (e, t) => ({ row: e, y: t }), - Sn = (e, t) => ({ col: e, x: t }), - Tn = (e) => yn(e).left + Wo(e), - Rn = (e) => yn(e).left, - Dn = (e, t) => Sn(e, Rn(t)), - On = (e, t) => Sn(e, Tn(t)), - kn = (e) => yn(e).top, - En = (e, t) => Cn(e, kn(t)), - Nn = (e, t) => Cn(e, kn(t) + pn(t)), - Bn = (e, t, o) => { - if (0 === o.length) return []; - const n = E(o.slice(1), (t, o) => t.map((t) => e(o, t))), - r = o[o.length - 1].map((e) => t(o.length - 1, e)); - return n.concat([r]); - }, - _n = { delta: h, positions: (e) => Bn(En, Nn, e), edge: kn }, - zn = un( - { delta: h, edge: Rn, positions: (e) => Bn(Dn, On, e) }, - { delta: (e) => -e, edge: Tn, positions: (e) => Bn(On, Dn, e) }, - ), - An = { - delta: (e, t) => zn(t).delta(e, t), - positions: (e, t) => zn(t).positions(e, t), - edge: (e) => zn(e).edge(e), - }, - Ln = { - unsupportedLength: [ - "em", - "ex", - "cap", - "ch", - "ic", - "rem", - "lh", - "rlh", - "vw", - "vh", - "vi", - "vb", - "vmin", - "vmax", - "cm", - "mm", - "Q", - "in", - "pc", - "pt", - "px", - ], - fixed: ["px", "pt"], - relative: ["%"], - empty: [""], - }, - Wn = (() => { - const e = "[0-9]+", - t = "[eE][+-]?" + e, - o = (e) => `(?:${e})?`, - n = [ - "Infinity", - e + "\\." + o(e) + o(t), - "\\." + e + o(t), - e + o(t), - ].join("|"); - return new RegExp(`^([+-]?(?:${n}))(.*)$`); - })(), - Mn = /(\d+(\.\d+)?)%/, - jn = /(\d+(\.\d+)?)px|em/, - Pn = ue("col"), - In = (e, t, o) => { - const n = Be(e).getOrThunk(() => at(ke(e))); - return (t(e) / o(n)) * 100; - }, - Fn = (e, t) => { - Nt(e, "width", t + "px"); - }, - Hn = (e, t) => { - Nt(e, "width", t + "%"); - }, - $n = (e, t) => { - Nt(e, "height", t + "px"); - }, - Vn = (e) => { - const t = ((e) => { - return zo((t = e), "height", t.dom.offsetHeight) + "px"; - var t; - })(e); - return t - ? ((e, t, o, n) => { - const r = parseFloat(e); - return Rt(e, "%") && "table" !== ne(t) - ? ((e, t, o, n) => { - const r = Kt(e) - .map((e) => { - const n = o(e); - return Math.floor((t / 100) * n); - }) - .getOr(t); - return n(e, r), r; - })(t, r, o, n) - : r; - })(t, e, hn, $n) - : hn(e); - }, - qn = (e, t) => At(e, t).orThunk(() => we(e, t).map((e) => e + "px")), - Un = (e) => qn(e, "width"), - Gn = (e) => In(e, Lo, Mo), - Kn = (e) => { - return Pn(e) ? Lo(e) : zo((t = e), "width", t.dom.offsetWidth); - var t; - }, - Yn = (e) => ((e, t, o) => o(e) / Mt(e, "rowspan"))(e, 0, Vn), - Jn = (e, t, o) => { - Nt(e, "width", t + o); - }, - Qn = (e) => In(e, Lo, Mo) + "%", - Xn = g(Mn), - Zn = ue("col"), - er = (e) => Un(e).getOrThunk(() => Kn(e) + "px"), - tr = (e) => { - return ((t = e), qn(t, "height")).getOrThunk(() => Yn(e) + "px"); - var t; - }, - or = (e, t, o, n, r, s) => - e.filter(n).fold( - () => - s( - ((e, t) => { - if (t < 0 || t >= e.length - 1) return C.none(); - const o = e[t].fold( - () => { - const o = ((e) => { - const t = S.call(e, 0); - return t.reverse(), t; - })(e.slice(0, t)); - return V(o, (e, t) => - e.map((e) => ({ value: e, delta: t + 1 })), - ); - }, - (e) => C.some({ value: e, delta: 0 }), - ), - n = e[t + 1].fold( - () => { - const o = e.slice(t + 1); - return V(o, (e, t) => - e.map((e) => ({ value: e, delta: t + 1 })), - ); - }, - (e) => C.some({ value: e, delta: 1 }), - ); - return o.bind((e) => - n.map((t) => { - const o = t.delta + e.delta; - return Math.abs(t.value - e.value) / o; - }), - ); - })(o, t), - ), - (e) => r(e), - ), - nr = (e, t, o, n) => { - const r = cn(e), - s = ln(e) ? ((e) => E(sn(e), (e) => C.from(e.element)))(e) : r, - l = [C.some(An.edge(t))].concat( - E(An.positions(r, t), (e) => e.map((e) => e.x)), - ), - a = b(jt); - return E(s, (e, t) => - or( - e, - t, - l, - a, - (e) => { - if ( - ((e) => { - const t = Bo().browser, - o = t.isChromium() || t.isFirefox(); - return !Zn(e) || o; - })(e) - ) - return o(e); - { - const e = null != (s = r[t]) ? h(s) : C.none(); - return or(e, t, l, a, (e) => n(C.some(Lo(e))), n); - } - var s; - }, - n, - ), - ); - }, - rr = (e) => e.map((e) => e + "px").getOr(""), - sr = (e, t, o) => nr(e, t, Kn, (e) => e.getOrThunk(o.minCellWidth)), - lr = (e, t, o, n, r) => { - const s = dn(e), - l = [C.some(o.edge(t))].concat( - E(o.positions(s, t), (e) => e.map((e) => e.y)), - ); - return E(s, (e, t) => or(e, t, l, b(Pt), n, r)); - }, - ar = (e, t) => () => (lt(e) ? t(e) : parseFloat(At(e, "width").getOr("0"))), - cr = (e) => { - const t = ar(e, (e) => parseFloat(Qn(e))), - o = ar(e, Lo); - return { - width: t, - pixelWidth: o, - getWidths: (t, o) => - ((e, t, o) => - nr(e, t, Gn, (e) => - e.fold( - () => o.minCellWidth(), - (e) => (e / o.pixelWidth()) * 100, - ), - ))(t, e, o), - getCellDelta: (e) => (e / o()) * 100, - singleColumnWidth: (e, t) => [100 - e], - minCellWidth: () => (Ft() / o()) * 100, - setElementWidth: Hn, - adjustTableWidth: (o) => { - const n = t(); - Hn(e, n + (o / 100) * n); - }, - isRelative: !0, - label: "percent", - }; - }, - ir = (e) => { - const t = ar(e, Lo); - return { - width: t, - pixelWidth: t, - getWidths: (t, o) => sr(t, e, o), - getCellDelta: h, - singleColumnWidth: (e, t) => [Math.max(Ft(), e + t) - e], - minCellWidth: Ft, - setElementWidth: Fn, - adjustTableWidth: (o) => { - const n = t() + o; - Fn(e, n); - }, - isRelative: !1, - label: "pixel", - }; - }, - mr = (e) => - Un(e).fold( - () => - ((e) => { - const t = ar(e, Lo), - o = g(0); - return { - width: t, - pixelWidth: t, - getWidths: (t, o) => sr(t, e, o), - getCellDelta: o, - singleColumnWidth: g([0]), - minCellWidth: o, - setElementWidth: f, - adjustTableWidth: f, - isRelative: !0, - label: "none", - }; - })(e), - (t) => ((e, t) => (null !== Xn().exec(t) ? cr(e) : ir(e)))(e, t), - ), - dr = ir, - ur = cr, - fr = (e, t, o) => { - const n = e[o].element, - r = xe.fromTag("td"); - Ie(r, xe.fromTag("br")), (t ? Ie : Pe)(n, r); - }, - gr = ((e, t) => { - const o = (t) => (e(t) ? C.from(t.dom.nodeValue) : C.none()); - return { - get: (t) => { - if (!e(t)) throw new Error("Can only get text value of a text node"); - return o(t).getOr(""); - }, - getOption: o, - set: (t, o) => { - if (!e(t)) - throw new Error("Can only set raw text value of a text node"); - t.dom.nodeValue = o; - }, - }; - })(ie), - hr = (e) => gr.get(e), - pr = (e) => gr.getOption(e), - wr = (e, t) => gr.set(e, t), - br = (e) => - "img" === ne(e) - ? 1 - : pr(e).fold( - () => Le(e).length, - (e) => e.length, - ), - vr = ["img", "br"], - yr = (e) => - pr(e) - .filter((e) => 0 !== e.trim().length || e.indexOf("\xa0") > -1) - .isSome() || - D(vr, ne(e)) || - ((e) => ae(e) && "false" === pe(e, "contenteditable"))(e), - xr = (e) => - ((e, t) => { - const o = (e) => { - for (let n = 0; n < e.childNodes.length; n++) { - const r = xe.fromDom(e.childNodes[n]); - if (t(r)) return C.some(r); - const s = o(e.childNodes[n]); - if (s.isSome()) return s; - } - return C.none(); - }; - return o(e.dom); - })(e, yr), - Cr = (e) => Sr(e, yr), - Sr = (e, t) => { - const o = (e) => { - const n = Le(e); - for (let e = n.length - 1; e >= 0; e--) { - const r = n[e]; - if (t(r)) return C.some(r); - const s = o(r); - if (s.isSome()) return s; - } - return C.none(); - }; - return o(e); - }, - Tr = { scope: ["row", "col"] }, - Rr = (e) => () => { - const t = xe.fromTag("td", e.dom); - return Ie(t, xe.fromTag("br", e.dom)), t; - }, - Dr = (e) => () => xe.fromTag("col", e.dom), - Or = (e) => () => xe.fromTag("colgroup", e.dom), - kr = (e) => () => xe.fromTag("tr", e.dom), - Er = (e, t, o) => { - const n = ((e, t) => { - const o = Je(e, t), - n = Le(Ye(e)); - return $e(o, n), o; - })(e, t); - return ( - G(o, (e, t) => { - null === e ? be(n, t) : ge(n, t, e); - }), - n - ); - }, - Nr = (e) => e, - Br = (e, t, o) => { - const n = (e, t) => { - ((e, t) => { - const o = e.dom, - n = t.dom; - kt(o) && kt(n) && (n.style.cssText = o.style.cssText); - })(e.element, t), - Lt(t, "height"), - 1 !== e.colspan && Lt(t, "width"); - }; - return { - col: (o) => { - const r = xe.fromTag(ne(o.element), t.dom); - return n(o, r), e(o.element, r), r; - }, - colgroup: Or(t), - row: kr(t), - cell: (r) => { - const s = xe.fromTag(ne(r.element), t.dom), - l = o.getOr([ - "strong", - "em", - "b", - "i", - "span", - "font", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "p", - "div", - ]), - a = - l.length > 0 - ? ((e, t, o) => - xr(e) - .map((n) => { - const r = o.join(","), - s = it(n, r, (t) => Re(t, e)); - return z( - s, - (e, t) => { - const o = Ke(t); - return Ie(e, o), o; - }, - t, - ); - }) - .getOr(t))(r.element, s, l) - : s; - return ( - Ie(a, xe.fromTag("br")), - n(r, s), - ((e, t) => { - G(Tr, (o, n) => - we(e, n) - .filter((e) => D(o, e)) - .each((e) => ge(t, n, e)), - ); - })(r.element, s), - e(r.element, s), - s - ); - }, - replace: Er, - colGap: Dr(t), - gap: Rr(t), - }; - }, - _r = (e) => ({ - col: Dr(e), - colgroup: Or(e), - row: kr(e), - cell: Rr(e), - replace: Nr, - colGap: Dr(e), - gap: Rr(e), - }), - zr = (e) => (t) => t.options.get(e), - Ar = "100%", - Lr = (e) => { - var t; - const o = e.dom, - n = - null !== (t = o.getParent(e.selection.getStart(), o.isBlock)) && - void 0 !== t - ? t - : e.getBody(); - return Mo(xe.fromDom(n)) + "px"; - }, - Wr = (e) => C.from(e.options.get("table_clone_elements")), - Mr = zr("table_header_type"), - jr = zr("table_column_resizing"), - Pr = (e) => "preservetable" === jr(e), - Ir = (e) => "resizetable" === jr(e), - Fr = zr("table_sizing_mode"), - Hr = (e) => "relative" === Fr(e), - $r = (e) => "fixed" === Fr(e), - Vr = (e) => "responsive" === Fr(e), - qr = zr("table_resize_bars"), - Ur = zr("table_style_by_css"), - Gr = zr("table_merge_content_on_paste"), - Kr = (e) => { - const t = e.options, - o = t.get("table_default_attributes"); - return t.isSet("table_default_attributes") - ? o - : ((e, t) => - Vr(e) || Ur(e) - ? t - : $r(e) - ? { ...t, width: Lr(e) } - : { ...t, width: Ar })(e, o); - }, - Yr = zr("table_use_colgroups"), - Jr = (e) => bt(e, "[contenteditable]"), - Qr = (e, t = !1) => - lt(e) - ? e.dom.isContentEditable - : Jr(e).fold(g(t), (e) => "true" === Xr(e)), - Xr = (e) => e.dom.contentEditable, - Zr = (e) => xe.fromDom(e.getBody()), - es = (e) => (t) => Re(t, Zr(e)), - ts = (e) => { - be(e, "data-mce-style"); - const t = (e) => be(e, "data-mce-style"); - N(Ut(e), t), N(Gt(e), t), N(Yt(e), t); - }, - os = (e) => xe.fromDom(e.selection.getStart()), - ns = (e) => e.getBoundingClientRect().width, - rs = (e) => e.getBoundingClientRect().height, - ss = (e) => gt(e, ue("table")).exists(Qr), - ls = (e, t) => { - const o = t.column, - n = t.column + t.colspan - 1, - r = t.row, - s = t.row + t.rowspan - 1; - return ( - o <= e.finishCol && - n >= e.startCol && - r <= e.finishRow && - s >= e.startRow - ); - }, - as = (e, t) => - t.column >= e.startCol && - t.column + t.colspan - 1 <= e.finishCol && - t.row >= e.startRow && - t.row + t.rowspan - 1 <= e.finishRow, - cs = (e, t, o) => { - const n = on(e, t, Re), - r = on(e, o, Re); - return n.bind((e) => - r.map((t) => { - return ( - (o = e), - (n = t), - { - startRow: Math.min(o.row, n.row), - startCol: Math.min(o.column, n.column), - finishRow: Math.max(o.row + o.rowspan - 1, n.row + n.rowspan - 1), - finishCol: Math.max( - o.column + o.colspan - 1, - n.column + n.colspan - 1, - ), - } - ); - var o, n; - }), - ); - }, - is = (e, t, o) => - cs(e, t, o).map((t) => { - const o = nn(e, w(ls, t)); - return E(o, (e) => e.element); - }), - ms = (e, t) => on(e, t, (e, t) => De(t, e)).map((e) => e.element), - ds = (e, t, o) => { - const n = fs(e); - return is(n, t, o); - }, - us = (e, t, o, n, r) => { - const s = fs(e), - l = Re(e, o) ? C.some(t) : ms(s, t), - a = Re(e, r) ? C.some(n) : ms(s, n); - return l.bind((e) => a.bind((t) => is(s, e, t))); - }, - fs = Zo; - var gs = [ - "body", - "p", - "div", - "article", - "aside", - "figcaption", - "figure", - "footer", - "header", - "nav", - "section", - "ol", - "ul", - "li", - "table", - "thead", - "tbody", - "tfoot", - "caption", - "tr", - "td", - "th", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "blockquote", - "pre", - "address", - ], - hs = () => ({ - up: g({ selector: ht, closest: bt, predicate: ft, all: _e }), - down: g({ selector: dt, predicate: ct }), - styles: g({ get: _t, getRaw: At, set: Nt, remove: Lt }), - attrs: g({ - get: pe, - set: ge, - remove: be, - copyTo: (e, t) => { - const o = ve(e); - he(t, o); - }, - }), - insert: g({ - before: Me, - after: je, - afterAll: He, - append: Ie, - appendAll: $e, - prepend: Pe, - wrap: Fe, - }), - remove: g({ unwrap: Ue, remove: qe }), - create: g({ - nu: xe.fromTag, - clone: (e) => xe.fromDom(e.dom.cloneNode(!1)), - text: xe.fromText, - }), - query: g({ - comparePosition: (e, t) => e.dom.compareDocumentPosition(t.dom), - prevSibling: ze, - nextSibling: Ae, - }), - property: g({ - children: Le, - name: ne, - parent: Ne, - document: (e) => Ee(e).dom, - isText: ie, - isComment: le, - isElement: ce, - isSpecial: (e) => { - const t = ne(e); - return D( - [ - "script", - "noscript", - "iframe", - "noframes", - "noembed", - "title", - "style", - "textarea", - "xmp", - ], - t, - ); - }, - getLanguage: (e) => (ce(e) ? we(e, "lang") : C.none()), - getText: hr, - setText: wr, - isBoundary: (e) => !!ce(e) && ("body" === ne(e) || D(gs, ne(e))), - isEmptyTag: (e) => !!ce(e) && D(["br", "img", "hr", "input"], ne(e)), - isNonEditable: (e) => ce(e) && "false" === pe(e, "contenteditable"), - }), - eq: Re, - is: Oe, - }); - const ps = (e, t, o, n) => { - const r = t(e, o); - return z( - n, - (o, n) => { - const r = t(e, n); - return ws(e, o, r); - }, - r, - ); - }, - ws = (e, t, o) => t.bind((t) => o.filter(w(e.eq, t))), - bs = hs(), - vs = (e, t) => - ((e, t, o) => - o.length > 0 - ? ((e, t, o, n) => n(e, t, o[0], o.slice(1)))(e, t, o, ps) - : C.none())(bs, (t, o) => e(o), t), - ys = (e) => ht(e, "table"), - xs = (e, t, o) => { - const n = (e) => (t) => (void 0 !== o && o(t)) || Re(t, e); - return Re(e, t) - ? C.some({ boxes: C.some([e]), start: e, finish: t }) - : ys(e).bind((r) => - ys(t).bind((s) => { - if (Re(r, s)) - return C.some({ boxes: ds(r, e, t), start: e, finish: t }); - if (De(r, s)) { - const o = it(t, "td,th", n(r)), - l = o.length > 0 ? o[o.length - 1] : t; - return C.some({ - boxes: us(r, e, r, t, s), - start: e, - finish: l, - }); - } - if (De(s, r)) { - const o = it(e, "td,th", n(s)), - l = o.length > 0 ? o[o.length - 1] : e; - return C.some({ - boxes: us(s, e, r, t, s), - start: e, - finish: l, - }); - } - return ((e, t, o) => - ((e, t, o, n = y) => { - const r = [t].concat(e.up().all(t)), - s = [o].concat(e.up().all(o)), - l = (e) => - W(e, n).fold( - () => e, - (t) => e.slice(0, t + 1), - ), - a = l(r), - c = l(s), - i = L(a, (t) => O(c, ((e, t) => w(e.eq, t))(e, t))); - return { firstpath: a, secondpath: c, shared: i }; - })(bs, e, t, void 0))(e, t).shared.bind((l) => - bt(l, "table", o).bind((o) => { - const l = it(t, "td,th", n(o)), - a = l.length > 0 ? l[l.length - 1] : t, - c = it(e, "td,th", n(o)), - i = c.length > 0 ? c[c.length - 1] : e; - return C.some({ - boxes: us(o, e, r, t, s), - start: i, - finish: a, - }); - }), - ); - }), - ); - }, - Cs = (e, t) => { - const o = dt(e, t); - return o.length > 0 ? C.some(o) : C.none(); - }, - Ss = (e, t, o) => - wt(e, t).bind((t) => - wt(e, o).bind((e) => - vs(ys, [t, e]).map((o) => ({ first: t, last: e, table: o })), - ), - ), - Ts = (e, t, o, n, r) => - ((e, t) => L(e, (e) => Ce(e, t)))(e, r).bind((e) => - ((e, t, o) => - Kt(e).bind((n) => - ((e, t, o, n) => - on(e, t, Re).bind((t) => { - const r = o > 0 ? t.row + t.rowspan - 1 : t.row, - s = n > 0 ? t.column + t.colspan - 1 : t.column; - return tn(e, r + o, s + n).map((e) => e.element); - }))(fs(n), e, t, o), - ))(e, t, o).bind((e) => - ((e, t) => - ht(e, "table").bind((o) => - wt(o, t).bind((t) => - xs(t, e).bind((e) => - e.boxes.map((t) => ({ - boxes: t, - start: e.start, - finish: e.finish, - })), - ), - ), - ))(e, n), - ), - ), - Rs = (e, t) => Cs(e, t), - Ds = (e, t, o) => - Ss(e, t, o).bind((t) => { - const o = (t) => Re(e, t), - n = "thead,tfoot,tbody,table", - r = ht(t.first, n, o), - s = ht(t.last, n, o); - return r.bind((e) => - s.bind((o) => - Re(e, o) - ? ((e, t, o) => - ((e, t, o) => - cs(e, t, o).bind((t) => - ((e, t) => { - let o = !0; - const n = w(as, t); - for (let r = t.startRow; r <= t.finishRow; r++) - for (let s = t.startCol; s <= t.finishCol; s++) - o = o && tn(e, r, s).exists(n); - return o ? C.some(t) : C.none(); - })(e, t), - ))(fs(e), t, o))(t.table, t.first, t.last) - : C.none(), - ), - ); - }), - Os = h, - ks = (e) => { - const t = (e, t) => we(e, t).exists((e) => parseInt(e, 10) > 1); - return e.length > 0 && P(e, (e) => t(e, "rowspan") || t(e, "colspan")) - ? C.some(e) - : C.none(); - }, - Es = (e, t, o) => - t.length <= 1 - ? C.none() - : Ds(e, o.firstSelectedSelector, o.lastSelectedSelector).map((e) => ({ - bounds: e, - cells: t, - })), - Ns = "data-mce-selected", - Bs = "data-mce-first-selected", - _s = "data-mce-last-selected", - zs = "[" + Ns + "]", - As = { - selected: Ns, - selectedSelector: "td[" + Ns + "],th[" + Ns + "]", - firstSelected: Bs, - firstSelectedSelector: "td[" + Bs + "],th[" + Bs + "]", - lastSelected: _s, - lastSelectedSelector: "td[" + _s + "],th[" + _s + "]", - }, - Ls = (e, t, o) => ({ - element: o, - mergable: Es(t, e, As), - unmergable: ks(e), - selection: Os(e), - }), - Ws = (e) => (t, o) => { - const n = ne(t), - r = - "col" === n || "colgroup" === n - ? Kt((s = t)) - .bind((e) => Rs(e, As.firstSelectedSelector)) - .fold(g(s), (e) => e[0]) - : t; - var s; - return bt(r, e, o); - }, - Ms = Ws("th,td,caption"), - js = Ws("th,td"), - Ps = (e) => { - return (t = e.model.table.getSelectedCells()), E(t, xe.fromDom); - var t; - }, - Is = (e, t) => { - e.on("BeforeGetContent", (t) => { - const o = (o) => { - t.preventDefault(), - ((e) => - Kt(e[0]).map((e) => { - const t = ((e, t) => { - const o = (e) => Ce(e.element, t), - n = Ye(e), - r = Zt(n), - s = mr(e), - l = en(r), - a = ((e, t) => { - const o = e.grid.columns; - let n = e.grid.rows, - r = o, - s = 0, - l = 0; - const a = [], - c = []; - return ( - G(e.access, (e) => { - if ((a.push(e), t(e))) { - c.push(e); - const t = e.row, - o = t + e.rowspan - 1, - a = e.column, - i = a + e.colspan - 1; - t < n ? (n = t) : o > s && (s = o), - a < r ? (r = a) : i > l && (l = i); - } - }), - ((e, t, o, n, r, s) => ({ - minRow: e, - minCol: t, - maxRow: o, - maxCol: n, - allCells: r, - selectedCells: s, - }))(n, r, s, l, a, c) - ); - })(l, o), - c = "th:not(" + t + "),td:not(" + t + ")", - i = Vt(n, "th,td", (e) => Ce(e, c)); - N(i, qe), - ((e, t, o, n) => { - const r = _(e, (e) => "colgroup" !== e.section), - s = t.grid.columns, - l = t.grid.rows; - for (let e = 0; e < l; e++) { - let l = !1; - for (let a = 0; a < s; a++) - e < o.minRow || - e > o.maxRow || - a < o.minCol || - a > o.maxCol || - (tn(t, e, a).filter(n).isNone() - ? fr(r, l, e) - : (l = !0)); - } - })(r, l, a, o); - const m = ((e, t, o, n) => { - if (0 === n.minCol && t.grid.columns === n.maxCol + 1) - return 0; - const r = sr(t, e, o), - s = A(r, (e, t) => e + t, 0), - l = A( - r.slice(n.minCol, n.maxCol + 1), - (e, t) => e + t, - 0, - ), - a = (l / s) * o.pixelWidth() - o.pixelWidth(); - return o.getCellDelta(a); - })(e, Zo(e), s, a); - return ( - ((e, t, o, n) => { - G(o.columns, (e) => { - (e.column < t.minCol || e.column > t.maxCol) && - qe(e.element); - }); - const r = _( - $t(e, "tr"), - (e) => 0 === e.dom.childElementCount, - ); - N(r, qe), - (t.minCol !== t.maxCol && t.minRow !== t.maxRow) || - N($t(e, "th,td"), (e) => { - be(e, "rowspan"), be(e, "colspan"); - }), - be(e, Go), - be(e, "data-snooker-col-series"), - mr(e).adjustTableWidth(n); - })(n, a, l, m), - n - ); - })(e, zs); - return ts(t), [t]; - }))(o).each((o) => { - t.content = - "text" === t.format - ? ((e) => E(e, (e) => e.dom.innerText).join(""))(o) - : ((e, t) => - E(t, (t) => - e.selection.serializer.serialize(t.dom, {}), - ).join(""))(e, o); - }); - }; - if (!0 === t.selection) { - const t = ((e) => _(Ps(e), (e) => Ce(e, As.selectedSelector)))(e); - t.length >= 1 && o(t); - } - }), - e.on("BeforeSetContent", (o) => { - if (!0 === o.selection && !0 === o.paste) { - const n = Ps(e); - H(n).each((n) => { - Kt(n).each((r) => { - const s = _( - ((e, t) => { - const o = document.createElement("div"); - return (o.innerHTML = e), Le(xe.fromDom(o)); - })(o.content), - (e) => "meta" !== ne(e), - ), - l = ue("table"); - if (Gr(e) && 1 === s.length && l(s[0])) { - o.preventDefault(); - const l = xe.fromDom(e.getDoc()), - a = _r(l), - c = ((e, t, o) => ({ - element: e, - clipboard: t, - generators: o, - }))(n, s[0], a); - t.pasteCells(r, c).each(() => { - e.focus(); - }); - } - }); - }); - } - }); - }, - Fs = (e, t) => ({ element: e, offset: t }), - Hs = (e, t, o) => - (e.property().isText(t) && 0 === e.property().getText(t).trim().length) || - e.property().isComment(t) - ? o(t).bind((t) => Hs(e, t, o).orThunk(() => C.some(t))) - : C.none(), - $s = (e, t) => - e.property().isText(t) - ? e.property().getText(t).length - : e.property().children(t).length, - Vs = (e, t) => { - const o = Hs(e, t, e.query().prevSibling).getOr(t); - if (e.property().isText(o)) return Fs(o, $s(e, o)); - const n = e.property().children(o); - return n.length > 0 ? Vs(e, n[n.length - 1]) : Fs(o, $s(e, o)); - }, - qs = Vs, - Us = hs(), - Gs = (e, t) => { - if (!jt(e)) { - const o = ((e) => - Un(e).bind((e) => { - return ( - (t = e), - (o = ["fixed", "relative", "empty"]), - C.from(Wn.exec(t)).bind((e) => { - const t = Number(e[1]), - n = e[2]; - return ((e, t) => O(t, (t) => O(Ln[t], (t) => e === t)))(n, o) - ? C.some({ value: t, unit: n }) - : C.none(); - }) - ); - var t, o; - }))(e); - o.each((o) => { - const n = o.value / 2; - Jn(e, n, o.unit), Jn(t, n, o.unit); - }); - } - }, - Ks = (e) => E(e, g(0)), - Ys = (e, t, o, n, r) => - r(e.slice(0, t)) - .concat(n) - .concat(r(e.slice(o))), - Js = (e) => (t, o, n, r) => { - if (e(n)) { - const e = Math.max(r, t[o] - Math.abs(n)), - s = Math.abs(e - t[o]); - return n >= 0 ? s : -s; - } - return n; - }, - Qs = Js((e) => e < 0), - Xs = Js(x), - Zs = () => { - const e = (e, t, o, n) => { - const r = (100 + o) / 100, - s = Math.max(n, (e[t] + o) / r); - return E(e, (e, o) => (o === t ? s : e / r) - e); - }, - t = (t, o, n, r, s, l) => - l - ? e(t, o, r, s) - : ((e, t, o, n, r) => { - const s = Qs(e, t, n, r); - return Ys(e, t, o + 1, [s, 0], Ks); - })(t, o, n, r, s); - return { - resizeTable: (e, t) => e(t), - clampTableDelta: Qs, - calcLeftEdgeDeltas: t, - calcMiddleDeltas: (e, o, n, r, s, l, a) => t(e, n, r, s, l, a), - calcRightEdgeDeltas: (t, o, n, r, s, l) => { - if (l) return e(t, n, r, s); - { - const e = Qs(t, n, r, s); - return Ks(t.slice(0, n)).concat([e]); - } - }, - calcRedestributedWidths: (e, t, o, n) => { - if (n) { - const n = (t + o) / t, - r = E(e, (e) => e / n); - return { delta: 100 * n - 100, newSizes: r }; - } - return { delta: o, newSizes: e }; - }, - }; - }, - el = () => { - const e = (e, t, o, n, r) => { - const s = Xs(e, n >= 0 ? o : t, n, r); - return Ys(e, t, o + 1, [s, -s], Ks); - }; - return { - resizeTable: (e, t, o) => { - o && e(t); - }, - clampTableDelta: (e, t, o, n, r) => { - if (r) { - if (o >= 0) return o; - { - const t = A(e, (e, t) => e + t - n, 0); - return Math.max(-t, o); - } - } - return Qs(e, t, o, n); - }, - calcLeftEdgeDeltas: e, - calcMiddleDeltas: (t, o, n, r, s, l) => e(t, n, r, s, l), - calcRightEdgeDeltas: (e, t, o, n, r, s) => { - if (s) return Ks(e); - { - const t = n / e.length; - return E(e, g(t)); - } - }, - calcRedestributedWidths: (e, t, o, n) => ({ delta: 0, newSizes: e }), - }; - }, - tl = (e) => Zo(e).grid, - ol = ue("th"), - nl = (e) => P(e, (e) => ol(e.element)), - rl = (e, t) => (e && t ? "sectionCells" : e ? "section" : "cells"), - sl = (e) => { - const t = "thead" === e.section, - o = vt(ll(e.cells), "th"); - return "tfoot" === e.section - ? { type: "footer" } - : t || o - ? { type: "header", subType: rl(t, o) } - : { type: "body" }; - }, - ll = (e) => { - const t = _(e, (e) => ol(e.element)); - return 0 === t.length - ? C.some("td") - : t.length === e.length - ? C.some("th") - : C.none(); - }, - al = (e, t, o) => et(o(e.element, t), !0, e.isLocked), - cl = (e, t) => (e.section !== t ? tt(e.element, e.cells, t, e.isNew) : e), - il = () => ({ - transformRow: cl, - transformCell: (e, t, o) => { - const n = o(e.element, t), - r = - "td" !== ne(n) - ? ((e, t) => { - const o = Je(e, "td"); - je(e, o); - const n = Le(e); - return $e(o, n), qe(e), o; - })(n) - : n; - return et(r, e.isNew, e.isLocked); - }, - }), - ml = () => ({ transformRow: cl, transformCell: al }), - dl = () => ({ - transformRow: (e, t) => cl(e, "thead" === t ? "tbody" : t), - transformCell: al, - }), - ul = il, - fl = ml, - gl = dl, - hl = () => ({ transformRow: h, transformCell: al }), - pl = (e, t, o, n) => { - o === n ? be(e, t) : ge(e, t, o); - }, - wl = (e, t, o) => { - $(mt(e, t)).fold( - () => Pe(e, o), - (e) => je(e, o), - ); - }, - bl = (e, t) => { - const o = [], - n = [], - r = (e) => - E(e, (e) => { - e.isNew && o.push(e.element); - const t = e.element; - return ( - Ve(t), - N(e.cells, (e) => { - e.isNew && n.push(e.element), - pl(e.element, "colspan", e.colspan, 1), - pl(e.element, "rowspan", e.rowspan, 1), - Ie(t, e.element); - }), - t - ); - }), - s = (e) => - j(e, (e) => - E(e.cells, (e) => (pl(e.element, "span", e.colspan, 1), e.element)), - ), - l = (t, o) => { - const n = ((e, t) => { - const o = pt(e, t).getOrThunk(() => { - const o = xe.fromTag(t, ke(e).dom); - return ( - "thead" === t - ? wl(e, "caption,colgroup", o) - : "colgroup" === t - ? wl(e, "caption", o) - : Ie(e, o), - o - ); - }); - return Ve(o), o; - })(e, o), - l = ("colgroup" === o ? s : r)(t); - $e(n, l); - }, - a = (t, o) => { - t.length > 0 - ? l(t, o) - : ((t) => { - pt(e, t).each(qe); - })(o); - }, - c = [], - i = [], - m = [], - d = []; - return ( - N(t, (e) => { - switch (e.section) { - case "thead": - c.push(e); - break; - case "tbody": - i.push(e); - break; - case "tfoot": - m.push(e); - break; - case "colgroup": - d.push(e); - } - }), - a(d, "colgroup"), - a(c, "thead"), - a(i, "tbody"), - a(m, "tfoot"), - { newRows: o, newCells: n } - ); - }, - vl = (e, t) => { - if (0 === e.length) return 0; - const o = e[0]; - return W(e, (e) => !t(o.element, e.element)).getOr(e.length); - }, - yl = (e, t) => { - const o = E(e, (e) => E(e.cells, y)); - return E(e, (n, r) => { - const s = j(n.cells, (n, s) => { - if (!1 === o[r][s]) { - const m = ((e, t, o, n) => { - const r = ((e, t) => e[t])(e, t), - s = "colgroup" === r.section, - l = vl(r.cells.slice(o), n), - a = s - ? 1 - : vl(((e, t) => E(e, (e) => Ho(e, t)))(e.slice(t), o), n); - return { colspan: l, rowspan: a }; - })(e, r, s, t); - return ( - ((e, t, n, r) => { - for (let s = e; s < e + n; s++) - for (let e = t; e < t + r; e++) o[s][e] = !0; - })(r, s, m.rowspan, m.colspan), - [ - ((l = n.element), - (a = m.rowspan), - (c = m.colspan), - (i = n.isNew), - { element: l, rowspan: a, colspan: c, isNew: i }), - ] - ); - } - return []; - var l, a, c, i; - }); - return ((e, t, o, n) => ({ - element: e, - cells: t, - section: o, - isNew: n, - }))(n.element, s, n.section, n.isNew); - }); - }, - xl = (e, t, o) => { - const n = []; - N(e.colgroups, (r) => { - const s = []; - for (let n = 0; n < e.grid.columns; n++) { - const r = an(e, n) - .map((e) => et(e.element, o, !1)) - .getOrThunk(() => et(t.colGap(), !0, !1)); - s.push(r); - } - n.push(tt(r.element, s, "colgroup", o)); - }); - for (let r = 0; r < e.grid.rows; r++) { - const s = []; - for (let n = 0; n < e.grid.columns; n++) { - const l = tn(e, r, n) - .map((e) => et(e.element, o, e.isLocked)) - .getOrThunk(() => et(t.gap(), !0, !1)); - s.push(l); - } - const l = e.all[r], - a = tt(l.element, s, l.section, o); - n.push(a); - } - return n; - }, - Cl = (e) => yl(e, Re), - Sl = (e, t) => V(e.all, (e) => L(e.cells, (e) => Re(t, e.element))), - Tl = (e, t, o) => { - const n = E(t.selection, (t) => - qt(t) - .bind((t) => Sl(e, t)) - .filter(o), - ), - r = yt(n); - return xt(r.length > 0, r); - }, - Rl = (e, t, o, n, r) => (s, l, a, c) => { - const i = Zo(s), - m = C.from(null == c ? void 0 : c.section).getOrThunk(hl); - return t(i, l) - .map((t) => { - const o = ((e, t) => xl(e, t, !1))(i, a), - n = e(o, t, Re, r(a), m), - s = Yo(n.grid); - return { - info: t, - grid: Cl(n.grid), - cursor: n.cursor, - lockedColumns: s, - }; - }) - .bind((e) => { - const t = bl(s, e.grid), - r = C.from(null == c ? void 0 : c.sizing).getOrThunk(() => mr(s)), - l = C.from(null == c ? void 0 : c.resize).getOrThunk(el); - return ( - o(s, e.grid, e.info, { sizing: r, resize: l, section: m }), - n(s), - be(s, Go), - e.lockedColumns.length > 0 && ge(s, Go, e.lockedColumns.join(",")), - C.some({ - cursor: e.cursor, - newRows: t.newRows, - newCells: t.newCells, - }) - ); - }); - }, - Dl = (e, t) => - Tl(e, t, x).map((e) => ({ - cells: e, - generators: t.generators, - clipboard: t.clipboard, - })), - Ol = (e, t) => Tl(e, t, x), - kl = (e, t) => Tl(e, t, (e) => !e.isLocked), - El = (e, t) => - P(t, (t) => ((e, t) => Sl(e, t).exists((e) => !e.isLocked))(e, t)), - Nl = (e, t, o, n) => { - const r = qo(e).rows; - let s = !0; - for (let e = 0; e < r.length; e++) - for (let l = 0; l < Vo(r[0]); l++) { - const a = r[e], - c = Ho(a, l), - i = o(c.element, t); - i && !s ? Io(a, l, et(n(), !0, c.isLocked)) : i && (s = !1); - } - return e; - }, - Bl = (e) => { - const t = (t) => t(e), - o = g(e), - n = () => r, - r = { - tag: !0, - inner: e, - fold: (t, o) => o(e), - isValue: x, - isError: y, - map: (t) => zl.value(t(e)), - mapError: n, - bind: t, - exists: t, - forall: t, - getOr: o, - or: n, - getOrThunk: o, - orThunk: n, - getOrDie: o, - each: (t) => { - t(e); - }, - toOptional: () => C.some(e), - }; - return r; - }, - _l = (e) => { - const t = () => o, - o = { - tag: !1, - inner: e, - fold: (t, o) => t(e), - isValue: y, - isError: x, - map: t, - mapError: (t) => zl.error(t(e)), - bind: t, - exists: y, - forall: x, - getOr: h, - or: h, - getOrThunk: v, - orThunk: v, - getOrDie: - ((n = String(e)), - () => { - throw new Error(n); - }), - each: f, - toOptional: C.none, - }; - var n; - return o; - }, - zl = { - value: Bl, - error: _l, - fromOption: (e, t) => e.fold(() => _l(t), Bl), - }, - Al = (e, t) => ({ rowDelta: 0, colDelta: Vo(e[0]) - Vo(t[0]) }), - Ll = (e, t) => ({ rowDelta: e.length - t.length, colDelta: 0 }), - Wl = (e, t, o, n) => { - const r = "colgroup" === t.section ? o.col : o.cell; - return k(e, (e) => et(r(), !0, n(e))); - }, - Ml = (e, t, o, n) => { - const r = e[e.length - 1]; - return e.concat( - k(t, () => { - const e = "colgroup" === r.section ? o.colgroup : o.row, - t = Uo(r, e, h), - s = Wl(t.cells.length, t, o, (e) => X(n, e.toString())); - return Fo(t, s); - }), - ); - }, - jl = (e, t, o, n) => - E(e, (e) => { - const r = Wl(t, e, o, y); - return jo(e, n, r); - }), - Pl = (e, t, o) => { - const n = t.colDelta < 0 ? jl : h, - r = t.rowDelta < 0 ? Ml : h, - s = Yo(e), - l = Vo(e[0]), - a = O(s, (e) => e === l - 1), - c = n(e, Math.abs(t.colDelta), o, a ? l - 1 : l), - i = Yo(c); - return r(c, Math.abs(t.rowDelta), o, I(i, x)); - }, - Il = (e, t, o, n) => { - const r = w(n, Ho(e[t], o).element), - s = e[t]; - return ( - e.length > 1 && - Vo(s) > 1 && - ((o > 0 && r($o(s, o - 1))) || - (o < s.cells.length - 1 && r($o(s, o + 1))) || - (t > 0 && r($o(e[t - 1], o))) || - (t < e.length - 1 && r($o(e[t + 1], o)))) - ); - }, - Fl = (e, t, o) => _(o, (o) => o >= e.column && o <= Vo(t[0]) + e.column), - Hl = (e, t, o, n, r) => { - ((e, t, o, n) => { - t > 0 && - t < e[0].cells.length && - N(e, (e) => { - const r = e.cells[t - 1]; - let s = 0; - const l = n(); - for ( - ; - e.cells.length > t + s && o(r.element, e.cells[t + s].element); - - ) - Io(e, t + s, et(l, !0, e.cells[t + s].isLocked)), s++; - }); - })(t, e, r, n.cell); - const s = Ll(o, t), - l = Pl(o, s, n), - a = Ll(t, l), - c = Pl(t, a, n); - return E(c, (t, o) => jo(t, e, l[o].cells)); - }, - $l = (e, t, o, n, r) => { - ((e, t, o, n) => { - const r = qo(e).rows; - if (t > 0 && t < r.length) { - const e = ((e, t) => - A( - e, - (e, o) => - O(e, (e) => t(e.element, o.element)) ? e : e.concat([o]), - [], - ))(r[t - 1].cells, o); - N(e, (e) => { - let s = C.none(); - for (let l = t; l < r.length; l++) - for (let t = 0; t < Vo(r[0]); t++) { - const a = r[l], - c = Ho(a, t); - o(c.element, e.element) && - (s.isNone() && (s = C.some(n())), - s.each((e) => { - Io(a, t, et(e, !0, c.isLocked)); - })); - } - }); - } - })(t, e, r, n.cell); - const s = Yo(t), - l = Al(t, o), - a = { ...l, colDelta: l.colDelta - s.length }, - c = Pl(t, a, n), - { cols: i, rows: m } = qo(c), - d = Yo(c), - u = Al(o, t), - f = { ...u, colDelta: u.colDelta + d.length }, - g = - ((p = n), - (w = d), - E(o, (e) => - A( - w, - (t, o) => { - const n = Wl(1, e, p, x)[0]; - return Po(t, o, n); - }, - e, - ), - )), - h = Pl(g, f, n); - var p, w; - return [...i, ...m.slice(0, e), ...h, ...m.slice(e, m.length)]; - }, - Vl = (e, t, o, n, r) => { - const { rows: s, cols: l } = qo(e), - a = s.slice(0, t), - c = s.slice(t); - return [ - ...l, - ...a, - ((e, t, o, n) => Uo(e, (e) => n(e, o), t))( - s[o], - (e, o) => - t > 0 && t < s.length && n($o(s[t - 1], o), $o(s[t], o)) - ? Ho(s[t], o) - : et(r(e.element, n), !0, e.isLocked), - n, - r, - ), - ...c, - ]; - }, - ql = (e, t, o, n, r) => - E(e, (e) => { - const s = t > 0 && t < Vo(e) && n($o(e, t - 1), $o(e, t)), - l = ((e, t, o, n, r, s, l) => { - if ("colgroup" !== o && n) return Ho(e, t); - { - const t = Ho(e, r); - return et(l(t.element, s), !0, !1); - } - })(e, t, e.section, s, o, n, r); - return Po(e, t, l); - }), - Ul = (e, t, o, n) => - ((e, t, o, n) => - void 0 !== $o(e[t], o) && t > 0 && n($o(e[t - 1], o), $o(e[t], o)))( - e, - t, - o, - n, - ) || ((e, t, o) => t > 0 && o($o(e, t - 1), $o(e, t)))(e[t], o, n), - Gl = (e, t, o, n) => { - const r = (e) => - ((e) => ("row" === e ? Pt(t) : jt(t)))(e) ? `${e}group` : e; - return e - ? ol(t) - ? r(o) - : null - : n && ol(t) - ? r("row" === o ? "col" : "row") - : null; - }, - Kl = (e, t, o) => et(o(e.element, t), !0, e.isLocked), - Yl = (e, t, o, n, r, s, l) => - E(e, (e, a) => - ((e, c) => { - const i = e.cells, - m = E(i, (e, c) => { - if (((e) => O(t, (t) => o(e.element, t.element)))(e)) { - const t = l(e, a, c) ? r(e, o, n) : e; - return ( - s(t, a, c).each((e) => { - var o, n; - (o = t.element), - (n = { scope: C.from(e) }), - G(n, (e, t) => { - e.fold( - () => { - be(o, t); - }, - (e) => { - fe(o.dom, t, e); - }, - ); - }); - }), - t - ); - } - return e; - }); - return tt(e.element, m, e.section, e.isNew); - })(e), - ), - Jl = (e, t, o) => j(e, (n, r) => (Ul(e, r, t, o) ? [] : [Ho(n, t)])), - Ql = (e, t, o, n, r) => { - const s = qo(e).rows, - l = j(t, (e) => Jl(s, e, n)), - a = E(s, (e) => nl(e.cells)), - c = ((e, t) => - P(t, h) && nl(e) - ? x - : (e, o, n) => !("th" === ne(e.element) && t[o]))(l, a), - i = ( - (e, t) => (o, n) => - C.some(Gl(e, o.element, "row", t[n])) - )(o, a); - return Yl(e, l, n, r, Kl, i, c); - }, - Xl = (e, t, o, n) => { - const r = qo(e).rows, - s = E(t, (e) => Ho(r[e.row], e.column)); - return Yl(e, s, o, n, Kl, C.none, x); - }, - Zl = (e) => { - if (!l(e)) throw new Error("cases must be an array"); - if (0 === e.length) throw new Error("there must be at least one case"); - const t = [], - o = {}; - return ( - N(e, (n, r) => { - const s = q(n); - if (1 !== s.length) throw new Error("one and only one name per case"); - const a = s[0], - c = n[a]; - if (void 0 !== o[a]) throw new Error("duplicate key detected:" + a); - if ("cata" === a) - throw new Error("cannot have a case named cata (sorry)"); - if (!l(c)) throw new Error("case arguments must be an array"); - t.push(a), - (o[a] = (...o) => { - const n = o.length; - if (n !== c.length) - throw new Error( - "Wrong number of arguments to case " + - a + - ". Expected " + - c.length + - " (" + - c + - "), got " + - n, - ); - return { - fold: (...t) => { - if (t.length !== e.length) - throw new Error( - "Wrong number of arguments to fold. Expected " + - e.length + - ", got " + - t.length, - ); - return t[r].apply(null, o); - }, - match: (e) => { - const n = q(e); - if (t.length !== n.length) - throw new Error( - "Wrong number of arguments to match. Expected: " + - t.join(",") + - "\nActual: " + - n.join(","), - ); - if (!P(t, (e) => D(n, e))) - throw new Error( - "Not all branches were specified when using match. Specified: " + - n.join(", ") + - "\nRequired: " + - t.join(", "), - ); - return e[a].apply(null, o); - }, - log: (e) => { - console.log(e, { - constructors: t, - constructor: a, - params: o, - }); - }, - }; - }); - }), - o - ); - }, - ea = { - ...Zl([ - { none: [] }, - { only: ["index"] }, - { left: ["index", "next"] }, - { middle: ["prev", "index", "next"] }, - { right: ["prev", "index"] }, - ]), - }, - ta = (e, t, o) => { - let n = 0; - for (let r = e; r < t; r++) n += void 0 !== o[r] ? o[r] : 0; - return n; - }, - oa = (e, t) => { - const o = rn(e); - return E(o, (e) => { - const o = ta(e.row, e.row + e.rowspan, t); - return { element: e.element, height: o, rowspan: e.rowspan }; - }); - }, - na = (e, t, o) => { - const n = ((e, t) => - ln(e) - ? ((e, t) => { - const o = sn(e); - return E(o, (e, o) => ({ - element: e.element, - width: t[o], - colspan: e.colspan, - })); - })(e, t) - : ((e, t) => { - const o = rn(e); - return E(o, (e) => { - const o = ta(e.column, e.column + e.colspan, t); - return { element: e.element, width: o, colspan: e.colspan }; - }); - })(e, t))(e, t); - N(n, (e) => { - o.setElementWidth(e.element, e.width); - }); - }, - ra = (e, t, o, n, r) => { - const s = Zo(e), - l = r.getCellDelta(t), - a = r.getWidths(s, r), - c = o === s.grid.columns - 1, - i = n.clampTableDelta(a, o, l, r.minCellWidth(), c), - m = ((e, t, o, n, r) => { - const s = e.slice(0), - l = ((e, t) => - 0 === e.length - ? ea.none() - : 1 === e.length - ? ea.only(0) - : 0 === t - ? ea.left(0, 1) - : t === e.length - 1 - ? ea.right(t - 1, t) - : t > 0 && t < e.length - 1 - ? ea.middle(t - 1, t, t + 1) - : ea.none())(e, t), - a = g(E(s, g(0))); - return l.fold( - a, - (e) => n.singleColumnWidth(s[e], o), - (e, t) => - r.calcLeftEdgeDeltas(s, e, t, o, n.minCellWidth(), n.isRelative), - (e, t, l) => - r.calcMiddleDeltas(s, e, t, l, o, n.minCellWidth(), n.isRelative), - (e, t) => - r.calcRightEdgeDeltas(s, e, t, o, n.minCellWidth(), n.isRelative), - ); - })(a, o, i, r, n), - d = E(m, (e, t) => e + a[t]); - na(s, d, r), n.resizeTable(r.adjustTableWidth, i, c); - }, - sa = (e) => - A( - e, - (e, t) => (O(e, (e) => e.column === t.column) ? e : e.concat([t])), - [], - ).sort((e, t) => e.column - t.column), - la = ue("col"), - aa = ue("colgroup"), - ca = (e) => "tr" === ne(e) || aa(e), - ia = (e) => ({ - element: e, - colspan: Wt(e, "colspan", 1), - rowspan: Wt(e, "rowspan", 1), - }), - ma = (e) => we(e, "scope").map((e) => e.substr(0, 3)), - da = (e, t = ia) => { - const o = (o) => { - if (ca(o)) - return aa((r = { element: o }).element) ? e.colgroup(r) : e.row(r); - { - const r = o, - s = ((t) => (la(t.element) ? e.col(t) : e.cell(t)))(t(r)); - return (n = C.some({ item: r, replacement: s })), s; - } - var r; - }; - let n = C.none(); - return { - getOrInit: (e, t) => - n.fold( - () => o(e), - (n) => (t(e, n.item) ? n.replacement : o(e)), - ), - }; - }, - ua = (e) => (t) => { - const o = [], - n = (n) => { - const r = "td" === e ? { scope: null } : {}, - s = t.replace(n, e, r); - return o.push({ item: n, sub: s }), s; - }; - return { - replaceOrInit: (e, t) => { - if (ca(e) || la(e)) return e; - { - const r = e; - return ((e, t) => L(o, (o) => t(o.item, e)))(r, t).fold( - () => n(r), - (o) => (t(e, o.item) ? o.sub : n(r)), - ); - } - }, - }; - }, - fa = (e) => ({ - unmerge: (t) => { - const o = ma(t); - return ( - o.each((e) => ge(t, "scope", e)), - () => { - const n = e.cell({ element: t, colspan: 1, rowspan: 1 }); - return ( - Lt(n, "width"), - Lt(t, "width"), - o.each((e) => ge(n, "scope", e)), - n - ); - } - ); - }, - merge: (e) => ( - Lt(e[0], "width"), - (() => { - const t = yt(E(e, ma)); - if (0 === t.length) return C.none(); - { - const e = t[0], - o = ["row", "col"]; - return O(t, (t) => t !== e && D(o, t)) ? C.none() : C.from(e); - } - })().fold( - () => be(e[0], "scope"), - (t) => ge(e[0], "scope", t + "group"), - ), - g(e[0]) - ), - }), - ga = [ - "body", - "p", - "div", - "article", - "aside", - "figcaption", - "figure", - "footer", - "header", - "nav", - "section", - "ol", - "ul", - "table", - "thead", - "tfoot", - "tbody", - "caption", - "tr", - "td", - "th", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "blockquote", - "pre", - "address", - ], - ha = hs(), - pa = (e) => - ((e, t) => { - const o = e.property().name(t); - return D(ga, o); - })(ha, e), - wa = (e) => - ((e, t) => { - const o = e.property().name(t); - return D(["ol", "ul"], o); - })(ha, e), - ba = (e) => { - const t = ue("br"), - o = (e) => - Cr(e) - .bind((o) => { - const n = Ae(o) - .map( - (e) => - !!pa(e) || - (!!((e, t) => - D(["br", "img", "hr", "input"], e.property().name(t)))( - ha, - e, - ) && - "img" !== ne(e)), - ) - .getOr(!1); - return Ne(o).map((r) => { - return !0 === n || - "li" === ne((s = r)) || - ft(s, wa).isSome() || - t(o) || - (pa(r) && !Re(e, r)) - ? [] - : [xe.fromTag("br")]; - var s; - }); - }) - .getOr([]), - n = (() => { - const n = j(e, (e) => { - const n = Le(e); - return ((e) => - P(e, (e) => t(e) || (ie(e) && 0 === hr(e).trim().length)))(n) - ? [] - : n.concat(o(e)); - }); - return 0 === n.length ? [xe.fromTag("br")] : n; - })(); - Ve(e[0]), $e(e[0], n); - }, - va = (e) => Qr(e, !0), - ya = (e) => { - 0 === Ut(e).length && qe(e); - }, - xa = (e, t) => ({ grid: e, cursor: t }), - Ca = (e, t, o) => { - const n = ((e, t, o) => { - var n, r; - const s = qo(e).rows; - return C.from( - null === - (r = null === (n = s[t]) || void 0 === n ? void 0 : n.cells[o]) || - void 0 === r - ? void 0 - : r.element, - ) - .filter(va) - .orThunk(() => - ((e) => - V(e, (e) => - V(e.cells, (e) => { - const t = e.element; - return xt(va(t), t); - }), - ))(s), - ); - })(e, t, o); - return xa(e, n); - }, - Sa = (e) => - A( - e, - (e, t) => (O(e, (e) => e.row === t.row) ? e : e.concat([t])), - [], - ).sort((e, t) => e.row - t.row), - Ta = (e, t) => (o, n, r, s, l) => { - const a = Sa(n), - c = E(a, (e) => e.row), - i = ((e, t, o, n, r, s, l) => { - const { cols: a, rows: c } = qo(e), - i = c[t[0]], - m = j(t, (e) => - ((e, t, o) => { - const n = e[t]; - return j(n.cells, (n, r) => (Ul(e, t, r, o) ? [] : [n])); - })(c, e, r), - ), - d = E(i.cells, (e, t) => nl(Jl(c, t, r))), - u = [...c]; - N(t, (e) => { - u[e] = l.transformRow(c[e], o); - }); - const f = [...a, ...u], - g = ((e, t) => - P(t, h) && nl(e.cells) - ? x - : (e, o, n) => !("th" === ne(e.element) && t[n]))(i, d), - p = ( - (e, t) => (o, n, r) => - C.some(Gl(e, o.element, "col", t[r])) - )(n, d); - return Yl(f, m, r, s, l.transformCell, p, g); - })(o, c, e, t, r, s.replaceOrInit, l); - return Ca(i, n[0].row, n[0].column); - }, - Ra = Ta("thead", !0), - Da = Ta("tbody", !1), - Oa = Ta("tfoot", !1), - ka = (e, t, o) => { - const n = ((e, t) => Qt(e, () => t))(e, o.section), - r = en(n); - return xl(r, t, !0); - }, - Ea = (e, t, o, n) => - ((e, t, o, n) => { - const r = en(t), - s = n.getWidths(r, n); - na(r, s, n); - })(0, t, 0, n.sizing), - Na = (e, t, o, n) => - ((e, t, o, n, r) => { - const s = en(t), - l = n.getWidths(s, n), - a = n.pixelWidth(), - { newSizes: c, delta: i } = r.calcRedestributedWidths( - l, - a, - o.pixelDelta, - n.isRelative, - ); - na(s, c, n), n.adjustTableWidth(i); - })(0, t, o, n.sizing, n.resize), - Ba = (e, t) => O(t, (e) => 0 === e.column && e.isLocked), - _a = (e, t) => - O(t, (t) => t.column + t.colspan >= e.grid.columns && t.isLocked), - za = (e, t) => { - const o = cn(e), - n = sa(t); - return A(n, (e, t) => e + o[t.column].map(Wo).getOr(0), 0); - }, - Aa = (e) => (t, o) => - Ol(t, o) - .filter((o) => !(e ? Ba : _a)(t, o)) - .map((e) => ({ details: e, pixelDelta: za(t, e) })), - La = (e) => (t, o) => Dl(t, o).filter((o) => !(e ? Ba : _a)(t, o.cells)), - Wa = ua("th"), - Ma = ua("td"), - ja = Rl( - (e, t, o, n) => { - const r = t[0].row, - s = Sa(t), - l = z( - s, - (e, t) => ({ - grid: Vl(e.grid, r, t.row + e.delta, o, n.getOrInit), - delta: e.delta + 1, - }), - { grid: e, delta: 0 }, - ).grid; - return Ca(l, r, t[0].column); - }, - Ol, - f, - f, - da, - ), - Pa = Rl( - (e, t, o, n) => { - const r = Sa(t), - s = r[r.length - 1], - l = s.row + s.rowspan, - a = z(r, (e, t) => Vl(e, l, t.row, o, n.getOrInit), e); - return Ca(a, l, t[0].column); - }, - Ol, - f, - f, - da, - ), - Ia = Rl( - (e, t, o, n) => { - const r = t.details, - s = sa(r), - l = s[0].column, - a = z( - s, - (e, t) => ({ - grid: ql(e.grid, l, t.column + e.delta, o, n.getOrInit), - delta: e.delta + 1, - }), - { grid: e, delta: 0 }, - ).grid; - return Ca(a, r[0].row, l); - }, - Aa(!0), - Na, - f, - da, - ), - Fa = Rl( - (e, t, o, n) => { - const r = t.details, - s = r[r.length - 1], - l = s.column + s.colspan, - a = sa(r), - c = z(a, (e, t) => ql(e, l, t.column, o, n.getOrInit), e); - return Ca(c, r[0].row, l); - }, - Aa(!1), - Na, - f, - da, - ), - Ha = Rl( - (e, t, o, n) => { - const r = sa(t.details), - s = ((e, t) => - j(e, (e) => { - const o = e.cells, - n = z( - t, - (e, t) => - t >= 0 && t < e.length - ? e.slice(0, t).concat(e.slice(t + 1)) - : e, - o, - ); - return n.length > 0 ? [tt(e.element, n, e.section, e.isNew)] : []; - }))( - e, - E(r, (e) => e.column), - ), - l = s.length > 0 ? s[0].cells.length - 1 : 0; - return Ca(s, r[0].row, Math.min(r[0].column, l)); - }, - (e, t) => kl(e, t).map((t) => ({ details: t, pixelDelta: -za(e, t) })), - Na, - ya, - da, - ), - $a = Rl( - (e, t, o, n) => { - const r = Sa(t), - s = ((e, t, o) => { - const { rows: n, cols: r } = qo(e); - return [...r, ...n.slice(0, t), ...n.slice(o + 1)]; - })(e, r[0].row, r[r.length - 1].row), - l = s.length > 0 ? s.length - 1 : 0; - return Ca(s, Math.min(t[0].row, l), t[0].column); - }, - Ol, - f, - ya, - da, - ), - Va = Rl( - (e, t, o, n) => { - const r = sa(t), - s = E(r, (e) => e.column), - l = Ql(e, s, !0, o, n.replaceOrInit); - return Ca(l, t[0].row, t[0].column); - }, - kl, - f, - f, - Wa, - ), - qa = Rl( - (e, t, o, n) => { - const r = sa(t), - s = E(r, (e) => e.column), - l = Ql(e, s, !1, o, n.replaceOrInit); - return Ca(l, t[0].row, t[0].column); - }, - kl, - f, - f, - Ma, - ), - Ua = Rl(Ra, kl, f, f, Wa), - Ga = Rl(Da, kl, f, f, Ma), - Ka = Rl(Oa, kl, f, f, Ma), - Ya = Rl( - (e, t, o, n) => { - const r = Xl(e, t, o, n.replaceOrInit); - return Ca(r, t[0].row, t[0].column); - }, - kl, - f, - f, - Wa, - ), - Ja = Rl( - (e, t, o, n) => { - const r = Xl(e, t, o, n.replaceOrInit); - return Ca(r, t[0].row, t[0].column); - }, - kl, - f, - f, - Ma, - ), - Qa = Rl( - (e, t, o, n) => { - const r = t.cells; - ba(r); - const s = ((e, t, o, n) => { - const r = qo(e).rows; - if (0 === r.length) return e; - for (let e = t.startRow; e <= t.finishRow; e++) - for (let o = t.startCol; o <= t.finishCol; o++) { - const t = r[e], - s = Ho(t, o).isLocked; - Io(t, o, et(n(), !1, s)); - } - return e; - })(e, t.bounds, 0, n.merge(r)); - return xa(s, C.from(r[0])); - }, - (e, t) => ((e, t) => t.mergable)(0, t).filter((t) => El(e, t.cells)), - Ea, - f, - fa, - ), - Xa = Rl( - (e, t, o, n) => { - const r = z(t, (e, t) => Nl(e, t, o, n.unmerge(t)), e); - return xa(r, C.from(t[0])); - }, - (e, t) => ((e, t) => t.unmergable)(0, t).filter((t) => El(e, t)), - Ea, - f, - fa, - ), - Za = Rl( - (e, t, o, n) => { - const r = ((e, t) => { - const o = Zo(e); - return xl(o, t, !0); - })(t.clipboard, t.generators); - var s, l; - return ((e, t, o, n, r) => { - const s = Yo(t), - l = ((e, t, o) => { - const n = Vo(t[0]), - r = qo(t).cols.length + e.row, - s = k(n - e.column, (t) => t + e.column); - return { - row: r, - column: L(s, (e) => P(o, (t) => t !== e)).getOr(n - 1), - }; - })(e, t, s), - a = qo(o).rows, - c = Fl(l, a, s), - i = ((e, t, o) => { - if (e.row >= t.length || e.column > Vo(t[0])) - return zl.error( - "invalid start address out of table bounds, row: " + - e.row + - ", column: " + - e.column, - ); - const n = t.slice(e.row), - r = n[0].cells.slice(e.column), - s = Vo(o[0]), - l = o.length; - return zl.value({ - rowDelta: n.length - l, - colDelta: r.length - s, - }); - })(l, t, a); - return i.map((e) => { - const o = { ...e, colDelta: e.colDelta - c.length }, - s = Pl(t, o, n), - i = Yo(s), - m = Fl(l, a, i); - return ((e, t, o, n, r, s) => { - const l = e.row, - a = e.column, - c = l + o.length, - i = a + Vo(o[0]) + s.length, - m = I(s, x); - for (let e = l; e < c; e++) { - let s = 0; - for (let c = a; c < i; c++) { - if (m[c]) { - s++; - continue; - } - Il(t, e, c, r) && Nl(t, $o(t[e], c), r, n.cell); - const i = c - a - s, - d = Ho(o[e - l], i), - u = d.element, - f = n.replace(u); - Io(t[e], c, et(f, !0, d.isLocked)); - } - } - return t; - })(l, s, a, n, r, m); - }); - })( - ((s = t.row), (l = t.column), { row: s, column: l }), - e, - r, - t.generators, - o, - ).fold( - () => xa(e, C.some(t.element)), - (e) => Ca(e, t.row, t.column), - ); - }, - (e, t) => - qt(t.element).bind((o) => - Sl(e, o).map((e) => ({ - ...e, - generators: t.generators, - clipboard: t.clipboard, - })), - ), - Ea, - f, - da, - ), - ec = Rl( - (e, t, o, n) => { - const r = qo(e).rows, - s = t.cells[0].column, - l = r[t.cells[0].row], - a = ka(t.clipboard, t.generators, l), - c = Hl(s, e, a, t.generators, o); - return Ca(c, t.cells[0].row, t.cells[0].column); - }, - La(!0), - f, - f, - da, - ), - tc = Rl( - (e, t, o, n) => { - const r = qo(e).rows, - s = - t.cells[t.cells.length - 1].column + - t.cells[t.cells.length - 1].colspan, - l = r[t.cells[0].row], - a = ka(t.clipboard, t.generators, l), - c = Hl(s, e, a, t.generators, o); - return Ca(c, t.cells[0].row, t.cells[0].column); - }, - La(!1), - f, - f, - da, - ), - oc = Rl( - (e, t, o, n) => { - const r = qo(e).rows, - s = t.cells[0].row, - l = r[s], - a = ka(t.clipboard, t.generators, l), - c = $l(s, e, a, t.generators, o); - return Ca(c, t.cells[0].row, t.cells[0].column); - }, - Dl, - f, - f, - da, - ), - nc = Rl( - (e, t, o, n) => { - const r = qo(e).rows, - s = - t.cells[t.cells.length - 1].row + - t.cells[t.cells.length - 1].rowspan, - l = r[t.cells[0].row], - a = ka(t.clipboard, t.generators, l), - c = $l(s, e, a, t.generators, o); - return Ca(c, t.cells[0].row, t.cells[0].column); - }, - Dl, - f, - f, - da, - ), - rc = (e, t) => { - const o = Zo(e); - return Ol(o, t) - .bind((e) => { - const t = e[e.length - 1], - n = e[0].column, - r = t.column + t.colspan, - s = M( - E(o.all, (e) => _(e.cells, (e) => e.column >= n && e.column < r)), - ); - return ll(s); - }) - .getOr(""); - }, - sc = (e, t) => { - const o = Zo(e); - return Ol(o, t).bind(ll).getOr(""); - }, - lc = (e, t) => { - const o = Zo(e); - return Ol(o, t) - .bind((e) => { - const t = e[e.length - 1], - n = e[0].row, - r = t.row + t.rowspan; - return ((e) => { - const t = E(e, (e) => sl(e).type), - o = D(t, "header"), - n = D(t, "footer"); - if (o || n) { - const e = D(t, "body"); - return !o || e || n - ? o || e || !n - ? C.none() - : C.some("footer") - : C.some("header"); - } - return C.some("body"); - })(o.all.slice(n, r)); - }) - .getOr(""); - }, - ac = (e, t) => e.dispatch("NewRow", { node: t }), - cc = (e, t) => e.dispatch("NewCell", { node: t }), - ic = (e, t, o) => { - e.dispatch("TableModified", { ...o, table: t }); - }, - mc = { structure: !1, style: !0 }, - dc = { structure: !0, style: !1 }, - uc = { structure: !0, style: !0 }, - fc = (e, t) => (Hr(e) ? ur(t) : $r(e) ? dr(t) : mr(t)), - gc = (e, t, o) => { - const n = (e) => "table" === ne(Zr(e)), - r = Wr(e), - s = Ir(e) ? f : Gs, - l = (t) => { - switch (Mr(e)) { - case "section": - return ul(); - case "sectionCells": - return fl(); - case "cells": - return gl(); - default: - return ((e, t) => { - var o; - switch ( - ((o = Zo(e)), - V(o.all, (e) => { - const t = sl(e); - return "header" === t.type ? C.from(t.subType) : C.none(); - })).getOr(t) - ) { - case "section": - return il(); - case "sectionCells": - return ml(); - case "cells": - return dl(); - } - })(t, "section"); - } - }, - a = - (n, s, a, c) => - (i, m, d = !1) => { - ts(i); - const u = xe.fromDom(e.getDoc()), - f = Br(a, u, r), - g = { - sizing: fc(e, i), - resize: Ir(e) ? Zs() : el(), - section: l(i), - }; - return s(i) - ? n(i, m, f, g).bind((n) => { - t.refresh(i.dom), - N(n.newRows, (t) => { - ac(e, t.dom); - }), - N(n.newCells, (t) => { - cc(e, t.dom); - }); - const r = ((t, n) => - n.cursor.fold( - () => { - const n = Ut(t); - return H(n) - .filter(lt) - .map((n) => { - o.clearSelectedCells(t.dom); - const r = e.dom.createRng(); - return ( - r.selectNode(n.dom), - e.selection.setRng(r), - ge(n, "data-mce-selected", "1"), - r - ); - }); - }, - (n) => { - const r = qs(Us, n), - s = e.dom.createRng(); - return ( - s.setStart(r.element.dom, r.offset), - s.setEnd(r.element.dom, r.offset), - e.selection.setRng(s), - o.clearSelectedCells(t.dom), - C.some(s) - ); - }, - ))(i, n); - return ( - lt(i) && (ts(i), d || ic(e, i.dom, c)), - r.map((e) => ({ rng: e, effect: c })) - ); - }) - : C.none(); - }, - c = a($a, (t) => !n(e) || tl(t).rows > 1, f, dc), - i = a(Ha, (t) => !n(e) || tl(t).columns > 1, f, dc); - return { - deleteRow: c, - deleteColumn: i, - insertRowsBefore: a(ja, x, f, dc), - insertRowsAfter: a(Pa, x, f, dc), - insertColumnsBefore: a(Ia, x, s, dc), - insertColumnsAfter: a(Fa, x, s, dc), - mergeCells: a(Qa, x, f, dc), - unmergeCells: a(Xa, x, f, dc), - pasteColsBefore: a(ec, x, f, dc), - pasteColsAfter: a(tc, x, f, dc), - pasteRowsBefore: a(oc, x, f, dc), - pasteRowsAfter: a(nc, x, f, dc), - pasteCells: a(Za, x, f, uc), - makeCellsHeader: a(Ya, x, f, dc), - unmakeCellsHeader: a(Ja, x, f, dc), - makeColumnsHeader: a(Va, x, f, dc), - unmakeColumnsHeader: a(qa, x, f, dc), - makeRowsHeader: a(Ua, x, f, dc), - makeRowsBody: a(Ga, x, f, dc), - makeRowsFooter: a(Ka, x, f, dc), - getTableRowType: lc, - getTableCellType: sc, - getTableColType: rc, - }; - }, - hc = (e, t, o) => { - const n = Wt(e, t, 1); - 1 === o || n <= 1 ? be(e, t) : ge(e, t, Math.min(o, n)); - }, - pc = (e, t) => (o) => { - const n = o.column + o.colspan - 1, - r = o.column; - return n >= e && r < t; - }, - wc = Zl([ - { invalid: ["raw"] }, - { pixels: ["value"] }, - { percent: ["value"] }, - ]), - bc = (e, t, o) => { - const n = o.substring(0, o.length - e.length), - r = parseFloat(n); - return n === r.toString() ? t(r) : wc.invalid(o); - }, - vc = { - ...wc, - from: (e) => - Rt(e, "%") - ? bc("%", wc.percent, e) - : Rt(e, "px") - ? bc("px", wc.pixels, e) - : wc.invalid(e), - }, - yc = (e, t, o) => { - const n = vc.from(o), - r = P(e, (e) => "0px" === e) - ? ((e, t) => { - const o = e.fold( - () => g(""), - (e) => g(e / t + "px"), - () => g(100 / t + "%"), - ); - return k(t, o); - })(n, e.length) - : ((e, t, o) => - e.fold( - () => t, - (e) => - ((e, t, o) => { - const n = o / t; - return E(e, (e) => - vc.from(e).fold( - () => e, - (e) => e * n + "px", - (e) => (e / 100) * o + "px", - ), - ); - })(t, o, e), - (e) => - ((e, t) => - E(e, (e) => - vc.from(e).fold( - () => e, - (e) => (e / t) * 100 + "%", - (e) => e + "%", - ), - ))(t, o), - ))(n, e, t); - return Sc(r); - }, - xc = (e, t) => - 0 === e.length ? t : z(e, (e, t) => vc.from(t).fold(g(0), h, h) + e, 0), - Cc = (e, t) => - vc.from(e).fold( - g(e), - (e) => e + t + "px", - (e) => e + t + "%", - ), - Sc = (e) => { - if (0 === e.length) return e; - const t = z( - e, - (e, t) => { - const o = vc.from(t).fold( - () => ({ value: t, remainder: 0 }), - (e) => - ((e, t) => { - const o = Math.floor(e); - return { value: o + "px", remainder: e - o }; - })(e), - (e) => ({ value: e + "%", remainder: 0 }), - ); - return { - output: [o.value].concat(e.output), - remainder: e.remainder + o.remainder, - }; - }, - { output: [], remainder: 0 }, - ), - o = t.output; - return o - .slice(0, o.length - 1) - .concat([Cc(o[o.length - 1], Math.round(t.remainder))]); - }, - Tc = vc.from, - Rc = (e) => Tc(e).fold(g("px"), g("px"), g("%")), - Dc = (e, t, o) => { - const n = Zo(e), - r = n.all, - s = rn(n), - l = sn(n); - t.each((t) => { - const o = Rc(t), - r = Lo(e), - a = ((e, t) => nr(e, t, er, rr))(n, e), - c = yc(a, r, t); - ln(n) - ? ((e, t, o) => { - N(t, (t, n) => { - const r = xc([e[n]], Ft()); - Nt(t.element, "width", r + o); - }); - })(c, l, o) - : ((e, t, o) => { - N(t, (t) => { - const n = e.slice(t.column, t.colspan + t.column), - r = xc(n, Ft()); - Nt(t.element, "width", r + o); - }); - })(c, s, o), - Nt(e, "width", t); - }), - o.each((t) => { - const o = Rc(t), - l = hn(e), - a = ((e, t, o) => lr(e, t, o, tr, rr))(n, e, _n); - ((e, t, o, n) => { - N(o, (t) => { - const o = e.slice(t.row, t.rowspan + t.row), - r = xc(o, Ht()); - Nt(t.element, "height", r + n); - }), - N(t, (t, o) => { - Nt(t.element, "height", e[o]); - }); - })(yc(a, l, t), r, s, o), - Nt(e, "height", t); - }); - }, - Oc = (e) => Un(e).exists((e) => Mn.test(e)), - kc = (e) => Un(e).exists((e) => jn.test(e)), - Ec = (e) => Un(e).isNone(), - Nc = (e) => { - be(e, "width"); - }, - Bc = (e) => { - const t = Qn(e); - Dc(e, C.some(t), C.none()), Nc(e); - }, - _c = (e) => { - const t = ((e) => Lo(e) + "px")(e); - Dc(e, C.some(t), C.none()), Nc(e); - }, - zc = (e) => { - Lt(e, "width"); - const t = Gt(e), - o = t.length > 0 ? t : Ut(e); - N(o, (e) => { - Lt(e, "width"), Nc(e); - }), - Nc(e); - }, - Ac = { - styles: { "border-collapse": "collapse", width: "100%" }, - attributes: { border: "1" }, - colGroups: !1, - }, - Lc = (e, t, o, n) => - k(e, (e) => - ((e, t, o, n) => { - const r = xe.fromTag("tr"); - for (let s = 0; s < e; s++) { - const e = xe.fromTag(n < t || s < o ? "th" : "td"); - s < o && ge(e, "scope", "row"), - n < t && ge(e, "scope", "col"), - Ie(e, xe.fromTag("br")), - Ie(r, e); - } - return r; - })(t, o, n, e), - ), - Wc = (e, t) => { - e.selection.select(t.dom, !0), e.selection.collapse(!0); - }, - Mc = (e, t, o, n, s) => { - const l = ((e) => { - const t = e.options, - o = t.get("table_default_styles"); - return t.isSet("table_default_styles") - ? o - : ((e, t) => - Vr(e) || !Ur(e) - ? t - : $r(e) - ? { ...t, width: Lr(e) } - : { ...t, width: Ar })(e, o); - })(e), - a = { styles: l, attributes: Kr(e), colGroups: Yr(e) }; - return ( - e.undoManager.ignore(() => { - const r = ((e, t, o, n, r, s = Ac) => { - const l = xe.fromTag("table"), - a = "cells" !== r; - Bt(l, s.styles), - he(l, s.attributes), - s.colGroups && - Ie( - l, - ((e) => { - const t = xe.fromTag("colgroup"); - return k(e, () => Ie(t, xe.fromTag("col"))), t; - })(t), - ); - const c = Math.min(e, o); - if (a && o > 0) { - const e = xe.fromTag("thead"); - Ie(l, e); - const s = Lc(o, t, "sectionCells" === r ? c : 0, n); - $e(e, s); - } - const i = xe.fromTag("tbody"); - Ie(l, i); - const m = Lc(a ? e - c : e, t, a ? 0 : o, n); - return $e(i, m), l; - })(o, t, s, n, Mr(e), a); - ge(r, "data-mce-id", "__mce"); - const l = ((e) => { - const t = xe.fromTag("div"), - o = xe.fromDom(e.dom.cloneNode(!0)); - return Ie(t, o), ((e) => e.dom.innerHTML)(t); - })(r); - e.insertContent(l), e.addVisual(); - }), - wt(Zr(e), 'table[data-mce-id="__mce"]') - .map( - (t) => ( - $r(e) - ? _c(t) - : Vr(e) - ? zc(t) - : (Hr(e) || - ((e) => r(e) && -1 !== e.indexOf("%"))(l.width)) && - Bc(t), - ts(t), - be(t, "data-mce-id"), - ((e, t) => { - N(dt(t, "tr"), (t) => { - ac(e, t.dom), - N(dt(t, "th,td"), (t) => { - cc(e, t.dom); - }); - }); - })(e, t), - ((e, t) => { - wt(t, "td,th").each(w(Wc, e)); - })(e, t), - t.dom - ), - ) - .getOrNull() - ); - }; - var jc = tinymce.util.Tools.resolve("tinymce.FakeClipboard"); - const Pc = "x-tinymce/dom-table-", - Ic = Pc + "rows", - Fc = Pc + "columns", - Hc = (e) => { - const t = jc.FakeClipboardItem(e); - jc.write([t]); - }, - $c = (e) => { - var t; - const o = null !== (t = jc.read()) && void 0 !== t ? t : []; - return V(o, (t) => C.from(t.getType(e))); - }, - Vc = (e) => { - $c(e).isSome() && jc.clear(); - }, - qc = (e) => { - e.fold(Gc, (e) => Hc({ [Ic]: e })); - }, - Uc = () => $c(Ic), - Gc = () => Vc(Ic), - Kc = (e) => { - e.fold(Jc, (e) => Hc({ [Fc]: e })); - }, - Yc = () => $c(Fc), - Jc = () => Vc(Fc), - Qc = (e) => Ms(os(e), es(e)).filter(ss), - Xc = (e, t) => { - const o = es(e), - n = (e) => Kt(e, o), - l = (t) => - ((e) => js(os(e), es(e)).filter(ss))(e).bind((e) => - n(e).map((o) => t(o, e)), - ), - a = (t) => { - e.focus(); - }, - c = (t, o = !1) => - l((n, r) => { - const s = Ls(Ps(e), n, r); - t(n, s, o).each(a); - }), - i = () => - l((t, o) => - ((e, t, o) => { - const n = Zo(e); - return Ol(n, t) - .bind((e) => { - const t = xl(n, o, !1), - r = qo(t).rows.slice( - e[0].row, - e[e.length - 1].row + e[e.length - 1].rowspan, - ), - s = j(r, (e) => { - const t = _(e.cells, (e) => !e.isLocked); - return t.length > 0 ? [{ ...e, cells: t }] : []; - }), - l = Cl(s); - return xt(l.length > 0, l); - }) - .map((e) => - E(e, (e) => { - const t = Ke(e.element); - return ( - N(e.cells, (e) => { - const o = Ye(e.element); - pl(o, "colspan", e.colspan, 1), - pl(o, "rowspan", e.rowspan, 1), - Ie(t, o); - }), - t - ); - }), - ); - })(t, Ls(Ps(e), t, o), Br(f, xe.fromDom(e.getDoc()), C.none())), - ), - m = () => - l((t, o) => - ((e, t) => { - const o = Zo(e); - return kl(o, t).map((e) => { - const t = e[e.length - 1], - n = e[0].column, - r = t.column + t.colspan, - s = ((e, t, o) => { - if (ln(e)) { - const n = _(sn(e), pc(t, o)), - r = E(n, (e) => { - const n = Ye(e.element); - return hc(n, "span", o - t), n; - }), - s = xe.fromTag("colgroup"); - return $e(s, r), [s]; - } - return []; - })(o, n, r), - l = ((e, t, o) => - E(e.all, (e) => { - const n = _(e.cells, pc(t, o)), - r = E(n, (e) => { - const n = Ye(e.element); - return hc(n, "colspan", o - t), n; - }), - s = xe.fromTag("tr"); - return $e(s, r), s; - }))(o, n, r); - return [...s, ...l]; - }); - })(t, Ls(Ps(e), t, o)), - ), - d = (t, o) => - o().each((o) => { - const n = E(o, (e) => Ye(e)); - l((o, r) => { - const s = _r(xe.fromDom(e.getDoc())), - l = ((e, t, o, n) => ({ - selection: Os(e), - clipboard: o, - generators: n, - }))(Ps(e), 0, n, s); - t(o, l).each(a); - }); - }), - g = (e) => (t, o) => - ((e, t) => (X(e, t) ? C.from(e[t]) : C.none()))(o, "type").each( - (t) => { - c(e(t), o.no_events); - }, - ); - G( - { - mceTableSplitCells: () => c(t.unmergeCells), - mceTableMergeCells: () => c(t.mergeCells), - mceTableInsertRowBefore: () => c(t.insertRowsBefore), - mceTableInsertRowAfter: () => c(t.insertRowsAfter), - mceTableInsertColBefore: () => c(t.insertColumnsBefore), - mceTableInsertColAfter: () => c(t.insertColumnsAfter), - mceTableDeleteCol: () => c(t.deleteColumn), - mceTableDeleteRow: () => c(t.deleteRow), - mceTableCutCol: () => - m().each((e) => { - Kc(e), c(t.deleteColumn); - }), - mceTableCutRow: () => - i().each((e) => { - qc(e), c(t.deleteRow); - }), - mceTableCopyCol: () => m().each((e) => Kc(e)), - mceTableCopyRow: () => i().each((e) => qc(e)), - mceTablePasteColBefore: () => d(t.pasteColsBefore, Yc), - mceTablePasteColAfter: () => d(t.pasteColsAfter, Yc), - mceTablePasteRowBefore: () => d(t.pasteRowsBefore, Uc), - mceTablePasteRowAfter: () => d(t.pasteRowsAfter, Uc), - mceTableDelete: () => - Qc(e).each((t) => { - Kt(t, o) - .filter(b(o)) - .each((t) => { - const o = xe.fromText(""); - if ((je(t, o), qe(t), e.dom.isEmpty(e.getBody()))) - e.setContent(""), e.selection.setCursorLocation(); - else { - const t = e.dom.createRng(); - t.setStart(o.dom, 0), - t.setEnd(o.dom, 0), - e.selection.setRng(t), - e.nodeChanged(); - } - }); - }), - mceTableCellToggleClass: (t, o) => { - l((t) => { - const n = Ps(e), - r = P(n, (t) => - e.formatter.match("tablecellclass", { value: o }, t.dom), - ), - s = r ? e.formatter.remove : e.formatter.apply; - N(n, (e) => s("tablecellclass", { value: o }, e.dom)), - ic(e, t.dom, mc); - }); - }, - mceTableToggleClass: (t, o) => { - l((t) => { - e.formatter.toggle("tableclass", { value: o }, t.dom), - ic(e, t.dom, mc); - }); - }, - mceTableToggleCaption: () => { - Qc(e).each((t) => { - Kt(t, o).each((o) => { - pt(o, "caption").fold( - () => { - const t = xe.fromTag("caption"); - Ie(t, xe.fromText("Caption")), - ((e, t, o) => { - We(e, 0).fold( - () => { - Ie(e, t); - }, - (e) => { - Me(e, t); - }, - ); - })(o, t), - e.selection.setCursorLocation(t.dom, 0); - }, - (n) => { - ue("caption")(t) && - Te("td", o).each((t) => - e.selection.setCursorLocation(t.dom, 0), - ), - qe(n); - }, - ), - ic(e, o.dom, dc); - }); - }); - }, - mceTableSizingMode: (t, n) => - ((t) => - Qc(e).each((n) => { - Vr(e) || - $r(e) || - Hr(e) || - Kt(n, o).each((o) => { - "relative" !== t || Oc(o) - ? "fixed" !== t || kc(o) - ? "responsive" !== t || Ec(o) || zc(o) - : _c(o) - : Bc(o), - ts(o), - ic(e, o.dom, dc); - }); - }))(n), - mceTableCellType: g((e) => - "th" === e ? t.makeCellsHeader : t.unmakeCellsHeader, - ), - mceTableColType: g((e) => - "th" === e ? t.makeColumnsHeader : t.unmakeColumnsHeader, - ), - mceTableRowType: g((e) => { - switch (e) { - case "header": - return t.makeRowsHeader; - case "footer": - return t.makeRowsFooter; - default: - return t.makeRowsBody; - } - }), - }, - (t, o) => e.addCommand(o, t), - ), - e.addCommand("mceInsertTable", (t, o) => { - ((e, t, o, n = {}) => { - const r = (e) => u(e) && e > 0; - if (r(t) && r(o)) { - const r = n.headerRows || 0, - s = n.headerColumns || 0; - return Mc(e, o, t, s, r); - } - console.error( - "Invalid values for mceInsertTable - rows and columns values are required to insert a table.", - ); - })(e, o.rows, o.columns, o.options); - }), - e.addCommand("mceTableApplyCellStyle", (t, o) => { - const l = (e) => "tablecell" + e.toLowerCase().replace("-", ""); - if (!s(o)) return; - const a = _(Ps(e), ss); - if (0 === a.length) return; - const c = ((e, t) => { - const o = {}; - return ( - ((e, t, o, n) => { - G(e, (e, r) => { - (t(e, r) ? o : n)(e, r); - }); - })( - e, - t, - ((e) => (t, o) => { - e[o] = t; - })(o), - f, - ), - o - ); - })(o, (t, o) => e.formatter.has(l(o)) && r(t)); - ((e) => { - for (const t in e) if (U.call(e, t)) return !1; - return !0; - })(c) || - (G(c, (t, o) => { - const n = l(o); - N(a, (o) => { - "" === t - ? e.formatter.remove(n, { value: null }, o.dom, !0) - : e.formatter.apply(n, { value: t }, o.dom); - }); - }), - n(a[0]).each((t) => ic(e, t.dom, mc))); - }); - }, - Zc = Zl([ - { before: ["element"] }, - { on: ["element", "offset"] }, - { after: ["element"] }, - ]), - ei = { - before: Zc.before, - on: Zc.on, - after: Zc.after, - cata: (e, t, o, n) => e.fold(t, o, n), - getStart: (e) => e.fold(h, h, h), - }, - ti = (e, t) => ({ selection: e, kill: t }), - oi = (e, t) => { - const o = e.document.createRange(); - return o.selectNode(t.dom), o; - }, - ni = (e, t) => { - const o = e.document.createRange(); - return ri(o, t), o; - }, - ri = (e, t) => e.selectNodeContents(t.dom), - si = (e, t, o) => { - const n = e.document.createRange(); - var r; - return ( - (r = n), - t.fold( - (e) => { - r.setStartBefore(e.dom); - }, - (e, t) => { - r.setStart(e.dom, t); - }, - (e) => { - r.setStartAfter(e.dom); - }, - ), - ((e, t) => { - t.fold( - (t) => { - e.setEndBefore(t.dom); - }, - (t, o) => { - e.setEnd(t.dom, o); - }, - (t) => { - e.setEndAfter(t.dom); - }, - ); - })(n, o), - n - ); - }, - li = (e, t, o, n, r) => { - const s = e.document.createRange(); - return s.setStart(t.dom, o), s.setEnd(n.dom, r), s; - }, - ai = (e) => ({ - left: e.left, - top: e.top, - right: e.right, - bottom: e.bottom, - width: e.width, - height: e.height, - }), - ci = Zl([ - { ltr: ["start", "soffset", "finish", "foffset"] }, - { rtl: ["start", "soffset", "finish", "foffset"] }, - ]), - ii = (e, t, o) => - t( - xe.fromDom(o.startContainer), - o.startOffset, - xe.fromDom(o.endContainer), - o.endOffset, - ), - mi = (e, t) => { - const o = ((e, t) => - t.match({ - domRange: (e) => ({ ltr: g(e), rtl: C.none }), - relative: (t, o) => ({ - ltr: eo(() => si(e, t, o)), - rtl: eo(() => C.some(si(e, o, t))), - }), - exact: (t, o, n, r) => ({ - ltr: eo(() => li(e, t, o, n, r)), - rtl: eo(() => C.some(li(e, n, r, t, o))), - }), - }))(e, t); - return ((e, t) => { - const o = t.ltr(); - return o.collapsed - ? t - .rtl() - .filter((e) => !1 === e.collapsed) - .map((e) => - ci.rtl( - xe.fromDom(e.endContainer), - e.endOffset, - xe.fromDom(e.startContainer), - e.startOffset, - ), - ) - .getOrThunk(() => ii(0, ci.ltr, o)) - : ii(0, ci.ltr, o); - })(0, o); - }, - di = (e, t) => - mi(e, t).match({ - ltr: (t, o, n, r) => { - const s = e.document.createRange(); - return s.setStart(t.dom, o), s.setEnd(n.dom, r), s; - }, - rtl: (t, o, n, r) => { - const s = e.document.createRange(); - return s.setStart(n.dom, r), s.setEnd(t.dom, o), s; - }, - }); - ci.ltr, ci.rtl; - const ui = (e, t, o, n) => ({ start: e, soffset: t, finish: o, foffset: n }), - fi = (e, t, o, n) => ({ start: ei.on(e, t), finish: ei.on(o, n) }), - gi = (e, t) => { - const o = di(e, t); - return ui( - xe.fromDom(o.startContainer), - o.startOffset, - xe.fromDom(o.endContainer), - o.endOffset, - ); - }, - hi = fi, - pi = (e, t, o, n, r) => - Re(o, n) - ? C.none() - : xs(o, n, t).bind((t) => { - const n = t.boxes.getOr([]); - return n.length > 1 - ? (r(e, n, t.start, t.finish), - C.some(ti(C.some(hi(o, 0, o, br(o))), !0))) - : C.none(); - }), - wi = (e, t) => ({ item: e, mode: t }), - bi = (e, t, o, n = vi) => - e - .property() - .parent(t) - .map((e) => wi(e, n)), - vi = (e, t, o, n = yi) => o.sibling(e, t).map((e) => wi(e, n)), - yi = (e, t, o, n = yi) => { - const r = e.property().children(t); - return o.first(r).map((e) => wi(e, n)); - }, - xi = [ - { current: bi, next: vi, fallback: C.none() }, - { current: vi, next: yi, fallback: C.some(bi) }, - { current: yi, next: yi, fallback: C.some(vi) }, - ], - Ci = (e, t, o, n, r = xi) => - L(r, (e) => e.current === o).bind((o) => - o - .current(e, t, n, o.next) - .orThunk(() => o.fallback.bind((o) => Ci(e, t, o, n))), - ), - Si = (e, t, o, n, r, s) => - Ci(e, t, n, r).bind((t) => - s(t.item) - ? C.none() - : o(t.item) - ? C.some(t.item) - : Si(e, t.item, o, t.mode, r, s), - ), - Ti = (e) => (t) => 0 === e.property().children(t).length, - Ri = (e, t, o, n) => - Si( - e, - t, - o, - vi, - { - sibling: (e, t) => e.query().prevSibling(t), - first: (e) => (e.length > 0 ? C.some(e[e.length - 1]) : C.none()), - }, - n, - ), - Di = (e, t, o, n) => - Si( - e, - t, - o, - vi, - { - sibling: (e, t) => e.query().nextSibling(t), - first: (e) => (e.length > 0 ? C.some(e[0]) : C.none()), - }, - n, - ), - Oi = hs(), - ki = (e, t) => ((e, t, o) => Ri(e, t, Ti(e), o))(Oi, e, t), - Ei = (e, t) => ((e, t, o) => Di(e, t, Ti(e), o))(Oi, e, t), - Ni = Zl([ - { none: ["message"] }, - { success: [] }, - { failedUp: ["cell"] }, - { failedDown: ["cell"] }, - ]), - Bi = (e) => bt(e, "tr"), - _i = { - ...Ni, - verify: (e, t, o, n, r, s, l) => - bt(n, "td,th", l) - .bind((o) => - bt(t, "td,th", l).map((t) => - Re(o, t) - ? Re(n, o) && br(o) === r - ? s(t) - : Ni.none("in same cell") - : vs(Bi, [o, t]).fold( - () => - ((e, t, o) => { - const n = e.getRect(t), - r = e.getRect(o); - return r.right > n.left && r.left < n.right; - })(e, t, o) - ? Ni.success() - : s(t), - (e) => s(t), - ), - ), - ) - .getOr(Ni.none("default")), - cata: (e, t, o, n, r) => e.fold(t, o, n, r), - }, - zi = ue("br"), - Ai = (e, t, o) => - t(e, o).bind((e) => - ie(e) && 0 === hr(e).trim().length ? Ai(e, t, o) : C.some(e), - ), - Li = (e, t, o, n) => - ((e, t) => - We(e, t) - .filter(zi) - .orThunk(() => We(e, t - 1).filter(zi)))(t, o).bind((t) => - n.traverse(t).fold( - () => Ai(t, n.gather, e).map(n.relative), - (e) => - ((e) => - Ne(e).bind((t) => { - const o = Le(t); - return ((e, t) => W(e, w(Re, t)))(o, e).map((n) => - ((e, t, o, n) => ({ - parent: e, - children: t, - element: o, - index: n, - }))(t, o, e, n), - ); - }))(e).map((e) => ei.on(e.parent, e.index)), - ), - ), - Wi = (e, t) => ({ - left: e.left, - top: e.top + t, - right: e.right, - bottom: e.bottom + t, - }), - Mi = (e, t) => ({ - left: e.left, - top: e.top - t, - right: e.right, - bottom: e.bottom - t, - }), - ji = (e, t, o) => ({ - left: e.left + t, - top: e.top + o, - right: e.right + t, - bottom: e.bottom + o, - }), - Pi = (e) => ({ - left: e.left, - top: e.top, - right: e.right, - bottom: e.bottom, - }), - Ii = (e, t) => C.some(e.getRect(t)), - Fi = (e, t, o) => - ce(t) - ? Ii(e, t).map(Pi) - : ie(t) - ? ((e, t, o) => - o >= 0 && o < br(t) - ? e.getRangedRect(t, o, t, o + 1) - : o > 0 - ? e.getRangedRect(t, o - 1, t, o) - : C.none())(e, t, o).map(Pi) - : C.none(), - Hi = (e, t) => - ce(t) - ? Ii(e, t).map(Pi) - : ie(t) - ? e.getRangedRect(t, 0, t, br(t)).map(Pi) - : C.none(), - $i = Zl([{ none: [] }, { retry: ["caret"] }]), - Vi = (e, t, o) => - gt(t, pa).fold(y, (t) => - Hi(e, t).exists((e) => - ((e, t) => - e.left < t.left || - Math.abs(t.right - e.left) < 1 || - e.left > t.right)(o, e), - ), - ), - qi = { - point: (e) => e.bottom, - adjuster: (e, t, o, n, r) => { - const s = Wi(r, 5); - return Math.abs(o.bottom - n.bottom) < 1 || o.top > r.bottom - ? $i.retry(s) - : o.top === r.bottom - ? $i.retry(Wi(r, 1)) - : Vi(e, t, r) - ? $i.retry(ji(s, 5, 0)) - : $i.none(); - }, - move: Wi, - gather: Ei, - }, - Ui = (e, t, o, n, r) => - 0 === r - ? C.some(n) - : ((e, t, o) => - e - .elementFromPoint(t, o) - .filter((e) => "table" === ne(e)) - .isSome())(e, n.left, t.point(n)) - ? ((e, t, o, n, r) => Ui(e, t, o, t.move(n, 5), r))(e, t, o, n, r - 1) - : e.situsFromPoint(n.left, t.point(n)).bind((s) => - s.start.fold( - C.none, - (s) => - Hi(e, s) - .bind((l) => - t - .adjuster(e, s, l, o, n) - .fold(C.none, (n) => Ui(e, t, o, n, r - 1)), - ) - .orThunk(() => C.some(n)), - C.none, - ), - ), - Gi = (e, t, o) => { - const n = e.move(o, 5), - r = Ui(t, e, o, n, 100).getOr(n); - return ((e, t, o) => - e.point(t) > o.getInnerHeight() - ? C.some(e.point(t) - o.getInnerHeight()) - : e.point(t) < 0 - ? C.some(-e.point(t)) - : C.none())(e, r, t).fold( - () => t.situsFromPoint(r.left, e.point(r)), - (o) => (t.scrollBy(0, o), t.situsFromPoint(r.left, e.point(r) - o)), - ); - }, - Ki = { - tryUp: w(Gi, { - point: (e) => e.top, - adjuster: (e, t, o, n, r) => { - const s = Mi(r, 5); - return Math.abs(o.top - n.top) < 1 || o.bottom < r.top - ? $i.retry(s) - : o.bottom === r.top - ? $i.retry(Mi(r, 1)) - : Vi(e, t, r) - ? $i.retry(ji(s, 5, 0)) - : $i.none(); - }, - move: Mi, - gather: ki, - }), - tryDown: w(Gi, qi), - getJumpSize: g(5), - }, - Yi = (e, t, o) => - e.getSelection().bind((n) => - ((e, t, o, n) => { - const r = zi(t) - ? ((e, t, o) => - o - .traverse(t) - .orThunk(() => Ai(t, o.gather, e)) - .map(o.relative))(e, t, n) - : Li(e, t, o, n); - return r.map((e) => ({ start: e, finish: e })); - })(t, n.finish, n.foffset, o).fold( - () => C.some(Fs(n.finish, n.foffset)), - (r) => { - const s = e.fromSitus(r); - return ( - (l = _i.verify( - e, - n.finish, - n.foffset, - s.finish, - s.foffset, - o.failure, - t, - )), - _i.cata( - l, - (e) => C.none(), - () => C.none(), - (e) => C.some(Fs(e, 0)), - (e) => C.some(Fs(e, br(e))), - ) - ); - var l; - }, - ), - ), - Ji = (e, t, o, n, r, s) => - 0 === s - ? C.none() - : Zi(e, t, o, n, r).bind((l) => { - const a = e.fromSitus(l), - c = _i.verify(e, o, n, a.finish, a.foffset, r.failure, t); - return _i.cata( - c, - () => C.none(), - () => C.some(l), - (l) => - Re(o, l) && 0 === n - ? Qi(e, o, n, Mi, r) - : Ji(e, t, l, 0, r, s - 1), - (l) => - Re(o, l) && n === br(l) - ? Qi(e, o, n, Wi, r) - : Ji(e, t, l, br(l), r, s - 1), - ); - }), - Qi = (e, t, o, n, r) => - Fi(e, t, o).bind((t) => Xi(e, r, n(t, Ki.getJumpSize()))), - Xi = (e, t, o) => { - const n = Bo().browser; - return n.isChromium() || n.isSafari() || n.isFirefox() - ? t.retry(e, o) - : C.none(); - }, - Zi = (e, t, o, n, r) => Fi(e, o, n).bind((t) => Xi(e, r, t)), - em = (e, t, o, n, r) => - bt(n, "td,th", t).bind((n) => - bt(n, "table", t).bind((s) => - ((e, t) => - ft(e, (e) => Ne(e).exists((e) => Re(e, t)), void 0).isSome())(r, s) - ? ((e, t, o) => - Yi(e, t, o).bind((n) => - Ji(e, t, n.element, n.offset, o, 20).map(e.fromSitus), - ))(e, t, o).bind((e) => - bt(e.finish, "td,th", t).map((t) => ({ - start: n, - finish: t, - range: e, - })), - ) - : C.none(), - ), - ), - tm = (e, t, o, n, r, s) => - s(n, t).orThunk(() => - em(e, t, o, n, r).map((e) => { - const t = e.range; - return ti(C.some(hi(t.start, t.soffset, t.finish, t.foffset)), !0); - }), - ), - om = (e, t) => - bt(e, "tr", t).bind((e) => - bt(e, "table", t).bind((o) => { - const n = dt(o, "tr"); - return Re(e, n[0]) - ? ((e, t, o) => Ri(Oi, e, (e) => Cr(e).isSome(), o))(o, 0, t).map( - (e) => { - const t = br(e); - return ti(C.some(hi(e, t, e, t)), !0); - }, - ) - : C.none(); - }), - ), - nm = (e, t) => - bt(e, "tr", t).bind((e) => - bt(e, "table", t).bind((o) => { - const n = dt(o, "tr"); - return Re(e, n[n.length - 1]) - ? ((e, t, o) => Di(Oi, e, (e) => xr(e).isSome(), o))(o, 0, t).map( - (e) => ti(C.some(hi(e, 0, e, 0)), !0), - ) - : C.none(); - }), - ), - rm = (e, t, o, n, r, s, l) => - em(e, o, n, r, s).bind((e) => pi(t, o, e.start, e.finish, l)), - sm = (e) => { - let t = e; - return { - get: () => t, - set: (e) => { - t = e; - }, - }; - }, - lm = () => { - const e = ((e) => { - const t = sm(C.none()), - o = () => t.get().each(e); - return { - clear: () => { - o(), t.set(C.none()); - }, - isSet: () => t.get().isSome(), - get: () => t.get(), - set: (e) => { - o(), t.set(C.some(e)); - }, - }; - })(f); - return { ...e, on: (t) => e.get().each(t) }; - }, - am = (e, t) => bt(e, "td,th", t), - cm = (e) => Be(e).exists(Qr), - im = { - traverse: Ae, - gather: Ei, - relative: ei.before, - retry: Ki.tryDown, - failure: _i.failedDown, - }, - mm = { - traverse: ze, - gather: ki, - relative: ei.before, - retry: Ki.tryUp, - failure: _i.failedUp, - }, - dm = (e) => (t) => t === e, - um = dm(38), - fm = dm(40), - gm = (e) => e >= 37 && e <= 40, - hm = { isBackward: dm(37), isForward: dm(39) }, - pm = { isBackward: dm(39), isForward: dm(37) }, - wm = Zl([ - { domRange: ["rng"] }, - { relative: ["startSitu", "finishSitu"] }, - { exact: ["start", "soffset", "finish", "foffset"] }, - ]), - bm = { - domRange: wm.domRange, - relative: wm.relative, - exact: wm.exact, - exactFromRange: (e) => wm.exact(e.start, e.soffset, e.finish, e.foffset), - getWin: (e) => { - const t = ((e) => - e.match({ - domRange: (e) => xe.fromDom(e.startContainer), - relative: (e, t) => ei.getStart(e), - exact: (e, t, o, n) => e, - }))(e); - return xe.fromDom(Ee(t).dom.defaultView); - }, - range: ui, - }, - vm = document.caretPositionFromPoint - ? (e, t, o) => { - var n, r; - return C.from( - null === (r = (n = e.dom).caretPositionFromPoint) || void 0 === r - ? void 0 - : r.call(n, t, o), - ).bind((t) => { - if (null === t.offsetNode) return C.none(); - const o = e.dom.createRange(); - return o.setStart(t.offsetNode, t.offset), o.collapse(), C.some(o); - }); - } - : document.caretRangeFromPoint - ? (e, t, o) => { - var n, r; - return C.from( - null === (r = (n = e.dom).caretRangeFromPoint) || void 0 === r - ? void 0 - : r.call(n, t, o), - ); - } - : C.none, - ym = (e, t) => { - const o = ne(e); - return "input" === o - ? ei.after(e) - : D(["br", "img"], o) - ? 0 === t - ? ei.before(e) - : ei.after(e) - : ei.on(e, t); - }, - xm = (e) => C.from(e.getSelection()), - Cm = (e, t) => { - xm(e).each((e) => { - e.removeAllRanges(), e.addRange(t); - }); - }, - Sm = (e, t, o, n, r) => { - const s = li(e, t, o, n, r); - Cm(e, s); - }, - Tm = (e, t) => - mi(e, t).match({ - ltr: (t, o, n, r) => { - Sm(e, t, o, n, r); - }, - rtl: (t, o, n, r) => { - xm(e).each((s) => { - if (s.setBaseAndExtent) s.setBaseAndExtent(t.dom, o, n.dom, r); - else if (s.extend) - try { - ((e, t, o, n, r, s) => { - t.collapse(o.dom, n), t.extend(r.dom, s); - })(0, s, t, o, n, r); - } catch (s) { - Sm(e, n, r, t, o); - } - else Sm(e, n, r, t, o); - }); - }, - }), - Rm = (e, t, o, n, r) => { - const s = ((e, t, o, n) => { - const r = ym(e, t), - s = ym(o, n); - return bm.relative(r, s); - })(t, o, n, r); - Tm(e, s); - }, - Dm = (e, t, o) => { - const n = ((e, t) => { - const o = e.fold(ei.before, ym, ei.after), - n = t.fold(ei.before, ym, ei.after); - return bm.relative(o, n); - })(t, o); - Tm(e, n); - }, - Om = (e) => { - if (e.rangeCount > 0) { - const t = e.getRangeAt(0), - o = e.getRangeAt(e.rangeCount - 1); - return C.some( - ui( - xe.fromDom(t.startContainer), - t.startOffset, - xe.fromDom(o.endContainer), - o.endOffset, - ), - ); - } - return C.none(); - }, - km = (e) => { - if (null === e.anchorNode || null === e.focusNode) return Om(e); - { - const t = xe.fromDom(e.anchorNode), - o = xe.fromDom(e.focusNode); - return ((e, t, o, n) => { - const r = ((e, t, o, n) => { - const r = ke(e).dom.createRange(); - return r.setStart(e.dom, t), r.setEnd(o.dom, n), r; - })(e, t, o, n), - s = Re(e, o) && t === n; - return r.collapsed && !s; - })(t, e.anchorOffset, o, e.focusOffset) - ? C.some(ui(t, e.anchorOffset, o, e.focusOffset)) - : Om(e); - } - }, - Em = (e, t, o = !0) => { - const n = (o ? ni : oi)(e, t); - Cm(e, n); - }, - Nm = (e) => - ((e) => - xm(e) - .filter((e) => e.rangeCount > 0) - .bind(km))(e).map((e) => - bm.exact(e.start, e.soffset, e.finish, e.foffset), - ), - Bm = (e) => ({ - elementFromPoint: (t, o) => xe.fromPoint(xe.fromDom(e.document), t, o), - getRect: (e) => e.dom.getBoundingClientRect(), - getRangedRect: (t, o, n, r) => { - const s = bm.exact(t, o, n, r); - return ((e, t) => - ((e) => { - const t = e.getClientRects(), - o = t.length > 0 ? t[0] : e.getBoundingClientRect(); - return o.width > 0 || o.height > 0 ? C.some(o).map(ai) : C.none(); - })(di(e, t)))(e, s); - }, - getSelection: () => Nm(e).map((t) => gi(e, t)), - fromSitus: (t) => { - const o = bm.relative(t.start, t.finish); - return gi(e, o); - }, - situsFromPoint: (t, o) => - ((e, t, o) => - ((e, t, o) => { - const n = xe.fromDom(e.document); - return vm(n, t, o).map((e) => - ui( - xe.fromDom(e.startContainer), - e.startOffset, - xe.fromDom(e.endContainer), - e.endOffset, - ), - ); - })(e, t, o))(e, t, o).map((e) => - fi(e.start, e.soffset, e.finish, e.foffset), - ), - clearSelection: () => { - ((e) => { - xm(e).each((e) => e.removeAllRanges()); - })(e); - }, - collapseSelection: (t = !1) => { - Nm(e).each((o) => - o.fold( - (e) => e.collapse(t), - (o, n) => { - const r = t ? o : n; - Dm(e, r, r); - }, - (o, n, r, s) => { - const l = t ? o : r, - a = t ? n : s; - Rm(e, l, a, l, a); - }, - ), - ); - }, - setSelection: (t) => { - Rm(e, t.start, t.soffset, t.finish, t.foffset); - }, - setRelativeSelection: (t, o) => { - Dm(e, t, o); - }, - selectNode: (t) => { - Em(e, t, !1); - }, - selectContents: (t) => { - Em(e, t); - }, - getInnerHeight: () => e.innerHeight, - getScrollY: () => - ((e) => { - const t = void 0 !== e ? e.dom : document, - o = t.body.scrollLeft || t.documentElement.scrollLeft, - n = t.body.scrollTop || t.documentElement.scrollTop; - return bn(o, n); - })(xe.fromDom(e.document)).top, - scrollBy: (t, o) => { - ((e, t, o) => { - const n = (void 0 !== o ? o.dom : document).defaultView; - n && n.scrollBy(e, t); - })(t, o, xe.fromDom(e.document)); - }, - }), - _m = (e, t) => ({ rows: e, cols: t }), - zm = (e) => gt(e, ae).exists(Qr), - Am = (e, t) => zm(e) || zm(t), - Lm = (e) => void 0 !== e.dom.classList, - Wm = (e, t) => - ((e, t, o) => { - const n = ((e, t) => { - const o = pe(e, t); - return void 0 === o || "" === o ? [] : o.split(" "); - })(e, t).concat([o]); - return ge(e, t, n.join(" ")), !0; - })(e, "class", t), - Mm = (e, t) => { - Lm(e) ? e.dom.classList.add(t) : Wm(e, t); - }, - jm = (e, t) => Lm(e) && e.dom.classList.contains(t), - Pm = () => ({ tag: "none" }), - Im = (e) => ({ tag: "multiple", elements: e }), - Fm = (e) => ({ tag: "single", element: e }), - Hm = (e) => { - const t = xe.fromDom( - ((e) => { - if (nt() && m(e.target)) { - const t = xe.fromDom(e.target); - if ( - ce(t) && - m(t.dom.shadowRoot) && - e.composed && - e.composedPath - ) { - const t = e.composedPath(); - if (t) return H(t); - } - } - return C.from(e.target); - })(e).getOr(e.target), - ), - o = () => e.stopPropagation(), - n = () => e.preventDefault(), - r = ((s = n), (l = o), (...e) => s(l.apply(null, e))); - var s, l; - return ((e, t, o, n, r, s, l) => ({ - target: e, - x: t, - y: o, - stop: n, - prevent: r, - kill: s, - raw: l, - }))(t, e.clientX, e.clientY, o, n, r, e); - }, - $m = (e, t, o, n) => { - e.dom.removeEventListener(t, o, n); - }, - Vm = x, - qm = (e, t, o) => - ((e, t, o, n) => - ((e, t, o, n, r) => { - const s = ((e, t) => (o) => { - e(o) && t(Hm(o)); - })(o, n); - return e.dom.addEventListener(t, s, r), { unbind: w($m, e, t, s, r) }; - })(e, t, o, n, !1))(e, t, Vm, o), - Um = Hm, - Gm = (e) => !jm(xe.fromDom(e.target), "ephox-snooker-resizer-bar"), - Km = (e, t) => { - const o = - ((r = As.selectedSelector), - { - get: () => - Rs(xe.fromDom(e.getBody()), r).fold( - () => js(os(e), es(e)).fold(Pm, Fm), - Im, - ), - }), - n = ((e, t, o) => { - const n = (t) => { - be(t, e.selected), be(t, e.firstSelected), be(t, e.lastSelected); - }, - r = (t) => { - ge(t, e.selected, "1"); - }, - s = (e) => { - l(e), o(); - }, - l = (t) => { - const o = dt( - t, - `${e.selectedSelector},${e.firstSelectedSelector},${e.lastSelectedSelector}`, - ); - N(o, n); - }; - return { - clearBeforeUpdate: l, - clear: s, - selectRange: (o, n, l, a) => { - s(o), - N(n, r), - ge(l, e.firstSelected, "1"), - ge(a, e.lastSelected, "1"), - t(n, l, a); - }, - selectedSelector: e.selectedSelector, - firstSelectedSelector: e.firstSelectedSelector, - lastSelectedSelector: e.lastSelectedSelector, - }; - })( - As, - (t, o, n) => { - Kt(o).each((r) => { - const s = Wr(e), - l = Br(f, xe.fromDom(e.getDoc()), s), - a = ((e, t, o) => { - const n = Zo(e); - return Ol(n, t).map((e) => { - const t = xl(n, o, !1), - { rows: r } = qo(t), - s = ((e, t) => { - const o = e.slice(0, t[t.length - 1].row + 1), - n = Cl(o); - return j(n, (e) => { - const o = e.cells.slice( - 0, - t[t.length - 1].column + 1, - ); - return E(o, (e) => e.element); - }); - })(r, e), - l = ((e, t) => { - const o = e.slice( - t[0].row + t[0].rowspan - 1, - e.length, - ), - n = Cl(o); - return j(n, (e) => { - const o = e.cells.slice( - t[0].column + t[0].colspan - 1, - e.cells.length, - ); - return E(o, (e) => e.element); - }); - })(r, e); - return { upOrLeftCells: s, downOrRightCells: l }; - }); - })(r, { selection: Ps(e) }, l); - ((e, t, o, n, r) => { - e.dispatch("TableSelectionChange", { - cells: t, - start: o, - finish: n, - otherCells: r, - }); - })(e, t, o, n, a); - }); - }, - () => - ((e) => { - e.dispatch("TableSelectionClear"); - })(e), - ); - var r; - return ( - e.on("init", (o) => { - const r = e.getWin(), - s = Zr(e), - l = es(e), - a = ((e, t, o, n) => { - const r = ((e, t, o, n) => { - const r = lm(), - s = r.clear, - l = (s) => { - r.on((r) => { - n.clearBeforeUpdate(t), - am(s.target, o).each((l) => { - xs(r, l, o).each((o) => { - const r = o.boxes.getOr([]); - if (1 === r.length) { - const o = r[0], - l = "false" === Xr(o), - a = vt(Jr(s.target), o, Re); - l && - a && - (n.selectRange(t, r, o, o), - e.selectContents(o)); - } else - r.length > 1 && - (n.selectRange(t, r, o.start, o.finish), - e.selectContents(l)); - }); - }); - }); - }; - return { - clearstate: s, - mousedown: (e) => { - n.clear(t), am(e.target, o).filter(cm).each(r.set); - }, - mouseover: (e) => { - l(e); - }, - mouseup: (e) => { - l(e), s(); - }, - }; - })(Bm(e), t, o, n); - return { - clearstate: r.clearstate, - mousedown: r.mousedown, - mouseover: r.mouseover, - mouseup: r.mouseup, - }; - })(r, s, l, n), - c = ((e, t, o, n) => { - const r = Bm(e), - s = () => (n.clear(t), C.none()); - return { - keydown: (e, l, a, c, i, m) => { - const d = e.raw, - u = d.which, - f = !0 === d.shiftKey, - g = Cs(t, n.selectedSelector).fold( - () => ( - gm(u) && !f && n.clearBeforeUpdate(t), - gm(u) && f && !Am(l, c) - ? C.none - : fm(u) && f - ? w(rm, r, t, o, im, c, l, n.selectRange) - : um(u) && f - ? w(rm, r, t, o, mm, c, l, n.selectRange) - : fm(u) - ? w(tm, r, o, im, c, l, nm) - : um(u) - ? w(tm, r, o, mm, c, l, om) - : C.none - ), - (e) => { - const o = (o) => () => { - const s = V(o, (o) => - ((e, t, o, n, r) => - Ts( - n, - e, - t, - r.firstSelectedSelector, - r.lastSelectedSelector, - ).map( - (e) => ( - r.clearBeforeUpdate(o), - r.selectRange(o, e.boxes, e.start, e.finish), - e.boxes - ), - ))(o.rows, o.cols, t, e, n), - ); - return s.fold( - () => - Ss( - t, - n.firstSelectedSelector, - n.lastSelectedSelector, - ).map((e) => { - const o = - fm(u) || m.isForward(u) - ? ei.after - : ei.before; - return ( - r.setRelativeSelection( - ei.on(e.first, 0), - o(e.table), - ), - n.clear(t), - ti(C.none(), !0) - ); - }), - (e) => C.some(ti(C.none(), !0)), - ); - }; - return gm(u) && f && !Am(l, c) - ? C.none - : fm(u) && f - ? o([_m(1, 0)]) - : um(u) && f - ? o([_m(-1, 0)]) - : m.isBackward(u) && f - ? o([_m(0, -1), _m(-1, 0)]) - : m.isForward(u) && f - ? o([_m(0, 1), _m(1, 0)]) - : gm(u) && !f - ? s - : C.none; - }, - ); - return g(); - }, - keyup: (e, r, s, l, a) => - Cs(t, n.selectedSelector).fold(() => { - const c = e.raw, - i = c.which; - return !0 === c.shiftKey && gm(i) && Am(r, l) - ? ((e, t, o, n, r, s, l) => - Re(o, r) && n === s - ? C.none() - : bt(o, "td,th", t).bind((o) => - bt(r, "td,th", t).bind((n) => - pi(e, t, o, n, l), - ), - ))(t, o, r, s, l, a, n.selectRange) - : C.none(); - }, C.none), - }; - })(r, s, l, n), - i = ((e, t, o, n) => { - const r = Bm(e); - return (e, s) => { - n.clearBeforeUpdate(t), - xs(e, s, o).each((e) => { - const o = e.boxes.getOr([]); - n.selectRange(t, o, e.start, e.finish), - r.selectContents(s), - r.collapseSelection(); - }); - }; - })(r, s, l, n); - e.on("TableSelectorChange", (e) => i(e.start, e.finish)); - const m = (t, o) => { - ((e) => !0 === e.raw.shiftKey)(t) && - (o.kill && t.kill(), - o.selection.each((t) => { - const o = bm.relative(t.start, t.finish), - n = di(r, o); - e.selection.setRng(n); - })); - }, - d = (e) => 0 === e.button, - u = (() => { - const e = sm(xe.fromDom(s)), - t = sm(0); - return { - touchEnd: (o) => { - const n = xe.fromDom(o.target); - if (ue("td")(n) || ue("th")(n)) { - const r = e.get(), - s = t.get(); - Re(r, n) && - o.timeStamp - s < 300 && - (o.preventDefault(), i(n, n)); - } - e.set(n), t.set(o.timeStamp); - }, - }; - })(); - e.on("dragstart", (e) => { - a.clearstate(); - }), - e.on("mousedown", (e) => { - d(e) && Gm(e) && a.mousedown(Um(e)); - }), - e.on("mouseover", (e) => { - var t; - (void 0 !== (t = e).buttons && 0 == (1 & t.buttons)) || - !Gm(e) || - a.mouseover(Um(e)); - }), - e.on("mouseup", (e) => { - d(e) && Gm(e) && a.mouseup(Um(e)); - }), - e.on("touchend", u.touchEnd), - e.on("keyup", (t) => { - const o = Um(t); - if (o.raw.shiftKey && gm(o.raw.which)) { - const t = e.selection.getRng(), - n = xe.fromDom(t.startContainer), - r = xe.fromDom(t.endContainer); - c.keyup(o, n, t.startOffset, r, t.endOffset).each((e) => { - m(o, e); - }); - } - }), - e.on("keydown", (o) => { - const n = Um(o); - t.hide(); - const r = e.selection.getRng(), - s = xe.fromDom(r.startContainer), - l = xe.fromDom(r.endContainer), - a = un(hm, pm)(xe.fromDom(e.selection.getStart())); - c.keydown(n, s, r.startOffset, l, r.endOffset, a).each((e) => { - m(n, e); - }), - t.show(); - }), - e.on("NodeChange", () => { - const t = e.selection, - o = xe.fromDom(t.getStart()), - r = xe.fromDom(t.getEnd()); - vs(Kt, [o, r]).fold(() => n.clear(s), f); - }); - }), - e.on("PreInit", () => { - e.serializer.addTempAttr(As.firstSelected), - e.serializer.addTempAttr(As.lastSelected); - }), - { - getSelectedCells: () => - ((e, t, o, n) => { - switch (e.tag) { - case "none": - return t(); - case "single": - return ((e) => [e.dom])(e.element); - case "multiple": - return ((e) => E(e, (e) => e.dom))(e.elements); - } - })(o.get(), g([])), - clearSelectedCells: (e) => n.clear(xe.fromDom(e)), - } - ); - }, - Ym = (e) => { - let t = []; - return { - bind: (e) => { - if (void 0 === e) - throw new Error("Event bind error: undefined handler"); - t.push(e); - }, - unbind: (e) => { - t = _(t, (t) => t !== e); - }, - trigger: (...o) => { - const n = {}; - N(e, (e, t) => { - n[e] = o[t]; - }), - N(t, (e) => { - e(n); - }); - }, - }; - }, - Jm = (e) => ({ - registry: K(e, (e) => ({ bind: e.bind, unbind: e.unbind })), - trigger: K(e, (e) => e.trigger), - }), - Qm = (e) => e.slice(0).sort(), - Xm = (e, t) => { - const o = _(t, (t) => !D(e, t)); - o.length > 0 && - ((e) => { - throw new Error("Unsupported keys for object: " + Qm(e).join(", ")); - })(o); - }, - Zm = (e) => - ((e, t) => - ((e, t, o) => { - if (0 === t.length) - throw new Error("You must specify at least one required field."); - return ( - ((e, t) => { - if (!l(t)) - throw new Error( - "The " + e + " fields must be an array. Was: " + t + ".", - ); - N(t, (t) => { - if (!r(t)) - throw new Error( - "The value " + - t + - " in the " + - e + - " fields was not a string.", - ); - }); - })("required", t), - ((e) => { - const t = Qm(e); - L(t, (e, o) => o < t.length - 1 && e === t[o + 1]).each((e) => { - throw new Error( - "The field: " + - e + - " occurs more than once in the combined fields: [" + - t.join(", ") + - "].", - ); - }); - })(t), - (n) => { - const r = q(n); - P(t, (e) => D(r, e)) || - ((e, t) => { - throw new Error( - "All required keys (" + - Qm(e).join(", ") + - ") were not specified. Specified keys were: " + - Qm(t).join(", ") + - ".", - ); - })(t, r), - e(t, r); - const s = _(t, (e) => !o.validate(n[e], e)); - return ( - s.length > 0 && - ((e, t) => { - throw new Error( - "All values need to be of type: " + - t + - ". Keys (" + - Qm(e).join(", ") + - ") were not.", - ); - })(s, o.label), - n - ); - } - ); - })(e, t, { validate: d, label: "function" }))(Xm, e), - ed = Zm(["compare", "extract", "mutate", "sink"]), - td = Zm(["element", "start", "stop", "destroy"]), - od = Zm(["forceDrop", "drop", "move", "delayDrop"]), - nd = () => { - const e = (() => { - const e = Jm({ move: Ym(["info"]) }); - return { onEvent: f, reset: f, events: e.registry }; - })(), - t = (() => { - let e = C.none(); - const t = Jm({ move: Ym(["info"]) }); - return { - onEvent: (o, n) => { - n.extract(o).each((o) => { - const r = ((t, o) => { - const n = e.map((e) => t.compare(e, o)); - return (e = C.some(o)), n; - })(n, o); - r.each((e) => { - t.trigger.move(e); - }); - }); - }, - reset: () => { - e = C.none(); - }, - events: t.registry, - }; - })(); - let o = e; - return { - on: () => { - o.reset(), (o = t); - }, - off: () => { - o.reset(), (o = e); - }, - isOn: () => o === t, - onEvent: (e, t) => { - o.onEvent(e, t); - }, - events: t.events, - }; - }, - rd = (e) => { - const t = e.replace(/\./g, "-"); - return { resolve: (e) => t + "-" + e }; - }, - sd = rd("ephox-dragster").resolve; - var ld = ed({ - compare: (e, t) => bn(t.left - e.left, t.top - e.top), - extract: (e) => C.some(bn(e.x, e.y)), - sink: (e, t) => { - const o = ((e) => { - const t = { layerClass: sd("blocker"), ...e }, - o = xe.fromTag("div"); - return ( - ge(o, "role", "presentation"), - Bt(o, { - position: "fixed", - left: "0px", - top: "0px", - width: "100%", - height: "100%", - }), - Mm(o, sd("blocker")), - Mm(o, t.layerClass), - { - element: g(o), - destroy: () => { - qe(o); - }, - } - ); - })(t), - n = qm(o.element(), "mousedown", e.forceDrop), - r = qm(o.element(), "mouseup", e.drop), - s = qm(o.element(), "mousemove", e.move), - l = qm(o.element(), "mouseout", e.delayDrop); - return td({ - element: o.element, - start: (e) => { - Ie(e, o.element()); - }, - stop: () => { - qe(o.element()); - }, - destroy: () => { - o.destroy(), r.unbind(), s.unbind(), l.unbind(), n.unbind(); - }, - }); - }, - mutate: (e, t) => { - e.mutate(t.left, t.top); - }, - }); - const ad = rd("ephox-snooker").resolve, - cd = ad("resizer-bar"), - id = ad("resizer-rows"), - md = ad("resizer-cols"), - dd = (e) => { - const t = dt(e.parent(), "." + cd); - N(t, qe); - }, - ud = (e, t, o) => { - const n = e.origin(); - N(t, (t) => { - t.each((t) => { - const r = o(n, t); - Mm(r, cd), Ie(e.parent(), r); - }); - }); - }, - fd = (e, t, o, n, r) => { - const s = yn(o), - l = t.isResizable, - a = n.length > 0 ? _n.positions(n, o) : [], - c = - a.length > 0 - ? ((e, t) => j(e.all, (e, o) => (t(e.element) ? [o] : [])))(e, l) - : []; - ((e, t, o, n) => { - ud(e, t, (e, t) => { - const r = ((e, t, o, n, r) => { - const s = xe.fromTag("div"); - return ( - Bt(s, { - position: "absolute", - left: t + "px", - top: o - 3.5 + "px", - height: "7px", - width: n + "px", - }), - he(s, { "data-row": e, role: "presentation" }), - s - ); - })(t.row, o.left - e.left, t.y - e.top, n); - return Mm(r, id), r; - }); - })( - t, - _(a, (e, t) => O(c, (e) => t === e)), - s, - Wo(o), - ); - const i = r.length > 0 ? An.positions(r, o) : [], - m = - i.length > 0 - ? ((e, t) => { - const o = []; - return ( - k(e.grid.columns, (n) => { - an(e, n) - .map((e) => e.element) - .forall(t) && o.push(n); - }), - _(o, (o) => { - const n = nn(e, (e) => e.column === o); - return P(n, (e) => t(e.element)); - }) - ); - })(e, l) - : []; - ((e, t, o, n) => { - ud(e, t, (e, t) => { - const r = ((e, t, o, n, r) => { - const s = xe.fromTag("div"); - return ( - Bt(s, { - position: "absolute", - left: t - 3.5 + "px", - top: o + "px", - height: r + "px", - width: "7px", - }), - he(s, { "data-column": e, role: "presentation" }), - s - ); - })(t.col, t.x - e.left, o.top - e.top, 0, n); - return Mm(r, md), r; - }); - })( - t, - _(i, (e, t) => O(m, (e) => t === e)), - s, - pn(o), - ); - }, - gd = (e, t) => { - if ((dd(e), e.isResizable(t))) { - const o = Zo(t), - n = dn(o), - r = cn(o); - fd(o, e, t, n, r); - } - }, - hd = (e, t) => { - const o = dt(e.parent(), "." + cd); - N(o, t); - }, - pd = (e) => { - hd(e, (e) => { - Nt(e, "display", "none"); - }); - }, - wd = (e) => { - hd(e, (e) => { - Nt(e, "display", "block"); - }); - }, - bd = ad("resizer-bar-dragging"), - vd = (e) => { - const t = (() => { - const e = Jm({ drag: Ym(["xDelta", "yDelta", "target"]) }); - let t = C.none(); - const o = (() => { - const e = Jm({ drag: Ym(["xDelta", "yDelta"]) }); - return { - mutate: (t, o) => { - e.trigger.drag(t, o); - }, - events: e.registry, - }; - })(); - return ( - o.events.drag.bind((o) => { - t.each((t) => { - e.trigger.drag(o.xDelta, o.yDelta, t); - }); - }), - { - assign: (e) => { - t = C.some(e); - }, - get: () => t, - mutate: o.mutate, - events: e.registry, - } - ); - })(), - o = ((e, t = {}) => { - var o; - return ((e, t, o) => { - let n = !1; - const r = Jm({ start: Ym([]), stop: Ym([]) }), - s = nd(), - l = () => { - m.stop(), s.isOn() && (s.off(), r.trigger.stop()); - }, - c = ((e, t) => { - let o = null; - const n = () => { - a(o) || (clearTimeout(o), (o = null)); - }; - return { - cancel: n, - throttle: (...t) => { - n(), - (o = setTimeout(() => { - (o = null), e.apply(null, t); - }, 200)); - }, - }; - })(l); - s.events.move.bind((o) => { - t.mutate(e, o.info); - }); - const i = - (e) => - (...t) => { - n && e.apply(null, t); - }, - m = t.sink( - od({ - forceDrop: l, - drop: i(l), - move: i((e) => { - c.cancel(), s.onEvent(e, t); - }), - delayDrop: i(c.throttle), - }), - o, - ); - return { - element: m.element, - go: (e) => { - m.start(e), s.on(), r.trigger.start(); - }, - on: () => { - n = !0; - }, - off: () => { - n = !1; - }, - isActive: () => n, - destroy: () => { - m.destroy(); - }, - events: r.registry, - }; - })(e, null !== (o = t.mode) && void 0 !== o ? o : ld, t); - })(t, {}); - let n = C.none(); - const r = (e, t) => C.from(pe(e, t)); - t.events.drag.bind((e) => { - r(e.target, "data-row").each((t) => { - const o = It(e.target, "top"); - Nt(e.target, "top", o + e.yDelta + "px"); - }), - r(e.target, "data-column").each((t) => { - const o = It(e.target, "left"); - Nt(e.target, "left", o + e.xDelta + "px"); - }); - }); - const s = (e, t) => It(e, t) - Wt(e, "data-initial-" + t, 0); - o.events.stop.bind(() => { - t.get().each((t) => { - n.each((o) => { - r(t, "data-row").each((e) => { - const n = s(t, "top"); - be(t, "data-initial-top"), - d.trigger.adjustHeight(o, n, parseInt(e, 10)); - }), - r(t, "data-column").each((e) => { - const n = s(t, "left"); - be(t, "data-initial-left"), - d.trigger.adjustWidth(o, n, parseInt(e, 10)); - }), - gd(e, o); - }); - }); - }); - const l = (n, r) => { - d.trigger.startAdjust(), - t.assign(n), - ge(n, "data-initial-" + r, It(n, r)), - Mm(n, bd), - Nt(n, "opacity", "0.2"), - o.go(e.parent()); - }, - c = qm(e.parent(), "mousedown", (e) => { - var t; - (t = e.target), - jm(t, id) && l(e.target, "top"), - ((e) => jm(e, md))(e.target) && l(e.target, "left"); - }), - i = (t) => Re(t, e.view()), - m = qm(e.view(), "mouseover", (t) => { - var r; - ((r = t.target), bt(r, "table", i).filter(Qr)).fold( - () => { - lt(t.target) && dd(e); - }, - (t) => { - o.isActive() && ((n = C.some(t)), gd(e, t)); - }, - ); - }), - d = Jm({ - adjustHeight: Ym(["table", "delta", "row"]), - adjustWidth: Ym(["table", "delta", "column"]), - startAdjust: Ym([]), - }); - return { - destroy: () => { - c.unbind(), m.unbind(), o.destroy(), dd(e); - }, - refresh: (t) => { - gd(e, t); - }, - on: o.on, - off: o.off, - hideBars: w(pd, e), - showBars: w(wd, e), - events: d.registry, - }; - }, - yd = (e, t, o) => { - const n = _n, - r = An, - s = vd(e), - l = Jm({ - beforeResize: Ym(["table", "type"]), - afterResize: Ym(["table", "type"]), - startDrag: Ym([]), - }); - return ( - s.events.adjustHeight.bind((e) => { - const t = e.table; - l.trigger.beforeResize(t, "row"); - ((e, t, o, n) => { - const r = Zo(e), - s = ((e, t, o) => lr(e, t, o, Yn, (e) => e.getOrThunk(Ht)))( - r, - e, - n, - ), - l = E(s, (e, n) => (o === n ? Math.max(t + e, Ht()) : e)), - a = oa(r, l), - c = ((e, t) => - E(e.all, (e, o) => ({ element: e.element, height: t[o] })))( - r, - l, - ); - N(c, (e) => { - $n(e.element, e.height); - }), - N(a, (e) => { - $n(e.element, e.height); - }); - const i = z(l, (e, t) => e + t, 0); - $n(e, i); - })(t, n.delta(e.delta, t), e.row, n), - l.trigger.afterResize(t, "row"); - }), - s.events.startAdjust.bind((e) => { - l.trigger.startDrag(); - }), - s.events.adjustWidth.bind((e) => { - const n = e.table; - l.trigger.beforeResize(n, "col"); - const s = r.delta(e.delta, n), - a = o(n); - ra(n, s, e.column, t, a), l.trigger.afterResize(n, "col"); - }), - { - on: s.on, - off: s.off, - refreshBars: s.refresh, - hideBars: s.hideBars, - showBars: s.showBars, - destroy: s.destroy, - events: l.registry, - } - ); - }, - xd = (e) => m(e) && "TABLE" === e.nodeName, - Cd = "bar-", - Sd = (e) => "false" !== pe(e, "data-mce-resize"), - Td = (e) => { - const t = lm(), - o = lm(), - n = lm(); - let r, s; - const l = (t) => fc(e, t), - a = () => (Pr(e) ? el() : Zs()); - return ( - e.on("init", () => { - const r = ((e, t) => - e.inline - ? ((e, t, o) => ({ - parent: g(t), - view: g(e), - origin: g(bn(0, 0)), - isResizable: o, - }))( - xe.fromDom(e.getBody()), - (() => { - const e = xe.fromTag("div"); - return ( - Bt(e, { - position: "static", - height: "0", - width: "0", - padding: "0", - margin: "0", - border: "0", - }), - Ie(at(xe.fromDom(document)), e), - e - ); - })(), - t, - ) - : ((e, t) => { - const o = me(e) - ? ((e) => xe.fromDom(Ee(e).dom.documentElement))(e) - : e; - return { - parent: g(o), - view: g(e), - origin: g(bn(0, 0)), - isResizable: t, - }; - })(xe.fromDom(e.getDoc()), t))(e, Sd); - if ( - (n.set(r), - ((e) => { - const t = e.options.get("object_resizing"); - return D(t.split(","), "table"); - })(e) && qr(e)) - ) { - const n = a(), - s = yd(r, n, l); - s.on(), - s.events.startDrag.bind((o) => { - t.set(e.selection.getRng()); - }), - s.events.beforeResize.bind((t) => { - const o = t.table.dom; - ((e, t, o, n, r) => { - e.dispatch("ObjectResizeStart", { - target: t, - width: o, - height: n, - origin: r, - }); - })(e, o, ns(o), rs(o), Cd + t.type); - }), - s.events.afterResize.bind((o) => { - const n = o.table, - r = n.dom; - ts(n), - t.on((t) => { - e.selection.setRng(t), e.focus(); - }), - ((e, t, o, n, r) => { - e.dispatch("ObjectResized", { - target: t, - width: o, - height: n, - origin: r, - }); - })(e, r, ns(r), rs(r), Cd + o.type), - e.undoManager.add(); - }), - o.set(s); - } - }), - e.on("ObjectResizeStart", (t) => { - const o = t.target; - if (xd(o)) { - const n = xe.fromDom(o); - N(e.dom.select(".mce-clonedresizable"), (t) => { - e.dom.addClass(t, "mce-" + jr(e) + "-columns"); - }), - !kc(n) && $r(e) ? _c(n) : !Oc(n) && Hr(e) && Bc(n), - Ec(n) && Tt(t.origin, Cd) && Bc(n), - (r = t.width), - (s = Vr(e) - ? "" - : ((e, t) => { - const o = - e.dom.getStyle(t, "width") || e.dom.getAttrib(t, "width"); - return C.from(o).filter(Ot); - })(e, o).getOr("")); - } - }), - e.on("ObjectResized", (t) => { - const o = t.target; - if (xd(o)) { - const n = xe.fromDom(o), - c = t.origin; - Tt(c, "corner-") && - ((t, o, n) => { - const c = Rt(o, "e"); - if (("" === s && Bc(t), n !== r && "" !== s)) { - Nt(t, "width", s); - const o = a(), - i = l(t), - m = Pr(e) || c ? ((e) => tl(e).columns)(t) - 1 : 0; - ra(t, n - r, m, o, i); - } else if (((e) => /^(\d+(\.\d+)?)%$/.test(e))(s)) { - const e = parseFloat(s.replace("%", "")); - Nt(t, "width", (n * e) / r + "%"); - } - ((e) => /^(\d+(\.\d+)?)px$/.test(e))(s) && - ((e) => { - const t = Zo(e); - ln(t) || - N(Ut(e), (e) => { - const t = _t(e, "width"); - Nt(e, "width", t), be(e, "width"); - }); - })(t); - })(n, c, t.width), - ts(n), - ic(e, n.dom, mc); - } - }), - e.on("SwitchMode", () => { - o.on((t) => { - e.mode.isReadOnly() ? t.hideBars() : t.showBars(); - }); - }), - e.on("dragstart dragend", (e) => { - o.on((t) => { - "dragstart" === e.type - ? (t.hideBars(), t.off()) - : (t.on(), t.showBars()); - }); - }), - e.on("remove", () => { - o.on((e) => { - e.destroy(); - }), - n.on((t) => { - ((e, t) => { - e.inline && qe(t.parent()); - })(e, t); - }); - }), - { - refresh: (e) => { - o.on((t) => t.refreshBars(xe.fromDom(e))); - }, - hide: () => { - o.on((e) => e.hideBars()); - }, - show: () => { - o.on((e) => e.showBars()); - }, - } - ); - }, - Rd = (e) => { - ((e) => { - const t = e.options.register; - t("table_clone_elements", { processor: "string[]" }), - t("table_use_colgroups", { processor: "boolean", default: !0 }), - t("table_header_type", { - processor: (e) => { - const t = D(["section", "cells", "sectionCells", "auto"], e); - return t - ? { value: e, valid: t } - : { - valid: !1, - message: - "Must be one of: section, cells, sectionCells or auto.", - }; - }, - default: "section", - }), - t("table_sizing_mode", { processor: "string", default: "auto" }), - t("table_default_attributes", { - processor: "object", - default: { border: "1" }, - }), - t("table_default_styles", { - processor: "object", - default: { "border-collapse": "collapse" }, - }), - t("table_column_resizing", { - processor: (e) => { - const t = D(["preservetable", "resizetable"], e); - return t - ? { value: e, valid: t } - : { - valid: !1, - message: "Must be preservetable, or resizetable.", - }; - }, - default: "preservetable", - }), - t("table_resize_bars", { processor: "boolean", default: !0 }), - t("table_style_by_css", { processor: "boolean", default: !0 }), - t("table_merge_content_on_paste", { - processor: "boolean", - default: !0, - }); - })(e); - const t = Td(e), - o = Km(e, t), - n = gc(e, t, o); - return ( - Xc(e, n), - ((e, t) => { - const o = es(e), - n = (t) => - js(os(e)) - .bind((n) => - Kt(n, o).map((o) => { - const r = Ls(Ps(e), o, n); - return t(o, r); - }), - ) - .getOr(""); - G( - { - mceTableRowType: () => n(t.getTableRowType), - mceTableCellType: () => n(t.getTableCellType), - mceTableColType: () => n(t.getTableColType), - }, - (t, o) => e.addQueryValueHandler(o, t), - ); - })(e, n), - Is(e, n), - { - getSelectedCells: o.getSelectedCells, - clearSelectedCells: o.clearSelectedCells, - } - ); - }; - e.add("dom", (e) => ({ table: Rd(e) })); -})(); diff --git a/src/lib/dist/tinymce/plugins/anchor/plugin.min.js b/src/lib/dist/tinymce/plugins/anchor/plugin.min.js deleted file mode 100644 index 3353d9ee..00000000 --- a/src/lib/dist/tinymce/plugins/anchor/plugin.min.js +++ /dev/null @@ -1,161 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var e = tinymce.util.Tools.resolve("tinymce.PluginManager"), - t = tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"), - o = tinymce.util.Tools.resolve("tinymce.util.Tools"); - const n = - ("allow_html_in_named_anchor", - (e) => e.options.get("allow_html_in_named_anchor")); - const a = "a:not([href])", - r = (e) => !e, - i = (e) => e.getAttribute("id") || e.getAttribute("name") || "", - l = (e) => - ((e) => "a" === e.nodeName.toLowerCase())(e) && - !e.getAttribute("href") && - "" !== i(e), - s = (e) => e.dom.getParent(e.selection.getStart(), a), - d = (e, a) => { - const r = s(e); - r - ? ((e, t, o) => { - o.removeAttribute("name"), - (o.id = t), - e.addVisual(), - e.undoManager.add(); - })(e, a, r) - : ((e, a) => { - e.undoManager.transact(() => { - n(e) || e.selection.collapse(!0), - e.selection.isCollapsed() - ? e.insertContent(e.dom.createHTML("a", { id: a })) - : (((e) => { - const n = e.dom; - t(n).walk(e.selection.getRng(), (e) => { - o.each(e, (e) => { - var t; - l((t = e)) && !t.firstChild && n.remove(e, !1); - }); - }); - })(e), - e.formatter.remove("namedAnchor", void 0, void 0, !0), - e.formatter.apply("namedAnchor", { value: a }), - e.addVisual()); - }); - })(e, a), - e.focus(); - }, - c = (e) => - ((e) => r(e.attr("href")) && !r(e.attr("id") || e.attr("name")))(e) && - !e.firstChild, - m = (e) => (t) => { - for (let o = 0; o < t.length; o++) { - const n = t[o]; - c(n) && n.attr("contenteditable", e); - } - }, - u = (e) => (t) => { - const o = () => { - t.setEnabled(e.selection.isEditable()); - }; - return ( - e.on("NodeChange", o), - o(), - () => { - e.off("NodeChange", o); - } - ); - }; - e.add("anchor", (e) => { - ((e) => { - (0, e.options.register)("allow_html_in_named_anchor", { - processor: "boolean", - default: !1, - }); - })(e), - ((e) => { - e.on("PreInit", () => { - e.parser.addNodeFilter("a", m("false")), - e.serializer.addNodeFilter("a", m(null)); - }); - })(e), - ((e) => { - e.addCommand("mceAnchor", () => { - ((e) => { - const t = ((e) => { - const t = s(e); - return t ? i(t) : ""; - })(e); - e.windowManager.open({ - title: "Anchor", - size: "normal", - body: { - type: "panel", - items: [ - { - name: "id", - type: "input", - label: "ID", - placeholder: "example", - }, - ], - }, - buttons: [ - { type: "cancel", name: "cancel", text: "Cancel" }, - { type: "submit", name: "save", text: "Save", primary: !0 }, - ], - initialData: { id: t }, - onSubmit: (t) => { - ((e, t) => - /^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t) - ? (d(e, t), !0) - : (e.windowManager.alert( - "ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.", - ), - !1))(e, t.getData().id) && t.close(); - }, - }); - })(e); - }); - })(e), - ((e) => { - const t = () => e.execCommand("mceAnchor"); - e.ui.registry.addToggleButton("anchor", { - icon: "bookmark", - tooltip: "Anchor", - onAction: t, - onSetup: (t) => { - const o = e.selection.selectorChangedWithUnbind( - "a:not([href])", - t.setActive, - ).unbind, - n = u(e)(t); - return () => { - o(), n(); - }; - }, - }), - e.ui.registry.addMenuItem("anchor", { - icon: "bookmark", - text: "Anchor...", - onAction: t, - onSetup: u(e), - }); - })(e), - e.on("PreInit", () => { - ((e) => { - e.formatter.register("namedAnchor", { - inline: "a", - selector: a, - remove: "all", - split: !0, - deep: !0, - attributes: { id: "%value" }, - onmatch: (e, t, o) => l(e), - }); - })(e); - }); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/autolink/plugin.min.js b/src/lib/dist/tinymce/plugins/autolink/plugin.min.js deleted file mode 100644 index b376e9ff..00000000 --- a/src/lib/dist/tinymce/plugins/autolink/plugin.min.js +++ /dev/null @@ -1,174 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var e = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const t = (e) => (t) => t.options.get(e), - n = t("autolink_pattern"), - o = t("link_default_target"), - r = t("link_default_protocol"), - a = t("allow_unsafe_link_target"), - s = - ("string", - (e) => - "string" === - ((e) => { - const t = typeof e; - return null === e - ? "null" - : "object" === t && Array.isArray(e) - ? "array" - : "object" === t && - ((n = o = e), - (r = String).prototype.isPrototypeOf(n) || - (null === (a = o.constructor) || void 0 === a - ? void 0 - : a.name) === r.name) - ? "string" - : t; - var n, o, r, a; - })(e)); - const l = (void 0, (e) => undefined === e); - const i = (e) => !((e) => null == e)(e), - c = Object.hasOwnProperty, - d = (e) => "\ufeff" === e; - var u = tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"); - const f = (e) => /^[(\[{ \u00a0]$/.test(e), - g = (e, t, n) => { - for (let o = t - 1; o >= 0; o--) { - const t = e.charAt(o); - if (!d(t) && n(t)) return o; - } - return -1; - }, - m = (e, t) => { - var o; - const a = e.schema.getVoidElements(), - s = n(e), - { dom: i, selection: d } = e; - if (null !== i.getParent(d.getNode(), "a[href]")) return null; - const m = d.getRng(), - k = u(i, (e) => { - return ( - i.isBlock(e) || - ((t = a), (n = e.nodeName.toLowerCase()), c.call(t, n)) || - "false" === i.getContentEditable(e) - ); - var t, n; - }), - { container: p, offset: y } = ((e, t) => { - let n = e, - o = t; - for (; 1 === n.nodeType && n.childNodes[o]; ) - (n = n.childNodes[o]), - (o = 3 === n.nodeType ? n.data.length : n.childNodes.length); - return { container: n, offset: o }; - })(m.endContainer, m.endOffset), - w = - null !== (o = i.getParent(p, i.isBlock)) && void 0 !== o - ? o - : i.getRoot(), - h = k.backwards( - p, - y + t, - (e, t) => { - const n = e.data, - o = g(n, t, ((r = f), (e) => !r(e))); - var r, a; - return -1 === o || ((a = n[o]), /[?!,.;:]/.test(a)) ? o : o + 1; - }, - w, - ); - if (!h) return null; - let v = h.container; - const _ = k.backwards( - h.container, - h.offset, - (e, t) => { - v = e; - const n = g(e.data, t, f); - return -1 === n ? n : n + 1; - }, - w, - ), - A = i.createRng(); - _ ? A.setStart(_.container, _.offset) : A.setStart(v, 0), - A.setEnd(h.container, h.offset); - const C = A.toString() - .replace(/\uFEFF/g, "") - .match(s); - if (C) { - let t = C[0]; - return ( - ($ = "www."), - (b = t).length >= 4 && b.substr(0, 4) === $ - ? (t = r(e) + "://" + t) - : ((e, t, n = 0, o) => { - const r = e.indexOf(t, n); - return -1 !== r && (!!l(o) || r + t.length <= o); - })(t, "@") && - !((e) => /^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(e))(t) && - (t = "mailto:" + t), - { rng: A, url: t } - ); - } - var b, $; - return null; - }, - k = (e, t) => { - const { dom: n, selection: r } = e, - { rng: l, url: i } = t, - c = r.getBookmark(); - r.setRng(l); - const d = "createlink", - u = { command: d, ui: !1, value: i }; - if (!e.dispatch("BeforeExecCommand", u).isDefaultPrevented()) { - e.getDoc().execCommand(d, !1, i), e.dispatch("ExecCommand", u); - const t = o(e); - if (s(t)) { - const o = r.getNode(); - n.setAttrib(o, "target", t), - "_blank" !== t || a(e) || n.setAttrib(o, "rel", "noopener"); - } - } - r.moveToBookmark(c), e.nodeChanged(); - }, - p = (e) => { - const t = m(e, -1); - i(t) && k(e, t); - }, - y = p; - e.add("autolink", (e) => { - ((e) => { - const t = e.options.register; - t("autolink_pattern", { - processor: "regexp", - default: new RegExp( - "^" + - /(?:[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]+))?/g - .source + - "$", - "i", - ), - }), - t("link_default_target", { processor: "string" }), - t("link_default_protocol", { processor: "string", default: "https" }); - })(e), - ((e) => { - e.on("keydown", (t) => { - 13 !== t.keyCode || - t.isDefaultPrevented() || - ((e) => { - const t = m(e, 0); - i(t) && k(e, t); - })(e); - }), - e.on("keyup", (t) => { - 32 === t.keyCode - ? p(e) - : ((48 === t.keyCode && t.shiftKey) || 221 === t.keyCode) && y(e); - }); - })(e); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/autoresize/plugin.min.js b/src/lib/dist/tinymce/plugins/autoresize/plugin.min.js deleted file mode 100644 index 34219304..00000000 --- a/src/lib/dist/tinymce/plugins/autoresize/plugin.min.js +++ /dev/null @@ -1,138 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var e = tinymce.util.Tools.resolve("tinymce.PluginManager"), - t = tinymce.util.Tools.resolve("tinymce.Env"); - const o = (e) => (t) => t.options.get(e), - s = o("min_height"), - i = o("max_height"), - n = o("autoresize_overflow_padding"), - r = o("autoresize_bottom_margin"), - l = (e, t) => { - const o = e.getBody(); - o && ((o.style.overflowY = t ? "" : "hidden"), t || (o.scrollTop = 0)); - }, - g = (e, t, o, s) => { - var i; - const n = parseInt( - null !== (i = e.getStyle(t, o, s)) && void 0 !== i ? i : "", - 10, - ); - return isNaN(n) ? 0 : n; - }, - a = (e, o, r, c) => { - var d; - const f = e.dom, - u = e.getDoc(); - if (!u) return; - if ( - ((e) => e.plugins.fullscreen && e.plugins.fullscreen.isFullscreen())(e) - ) - return void l(e, !0); - const m = u.documentElement, - h = c ? c() : n(e), - p = - null !== (d = s(e)) && void 0 !== d ? d : e.getElement().offsetHeight; - let y = p; - const S = g(f, m, "margin-top", !0), - v = g(f, m, "margin-bottom", !0); - let C = m.offsetHeight + S + v + h; - C < 0 && (C = 0); - const b = - e.getContainer().offsetHeight - - e.getContentAreaContainer().offsetHeight; - C + b > p && (y = C + b); - const w = i(e); - if ((w && y > w ? ((y = w), l(e, !0)) : l(e, !1), y !== o.get())) { - const s = y - o.get(); - if ( - (f.setStyle(e.getContainer(), "height", y + "px"), - o.set(y), - ((e) => { - e.dispatch("ResizeEditor"); - })(e), - t.browser.isSafari() && (t.os.isMacOS() || t.os.isiOS())) - ) { - const t = e.getWin(); - t.scrollTo(t.pageXOffset, t.pageYOffset); - } - e.hasFocus() && - ((e) => { - if ("setcontent" === (null == e ? void 0 : e.type.toLowerCase())) { - const t = e; - return !0 === t.selection || !0 === t.paste; - } - return !1; - })(r) && - e.selection.scrollIntoView(), - (t.browser.isSafari() || t.browser.isChromium()) && - s < 0 && - a(e, o, r, c); - } - }; - e.add("autoresize", (e) => { - if ( - (((e) => { - const t = e.options.register; - t("autoresize_overflow_padding", { processor: "number", default: 1 }), - t("autoresize_bottom_margin", { processor: "number", default: 50 }); - })(e), - e.options.isSet("resize") || e.options.set("resize", !1), - !e.inline) - ) { - const o = ((e) => { - let t = 0; - return { - get: () => t, - set: (e) => { - t = e; - }, - }; - })(); - ((e, t) => { - e.addCommand("mceAutoResize", () => { - a(e, t); - }); - })(e, o), - ((e, o) => { - let s, - i, - l = () => r(e); - e.on("init", (i) => { - s = 0; - const r = n(e), - g = e.dom; - g.setStyles(e.getDoc().documentElement, { height: "auto" }), - t.browser.isEdge() || t.browser.isIE() - ? g.setStyles(e.getBody(), { - paddingLeft: r, - paddingRight: r, - "min-height": 0, - }) - : g.setStyles(e.getBody(), { paddingLeft: r, paddingRight: r }), - a(e, o, i, l), - (s += 1); - }), - e.on( - "NodeChange SetContent keyup FullscreenStateChanged ResizeContent", - (t) => { - if (1 === s) - (i = e.getContainer().offsetHeight), a(e, o, t, l), (s += 1); - else if (2 === s) { - const t = i < e.getContainer().offsetHeight; - if (t) { - const t = e.dom, - o = e.getDoc(); - t.setStyles(o.documentElement, { "min-height": 0 }), - t.setStyles(e.getBody(), { "min-height": "inherit" }); - } - (l = t ? (0, () => 0) : l), (s += 1); - } else a(e, o, t, l); - }, - ); - })(e, o); - } - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/autosave/plugin.min.js b/src/lib/dist/tinymce/plugins/autosave/plugin.min.js deleted file mode 100644 index da76b458..00000000 --- a/src/lib/dist/tinymce/plugins/autosave/plugin.min.js +++ /dev/null @@ -1,191 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var t = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const e = - ("string", - (t) => - "string" === - ((t) => { - const e = typeof t; - return null === t - ? "null" - : "object" === e && Array.isArray(t) - ? "array" - : "object" === e && - ((r = o = t), - (a = String).prototype.isPrototypeOf(r) || - (null === (s = o.constructor) || void 0 === s - ? void 0 - : s.name) === a.name) - ? "string" - : e; - var r, o, a, s; - })(t)); - const r = (void 0, (t) => undefined === t); - var o = tinymce.util.Tools.resolve("tinymce.util.Delay"), - a = tinymce.util.Tools.resolve("tinymce.util.LocalStorage"), - s = tinymce.util.Tools.resolve("tinymce.util.Tools"); - const n = (t) => { - const e = /^(\d+)([ms]?)$/.exec(t); - return (e && e[2] ? { s: 1e3, m: 6e4 }[e[2]] : 1) * parseInt(t, 10); - }, - i = (t) => (e) => e.options.get(t), - u = i("autosave_ask_before_unload"), - l = i("autosave_restore_when_empty"), - c = i("autosave_interval"), - d = i("autosave_retention"), - m = (t) => { - const e = document.location; - return t.options - .get("autosave_prefix") - .replace(/{path}/g, e.pathname) - .replace(/{query}/g, e.search) - .replace(/{hash}/g, e.hash) - .replace(/{id}/g, t.id); - }, - v = (t, e) => { - if (r(e)) return t.dom.isEmpty(t.getBody()); - { - const r = s.trim(e); - if ("" === r) return !0; - { - const e = new DOMParser().parseFromString(r, "text/html"); - return t.dom.isEmpty(e); - } - } - }, - f = (t) => { - var e; - const r = - parseInt( - null !== (e = a.getItem(m(t) + "time")) && void 0 !== e ? e : "0", - 10, - ) || 0; - return !(new Date().getTime() - r > d(t) && (p(t, !1), 1)); - }, - p = (t, e) => { - const r = m(t); - a.removeItem(r + "draft"), - a.removeItem(r + "time"), - !1 !== e && - ((t) => { - t.dispatch("RemoveDraft"); - })(t); - }, - g = (t) => { - const e = m(t); - !v(t) && - t.isDirty() && - (a.setItem(e + "draft", t.getContent({ format: "raw", no_events: !0 })), - a.setItem(e + "time", new Date().getTime().toString()), - ((t) => { - t.dispatch("StoreDraft"); - })(t)); - }, - y = (t) => { - var e; - const r = m(t); - f(t) && - (t.setContent( - null !== (e = a.getItem(r + "draft")) && void 0 !== e ? e : "", - { format: "raw" }, - ), - ((t) => { - t.dispatch("RestoreDraft"); - })(t)); - }; - var D = tinymce.util.Tools.resolve("tinymce.EditorManager"); - const h = (t) => (e) => { - e.setEnabled(f(t)); - const r = () => e.setEnabled(f(t)); - return ( - t.on("StoreDraft RestoreDraft RemoveDraft", r), - () => t.off("StoreDraft RestoreDraft RemoveDraft", r) - ); - }; - t.add( - "autosave", - (t) => ( - ((t) => { - const r = t.options.register, - o = (t) => { - const r = e(t); - return r - ? { value: n(t), valid: r } - : { valid: !1, message: "Must be a string." }; - }; - r("autosave_ask_before_unload", { processor: "boolean", default: !0 }), - r("autosave_prefix", { - processor: "string", - default: "tinymce-autosave-{path}{query}{hash}-{id}-", - }), - r("autosave_restore_when_empty", { - processor: "boolean", - default: !1, - }), - r("autosave_interval", { processor: o, default: "30s" }), - r("autosave_retention", { processor: o, default: "20m" }); - })(t), - ((t) => { - t.editorManager.on("BeforeUnload", (t) => { - let e; - s.each(D.get(), (t) => { - t.plugins.autosave && t.plugins.autosave.storeDraft(), - !e && - t.isDirty() && - u(t) && - (e = t.translate( - "You have unsaved changes are you sure you want to navigate away?", - )); - }), - e && (t.preventDefault(), (t.returnValue = e)); - }); - })(t), - ((t) => { - ((t) => { - const e = c(t); - o.setEditorInterval( - t, - () => { - g(t); - }, - e, - ); - })(t); - const e = () => { - ((t) => { - t.undoManager.transact(() => { - y(t), p(t); - }), - t.focus(); - })(t); - }; - t.ui.registry.addButton("restoredraft", { - tooltip: "Restore last draft", - icon: "restore-draft", - onAction: e, - onSetup: h(t), - }), - t.ui.registry.addMenuItem("restoredraft", { - text: "Restore last draft", - icon: "restore-draft", - onAction: e, - onSetup: h(t), - }); - })(t), - t.on("init", () => { - l(t) && t.dom.isEmpty(t.getBody()) && y(t); - }), - ((t) => ({ - hasDraft: () => f(t), - storeDraft: () => g(t), - restoreDraft: () => y(t), - removeDraft: (e) => p(t, e), - isEmpty: (e) => v(t, e), - }))(t) - ), - ); -})(); diff --git a/src/lib/dist/tinymce/plugins/code/plugin.min.js b/src/lib/dist/tinymce/plugins/code/plugin.min.js deleted file mode 100644 index a88e87ef..00000000 --- a/src/lib/dist/tinymce/plugins/code/plugin.min.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - tinymce.util.Tools.resolve("tinymce.PluginManager").add( - "code", - (e) => ( - ((e) => { - e.addCommand("mceCodeEditor", () => { - ((e) => { - const o = ((e) => e.getContent({ source_view: !0 }))(e); - e.windowManager.open({ - title: "Source Code", - size: "large", - body: { - type: "panel", - items: [{ type: "textarea", name: "code" }], - }, - buttons: [ - { type: "cancel", name: "cancel", text: "Cancel" }, - { type: "submit", name: "save", text: "Save", primary: !0 }, - ], - initialData: { code: o }, - onSubmit: (o) => { - ((e, o) => { - e.focus(), - e.undoManager.transact(() => { - e.setContent(o); - }), - e.selection.setCursorLocation(), - e.nodeChanged(); - })(e, o.getData().code), - o.close(); - }, - }); - })(e); - }); - })(e), - ((e) => { - const o = () => e.execCommand("mceCodeEditor"); - e.ui.registry.addButton("code", { - icon: "sourcecode", - tooltip: "Source code", - onAction: o, - }), - e.ui.registry.addMenuItem("code", { - icon: "sourcecode", - text: "Source code", - onAction: o, - }); - })(e), - {} - ), - ); -})(); diff --git a/src/lib/dist/tinymce/plugins/codesample/plugin.min.js b/src/lib/dist/tinymce/plugins/codesample/plugin.min.js deleted file mode 100644 index 14472c8a..00000000 --- a/src/lib/dist/tinymce/plugins/codesample/plugin.min.js +++ /dev/null @@ -1,2274 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var e = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const t = (e) => !((e) => null == e)(e), - n = () => {}; - class a { - constructor(e, t) { - (this.tag = e), (this.value = t); - } - static some(e) { - return new a(!0, e); - } - static none() { - return a.singletonNone; - } - fold(e, t) { - return this.tag ? t(this.value) : e(); - } - isSome() { - return this.tag; - } - isNone() { - return !this.tag; - } - map(e) { - return this.tag ? a.some(e(this.value)) : a.none(); - } - bind(e) { - return this.tag ? e(this.value) : a.none(); - } - exists(e) { - return this.tag && e(this.value); - } - forall(e) { - return !this.tag || e(this.value); - } - filter(e) { - return !this.tag || e(this.value) ? this : a.none(); - } - getOr(e) { - return this.tag ? this.value : e; - } - or(e) { - return this.tag ? this : e; - } - getOrThunk(e) { - return this.tag ? this.value : e(); - } - orThunk(e) { - return this.tag ? this : e(); - } - getOrDie(e) { - if (this.tag) return this.value; - throw new Error(null != e ? e : "Called getOrDie on None"); - } - static from(e) { - return t(e) ? a.some(e) : a.none(); - } - getOrNull() { - return this.tag ? this.value : null; - } - getOrUndefined() { - return this.value; - } - each(e) { - this.tag && e(this.value); - } - toArray() { - return this.tag ? [this.value] : []; - } - toString() { - return this.tag ? `some(${this.value})` : "none()"; - } - } - a.singletonNone = new a(!1); - var s = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"); - const r = "undefined" != typeof window ? window : Function("return this;")(), - i = (function (e, t, n) { - const a = window.Prism; - window.Prism = { manual: !0 }; - var s = (function (e) { - var t = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, - n = 0, - a = {}, - s = { - manual: e.Prism && e.Prism.manual, - disableWorkerMessageHandler: - e.Prism && e.Prism.disableWorkerMessageHandler, - util: { - encode: function e(t) { - return t instanceof r - ? new r(t.type, e(t.content), t.alias) - : Array.isArray(t) - ? t.map(e) - : t - .replace(/&/g, "&") - .replace(/= d.reach); - x += _.value.length, _ = _.next - ) { - var F = _.value; - if (t.length > e.length) return; - if (!(F instanceof r)) { - var A, - S = 1; - if (y) { - if (!(A = i(v, x, e, m)) || A.index >= e.length) break; - var $ = A.index, - z = A.index + A[0].length, - E = x; - for (E += _.value.length; $ >= E; ) - E += (_ = _.next).value.length; - if (((x = E -= _.value.length), _.value instanceof r)) - continue; - for ( - var C = _; - C !== t.tail && (E < z || "string" == typeof C.value); - C = C.next - ) - S++, (E += C.value.length); - S--, (F = e.slice(x, E)), (A.index -= x); - } else if (!(A = i(v, 0, F, m))) continue; - $ = A.index; - var j = A[0], - B = F.slice(0, $), - T = F.slice($ + j.length), - O = x + F.length; - d && O > d.reach && (d.reach = O); - var P = _.prev; - if ( - (B && ((P = u(t, P, B)), (x += B.length)), - c(t, P, S), - (_ = u(t, P, new r(g, f ? s.tokenize(j, f) : j, w, j))), - T && u(t, _, T), - S > 1) - ) { - var N = { cause: g + "," + b, reach: O }; - o(e, t, n, _.prev, x, N), - d && N.reach > d.reach && (d.reach = N.reach); - } - } - } - } - } - } - function l() { - var e = { value: null, prev: null, next: null }, - t = { value: null, prev: e, next: null }; - (e.next = t), (this.head = e), (this.tail = t), (this.length = 0); - } - function u(e, t, n) { - var a = t.next, - s = { value: n, prev: t, next: a }; - return (t.next = s), (a.prev = s), e.length++, s; - } - function c(e, t, n) { - for (var a = t.next, s = 0; s < n && a !== e.tail; s++) a = a.next; - (t.next = a), (a.prev = t), (e.length -= s); - } - if ( - ((e.Prism = s), - (r.stringify = function e(t, n) { - if ("string" == typeof t) return t; - if (Array.isArray(t)) { - var a = ""; - return ( - t.forEach(function (t) { - a += e(t, n); - }), - a - ); - } - var r = { - type: t.type, - content: e(t.content, n), - tag: "span", - classes: ["token", t.type], - attributes: {}, - language: n, - }, - i = t.alias; - i && - (Array.isArray(i) - ? Array.prototype.push.apply(r.classes, i) - : r.classes.push(i)), - s.hooks.run("wrap", r); - var o = ""; - for (var l in r.attributes) - o += - " " + - l + - '="' + - (r.attributes[l] || "").replace(/"/g, """) + - '"'; - return ( - "<" + - r.tag + - ' class="' + - r.classes.join(" ") + - '"' + - o + - ">" + - r.content + - "" - ); - }), - !e.document) - ) - return e.addEventListener - ? (s.disableWorkerMessageHandler || - e.addEventListener( - "message", - function (t) { - var n = JSON.parse(t.data), - a = n.language, - r = n.code, - i = n.immediateClose; - e.postMessage(s.highlight(r, s.languages[a], a)), - i && e.close(); - }, - !1, - ), - s) - : s; - var d = s.util.currentScript(); - function g() { - s.manual || s.highlightAll(); - } - if ( - (d && - ((s.filename = d.src), - d.hasAttribute("data-manual") && (s.manual = !0)), - !s.manual) - ) { - var p = document.readyState; - "loading" === p || ("interactive" === p && d && d.defer) - ? document.addEventListener("DOMContentLoaded", g) - : window.requestAnimationFrame - ? window.requestAnimationFrame(g) - : window.setTimeout(g, 16); - } - return s; - })( - "undefined" != typeof window - ? window - : "undefined" != typeof WorkerGlobalScope && - self instanceof WorkerGlobalScope - ? self - : {}, - ); - return ( - (s.languages.clike = { - comment: [ - { - pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, - lookbehind: !0, - greedy: !0, - }, - { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }, - ], - string: { - pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, - greedy: !0, - }, - "class-name": { - pattern: - /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, - lookbehind: !0, - inside: { punctuation: /[.\\]/ }, - }, - keyword: - /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, - boolean: /\b(?:false|true)\b/, - function: /\b\w+(?=\()/, - number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, - operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, - punctuation: /[{}[\];(),.:]/, - }), - (function (e) { - function t(e, t) { - return "___" + e.toUpperCase() + t + "___"; - } - Object.defineProperties((e.languages["markup-templating"] = {}), { - buildPlaceholders: { - value: function (n, a, s, r) { - if (n.language === a) { - var i = (n.tokenStack = []); - (n.code = n.code.replace(s, function (e) { - if ("function" == typeof r && !r(e)) return e; - for ( - var s, o = i.length; - -1 !== n.code.indexOf((s = t(a, o))); - - ) - ++o; - return (i[o] = e), s; - })), - (n.grammar = e.languages.markup); - } - }, - }, - tokenizePlaceholders: { - value: function (n, a) { - if (n.language === a && n.tokenStack) { - n.grammar = e.languages[a]; - var s = 0, - r = Object.keys(n.tokenStack); - !(function i(o) { - for (var l = 0; l < o.length && !(s >= r.length); l++) { - var u = o[l]; - if ( - "string" == typeof u || - (u.content && "string" == typeof u.content) - ) { - var c = r[s], - d = n.tokenStack[c], - g = "string" == typeof u ? u : u.content, - p = t(a, c), - b = g.indexOf(p); - if (b > -1) { - ++s; - var h = g.substring(0, b), - f = new e.Token( - a, - e.tokenize(d, n.grammar), - "language-" + a, - d, - ), - m = g.substring(b + p.length), - y = []; - h && y.push.apply(y, i([h])), - y.push(f), - m && y.push.apply(y, i([m])), - "string" == typeof u - ? o.splice.apply(o, [l, 1].concat(y)) - : (u.content = y); - } - } else u.content && i(u.content); - } - return o; - })(n.tokens); - } - }, - }, - }); - })(s), - (s.languages.c = s.languages.extend("clike", { - comment: { - pattern: - /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/, - greedy: !0, - }, - string: { - pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, - greedy: !0, - }, - "class-name": { - pattern: - /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/, - lookbehind: !0, - }, - keyword: - /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/, - function: /\b[a-z_]\w*(?=\s*\()/i, - number: - /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i, - operator: />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/, - })), - s.languages.insertBefore("c", "string", { - char: { - pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/, - greedy: !0, - }, - }), - s.languages.insertBefore("c", "string", { - macro: { - pattern: - /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im, - lookbehind: !0, - greedy: !0, - alias: "property", - inside: { - string: [ - { pattern: /^(#\s*include\s*)<[^>]+>/, lookbehind: !0 }, - s.languages.c.string, - ], - char: s.languages.c.char, - comment: s.languages.c.comment, - "macro-name": [ - { pattern: /(^#\s*define\s+)\w+\b(?!\()/i, lookbehind: !0 }, - { - pattern: /(^#\s*define\s+)\w+\b(?=\()/i, - lookbehind: !0, - alias: "function", - }, - ], - directive: { - pattern: /^(#\s*)[a-z]+/, - lookbehind: !0, - alias: "keyword", - }, - "directive-hash": /^#/, - punctuation: /##|\\(?=[\r\n])/, - expression: { pattern: /\S[\s\S]*/, inside: s.languages.c }, - }, - }, - }), - s.languages.insertBefore("c", "function", { - constant: - /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/, - }), - delete s.languages.c.boolean, - (function (e) { - var t = - /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, - n = /\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace( - //g, - function () { - return t.source; - }, - ); - (e.languages.cpp = e.languages.extend("c", { - "class-name": [ - { - pattern: RegExp( - /(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace( - //g, - function () { - return t.source; - }, - ), - ), - lookbehind: !0, - }, - /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, - /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i, - /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/, - ], - keyword: t, - number: { - pattern: - /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i, - greedy: !0, - }, - operator: - />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/, - boolean: /\b(?:false|true)\b/, - })), - e.languages.insertBefore("cpp", "string", { - module: { - pattern: RegExp( - /(\b(?:import|module)\s+)/.source + - "(?:" + - /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source + - "|" + - /(?:\s*:\s*)?|:\s*/.source.replace( - //g, - function () { - return n; - }, - ) + - ")", - ), - lookbehind: !0, - greedy: !0, - inside: { - string: /^[<"][\s\S]+/, - operator: /:/, - punctuation: /\./, - }, - }, - "raw-string": { - pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/, - alias: "string", - greedy: !0, - }, - }), - e.languages.insertBefore("cpp", "keyword", { - "generic-function": { - pattern: - /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i, - inside: { - function: /^\w+/, - generic: { - pattern: /<[\s\S]+/, - alias: "class-name", - inside: e.languages.cpp, - }, - }, - }, - }), - e.languages.insertBefore("cpp", "operator", { - "double-colon": { pattern: /::/, alias: "punctuation" }, - }), - e.languages.insertBefore("cpp", "class-name", { - "base-clause": { - pattern: - /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/, - lookbehind: !0, - greedy: !0, - inside: e.languages.extend("cpp", {}), - }, - }), - e.languages.insertBefore( - "inside", - "double-colon", - { "class-name": /\b[a-z_]\w*\b(?!\s*::)/i }, - e.languages.cpp["base-clause"], - ); - })(s), - (function (e) { - function t(e, t) { - return e.replace(/<<(\d+)>>/g, function (e, n) { - return "(?:" + t[+n] + ")"; - }); - } - function n(e, n, a) { - return RegExp(t(e, n), a || ""); - } - function a(e, t) { - for (var n = 0; n < t; n++) - e = e.replace(/<>/g, function () { - return "(?:" + e + ")"; - }); - return e.replace(/<>/g, "[^\\s\\S]"); - } - var s = - "bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void", - r = "class enum interface record struct", - i = - "add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)", - o = - "abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"; - function l(e) { - return "\\b(?:" + e.trim().replace(/ /g, "|") + ")\\b"; - } - var u = l(r), - c = RegExp(l(s + " " + r + " " + i + " " + o)), - d = l(r + " " + i + " " + o), - g = l(s + " " + r + " " + o), - p = a(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source, 2), - b = a(/\((?:[^()]|<>)*\)/.source, 2), - h = /@?\b[A-Za-z_]\w*\b/.source, - f = t(/<<0>>(?:\s*<<1>>)?/.source, [h, p]), - m = t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [d, f]), - y = /\[\s*(?:,\s*)*\]/.source, - w = t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source, [m, y]), - k = t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source, [p, b, y]), - v = t(/\(<<0>>+(?:,<<0>>+)+\)/.source, [k]), - _ = t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source, [ - v, - m, - y, - ]), - x = { keyword: c, punctuation: /[<>()?,.:[\]]/ }, - F = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source, - A = /"(?:\\.|[^\\"\r\n])*"/.source, - S = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source; - (e.languages.csharp = e.languages.extend("clike", { - string: [ - { - pattern: n(/(^|[^$\\])<<0>>/.source, [S]), - lookbehind: !0, - greedy: !0, - }, - { - pattern: n(/(^|[^@$\\])<<0>>/.source, [A]), - lookbehind: !0, - greedy: !0, - }, - ], - "class-name": [ - { - pattern: n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [m]), - lookbehind: !0, - inside: x, - }, - { - pattern: n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [ - h, - _, - ]), - lookbehind: !0, - inside: x, - }, - { - pattern: n(/(\busing\s+)<<0>>(?=\s*=)/.source, [h]), - lookbehind: !0, - }, - { - pattern: n(/(\b<<0>>\s+)<<1>>/.source, [u, f]), - lookbehind: !0, - inside: x, - }, - { - pattern: n(/(\bcatch\s*\(\s*)<<0>>/.source, [m]), - lookbehind: !0, - inside: x, - }, - { pattern: n(/(\bwhere\s+)<<0>>/.source, [h]), lookbehind: !0 }, - { - pattern: n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [w]), - lookbehind: !0, - inside: x, - }, - { - pattern: n( - /\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/ - .source, - [_, g, h], - ), - inside: x, - }, - ], - keyword: c, - number: - /(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i, - operator: />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/, - punctuation: /\?\.?|::|[{}[\];(),.:]/, - })), - e.languages.insertBefore("csharp", "number", { - range: { pattern: /\.\./, alias: "operator" }, - }), - e.languages.insertBefore("csharp", "punctuation", { - "named-parameter": { - pattern: n(/([(,]\s*)<<0>>(?=\s*:)/.source, [h]), - lookbehind: !0, - alias: "punctuation", - }, - }), - e.languages.insertBefore("csharp", "class-name", { - namespace: { - pattern: n( - /(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/ - .source, - [h], - ), - lookbehind: !0, - inside: { punctuation: /\./ }, - }, - "type-expression": { - pattern: n( - /(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/ - .source, - [b], - ), - lookbehind: !0, - alias: "class-name", - inside: x, - }, - "return-type": { - pattern: n( - /<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/ - .source, - [_, m], - ), - inside: x, - alias: "class-name", - }, - "constructor-invocation": { - pattern: n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [_]), - lookbehind: !0, - inside: x, - alias: "class-name", - }, - "generic-method": { - pattern: n(/<<0>>\s*<<1>>(?=\s*\()/.source, [h, p]), - inside: { - function: n(/^<<0>>/.source, [h]), - generic: { - pattern: RegExp(p), - alias: "class-name", - inside: x, - }, - }, - }, - "type-list": { - pattern: n( - /\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/ - .source, - [u, f, h, _, c.source, b, /\bnew\s*\(\s*\)/.source], - ), - lookbehind: !0, - inside: { - "record-arguments": { - pattern: n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source, [f, b]), - lookbehind: !0, - greedy: !0, - inside: e.languages.csharp, - }, - keyword: c, - "class-name": { pattern: RegExp(_), greedy: !0, inside: x }, - punctuation: /[,()]/, - }, - }, - preprocessor: { - pattern: /(^[\t ]*)#.*/m, - lookbehind: !0, - alias: "property", - inside: { - directive: { - pattern: - /(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/, - lookbehind: !0, - alias: "keyword", - }, - }, - }, - }); - var $ = A + "|" + F, - z = t( - /\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/ - .source, - [$], - ), - E = a(t(/[^"'/()]|<<0>>|\(<>*\)/.source, [z]), 2), - C = - /\b(?:assembly|event|field|method|module|param|property|return|type)\b/ - .source, - j = t(/<<0>>(?:\s*\(<<1>>*\))?/.source, [m, E]); - e.languages.insertBefore("csharp", "class-name", { - attribute: { - pattern: n( - /((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/ - .source, - [C, j], - ), - lookbehind: !0, - greedy: !0, - inside: { - target: { - pattern: n(/^<<0>>(?=\s*:)/.source, [C]), - alias: "keyword", - }, - "attribute-arguments": { - pattern: n(/\(<<0>>*\)/.source, [E]), - inside: e.languages.csharp, - }, - "class-name": { - pattern: RegExp(m), - inside: { punctuation: /\./ }, - }, - punctuation: /[:,]/, - }, - }, - }); - var B = /:[^}\r\n]+/.source, - T = a(t(/[^"'/()]|<<0>>|\(<>*\)/.source, [z]), 2), - O = t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [T, B]), - P = a( - t( - /[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/ - .source, - [$], - ), - 2, - ), - N = t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [P, B]); - function R(t, a) { - return { - interpolation: { - pattern: n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [t]), - lookbehind: !0, - inside: { - "format-string": { - pattern: n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [ - a, - B, - ]), - lookbehind: !0, - inside: { punctuation: /^:/ }, - }, - punctuation: /^\{|\}$/, - expression: { - pattern: /[\s\S]+/, - alias: "language-csharp", - inside: e.languages.csharp, - }, - }, - }, - string: /[\s\S]+/, - }; - } - e.languages.insertBefore("csharp", "string", { - "interpolation-string": [ - { - pattern: n( - /(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/ - .source, - [O], - ), - lookbehind: !0, - greedy: !0, - inside: R(O, T), - }, - { - pattern: n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [ - N, - ]), - lookbehind: !0, - greedy: !0, - inside: R(N, P), - }, - ], - char: { pattern: RegExp(F), greedy: !0 }, - }), - (e.languages.dotnet = e.languages.cs = e.languages.csharp); - })(s), - (function (e) { - var t = - /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/; - (e.languages.css = { - comment: /\/\*[\s\S]*?\*\//, - atrule: { - pattern: RegExp( - "@[\\w-](?:" + - /[^;{\s"']|\s+(?!\s)/.source + - "|" + - t.source + - ")*?" + - /(?:;|(?=\s*\{))/.source, - ), - inside: { - rule: /^@[\w-]+/, - "selector-function-argument": { - pattern: - /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/, - lookbehind: !0, - alias: "selector", - }, - keyword: { - pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/, - lookbehind: !0, - }, - }, - }, - url: { - pattern: RegExp( - "\\burl\\((?:" + - t.source + - "|" + - /(?:[^\\\r\n()"']|\\[\s\S])*/.source + - ")\\)", - "i", - ), - greedy: !0, - inside: { - function: /^url/i, - punctuation: /^\(|\)$/, - string: { pattern: RegExp("^" + t.source + "$"), alias: "url" }, - }, - }, - selector: { - pattern: RegExp( - "(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|" + - t.source + - ")*(?=\\s*\\{)", - ), - lookbehind: !0, - }, - string: { pattern: t, greedy: !0 }, - property: { - pattern: - /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i, - lookbehind: !0, - }, - important: /!important\b/i, - function: { - pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i, - lookbehind: !0, - }, - punctuation: /[(){};:,]/, - }), - (e.languages.css.atrule.inside.rest = e.languages.css); - var n = e.languages.markup; - n && - (n.tag.addInlined("style", "css"), - n.tag.addAttribute("style", "css")); - })(s), - (function (e) { - var t = - /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, - n = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, - a = { - pattern: RegExp( - /(^|[^\w.])/.source + - n + - /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source, - ), - lookbehind: !0, - inside: { - namespace: { - pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/, - inside: { punctuation: /\./ }, - }, - punctuation: /\./, - }, - }; - (e.languages.java = e.languages.extend("clike", { - string: { - pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/, - lookbehind: !0, - greedy: !0, - }, - "class-name": [ - a, - { - pattern: RegExp( - /(^|[^\w.])/.source + - n + - /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/ - .source, - ), - lookbehind: !0, - inside: a.inside, - }, - { - pattern: RegExp( - /(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/ - .source + - n + - /[A-Z]\w*\b/.source, - ), - lookbehind: !0, - inside: a.inside, - }, - ], - keyword: t, - function: [ - e.languages.clike.function, - { pattern: /(::\s*)[a-z_]\w*/, lookbehind: !0 }, - ], - number: - /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i, - operator: { - pattern: - /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m, - lookbehind: !0, - }, - constant: /\b[A-Z][A-Z_\d]+\b/, - })), - e.languages.insertBefore("java", "string", { - "triple-quoted-string": { - pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/, - greedy: !0, - alias: "string", - }, - char: { pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/, greedy: !0 }, - }), - e.languages.insertBefore("java", "class-name", { - annotation: { - pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/, - lookbehind: !0, - alias: "punctuation", - }, - generics: { - pattern: - /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/, - inside: { - "class-name": a, - keyword: t, - punctuation: /[<>(),.:]/, - operator: /[?&|]/, - }, - }, - import: [ - { - pattern: RegExp( - /(\bimport\s+)/.source + - n + - /(?:[A-Z]\w*|\*)(?=\s*;)/.source, - ), - lookbehind: !0, - inside: { - namespace: a.inside.namespace, - punctuation: /\./, - operator: /\*/, - "class-name": /\w+/, - }, - }, - { - pattern: RegExp( - /(\bimport\s+static\s+)/.source + - n + - /(?:\w+|\*)(?=\s*;)/.source, - ), - lookbehind: !0, - alias: "static", - inside: { - namespace: a.inside.namespace, - static: /\b\w+$/, - punctuation: /\./, - operator: /\*/, - "class-name": /\w+/, - }, - }, - ], - namespace: { - pattern: RegExp( - /(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace( - //g, - function () { - return t.source; - }, - ), - ), - lookbehind: !0, - inside: { punctuation: /\./ }, - }, - }); - })(s), - (s.languages.javascript = s.languages.extend("clike", { - "class-name": [ - s.languages.clike["class-name"], - { - pattern: - /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, - lookbehind: !0, - }, - ], - keyword: [ - { pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 }, - { - pattern: - /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, - lookbehind: !0, - }, - ], - function: - /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, - number: { - pattern: RegExp( - /(^|[^\w$])/.source + - "(?:" + - /NaN|Infinity/.source + - "|" + - /0[bB][01]+(?:_[01]+)*n?/.source + - "|" + - /0[oO][0-7]+(?:_[0-7]+)*n?/.source + - "|" + - /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + - "|" + - /\d+(?:_\d+)*n/.source + - "|" + - /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/ - .source + - ")" + - /(?![\w$])/.source, - ), - lookbehind: !0, - }, - operator: - /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/, - })), - (s.languages.javascript["class-name"][0].pattern = - /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/), - s.languages.insertBefore("javascript", "keyword", { - regex: { - pattern: RegExp( - /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + - /\//.source + - "(?:" + - /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/ - .source + - "|" + - /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/ - .source + - ")" + - /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/ - .source, - ), - lookbehind: !0, - greedy: !0, - inside: { - "regex-source": { - pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, - lookbehind: !0, - alias: "language-regex", - inside: s.languages.regex, - }, - "regex-delimiter": /^\/|\/$/, - "regex-flags": /^[a-z]+$/, - }, - }, - "function-variable": { - pattern: - /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, - alias: "function", - }, - parameter: [ - { - pattern: - /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, - lookbehind: !0, - inside: s.languages.javascript, - }, - { - pattern: - /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, - lookbehind: !0, - inside: s.languages.javascript, - }, - { - pattern: - /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, - lookbehind: !0, - inside: s.languages.javascript, - }, - { - pattern: - /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, - lookbehind: !0, - inside: s.languages.javascript, - }, - ], - constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/, - }), - s.languages.insertBefore("javascript", "string", { - hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" }, - "template-string": { - pattern: - /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, - greedy: !0, - inside: { - "template-punctuation": { pattern: /^`|`$/, alias: "string" }, - interpolation: { - pattern: - /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, - lookbehind: !0, - inside: { - "interpolation-punctuation": { - pattern: /^\$\{|\}$/, - alias: "punctuation", - }, - rest: s.languages.javascript, - }, - }, - string: /[\s\S]+/, - }, - }, - "string-property": { - pattern: - /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, - lookbehind: !0, - greedy: !0, - alias: "property", - }, - }), - s.languages.insertBefore("javascript", "operator", { - "literal-property": { - pattern: - /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, - lookbehind: !0, - alias: "property", - }, - }), - s.languages.markup && - (s.languages.markup.tag.addInlined("script", "javascript"), - s.languages.markup.tag.addAttribute( - /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/ - .source, - "javascript", - )), - (s.languages.js = s.languages.javascript), - (s.languages.markup = { - comment: { pattern: //, greedy: !0 }, - prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 }, - doctype: { - pattern: - /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i, - greedy: !0, - inside: { - "internal-subset": { - pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, - lookbehind: !0, - greedy: !0, - inside: null, - }, - string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 }, - punctuation: /^$|[[\]]/, - "doctype-tag": /^DOCTYPE/i, - name: /[^\s<>'"]+/, - }, - }, - cdata: { pattern: //i, greedy: !0 }, - tag: { - pattern: - /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, - greedy: !0, - inside: { - tag: { - pattern: /^<\/?[^\s>\/]+/, - inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ }, - }, - "special-attr": [], - "attr-value": { - pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, - inside: { - punctuation: [ - { pattern: /^=/, alias: "attr-equals" }, - { pattern: /^(\s*)["']|["']$/, lookbehind: !0 }, - ], - }, - }, - punctuation: /\/?>/, - "attr-name": { - pattern: /[^\s>\/]+/, - inside: { namespace: /^[^\s>\/:]+:/ }, - }, - }, - }, - entity: [ - { pattern: /&[\da-z]{1,8};/i, alias: "named-entity" }, - /&#x?[\da-f]{1,8};/i, - ], - }), - (s.languages.markup.tag.inside["attr-value"].inside.entity = - s.languages.markup.entity), - (s.languages.markup.doctype.inside["internal-subset"].inside = - s.languages.markup), - s.hooks.add("wrap", function (e) { - "entity" === e.type && - (e.attributes.title = e.content.replace(/&/, "&")); - }), - Object.defineProperty(s.languages.markup.tag, "addInlined", { - value: function (e, t) { - var n = {}; - (n["language-" + t] = { - pattern: /(^$)/i, - lookbehind: !0, - inside: s.languages[t], - }), - (n.cdata = /^$/i); - var a = { - "included-cdata": { - pattern: //i, - inside: n, - }, - }; - a["language-" + t] = { pattern: /[\s\S]+/, inside: s.languages[t] }; - var r = {}; - (r[e] = { - pattern: RegExp( - /(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace( - /__/g, - function () { - return e; - }, - ), - "i", - ), - lookbehind: !0, - greedy: !0, - inside: a, - }), - s.languages.insertBefore("markup", "cdata", r); - }, - }), - Object.defineProperty(s.languages.markup.tag, "addAttribute", { - value: function (e, t) { - s.languages.markup.tag.inside["special-attr"].push({ - pattern: RegExp( - /(^|["'\s])/.source + - "(?:" + - e + - ")" + - /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, - "i", - ), - lookbehind: !0, - inside: { - "attr-name": /^[^\s=]+/, - "attr-value": { - pattern: /=[\s\S]+/, - inside: { - value: { - pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, - lookbehind: !0, - alias: [t, "language-" + t], - inside: s.languages[t], - }, - punctuation: [ - { pattern: /^=/, alias: "attr-equals" }, - /"|'/, - ], - }, - }, - }, - }); - }, - }), - (s.languages.html = s.languages.markup), - (s.languages.mathml = s.languages.markup), - (s.languages.svg = s.languages.markup), - (s.languages.xml = s.languages.extend("markup", {})), - (s.languages.ssml = s.languages.xml), - (s.languages.atom = s.languages.xml), - (s.languages.rss = s.languages.xml), - (function (e) { - var t = /\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/, - n = [ - { pattern: /\b(?:false|true)\b/i, alias: "boolean" }, - { - pattern: /(::\s*)\b[a-z_]\w*\b(?!\s*\()/i, - greedy: !0, - lookbehind: !0, - }, - { - pattern: /(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i, - greedy: !0, - lookbehind: !0, - }, - /\b(?:null)\b/i, - /\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/, - ], - a = - /\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i, - s = - /|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/, - r = /[{}\[\](),:;]/; - e.languages.php = { - delimiter: { - pattern: /\?>$|^<\?(?:php(?=\s)|=)?/i, - alias: "important", - }, - comment: t, - variable: /\$+(?:\w+\b|(?=\{))/, - package: { - pattern: - /(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, - lookbehind: !0, - inside: { punctuation: /\\/ }, - }, - "class-name-definition": { - pattern: - /(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i, - lookbehind: !0, - alias: "class-name", - }, - "function-definition": { - pattern: /(\bfunction\s+)[a-z_]\w*(?=\s*\()/i, - lookbehind: !0, - alias: "function", - }, - keyword: [ - { - pattern: - /(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i, - alias: "type-casting", - greedy: !0, - lookbehind: !0, - }, - { - pattern: - /([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i, - alias: "type-hint", - greedy: !0, - lookbehind: !0, - }, - { - pattern: - /(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i, - alias: "return-type", - greedy: !0, - lookbehind: !0, - }, - { - pattern: - /\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i, - alias: "type-declaration", - greedy: !0, - }, - { - pattern: /(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i, - alias: "type-declaration", - greedy: !0, - lookbehind: !0, - }, - { - pattern: /\b(?:parent|self|static)(?=\s*::)/i, - alias: "static-context", - greedy: !0, - }, - { pattern: /(\byield\s+)from\b/i, lookbehind: !0 }, - /\bclass\b/i, - { - pattern: - /((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i, - lookbehind: !0, - }, - ], - "argument-name": { - pattern: /([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i, - lookbehind: !0, - }, - "class-name": [ - { - pattern: - /(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i, - greedy: !0, - lookbehind: !0, - }, - { - pattern: /(\|\s*)\b[a-z_]\w*(?!\\)\b/i, - greedy: !0, - lookbehind: !0, - }, - { pattern: /\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i, greedy: !0 }, - { - pattern: /(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i, - alias: "class-name-fully-qualified", - greedy: !0, - lookbehind: !0, - inside: { punctuation: /\\/ }, - }, - { - pattern: /(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i, - alias: "class-name-fully-qualified", - greedy: !0, - inside: { punctuation: /\\/ }, - }, - { - pattern: - /(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, - alias: "class-name-fully-qualified", - greedy: !0, - lookbehind: !0, - inside: { punctuation: /\\/ }, - }, - { - pattern: /\b[a-z_]\w*(?=\s*\$)/i, - alias: "type-declaration", - greedy: !0, - }, - { - pattern: /(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i, - alias: ["class-name-fully-qualified", "type-declaration"], - greedy: !0, - inside: { punctuation: /\\/ }, - }, - { - pattern: /\b[a-z_]\w*(?=\s*::)/i, - alias: "static-context", - greedy: !0, - }, - { - pattern: /(?:\\?\b[a-z_]\w*)+(?=\s*::)/i, - alias: ["class-name-fully-qualified", "static-context"], - greedy: !0, - inside: { punctuation: /\\/ }, - }, - { - pattern: /([(,?]\s*)[a-z_]\w*(?=\s*\$)/i, - alias: "type-hint", - greedy: !0, - lookbehind: !0, - }, - { - pattern: /([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i, - alias: ["class-name-fully-qualified", "type-hint"], - greedy: !0, - lookbehind: !0, - inside: { punctuation: /\\/ }, - }, - { - pattern: /(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i, - alias: "return-type", - greedy: !0, - lookbehind: !0, - }, - { - pattern: /(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, - alias: ["class-name-fully-qualified", "return-type"], - greedy: !0, - lookbehind: !0, - inside: { punctuation: /\\/ }, - }, - ], - constant: n, - function: { - pattern: /(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i, - lookbehind: !0, - inside: { punctuation: /\\/ }, - }, - property: { pattern: /(->\s*)\w+/, lookbehind: !0 }, - number: a, - operator: s, - punctuation: r, - }; - var i = { - pattern: - /\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/, - lookbehind: !0, - inside: e.languages.php, - }, - o = [ - { - pattern: /<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/, - alias: "nowdoc-string", - greedy: !0, - inside: { - delimiter: { - pattern: /^<<<'[^']+'|[a-z_]\w*;$/i, - alias: "symbol", - inside: { punctuation: /^<<<'?|[';]$/ }, - }, - }, - }, - { - pattern: - /<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i, - alias: "heredoc-string", - greedy: !0, - inside: { - delimiter: { - pattern: /^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i, - alias: "symbol", - inside: { punctuation: /^<<<"?|[";]$/ }, - }, - interpolation: i, - }, - }, - { - pattern: /`(?:\\[\s\S]|[^\\`])*`/, - alias: "backtick-quoted-string", - greedy: !0, - }, - { - pattern: /'(?:\\[\s\S]|[^\\'])*'/, - alias: "single-quoted-string", - greedy: !0, - }, - { - pattern: /"(?:\\[\s\S]|[^\\"])*"/, - alias: "double-quoted-string", - greedy: !0, - inside: { interpolation: i }, - }, - ]; - e.languages.insertBefore("php", "variable", { - string: o, - attribute: { - pattern: - /#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im, - greedy: !0, - inside: { - "attribute-content": { - pattern: /^(#\[)[\s\S]+(?=\]$)/, - lookbehind: !0, - inside: { - comment: t, - string: o, - "attribute-class-name": [ - { - pattern: /([^:]|^)\b[a-z_]\w*(?!\\)\b/i, - alias: "class-name", - greedy: !0, - lookbehind: !0, - }, - { - pattern: /([^:]|^)(?:\\?\b[a-z_]\w*)+/i, - alias: ["class-name", "class-name-fully-qualified"], - greedy: !0, - lookbehind: !0, - inside: { punctuation: /\\/ }, - }, - ], - constant: n, - number: a, - operator: s, - punctuation: r, - }, - }, - delimiter: { pattern: /^#\[|\]$/, alias: "punctuation" }, - }, - }, - }), - e.hooks.add("before-tokenize", function (t) { - /<\?/.test(t.code) && - e.languages["markup-templating"].buildPlaceholders( - t, - "php", - /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g, - ); - }), - e.hooks.add("after-tokenize", function (t) { - e.languages["markup-templating"].tokenizePlaceholders(t, "php"); - }); - })(s), - (s.languages.python = { - comment: { pattern: /(^|[^\\])#.*/, lookbehind: !0, greedy: !0 }, - "string-interpolation": { - pattern: - /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, - greedy: !0, - inside: { - interpolation: { - pattern: - /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/, - lookbehind: !0, - inside: { - "format-spec": { - pattern: /(:)[^:(){}]+(?=\}$)/, - lookbehind: !0, - }, - "conversion-option": { - pattern: /![sra](?=[:}]$)/, - alias: "punctuation", - }, - rest: null, - }, - }, - string: /[\s\S]+/, - }, - }, - "triple-quoted-string": { - pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i, - greedy: !0, - alias: "string", - }, - string: { - pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, - greedy: !0, - }, - function: { - pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g, - lookbehind: !0, - }, - "class-name": { pattern: /(\bclass\s+)\w+/i, lookbehind: !0 }, - decorator: { - pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m, - lookbehind: !0, - alias: ["annotation", "punctuation"], - inside: { punctuation: /\./ }, - }, - keyword: - /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, - builtin: - /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, - boolean: /\b(?:False|None|True)\b/, - number: - /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, - operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, - punctuation: /[{}[\];(),.:]/, - }), - (s.languages.python[ - "string-interpolation" - ].inside.interpolation.inside.rest = s.languages.python), - (s.languages.py = s.languages.python), - (function (e) { - (e.languages.ruby = e.languages.extend("clike", { - comment: { pattern: /#.*|^=begin\s[\s\S]*?^=end/m, greedy: !0 }, - "class-name": { - pattern: - /(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/, - lookbehind: !0, - inside: { punctuation: /[.\\]/ }, - }, - keyword: - /\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/, - operator: - /\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/, - punctuation: /[(){}[\].,;]/, - })), - e.languages.insertBefore("ruby", "operator", { - "double-colon": { pattern: /::/, alias: "punctuation" }, - }); - var t = { - pattern: /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/, - lookbehind: !0, - inside: { - content: { - pattern: /^(#\{)[\s\S]+(?=\}$)/, - lookbehind: !0, - inside: e.languages.ruby, - }, - delimiter: { pattern: /^#\{|\}$/, alias: "punctuation" }, - }, - }; - delete e.languages.ruby.function; - var n = - "(?:" + - [ - /([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source, - /\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source, - /\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source, - /\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/ - .source, - /<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source, - ].join("|") + - ")", - a = - /(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/ - .source; - e.languages.insertBefore("ruby", "keyword", { - "regex-literal": [ - { - pattern: RegExp(/%r/.source + n + /[egimnosux]{0,6}/.source), - greedy: !0, - inside: { interpolation: t, regex: /[\s\S]+/ }, - }, - { - pattern: - /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/, - lookbehind: !0, - greedy: !0, - inside: { interpolation: t, regex: /[\s\S]+/ }, - }, - ], - variable: /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/, - symbol: [ - { - pattern: RegExp(/(^|[^:]):/.source + a), - lookbehind: !0, - greedy: !0, - }, - { - pattern: RegExp( - /([\r\n{(,][ \t]*)/.source + a + /(?=:(?!:))/.source, - ), - lookbehind: !0, - greedy: !0, - }, - ], - "method-definition": { - pattern: /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/, - lookbehind: !0, - inside: { - function: /\b\w+$/, - keyword: /^self\b/, - "class-name": /^\w+/, - punctuation: /\./, - }, - }, - }), - e.languages.insertBefore("ruby", "string", { - "string-literal": [ - { - pattern: RegExp(/%[qQiIwWs]?/.source + n), - greedy: !0, - inside: { interpolation: t, string: /[\s\S]+/ }, - }, - { - pattern: - /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/, - greedy: !0, - inside: { interpolation: t, string: /[\s\S]+/ }, - }, - { - pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i, - alias: "heredoc-string", - greedy: !0, - inside: { - delimiter: { - pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i, - inside: { symbol: /\b\w+/, punctuation: /^<<[-~]?/ }, - }, - interpolation: t, - string: /[\s\S]+/, - }, - }, - { - pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i, - alias: "heredoc-string", - greedy: !0, - inside: { - delimiter: { - pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i, - inside: { symbol: /\b\w+/, punctuation: /^<<[-~]?'|'$/ }, - }, - string: /[\s\S]+/, - }, - }, - ], - "command-literal": [ - { - pattern: RegExp(/%x/.source + n), - greedy: !0, - inside: { - interpolation: t, - command: { pattern: /[\s\S]+/, alias: "string" }, - }, - }, - { - pattern: - /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/, - greedy: !0, - inside: { - interpolation: t, - command: { pattern: /[\s\S]+/, alias: "string" }, - }, - }, - ], - }), - delete e.languages.ruby.string, - e.languages.insertBefore("ruby", "number", { - builtin: - /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/, - constant: /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/, - }), - (e.languages.rb = e.languages.ruby); - })(s), - (window.Prism = a), - s - ); - })(), - o = (e) => (t) => t.options.get(e), - l = o("codesample_languages"), - u = o("codesample_global_prismjs"), - c = (e) => (r.Prism && u(e) ? r.Prism : i), - d = (e) => - t(e) && "PRE" === e.nodeName && -1 !== e.className.indexOf("language-"), - g = (e) => { - const t = e.selection ? e.selection.getNode() : null; - return d(t) ? a.some(t) : a.none(); - }, - p = (e) => { - const t = ((e) => - l(e) || [ - { text: "HTML/XML", value: "markup" }, - { text: "JavaScript", value: "javascript" }, - { text: "CSS", value: "css" }, - { text: "PHP", value: "php" }, - { text: "Ruby", value: "ruby" }, - { text: "Python", value: "python" }, - { text: "Java", value: "java" }, - { text: "C", value: "c" }, - { text: "C#", value: "csharp" }, - { text: "C++", value: "cpp" }, - ])(e), - n = ((r = t), - ((e, t) => (0 < e.length ? a.some(e[0]) : a.none()))(r)).fold( - ("", () => ""), - (e) => e.value, - ); - var r; - const i = ((e, t) => - g(e).fold( - () => t, - (e) => { - const n = e.className.match(/language-(\w+)/); - return n ? n[1] : t; - }, - ))(e, n), - o = ((e) => - g(e) - .bind((e) => a.from(e.textContent)) - .getOr(""))(e); - e.windowManager.open({ - title: "Insert/Edit Code Sample", - size: "large", - body: { - type: "panel", - items: [ - { type: "listbox", name: "language", label: "Language", items: t }, - { type: "textarea", name: "code", label: "Code view" }, - ], - }, - buttons: [ - { type: "cancel", name: "cancel", text: "Cancel" }, - { type: "submit", name: "save", text: "Save", primary: !0 }, - ], - initialData: { language: i, code: o }, - onSubmit: (t) => { - const n = t.getData(); - ((e, t, n) => { - const a = e.dom; - e.undoManager.transact(() => { - const r = g(e); - return ( - (n = s.DOM.encode(n)), - r.fold( - () => { - e.insertContent( - '
' +
-                        n +
-                        "
", - ); - const s = a.select("#__new")[0]; - a.setAttrib(s, "id", null), e.selection.select(s); - }, - (s) => { - a.setAttrib(s, "class", "language-" + t), - (s.innerHTML = n), - c(e).highlightElement(s), - e.selection.select(s); - }, - ) - ); - }); - })(e, n.language, n.code), - t.close(); - }, - }); - }, - b = ((h = /^\s+|\s+$/g), (e) => e.replace(h, "")); - var h, - f = tinymce.util.Tools.resolve("tinymce.util.Tools"); - const m = - (e, t = n) => - (n) => { - const a = () => { - n.setEnabled(e.selection.isEditable()), t(n); - }; - return ( - e.on("NodeChange", a), - a(), - () => { - e.off("NodeChange", a); - } - ); - }; - e.add("codesample", (e) => { - ((e) => { - const t = e.options.register; - t("codesample_languages", { processor: "object[]" }), - t("codesample_global_prismjs", { processor: "boolean", default: !1 }); - })(e), - ((e) => { - e.on("PreProcess", (t) => { - const n = e.dom, - a = n.select("pre[contenteditable=false]", t.node); - f.each(f.grep(a, d), (e) => { - const t = e.textContent; - let a; - for ( - n.setAttrib(e, "class", b(n.getAttrib(e, "class"))), - n.setAttrib(e, "contentEditable", null), - n.setAttrib(e, "data-mce-highlighted", null); - (a = e.firstChild); - - ) - e.removeChild(a); - n.add(e, "code").textContent = t; - }); - }), - e.on("SetContent", () => { - const t = e.dom, - n = f.grep( - t.select("pre"), - (e) => - d(e) && "true" !== t.getAttrib(e, "data-mce-highlighted"), - ); - n.length && - e.undoManager.transact(() => { - f.each(n, (n) => { - var a; - f.each(t.select("br", n), (n) => { - t.replace(e.getDoc().createTextNode("\n"), n); - }), - (n.innerHTML = t.encode( - null !== (a = n.textContent) && void 0 !== a ? a : "", - )), - c(e).highlightElement(n), - t.setAttrib(n, "data-mce-highlighted", !0), - (n.className = b(n.className)); - }); - }); - }), - e.on("PreInit", () => { - e.parser.addNodeFilter("pre", (e) => { - var t; - for (let n = 0, a = e.length; n < a; n++) { - const a = e[n]; - -1 !== - (null !== (t = a.attr("class")) && void 0 !== t - ? t - : "" - ).indexOf("language-") && - (a.attr("contenteditable", "false"), - a.attr("data-mce-highlighted", "false")); - } - }); - }); - })(e), - ((e) => { - const t = () => e.execCommand("codesample"); - e.ui.registry.addToggleButton("codesample", { - icon: "code-sample", - tooltip: "Insert/edit code sample", - onAction: t, - onSetup: m(e, (t) => { - t.setActive( - ((e) => { - const t = e.selection.getStart(); - return e.dom.is(t, 'pre[class*="language-"]'); - })(e), - ); - }), - }), - e.ui.registry.addMenuItem("codesample", { - text: "Code sample...", - icon: "code-sample", - onAction: t, - onSetup: m(e), - }); - })(e), - ((e) => { - e.addCommand("codesample", () => { - const t = e.selection.getNode(); - e.selection.isCollapsed() || d(t) ? p(e) : e.formatter.toggle("code"); - }); - })(e), - e.on("dblclick", (t) => { - d(t.target) && p(e); - }); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/directionality/plugin.min.js b/src/lib/dist/tinymce/plugins/directionality/plugin.min.js deleted file mode 100644 index 3c16fa89..00000000 --- a/src/lib/dist/tinymce/plugins/directionality/plugin.min.js +++ /dev/null @@ -1,285 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var t = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const e = (t) => (e) => typeof e === t, - o = (t) => - "string" === - ((t) => { - const e = typeof t; - return null === t - ? "null" - : "object" === e && Array.isArray(t) - ? "array" - : "object" === e && - ((o = r = t), - (n = String).prototype.isPrototypeOf(o) || - (null === (i = r.constructor) || void 0 === i - ? void 0 - : i.name) === n.name) - ? "string" - : e; - var o, r, n, i; - })(t), - r = e("boolean"), - n = (t) => !((t) => null == t)(t), - i = e("function"), - s = e("number"), - l = (!1, () => false); - class a { - constructor(t, e) { - (this.tag = t), (this.value = e); - } - static some(t) { - return new a(!0, t); - } - static none() { - return a.singletonNone; - } - fold(t, e) { - return this.tag ? e(this.value) : t(); - } - isSome() { - return this.tag; - } - isNone() { - return !this.tag; - } - map(t) { - return this.tag ? a.some(t(this.value)) : a.none(); - } - bind(t) { - return this.tag ? t(this.value) : a.none(); - } - exists(t) { - return this.tag && t(this.value); - } - forall(t) { - return !this.tag || t(this.value); - } - filter(t) { - return !this.tag || t(this.value) ? this : a.none(); - } - getOr(t) { - return this.tag ? this.value : t; - } - or(t) { - return this.tag ? this : t; - } - getOrThunk(t) { - return this.tag ? this.value : t(); - } - orThunk(t) { - return this.tag ? this : t(); - } - getOrDie(t) { - if (this.tag) return this.value; - throw new Error(null != t ? t : "Called getOrDie on None"); - } - static from(t) { - return n(t) ? a.some(t) : a.none(); - } - getOrNull() { - return this.tag ? this.value : null; - } - getOrUndefined() { - return this.value; - } - each(t) { - this.tag && t(this.value); - } - toArray() { - return this.tag ? [this.value] : []; - } - toString() { - return this.tag ? `some(${this.value})` : "none()"; - } - } - a.singletonNone = new a(!1); - const u = (t, e) => { - for (let o = 0, r = t.length; o < r; o++) e(t[o], o); - }, - c = (t) => { - if (null == t) throw new Error("Node cannot be null or undefined"); - return { dom: t }; - }, - d = c, - h = (t, e) => { - const o = t.dom; - if (1 !== o.nodeType) return !1; - { - const t = o; - if (void 0 !== t.matches) return t.matches(e); - if (void 0 !== t.msMatchesSelector) return t.msMatchesSelector(e); - if (void 0 !== t.webkitMatchesSelector) - return t.webkitMatchesSelector(e); - if (void 0 !== t.mozMatchesSelector) return t.mozMatchesSelector(e); - throw new Error("Browser lacks native selectors"); - } - }; - "undefined" != typeof window ? window : Function("return this;")(); - const m = (t) => (e) => ((t) => t.dom.nodeType)(e) === t, - g = m(1), - f = m(3), - v = m(9), - y = m(11), - p = (t, e) => { - t.dom.removeAttribute(e); - }, - w = - i(Element.prototype.attachShadow) && i(Node.prototype.getRootNode) - ? (t) => d(t.dom.getRootNode()) - : (t) => (v(t) ? t : d(t.dom.ownerDocument)), - b = (t) => d(t.dom.host), - N = (t) => { - const e = f(t) ? t.dom.parentNode : t.dom; - if (null == e || null === e.ownerDocument) return !1; - const o = e.ownerDocument; - return ((t) => { - const e = w(t); - return y((o = e)) && n(o.dom.host) ? a.some(e) : a.none(); - var o; - })(d(e)).fold( - () => o.body.contains(e), - ((r = N), (i = b), (t) => r(i(t))), - ); - var r, i; - }, - S = (t) => - "rtl" === - ((t, e) => { - const o = t.dom, - r = window.getComputedStyle(o).getPropertyValue(e); - return "" !== r || N(t) - ? r - : ((t, e) => - ((t) => void 0 !== t.style && i(t.style.getPropertyValue))(t) - ? t.style.getPropertyValue(e) - : "")(o, e); - })(t, "direction") - ? "rtl" - : "ltr", - A = (t, e) => - ((t, o) => - ((t, e) => { - const o = []; - for (let r = 0, n = t.length; r < n; r++) { - const n = t[r]; - e(n, r) && o.push(n); - } - return o; - })( - ((t, e) => { - const o = t.length, - r = new Array(o); - for (let n = 0; n < o; n++) { - const o = t[n]; - r[n] = e(o, n); - } - return r; - })(t.dom.childNodes, d), - (t) => h(t, e), - ))(t), - E = ("li", (t) => g(t) && "li" === t.dom.nodeName.toLowerCase()); - const T = (t, e, n) => { - u(e, (e) => { - const c = d(e), - m = E(c), - f = ((t, e) => { - return ( - e - ? ((o = t), - (r = "ol,ul"), - ((t, e, o) => { - let n = t.dom; - const s = i(o) ? o : l; - for (; n.parentNode; ) { - n = n.parentNode; - const t = d(n); - if (h(t, r)) return a.some(t); - if (s(t)) break; - } - return a.none(); - })(o, 0, n)) - : a.some(t) - ).getOr(t); - var o, r, n; - })(c, m); - var v; - ((v = f), ((t) => a.from(t.dom.parentNode).map(d))(v).filter(g)).each( - (e) => { - if ( - (t.setStyle(f.dom, "direction", null), - S(e) === n - ? p(f, "dir") - : ((t, e, n) => { - ((t, e, n) => { - if (!(o(n) || r(n) || s(n))) - throw ( - (console.error( - "Invalid call to Attribute.set. Key ", - e, - ":: Value ", - n, - ":: Element ", - t, - ), - new Error("Attribute value was not simple")) - ); - t.setAttribute(e, n + ""); - })(t.dom, e, n); - })(f, "dir", n), - S(f) !== n && t.setStyle(f.dom, "direction", n), - m) - ) { - const e = A(f, "li[dir],li[style]"); - u(e, (e) => { - p(e, "dir"), t.setStyle(e.dom, "direction", null); - }); - } - }, - ); - }); - }, - C = (t, e) => { - t.selection.isEditable() && - (T(t.dom, t.selection.getSelectedBlocks(), e), t.nodeChanged()); - }, - D = (t, e) => (o) => { - const r = (r) => { - const n = d(r.element); - o.setActive(S(n) === e), o.setEnabled(t.selection.isEditable()); - }; - return ( - t.on("NodeChange", r), - o.setEnabled(t.selection.isEditable()), - () => t.off("NodeChange", r) - ); - }; - t.add("directionality", (t) => { - ((t) => { - t.addCommand("mceDirectionLTR", () => { - C(t, "ltr"); - }), - t.addCommand("mceDirectionRTL", () => { - C(t, "rtl"); - }); - })(t), - ((t) => { - t.ui.registry.addToggleButton("ltr", { - tooltip: "Left to right", - icon: "ltr", - onAction: () => t.execCommand("mceDirectionLTR"), - onSetup: D(t, "ltr"), - }), - t.ui.registry.addToggleButton("rtl", { - tooltip: "Right to left", - icon: "rtl", - onAction: () => t.execCommand("mceDirectionRTL"), - onSetup: D(t, "rtl"), - }); - })(t); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/fullscreen/plugin.min.js b/src/lib/dist/tinymce/plugins/fullscreen/plugin.min.js deleted file mode 100644 index f867fedd..00000000 --- a/src/lib/dist/tinymce/plugins/fullscreen/plugin.min.js +++ /dev/null @@ -1,912 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - const e = (e) => { - let t = e; - return { - get: () => t, - set: (e) => { - t = e; - }, - }; - }; - var t = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const n = (e) => (t) => - ((e) => { - const t = typeof e; - return null === e - ? "null" - : "object" === t && Array.isArray(e) - ? "array" - : "object" === t && - ((n = r = e), - (o = String).prototype.isPrototypeOf(n) || - (null === (s = r.constructor) || void 0 === s - ? void 0 - : s.name) === o.name) - ? "string" - : t; - var n, r, o, s; - })(t) === e, - r = (e) => (t) => typeof t === e, - o = (e) => (t) => e === t, - s = n("string"), - i = n("array"), - l = o(null), - a = r("boolean"), - c = o(void 0), - u = (e) => !((e) => null == e)(e), - d = r("function"), - m = r("number"), - h = () => {}, - g = (e) => () => e; - function p(e, ...t) { - return (...n) => { - const r = t.concat(n); - return e.apply(null, r); - }; - } - const f = g(!1), - v = g(!0); - class w { - constructor(e, t) { - (this.tag = e), (this.value = t); - } - static some(e) { - return new w(!0, e); - } - static none() { - return w.singletonNone; - } - fold(e, t) { - return this.tag ? t(this.value) : e(); - } - isSome() { - return this.tag; - } - isNone() { - return !this.tag; - } - map(e) { - return this.tag ? w.some(e(this.value)) : w.none(); - } - bind(e) { - return this.tag ? e(this.value) : w.none(); - } - exists(e) { - return this.tag && e(this.value); - } - forall(e) { - return !this.tag || e(this.value); - } - filter(e) { - return !this.tag || e(this.value) ? this : w.none(); - } - getOr(e) { - return this.tag ? this.value : e; - } - or(e) { - return this.tag ? this : e; - } - getOrThunk(e) { - return this.tag ? this.value : e(); - } - orThunk(e) { - return this.tag ? this : e(); - } - getOrDie(e) { - if (this.tag) return this.value; - throw new Error(null != e ? e : "Called getOrDie on None"); - } - static from(e) { - return u(e) ? w.some(e) : w.none(); - } - getOrNull() { - return this.tag ? this.value : null; - } - getOrUndefined() { - return this.value; - } - each(e) { - this.tag && e(this.value); - } - toArray() { - return this.tag ? [this.value] : []; - } - toString() { - return this.tag ? `some(${this.value})` : "none()"; - } - } - w.singletonNone = new w(!1); - const y = (t) => { - const n = e(w.none()), - r = () => n.get().each(t); - return { - clear: () => { - r(), n.set(w.none()); - }, - isSet: () => n.get().isSome(), - get: () => n.get(), - set: (e) => { - r(), n.set(w.some(e)); - }, - }; - }, - b = () => y((e) => e.unbind()), - S = Array.prototype.push, - x = (e, t) => { - const n = e.length, - r = new Array(n); - for (let o = 0; o < n; o++) { - const n = e[o]; - r[o] = t(n, o); - } - return r; - }, - E = (e, t) => { - for (let n = 0, r = e.length; n < r; n++) t(e[n], n); - }, - F = (e, t) => { - const n = []; - for (let r = 0, o = e.length; r < o; r++) { - const o = e[r]; - t(o, r) && n.push(o); - } - return n; - }, - O = (e, t) => - ((e, t, n) => { - for (let r = 0, o = e.length; r < o; r++) { - const o = e[r]; - if (t(o, r)) return w.some(o); - if (n(o, r)) break; - } - return w.none(); - })(e, t, f), - T = Object.keys, - k = (e, t, n = 0, r) => { - const o = e.indexOf(t, n); - return -1 !== o && (!!c(r) || o + t.length <= r); - }, - C = (e) => void 0 !== e.style && d(e.style.getPropertyValue), - A = (e) => { - if (null == e) throw new Error("Node cannot be null or undefined"); - return { dom: e }; - }, - R = A; - "undefined" != typeof window ? window : Function("return this;")(); - const L = (e) => (t) => ((e) => e.dom.nodeType)(t) === e, - M = L(1), - N = L(3), - P = L(9), - D = L(11), - W = (e, t) => { - const n = e.dom; - if (1 !== n.nodeType) return !1; - { - const e = n; - if (void 0 !== e.matches) return e.matches(t); - if (void 0 !== e.msMatchesSelector) return e.msMatchesSelector(t); - if (void 0 !== e.webkitMatchesSelector) - return e.webkitMatchesSelector(t); - if (void 0 !== e.mozMatchesSelector) return e.mozMatchesSelector(t); - throw new Error("Browser lacks native selectors"); - } - }, - q = (e) => R(e.dom.ownerDocument), - H = (e) => x(e.dom.childNodes, R), - I = d(Element.prototype.attachShadow) && d(Node.prototype.getRootNode), - B = g(I), - V = I ? (e) => R(e.dom.getRootNode()) : (e) => (P(e) ? e : q(e)), - _ = (e) => { - const t = V(e); - return D((n = t)) && u(n.dom.host) ? w.some(t) : w.none(); - var n; - }, - j = (e) => R(e.dom.host), - z = (e) => { - const t = N(e) ? e.dom.parentNode : e.dom; - if (null == t || null === t.ownerDocument) return !1; - const n = t.ownerDocument; - return _(R(t)).fold( - () => n.body.contains(t), - ((r = z), (o = j), (e) => r(o(e))), - ); - var r, o; - }, - $ = (e, t) => { - const n = e.dom.getAttribute(t); - return null === n ? void 0 : n; - }, - U = (e, t) => { - e.dom.removeAttribute(t); - }, - K = (e, t) => { - const n = e.dom; - ((e, t) => { - const n = T(e); - for (let r = 0, o = n.length; r < o; r++) { - const o = n[r]; - t(e[o], o); - } - })(t, (e, t) => { - ((e, t, n) => { - if (!s(n)) - throw ( - (console.error( - "Invalid call to CSS.set. Property ", - t, - ":: Value ", - n, - ":: Element ", - e, - ), - new Error("CSS value must be a string: " + n)) - ); - C(e) && e.style.setProperty(t, n); - })(n, t, e); - }); - }, - X = (e) => { - const t = R( - ((e) => { - if (B() && u(e.target)) { - const t = R(e.target); - if (M(t) && u(t.dom.shadowRoot) && e.composed && e.composedPath) { - const t = e.composedPath(); - if (t) - return ((e, t) => (0 < e.length ? w.some(e[0]) : w.none()))( - t, - ); - } - } - return w.from(e.target); - })(e).getOr(e.target), - ), - n = () => e.stopPropagation(), - r = () => e.preventDefault(), - o = ((s = r), (i = n), (...e) => s(i.apply(null, e))); - var s, i; - return ((e, t, n, r, o, s, i) => ({ - target: e, - x: t, - y: n, - stop: r, - prevent: o, - kill: s, - raw: i, - }))(t, e.clientX, e.clientY, n, r, o, e); - }, - Y = (e, t, n, r) => { - e.dom.removeEventListener(t, n, r); - }, - G = v, - J = (e, t, n) => - ((e, t, n, r) => - ((e, t, n, r, o) => { - const s = ((e, t) => (n) => { - e(n) && t(X(n)); - })(n, r); - return e.dom.addEventListener(t, s, o), { unbind: p(Y, e, t, s, o) }; - })(e, t, n, r, !1))(e, t, G, n), - Q = () => Z(0, 0), - Z = (e, t) => ({ major: e, minor: t }), - ee = { - nu: Z, - detect: (e, t) => { - const n = String(t).toLowerCase(); - return 0 === e.length - ? Q() - : ((e, t) => { - const n = ((e, t) => { - for (let n = 0; n < e.length; n++) { - const r = e[n]; - if (r.test(t)) return r; - } - })(e, t); - if (!n) return { major: 0, minor: 0 }; - const r = (e) => Number(t.replace(n, "$" + e)); - return Z(r(1), r(2)); - })(e, n); - }, - unknown: Q, - }, - te = (e, t) => { - const n = String(t).toLowerCase(); - return O(e, (e) => e.search(n)); - }, - ne = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/, - re = (e) => (t) => k(t, e), - oe = [ - { - name: "Edge", - versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/], - search: (e) => - k(e, "edge/") && - k(e, "chrome") && - k(e, "safari") && - k(e, "applewebkit"), - }, - { - name: "Chromium", - brand: "Chromium", - versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/, ne], - search: (e) => k(e, "chrome") && !k(e, "chromeframe"), - }, - { - name: "IE", - versionRegexes: [ - /.*?msie\ ?([0-9]+)\.([0-9]+).*/, - /.*?rv:([0-9]+)\.([0-9]+).*/, - ], - search: (e) => k(e, "msie") || k(e, "trident"), - }, - { - name: "Opera", - versionRegexes: [ne, /.*?opera\/([0-9]+)\.([0-9]+).*/], - search: re("opera"), - }, - { - name: "Firefox", - versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/], - search: re("firefox"), - }, - { - name: "Safari", - versionRegexes: [ne, /.*?cpu os ([0-9]+)_([0-9]+).*/], - search: (e) => - (k(e, "safari") || k(e, "mobile/")) && k(e, "applewebkit"), - }, - ], - se = [ - { - name: "Windows", - search: re("win"), - versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/], - }, - { - name: "iOS", - search: (e) => k(e, "iphone") || k(e, "ipad"), - versionRegexes: [ - /.*?version\/\ ?([0-9]+)\.([0-9]+).*/, - /.*cpu os ([0-9]+)_([0-9]+).*/, - /.*cpu iphone os ([0-9]+)_([0-9]+).*/, - ], - }, - { - name: "Android", - search: re("android"), - versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/], - }, - { - name: "macOS", - search: re("mac os x"), - versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/], - }, - { name: "Linux", search: re("linux"), versionRegexes: [] }, - { name: "Solaris", search: re("sunos"), versionRegexes: [] }, - { name: "FreeBSD", search: re("freebsd"), versionRegexes: [] }, - { - name: "ChromeOS", - search: re("cros"), - versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/], - }, - ], - ie = { browsers: g(oe), oses: g(se) }, - le = "Edge", - ae = "Chromium", - ce = "Opera", - ue = "Firefox", - de = "Safari", - me = (e) => { - const t = e.current, - n = e.version, - r = (e) => () => t === e; - return { - current: t, - version: n, - isEdge: r(le), - isChromium: r(ae), - isIE: r("IE"), - isOpera: r(ce), - isFirefox: r(ue), - isSafari: r(de), - }; - }, - he = () => me({ current: void 0, version: ee.unknown() }), - ge = me, - pe = (g(le), g(ae), g("IE"), g(ce), g(ue), g(de), "Windows"), - fe = "Android", - ve = "Linux", - we = "macOS", - ye = "Solaris", - be = "FreeBSD", - Se = "ChromeOS", - xe = (e) => { - const t = e.current, - n = e.version, - r = (e) => () => t === e; - return { - current: t, - version: n, - isWindows: r(pe), - isiOS: r("iOS"), - isAndroid: r(fe), - isMacOS: r(we), - isLinux: r(ve), - isSolaris: r(ye), - isFreeBSD: r(be), - isChromeOS: r(Se), - }; - }, - Ee = () => xe({ current: void 0, version: ee.unknown() }), - Fe = xe, - Oe = - (g(pe), - g("iOS"), - g(fe), - g(ve), - g(we), - g(ye), - g(be), - g(Se), - (e, t, n) => { - const r = ie.browsers(), - o = ie.oses(), - s = t - .bind((e) => - ((e, t) => - ((e, t) => { - for (let n = 0; n < e.length; n++) { - const r = t(e[n]); - if (r.isSome()) return r; - } - return w.none(); - })(t.brands, (t) => { - const n = t.brand.toLowerCase(); - return O(e, (e) => { - var t; - return ( - n === - (null === (t = e.brand) || void 0 === t - ? void 0 - : t.toLowerCase()) - ); - }).map((e) => ({ - current: e.name, - version: ee.nu(parseInt(t.version, 10), 0), - })); - }))(r, e), - ) - .orThunk(() => - ((e, t) => - te(e, t).map((e) => { - const n = ee.detect(e.versionRegexes, t); - return { current: e.name, version: n }; - }))(r, e), - ) - .fold(he, ge), - i = ((e, t) => - te(e, t).map((e) => { - const n = ee.detect(e.versionRegexes, t); - return { current: e.name, version: n }; - }))(o, e).fold(Ee, Fe), - l = ((e, t, n, r) => { - const o = e.isiOS() && !0 === /ipad/i.test(n), - s = e.isiOS() && !o, - i = e.isiOS() || e.isAndroid(), - l = i || r("(pointer:coarse)"), - a = o || (!s && i && r("(min-device-width:768px)")), - c = s || (i && !a), - u = t.isSafari() && e.isiOS() && !1 === /safari/i.test(n), - d = !c && !a && !u; - return { - isiPad: g(o), - isiPhone: g(s), - isTablet: g(a), - isPhone: g(c), - isTouch: g(l), - isAndroid: e.isAndroid, - isiOS: e.isiOS, - isWebView: g(u), - isDesktop: g(d), - }; - })(i, s, e, n); - return { browser: s, os: i, deviceType: l }; - }), - Te = (e) => window.matchMedia(e).matches; - let ke = ((e) => { - let t, - n = !1; - return (...r) => (n || ((n = !0), (t = e.apply(null, r))), t); - })(() => Oe(navigator.userAgent, w.from(navigator.userAgentData), Te)); - const Ce = (e, t) => ({ - left: e, - top: t, - translate: (n, r) => Ce(e + n, t + r), - }), - Ae = Ce, - Re = (e) => { - const t = void 0 === e ? window : e; - return ke().browser.isFirefox() ? w.none() : w.from(t.visualViewport); - }, - Le = (e, t, n, r) => ({ - x: e, - y: t, - width: n, - height: r, - right: e + n, - bottom: t + r, - }), - Me = (e) => { - const t = void 0 === e ? window : e, - n = t.document, - r = ((e) => { - const t = void 0 !== e ? e.dom : document, - n = t.body.scrollLeft || t.documentElement.scrollLeft, - r = t.body.scrollTop || t.documentElement.scrollTop; - return Ae(n, r); - })(R(n)); - return Re(t).fold( - () => { - const e = t.document.documentElement, - n = e.clientWidth, - o = e.clientHeight; - return Le(r.left, r.top, n, o); - }, - (e) => - Le( - Math.max(e.pageLeft, r.left), - Math.max(e.pageTop, r.top), - e.width, - e.height, - ), - ); - }, - Ne = (e, t, n) => - Re(n) - .map((n) => { - const r = (e) => t(X(e)); - return ( - n.addEventListener(e, r), - { unbind: () => n.removeEventListener(e, r) } - ); - }) - .getOrThunk(() => ({ unbind: h })); - var Pe = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), - De = tinymce.util.Tools.resolve("tinymce.Env"); - const We = (e, t) => { - e.dispatch("FullscreenStateChanged", { state: t }), - e.dispatch("ResizeEditor"); - }, - qe = ("fullscreen_native", (e) => e.options.get("fullscreen_native")); - const He = (e) => { - return ( - e.dom === - (void 0 !== (t = q(e).dom).fullscreenElement - ? t.fullscreenElement - : void 0 !== t.msFullscreenElement - ? t.msFullscreenElement - : void 0 !== t.webkitFullscreenElement - ? t.webkitFullscreenElement - : null) - ); - var t; - }, - Ie = (e, t, n) => - ((e, t, n) => - F( - ((e, t) => { - const n = d(t) ? t : f; - let r = e.dom; - const o = []; - for (; null !== r.parentNode && void 0 !== r.parentNode; ) { - const e = r.parentNode, - t = R(e); - if ((o.push(t), !0 === n(t))) break; - r = e; - } - return o; - })(e, n), - t, - ))(e, (e) => W(e, t), n), - Be = (e, t) => - ((e, n) => { - return F( - ((e) => w.from(e.dom.parentNode).map(R))((r = e)) - .map(H) - .map((e) => - F(e, (e) => { - return (t = e), !(r.dom === t.dom); - var t; - }), - ) - .getOr([]), - (e) => W(e, t), - ); - var r; - })(e), - Ve = "data-ephox-mobile-fullscreen-style", - _e = "position:absolute!important;", - je = - "top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;", - ze = De.os.isAndroid(), - $e = (e) => { - const t = ((e, t) => { - const n = e.dom, - r = window.getComputedStyle(n).getPropertyValue(t); - return "" !== r || z(e) - ? r - : ((e, t) => (C(e) ? e.style.getPropertyValue(t) : ""))(n, t); - })(e, "background-color"); - return void 0 !== t && "" !== t - ? "background-color:" + t + "!important" - : "background-color:rgb(255,255,255)!important;"; - }, - Ue = Pe.DOM, - Ke = Re().fold( - () => ({ bind: h, unbind: h }), - (e) => { - const t = (() => { - const e = y(h); - return { ...e, on: (t) => e.get().each(t) }; - })(), - n = b(), - r = b(), - o = ((e, t) => { - let n = null; - return { - cancel: () => { - l(n) || (clearTimeout(n), (n = null)); - }, - throttle: (...t) => { - l(n) && - (n = setTimeout(() => { - (n = null), e.apply(null, t); - }, 50)); - }, - }; - })(() => { - (document.body.scrollTop = 0), - (document.documentElement.scrollTop = 0), - window.requestAnimationFrame(() => { - t.on((t) => - K(t, { - top: e.offsetTop + "px", - left: e.offsetLeft + "px", - height: e.height + "px", - width: e.width + "px", - }), - ); - }); - }); - return { - bind: (e) => { - t.set(e), - o.throttle(), - n.set(Ne("resize", o.throttle)), - r.set(Ne("scroll", o.throttle)); - }, - unbind: () => { - t.on(() => { - n.clear(), r.clear(); - }), - t.clear(); - }, - }; - }, - ), - Xe = (e, t) => { - const n = document.body, - r = document.documentElement, - o = e.getContainer(), - l = R(o), - c = ((e) => { - const t = R(e.getElement()); - return _(t) - .map(j) - .getOrThunk(() => - ((e) => { - const t = e.dom.body; - if (null == t) throw new Error("Body is not available yet"); - return R(t); - })(q(t)), - ); - })(e), - u = t.get(), - d = R(e.getBody()), - h = De.deviceType.isTouch(), - g = o.style, - p = e.iframeElement, - f = null == p ? void 0 : p.style, - v = (e) => { - e(n, "tox-fullscreen"), - e(r, "tox-fullscreen"), - e(o, "tox-fullscreen"), - _(l) - .map((e) => j(e).dom) - .each((t) => { - e(t, "tox-fullscreen"), e(t, "tox-shadowhost"); - }); - }, - y = () => { - h && - ((e) => { - const t = ((e, t) => { - const n = document; - return (1 !== (r = n).nodeType && - 9 !== r.nodeType && - 11 !== r.nodeType) || - 0 === r.childElementCount - ? [] - : x(n.querySelectorAll(e), R); - var r; - })("[" + Ve + "]"); - E(t, (t) => { - const n = $(t, Ve); - n && "no-styles" !== n ? K(t, e.parseStyle(n)) : U(t, "style"), - U(t, Ve); - }); - })(e.dom), - v(Ue.removeClass), - Ke.unbind(), - w.from(t.get()).each((e) => e.fullscreenChangeHandler.unbind()); - }; - if (u) - u.fullscreenChangeHandler.unbind(), - qe(e) && - He(c) && - ((e) => { - const t = e.dom; - t.exitFullscreen - ? t.exitFullscreen() - : t.msExitFullscreen - ? t.msExitFullscreen() - : t.webkitCancelFullScreen && t.webkitCancelFullScreen(); - })(q(c)), - (f.width = u.iframeWidth), - (f.height = u.iframeHeight), - (g.width = u.containerWidth), - (g.height = u.containerHeight), - (g.top = u.containerTop), - (g.left = u.containerLeft), - y(), - (b = u.scrollPos), - window.scrollTo(b.x, b.y), - t.set(null), - We(e, !1), - e.off("remove", y); - else { - const n = J( - q(c), - void 0 !== document.fullscreenElement - ? "fullscreenchange" - : void 0 !== document.msFullscreenElement - ? "MSFullscreenChange" - : void 0 !== document.webkitFullscreenElement - ? "webkitfullscreenchange" - : "fullscreenchange", - (n) => { - qe(e) && (He(c) || null === t.get() || Xe(e, t)); - }, - ), - r = { - scrollPos: Me(window), - containerWidth: g.width, - containerHeight: g.height, - containerTop: g.top, - containerLeft: g.left, - iframeWidth: f.width, - iframeHeight: f.height, - fullscreenChangeHandler: n, - }; - h && - ((e, t, n) => { - const r = (t) => (n) => { - const r = $(n, "style"), - o = void 0 === r ? "no-styles" : r.trim(); - o !== t && - (((e, t, n) => { - ((e, t, n) => { - if (!(s(n) || a(n) || m(n))) - throw ( - (console.error( - "Invalid call to Attribute.set. Key ", - t, - ":: Value ", - n, - ":: Element ", - e, - ), - new Error("Attribute value was not simple")) - ); - e.setAttribute(t, n + ""); - })(e.dom, t, n); - })(n, Ve, o), - K(n, e.parseStyle(t))); - }, - o = Ie(t, "*"), - l = ((e) => { - const t = []; - for (let n = 0, r = e.length; n < r; ++n) { - if (!i(e[n])) - throw new Error( - "Arr.flatten item " + - n + - " was not an array, input: " + - e, - ); - S.apply(t, e[n]); - } - return t; - })(x(o, (e) => Be(e, "*:not(.tox-silver-sink)"))), - c = $e(n); - E(l, r("display:none!important;")), - E(o, r(_e + je + c)), - r((!0 === ze ? "" : _e) + je + c)(t); - })(e.dom, l, d), - (f.width = f.height = "100%"), - (g.width = g.height = ""), - v(Ue.addClass), - Ke.bind(l), - e.on("remove", y), - t.set(r), - qe(e) && - ((e) => { - const t = e.dom; - t.requestFullscreen - ? t.requestFullscreen() - : t.msRequestFullscreen - ? t.msRequestFullscreen() - : t.webkitRequestFullScreen && t.webkitRequestFullScreen(); - })(c), - We(e, !0); - } - var b; - }, - Ye = (e, t) => (n) => { - n.setActive(null !== t.get()); - const r = (e) => n.setActive(e.state); - return ( - e.on("FullscreenStateChanged", r), - () => e.off("FullscreenStateChanged", r) - ); - }; - t.add("fullscreen", (t) => { - const n = e(null); - return ( - t.inline || - (((e) => { - (0, e.options.register)("fullscreen_native", { - processor: "boolean", - default: !1, - }); - })(t), - ((e, t) => { - e.addCommand("mceFullScreen", () => { - Xe(e, t); - }); - })(t, n), - ((e, t) => { - const n = () => e.execCommand("mceFullScreen"); - e.ui.registry.addToggleMenuItem("fullscreen", { - text: "Fullscreen", - icon: "fullscreen", - shortcut: "Meta+Shift+F", - onAction: n, - onSetup: Ye(e, t), - }), - e.ui.registry.addToggleButton("fullscreen", { - tooltip: "Fullscreen", - icon: "fullscreen", - onAction: n, - onSetup: Ye(e, t), - }); - })(t, n), - t.addShortcut("Meta+Shift+F", "", "mceFullScreen")), - ((e) => ({ isFullscreen: () => null !== e.get() }))(n) - ); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/image/plugin.min.js b/src/lib/dist/tinymce/plugins/image/plugin.min.js deleted file mode 100644 index ed57ec20..00000000 --- a/src/lib/dist/tinymce/plugins/image/plugin.min.js +++ /dev/null @@ -1,1174 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var e = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const t = Object.getPrototypeOf, - a = (e, t, a) => { - var i; - return ( - !!a(e, t.prototype) || - (null === (i = e.constructor) || void 0 === i ? void 0 : i.name) === - t.name - ); - }, - i = (e) => (t) => - ((e) => { - const t = typeof e; - return null === e - ? "null" - : "object" === t && Array.isArray(e) - ? "array" - : "object" === t && a(e, String, (e, t) => t.isPrototypeOf(e)) - ? "string" - : t; - })(t) === e, - s = (e) => (t) => typeof t === e, - r = i("string"), - o = i("object"), - n = (e) => ((e, i) => o(e) && a(e, i, (e, a) => t(e) === a))(e, Object), - l = i("array"), - c = (null, (e) => null === e); - const m = s("boolean"), - d = (e) => !((e) => null == e)(e), - g = s("function"), - u = s("number"), - p = () => {}; - class h { - constructor(e, t) { - (this.tag = e), (this.value = t); - } - static some(e) { - return new h(!0, e); - } - static none() { - return h.singletonNone; - } - fold(e, t) { - return this.tag ? t(this.value) : e(); - } - isSome() { - return this.tag; - } - isNone() { - return !this.tag; - } - map(e) { - return this.tag ? h.some(e(this.value)) : h.none(); - } - bind(e) { - return this.tag ? e(this.value) : h.none(); - } - exists(e) { - return this.tag && e(this.value); - } - forall(e) { - return !this.tag || e(this.value); - } - filter(e) { - return !this.tag || e(this.value) ? this : h.none(); - } - getOr(e) { - return this.tag ? this.value : e; - } - or(e) { - return this.tag ? this : e; - } - getOrThunk(e) { - return this.tag ? this.value : e(); - } - orThunk(e) { - return this.tag ? this : e(); - } - getOrDie(e) { - if (this.tag) return this.value; - throw new Error(null != e ? e : "Called getOrDie on None"); - } - static from(e) { - return d(e) ? h.some(e) : h.none(); - } - getOrNull() { - return this.tag ? this.value : null; - } - getOrUndefined() { - return this.value; - } - each(e) { - this.tag && e(this.value); - } - toArray() { - return this.tag ? [this.value] : []; - } - toString() { - return this.tag ? `some(${this.value})` : "none()"; - } - } - h.singletonNone = new h(!1); - const b = Object.keys, - v = Object.hasOwnProperty, - y = (e, t) => v.call(e, t), - f = Array.prototype.push, - w = (e) => { - const t = []; - for (let a = 0, i = e.length; a < i; ++a) { - if (!l(e[a])) - throw new Error( - "Arr.flatten item " + a + " was not an array, input: " + e, - ); - f.apply(t, e[a]); - } - return t; - }; - "undefined" != typeof window ? window : Function("return this;")(); - const A = (e, t, a) => { - ((e, t, a) => { - if (!(r(a) || m(a) || u(a))) - throw ( - (console.error( - "Invalid call to Attribute.set. Key ", - t, - ":: Value ", - a, - ":: Element ", - e, - ), - new Error("Attribute value was not simple")) - ); - e.setAttribute(t, a + ""); - })(e.dom, t, a); - }, - D = (e) => { - if (null == e) throw new Error("Node cannot be null or undefined"); - return { dom: e }; - }, - _ = D; - var C = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), - I = tinymce.util.Tools.resolve("tinymce.util.URI"); - const U = (e) => e.length > 0, - S = (e) => (t) => t.options.get(e), - x = S("image_dimensions"), - N = S("image_advtab"), - T = S("image_uploadtab"), - O = S("image_prepend_url"), - E = S("image_class_list"), - L = S("image_description"), - j = S("image_title"), - M = S("image_caption"), - R = S("image_list"), - k = S("a11y_advanced_options"), - z = S("automatic_uploads"), - P = (e, t) => Math.max(parseInt(e, 10), parseInt(t, 10)), - B = (e) => (e && (e = e.replace(/px$/, "")), e), - F = (e) => (e.length > 0 && /^[0-9]+$/.test(e) && (e += "px"), e), - H = (e) => - "IMG" === e.nodeName && - (e.hasAttribute("data-mce-object") || - e.hasAttribute("data-mce-placeholder")), - G = (e, t) => { - const a = e.options.get; - return I.isDomSafe(t, "img", { - allow_html_data_urls: a("allow_html_data_urls"), - allow_script_urls: a("allow_script_urls"), - allow_svg_data_urls: a("allow_svg_data_urls"), - }); - }, - W = C.DOM, - $ = (e) => - e.style.marginLeft && - e.style.marginRight && - e.style.marginLeft === e.style.marginRight - ? B(e.style.marginLeft) - : "", - V = (e) => - e.style.marginTop && - e.style.marginBottom && - e.style.marginTop === e.style.marginBottom - ? B(e.style.marginTop) - : "", - K = (e) => (e.style.borderWidth ? B(e.style.borderWidth) : ""), - Z = (e, t) => { - var a; - return e.hasAttribute(t) && - null !== (a = e.getAttribute(t)) && - void 0 !== a - ? a - : ""; - }, - q = (e) => null !== e.parentNode && "FIGURE" === e.parentNode.nodeName, - J = (e, t, a) => { - "" === a || null === a ? e.removeAttribute(t) : e.setAttribute(t, a); - }, - Q = (e, t) => { - const a = e.getAttribute("style"), - i = t(null !== a ? a : ""); - i.length > 0 - ? (e.setAttribute("style", i), e.setAttribute("data-mce-style", i)) - : e.removeAttribute("style"); - }, - X = (e, t) => (e, a, i) => { - const s = e.style; - s[a] ? ((s[a] = F(i)), Q(e, t)) : J(e, a, i); - }, - Y = (e, t) => (e.style[t] ? B(e.style[t]) : Z(e, t)), - ee = (e, t) => { - const a = F(t); - (e.style.marginLeft = a), (e.style.marginRight = a); - }, - te = (e, t) => { - const a = F(t); - (e.style.marginTop = a), (e.style.marginBottom = a); - }, - ae = (e, t) => { - const a = F(t); - e.style.borderWidth = a; - }, - ie = (e, t) => { - e.style.borderStyle = t; - }, - se = (e) => { - var t; - return null !== (t = e.style.borderStyle) && void 0 !== t ? t : ""; - }, - re = (e) => d(e) && "FIGURE" === e.nodeName, - oe = (e) => - 0 === W.getAttrib(e, "alt").length && - "presentation" === W.getAttrib(e, "role"), - ne = (e) => (oe(e) ? "" : Z(e, "alt")), - le = (e, t) => { - var a; - const i = document.createElement("img"); - return ( - J(i, "style", t.style), - ($(i) || "" !== t.hspace) && ee(i, t.hspace), - (V(i) || "" !== t.vspace) && te(i, t.vspace), - (K(i) || "" !== t.border) && ae(i, t.border), - (se(i) || "" !== t.borderStyle) && ie(i, t.borderStyle), - e(null !== (a = i.getAttribute("style")) && void 0 !== a ? a : "") - ); - }, - ce = (e, t) => ({ - src: Z(t, "src"), - alt: ne(t), - title: Z(t, "title"), - width: Y(t, "width"), - height: Y(t, "height"), - class: Z(t, "class"), - style: e(Z(t, "style")), - caption: q(t), - hspace: $(t), - vspace: V(t), - border: K(t), - borderStyle: se(t), - isDecorative: oe(t), - }), - me = (e, t, a, i, s) => { - a[i] !== t[i] && s(e, i, String(a[i])); - }, - de = (e, t, a) => { - if (a) { - W.setAttrib(e, "role", "presentation"); - const t = _(e); - A(t, "alt", ""); - } else { - if (c(t)) { - "alt", _(e).dom.removeAttribute("alt"); - } else { - const a = _(e); - A(a, "alt", t); - } - "presentation" === W.getAttrib(e, "role") && W.setAttrib(e, "role", ""); - } - }, - ge = (e, t) => (a, i, s) => { - e(a, s), Q(a, t); - }, - ue = (e, t, a) => { - const i = ce(e, a); - me(a, i, t, "caption", (e, t, a) => - ((e) => { - q(e) - ? ((e) => { - const t = e.parentNode; - d(t) && (W.insertAfter(e, t), W.remove(t)); - })(e) - : ((e) => { - const t = W.create("figure", { class: "image" }); - W.insertAfter(t, e), - t.appendChild(e), - t.appendChild( - W.create( - "figcaption", - { contentEditable: "true" }, - "Caption", - ), - ), - (t.contentEditable = "false"); - })(e); - })(e), - ), - me(a, i, t, "src", J), - me(a, i, t, "title", J), - me(a, i, t, "width", X(0, e)), - me(a, i, t, "height", X(0, e)), - me(a, i, t, "class", J), - me( - a, - i, - t, - "style", - ge((e, t) => J(e, "style", t), e), - ), - me(a, i, t, "hspace", ge(ee, e)), - me(a, i, t, "vspace", ge(te, e)), - me(a, i, t, "border", ge(ae, e)), - me(a, i, t, "borderStyle", ge(ie, e)), - ((e, t, a) => { - (a.alt === t.alt && a.isDecorative === t.isDecorative) || - de(e, a.alt, a.isDecorative); - })(a, i, t); - }, - pe = (e, t) => { - const a = ((e) => { - if (e.margin) { - const t = String(e.margin).split(" "); - switch (t.length) { - case 1: - (e["margin-top"] = e["margin-top"] || t[0]), - (e["margin-right"] = e["margin-right"] || t[0]), - (e["margin-bottom"] = e["margin-bottom"] || t[0]), - (e["margin-left"] = e["margin-left"] || t[0]); - break; - case 2: - (e["margin-top"] = e["margin-top"] || t[0]), - (e["margin-right"] = e["margin-right"] || t[1]), - (e["margin-bottom"] = e["margin-bottom"] || t[0]), - (e["margin-left"] = e["margin-left"] || t[1]); - break; - case 3: - (e["margin-top"] = e["margin-top"] || t[0]), - (e["margin-right"] = e["margin-right"] || t[1]), - (e["margin-bottom"] = e["margin-bottom"] || t[2]), - (e["margin-left"] = e["margin-left"] || t[1]); - break; - case 4: - (e["margin-top"] = e["margin-top"] || t[0]), - (e["margin-right"] = e["margin-right"] || t[1]), - (e["margin-bottom"] = e["margin-bottom"] || t[2]), - (e["margin-left"] = e["margin-left"] || t[3]); - } - delete e.margin; - } - return e; - })(e.dom.styles.parse(t)), - i = e.dom.styles.parse(e.dom.styles.serialize(a)); - return e.dom.styles.serialize(i); - }, - he = (e) => { - const t = e.selection.getNode(), - a = e.dom.getParent(t, "figure.image"); - return a - ? e.dom.select("img", a)[0] - : t && ("IMG" !== t.nodeName || H(t)) - ? null - : t; - }, - be = (e, t) => { - var a; - const i = e.dom, - s = ((t, a) => { - const i = {}; - var s; - return ( - ((e, t, a, i) => { - ((e, t) => { - const a = b(e); - for (let i = 0, s = a.length; i < s; i++) { - const s = a[i]; - t(e[s], s); - } - })(e, (e, s) => { - (t(e, s) ? a : i)(e, s); - }); - })( - t, - (t, a) => !e.schema.isValidChild(a, "figure"), - ((s = i), - (e, t) => { - s[t] = e; - }), - p, - ), - i - ); - })(e.schema.getTextBlockElements()), - r = i.getParent( - t.parentNode, - (e) => { - return ( - (t = s), - (a = e.nodeName), - y(t, a) && void 0 !== t[a] && null !== t[a] - ); - var t, a; - }, - e.getBody(), - ); - return r && null !== (a = i.split(r, t)) && void 0 !== a ? a : t; - }, - ve = (e, t) => { - const a = ((t, a) => { - const i = document.createElement("img"); - if ( - (ue((t) => pe(e, t), { ...a, caption: !1 }, i), - de(i, a.alt, a.isDecorative), - a.caption) - ) { - const e = W.create("figure", { class: "image" }); - return ( - e.appendChild(i), - e.appendChild( - W.create("figcaption", { contentEditable: "true" }, "Caption"), - ), - (e.contentEditable = "false"), - e - ); - } - return i; - })(0, t); - e.dom.setAttrib(a, "data-mce-id", "__mcenew"), - e.focus(), - e.selection.setContent(a.outerHTML); - const i = e.dom.select('*[data-mce-id="__mcenew"]')[0]; - if ((e.dom.setAttrib(i, "data-mce-id", null), re(i))) { - const t = be(e, i); - e.selection.select(t); - } else e.selection.select(i); - }, - ye = (e, t) => { - const a = he(e); - if (a) { - const i = { ...ce((t) => pe(e, t), a), ...t }, - s = ((e, t) => { - const a = t.src; - return { ...t, src: G(e, a) ? a : "" }; - })(e, i); - i.src - ? ((e, t) => { - const a = he(e); - if (a) - if ( - (ue((t) => pe(e, t), t, a), - ((e, t) => { - e.dom.setAttrib(t, "src", t.getAttribute("src")); - })(e, a), - re(a.parentNode)) - ) { - const t = a.parentNode; - be(e, t), e.selection.select(a.parentNode); - } else - e.selection.select(a), - ((e, t, a) => { - const i = () => { - (a.onload = a.onerror = null), - e.selection && - (e.selection.select(a), e.nodeChanged()); - }; - (a.onload = () => { - t.width || - t.height || - !x(e) || - e.dom.setAttribs(a, { - width: String(a.clientWidth), - height: String(a.clientHeight), - }), - i(); - }), - (a.onerror = i); - })(e, t, a); - })(e, s) - : ((e, t) => { - if (t) { - const a = e.dom.is(t.parentNode, "figure.image") - ? t.parentNode - : t; - e.dom.remove(a), - e.focus(), - e.nodeChanged(), - e.dom.isEmpty(e.getBody()) && - (e.setContent(""), e.selection.setCursorLocation()); - } - })(e, a); - } else - t.src && - ve(e, { - src: "", - alt: "", - title: "", - width: "", - height: "", - class: "", - style: "", - caption: !1, - hspace: "", - vspace: "", - border: "", - borderStyle: "", - isDecorative: !1, - ...t, - }); - }, - fe = - ((we = (e, t) => (n(e) && n(t) ? fe(e, t) : t)), - (...e) => { - if (0 === e.length) throw new Error("Can't merge zero objects"); - const t = {}; - for (let a = 0; a < e.length; a++) { - const i = e[a]; - for (const e in i) y(i, e) && (t[e] = we(t[e], i[e])); - } - return t; - }); - var we, - Ae = tinymce.util.Tools.resolve("tinymce.util.ImageUploader"), - De = tinymce.util.Tools.resolve("tinymce.util.Tools"); - const _e = (e) => (r(e.value) ? e.value : ""), - Ce = (e, t) => { - const a = []; - return ( - De.each(e, (e) => { - const i = ((e) => (r(e.text) ? e.text : r(e.title) ? e.title : ""))( - e, - ); - if (void 0 !== e.menu) { - const s = Ce(e.menu, t); - a.push({ text: i, items: s }); - } else { - const s = t(e); - a.push({ text: i, value: s }); - } - }), - a - ); - }, - Ie = - (e = _e) => - (t) => - t ? h.from(t).map((t) => Ce(t, e)) : h.none(), - Ue = (e, t) => - ((e, a) => { - for (let a = 0; a < e.length; a++) { - const s = ((e) => y(e, "items"))((i = e[a])) - ? Ue(i.items, t) - : i.value === t - ? h.some(i) - : h.none(); - if (s.isSome()) return s; - } - var i; - return h.none(); - })(e), - Se = Ie, - xe = (e, t) => e.bind((e) => Ue(e, t)), - Ne = (e) => { - const t = Se((t) => e.convertURL(t.value || t.url || "", "src")), - a = new Promise((a) => { - ((e, t) => { - const a = R(e); - r(a) - ? fetch(a).then((e) => { - e.ok && e.json().then(t); - }) - : g(a) - ? a(t) - : t(a); - })(e, (e) => { - a(t(e).map((e) => w([[{ text: "None", value: "" }], e]))); - }); - }), - i = ((A = E(e)), Ie(_e)(A)), - s = N(e), - o = T(e), - n = ((e) => U(e.options.get("images_upload_url")))(e), - l = ((e) => d(e.options.get("images_upload_handler")))(e), - c = ((e) => { - const t = he(e); - return t - ? ce((t) => pe(e, t), t) - : { - src: "", - alt: "", - title: "", - width: "", - height: "", - class: "", - style: "", - caption: !1, - hspace: "", - vspace: "", - border: "", - borderStyle: "", - isDecorative: !1, - }; - })(e), - m = L(e), - u = j(e), - p = x(e), - b = M(e), - v = k(e), - y = z(e), - f = h.some(O(e)).filter((e) => r(e) && e.length > 0); - var A; - return a.then((e) => ({ - image: c, - imageList: e, - classList: i, - hasAdvTab: s, - hasUploadTab: o, - hasUploadUrl: n, - hasUploadHandler: l, - hasDescription: m, - hasImageTitle: u, - hasDimensions: p, - hasImageCaption: b, - prependURL: f, - hasAccessibilityOptions: v, - automaticUploads: y, - })); - }, - Te = (e) => { - const t = e.imageList.map((e) => ({ - name: "images", - type: "listbox", - label: "Image list", - items: e, - })), - a = { - name: "alt", - type: "input", - label: "Alternative description", - enabled: !(e.hasAccessibilityOptions && e.image.isDecorative), - }, - i = e.classList.map((e) => ({ - name: "classes", - type: "listbox", - label: "Class", - items: e, - })); - return w([ - [{ name: "src", type: "urlinput", filetype: "image", label: "Source" }], - t.toArray(), - e.hasAccessibilityOptions && e.hasDescription - ? [ - { - type: "label", - label: "Accessibility", - items: [ - { - name: "isDecorative", - type: "checkbox", - label: "Image is decorative", - }, - ], - }, - ] - : [], - e.hasDescription ? [a] : [], - e.hasImageTitle - ? [{ name: "title", type: "input", label: "Image title" }] - : [], - e.hasDimensions ? [{ name: "dimensions", type: "sizeinput" }] : [], - [ - { - ...((s = e.classList.isSome() && e.hasImageCaption), - s ? { type: "grid", columns: 2 } : { type: "panel" }), - items: w([ - i.toArray(), - e.hasImageCaption - ? [ - { - type: "label", - label: "Caption", - items: [ - { - type: "checkbox", - name: "caption", - label: "Show caption", - }, - ], - }, - ] - : [], - ]), - }, - ], - ]); - var s; - }, - Oe = (e) => ({ title: "General", name: "general", items: Te(e) }), - Ee = Te, - Le = (e) => ({ - src: { value: e.src, meta: {} }, - images: e.src, - alt: e.alt, - title: e.title, - dimensions: { width: e.width, height: e.height }, - classes: e.class, - caption: e.caption, - style: e.style, - vspace: e.vspace, - border: e.border, - hspace: e.hspace, - borderstyle: e.borderStyle, - fileinput: [], - isDecorative: e.isDecorative, - }), - je = (e, t) => ({ - src: e.src.value, - alt: (null !== e.alt && 0 !== e.alt.length) || !t ? e.alt : null, - title: e.title, - width: e.dimensions.width, - height: e.dimensions.height, - class: e.classes, - style: e.style, - caption: e.caption, - hspace: e.hspace, - vspace: e.vspace, - border: e.border, - borderStyle: e.borderstyle, - isDecorative: e.isDecorative, - }), - Me = (e, t, a, i) => { - ((e, t) => { - const a = t.getData(); - ((e, t) => - /^(?:[a-zA-Z]+:)?\/\//.test(t) - ? h.none() - : e.prependURL.bind((e) => - t.substring(0, e.length) !== e ? h.some(e + t) : h.none(), - ))(e, a.src.value).each((e) => { - t.setData({ src: { value: e, meta: a.src.meta } }); - }); - })(t, i), - ((e, t) => { - const a = t.getData(), - i = a.src.meta; - if (void 0 !== i) { - const s = fe({}, a); - ((e, t, a) => { - e.hasDescription && r(a.alt) && (t.alt = a.alt), - e.hasAccessibilityOptions && - (t.isDecorative = a.isDecorative || t.isDecorative || !1), - e.hasImageTitle && r(a.title) && (t.title = a.title), - e.hasDimensions && - (r(a.width) && (t.dimensions.width = a.width), - r(a.height) && (t.dimensions.height = a.height)), - r(a.class) && - xe(e.classList, a.class).each((e) => { - t.classes = e.value; - }), - e.hasImageCaption && m(a.caption) && (t.caption = a.caption), - e.hasAdvTab && - (r(a.style) && (t.style = a.style), - r(a.vspace) && (t.vspace = a.vspace), - r(a.border) && (t.border = a.border), - r(a.hspace) && (t.hspace = a.hspace), - r(a.borderstyle) && (t.borderstyle = a.borderstyle)); - })(e, s, i), - t.setData(s); - } - })(t, i), - ((e, t, a, i) => { - const s = i.getData(), - r = s.src.value, - o = s.src.meta || {}; - o.width || - o.height || - !t.hasDimensions || - (U(r) - ? e - .imageSize(r) - .then((e) => { - a.open && i.setData({ dimensions: e }); - }) - .catch((e) => console.error(e)) - : i.setData({ dimensions: { width: "", height: "" } })); - })(e, t, a, i), - ((e, t, a) => { - const i = a.getData(), - s = xe(e.imageList, i.src.value); - (t.prevImage = s), - a.setData({ images: s.map((e) => e.value).getOr("") }); - })(t, a, i); - }, - Re = (e, t, a, i) => { - const s = i.getData(); - var r; - i.block("Uploading image"), - ((r = s.fileinput), - ((e, t) => (0 < e.length ? h.some(e[0]) : h.none()))(r)).fold( - () => { - i.unblock(); - }, - (s) => { - const r = URL.createObjectURL(s), - o = () => { - i.unblock(), URL.revokeObjectURL(r); - }, - n = (s) => { - i.setData({ src: { value: s, meta: {} } }), - i.showTab("general"), - Me(e, t, a, i); - }; - var l; - ((l = s), - new Promise((e, t) => { - const a = new FileReader(); - (a.onload = () => { - e(a.result); - }), - (a.onerror = () => { - var e; - t( - null === (e = a.error) || void 0 === e ? void 0 : e.message, - ); - }), - a.readAsDataURL(l); - })).then((a) => { - const l = e.createBlobCache(s, r, a); - t.automaticUploads - ? e - .uploadImage(l) - .then((e) => { - n(e.url), o(); - }) - .catch((t) => { - o(), e.alertErr(t); - }) - : (e.addToBlobCache(l), n(l.blobUri()), i.unblock()); - }); - }, - ); - }, - ke = (e, t, a) => (i, s) => { - "src" === s.name - ? Me(e, t, a, i) - : "images" === s.name - ? ((e, t, a, i) => { - const s = i.getData(), - r = xe(t.imageList, s.images); - r.each((e) => { - const t = - "" === s.alt || - a.prevImage.map((e) => e.text === s.alt).getOr(!1); - t - ? "" === e.value - ? i.setData({ src: e, alt: a.prevAlt }) - : i.setData({ src: e, alt: e.text }) - : i.setData({ src: e }); - }), - (a.prevImage = r), - Me(e, t, a, i); - })(e, t, a, i) - : "alt" === s.name - ? (a.prevAlt = i.getData().alt) - : "fileinput" === s.name - ? Re(e, t, a, i) - : "isDecorative" === s.name && - i.setEnabled("alt", !i.getData().isDecorative); - }, - ze = (e) => () => { - e.open = !1; - }, - Pe = (e) => - e.hasAdvTab || e.hasUploadUrl || e.hasUploadHandler - ? { - type: "tabpanel", - tabs: w([ - [Oe(e)], - e.hasAdvTab - ? [ - { - title: "Advanced", - name: "advanced", - items: [ - { - type: "grid", - columns: 2, - items: [ - { - type: "input", - label: "Vertical space", - name: "vspace", - inputMode: "numeric", - }, - { - type: "input", - label: "Horizontal space", - name: "hspace", - inputMode: "numeric", - }, - { - type: "input", - label: "Border width", - name: "border", - inputMode: "numeric", - }, - { - type: "listbox", - name: "borderstyle", - label: "Border style", - items: [ - { text: "Select...", value: "" }, - { text: "Solid", value: "solid" }, - { text: "Dotted", value: "dotted" }, - { text: "Dashed", value: "dashed" }, - { text: "Double", value: "double" }, - { text: "Groove", value: "groove" }, - { text: "Ridge", value: "ridge" }, - { text: "Inset", value: "inset" }, - { text: "Outset", value: "outset" }, - { text: "None", value: "none" }, - { text: "Hidden", value: "hidden" }, - ], - }, - ], - }, - ], - }, - ] - : [], - e.hasUploadTab && (e.hasUploadUrl || e.hasUploadHandler) - ? [ - { - title: "Upload", - name: "upload", - items: [{ type: "dropzone", name: "fileinput" }], - }, - ] - : [], - ]), - } - : { type: "panel", items: Ee(e) }, - Be = (e, t, a) => (i) => { - const s = fe(Le(t.image), i.getData()), - r = { ...s, style: le(a.normalizeCss, je(s, !1)) }; - e.execCommand("mceUpdateImage", !1, je(r, t.hasAccessibilityOptions)), - e.editorUpload.uploadImagesAuto(), - i.close(); - }, - Fe = (e) => (t) => - G(e, t) - ? ((e) => - new Promise((t) => { - const a = document.createElement("img"), - i = (e) => { - (a.onload = a.onerror = null), - a.parentNode && a.parentNode.removeChild(a), - t(e); - }; - (a.onload = () => { - const e = { - width: P(a.width, a.clientWidth), - height: P(a.height, a.clientHeight), - }; - i(Promise.resolve(e)); - }), - (a.onerror = () => { - i(Promise.reject(`Failed to get image dimensions for: ${e}`)); - }); - const s = a.style; - (s.visibility = "hidden"), - (s.position = "fixed"), - (s.bottom = s.left = "0px"), - (s.width = s.height = "auto"), - document.body.appendChild(a), - (a.src = e); - }))(e.documentBaseURI.toAbsolute(t)).then((e) => ({ - width: String(e.width), - height: String(e.height), - })) - : Promise.resolve({ width: "", height: "" }), - He = (e) => (t, a, i) => { - var s; - return e.editorUpload.blobCache.create({ - blob: t, - blobUri: a, - name: - null === (s = t.name) || void 0 === s - ? void 0 - : s.replace(/\.[^\.]+$/, ""), - filename: t.name, - base64: i.split(",")[1], - }); - }, - Ge = (e) => (t) => { - e.editorUpload.blobCache.add(t); - }, - We = (e) => (t) => { - e.windowManager.alert(t); - }, - $e = (e) => (t) => pe(e, t), - Ve = (e) => (t) => e.dom.parseStyle(t), - Ke = (e) => (t, a) => e.dom.serializeStyle(t, a), - Ze = (e) => (t) => - Ae(e) - .upload([t], !1) - .then((e) => { - var t; - return 0 === e.length - ? Promise.reject("Failed to upload image") - : !1 === e[0].status - ? Promise.reject( - null === (t = e[0].error) || void 0 === t - ? void 0 - : t.message, - ) - : e[0]; - }), - qe = (e) => { - const t = { - imageSize: Fe(e), - addToBlobCache: Ge(e), - createBlobCache: He(e), - alertErr: We(e), - normalizeCss: $e(e), - parseStyle: Ve(e), - serializeStyle: Ke(e), - uploadImage: Ze(e), - }; - return { - open: () => { - Ne(e) - .then((a) => { - const i = ((e) => ({ - prevImage: xe(e.imageList, e.image.src), - prevAlt: e.image.alt, - open: !0, - }))(a); - return { - title: "Insert/Edit Image", - size: "normal", - body: Pe(a), - buttons: [ - { type: "cancel", name: "cancel", text: "Cancel" }, - { type: "submit", name: "save", text: "Save", primary: !0 }, - ], - initialData: Le(a.image), - onSubmit: Be(e, a, t), - onChange: ke(t, a, i), - onClose: ze(i), - }; - }) - .then(e.windowManager.open); - }, - }; - }, - Je = (e) => { - const t = e.attr("class"); - return d(t) && /\bimage\b/.test(t); - }, - Qe = (e) => (t) => { - let a = t.length; - const i = (t) => { - t.attr("contenteditable", e ? "true" : null); - }; - for (; a--; ) { - const s = t[a]; - Je(s) && - (s.attr("contenteditable", e ? "false" : null), - De.each(s.getAll("figcaption"), i)); - } - }, - Xe = (e) => (t) => { - const a = () => { - t.setEnabled(e.selection.isEditable()); - }; - return ( - e.on("NodeChange", a), - a(), - () => { - e.off("NodeChange", a); - } - ); - }; - e.add("image", (e) => { - ((e) => { - const t = e.options.register; - t("image_dimensions", { processor: "boolean", default: !0 }), - t("image_advtab", { processor: "boolean", default: !1 }), - t("image_uploadtab", { processor: "boolean", default: !0 }), - t("image_prepend_url", { processor: "string", default: "" }), - t("image_class_list", { processor: "object[]" }), - t("image_description", { processor: "boolean", default: !0 }), - t("image_title", { processor: "boolean", default: !1 }), - t("image_caption", { processor: "boolean", default: !1 }), - t("image_list", { - processor: (e) => { - const t = - !1 === e || - r(e) || - ((e, t) => { - if (l(e)) { - for (let a = 0, i = e.length; a < i; ++a) - if (!t(e[a])) return !1; - return !0; - } - return !1; - })(e, o) || - g(e); - return t - ? { value: e, valid: t } - : { - valid: !1, - message: "Must be false, a string, an array or a function.", - }; - }, - default: !1, - }); - })(e), - ((e) => { - e.on("PreInit", () => { - e.parser.addNodeFilter("figure", Qe(!0)), - e.serializer.addNodeFilter("figure", Qe(!1)); - }); - })(e), - ((e) => { - e.ui.registry.addToggleButton("image", { - icon: "image", - tooltip: "Insert/edit image", - onAction: qe(e).open, - onSetup: (t) => { - t.setActive(d(he(e))); - const a = e.selection.selectorChangedWithUnbind( - "img:not([data-mce-object]):not([data-mce-placeholder]),figure.image", - t.setActive, - ).unbind, - i = Xe(e)(t); - return () => { - a(), i(); - }; - }, - }), - e.ui.registry.addMenuItem("image", { - icon: "image", - text: "Image...", - onAction: qe(e).open, - onSetup: Xe(e), - }), - e.ui.registry.addContextMenu("image", { - update: (t) => - e.selection.isEditable() && - (re(t) || ("IMG" === t.nodeName && !H(t))) - ? ["image"] - : [], - }); - })(e), - ((e) => { - e.addCommand("mceImage", qe(e).open), - e.addCommand("mceUpdateImage", (t, a) => { - e.undoManager.transact(() => ye(e, a)); - }); - })(e); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/importcss/plugin.min.js b/src/lib/dist/tinymce/plugins/importcss/plugin.min.js deleted file mode 100644 index 9dd682c6..00000000 --- a/src/lib/dist/tinymce/plugins/importcss/plugin.min.js +++ /dev/null @@ -1,263 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var e = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const t = (e) => (t) => - ((e) => { - const t = typeof e; - return null === e - ? "null" - : "object" === t && Array.isArray(e) - ? "array" - : "object" === t && - ((s = r = e), - (o = String).prototype.isPrototypeOf(s) || - (null === (n = r.constructor) || void 0 === n - ? void 0 - : n.name) === o.name) - ? "string" - : t; - var s, r, o, n; - })(t) === e, - s = t("string"), - r = t("object"), - o = t("array"), - n = ("function", (e) => "function" == typeof e); - var c = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), - i = tinymce.util.Tools.resolve("tinymce.EditorManager"), - l = tinymce.util.Tools.resolve("tinymce.Env"), - a = tinymce.util.Tools.resolve("tinymce.util.Tools"); - const p = (e) => (t) => t.options.get(e), - u = p("importcss_merge_classes"), - m = p("importcss_exclusive"), - f = p("importcss_selector_converter"), - y = p("importcss_selector_filter"), - d = p("importcss_groups"), - h = p("importcss_append"), - _ = p("importcss_file_filter"), - g = p("skin"), - v = p("skin_url"), - b = Array.prototype.push, - x = /^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/, - T = (e) => - s(e) - ? (t) => -1 !== t.indexOf(e) - : e instanceof RegExp - ? (t) => e.test(t) - : e, - S = (e, t) => { - let s = {}; - const r = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t); - if (!r) return; - const o = r[1], - n = r[2].substr(1).split(".").join(" "), - c = a.makeMap("a,img"); - return ( - r[1] - ? ((s = { title: t }), - e.schema.getTextBlockElements()[o] - ? (s.block = o) - : e.schema.getBlockElements()[o] || c[o.toLowerCase()] - ? (s.selector = o) - : (s.inline = o)) - : r[2] && (s = { inline: "span", title: t.substr(1), classes: n }), - u(e) ? (s.classes = n) : (s.attributes = { class: n }), - s - ); - }, - k = (e, t) => null === t || m(e), - w = (e) => { - e.on("init", () => { - const t = (() => { - const e = [], - t = [], - s = {}; - return { - addItemToGroup: (e, r) => { - s[e] ? s[e].push(r) : (t.push(e), (s[e] = [r])); - }, - addItem: (t) => { - e.push(t); - }, - toFormats: () => { - return ((r = t), - (n = (e) => { - const t = s[e]; - return 0 === t.length ? [] : [{ title: e, items: t }]; - }), - ((e) => { - const t = []; - for (let s = 0, r = e.length; s < r; ++s) { - if (!o(e[s])) - throw new Error( - "Arr.flatten item " + - s + - " was not an array, input: " + - e, - ); - b.apply(t, e[s]); - } - return t; - })( - ((e, t) => { - const s = e.length, - r = new Array(s); - for (let o = 0; o < s; o++) { - const s = e[o]; - r[o] = t(s, o); - } - return r; - })(r, n), - )).concat(e); - var r, n; - }, - }; - })(), - r = {}, - n = T(y(e)), - p = ((e) => - a.map(e, (e) => - a.extend({}, e, { - original: e, - selectors: {}, - filter: T(e.filter), - }), - ))(d(e)), - u = (t, s) => { - if ( - ((e, t, s, r) => !(k(e, s) ? t in r : t in s.selectors))( - e, - t, - s, - r, - ) - ) { - ((e, t, s, r) => { - k(e, s) ? (r[t] = !0) : (s.selectors[t] = !0); - })(e, t, s, r); - const o = ((e, t, s, r) => { - let o; - const n = f(e); - return ( - (o = - r && r.selector_converter - ? r.selector_converter - : n || (() => S(e, s))), - o.call(t, s, r) - ); - })(e, e.plugins.importcss, t, s); - if (o) { - const t = o.name || c.DOM.uniqueId(); - return ( - e.formatter.register(t, o), { title: o.title, format: t } - ); - } - } - return null; - }; - a.each( - ((e, t, r) => { - const o = [], - n = {}, - c = (t, n) => { - let p, - u = t.href; - if ( - ((u = ((e) => { - const t = l.cacheSuffix; - return ( - s(e) && (e = e.replace("?" + t, "").replace("&" + t, "")), - e - ); - })(u)), - u && - (!r || r(u, n)) && - !((e, t) => { - const s = g(e); - if (s) { - const r = v(e), - o = r - ? e.documentBaseURI.toAbsolute(r) - : i.baseURL + "/skins/ui/" + s, - n = i.baseURL + "/skins/content/"; - return ( - t === - o + - "/content" + - (e.inline ? ".inline" : "") + - ".min.css" || -1 !== t.indexOf(n) - ); - } - return !1; - })(e, u)) - ) { - a.each(t.imports, (e) => { - c(e, !0); - }); - try { - p = t.cssRules || t.rules; - } catch (e) {} - a.each(p, (e) => { - e.styleSheet - ? c(e.styleSheet, !0) - : e.selectorText && - a.each(e.selectorText.split(","), (e) => { - o.push(a.trim(e)); - }); - }); - } - }; - a.each(e.contentCSS, (e) => { - n[e] = !0; - }), - r || (r = (e, t) => t || n[e]); - try { - a.each(t.styleSheets, (e) => { - c(e); - }); - } catch (e) {} - return o; - })(e, e.getDoc(), T(_(e))), - (e) => { - if (!x.test(e) && (!n || n(e))) { - const s = ((e, t) => a.grep(e, (e) => !e.filter || e.filter(t)))( - p, - e, - ); - if (s.length > 0) - a.each(s, (s) => { - const r = u(e, s); - r && t.addItemToGroup(s.title, r); - }); - else { - const s = u(e, null); - s && t.addItem(s); - } - } - }, - ); - const m = t.toFormats(); - e.dispatch("addStyleModifications", { items: m, replace: !h(e) }); - }); - }; - e.add( - "importcss", - (e) => ( - ((e) => { - const t = e.options.register, - o = (e) => s(e) || n(e) || r(e); - t("importcss_merge_classes", { processor: "boolean", default: !0 }), - t("importcss_exclusive", { processor: "boolean", default: !0 }), - t("importcss_selector_converter", { processor: "function" }), - t("importcss_selector_filter", { processor: o }), - t("importcss_file_filter", { processor: o }), - t("importcss_groups", { processor: "object[]" }), - t("importcss_append", { processor: "boolean", default: !1 }); - })(e), - w(e), - ((e) => ({ convertSelectorToFormat: (t) => S(e, t) }))(e) - ), - ); -})(); diff --git a/src/lib/dist/tinymce/plugins/insertdatetime/plugin.min.js b/src/lib/dist/tinymce/plugins/insertdatetime/plugin.min.js deleted file mode 100644 index de842f44..00000000 --- a/src/lib/dist/tinymce/plugins/insertdatetime/plugin.min.js +++ /dev/null @@ -1,158 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var e = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const t = (e) => (t) => t.options.get(e), - a = t("insertdatetime_dateformat"), - n = t("insertdatetime_timeformat"), - r = t("insertdatetime_formats"), - s = t("insertdatetime_element"), - i = "Sun Mon Tue Wed Thu Fri Sat Sun".split(" "), - o = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split( - " ", - ), - l = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), - m = - "January February March April May June July August September October November December".split( - " ", - ), - c = (e, t) => { - if ((e = "" + e).length < t) - for (let a = 0; a < t - e.length; a++) e = "0" + e; - return e; - }, - d = (e, t, a = new Date()) => - (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = - t.replace("%D", "%m/%d/%Y")).replace("%r", "%I:%M:%S %p")).replace( - "%Y", - "" + a.getFullYear(), - )).replace("%y", "" + a.getYear())).replace( - "%m", - c(a.getMonth() + 1, 2), - )).replace("%d", c(a.getDate(), 2))).replace( - "%H", - "" + c(a.getHours(), 2), - )).replace("%M", "" + c(a.getMinutes(), 2))).replace( - "%S", - "" + c(a.getSeconds(), 2), - )).replace("%I", "" + (((a.getHours() + 11) % 12) + 1))).replace( - "%p", - a.getHours() < 12 ? "AM" : "PM", - )).replace("%B", "" + e.translate(m[a.getMonth()]))).replace( - "%b", - "" + e.translate(l[a.getMonth()]), - )).replace("%A", "" + e.translate(o[a.getDay()]))).replace( - "%a", - "" + e.translate(i[a.getDay()]), - )).replace("%%", "%"), - u = (e, t) => { - if (s(e)) { - const a = d(e, t); - let n; - n = /%[HMSIp]/.test(t) ? d(e, "%Y-%m-%dT%H:%M") : d(e, "%Y-%m-%d"); - const r = e.dom.getParent(e.selection.getStart(), "time"); - r - ? ((e, t, a, n) => { - const r = e.dom.create("time", { datetime: a }, n); - e.dom.replace(r, t), - e.selection.select(r, !0), - e.selection.collapse(!1); - })(e, r, n, a) - : e.insertContent('"); - } else e.insertContent(d(e, t)); - }; - var p = tinymce.util.Tools.resolve("tinymce.util.Tools"); - const g = (e) => (t) => { - const a = () => { - t.setEnabled(e.selection.isEditable()); - }; - return ( - e.on("NodeChange", a), - a(), - () => { - e.off("NodeChange", a); - } - ); - }; - e.add("insertdatetime", (e) => { - ((e) => { - const t = e.options.register; - t("insertdatetime_dateformat", { - processor: "string", - default: e.translate("%Y-%m-%d"), - }), - t("insertdatetime_timeformat", { - processor: "string", - default: e.translate("%H:%M:%S"), - }), - t("insertdatetime_formats", { - processor: "string[]", - default: ["%H:%M:%S", "%Y-%m-%d", "%I:%M:%S %p", "%D"], - }), - t("insertdatetime_element", { processor: "boolean", default: !1 }); - })(e), - ((e) => { - e.addCommand("mceInsertDate", (t, n) => { - u(e, null != n ? n : a(e)); - }), - e.addCommand("mceInsertTime", (t, a) => { - u(e, null != a ? a : n(e)); - }); - })(e), - ((e) => { - const t = r(e), - a = ((e) => { - let t = e; - return { - get: () => t, - set: (e) => { - t = e; - }, - }; - })( - ((e) => { - const t = r(e); - return t.length > 0 ? t[0] : n(e); - })(e), - ), - s = (t) => e.execCommand("mceInsertDate", !1, t); - e.ui.registry.addSplitButton("insertdatetime", { - icon: "insert-time", - tooltip: "Insert date/time", - select: (e) => e === a.get(), - fetch: (a) => { - a( - p.map(t, (t) => ({ - type: "choiceitem", - text: d(e, t), - value: t, - })), - ); - }, - onAction: (e) => { - s(a.get()); - }, - onItemAction: (e, t) => { - a.set(t), s(t); - }, - onSetup: g(e), - }); - const i = (e) => () => { - a.set(e), s(e); - }; - e.ui.registry.addNestedMenuItem("insertdatetime", { - icon: "insert-time", - text: "Date/time", - getSubmenuItems: () => - p.map(t, (t) => ({ - type: "menuitem", - text: d(e, t), - onAction: i(t), - })), - onSetup: g(e), - }); - })(e); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/link/plugin.min.js b/src/lib/dist/tinymce/plugins/link/plugin.min.js deleted file mode 100644 index 26467ca2..00000000 --- a/src/lib/dist/tinymce/plugins/link/plugin.min.js +++ /dev/null @@ -1,1010 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var e = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const t = (e) => (t) => - ((e) => { - const t = typeof e; - return null === e - ? "null" - : "object" === t && Array.isArray(e) - ? "array" - : "object" === t && - ((n = o = e), - (r = String).prototype.isPrototypeOf(n) || - (null === (l = o.constructor) || void 0 === l - ? void 0 - : l.name) === r.name) - ? "string" - : t; - var n, o, r, l; - })(t) === e, - n = (e) => (t) => typeof t === e, - o = t("string"), - r = t("object"), - l = t("array"), - a = (null, (e) => null === e); - const i = n("boolean"), - s = (e) => !((e) => null == e)(e), - c = n("function"), - u = (e, t) => { - if (l(e)) { - for (let n = 0, o = e.length; n < o; ++n) if (!t(e[n])) return !1; - return !0; - } - return !1; - }, - g = () => {}, - d = (e, t) => e === t; - class m { - constructor(e, t) { - (this.tag = e), (this.value = t); - } - static some(e) { - return new m(!0, e); - } - static none() { - return m.singletonNone; - } - fold(e, t) { - return this.tag ? t(this.value) : e(); - } - isSome() { - return this.tag; - } - isNone() { - return !this.tag; - } - map(e) { - return this.tag ? m.some(e(this.value)) : m.none(); - } - bind(e) { - return this.tag ? e(this.value) : m.none(); - } - exists(e) { - return this.tag && e(this.value); - } - forall(e) { - return !this.tag || e(this.value); - } - filter(e) { - return !this.tag || e(this.value) ? this : m.none(); - } - getOr(e) { - return this.tag ? this.value : e; - } - or(e) { - return this.tag ? this : e; - } - getOrThunk(e) { - return this.tag ? this.value : e(); - } - orThunk(e) { - return this.tag ? this : e(); - } - getOrDie(e) { - if (this.tag) return this.value; - throw new Error(null != e ? e : "Called getOrDie on None"); - } - static from(e) { - return s(e) ? m.some(e) : m.none(); - } - getOrNull() { - return this.tag ? this.value : null; - } - getOrUndefined() { - return this.value; - } - each(e) { - this.tag && e(this.value); - } - toArray() { - return this.tag ? [this.value] : []; - } - toString() { - return this.tag ? `some(${this.value})` : "none()"; - } - } - m.singletonNone = new m(!1); - const h = Array.prototype.indexOf, - f = Array.prototype.push, - p = (e) => { - const t = []; - for (let n = 0, o = e.length; n < o; ++n) { - if (!l(e[n])) - throw new Error( - "Arr.flatten item " + n + " was not an array, input: " + e, - ); - f.apply(t, e[n]); - } - return t; - }, - k = (e, t) => { - for (let n = 0; n < e.length; n++) { - const o = t(e[n], n); - if (o.isSome()) return o; - } - return m.none(); - }, - v = (e, t, n = d) => e.exists((e) => n(e, t)), - y = (e) => { - const t = [], - n = (e) => { - t.push(e); - }; - for (let t = 0; t < e.length; t++) e[t].each(n); - return t; - }, - x = (e, t) => (e ? m.some(t) : m.none()), - b = (e) => (t) => t.options.get(e), - _ = b("link_assume_external_targets"), - w = b("link_context_toolbar"), - C = b("link_list"), - O = b("link_default_target"), - N = b("link_default_protocol"), - A = b("link_target_list"), - S = b("link_rel_list"), - E = b("link_class_list"), - T = b("link_title"), - R = b("allow_unsafe_link_target"), - P = b("link_quicklink"); - var L = tinymce.util.Tools.resolve("tinymce.util.Tools"); - const M = (e) => (o(e.value) ? e.value : ""), - D = (e, t) => { - const n = []; - return ( - L.each(e, (e) => { - const r = ((e) => (o(e.text) ? e.text : o(e.title) ? e.title : ""))( - e, - ); - if (void 0 !== e.menu) { - const o = D(e.menu, t); - n.push({ text: r, items: o }); - } else { - const o = t(e); - n.push({ text: r, value: o }); - } - }), - n - ); - }, - B = - (e = M) => - (t) => - m.from(t).map((t) => D(t, e)), - I = (e) => B(M)(e), - j = B, - K = (e, t) => (n) => ({ name: e, type: "listbox", label: t, items: n }), - U = M, - q = Object.keys, - F = Object.hasOwnProperty, - V = (e, t) => F.call(e, t); - var $ = tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"), - z = tinymce.util.Tools.resolve("tinymce.util.URI"); - const G = (e) => s(e) && "a" === e.nodeName.toLowerCase(), - H = (e) => G(e) && !!Q(e), - J = (e, t) => { - if (e.collapsed) return []; - { - const n = e.cloneContents(), - o = n.firstChild, - r = new $(o, n), - l = []; - let a = o; - do { - t(a) && l.push(a); - } while ((a = r.next())); - return l; - } - }, - W = (e) => /^\w+:/i.test(e), - Q = (e) => { - var t, n; - return null !== - (n = - null !== (t = e.getAttribute("data-mce-href")) && void 0 !== t - ? t - : e.getAttribute("href")) && void 0 !== n - ? n - : ""; - }, - X = (e, t) => { - const n = ["noopener"], - o = e ? e.split(/\s+/) : [], - r = (e) => e.filter((e) => -1 === L.inArray(n, e)), - l = t ? ((e) => ((e = r(e)).length > 0 ? e.concat(n) : n))(o) : r(o); - return l.length > 0 ? ((e) => L.trim(e.sort().join(" ")))(l) : ""; - }, - Y = (e, t) => ( - (t = t || te(e.selection.getRng())[0] || e.selection.getNode()), - le(t) - ? m.from(e.dom.select("a[href]", t)[0]) - : m.from(e.dom.getParent(t, "a[href]")) - ), - Z = (e, t) => Y(e, t).isSome(), - ee = (e, t) => - t - .fold( - () => e.getContent({ format: "text" }), - (e) => e.innerText || e.textContent || "", - ) - .replace(/\uFEFF/g, ""), - te = (e) => J(e, H), - ne = (e) => L.grep(e, H), - oe = (e) => ne(e).length > 0, - re = (e) => { - const t = e.schema.getTextInlineElements(); - if (Y(e).exists((e) => e.hasAttribute("data-mce-block"))) return !1; - const n = e.selection.getRng(); - return ( - !!n.collapsed || - 0 === - J( - n, - (e) => 1 === e.nodeType && !G(e) && !V(t, e.nodeName.toLowerCase()), - ).length - ); - }, - le = (e) => - s(e) && "FIGURE" === e.nodeName && /\bimage\b/i.test(e.className), - ae = (e, t, n) => { - const o = e.selection.getNode(), - r = Y(e, o), - l = ((e, t) => { - const n = { ...t }; - if (0 === S(e).length && !R(e)) { - const e = X(n.rel, "_blank" === n.target); - n.rel = e || null; - } - return ( - m.from(n.target).isNone() && !1 === A(e) && (n.target = O(e)), - (n.href = ((e, t) => - ("http" !== t && "https" !== t) || W(e) ? e : t + "://" + e)( - n.href, - _(e), - )), - n - ); - })( - e, - ((e) => { - return ( - (t = ["title", "rel", "class", "target"]), - (n = (t, n) => ( - e[n].each((e) => { - t[n] = e.length > 0 ? e : null; - }), - t - )), - (o = { href: e.href }), - ((e, t) => { - for (let n = 0, o = e.length; n < o; n++) t(e[n], n); - })(t, (e, t) => { - o = n(o, e); - }), - o - ); - var t, n, o; - })(n), - ); - e.undoManager.transact(() => { - n.href === t.href && t.attach(), - r.fold( - () => { - ((e, t, n, o) => { - const r = e.dom; - le(t) - ? ge(r, t, o) - : n.fold( - () => { - e.execCommand("mceInsertLink", !1, o); - }, - (t) => { - e.insertContent(r.createHTML("a", o, r.encode(t))); - }, - ); - })(e, o, n.text, l); - }, - (t) => { - e.focus(), - ((e, t, n, o) => { - n.each((e) => { - V(t, "innerText") ? (t.innerText = e) : (t.textContent = e); - }), - e.dom.setAttribs(t, o), - e.selection.select(t); - })(e, t, n.text, l); - }, - ); - }); - }, - ie = (e) => { - const { class: t, href: n, rel: o, target: r, text: l, title: i } = e; - return ((e, t) => { - const n = {}; - var o; - return ( - ((e, t, n, o) => { - ((e, t) => { - const n = q(e); - for (let o = 0, r = n.length; o < r; o++) { - const r = n[o]; - t(e[r], r); - } - })(e, (e, r) => { - (t(e, r) ? n : o)(e, r); - }); - })( - e, - (e, t) => !1 === a(e), - ((o = n), - (e, t) => { - o[t] = e; - }), - g, - ), - n - ); - })({ - class: t.getOrNull(), - href: n, - rel: o.getOrNull(), - target: r.getOrNull(), - text: l.getOrNull(), - title: i.getOrNull(), - }); - }, - se = (e, t, n) => { - const o = ((e, t) => { - const n = e.options.get, - o = { - allow_html_data_urls: n("allow_html_data_urls"), - allow_script_urls: n("allow_script_urls"), - allow_svg_data_urls: n("allow_svg_data_urls"), - }, - r = t.href; - return { ...t, href: z.isDomSafe(r, "a", o) ? r : "" }; - })(e, n); - e.hasPlugin("rtc", !0) - ? e.execCommand("createlink", !1, ie(o)) - : ae(e, t, o); - }, - ce = (e) => { - e.hasPlugin("rtc", !0) - ? e.execCommand("unlink") - : ((e) => { - e.undoManager.transact(() => { - const t = e.selection.getNode(); - le(t) - ? ue(e, t) - : ((e) => { - const t = e.dom, - n = e.selection, - o = n.getBookmark(), - r = n.getRng().cloneRange(), - l = t.getParent(r.startContainer, "a[href]", e.getBody()), - a = t.getParent(r.endContainer, "a[href]", e.getBody()); - l && r.setStartBefore(l), - a && r.setEndAfter(a), - n.setRng(r), - e.execCommand("unlink"), - n.moveToBookmark(o); - })(e), - e.focus(); - }); - })(e); - }, - ue = (e, t) => { - var n; - const o = e.dom.select("img", t)[0]; - if (o) { - const r = e.dom.getParents(o, "a[href]", t)[0]; - r && - (null === (n = r.parentNode) || void 0 === n || n.insertBefore(o, r), - e.dom.remove(r)); - } - }, - ge = (e, t, n) => { - var o; - const r = e.select("img", t)[0]; - if (r) { - const t = e.create("a", n); - null === (o = r.parentNode) || void 0 === o || o.insertBefore(t, r), - t.appendChild(r); - } - }, - de = (e, t) => - k(t, (t) => - ((e) => { - return V((t = e), (n = "items")) && void 0 !== t[n] && null !== t[n]; - var t, n; - })(t) - ? de(e, t.items) - : x(t.value === e, t), - ), - me = (e, t) => { - const n = { text: e.text, title: e.title }, - o = (e, o) => { - const r = ((l = t), - (a = o), - "link" === a ? l.link : "anchor" === a ? l.anchor : m.none()).getOr( - [], - ); - var l, a; - return ((e, t, n, o) => { - const r = o[t], - l = e.length > 0; - return void 0 !== r - ? de(r, n).map((t) => ({ - url: { - value: t.value, - meta: { text: l ? e : t.text, attach: g }, - }, - text: l ? e : t.text, - })) - : m.none(); - })(n.text, o, r, e); - }; - return { - onChange: (e, t) => { - const r = t.name; - return "url" === r - ? ((e) => { - const t = - ((o = e.url), - x( - n.text.length <= 0, - m - .from( - null === (r = o.meta) || void 0 === r ? void 0 : r.text, - ) - .getOr(o.value), - )); - var o, r; - const l = ((e) => { - var t; - return x( - n.title.length <= 0, - m - .from( - null === (t = e.meta) || void 0 === t - ? void 0 - : t.title, - ) - .getOr(""), - ); - })(e.url); - return t.isSome() || l.isSome() - ? m.some({ - ...t.map((e) => ({ text: e })).getOr({}), - ...l.map((e) => ({ title: e })).getOr({}), - }) - : m.none(); - })(e()) - : ((e, t) => h.call(e, t))(["anchor", "link"], r) > -1 - ? o(e(), r) - : "text" === r || "title" === r - ? ((n[r] = e()[r]), m.none()) - : m.none(); - }, - }; - }; - var he = tinymce.util.Tools.resolve("tinymce.util.Delay"); - const fe = (e) => { - const t = e.href; - return t.indexOf("@") > 0 && - -1 === t.indexOf("/") && - -1 === t.indexOf("mailto:") - ? m.some({ - message: - "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?", - preprocess: (e) => ({ ...e, href: "mailto:" + t }), - }) - : m.none(); - }, - pe = (e, t) => (n) => { - const o = n.href; - return (1 === e && !W(o)) || (0 === e && /^\s*www(\.|\d\.)/i.test(o)) - ? m.some({ - message: `The URL you entered seems to be an external link. Do you want to add the required ${t}:// prefix?`, - preprocess: (e) => ({ ...e, href: t + "://" + o }), - }) - : m.none(); - }, - ke = (e) => { - const t = e.dom.select("a:not([href])"), - n = p( - ((e, t) => { - const n = e.length, - o = new Array(n); - for (let r = 0; r < n; r++) { - const n = e[r]; - o[r] = t(n, r); - } - return o; - })(t, (e) => { - const t = e.name || e.id; - return t ? [{ text: t, value: "#" + t }] : []; - }), - ); - return n.length > 0 - ? m.some([{ text: "None", value: "" }].concat(n)) - : m.none(); - }, - ve = (e) => { - const t = E(e); - return t.length > 0 ? I(t) : m.none(); - }, - ye = (e) => { - try { - return m.some(JSON.parse(e)); - } catch (e) { - return m.none(); - } - }, - xe = (e, t) => { - const n = S(e); - if (n.length > 0) { - const o = v(t, "_blank"), - r = (e) => X(U(e), o); - return (!1 === R(e) ? j(r) : I)(n); - } - return m.none(); - }, - be = [ - { text: "Current window", value: "" }, - { text: "New window", value: "_blank" }, - ], - _e = (e) => { - const t = A(e); - return l(t) - ? I(t).orThunk(() => m.some(be)) - : !1 === t - ? m.none() - : m.some(be); - }, - we = (e, t, n) => { - const o = e.getAttrib(t, n); - return null !== o && o.length > 0 ? m.some(o) : m.none(); - }, - Ce = (e, t) => - ((e) => { - const t = (t) => e.convertURL(t.value || t.url || "", "href"), - n = C(e); - return new Promise((e) => { - o(n) - ? fetch(n) - .then((e) => (e.ok ? e.text().then(ye) : Promise.reject())) - .then(e, () => e(m.none())) - : c(n) - ? n((t) => e(m.some(t))) - : e(m.from(n)); - }).then((e) => - e - .bind(j(t)) - .map((e) => - e.length > 0 ? [{ text: "None", value: "" }].concat(e) : e, - ), - ); - })(e).then((n) => { - const o = ((e, t) => { - const n = e.dom, - o = re(e) ? m.some(ee(e.selection, t)) : m.none(), - r = t.bind((e) => m.from(n.getAttrib(e, "href"))), - l = t.bind((e) => m.from(n.getAttrib(e, "target"))), - a = t.bind((e) => we(n, e, "rel")), - i = t.bind((e) => we(n, e, "class")); - return { - url: r, - text: o, - title: t.bind((e) => we(n, e, "title")), - target: l, - rel: a, - linkClass: i, - }; - })(e, t); - return { - anchor: o, - catalogs: { - targets: _e(e), - rels: xe(e, o.target), - classes: ve(e), - anchor: ke(e), - link: n, - }, - optNode: t, - flags: { titleEnabled: T(e) }, - }; - }), - Oe = (e) => { - const t = ((e) => { - const t = Y(e); - return Ce(e, t); - })(e); - t.then((t) => { - const n = ((e, t) => (n) => { - const o = n.getData(); - if (!o.url.value) return ce(e), void n.close(); - const r = (e) => m.from(o[e]).filter((n) => !v(t.anchor[e], n)), - l = { - href: o.url.value, - text: r("text"), - target: r("target"), - rel: r("rel"), - class: r("linkClass"), - title: r("title"), - }, - a = { - href: o.url.value, - attach: - void 0 !== o.url.meta && o.url.meta.attach - ? o.url.meta.attach - : g, - }; - ((e, t) => - k([fe, pe(_(e), N(e))], (e) => e(t)).fold( - () => Promise.resolve(t), - (n) => - new Promise((o) => { - ((e, t, n) => { - const o = e.selection.getRng(); - he.setEditorTimeout(e, () => { - e.windowManager.confirm(t, (t) => { - e.selection.setRng(o), n(t); - }); - }); - })(e, n.message, (e) => { - o(e ? n.preprocess(t) : t); - }); - }), - ))(e, l).then((t) => { - se(e, a, t); - }), - n.close(); - })(e, t); - return ((e, t, n) => { - const o = e.anchor.text - .map(() => ({ - name: "text", - type: "input", - label: "Text to display", - })) - .toArray(), - r = e.flags.titleEnabled - ? [{ name: "title", type: "input", label: "Title" }] - : [], - l = ((e, t) => { - const n = e.anchor, - o = n.url.getOr(""); - return { - url: { value: o, meta: { original: { value: o } } }, - text: n.text.getOr(""), - title: n.title.getOr(""), - anchor: o, - link: o, - rel: n.rel.getOr(""), - target: n.target.or(t).getOr(""), - linkClass: n.linkClass.getOr(""), - }; - })(e, m.from(O(n))), - a = e.catalogs, - i = me(l, a); - return { - title: "Insert/Edit Link", - size: "normal", - body: { - type: "panel", - items: p([ - [ - { - name: "url", - type: "urlinput", - filetype: "file", - label: "URL", - }, - ], - o, - r, - y([ - a.anchor.map(K("anchor", "Anchors")), - a.rels.map(K("rel", "Rel")), - a.targets.map(K("target", "Open link in...")), - a.link.map(K("link", "Link list")), - a.classes.map(K("linkClass", "Class")), - ]), - ]), - }, - buttons: [ - { type: "cancel", name: "cancel", text: "Cancel" }, - { type: "submit", name: "save", text: "Save", primary: !0 }, - ], - initialData: l, - onChange: (e, { name: t }) => { - i.onChange(e.getData, { name: t }).each((t) => { - e.setData(t); - }); - }, - onSubmit: t, - }; - })(t, n, e); - }).then((t) => { - e.windowManager.open(t); - }); - }; - var Ne = tinymce.util.Tools.resolve("tinymce.util.VK"); - const Ae = (e, t) => e.dom.getParent(t, "a[href]"), - Se = (e) => Ae(e, e.selection.getStart()), - Ee = (e, t) => { - if (t) { - const n = Q(t); - if (/^#/.test(n)) { - const t = e.dom.select(n); - t.length && e.selection.scrollIntoView(t[0], !0); - } else - ((e) => { - const t = document.createElement("a"); - (t.target = "_blank"), - (t.href = e), - (t.rel = "noreferrer noopener"); - const n = document.createEvent("MouseEvents"); - n.initMouseEvent( - "click", - !0, - !0, - window, - 0, - 0, - 0, - 0, - 0, - !1, - !1, - !1, - !1, - 0, - null, - ), - ((e, t) => { - document.body.appendChild(e), - e.dispatchEvent(t), - document.body.removeChild(e); - })(t, n); - })(t.href); - } - }, - Te = (e) => () => { - e.execCommand("mceLink", !1, { dialog: !0 }); - }, - Re = (e) => () => { - Ee(e, Se(e)); - }, - Pe = (e, t) => (e.on("NodeChange", t), () => e.off("NodeChange", t)), - Le = (e) => (t) => { - const n = () => { - t.setActive(!e.mode.isReadOnly() && Z(e, e.selection.getNode())), - t.setEnabled(e.selection.isEditable()); - }; - return n(), Pe(e, n); - }, - Me = (e) => (t) => { - const n = () => { - t.setEnabled(e.selection.isEditable()); - }; - return n(), Pe(e, n); - }, - De = (e) => (t) => { - const n = () => - t.setEnabled( - ((e) => - 1 === - (e.selection.isCollapsed() - ? ne(e.dom.getParents(e.selection.getStart())) - : te(e.selection.getRng()) - ).length)(e), - ); - return n(), Pe(e, n); - }, - Be = (e) => (t) => { - const n = e.dom.getParents(e.selection.getStart()), - o = (n) => { - t.setEnabled( - ((t) => { - return oe(t) || ((n = e.selection.getRng()), te(n).length > 0); - var n; - })(n) && e.selection.isEditable(), - ); - }; - return o(n), Pe(e, (e) => o(e.parents)); - }; - e.add("link", (e) => { - ((e) => { - const t = e.options.register; - t("link_assume_external_targets", { - processor: (e) => { - const t = o(e) || i(e); - return t - ? !0 === e - ? { value: 1, valid: t } - : "http" === e || "https" === e - ? { value: e, valid: t } - : { value: 0, valid: t } - : { valid: !1, message: "Must be a string or a boolean." }; - }, - default: !1, - }), - t("link_context_toolbar", { processor: "boolean", default: !1 }), - t("link_list", { processor: (e) => o(e) || c(e) || u(e, r) }), - t("link_default_target", { processor: "string" }), - t("link_default_protocol", { processor: "string", default: "https" }), - t("link_target_list", { - processor: (e) => i(e) || u(e, r), - default: !0, - }), - t("link_rel_list", { processor: "object[]", default: [] }), - t("link_class_list", { processor: "object[]", default: [] }), - t("link_title", { processor: "boolean", default: !0 }), - t("allow_unsafe_link_target", { processor: "boolean", default: !1 }), - t("link_quicklink", { processor: "boolean", default: !1 }); - })(e), - ((e) => { - e.ui.registry.addToggleButton("link", { - icon: "link", - tooltip: "Insert/edit link", - onAction: Te(e), - onSetup: Le(e), - }), - e.ui.registry.addButton("openlink", { - icon: "new-tab", - tooltip: "Open link", - onAction: Re(e), - onSetup: De(e), - }), - e.ui.registry.addButton("unlink", { - icon: "unlink", - tooltip: "Remove link", - onAction: () => ce(e), - onSetup: Be(e), - }); - })(e), - ((e) => { - e.ui.registry.addMenuItem("openlink", { - text: "Open link", - icon: "new-tab", - onAction: Re(e), - onSetup: De(e), - }), - e.ui.registry.addMenuItem("link", { - icon: "link", - text: "Link...", - shortcut: "Meta+K", - onSetup: Me(e), - onAction: Te(e), - }), - e.ui.registry.addMenuItem("unlink", { - icon: "unlink", - text: "Remove link", - onAction: () => ce(e), - onSetup: Be(e), - }); - })(e), - ((e) => { - e.ui.registry.addContextMenu("link", { - update: (t) => - e.dom.isEditable(t) - ? oe(e.dom.getParents(t, "a")) - ? "link unlink openlink" - : "link" - : "", - }); - })(e), - ((e) => { - const t = (t) => { - const n = e.selection.getNode(); - return t.setEnabled(Z(e, n)), g; - }; - e.ui.registry.addContextForm("quicklink", { - launch: { - type: "contextformtogglebutton", - icon: "link", - tooltip: "Link", - onSetup: Le(e), - }, - label: "Link", - predicate: (t) => w(e) && Z(e, t), - initValue: () => Y(e).fold(() => "", Q), - commands: [ - { - type: "contextformtogglebutton", - icon: "link", - tooltip: "Link", - primary: !0, - onSetup: (t) => { - const n = e.selection.getNode(); - return t.setActive(Z(e, n)), Le(e)(t); - }, - onAction: (t) => { - const n = t.getValue(), - o = ((t) => { - const n = Y(e), - o = re(e); - if (n.isNone() && o) { - const o = ee(e.selection, n); - return x(0 === o.length, t); - } - return m.none(); - })(n); - se( - e, - { href: n, attach: g }, - { - href: n, - text: o, - title: m.none(), - rel: m.none(), - target: m.none(), - class: m.none(), - }, - ), - ((e) => { - e.selection.collapse(!1); - })(e), - t.hide(); - }, - }, - { - type: "contextformbutton", - icon: "unlink", - tooltip: "Remove link", - onSetup: t, - onAction: (t) => { - ce(e), t.hide(); - }, - }, - { - type: "contextformbutton", - icon: "new-tab", - tooltip: "Open link", - onSetup: t, - onAction: (t) => { - Re(e)(), t.hide(); - }, - }, - ], - }); - })(e), - ((e) => { - e.on("click", (t) => { - const n = Ae(e, t.target); - n && Ne.metaKeyPressed(t) && (t.preventDefault(), Ee(e, n)); - }), - e.on("keydown", (t) => { - if ( - !t.isDefaultPrevented() && - 13 === t.keyCode && - ((e) => - !0 === e.altKey && - !1 === e.shiftKey && - !1 === e.ctrlKey && - !1 === e.metaKey)(t) - ) { - const n = Se(e); - n && (t.preventDefault(), Ee(e, n)); - } - }); - })(e), - ((e) => { - e.addCommand("mceLink", (t, n) => { - !0 !== (null == n ? void 0 : n.dialog) && P(e) - ? e.dispatch("contexttoolbar-show", { toolbarKey: "quicklink" }) - : Oe(e); - }); - })(e), - ((e) => { - e.addShortcut("Meta+K", "", () => { - e.execCommand("mceLink"); - }); - })(e); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/lists/plugin.min.js b/src/lib/dist/tinymce/plugins/lists/plugin.min.js deleted file mode 100644 index aef541d2..00000000 --- a/src/lib/dist/tinymce/plugins/lists/plugin.min.js +++ /dev/null @@ -1,1545 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var e = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const t = (e) => (t) => - ((e) => { - const t = typeof e; - return null === e - ? "null" - : "object" === t && Array.isArray(e) - ? "array" - : "object" === t && - ((n = o = e), - (r = String).prototype.isPrototypeOf(n) || - (null === (s = o.constructor) || void 0 === s - ? void 0 - : s.name) === r.name) - ? "string" - : t; - var n, o, r, s; - })(t) === e, - n = (e) => (t) => typeof t === e, - o = t("string"), - r = t("object"), - s = t("array"), - i = n("boolean"), - l = (e) => !((e) => null == e)(e), - a = n("function"), - d = n("number"), - c = () => {}, - u = (e, t) => e === t, - m = (e) => (t) => !e(t), - p = (!1, () => false); - class g { - constructor(e, t) { - (this.tag = e), (this.value = t); - } - static some(e) { - return new g(!0, e); - } - static none() { - return g.singletonNone; - } - fold(e, t) { - return this.tag ? t(this.value) : e(); - } - isSome() { - return this.tag; - } - isNone() { - return !this.tag; - } - map(e) { - return this.tag ? g.some(e(this.value)) : g.none(); - } - bind(e) { - return this.tag ? e(this.value) : g.none(); - } - exists(e) { - return this.tag && e(this.value); - } - forall(e) { - return !this.tag || e(this.value); - } - filter(e) { - return !this.tag || e(this.value) ? this : g.none(); - } - getOr(e) { - return this.tag ? this.value : e; - } - or(e) { - return this.tag ? this : e; - } - getOrThunk(e) { - return this.tag ? this.value : e(); - } - orThunk(e) { - return this.tag ? this : e(); - } - getOrDie(e) { - if (this.tag) return this.value; - throw new Error(null != e ? e : "Called getOrDie on None"); - } - static from(e) { - return l(e) ? g.some(e) : g.none(); - } - getOrNull() { - return this.tag ? this.value : null; - } - getOrUndefined() { - return this.value; - } - each(e) { - this.tag && e(this.value); - } - toArray() { - return this.tag ? [this.value] : []; - } - toString() { - return this.tag ? `some(${this.value})` : "none()"; - } - } - g.singletonNone = new g(!1); - const h = Array.prototype.slice, - f = Array.prototype.indexOf, - y = Array.prototype.push, - v = (e, t) => { - return (n = e), (o = t), f.call(n, o) > -1; - var n, o; - }, - C = (e, t) => { - for (let n = 0, o = e.length; n < o; n++) if (t(e[n], n)) return !0; - return !1; - }, - b = (e, t) => { - const n = e.length, - o = new Array(n); - for (let r = 0; r < n; r++) { - const n = e[r]; - o[r] = t(n, r); - } - return o; - }, - S = (e, t) => { - for (let n = 0, o = e.length; n < o; n++) t(e[n], n); - }, - N = (e, t) => { - const n = []; - for (let o = 0, r = e.length; o < r; o++) { - const r = e[o]; - t(r, o) && n.push(r); - } - return n; - }, - L = (e, t, n) => ( - S(e, (e, o) => { - n = t(n, e, o); - }), - n - ), - O = (e, t, n) => { - for (let o = 0, r = e.length; o < r; o++) { - const r = e[o]; - if (t(r, o)) return g.some(r); - if (n(r, o)) break; - } - return g.none(); - }, - k = (e, t) => O(e, t, p), - A = (e, t) => - ((e) => { - const t = []; - for (let n = 0, o = e.length; n < o; ++n) { - if (!s(e[n])) - throw new Error( - "Arr.flatten item " + n + " was not an array, input: " + e, - ); - y.apply(t, e[n]); - } - return t; - })(b(e, t)), - T = (e) => { - const t = h.call(e, 0); - return t.reverse(), t; - }, - x = (e, t) => (t >= 0 && t < e.length ? g.some(e[t]) : g.none()), - E = (e) => x(e, 0), - w = (e) => x(e, e.length - 1), - D = (e, t) => { - const n = [], - o = a(t) ? (e) => C(n, (n) => t(n, e)) : (e) => v(n, e); - for (let t = 0, r = e.length; t < r; t++) { - const r = e[t]; - o(r) || n.push(r); - } - return n; - }, - B = (e, t, n = u) => e.exists((e) => n(e, t)), - I = (e, t, n) => - e.isSome() && t.isSome() - ? g.some(n(e.getOrDie(), t.getOrDie())) - : g.none(), - P = (e) => { - if (null == e) throw new Error("Node cannot be null or undefined"); - return { dom: e }; - }, - M = (e, t) => { - const n = (t || document).createElement(e); - return P(n); - }, - R = P, - U = (e, t) => e.dom === t.dom; - "undefined" != typeof window ? window : Function("return this;")(); - const $ = (e) => e.dom.nodeName.toLowerCase(), - _ = (1, (e) => 1 === ((e) => e.dom.nodeType)(e)); - const F = (e) => (t) => _(t) && $(t) === e, - H = (e) => g.from(e.dom.parentNode).map(R), - V = (e) => b(e.dom.childNodes, R), - j = (e, t) => { - const n = e.dom.childNodes; - return g.from(n[t]).map(R); - }, - K = (e) => j(e, 0), - z = (e) => j(e, e.dom.childNodes.length - 1), - Q = (e, t, n) => { - let o = e.dom; - const r = a(n) ? n : p; - for (; o.parentNode; ) { - o = o.parentNode; - const e = R(o); - if (t(e)) return g.some(e); - if (r(e)) break; - } - return g.none(); - }, - W = (e, t, n) => - ((e, t, n, o, r) => - o(n) ? g.some(n) : a(r) && r(n) ? g.none() : t(n, o, r))(0, Q, e, t, n), - q = (e, t) => { - H(e).each((n) => { - n.dom.insertBefore(t.dom, e.dom); - }); - }, - Z = (e, t) => { - e.dom.appendChild(t.dom); - }, - G = (e, t) => { - S(t, (t) => { - Z(e, t); - }); - }, - J = (e) => { - (e.dom.textContent = ""), - S(V(e), (e) => { - X(e); - }); - }, - X = (e) => { - const t = e.dom; - null !== t.parentNode && t.parentNode.removeChild(t); - }; - var Y = tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"), - ee = tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"), - te = tinymce.util.Tools.resolve("tinymce.util.VK"); - const ne = (e) => b(e, R), - oe = Object.keys, - re = (e, t) => { - const n = oe(e); - for (let o = 0, r = n.length; o < r; o++) { - const r = n[o]; - t(e[r], r); - } - }, - se = (e, t) => { - const n = e.dom; - re(t, (e, t) => { - ((e, t, n) => { - if (!(o(n) || i(n) || d(n))) - throw ( - (console.error( - "Invalid call to Attribute.set. Key ", - t, - ":: Value ", - n, - ":: Element ", - e, - ), - new Error("Attribute value was not simple")) - ); - e.setAttribute(t, n + ""); - })(n, t, e); - }); - }, - ie = (e) => L(e.dom.attributes, (e, t) => ((e[t.name] = t.value), e), {}), - le = (e) => ((e, t) => R(e.dom.cloneNode(!0)))(e), - ae = (e, t) => { - const n = ((e, t) => { - const n = M(t), - o = ie(e); - return se(n, o), n; - })(e, t); - var o, r; - (r = n), - ((e) => g.from(e.dom.nextSibling).map(R))((o = e)).fold( - () => { - H(o).each((e) => { - Z(e, r); - }); - }, - (e) => { - q(e, r); - }, - ); - const s = V(e); - return G(n, s), X(e), n; - }; - var de = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), - ce = tinymce.util.Tools.resolve("tinymce.util.Tools"); - const ue = (e) => (t) => l(t) && t.nodeName.toLowerCase() === e, - me = (e) => (t) => l(t) && e.test(t.nodeName), - pe = (e) => l(e) && 3 === e.nodeType, - ge = (e) => l(e) && 1 === e.nodeType, - he = me(/^(OL|UL|DL)$/), - fe = me(/^(OL|UL)$/), - ye = ue("ol"), - ve = me(/^(LI|DT|DD)$/), - Ce = me(/^(DT|DD)$/), - be = me(/^(TH|TD)$/), - Se = ue("br"), - Ne = (e, t) => l(t) && t.nodeName in e.schema.getTextBlockElements(), - Le = (e, t) => l(e) && e.nodeName in t, - Oe = (e, t) => l(t) && t.nodeName in e.schema.getVoidElements(), - ke = (e, t, n) => { - const o = e.isEmpty(t); - return ( - !(n && e.select("span[data-mce-type=bookmark]", t).length > 0) && o - ); - }, - Ae = (e, t) => e.isChildOf(t, e.getRoot()), - Te = (e) => (t) => t.options.get(e), - xe = Te("lists_indent_on_tab"), - Ee = Te("forced_root_block"), - we = Te("forced_root_block_attrs"), - De = (e, t) => { - const n = e.dom, - o = e.schema.getBlockElements(), - r = n.createFragment(), - s = Ee(e), - i = we(e); - let l, - a, - d = !1; - for ( - a = n.create(s, i), Le(t.firstChild, o) || r.appendChild(a); - (l = t.firstChild); - - ) { - const e = l.nodeName; - d || - ("SPAN" === e && "bookmark" === l.getAttribute("data-mce-type")) || - (d = !0), - Le(l, o) - ? (r.appendChild(l), (a = null)) - : (a || ((a = n.create(s, i)), r.appendChild(a)), a.appendChild(l)); - } - return ( - !d && a && a.appendChild(n.create("br", { "data-mce-bogus": "1" })), r - ); - }, - Be = de.DOM, - Ie = F("dd"), - Pe = F("dt"), - Me = (e, t) => { - var n; - Ie(t) - ? ae(t, "dt") - : Pe(t) && - ((n = t), g.from(n.dom.parentElement).map(R)).each((n) => - ((e, t, n) => { - const o = Be.select('span[data-mce-type="bookmark"]', t), - r = De(e, n), - s = Be.createRng(); - s.setStartAfter(n), s.setEndAfter(t); - const i = s.extractContents(); - for (let t = i.firstChild; t; t = t.firstChild) - if ("LI" === t.nodeName && e.dom.isEmpty(t)) { - Be.remove(t); - break; - } - e.dom.isEmpty(i) || Be.insertAfter(i, t), Be.insertAfter(r, t); - const l = n.parentElement; - l && - ke(e.dom, l) && - ((e) => { - const t = e.parentNode; - t && - ce.each(o, (e) => { - t.insertBefore(e, n.parentNode); - }), - Be.remove(e); - })(l), - Be.remove(n), - ke(e.dom, t) && Be.remove(t); - })(e, n.dom, t.dom), - ); - }, - Re = (e) => { - Pe(e) && ae(e, "dd"); - }, - Ue = (e, t) => { - if (pe(e)) return { container: e, offset: t }; - const n = Y.getNode(e, t); - return pe(n) - ? { container: n, offset: t >= e.childNodes.length ? n.data.length : 0 } - : n.previousSibling && pe(n.previousSibling) - ? { - container: n.previousSibling, - offset: n.previousSibling.data.length, - } - : n.nextSibling && pe(n.nextSibling) - ? { container: n.nextSibling, offset: 0 } - : { container: e, offset: t }; - }, - $e = (e) => { - const t = e.cloneRange(), - n = Ue(e.startContainer, e.startOffset); - t.setStart(n.container, n.offset); - const o = Ue(e.endContainer, e.endOffset); - return t.setEnd(o.container, o.offset), t; - }, - _e = ["OL", "UL", "DL"], - Fe = _e.join(","), - He = (e, t) => { - const n = t || e.selection.getStart(!0); - return e.dom.getParent(n, Fe, Ke(e, n)); - }, - Ve = (e) => { - const t = e.selection.getSelectedBlocks(); - return N( - ((e, t) => { - const n = ce.map( - t, - (t) => e.dom.getParent(t, "li,dd,dt", Ke(e, t)) || t, - ); - return D(n); - })(e, t), - ve, - ); - }, - je = (e, t) => { - const n = e.dom.getParents(t, "TD,TH"); - return n.length > 0 ? n[0] : e.getBody(); - }, - Ke = (e, t) => { - const n = e.dom.getParents(t, e.dom.isBlock), - o = k(n, (t) => { - return ( - (n = e.schema), - !he((o = t)) && - !ve(o) && - C(_e, (e) => n.isValidChild(o.nodeName, e)) - ); - var n, o; - }); - return o.getOr(e.getBody()); - }, - ze = (e, t) => { - const n = e.dom.getParents(t, "ol,ul", Ke(e, t)); - return w(n); - }, - Qe = (e, t) => { - const n = b(t, (t) => ze(e, t).getOr(t)); - return D(n); - }, - We = (e) => /\btox\-/.test(e.className), - qe = (e, t) => O(e, he, be).exists((e) => e.nodeName === t && !We(e)), - Ze = (e, t) => null !== t && !e.dom.isEditable(t), - Ge = (e, t) => { - const n = e.dom.getParent(t, "ol,ul,dl"); - return Ze(e, n); - }, - Je = (e, t) => { - const n = e.selection.getNode(); - return ( - t({ parents: e.dom.getParents(n), element: n }), - e.on("NodeChange", t), - () => e.off("NodeChange", t) - ); - }, - Xe = (e, t, n) => e.dispatch("ListMutation", { action: t, element: n }), - Ye = ((et = /^\s+|\s+$/g), (e) => e.replace(et, "")); - var et; - const tt = (e, t, n) => { - ((e, t, n) => { - if (!o(n)) - throw ( - (console.error( - "Invalid call to CSS.set. Property ", - t, - ":: Value ", - n, - ":: Element ", - e, - ), - new Error("CSS value must be a string: " + n)) - ); - ((e) => void 0 !== e.style && a(e.style.getPropertyValue))(e) && - e.style.setProperty(t, n); - })(e.dom, t, n); - }, - nt = (e, t) => { - Z(e.item, t.list); - }, - ot = (e, t) => { - const n = { list: M(t, e), item: M("li", e) }; - return Z(n.list, n.item), n; - }, - rt = (e) => - ((e, t) => { - const n = e.dom; - if (1 !== n.nodeType) return !1; - { - const e = n; - if (void 0 !== e.matches) return e.matches(t); - if (void 0 !== e.msMatchesSelector) return e.msMatchesSelector(t); - if (void 0 !== e.webkitMatchesSelector) - return e.webkitMatchesSelector(t); - if (void 0 !== e.mozMatchesSelector) return e.mozMatchesSelector(t); - throw new Error("Browser lacks native selectors"); - } - })(e, "OL,UL"), - st = (e) => K(e).exists(rt), - it = (e) => e.depth > 0, - lt = (e) => e.isSelected, - at = (e) => { - const t = V(e), - n = z(e).exists(rt) ? t.slice(0, -1) : t; - return b(n, le); - }, - dt = (e) => ( - S(e, (t, n) => { - ((e, t) => { - const n = e[t].depth, - o = (e) => e.depth === n && !e.dirty, - r = (e) => e.depth < n; - return O(T(e.slice(0, t)), o, r).orThunk(() => - O(e.slice(t + 1), o, r), - ); - })(e, n).fold( - () => { - t.dirty && - ((e) => { - e.listAttributes = ((e, t) => { - const n = {}; - var o; - return ( - ((e, t, n, o) => { - re(e, (e, r) => { - (t(e, r) ? n : o)(e, r); - }); - })( - e, - t, - ((o = n), - (e, t) => { - o[t] = e; - }), - c, - ), - n - ); - })(e.listAttributes, (e, t) => "start" !== t); - })(t); - }, - (e) => { - return ( - (o = e), - ((n = t).listType = o.listType), - void (n.listAttributes = { ...o.listAttributes }) - ); - var n, o; - }, - ); - }), - e - ), - ct = (e, t, n, o) => - K(o) - .filter(rt) - .fold( - () => { - t.each((e) => { - U(e.start, o) && n.set(!0); - }); - const r = ((e, t, n) => - H(e) - .filter(_) - .map((o) => ({ - depth: t, - dirty: !1, - isSelected: n, - content: at(e), - itemAttributes: ie(e), - listAttributes: ie(o), - listType: $(o), - })))(o, e, n.get()); - t.each((e) => { - U(e.end, o) && n.set(!1); - }); - const s = z(o) - .filter(rt) - .map((o) => ut(e, t, n, o)) - .getOr([]); - return r.toArray().concat(s); - }, - (o) => ut(e, t, n, o), - ), - ut = (e, t, n, o) => A(V(o), (o) => (rt(o) ? ut : ct)(e + 1, t, n, o)), - mt = (e, t) => { - const n = dt(t); - return ((e, t) => { - const n = L( - t, - (t, n) => - n.depth > t.length - ? ((e, t, n) => { - const o = ((e, t, n) => { - const o = []; - for (let r = 0; r < n; r++) o.push(ot(e, t.listType)); - return o; - })(e, n, n.depth - t.length); - var r; - return ( - ((e) => { - for (let t = 1; t < e.length; t++) nt(e[t - 1], e[t]); - })(o), - ((e, t) => { - for (let t = 0; t < e.length - 1; t++) - tt(e[t].item, "list-style-type", "none"); - w(e).each((e) => { - se(e.list, t.listAttributes), - se(e.item, t.itemAttributes), - G(e.item, t.content); - }); - })(o, n), - (r = o), - I(w(t), E(r), nt), - t.concat(o) - ); - })(e, t, n) - : ((e, t, n) => { - const o = t.slice(0, n.depth); - return ( - w(o).each((t) => { - const o = ((e, t, n) => { - const o = M("li", e); - return se(o, t), G(o, n), o; - })(e, n.itemAttributes, n.content); - ((e, t) => { - Z(e.list, t), (e.item = t); - })(t, o), - ((e, t) => { - $(e.list) !== t.listType && - (e.list = ae(e.list, t.listType)), - se(e.list, t.listAttributes); - })(t, n); - }), - o - ); - })(e, t, n), - [], - ); - return E(n).map((e) => e.list); - })(e.contentDocument, n).toArray(); - }, - pt = (e, t, n) => { - const o = ((e, t) => { - const n = ((e) => { - let t = !1; - return { - get: () => t, - set: (e) => { - t = e; - }, - }; - })(); - return b(e, (e) => ({ sourceList: e, entries: ut(0, t, n, e) })); - })( - t, - ((e) => { - const t = b(Ve(e), R); - return I(k(t, m(st)), k(T(t), m(st)), (e, t) => ({ - start: e, - end: t, - })); - })(e), - ); - S(o, (t) => { - ((e, t) => { - S(N(e, lt), (e) => - ((e, t) => { - switch (e) { - case "Indent": - t.depth++; - break; - case "Outdent": - t.depth--; - break; - case "Flatten": - t.depth = 0; - } - t.dirty = !0; - })(t, e), - ); - })(t.entries, n); - const o = ((e, t) => - A( - ((e, t) => { - if (0 === e.length) return []; - { - let n = t(e[0]); - const o = []; - let r = []; - for (let s = 0, i = e.length; s < i; s++) { - const i = e[s], - l = t(i); - l !== n && (o.push(r), (r = [])), (n = l), r.push(i); - } - return 0 !== r.length && o.push(r), o; - } - })(t, it), - (t) => - E(t).exists(it) - ? mt(e, t) - : ((e, t) => { - const n = dt(t); - return b(n, (t) => { - const n = ((e, t) => { - const n = document.createDocumentFragment(); - return ( - S(e, (e) => { - n.appendChild(e.dom); - }), - R(n) - ); - })(t.content); - return R(De(e, n.dom)); - }); - })(e, t), - ))(e, t.entries); - var r; - S(o, (t) => { - Xe(e, "Indent" === n ? "IndentList" : "OutdentList", t.dom); - }), - (r = t.sourceList), - S(o, (e) => { - q(r, e); - }), - X(t.sourceList); - }); - }, - gt = (e, t) => { - const n = ne( - ((e) => { - const t = ((e) => { - const t = ze(e, e.selection.getStart()), - n = N(e.selection.getSelectedBlocks(), fe); - return t.toArray().concat(n); - })(e); - return Qe(e, t); - })(e), - ), - o = ne(((e) => N(Ve(e), Ce))(e)); - let r = !1; - if (n.length || o.length) { - const s = e.selection.getBookmark(); - pt(e, n, t), - ((e, t, n) => { - S(n, "Indent" === t ? Re : (t) => Me(e, t)); - })(e, t, o), - e.selection.moveToBookmark(s), - e.selection.setRng($e(e.selection.getRng())), - e.nodeChanged(), - (r = !0); - } - return r; - }, - ht = (e, t) => - !((e) => { - const t = He(e); - return Ze(e, t); - })(e) && gt(e, t), - ft = (e) => ht(e, "Indent"), - yt = (e) => ht(e, "Outdent"), - vt = (e) => ht(e, "Flatten"), - Ct = (e) => "\ufeff" === e; - var bt = tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"); - const St = de.DOM, - Nt = (e) => { - const t = {}, - n = (n) => { - let o = e[n ? "startContainer" : "endContainer"], - r = e[n ? "startOffset" : "endOffset"]; - if (ge(o)) { - const e = St.create("span", { "data-mce-type": "bookmark" }); - o.hasChildNodes() - ? ((r = Math.min(r, o.childNodes.length - 1)), - n - ? o.insertBefore(e, o.childNodes[r]) - : St.insertAfter(e, o.childNodes[r])) - : o.appendChild(e), - (o = e), - (r = 0); - } - (t[n ? "startContainer" : "endContainer"] = o), - (t[n ? "startOffset" : "endOffset"] = r); - }; - return n(!0), e.collapsed || n(), t; - }, - Lt = (e) => { - const t = (t) => { - let n = e[t ? "startContainer" : "endContainer"], - o = e[t ? "startOffset" : "endOffset"]; - if (n) { - if (ge(n) && n.parentNode) { - const e = n; - (o = ((e) => { - var t; - let n = - null === (t = e.parentNode) || void 0 === t - ? void 0 - : t.firstChild, - o = 0; - for (; n; ) { - if (n === e) return o; - (ge(n) && "bookmark" === n.getAttribute("data-mce-type")) || - o++, - (n = n.nextSibling); - } - return -1; - })(n)), - (n = n.parentNode), - St.remove(e), - !n.hasChildNodes() && - St.isBlock(n) && - n.appendChild(St.create("br")); - } - (e[t ? "startContainer" : "endContainer"] = n), - (e[t ? "startOffset" : "endOffset"] = o); - } - }; - t(!0), t(); - const n = St.createRng(); - return ( - n.setStart(e.startContainer, e.startOffset), - e.endContainer && n.setEnd(e.endContainer, e.endOffset), - $e(n) - ); - }, - Ot = (e) => { - switch (e) { - case "UL": - return "ToggleUlList"; - case "OL": - return "ToggleOlList"; - case "DL": - return "ToggleDLList"; - } - }, - kt = (e, t) => { - ce.each(t, (t, n) => { - e.setAttribute(n, t); - }); - }, - At = (e, t, n) => { - ((e, t, n) => { - const o = n["list-style-type"] ? n["list-style-type"] : null; - e.setStyle(t, "list-style-type", o); - })(e, t, n), - ((e, t, n) => { - kt(t, n["list-attributes"]), - ce.each(e.select("li", t), (e) => { - kt(e, n["list-item-attributes"]); - }); - })(e, t, n); - }, - Tt = (e, t) => l(t) && !Le(t, e.schema.getBlockElements()), - xt = (e, t, n, o) => { - let r = t[n ? "startContainer" : "endContainer"]; - const s = t[n ? "startOffset" : "endOffset"]; - ge(r) && (r = r.childNodes[Math.min(s, r.childNodes.length - 1)] || r), - !n && Se(r.nextSibling) && (r = r.nextSibling); - const i = (t, n) => { - var r; - const s = new ee( - t, - ((t) => { - for (; !e.dom.isBlock(t) && t.parentNode && o !== t; ) - t = t.parentNode; - return t; - })(t), - ), - i = n ? "next" : "prev"; - let l; - for (; (l = s[i]()); ) - if ( - !Oe(e, l) && - !Ct(l.textContent) && - 0 !== - (null === (r = l.textContent) || void 0 === r ? void 0 : r.length) - ) - return g.some(l); - return g.none(); - }; - if (n && pe(r)) - if (Ct(r.textContent)) r = i(r, !1).getOr(r); - else - for ( - null !== r.parentNode && Tt(e, r.parentNode) && (r = r.parentNode); - null !== r.previousSibling && - (Tt(e, r.previousSibling) || pe(r.previousSibling)); - - ) - r = r.previousSibling; - if (!n && pe(r)) - if (Ct(r.textContent)) r = i(r, !0).getOr(r); - else - for ( - null !== r.parentNode && Tt(e, r.parentNode) && (r = r.parentNode); - null !== r.nextSibling && - (Tt(e, r.nextSibling) || pe(r.nextSibling)); - - ) - r = r.nextSibling; - for (; r.parentNode !== o; ) { - const t = r.parentNode; - if (Ne(e, r)) return r; - if (/^(TD|TH)$/.test(t.nodeName)) return r; - r = t; - } - return r; - }, - Et = (e, t, n) => { - const o = e.selection.getRng(); - let r = "LI"; - const s = Ke( - e, - ((e, t) => { - const n = e.selection.getStart(!0), - o = xt(e, t, !0, e.getBody()); - return ( - (r = R(o)), - (s = R(t.commonAncestorContainer)), - (i = r), - (l = (function (e, ...t) { - return (...n) => { - const o = t.concat(n); - return e.apply(null, o); - }; - })(U, s)), - Q(i, l, void 0).isSome() ? t.commonAncestorContainer : n - ); - var r, s, i, l; - })(e, o), - ), - i = e.dom; - if ("false" === i.getContentEditable(e.selection.getNode())) return; - "DL" === (t = t.toUpperCase()) && (r = "DT"); - const l = Nt(o), - a = N( - ((e, t, n) => { - const o = [], - r = e.dom, - s = xt(e, t, !0, n), - i = xt(e, t, !1, n); - let l; - const a = []; - for (let e = s; e && (a.push(e), e !== i); e = e.nextSibling); - return ( - ce.each(a, (t) => { - var s; - if (Ne(e, t)) return o.push(t), void (l = null); - if (r.isBlock(t) || Se(t)) - return Se(t) && r.remove(t), void (l = null); - const i = t.nextSibling; - bt.isBookmarkNode(t) && - (he(i) || Ne(e, i) || (!i && t.parentNode === n)) - ? (l = null) - : (l || - ((l = r.create("p")), - null === (s = t.parentNode) || - void 0 === s || - s.insertBefore(l, t), - o.push(l)), - l.appendChild(t)); - }), - o - ); - })(e, o, s), - e.dom.isEditable, - ); - ce.each(a, (o) => { - let s; - const l = o.previousSibling, - a = o.parentNode; - ve(a) || - (l && - he(l) && - l.nodeName === t && - ((e, t, n) => { - const o = e.getStyle(t, "list-style-type"); - let r = n ? n["list-style-type"] : ""; - return (r = null === r ? "" : r), o === r; - })(i, l, n) - ? ((s = l), (o = i.rename(o, r)), l.appendChild(o)) - : ((s = i.create(t)), - a.insertBefore(s, o), - s.appendChild(o), - (o = i.rename(o, r))), - ((e, t, n) => { - ce.each( - [ - "margin", - "margin-right", - "margin-bottom", - "margin-left", - "margin-top", - "padding", - "padding-right", - "padding-bottom", - "padding-left", - "padding-top", - ], - (n) => e.setStyle(t, n, ""), - ); - })(i, o), - At(i, s, n), - Dt(e.dom, s)); - }), - e.selection.setRng(Lt(l)); - }, - wt = (e, t, n) => { - return ( - ((e, t) => he(e) && e.nodeName === (null == t ? void 0 : t.nodeName))( - t, - n, - ) && - ((e, t, n) => - e.getStyle(t, "list-style-type", !0) === - e.getStyle(n, "list-style-type", !0))(e, t, n) && - ((o = n), t.className === o.className) - ); - var o; - }, - Dt = (e, t) => { - let n, - o = t.nextSibling; - if (wt(e, t, o)) { - const r = o; - for (; (n = r.firstChild); ) t.appendChild(n); - e.remove(r); - } - if (((o = t.previousSibling), wt(e, t, o))) { - const r = o; - for (; (n = r.lastChild); ) t.insertBefore(n, t.firstChild); - e.remove(r); - } - }, - Bt = (e, t, n, o) => { - if (t.nodeName !== n) { - const r = e.dom.rename(t, n); - At(e.dom, r, o), Xe(e, Ot(n), r); - } else At(e.dom, t, o), Xe(e, Ot(n), t); - }, - It = (e, t, n, o) => { - if ( - (t.classList.forEach((e, n, o) => { - e.startsWith("tox-") && - (o.remove(e), 0 === o.length && t.removeAttribute("class")); - }), - t.nodeName !== n) - ) { - const r = e.dom.rename(t, n); - At(e.dom, r, o), Xe(e, Ot(n), r); - } else At(e.dom, t, o), Xe(e, Ot(n), t); - }, - Pt = (e) => "list-style-type" in e, - Mt = (e, t, n) => { - const o = He(e); - if (Ge(e, o)) return; - const s = ((e) => { - const t = He(e), - n = e.selection.getSelectedBlocks(); - return ((e, t) => l(e) && 1 === t.length && t[0] === e)(t, n) - ? ((e) => N(e.querySelectorAll(Fe), he))(t) - : N(n, (e) => he(e) && t !== e); - })(e), - i = r(n) ? n : {}; - s.length > 0 - ? ((e, t, n, o, r) => { - const s = he(t); - if (!s || t.nodeName !== o || Pt(r) || We(t)) { - Et(e, o, r); - const i = Nt(e.selection.getRng()), - l = s ? [t, ...n] : n, - a = s && We(t) ? It : Bt; - ce.each(l, (t) => { - a(e, t, o, r); - }), - e.selection.setRng(Lt(i)); - } else vt(e); - })(e, o, s, t, i) - : ((e, t, n, o) => { - if (t !== e.getBody()) - if (t) - if (t.nodeName !== n || Pt(o) || We(t)) { - const r = Nt(e.selection.getRng()); - We(t) && - t.classList.forEach((e, n, o) => { - e.startsWith("tox-") && - (o.remove(e), - 0 === o.length && t.removeAttribute("class")); - }), - At(e.dom, t, o); - const s = e.dom.rename(t, n); - Dt(e.dom, s), - e.selection.setRng(Lt(r)), - Et(e, n, o), - Xe(e, Ot(n), s); - } else vt(e); - else Et(e, n, o), Xe(e, Ot(n), t); - })(e, o, t, i); - }, - Rt = de.DOM, - Ut = (e, t) => { - const n = ce.grep(e.select("ol,ul", t)); - ce.each(n, (t) => { - ((e, t) => { - const n = t.parentElement; - if (n && "LI" === n.nodeName && n.firstChild === t) { - const o = n.previousSibling; - o && "LI" === o.nodeName - ? (o.appendChild(t), ke(e, n) && Rt.remove(n)) - : Rt.setStyle(n, "listStyleType", "none"); - } - if (he(n)) { - const e = n.previousSibling; - e && "LI" === e.nodeName && e.appendChild(t); - } - })(e, t); - }); - }, - $t = (e, t, n, o) => { - let r = t.startContainer; - const s = t.startOffset; - if (pe(r) && (n ? s < r.data.length : s > 0)) return r; - const i = e.schema.getNonEmptyElements(); - ge(r) && (r = Y.getNode(r, s)); - const l = new ee(r, o); - n && - ((e, t) => - !!Se(t) && e.isBlock(t.nextSibling) && !Se(t.previousSibling))( - e.dom, - r, - ) && - l.next(); - const a = n ? l.next.bind(l) : l.prev2.bind(l); - for (; (r = a()); ) { - if ("LI" === r.nodeName && !r.hasChildNodes()) return r; - if (i[r.nodeName]) return r; - if (pe(r) && r.data.length > 0) return r; - } - return null; - }, - _t = (e, t) => { - const n = t.childNodes; - return 1 === n.length && !he(n[0]) && e.isBlock(n[0]); - }, - Ft = (e, t, n) => { - let o; - const r = t.parentNode; - if (!Ae(e, t) || !Ae(e, n)) return; - he(n.lastChild) && (o = n.lastChild), - r === n.lastChild && - Se(r.previousSibling) && - e.remove(r.previousSibling); - const s = n.lastChild; - s && Se(s) && t.hasChildNodes() && e.remove(s), - ke(e, n, !0) && J(R(n)), - ((e, t, n) => { - let o; - const r = _t(e, n) ? n.firstChild : n; - if ( - (((e, t) => { - _t(e, t) && e.remove(t.firstChild, !0); - })(e, t), - !ke(e, t, !0)) - ) - for (; (o = t.firstChild); ) r.appendChild(o); - })(e, t, n), - o && n.appendChild(o); - const i = ((e, t) => { - const n = e.dom, - o = t.dom; - return n !== o && n.contains(o); - })(R(n), R(t)) - ? e.getParents(t, he, n) - : []; - e.remove(t), - S(i, (t) => { - ke(e, t) && t !== e.getRoot() && e.remove(t); - }); - }, - Ht = (e, t) => { - const n = e.dom, - o = e.selection, - r = o.getStart(), - s = je(e, r), - i = n.getParent(o.getStart(), "LI", s); - if (i) { - const r = i.parentElement; - if (r === e.getBody() && ke(n, r)) return !0; - const l = $e(o.getRng()), - a = n.getParent($t(e, l, t, s), "LI", s); - if (a && a !== i) - return ( - e.undoManager.transact(() => { - var n, o; - t - ? ((e, t, n, o) => { - const r = e.dom; - if (r.isEmpty(o)) - ((e, t, n) => { - J(R(n)), - Ft(e.dom, t, n), - e.selection.setCursorLocation(n, 0); - })(e, n, o); - else { - const s = Nt(t); - Ft(r, n, o), e.selection.setRng(Lt(s)); - } - })(e, l, a, i) - : (null === (o = (n = i).parentNode) || void 0 === o - ? void 0 - : o.firstChild) === n - ? yt(e) - : ((e, t, n, o) => { - const r = Nt(t); - Ft(e.dom, n, o); - const s = Lt(r); - e.selection.setRng(s); - })(e, l, i, a); - }), - !0 - ); - if (!a && !t && 0 === l.startOffset && 0 === l.endOffset) - return ( - e.undoManager.transact(() => { - vt(e); - }), - !0 - ); - } - return !1; - }, - Vt = (e) => { - const t = e.selection.getStart(), - n = je(e, t); - return e.dom.getParent(t, "LI,DT,DD", n) || Ve(e).length > 0; - }, - jt = (e, t) => { - const n = e.selection; - return ( - !Ge(e, n.getNode()) && - (n.isCollapsed() - ? ((e, t) => - Ht(e, t) || - ((e, t) => { - const n = e.dom, - o = e.selection.getStart(), - r = je(e, o), - s = n.getParent(o, n.isBlock, r); - if (s && n.isEmpty(s)) { - const o = $e(e.selection.getRng()), - i = n.getParent($t(e, o, t, r), "LI", r); - if (i) { - const l = (e) => v(["td", "th", "caption"], $(e)), - a = (e) => e.dom === r; - return ( - !!((e, t, n = u) => - I(e, t, n).getOr(e.isNone() && t.isNone()))( - W(R(i), l, a), - W(R(o.startContainer), l, a), - U, - ) && - (e.undoManager.transact(() => { - const o = i.parentNode; - ((e, t, n) => { - const o = e.getParent(t.parentNode, e.isBlock, n); - e.remove(t), o && e.isEmpty(o) && e.remove(o); - })(n, s, r), - Dt(n, o), - e.selection.select(i, !0), - e.selection.collapse(t); - }), - !0) - ); - } - } - return !1; - })(e, t))(e, t) - : ((e) => - !!Vt(e) && - (e.undoManager.transact(() => { - e.execCommand("Delete"), Ut(e.dom, e.getBody()); - }), - !0))(e)) - ); - }, - Kt = (e) => { - const t = T(Ye(e).split("")), - n = b(t, (e, t) => { - const n = e.toUpperCase().charCodeAt(0) - "A".charCodeAt(0) + 1; - return Math.pow(26, t) * n; - }); - return L(n, (e, t) => e + t, 0); - }, - zt = (e) => { - if (--e < 0) return ""; - { - const t = e % 26, - n = Math.floor(e / 26); - return zt(n) + String.fromCharCode("A".charCodeAt(0) + t); - } - }, - Qt = (e) => { - const t = parseInt(e.start, 10); - return B(e.listStyleType, "upper-alpha") - ? zt(t) - : B(e.listStyleType, "lower-alpha") - ? zt(t).toLowerCase() - : e.start; - }, - Wt = (e, t) => () => { - const n = He(e); - return l(n) && n.nodeName === t; - }, - qt = (e) => { - e.addCommand("mceListProps", () => { - ((e) => { - const t = He(e); - ye(t) && - !Ge(e, t) && - e.windowManager.open({ - title: "List Properties", - body: { - type: "panel", - items: [ - { - type: "input", - name: "start", - label: "Start list at number", - inputMode: "numeric", - }, - ], - }, - initialData: { - start: Qt({ - start: e.dom.getAttrib(t, "start", "1"), - listStyleType: g.from(e.dom.getStyle(t, "list-style-type")), - }), - }, - buttons: [ - { type: "cancel", name: "cancel", text: "Cancel" }, - { type: "submit", name: "save", text: "Save", primary: !0 }, - ], - onSubmit: (t) => { - ((e) => { - switch ( - ((e) => - /^[0-9]+$/.test(e) - ? 2 - : /^[A-Z]+$/.test(e) - ? 0 - : /^[a-z]+$/.test(e) - ? 1 - : e.length > 0 - ? 4 - : 3)(e) - ) { - case 2: - return g.some({ listStyleType: g.none(), start: e }); - case 0: - return g.some({ - listStyleType: g.some("upper-alpha"), - start: Kt(e).toString(), - }); - case 1: - return g.some({ - listStyleType: g.some("lower-alpha"), - start: Kt(e).toString(), - }); - case 3: - return g.some({ listStyleType: g.none(), start: "" }); - case 4: - return g.none(); - } - })(t.getData().start).each((t) => { - e.execCommand("mceListUpdate", !1, { - attrs: { start: "1" === t.start ? "" : t.start }, - styles: { "list-style-type": t.listStyleType.getOr("") }, - }); - }), - t.close(); - }, - }); - })(e); - }); - }; - var Zt = tinymce.util.Tools.resolve("tinymce.html.Node"); - const Gt = (e) => 3 === e.type, - Jt = (e) => 0 === e.length, - Xt = (e) => { - const t = (t, n) => { - const o = Zt.create("li"); - S(t, (e) => o.append(e)), n ? e.insert(o, n, !0) : e.append(o); - }, - n = L( - e.children(), - (e, n) => (Gt(n) ? [...e, n] : Jt(e) || Gt(n) ? e : (t(e, n), [])), - [], - ); - Jt(n) || t(n); - }, - Yt = (e, t) => (n) => ( - n.setEnabled(e.selection.isEditable()), - Je(e, (o) => { - n.setActive(qe(o.parents, t)), - n.setEnabled(!Ge(e, o.element) && e.selection.isEditable()); - }) - ), - en = (e, t) => (n) => - Je(e, (o) => n.setEnabled(qe(o.parents, t) && !Ge(e, o.element))); - e.add( - "lists", - (e) => ( - ((e) => { - (0, e.options.register)("lists_indent_on_tab", { - processor: "boolean", - default: !0, - }); - })(e), - ((e) => { - e.on("PreInit", () => { - const { parser: t } = e; - t.addNodeFilter("ul,ol", (e) => S(e, Xt)); - }); - })(e), - e.hasPlugin("rtc", !0) - ? qt(e) - : (((e) => { - xe(e) && - ((e) => { - e.on("keydown", (t) => { - t.keyCode !== te.TAB || - te.metaKeyPressed(t) || - e.undoManager.transact(() => { - (t.shiftKey ? yt(e) : ft(e)) && t.preventDefault(); - }); - }); - })(e), - ((e) => { - e.on("ExecCommand", (t) => { - const n = t.command.toLowerCase(); - ("delete" !== n && "forwarddelete" !== n) || - !Vt(e) || - Ut(e.dom, e.getBody()); - }), - e.on("keydown", (t) => { - t.keyCode === te.BACKSPACE - ? jt(e, !1) && t.preventDefault() - : t.keyCode === te.DELETE && - jt(e, !0) && - t.preventDefault(); - }); - })(e); - })(e), - ((e) => { - e.on("BeforeExecCommand", (t) => { - const n = t.command.toLowerCase(); - "indent" === n ? ft(e) : "outdent" === n && yt(e); - }), - e.addCommand("InsertUnorderedList", (t, n) => { - Mt(e, "UL", n); - }), - e.addCommand("InsertOrderedList", (t, n) => { - Mt(e, "OL", n); - }), - e.addCommand("InsertDefinitionList", (t, n) => { - Mt(e, "DL", n); - }), - e.addCommand("RemoveList", () => { - vt(e); - }), - qt(e), - e.addCommand("mceListUpdate", (t, n) => { - r(n) && - ((e, t) => { - const n = He(e); - null === n || - Ge(e, n) || - e.undoManager.transact(() => { - r(t.styles) && e.dom.setStyles(n, t.styles), - r(t.attrs) && - re(t.attrs, (t, o) => e.dom.setAttrib(n, o, t)); - }); - })(e, n); - }), - e.addQueryStateHandler("InsertUnorderedList", Wt(e, "UL")), - e.addQueryStateHandler("InsertOrderedList", Wt(e, "OL")), - e.addQueryStateHandler("InsertDefinitionList", Wt(e, "DL")); - })(e)), - ((e) => { - const t = (t) => () => e.execCommand(t); - e.hasPlugin("advlist") || - (e.ui.registry.addToggleButton("numlist", { - icon: "ordered-list", - active: !1, - tooltip: "Numbered list", - onAction: t("InsertOrderedList"), - onSetup: Yt(e, "OL"), - }), - e.ui.registry.addToggleButton("bullist", { - icon: "unordered-list", - active: !1, - tooltip: "Bullet list", - onAction: t("InsertUnorderedList"), - onSetup: Yt(e, "UL"), - })); - })(e), - ((e) => { - const t = { - text: "List properties...", - icon: "ordered-list", - onAction: () => e.execCommand("mceListProps"), - onSetup: en(e, "OL"), - }; - e.ui.registry.addMenuItem("listprops", t), - e.ui.registry.addContextMenu("lists", { - update: (t) => { - const n = He(e, t); - return ye(n) ? ["listprops"] : []; - }, - }); - })(e), - ((e) => ({ - backspaceDelete: (t) => { - jt(e, t); - }, - }))(e) - ), - ); -})(); diff --git a/src/lib/dist/tinymce/plugins/media/plugin.min.js b/src/lib/dist/tinymce/plugins/media/plugin.min.js deleted file mode 100644 index 0ee8a0c7..00000000 --- a/src/lib/dist/tinymce/plugins/media/plugin.min.js +++ /dev/null @@ -1,1068 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var e = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const t = (e) => (t) => - ((e) => { - const t = typeof e; - return null === e - ? "null" - : "object" === t && Array.isArray(e) - ? "array" - : "object" === t && - ((r = o = e), - (a = String).prototype.isPrototypeOf(r) || - (null === (s = o.constructor) || void 0 === s - ? void 0 - : s.name) === a.name) - ? "string" - : t; - var r, o, a, s; - })(t) === e, - r = t("string"), - o = t("object"), - a = t("array"), - s = (e) => !((e) => null == e)(e); - class i { - constructor(e, t) { - (this.tag = e), (this.value = t); - } - static some(e) { - return new i(!0, e); - } - static none() { - return i.singletonNone; - } - fold(e, t) { - return this.tag ? t(this.value) : e(); - } - isSome() { - return this.tag; - } - isNone() { - return !this.tag; - } - map(e) { - return this.tag ? i.some(e(this.value)) : i.none(); - } - bind(e) { - return this.tag ? e(this.value) : i.none(); - } - exists(e) { - return this.tag && e(this.value); - } - forall(e) { - return !this.tag || e(this.value); - } - filter(e) { - return !this.tag || e(this.value) ? this : i.none(); - } - getOr(e) { - return this.tag ? this.value : e; - } - or(e) { - return this.tag ? this : e; - } - getOrThunk(e) { - return this.tag ? this.value : e(); - } - orThunk(e) { - return this.tag ? this : e(); - } - getOrDie(e) { - if (this.tag) return this.value; - throw new Error(null != e ? e : "Called getOrDie on None"); - } - static from(e) { - return s(e) ? i.some(e) : i.none(); - } - getOrNull() { - return this.tag ? this.value : null; - } - getOrUndefined() { - return this.value; - } - each(e) { - this.tag && e(this.value); - } - toArray() { - return this.tag ? [this.value] : []; - } - toString() { - return this.tag ? `some(${this.value})` : "none()"; - } - } - i.singletonNone = new i(!1); - const n = Array.prototype.push, - l = (e, t) => { - for (let r = 0, o = e.length; r < o; r++) t(e[r], r); - }, - c = (e) => { - const t = []; - for (let r = 0, o = e.length; r < o; ++r) { - if (!a(e[r])) - throw new Error( - "Arr.flatten item " + r + " was not an array, input: " + e, - ); - n.apply(t, e[r]); - } - return t; - }, - m = Object.keys, - u = Object.hasOwnProperty, - d = (e, t) => (h(e, t) ? i.from(e[t]) : i.none()), - h = (e, t) => u.call(e, t), - p = (e) => (t) => t.options.get(e), - g = p("audio_template_callback"), - b = p("video_template_callback"), - w = p("iframe_template_callback"), - v = p("media_live_embeds"), - f = p("media_filter_html"), - y = p("media_url_resolver"), - x = p("media_alt_source"), - _ = p("media_poster"), - k = p("media_dimensions"); - var j = tinymce.util.Tools.resolve("tinymce.util.Tools"), - O = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), - A = tinymce.util.Tools.resolve("tinymce.html.DomParser"); - const S = O.DOM, - $ = (e) => e.replace(/px$/, ""), - C = (e) => { - const t = e.attr("style"), - r = t ? S.parseStyle(t) : {}; - return { - type: "ephox-embed-iri", - source: e.attr("data-ephox-embed-iri"), - altsource: "", - poster: "", - width: d(r, "max-width").map($).getOr(""), - height: d(r, "max-height").map($).getOr(""), - }; - }, - T = (e, t) => { - let r = {}; - for ( - let o = A({ validate: !1, forced_root_block: !1 }, t).parse(e); - o; - o = o.walk() - ) - if (1 === o.type) { - const e = o.name; - if (o.attr("data-ephox-embed-iri")) { - r = C(o); - break; - } - r.source || "param" !== e || (r.source = o.attr("movie")), - ("iframe" !== e && - "object" !== e && - "embed" !== e && - "video" !== e && - "audio" !== e) || - (r.type || (r.type = e), (r = j.extend(o.attributes.map, r))), - "source" === e && - (r.source - ? r.altsource || (r.altsource = o.attr("src")) - : (r.source = o.attr("src"))), - "img" !== e || r.poster || (r.poster = o.attr("src")); - } - return ( - (r.source = r.source || r.src || ""), - (r.altsource = r.altsource || ""), - (r.poster = r.poster || ""), - r - ); - }, - z = (e) => { - var t; - const r = - null !== (t = e.toLowerCase().split(".").pop()) && void 0 !== t - ? t - : ""; - return d( - { - mp3: "audio/mpeg", - m4a: "audio/x-m4a", - wav: "audio/wav", - mp4: "video/mp4", - webm: "video/webm", - ogg: "video/ogg", - swf: "application/x-shockwave-flash", - }, - r, - ).getOr(""); - }; - var D = tinymce.util.Tools.resolve("tinymce.html.Node"), - F = tinymce.util.Tools.resolve("tinymce.html.Serializer"); - const M = (e, t = {}) => - A( - { - forced_root_block: !1, - validate: !1, - allow_conditional_comments: !0, - ...t, - }, - e, - ), - N = O.DOM, - R = (e) => (/^[0-9.]+$/.test(e) ? e + "px" : e), - E = (e, t) => { - const r = t.attr("style"), - o = r ? N.parseStyle(r) : {}; - s(e.width) && (o["max-width"] = R(e.width)), - s(e.height) && (o["max-height"] = R(e.height)), - t.attr("style", N.serializeStyle(o)); - }, - U = ["source", "altsource"], - P = (e, t, r, o) => { - let a = 0, - s = 0; - const i = M(o); - i.addNodeFilter("source", (e) => (a = e.length)); - const n = i.parse(e); - for (let e = n; e; e = e.walk()) - if (1 === e.type) { - const o = e.name; - if (e.attr("data-ephox-embed-iri")) { - E(t, e); - break; - } - switch (o) { - case "video": - case "object": - case "embed": - case "img": - case "iframe": - void 0 !== t.height && - void 0 !== t.width && - (e.attr("width", t.width), e.attr("height", t.height)); - } - if (r) - switch (o) { - case "video": - e.attr("poster", t.poster), e.attr("src", null); - for (let r = a; r < 2; r++) - if (t[U[r]]) { - const o = new D("source", 1); - o.attr("src", t[U[r]]), - o.attr("type", t[U[r] + "mime"] || null), - e.append(o); - } - break; - case "iframe": - e.attr("src", t.source); - break; - case "object": - const r = e.getAll("img").length > 0; - if (t.poster && !r) { - e.attr("src", t.poster); - const r = new D("img", 1); - r.attr("src", t.poster), - r.attr("width", t.width), - r.attr("height", t.height), - e.append(r); - } - break; - case "source": - if ( - s < 2 && - (e.attr("src", t[U[s]]), - e.attr("type", t[U[s] + "mime"] || null), - !t[U[s]]) - ) { - e.remove(); - continue; - } - s++; - break; - case "img": - t.poster || e.remove(); - } - } - return F({}, o).serialize(n); - }, - L = [ - { - regex: /youtu\.be\/([\w\-_\?&=.]+)/i, - type: "iframe", - w: 560, - h: 314, - url: "www.youtube.com/embed/$1", - allowFullscreen: !0, - }, - { - regex: /youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i, - type: "iframe", - w: 560, - h: 314, - url: "www.youtube.com/embed/$2?$4", - allowFullscreen: !0, - }, - { - regex: /youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i, - type: "iframe", - w: 560, - h: 314, - url: "www.youtube.com/embed/$1", - allowFullscreen: !0, - }, - { - regex: /vimeo\.com\/([0-9]+)\?h=(\w+)/, - type: "iframe", - w: 425, - h: 350, - url: "player.vimeo.com/video/$1?h=$2&title=0&byline=0&portrait=0&color=8dc7dc", - allowFullscreen: !0, - }, - { - regex: /vimeo\.com\/(.*)\/([0-9]+)\?h=(\w+)/, - type: "iframe", - w: 425, - h: 350, - url: "player.vimeo.com/video/$2?h=$3&title=0&byline=0", - allowFullscreen: !0, - }, - { - regex: /vimeo\.com\/([0-9]+)/, - type: "iframe", - w: 425, - h: 350, - url: "player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc", - allowFullscreen: !0, - }, - { - regex: /vimeo\.com\/(.*)\/([0-9]+)/, - type: "iframe", - w: 425, - h: 350, - url: "player.vimeo.com/video/$2?title=0&byline=0", - allowFullscreen: !0, - }, - { - regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/, - type: "iframe", - w: 425, - h: 350, - url: 'maps.google.com/maps/ms?msid=$2&output=embed"', - allowFullscreen: !1, - }, - { - regex: /dailymotion\.com\/video\/([^_]+)/, - type: "iframe", - w: 480, - h: 270, - url: "www.dailymotion.com/embed/video/$1", - allowFullscreen: !0, - }, - { - regex: /dai\.ly\/([^_]+)/, - type: "iframe", - w: 480, - h: 270, - url: "www.dailymotion.com/embed/video/$1", - allowFullscreen: !0, - }, - ], - I = (e, t) => { - const r = ((e) => { - const t = e.match(/^(https?:\/\/|www\.)(.+)$/i); - return t && t.length > 1 - ? "www." === t[1] - ? "https://" - : t[1] - : "https://"; - })(t), - o = e.regex.exec(t); - let a = r + e.url; - if (s(o)) - for (let e = 0; e < o.length; e++) - a = a.replace("$" + e, () => (o[e] ? o[e] : "")); - return a.replace(/\?$/, ""); - }, - B = (e) => { - const t = L.filter((t) => t.regex.test(e)); - return t.length > 0 ? j.extend({}, t[0], { url: I(t[0], e) }) : null; - }, - G = (e, t) => { - var r; - const o = j.extend({}, t); - if ( - !o.source && - (j.extend( - o, - T(null !== (r = o.embed) && void 0 !== r ? r : "", e.schema), - ), - !o.source) - ) - return ""; - o.altsource || (o.altsource = ""), - o.poster || (o.poster = ""), - (o.source = e.convertURL(o.source, "source")), - (o.altsource = e.convertURL(o.altsource, "source")), - (o.sourcemime = z(o.source)), - (o.altsourcemime = z(o.altsource)), - (o.poster = e.convertURL(o.poster, "poster")); - const a = B(o.source); - if ( - (a && - ((o.source = a.url), - (o.type = a.type), - (o.allowfullscreen = a.allowFullscreen), - (o.width = o.width || String(a.w)), - (o.height = o.height || String(a.h))), - o.embed) - ) - return P(o.embed, o, !0, e.schema); - { - const t = g(e), - r = b(e), - a = w(e); - return ( - (o.width = o.width || "300"), - (o.height = o.height || "150"), - j.each(o, (t, r) => { - o[r] = e.dom.encode("" + t); - }), - "iframe" === o.type - ? ((e, t) => { - if (t) return t(e); - { - const t = e.allowfullscreen ? ' allowFullscreen="1"' : ""; - return ( - '" - ); - } - })(o, a) - : "application/x-shockwave-flash" === o.sourcemime - ? ((e) => { - let t = - ''; - return ( - e.poster && - (t += - ''), - (t += ""), - t - ); - })(o) - : -1 !== o.sourcemime.indexOf("audio") - ? ((e, t) => - t - ? t(e) - : '")(o, t) - : ((e, t) => - t - ? t(e) - : '")(o, r) - ); - } - }, - W = (e) => - e.hasAttribute("data-mce-object") || - e.hasAttribute("data-ephox-embed-iri"), - q = {}, - H = (e) => (t) => G(e, t), - J = (e, t) => { - const r = y(e); - return r - ? ((e, t, r) => - new Promise((o, a) => { - const s = (r) => ( - r.html && (q[e.source] = r), - o({ url: e.source, html: r.html ? r.html : t(e) }) - ); - q[e.source] ? s(q[e.source]) : r({ url: e.source }, s, a); - }))(t, H(e), r) - : ((e, t) => Promise.resolve({ html: t(e), url: e.source }))(t, H(e)); - }, - K = (e, t) => { - const r = {}; - return ( - d(e, "dimensions").each((e) => { - l(["width", "height"], (o) => { - d(t, o) - .orThunk(() => d(e, o)) - .each((e) => (r[o] = e)); - }); - }), - r - ); - }, - Q = (e, t) => { - const r = - t && "dimensions" !== t - ? ((e, t) => d(t, e).bind((e) => d(e, "meta")))(t, e).getOr({}) - : {}, - a = ((e, t, r) => (a) => { - const s = () => d(e, a), - n = () => d(t, a), - l = (e) => - d(e, "value").bind((e) => (e.length > 0 ? i.some(e) : i.none())); - return { - [a]: (a === r - ? s().bind((e) => - o(e) ? l(e).orThunk(n) : n().orThunk(() => i.from(e)), - ) - : n().orThunk(() => s().bind((e) => (o(e) ? l(e) : i.from(e)))) - ).getOr(""), - }; - })(e, r, t); - return { - ...a("source"), - ...a("altsource"), - ...a("poster"), - ...a("embed"), - ...K(e, r), - }; - }, - V = (e) => { - const t = { - ...e, - source: { value: d(e, "source").getOr("") }, - altsource: { value: d(e, "altsource").getOr("") }, - poster: { value: d(e, "poster").getOr("") }, - }; - return ( - l(["width", "height"], (r) => { - d(e, r).each((e) => { - const o = t.dimensions || {}; - (o[r] = e), (t.dimensions = o); - }); - }), - t - ); - }, - X = (e) => (t) => { - const r = - t && t.msg - ? "Media embed handler error: " + t.msg - : "Media embed handler threw unknown error."; - e.notificationManager.open({ type: "error", text: r }); - }, - Y = (e, t) => (o) => { - if (r(o.url) && o.url.trim().length > 0) { - const r = o.html, - a = { ...T(r, t.schema), source: o.url, embed: r }; - e.setData(V(a)); - } - }, - Z = (e, t) => { - const r = e.dom.select("*[data-mce-object]"); - e.insertContent(t), - ((e, t) => { - const r = e.dom.select("*[data-mce-object]"); - for (let e = 0; e < t.length; e++) - for (let o = r.length - 1; o >= 0; o--) - t[e] === r[o] && r.splice(o, 1); - e.selection.select(r[0]); - })(e, r), - e.nodeChanged(); - }, - ee = (e, t) => s(t) && "ephox-embed-iri" === t && s(B(e)), - te = (e, t) => - ((e, t) => e.width !== t.width || e.height !== t.height)(e, t) && - ee(t.source, e.type), - re = (e) => { - const t = ((e) => { - const t = e.selection.getNode(), - r = W(t) ? e.serializer.serialize(t, { selection: !0 }) : "", - o = T(r, e.schema), - a = (() => { - if (ee(o.source, o.type)) { - const r = e.dom.getRect(t); - return { - width: r.w.toString().replace(/px$/, ""), - height: r.h.toString().replace(/px$/, ""), - }; - } - return {}; - })(); - return { embed: r, ...o, ...a }; - })(e), - r = ((e) => { - let t = e; - return { - get: () => t, - set: (e) => { - t = e; - }, - }; - })(t), - o = V(t), - a = k(e) - ? [ - { - type: "sizeinput", - name: "dimensions", - label: "Constrain proportions", - constrain: !0, - }, - ] - : [], - s = { - title: "General", - name: "general", - items: c([ - [ - { - name: "source", - type: "urlinput", - filetype: "media", - label: "Source", - }, - ], - a, - ]), - }, - i = []; - x(e) && - i.push({ - name: "altsource", - type: "urlinput", - filetype: "media", - label: "Alternative source URL", - }), - _(e) && - i.push({ - name: "poster", - type: "urlinput", - filetype: "image", - label: "Media poster (Image URL)", - }); - const n = { title: "Advanced", name: "advanced", items: i }, - l = [ - s, - { - title: "Embed", - items: [ - { - type: "textarea", - name: "embed", - label: "Paste your embed code below:", - }, - ], - }, - ]; - i.length > 0 && l.push(n); - const m = { type: "tabpanel", tabs: l }, - u = e.windowManager.open({ - title: "Insert/Edit Media", - size: "normal", - body: m, - buttons: [ - { type: "cancel", name: "cancel", text: "Cancel" }, - { type: "submit", name: "save", text: "Save", primary: !0 }, - ], - onSubmit: (t) => { - const o = Q(t.getData()); - ((e, t, r) => { - var o, a; - (t.embed = - te(e, t) && k(r) - ? G(r, { ...t, embed: "" }) - : P( - null !== (o = t.embed) && void 0 !== o ? o : "", - t, - !1, - r.schema, - )), - t.embed && (e.source === t.source || ((a = t.source), h(q, a))) - ? Z(r, t.embed) - : J(r, t) - .then((e) => { - Z(r, e.html); - }) - .catch(X(r)); - })(r.get(), o, e), - t.close(); - }, - onChange: (t, o) => { - switch (o.name) { - case "source": - ((t, r) => { - const o = Q(r.getData(), "source"); - t.source !== o.source && - (Y(u, e)({ url: o.source, html: "" }), - J(e, o).then(Y(u, e)).catch(X(e))); - })(r.get(), t); - break; - case "embed": - ((t) => { - var r; - const o = Q(t.getData()), - a = T( - null !== (r = o.embed) && void 0 !== r ? r : "", - e.schema, - ); - t.setData(V(a)); - })(t); - break; - case "dimensions": - case "altsource": - case "poster": - ((t, r, o) => { - const a = Q(t.getData(), r), - s = te(o, a) && k(e) ? { ...a, embed: "" } : a, - i = G(e, s); - t.setData(V({ ...s, embed: i })); - })(t, o.name, r.get()); - } - r.set(Q(t.getData())); - }, - initialData: o, - }); - }; - var oe = tinymce.util.Tools.resolve("tinymce.Env"); - const ae = (e) => { - const t = e.name; - return "iframe" === t || "video" === t || "audio" === t; - }, - se = (e, t, r, o = null) => { - const a = e.attr(r); - return s(a) ? a : h(t, r) ? null : o; - }, - ie = (e, t, r) => { - const o = "img" === t.name || "video" === e.name, - a = o ? "300" : null, - s = "audio" === e.name ? "30" : "150", - i = o ? s : null; - t.attr({ width: se(e, r, "width", a), height: se(e, r, "height", i) }); - }, - ne = (e, t) => { - const r = t.name, - o = new D("img", 1); - return ( - ce(e, t, o), - ie(t, o, {}), - o.attr({ - style: t.attr("style"), - src: oe.transparentSrc, - "data-mce-object": r, - class: "mce-object mce-object-" + r, - }), - o - ); - }, - le = (e, t) => { - var r; - const o = t.name, - a = new D("span", 1); - a.attr({ - contentEditable: "false", - style: t.attr("style"), - "data-mce-object": o, - class: "mce-preview-object mce-object-" + o, - }), - ce(e, t, a); - const i = e.dom.parseStyle( - null !== (r = t.attr("style")) && void 0 !== r ? r : "", - ), - n = new D(o, 1); - if ( - (ie(t, n, i), - n.attr({ - src: t.attr("src"), - style: t.attr("style"), - class: t.attr("class"), - }), - "iframe" === o) - ) - n.attr({ - allowfullscreen: t.attr("allowfullscreen"), - frameborder: "0", - }); - else { - l( - [ - "controls", - "crossorigin", - "currentTime", - "loop", - "muted", - "poster", - "preload", - ], - (e) => { - n.attr(e, t.attr(e)); - }, - ); - const r = a.attr("data-mce-html"); - s(r) && - ((e, t, r, o) => { - const a = M(e.schema).parse(o, { context: t }); - for (; a.firstChild; ) r.append(a.firstChild); - })(e, o, n, unescape(r)); - } - const c = new D("span", 1); - return c.attr("class", "mce-shim"), a.append(n), a.append(c), a; - }, - ce = (e, t, r) => { - var o; - const a = null !== (o = t.attributes) && void 0 !== o ? o : []; - let s = a.length; - for (; s--; ) { - const t = a[s].name; - let o = a[s].value; - "width" === t || - "height" === t || - "style" === t || - ((n = "data-mce-"), (i = t).length >= 9 && i.substr(0, 9) === n) || - (("data" !== t && "src" !== t) || (o = e.convertURL(o, t)), - r.attr("data-mce-p-" + t, o)); - } - var i, n; - const c = F({ inner: !0 }, e.schema), - m = new D("div", 1); - l(t.children(), (e) => m.append(e)); - const u = c.serialize(m); - u && (r.attr("data-mce-html", escape(u)), r.empty()); - }, - me = (e) => { - const t = e.attr("class"); - return r(t) && /\btiny-pageembed\b/.test(t); - }, - ue = (e) => { - let t = e; - for (; (t = t.parent); ) - if (t.attr("data-ephox-embed-iri") || me(t)) return !0; - return !1; - }, - de = (e, t, r) => { - const o = (0, e.options.get)("xss_sanitization"), - a = f(e); - return M(e.schema, { sanitize: o, validate: a }).parse(r, { context: t }); - }, - he = (e) => (t) => { - const r = () => { - t.setEnabled(e.selection.isEditable()); - }; - return ( - e.on("NodeChange", r), - r(), - () => { - e.off("NodeChange", r); - } - ); - }; - e.add( - "media", - (e) => ( - ((e) => { - const t = e.options.register; - t("audio_template_callback", { processor: "function" }), - t("video_template_callback", { processor: "function" }), - t("iframe_template_callback", { processor: "function" }), - t("media_live_embeds", { processor: "boolean", default: !0 }), - t("media_filter_html", { processor: "boolean", default: !0 }), - t("media_url_resolver", { processor: "function" }), - t("media_alt_source", { processor: "boolean", default: !0 }), - t("media_poster", { processor: "boolean", default: !0 }), - t("media_dimensions", { processor: "boolean", default: !0 }); - })(e), - ((e) => { - e.addCommand("mceMedia", () => { - re(e); - }); - })(e), - ((e) => { - const t = () => e.execCommand("mceMedia"); - e.ui.registry.addToggleButton("media", { - tooltip: "Insert/edit media", - icon: "embed", - onAction: t, - onSetup: (t) => { - const r = e.selection; - t.setActive(W(r.getNode())); - const o = r.selectorChangedWithUnbind( - "img[data-mce-object],span[data-mce-object],div[data-ephox-embed-iri]", - t.setActive, - ).unbind, - a = he(e)(t); - return () => { - o(), a(); - }; - }, - }), - e.ui.registry.addMenuItem("media", { - icon: "embed", - text: "Media...", - onAction: t, - onSetup: he(e), - }); - })(e), - ((e) => { - e.on("ResolveName", (e) => { - let t; - 1 === e.target.nodeType && - (t = e.target.getAttribute("data-mce-object")) && - (e.name = t); - }); - })(e), - ((e) => { - e.on("PreInit", () => { - const { schema: t, serializer: r, parser: o } = e, - a = t.getBoolAttrs(); - l("webkitallowfullscreen mozallowfullscreen".split(" "), (e) => { - a[e] = {}; - }), - ((e, t) => { - const r = m(e); - for (let o = 0, a = r.length; o < a; o++) { - const a = r[o]; - t(e[a], a); - } - })({ embed: ["wmode"] }, (e, r) => { - const o = t.getElementRule(r); - o && - l(e, (e) => { - (o.attributes[e] = {}), o.attributesOrder.push(e); - }); - }), - o.addNodeFilter( - "iframe,video,audio,object,embed", - ((e) => (t) => { - let r, - o = t.length; - for (; o--; ) - (r = t[o]), - r.parent && - (r.parent.attr("data-mce-object") || - (ae(r) && v(e) - ? ue(r) || r.replace(le(e, r)) - : ue(r) || r.replace(ne(e, r)))); - })(e), - ), - r.addAttributeFilter("data-mce-object", (t, r) => { - var o; - let a = t.length; - for (; a--; ) { - const s = t[a]; - if (!s.parent) continue; - const i = s.attr(r), - n = new D(i, 1); - if ("audio" !== i) { - const e = s.attr("class"); - e && -1 !== e.indexOf("mce-preview-object") && s.firstChild - ? n.attr({ - width: s.firstChild.attr("width"), - height: s.firstChild.attr("height"), - }) - : n.attr({ - width: s.attr("width"), - height: s.attr("height"), - }); - } - n.attr({ style: s.attr("style") }); - const c = null !== (o = s.attributes) && void 0 !== o ? o : []; - let m = c.length; - for (; m--; ) { - const e = c[m].name; - 0 === e.indexOf("data-mce-p-") && - n.attr(e.substr(11), c[m].value); - } - const u = s.attr("data-mce-html"); - if (u) { - const t = de(e, i, unescape(u)); - l(t.children(), (e) => n.append(e)); - } - s.replace(n); - } - }); - }), - e.on("SetContent", () => { - const t = e.dom; - l(t.select("span.mce-preview-object"), (e) => { - 0 === t.select("span.mce-shim", e).length && - t.add(e, "span", { class: "mce-shim" }); - }); - }); - })(e), - ((e) => { - e.on("click keyup touchend", () => { - const t = e.selection.getNode(); - t && - e.dom.hasClass(t, "mce-preview-object") && - e.dom.getAttrib(t, "data-mce-selected") && - t.setAttribute("data-mce-selected", "2"); - }), - e.on("ObjectResized", (t) => { - const r = t.target; - if (r.getAttribute("data-mce-object")) { - let o = r.getAttribute("data-mce-html"); - o && - ((o = unescape(o)), - r.setAttribute( - "data-mce-html", - escape( - P( - o, - { width: String(t.width), height: String(t.height) }, - !1, - e.schema, - ), - ), - )); - } - }); - })(e), - ((e) => ({ - showDialog: () => { - re(e); - }, - }))(e) - ), - ); -})(); diff --git a/src/lib/dist/tinymce/plugins/nonbreaking/plugin.min.js b/src/lib/dist/tinymce/plugins/nonbreaking/plugin.min.js deleted file mode 100644 index d135344c..00000000 --- a/src/lib/dist/tinymce/plugins/nonbreaking/plugin.min.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var n = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const e = (n) => (e) => typeof e === n, - o = e("boolean"), - a = e("number"), - t = (n) => (e) => e.options.get(n), - i = t("nonbreaking_force_tab"), - s = t("nonbreaking_wrap"), - r = (n, e) => { - let o = ""; - for (let a = 0; a < e; a++) o += n; - return o; - }, - c = (n, e) => { - const o = - s(n) || n.plugins.visualchars - ? `${r(" ", e)}` - : r(" ", e); - n.undoManager.transact(() => n.insertContent(o)); - }; - var l = tinymce.util.Tools.resolve("tinymce.util.VK"); - const u = (n) => (e) => { - const o = () => { - e.setEnabled(n.selection.isEditable()); - }; - return ( - n.on("NodeChange", o), - o(), - () => { - n.off("NodeChange", o); - } - ); - }; - n.add("nonbreaking", (n) => { - ((n) => { - const e = n.options.register; - e("nonbreaking_force_tab", { - processor: (n) => - o(n) - ? { value: n ? 3 : 0, valid: !0 } - : a(n) - ? { value: n, valid: !0 } - : { valid: !1, message: "Must be a boolean or number." }, - default: !1, - }), - e("nonbreaking_wrap", { processor: "boolean", default: !0 }); - })(n), - ((n) => { - n.addCommand("mceNonBreaking", () => { - c(n, 1); - }); - })(n), - ((n) => { - const e = () => n.execCommand("mceNonBreaking"); - n.ui.registry.addButton("nonbreaking", { - icon: "non-breaking", - tooltip: "Nonbreaking space", - onAction: e, - onSetup: u(n), - }), - n.ui.registry.addMenuItem("nonbreaking", { - icon: "non-breaking", - text: "Nonbreaking space", - onAction: e, - onSetup: u(n), - }); - })(n), - ((n) => { - const e = i(n); - e > 0 && - n.on("keydown", (o) => { - if (o.keyCode === l.TAB && !o.isDefaultPrevented()) { - if (o.shiftKey) return; - o.preventDefault(), o.stopImmediatePropagation(), c(n, e); - } - }); - })(n); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/pagebreak/plugin.min.js b/src/lib/dist/tinymce/plugins/pagebreak/plugin.min.js deleted file mode 100644 index 866a65a4..00000000 --- a/src/lib/dist/tinymce/plugins/pagebreak/plugin.min.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var e = tinymce.util.Tools.resolve("tinymce.PluginManager"), - a = tinymce.util.Tools.resolve("tinymce.Env"); - const t = (e) => (a) => a.options.get(e), - n = t("pagebreak_separator"), - o = t("pagebreak_split_block"), - r = "mce-pagebreak", - s = (e) => { - const t = ``; - return e ? `

${t}

` : t; - }, - c = (e) => (a) => { - const t = () => { - a.setEnabled(e.selection.isEditable()); - }; - return ( - e.on("NodeChange", t), - t(), - () => { - e.off("NodeChange", t); - } - ); - }; - e.add("pagebreak", (e) => { - ((e) => { - const a = e.options.register; - a("pagebreak_separator", { - processor: "string", - default: "\x3c!-- pagebreak --\x3e", - }), - a("pagebreak_split_block", { processor: "boolean", default: !1 }); - })(e), - ((e) => { - e.addCommand("mcePageBreak", () => { - e.insertContent(s(o(e))); - }); - })(e), - ((e) => { - const a = () => e.execCommand("mcePageBreak"); - e.ui.registry.addButton("pagebreak", { - icon: "page-break", - tooltip: "Page break", - onAction: a, - onSetup: c(e), - }), - e.ui.registry.addMenuItem("pagebreak", { - text: "Page break", - icon: "page-break", - onAction: a, - onSetup: c(e), - }); - })(e), - ((e) => { - const a = n(e), - t = () => o(e), - c = new RegExp( - a.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, (e) => "\\" + e), - "gi", - ); - e.on("BeforeSetContent", (e) => { - e.content = e.content.replace(c, s(t())); - }), - e.on("PreInit", () => { - e.serializer.addNodeFilter("img", (n) => { - let o, - s, - c = n.length; - for (; c--; ) - if ( - ((o = n[c]), (s = o.attr("class")), s && -1 !== s.indexOf(r)) - ) { - const n = o.parent; - if (n && e.schema.getBlockElements()[n.name] && t()) { - (n.type = 3), (n.value = a), (n.raw = !0), o.remove(); - continue; - } - (o.type = 3), (o.value = a), (o.raw = !0); - } - }); - }); - })(e), - ((e) => { - e.on("ResolveName", (a) => { - "IMG" === a.target.nodeName && - e.dom.hasClass(a.target, r) && - (a.name = "pagebreak"); - }); - })(e); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/preview/plugin.min.js b/src/lib/dist/tinymce/plugins/preview/plugin.min.js deleted file mode 100644 index 9a82aa01..00000000 --- a/src/lib/dist/tinymce/plugins/preview/plugin.min.js +++ /dev/null @@ -1,97 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var e = tinymce.util.Tools.resolve("tinymce.PluginManager"), - t = tinymce.util.Tools.resolve("tinymce.Env"), - o = tinymce.util.Tools.resolve("tinymce.util.Tools"); - const n = (e) => (t) => t.options.get(e), - i = n("content_style"), - s = n("content_css_cors"), - c = n("body_class"), - r = n("body_id"); - e.add("preview", (e) => { - ((e) => { - e.addCommand("mcePreview", () => { - ((e) => { - const n = ((e) => { - var n; - let l = ""; - const a = e.dom.encode, - d = null !== (n = i(e)) && void 0 !== n ? n : ""; - l += ''; - const m = s(e) ? ' crossorigin="anonymous"' : ""; - o.each(e.contentCSS, (t) => { - l += - '"; - }), - d && (l += '"); - const y = r(e), - u = c(e), - v = - ' ", - p = e.getBody().dir, - w = p ? ' dir="' + a(p) + '"' : ""; - return ( - "" + - l + - '" + - e.getContent() + - v + - "" - ); - })(e); - e.windowManager - .open({ - title: "Preview", - size: "large", - body: { - type: "panel", - items: [ - { - name: "preview", - type: "iframe", - sandboxed: !0, - transparent: !1, - }, - ], - }, - buttons: [ - { type: "cancel", name: "close", text: "Close", primary: !0 }, - ], - initialData: { preview: n }, - }) - .focus("close"); - })(e); - }); - })(e), - ((e) => { - const t = () => e.execCommand("mcePreview"); - e.ui.registry.addButton("preview", { - icon: "preview", - tooltip: "Preview", - onAction: t, - }), - e.ui.registry.addMenuItem("preview", { - icon: "preview", - text: "Preview", - onAction: t, - }); - })(e); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/quickbars/plugin.min.js b/src/lib/dist/tinymce/plugins/quickbars/plugin.min.js deleted file mode 100644 index 75a1b7ab..00000000 --- a/src/lib/dist/tinymce/plugins/quickbars/plugin.min.js +++ /dev/null @@ -1,310 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var t = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const e = (t) => (e) => typeof e === t, - o = - ("string", - (t) => - "string" === - ((t) => { - const e = typeof t; - return null === t - ? "null" - : "object" === e && Array.isArray(t) - ? "array" - : "object" === e && - ((o = n = t), - (r = String).prototype.isPrototypeOf(o) || - (null === (i = n.constructor) || void 0 === i - ? void 0 - : i.name) === r.name) - ? "string" - : e; - var o, n, r, i; - })(t)); - const n = e("boolean"), - r = e("function"), - i = (t) => (e) => e.options.get(t), - s = i("quickbars_selection_toolbar"), - a = i("quickbars_insert_toolbar"), - l = i("quickbars_image_toolbar"); - let c = 0; - var u = tinymce.util.Tools.resolve("tinymce.util.Delay"); - const d = (t) => { - t.ui.registry.addButton("quickimage", { - icon: "image", - tooltip: "Insert image", - onAction: () => { - ((t) => - new Promise((e) => { - let o = !1; - const n = document.createElement("input"); - (n.type = "file"), - (n.accept = "image/*"), - (n.style.position = "fixed"), - (n.style.left = "0"), - (n.style.top = "0"), - (n.style.opacity = "0.001"), - document.body.appendChild(n); - const r = (t) => { - var r; - o || - (null === (r = n.parentNode) || - void 0 === r || - r.removeChild(n), - (o = !0), - e(t)); - }, - i = (t) => { - r(Array.prototype.slice.call(t.target.files)); - }; - n.addEventListener("input", i), n.addEventListener("change", i); - const s = (e) => { - const n = () => { - r([]); - }; - o || - ("focusin" === e.type ? u.setEditorTimeout(t, n, 1e3) : n()), - t.off("focusin remove", s); - }; - t.on("focusin remove", s), n.click(); - }))(t).then((e) => { - if (e.length > 0) { - const o = e[0]; - ((t) => - new Promise((e) => { - const o = new FileReader(); - (o.onloadend = () => { - e(o.result.split(",")[1]); - }), - o.readAsDataURL(t); - }))(o).then((e) => { - ((t, e, o) => { - const n = t.editorUpload.blobCache, - r = n.create( - ((t) => { - const e = new Date().getTime(), - o = Math.floor(1e9 * Math.random()); - return c++, "mceu_" + o + c + String(e); - })(), - o, - e, - ); - n.add(r), - t.insertContent( - t.dom.createHTML("img", { src: r.blobUri() }), - ); - })(t, e, o); - }); - } - }); - }, - }), - t.ui.registry.addButton("quicktable", { - icon: "table", - tooltip: "Insert table", - onAction: () => { - ((t, e, o) => { - t.execCommand("mceInsertTable", !1, { rows: 2, columns: 2 }); - })(t); - }, - }); - }, - m = (!1, () => false); - class g { - constructor(t, e) { - (this.tag = t), (this.value = e); - } - static some(t) { - return new g(!0, t); - } - static none() { - return g.singletonNone; - } - fold(t, e) { - return this.tag ? e(this.value) : t(); - } - isSome() { - return this.tag; - } - isNone() { - return !this.tag; - } - map(t) { - return this.tag ? g.some(t(this.value)) : g.none(); - } - bind(t) { - return this.tag ? t(this.value) : g.none(); - } - exists(t) { - return this.tag && t(this.value); - } - forall(t) { - return !this.tag || t(this.value); - } - filter(t) { - return !this.tag || t(this.value) ? this : g.none(); - } - getOr(t) { - return this.tag ? this.value : t; - } - or(t) { - return this.tag ? this : t; - } - getOrThunk(t) { - return this.tag ? this.value : t(); - } - orThunk(t) { - return this.tag ? this : t(); - } - getOrDie(t) { - if (this.tag) return this.value; - throw new Error(null != t ? t : "Called getOrDie on None"); - } - static from(t) { - return null == t ? g.none() : g.some(t); - } - getOrNull() { - return this.tag ? this.value : null; - } - getOrUndefined() { - return this.value; - } - each(t) { - this.tag && t(this.value); - } - toArray() { - return this.tag ? [this.value] : []; - } - toString() { - return this.tag ? `some(${this.value})` : "none()"; - } - } - (g.singletonNone = new g(!1)), - "undefined" != typeof window ? window : Function("return this;")(); - var h = (t, e, o, n, i) => - t(o, n) ? g.some(o) : r(i) && i(o) ? g.none() : e(o, n, i); - const b = (t) => { - if (null == t) throw new Error("Node cannot be null or undefined"); - return { dom: t }; - }, - p = b, - v = (t, e) => { - const o = t.dom; - if (1 !== o.nodeType) return !1; - { - const t = o; - if (void 0 !== t.matches) return t.matches(e); - if (void 0 !== t.msMatchesSelector) return t.msMatchesSelector(e); - if (void 0 !== t.webkitMatchesSelector) - return t.webkitMatchesSelector(e); - if (void 0 !== t.mozMatchesSelector) return t.mozMatchesSelector(e); - throw new Error("Browser lacks native selectors"); - } - }, - f = (t, e, o) => { - let n = t.dom; - const i = r(o) ? o : m; - for (; n.parentNode; ) { - n = n.parentNode; - const t = p(n); - if (e(t)) return g.some(t); - if (i(t)) break; - } - return g.none(); - }, - y = (t, e, o) => f(t, (t) => v(t, e), o), - k = (t) => { - const e = a(t); - e.length > 0 && - t.ui.registry.addContextToolbar("quickblock", { - predicate: (e) => { - const o = p(e), - n = t.schema.getTextBlockElements(), - r = (e) => e.dom === t.getBody(); - return ( - !((t, e) => { - const o = t.dom; - return ( - !(!o || !o.hasAttribute) && o.hasAttribute("data-mce-bogus") - ); - })(o) && - ((t, e, o) => - h((t, e) => v(t, e), y, t, 'table,[data-mce-bogus="all"]', o))( - o, - 0, - r, - ).fold( - () => - ((t, e, o) => - ((t, e, o) => h((t, e) => e(t), f, t, e, o))( - t, - e, - o, - ).isSome())( - o, - (e) => - e.dom.nodeName.toLowerCase() in n && t.dom.isEmpty(e.dom), - r, - ), - m, - ) - ); - }, - items: e, - position: "line", - scope: "editor", - }); - }; - t.add("quickbars", (t) => { - ((t) => { - const e = t.options.register, - r = (t) => (e) => { - const r = n(e) || o(e); - return r - ? n(e) - ? { value: e ? t : "", valid: r } - : { value: e.trim(), valid: r } - : { valid: !1, message: "Must be a boolean or string." }; - }, - i = "bold italic | quicklink h2 h3 blockquote"; - e("quickbars_selection_toolbar", { processor: r(i), default: i }); - const s = "quickimage quicktable"; - e("quickbars_insert_toolbar", { processor: r(s), default: s }); - const a = "alignleft aligncenter alignright"; - e("quickbars_image_toolbar", { processor: r(a), default: a }); - })(t), - d(t), - k(t), - ((t) => { - const e = (e) => t.dom.isEditable(e), - o = (t) => { - const o = "FIGURE" === t.nodeName && /image/i.test(t.className), - n = "IMG" === t.nodeName || o, - r = - ((t) => void 0 !== t.dom.classList)((i = p(t))) && - i.dom.classList.contains("mce-pagebreak"); - var i; - return n && e(t.parentElement) && !r; - }, - n = l(t); - n.length > 0 && - t.ui.registry.addContextToolbar("imageselection", { - predicate: o, - items: n, - position: "node", - }); - const r = s(t); - r.length > 0 && - t.ui.registry.addContextToolbar("textselection", { - predicate: (n) => !o(n) && !t.selection.isCollapsed() && e(n), - items: r, - position: "selection", - scope: "editor", - }); - })(t); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/save/plugin.min.js b/src/lib/dist/tinymce/plugins/save/plugin.min.js deleted file mode 100644 index 873bcc6a..00000000 --- a/src/lib/dist/tinymce/plugins/save/plugin.min.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var e = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const n = ("function", (e) => "function" == typeof e); - var o = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), - t = tinymce.util.Tools.resolve("tinymce.util.Tools"); - const a = (e) => (n) => n.options.get(e), - c = a("save_enablewhendirty"), - i = a("save_onsavecallback"), - s = a("save_oncancelcallback"), - r = (e, n) => { - e.notificationManager.open({ text: n, type: "error" }); - }, - l = (e) => (n) => { - const o = () => { - n.setEnabled(!c(e) || e.isDirty()); - }; - return ( - o(), e.on("NodeChange dirty", o), () => e.off("NodeChange dirty", o) - ); - }; - e.add("save", (e) => { - ((e) => { - const n = e.options.register; - n("save_enablewhendirty", { processor: "boolean", default: !0 }), - n("save_onsavecallback", { processor: "function" }), - n("save_oncancelcallback", { processor: "function" }); - })(e), - ((e) => { - e.ui.registry.addButton("save", { - icon: "save", - tooltip: "Save", - enabled: !1, - onAction: () => e.execCommand("mceSave"), - onSetup: l(e), - }), - e.ui.registry.addButton("cancel", { - icon: "cancel", - tooltip: "Cancel", - enabled: !1, - onAction: () => e.execCommand("mceCancel"), - onSetup: l(e), - }), - e.addShortcut("Meta+S", "", "mceSave"); - })(e), - ((e) => { - e.addCommand("mceSave", () => { - ((e) => { - const t = o.DOM.getParent(e.id, "form"); - if (c(e) && !e.isDirty()) return; - e.save(); - const a = i(e); - if (n(a)) return a.call(e, e), void e.nodeChanged(); - t - ? (e.setDirty(!1), - (t.onsubmit && !t.onsubmit()) || - ("function" == typeof t.submit - ? t.submit() - : r(e, "Error: Form submit field collision.")), - e.nodeChanged()) - : r(e, "Error: No form element found."); - })(e); - }), - e.addCommand("mceCancel", () => { - ((e) => { - const o = t.trim(e.startContent), - a = s(e); - n(a) ? a.call(e, e) : e.resetContent(o); - })(e); - }); - })(e); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/searchreplace/plugin.min.js b/src/lib/dist/tinymce/plugins/searchreplace/plugin.min.js deleted file mode 100644 index d1425f66..00000000 --- a/src/lib/dist/tinymce/plugins/searchreplace/plugin.min.js +++ /dev/null @@ -1,826 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - const e = (e) => { - let t = e; - return { - get: () => t, - set: (e) => { - t = e; - }, - }; - }; - var t = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const n = (e) => (t) => - ((e) => { - const t = typeof e; - return null === e - ? "null" - : "object" === t && Array.isArray(e) - ? "array" - : "object" === t && - ((n = o = e), - (r = String).prototype.isPrototypeOf(n) || - (null === (s = o.constructor) || void 0 === s - ? void 0 - : s.name) === r.name) - ? "string" - : t; - var n, o, r, s; - })(t) === e, - o = (e) => (t) => typeof t === e, - r = n("string"), - s = n("array"), - a = o("boolean"), - l = o("number"), - i = () => {}, - c = (e) => () => e, - d = c(!0), - u = c( - "[~\u2116|!-*+-\\/:;?@\\[-`{}\xa1\xab\xb7\xbb\xbf;\xb7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]", - ); - class h { - constructor(e, t) { - (this.tag = e), (this.value = t); - } - static some(e) { - return new h(!0, e); - } - static none() { - return h.singletonNone; - } - fold(e, t) { - return this.tag ? t(this.value) : e(); - } - isSome() { - return this.tag; - } - isNone() { - return !this.tag; - } - map(e) { - return this.tag ? h.some(e(this.value)) : h.none(); - } - bind(e) { - return this.tag ? e(this.value) : h.none(); - } - exists(e) { - return this.tag && e(this.value); - } - forall(e) { - return !this.tag || e(this.value); - } - filter(e) { - return !this.tag || e(this.value) ? this : h.none(); - } - getOr(e) { - return this.tag ? this.value : e; - } - or(e) { - return this.tag ? this : e; - } - getOrThunk(e) { - return this.tag ? this.value : e(); - } - orThunk(e) { - return this.tag ? this : e(); - } - getOrDie(e) { - if (this.tag) return this.value; - throw new Error(null != e ? e : "Called getOrDie on None"); - } - static from(e) { - return null == e ? h.none() : h.some(e); - } - getOrNull() { - return this.tag ? this.value : null; - } - getOrUndefined() { - return this.value; - } - each(e) { - this.tag && e(this.value); - } - toArray() { - return this.tag ? [this.value] : []; - } - toString() { - return this.tag ? `some(${this.value})` : "none()"; - } - } - h.singletonNone = new h(!1); - const m = u; - var g = tinymce.util.Tools.resolve("tinymce.Env"), - f = tinymce.util.Tools.resolve("tinymce.util.Tools"); - const p = Array.prototype.slice, - x = Array.prototype.push, - y = (e, t) => { - const n = e.length, - o = new Array(n); - for (let r = 0; r < n; r++) { - const n = e[r]; - o[r] = t(n, r); - } - return o; - }, - w = (e, t) => { - for (let n = 0, o = e.length; n < o; n++) t(e[n], n); - }, - b = (e, t) => { - for (let n = e.length - 1; n >= 0; n--) t(e[n], n); - }, - v = (e, t) => - ((e) => { - const t = []; - for (let n = 0, o = e.length; n < o; ++n) { - if (!s(e[n])) - throw new Error( - "Arr.flatten item " + n + " was not an array, input: " + e, - ); - x.apply(t, e[n]); - } - return t; - })(y(e, t)), - C = Object.hasOwnProperty, - E = (e, t) => C.call(e, t); - "undefined" != typeof window ? window : Function("return this;")(); - const O = (3, (e) => 3 === ((e) => e.dom.nodeType)(e)); - const N = (e) => { - if (null == e) throw new Error("Node cannot be null or undefined"); - return { dom: e }; - }, - T = N, - k = (e, t) => ({ element: e, offset: t }), - A = (e, t) => { - ((e, t) => { - const n = ((e) => h.from(e.dom.parentNode).map(T))(e); - n.each((n) => { - n.dom.insertBefore(t.dom, e.dom); - }); - })(e, t), - ((e, t) => { - e.dom.appendChild(t.dom); - })(t, e); - }, - S = ((e, t) => { - const n = (t) => (e(t) ? h.from(t.dom.nodeValue) : h.none()); - return { - get: (t) => { - if (!e(t)) throw new Error("Can only get text value of a text node"); - return n(t).getOr(""); - }, - getOption: n, - set: (t, n) => { - if (!e(t)) - throw new Error("Can only set raw text value of a text node"); - t.dom.nodeValue = n; - }, - }; - })(O), - B = (e) => S.get(e); - var F = tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"); - const I = (e, t) => e.isBlock(t) || E(e.schema.getVoidElements(), t.nodeName), - R = (e, t) => "false" === e.getContentEditable(t), - M = (e, t) => - !e.isBlock(t) && E(e.schema.getWhitespaceElements(), t.nodeName), - D = (e, t) => - ((e, t) => { - const n = ((e) => y(e.dom.childNodes, T))(e); - return n.length > 0 && t < n.length ? k(n[t], 0) : k(e, t); - })(T(e), t), - P = (e, t, n, o, r, s = !0) => { - let a = s ? t(!1) : n; - for (; a; ) { - const n = R(e, a); - if (n || M(e, a)) { - if (n ? o.cef(a) : o.boundary(a)) break; - a = t(!0); - } else { - if (I(e, a)) { - if (o.boundary(a)) break; - } else 3 === a.nodeType && o.text(a); - if (a === r) break; - a = t(!1); - } - } - }, - W = (e, t, n, o, r) => { - var s; - if ( - ((e, t) => - I(e, t) || - R(e, t) || - M(e, t) || - ((e, t) => - "true" === e.getContentEditable(t) && - t.parentNode && - "false" === e.getContentEditableParent(t.parentNode))(e, t))(e, n) - ) - return; - const a = - null !== (s = e.getParent(o, e.isBlock)) && void 0 !== s - ? s - : e.getRoot(), - l = new F(n, a), - i = r ? l.next.bind(l) : l.prev.bind(l); - P(e, i, n, { - boundary: d, - cef: d, - text: (e) => { - r ? (t.fOffset += e.length) : (t.sOffset += e.length), - t.elements.push(T(e)); - }, - }); - }, - $ = (e, t, n, o, r, s = !0) => { - const a = new F(n, t), - l = []; - let i = { sOffset: 0, fOffset: 0, elements: [] }; - W(e, i, n, t, !1); - const c = () => ( - i.elements.length > 0 && - (l.push(i), (i = { sOffset: 0, fOffset: 0, elements: [] })), - !1 - ); - return ( - P( - e, - a.next.bind(a), - n, - { - boundary: c, - cef: (e) => (c(), r && l.push(...r.cef(e)), !1), - text: (e) => { - i.elements.push(T(e)), r && r.text(e, i); - }, - }, - o, - s, - ), - o && W(e, i, o, t, !0), - c(), - l - ); - }, - V = (e, t) => { - const n = D(t.startContainer, t.startOffset), - o = n.element.dom, - r = D(t.endContainer, t.endOffset), - s = r.element.dom; - return $( - e, - t.commonAncestorContainer, - o, - s, - { - text: (e, t) => { - e === s - ? (t.fOffset += e.length - r.offset) - : e === o && (t.sOffset += n.offset); - }, - cef: (t) => { - return ((e, t) => { - const n = p.call(e, 0); - return ( - n.sort((e, t) => - ((e, t) => - ((e, t, n) => 0 != (e.compareDocumentPosition(t) & n))( - e, - t, - Node.DOCUMENT_POSITION_PRECEDING, - ))(e.elements[0].dom, t.elements[0].dom) - ? 1 - : -1, - ), - n - ); - })( - v( - ((n = T(t)), - ((e, t) => { - const n = void 0 === t ? document : t.dom; - return (1 !== (o = n).nodeType && - 9 !== o.nodeType && - 11 !== o.nodeType) || - 0 === o.childElementCount - ? [] - : y(n.querySelectorAll(e), T); - var o; - })("*[contenteditable=true]", n)), - (t) => { - const n = t.dom; - return $(e, n, n); - }, - ), - ); - var n; - }, - }, - !1, - ); - }, - j = (e, t) => (t.collapsed ? [] : V(e, t)), - z = (e, t) => { - const n = e.createRng(); - return n.selectNode(t), j(e, n); - }, - U = (e, t) => - v(t, (t) => { - const n = t.elements, - o = y(n, B).join(""), - r = ((e, t, n = 0, o = e.length) => { - const r = t.regex; - r.lastIndex = n; - const s = []; - let a; - for (; (a = r.exec(e)); ) { - const e = a[t.matchIndex], - n = a.index + a[0].indexOf(e), - l = n + e.length; - if (l > o) break; - s.push({ start: n, finish: l }), (r.lastIndex = l); - } - return s; - })(o, e, t.sOffset, o.length - t.fOffset); - return ((e, t) => { - const n = ((o = e), - (r = (e, n) => { - const o = B(n), - r = e.last, - s = r + o.length, - a = v(t, (e, t) => - e.start < s && e.finish > r - ? [ - { - element: n, - start: Math.max(r, e.start) - r, - finish: Math.min(s, e.finish) - r, - matchId: t, - }, - ] - : [], - ); - return { results: e.results.concat(a), last: s }; - }), - (s = { results: [], last: 0 }), - w(o, (e, t) => { - s = r(s, e); - }), - s).results; - var o, r, s; - return ((e, t) => { - if (0 === e.length) return []; - { - let n = t(e[0]); - const o = []; - let r = []; - for (let s = 0, a = e.length; s < a; s++) { - const a = e[s], - l = t(a); - l !== n && (o.push(r), (r = [])), (n = l), r.push(a); - } - return 0 !== r.length && o.push(r), o; - } - })(n, (e) => e.matchId); - })(n, r); - }), - _ = (e, t) => { - b(e, (e, n) => { - b(e, (e) => { - const o = T(t.cloneNode(!1)); - ((e, t, n) => { - ((e, t, n) => { - if (!(r(n) || a(n) || l(n))) - throw ( - (console.error( - "Invalid call to Attribute.set. Key ", - t, - ":: Value ", - n, - ":: Element ", - e, - ), - new Error("Attribute value was not simple")) - ); - e.setAttribute(t, n + ""); - })(e.dom, t, n); - })(o, "data-mce-index", n); - const s = e.element.dom; - if (s.length === e.finish && 0 === e.start) A(e.element, o); - else { - s.length !== e.finish && s.splitText(e.finish); - const t = s.splitText(e.start); - A(T(t), o); - } - }); - }); - }, - q = (e) => e.getAttribute("data-mce-index"), - G = (e, t, n, o) => { - const r = e.dom.create("span", { "data-mce-bogus": 1 }); - r.className = "mce-match-marker"; - const s = e.getBody(); - return ( - te(e, t, !1), - o - ? ((e, t, n, o) => { - const r = n.getBookmark(), - s = e.select("td[data-mce-selected],th[data-mce-selected]"), - a = - s.length > 0 - ? ((e, t) => v(t, (t) => z(e, t)))(e, s) - : j(e, n.getRng()), - l = U(t, a); - return _(l, o), n.moveToBookmark(r), l.length; - })(e.dom, n, e.selection, r) - : ((e, t, n, o) => { - const r = z(e, n), - s = U(t, r); - return _(s, o), s.length; - })(e.dom, n, s, r) - ); - }, - K = (e) => { - var t; - const n = e.parentNode; - e.firstChild && n.insertBefore(e.firstChild, e), - null === (t = e.parentNode) || void 0 === t || t.removeChild(e); - }, - H = (e, t) => { - const n = [], - o = f.toArray(e.getBody().getElementsByTagName("span")); - if (o.length) - for (let e = 0; e < o.length; e++) { - const r = q(o[e]); - null !== r && r.length && r === t.toString() && n.push(o[e]); - } - return n; - }, - J = (e, t, n) => { - const o = t.get(); - let r = o.index; - const s = e.dom; - n - ? r + 1 === o.count - ? (r = 0) - : r++ - : r - 1 == -1 - ? (r = o.count - 1) - : r--, - s.removeClass(H(e, o.index), "mce-match-marker-selected"); - const a = H(e, r); - return a.length - ? (s.addClass(H(e, r), "mce-match-marker-selected"), - e.selection.scrollIntoView(a[0]), - r) - : -1; - }, - L = (e, t) => { - const n = t.parentNode; - e.remove(t), n && e.isEmpty(n) && e.remove(n); - }, - Q = (e, t, n, o, r, s) => { - const a = e.selection, - l = ((e, t) => { - const n = - "(" + - e - .replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&") - .replace(/\s/g, "[^\\S\\r\\n\\uFEFF]") + - ")"; - return t ? `(?:^|\\s|${m()})` + n + `(?=$|\\s|${m()})` : n; - })(n, r), - i = a.isForward(), - c = { regex: new RegExp(l, o ? "g" : "gi"), matchIndex: 1 }, - d = G(e, t, c, s); - if ((g.browser.isSafari() && a.setRng(a.getRng(), i), d)) { - const a = J(e, t, !0); - t.set({ - index: a, - count: d, - text: n, - matchCase: o, - wholeWord: r, - inSelection: s, - }); - } - return d; - }, - X = (e, t) => { - const n = J(e, t, !0); - t.set({ ...t.get(), index: n }); - }, - Y = (e, t) => { - const n = J(e, t, !1); - t.set({ ...t.get(), index: n }); - }, - Z = (e) => { - const t = q(e); - return null !== t && t.length > 0; - }, - ee = (e, t, n, o, r) => { - const s = t.get(), - a = s.index; - let l, - i = a; - o = !1 !== o; - const c = e.getBody(), - d = f.grep(f.toArray(c.getElementsByTagName("span")), Z); - for (let t = 0; t < d.length; t++) { - const c = q(d[t]); - let u = (l = parseInt(c, 10)); - if (r || u === s.index) { - for ( - n.length ? ((d[t].innerText = n), K(d[t])) : L(e.dom, d[t]); - d[++t]; - - ) { - if (((u = parseInt(q(d[t]), 10)), u !== l)) { - t--; - break; - } - L(e.dom, d[t]); - } - o && i--; - } else l > a && d[t].setAttribute("data-mce-index", String(l - 1)); - } - return ( - t.set({ ...s, count: r ? 0 : s.count - 1, index: i }), - o ? X(e, t) : Y(e, t), - !r && t.get().count > 0 - ); - }, - te = (e, t, n) => { - let o, r; - const s = t.get(), - a = f.toArray(e.getBody().getElementsByTagName("span")); - for (let e = 0; e < a.length; e++) { - const t = q(a[e]); - null !== t && - t.length && - (t === s.index.toString() && - (o || (o = a[e].firstChild), (r = a[e].firstChild)), - K(a[e])); - } - if ((t.set({ ...s, index: -1, count: 0, text: "" }), o && r)) { - const t = e.dom.createRng(); - return ( - t.setStart(o, 0), - t.setEnd(r, r.data.length), - !1 !== n && e.selection.setRng(t), - t - ); - } - }, - ne = (t, n) => { - const o = (() => { - const t = ((t) => { - const n = e(h.none()), - o = () => n.get().each(t); - return { - clear: () => { - o(), n.set(h.none()); - }, - isSet: () => n.get().isSome(), - get: () => n.get(), - set: (e) => { - o(), n.set(h.some(e)); - }, - }; - })(i); - return { ...t, on: (e) => t.get().each(e) }; - })(); - t.undoManager.add(); - const r = f.trim(t.selection.getContent({ format: "text" })), - s = (e) => { - e.setEnabled("next", ((e, t) => t.get().count > 1)(0, n)), - e.setEnabled("prev", ((e, t) => t.get().count > 1)(0, n)); - }, - a = (e, t) => { - w(["replace", "replaceall", "prev", "next"], (n) => - e.setEnabled(n, !t), - ); - }, - l = (e, t) => { - t.redial(y(e, t.getData())); - }, - c = (e, t) => { - g.browser.isSafari() && - g.deviceType.isTouch() && - ("find" === t || "replace" === t || "replaceall" === t) && - e.focus(t); - }, - d = (e) => { - te(t, n, !1), a(e, !0), s(e); - }, - u = (e) => { - const o = e.getData(), - r = n.get(); - if (o.findtext.length) { - if ( - r.text === o.findtext && - r.matchCase === o.matchcase && - r.wholeWord === o.wholewords - ) - X(t, n); - else { - const r = Q( - t, - n, - o.findtext, - o.matchcase, - o.wholewords, - o.inselection, - ); - r <= 0 && l(!0, e), a(e, 0 === r); - } - s(e); - } else d(e); - }, - m = n.get(), - p = { - findtext: r, - replacetext: "", - wholewords: m.wholeWord, - matchcase: m.matchCase, - inselection: m.inSelection, - }, - x = (e) => { - const t = [ - { - type: "bar", - items: [ - { - type: "input", - name: "findtext", - placeholder: "Find", - maximized: !0, - inputMode: "search", - }, - { - type: "button", - name: "prev", - text: "Previous", - icon: "action-prev", - enabled: !1, - borderless: !0, - }, - { - type: "button", - name: "next", - text: "Next", - icon: "action-next", - enabled: !1, - borderless: !0, - }, - ], - }, - { - type: "input", - name: "replacetext", - placeholder: "Replace with", - inputMode: "search", - }, - ]; - return ( - e && - t.push({ - type: "alertbanner", - level: "error", - text: "Could not find the specified string.", - icon: "warning", - }), - t - ); - }, - y = (e, o) => ({ - title: "Find and Replace", - size: "normal", - body: { type: "panel", items: x(e) }, - buttons: [ - { - type: "menu", - name: "options", - icon: "preferences", - tooltip: "Preferences", - align: "start", - items: [ - { - type: "togglemenuitem", - name: "matchcase", - text: "Match case", - }, - { - type: "togglemenuitem", - name: "wholewords", - text: "Find whole words only", - }, - { - type: "togglemenuitem", - name: "inselection", - text: "Find in selection", - }, - ], - }, - { type: "custom", name: "find", text: "Find", primary: !0 }, - { type: "custom", name: "replace", text: "Replace", enabled: !1 }, - { - type: "custom", - name: "replaceall", - text: "Replace all", - enabled: !1, - }, - ], - initialData: o, - onChange: (t, o) => { - e && l(!1, t), "findtext" === o.name && n.get().count > 0 && d(t); - }, - onAction: (e, o) => { - const r = e.getData(); - switch (o.name) { - case "find": - u(e); - break; - case "replace": - ee(t, n, r.replacetext) ? s(e) : d(e); - break; - case "replaceall": - ee(t, n, r.replacetext, !0, !0), d(e); - break; - case "prev": - Y(t, n), s(e); - break; - case "next": - X(t, n), s(e); - break; - case "matchcase": - case "wholewords": - case "inselection": - l(!1, e), - ((e) => { - const t = e.getData(), - o = n.get(); - n.set({ - ...o, - matchCase: t.matchcase, - wholeWord: t.wholewords, - inSelection: t.inselection, - }); - })(e), - d(e); - } - c(e, o.name); - }, - onSubmit: (e) => { - u(e), c(e, "find"); - }, - onClose: () => { - t.focus(), te(t, n), t.undoManager.add(); - }, - }); - o.set(t.windowManager.open(y(!1, p), { inline: "toolbar" })); - }, - oe = (e, t) => () => { - ne(e, t); - }; - t.add("searchreplace", (t) => { - const n = e({ - index: -1, - count: 0, - text: "", - matchCase: !1, - wholeWord: !1, - inSelection: !1, - }); - return ( - ((e, t) => { - e.addCommand("SearchReplace", () => { - ne(e, t); - }); - })(t, n), - ((e, t) => { - e.ui.registry.addMenuItem("searchreplace", { - text: "Find and replace...", - shortcut: "Meta+F", - onAction: oe(e, t), - icon: "search", - }), - e.ui.registry.addButton("searchreplace", { - tooltip: "Find and replace", - onAction: oe(e, t), - icon: "search", - }), - e.shortcuts.add("Meta+F", "", oe(e, t)); - })(t, n), - ((e, t) => ({ - done: (n) => te(e, t, n), - find: (n, o, r, s = !1) => Q(e, t, n, o, r, s), - next: () => X(e, t), - prev: () => Y(e, t), - replace: (n, o, r) => ee(e, t, n, o, r), - }))(t, n) - ); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/table/plugin.min.js b/src/lib/dist/tinymce/plugins/table/plugin.min.js deleted file mode 100644 index 6788c075..00000000 --- a/src/lib/dist/tinymce/plugins/table/plugin.min.js +++ /dev/null @@ -1,2792 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var e = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const t = (e) => (t) => - ((e) => { - const t = typeof e; - return null === e - ? "null" - : "object" === t && Array.isArray(e) - ? "array" - : "object" === t && - ((o = l = e), - (n = String).prototype.isPrototypeOf(o) || - (null === (r = l.constructor) || void 0 === r - ? void 0 - : r.name) === n.name) - ? "string" - : t; - var o, l, n, r; - })(t) === e, - o = (e) => (t) => typeof t === e, - l = t("string"), - n = t("array"), - r = o("boolean"), - a = (void 0, (e) => undefined === e); - const s = (e) => !((e) => null == e)(e), - c = o("function"), - i = o("number"), - m = () => {}, - d = (e) => () => e, - u = (e) => e, - p = (e, t) => e === t; - function b(e, ...t) { - return (...o) => { - const l = t.concat(o); - return e.apply(null, l); - }; - } - const g = (e) => { - e(); - }, - h = d(!1), - f = d(!0); - class y { - constructor(e, t) { - (this.tag = e), (this.value = t); - } - static some(e) { - return new y(!0, e); - } - static none() { - return y.singletonNone; - } - fold(e, t) { - return this.tag ? t(this.value) : e(); - } - isSome() { - return this.tag; - } - isNone() { - return !this.tag; - } - map(e) { - return this.tag ? y.some(e(this.value)) : y.none(); - } - bind(e) { - return this.tag ? e(this.value) : y.none(); - } - exists(e) { - return this.tag && e(this.value); - } - forall(e) { - return !this.tag || e(this.value); - } - filter(e) { - return !this.tag || e(this.value) ? this : y.none(); - } - getOr(e) { - return this.tag ? this.value : e; - } - or(e) { - return this.tag ? this : e; - } - getOrThunk(e) { - return this.tag ? this.value : e(); - } - orThunk(e) { - return this.tag ? this : e(); - } - getOrDie(e) { - if (this.tag) return this.value; - throw new Error(null != e ? e : "Called getOrDie on None"); - } - static from(e) { - return s(e) ? y.some(e) : y.none(); - } - getOrNull() { - return this.tag ? this.value : null; - } - getOrUndefined() { - return this.value; - } - each(e) { - this.tag && e(this.value); - } - toArray() { - return this.tag ? [this.value] : []; - } - toString() { - return this.tag ? `some(${this.value})` : "none()"; - } - } - y.singletonNone = new y(!1); - const w = Object.keys, - S = Object.hasOwnProperty, - C = (e, t) => { - const o = w(e); - for (let l = 0, n = o.length; l < n; l++) { - const n = o[l]; - t(e[n], n); - } - }, - v = (e, t) => { - const o = {}; - var l; - return ( - ((e, t, o, l) => { - C(e, (e, n) => { - (t(e, n) ? o : l)(e, n); - }); - })( - e, - t, - ((l = o), - (e, t) => { - l[t] = e; - }), - m, - ), - o - ); - }, - T = (e) => w(e).length, - x = (e, t) => (A(e, t) ? y.from(e[t]) : y.none()), - A = (e, t) => S.call(e, t), - R = (e, t) => A(e, t) && void 0 !== e[t] && null !== e[t], - O = Array.prototype.indexOf, - _ = Array.prototype.push, - D = (e, t) => ((e, t) => O.call(e, t))(e, t) > -1, - N = (e, t) => { - for (let o = 0, l = e.length; o < l; o++) if (t(e[o], o)) return !0; - return !1; - }, - I = (e, t) => { - const o = []; - for (let l = 0; l < e; l++) o.push(t(l)); - return o; - }, - M = (e, t) => { - const o = e.length, - l = new Array(o); - for (let n = 0; n < o; n++) { - const o = e[n]; - l[n] = t(o, n); - } - return l; - }, - P = (e, t) => { - for (let o = 0, l = e.length; o < l; o++) t(e[o], o); - }, - k = (e, t) => { - const o = []; - for (let l = 0, n = e.length; l < n; l++) { - const n = e[l]; - t(n, l) && o.push(n); - } - return o; - }, - E = (e, t, o) => ( - P(e, (e, l) => { - o = t(o, e, l); - }), - o - ), - B = (e, t) => - ((e, t, o) => { - for (let l = 0, n = e.length; l < n; l++) { - const n = e[l]; - if (t(n, l)) return y.some(n); - if (o(n, l)) break; - } - return y.none(); - })(e, t, h), - F = (e, t) => - ((e) => { - const t = []; - for (let o = 0, l = e.length; o < l; ++o) { - if (!n(e[o])) - throw new Error( - "Arr.flatten item " + o + " was not an array, input: " + e, - ); - _.apply(t, e[o]); - } - return t; - })(M(e, t)), - q = (e, t) => { - for (let o = 0, l = e.length; o < l; ++o) - if (!0 !== t(e[o], o)) return !1; - return !0; - }, - L = (e, t) => (t >= 0 && t < e.length ? y.some(e[t]) : y.none()), - H = (e, t) => { - for (let o = 0; o < e.length; o++) { - const l = t(e[o], o); - if (l.isSome()) return l; - } - return y.none(); - }, - j = (e) => { - if (null == e) throw new Error("Node cannot be null or undefined"); - return { dom: e }; - }, - V = { - fromHtml: (e, t) => { - const o = (t || document).createElement("div"); - if ( - ((o.innerHTML = e), !o.hasChildNodes() || o.childNodes.length > 1) - ) { - const t = "HTML does not have a single root node"; - throw (console.error(t, e), new Error(t)); - } - return j(o.childNodes[0]); - }, - fromTag: (e, t) => { - const o = (t || document).createElement(e); - return j(o); - }, - fromText: (e, t) => { - const o = (t || document).createTextNode(e); - return j(o); - }, - fromDom: j, - fromPoint: (e, t, o) => y.from(e.dom.elementFromPoint(t, o)).map(j), - }, - $ = (e, t) => { - const o = e.dom; - if (1 !== o.nodeType) return !1; - { - const e = o; - if (void 0 !== e.matches) return e.matches(t); - if (void 0 !== e.msMatchesSelector) return e.msMatchesSelector(t); - if (void 0 !== e.webkitMatchesSelector) - return e.webkitMatchesSelector(t); - if (void 0 !== e.mozMatchesSelector) return e.mozMatchesSelector(t); - throw new Error("Browser lacks native selectors"); - } - }, - W = (e) => - (1 !== e.nodeType && 9 !== e.nodeType && 11 !== e.nodeType) || - 0 === e.childElementCount, - z = (e, t) => e.dom === t.dom, - U = $; - "undefined" != typeof window ? window : Function("return this;")(); - const G = (e) => e.dom.nodeName.toLowerCase(), - K = (e) => e.dom.nodeType, - J = (e) => (t) => K(t) === e, - Q = J(1), - X = J(3), - Y = J(9), - Z = J(11), - ee = (e) => (t) => Q(t) && G(t) === e, - te = (e) => (Y(e) ? e : V.fromDom(e.dom.ownerDocument)), - oe = (e) => y.from(e.dom.parentNode).map(V.fromDom), - le = (e) => y.from(e.dom.nextSibling).map(V.fromDom), - ne = (e) => M(e.dom.childNodes, V.fromDom), - re = - c(Element.prototype.attachShadow) && c(Node.prototype.getRootNode) - ? (e) => V.fromDom(e.dom.getRootNode()) - : te, - ae = (e) => V.fromDom(e.dom.host), - se = (e) => { - const t = X(e) ? e.dom.parentNode : e.dom; - if (null == t || null === t.ownerDocument) return !1; - const o = t.ownerDocument; - return ((e) => { - const t = re(e); - return Z((o = t)) && s(o.dom.host) ? y.some(t) : y.none(); - var o; - })(V.fromDom(t)).fold( - () => o.body.contains(t), - ((l = se), (n = ae), (e) => l(n(e))), - ); - var l, n; - }; - var ce = (e, t, o, l, n) => - e(o, l) ? y.some(o) : c(n) && n(o) ? y.none() : t(o, l, n); - const ie = (e, t, o) => { - let l = e.dom; - const n = c(o) ? o : h; - for (; l.parentNode; ) { - l = l.parentNode; - const e = V.fromDom(l); - if (t(e)) return y.some(e); - if (n(e)) break; - } - return y.none(); - }, - me = (e, t, o) => ie(e, (e) => $(e, t), o), - de = (e, t) => - ((e, o) => - B(e.dom.childNodes, (e) => { - return (o = V.fromDom(e)), $(o, t); - var o; - }).map(V.fromDom))(e), - ue = (e, t) => - ((e, t) => { - const o = void 0 === t ? document : t.dom; - return W(o) ? y.none() : y.from(o.querySelector(e)).map(V.fromDom); - })(t, e), - pe = (e, t, o) => ce((e, t) => $(e, t), me, e, t, o), - be = (e, t = !1) => { - return se(e) - ? e.dom.isContentEditable - : ((o = e), pe(o, "[contenteditable]")).fold( - d(t), - (e) => "true" === ge(e), - ); - var o; - }, - ge = (e) => e.dom.contentEditable, - he = (e) => (t) => z(t, ((e) => V.fromDom(e.getBody()))(e)), - fe = (e) => (/^\d+(\.\d+)?$/.test(e) ? e + "px" : e), - ye = (e) => V.fromDom(e.selection.getStart()), - we = (e, t) => { - let o = []; - return ( - P(ne(e), (e) => { - t(e) && (o = o.concat([e])), (o = o.concat(we(e, t))); - }), - o - ); - }, - Se = (e, t) => ((e, o) => k(ne(e), (e) => $(e, t)))(e), - Ce = (e, t) => - ((e, t) => { - const o = void 0 === t ? document : t.dom; - return W(o) ? [] : M(o.querySelectorAll(e), V.fromDom); - })(t, e), - ve = (e, t, o) => { - if (!(l(o) || r(o) || i(o))) - throw ( - (console.error( - "Invalid call to Attribute.set. Key ", - t, - ":: Value ", - o, - ":: Element ", - e, - ), - new Error("Attribute value was not simple")) - ); - e.setAttribute(t, o + ""); - }, - Te = (e, t) => { - const o = e.dom.getAttribute(t); - return null === o ? void 0 : o; - }, - xe = (e, t) => y.from(Te(e, t)), - Ae = (e, t) => { - e.dom.removeAttribute(t); - }, - Re = (e, t, o = p) => e.exists((e) => o(e, t)), - Oe = (e, t, o) => - e.isSome() && t.isSome() - ? y.some(o(e.getOrDie(), t.getOrDie())) - : y.none(), - _e = (e, t) => - ((e, t, o) => - "" === t || (e.length >= t.length && e.substr(0, 0 + t.length) === t))( - e, - t, - ), - De = ((Ne = /^\s+|\s+$/g), (e) => e.replace(Ne, "")); - var Ne; - const Ie = (e) => e.length > 0, - Me = (e, t = 10) => { - const o = parseInt(e, t); - return isNaN(o) ? y.none() : y.some(o); - }, - Pe = (e) => void 0 !== e.style && c(e.style.getPropertyValue), - ke = (e, t) => { - const o = e.dom, - l = window.getComputedStyle(o).getPropertyValue(t); - return "" !== l || se(e) ? l : Ee(o, t); - }, - Ee = (e, t) => (Pe(e) ? e.style.getPropertyValue(t) : ""), - Be = (e, t) => { - const o = e.dom, - l = Ee(o, t); - return y.from(l).filter((e) => e.length > 0); - }, - Fe = (e, t, o = 0) => - xe(e, t) - .map((e) => parseInt(e, 10)) - .getOr(o), - qe = (e, t) => Le(e, t, f), - Le = (e, t, o) => - F(ne(e), (e) => ($(e, t) ? (o(e) ? [e] : []) : Le(e, t, o))), - He = ["tfoot", "thead", "tbody", "colgroup"], - je = (e, t, o) => ({ element: e, rowspan: t, colspan: o }), - Ve = (e, t, o) => ({ element: e, cells: t, section: o }), - $e = (e, t) => pe(e, "table", t), - We = (e) => qe(e, "tr"), - ze = (e) => $e(e).fold(d([]), (e) => Se(e, "colgroup")), - Ue = (e) => - oe(e) - .map((e) => { - const t = G(e); - return ((e) => D(He, e))(t) ? t : "tbody"; - }) - .getOr("tbody"), - Ge = (e) => - xe(e, "data-snooker-locked-cols") - .bind((e) => y.from(e.match(/\d+/g))) - .map((e) => - ((e, t) => { - const o = {}; - for (let l = 0, n = e.length; l < n; l++) { - const n = e[l]; - o[String(n)] = t(n, l); - } - return o; - })(e, f), - ), - Ke = (e, t) => e + "," + t, - Je = (e) => { - const t = {}, - o = []; - var l; - const n = ((l = e), L(l, 0)) - .map((e) => e.element) - .bind($e) - .bind(Ge) - .getOr({}); - let r = 0, - a = 0, - s = 0; - const { pass: c, fail: i } = ((e, t) => { - const o = [], - l = []; - for (let t = 0, r = e.length; t < r; t++) { - const r = e[t]; - ((n = r), "colgroup" === n.section ? o : l).push(r); - } - var n; - return { pass: o, fail: l }; - })(e); - P(i, (e) => { - const l = []; - P(e.cells, (e) => { - let o = 0; - for (; void 0 !== t[Ke(s, o)]; ) o++; - const r = R(n, o.toString()), - c = ((e, t, o, l, n, r) => ({ - element: e, - rowspan: t, - colspan: o, - row: l, - column: n, - isLocked: r, - }))(e.element, e.rowspan, e.colspan, s, o, r); - for (let l = 0; l < e.colspan; l++) - for (let n = 0; n < e.rowspan; n++) { - const e = o + l, - r = Ke(s + n, e); - (t[r] = c), (a = Math.max(a, e + 1)); - } - l.push(c); - }), - r++, - o.push(Ve(e.element, l, e.section)), - s++; - }); - const { columns: m, colgroups: d } = ((e) => L(e, e.length - 1))(c) - .map((e) => { - const t = ((e) => { - const t = {}; - let o = 0; - return ( - P(e.cells, (e) => { - const l = e.colspan; - I(l, (n) => { - const r = o + n; - t[r] = ((e, t, o) => ({ - element: e, - colspan: t, - column: o, - }))(e.element, l, r); - }), - (o += l); - }), - t - ); - })(e), - o = ((e, t) => ({ element: e, columns: t }))( - e.element, - ((e, t) => { - const o = []; - return ( - C(e, (e, l) => { - o.push(t(e, l)); - }), - o - ); - })(t, u), - ); - return { colgroups: [o], columns: t }; - }) - .getOrThunk(() => ({ colgroups: [], columns: {} })), - p = ((e, t) => ({ rows: e, columns: t }))(r, a); - return { grid: p, access: t, all: o, columns: m, colgroups: d }; - }, - Qe = (e) => { - const t = ((e) => { - const t = We(e); - return ((e, t) => - M(e, (e) => { - if ("colgroup" === G(e)) { - const t = M( - ((e) => - $(e, "colgroup") - ? Se(e, "col") - : F(ze(e), (e) => Se(e, "col")))(e), - (e) => { - const t = Fe(e, "span", 1); - return je(e, 1, t); - }, - ); - return Ve(e, t, "colgroup"); - } - { - const o = M(((e) => qe(e, "th,td"))(e), (e) => { - const t = Fe(e, "rowspan", 1), - o = Fe(e, "colspan", 1); - return je(e, t, o); - }); - return Ve(e, o, t(e)); - } - }))([...ze(e), ...t], Ue); - })(e); - return Je(t); - }, - Xe = (e, t, o) => y.from(e.access[Ke(t, o)]), - Ye = (e, t, o) => { - const l = ((e, t) => { - const o = F(e.all, (e) => e.cells); - return k(o, t); - })(e, (e) => o(t, e.element)); - return l.length > 0 ? y.some(l[0]) : y.none(); - }, - Ze = (e, t) => y.from(e.columns[t]); - var et = tinymce.util.Tools.resolve("tinymce.util.Tools"); - const tt = (e, t, o) => { - const l = e.select("td,th", t); - let n; - for (let t = 0; t < l.length; t++) { - const r = e.getStyle(l[t], o); - if ((a(n) && (n = r), n !== r)) return ""; - } - return n; - }, - ot = (e, t, o) => { - et.each("left center right".split(" "), (l) => { - l !== o && e.formatter.remove("align" + l, {}, t); - }), - o && e.formatter.apply("align" + o, {}, t); - }, - lt = (e, t, o) => { - e.dispatch("TableModified", { ...o, table: t }); - }, - nt = (e, t, o) => - ((e, t) => - ((e) => { - const t = parseFloat(e); - return isNaN(t) ? y.none() : y.some(t); - })(e).getOr(t))(ke(e, t), o), - rt = (e) => - ((e, t) => { - const o = e.dom, - l = o.getBoundingClientRect().width || o.offsetWidth; - return "border-box" === t - ? l - : ((e, t, o, l) => - t - - nt(e, `padding-${o}`, 0) - - nt(e, `padding-${l}`, 0) - - nt(e, `border-${o}-width`, 0) - - nt(e, `border-${l}-width`, 0))(e, l, "left", "right"); - })(e, "content-box"); - var at = tinymce.util.Tools.resolve("tinymce.Env"); - const st = I(5, (e) => { - const t = `${e + 1}px`; - return { title: t, value: t }; - }), - ct = M( - [ - "Solid", - "Dotted", - "Dashed", - "Double", - "Groove", - "Ridge", - "Inset", - "Outset", - "None", - "Hidden", - ], - (e) => ({ title: e, value: e.toLowerCase() }), - ), - it = "100%", - mt = (e) => { - var t; - const o = e.dom, - l = - null !== (t = o.getParent(e.selection.getStart(), o.isBlock)) && - void 0 !== t - ? t - : e.getBody(); - return rt(V.fromDom(l)) + "px"; - }, - dt = (e) => (t) => t.options.get(e), - ut = dt("table_sizing_mode"), - pt = dt("table_border_widths"), - bt = dt("table_border_styles"), - gt = dt("table_cell_advtab"), - ht = dt("table_row_advtab"), - ft = dt("table_advtab"), - yt = dt("table_appearance_options"), - wt = dt("table_grid"), - St = dt("table_style_by_css"), - Ct = dt("table_cell_class_list"), - vt = dt("table_row_class_list"), - Tt = dt("table_class_list"), - xt = dt("table_toolbar"), - At = dt("table_background_color_map"), - Rt = dt("table_border_color_map"), - Ot = (e) => "fixed" === ut(e), - _t = (e) => "responsive" === ut(e), - Dt = (e) => { - const t = e.options, - o = t.get("table_default_styles"); - return t.isSet("table_default_styles") - ? o - : ((e, t) => - _t(e) || !St(e) - ? t - : Ot(e) - ? { ...t, width: mt(e) } - : { ...t, width: it })(e, o); - }, - Nt = (e) => { - const t = e.options, - o = t.get("table_default_attributes"); - return t.isSet("table_default_attributes") - ? o - : ((e, t) => - _t(e) || St(e) - ? t - : Ot(e) - ? { ...t, width: mt(e) } - : { ...t, width: it })(e, o); - }, - It = (e, t) => - t.column >= e.startCol && - t.column + t.colspan - 1 <= e.finishCol && - t.row >= e.startRow && - t.row + t.rowspan - 1 <= e.finishRow, - Mt = (e, t, o) => - ((e, t, o) => { - const l = Ye(e, t, z), - n = Ye(e, o, z); - return l.bind((e) => - n.map((t) => { - return ( - (o = e), - (l = t), - { - startRow: Math.min(o.row, l.row), - startCol: Math.min(o.column, l.column), - finishRow: Math.max( - o.row + o.rowspan - 1, - l.row + l.rowspan - 1, - ), - finishCol: Math.max( - o.column + o.colspan - 1, - l.column + l.colspan - 1, - ), - } - ); - var o, l; - }), - ); - })(e, t, o).bind((t) => - ((e, t) => { - let o = !0; - const l = b(It, t); - for (let n = t.startRow; n <= t.finishRow; n++) - for (let r = t.startCol; r <= t.finishCol; r++) - o = o && Xe(e, n, r).exists(l); - return o ? y.some(t) : y.none(); - })(e, t), - ), - Pt = Qe, - kt = (e, t) => { - oe(e).each((o) => { - o.dom.insertBefore(t.dom, e.dom); - }); - }, - Et = (e, t) => { - le(e).fold( - () => { - oe(e).each((e) => { - Bt(e, t); - }); - }, - (e) => { - kt(e, t); - }, - ); - }, - Bt = (e, t) => { - e.dom.appendChild(t.dom); - }, - Ft = (e, t) => { - P(t, (o, l) => { - const n = 0 === l ? e : t[l - 1]; - Et(n, o); - }); - }, - qt = (e) => { - const t = e.dom; - null !== t.parentNode && t.parentNode.removeChild(t); - }, - Lt = ((e, t) => { - const o = (t) => (e(t) ? y.from(t.dom.nodeValue) : y.none()); - return { - get: (t) => { - if (!e(t)) throw new Error("Can only get text value of a text node"); - return o(t).getOr(""); - }, - getOption: o, - set: (t, o) => { - if (!e(t)) - throw new Error("Can only set raw text value of a text node"); - t.dom.nodeValue = o; - }, - }; - })(X); - var Ht = [ - "body", - "p", - "div", - "article", - "aside", - "figcaption", - "figure", - "footer", - "header", - "nav", - "section", - "ol", - "ul", - "li", - "table", - "thead", - "tbody", - "tfoot", - "caption", - "tr", - "td", - "th", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "blockquote", - "pre", - "address", - ]; - const jt = (e, t, o, l) => { - const n = t(e, o); - return ( - (r = (o, l) => { - const n = t(e, l); - return Vt(e, o, n); - }), - (a = n), - ((e, t) => { - for (let o = e.length - 1; o >= 0; o--) t(e[o], o); - })(l, (e, t) => { - a = r(a, e); - }), - a - ); - var r, a; - }, - Vt = (e, t, o) => t.bind((t) => o.filter(b(e.eq, t))), - $t = { - up: d({ - selector: me, - closest: pe, - predicate: ie, - all: (e, t) => { - const o = c(t) ? t : h; - let l = e.dom; - const n = []; - for (; null !== l.parentNode && void 0 !== l.parentNode; ) { - const e = l.parentNode, - t = V.fromDom(e); - if ((n.push(t), !0 === o(t))) break; - l = e; - } - return n; - }, - }), - down: d({ selector: Ce, predicate: we }), - styles: d({ - get: ke, - getRaw: Be, - set: (e, t, o) => { - ((e, t, o) => { - if (!l(o)) - throw ( - (console.error( - "Invalid call to CSS.set. Property ", - t, - ":: Value ", - o, - ":: Element ", - e, - ), - new Error("CSS value must be a string: " + o)) - ); - Pe(e) && e.style.setProperty(t, o); - })(e.dom, t, o); - }, - remove: (e, t) => { - ((e, t) => { - Pe(e) && e.style.removeProperty(t); - })(e.dom, t), - Re(xe(e, "style").map(De), "") && Ae(e, "style"); - }, - }), - attrs: d({ - get: Te, - set: (e, t, o) => { - ve(e.dom, t, o); - }, - remove: Ae, - copyTo: (e, t) => { - ((e, t) => { - const o = e.dom; - C(t, (e, t) => { - ve(o, t, e); - }); - })( - t, - E(e.dom.attributes, (e, t) => ((e[t.name] = t.value), e), {}), - ); - }, - }), - insert: d({ - before: kt, - after: Et, - afterAll: Ft, - append: Bt, - appendAll: (e, t) => { - P(t, (t) => { - Bt(e, t); - }); - }, - prepend: (e, t) => { - ((e) => - ((e, t) => { - const o = e.dom.childNodes; - return y.from(o[0]).map(V.fromDom); - })(e))(e).fold( - () => { - Bt(e, t); - }, - (o) => { - e.dom.insertBefore(t.dom, o.dom); - }, - ); - }, - wrap: (e, t) => { - kt(e, t), Bt(t, e); - }, - }), - remove: d({ - unwrap: (e) => { - const t = ne(e); - t.length > 0 && Ft(e, t), qt(e); - }, - remove: qt, - }), - create: d({ - nu: V.fromTag, - clone: (e) => V.fromDom(e.dom.cloneNode(!1)), - text: V.fromText, - }), - query: d({ - comparePosition: (e, t) => e.dom.compareDocumentPosition(t.dom), - prevSibling: (e) => y.from(e.dom.previousSibling).map(V.fromDom), - nextSibling: le, - }), - property: d({ - children: ne, - name: G, - parent: oe, - document: (e) => te(e).dom, - isText: X, - isComment: (e) => 8 === K(e) || "#comment" === G(e), - isElement: Q, - isSpecial: (e) => { - const t = G(e); - return D( - [ - "script", - "noscript", - "iframe", - "noframes", - "noembed", - "title", - "style", - "textarea", - "xmp", - ], - t, - ); - }, - getLanguage: (e) => (Q(e) ? xe(e, "lang") : y.none()), - getText: (e) => Lt.get(e), - setText: (e, t) => Lt.set(e, t), - isBoundary: (e) => !!Q(e) && ("body" === G(e) || D(Ht, G(e))), - isEmptyTag: (e) => !!Q(e) && D(["br", "img", "hr", "input"], G(e)), - isNonEditable: (e) => Q(e) && "false" === Te(e, "contenteditable"), - }), - eq: z, - is: U, - }, - Wt = (e) => me(e, "table"), - zt = (e, t, o) => - ue(e, t).bind((t) => - ue(e, o).bind((e) => { - return ((o = Wt), - (l = [t, e]), - ((e, t, o) => - o.length > 0 - ? ((e, t, o, l) => l(e, t, o[0], o.slice(1)))(e, t, o, jt) - : y.none())($t, (e, t) => o(t), l)).map((o) => ({ - first: t, - last: e, - table: o, - })); - var o, l; - }), - ), - Ut = (e) => M(e, V.fromDom), - Gt = "data-mce-selected", - Kt = "data-mce-first-selected", - Jt = "data-mce-last-selected", - Qt = { - selected: Gt, - selectedSelector: "td[" + Gt + "],th[" + Gt + "]", - firstSelected: Kt, - firstSelectedSelector: "td[" + Kt + "],th[" + Kt + "]", - lastSelected: Jt, - lastSelectedSelector: "td[" + Jt + "],th[" + Jt + "]", - }, - Xt = (e) => (t, o) => { - const l = G(t), - n = - "col" === l || "colgroup" === l - ? $e((r = t)) - .bind((e) => - ((e, t) => - ((e, t) => { - const o = Ce(e, t); - return o.length > 0 ? y.some(o) : y.none(); - })(e, t))(e, Qt.firstSelectedSelector), - ) - .fold(d(r), (e) => e[0]) - : t; - var r; - return pe(n, e, o); - }, - Yt = Xt("th,td,caption"), - Zt = Xt("th,td"), - eo = (e) => Ut(e.model.table.getSelectedCells()), - to = (e, t) => { - const o = Zt(e), - l = o.bind((e) => $e(e)).map((e) => We(e)); - return Oe(o, l, (e, o) => - k(o, (o) => N(Ut(o.dom.cells), (o) => "1" === Te(o, t) || z(o, e))), - ).getOr([]); - }, - oo = [ - { text: "None", value: "" }, - { text: "Top", value: "top" }, - { text: "Middle", value: "middle" }, - { text: "Bottom", value: "bottom" }, - ], - lo = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, - no = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, - ro = (e) => { - return ((t = e), - "#", - _e(t, "#") ? ((e, t) => e.substring(1))(t) : t).toUpperCase(); - var t; - }, - ao = (e) => { - const t = e.toString(16); - return (1 === t.length ? "0" + t : t).toUpperCase(); - }, - so = (e) => { - return (t = ao(e.red) + ao(e.green) + ao(e.blue)), { value: ro(t) }; - var t; - }, - co = /^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i, - io = - /^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i, - mo = (e, t, o, l) => ({ red: e, green: t, blue: o, alpha: l }), - uo = (e, t, o, l) => { - const n = parseInt(e, 10), - r = parseInt(t, 10), - a = parseInt(o, 10), - s = parseFloat(l); - return mo(n, r, a, s); - }, - po = (e) => { - if ("transparent" === e) return y.some(mo(0, 0, 0, 0)); - const t = co.exec(e); - if (null !== t) return y.some(uo(t[1], t[2], t[3], "1")); - const o = io.exec(e); - return null !== o ? y.some(uo(o[1], o[2], o[3], o[4])) : y.none(); - }, - bo = (e) => { - let t = e; - return { - get: () => t, - set: (e) => { - t = e; - }, - }; - }, - go = (e, t, o) => (l) => { - const n = ((e) => { - const t = bo(y.none()), - o = () => t.get().each(e); - return { - clear: () => { - o(), t.set(y.none()); - }, - isSet: () => t.get().isSome(), - get: () => t.get(), - set: (e) => { - o(), t.set(y.some(e)); - }, - }; - })((e) => e.unbind()), - r = !Ie(o), - a = () => { - const a = eo(e), - s = (l) => e.formatter.match(t, { value: o }, l.dom, r); - r - ? (l.setActive(!N(a, s)), - n.set(e.formatter.formatChanged(t, (e) => l.setActive(!e), !0))) - : (l.setActive(q(a, s)), - n.set( - e.formatter.formatChanged(t, l.setActive, !1, { value: o }), - )); - }; - return e.initialized ? a() : e.on("init", a), n.clear; - }, - ho = (e) => R(e, "menu"), - fo = (e) => - M(e, (e) => { - const t = e.text || e.title || ""; - return ho(e) - ? { text: t, items: fo(e.menu) } - : { text: t, value: e.value }; - }), - yo = (e, t, o, l) => - M(t, (t) => { - const n = t.text || t.title; - return ho(t) - ? { - type: "nestedmenuitem", - text: n, - getSubmenuItems: () => yo(e, t.menu, o, l), - } - : { - text: n, - type: "togglemenuitem", - onAction: () => l(t.value), - onSetup: go(e, o, t.value), - }; - }), - wo = (e, t) => (o) => { - e.execCommand("mceTableApplyCellStyle", !1, { [t]: o }); - }, - So = (e) => - F(e, (e) => - ho(e) ? [{ ...e, menu: So(e.menu) }] : Ie(e.value) ? [e] : [], - ), - Co = (e, t, o, l) => (n) => n(yo(e, t, o, l)), - vo = (e, t, o) => { - const l = M(t, (e) => { - return { - text: e.title, - value: - "#" + - ((o = e.value), - ((t = o), - ((e) => lo.test(e) || no.test(e))(t) - ? y.some({ value: ro(t) }) - : y.none()) - .orThunk(() => po(o).map(so)) - .getOrThunk(() => { - const e = document.createElement("canvas"); - (e.height = 1), (e.width = 1); - const t = e.getContext("2d"); - t.clearRect(0, 0, e.width, e.height), - (t.fillStyle = "#FFFFFF"), - (t.fillStyle = o), - t.fillRect(0, 0, 1, 1); - const l = t.getImageData(0, 0, 1, 1).data, - n = l[0], - r = l[1], - a = l[2], - s = l[3]; - return so(mo(n, r, a, s)); - })).value, - type: "choiceitem", - }; - var t, o; - }); - return [ - { - type: "fancymenuitem", - fancytype: "colorswatch", - initData: { - colors: l.length > 0 ? l : void 0, - allowCustomColors: !1, - }, - onAction: (t) => { - const l = "remove" === t.value ? "" : t.value; - e.execCommand("mceTableApplyCellStyle", !1, { [o]: l }); - }, - }, - ]; - }, - To = (e) => () => { - const t = - "header" === e.queryCommandValue("mceTableRowType") ? "body" : "header"; - e.execCommand("mceTableRowType", !1, { type: t }); - }, - xo = (e) => () => { - const t = "th" === e.queryCommandValue("mceTableColType") ? "td" : "th"; - e.execCommand("mceTableColType", !1, { type: t }); - }, - Ao = [ - { name: "width", type: "input", label: "Width" }, - { name: "height", type: "input", label: "Height" }, - { - name: "celltype", - type: "listbox", - label: "Cell type", - items: [ - { text: "Cell", value: "td" }, - { text: "Header cell", value: "th" }, - ], - }, - { - name: "scope", - type: "listbox", - label: "Scope", - items: [ - { text: "None", value: "" }, - { text: "Row", value: "row" }, - { text: "Column", value: "col" }, - { text: "Row group", value: "rowgroup" }, - { text: "Column group", value: "colgroup" }, - ], - }, - { - name: "halign", - type: "listbox", - label: "Horizontal align", - items: [ - { text: "None", value: "" }, - { text: "Left", value: "left" }, - { text: "Center", value: "center" }, - { text: "Right", value: "right" }, - ], - }, - { name: "valign", type: "listbox", label: "Vertical align", items: oo }, - ], - Ro = (e) => - Ao.concat( - ((e) => { - const t = fo(Ct(e)); - return t.length > 0 - ? y.some({ - name: "class", - type: "listbox", - label: "Class", - items: t, - }) - : y.none(); - })(e).toArray(), - ), - Oo = (e, t) => { - const o = [ - { - name: "borderstyle", - type: "listbox", - label: "Border style", - items: [{ text: "Select...", value: "" }].concat(fo(bt(e))), - }, - { name: "bordercolor", type: "colorinput", label: "Border color" }, - { - name: "backgroundcolor", - type: "colorinput", - label: "Background color", - }, - ]; - return { - title: "Advanced", - name: "advanced", - items: - "cell" === t - ? [ - { name: "borderwidth", type: "input", label: "Border width" }, - ].concat(o) - : o, - }; - }, - _o = (e, t) => { - const o = e.dom; - return { - setAttrib: (e, l) => { - o.setAttrib(t, e, l); - }, - setStyle: (e, l) => { - o.setStyle(t, e, l); - }, - setFormat: (o, l) => { - "" === l - ? e.formatter.remove(o, { value: null }, t, !0) - : e.formatter.apply(o, { value: l }, t); - }, - }; - }, - Do = ee("th"), - No = (e, t) => (e && t ? "sectionCells" : e ? "section" : "cells"), - Io = (e) => { - const t = M( - e, - (e) => - ((e) => { - const t = "thead" === e.section, - o = Re( - ((e) => { - const t = k(e, (e) => Do(e.element)); - return 0 === t.length - ? y.some("td") - : t.length === e.length - ? y.some("th") - : y.none(); - })(e.cells), - "th", - ); - return "tfoot" === e.section - ? { type: "footer" } - : t || o - ? { type: "header", subType: No(t, o) } - : { type: "body" }; - })(e).type, - ), - o = D(t, "header"), - l = D(t, "footer"); - if (o || l) { - const e = D(t, "body"); - return !o || e || l - ? o || e || !l - ? y.none() - : y.some("footer") - : y.some("header"); - } - return y.some("body"); - }, - Mo = (e, t) => H(e.all, (e) => B(e.cells, (e) => z(t, e.element))), - Po = (e, t, o) => { - const l = ((e) => { - const t = [], - o = (e) => { - t.push(e); - }; - for (let t = 0; t < e.length; t++) e[t].each(o); - return t; - })( - M(t.selection, (t) => { - return ((l = t), - ((e, t, o = h) => - o(t) - ? y.none() - : D(e, G(t)) - ? y.some(t) - : me(t, e.join(","), (e) => $(e, "table") || o(e)))( - ["td", "th"], - l, - n, - )) - .bind((t) => Mo(e, t)) - .filter(o); - var l, n; - }), - ); - return (n = l), l.length > 0 ? y.some(n) : y.none(); - var n; - }, - ko = (e, t) => Po(e, t, f), - Eo = (e, t) => - q(t, (t) => ((e, t) => Mo(e, t).exists((e) => !e.isLocked))(e, t)), - Bo = (e, t) => ((e, t) => t.mergable)(0, t).filter((t) => Eo(e, t.cells)), - Fo = (e, t) => ((e, t) => t.unmergable)(0, t).filter((t) => Eo(e, t)), - qo = - (((e) => { - if (!n(e)) throw new Error("cases must be an array"); - if (0 === e.length) throw new Error("there must be at least one case"); - const t = [], - o = {}; - P(e, (l, r) => { - const a = w(l); - if (1 !== a.length) throw new Error("one and only one name per case"); - const s = a[0], - c = l[s]; - if (void 0 !== o[s]) throw new Error("duplicate key detected:" + s); - if ("cata" === s) - throw new Error("cannot have a case named cata (sorry)"); - if (!n(c)) throw new Error("case arguments must be an array"); - t.push(s), - (o[s] = (...o) => { - const l = o.length; - if (l !== c.length) - throw new Error( - "Wrong number of arguments to case " + - s + - ". Expected " + - c.length + - " (" + - c + - "), got " + - l, - ); - return { - fold: (...t) => { - if (t.length !== e.length) - throw new Error( - "Wrong number of arguments to fold. Expected " + - e.length + - ", got " + - t.length, - ); - return t[r].apply(null, o); - }, - match: (e) => { - const l = w(e); - if (t.length !== l.length) - throw new Error( - "Wrong number of arguments to match. Expected: " + - t.join(",") + - "\nActual: " + - l.join(","), - ); - if (!q(t, (e) => D(l, e))) - throw new Error( - "Not all branches were specified when using match. Specified: " + - l.join(", ") + - "\nRequired: " + - t.join(", "), - ); - return e[s].apply(null, o); - }, - log: (e) => { - console.log(e, { - constructors: t, - constructor: s, - params: o, - }); - }, - }; - }); - }); - })([ - { none: [] }, - { only: ["index"] }, - { left: ["index", "next"] }, - { middle: ["prev", "index", "next"] }, - { right: ["prev", "index"] }, - ]), - (e, t) => { - const o = Qe(e); - return ko(o, t) - .bind((e) => { - const t = e[e.length - 1], - l = e[0].row, - n = t.row + t.rowspan, - r = o.all.slice(l, n); - return Io(r); - }) - .getOr(""); - }), - Lo = (e) => { - return _e(e, "rgb") - ? po((t = e)) - .map(so) - .map((e) => "#" + e.value) - .getOr(t) - : e; - var t; - }, - Ho = (e) => { - const t = V.fromDom(e); - return { - borderwidth: Be(t, "border-width").getOr(""), - borderstyle: Be(t, "border-style").getOr(""), - bordercolor: Be(t, "border-color").map(Lo).getOr(""), - backgroundcolor: Be(t, "background-color").map(Lo).getOr(""), - }; - }, - jo = (e) => { - const t = e[0], - o = e.slice(1); - return ( - P(o, (e) => { - P(w(t), (o) => { - C(e, (e, l) => { - const n = t[o]; - "" !== n && o === l && n !== e && (t[o] = ""); - }); - }); - }), - t - ); - }, - Vo = (e, t, o, l) => - B(e, (e) => !a(o.formatter.matchNode(l, t + e))).getOr(""), - $o = b(Vo, ["left", "center", "right"], "align"), - Wo = b(Vo, ["top", "middle", "bottom"], "valign"), - zo = (e) => - $e(V.fromDom(e)) - .map((t) => { - const o = { selection: Ut(e.cells) }; - return qo(t, o); - }) - .getOr(""), - Uo = (e, t) => { - const o = Qe(e), - l = ((e) => F(e.all, (e) => e.cells))(o), - n = k(l, (e) => N(t, (t) => z(e.element, t))); - return M(n, (e) => ({ - element: e.element.dom, - column: Ze(o, e.column).map((e) => e.element.dom), - })); - }, - Go = (e, t, o, l) => { - const n = l.getData(); - l.close(), - e.undoManager.transact(() => { - ((e, t, o, l) => { - const n = v(l, (e, t) => o[t] !== e); - T(n) > 0 && - t.length >= 1 && - $e(t[0]).each((o) => { - const r = Uo(o, t), - a = T(v(n, (e, t) => "scope" !== t && "celltype" !== t)) > 0, - s = A(n, "celltype"); - (a || A(n, "scope")) && - ((e, t, o, l) => { - const n = 1 === t.length; - P(t, (t) => { - const r = t.element, - a = n ? f : l, - s = _o(e, r); - ((e, t, o, l) => { - l("scope") && e.setAttrib("scope", o.scope), - l("class") && e.setAttrib("class", o.class), - l("height") && e.setStyle("height", fe(o.height)), - l("width") && t.setStyle("width", fe(o.width)); - })(s, t.column.map((t) => _o(e, t)).getOr(s), o, a), - gt(e) && - ((e, t, o) => { - o("backgroundcolor") && - e.setFormat( - "tablecellbackgroundcolor", - t.backgroundcolor, - ), - o("bordercolor") && - e.setFormat( - "tablecellbordercolor", - t.bordercolor, - ), - o("borderstyle") && - e.setFormat( - "tablecellborderstyle", - t.borderstyle, - ), - o("borderwidth") && - e.setFormat( - "tablecellborderwidth", - fe(t.borderwidth), - ); - })(s, o, a), - l("halign") && ot(e, r, o.halign), - l("valign") && - ((e, t, o) => { - et.each("top middle bottom".split(" "), (l) => { - l !== o && - e.formatter.remove("valign" + l, {}, t); - }), - o && e.formatter.apply("valign" + o, {}, t); - })(e, r, o.valign); - }); - })(e, r, l, b(A, n)), - s && - ((e, t) => { - e.execCommand("mceTableCellType", !1, { - type: t.celltype, - no_events: !0, - }); - })(e, l), - lt(e, o.dom, { structure: s, style: a }); - }); - })(e, t, o, n), - e.focus(); - }); - }, - Ko = (e) => { - const t = eo(e); - if (0 === t.length) return; - const o = ((e, t) => { - const o = $e(t[0]).map((o) => - M(Uo(o, t), (t) => - ((e, t, o, l) => { - const n = e.dom, - r = (e, t) => n.getStyle(e, t) || n.getAttrib(e, t); - return { - width: r(l.getOr(t), "width"), - height: r(t, "height"), - scope: n.getAttrib(t, "scope"), - celltype: ((a = t), a.nodeName.toLowerCase()), - class: n.getAttrib(t, "class", ""), - halign: $o(e, t), - valign: Wo(e, t), - ...(o ? Ho(t) : {}), - }; - var a; - })(e, t.element, gt(e), t.column), - ), - ); - return jo(o.getOrDie()); - })(e, t), - l = { - type: "tabpanel", - tabs: [ - { title: "General", name: "general", items: Ro(e) }, - Oo(e, "cell"), - ], - }, - n = { - type: "panel", - items: [{ type: "grid", columns: 2, items: Ro(e) }], - }; - e.windowManager.open({ - title: "Cell Properties", - size: "normal", - body: gt(e) ? l : n, - buttons: [ - { type: "cancel", name: "cancel", text: "Cancel" }, - { type: "submit", name: "save", text: "Save", primary: !0 }, - ], - initialData: o, - onSubmit: b(Go, e, t, o), - }); - }, - Jo = [ - { - type: "listbox", - name: "type", - label: "Row type", - items: [ - { text: "Header", value: "header" }, - { text: "Body", value: "body" }, - { text: "Footer", value: "footer" }, - ], - }, - { - type: "listbox", - name: "align", - label: "Alignment", - items: [ - { text: "None", value: "" }, - { text: "Left", value: "left" }, - { text: "Center", value: "center" }, - { text: "Right", value: "right" }, - ], - }, - { label: "Height", name: "height", type: "input" }, - ], - Qo = (e) => - Jo.concat( - ((e) => { - const t = fo(vt(e)); - return t.length > 0 - ? y.some({ - name: "class", - type: "listbox", - label: "Class", - items: t, - }) - : y.none(); - })(e).toArray(), - ), - Xo = (e, t, o, l) => { - const n = l.getData(); - l.close(), - e.undoManager.transact(() => { - ((e, t, o, l) => { - const n = v(l, (e, t) => o[t] !== e); - if (T(n) > 0) { - const o = A(n, "type"), - r = !o || T(n) > 1; - r && - ((e, t, o, l) => { - const n = 1 === t.length ? f : l; - P(t, (t) => { - const r = _o(e, t); - ((e, t, o) => { - o("class") && e.setAttrib("class", t.class), - o("height") && e.setStyle("height", fe(t.height)); - })(r, o, n), - ht(e) && - ((e, t, o) => { - o("backgroundcolor") && - e.setStyle("background-color", t.backgroundcolor), - o("bordercolor") && - e.setStyle("border-color", t.bordercolor), - o("borderstyle") && - e.setStyle("border-style", t.borderstyle); - })(r, o, n), - l("align") && ot(e, t, o.align); - }); - })(e, t, l, b(A, n)), - o && - ((e, t) => { - e.execCommand("mceTableRowType", !1, { - type: t.type, - no_events: !0, - }); - })(e, l), - $e(V.fromDom(t[0])).each((t) => - lt(e, t.dom, { structure: o, style: r }), - ); - } - })(e, t, o, n), - e.focus(); - }); - }, - Yo = (e) => { - const t = to(ye(e), Qt.selected); - if (0 === t.length) return; - const o = M(t, (t) => - ((e, t, o) => { - const l = e.dom; - return { - height: l.getStyle(t, "height") || l.getAttrib(t, "height"), - class: l.getAttrib(t, "class", ""), - type: zo(t), - align: $o(e, t), - ...(o ? Ho(t) : {}), - }; - })(e, t.dom, ht(e)), - ), - l = jo(o), - n = { - type: "tabpanel", - tabs: [ - { title: "General", name: "general", items: Qo(e) }, - Oo(e, "row"), - ], - }, - r = { - type: "panel", - items: [{ type: "grid", columns: 2, items: Qo(e) }], - }; - e.windowManager.open({ - title: "Row Properties", - size: "normal", - body: ht(e) ? n : r, - buttons: [ - { type: "cancel", name: "cancel", text: "Cancel" }, - { type: "submit", name: "save", text: "Save", primary: !0 }, - ], - initialData: l, - onSubmit: b( - Xo, - e, - M(t, (e) => e.dom), - l, - ), - }); - }, - Zo = (e, t, o) => { - const l = o - ? [ - { - type: "input", - name: "cols", - label: "Cols", - inputMode: "numeric", - }, - { - type: "input", - name: "rows", - label: "Rows", - inputMode: "numeric", - }, - ] - : [], - n = yt(e) - ? [ - { - type: "input", - name: "cellspacing", - label: "Cell spacing", - inputMode: "numeric", - }, - { - type: "input", - name: "cellpadding", - label: "Cell padding", - inputMode: "numeric", - }, - { type: "input", name: "border", label: "Border width" }, - { - type: "label", - label: "Caption", - items: [ - { type: "checkbox", name: "caption", label: "Show caption" }, - ], - }, - ] - : [], - r = - t.length > 0 - ? [{ type: "listbox", name: "class", label: "Class", items: t }] - : []; - return l - .concat([ - { type: "input", name: "width", label: "Width" }, - { type: "input", name: "height", label: "Height" }, - ]) - .concat(n) - .concat([ - { - type: "listbox", - name: "align", - label: "Alignment", - items: [ - { text: "None", value: "" }, - { text: "Left", value: "left" }, - { text: "Center", value: "center" }, - { text: "Right", value: "right" }, - ], - }, - ]) - .concat(r); - }, - el = (e, t, o, n) => { - if ("TD" === t.tagName || "TH" === t.tagName) - l(o) && s(n) ? e.setStyle(t, o, n) : e.setStyles(t, o); - else if (t.children) - for (let l = 0; l < t.children.length; l++) el(e, t.children[l], o, n); - }, - tl = (e, t, o, l) => { - const n = e.dom, - r = l.getData(), - s = v(r, (e, t) => o[t] !== e); - l.close(), - "" === r.class && delete r.class, - e.undoManager.transact(() => { - if (!t) { - const o = Me(r.cols).getOr(1), - l = Me(r.rows).getOr(1); - e.execCommand("mceInsertTable", !1, { rows: l, columns: o }), - (t = Zt(ye(e), he(e)) - .bind((t) => $e(t, he(e))) - .map((e) => e.dom) - .getOrDie()); - } - if (T(s) > 0) { - const o = { - border: A(s, "border"), - bordercolor: A(s, "bordercolor"), - cellpadding: A(s, "cellpadding"), - }; - ((e, t, o, l) => { - const n = e.dom, - r = {}, - s = {}, - c = St(e), - i = ft(e); - if ( - (a(o.class) || (r.class = o.class), - (s.height = fe(o.height)), - c - ? (s.width = fe(o.width)) - : n.getAttrib(t, "width") && - (r.width = ((e) => (e ? e.replace(/px$/, "") : ""))( - o.width, - )), - c - ? ((s["border-width"] = fe(o.border)), - (s["border-spacing"] = fe(o.cellspacing))) - : ((r.border = o.border), - (r.cellpadding = o.cellpadding), - (r.cellspacing = o.cellspacing)), - c && t.children) - ) { - const e = {}; - if ( - (l.border && (e["border-width"] = fe(o.border)), - l.cellpadding && (e.padding = fe(o.cellpadding)), - i && l.bordercolor && (e["border-color"] = o.bordercolor), - !((e) => { - for (const t in e) if (S.call(e, t)) return !1; - return !0; - })(e)) - ) - for (let o = 0; o < t.children.length; o++) - el(n, t.children[o], e); - } - if (i) { - const e = o; - (s["background-color"] = e.backgroundcolor), - (s["border-color"] = e.bordercolor), - (s["border-style"] = e.borderstyle); - } - n.setStyles(t, { ...Dt(e), ...s }), - n.setAttribs(t, { ...Nt(e), ...r }); - })(e, t, r, o); - const l = n.select("caption", t)[0]; - ((l && !r.caption) || (!l && r.caption)) && - e.execCommand("mceTableToggleCaption"), - ot(e, t, r.align); - } - if ((e.focus(), e.addVisual(), T(s) > 0)) { - const o = A(s, "caption"), - l = !o || T(s) > 1; - lt(e, t, { structure: o, style: l }); - } - }); - }, - ol = (e, t) => { - const o = e.dom; - let l, - n = ((e, t) => { - const o = Dt(e), - l = Nt(e), - n = t - ? { - borderstyle: x(o, "border-style").getOr(""), - bordercolor: Lo(x(o, "border-color").getOr("")), - backgroundcolor: Lo(x(o, "background-color").getOr("")), - } - : {}; - return { - height: "", - width: "100%", - cellspacing: "", - cellpadding: "", - caption: !1, - class: "", - align: "", - border: "", - ...o, - ...l, - ...n, - ...(() => { - const t = o["border-width"]; - return St(e) && t - ? { border: t } - : x(l, "border").fold( - () => ({}), - (e) => ({ border: e }), - ); - })(), - ...{ - ...x(o, "border-spacing") - .or(x(l, "cellspacing")) - .fold( - () => ({}), - (e) => ({ cellspacing: e }), - ), - ...x(o, "border-padding") - .or(x(l, "cellpadding")) - .fold( - () => ({}), - (e) => ({ cellpadding: e }), - ), - }, - }; - })(e, ft(e)); - t - ? ((n.cols = "1"), - (n.rows = "1"), - ft(e) && - ((n.borderstyle = ""), - (n.bordercolor = ""), - (n.backgroundcolor = ""))) - : ((l = o.getParent(e.selection.getStart(), "table", e.getBody())), - l - ? (n = ((e, t, o) => { - const l = e.dom, - n = St(e) - ? l.getStyle(t, "border-spacing") || - l.getAttrib(t, "cellspacing") - : l.getAttrib(t, "cellspacing") || - l.getStyle(t, "border-spacing"), - r = St(e) - ? tt(l, t, "padding") || l.getAttrib(t, "cellpadding") - : l.getAttrib(t, "cellpadding") || tt(l, t, "padding"); - return { - width: l.getStyle(t, "width") || l.getAttrib(t, "width"), - height: l.getStyle(t, "height") || l.getAttrib(t, "height"), - cellspacing: null != n ? n : "", - cellpadding: null != r ? r : "", - border: ((t, o) => { - const l = Be(V.fromDom(o), "border-width"); - return St(e) && l.isSome() - ? l.getOr("") - : t.getAttrib(o, "border") || - tt(e.dom, o, "border-width") || - tt(e.dom, o, "border") || - ""; - })(l, t), - caption: !!l.select("caption", t)[0], - class: l.getAttrib(t, "class", ""), - align: $o(e, t), - ...(o ? Ho(t) : {}), - }; - })(e, l, ft(e))) - : ft(e) && - ((n.borderstyle = ""), - (n.bordercolor = ""), - (n.backgroundcolor = ""))); - const r = fo(Tt(e)); - r.length > 0 && - n.class && - (n.class = n.class.replace(/\s*mce\-item\-table\s*/g, "")); - const a = { type: "grid", columns: 2, items: Zo(e, r, t) }, - s = ft(e) - ? { - type: "tabpanel", - tabs: [ - { title: "General", name: "general", items: [a] }, - Oo(e, "table"), - ], - } - : { type: "panel", items: [a] }; - e.windowManager.open({ - title: "Table Properties", - size: "normal", - body: s, - onSubmit: b(tl, e, l, n), - buttons: [ - { type: "cancel", name: "cancel", text: "Cancel" }, - { type: "submit", name: "save", text: "Save", primary: !0 }, - ], - initialData: n, - }); - }, - ll = (e) => { - C( - { - mceTableProps: b(ol, e, !1), - mceTableRowProps: b(Yo, e), - mceTableCellProps: b(Ko, e), - mceInsertTableDialog: b(ol, e, !0), - }, - (t, o) => - e.addCommand(o, () => { - return ( - (o = t), - void ( - ((e) => { - return ((t = e), - (o = ee("table")), - ce((e, t) => t(e), ie, t, o, void 0)).forall(be); - var t, o; - })(ye(e)) && o() - ) - ); - var o; - }), - ); - }, - nl = u, - rl = (e) => { - const t = (e, t) => xe(e, t).exists((e) => parseInt(e, 10) > 1); - return e.length > 0 && q(e, (e) => t(e, "rowspan") || t(e, "colspan")) - ? y.some(e) - : y.none(); - }, - al = (e, t, o) => { - return t.length <= 1 - ? y.none() - : ((l = e), - (n = o.firstSelectedSelector), - (r = o.lastSelectedSelector), - zt(l, n, r).bind((e) => { - const t = (e) => z(l, e), - o = "thead,tfoot,tbody,table", - n = me(e.first, o, t), - r = me(e.last, o, t); - return n.bind((t) => - r.bind((o) => - z(t, o) - ? ((e, t, o) => { - const l = Pt(e); - return Mt(l, t, o); - })(e.table, e.first, e.last) - : y.none(), - ), - ); - })).map((e) => ({ bounds: e, cells: t })); - var l, n, r; - }, - sl = (e) => { - const t = bo(y.none()), - o = bo([]); - let l = y.none(); - const n = ee("caption"), - r = (e) => l.forall((t) => !t[e]), - a = () => - Yt(ye(e), he(e)).bind((t) => { - return ( - (o = Oe( - $e(t), - Yt(((e) => V.fromDom(e.selection.getEnd()))(e), he(e)).bind($e), - (o, l) => - z(o, l) - ? n(t) - ? y.some( - ((e) => ({ - element: e, - mergable: y.none(), - unmergable: y.none(), - selection: [e], - }))(t), - ) - : y.some( - ((e, t, o) => ({ - element: o, - mergable: al(t, e, Qt), - unmergable: rl(e), - selection: nl(e), - }))(eo(e), o, t), - ) - : y.none(), - )), - o.bind(u) - ); - var o; - }), - s = (e) => - $e(e.element).map((t) => { - const o = Qe(t), - l = ko(o, e).getOr([]), - n = E( - l, - (e, t) => ( - t.isLocked && - ((e.onAny = !0), - 0 === t.column - ? (e.onFirst = !0) - : t.column + t.colspan >= o.grid.columns && - (e.onLast = !0)), - e - ), - { onAny: !1, onFirst: !1, onLast: !1 }, - ); - return { - mergeable: Bo(o, e).isSome(), - unmergeable: Fo(o, e).isSome(), - locked: n, - }; - }), - c = () => { - t.set( - ((e) => { - let t, - o = !1; - return (...l) => (o || ((o = !0), (t = e.apply(null, l))), t); - })(a)(), - ), - (l = t.get().bind(s)), - P(o.get(), g); - }, - i = (e) => ( - e(), - o.set(o.get().concat([e])), - () => { - o.set(k(o.get(), (t) => t !== e)); - } - ), - m = (o, l) => - i(() => - t.get().fold( - () => { - o.setEnabled(!1); - }, - (t) => { - o.setEnabled(!l(t) && e.selection.isEditable()); - }, - ), - ), - d = (o, l, n) => - i(() => - t.get().fold( - () => { - o.setEnabled(!1), o.setActive(!1); - }, - (t) => { - o.setEnabled(!l(t) && e.selection.isEditable()), - o.setActive(n(t)); - }, - ), - ), - p = (e) => l.exists((t) => t.locked[e]), - b = (t, o) => (l) => - d( - l, - (e) => n(e.element), - () => e.queryCommandValue(t) === o, - ), - f = b("mceTableRowType", "header"), - w = b("mceTableColType", "th"); - return ( - e.on("NodeChange ExecCommand TableSelectorChange", c), - { - onSetupTable: (e) => m(e, (e) => !1), - onSetupCellOrRow: (e) => m(e, (e) => n(e.element)), - onSetupColumn: (e) => (t) => m(t, (t) => n(t.element) || p(e)), - onSetupPasteable: (e) => (t) => - m(t, (t) => n(t.element) || e().isNone()), - onSetupPasteableColumn: (e, t) => (o) => - m(o, (o) => n(o.element) || e().isNone() || p(t)), - onSetupMergeable: (e) => m(e, (e) => r("mergeable")), - onSetupUnmergeable: (e) => m(e, (e) => r("unmergeable")), - resetTargets: c, - onSetupTableWithCaption: (t) => - d(t, h, (t) => - $e(t.element, he(e)).exists((e) => de(e, "caption").isSome()), - ), - onSetupTableRowHeaders: f, - onSetupTableColumnHeaders: w, - targets: t.get, - } - ); - }; - var cl = tinymce.util.Tools.resolve("tinymce.FakeClipboard"); - const il = "x-tinymce/dom-table-", - ml = il + "rows", - dl = il + "columns", - ul = (e) => { - var t; - const o = null !== (t = cl.read()) && void 0 !== t ? t : []; - return H(o, (t) => y.from(t.getType(e))); - }, - pl = () => ul(ml), - bl = () => ul(dl), - gl = (e) => (t) => { - const o = () => { - t.setEnabled(e.selection.isEditable()); - }; - return ( - e.on("NodeChange", o), - o(), - () => { - e.off("NodeChange", o); - } - ); - }, - hl = (e) => (t) => { - const o = () => { - t.setEnabled(e.selection.isEditable()); - }; - return ( - e.on("NodeChange", o), - o(), - () => { - e.off("NodeChange", o); - } - ); - }; - e.add("table", (e) => { - const t = sl(e); - ((e) => { - const t = e.options.register; - t("table_border_widths", { processor: "object[]", default: st }), - t("table_border_styles", { processor: "object[]", default: ct }), - t("table_cell_advtab", { processor: "boolean", default: !0 }), - t("table_row_advtab", { processor: "boolean", default: !0 }), - t("table_advtab", { processor: "boolean", default: !0 }), - t("table_appearance_options", { processor: "boolean", default: !0 }), - t("table_grid", { - processor: "boolean", - default: !at.deviceType.isTouch(), - }), - t("table_cell_class_list", { processor: "object[]", default: [] }), - t("table_row_class_list", { processor: "object[]", default: [] }), - t("table_class_list", { processor: "object[]", default: [] }), - t("table_toolbar", { - processor: "string", - default: - "tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol", - }), - t("table_background_color_map", { processor: "object[]", default: [] }), - t("table_border_color_map", { processor: "object[]", default: [] }); - })(e), - ll(e), - ((e, t) => { - const o = (t) => () => e.execCommand(t), - l = (t, l) => - !!e.queryCommandSupported(l.command) && - (e.ui.registry.addMenuItem(t, { - ...l, - onAction: c(l.onAction) ? l.onAction : o(l.command), - }), - !0), - n = (t, l) => { - e.queryCommandSupported(l.command) && - e.ui.registry.addToggleMenuItem(t, { - ...l, - onAction: c(l.onAction) ? l.onAction : o(l.command), - }); - }, - r = (t) => { - e.execCommand("mceInsertTable", !1, { - rows: t.numRows, - columns: t.numColumns, - }); - }, - a = [ - l("tableinsertrowbefore", { - text: "Insert row before", - icon: "table-insert-row-above", - command: "mceTableInsertRowBefore", - onSetup: t.onSetupCellOrRow, - }), - l("tableinsertrowafter", { - text: "Insert row after", - icon: "table-insert-row-after", - command: "mceTableInsertRowAfter", - onSetup: t.onSetupCellOrRow, - }), - l("tabledeleterow", { - text: "Delete row", - icon: "table-delete-row", - command: "mceTableDeleteRow", - onSetup: t.onSetupCellOrRow, - }), - l("tablerowprops", { - text: "Row properties", - icon: "table-row-properties", - command: "mceTableRowProps", - onSetup: t.onSetupCellOrRow, - }), - l("tablecutrow", { - text: "Cut row", - icon: "cut-row", - command: "mceTableCutRow", - onSetup: t.onSetupCellOrRow, - }), - l("tablecopyrow", { - text: "Copy row", - icon: "duplicate-row", - command: "mceTableCopyRow", - onSetup: t.onSetupCellOrRow, - }), - l("tablepasterowbefore", { - text: "Paste row before", - icon: "paste-row-before", - command: "mceTablePasteRowBefore", - onSetup: t.onSetupPasteable(pl), - }), - l("tablepasterowafter", { - text: "Paste row after", - icon: "paste-row-after", - command: "mceTablePasteRowAfter", - onSetup: t.onSetupPasteable(pl), - }), - ], - s = [ - l("tableinsertcolumnbefore", { - text: "Insert column before", - icon: "table-insert-column-before", - command: "mceTableInsertColBefore", - onSetup: t.onSetupColumn("onFirst"), - }), - l("tableinsertcolumnafter", { - text: "Insert column after", - icon: "table-insert-column-after", - command: "mceTableInsertColAfter", - onSetup: t.onSetupColumn("onLast"), - }), - l("tabledeletecolumn", { - text: "Delete column", - icon: "table-delete-column", - command: "mceTableDeleteCol", - onSetup: t.onSetupColumn("onAny"), - }), - l("tablecutcolumn", { - text: "Cut column", - icon: "cut-column", - command: "mceTableCutCol", - onSetup: t.onSetupColumn("onAny"), - }), - l("tablecopycolumn", { - text: "Copy column", - icon: "duplicate-column", - command: "mceTableCopyCol", - onSetup: t.onSetupColumn("onAny"), - }), - l("tablepastecolumnbefore", { - text: "Paste column before", - icon: "paste-column-before", - command: "mceTablePasteColBefore", - onSetup: t.onSetupPasteableColumn(bl, "onFirst"), - }), - l("tablepastecolumnafter", { - text: "Paste column after", - icon: "paste-column-after", - command: "mceTablePasteColAfter", - onSetup: t.onSetupPasteableColumn(bl, "onLast"), - }), - ], - i = [ - l("tablecellprops", { - text: "Cell properties", - icon: "table-cell-properties", - command: "mceTableCellProps", - onSetup: t.onSetupCellOrRow, - }), - l("tablemergecells", { - text: "Merge cells", - icon: "table-merge-cells", - command: "mceTableMergeCells", - onSetup: t.onSetupMergeable, - }), - l("tablesplitcells", { - text: "Split cell", - icon: "table-split-cells", - command: "mceTableSplitCells", - onSetup: t.onSetupUnmergeable, - }), - ]; - wt(e) - ? e.ui.registry.addNestedMenuItem("inserttable", { - text: "Table", - icon: "table", - getSubmenuItems: () => [ - { - type: "fancymenuitem", - fancytype: "inserttable", - onAction: r, - }, - ], - onSetup: hl(e), - }) - : e.ui.registry.addMenuItem("inserttable", { - text: "Table", - icon: "table", - onAction: o("mceInsertTableDialog"), - onSetup: hl(e), - }), - e.ui.registry.addMenuItem("inserttabledialog", { - text: "Insert table", - icon: "table", - onAction: o("mceInsertTableDialog"), - onSetup: hl(e), - }), - l("tableprops", { - text: "Table properties", - onSetup: t.onSetupTable, - command: "mceTableProps", - }), - l("deletetable", { - text: "Delete table", - icon: "table-delete-table", - onSetup: t.onSetupTable, - command: "mceTableDelete", - }), - D(a, !0) && - e.ui.registry.addNestedMenuItem("row", { - type: "nestedmenuitem", - text: "Row", - getSubmenuItems: d( - "tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter", - ), - }), - D(s, !0) && - e.ui.registry.addNestedMenuItem("column", { - type: "nestedmenuitem", - text: "Column", - getSubmenuItems: d( - "tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn | tablecutcolumn tablecopycolumn tablepastecolumnbefore tablepastecolumnafter", - ), - }), - D(i, !0) && - e.ui.registry.addNestedMenuItem("cell", { - type: "nestedmenuitem", - text: "Cell", - getSubmenuItems: d( - "tablecellprops tablemergecells tablesplitcells", - ), - }), - e.ui.registry.addContextMenu("table", { - update: () => ( - t.resetTargets(), - t - .targets() - .fold(d(""), (e) => - "caption" === G(e.element) - ? "tableprops deletetable" - : "cell row column | advtablesort | tableprops deletetable", - ) - ), - }); - const m = So(Tt(e)); - 0 !== m.length && - e.queryCommandSupported("mceTableToggleClass") && - e.ui.registry.addNestedMenuItem("tableclass", { - icon: "table-classes", - text: "Table styles", - getSubmenuItems: () => - yo(e, m, "tableclass", (t) => - e.execCommand("mceTableToggleClass", !1, t), - ), - onSetup: t.onSetupTable, - }); - const u = So(Ct(e)); - 0 !== u.length && - e.queryCommandSupported("mceTableCellToggleClass") && - e.ui.registry.addNestedMenuItem("tablecellclass", { - icon: "table-cell-classes", - text: "Cell styles", - getSubmenuItems: () => - yo(e, u, "tablecellclass", (t) => - e.execCommand("mceTableCellToggleClass", !1, t), - ), - onSetup: t.onSetupCellOrRow, - }), - e.queryCommandSupported("mceTableApplyCellStyle") && - (e.ui.registry.addNestedMenuItem("tablecellvalign", { - icon: "vertical-align", - text: "Vertical align", - getSubmenuItems: () => - yo(e, oo, "tablecellverticalalign", wo(e, "vertical-align")), - onSetup: t.onSetupCellOrRow, - }), - e.ui.registry.addNestedMenuItem("tablecellborderwidth", { - icon: "border-width", - text: "Border width", - getSubmenuItems: () => - yo(e, pt(e), "tablecellborderwidth", wo(e, "border-width")), - onSetup: t.onSetupCellOrRow, - }), - e.ui.registry.addNestedMenuItem("tablecellborderstyle", { - icon: "border-style", - text: "Border style", - getSubmenuItems: () => - yo(e, bt(e), "tablecellborderstyle", wo(e, "border-style")), - onSetup: t.onSetupCellOrRow, - }), - e.ui.registry.addNestedMenuItem("tablecellbackgroundcolor", { - icon: "cell-background-color", - text: "Background color", - getSubmenuItems: () => vo(e, At(e), "background-color"), - onSetup: t.onSetupCellOrRow, - }), - e.ui.registry.addNestedMenuItem("tablecellbordercolor", { - icon: "cell-border-color", - text: "Border color", - getSubmenuItems: () => vo(e, Rt(e), "border-color"), - onSetup: t.onSetupCellOrRow, - })), - n("tablecaption", { - icon: "table-caption", - text: "Table caption", - command: "mceTableToggleCaption", - onSetup: t.onSetupTableWithCaption, - }), - n("tablerowheader", { - text: "Row header", - icon: "table-top-header", - command: "mceTableRowType", - onAction: To(e), - onSetup: t.onSetupTableRowHeaders, - }), - n("tablecolheader", { - text: "Column header", - icon: "table-left-header", - command: "mceTableColType", - onAction: xo(e), - onSetup: t.onSetupTableRowHeaders, - }); - })(e, t), - ((e, t) => { - e.ui.registry.addMenuButton("table", { - tooltip: "Table", - icon: "table", - onSetup: gl(e), - fetch: (e) => - e( - "inserttable | cell row column | advtablesort | tableprops deletetable", - ), - }); - const o = (t) => () => e.execCommand(t), - l = (t, l) => { - e.queryCommandSupported(l.command) && - e.ui.registry.addButton(t, { - ...l, - onAction: c(l.onAction) ? l.onAction : o(l.command), - }); - }, - n = (t, l) => { - e.queryCommandSupported(l.command) && - e.ui.registry.addToggleButton(t, { - ...l, - onAction: c(l.onAction) ? l.onAction : o(l.command), - }); - }; - l("tableprops", { - tooltip: "Table properties", - command: "mceTableProps", - icon: "table", - onSetup: t.onSetupTable, - }), - l("tabledelete", { - tooltip: "Delete table", - command: "mceTableDelete", - icon: "table-delete-table", - onSetup: t.onSetupTable, - }), - l("tablecellprops", { - tooltip: "Cell properties", - command: "mceTableCellProps", - icon: "table-cell-properties", - onSetup: t.onSetupCellOrRow, - }), - l("tablemergecells", { - tooltip: "Merge cells", - command: "mceTableMergeCells", - icon: "table-merge-cells", - onSetup: t.onSetupMergeable, - }), - l("tablesplitcells", { - tooltip: "Split cell", - command: "mceTableSplitCells", - icon: "table-split-cells", - onSetup: t.onSetupUnmergeable, - }), - l("tableinsertrowbefore", { - tooltip: "Insert row before", - command: "mceTableInsertRowBefore", - icon: "table-insert-row-above", - onSetup: t.onSetupCellOrRow, - }), - l("tableinsertrowafter", { - tooltip: "Insert row after", - command: "mceTableInsertRowAfter", - icon: "table-insert-row-after", - onSetup: t.onSetupCellOrRow, - }), - l("tabledeleterow", { - tooltip: "Delete row", - command: "mceTableDeleteRow", - icon: "table-delete-row", - onSetup: t.onSetupCellOrRow, - }), - l("tablerowprops", { - tooltip: "Row properties", - command: "mceTableRowProps", - icon: "table-row-properties", - onSetup: t.onSetupCellOrRow, - }), - l("tableinsertcolbefore", { - tooltip: "Insert column before", - command: "mceTableInsertColBefore", - icon: "table-insert-column-before", - onSetup: t.onSetupColumn("onFirst"), - }), - l("tableinsertcolafter", { - tooltip: "Insert column after", - command: "mceTableInsertColAfter", - icon: "table-insert-column-after", - onSetup: t.onSetupColumn("onLast"), - }), - l("tabledeletecol", { - tooltip: "Delete column", - command: "mceTableDeleteCol", - icon: "table-delete-column", - onSetup: t.onSetupColumn("onAny"), - }), - l("tablecutrow", { - tooltip: "Cut row", - command: "mceTableCutRow", - icon: "cut-row", - onSetup: t.onSetupCellOrRow, - }), - l("tablecopyrow", { - tooltip: "Copy row", - command: "mceTableCopyRow", - icon: "duplicate-row", - onSetup: t.onSetupCellOrRow, - }), - l("tablepasterowbefore", { - tooltip: "Paste row before", - command: "mceTablePasteRowBefore", - icon: "paste-row-before", - onSetup: t.onSetupPasteable(pl), - }), - l("tablepasterowafter", { - tooltip: "Paste row after", - command: "mceTablePasteRowAfter", - icon: "paste-row-after", - onSetup: t.onSetupPasteable(pl), - }), - l("tablecutcol", { - tooltip: "Cut column", - command: "mceTableCutCol", - icon: "cut-column", - onSetup: t.onSetupColumn("onAny"), - }), - l("tablecopycol", { - tooltip: "Copy column", - command: "mceTableCopyCol", - icon: "duplicate-column", - onSetup: t.onSetupColumn("onAny"), - }), - l("tablepastecolbefore", { - tooltip: "Paste column before", - command: "mceTablePasteColBefore", - icon: "paste-column-before", - onSetup: t.onSetupPasteableColumn(bl, "onFirst"), - }), - l("tablepastecolafter", { - tooltip: "Paste column after", - command: "mceTablePasteColAfter", - icon: "paste-column-after", - onSetup: t.onSetupPasteableColumn(bl, "onLast"), - }), - l("tableinsertdialog", { - tooltip: "Insert table", - command: "mceInsertTableDialog", - icon: "table", - onSetup: gl(e), - }); - const r = So(Tt(e)); - 0 !== r.length && - e.queryCommandSupported("mceTableToggleClass") && - e.ui.registry.addMenuButton("tableclass", { - icon: "table-classes", - tooltip: "Table styles", - fetch: Co(e, r, "tableclass", (t) => - e.execCommand("mceTableToggleClass", !1, t), - ), - onSetup: t.onSetupTable, - }); - const a = So(Ct(e)); - 0 !== a.length && - e.queryCommandSupported("mceTableCellToggleClass") && - e.ui.registry.addMenuButton("tablecellclass", { - icon: "table-cell-classes", - tooltip: "Cell styles", - fetch: Co(e, a, "tablecellclass", (t) => - e.execCommand("mceTableCellToggleClass", !1, t), - ), - onSetup: t.onSetupCellOrRow, - }), - e.queryCommandSupported("mceTableApplyCellStyle") && - (e.ui.registry.addMenuButton("tablecellvalign", { - icon: "vertical-align", - tooltip: "Vertical align", - fetch: Co( - e, - oo, - "tablecellverticalalign", - wo(e, "vertical-align"), - ), - onSetup: t.onSetupCellOrRow, - }), - e.ui.registry.addMenuButton("tablecellborderwidth", { - icon: "border-width", - tooltip: "Border width", - fetch: Co( - e, - pt(e), - "tablecellborderwidth", - wo(e, "border-width"), - ), - onSetup: t.onSetupCellOrRow, - }), - e.ui.registry.addMenuButton("tablecellborderstyle", { - icon: "border-style", - tooltip: "Border style", - fetch: Co( - e, - bt(e), - "tablecellborderstyle", - wo(e, "border-style"), - ), - onSetup: t.onSetupCellOrRow, - }), - e.ui.registry.addMenuButton("tablecellbackgroundcolor", { - icon: "cell-background-color", - tooltip: "Background color", - fetch: (t) => t(vo(e, At(e), "background-color")), - onSetup: t.onSetupCellOrRow, - }), - e.ui.registry.addMenuButton("tablecellbordercolor", { - icon: "cell-border-color", - tooltip: "Border color", - fetch: (t) => t(vo(e, Rt(e), "border-color")), - onSetup: t.onSetupCellOrRow, - })), - n("tablecaption", { - tooltip: "Table caption", - icon: "table-caption", - command: "mceTableToggleCaption", - onSetup: t.onSetupTableWithCaption, - }), - n("tablerowheader", { - tooltip: "Row header", - icon: "table-top-header", - command: "mceTableRowType", - onAction: To(e), - onSetup: t.onSetupTableRowHeaders, - }), - n("tablecolheader", { - tooltip: "Column header", - icon: "table-left-header", - command: "mceTableColType", - onAction: xo(e), - onSetup: t.onSetupTableColumnHeaders, - }); - })(e, t), - ((e) => { - const t = xt(e); - t.length > 0 && - e.ui.registry.addContextToolbar("table", { - predicate: (t) => - e.dom.is(t, "table") && - e.getBody().contains(t) && - e.dom.isEditable(t.parentNode), - items: t, - scope: "node", - position: "node", - }); - })(e); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/template/plugin.min.js b/src/lib/dist/tinymce/plugins/template/plugin.min.js deleted file mode 100644 index d0c3076b..00000000 --- a/src/lib/dist/tinymce/plugins/template/plugin.min.js +++ /dev/null @@ -1,492 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var e = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const t = (e) => (t) => - ((e) => { - const t = typeof e; - return null === e - ? "null" - : "object" === t && Array.isArray(e) - ? "array" - : "object" === t && - ((a = n = e), - (r = String).prototype.isPrototypeOf(a) || - (null === (s = n.constructor) || void 0 === s - ? void 0 - : s.name) === r.name) - ? "string" - : t; - var a, n, r, s; - })(t) === e, - a = t("string"), - n = t("object"), - r = t("array"), - s = ("function", (e) => "function" == typeof e); - const l = (!1, () => false); - var o = tinymce.util.Tools.resolve("tinymce.util.Tools"); - const c = (e) => (t) => t.options.get(e), - i = c("template_cdate_classes"), - u = c("template_mdate_classes"), - m = c("template_selected_content_classes"), - p = c("template_preview_replace_values"), - d = c("template_replace_values"), - h = c("templates"), - g = c("template_cdate_format"), - v = c("template_mdate_format"), - f = c("content_style"), - y = c("content_css_cors"), - b = c("body_class"), - _ = (e, t) => { - if ((e = "" + e).length < t) - for (let a = 0; a < t - e.length; a++) e = "0" + e; - return e; - }, - M = (e, t, a = new Date()) => { - const n = "Sun Mon Tue Wed Thu Fri Sat Sun".split(" "), - r = - "Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split( - " ", - ), - s = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), - l = - "January February March April May June July August September October November December".split( - " ", - ); - return (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = - (t = (t = t.replace("%D", "%m/%d/%Y")).replace( - "%r", - "%I:%M:%S %p", - )).replace("%Y", "" + a.getFullYear())).replace( - "%y", - "" + a.getYear(), - )).replace("%m", _(a.getMonth() + 1, 2))).replace( - "%d", - _(a.getDate(), 2), - )).replace("%H", "" + _(a.getHours(), 2))).replace( - "%M", - "" + _(a.getMinutes(), 2), - )).replace("%S", "" + _(a.getSeconds(), 2))).replace( - "%I", - "" + (((a.getHours() + 11) % 12) + 1), - )).replace("%p", a.getHours() < 12 ? "AM" : "PM")).replace( - "%B", - "" + e.translate(l[a.getMonth()]), - )).replace("%b", "" + e.translate(s[a.getMonth()]))).replace( - "%A", - "" + e.translate(r[a.getDay()]), - )).replace("%a", "" + e.translate(n[a.getDay()]))).replace("%%", "%"); - }; - class T { - constructor(e, t) { - (this.tag = e), (this.value = t); - } - static some(e) { - return new T(!0, e); - } - static none() { - return T.singletonNone; - } - fold(e, t) { - return this.tag ? t(this.value) : e(); - } - isSome() { - return this.tag; - } - isNone() { - return !this.tag; - } - map(e) { - return this.tag ? T.some(e(this.value)) : T.none(); - } - bind(e) { - return this.tag ? e(this.value) : T.none(); - } - exists(e) { - return this.tag && e(this.value); - } - forall(e) { - return !this.tag || e(this.value); - } - filter(e) { - return !this.tag || e(this.value) ? this : T.none(); - } - getOr(e) { - return this.tag ? this.value : e; - } - or(e) { - return this.tag ? this : e; - } - getOrThunk(e) { - return this.tag ? this.value : e(); - } - orThunk(e) { - return this.tag ? this : e(); - } - getOrDie(e) { - if (this.tag) return this.value; - throw new Error(null != e ? e : "Called getOrDie on None"); - } - static from(e) { - return null == e ? T.none() : T.some(e); - } - getOrNull() { - return this.tag ? this.value : null; - } - getOrUndefined() { - return this.value; - } - each(e) { - this.tag && e(this.value); - } - toArray() { - return this.tag ? [this.value] : []; - } - toString() { - return this.tag ? `some(${this.value})` : "none()"; - } - } - T.singletonNone = new T(!1); - const S = Object.hasOwnProperty; - var x = tinymce.util.Tools.resolve("tinymce.html.Serializer"); - const C = { - '"': """, - "<": "<", - ">": ">", - "&": "&", - "'": "'", - }, - w = (e) => - e.replace(/["'<>&]/g, (e) => { - return ((t = C), - (a = e), - ((e, t) => S.call(e, t))(t, a) ? T.from(t[a]) : T.none()).getOr(e); - var t, a; - }), - O = (e, t, a) => - ((a, n) => { - for (let n = 0, s = a.length; n < s; n++) - if (((r = a[n]), e.hasClass(t, r))) return !0; - var r; - return !1; - })(a.split(/\s+/)), - A = (e, t) => - x({ validate: !0 }, e.schema).serialize( - e.parser.parse(t, { insert: !0 }), - ), - D = (e, t) => ( - o.each(t, (t, a) => { - s(t) && (t = t(a)), - (e = e.replace( - new RegExp( - "\\{\\$" + a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\}", - "g", - ), - t, - )); - }), - e - ), - N = (e, t) => { - const a = e.dom, - n = d(e); - o.each(a.select("*", t), (e) => { - o.each(n, (t, n) => { - a.hasClass(e, n) && s(t) && t(e); - }); - }); - }, - I = (e, t, a) => { - const n = e.dom, - r = e.selection.getContent(); - a = D(a, d(e)); - let s = n.create("div", {}, A(e, a)); - const l = n.select(".mceTmpl", s); - l && - l.length > 0 && - ((s = n.create("div")), s.appendChild(l[0].cloneNode(!0))), - o.each(n.select("*", s), (t) => { - O(n, t, i(e)) && (t.innerHTML = M(e, g(e))), - O(n, t, u(e)) && (t.innerHTML = M(e, v(e))), - O(n, t, m(e)) && (t.innerHTML = r); - }), - N(e, s), - e.execCommand("mceInsertContent", !1, s.innerHTML), - e.addVisual(); - }; - var E = tinymce.util.Tools.resolve("tinymce.Env"); - const k = (e, t) => { - const a = (e, t) => - ((e, t, a) => { - for (let n = 0, r = e.length; n < r; n++) { - const r = e[n]; - if (t(r, n)) return T.some(r); - if (a(r, n)) break; - } - return T.none(); - })(e, (e) => e.text === t, l), - n = (t) => { - e.windowManager.alert("Could not load the specified template.", () => - t.focus("template"), - ); - }, - r = (e) => - e.value.url.fold( - () => Promise.resolve(e.value.content.getOr("")), - (e) => fetch(e).then((e) => (e.ok ? e.text() : Promise.reject())), - ), - s = (e, t) => (s, l) => { - if ("template" === l.name) { - const l = s.getData().template; - a(e, l).each((e) => { - s.block("Loading..."), - r(e) - .then((a) => { - t(s, e, a); - }) - .catch(() => { - t(s, e, ""), s.setEnabled("save", !1), n(s); - }); - }); - } - }, - c = (t) => (s) => { - const l = s.getData(); - a(t, l.template).each((t) => { - r(t) - .then((t) => { - e.execCommand("mceInsertTemplate", !1, t), s.close(); - }) - .catch(() => { - s.setEnabled("save", !1), n(s); - }); - }); - }; - (() => { - if (!t || 0 === t.length) { - const t = e.translate("No templates defined."); - return ( - e.notificationManager.open({ text: t, type: "info" }), T.none() - ); - } - return T.from( - o.map(t, (e, t) => { - const a = (e) => void 0 !== e.url; - return { - selected: 0 === t, - text: e.title, - value: { - url: a(e) ? T.from(e.url) : T.none(), - content: a(e) ? T.none() : T.from(e.content), - description: e.description, - }, - }; - }), - ); - })().each((t) => { - const a = ((e) => - ((e, t) => { - const a = e.length, - n = new Array(a); - for (let t = 0; t < a; t++) { - const a = e[t]; - n[t] = { text: (r = a).text, value: r.text }; - } - var r; - return n; - })(e))(t), - l = (e, a) => ({ - title: "Insert Template", - size: "large", - body: { type: "panel", items: e }, - initialData: a, - buttons: [ - { type: "cancel", name: "cancel", text: "Cancel" }, - { type: "submit", name: "save", text: "Save", primary: !0 }, - ], - onSubmit: c(t), - onChange: s(t, i), - }), - i = (t, n, r) => { - const s = ((e, t) => { - var a; - let n = A(e, t); - if (-1 === t.indexOf("")) { - let t = ""; - const r = null !== (a = f(e)) && void 0 !== a ? a : "", - s = y(e) ? ' crossorigin="anonymous"' : ""; - o.each(e.contentCSS, (a) => { - t += - '"; - }), - r && (t += '"); - const l = b(e), - c = e.dom.encode, - i = - ' ", - u = e.getBody().dir, - m = u ? ' dir="' + c(u) + '"' : ""; - n = - '' + - t + - i + - '" + - n + - ""; - } - return D(n, p(e)); - })(e, r), - c = [ - { - type: "listbox", - name: "template", - label: "Templates", - items: a, - }, - { - type: "htmlpanel", - html: `

${w(n.value.description)}

`, - }, - { - label: "Preview", - type: "iframe", - name: "preview", - sandboxed: !1, - transparent: !1, - }, - ], - i = { template: n.text, preview: s }; - t.unblock(), t.redial(l(c, i)), t.focus("template"); - }, - u = e.windowManager.open(l([], { template: "", preview: "" })); - u.block("Loading..."), - r(t[0]) - .then((e) => { - i(u, t[0], e); - }) - .catch(() => { - i(u, t[0], ""), u.setEnabled("save", !1), n(u); - }); - }); - }, - P = (e) => (t) => { - const a = () => { - t.setEnabled(e.selection.isEditable()); - }; - return ( - e.on("NodeChange", a), - a(), - () => { - e.off("NodeChange", a); - } - ); - }; - e.add("template", (e) => { - ((e) => { - const t = e.options.register; - t("template_cdate_classes", { processor: "string", default: "cdate" }), - t("template_mdate_classes", { processor: "string", default: "mdate" }), - t("template_selected_content_classes", { - processor: "string", - default: "selcontent", - }), - t("template_preview_replace_values", { processor: "object" }), - t("template_replace_values", { processor: "object" }), - t("templates", { - processor: (e) => - a(e) || - ((e, t) => { - if (r(e)) { - for (let a = 0, n = e.length; a < n; ++a) - if (!t(e[a])) return !1; - return !0; - } - return !1; - })(e, n) || - s(e), - default: [], - }), - t("template_cdate_format", { - processor: "string", - default: e.translate("%Y-%m-%d"), - }), - t("template_mdate_format", { - processor: "string", - default: e.translate("%Y-%m-%d"), - }); - })(e), - ((e) => { - const t = () => e.execCommand("mceTemplate"); - e.ui.registry.addButton("template", { - icon: "template", - tooltip: "Insert template", - onSetup: P(e), - onAction: t, - }), - e.ui.registry.addMenuItem("template", { - icon: "template", - text: "Insert template...", - onSetup: P(e), - onAction: t, - }); - })(e), - ((e) => { - e.addCommand( - "mceInsertTemplate", - (function (e, ...t) { - return (...a) => { - const n = t.concat(a); - return e.apply(null, n); - }; - })(I, e), - ), - e.addCommand( - "mceTemplate", - ((e, t) => () => { - const n = h(e); - s(n) - ? n(t) - : a(n) - ? fetch(n).then((e) => { - e.ok && e.json().then(t); - }) - : t(n); - })( - e, - ((e) => (t) => { - k(e, t); - })(e), - ), - ); - })(e), - ((e) => { - e.on("PreProcess", (t) => { - const a = e.dom, - n = v(e); - o.each(a.select("div", t.node), (t) => { - a.hasClass(t, "mceTmpl") && - (o.each(a.select("*", t), (t) => { - O(a, t, u(e)) && (t.innerHTML = M(e, n)); - }), - N(e, t)); - }); - }); - })(e); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/visualblocks/plugin.min.js b/src/lib/dist/tinymce/plugins/visualblocks/plugin.min.js deleted file mode 100644 index 009c54c4..00000000 --- a/src/lib/dist/tinymce/plugins/visualblocks/plugin.min.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var t = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const s = (t, s, o) => { - t.dom.toggleClass(t.getBody(), "mce-visualblocks"), - o.set(!o.get()), - ((t, s) => { - t.dispatch("VisualBlocks", { state: s }); - })(t, o.get()); - }, - o = - ("visualblocks_default_state", - (t) => t.options.get("visualblocks_default_state")); - const e = (t, s) => (o) => { - o.setActive(s.get()); - const e = (t) => o.setActive(t.state); - return t.on("VisualBlocks", e), () => t.off("VisualBlocks", e); - }; - t.add("visualblocks", (t, l) => { - ((t) => { - (0, t.options.register)("visualblocks_default_state", { - processor: "boolean", - default: !1, - }); - })(t); - const a = ((t) => { - let s = !1; - return { - get: () => s, - set: (t) => { - s = t; - }, - }; - })(); - ((t, o, e) => { - t.addCommand("mceVisualBlocks", () => { - s(t, 0, e); - }); - })(t, 0, a), - ((t, s) => { - const o = () => t.execCommand("mceVisualBlocks"); - t.ui.registry.addToggleButton("visualblocks", { - icon: "visualblocks", - tooltip: "Show blocks", - onAction: o, - onSetup: e(t, s), - }), - t.ui.registry.addToggleMenuItem("visualblocks", { - text: "Show blocks", - icon: "visualblocks", - onAction: o, - onSetup: e(t, s), - }); - })(t, a), - ((t, e, l) => { - t.on("PreviewFormats AfterPreviewFormats", (s) => { - l.get() && - t.dom.toggleClass( - t.getBody(), - "mce-visualblocks", - "afterpreviewformats" === s.type, - ); - }), - t.on("init", () => { - o(t) && s(t, 0, l); - }); - })(t, 0, a); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/visualchars/plugin.min.js b/src/lib/dist/tinymce/plugins/visualchars/plugin.min.js deleted file mode 100644 index 1492d10f..00000000 --- a/src/lib/dist/tinymce/plugins/visualchars/plugin.min.js +++ /dev/null @@ -1,398 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var t = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const e = (t) => (e) => - ((t) => { - const e = typeof t; - return null === t - ? "null" - : "object" === e && Array.isArray(t) - ? "array" - : "object" === e && - ((n = o = t), - (r = String).prototype.isPrototypeOf(n) || - (null === (s = o.constructor) || void 0 === s - ? void 0 - : s.name) === r.name) - ? "string" - : e; - var n, o, r, s; - })(e) === t, - n = (t) => (e) => typeof e === t, - o = e("string"), - r = e("object"), - s = (null, (t) => null === t); - const a = n("boolean"), - l = n("number"); - class i { - constructor(t, e) { - (this.tag = t), (this.value = e); - } - static some(t) { - return new i(!0, t); - } - static none() { - return i.singletonNone; - } - fold(t, e) { - return this.tag ? e(this.value) : t(); - } - isSome() { - return this.tag; - } - isNone() { - return !this.tag; - } - map(t) { - return this.tag ? i.some(t(this.value)) : i.none(); - } - bind(t) { - return this.tag ? t(this.value) : i.none(); - } - exists(t) { - return this.tag && t(this.value); - } - forall(t) { - return !this.tag || t(this.value); - } - filter(t) { - return !this.tag || t(this.value) ? this : i.none(); - } - getOr(t) { - return this.tag ? this.value : t; - } - or(t) { - return this.tag ? this : t; - } - getOrThunk(t) { - return this.tag ? this.value : t(); - } - orThunk(t) { - return this.tag ? this : t(); - } - getOrDie(t) { - if (this.tag) return this.value; - throw new Error(null != t ? t : "Called getOrDie on None"); - } - static from(t) { - return null == t ? i.none() : i.some(t); - } - getOrNull() { - return this.tag ? this.value : null; - } - getOrUndefined() { - return this.value; - } - each(t) { - this.tag && t(this.value); - } - toArray() { - return this.tag ? [this.value] : []; - } - toString() { - return this.tag ? `some(${this.value})` : "none()"; - } - } - i.singletonNone = new i(!1); - const u = (t, e) => { - for (let n = 0, o = t.length; n < o; n++) e(t[n], n); - }, - c = Object.keys, - d = (t, e) => { - const n = c(t); - for (let o = 0, r = n.length; o < r; o++) { - const r = n[o]; - e(t[r], r); - } - }, - h = "undefined" != typeof window ? window : Function("return this;")(), - m = (t, e) => - ((t, e) => { - let n = null != e ? e : h; - for (let e = 0; e < t.length && null != n; ++e) n = n[t[e]]; - return n; - })(t.split("."), e), - g = Object.getPrototypeOf, - v = (t) => { - const e = m("ownerDocument.defaultView", t); - return ( - r(t) && - (((t) => - ((t, e) => { - const n = ((t, e) => m(t, e))(t, e); - if (null == n) - throw new Error(t + " not available on this browser"); - return n; - })("HTMLElement", t))(e).prototype.isPrototypeOf(t) || - /^HTML\w*Element$/.test(g(t).constructor.name)) - ); - }, - f = (t) => t.dom.nodeValue, - p = (t) => (e) => ((t) => t.dom.nodeType)(e) === t, - b = (t) => w(t) && v(t.dom), - w = p(1), - y = p(3), - A = (t, e, n) => { - ((t, e, n) => { - if (!(o(n) || a(n) || l(n))) - throw ( - (console.error( - "Invalid call to Attribute.set. Key ", - e, - ":: Value ", - n, - ":: Element ", - t, - ), - new Error("Attribute value was not simple")) - ); - t.setAttribute(e, n + ""); - })(t.dom, e, n); - }, - k = (t, e) => { - t.dom.removeAttribute(e); - }, - N = (t, e) => { - const n = ((t, e) => { - const n = t.dom.getAttribute(e); - return null === n ? void 0 : n; - })(t, e); - return void 0 === n || "" === n ? [] : n.split(" "); - }, - T = (t) => void 0 !== t.dom.classList, - C = (t) => { - if (null == t) throw new Error("Node cannot be null or undefined"); - return { dom: t }; - }, - E = C, - O = { "\xa0": "nbsp", "\xad": "shy" }, - L = (t, e) => { - let n = ""; - return ( - d(t, (t, e) => { - n += e; - }), - new RegExp("[" + n + "]", e ? "g" : "") - ); - }, - V = L(O), - j = L(O, !0), - B = ((t) => { - let e = ""; - return ( - d(t, (t) => { - e && (e += ","), (e += "span.mce-" + t); - }), - e - ); - })(O), - S = "mce-nbsp", - _ = (t) => t.dom.contentEditable, - x = (t) => - '' + t + "", - M = (t) => - "span" === t.nodeName.toLowerCase() && - t.classList.contains("mce-nbsp-wrap"), - P = (t) => { - const e = f(t); - return y(t) && o(e) && V.test(e); - }, - D = (t, e, n) => { - let o = []; - const r = ((t, e) => { - const n = t.length, - o = new Array(n); - for (let r = 0; r < n; r++) { - const n = t[r]; - o[r] = e(n, r); - } - return o; - })(t.dom.childNodes, E); - return ( - u(r, (t) => { - var r; - n && - (M((r = t).dom) || !((t) => b(t) && "false" === _(t))(r)) && - e(t) && - (o = o.concat([t])), - (o = o.concat( - D( - t, - e, - ((t, e) => { - if (b(t) && !M(t.dom)) { - const e = _(t); - if ("true" === e) return !0; - if ("false" === e) return !1; - } - return e; - })(t, n), - ), - )); - }), - o - ); - }, - H = (t, e) => { - const n = t.dom, - o = D(E(e), P, t.dom.isEditable(e)); - u(o, (e) => { - var o; - const r = e.dom.parentNode; - if (M(r)) - (s = E(r)), - (a = S), - T(s) - ? s.dom.classList.add(a) - : ((t, e) => { - ((t, e, n) => { - const o = N(t, e).concat([n]); - A(t, e, o.join(" ")); - })(t, "class", e); - })(s, a); - else { - const r = n - .encode(null !== (o = f(e)) && void 0 !== o ? o : "") - .replace(j, x), - s = n.create("div", {}, r); - let a; - for (; (a = s.lastChild); ) n.insertAfter(a, e.dom); - t.dom.remove(e.dom); - } - var s, a; - }); - }, - I = (t, e) => { - const n = t.dom.select(B, e); - u(n, (e) => { - var n, o; - M(e) - ? ((n = E(e)), - (o = S), - T(n) - ? n.dom.classList.remove(o) - : ((t, e) => { - ((t, e, n) => { - const o = ((t, e) => { - const o = []; - for (let e = 0, r = t.length; e < r; e++) { - const r = t[e]; - r !== n && o.push(r); - } - return o; - })(N(t, e)); - o.length > 0 ? A(t, e, o.join(" ")) : k(t, e); - })(t, "class", e); - })(n, o), - ((t) => { - const e = T(t) ? t.dom.classList : ((t) => N(t, "class"))(t); - 0 === e.length && k(t, "class"); - })(n)) - : t.dom.remove(e, !0); - }); - }, - $ = (t) => { - const e = t.getBody(), - n = t.selection.getBookmark(); - let o = ((t, e) => { - for (; t.parentNode; ) { - if (t.parentNode === e) return e; - t = t.parentNode; - } - })(t.selection.getNode(), e); - (o = void 0 !== o ? o : e), - I(t, o), - H(t, o), - t.selection.moveToBookmark(n); - }, - F = (t, e) => { - ((t, e) => { - t.dispatch("VisualChars", { state: e }); - })(t, e.get()); - const n = t.getBody(); - !0 === e.get() ? H(t, n) : I(t, n); - }, - K = - ("visualchars_default_state", - (t) => t.options.get("visualchars_default_state")); - const R = (t, e) => { - const n = ((t, e) => { - let n = null; - return { - cancel: () => { - s(n) || (clearTimeout(n), (n = null)); - }, - throttle: (...e) => { - s(n) && - (n = setTimeout(() => { - (n = null), t.apply(null, e); - }, 300)); - }, - }; - })(() => { - $(t); - }); - t.on("keydown", (o) => { - !0 === e.get() && (13 === o.keyCode ? $(t) : n.throttle()); - }), - t.on("remove", n.cancel); - }, - U = (t, e) => (n) => { - n.setActive(e.get()); - const o = (t) => n.setActive(t.state); - return t.on("VisualChars", o), () => t.off("VisualChars", o); - }; - t.add("visualchars", (t) => { - ((t) => { - (0, t.options.register)("visualchars_default_state", { - processor: "boolean", - default: !1, - }); - })(t); - const e = ((t) => { - let e = t; - return { - get: () => e, - set: (t) => { - e = t; - }, - }; - })(K(t)); - return ( - ((t, e) => { - t.addCommand("mceVisualChars", () => { - ((t, e) => { - e.set(!e.get()); - const n = t.selection.getBookmark(); - F(t, e), t.selection.moveToBookmark(n); - })(t, e); - }); - })(t, e), - ((t, e) => { - const n = () => t.execCommand("mceVisualChars"); - t.ui.registry.addToggleButton("visualchars", { - tooltip: "Show invisible characters", - icon: "visualchars", - onAction: n, - onSetup: U(t, e), - }), - t.ui.registry.addToggleMenuItem("visualchars", { - text: "Show invisible characters", - icon: "visualchars", - onAction: n, - onSetup: U(t, e), - }); - })(t, e), - R(t, e), - ((t, e) => { - t.on("init", () => { - F(t, e); - }); - })(t, e), - ((t) => ({ isEnabled: () => t.get() }))(e) - ); - }); -})(); diff --git a/src/lib/dist/tinymce/plugins/wordcount/plugin.min.js b/src/lib/dist/tinymce/plugins/wordcount/plugin.min.js deleted file mode 100644 index 5a95dfcd..00000000 --- a/src/lib/dist/tinymce/plugins/wordcount/plugin.min.js +++ /dev/null @@ -1,308 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - var t = tinymce.util.Tools.resolve("tinymce.PluginManager"); - const e = (null, (t) => null === t); - const n = (t) => t, - o = (t, e) => { - const n = t.length, - o = new Array(n); - for (let r = 0; r < n; r++) { - const n = t[r]; - o[r] = e(n, r); - } - return o; - }, - r = "[-'\\.\u2018\u2019\u2024\ufe52\uff07\uff0e]", - c = "[:\xb7\xb7\u05f4\u2027\ufe13\ufe55\uff1a]", - u = - "[\xb1+*/,;;\u0589\u060c\u060d\u066c\u07f8\u2044\ufe10\ufe14\ufe50\ufe54\uff0c\uff1b]", - s = - "[0-9\u0660-\u0669\u066b\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9]", - a = "\\r", - l = "\\n", - i = "[\v\f\x85\u2028\u2029]", - d = - "[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f\u109a-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b6-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u192b\u1930-\u193b\u19b0-\u19c0\u19c8\u19c9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f\u1b00-\u1b04\u1b34-\u1b44\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1baa\u1be6-\u1bf3\u1c24-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe3-\uabea\uabec\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]", - g = - "[\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200e\u200f\u202a-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb]", - p = - "[\u3031-\u3035\u309b\u309c\u30a0-\u30fa\u30fc-\u30ff\u31f0-\u31ff\u32d0-\u32fe\u3300-\u3357\uff66-\uff9d]", - h = "[=_\u203f\u2040\u2054\ufe33\ufe34\ufe4d-\ufe4f\uff3f\u2200-\u22ff<>]", - C = - "[~\u2116|!-*+-\\/:;?@\\[-`{}\xa1\xab\xb7\xbb\xbf;\xb7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]", - y = 10, - m = [ - new RegExp( - "[A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f3\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u10a0-\u10c5\u10d0-\u10fa\u10fc\u1100-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bc0-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u24b6-\u24e9\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2d00-\u2d25\u2d30-\u2d65\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005\u303b\u303c\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790\ua791\ua7a0-\ua7a9\ua7fa-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]", - ), - new RegExp(r), - new RegExp(c), - new RegExp(u), - new RegExp(s), - new RegExp(a), - new RegExp(l), - new RegExp(i), - new RegExp(d), - new RegExp(g), - new RegExp(p), - new RegExp(h), - new RegExp("@"), - ], - w = new RegExp("^" + C + "$"), - W = m, - f = (t) => { - let e = 13; - const n = W.length; - for (let o = 0; o < n; ++o) { - const n = W[o]; - if (n && n.test(t)) { - e = o; - break; - } - } - return e; - }, - x = (t, e) => { - const n = t[e], - o = t[e + 1]; - if (e < 0 || (e > t.length - 1 && 0 !== e)) return !1; - if (0 === n && 0 === o) return !1; - const r = t[e + 2]; - if (0 === n && (2 === o || 1 === o || 12 === o) && 0 === r) return !1; - const c = t[e - 1]; - return ( - ((2 !== n && 1 !== n && 12 !== o) || 0 !== o || 0 !== c) && - ((4 !== n && 0 !== n) || (4 !== o && 0 !== o)) && - ((3 !== n && 1 !== n) || 4 !== o || 4 !== c) && - (4 !== n || (3 !== o && 1 !== o) || 4 !== r) && - ((8 !== n && 9 !== n) || - (0 !== o && 4 !== o && o !== y && 8 !== o && 9 !== o)) && - ((8 !== o && - (9 !== o || (0 !== r && 4 !== r && r !== y && 8 !== r && 9 !== r))) || - (0 !== n && 4 !== n && n !== y && 8 !== n && 9 !== n)) && - (5 !== n || 6 !== o) && - (7 === n || - 5 === n || - 6 === n || - 7 === o || - 5 === o || - 6 === o || - ((n !== y || o !== y) && - (11 !== o || (0 !== n && 4 !== n && n !== y && 11 !== n)) && - (11 !== n || (0 !== o && 4 !== o && o !== y)) && - 12 !== n)) - ); - }, - E = /^\s+$/, - R = w, - S = (t) => "http" === t || "https" === t, - b = (t, e) => { - const n = ((t, e) => { - let n; - for (n = e; n < t.length && !E.test(t[n]); n++); - return n; - })(t, e + 1); - return "://" === - t - .slice(e + 1, n) - .join("") - .substr(0, 3) - ? n - : e; - }, - v = (t, e, n) => - ((t, e, n) => { - n = { includeWhitespace: !1, includePunctuation: !1, ...n }; - const r = o(t, e); - return ((t, e, n, o) => { - const r = [], - c = []; - let u = []; - for (let s = 0; s < n.length; ++s) - if ((u.push(t[s]), x(n, s))) { - const n = e[s]; - if ( - (o.includeWhitespace || !E.test(n)) && - (o.includePunctuation || !R.test(n)) - ) { - const n = s - u.length + 1, - o = s + 1, - a = e.slice(n, o).join(""); - if (S(a)) { - const n = b(e, s), - r = t.slice(o, n); - Array.prototype.push.apply(u, r), (s = n); - } - r.push(u), c.push({ start: n, end: o }); - } - u = []; - } - return { words: r, indices: c }; - })( - t, - r, - ((t) => { - const e = ((t) => { - const e = {}; - return (n) => { - if (e[n]) return e[n]; - { - const o = t(n); - return (e[n] = o), o; - } - }; - })(f); - return o(t, e); - })(r), - n, - ); - })(t, e, n).words; - var F = tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"); - const T = (t, e) => { - const n = e.getBlockElements(), - o = e.getVoidElements(), - r = (t) => n[t.nodeName] || o[t.nodeName], - c = []; - let u = ""; - const s = new F(t, t); - let a; - for (; (a = s.next()); ) - 3 === a.nodeType - ? (u += a.data.replace(/\uFEFF/g, "")) - : r(a) && u.length && (c.push(u), (u = "")); - return u.length && c.push(u), c; - }, - A = (t) => t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_").length, - B = (t, e) => { - const o = ((t) => t.replace(/\u200B/g, ""))(T(t, e).join("\n")); - return v(o.split(""), n).length; - }, - D = (t, e) => { - const n = T(t, e).join(""); - return A(n); - }, - j = (t, e) => { - const n = T(t, e).join("").replace(/\s/g, ""); - return A(n); - }, - k = (t, e) => () => e(t.getBody(), t.schema), - U = (t, e) => () => e(t.selection.getRng().cloneContents(), t.schema), - M = (t) => k(t, B); - var P = tinymce.util.Tools.resolve("tinymce.util.Delay"); - const N = (t, e) => { - ((t, e) => { - t.dispatch("wordCountUpdate", { - wordCount: { - words: e.body.getWordCount(), - characters: e.body.getCharacterCount(), - charactersWithoutSpaces: e.body.getCharacterCountWithoutSpaces(), - }, - }); - })(t, e); - }, - V = (t, n, o) => { - const r = ((t, n) => { - let o = null; - return { - cancel: () => { - e(o) || (clearTimeout(o), (o = null)); - }, - throttle: (...r) => { - e(o) && - (o = setTimeout(() => { - (o = null), t.apply(null, r); - }, n)); - }, - }; - })(() => N(t, n), o); - t.on("init", () => { - N(t, n), - P.setEditorTimeout( - t, - () => { - t.on( - "SetContent BeforeAddUndo Undo Redo ViewUpdate keyup", - r.throttle, - ); - }, - 0, - ), - t.on("remove", r.cancel); - }); - }; - ((e = 300) => { - t.add("wordcount", (t) => { - const n = ((t) => ({ - body: { - getWordCount: M(t), - getCharacterCount: k(t, D), - getCharacterCountWithoutSpaces: k(t, j), - }, - selection: { - getWordCount: U(t, B), - getCharacterCount: U(t, D), - getCharacterCountWithoutSpaces: U(t, j), - }, - getCount: M(t), - }))(t); - return ( - ((t, e) => { - t.addCommand("mceWordCount", () => - ((t, e) => { - t.windowManager.open({ - title: "Word Count", - body: { - type: "panel", - items: [ - { - type: "table", - header: ["Count", "Document", "Selection"], - cells: [ - [ - "Words", - String(e.body.getWordCount()), - String(e.selection.getWordCount()), - ], - [ - "Characters (no spaces)", - String(e.body.getCharacterCountWithoutSpaces()), - String(e.selection.getCharacterCountWithoutSpaces()), - ], - [ - "Characters", - String(e.body.getCharacterCount()), - String(e.selection.getCharacterCount()), - ], - ], - }, - ], - }, - buttons: [ - { type: "cancel", name: "close", text: "Close", primary: !0 }, - ], - }); - })(t, e), - ); - })(t, n), - ((t) => { - const e = () => t.execCommand("mceWordCount"); - t.ui.registry.addButton("wordcount", { - tooltip: "Word count", - icon: "character-count", - onAction: e, - }), - t.ui.registry.addMenuItem("wordcount", { - text: "Word count", - icon: "character-count", - onAction: e, - }); - })(t), - V(t, n, e), - n - ); - }); - })(); -})(); diff --git a/src/lib/dist/tinymce/skins/content/dark/content.min.css b/src/lib/dist/tinymce/skins/content/dark/content.min.css deleted file mode 100644 index 16ceb374..00000000 --- a/src/lib/dist/tinymce/skins/content/dark/content.min.css +++ /dev/null @@ -1,60 +0,0 @@ -body { - background-color: #222f3e; - color: #fff; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, - Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; - line-height: 1.4; - margin: 1rem; -} -a { - color: #4099ff; -} -table { - border-collapse: collapse; -} -table:not([cellpadding]) td, -table:not([cellpadding]) th { - padding: 0.4rem; -} -table[border]:not([border="0"]):not([style*="border-width"]) td, -table[border]:not([border="0"]):not([style*="border-width"]) th { - border-width: 1px; -} -table[border]:not([border="0"]):not([style*="border-style"]) td, -table[border]:not([border="0"]):not([style*="border-style"]) th { - border-style: solid; -} -table[border]:not([border="0"]):not([style*="border-color"]) td, -table[border]:not([border="0"]):not([style*="border-color"]) th { - border-color: #6d737b; -} -figure { - display: table; - margin: 1rem auto; -} -figure figcaption { - color: #8a8f97; - display: block; - margin-top: 0.25rem; - text-align: center; -} -hr { - border-color: #6d737b; - border-style: solid; - border-width: 1px 0 0 0; -} -code { - background-color: #6d737b; - border-radius: 3px; - padding: 0.1rem 0.2rem; -} -.mce-content-body:not([dir="rtl"]) blockquote { - border-left: 2px solid #6d737b; - margin-left: 1.5rem; - padding-left: 1rem; -} -.mce-content-body[dir="rtl"] blockquote { - border-right: 2px solid #6d737b; - margin-right: 1.5rem; - padding-right: 1rem; -} diff --git a/src/lib/dist/tinymce/skins/content/default/content.min.css b/src/lib/dist/tinymce/skins/content/default/content.min.css deleted file mode 100644 index 0750c9a8..00000000 --- a/src/lib/dist/tinymce/skins/content/default/content.min.css +++ /dev/null @@ -1,55 +0,0 @@ -body { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, - Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; - line-height: 1.4; - margin: 1rem; -} -table { - border-collapse: collapse; -} -table:not([cellpadding]) td, -table:not([cellpadding]) th { - padding: 0.4rem; -} -table[border]:not([border="0"]):not([style*="border-width"]) td, -table[border]:not([border="0"]):not([style*="border-width"]) th { - border-width: 1px; -} -table[border]:not([border="0"]):not([style*="border-style"]) td, -table[border]:not([border="0"]):not([style*="border-style"]) th { - border-style: solid; -} -table[border]:not([border="0"]):not([style*="border-color"]) td, -table[border]:not([border="0"]):not([style*="border-color"]) th { - border-color: #ccc; -} -figure { - display: table; - margin: 1rem auto; -} -figure figcaption { - color: #999; - display: block; - margin-top: 0.25rem; - text-align: center; -} -hr { - border-color: #ccc; - border-style: solid; - border-width: 1px 0 0 0; -} -code { - background-color: #e8e8e8; - border-radius: 3px; - padding: 0.1rem 0.2rem; -} -.mce-content-body:not([dir="rtl"]) blockquote { - border-left: 2px solid #ccc; - margin-left: 1.5rem; - padding-left: 1rem; -} -.mce-content-body[dir="rtl"] blockquote { - border-right: 2px solid #ccc; - margin-right: 1.5rem; - padding-right: 1rem; -} diff --git a/src/lib/dist/tinymce/skins/content/document/content.min.css b/src/lib/dist/tinymce/skins/content/document/content.min.css deleted file mode 100644 index dc4f37a8..00000000 --- a/src/lib/dist/tinymce/skins/content/document/content.min.css +++ /dev/null @@ -1,60 +0,0 @@ -@media screen { - html { - background: #f4f4f4; - min-height: 100%; - } -} -body { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, - Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; -} -@media screen { - body { - background-color: #fff; - box-shadow: 0 0 4px rgba(0, 0, 0, 0.15); - box-sizing: border-box; - margin: 1rem auto 0; - max-width: 820px; - min-height: calc(100vh - 1rem); - padding: 4rem 6rem 6rem 6rem; - } -} -table { - border-collapse: collapse; -} -table:not([cellpadding]) td, -table:not([cellpadding]) th { - padding: 0.4rem; -} -table[border]:not([border="0"]):not([style*="border-width"]) td, -table[border]:not([border="0"]):not([style*="border-width"]) th { - border-width: 1px; -} -table[border]:not([border="0"]):not([style*="border-style"]) td, -table[border]:not([border="0"]):not([style*="border-style"]) th { - border-style: solid; -} -table[border]:not([border="0"]):not([style*="border-color"]) td, -table[border]:not([border="0"]):not([style*="border-color"]) th { - border-color: #ccc; -} -figure figcaption { - color: #999; - margin-top: 0.25rem; - text-align: center; -} -hr { - border-color: #ccc; - border-style: solid; - border-width: 1px 0 0 0; -} -.mce-content-body:not([dir="rtl"]) blockquote { - border-left: 2px solid #ccc; - margin-left: 1.5rem; - padding-left: 1rem; -} -.mce-content-body[dir="rtl"] blockquote { - border-right: 2px solid #ccc; - margin-right: 1.5rem; - padding-right: 1rem; -} diff --git a/src/lib/dist/tinymce/skins/content/pocketbase/content.css b/src/lib/dist/tinymce/skins/content/pocketbase/content.css deleted file mode 100644 index 68831298..00000000 --- a/src/lib/dist/tinymce/skins/content/pocketbase/content.css +++ /dev/null @@ -1,44 +0,0 @@ -body { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, - Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; - line-height: 1.4; - margin: 1rem; -} -table { - border-collapse: collapse; -} -table th, -table td { - border: 1px solid #ccc; - padding: 0.4rem; -} -figure { - display: table; - margin: 1rem auto; -} -figure figcaption { - color: #999; - display: block; - margin-top: 0.25rem; - text-align: center; -} -hr { - border-color: #ccc; - border-style: solid; - border-width: 1px 0 0 0; -} -code { - background-color: #e8e8e8; - border-radius: 3px; - padding: 0.1rem 0.2rem; -} -.mce-content-body:not([dir="rtl"]) blockquote { - border-left: 2px solid #ccc; - margin-left: 1.5rem; - padding-left: 1rem; -} -.mce-content-body[dir="rtl"] blockquote { - border-right: 2px solid #ccc; - margin-right: 1.5rem; - padding-right: 1rem; -} diff --git a/src/lib/dist/tinymce/skins/content/pocketbase/content.min.css b/src/lib/dist/tinymce/skins/content/pocketbase/content.min.css deleted file mode 100644 index b3bda608..00000000 --- a/src/lib/dist/tinymce/skins/content/pocketbase/content.min.css +++ /dev/null @@ -1,44 +0,0 @@ -body { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, - Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; - line-height: 1.4; - margin: 1rem; -} -table { - border-collapse: collapse; -} -table td, -table th { - border: 1px solid #ccc; - padding: 0.4rem; -} -figure { - display: table; - margin: 1rem auto; -} -figure figcaption { - color: #999; - display: block; - margin-top: 0.25rem; - text-align: center; -} -hr { - border-color: #ccc; - border-style: solid; - border-width: 1px 0 0 0; -} -code { - background-color: #e8e8e8; - border-radius: 3px; - padding: 0.1rem 0.2rem; -} -.mce-content-body:not([dir="rtl"]) blockquote { - border-left: 2px solid #ccc; - margin-left: 1.5rem; - padding-left: 1rem; -} -.mce-content-body[dir="rtl"] blockquote { - border-right: 2px solid #ccc; - margin-right: 1.5rem; - padding-right: 1rem; -} diff --git a/src/lib/dist/tinymce/skins/content/writer/content.min.css b/src/lib/dist/tinymce/skins/content/writer/content.min.css deleted file mode 100644 index fd6199d2..00000000 --- a/src/lib/dist/tinymce/skins/content/writer/content.min.css +++ /dev/null @@ -1,56 +0,0 @@ -body { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, - Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; - line-height: 1.4; - margin: 1rem auto; - max-width: 900px; -} -table { - border-collapse: collapse; -} -table:not([cellpadding]) td, -table:not([cellpadding]) th { - padding: 0.4rem; -} -table[border]:not([border="0"]):not([style*="border-width"]) td, -table[border]:not([border="0"]):not([style*="border-width"]) th { - border-width: 1px; -} -table[border]:not([border="0"]):not([style*="border-style"]) td, -table[border]:not([border="0"]):not([style*="border-style"]) th { - border-style: solid; -} -table[border]:not([border="0"]):not([style*="border-color"]) td, -table[border]:not([border="0"]):not([style*="border-color"]) th { - border-color: #ccc; -} -figure { - display: table; - margin: 1rem auto; -} -figure figcaption { - color: #999; - display: block; - margin-top: 0.25rem; - text-align: center; -} -hr { - border-color: #ccc; - border-style: solid; - border-width: 1px 0 0 0; -} -code { - background-color: #e8e8e8; - border-radius: 3px; - padding: 0.1rem 0.2rem; -} -.mce-content-body:not([dir="rtl"]) blockquote { - border-left: 2px solid #ccc; - margin-left: 1.5rem; - padding-left: 1rem; -} -.mce-content-body[dir="rtl"] blockquote { - border-right: 2px solid #ccc; - margin-right: 1.5rem; - padding-right: 1rem; -} diff --git a/src/lib/dist/tinymce/skins/ui/oxide/content.inline.min.css b/src/lib/dist/tinymce/skins/ui/oxide/content.inline.min.css deleted file mode 100644 index 4a836dc0..00000000 --- a/src/lib/dist/tinymce/skins/ui/oxide/content.inline.min.css +++ /dev/null @@ -1,796 +0,0 @@ -.mce-content-body .mce-item-anchor { - background: transparent - url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") - no-repeat center; -} -.mce-content-body .mce-item-anchor:empty { - cursor: default; - display: inline-block; - height: 12px !important; - padding: 0 2px; - -webkit-user-modify: read-only; - -moz-user-modify: read-only; - -webkit-user-select: all; - -moz-user-select: all; - user-select: all; - width: 8px !important; -} -.mce-content-body .mce-item-anchor:not(:empty) { - background-position-x: 2px; - display: inline-block; - padding-left: 12px; -} -.mce-content-body .mce-item-anchor[data-mce-selected] { - outline-offset: 1px; -} -.tox-comments-visible - .tox-comment[contenteditable="false"]:not([data-mce-selected]), -.tox-comments-visible span.tox-comment img:not([data-mce-selected]), -.tox-comments-visible - span.tox-comment - span.mce-preview-object:not([data-mce-selected]), -.tox-comments-visible span.tox-comment > audio:not([data-mce-selected]), -.tox-comments-visible span.tox-comment > video:not([data-mce-selected]) { - outline: 3px solid #ffe89d; -} -.tox-comments-visible - .tox-comment[contenteditable="false"][data-mce-annotation-active="true"]:not( - [data-mce-selected] - ) { - outline: 3px solid #fed635; -} -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"] - img:not([data-mce-selected]), -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"] - span.mce-preview-object:not([data-mce-selected]), -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"] - > audio:not([data-mce-selected]), -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"] - > video:not([data-mce-selected]) { - outline: 3px solid #fed635; -} -.tox-comments-visible span.tox-comment:not([data-mce-selected]) { - background-color: #ffe89d; - outline: 0; -} -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"]:not( - [data-mce-selected="inline-boundary"] - ) { - background-color: #fed635; -} -.tox-checklist > li:not(.tox-checklist--hidden) { - list-style: none; - margin: 0.25em 0; -} -.tox-checklist > li:not(.tox-checklist--hidden)::before { - content: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A"); - cursor: pointer; - height: 1em; - margin-left: -1.5em; - margin-top: 0.125em; - position: absolute; - width: 1em; -} -.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before { - content: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A"); -} -[dir="rtl"] .tox-checklist > li:not(.tox-checklist--hidden)::before { - margin-left: 0; - margin-right: -1.5em; -} -code[class*="language-"], -pre[class*="language-"] { - color: #000; - background: 0 0; - text-shadow: 0 1px #fff; - font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace; - font-size: 1em; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: 1.5; - -moz-tab-size: 4; - tab-size: 4; - -webkit-hyphens: none; - hyphens: none; -} -code[class*="language-"] ::-moz-selection, -code[class*="language-"]::-moz-selection, -pre[class*="language-"] ::-moz-selection, -pre[class*="language-"]::-moz-selection { - text-shadow: none; - background: #b3d4fc; -} -code[class*="language-"] ::selection, -code[class*="language-"]::selection, -pre[class*="language-"] ::selection, -pre[class*="language-"]::selection { - text-shadow: none; - background: #b3d4fc; -} -@media print { - code[class*="language-"], - pre[class*="language-"] { - text-shadow: none; - } -} -pre[class*="language-"] { - padding: 1em; - margin: 0.5em 0; - overflow: auto; -} -:not(pre) > code[class*="language-"], -pre[class*="language-"] { - background: #f5f2f0; -} -:not(pre) > code[class*="language-"] { - padding: 0.1em; - border-radius: 0.3em; - white-space: normal; -} -.token.cdata, -.token.comment, -.token.doctype, -.token.prolog { - color: #708090; -} -.token.punctuation { - color: #999; -} -.token.namespace { - opacity: 0.7; -} -.token.boolean, -.token.constant, -.token.deleted, -.token.number, -.token.property, -.token.symbol, -.token.tag { - color: #905; -} -.token.attr-name, -.token.builtin, -.token.char, -.token.inserted, -.token.selector, -.token.string { - color: #690; -} -.language-css .token.string, -.style .token.string, -.token.entity, -.token.operator, -.token.url { - color: #9a6e3a; - background: hsla(0, 0%, 100%, 0.5); -} -.token.atrule, -.token.attr-value, -.token.keyword { - color: #07a; -} -.token.class-name, -.token.function { - color: #dd4a68; -} -.token.important, -.token.regex, -.token.variable { - color: #e90; -} -.token.bold, -.token.important { - font-weight: 700; -} -.token.italic { - font-style: italic; -} -.token.entity { - cursor: help; -} -.mce-content-body { - overflow-wrap: break-word; - word-wrap: break-word; -} -.mce-content-body .mce-visual-caret { - background-color: #000; - background-color: currentColor; - position: absolute; -} -.mce-content-body .mce-visual-caret-hidden { - display: none; -} -.mce-content-body [data-mce-caret] { - left: -1000px; - margin: 0; - padding: 0; - position: absolute; - right: auto; - top: 0; -} -.mce-content-body .mce-offscreen-selection { - left: -2000000px; - max-width: 1000000px; - position: absolute; -} -.mce-content-body [contentEditable="false"] { - cursor: default; -} -.mce-content-body [contentEditable="true"] { - cursor: text; -} -.tox-cursor-format-painter { - cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), - default; -} -div.mce-footnotes hr { - margin-inline-end: auto; - margin-inline-start: 0; - width: 25%; -} -div.mce-footnotes li > a.mce-footnotes-backlink { - text-decoration: none; -} -@media print { - sup.mce-footnote a { - color: #000; - text-decoration: none; - } - div.mce-footnotes { - break-inside: avoid; - width: 100%; - } - div.mce-footnotes li > a.mce-footnotes-backlink { - display: none; - } -} -.mce-content-body figure.align-left { - float: left; -} -.mce-content-body figure.align-right { - float: right; -} -.mce-content-body figure.image.align-center { - display: table; - margin-left: auto; - margin-right: auto; -} -.mce-preview-object { - border: 1px solid gray; - display: inline-block; - line-height: 0; - margin: 0 2px 0 2px; - position: relative; -} -.mce-preview-object .mce-shim { - background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} -.mce-preview-object[data-mce-selected="2"] .mce-shim { - display: none; -} -.mce-content-body .mce-mergetag { - cursor: default !important; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.mce-content-body .mce-mergetag:hover { - background-color: rgba(0, 108, 231, 0.1); -} -.mce-content-body .mce-mergetag-affix { - background-color: rgba(0, 108, 231, 0.1); - color: #006ce7; -} -.mce-object { - background: transparent - url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") - no-repeat center; - border: 1px dashed #aaa; -} -.mce-pagebreak { - border: 1px dashed #aaa; - cursor: default; - display: block; - height: 5px; - margin-top: 15px; - page-break-before: always; - width: 100%; -} -@media print { - .mce-pagebreak { - border: 0; - } -} -.tiny-pageembed .mce-shim { - background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} -.tiny-pageembed[data-mce-selected="2"] .mce-shim { - display: none; -} -.tiny-pageembed { - display: inline-block; - position: relative; -} -.tiny-pageembed--16by9, -.tiny-pageembed--1by1, -.tiny-pageembed--21by9, -.tiny-pageembed--4by3 { - display: block; - overflow: hidden; - padding: 0; - position: relative; - width: 100%; -} -.tiny-pageembed--21by9 { - padding-top: 42.857143%; -} -.tiny-pageembed--16by9 { - padding-top: 56.25%; -} -.tiny-pageembed--4by3 { - padding-top: 75%; -} -.tiny-pageembed--1by1 { - padding-top: 100%; -} -.tiny-pageembed--16by9 iframe, -.tiny-pageembed--1by1 iframe, -.tiny-pageembed--21by9 iframe, -.tiny-pageembed--4by3 iframe { - border: 0; - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} -.mce-content-body[data-mce-placeholder] { - position: relative; -} -.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before { - color: rgba(34, 47, 62, 0.7); - content: attr(data-mce-placeholder); - position: absolute; -} -.mce-content-body:not([dir="rtl"])[data-mce-placeholder]:not( - .mce-visualblocks - )::before { - left: 1px; -} -.mce-content-body[dir="rtl"][data-mce-placeholder]:not( - .mce-visualblocks - )::before { - right: 1px; -} -.mce-content-body div.mce-resizehandle { - background-color: #4099ff; - border-color: #4099ff; - border-style: solid; - border-width: 1px; - box-sizing: border-box; - height: 10px; - position: absolute; - width: 10px; - z-index: 1298; -} -.mce-content-body div.mce-resizehandle:hover { - background-color: #4099ff; -} -.mce-content-body div.mce-resizehandle:nth-of-type(1) { - cursor: nwse-resize; -} -.mce-content-body div.mce-resizehandle:nth-of-type(2) { - cursor: nesw-resize; -} -.mce-content-body div.mce-resizehandle:nth-of-type(3) { - cursor: nwse-resize; -} -.mce-content-body div.mce-resizehandle:nth-of-type(4) { - cursor: nesw-resize; -} -.mce-content-body .mce-resize-backdrop { - z-index: 10000; -} -.mce-content-body .mce-clonedresizable { - cursor: default; - opacity: 0.5; - outline: 1px dashed #000; - position: absolute; - z-index: 10001; -} -.mce-content-body .mce-clonedresizable.mce-resizetable-columns td, -.mce-content-body .mce-clonedresizable.mce-resizetable-columns th { - border: 0; -} -.mce-content-body .mce-resize-helper { - background: #555; - background: rgba(0, 0, 0, 0.75); - border: 1px; - border-radius: 3px; - color: #fff; - display: none; - font-family: sans-serif; - font-size: 12px; - line-height: 14px; - margin: 5px 10px; - padding: 5px; - position: absolute; - white-space: nowrap; - z-index: 10002; -} -.tox-rtc-user-selection { - position: relative; -} -.tox-rtc-user-cursor { - bottom: 0; - cursor: default; - position: absolute; - top: 0; - width: 2px; -} -.tox-rtc-user-cursor::before { - background-color: inherit; - border-radius: 50%; - content: ""; - display: block; - height: 8px; - position: absolute; - right: -3px; - top: -3px; - width: 8px; -} -.tox-rtc-user-cursor:hover::after { - background-color: inherit; - border-radius: 100px; - box-sizing: border-box; - color: #fff; - content: attr(data-user); - display: block; - font-size: 12px; - font-weight: 700; - left: -5px; - min-height: 8px; - min-width: 8px; - padding: 0 12px; - position: absolute; - top: -11px; - white-space: nowrap; - z-index: 1000; -} -.tox-rtc-user-selection--1 .tox-rtc-user-cursor { - background-color: #2dc26b; -} -.tox-rtc-user-selection--2 .tox-rtc-user-cursor { - background-color: #e03e2d; -} -.tox-rtc-user-selection--3 .tox-rtc-user-cursor { - background-color: #f1c40f; -} -.tox-rtc-user-selection--4 .tox-rtc-user-cursor { - background-color: #3598db; -} -.tox-rtc-user-selection--5 .tox-rtc-user-cursor { - background-color: #b96ad9; -} -.tox-rtc-user-selection--6 .tox-rtc-user-cursor { - background-color: #e67e23; -} -.tox-rtc-user-selection--7 .tox-rtc-user-cursor { - background-color: #aaa69d; -} -.tox-rtc-user-selection--8 .tox-rtc-user-cursor { - background-color: #f368e0; -} -.tox-rtc-remote-image { - background: #eaeaea - url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") - no-repeat center center; - border: 1px solid #ccc; - min-height: 240px; - min-width: 320px; -} -.mce-match-marker { - background: #aaa; - color: #fff; -} -.mce-match-marker-selected { - background: #39f; - color: #fff; -} -.mce-match-marker-selected::-moz-selection { - background: #39f; - color: #fff; -} -.mce-match-marker-selected::selection { - background: #39f; - color: #fff; -} -.mce-content-body audio[data-mce-selected], -.mce-content-body details[data-mce-selected], -.mce-content-body embed[data-mce-selected], -.mce-content-body img[data-mce-selected], -.mce-content-body object[data-mce-selected], -.mce-content-body table[data-mce-selected], -.mce-content-body video[data-mce-selected] { - outline: 3px solid #b4d7ff; -} -.mce-content-body hr[data-mce-selected] { - outline: 3px solid #b4d7ff; - outline-offset: 1px; -} -.mce-content-body [contentEditable="false"] [contentEditable="true"]:focus { - outline: 3px solid #b4d7ff; -} -.mce-content-body [contentEditable="false"] [contentEditable="true"]:hover { - outline: 3px solid #b4d7ff; -} -.mce-content-body [contentEditable="false"][data-mce-selected] { - cursor: not-allowed; - outline: 3px solid #b4d7ff; -} -.mce-content-body.mce-content-readonly [contentEditable="true"]:focus, -.mce-content-body.mce-content-readonly [contentEditable="true"]:hover { - outline: 0; -} -.mce-content-body [data-mce-selected="inline-boundary"] { - background-color: #b4d7ff; -} -.mce-content-body .mce-edit-focus { - outline: 3px solid #b4d7ff; -} -.mce-content-body td[data-mce-selected], -.mce-content-body th[data-mce-selected] { - position: relative; -} -.mce-content-body td[data-mce-selected]::-moz-selection, -.mce-content-body th[data-mce-selected]::-moz-selection { - background: 0 0; -} -.mce-content-body td[data-mce-selected]::selection, -.mce-content-body th[data-mce-selected]::selection { - background: 0 0; -} -.mce-content-body td[data-mce-selected] *, -.mce-content-body th[data-mce-selected] * { - outline: 0; - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.mce-content-body td[data-mce-selected]::after, -.mce-content-body th[data-mce-selected]::after { - background-color: rgba(180, 215, 255, 0.7); - border: 1px solid rgba(180, 215, 255, 0.7); - bottom: -1px; - content: ""; - left: -1px; - mix-blend-mode: multiply; - position: absolute; - right: -1px; - top: -1px; -} -@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { - .mce-content-body td[data-mce-selected]::after, - .mce-content-body th[data-mce-selected]::after { - border-color: rgba(0, 84, 180, 0.7); - } -} -.mce-content-body img[data-mce-selected]::-moz-selection { - background: 0 0; -} -.mce-content-body img[data-mce-selected]::selection { - background: 0 0; -} -.ephox-snooker-resizer-bar { - background-color: #b4d7ff; - opacity: 0; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.ephox-snooker-resizer-cols { - cursor: col-resize; -} -.ephox-snooker-resizer-rows { - cursor: row-resize; -} -.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging { - opacity: 1; -} -.mce-spellchecker-word { - background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A"); - background-position: 0 calc(100% + 1px); - background-repeat: repeat-x; - background-size: auto 6px; - cursor: default; - height: 2rem; -} -.mce-spellchecker-grammar { - background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A"); - background-position: 0 calc(100% + 1px); - background-repeat: repeat-x; - background-size: auto 6px; - cursor: default; -} -.mce-toc { - border: 1px solid gray; -} -.mce-toc h2 { - margin: 4px; -} -.mce-toc ul > li { - list-style-type: none; -} -[data-mce-block] { - display: block; -} -.mce-item-table:not([border]), -.mce-item-table:not([border]) caption, -.mce-item-table:not([border]) td, -.mce-item-table:not([border]) th, -.mce-item-table[border="0"], -.mce-item-table[border="0"] caption, -.mce-item-table[border="0"] td, -.mce-item-table[border="0"] th, -table[style*="border-width: 0px"], -table[style*="border-width: 0px"] caption, -table[style*="border-width: 0px"] td, -table[style*="border-width: 0px"] th { - border: 1px dashed #bbb; -} -.mce-visualblocks address, -.mce-visualblocks article, -.mce-visualblocks aside, -.mce-visualblocks blockquote, -.mce-visualblocks div:not([data-mce-bogus]), -.mce-visualblocks dl, -.mce-visualblocks figcaption, -.mce-visualblocks figure, -.mce-visualblocks h1, -.mce-visualblocks h2, -.mce-visualblocks h3, -.mce-visualblocks h4, -.mce-visualblocks h5, -.mce-visualblocks h6, -.mce-visualblocks hgroup, -.mce-visualblocks ol, -.mce-visualblocks p, -.mce-visualblocks pre, -.mce-visualblocks section, -.mce-visualblocks ul { - background-repeat: no-repeat; - border: 1px dashed #bbb; - margin-left: 3px; - padding-top: 10px; -} -.mce-visualblocks p { - background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7); -} -.mce-visualblocks h1 { - background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==); -} -.mce-visualblocks h2 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==); -} -.mce-visualblocks h3 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7); -} -.mce-visualblocks h4 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==); -} -.mce-visualblocks h5 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==); -} -.mce-visualblocks h6 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==); -} -.mce-visualblocks div:not([data-mce-bogus]) { - background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7); -} -.mce-visualblocks section { - background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=); -} -.mce-visualblocks article { - background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7); -} -.mce-visualblocks blockquote { - background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7); -} -.mce-visualblocks address { - background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=); -} -.mce-visualblocks pre { - background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==); -} -.mce-visualblocks figure { - background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7); -} -.mce-visualblocks figcaption { - border: 1px dashed #bbb; -} -.mce-visualblocks hgroup { - background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7); -} -.mce-visualblocks aside { - background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=); -} -.mce-visualblocks ul { - background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==); -} -.mce-visualblocks ol { - background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==); -} -.mce-visualblocks dl { - background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==); -} -.mce-visualblocks:not([dir="rtl"]) address, -.mce-visualblocks:not([dir="rtl"]) article, -.mce-visualblocks:not([dir="rtl"]) aside, -.mce-visualblocks:not([dir="rtl"]) blockquote, -.mce-visualblocks:not([dir="rtl"]) div:not([data-mce-bogus]), -.mce-visualblocks:not([dir="rtl"]) dl, -.mce-visualblocks:not([dir="rtl"]) figcaption, -.mce-visualblocks:not([dir="rtl"]) figure, -.mce-visualblocks:not([dir="rtl"]) h1, -.mce-visualblocks:not([dir="rtl"]) h2, -.mce-visualblocks:not([dir="rtl"]) h3, -.mce-visualblocks:not([dir="rtl"]) h4, -.mce-visualblocks:not([dir="rtl"]) h5, -.mce-visualblocks:not([dir="rtl"]) h6, -.mce-visualblocks:not([dir="rtl"]) hgroup, -.mce-visualblocks:not([dir="rtl"]) ol, -.mce-visualblocks:not([dir="rtl"]) p, -.mce-visualblocks:not([dir="rtl"]) pre, -.mce-visualblocks:not([dir="rtl"]) section, -.mce-visualblocks:not([dir="rtl"]) ul { - margin-left: 3px; -} -.mce-visualblocks[dir="rtl"] address, -.mce-visualblocks[dir="rtl"] article, -.mce-visualblocks[dir="rtl"] aside, -.mce-visualblocks[dir="rtl"] blockquote, -.mce-visualblocks[dir="rtl"] div:not([data-mce-bogus]), -.mce-visualblocks[dir="rtl"] dl, -.mce-visualblocks[dir="rtl"] figcaption, -.mce-visualblocks[dir="rtl"] figure, -.mce-visualblocks[dir="rtl"] h1, -.mce-visualblocks[dir="rtl"] h2, -.mce-visualblocks[dir="rtl"] h3, -.mce-visualblocks[dir="rtl"] h4, -.mce-visualblocks[dir="rtl"] h5, -.mce-visualblocks[dir="rtl"] h6, -.mce-visualblocks[dir="rtl"] hgroup, -.mce-visualblocks[dir="rtl"] ol, -.mce-visualblocks[dir="rtl"] p, -.mce-visualblocks[dir="rtl"] pre, -.mce-visualblocks[dir="rtl"] section, -.mce-visualblocks[dir="rtl"] ul { - background-position-x: right; - margin-right: 3px; -} -.mce-nbsp, -.mce-shy { - background: #aaa; -} -.mce-shy::after { - content: "-"; -} diff --git a/src/lib/dist/tinymce/skins/ui/oxide/content.min.css b/src/lib/dist/tinymce/skins/ui/oxide/content.min.css deleted file mode 100644 index 858baf36..00000000 --- a/src/lib/dist/tinymce/skins/ui/oxide/content.min.css +++ /dev/null @@ -1,802 +0,0 @@ -.mce-content-body .mce-item-anchor { - background: transparent - url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") - no-repeat center; -} -.mce-content-body .mce-item-anchor:empty { - cursor: default; - display: inline-block; - height: 12px !important; - padding: 0 2px; - -webkit-user-modify: read-only; - -moz-user-modify: read-only; - -webkit-user-select: all; - -moz-user-select: all; - user-select: all; - width: 8px !important; -} -.mce-content-body .mce-item-anchor:not(:empty) { - background-position-x: 2px; - display: inline-block; - padding-left: 12px; -} -.mce-content-body .mce-item-anchor[data-mce-selected] { - outline-offset: 1px; -} -.tox-comments-visible - .tox-comment[contenteditable="false"]:not([data-mce-selected]), -.tox-comments-visible span.tox-comment img:not([data-mce-selected]), -.tox-comments-visible - span.tox-comment - span.mce-preview-object:not([data-mce-selected]), -.tox-comments-visible span.tox-comment > audio:not([data-mce-selected]), -.tox-comments-visible span.tox-comment > video:not([data-mce-selected]) { - outline: 3px solid #ffe89d; -} -.tox-comments-visible - .tox-comment[contenteditable="false"][data-mce-annotation-active="true"]:not( - [data-mce-selected] - ) { - outline: 3px solid #fed635; -} -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"] - img:not([data-mce-selected]), -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"] - span.mce-preview-object:not([data-mce-selected]), -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"] - > audio:not([data-mce-selected]), -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"] - > video:not([data-mce-selected]) { - outline: 3px solid #fed635; -} -.tox-comments-visible span.tox-comment:not([data-mce-selected]) { - background-color: #ffe89d; - outline: 0; -} -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"]:not( - [data-mce-selected="inline-boundary"] - ) { - background-color: #fed635; -} -.tox-checklist > li:not(.tox-checklist--hidden) { - list-style: none; - margin: 0.25em 0; -} -.tox-checklist > li:not(.tox-checklist--hidden)::before { - content: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A"); - cursor: pointer; - height: 1em; - margin-left: -1.5em; - margin-top: 0.125em; - position: absolute; - width: 1em; -} -.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before { - content: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A"); -} -[dir="rtl"] .tox-checklist > li:not(.tox-checklist--hidden)::before { - margin-left: 0; - margin-right: -1.5em; -} -code[class*="language-"], -pre[class*="language-"] { - color: #000; - background: 0 0; - text-shadow: 0 1px #fff; - font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace; - font-size: 1em; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: 1.5; - -moz-tab-size: 4; - tab-size: 4; - -webkit-hyphens: none; - hyphens: none; -} -code[class*="language-"] ::-moz-selection, -code[class*="language-"]::-moz-selection, -pre[class*="language-"] ::-moz-selection, -pre[class*="language-"]::-moz-selection { - text-shadow: none; - background: #b3d4fc; -} -code[class*="language-"] ::selection, -code[class*="language-"]::selection, -pre[class*="language-"] ::selection, -pre[class*="language-"]::selection { - text-shadow: none; - background: #b3d4fc; -} -@media print { - code[class*="language-"], - pre[class*="language-"] { - text-shadow: none; - } -} -pre[class*="language-"] { - padding: 1em; - margin: 0.5em 0; - overflow: auto; -} -:not(pre) > code[class*="language-"], -pre[class*="language-"] { - background: #f5f2f0; -} -:not(pre) > code[class*="language-"] { - padding: 0.1em; - border-radius: 0.3em; - white-space: normal; -} -.token.cdata, -.token.comment, -.token.doctype, -.token.prolog { - color: #708090; -} -.token.punctuation { - color: #999; -} -.token.namespace { - opacity: 0.7; -} -.token.boolean, -.token.constant, -.token.deleted, -.token.number, -.token.property, -.token.symbol, -.token.tag { - color: #905; -} -.token.attr-name, -.token.builtin, -.token.char, -.token.inserted, -.token.selector, -.token.string { - color: #690; -} -.language-css .token.string, -.style .token.string, -.token.entity, -.token.operator, -.token.url { - color: #9a6e3a; - background: hsla(0, 0%, 100%, 0.5); -} -.token.atrule, -.token.attr-value, -.token.keyword { - color: #07a; -} -.token.class-name, -.token.function { - color: #dd4a68; -} -.token.important, -.token.regex, -.token.variable { - color: #e90; -} -.token.bold, -.token.important { - font-weight: 700; -} -.token.italic { - font-style: italic; -} -.token.entity { - cursor: help; -} -.mce-content-body { - overflow-wrap: break-word; - word-wrap: break-word; -} -.mce-content-body .mce-visual-caret { - background-color: #000; - background-color: currentColor; - position: absolute; -} -.mce-content-body .mce-visual-caret-hidden { - display: none; -} -.mce-content-body [data-mce-caret] { - left: -1000px; - margin: 0; - padding: 0; - position: absolute; - right: auto; - top: 0; -} -.mce-content-body .mce-offscreen-selection { - left: -2000000px; - max-width: 1000000px; - position: absolute; -} -.mce-content-body [contentEditable="false"] { - cursor: default; -} -.mce-content-body [contentEditable="true"] { - cursor: text; -} -.tox-cursor-format-painter { - cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), - default; -} -div.mce-footnotes hr { - margin-inline-end: auto; - margin-inline-start: 0; - width: 25%; -} -div.mce-footnotes li > a.mce-footnotes-backlink { - text-decoration: none; -} -@media print { - sup.mce-footnote a { - color: #000; - text-decoration: none; - } - div.mce-footnotes { - break-inside: avoid; - width: 100%; - } - div.mce-footnotes li > a.mce-footnotes-backlink { - display: none; - } -} -.mce-content-body figure.align-left { - float: left; -} -.mce-content-body figure.align-right { - float: right; -} -.mce-content-body figure.image.align-center { - display: table; - margin-left: auto; - margin-right: auto; -} -.mce-preview-object { - border: 1px solid gray; - display: inline-block; - line-height: 0; - margin: 0 2px 0 2px; - position: relative; -} -.mce-preview-object .mce-shim { - background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} -.mce-preview-object[data-mce-selected="2"] .mce-shim { - display: none; -} -.mce-content-body .mce-mergetag { - cursor: default !important; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.mce-content-body .mce-mergetag:hover { - background-color: rgba(0, 108, 231, 0.1); -} -.mce-content-body .mce-mergetag-affix { - background-color: rgba(0, 108, 231, 0.1); - color: #006ce7; -} -.mce-object { - background: transparent - url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") - no-repeat center; - border: 1px dashed #aaa; -} -.mce-pagebreak { - border: 1px dashed #aaa; - cursor: default; - display: block; - height: 5px; - margin-top: 15px; - page-break-before: always; - width: 100%; -} -@media print { - .mce-pagebreak { - border: 0; - } -} -.tiny-pageembed .mce-shim { - background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} -.tiny-pageembed[data-mce-selected="2"] .mce-shim { - display: none; -} -.tiny-pageembed { - display: inline-block; - position: relative; -} -.tiny-pageembed--16by9, -.tiny-pageembed--1by1, -.tiny-pageembed--21by9, -.tiny-pageembed--4by3 { - display: block; - overflow: hidden; - padding: 0; - position: relative; - width: 100%; -} -.tiny-pageembed--21by9 { - padding-top: 42.857143%; -} -.tiny-pageembed--16by9 { - padding-top: 56.25%; -} -.tiny-pageembed--4by3 { - padding-top: 75%; -} -.tiny-pageembed--1by1 { - padding-top: 100%; -} -.tiny-pageembed--16by9 iframe, -.tiny-pageembed--1by1 iframe, -.tiny-pageembed--21by9 iframe, -.tiny-pageembed--4by3 iframe { - border: 0; - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} -.mce-content-body[data-mce-placeholder] { - position: relative; -} -.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before { - color: rgba(34, 47, 62, 0.7); - content: attr(data-mce-placeholder); - position: absolute; -} -.mce-content-body:not([dir="rtl"])[data-mce-placeholder]:not( - .mce-visualblocks - )::before { - left: 1px; -} -.mce-content-body[dir="rtl"][data-mce-placeholder]:not( - .mce-visualblocks - )::before { - right: 1px; -} -.mce-content-body div.mce-resizehandle { - background-color: #4099ff; - border-color: #4099ff; - border-style: solid; - border-width: 1px; - box-sizing: border-box; - height: 10px; - position: absolute; - width: 10px; - z-index: 1298; -} -.mce-content-body div.mce-resizehandle:hover { - background-color: #4099ff; -} -.mce-content-body div.mce-resizehandle:nth-of-type(1) { - cursor: nwse-resize; -} -.mce-content-body div.mce-resizehandle:nth-of-type(2) { - cursor: nesw-resize; -} -.mce-content-body div.mce-resizehandle:nth-of-type(3) { - cursor: nwse-resize; -} -.mce-content-body div.mce-resizehandle:nth-of-type(4) { - cursor: nesw-resize; -} -.mce-content-body .mce-resize-backdrop { - z-index: 10000; -} -.mce-content-body .mce-clonedresizable { - cursor: default; - opacity: 0.5; - outline: 1px dashed #000; - position: absolute; - z-index: 10001; -} -.mce-content-body .mce-clonedresizable.mce-resizetable-columns td, -.mce-content-body .mce-clonedresizable.mce-resizetable-columns th { - border: 0; -} -.mce-content-body .mce-resize-helper { - background: #555; - background: rgba(0, 0, 0, 0.75); - border: 1px; - border-radius: 3px; - color: #fff; - display: none; - font-family: sans-serif; - font-size: 12px; - line-height: 14px; - margin: 5px 10px; - padding: 5px; - position: absolute; - white-space: nowrap; - z-index: 10002; -} -.tox-rtc-user-selection { - position: relative; -} -.tox-rtc-user-cursor { - bottom: 0; - cursor: default; - position: absolute; - top: 0; - width: 2px; -} -.tox-rtc-user-cursor::before { - background-color: inherit; - border-radius: 50%; - content: ""; - display: block; - height: 8px; - position: absolute; - right: -3px; - top: -3px; - width: 8px; -} -.tox-rtc-user-cursor:hover::after { - background-color: inherit; - border-radius: 100px; - box-sizing: border-box; - color: #fff; - content: attr(data-user); - display: block; - font-size: 12px; - font-weight: 700; - left: -5px; - min-height: 8px; - min-width: 8px; - padding: 0 12px; - position: absolute; - top: -11px; - white-space: nowrap; - z-index: 1000; -} -.tox-rtc-user-selection--1 .tox-rtc-user-cursor { - background-color: #2dc26b; -} -.tox-rtc-user-selection--2 .tox-rtc-user-cursor { - background-color: #e03e2d; -} -.tox-rtc-user-selection--3 .tox-rtc-user-cursor { - background-color: #f1c40f; -} -.tox-rtc-user-selection--4 .tox-rtc-user-cursor { - background-color: #3598db; -} -.tox-rtc-user-selection--5 .tox-rtc-user-cursor { - background-color: #b96ad9; -} -.tox-rtc-user-selection--6 .tox-rtc-user-cursor { - background-color: #e67e23; -} -.tox-rtc-user-selection--7 .tox-rtc-user-cursor { - background-color: #aaa69d; -} -.tox-rtc-user-selection--8 .tox-rtc-user-cursor { - background-color: #f368e0; -} -.tox-rtc-remote-image { - background: #eaeaea - url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") - no-repeat center center; - border: 1px solid #ccc; - min-height: 240px; - min-width: 320px; -} -.mce-match-marker { - background: #aaa; - color: #fff; -} -.mce-match-marker-selected { - background: #39f; - color: #fff; -} -.mce-match-marker-selected::-moz-selection { - background: #39f; - color: #fff; -} -.mce-match-marker-selected::selection { - background: #39f; - color: #fff; -} -.mce-content-body audio[data-mce-selected], -.mce-content-body details[data-mce-selected], -.mce-content-body embed[data-mce-selected], -.mce-content-body img[data-mce-selected], -.mce-content-body object[data-mce-selected], -.mce-content-body table[data-mce-selected], -.mce-content-body video[data-mce-selected] { - outline: 3px solid #b4d7ff; -} -.mce-content-body hr[data-mce-selected] { - outline: 3px solid #b4d7ff; - outline-offset: 1px; -} -.mce-content-body [contentEditable="false"] [contentEditable="true"]:focus { - outline: 3px solid #b4d7ff; -} -.mce-content-body [contentEditable="false"] [contentEditable="true"]:hover { - outline: 3px solid #b4d7ff; -} -.mce-content-body [contentEditable="false"][data-mce-selected] { - cursor: not-allowed; - outline: 3px solid #b4d7ff; -} -.mce-content-body.mce-content-readonly [contentEditable="true"]:focus, -.mce-content-body.mce-content-readonly [contentEditable="true"]:hover { - outline: 0; -} -.mce-content-body [data-mce-selected="inline-boundary"] { - background-color: #b4d7ff; -} -.mce-content-body .mce-edit-focus { - outline: 3px solid #b4d7ff; -} -.mce-content-body td[data-mce-selected], -.mce-content-body th[data-mce-selected] { - position: relative; -} -.mce-content-body td[data-mce-selected]::-moz-selection, -.mce-content-body th[data-mce-selected]::-moz-selection { - background: 0 0; -} -.mce-content-body td[data-mce-selected]::selection, -.mce-content-body th[data-mce-selected]::selection { - background: 0 0; -} -.mce-content-body td[data-mce-selected] *, -.mce-content-body th[data-mce-selected] * { - outline: 0; - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.mce-content-body td[data-mce-selected]::after, -.mce-content-body th[data-mce-selected]::after { - background-color: rgba(180, 215, 255, 0.7); - border: 1px solid rgba(180, 215, 255, 0.7); - bottom: -1px; - content: ""; - left: -1px; - mix-blend-mode: multiply; - position: absolute; - right: -1px; - top: -1px; -} -@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { - .mce-content-body td[data-mce-selected]::after, - .mce-content-body th[data-mce-selected]::after { - border-color: rgba(0, 84, 180, 0.7); - } -} -.mce-content-body img[data-mce-selected]::-moz-selection { - background: 0 0; -} -.mce-content-body img[data-mce-selected]::selection { - background: 0 0; -} -.ephox-snooker-resizer-bar { - background-color: #b4d7ff; - opacity: 0; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.ephox-snooker-resizer-cols { - cursor: col-resize; -} -.ephox-snooker-resizer-rows { - cursor: row-resize; -} -.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging { - opacity: 1; -} -.mce-spellchecker-word { - background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A"); - background-position: 0 calc(100% + 1px); - background-repeat: repeat-x; - background-size: auto 6px; - cursor: default; - height: 2rem; -} -.mce-spellchecker-grammar { - background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A"); - background-position: 0 calc(100% + 1px); - background-repeat: repeat-x; - background-size: auto 6px; - cursor: default; -} -.mce-toc { - border: 1px solid gray; -} -.mce-toc h2 { - margin: 4px; -} -.mce-toc ul > li { - list-style-type: none; -} -[data-mce-block] { - display: block; -} -.mce-item-table:not([border]), -.mce-item-table:not([border]) caption, -.mce-item-table:not([border]) td, -.mce-item-table:not([border]) th, -.mce-item-table[border="0"], -.mce-item-table[border="0"] caption, -.mce-item-table[border="0"] td, -.mce-item-table[border="0"] th, -table[style*="border-width: 0px"], -table[style*="border-width: 0px"] caption, -table[style*="border-width: 0px"] td, -table[style*="border-width: 0px"] th { - border: 1px dashed #bbb; -} -.mce-visualblocks address, -.mce-visualblocks article, -.mce-visualblocks aside, -.mce-visualblocks blockquote, -.mce-visualblocks div:not([data-mce-bogus]), -.mce-visualblocks dl, -.mce-visualblocks figcaption, -.mce-visualblocks figure, -.mce-visualblocks h1, -.mce-visualblocks h2, -.mce-visualblocks h3, -.mce-visualblocks h4, -.mce-visualblocks h5, -.mce-visualblocks h6, -.mce-visualblocks hgroup, -.mce-visualblocks ol, -.mce-visualblocks p, -.mce-visualblocks pre, -.mce-visualblocks section, -.mce-visualblocks ul { - background-repeat: no-repeat; - border: 1px dashed #bbb; - margin-left: 3px; - padding-top: 10px; -} -.mce-visualblocks p { - background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7); -} -.mce-visualblocks h1 { - background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==); -} -.mce-visualblocks h2 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==); -} -.mce-visualblocks h3 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7); -} -.mce-visualblocks h4 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==); -} -.mce-visualblocks h5 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==); -} -.mce-visualblocks h6 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==); -} -.mce-visualblocks div:not([data-mce-bogus]) { - background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7); -} -.mce-visualblocks section { - background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=); -} -.mce-visualblocks article { - background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7); -} -.mce-visualblocks blockquote { - background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7); -} -.mce-visualblocks address { - background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=); -} -.mce-visualblocks pre { - background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==); -} -.mce-visualblocks figure { - background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7); -} -.mce-visualblocks figcaption { - border: 1px dashed #bbb; -} -.mce-visualblocks hgroup { - background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7); -} -.mce-visualblocks aside { - background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=); -} -.mce-visualblocks ul { - background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==); -} -.mce-visualblocks ol { - background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==); -} -.mce-visualblocks dl { - background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==); -} -.mce-visualblocks:not([dir="rtl"]) address, -.mce-visualblocks:not([dir="rtl"]) article, -.mce-visualblocks:not([dir="rtl"]) aside, -.mce-visualblocks:not([dir="rtl"]) blockquote, -.mce-visualblocks:not([dir="rtl"]) div:not([data-mce-bogus]), -.mce-visualblocks:not([dir="rtl"]) dl, -.mce-visualblocks:not([dir="rtl"]) figcaption, -.mce-visualblocks:not([dir="rtl"]) figure, -.mce-visualblocks:not([dir="rtl"]) h1, -.mce-visualblocks:not([dir="rtl"]) h2, -.mce-visualblocks:not([dir="rtl"]) h3, -.mce-visualblocks:not([dir="rtl"]) h4, -.mce-visualblocks:not([dir="rtl"]) h5, -.mce-visualblocks:not([dir="rtl"]) h6, -.mce-visualblocks:not([dir="rtl"]) hgroup, -.mce-visualblocks:not([dir="rtl"]) ol, -.mce-visualblocks:not([dir="rtl"]) p, -.mce-visualblocks:not([dir="rtl"]) pre, -.mce-visualblocks:not([dir="rtl"]) section, -.mce-visualblocks:not([dir="rtl"]) ul { - margin-left: 3px; -} -.mce-visualblocks[dir="rtl"] address, -.mce-visualblocks[dir="rtl"] article, -.mce-visualblocks[dir="rtl"] aside, -.mce-visualblocks[dir="rtl"] blockquote, -.mce-visualblocks[dir="rtl"] div:not([data-mce-bogus]), -.mce-visualblocks[dir="rtl"] dl, -.mce-visualblocks[dir="rtl"] figcaption, -.mce-visualblocks[dir="rtl"] figure, -.mce-visualblocks[dir="rtl"] h1, -.mce-visualblocks[dir="rtl"] h2, -.mce-visualblocks[dir="rtl"] h3, -.mce-visualblocks[dir="rtl"] h4, -.mce-visualblocks[dir="rtl"] h5, -.mce-visualblocks[dir="rtl"] h6, -.mce-visualblocks[dir="rtl"] hgroup, -.mce-visualblocks[dir="rtl"] ol, -.mce-visualblocks[dir="rtl"] p, -.mce-visualblocks[dir="rtl"] pre, -.mce-visualblocks[dir="rtl"] section, -.mce-visualblocks[dir="rtl"] ul { - background-position-x: right; - margin-right: 3px; -} -.mce-nbsp, -.mce-shy { - background: #aaa; -} -.mce-shy::after { - content: "-"; -} -body { - font-family: sans-serif; -} -table { - border-collapse: collapse; -} diff --git a/src/lib/dist/tinymce/skins/ui/oxide/skin.min.css b/src/lib/dist/tinymce/skins/ui/oxide/skin.min.css deleted file mode 100644 index dcac63c1..00000000 --- a/src/lib/dist/tinymce/skins/ui/oxide/skin.min.css +++ /dev/null @@ -1,4030 +0,0 @@ -.tox { - box-shadow: none; - box-sizing: content-box; - color: #222f3e; - cursor: auto; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - font-size: 16px; - font-style: normal; - font-weight: 400; - line-height: normal; - -webkit-tap-highlight-color: transparent; - text-decoration: none; - text-shadow: none; - text-transform: none; - vertical-align: initial; - white-space: normal; -} -.tox :not(svg):not(rect) { - box-sizing: inherit; - color: inherit; - cursor: inherit; - direction: inherit; - font-family: inherit; - font-size: inherit; - font-style: inherit; - font-weight: inherit; - line-height: inherit; - -webkit-tap-highlight-color: inherit; - text-align: inherit; - text-decoration: inherit; - text-shadow: inherit; - text-transform: inherit; - vertical-align: inherit; - white-space: inherit; -} -.tox :not(svg):not(rect) { - background: 0 0; - border: 0; - box-shadow: none; - float: none; - height: auto; - margin: 0; - max-width: none; - outline: 0; - padding: 0; - position: static; - width: auto; -} -.tox:not([dir="rtl"]) { - direction: ltr; - text-align: left; -} -.tox[dir="rtl"] { - direction: rtl; - text-align: right; -} -.tox-tinymce { - border: 2px solid #eee; - border-radius: 10px; - box-shadow: none; - box-sizing: border-box; - display: flex; - flex-direction: column; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - overflow: hidden; - position: relative; - visibility: inherit !important; -} -.tox.tox-tinymce-inline { - border: none; - box-shadow: none; - overflow: initial; -} -.tox.tox-tinymce-inline .tox-editor-container { - overflow: initial; -} -.tox.tox-tinymce-inline .tox-editor-header { - background-color: #fff; - border: 2px solid #eee; - border-radius: 10px; - box-shadow: none; - overflow: hidden; -} -.tox-tinymce-aux { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - z-index: 1300; -} -.tox-tinymce :focus, -.tox-tinymce-aux :focus { - outline: 0; -} -button::-moz-focus-inner { - border: 0; -} -.tox[dir="rtl"] .tox-icon--flip svg { - transform: rotateY(180deg); -} -.tox .accessibility-issue__header { - align-items: center; - display: flex; - margin-bottom: 4px; -} -.tox .accessibility-issue__description { - align-items: stretch; - border-radius: 6px; - display: flex; - justify-content: space-between; -} -.tox .accessibility-issue__description > div { - padding-bottom: 4px; -} -.tox .accessibility-issue__description > div > div { - align-items: center; - display: flex; - margin-bottom: 4px; -} -.tox .accessibility-issue__description > div > div .tox-icon svg { - display: block; -} -.tox .accessibility-issue__repair { - margin-top: 16px; -} -.tox - .tox-dialog__body-content - .accessibility-issue--info - .accessibility-issue__description { - background-color: rgba(0, 101, 216, 0.1); - color: #222f3e; -} -.tox .tox-dialog__body-content .accessibility-issue--info .tox-form__group h2 { - color: #006ce7; -} -.tox .tox-dialog__body-content .accessibility-issue--info .tox-icon svg { - fill: #006ce7; -} -.tox - .tox-dialog__body-content - .accessibility-issue--info - a.tox-button--naked.tox-button--icon { - background-color: #006ce7; - color: #fff; -} -.tox - .tox-dialog__body-content - .accessibility-issue--info - a.tox-button--naked.tox-button--icon:focus, -.tox - .tox-dialog__body-content - .accessibility-issue--info - a.tox-button--naked.tox-button--icon:hover { - background-color: #0060ce; -} -.tox - .tox-dialog__body-content - .accessibility-issue--info - a.tox-button--naked.tox-button--icon:active { - background-color: #0054b4; -} -.tox - .tox-dialog__body-content - .accessibility-issue--warn - .accessibility-issue__description { - background-color: rgba(255, 165, 0, 0.08); - color: #222f3e; -} -.tox .tox-dialog__body-content .accessibility-issue--warn .tox-form__group h2 { - color: #8f5d00; -} -.tox .tox-dialog__body-content .accessibility-issue--warn .tox-icon svg { - fill: #8f5d00; -} -.tox - .tox-dialog__body-content - .accessibility-issue--warn - a.tox-button--naked.tox-button--icon { - background-color: #ffe89d; - color: #222f3e; -} -.tox - .tox-dialog__body-content - .accessibility-issue--warn - a.tox-button--naked.tox-button--icon:focus, -.tox - .tox-dialog__body-content - .accessibility-issue--warn - a.tox-button--naked.tox-button--icon:hover { - background-color: #f2d574; - color: #222f3e; -} -.tox - .tox-dialog__body-content - .accessibility-issue--warn - a.tox-button--naked.tox-button--icon:active { - background-color: #e8c657; - color: #222f3e; -} -.tox - .tox-dialog__body-content - .accessibility-issue--error - .accessibility-issue__description { - background-color: rgba(204, 0, 0, 0.1); - color: #222f3e; -} -.tox .tox-dialog__body-content .accessibility-issue--error .tox-form__group h2 { - color: #c00; -} -.tox .tox-dialog__body-content .accessibility-issue--error .tox-icon svg { - fill: #c00; -} -.tox - .tox-dialog__body-content - .accessibility-issue--error - a.tox-button--naked.tox-button--icon { - background-color: #f2bfbf; - color: #222f3e; -} -.tox - .tox-dialog__body-content - .accessibility-issue--error - a.tox-button--naked.tox-button--icon:focus, -.tox - .tox-dialog__body-content - .accessibility-issue--error - a.tox-button--naked.tox-button--icon:hover { - background-color: #e9a4a4; - color: #222f3e; -} -.tox - .tox-dialog__body-content - .accessibility-issue--error - a.tox-button--naked.tox-button--icon:active { - background-color: #ee9494; - color: #222f3e; -} -.tox - .tox-dialog__body-content - .accessibility-issue--success - .accessibility-issue__description { - background-color: rgba(120, 171, 70, 0.1); - color: #222f3e; -} -.tox - .tox-dialog__body-content - .accessibility-issue--success - .accessibility-issue__description - > :last-child { - display: none; -} -.tox - .tox-dialog__body-content - .accessibility-issue--success - .tox-form__group - h2 { - color: #527530; -} -.tox .tox-dialog__body-content .accessibility-issue--success .tox-icon svg { - fill: #527530; -} -.tox .tox-dialog__body-content .accessibility-issue__header .tox-form__group h1, -.tox - .tox-dialog__body-content - .tox-form__group - .accessibility-issue__description - h2 { - font-size: 14px; - margin-top: 0; -} -.tox:not([dir="rtl"]) - .tox-dialog__body-content - .accessibility-issue__header - .tox-button { - margin-left: 4px; -} -.tox:not([dir="rtl"]) - .tox-dialog__body-content - .accessibility-issue__header - > :nth-last-child(2) { - margin-left: auto; -} -.tox:not([dir="rtl"]) - .tox-dialog__body-content - .accessibility-issue__description { - padding: 4px 4px 4px 8px; -} -.tox[dir="rtl"] - .tox-dialog__body-content - .accessibility-issue__header - .tox-button { - margin-right: 4px; -} -.tox[dir="rtl"] - .tox-dialog__body-content - .accessibility-issue__header - > :nth-last-child(2) { - margin-right: auto; -} -.tox[dir="rtl"] .tox-dialog__body-content .accessibility-issue__description { - padding: 4px 8px 4px 4px; -} -.tox .tox-advtemplate .tox-form__grid { - flex: 1; -} -.tox .tox-advtemplate .tox-form__grid > div:first-child { - display: flex; - flex-direction: column; - width: 30%; -} -.tox .tox-advtemplate .tox-form__grid > div:first-child > div:nth-child(2) { - flex-basis: 0; - flex-grow: 1; - overflow: auto; -} -@media only screen and (max-width: 767px) { - body:not(.tox-force-desktop) - .tox - .tox-advtemplate - .tox-form__grid - > div:first-child { - width: 100%; - } -} -.tox .tox-advtemplate iframe { - border-color: #eee; - border-radius: 10px; - border-style: solid; - border-width: 1px; - margin: 0 10px; -} -.tox .tox-anchorbar { - display: flex; - flex: 0 0 auto; -} -.tox .tox-bottom-anchorbar { - display: flex; - flex: 0 0 auto; -} -.tox .tox-bar { - display: flex; - flex: 0 0 auto; -} -.tox .tox-button { - background-color: #006ce7; - background-image: none; - background-position: 0 0; - background-repeat: repeat; - border-color: #006ce7; - border-radius: 6px; - border-style: solid; - border-width: 1px; - box-shadow: none; - box-sizing: border-box; - color: #fff; - cursor: pointer; - display: inline-block; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - font-size: 14px; - font-style: normal; - font-weight: 700; - letter-spacing: normal; - line-height: 24px; - margin: 0; - outline: 0; - padding: 4px 16px; - position: relative; - text-align: center; - text-decoration: none; - text-transform: none; - white-space: nowrap; -} -.tox .tox-button::before { - border-radius: 6px; - bottom: -1px; - box-shadow: - inset 0 0 0 2px #fff, - 0 0 0 1px #006ce7, - 0 0 0 3px rgba(0, 108, 231, 0.25); - content: ""; - left: -1px; - opacity: 0; - pointer-events: none; - position: absolute; - right: -1px; - top: -1px; -} -.tox .tox-button[disabled] { - background-color: #006ce7; - background-image: none; - border-color: #006ce7; - box-shadow: none; - color: rgba(255, 255, 255, 0.5); - cursor: not-allowed; -} -.tox .tox-button:focus:not(:disabled) { - background-color: #0060ce; - background-image: none; - border-color: #0060ce; - box-shadow: none; - color: #fff; -} -.tox .tox-button:focus-visible:not(:disabled)::before { - opacity: 1; -} -.tox .tox-button:hover:not(:disabled) { - background-color: #0060ce; - background-image: none; - border-color: #0060ce; - box-shadow: none; - color: #fff; -} -.tox .tox-button:active:not(:disabled) { - background-color: #0054b4; - background-image: none; - border-color: #0054b4; - box-shadow: none; - color: #fff; -} -.tox .tox-button.tox-button--enabled { - background-color: #0054b4; - background-image: none; - border-color: #0054b4; - box-shadow: none; - color: #fff; -} -.tox .tox-button.tox-button--enabled[disabled] { - background-color: #0054b4; - background-image: none; - border-color: #0054b4; - box-shadow: none; - color: rgba(255, 255, 255, 0.5); - cursor: not-allowed; -} -.tox .tox-button.tox-button--enabled:focus:not(:disabled) { - background-color: #00489b; - background-image: none; - border-color: #00489b; - box-shadow: none; - color: #fff; -} -.tox .tox-button.tox-button--enabled:hover:not(:disabled) { - background-color: #00489b; - background-image: none; - border-color: #00489b; - box-shadow: none; - color: #fff; -} -.tox .tox-button.tox-button--enabled:active:not(:disabled) { - background-color: #003c81; - background-image: none; - border-color: #003c81; - box-shadow: none; - color: #fff; -} -.tox .tox-button--icon-and-text, -.tox .tox-button.tox-button--icon-and-text, -.tox .tox-button.tox-button--secondary.tox-button--icon-and-text { - display: flex; - padding: 5px 4px; -} -.tox .tox-button--icon-and-text .tox-icon svg, -.tox .tox-button.tox-button--icon-and-text .tox-icon svg, -.tox .tox-button.tox-button--secondary.tox-button--icon-and-text .tox-icon svg { - display: block; - fill: currentColor; -} -.tox .tox-button--secondary { - background-color: #f0f0f0; - background-image: none; - background-position: 0 0; - background-repeat: repeat; - border-color: #f0f0f0; - border-radius: 6px; - border-style: solid; - border-width: 1px; - box-shadow: none; - color: #222f3e; - font-size: 14px; - font-style: normal; - font-weight: 700; - letter-spacing: normal; - outline: 0; - padding: 4px 16px; - text-decoration: none; - text-transform: none; -} -.tox .tox-button--secondary[disabled] { - background-color: #f0f0f0; - background-image: none; - border-color: #f0f0f0; - box-shadow: none; - color: rgba(34, 47, 62, 0.5); -} -.tox .tox-button--secondary:focus:not(:disabled) { - background-color: #e3e3e3; - background-image: none; - border-color: #e3e3e3; - box-shadow: none; - color: #222f3e; -} -.tox .tox-button--secondary:hover:not(:disabled) { - background-color: #e3e3e3; - background-image: none; - border-color: #e3e3e3; - box-shadow: none; - color: #222f3e; -} -.tox .tox-button--secondary:active:not(:disabled) { - background-color: #d6d6d6; - background-image: none; - border-color: #d6d6d6; - box-shadow: none; - color: #222f3e; -} -.tox .tox-button--secondary.tox-button--enabled { - background-color: #a8c8ed; - background-image: none; - border-color: #a8c8ed; - box-shadow: none; - color: #222f3e; -} -.tox .tox-button--secondary.tox-button--enabled[disabled] { - background-color: #a8c8ed; - background-image: none; - border-color: #a8c8ed; - box-shadow: none; - color: rgba(34, 47, 62, 0.5); -} -.tox .tox-button--secondary.tox-button--enabled:focus:not(:disabled) { - background-color: #93bbe9; - background-image: none; - border-color: #93bbe9; - box-shadow: none; - color: #222f3e; -} -.tox .tox-button--secondary.tox-button--enabled:hover:not(:disabled) { - background-color: #93bbe9; - background-image: none; - border-color: #93bbe9; - box-shadow: none; - color: #222f3e; -} -.tox .tox-button--secondary.tox-button--enabled:active:not(:disabled) { - background-color: #7daee4; - background-image: none; - border-color: #7daee4; - box-shadow: none; - color: #222f3e; -} -.tox .tox-button--icon, -.tox .tox-button.tox-button--icon, -.tox .tox-button.tox-button--secondary.tox-button--icon { - padding: 4px; -} -.tox .tox-button--icon .tox-icon svg, -.tox .tox-button.tox-button--icon .tox-icon svg, -.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg { - display: block; - fill: currentColor; -} -.tox .tox-button-link { - background: 0; - border: none; - box-sizing: border-box; - cursor: pointer; - display: inline-block; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - font-size: 16px; - font-weight: 400; - line-height: 1.3; - margin: 0; - padding: 0; - white-space: nowrap; -} -.tox .tox-button-link--sm { - font-size: 14px; -} -.tox .tox-button--naked { - background-color: transparent; - border-color: transparent; - box-shadow: unset; - color: #222f3e; -} -.tox .tox-button--naked[disabled] { - background-color: rgba(34, 47, 62, 0.12); - border-color: transparent; - box-shadow: unset; - color: rgba(34, 47, 62, 0.5); -} -.tox .tox-button--naked:hover:not(:disabled) { - background-color: rgba(34, 47, 62, 0.12); - border-color: transparent; - box-shadow: unset; - color: #222f3e; -} -.tox .tox-button--naked:focus:not(:disabled) { - background-color: rgba(34, 47, 62, 0.12); - border-color: transparent; - box-shadow: unset; - color: #222f3e; -} -.tox .tox-button--naked:active:not(:disabled) { - background-color: rgba(34, 47, 62, 0.18); - border-color: transparent; - box-shadow: unset; - color: #222f3e; -} -.tox .tox-button--naked .tox-icon svg { - fill: currentColor; -} -.tox .tox-button--naked.tox-button--icon:hover:not(:disabled) { - color: #222f3e; -} -.tox .tox-checkbox { - align-items: center; - border-radius: 6px; - cursor: pointer; - display: flex; - height: 36px; - min-width: 36px; -} -.tox .tox-checkbox__input { - height: 1px; - overflow: hidden; - position: absolute; - top: auto; - width: 1px; -} -.tox .tox-checkbox__icons { - align-items: center; - border-radius: 6px; - box-shadow: 0 0 0 2px transparent; - box-sizing: content-box; - display: flex; - height: 24px; - justify-content: center; - padding: calc(4px - 1px); - width: 24px; -} -.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg { - display: block; - fill: rgba(34, 47, 62, 0.3); -} -.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg { - display: none; - fill: #006ce7; -} -.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg { - display: none; - fill: #006ce7; -} -.tox .tox-checkbox--disabled { - color: rgba(34, 47, 62, 0.5); - cursor: not-allowed; -} -.tox - .tox-checkbox--disabled - .tox-checkbox__icons - .tox-checkbox-icon__checked - svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox - .tox-checkbox--disabled - .tox-checkbox__icons - .tox-checkbox-icon__unchecked - svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox - .tox-checkbox--disabled - .tox-checkbox__icons - .tox-checkbox-icon__indeterminate - svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox - input.tox-checkbox__input:checked - + .tox-checkbox__icons - .tox-checkbox-icon__unchecked - svg { - display: none; -} -.tox - input.tox-checkbox__input:checked - + .tox-checkbox__icons - .tox-checkbox-icon__checked - svg { - display: block; -} -.tox - input.tox-checkbox__input:indeterminate - + .tox-checkbox__icons - .tox-checkbox-icon__unchecked - svg { - display: none; -} -.tox - input.tox-checkbox__input:indeterminate - + .tox-checkbox__icons - .tox-checkbox-icon__indeterminate - svg { - display: block; -} -.tox input.tox-checkbox__input:focus + .tox-checkbox__icons { - border-radius: 6px; - box-shadow: inset 0 0 0 1px #006ce7; - padding: calc(4px - 1px); -} -.tox:not([dir="rtl"]) .tox-checkbox__label { - margin-left: 4px; -} -.tox:not([dir="rtl"]) .tox-checkbox__input { - left: -10000px; -} -.tox:not([dir="rtl"]) .tox-bar .tox-checkbox { - margin-left: 4px; -} -.tox[dir="rtl"] .tox-checkbox__label { - margin-right: 4px; -} -.tox[dir="rtl"] .tox-checkbox__input { - right: -10000px; -} -.tox[dir="rtl"] .tox-bar .tox-checkbox { - margin-right: 4px; -} -.tox .tox-collection--toolbar .tox-collection__group { - display: flex; - padding: 0; -} -.tox .tox-collection--grid .tox-collection__group { - display: flex; - flex-wrap: wrap; - max-height: 208px; - overflow-x: hidden; - overflow-y: auto; - padding: 0; -} -.tox .tox-collection--list .tox-collection__group { - border-bottom-width: 0; - border-color: #e3e3e3; - border-left-width: 0; - border-right-width: 0; - border-style: solid; - border-top-width: 1px; - padding: 4px 0; -} -.tox .tox-collection--list .tox-collection__group:first-child { - border-top-width: 0; -} -.tox .tox-collection__group-heading { - background-color: #fcfcfc; - color: rgba(34, 47, 62, 0.7); - cursor: default; - font-size: 12px; - font-style: normal; - font-weight: 400; - margin-bottom: 4px; - margin-top: -4px; - padding: 4px 8px; - text-transform: none; - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.tox .tox-collection__item { - align-items: center; - border-radius: 3px; - color: #222f3e; - display: flex; - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.tox .tox-collection--list .tox-collection__item { - padding: 4px 8px; -} -.tox .tox-collection--toolbar .tox-collection__item { - border-radius: 3px; - padding: 4px; -} -.tox .tox-collection--grid .tox-collection__item { - border-radius: 3px; - padding: 4px; -} -.tox .tox-collection--list .tox-collection__item--enabled { - background-color: #fff; - color: #222f3e; -} -.tox .tox-collection--list .tox-collection__item--active { - background-color: #cce2fa; -} -.tox .tox-collection--toolbar .tox-collection__item--enabled { - background-color: #a6ccf7; - color: #222f3e; -} -.tox .tox-collection--toolbar .tox-collection__item--active { - background-color: #cce2fa; -} -.tox .tox-collection--grid .tox-collection__item--enabled { - background-color: #a6ccf7; - color: #222f3e; -} -.tox - .tox-collection--grid - .tox-collection__item--active:not(.tox-collection__item--state-disabled) { - background-color: #cce2fa; - color: #222f3e; -} -.tox - .tox-collection--list - .tox-collection__item--active:not(.tox-collection__item--state-disabled) { - color: #222f3e; -} -.tox - .tox-collection--toolbar - .tox-collection__item--active:not(.tox-collection__item--state-disabled) { - color: #222f3e; -} -.tox .tox-collection__item-checkmark, -.tox .tox-collection__item-icon { - align-items: center; - display: flex; - height: 24px; - justify-content: center; - width: 24px; -} -.tox .tox-collection__item-checkmark svg, -.tox .tox-collection__item-icon svg { - fill: currentColor; -} -.tox .tox-collection--toolbar-lg .tox-collection__item-icon { - height: 48px; - width: 48px; -} -.tox .tox-collection__item-label { - color: currentColor; - display: inline-block; - flex: 1; - font-size: 14px; - font-style: normal; - font-weight: 400; - line-height: 24px; - max-width: 100%; - text-transform: none; - word-break: break-all; -} -.tox .tox-collection__item-accessory { - color: rgba(34, 47, 62, 0.7); - display: inline-block; - font-size: 14px; - height: 24px; - line-height: 24px; - text-transform: none; -} -.tox .tox-collection__item-caret { - align-items: center; - display: flex; - min-height: 24px; -} -.tox .tox-collection__item-caret::after { - content: ""; - font-size: 0; - min-height: inherit; -} -.tox .tox-collection__item-caret svg { - fill: #222f3e; -} -.tox .tox-collection__item--state-disabled { - background-color: transparent; - color: rgba(34, 47, 62, 0.5); - cursor: not-allowed; -} -.tox .tox-collection__item--state-disabled .tox-collection__item-caret svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox - .tox-collection--list - .tox-collection__item:not(.tox-collection__item--enabled) - .tox-collection__item-checkmark - svg { - display: none; -} -.tox - .tox-collection--list - .tox-collection__item:not(.tox-collection__item--enabled) - .tox-collection__item-accessory - + .tox-collection__item-checkmark { - display: none; -} -.tox .tox-collection--horizontal { - background-color: #fff; - border: 1px solid #e3e3e3; - border-radius: 6px; - box-shadow: - 0 0 2px 0 rgba(34, 47, 62, 0.2), - 0 4px 8px 0 rgba(34, 47, 62, 0.15); - display: flex; - flex: 0 0 auto; - flex-shrink: 0; - flex-wrap: nowrap; - margin-bottom: 0; - overflow-x: auto; - padding: 0; -} -.tox .tox-collection--horizontal .tox-collection__group { - align-items: center; - display: flex; - flex-wrap: nowrap; - margin: 0; - padding: 0 4px; -} -.tox .tox-collection--horizontal .tox-collection__item { - height: 28px; - margin: 6px 1px 5px 0; - padding: 0 4px; -} -.tox .tox-collection--horizontal .tox-collection__item-label { - white-space: nowrap; -} -.tox .tox-collection--horizontal .tox-collection__item-caret { - margin-left: 4px; -} -.tox .tox-collection__item-container { - display: flex; -} -.tox .tox-collection__item-container--row { - align-items: center; - flex: 1 1 auto; - flex-direction: row; -} -.tox - .tox-collection__item-container--row.tox-collection__item-container--align-left { - margin-right: auto; -} -.tox - .tox-collection__item-container--row.tox-collection__item-container--align-right { - justify-content: flex-end; - margin-left: auto; -} -.tox - .tox-collection__item-container--row.tox-collection__item-container--valign-top { - align-items: flex-start; - margin-bottom: auto; -} -.tox - .tox-collection__item-container--row.tox-collection__item-container--valign-middle { - align-items: center; -} -.tox - .tox-collection__item-container--row.tox-collection__item-container--valign-bottom { - align-items: flex-end; - margin-top: auto; -} -.tox .tox-collection__item-container--column { - align-self: center; - flex: 1 1 auto; - flex-direction: column; -} -.tox - .tox-collection__item-container--column.tox-collection__item-container--align-left { - align-items: flex-start; -} -.tox - .tox-collection__item-container--column.tox-collection__item-container--align-right { - align-items: flex-end; -} -.tox - .tox-collection__item-container--column.tox-collection__item-container--valign-top { - align-self: flex-start; -} -.tox - .tox-collection__item-container--column.tox-collection__item-container--valign-middle { - align-self: center; -} -.tox - .tox-collection__item-container--column.tox-collection__item-container--valign-bottom { - align-self: flex-end; -} -.tox:not([dir="rtl"]) - .tox-collection--horizontal - .tox-collection__group:not(:last-of-type) { - border-right: 1px solid transparent; -} -.tox:not([dir="rtl"]) - .tox-collection--list - .tox-collection__item - > :not(:first-child) { - margin-left: 8px; -} -.tox:not([dir="rtl"]) - .tox-collection--list - .tox-collection__item - > .tox-collection__item-label:first-child { - margin-left: 4px; -} -.tox:not([dir="rtl"]) .tox-collection__item-accessory { - margin-left: 16px; - text-align: right; -} -.tox:not([dir="rtl"]) .tox-collection .tox-collection__item-caret { - margin-left: 16px; -} -.tox[dir="rtl"] - .tox-collection--horizontal - .tox-collection__group:not(:last-of-type) { - border-left: 1px solid transparent; -} -.tox[dir="rtl"] - .tox-collection--list - .tox-collection__item - > :not(:first-child) { - margin-right: 8px; -} -.tox[dir="rtl"] - .tox-collection--list - .tox-collection__item - > .tox-collection__item-label:first-child { - margin-right: 4px; -} -.tox[dir="rtl"] .tox-collection__item-accessory { - margin-right: 16px; - text-align: left; -} -.tox[dir="rtl"] .tox-collection .tox-collection__item-caret { - margin-right: 16px; - transform: rotateY(180deg); -} -.tox[dir="rtl"] .tox-collection--horizontal .tox-collection__item-caret { - margin-right: 4px; -} -.tox .tox-color-picker-container { - display: flex; - flex-direction: row; - height: 225px; - margin: 0; -} -.tox .tox-sv-palette { - box-sizing: border-box; - display: flex; - height: 100%; -} -.tox .tox-sv-palette-spectrum { - height: 100%; -} -.tox .tox-sv-palette, -.tox .tox-sv-palette-spectrum { - width: 225px; -} -.tox .tox-sv-palette-thumb { - background: 0 0; - border: 1px solid #000; - border-radius: 50%; - box-sizing: content-box; - height: 12px; - position: absolute; - width: 12px; -} -.tox .tox-sv-palette-inner-thumb { - border: 1px solid #fff; - border-radius: 50%; - height: 10px; - position: absolute; - width: 10px; -} -.tox .tox-hue-slider { - box-sizing: border-box; - height: 100%; - width: 25px; -} -.tox .tox-hue-slider-spectrum { - background: linear-gradient( - to bottom, - red, - #ff0080, - #f0f, - #8000ff, - #00f, - #0080ff, - #0ff, - #00ff80, - #0f0, - #80ff00, - #ff0, - #ff8000, - red - ); - height: 100%; - width: 100%; -} -.tox .tox-hue-slider, -.tox .tox-hue-slider-spectrum { - width: 20px; -} -.tox .tox-hue-slider-thumb { - background: #fff; - border: 1px solid #000; - box-sizing: content-box; - height: 4px; - width: 100%; -} -.tox .tox-rgb-form { - display: flex; - flex-direction: column; - justify-content: space-between; -} -.tox .tox-rgb-form div { - align-items: center; - display: flex; - justify-content: space-between; - margin-bottom: 5px; - width: inherit; -} -.tox .tox-rgb-form input { - width: 6em; -} -.tox .tox-rgb-form input.tox-invalid { - border: 1px solid red !important; -} -.tox .tox-rgb-form .tox-rgba-preview { - border: 1px solid #000; - flex-grow: 2; - margin-bottom: 0; -} -.tox:not([dir="rtl"]) .tox-sv-palette { - margin-right: 15px; -} -.tox:not([dir="rtl"]) .tox-hue-slider { - margin-right: 15px; -} -.tox:not([dir="rtl"]) .tox-hue-slider-thumb { - margin-left: -1px; -} -.tox:not([dir="rtl"]) .tox-rgb-form label { - margin-right: 0.5em; -} -.tox[dir="rtl"] .tox-sv-palette { - margin-left: 15px; -} -.tox[dir="rtl"] .tox-hue-slider { - margin-left: 15px; -} -.tox[dir="rtl"] .tox-hue-slider-thumb { - margin-right: -1px; -} -.tox[dir="rtl"] .tox-rgb-form label { - margin-left: 0.5em; -} -.tox .tox-toolbar .tox-swatches, -.tox .tox-toolbar__overflow .tox-swatches, -.tox .tox-toolbar__primary .tox-swatches { - margin: 5px 0 6px 11px; -} -.tox .tox-collection--list .tox-collection__group .tox-swatches-menu { - border: 0; - margin: -4px -4px; -} -.tox .tox-swatches__row { - display: flex; -} -.tox .tox-swatch { - height: 30px; - transition: - transform 0.15s, - box-shadow 0.15s; - width: 30px; -} -.tox .tox-swatch:focus, -.tox .tox-swatch:hover { - box-shadow: 0 0 0 1px rgba(127, 127, 127, 0.3) inset; - transform: scale(0.8); -} -.tox .tox-swatch--remove { - align-items: center; - display: flex; - justify-content: center; -} -.tox .tox-swatch--remove svg path { - stroke: #e74c3c; -} -.tox .tox-swatches__picker-btn { - align-items: center; - background-color: transparent; - border: 0; - cursor: pointer; - display: flex; - height: 30px; - justify-content: center; - outline: 0; - padding: 0; - width: 30px; -} -.tox .tox-swatches__picker-btn svg { - fill: #222f3e; - height: 24px; - width: 24px; -} -.tox .tox-swatches__picker-btn:hover { - background: #cce2fa; -} -.tox div.tox-swatch:not(.tox-swatch--remove) svg { - display: none; - fill: #222f3e; - height: 24px; - margin: calc((30px - 24px) / 2) calc((30px - 24px) / 2); - width: 24px; -} -.tox div.tox-swatch:not(.tox-swatch--remove) svg path { - fill: #fff; - paint-order: stroke; - stroke: #222f3e; - stroke-width: 2px; -} -.tox div.tox-swatch:not(.tox-swatch--remove).tox-collection__item--enabled svg { - display: block; -} -.tox:not([dir="rtl"]) .tox-swatches__picker-btn { - margin-left: auto; -} -.tox[dir="rtl"] .tox-swatches__picker-btn { - margin-right: auto; -} -.tox .tox-comment-thread { - background: #fff; - position: relative; -} -.tox .tox-comment-thread > :not(:first-child) { - margin-top: 8px; -} -.tox .tox-comment { - background: #fff; - border: 1px solid #eee; - border-radius: 6px; - box-shadow: 0 4px 8px 0 rgba(34, 47, 62, 0.1); - padding: 8px 8px 16px 8px; - position: relative; -} -.tox .tox-comment__header { - align-items: center; - color: #222f3e; - display: flex; - justify-content: space-between; -} -.tox .tox-comment__date { - color: #222f3e; - font-size: 12px; - line-height: 18px; -} -.tox .tox-comment__body { - color: #222f3e; - font-size: 14px; - font-style: normal; - font-weight: 400; - line-height: 1.3; - margin-top: 8px; - position: relative; - text-transform: initial; -} -.tox .tox-comment__body textarea { - resize: none; - white-space: normal; - width: 100%; -} -.tox .tox-comment__expander { - padding-top: 8px; -} -.tox .tox-comment__expander p { - color: rgba(34, 47, 62, 0.7); - font-size: 14px; - font-style: normal; -} -.tox .tox-comment__body p { - margin: 0; -} -.tox .tox-comment__buttonspacing { - padding-top: 16px; - text-align: center; -} -.tox .tox-comment-thread__overlay::after { - background: #fff; - bottom: 0; - content: ""; - display: flex; - left: 0; - opacity: 0.9; - position: absolute; - right: 0; - top: 0; - z-index: 5; -} -.tox .tox-comment__reply { - display: flex; - flex-shrink: 0; - flex-wrap: wrap; - justify-content: flex-end; - margin-top: 8px; -} -.tox .tox-comment__reply > :first-child { - margin-bottom: 8px; - width: 100%; -} -.tox .tox-comment__edit { - display: flex; - flex-wrap: wrap; - justify-content: flex-end; - margin-top: 16px; -} -.tox .tox-comment__gradient::after { - background: linear-gradient(rgba(255, 255, 255, 0), #fff); - bottom: 0; - content: ""; - display: block; - height: 5em; - margin-top: -40px; - position: absolute; - width: 100%; -} -.tox .tox-comment__overlay { - background: #fff; - bottom: 0; - display: flex; - flex-direction: column; - flex-grow: 1; - left: 0; - opacity: 0.9; - position: absolute; - right: 0; - text-align: center; - top: 0; - z-index: 5; -} -.tox .tox-comment__loading-text { - align-items: center; - color: #222f3e; - display: flex; - flex-direction: column; - position: relative; -} -.tox .tox-comment__loading-text > div { - padding-bottom: 16px; -} -.tox .tox-comment__overlaytext { - bottom: 0; - flex-direction: column; - font-size: 14px; - left: 0; - padding: 1em; - position: absolute; - right: 0; - top: 0; - z-index: 10; -} -.tox .tox-comment__overlaytext p { - background-color: #fff; - box-shadow: 0 0 8px 8px #fff; - color: #222f3e; - text-align: center; -} -.tox .tox-comment__overlaytext div:nth-of-type(2) { - font-size: 0.8em; -} -.tox .tox-comment__busy-spinner { - align-items: center; - background-color: #fff; - bottom: 0; - display: flex; - justify-content: center; - left: 0; - position: absolute; - right: 0; - top: 0; - z-index: 20; -} -.tox .tox-comment__scroll { - display: flex; - flex-direction: column; - flex-shrink: 1; - overflow: auto; -} -.tox .tox-conversations { - margin: 8px; -} -.tox:not([dir="rtl"]) .tox-comment__edit { - margin-left: 8px; -} -.tox:not([dir="rtl"]) .tox-comment__buttonspacing > :last-child, -.tox:not([dir="rtl"]) .tox-comment__edit > :last-child, -.tox:not([dir="rtl"]) .tox-comment__reply > :last-child { - margin-left: 8px; -} -.tox[dir="rtl"] .tox-comment__edit { - margin-right: 8px; -} -.tox[dir="rtl"] .tox-comment__buttonspacing > :last-child, -.tox[dir="rtl"] .tox-comment__edit > :last-child, -.tox[dir="rtl"] .tox-comment__reply > :last-child { - margin-right: 8px; -} -.tox .tox-user { - align-items: center; - display: flex; -} -.tox .tox-user__avatar svg { - fill: rgba(34, 47, 62, 0.7); -} -.tox .tox-user__avatar img { - border-radius: 50%; - height: 36px; - object-fit: cover; - vertical-align: middle; - width: 36px; -} -.tox .tox-user__name { - color: #222f3e; - font-size: 14px; - font-style: normal; - font-weight: 700; - line-height: 18px; - text-transform: none; -} -.tox:not([dir="rtl"]) .tox-user__avatar img, -.tox:not([dir="rtl"]) .tox-user__avatar svg { - margin-right: 8px; -} -.tox:not([dir="rtl"]) .tox-user__avatar + .tox-user__name { - margin-left: 8px; -} -.tox[dir="rtl"] .tox-user__avatar img, -.tox[dir="rtl"] .tox-user__avatar svg { - margin-left: 8px; -} -.tox[dir="rtl"] .tox-user__avatar + .tox-user__name { - margin-right: 8px; -} -.tox .tox-dialog-wrap { - align-items: center; - bottom: 0; - display: flex; - justify-content: center; - left: 0; - position: fixed; - right: 0; - top: 0; - z-index: 1100; -} -.tox .tox-dialog-wrap__backdrop { - background-color: rgba(255, 255, 255, 0.75); - bottom: 0; - left: 0; - position: absolute; - right: 0; - top: 0; - z-index: 1; -} -.tox .tox-dialog-wrap__backdrop--opaque { - background-color: #fff; -} -.tox .tox-dialog { - background-color: #fff; - border-color: #eee; - border-radius: 10px; - border-style: solid; - border-width: 0; - box-shadow: - 0 16px 16px -10px rgba(34, 47, 62, 0.15), - 0 0 40px 1px rgba(34, 47, 62, 0.15); - display: flex; - flex-direction: column; - max-height: 100%; - max-width: 480px; - overflow: hidden; - position: relative; - width: 95vw; - z-index: 2; -} -@media only screen and (max-width: 767px) { - body:not(.tox-force-desktop) .tox .tox-dialog { - align-self: flex-start; - margin: 8px auto; - max-height: calc(100vh - 8px * 2); - width: calc(100vw - 16px); - } -} -.tox .tox-dialog-inline { - z-index: 1100; -} -.tox .tox-dialog__header { - align-items: center; - background-color: #fff; - border-bottom: none; - color: #222f3e; - display: flex; - font-size: 16px; - justify-content: space-between; - padding: 8px 16px 0 16px; - position: relative; -} -.tox .tox-dialog__header .tox-button { - z-index: 1; -} -.tox .tox-dialog__draghandle { - cursor: grab; - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} -.tox .tox-dialog__draghandle:active { - cursor: grabbing; -} -.tox .tox-dialog__dismiss { - margin-left: auto; -} -.tox .tox-dialog__title { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - font-size: 20px; - font-style: normal; - font-weight: 400; - line-height: 1.3; - margin: 0; - text-transform: none; -} -.tox .tox-dialog__body { - color: #222f3e; - display: flex; - flex: 1; - font-size: 16px; - font-style: normal; - font-weight: 400; - line-height: 1.3; - min-width: 0; - text-align: left; - text-transform: none; -} -@media only screen and (max-width: 767px) { - body:not(.tox-force-desktop) .tox .tox-dialog__body { - flex-direction: column; - } -} -.tox .tox-dialog__body-nav { - align-items: flex-start; - display: flex; - flex-direction: column; - flex-shrink: 0; - padding: 16px 16px; -} -@media only screen and (min-width: 768px) { - .tox .tox-dialog__body-nav { - max-width: 11em; - } -} -@media only screen and (max-width: 767px) { - body:not(.tox-force-desktop) .tox .tox-dialog__body-nav { - flex-direction: row; - -webkit-overflow-scrolling: touch; - overflow-x: auto; - padding-bottom: 0; - } -} -.tox .tox-dialog__body-nav-item { - border-bottom: 2px solid transparent; - color: rgba(34, 47, 62, 0.7); - display: inline-block; - flex-shrink: 0; - font-size: 14px; - line-height: 1.3; - margin-bottom: 8px; - max-width: 13em; - text-decoration: none; -} -.tox .tox-dialog__body-nav-item:focus { - background-color: rgba(0, 108, 231, 0.1); -} -.tox .tox-dialog__body-nav-item--active { - border-bottom: 2px solid #006ce7; - color: #006ce7; -} -.tox .tox-dialog__body-content { - box-sizing: border-box; - display: flex; - flex: 1; - flex-direction: column; - max-height: min(650px, calc(100vh - 110px)); - overflow: auto; - -webkit-overflow-scrolling: touch; - padding: 16px 16px; -} -.tox .tox-dialog__body-content > * { - margin-bottom: 0; - margin-top: 16px; -} -.tox .tox-dialog__body-content > :first-child { - margin-top: 0; -} -.tox .tox-dialog__body-content > :last-child { - margin-bottom: 0; -} -.tox .tox-dialog__body-content > :only-child { - margin-bottom: 0; - margin-top: 0; -} -.tox .tox-dialog__body-content a { - color: #006ce7; - cursor: pointer; - text-decoration: underline; -} -.tox .tox-dialog__body-content a:focus, -.tox .tox-dialog__body-content a:hover { - color: #003c81; - text-decoration: underline; -} -.tox .tox-dialog__body-content a:focus-visible { - border-radius: 1px; - outline: 2px solid #006ce7; - outline-offset: 2px; -} -.tox .tox-dialog__body-content a:active { - color: #00244e; - text-decoration: underline; -} -.tox .tox-dialog__body-content svg { - fill: #222f3e; -} -.tox .tox-dialog__body-content strong { - font-weight: 700; -} -.tox .tox-dialog__body-content ul { - list-style-type: disc; -} -.tox .tox-dialog__body-content dd, -.tox .tox-dialog__body-content ol, -.tox .tox-dialog__body-content ul { - padding-inline-start: 2.5rem; -} -.tox .tox-dialog__body-content dl, -.tox .tox-dialog__body-content ol, -.tox .tox-dialog__body-content ul { - margin-bottom: 16px; -} -.tox .tox-dialog__body-content dd, -.tox .tox-dialog__body-content dl, -.tox .tox-dialog__body-content dt, -.tox .tox-dialog__body-content ol, -.tox .tox-dialog__body-content ul { - display: block; - margin-inline-end: 0; - margin-inline-start: 0; -} -.tox .tox-dialog__body-content .tox-form__group h1 { - color: #222f3e; - font-size: 20px; - font-style: normal; - font-weight: 700; - letter-spacing: normal; - margin-bottom: 16px; - margin-top: 2rem; - text-transform: none; -} -.tox .tox-dialog__body-content .tox-form__group h2 { - color: #222f3e; - font-size: 16px; - font-style: normal; - font-weight: 700; - letter-spacing: normal; - margin-bottom: 16px; - margin-top: 2rem; - text-transform: none; -} -.tox .tox-dialog__body-content .tox-form__group p { - margin-bottom: 16px; -} -.tox .tox-dialog__body-content .tox-form__group h1:first-child, -.tox .tox-dialog__body-content .tox-form__group h2:first-child, -.tox .tox-dialog__body-content .tox-form__group p:first-child { - margin-top: 0; -} -.tox .tox-dialog__body-content .tox-form__group h1:last-child, -.tox .tox-dialog__body-content .tox-form__group h2:last-child, -.tox .tox-dialog__body-content .tox-form__group p:last-child { - margin-bottom: 0; -} -.tox .tox-dialog__body-content .tox-form__group h1:only-child, -.tox .tox-dialog__body-content .tox-form__group h2:only-child, -.tox .tox-dialog__body-content .tox-form__group p:only-child { - margin-bottom: 0; - margin-top: 0; -} -.tox .tox-dialog__body-content .tox-form__group .tox-label.tox-label--center { - text-align: center; -} -.tox .tox-dialog__body-content .tox-form__group .tox-label.tox-label--end { - text-align: end; -} -.tox .tox-dialog--width-lg { - height: 650px; - max-width: 1200px; -} -.tox .tox-dialog--fullscreen { - height: 100%; - max-width: 100%; -} -.tox .tox-dialog--fullscreen .tox-dialog__body-content { - max-height: 100%; -} -.tox .tox-dialog--width-md { - max-width: 800px; -} -.tox .tox-dialog--width-md .tox-dialog__body-content { - overflow: auto; -} -.tox .tox-dialog__body-content--centered { - text-align: center; -} -.tox .tox-dialog__footer { - align-items: center; - background-color: #fff; - border-top: none; - display: flex; - justify-content: space-between; - padding: 8px 16px; -} -.tox .tox-dialog__footer-end, -.tox .tox-dialog__footer-start { - display: flex; -} -.tox .tox-dialog__busy-spinner { - align-items: center; - background-color: rgba(255, 255, 255, 0.75); - bottom: 0; - display: flex; - justify-content: center; - left: 0; - position: absolute; - right: 0; - top: 0; - z-index: 3; -} -.tox .tox-dialog__table { - border-collapse: collapse; - width: 100%; -} -.tox .tox-dialog__table thead th { - font-weight: 700; - padding-bottom: 8px; -} -.tox .tox-dialog__table thead th:first-child { - padding-right: 8px; -} -.tox .tox-dialog__table tbody tr { - border-bottom: 1px solid #626262; -} -.tox .tox-dialog__table tbody tr:last-child { - border-bottom: none; -} -.tox .tox-dialog__table td { - padding-bottom: 8px; - padding-top: 8px; -} -.tox .tox-dialog__table td:first-child { - padding-right: 8px; -} -.tox .tox-dialog__iframe { - min-height: 200px; -} -.tox .tox-dialog__iframe.tox-dialog__iframe--opaque { - background: #fff; -} -.tox .tox-navobj-bordered { - position: relative; -} -.tox .tox-navobj-bordered::before { - border: 1px solid #eee; - border-radius: 6px; - content: ""; - inset: 0; - opacity: 1; - pointer-events: none; - position: absolute; - z-index: 1; -} -.tox .tox-navobj-bordered-focus.tox-navobj-bordered::before { - border-color: #006ce7; - box-shadow: 0 0 0 2px rgba(0, 108, 231, 0.25); - outline: 0; -} -.tox .tox-dialog__popups { - position: absolute; - width: 100%; - z-index: 1100; -} -.tox .tox-dialog__body-iframe { - display: flex; - flex: 1; - flex-direction: column; -} -.tox .tox-dialog__body-iframe .tox-navobj { - display: flex; - flex: 1; -} -.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2) { - flex: 1; - height: 100%; -} -.tox .tox-dialog-dock-fadeout { - opacity: 0; - visibility: hidden; -} -.tox .tox-dialog-dock-fadein { - opacity: 1; - visibility: visible; -} -.tox .tox-dialog-dock-transition { - transition: - visibility 0s linear 0.3s, - opacity 0.3s ease; -} -.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein { - transition-delay: 0s; -} -@media only screen and (max-width: 767px) { - body:not(.tox-force-desktop) .tox:not([dir="rtl"]) .tox-dialog__body-nav { - margin-right: 0; - } -} -@media only screen and (max-width: 767px) { - body:not(.tox-force-desktop) - .tox:not([dir="rtl"]) - .tox-dialog__body-nav-item:not(:first-child) { - margin-left: 8px; - } -} -.tox:not([dir="rtl"]) .tox-dialog__footer .tox-dialog__footer-end > *, -.tox:not([dir="rtl"]) .tox-dialog__footer .tox-dialog__footer-start > * { - margin-left: 8px; -} -.tox[dir="rtl"] .tox-dialog__body { - text-align: right; -} -@media only screen and (max-width: 767px) { - body:not(.tox-force-desktop) .tox[dir="rtl"] .tox-dialog__body-nav { - margin-left: 0; - } -} -@media only screen and (max-width: 767px) { - body:not(.tox-force-desktop) - .tox[dir="rtl"] - .tox-dialog__body-nav-item:not(:first-child) { - margin-right: 8px; - } -} -.tox[dir="rtl"] .tox-dialog__footer .tox-dialog__footer-end > *, -.tox[dir="rtl"] .tox-dialog__footer .tox-dialog__footer-start > * { - margin-right: 8px; -} -body.tox-dialog__disable-scroll { - overflow: hidden; -} -.tox .tox-dropzone-container { - display: flex; - flex: 1; -} -.tox .tox-dropzone { - align-items: center; - background: #fff; - border: 2px dashed #eee; - box-sizing: border-box; - display: flex; - flex-direction: column; - flex-grow: 1; - justify-content: center; - min-height: 100px; - padding: 10px; -} -.tox .tox-dropzone p { - color: rgba(34, 47, 62, 0.7); - margin: 0 0 16px 0; -} -.tox .tox-edit-area { - display: flex; - flex: 1; - overflow: hidden; - position: relative; -} -.tox .tox-edit-area::before { - border: 2px solid #2d6adf; - border-radius: 4px; - content: ""; - inset: 0; - opacity: 0; - pointer-events: none; - position: absolute; - transition: opacity 0.15s; - z-index: 1; -} -.tox .tox-edit-area__iframe { - background-color: #fff; - border: 0; - box-sizing: border-box; - flex: 1; - height: 100%; - position: absolute; - width: 100%; -} -.tox.tox-edit-focus .tox-edit-area::before { - opacity: 1; -} -.tox.tox-inline-edit-area { - border: 1px dotted #eee; -} -.tox .tox-editor-container { - display: flex; - flex: 1 1 auto; - flex-direction: column; - overflow: hidden; -} -.tox .tox-editor-header { - display: grid; - grid-template-columns: 1fr min-content; - z-index: 2; -} -.tox:not(.tox-tinymce-inline) .tox-editor-header { - background-color: #fff; - border-bottom: none; - box-shadow: - 0 2px 2px -2px rgba(34, 47, 62, 0.1), - 0 8px 8px -4px rgba(34, 47, 62, 0.07); - padding: 4px 0; -} -.tox:not(.tox-tinymce-inline) - .tox-editor-header:not(.tox-editor-dock-transition) { - transition: box-shadow 0.5s; -} -.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-bottom .tox-editor-header { - border-top: 1px solid #e3e3e3; - box-shadow: none; -} -.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-sticky-on - .tox-editor-header { - background-color: #fff; - box-shadow: - 0 2px 2px -2px rgba(34, 47, 62, 0.2), - 0 8px 8px -4px rgba(34, 47, 62, 0.15); - padding: 4px 0; -} -.tox:not( - .tox-tinymce-inline - ).tox-tinymce--toolbar-sticky-on.tox-tinymce--toolbar-bottom - .tox-editor-header { - box-shadow: - 0 2px 2px -2px rgba(34, 47, 62, 0.2), - 0 8px 8px -4px rgba(34, 47, 62, 0.15); -} -.tox.tox:not(.tox-tinymce-inline) .tox-editor-header.tox-editor-header--empty { - background: 0 0; - border: none; - box-shadow: none; - padding: 0; -} -.tox-editor-dock-fadeout { - opacity: 0; - visibility: hidden; -} -.tox-editor-dock-fadein { - opacity: 1; - visibility: visible; -} -.tox-editor-dock-transition { - transition: - visibility 0s linear 0.25s, - opacity 0.25s ease; -} -.tox-editor-dock-transition.tox-editor-dock-fadein { - transition-delay: 0s; -} -.tox .tox-control-wrap { - flex: 1; - position: relative; -} -.tox - .tox-control-wrap:not(.tox-control-wrap--status-invalid) - .tox-control-wrap__status-icon-invalid, -.tox - .tox-control-wrap:not(.tox-control-wrap--status-unknown) - .tox-control-wrap__status-icon-unknown, -.tox - .tox-control-wrap:not(.tox-control-wrap--status-valid) - .tox-control-wrap__status-icon-valid { - display: none; -} -.tox .tox-control-wrap svg { - display: block; -} -.tox .tox-control-wrap__status-icon-wrap { - position: absolute; - top: 50%; - transform: translateY(-50%); -} -.tox .tox-control-wrap__status-icon-invalid svg { - fill: #c00; -} -.tox .tox-control-wrap__status-icon-unknown svg { - fill: orange; -} -.tox .tox-control-wrap__status-icon-valid svg { - fill: green; -} -.tox:not([dir="rtl"]) .tox-control-wrap--status-invalid .tox-textfield, -.tox:not([dir="rtl"]) .tox-control-wrap--status-unknown .tox-textfield, -.tox:not([dir="rtl"]) .tox-control-wrap--status-valid .tox-textfield { - padding-right: 32px; -} -.tox:not([dir="rtl"]) .tox-control-wrap__status-icon-wrap { - right: 4px; -} -.tox[dir="rtl"] .tox-control-wrap--status-invalid .tox-textfield, -.tox[dir="rtl"] .tox-control-wrap--status-unknown .tox-textfield, -.tox[dir="rtl"] .tox-control-wrap--status-valid .tox-textfield { - padding-left: 32px; -} -.tox[dir="rtl"] .tox-control-wrap__status-icon-wrap { - left: 4px; -} -.tox .tox-autocompleter { - max-width: 25em; -} -.tox .tox-autocompleter .tox-menu { - box-sizing: border-box; - max-width: 25em; -} -.tox .tox-autocompleter .tox-autocompleter-highlight { - font-weight: 700; -} -.tox .tox-color-input { - display: flex; - position: relative; - z-index: 1; -} -.tox .tox-color-input .tox-textfield { - z-index: -1; -} -.tox .tox-color-input span { - border-color: rgba(34, 47, 62, 0.2); - border-radius: 6px; - border-style: solid; - border-width: 1px; - box-shadow: none; - box-sizing: border-box; - height: 24px; - position: absolute; - top: 6px; - width: 24px; -} -.tox .tox-color-input span:focus:not([aria-disabled="true"]), -.tox .tox-color-input span:hover:not([aria-disabled="true"]) { - border-color: #006ce7; - cursor: pointer; -} -.tox .tox-color-input span::before { - background-image: linear-gradient( - 45deg, - rgba(0, 0, 0, 0.25) 25%, - transparent 25% - ), - linear-gradient(-45deg, rgba(0, 0, 0, 0.25) 25%, transparent 25%), - linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.25) 75%), - linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.25) 75%); - background-position: - 0 0, - 0 6px, - 6px -6px, - -6px 0; - background-size: 12px 12px; - border: 1px solid #fff; - border-radius: 6px; - box-sizing: border-box; - content: ""; - height: 24px; - left: -1px; - position: absolute; - top: -1px; - width: 24px; - z-index: -1; -} -.tox .tox-color-input span[aria-disabled="true"] { - cursor: not-allowed; -} -.tox:not([dir="rtl"]) .tox-color-input .tox-textfield { - padding-left: 36px; -} -.tox:not([dir="rtl"]) .tox-color-input span { - left: 6px; -} -.tox[dir="rtl"] .tox-color-input .tox-textfield { - padding-right: 36px; -} -.tox[dir="rtl"] .tox-color-input span { - right: 6px; -} -.tox .tox-label, -.tox .tox-toolbar-label { - color: rgba(34, 47, 62, 0.7); - display: block; - font-size: 14px; - font-style: normal; - font-weight: 400; - line-height: 1.3; - padding: 0 8px 0 0; - text-transform: none; - white-space: nowrap; -} -.tox .tox-toolbar-label { - padding: 0 8px; -} -.tox[dir="rtl"] .tox-label { - padding: 0 0 0 8px; -} -.tox .tox-form { - display: flex; - flex: 1; - flex-direction: column; -} -.tox .tox-form__group { - box-sizing: border-box; - margin-bottom: 4px; -} -.tox .tox-form-group--maximize { - flex: 1; -} -.tox .tox-form__group--error { - color: #c00; -} -.tox .tox-form__group--collection { - display: flex; -} -.tox .tox-form__grid { - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: space-between; -} -.tox .tox-form__grid--2col > .tox-form__group { - width: calc(50% - (8px / 2)); -} -.tox .tox-form__grid--3col > .tox-form__group { - width: calc(100% / 3 - (8px / 2)); -} -.tox .tox-form__grid--4col > .tox-form__group { - width: calc(25% - (8px / 2)); -} -.tox .tox-form__controls-h-stack { - align-items: center; - display: flex; -} -.tox .tox-form__group--inline { - align-items: center; - display: flex; -} -.tox .tox-form__group--stretched { - display: flex; - flex: 1; - flex-direction: column; -} -.tox .tox-form__group--stretched .tox-textarea { - flex: 1; -} -.tox .tox-form__group--stretched .tox-navobj { - display: flex; - flex: 1; -} -.tox .tox-form__group--stretched .tox-navobj :nth-child(2) { - flex: 1; - height: 100%; -} -.tox:not([dir="rtl"]) .tox-form__controls-h-stack > :not(:first-child) { - margin-left: 4px; -} -.tox[dir="rtl"] .tox-form__controls-h-stack > :not(:first-child) { - margin-right: 4px; -} -.tox .tox-lock.tox-locked .tox-lock-icon__unlock, -.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock { - display: none; -} -.tox .tox-listboxfield .tox-listbox--select, -.tox .tox-textarea, -.tox .tox-textarea-wrap .tox-textarea:focus, -.tox .tox-textfield, -.tox .tox-toolbar-textfield { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - background-color: #fff; - border-color: #eee; - border-radius: 6px; - border-style: solid; - border-width: 1px; - box-shadow: none; - box-sizing: border-box; - color: #222f3e; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - font-size: 16px; - line-height: 24px; - margin: 0; - min-height: 34px; - outline: 0; - padding: 5px 5.5px; - resize: none; - width: 100%; -} -.tox .tox-textarea[disabled], -.tox .tox-textfield[disabled] { - background-color: #f2f2f2; - color: rgba(34, 47, 62, 0.85); - cursor: not-allowed; -} -.tox .tox-custom-editor:focus-within, -.tox .tox-listboxfield .tox-listbox--select:focus, -.tox .tox-textarea-wrap:focus-within, -.tox .tox-textarea:focus, -.tox .tox-textfield:focus { - background-color: #fff; - border-color: #006ce7; - box-shadow: 0 0 0 2px rgba(0, 108, 231, 0.25); - outline: 0; -} -.tox .tox-toolbar-textfield { - border-width: 0; - margin-bottom: 3px; - margin-top: 2px; - max-width: 250px; -} -.tox .tox-naked-btn { - background-color: transparent; - border: 0; - border-color: transparent; - box-shadow: unset; - color: #006ce7; - cursor: pointer; - display: block; - margin: 0; - padding: 0; -} -.tox .tox-naked-btn svg { - display: block; - fill: #222f3e; -} -.tox:not([dir="rtl"]) .tox-toolbar-textfield + * { - margin-left: 4px; -} -.tox[dir="rtl"] .tox-toolbar-textfield + * { - margin-right: 4px; -} -.tox .tox-listboxfield { - cursor: pointer; - position: relative; -} -.tox .tox-listboxfield .tox-listbox--select[disabled] { - background-color: #f2f2f2; - color: rgba(34, 47, 62, 0.85); - cursor: not-allowed; -} -.tox .tox-listbox__select-label { - cursor: default; - flex: 1; - margin: 0 4px; -} -.tox .tox-listbox__select-chevron { - align-items: center; - display: flex; - justify-content: center; - width: 16px; -} -.tox .tox-listbox__select-chevron svg { - fill: #222f3e; -} -.tox .tox-listboxfield .tox-listbox--select { - align-items: center; - display: flex; -} -.tox:not([dir="rtl"]) .tox-listboxfield svg { - right: 8px; -} -.tox[dir="rtl"] .tox-listboxfield svg { - left: 8px; -} -.tox .tox-selectfield { - cursor: pointer; - position: relative; -} -.tox .tox-selectfield select { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - background-color: #fff; - border-color: #eee; - border-radius: 6px; - border-style: solid; - border-width: 1px; - box-shadow: none; - box-sizing: border-box; - color: #222f3e; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - font-size: 16px; - line-height: 24px; - margin: 0; - min-height: 34px; - outline: 0; - padding: 5px 5.5px; - resize: none; - width: 100%; -} -.tox .tox-selectfield select[disabled] { - background-color: #f2f2f2; - color: rgba(34, 47, 62, 0.85); - cursor: not-allowed; -} -.tox .tox-selectfield select::-ms-expand { - display: none; -} -.tox .tox-selectfield select:focus { - background-color: #fff; - border-color: #006ce7; - box-shadow: 0 0 0 2px rgba(0, 108, 231, 0.25); - outline: 0; -} -.tox .tox-selectfield svg { - pointer-events: none; - position: absolute; - top: 50%; - transform: translateY(-50%); -} -.tox:not([dir="rtl"]) .tox-selectfield select[size="0"], -.tox:not([dir="rtl"]) .tox-selectfield select[size="1"] { - padding-right: 24px; -} -.tox:not([dir="rtl"]) .tox-selectfield svg { - right: 8px; -} -.tox[dir="rtl"] .tox-selectfield select[size="0"], -.tox[dir="rtl"] .tox-selectfield select[size="1"] { - padding-left: 24px; -} -.tox[dir="rtl"] .tox-selectfield svg { - left: 8px; -} -.tox .tox-textarea-wrap { - border-color: #eee; - border-radius: 6px; - border-style: solid; - border-width: 1px; - display: flex; - flex: 1; - overflow: hidden; -} -.tox .tox-textarea { - -webkit-appearance: textarea; - -moz-appearance: textarea; - appearance: textarea; - white-space: pre-wrap; -} -.tox .tox-textarea-wrap .tox-textarea { - border: none; -} -.tox .tox-textarea-wrap .tox-textarea:focus { - border: none; -} -.tox-fullscreen { - border: 0; - height: 100%; - margin: 0; - overflow: hidden; - overscroll-behavior: none; - padding: 0; - touch-action: pinch-zoom; - width: 100%; -} -.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle { - display: none; -} -.tox-shadowhost.tox-fullscreen, -.tox.tox-tinymce.tox-fullscreen { - left: 0; - position: fixed; - top: 0; - z-index: 1200; -} -.tox.tox-tinymce.tox-fullscreen { - background-color: transparent; -} -.tox-fullscreen .tox.tox-tinymce-aux, -.tox-fullscreen ~ .tox.tox-tinymce-aux { - z-index: 1201; -} -.tox .tox-help__more-link { - list-style: none; - margin-top: 1em; -} -.tox .tox-imagepreview { - background-color: #666; - height: 380px; - overflow: hidden; - position: relative; - width: 100%; -} -.tox .tox-imagepreview.tox-imagepreview__loaded { - overflow: auto; -} -.tox .tox-imagepreview__container { - display: flex; - left: 100vw; - position: absolute; - top: 100vw; -} -.tox .tox-imagepreview__image { - background: url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==); -} -.tox .tox-image-tools .tox-spacer { - flex: 1; -} -.tox .tox-image-tools .tox-bar { - align-items: center; - display: flex; - height: 60px; - justify-content: center; -} -.tox .tox-image-tools .tox-imagepreview, -.tox .tox-image-tools .tox-imagepreview + .tox-bar { - margin-top: 8px; -} -.tox .tox-image-tools .tox-croprect-block { - background: #000; - opacity: 0.5; - position: absolute; - zoom: 1; -} -.tox .tox-image-tools .tox-croprect-handle { - border: 2px solid #fff; - height: 20px; - left: 0; - position: absolute; - top: 0; - width: 20px; -} -.tox .tox-image-tools .tox-croprect-handle-move { - border: 0; - cursor: move; - position: absolute; -} -.tox .tox-image-tools .tox-croprect-handle-nw { - border-width: 2px 0 0 2px; - cursor: nw-resize; - left: 100px; - margin: -2px 0 0 -2px; - top: 100px; -} -.tox .tox-image-tools .tox-croprect-handle-ne { - border-width: 2px 2px 0 0; - cursor: ne-resize; - left: 200px; - margin: -2px 0 0 -20px; - top: 100px; -} -.tox .tox-image-tools .tox-croprect-handle-sw { - border-width: 0 0 2px 2px; - cursor: sw-resize; - left: 100px; - margin: -20px 2px 0 -2px; - top: 200px; -} -.tox .tox-image-tools .tox-croprect-handle-se { - border-width: 0 2px 2px 0; - cursor: se-resize; - left: 200px; - margin: -20px 0 0 -20px; - top: 200px; -} -.tox .tox-insert-table-picker { - display: flex; - flex-wrap: wrap; - width: 170px; -} -.tox .tox-insert-table-picker > div { - border-color: #eee; - border-style: solid; - border-width: 0 1px 1px 0; - box-sizing: border-box; - height: 17px; - width: 17px; -} -.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker { - margin: -4px -4px; -} -.tox .tox-insert-table-picker .tox-insert-table-picker__selected { - background-color: rgba(0, 108, 231, 0.5); - border-color: rgba(0, 108, 231, 0.5); -} -.tox .tox-insert-table-picker__label { - color: rgba(34, 47, 62, 0.7); - display: block; - font-size: 14px; - padding: 4px; - text-align: center; - width: 100%; -} -.tox:not([dir="rtl"]) .tox-insert-table-picker > div:nth-child(10n) { - border-right: 0; -} -.tox[dir="rtl"] .tox-insert-table-picker > div:nth-child(10n + 1) { - border-right: 0; -} -.tox .tox-menu { - background-color: #fff; - border: 1px solid transparent; - border-radius: 6px; - box-shadow: - 0 0 2px 0 rgba(34, 47, 62, 0.2), - 0 4px 8px 0 rgba(34, 47, 62, 0.15); - display: inline-block; - overflow: hidden; - vertical-align: top; - z-index: 1150; -} -.tox .tox-menu.tox-collection.tox-collection--list { - padding: 0 4px; -} -.tox .tox-menu.tox-collection.tox-collection--toolbar { - padding: 8px; -} -.tox .tox-menu.tox-collection.tox-collection--grid { - padding: 8px; -} -@media only screen and (min-width: 768px) { - .tox .tox-menu .tox-collection__item-label { - overflow-wrap: break-word; - word-break: normal; - } - .tox .tox-dialog__popups .tox-menu .tox-collection__item-label { - word-break: break-all; - } -} -.tox .tox-menu__label blockquote, -.tox .tox-menu__label code, -.tox .tox-menu__label h1, -.tox .tox-menu__label h2, -.tox .tox-menu__label h3, -.tox .tox-menu__label h4, -.tox .tox-menu__label h5, -.tox .tox-menu__label h6, -.tox .tox-menu__label p { - margin: 0; -} -.tox .tox-menubar { - background: repeating-linear-gradient(transparent 0 1px, transparent 1px 39px) - center top 39px/100% calc(100% - 39px) no-repeat; - background-color: #fff; - display: flex; - flex: 0 0 auto; - flex-shrink: 0; - flex-wrap: wrap; - grid-column: 1/-1; - grid-row: 1; - padding: 0 11px 0 12px; -} -.tox .tox-promotion + .tox-menubar { - grid-column: 1; -} -.tox .tox-promotion { - background: repeating-linear-gradient(transparent 0 1px, transparent 1px 39px) - center top 39px/100% calc(100% - 39px) no-repeat; - background-color: #fff; - grid-column: 2; - grid-row: 1; - padding-inline-end: 8px; - padding-inline-start: 4px; - padding-top: 5px; -} -.tox .tox-promotion-link { - align-items: unsafe center; - background-color: #e8f1f8; - border-radius: 5px; - color: #086be6; - cursor: pointer; - display: flex; - font-size: 14px; - height: 26.6px; - padding: 4px 8px; - white-space: nowrap; -} -.tox .tox-promotion-link:hover { - background-color: #b4d7ff; -} -.tox .tox-promotion-link:focus { - background-color: #d9edf7; -} -.tox .tox-mbtn { - align-items: center; - background: 0 0; - border: 0; - border-radius: 3px; - box-shadow: none; - color: #222f3e; - display: flex; - flex: 0 0 auto; - font-size: 14px; - font-style: normal; - font-weight: 400; - height: 28px; - justify-content: center; - margin: 5px 1px 6px 0; - outline: 0; - overflow: hidden; - padding: 0 4px; - text-transform: none; - width: auto; -} -.tox .tox-mbtn[disabled] { - background-color: transparent; - border: 0; - box-shadow: none; - color: rgba(34, 47, 62, 0.5); - cursor: not-allowed; -} -.tox .tox-mbtn:focus:not(:disabled) { - background: #cce2fa; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-mbtn--active { - background: #a6ccf7; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active) { - background: #cce2fa; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-mbtn__select-label { - cursor: default; - font-weight: 400; - margin: 0 4px; -} -.tox .tox-mbtn[disabled] .tox-mbtn__select-label { - cursor: not-allowed; -} -.tox .tox-mbtn__select-chevron { - align-items: center; - display: flex; - justify-content: center; - width: 16px; - display: none; -} -.tox .tox-notification { - border-radius: 6px; - border-style: solid; - border-width: 1px; - box-shadow: none; - box-sizing: border-box; - display: grid; - font-size: 14px; - font-weight: 400; - grid-template-columns: minmax(40px, 1fr) auto minmax(40px, 1fr); - margin-top: 4px; - opacity: 0; - padding: 4px; - transition: - transform 0.1s ease-in, - opacity 150ms ease-in; -} -.tox .tox-notification p { - font-size: 14px; - font-weight: 400; -} -.tox .tox-notification a { - cursor: pointer; - text-decoration: underline; -} -.tox .tox-notification--in { - opacity: 1; -} -.tox .tox-notification--success { - background-color: #e4eeda; - border-color: #d7e6c8; - color: #222f3e; -} -.tox .tox-notification--success p { - color: #222f3e; -} -.tox .tox-notification--success a { - color: #517342; -} -.tox .tox-notification--success svg { - fill: #222f3e; -} -.tox .tox-notification--error { - background-color: #f5cccc; - border-color: #f0b3b3; - color: #222f3e; -} -.tox .tox-notification--error p { - color: #222f3e; -} -.tox .tox-notification--error a { - color: #77181f; -} -.tox .tox-notification--error svg { - fill: #222f3e; -} -.tox .tox-notification--warn, -.tox .tox-notification--warning { - background-color: #fff5cc; - border-color: #fff0b3; - color: #222f3e; -} -.tox .tox-notification--warn p, -.tox .tox-notification--warning p { - color: #222f3e; -} -.tox .tox-notification--warn a, -.tox .tox-notification--warning a { - color: #7a6e25; -} -.tox .tox-notification--warn svg, -.tox .tox-notification--warning svg { - fill: #222f3e; -} -.tox .tox-notification--info { - background-color: #d6e7fb; - border-color: #c1dbf9; - color: #222f3e; -} -.tox .tox-notification--info p { - color: #222f3e; -} -.tox .tox-notification--info a { - color: #2a64a6; -} -.tox .tox-notification--info svg { - fill: #222f3e; -} -.tox .tox-notification__body { - align-self: center; - color: #222f3e; - font-size: 14px; - grid-column-end: 3; - grid-column-start: 2; - grid-row-end: 2; - grid-row-start: 1; - text-align: center; - white-space: normal; - word-break: break-all; - word-break: break-word; -} -.tox .tox-notification__body > * { - margin: 0; -} -.tox .tox-notification__body > * + * { - margin-top: 1rem; -} -.tox .tox-notification__icon { - align-self: center; - grid-column-end: 2; - grid-column-start: 1; - grid-row-end: 2; - grid-row-start: 1; - justify-self: end; -} -.tox .tox-notification__icon svg { - display: block; -} -.tox .tox-notification__dismiss { - align-self: start; - grid-column-end: 4; - grid-column-start: 3; - grid-row-end: 2; - grid-row-start: 1; - justify-self: end; -} -.tox .tox-notification .tox-progress-bar { - grid-column-end: 4; - grid-column-start: 1; - grid-row-end: 3; - grid-row-start: 2; - justify-self: center; -} -.tox .tox-pop { - display: inline-block; - position: relative; -} -.tox .tox-pop--resizing { - transition: width 0.1s ease; -} -.tox .tox-pop--resizing .tox-toolbar, -.tox .tox-pop--resizing .tox-toolbar__group { - flex-wrap: nowrap; -} -.tox .tox-pop--transition { - transition: 0.15s ease; - transition-property: left, right, top, bottom; -} -.tox .tox-pop--transition::after, -.tox .tox-pop--transition::before { - transition: - all 0.15s, - visibility 0s, - opacity 75ms ease 75ms; -} -.tox .tox-pop__dialog { - background-color: #fff; - border: 1px solid #eee; - border-radius: 6px; - box-shadow: - 0 0 2px 0 rgba(34, 47, 62, 0.2), - 0 4px 8px 0 rgba(34, 47, 62, 0.15); - min-width: 0; - overflow: hidden; -} -.tox .tox-pop__dialog > :not(.tox-toolbar) { - margin: 4px 4px 4px 8px; -} -.tox .tox-pop__dialog .tox-toolbar { - background-color: transparent; - margin-bottom: -1px; -} -.tox .tox-pop::after, -.tox .tox-pop::before { - border-style: solid; - content: ""; - display: block; - height: 0; - opacity: 1; - position: absolute; - width: 0; -} -.tox .tox-pop.tox-pop--inset::after, -.tox .tox-pop.tox-pop--inset::before { - opacity: 0; - transition: - all 0s 0.15s, - visibility 0s, - opacity 75ms ease; -} -.tox .tox-pop.tox-pop--bottom::after, -.tox .tox-pop.tox-pop--bottom::before { - left: 50%; - top: 100%; -} -.tox .tox-pop.tox-pop--bottom::after { - border-color: #fff transparent transparent transparent; - border-width: 8px; - margin-left: -8px; - margin-top: -1px; -} -.tox .tox-pop.tox-pop--bottom::before { - border-color: #eee transparent transparent transparent; - border-width: 9px; - margin-left: -9px; -} -.tox .tox-pop.tox-pop--top::after, -.tox .tox-pop.tox-pop--top::before { - left: 50%; - top: 0; - transform: translateY(-100%); -} -.tox .tox-pop.tox-pop--top::after { - border-color: transparent transparent #fff transparent; - border-width: 8px; - margin-left: -8px; - margin-top: 1px; -} -.tox .tox-pop.tox-pop--top::before { - border-color: transparent transparent #eee transparent; - border-width: 9px; - margin-left: -9px; -} -.tox .tox-pop.tox-pop--left::after, -.tox .tox-pop.tox-pop--left::before { - left: 0; - top: calc(50% - 1px); - transform: translateY(-50%); -} -.tox .tox-pop.tox-pop--left::after { - border-color: transparent #fff transparent transparent; - border-width: 8px; - margin-left: -15px; -} -.tox .tox-pop.tox-pop--left::before { - border-color: transparent #eee transparent transparent; - border-width: 10px; - margin-left: -19px; -} -.tox .tox-pop.tox-pop--right::after, -.tox .tox-pop.tox-pop--right::before { - left: 100%; - top: calc(50% + 1px); - transform: translateY(-50%); -} -.tox .tox-pop.tox-pop--right::after { - border-color: transparent transparent transparent #fff; - border-width: 8px; - margin-left: -1px; -} -.tox .tox-pop.tox-pop--right::before { - border-color: transparent transparent transparent #eee; - border-width: 10px; - margin-left: -1px; -} -.tox .tox-pop.tox-pop--align-left::after, -.tox .tox-pop.tox-pop--align-left::before { - left: 20px; -} -.tox .tox-pop.tox-pop--align-right::after, -.tox .tox-pop.tox-pop--align-right::before { - left: calc(100% - 20px); -} -.tox .tox-sidebar-wrap { - display: flex; - flex-direction: row; - flex-grow: 1; - min-height: 0; -} -.tox .tox-sidebar { - background-color: #fff; - display: flex; - flex-direction: row; - justify-content: flex-end; -} -.tox .tox-sidebar__slider { - display: flex; - overflow: hidden; -} -.tox .tox-sidebar__pane-container { - display: flex; -} -.tox .tox-sidebar__pane { - display: flex; -} -.tox .tox-sidebar--sliding-closed { - opacity: 0; -} -.tox .tox-sidebar--sliding-open { - opacity: 1; -} -.tox .tox-sidebar--sliding-growing, -.tox .tox-sidebar--sliding-shrinking { - transition: - width 0.5s ease, - opacity 0.5s ease; -} -.tox .tox-selector { - background-color: #4099ff; - border-color: #4099ff; - border-style: solid; - border-width: 1px; - box-sizing: border-box; - display: inline-block; - height: 10px; - position: absolute; - width: 10px; -} -.tox.tox-platform-touch .tox-selector { - height: 12px; - width: 12px; -} -.tox .tox-slider { - align-items: center; - display: flex; - flex: 1; - height: 24px; - justify-content: center; - position: relative; -} -.tox .tox-slider__rail { - background-color: transparent; - border: 1px solid #eee; - border-radius: 6px; - height: 10px; - min-width: 120px; - width: 100%; -} -.tox .tox-slider__handle { - background-color: #006ce7; - border: 2px solid #0054b4; - border-radius: 6px; - box-shadow: none; - height: 24px; - left: 50%; - position: absolute; - top: 50%; - transform: translateX(-50%) translateY(-50%); - width: 14px; -} -.tox .tox-form__controls-h-stack > .tox-slider:not(:first-of-type) { - margin-inline-start: 8px; -} -.tox .tox-form__controls-h-stack > .tox-form__group + .tox-slider { - margin-inline-start: 32px; -} -.tox .tox-form__controls-h-stack > .tox-slider + .tox-form__group { - margin-inline-start: 32px; -} -.tox .tox-source-code { - overflow: auto; -} -.tox .tox-spinner { - display: flex; -} -.tox .tox-spinner > div { - animation: tam-bouncing-dots 1.5s ease-in-out 0s infinite both; - background-color: rgba(34, 47, 62, 0.7); - border-radius: 100%; - height: 8px; - width: 8px; -} -.tox .tox-spinner > div:nth-child(1) { - animation-delay: -0.32s; -} -.tox .tox-spinner > div:nth-child(2) { - animation-delay: -0.16s; -} -@keyframes tam-bouncing-dots { - 0%, - 100%, - 80% { - transform: scale(0); - } - 40% { - transform: scale(1); - } -} -.tox:not([dir="rtl"]) .tox-spinner > div:not(:first-child) { - margin-left: 4px; -} -.tox[dir="rtl"] .tox-spinner > div:not(:first-child) { - margin-right: 4px; -} -.tox .tox-statusbar { - align-items: center; - background-color: #fff; - border-top: 1px solid #e3e3e3; - color: rgba(34, 47, 62, 0.7); - display: flex; - flex: 0 0 auto; - font-size: 14px; - font-weight: 400; - height: 25px; - overflow: hidden; - padding: 0 8px; - position: relative; - text-transform: none; -} -.tox .tox-statusbar__path { - display: flex; - flex: 1 1 auto; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.tox .tox-statusbar__right-container { - display: flex; - justify-content: flex-end; - white-space: nowrap; -} -.tox .tox-statusbar__help-text { - text-align: center; -} -.tox .tox-statusbar__text-container { - display: flex; - flex: 1 1 auto; - justify-content: space-between; - overflow: hidden; -} -@media only screen and (min-width: 768px) { - .tox - .tox-statusbar__text-container.tox-statusbar__text-container-3-cols - > .tox-statusbar__help-text, - .tox - .tox-statusbar__text-container.tox-statusbar__text-container-3-cols - > .tox-statusbar__path, - .tox - .tox-statusbar__text-container.tox-statusbar__text-container-3-cols - > .tox-statusbar__right-container { - flex: 0 0 calc(100% / 3); - } -} -.tox .tox-statusbar__text-container.tox-statusbar__text-container--flex-end { - justify-content: flex-end; -} -.tox .tox-statusbar__text-container.tox-statusbar__text-container--flex-start { - justify-content: flex-start; -} -.tox - .tox-statusbar__text-container.tox-statusbar__text-container--space-around { - justify-content: space-around; -} -.tox .tox-statusbar__path > * { - display: inline; - white-space: nowrap; -} -.tox .tox-statusbar__wordcount { - flex: 0 0 auto; - margin-left: 1ch; -} -@media only screen and (max-width: 767px) { - .tox .tox-statusbar__text-container .tox-statusbar__help-text { - display: none; - } - .tox .tox-statusbar__text-container .tox-statusbar__help-text:only-child { - display: block; - } -} -.tox .tox-statusbar a, -.tox .tox-statusbar__path-item, -.tox .tox-statusbar__wordcount { - color: rgba(34, 47, 62, 0.7); - text-decoration: none; -} -.tox .tox-statusbar a:focus:not(:disabled):not([aria-disabled="true"]), -.tox .tox-statusbar a:hover:not(:disabled):not([aria-disabled="true"]), -.tox .tox-statusbar__path-item:focus:not(:disabled):not([aria-disabled="true"]), -.tox .tox-statusbar__path-item:hover:not(:disabled):not([aria-disabled="true"]), -.tox .tox-statusbar__wordcount:focus:not(:disabled):not([aria-disabled="true"]), -.tox - .tox-statusbar__wordcount:hover:not(:disabled):not([aria-disabled="true"]) { - color: #222f3e; - cursor: pointer; -} -.tox .tox-statusbar__branding svg { - fill: rgba(34, 47, 62, 0.8); - height: 1.14em; - vertical-align: -0.28em; - width: 3.6em; -} -.tox - .tox-statusbar__branding - a:focus:not(:disabled):not([aria-disabled="true"]) - svg, -.tox - .tox-statusbar__branding - a:hover:not(:disabled):not([aria-disabled="true"]) - svg { - fill: #222f3e; -} -.tox .tox-statusbar__resize-handle { - align-items: flex-end; - align-self: stretch; - cursor: nwse-resize; - display: flex; - flex: 0 0 auto; - justify-content: flex-end; - margin-left: auto; - margin-right: -8px; - padding-bottom: 3px; - padding-left: 1ch; - padding-right: 3px; -} -.tox .tox-statusbar__resize-handle svg { - display: block; - fill: rgba(34, 47, 62, 0.5); -} -.tox .tox-statusbar__resize-handle:focus svg { - background-color: #dee0e2; - border-radius: 1px 1px 5px 1px; - box-shadow: 0 0 0 2px #dee0e2; -} -.tox:not([dir="rtl"]) .tox-statusbar__path > * { - margin-right: 4px; -} -.tox:not([dir="rtl"]) .tox-statusbar__branding { - margin-left: 2ch; -} -.tox[dir="rtl"] .tox-statusbar { - flex-direction: row-reverse; -} -.tox[dir="rtl"] .tox-statusbar__path > * { - margin-left: 4px; -} -.tox .tox-throbber { - z-index: 1299; -} -.tox .tox-throbber__busy-spinner { - align-items: center; - background-color: rgba(255, 255, 255, 0.6); - bottom: 0; - display: flex; - justify-content: center; - left: 0; - position: absolute; - right: 0; - top: 0; -} -.tox .tox-tbtn { - align-items: center; - background: 0 0; - border: 0; - border-radius: 3px; - box-shadow: none; - color: #222f3e; - display: flex; - flex: 0 0 auto; - font-size: 14px; - font-style: normal; - font-weight: 400; - height: 28px; - justify-content: center; - margin: 6px 1px 5px 0; - outline: 0; - overflow: hidden; - padding: 0; - text-transform: none; - width: 34px; -} -.tox .tox-tbtn svg { - display: block; - fill: #222f3e; -} -.tox .tox-tbtn.tox-tbtn-more { - padding-left: 5px; - padding-right: 5px; - width: inherit; -} -.tox .tox-tbtn:focus { - background: #cce2fa; - border: 0; - box-shadow: none; -} -.tox .tox-tbtn:hover { - background: #cce2fa; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-tbtn:hover svg { - fill: #222f3e; -} -.tox .tox-tbtn:active { - background: #a6ccf7; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-tbtn:active svg { - fill: #222f3e; -} -.tox .tox-tbtn--disabled .tox-tbtn--enabled svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox .tox-tbtn--disabled, -.tox .tox-tbtn--disabled:hover, -.tox .tox-tbtn:disabled, -.tox .tox-tbtn:disabled:hover { - background: 0 0; - border: 0; - box-shadow: none; - color: rgba(34, 47, 62, 0.5); - cursor: not-allowed; -} -.tox .tox-tbtn--disabled svg, -.tox .tox-tbtn--disabled:hover svg, -.tox .tox-tbtn:disabled svg, -.tox .tox-tbtn:disabled:hover svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox .tox-tbtn--enabled, -.tox .tox-tbtn--enabled:hover { - background: #a6ccf7; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-tbtn--enabled:hover > *, -.tox .tox-tbtn--enabled > * { - transform: none; -} -.tox .tox-tbtn--enabled svg, -.tox .tox-tbtn--enabled:hover svg { - fill: #222f3e; -} -.tox .tox-tbtn--enabled.tox-tbtn--disabled svg, -.tox .tox-tbtn--enabled:hover.tox-tbtn--disabled svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) { - color: #222f3e; -} -.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) svg { - fill: #222f3e; -} -.tox .tox-tbtn:active > * { - transform: none; -} -.tox .tox-tbtn--md { - height: 42px; - width: 51px; -} -.tox .tox-tbtn--lg { - flex-direction: column; - height: 56px; - width: 68px; -} -.tox .tox-tbtn--return { - align-self: stretch; - height: unset; - width: 16px; -} -.tox .tox-tbtn--labeled { - padding: 0 4px; - width: unset; -} -.tox .tox-tbtn__vlabel { - display: block; - font-size: 10px; - font-weight: 400; - letter-spacing: -0.025em; - margin-bottom: 4px; - white-space: nowrap; -} -.tox .tox-number-input { - border-radius: 3px; - display: flex; - margin: 6px 1px 5px 0; - padding: 0 4px; - width: auto; -} -.tox .tox-number-input .tox-input-wrapper { - background: #f7f7f7; - display: flex; - pointer-events: none; - text-align: center; -} -.tox .tox-number-input .tox-input-wrapper:focus { - background: #cce2fa; -} -.tox .tox-number-input input { - border-radius: 3px; - color: #222f3e; - font-size: 14px; - margin: 2px 0; - pointer-events: all; - width: 60px; -} -.tox .tox-number-input input:hover { - background: #cce2fa; - color: #222f3e; -} -.tox .tox-number-input input:focus { - background: #fff; - color: #222f3e; -} -.tox .tox-number-input input:disabled { - background: 0 0; - border: 0; - box-shadow: none; - color: rgba(34, 47, 62, 0.5); - cursor: not-allowed; -} -.tox .tox-number-input button { - background: #f7f7f7; - color: #222f3e; - height: 28px; - text-align: center; - width: 24px; -} -.tox .tox-number-input button svg { - display: block; - fill: #222f3e; - margin: 0 auto; - transform: scale(0.67); -} -.tox .tox-number-input button:focus { - background: #cce2fa; -} -.tox .tox-number-input button:hover { - background: #cce2fa; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-number-input button:hover svg { - fill: #222f3e; -} -.tox .tox-number-input button:active { - background: #a6ccf7; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-number-input button:active svg { - fill: #222f3e; -} -.tox .tox-number-input button:disabled { - background: 0 0; - border: 0; - box-shadow: none; - color: rgba(34, 47, 62, 0.5); - cursor: not-allowed; -} -.tox .tox-number-input button:disabled svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox .tox-number-input button.minus { - border-radius: 3px 0 0 3px; -} -.tox .tox-number-input button.plus { - border-radius: 0 3px 3px 0; -} -.tox .tox-number-input:focus:not(:active) > .tox-input-wrapper, -.tox .tox-number-input:focus:not(:active) > button { - background: #cce2fa; -} -.tox .tox-tbtn--select { - margin: 6px 1px 5px 0; - padding: 0 4px; - width: auto; -} -.tox .tox-tbtn__select-label { - cursor: default; - font-weight: 400; - height: initial; - margin: 0 4px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.tox .tox-tbtn__select-chevron { - align-items: center; - display: flex; - justify-content: center; - width: 16px; -} -.tox .tox-tbtn__select-chevron svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox .tox-tbtn--bespoke { - background: #f7f7f7; -} -.tox .tox-tbtn--bespoke + .tox-tbtn--bespoke { - margin-inline-start: 4px; -} -.tox .tox-tbtn--bespoke .tox-tbtn__select-label { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - width: 7em; -} -.tox .tox-tbtn--disabled .tox-tbtn__select-label, -.tox .tox-tbtn--select:disabled .tox-tbtn__select-label { - cursor: not-allowed; -} -.tox .tox-split-button { - border: 0; - border-radius: 3px; - box-sizing: border-box; - display: flex; - margin: 6px 1px 5px 0; - overflow: hidden; -} -.tox .tox-split-button:hover { - box-shadow: 0 0 0 1px #cce2fa inset; -} -.tox .tox-split-button:focus { - background: #cce2fa; - box-shadow: none; - color: #222f3e; -} -.tox .tox-split-button > * { - border-radius: 0; -} -.tox .tox-split-button__chevron { - width: 16px; -} -.tox .tox-split-button__chevron svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox .tox-split-button .tox-tbtn { - margin: 0; -} -.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus, -.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover, -.tox .tox-split-button.tox-tbtn--disabled:focus, -.tox .tox-split-button.tox-tbtn--disabled:hover { - background: 0 0; - box-shadow: none; - color: rgba(34, 47, 62, 0.5); -} -.tox.tox-platform-touch .tox-split-button .tox-tbtn--select { - padding: 0 0; -} -.tox.tox-platform-touch - .tox-split-button - .tox-tbtn:not(.tox-tbtn--select):first-child { - width: 30px; -} -.tox.tox-platform-touch .tox-split-button__chevron { - width: 20px; -} -.tox - .tox-split-button.tox-tbtn--disabled - svg - #tox-icon-highlight-bg-color__color, -.tox .tox-split-button.tox-tbtn--disabled svg #tox-icon-text-color__color { - opacity: 0.6; -} -.tox .tox-toolbar-overlord { - background-color: #fff; -} -.tox .tox-toolbar, -.tox .tox-toolbar__overflow, -.tox .tox-toolbar__primary { - background-attachment: local; - background-color: #fff; - background-image: repeating-linear-gradient( - #e3e3e3 0 1px, - transparent 1px 39px - ); - background-position: center top 40px; - background-repeat: no-repeat; - background-size: calc(100% - 11px * 2) calc(100% - 41px); - display: flex; - flex: 0 0 auto; - flex-shrink: 0; - flex-wrap: wrap; - padding: 0 0; - transform: perspective(1px); -} -.tox .tox-toolbar-overlord > .tox-toolbar, -.tox .tox-toolbar-overlord > .tox-toolbar__overflow, -.tox .tox-toolbar-overlord > .tox-toolbar__primary { - background-position: center top 0; - background-size: calc(100% - 11px * 2) calc(100% - 0px); -} -.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed { - height: 0; - opacity: 0; - padding-bottom: 0; - padding-top: 0; - visibility: hidden; -} -.tox .tox-toolbar__overflow--growing { - transition: - height 0.3s ease, - opacity 0.2s linear 0.1s; -} -.tox .tox-toolbar__overflow--shrinking { - transition: - opacity 0.3s ease, - height 0.2s linear 0.1s, - visibility 0s linear 0.3s; -} -.tox .tox-anchorbar, -.tox .tox-toolbar-overlord { - grid-column: 1/-1; -} -.tox .tox-menubar + .tox-toolbar, -.tox .tox-menubar + .tox-toolbar-overlord { - border-top: 1px solid transparent; - margin-top: -1px; - padding-bottom: 1px; - padding-top: 1px; -} -.tox .tox-toolbar--scrolling { - flex-wrap: nowrap; - overflow-x: auto; -} -.tox .tox-pop .tox-toolbar { - border-width: 0; -} -.tox .tox-toolbar--no-divider { - background-image: none; -} -.tox - .tox-toolbar-overlord - .tox-toolbar:not(.tox-toolbar--scrolling):first-child, -.tox .tox-toolbar-overlord .tox-toolbar__primary { - background-position: center top 39px; -} -.tox .tox-editor-header > .tox-toolbar--scrolling, -.tox .tox-toolbar-overlord .tox-toolbar--scrolling:first-child { - background-image: none; -} -.tox.tox-tinymce-aux .tox-toolbar__overflow { - background-color: #fff; - background-position: center top 43px; - background-size: calc(100% - 8px * 2) calc(100% - 51px); - border: none; - border-radius: 6px; - box-shadow: - 0 0 2px 0 rgba(34, 47, 62, 0.2), - 0 4px 8px 0 rgba(34, 47, 62, 0.15); - overscroll-behavior: none; - padding: 4px 0; -} -.tox-pop .tox-pop__dialog .tox-toolbar { - background-position: center top 43px; - background-size: calc(100% - 11px * 2) calc(100% - 51px); - padding: 4px 0; -} -.tox .tox-toolbar__group { - align-items: center; - display: flex; - flex-wrap: wrap; - margin: 0 0; - padding: 0 11px 0 12px; -} -.tox .tox-toolbar__group--pull-right { - margin-left: auto; -} -.tox .tox-toolbar--scrolling .tox-toolbar__group { - flex-shrink: 0; - flex-wrap: nowrap; -} -.tox:not([dir="rtl"]) .tox-toolbar__group:not(:last-of-type) { - border-right: 1px solid transparent; -} -.tox[dir="rtl"] .tox-toolbar__group:not(:last-of-type) { - border-left: 1px solid transparent; -} -.tox .tox-tooltip { - display: inline-block; - padding: 8px; - position: relative; -} -.tox .tox-tooltip__body { - background-color: #222f3e; - border-radius: 6px; - box-shadow: 0 2px 4px rgba(34, 47, 62, 0.3); - color: rgba(255, 255, 255, 0.75); - font-size: 14px; - font-style: normal; - font-weight: 400; - padding: 4px 8px; - text-transform: none; -} -.tox .tox-tooltip__arrow { - position: absolute; -} -.tox .tox-tooltip--down .tox-tooltip__arrow { - border-left: 8px solid transparent; - border-right: 8px solid transparent; - border-top: 8px solid #222f3e; - bottom: 0; - left: 50%; - position: absolute; - transform: translateX(-50%); -} -.tox .tox-tooltip--up .tox-tooltip__arrow { - border-bottom: 8px solid #222f3e; - border-left: 8px solid transparent; - border-right: 8px solid transparent; - left: 50%; - position: absolute; - top: 0; - transform: translateX(-50%); -} -.tox .tox-tooltip--right .tox-tooltip__arrow { - border-bottom: 8px solid transparent; - border-left: 8px solid #222f3e; - border-top: 8px solid transparent; - position: absolute; - right: 0; - top: 50%; - transform: translateY(-50%); -} -.tox .tox-tooltip--left .tox-tooltip__arrow { - border-bottom: 8px solid transparent; - border-right: 8px solid #222f3e; - border-top: 8px solid transparent; - left: 0; - position: absolute; - top: 50%; - transform: translateY(-50%); -} -.tox .tox-tree { - display: flex; - flex-direction: column; -} -.tox .tox-tree .tox-trbtn { - align-items: center; - background: 0 0; - border: 0; - border-radius: 4px; - box-shadow: none; - color: #222f3e; - display: flex; - flex: 0 0 auto; - font-size: 14px; - font-style: normal; - font-weight: 400; - height: 28px; - margin-bottom: 4px; - margin-top: 4px; - outline: 0; - overflow: hidden; - padding: 0; - padding-left: 8px; - text-transform: none; -} -.tox .tox-tree .tox-trbtn .tox-tree__label { - cursor: default; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.tox .tox-tree .tox-trbtn svg { - display: block; - fill: #222f3e; -} -.tox .tox-tree .tox-trbtn:focus { - background: #cce2fa; - border: 0; - box-shadow: none; -} -.tox .tox-tree .tox-trbtn:hover { - background: #cce2fa; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-tree .tox-trbtn:hover svg { - fill: #222f3e; -} -.tox .tox-tree .tox-trbtn:active { - background: #a6ccf7; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-tree .tox-trbtn:active svg { - fill: #222f3e; -} -.tox .tox-tree .tox-trbtn--disabled, -.tox .tox-tree .tox-trbtn--disabled:hover, -.tox .tox-tree .tox-trbtn:disabled, -.tox .tox-tree .tox-trbtn:disabled:hover { - background: 0 0; - border: 0; - box-shadow: none; - color: rgba(34, 47, 62, 0.5); - cursor: not-allowed; -} -.tox .tox-tree .tox-trbtn--disabled svg, -.tox .tox-tree .tox-trbtn--disabled:hover svg, -.tox .tox-tree .tox-trbtn:disabled svg, -.tox .tox-tree .tox-trbtn:disabled:hover svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox .tox-tree .tox-trbtn--enabled, -.tox .tox-tree .tox-trbtn--enabled:hover { - background: #a6ccf7; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-tree .tox-trbtn--enabled:hover > *, -.tox .tox-tree .tox-trbtn--enabled > * { - transform: none; -} -.tox .tox-tree .tox-trbtn--enabled svg, -.tox .tox-tree .tox-trbtn--enabled:hover svg { - fill: #222f3e; -} -.tox .tox-tree .tox-trbtn:focus:not(.tox-trbtn--disabled) { - color: #222f3e; -} -.tox .tox-tree .tox-trbtn:focus:not(.tox-trbtn--disabled) svg { - fill: #222f3e; -} -.tox .tox-tree .tox-trbtn:active > * { - transform: none; -} -.tox .tox-tree .tox-trbtn--return { - align-self: stretch; - height: unset; - width: 16px; -} -.tox .tox-tree .tox-trbtn--labeled { - padding: 0 4px; - width: unset; -} -.tox .tox-tree .tox-trbtn__vlabel { - display: block; - font-size: 10px; - font-weight: 400; - letter-spacing: -0.025em; - margin-bottom: 4px; - white-space: nowrap; -} -.tox .tox-tree .tox-tree--directory { - display: flex; - flex-direction: column; -} -.tox .tox-tree .tox-tree--directory .tox-tree--directory__label { - font-weight: 700; -} -.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn { - margin-left: auto; -} -.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn svg { - fill: transparent; -} -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label - .tox-mbtn.tox-mbtn--active - svg, -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label - .tox-mbtn:focus - svg { - fill: #222f3e; -} -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label:focus - .tox-mbtn - svg, -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label:hover - .tox-mbtn - svg { - fill: #222f3e; -} -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label:hover:has(.tox-mbtn:hover) { - background-color: transparent; - color: #222f3e; -} -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label:hover:has(.tox-mbtn:hover) - .tox-chevron - svg { - fill: #222f3e; -} -.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-chevron { - margin-right: 6px; -} -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label:has(+ .tox-tree--directory__children--growing) - .tox-chevron, -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label:has(+ .tox-tree--directory__children--shrinking) - .tox-chevron { - transition: transform 0.5s ease-in-out; -} -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label:has(+ .tox-tree--directory__children--growing) - .tox-chevron, -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label:has(+ .tox-tree--directory__children--open) - .tox-chevron { - transform: rotate(90deg); -} -.tox .tox-tree .tox-tree--leaf__label { - font-weight: 400; -} -.tox .tox-tree .tox-tree--leaf__label .tox-mbtn { - margin-left: auto; -} -.tox .tox-tree .tox-tree--leaf__label .tox-mbtn svg { - fill: transparent; -} -.tox .tox-tree .tox-tree--leaf__label .tox-mbtn.tox-mbtn--active svg, -.tox .tox-tree .tox-tree--leaf__label .tox-mbtn:focus svg { - fill: #222f3e; -} -.tox .tox-tree .tox-tree--leaf__label:hover .tox-mbtn svg { - fill: #222f3e; -} -.tox .tox-tree .tox-tree--leaf__label:hover:has(.tox-mbtn:hover) { - background-color: transparent; - color: #222f3e; -} -.tox - .tox-tree - .tox-tree--leaf__label:hover:has(.tox-mbtn:hover) - .tox-chevron - svg { - fill: #222f3e; -} -.tox .tox-tree .tox-tree--directory__children { - overflow: hidden; - padding-left: 16px; -} -.tox - .tox-tree - .tox-tree--directory__children.tox-tree--directory__children--growing, -.tox - .tox-tree - .tox-tree--directory__children.tox-tree--directory__children--shrinking { - transition: height 0.5s ease-in-out; -} -.tox .tox-tree .tox-trbtn.tox-tree--leaf__label { - display: flex; - justify-content: space-between; -} -.tox .tox-view-wrap, -.tox .tox-view-wrap__slot-container { - background-color: #fff; - display: flex; - flex: 1; - flex-direction: column; -} -.tox .tox-view { - display: flex; - flex: 1 1 auto; - flex-direction: column; - overflow: hidden; -} -.tox .tox-view__header { - align-items: center; - display: flex; - font-size: 16px; - justify-content: space-between; - padding: 8px 8px 0 8px; - position: relative; -} -.tox .tox-view--mobile.tox-view__header, -.tox .tox-view--mobile.tox-view__toolbar { - padding: 8px; -} -.tox .tox-view--scrolling { - flex-wrap: nowrap; - overflow-x: auto; -} -.tox .tox-view__toolbar { - display: flex; - flex-direction: row; - gap: 8px; - justify-content: space-between; - padding: 8px 8px 0 8px; -} -.tox .tox-view__toolbar__group { - display: flex; - flex-direction: row; - gap: 12px; -} -.tox .tox-view__header-end, -.tox .tox-view__header-start { - display: flex; -} -.tox .tox-view__pane { - height: 100%; - padding: 8px; - width: 100%; -} -.tox .tox-view__pane_panel { - border: 1px solid #eee; - border-radius: 6px; -} -.tox:not([dir="rtl"]) .tox-view__header .tox-view__header-end > *, -.tox:not([dir="rtl"]) .tox-view__header .tox-view__header-start > * { - margin-left: 8px; -} -.tox[dir="rtl"] .tox-view__header .tox-view__header-end > *, -.tox[dir="rtl"] .tox-view__header .tox-view__header-start > * { - margin-right: 8px; -} -.tox .tox-well { - border: 1px solid #eee; - border-radius: 6px; - padding: 8px; - width: 100%; -} -.tox .tox-well > :first-child { - margin-top: 0; -} -.tox .tox-well > :last-child { - margin-bottom: 0; -} -.tox .tox-well > :only-child { - margin: 0; -} -.tox .tox-custom-editor { - border: 1px solid #eee; - border-radius: 6px; - display: flex; - flex: 1; - overflow: hidden; - position: relative; -} -.tox .tox-dialog-loading::before { - background-color: rgba(0, 0, 0, 0.5); - content: ""; - height: 100%; - position: absolute; - width: 100%; - z-index: 1000; -} -.tox .tox-tab { - cursor: pointer; -} -.tox .tox-dialog__content-js { - display: flex; - flex: 1; -} -.tox .tox-dialog__body-content .tox-collection { - display: flex; - flex: 1; -} diff --git a/src/lib/dist/tinymce/skins/ui/oxide/skin.shadowdom.min.css b/src/lib/dist/tinymce/skins/ui/oxide/skin.shadowdom.min.css deleted file mode 100644 index 59b24da3..00000000 --- a/src/lib/dist/tinymce/skins/ui/oxide/skin.shadowdom.min.css +++ /dev/null @@ -1,30 +0,0 @@ -body.tox-dialog__disable-scroll { - overflow: hidden; -} -.tox-fullscreen { - border: 0; - height: 100%; - margin: 0; - overflow: hidden; - overscroll-behavior: none; - padding: 0; - touch-action: pinch-zoom; - width: 100%; -} -.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle { - display: none; -} -.tox-shadowhost.tox-fullscreen, -.tox.tox-tinymce.tox-fullscreen { - left: 0; - position: fixed; - top: 0; - z-index: 1200; -} -.tox.tox-tinymce.tox-fullscreen { - background-color: transparent; -} -.tox-fullscreen .tox.tox-tinymce-aux, -.tox-fullscreen ~ .tox.tox-tinymce-aux { - z-index: 1201; -} diff --git a/src/lib/dist/tinymce/skins/ui/stocknear/content.inline.min.css b/src/lib/dist/tinymce/skins/ui/stocknear/content.inline.min.css deleted file mode 100644 index 4a836dc0..00000000 --- a/src/lib/dist/tinymce/skins/ui/stocknear/content.inline.min.css +++ /dev/null @@ -1,796 +0,0 @@ -.mce-content-body .mce-item-anchor { - background: transparent - url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") - no-repeat center; -} -.mce-content-body .mce-item-anchor:empty { - cursor: default; - display: inline-block; - height: 12px !important; - padding: 0 2px; - -webkit-user-modify: read-only; - -moz-user-modify: read-only; - -webkit-user-select: all; - -moz-user-select: all; - user-select: all; - width: 8px !important; -} -.mce-content-body .mce-item-anchor:not(:empty) { - background-position-x: 2px; - display: inline-block; - padding-left: 12px; -} -.mce-content-body .mce-item-anchor[data-mce-selected] { - outline-offset: 1px; -} -.tox-comments-visible - .tox-comment[contenteditable="false"]:not([data-mce-selected]), -.tox-comments-visible span.tox-comment img:not([data-mce-selected]), -.tox-comments-visible - span.tox-comment - span.mce-preview-object:not([data-mce-selected]), -.tox-comments-visible span.tox-comment > audio:not([data-mce-selected]), -.tox-comments-visible span.tox-comment > video:not([data-mce-selected]) { - outline: 3px solid #ffe89d; -} -.tox-comments-visible - .tox-comment[contenteditable="false"][data-mce-annotation-active="true"]:not( - [data-mce-selected] - ) { - outline: 3px solid #fed635; -} -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"] - img:not([data-mce-selected]), -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"] - span.mce-preview-object:not([data-mce-selected]), -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"] - > audio:not([data-mce-selected]), -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"] - > video:not([data-mce-selected]) { - outline: 3px solid #fed635; -} -.tox-comments-visible span.tox-comment:not([data-mce-selected]) { - background-color: #ffe89d; - outline: 0; -} -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"]:not( - [data-mce-selected="inline-boundary"] - ) { - background-color: #fed635; -} -.tox-checklist > li:not(.tox-checklist--hidden) { - list-style: none; - margin: 0.25em 0; -} -.tox-checklist > li:not(.tox-checklist--hidden)::before { - content: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A"); - cursor: pointer; - height: 1em; - margin-left: -1.5em; - margin-top: 0.125em; - position: absolute; - width: 1em; -} -.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before { - content: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A"); -} -[dir="rtl"] .tox-checklist > li:not(.tox-checklist--hidden)::before { - margin-left: 0; - margin-right: -1.5em; -} -code[class*="language-"], -pre[class*="language-"] { - color: #000; - background: 0 0; - text-shadow: 0 1px #fff; - font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace; - font-size: 1em; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: 1.5; - -moz-tab-size: 4; - tab-size: 4; - -webkit-hyphens: none; - hyphens: none; -} -code[class*="language-"] ::-moz-selection, -code[class*="language-"]::-moz-selection, -pre[class*="language-"] ::-moz-selection, -pre[class*="language-"]::-moz-selection { - text-shadow: none; - background: #b3d4fc; -} -code[class*="language-"] ::selection, -code[class*="language-"]::selection, -pre[class*="language-"] ::selection, -pre[class*="language-"]::selection { - text-shadow: none; - background: #b3d4fc; -} -@media print { - code[class*="language-"], - pre[class*="language-"] { - text-shadow: none; - } -} -pre[class*="language-"] { - padding: 1em; - margin: 0.5em 0; - overflow: auto; -} -:not(pre) > code[class*="language-"], -pre[class*="language-"] { - background: #f5f2f0; -} -:not(pre) > code[class*="language-"] { - padding: 0.1em; - border-radius: 0.3em; - white-space: normal; -} -.token.cdata, -.token.comment, -.token.doctype, -.token.prolog { - color: #708090; -} -.token.punctuation { - color: #999; -} -.token.namespace { - opacity: 0.7; -} -.token.boolean, -.token.constant, -.token.deleted, -.token.number, -.token.property, -.token.symbol, -.token.tag { - color: #905; -} -.token.attr-name, -.token.builtin, -.token.char, -.token.inserted, -.token.selector, -.token.string { - color: #690; -} -.language-css .token.string, -.style .token.string, -.token.entity, -.token.operator, -.token.url { - color: #9a6e3a; - background: hsla(0, 0%, 100%, 0.5); -} -.token.atrule, -.token.attr-value, -.token.keyword { - color: #07a; -} -.token.class-name, -.token.function { - color: #dd4a68; -} -.token.important, -.token.regex, -.token.variable { - color: #e90; -} -.token.bold, -.token.important { - font-weight: 700; -} -.token.italic { - font-style: italic; -} -.token.entity { - cursor: help; -} -.mce-content-body { - overflow-wrap: break-word; - word-wrap: break-word; -} -.mce-content-body .mce-visual-caret { - background-color: #000; - background-color: currentColor; - position: absolute; -} -.mce-content-body .mce-visual-caret-hidden { - display: none; -} -.mce-content-body [data-mce-caret] { - left: -1000px; - margin: 0; - padding: 0; - position: absolute; - right: auto; - top: 0; -} -.mce-content-body .mce-offscreen-selection { - left: -2000000px; - max-width: 1000000px; - position: absolute; -} -.mce-content-body [contentEditable="false"] { - cursor: default; -} -.mce-content-body [contentEditable="true"] { - cursor: text; -} -.tox-cursor-format-painter { - cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), - default; -} -div.mce-footnotes hr { - margin-inline-end: auto; - margin-inline-start: 0; - width: 25%; -} -div.mce-footnotes li > a.mce-footnotes-backlink { - text-decoration: none; -} -@media print { - sup.mce-footnote a { - color: #000; - text-decoration: none; - } - div.mce-footnotes { - break-inside: avoid; - width: 100%; - } - div.mce-footnotes li > a.mce-footnotes-backlink { - display: none; - } -} -.mce-content-body figure.align-left { - float: left; -} -.mce-content-body figure.align-right { - float: right; -} -.mce-content-body figure.image.align-center { - display: table; - margin-left: auto; - margin-right: auto; -} -.mce-preview-object { - border: 1px solid gray; - display: inline-block; - line-height: 0; - margin: 0 2px 0 2px; - position: relative; -} -.mce-preview-object .mce-shim { - background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} -.mce-preview-object[data-mce-selected="2"] .mce-shim { - display: none; -} -.mce-content-body .mce-mergetag { - cursor: default !important; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.mce-content-body .mce-mergetag:hover { - background-color: rgba(0, 108, 231, 0.1); -} -.mce-content-body .mce-mergetag-affix { - background-color: rgba(0, 108, 231, 0.1); - color: #006ce7; -} -.mce-object { - background: transparent - url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") - no-repeat center; - border: 1px dashed #aaa; -} -.mce-pagebreak { - border: 1px dashed #aaa; - cursor: default; - display: block; - height: 5px; - margin-top: 15px; - page-break-before: always; - width: 100%; -} -@media print { - .mce-pagebreak { - border: 0; - } -} -.tiny-pageembed .mce-shim { - background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} -.tiny-pageembed[data-mce-selected="2"] .mce-shim { - display: none; -} -.tiny-pageembed { - display: inline-block; - position: relative; -} -.tiny-pageembed--16by9, -.tiny-pageembed--1by1, -.tiny-pageembed--21by9, -.tiny-pageembed--4by3 { - display: block; - overflow: hidden; - padding: 0; - position: relative; - width: 100%; -} -.tiny-pageembed--21by9 { - padding-top: 42.857143%; -} -.tiny-pageembed--16by9 { - padding-top: 56.25%; -} -.tiny-pageembed--4by3 { - padding-top: 75%; -} -.tiny-pageembed--1by1 { - padding-top: 100%; -} -.tiny-pageembed--16by9 iframe, -.tiny-pageembed--1by1 iframe, -.tiny-pageembed--21by9 iframe, -.tiny-pageembed--4by3 iframe { - border: 0; - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} -.mce-content-body[data-mce-placeholder] { - position: relative; -} -.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before { - color: rgba(34, 47, 62, 0.7); - content: attr(data-mce-placeholder); - position: absolute; -} -.mce-content-body:not([dir="rtl"])[data-mce-placeholder]:not( - .mce-visualblocks - )::before { - left: 1px; -} -.mce-content-body[dir="rtl"][data-mce-placeholder]:not( - .mce-visualblocks - )::before { - right: 1px; -} -.mce-content-body div.mce-resizehandle { - background-color: #4099ff; - border-color: #4099ff; - border-style: solid; - border-width: 1px; - box-sizing: border-box; - height: 10px; - position: absolute; - width: 10px; - z-index: 1298; -} -.mce-content-body div.mce-resizehandle:hover { - background-color: #4099ff; -} -.mce-content-body div.mce-resizehandle:nth-of-type(1) { - cursor: nwse-resize; -} -.mce-content-body div.mce-resizehandle:nth-of-type(2) { - cursor: nesw-resize; -} -.mce-content-body div.mce-resizehandle:nth-of-type(3) { - cursor: nwse-resize; -} -.mce-content-body div.mce-resizehandle:nth-of-type(4) { - cursor: nesw-resize; -} -.mce-content-body .mce-resize-backdrop { - z-index: 10000; -} -.mce-content-body .mce-clonedresizable { - cursor: default; - opacity: 0.5; - outline: 1px dashed #000; - position: absolute; - z-index: 10001; -} -.mce-content-body .mce-clonedresizable.mce-resizetable-columns td, -.mce-content-body .mce-clonedresizable.mce-resizetable-columns th { - border: 0; -} -.mce-content-body .mce-resize-helper { - background: #555; - background: rgba(0, 0, 0, 0.75); - border: 1px; - border-radius: 3px; - color: #fff; - display: none; - font-family: sans-serif; - font-size: 12px; - line-height: 14px; - margin: 5px 10px; - padding: 5px; - position: absolute; - white-space: nowrap; - z-index: 10002; -} -.tox-rtc-user-selection { - position: relative; -} -.tox-rtc-user-cursor { - bottom: 0; - cursor: default; - position: absolute; - top: 0; - width: 2px; -} -.tox-rtc-user-cursor::before { - background-color: inherit; - border-radius: 50%; - content: ""; - display: block; - height: 8px; - position: absolute; - right: -3px; - top: -3px; - width: 8px; -} -.tox-rtc-user-cursor:hover::after { - background-color: inherit; - border-radius: 100px; - box-sizing: border-box; - color: #fff; - content: attr(data-user); - display: block; - font-size: 12px; - font-weight: 700; - left: -5px; - min-height: 8px; - min-width: 8px; - padding: 0 12px; - position: absolute; - top: -11px; - white-space: nowrap; - z-index: 1000; -} -.tox-rtc-user-selection--1 .tox-rtc-user-cursor { - background-color: #2dc26b; -} -.tox-rtc-user-selection--2 .tox-rtc-user-cursor { - background-color: #e03e2d; -} -.tox-rtc-user-selection--3 .tox-rtc-user-cursor { - background-color: #f1c40f; -} -.tox-rtc-user-selection--4 .tox-rtc-user-cursor { - background-color: #3598db; -} -.tox-rtc-user-selection--5 .tox-rtc-user-cursor { - background-color: #b96ad9; -} -.tox-rtc-user-selection--6 .tox-rtc-user-cursor { - background-color: #e67e23; -} -.tox-rtc-user-selection--7 .tox-rtc-user-cursor { - background-color: #aaa69d; -} -.tox-rtc-user-selection--8 .tox-rtc-user-cursor { - background-color: #f368e0; -} -.tox-rtc-remote-image { - background: #eaeaea - url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") - no-repeat center center; - border: 1px solid #ccc; - min-height: 240px; - min-width: 320px; -} -.mce-match-marker { - background: #aaa; - color: #fff; -} -.mce-match-marker-selected { - background: #39f; - color: #fff; -} -.mce-match-marker-selected::-moz-selection { - background: #39f; - color: #fff; -} -.mce-match-marker-selected::selection { - background: #39f; - color: #fff; -} -.mce-content-body audio[data-mce-selected], -.mce-content-body details[data-mce-selected], -.mce-content-body embed[data-mce-selected], -.mce-content-body img[data-mce-selected], -.mce-content-body object[data-mce-selected], -.mce-content-body table[data-mce-selected], -.mce-content-body video[data-mce-selected] { - outline: 3px solid #b4d7ff; -} -.mce-content-body hr[data-mce-selected] { - outline: 3px solid #b4d7ff; - outline-offset: 1px; -} -.mce-content-body [contentEditable="false"] [contentEditable="true"]:focus { - outline: 3px solid #b4d7ff; -} -.mce-content-body [contentEditable="false"] [contentEditable="true"]:hover { - outline: 3px solid #b4d7ff; -} -.mce-content-body [contentEditable="false"][data-mce-selected] { - cursor: not-allowed; - outline: 3px solid #b4d7ff; -} -.mce-content-body.mce-content-readonly [contentEditable="true"]:focus, -.mce-content-body.mce-content-readonly [contentEditable="true"]:hover { - outline: 0; -} -.mce-content-body [data-mce-selected="inline-boundary"] { - background-color: #b4d7ff; -} -.mce-content-body .mce-edit-focus { - outline: 3px solid #b4d7ff; -} -.mce-content-body td[data-mce-selected], -.mce-content-body th[data-mce-selected] { - position: relative; -} -.mce-content-body td[data-mce-selected]::-moz-selection, -.mce-content-body th[data-mce-selected]::-moz-selection { - background: 0 0; -} -.mce-content-body td[data-mce-selected]::selection, -.mce-content-body th[data-mce-selected]::selection { - background: 0 0; -} -.mce-content-body td[data-mce-selected] *, -.mce-content-body th[data-mce-selected] * { - outline: 0; - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.mce-content-body td[data-mce-selected]::after, -.mce-content-body th[data-mce-selected]::after { - background-color: rgba(180, 215, 255, 0.7); - border: 1px solid rgba(180, 215, 255, 0.7); - bottom: -1px; - content: ""; - left: -1px; - mix-blend-mode: multiply; - position: absolute; - right: -1px; - top: -1px; -} -@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { - .mce-content-body td[data-mce-selected]::after, - .mce-content-body th[data-mce-selected]::after { - border-color: rgba(0, 84, 180, 0.7); - } -} -.mce-content-body img[data-mce-selected]::-moz-selection { - background: 0 0; -} -.mce-content-body img[data-mce-selected]::selection { - background: 0 0; -} -.ephox-snooker-resizer-bar { - background-color: #b4d7ff; - opacity: 0; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.ephox-snooker-resizer-cols { - cursor: col-resize; -} -.ephox-snooker-resizer-rows { - cursor: row-resize; -} -.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging { - opacity: 1; -} -.mce-spellchecker-word { - background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A"); - background-position: 0 calc(100% + 1px); - background-repeat: repeat-x; - background-size: auto 6px; - cursor: default; - height: 2rem; -} -.mce-spellchecker-grammar { - background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A"); - background-position: 0 calc(100% + 1px); - background-repeat: repeat-x; - background-size: auto 6px; - cursor: default; -} -.mce-toc { - border: 1px solid gray; -} -.mce-toc h2 { - margin: 4px; -} -.mce-toc ul > li { - list-style-type: none; -} -[data-mce-block] { - display: block; -} -.mce-item-table:not([border]), -.mce-item-table:not([border]) caption, -.mce-item-table:not([border]) td, -.mce-item-table:not([border]) th, -.mce-item-table[border="0"], -.mce-item-table[border="0"] caption, -.mce-item-table[border="0"] td, -.mce-item-table[border="0"] th, -table[style*="border-width: 0px"], -table[style*="border-width: 0px"] caption, -table[style*="border-width: 0px"] td, -table[style*="border-width: 0px"] th { - border: 1px dashed #bbb; -} -.mce-visualblocks address, -.mce-visualblocks article, -.mce-visualblocks aside, -.mce-visualblocks blockquote, -.mce-visualblocks div:not([data-mce-bogus]), -.mce-visualblocks dl, -.mce-visualblocks figcaption, -.mce-visualblocks figure, -.mce-visualblocks h1, -.mce-visualblocks h2, -.mce-visualblocks h3, -.mce-visualblocks h4, -.mce-visualblocks h5, -.mce-visualblocks h6, -.mce-visualblocks hgroup, -.mce-visualblocks ol, -.mce-visualblocks p, -.mce-visualblocks pre, -.mce-visualblocks section, -.mce-visualblocks ul { - background-repeat: no-repeat; - border: 1px dashed #bbb; - margin-left: 3px; - padding-top: 10px; -} -.mce-visualblocks p { - background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7); -} -.mce-visualblocks h1 { - background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==); -} -.mce-visualblocks h2 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==); -} -.mce-visualblocks h3 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7); -} -.mce-visualblocks h4 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==); -} -.mce-visualblocks h5 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==); -} -.mce-visualblocks h6 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==); -} -.mce-visualblocks div:not([data-mce-bogus]) { - background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7); -} -.mce-visualblocks section { - background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=); -} -.mce-visualblocks article { - background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7); -} -.mce-visualblocks blockquote { - background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7); -} -.mce-visualblocks address { - background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=); -} -.mce-visualblocks pre { - background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==); -} -.mce-visualblocks figure { - background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7); -} -.mce-visualblocks figcaption { - border: 1px dashed #bbb; -} -.mce-visualblocks hgroup { - background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7); -} -.mce-visualblocks aside { - background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=); -} -.mce-visualblocks ul { - background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==); -} -.mce-visualblocks ol { - background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==); -} -.mce-visualblocks dl { - background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==); -} -.mce-visualblocks:not([dir="rtl"]) address, -.mce-visualblocks:not([dir="rtl"]) article, -.mce-visualblocks:not([dir="rtl"]) aside, -.mce-visualblocks:not([dir="rtl"]) blockquote, -.mce-visualblocks:not([dir="rtl"]) div:not([data-mce-bogus]), -.mce-visualblocks:not([dir="rtl"]) dl, -.mce-visualblocks:not([dir="rtl"]) figcaption, -.mce-visualblocks:not([dir="rtl"]) figure, -.mce-visualblocks:not([dir="rtl"]) h1, -.mce-visualblocks:not([dir="rtl"]) h2, -.mce-visualblocks:not([dir="rtl"]) h3, -.mce-visualblocks:not([dir="rtl"]) h4, -.mce-visualblocks:not([dir="rtl"]) h5, -.mce-visualblocks:not([dir="rtl"]) h6, -.mce-visualblocks:not([dir="rtl"]) hgroup, -.mce-visualblocks:not([dir="rtl"]) ol, -.mce-visualblocks:not([dir="rtl"]) p, -.mce-visualblocks:not([dir="rtl"]) pre, -.mce-visualblocks:not([dir="rtl"]) section, -.mce-visualblocks:not([dir="rtl"]) ul { - margin-left: 3px; -} -.mce-visualblocks[dir="rtl"] address, -.mce-visualblocks[dir="rtl"] article, -.mce-visualblocks[dir="rtl"] aside, -.mce-visualblocks[dir="rtl"] blockquote, -.mce-visualblocks[dir="rtl"] div:not([data-mce-bogus]), -.mce-visualblocks[dir="rtl"] dl, -.mce-visualblocks[dir="rtl"] figcaption, -.mce-visualblocks[dir="rtl"] figure, -.mce-visualblocks[dir="rtl"] h1, -.mce-visualblocks[dir="rtl"] h2, -.mce-visualblocks[dir="rtl"] h3, -.mce-visualblocks[dir="rtl"] h4, -.mce-visualblocks[dir="rtl"] h5, -.mce-visualblocks[dir="rtl"] h6, -.mce-visualblocks[dir="rtl"] hgroup, -.mce-visualblocks[dir="rtl"] ol, -.mce-visualblocks[dir="rtl"] p, -.mce-visualblocks[dir="rtl"] pre, -.mce-visualblocks[dir="rtl"] section, -.mce-visualblocks[dir="rtl"] ul { - background-position-x: right; - margin-right: 3px; -} -.mce-nbsp, -.mce-shy { - background: #aaa; -} -.mce-shy::after { - content: "-"; -} diff --git a/src/lib/dist/tinymce/skins/ui/stocknear/content.min.css b/src/lib/dist/tinymce/skins/ui/stocknear/content.min.css deleted file mode 100644 index 858baf36..00000000 --- a/src/lib/dist/tinymce/skins/ui/stocknear/content.min.css +++ /dev/null @@ -1,802 +0,0 @@ -.mce-content-body .mce-item-anchor { - background: transparent - url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") - no-repeat center; -} -.mce-content-body .mce-item-anchor:empty { - cursor: default; - display: inline-block; - height: 12px !important; - padding: 0 2px; - -webkit-user-modify: read-only; - -moz-user-modify: read-only; - -webkit-user-select: all; - -moz-user-select: all; - user-select: all; - width: 8px !important; -} -.mce-content-body .mce-item-anchor:not(:empty) { - background-position-x: 2px; - display: inline-block; - padding-left: 12px; -} -.mce-content-body .mce-item-anchor[data-mce-selected] { - outline-offset: 1px; -} -.tox-comments-visible - .tox-comment[contenteditable="false"]:not([data-mce-selected]), -.tox-comments-visible span.tox-comment img:not([data-mce-selected]), -.tox-comments-visible - span.tox-comment - span.mce-preview-object:not([data-mce-selected]), -.tox-comments-visible span.tox-comment > audio:not([data-mce-selected]), -.tox-comments-visible span.tox-comment > video:not([data-mce-selected]) { - outline: 3px solid #ffe89d; -} -.tox-comments-visible - .tox-comment[contenteditable="false"][data-mce-annotation-active="true"]:not( - [data-mce-selected] - ) { - outline: 3px solid #fed635; -} -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"] - img:not([data-mce-selected]), -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"] - span.mce-preview-object:not([data-mce-selected]), -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"] - > audio:not([data-mce-selected]), -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"] - > video:not([data-mce-selected]) { - outline: 3px solid #fed635; -} -.tox-comments-visible span.tox-comment:not([data-mce-selected]) { - background-color: #ffe89d; - outline: 0; -} -.tox-comments-visible - span.tox-comment[data-mce-annotation-active="true"]:not( - [data-mce-selected="inline-boundary"] - ) { - background-color: #fed635; -} -.tox-checklist > li:not(.tox-checklist--hidden) { - list-style: none; - margin: 0.25em 0; -} -.tox-checklist > li:not(.tox-checklist--hidden)::before { - content: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A"); - cursor: pointer; - height: 1em; - margin-left: -1.5em; - margin-top: 0.125em; - position: absolute; - width: 1em; -} -.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before { - content: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A"); -} -[dir="rtl"] .tox-checklist > li:not(.tox-checklist--hidden)::before { - margin-left: 0; - margin-right: -1.5em; -} -code[class*="language-"], -pre[class*="language-"] { - color: #000; - background: 0 0; - text-shadow: 0 1px #fff; - font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace; - font-size: 1em; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: 1.5; - -moz-tab-size: 4; - tab-size: 4; - -webkit-hyphens: none; - hyphens: none; -} -code[class*="language-"] ::-moz-selection, -code[class*="language-"]::-moz-selection, -pre[class*="language-"] ::-moz-selection, -pre[class*="language-"]::-moz-selection { - text-shadow: none; - background: #b3d4fc; -} -code[class*="language-"] ::selection, -code[class*="language-"]::selection, -pre[class*="language-"] ::selection, -pre[class*="language-"]::selection { - text-shadow: none; - background: #b3d4fc; -} -@media print { - code[class*="language-"], - pre[class*="language-"] { - text-shadow: none; - } -} -pre[class*="language-"] { - padding: 1em; - margin: 0.5em 0; - overflow: auto; -} -:not(pre) > code[class*="language-"], -pre[class*="language-"] { - background: #f5f2f0; -} -:not(pre) > code[class*="language-"] { - padding: 0.1em; - border-radius: 0.3em; - white-space: normal; -} -.token.cdata, -.token.comment, -.token.doctype, -.token.prolog { - color: #708090; -} -.token.punctuation { - color: #999; -} -.token.namespace { - opacity: 0.7; -} -.token.boolean, -.token.constant, -.token.deleted, -.token.number, -.token.property, -.token.symbol, -.token.tag { - color: #905; -} -.token.attr-name, -.token.builtin, -.token.char, -.token.inserted, -.token.selector, -.token.string { - color: #690; -} -.language-css .token.string, -.style .token.string, -.token.entity, -.token.operator, -.token.url { - color: #9a6e3a; - background: hsla(0, 0%, 100%, 0.5); -} -.token.atrule, -.token.attr-value, -.token.keyword { - color: #07a; -} -.token.class-name, -.token.function { - color: #dd4a68; -} -.token.important, -.token.regex, -.token.variable { - color: #e90; -} -.token.bold, -.token.important { - font-weight: 700; -} -.token.italic { - font-style: italic; -} -.token.entity { - cursor: help; -} -.mce-content-body { - overflow-wrap: break-word; - word-wrap: break-word; -} -.mce-content-body .mce-visual-caret { - background-color: #000; - background-color: currentColor; - position: absolute; -} -.mce-content-body .mce-visual-caret-hidden { - display: none; -} -.mce-content-body [data-mce-caret] { - left: -1000px; - margin: 0; - padding: 0; - position: absolute; - right: auto; - top: 0; -} -.mce-content-body .mce-offscreen-selection { - left: -2000000px; - max-width: 1000000px; - position: absolute; -} -.mce-content-body [contentEditable="false"] { - cursor: default; -} -.mce-content-body [contentEditable="true"] { - cursor: text; -} -.tox-cursor-format-painter { - cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), - default; -} -div.mce-footnotes hr { - margin-inline-end: auto; - margin-inline-start: 0; - width: 25%; -} -div.mce-footnotes li > a.mce-footnotes-backlink { - text-decoration: none; -} -@media print { - sup.mce-footnote a { - color: #000; - text-decoration: none; - } - div.mce-footnotes { - break-inside: avoid; - width: 100%; - } - div.mce-footnotes li > a.mce-footnotes-backlink { - display: none; - } -} -.mce-content-body figure.align-left { - float: left; -} -.mce-content-body figure.align-right { - float: right; -} -.mce-content-body figure.image.align-center { - display: table; - margin-left: auto; - margin-right: auto; -} -.mce-preview-object { - border: 1px solid gray; - display: inline-block; - line-height: 0; - margin: 0 2px 0 2px; - position: relative; -} -.mce-preview-object .mce-shim { - background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} -.mce-preview-object[data-mce-selected="2"] .mce-shim { - display: none; -} -.mce-content-body .mce-mergetag { - cursor: default !important; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.mce-content-body .mce-mergetag:hover { - background-color: rgba(0, 108, 231, 0.1); -} -.mce-content-body .mce-mergetag-affix { - background-color: rgba(0, 108, 231, 0.1); - color: #006ce7; -} -.mce-object { - background: transparent - url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") - no-repeat center; - border: 1px dashed #aaa; -} -.mce-pagebreak { - border: 1px dashed #aaa; - cursor: default; - display: block; - height: 5px; - margin-top: 15px; - page-break-before: always; - width: 100%; -} -@media print { - .mce-pagebreak { - border: 0; - } -} -.tiny-pageembed .mce-shim { - background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} -.tiny-pageembed[data-mce-selected="2"] .mce-shim { - display: none; -} -.tiny-pageembed { - display: inline-block; - position: relative; -} -.tiny-pageembed--16by9, -.tiny-pageembed--1by1, -.tiny-pageembed--21by9, -.tiny-pageembed--4by3 { - display: block; - overflow: hidden; - padding: 0; - position: relative; - width: 100%; -} -.tiny-pageembed--21by9 { - padding-top: 42.857143%; -} -.tiny-pageembed--16by9 { - padding-top: 56.25%; -} -.tiny-pageembed--4by3 { - padding-top: 75%; -} -.tiny-pageembed--1by1 { - padding-top: 100%; -} -.tiny-pageembed--16by9 iframe, -.tiny-pageembed--1by1 iframe, -.tiny-pageembed--21by9 iframe, -.tiny-pageembed--4by3 iframe { - border: 0; - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} -.mce-content-body[data-mce-placeholder] { - position: relative; -} -.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before { - color: rgba(34, 47, 62, 0.7); - content: attr(data-mce-placeholder); - position: absolute; -} -.mce-content-body:not([dir="rtl"])[data-mce-placeholder]:not( - .mce-visualblocks - )::before { - left: 1px; -} -.mce-content-body[dir="rtl"][data-mce-placeholder]:not( - .mce-visualblocks - )::before { - right: 1px; -} -.mce-content-body div.mce-resizehandle { - background-color: #4099ff; - border-color: #4099ff; - border-style: solid; - border-width: 1px; - box-sizing: border-box; - height: 10px; - position: absolute; - width: 10px; - z-index: 1298; -} -.mce-content-body div.mce-resizehandle:hover { - background-color: #4099ff; -} -.mce-content-body div.mce-resizehandle:nth-of-type(1) { - cursor: nwse-resize; -} -.mce-content-body div.mce-resizehandle:nth-of-type(2) { - cursor: nesw-resize; -} -.mce-content-body div.mce-resizehandle:nth-of-type(3) { - cursor: nwse-resize; -} -.mce-content-body div.mce-resizehandle:nth-of-type(4) { - cursor: nesw-resize; -} -.mce-content-body .mce-resize-backdrop { - z-index: 10000; -} -.mce-content-body .mce-clonedresizable { - cursor: default; - opacity: 0.5; - outline: 1px dashed #000; - position: absolute; - z-index: 10001; -} -.mce-content-body .mce-clonedresizable.mce-resizetable-columns td, -.mce-content-body .mce-clonedresizable.mce-resizetable-columns th { - border: 0; -} -.mce-content-body .mce-resize-helper { - background: #555; - background: rgba(0, 0, 0, 0.75); - border: 1px; - border-radius: 3px; - color: #fff; - display: none; - font-family: sans-serif; - font-size: 12px; - line-height: 14px; - margin: 5px 10px; - padding: 5px; - position: absolute; - white-space: nowrap; - z-index: 10002; -} -.tox-rtc-user-selection { - position: relative; -} -.tox-rtc-user-cursor { - bottom: 0; - cursor: default; - position: absolute; - top: 0; - width: 2px; -} -.tox-rtc-user-cursor::before { - background-color: inherit; - border-radius: 50%; - content: ""; - display: block; - height: 8px; - position: absolute; - right: -3px; - top: -3px; - width: 8px; -} -.tox-rtc-user-cursor:hover::after { - background-color: inherit; - border-radius: 100px; - box-sizing: border-box; - color: #fff; - content: attr(data-user); - display: block; - font-size: 12px; - font-weight: 700; - left: -5px; - min-height: 8px; - min-width: 8px; - padding: 0 12px; - position: absolute; - top: -11px; - white-space: nowrap; - z-index: 1000; -} -.tox-rtc-user-selection--1 .tox-rtc-user-cursor { - background-color: #2dc26b; -} -.tox-rtc-user-selection--2 .tox-rtc-user-cursor { - background-color: #e03e2d; -} -.tox-rtc-user-selection--3 .tox-rtc-user-cursor { - background-color: #f1c40f; -} -.tox-rtc-user-selection--4 .tox-rtc-user-cursor { - background-color: #3598db; -} -.tox-rtc-user-selection--5 .tox-rtc-user-cursor { - background-color: #b96ad9; -} -.tox-rtc-user-selection--6 .tox-rtc-user-cursor { - background-color: #e67e23; -} -.tox-rtc-user-selection--7 .tox-rtc-user-cursor { - background-color: #aaa69d; -} -.tox-rtc-user-selection--8 .tox-rtc-user-cursor { - background-color: #f368e0; -} -.tox-rtc-remote-image { - background: #eaeaea - url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") - no-repeat center center; - border: 1px solid #ccc; - min-height: 240px; - min-width: 320px; -} -.mce-match-marker { - background: #aaa; - color: #fff; -} -.mce-match-marker-selected { - background: #39f; - color: #fff; -} -.mce-match-marker-selected::-moz-selection { - background: #39f; - color: #fff; -} -.mce-match-marker-selected::selection { - background: #39f; - color: #fff; -} -.mce-content-body audio[data-mce-selected], -.mce-content-body details[data-mce-selected], -.mce-content-body embed[data-mce-selected], -.mce-content-body img[data-mce-selected], -.mce-content-body object[data-mce-selected], -.mce-content-body table[data-mce-selected], -.mce-content-body video[data-mce-selected] { - outline: 3px solid #b4d7ff; -} -.mce-content-body hr[data-mce-selected] { - outline: 3px solid #b4d7ff; - outline-offset: 1px; -} -.mce-content-body [contentEditable="false"] [contentEditable="true"]:focus { - outline: 3px solid #b4d7ff; -} -.mce-content-body [contentEditable="false"] [contentEditable="true"]:hover { - outline: 3px solid #b4d7ff; -} -.mce-content-body [contentEditable="false"][data-mce-selected] { - cursor: not-allowed; - outline: 3px solid #b4d7ff; -} -.mce-content-body.mce-content-readonly [contentEditable="true"]:focus, -.mce-content-body.mce-content-readonly [contentEditable="true"]:hover { - outline: 0; -} -.mce-content-body [data-mce-selected="inline-boundary"] { - background-color: #b4d7ff; -} -.mce-content-body .mce-edit-focus { - outline: 3px solid #b4d7ff; -} -.mce-content-body td[data-mce-selected], -.mce-content-body th[data-mce-selected] { - position: relative; -} -.mce-content-body td[data-mce-selected]::-moz-selection, -.mce-content-body th[data-mce-selected]::-moz-selection { - background: 0 0; -} -.mce-content-body td[data-mce-selected]::selection, -.mce-content-body th[data-mce-selected]::selection { - background: 0 0; -} -.mce-content-body td[data-mce-selected] *, -.mce-content-body th[data-mce-selected] * { - outline: 0; - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.mce-content-body td[data-mce-selected]::after, -.mce-content-body th[data-mce-selected]::after { - background-color: rgba(180, 215, 255, 0.7); - border: 1px solid rgba(180, 215, 255, 0.7); - bottom: -1px; - content: ""; - left: -1px; - mix-blend-mode: multiply; - position: absolute; - right: -1px; - top: -1px; -} -@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { - .mce-content-body td[data-mce-selected]::after, - .mce-content-body th[data-mce-selected]::after { - border-color: rgba(0, 84, 180, 0.7); - } -} -.mce-content-body img[data-mce-selected]::-moz-selection { - background: 0 0; -} -.mce-content-body img[data-mce-selected]::selection { - background: 0 0; -} -.ephox-snooker-resizer-bar { - background-color: #b4d7ff; - opacity: 0; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.ephox-snooker-resizer-cols { - cursor: col-resize; -} -.ephox-snooker-resizer-rows { - cursor: row-resize; -} -.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging { - opacity: 1; -} -.mce-spellchecker-word { - background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A"); - background-position: 0 calc(100% + 1px); - background-repeat: repeat-x; - background-size: auto 6px; - cursor: default; - height: 2rem; -} -.mce-spellchecker-grammar { - background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A"); - background-position: 0 calc(100% + 1px); - background-repeat: repeat-x; - background-size: auto 6px; - cursor: default; -} -.mce-toc { - border: 1px solid gray; -} -.mce-toc h2 { - margin: 4px; -} -.mce-toc ul > li { - list-style-type: none; -} -[data-mce-block] { - display: block; -} -.mce-item-table:not([border]), -.mce-item-table:not([border]) caption, -.mce-item-table:not([border]) td, -.mce-item-table:not([border]) th, -.mce-item-table[border="0"], -.mce-item-table[border="0"] caption, -.mce-item-table[border="0"] td, -.mce-item-table[border="0"] th, -table[style*="border-width: 0px"], -table[style*="border-width: 0px"] caption, -table[style*="border-width: 0px"] td, -table[style*="border-width: 0px"] th { - border: 1px dashed #bbb; -} -.mce-visualblocks address, -.mce-visualblocks article, -.mce-visualblocks aside, -.mce-visualblocks blockquote, -.mce-visualblocks div:not([data-mce-bogus]), -.mce-visualblocks dl, -.mce-visualblocks figcaption, -.mce-visualblocks figure, -.mce-visualblocks h1, -.mce-visualblocks h2, -.mce-visualblocks h3, -.mce-visualblocks h4, -.mce-visualblocks h5, -.mce-visualblocks h6, -.mce-visualblocks hgroup, -.mce-visualblocks ol, -.mce-visualblocks p, -.mce-visualblocks pre, -.mce-visualblocks section, -.mce-visualblocks ul { - background-repeat: no-repeat; - border: 1px dashed #bbb; - margin-left: 3px; - padding-top: 10px; -} -.mce-visualblocks p { - background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7); -} -.mce-visualblocks h1 { - background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==); -} -.mce-visualblocks h2 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==); -} -.mce-visualblocks h3 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7); -} -.mce-visualblocks h4 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==); -} -.mce-visualblocks h5 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==); -} -.mce-visualblocks h6 { - background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==); -} -.mce-visualblocks div:not([data-mce-bogus]) { - background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7); -} -.mce-visualblocks section { - background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=); -} -.mce-visualblocks article { - background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7); -} -.mce-visualblocks blockquote { - background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7); -} -.mce-visualblocks address { - background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=); -} -.mce-visualblocks pre { - background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==); -} -.mce-visualblocks figure { - background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7); -} -.mce-visualblocks figcaption { - border: 1px dashed #bbb; -} -.mce-visualblocks hgroup { - background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7); -} -.mce-visualblocks aside { - background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=); -} -.mce-visualblocks ul { - background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==); -} -.mce-visualblocks ol { - background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==); -} -.mce-visualblocks dl { - background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==); -} -.mce-visualblocks:not([dir="rtl"]) address, -.mce-visualblocks:not([dir="rtl"]) article, -.mce-visualblocks:not([dir="rtl"]) aside, -.mce-visualblocks:not([dir="rtl"]) blockquote, -.mce-visualblocks:not([dir="rtl"]) div:not([data-mce-bogus]), -.mce-visualblocks:not([dir="rtl"]) dl, -.mce-visualblocks:not([dir="rtl"]) figcaption, -.mce-visualblocks:not([dir="rtl"]) figure, -.mce-visualblocks:not([dir="rtl"]) h1, -.mce-visualblocks:not([dir="rtl"]) h2, -.mce-visualblocks:not([dir="rtl"]) h3, -.mce-visualblocks:not([dir="rtl"]) h4, -.mce-visualblocks:not([dir="rtl"]) h5, -.mce-visualblocks:not([dir="rtl"]) h6, -.mce-visualblocks:not([dir="rtl"]) hgroup, -.mce-visualblocks:not([dir="rtl"]) ol, -.mce-visualblocks:not([dir="rtl"]) p, -.mce-visualblocks:not([dir="rtl"]) pre, -.mce-visualblocks:not([dir="rtl"]) section, -.mce-visualblocks:not([dir="rtl"]) ul { - margin-left: 3px; -} -.mce-visualblocks[dir="rtl"] address, -.mce-visualblocks[dir="rtl"] article, -.mce-visualblocks[dir="rtl"] aside, -.mce-visualblocks[dir="rtl"] blockquote, -.mce-visualblocks[dir="rtl"] div:not([data-mce-bogus]), -.mce-visualblocks[dir="rtl"] dl, -.mce-visualblocks[dir="rtl"] figcaption, -.mce-visualblocks[dir="rtl"] figure, -.mce-visualblocks[dir="rtl"] h1, -.mce-visualblocks[dir="rtl"] h2, -.mce-visualblocks[dir="rtl"] h3, -.mce-visualblocks[dir="rtl"] h4, -.mce-visualblocks[dir="rtl"] h5, -.mce-visualblocks[dir="rtl"] h6, -.mce-visualblocks[dir="rtl"] hgroup, -.mce-visualblocks[dir="rtl"] ol, -.mce-visualblocks[dir="rtl"] p, -.mce-visualblocks[dir="rtl"] pre, -.mce-visualblocks[dir="rtl"] section, -.mce-visualblocks[dir="rtl"] ul { - background-position-x: right; - margin-right: 3px; -} -.mce-nbsp, -.mce-shy { - background: #aaa; -} -.mce-shy::after { - content: "-"; -} -body { - font-family: sans-serif; -} -table { - border-collapse: collapse; -} diff --git a/src/lib/dist/tinymce/skins/ui/stocknear/skin.min.css b/src/lib/dist/tinymce/skins/ui/stocknear/skin.min.css deleted file mode 100644 index c5c26951..00000000 --- a/src/lib/dist/tinymce/skins/ui/stocknear/skin.min.css +++ /dev/null @@ -1,4030 +0,0 @@ -.tox { - box-shadow: none; - box-sizing: content-box; - color: #222f3e; - cursor: auto; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - font-size: 16px; - font-style: normal; - font-weight: 400; - line-height: normal; - -webkit-tap-highlight-color: transparent; - text-decoration: none; - text-shadow: none; - text-transform: none; - vertical-align: initial; - white-space: normal; -} -.tox :not(svg):not(rect) { - box-sizing: inherit; - color: inherit; - cursor: inherit; - direction: inherit; - font-family: inherit; - font-size: inherit; - font-style: inherit; - font-weight: inherit; - line-height: inherit; - -webkit-tap-highlight-color: inherit; - text-align: inherit; - text-decoration: inherit; - text-shadow: inherit; - text-transform: inherit; - vertical-align: inherit; - white-space: inherit; -} -.tox :not(svg):not(rect) { - background: 0 0; - border: 0; - box-shadow: none; - float: none; - height: auto; - margin: 0; - max-width: none; - outline: 0; - padding: 0; - position: static; - width: auto; -} -.tox:not([dir="rtl"]) { - direction: ltr; - text-align: left; -} -.tox[dir="rtl"] { - direction: rtl; - text-align: right; -} -.tox-tinymce { - border: 2px solid #eee; - border-radius: 10px; - box-shadow: none; - box-sizing: border-box; - display: flex; - flex-direction: column; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - overflow: hidden; - position: relative; - visibility: inherit !important; -} -.tox.tox-tinymce-inline { - border: none; - box-shadow: none; - overflow: initial; -} -.tox.tox-tinymce-inline .tox-editor-container { - overflow: initial; -} -.tox.tox-tinymce-inline .tox-editor-header { - background-color: #000; - border: 2px solid #eee; - border-radius: 10px; - box-shadow: none; - overflow: hidden; -} -.tox-tinymce-aux { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - z-index: 1300; -} -.tox-tinymce :focus, -.tox-tinymce-aux :focus { - outline: 0; -} -button::-moz-focus-inner { - border: 0; -} -.tox[dir="rtl"] .tox-icon--flip svg { - transform: rotateY(180deg); -} -.tox .accessibility-issue__header { - align-items: center; - display: flex; - margin-bottom: 4px; -} -.tox .accessibility-issue__description { - align-items: stretch; - border-radius: 6px; - display: flex; - justify-content: space-between; -} -.tox .accessibility-issue__description > div { - padding-bottom: 4px; -} -.tox .accessibility-issue__description > div > div { - align-items: center; - display: flex; - margin-bottom: 4px; -} -.tox .accessibility-issue__description > div > div .tox-icon svg { - display: block; -} -.tox .accessibility-issue__repair { - margin-top: 16px; -} -.tox - .tox-dialog__body-content - .accessibility-issue--info - .accessibility-issue__description { - background-color: rgba(0, 101, 216, 0.1); - color: #222f3e; -} -.tox .tox-dialog__body-content .accessibility-issue--info .tox-form__group h2 { - color: #006ce7; -} -.tox .tox-dialog__body-content .accessibility-issue--info .tox-icon svg { - fill: #006ce7; -} -.tox - .tox-dialog__body-content - .accessibility-issue--info - a.tox-button--naked.tox-button--icon { - background-color: #006ce7; - color: #000; -} -.tox - .tox-dialog__body-content - .accessibility-issue--info - a.tox-button--naked.tox-button--icon:focus, -.tox - .tox-dialog__body-content - .accessibility-issue--info - a.tox-button--naked.tox-button--icon:hover { - background-color: #000; -} -.tox - .tox-dialog__body-content - .accessibility-issue--info - a.tox-button--naked.tox-button--icon:active { - background-color: #0054b4; -} -.tox - .tox-dialog__body-content - .accessibility-issue--warn - .accessibility-issue__description { - background-color: rgba(255, 165, 0, 0.08); - color: #222f3e; -} -.tox .tox-dialog__body-content .accessibility-issue--warn .tox-form__group h2 { - color: #8f5d00; -} -.tox .tox-dialog__body-content .accessibility-issue--warn .tox-icon svg { - fill: #8f5d00; -} -.tox - .tox-dialog__body-content - .accessibility-issue--warn - a.tox-button--naked.tox-button--icon { - background-color: #ffe89d; - color: #222f3e; -} -.tox - .tox-dialog__body-content - .accessibility-issue--warn - a.tox-button--naked.tox-button--icon:focus, -.tox - .tox-dialog__body-content - .accessibility-issue--warn - a.tox-button--naked.tox-button--icon:hover { - background-color: #f2d574; - color: #222f3e; -} -.tox - .tox-dialog__body-content - .accessibility-issue--warn - a.tox-button--naked.tox-button--icon:active { - background-color: #e8c657; - color: #222f3e; -} -.tox - .tox-dialog__body-content - .accessibility-issue--error - .accessibility-issue__description { - background-color: rgba(204, 0, 0, 0.1); - color: #222f3e; -} -.tox .tox-dialog__body-content .accessibility-issue--error .tox-form__group h2 { - color: #c00; -} -.tox .tox-dialog__body-content .accessibility-issue--error .tox-icon svg { - fill: #c00; -} -.tox - .tox-dialog__body-content - .accessibility-issue--error - a.tox-button--naked.tox-button--icon { - background-color: #f2bfbf; - color: #222f3e; -} -.tox - .tox-dialog__body-content - .accessibility-issue--error - a.tox-button--naked.tox-button--icon:focus, -.tox - .tox-dialog__body-content - .accessibility-issue--error - a.tox-button--naked.tox-button--icon:hover { - background-color: #e9a4a4; - color: #222f3e; -} -.tox - .tox-dialog__body-content - .accessibility-issue--error - a.tox-button--naked.tox-button--icon:active { - background-color: #ee9494; - color: #222f3e; -} -.tox - .tox-dialog__body-content - .accessibility-issue--success - .accessibility-issue__description { - background-color: rgba(120, 171, 70, 0.1); - color: #222f3e; -} -.tox - .tox-dialog__body-content - .accessibility-issue--success - .accessibility-issue__description - > :last-child { - display: none; -} -.tox - .tox-dialog__body-content - .accessibility-issue--success - .tox-form__group - h2 { - color: #527530; -} -.tox .tox-dialog__body-content .accessibility-issue--success .tox-icon svg { - fill: #527530; -} -.tox .tox-dialog__body-content .accessibility-issue__header .tox-form__group h1, -.tox - .tox-dialog__body-content - .tox-form__group - .accessibility-issue__description - h2 { - font-size: 14px; - margin-top: 0; -} -.tox:not([dir="rtl"]) - .tox-dialog__body-content - .accessibility-issue__header - .tox-button { - margin-left: 4px; -} -.tox:not([dir="rtl"]) - .tox-dialog__body-content - .accessibility-issue__header - > :nth-last-child(2) { - margin-left: auto; -} -.tox:not([dir="rtl"]) - .tox-dialog__body-content - .accessibility-issue__description { - padding: 4px 4px 4px 8px; -} -.tox[dir="rtl"] - .tox-dialog__body-content - .accessibility-issue__header - .tox-button { - margin-right: 4px; -} -.tox[dir="rtl"] - .tox-dialog__body-content - .accessibility-issue__header - > :nth-last-child(2) { - margin-right: auto; -} -.tox[dir="rtl"] .tox-dialog__body-content .accessibility-issue__description { - padding: 4px 8px 4px 4px; -} -.tox .tox-advtemplate .tox-form__grid { - flex: 1; -} -.tox .tox-advtemplate .tox-form__grid > div:first-child { - display: flex; - flex-direction: column; - width: 30%; -} -.tox .tox-advtemplate .tox-form__grid > div:first-child > div:nth-child(2) { - flex-basis: 0; - flex-grow: 1; - overflow: auto; -} -@media only screen and (max-width: 767px) { - body:not(.tox-force-desktop) - .tox - .tox-advtemplate - .tox-form__grid - > div:first-child { - width: 100%; - } -} -.tox .tox-advtemplate iframe { - border-color: #eee; - border-radius: 10px; - border-style: solid; - border-width: 1px; - margin: 0 10px; -} -.tox .tox-anchorbar { - display: flex; - flex: 0 0 auto; -} -.tox .tox-bottom-anchorbar { - display: flex; - flex: 0 0 auto; -} -.tox .tox-bar { - display: flex; - flex: 0 0 auto; -} -.tox .tox-button { - background-color: #006ce7; - background-image: none; - background-position: 0 0; - background-repeat: repeat; - border-color: #006ce7; - border-radius: 6px; - border-style: solid; - border-width: 1px; - box-shadow: none; - box-sizing: border-box; - color: #000; - cursor: pointer; - display: inline-block; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - font-size: 14px; - font-style: normal; - font-weight: 700; - letter-spacing: normal; - line-height: 24px; - margin: 0; - outline: 0; - padding: 4px 16px; - position: relative; - text-align: center; - text-decoration: none; - text-transform: none; - white-space: nowrap; -} -.tox .tox-button::before { - border-radius: 6px; - bottom: -1px; - box-shadow: - inset 0 0 0 2px #000, - 0 0 0 1px #006ce7, - 0 0 0 3px rgba(0, 108, 231, 0.25); - content: ""; - left: -1px; - opacity: 0; - pointer-events: none; - position: absolute; - right: -1px; - top: -1px; -} -.tox .tox-button[disabled] { - background-color: #006ce7; - background-image: none; - border-color: #006ce7; - box-shadow: none; - color: rgba(255, 255, 255, 0.5); - cursor: not-allowed; -} -.tox .tox-button:focus:not(:disabled) { - background-color: #000; - background-image: none; - border-color: #000; - box-shadow: none; - color: #000; -} -.tox .tox-button:focus-visible:not(:disabled)::before { - opacity: 1; -} -.tox .tox-button:hover:not(:disabled) { - background-color: #000; - background-image: none; - border-color: #000; - box-shadow: none; - color: #000; -} -.tox .tox-button:active:not(:disabled) { - background-color: #0054b4; - background-image: none; - border-color: #0054b4; - box-shadow: none; - color: #000; -} -.tox .tox-button.tox-button--enabled { - background-color: #0054b4; - background-image: none; - border-color: #0054b4; - box-shadow: none; - color: #000; -} -.tox .tox-button.tox-button--enabled[disabled] { - background-color: #0054b4; - background-image: none; - border-color: #0054b4; - box-shadow: none; - color: rgba(255, 255, 255, 0.5); - cursor: not-allowed; -} -.tox .tox-button.tox-button--enabled:focus:not(:disabled) { - background-color: #000; - background-image: none; - border-color: #000; - box-shadow: none; - color: #000; -} -.tox .tox-button.tox-button--enabled:hover:not(:disabled) { - background-color: #000; - background-image: none; - border-color: #000; - box-shadow: none; - color: #000; -} -.tox .tox-button.tox-button--enabled:active:not(:disabled) { - background-color: #003c81; - background-image: none; - border-color: #003c81; - box-shadow: none; - color: #000; -} -.tox .tox-button--icon-and-text, -.tox .tox-button.tox-button--icon-and-text, -.tox .tox-button.tox-button--secondary.tox-button--icon-and-text { - display: flex; - padding: 5px 4px; -} -.tox .tox-button--icon-and-text .tox-icon svg, -.tox .tox-button.tox-button--icon-and-text .tox-icon svg, -.tox .tox-button.tox-button--secondary.tox-button--icon-and-text .tox-icon svg { - display: block; - fill: currentColor; -} -.tox .tox-button--secondary { - background-color: #f0f0f0; - background-image: none; - background-position: 0 0; - background-repeat: repeat; - border-color: #f0f0f0; - border-radius: 6px; - border-style: solid; - border-width: 1px; - box-shadow: none; - color: #222f3e; - font-size: 14px; - font-style: normal; - font-weight: 700; - letter-spacing: normal; - outline: 0; - padding: 4px 16px; - text-decoration: none; - text-transform: none; -} -.tox .tox-button--secondary[disabled] { - background-color: #f0f0f0; - background-image: none; - border-color: #f0f0f0; - box-shadow: none; - color: rgba(34, 47, 62, 0.5); -} -.tox .tox-button--secondary:focus:not(:disabled) { - background-color: #e3e3e3; - background-image: none; - border-color: #e3e3e3; - box-shadow: none; - color: #222f3e; -} -.tox .tox-button--secondary:hover:not(:disabled) { - background-color: #e3e3e3; - background-image: none; - border-color: #e3e3e3; - box-shadow: none; - color: #222f3e; -} -.tox .tox-button--secondary:active:not(:disabled) { - background-color: #d6d6d6; - background-image: none; - border-color: #d6d6d6; - box-shadow: none; - color: #222f3e; -} -.tox .tox-button--secondary.tox-button--enabled { - background-color: #a8c8ed; - background-image: none; - border-color: #a8c8ed; - box-shadow: none; - color: #222f3e; -} -.tox .tox-button--secondary.tox-button--enabled[disabled] { - background-color: #a8c8ed; - background-image: none; - border-color: #a8c8ed; - box-shadow: none; - color: rgba(34, 47, 62, 0.5); -} -.tox .tox-button--secondary.tox-button--enabled:focus:not(:disabled) { - background-color: #93bbe9; - background-image: none; - border-color: #93bbe9; - box-shadow: none; - color: #222f3e; -} -.tox .tox-button--secondary.tox-button--enabled:hover:not(:disabled) { - background-color: #93bbe9; - background-image: none; - border-color: #93bbe9; - box-shadow: none; - color: #222f3e; -} -.tox .tox-button--secondary.tox-button--enabled:active:not(:disabled) { - background-color: #7daee4; - background-image: none; - border-color: #7daee4; - box-shadow: none; - color: #222f3e; -} -.tox .tox-button--icon, -.tox .tox-button.tox-button--icon, -.tox .tox-button.tox-button--secondary.tox-button--icon { - padding: 4px; -} -.tox .tox-button--icon .tox-icon svg, -.tox .tox-button.tox-button--icon .tox-icon svg, -.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg { - display: block; - fill: currentColor; -} -.tox .tox-button-link { - background: 0; - border: none; - box-sizing: border-box; - cursor: pointer; - display: inline-block; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - font-size: 16px; - font-weight: 400; - line-height: 1.3; - margin: 0; - padding: 0; - white-space: nowrap; -} -.tox .tox-button-link--sm { - font-size: 14px; -} -.tox .tox-button--naked { - background-color: transparent; - border-color: transparent; - box-shadow: unset; - color: #222f3e; -} -.tox .tox-button--naked[disabled] { - background-color: rgba(34, 47, 62, 0.12); - border-color: transparent; - box-shadow: unset; - color: rgba(34, 47, 62, 0.5); -} -.tox .tox-button--naked:hover:not(:disabled) { - background-color: rgba(34, 47, 62, 0.12); - border-color: transparent; - box-shadow: unset; - color: #222f3e; -} -.tox .tox-button--naked:focus:not(:disabled) { - background-color: rgba(34, 47, 62, 0.12); - border-color: transparent; - box-shadow: unset; - color: #222f3e; -} -.tox .tox-button--naked:active:not(:disabled) { - background-color: rgba(34, 47, 62, 0.18); - border-color: transparent; - box-shadow: unset; - color: #222f3e; -} -.tox .tox-button--naked .tox-icon svg { - fill: currentColor; -} -.tox .tox-button--naked.tox-button--icon:hover:not(:disabled) { - color: #222f3e; -} -.tox .tox-checkbox { - align-items: center; - border-radius: 6px; - cursor: pointer; - display: flex; - height: 36px; - min-width: 36px; -} -.tox .tox-checkbox__input { - height: 1px; - overflow: hidden; - position: absolute; - top: auto; - width: 1px; -} -.tox .tox-checkbox__icons { - align-items: center; - border-radius: 6px; - box-shadow: 0 0 0 2px transparent; - box-sizing: content-box; - display: flex; - height: 24px; - justify-content: center; - padding: calc(4px - 1px); - width: 24px; -} -.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg { - display: block; - fill: rgba(34, 47, 62, 0.3); -} -.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg { - display: none; - fill: #006ce7; -} -.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg { - display: none; - fill: #006ce7; -} -.tox .tox-checkbox--disabled { - color: rgba(34, 47, 62, 0.5); - cursor: not-allowed; -} -.tox - .tox-checkbox--disabled - .tox-checkbox__icons - .tox-checkbox-icon__checked - svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox - .tox-checkbox--disabled - .tox-checkbox__icons - .tox-checkbox-icon__unchecked - svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox - .tox-checkbox--disabled - .tox-checkbox__icons - .tox-checkbox-icon__indeterminate - svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox - input.tox-checkbox__input:checked - + .tox-checkbox__icons - .tox-checkbox-icon__unchecked - svg { - display: none; -} -.tox - input.tox-checkbox__input:checked - + .tox-checkbox__icons - .tox-checkbox-icon__checked - svg { - display: block; -} -.tox - input.tox-checkbox__input:indeterminate - + .tox-checkbox__icons - .tox-checkbox-icon__unchecked - svg { - display: none; -} -.tox - input.tox-checkbox__input:indeterminate - + .tox-checkbox__icons - .tox-checkbox-icon__indeterminate - svg { - display: block; -} -.tox input.tox-checkbox__input:focus + .tox-checkbox__icons { - border-radius: 6px; - box-shadow: inset 0 0 0 1px #006ce7; - padding: calc(4px - 1px); -} -.tox:not([dir="rtl"]) .tox-checkbox__label { - margin-left: 4px; -} -.tox:not([dir="rtl"]) .tox-checkbox__input { - left: -10000px; -} -.tox:not([dir="rtl"]) .tox-bar .tox-checkbox { - margin-left: 4px; -} -.tox[dir="rtl"] .tox-checkbox__label { - margin-right: 4px; -} -.tox[dir="rtl"] .tox-checkbox__input { - right: -10000px; -} -.tox[dir="rtl"] .tox-bar .tox-checkbox { - margin-right: 4px; -} -.tox .tox-collection--toolbar .tox-collection__group { - display: flex; - padding: 0; -} -.tox .tox-collection--grid .tox-collection__group { - display: flex; - flex-wrap: wrap; - max-height: 208px; - overflow-x: hidden; - overflow-y: auto; - padding: 0; -} -.tox .tox-collection--list .tox-collection__group { - border-bottom-width: 0; - border-color: #e3e3e3; - border-left-width: 0; - border-right-width: 0; - border-style: solid; - border-top-width: 1px; - padding: 4px 0; -} -.tox .tox-collection--list .tox-collection__group:first-child { - border-top-width: 0; -} -.tox .tox-collection__group-heading { - background-color: #fcfcfc; - color: rgba(34, 47, 62, 0.7); - cursor: default; - font-size: 12px; - font-style: normal; - font-weight: 400; - margin-bottom: 4px; - margin-top: -4px; - padding: 4px 8px; - text-transform: none; - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.tox .tox-collection__item { - align-items: center; - border-radius: 3px; - color: #222f3e; - display: flex; - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.tox .tox-collection--list .tox-collection__item { - padding: 4px 8px; -} -.tox .tox-collection--toolbar .tox-collection__item { - border-radius: 3px; - padding: 4px; -} -.tox .tox-collection--grid .tox-collection__item { - border-radius: 3px; - padding: 4px; -} -.tox .tox-collection--list .tox-collection__item--enabled { - background-color: #000; - color: #222f3e; -} -.tox .tox-collection--list .tox-collection__item--active { - background-color: #cce2fa; -} -.tox .tox-collection--toolbar .tox-collection__item--enabled { - background-color: #a6ccf7; - color: #222f3e; -} -.tox .tox-collection--toolbar .tox-collection__item--active { - background-color: #cce2fa; -} -.tox .tox-collection--grid .tox-collection__item--enabled { - background-color: #a6ccf7; - color: #222f3e; -} -.tox - .tox-collection--grid - .tox-collection__item--active:not(.tox-collection__item--state-disabled) { - background-color: #cce2fa; - color: #222f3e; -} -.tox - .tox-collection--list - .tox-collection__item--active:not(.tox-collection__item--state-disabled) { - color: #222f3e; -} -.tox - .tox-collection--toolbar - .tox-collection__item--active:not(.tox-collection__item--state-disabled) { - color: #222f3e; -} -.tox .tox-collection__item-checkmark, -.tox .tox-collection__item-icon { - align-items: center; - display: flex; - height: 24px; - justify-content: center; - width: 24px; -} -.tox .tox-collection__item-checkmark svg, -.tox .tox-collection__item-icon svg { - fill: currentColor; -} -.tox .tox-collection--toolbar-lg .tox-collection__item-icon { - height: 48px; - width: 48px; -} -.tox .tox-collection__item-label { - color: currentColor; - display: inline-block; - flex: 1; - font-size: 14px; - font-style: normal; - font-weight: 400; - line-height: 24px; - max-width: 100%; - text-transform: none; - word-break: break-all; -} -.tox .tox-collection__item-accessory { - color: rgba(34, 47, 62, 0.7); - display: inline-block; - font-size: 14px; - height: 24px; - line-height: 24px; - text-transform: none; -} -.tox .tox-collection__item-caret { - align-items: center; - display: flex; - min-height: 24px; -} -.tox .tox-collection__item-caret::after { - content: ""; - font-size: 0; - min-height: inherit; -} -.tox .tox-collection__item-caret svg { - fill: #222f3e; -} -.tox .tox-collection__item--state-disabled { - background-color: transparent; - color: rgba(34, 47, 62, 0.5); - cursor: not-allowed; -} -.tox .tox-collection__item--state-disabled .tox-collection__item-caret svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox - .tox-collection--list - .tox-collection__item:not(.tox-collection__item--enabled) - .tox-collection__item-checkmark - svg { - display: none; -} -.tox - .tox-collection--list - .tox-collection__item:not(.tox-collection__item--enabled) - .tox-collection__item-accessory - + .tox-collection__item-checkmark { - display: none; -} -.tox .tox-collection--horizontal { - background-color: #000; - border: 1px solid #e3e3e3; - border-radius: 6px; - box-shadow: - 0 0 2px 0 rgba(34, 47, 62, 0.2), - 0 4px 8px 0 rgba(34, 47, 62, 0.15); - display: flex; - flex: 0 0 auto; - flex-shrink: 0; - flex-wrap: nowrap; - margin-bottom: 0; - overflow-x: auto; - padding: 0; -} -.tox .tox-collection--horizontal .tox-collection__group { - align-items: center; - display: flex; - flex-wrap: nowrap; - margin: 0; - padding: 0 4px; -} -.tox .tox-collection--horizontal .tox-collection__item { - height: 28px; - margin: 6px 1px 5px 0; - padding: 0 4px; -} -.tox .tox-collection--horizontal .tox-collection__item-label { - white-space: nowrap; -} -.tox .tox-collection--horizontal .tox-collection__item-caret { - margin-left: 4px; -} -.tox .tox-collection__item-container { - display: flex; -} -.tox .tox-collection__item-container--row { - align-items: center; - flex: 1 1 auto; - flex-direction: row; -} -.tox - .tox-collection__item-container--row.tox-collection__item-container--align-left { - margin-right: auto; -} -.tox - .tox-collection__item-container--row.tox-collection__item-container--align-right { - justify-content: flex-end; - margin-left: auto; -} -.tox - .tox-collection__item-container--row.tox-collection__item-container--valign-top { - align-items: flex-start; - margin-bottom: auto; -} -.tox - .tox-collection__item-container--row.tox-collection__item-container--valign-middle { - align-items: center; -} -.tox - .tox-collection__item-container--row.tox-collection__item-container--valign-bottom { - align-items: flex-end; - margin-top: auto; -} -.tox .tox-collection__item-container--column { - align-self: center; - flex: 1 1 auto; - flex-direction: column; -} -.tox - .tox-collection__item-container--column.tox-collection__item-container--align-left { - align-items: flex-start; -} -.tox - .tox-collection__item-container--column.tox-collection__item-container--align-right { - align-items: flex-end; -} -.tox - .tox-collection__item-container--column.tox-collection__item-container--valign-top { - align-self: flex-start; -} -.tox - .tox-collection__item-container--column.tox-collection__item-container--valign-middle { - align-self: center; -} -.tox - .tox-collection__item-container--column.tox-collection__item-container--valign-bottom { - align-self: flex-end; -} -.tox:not([dir="rtl"]) - .tox-collection--horizontal - .tox-collection__group:not(:last-of-type) { - border-right: 1px solid transparent; -} -.tox:not([dir="rtl"]) - .tox-collection--list - .tox-collection__item - > :not(:first-child) { - margin-left: 8px; -} -.tox:not([dir="rtl"]) - .tox-collection--list - .tox-collection__item - > .tox-collection__item-label:first-child { - margin-left: 4px; -} -.tox:not([dir="rtl"]) .tox-collection__item-accessory { - margin-left: 16px; - text-align: right; -} -.tox:not([dir="rtl"]) .tox-collection .tox-collection__item-caret { - margin-left: 16px; -} -.tox[dir="rtl"] - .tox-collection--horizontal - .tox-collection__group:not(:last-of-type) { - border-left: 1px solid transparent; -} -.tox[dir="rtl"] - .tox-collection--list - .tox-collection__item - > :not(:first-child) { - margin-right: 8px; -} -.tox[dir="rtl"] - .tox-collection--list - .tox-collection__item - > .tox-collection__item-label:first-child { - margin-right: 4px; -} -.tox[dir="rtl"] .tox-collection__item-accessory { - margin-right: 16px; - text-align: left; -} -.tox[dir="rtl"] .tox-collection .tox-collection__item-caret { - margin-right: 16px; - transform: rotateY(180deg); -} -.tox[dir="rtl"] .tox-collection--horizontal .tox-collection__item-caret { - margin-right: 4px; -} -.tox .tox-color-picker-container { - display: flex; - flex-direction: row; - height: 225px; - margin: 0; -} -.tox .tox-sv-palette { - box-sizing: border-box; - display: flex; - height: 100%; -} -.tox .tox-sv-palette-spectrum { - height: 100%; -} -.tox .tox-sv-palette, -.tox .tox-sv-palette-spectrum { - width: 225px; -} -.tox .tox-sv-palette-thumb { - background: 0 0; - border: 1px solid #000; - border-radius: 50%; - box-sizing: content-box; - height: 12px; - position: absolute; - width: 12px; -} -.tox .tox-sv-palette-inner-thumb { - border: 1px solid #000; - border-radius: 50%; - height: 10px; - position: absolute; - width: 10px; -} -.tox .tox-hue-slider { - box-sizing: border-box; - height: 100%; - width: 25px; -} -.tox .tox-hue-slider-spectrum { - background: linear-gradient( - to bottom, - red, - #ff0080, - #f0f, - #8000ff, - #00f, - #0080ff, - #0ff, - #00ff80, - #0f0, - #80ff00, - #ff0, - #ff8000, - red - ); - height: 100%; - width: 100%; -} -.tox .tox-hue-slider, -.tox .tox-hue-slider-spectrum { - width: 20px; -} -.tox .tox-hue-slider-thumb { - background: #000; - border: 1px solid #000; - box-sizing: content-box; - height: 4px; - width: 100%; -} -.tox .tox-rgb-form { - display: flex; - flex-direction: column; - justify-content: space-between; -} -.tox .tox-rgb-form div { - align-items: center; - display: flex; - justify-content: space-between; - margin-bottom: 5px; - width: inherit; -} -.tox .tox-rgb-form input { - width: 6em; -} -.tox .tox-rgb-form input.tox-invalid { - border: 1px solid red !important; -} -.tox .tox-rgb-form .tox-rgba-preview { - border: 1px solid #000; - flex-grow: 2; - margin-bottom: 0; -} -.tox:not([dir="rtl"]) .tox-sv-palette { - margin-right: 15px; -} -.tox:not([dir="rtl"]) .tox-hue-slider { - margin-right: 15px; -} -.tox:not([dir="rtl"]) .tox-hue-slider-thumb { - margin-left: -1px; -} -.tox:not([dir="rtl"]) .tox-rgb-form label { - margin-right: 0.5em; -} -.tox[dir="rtl"] .tox-sv-palette { - margin-left: 15px; -} -.tox[dir="rtl"] .tox-hue-slider { - margin-left: 15px; -} -.tox[dir="rtl"] .tox-hue-slider-thumb { - margin-right: -1px; -} -.tox[dir="rtl"] .tox-rgb-form label { - margin-left: 0.5em; -} -.tox .tox-toolbar .tox-swatches, -.tox .tox-toolbar__overflow .tox-swatches, -.tox .tox-toolbar__primary .tox-swatches { - margin: 5px 0 6px 11px; -} -.tox .tox-collection--list .tox-collection__group .tox-swatches-menu { - border: 0; - margin: -4px -4px; -} -.tox .tox-swatches__row { - display: flex; -} -.tox .tox-swatch { - height: 30px; - transition: - transform 0.15s, - box-shadow 0.15s; - width: 30px; -} -.tox .tox-swatch:focus, -.tox .tox-swatch:hover { - box-shadow: 0 0 0 1px rgba(127, 127, 127, 0.3) inset; - transform: scale(0.8); -} -.tox .tox-swatch--remove { - align-items: center; - display: flex; - justify-content: center; -} -.tox .tox-swatch--remove svg path { - stroke: #e74c3c; -} -.tox .tox-swatches__picker-btn { - align-items: center; - background-color: transparent; - border: 0; - cursor: pointer; - display: flex; - height: 30px; - justify-content: center; - outline: 0; - padding: 0; - width: 30px; -} -.tox .tox-swatches__picker-btn svg { - fill: #222f3e; - height: 24px; - width: 24px; -} -.tox .tox-swatches__picker-btn:hover { - background: #cce2fa; -} -.tox div.tox-swatch:not(.tox-swatch--remove) svg { - display: none; - fill: #222f3e; - height: 24px; - margin: calc((30px - 24px) / 2) calc((30px - 24px) / 2); - width: 24px; -} -.tox div.tox-swatch:not(.tox-swatch--remove) svg path { - fill: #000; - paint-order: stroke; - stroke: #222f3e; - stroke-width: 2px; -} -.tox div.tox-swatch:not(.tox-swatch--remove).tox-collection__item--enabled svg { - display: block; -} -.tox:not([dir="rtl"]) .tox-swatches__picker-btn { - margin-left: auto; -} -.tox[dir="rtl"] .tox-swatches__picker-btn { - margin-right: auto; -} -.tox .tox-comment-thread { - background: #000; - position: relative; -} -.tox .tox-comment-thread > :not(:first-child) { - margin-top: 8px; -} -.tox .tox-comment { - background: #000; - border: 1px solid #eee; - border-radius: 6px; - box-shadow: 0 4px 8px 0 rgba(34, 47, 62, 0.1); - padding: 8px 8px 16px 8px; - position: relative; -} -.tox .tox-comment__header { - align-items: center; - color: #222f3e; - display: flex; - justify-content: space-between; -} -.tox .tox-comment__date { - color: #222f3e; - font-size: 12px; - line-height: 18px; -} -.tox .tox-comment__body { - color: #222f3e; - font-size: 14px; - font-style: normal; - font-weight: 400; - line-height: 1.3; - margin-top: 8px; - position: relative; - text-transform: initial; -} -.tox .tox-comment__body textarea { - resize: none; - white-space: normal; - width: 100%; -} -.tox .tox-comment__expander { - padding-top: 8px; -} -.tox .tox-comment__expander p { - color: rgba(34, 47, 62, 0.7); - font-size: 14px; - font-style: normal; -} -.tox .tox-comment__body p { - margin: 0; -} -.tox .tox-comment__buttonspacing { - padding-top: 16px; - text-align: center; -} -.tox .tox-comment-thread__overlay::after { - background: #000; - bottom: 0; - content: ""; - display: flex; - left: 0; - opacity: 0.9; - position: absolute; - right: 0; - top: 0; - z-index: 5; -} -.tox .tox-comment__reply { - display: flex; - flex-shrink: 0; - flex-wrap: wrap; - justify-content: flex-end; - margin-top: 8px; -} -.tox .tox-comment__reply > :first-child { - margin-bottom: 8px; - width: 100%; -} -.tox .tox-comment__edit { - display: flex; - flex-wrap: wrap; - justify-content: flex-end; - margin-top: 16px; -} -.tox .tox-comment__gradient::after { - background: linear-gradient(rgba(255, 255, 255, 0), #000); - bottom: 0; - content: ""; - display: block; - height: 5em; - margin-top: -40px; - position: absolute; - width: 100%; -} -.tox .tox-comment__overlay { - background: #000; - bottom: 0; - display: flex; - flex-direction: column; - flex-grow: 1; - left: 0; - opacity: 0.9; - position: absolute; - right: 0; - text-align: center; - top: 0; - z-index: 5; -} -.tox .tox-comment__loading-text { - align-items: center; - color: #222f3e; - display: flex; - flex-direction: column; - position: relative; -} -.tox .tox-comment__loading-text > div { - padding-bottom: 16px; -} -.tox .tox-comment__overlaytext { - bottom: 0; - flex-direction: column; - font-size: 14px; - left: 0; - padding: 1em; - position: absolute; - right: 0; - top: 0; - z-index: 10; -} -.tox .tox-comment__overlaytext p { - background-color: #000; - box-shadow: 0 0 8px 8px #000; - color: #222f3e; - text-align: center; -} -.tox .tox-comment__overlaytext div:nth-of-type(2) { - font-size: 0.8em; -} -.tox .tox-comment__busy-spinner { - align-items: center; - background-color: #000; - bottom: 0; - display: flex; - justify-content: center; - left: 0; - position: absolute; - right: 0; - top: 0; - z-index: 20; -} -.tox .tox-comment__scroll { - display: flex; - flex-direction: column; - flex-shrink: 1; - overflow: auto; -} -.tox .tox-conversations { - margin: 8px; -} -.tox:not([dir="rtl"]) .tox-comment__edit { - margin-left: 8px; -} -.tox:not([dir="rtl"]) .tox-comment__buttonspacing > :last-child, -.tox:not([dir="rtl"]) .tox-comment__edit > :last-child, -.tox:not([dir="rtl"]) .tox-comment__reply > :last-child { - margin-left: 8px; -} -.tox[dir="rtl"] .tox-comment__edit { - margin-right: 8px; -} -.tox[dir="rtl"] .tox-comment__buttonspacing > :last-child, -.tox[dir="rtl"] .tox-comment__edit > :last-child, -.tox[dir="rtl"] .tox-comment__reply > :last-child { - margin-right: 8px; -} -.tox .tox-user { - align-items: center; - display: flex; -} -.tox .tox-user__avatar svg { - fill: rgba(34, 47, 62, 0.7); -} -.tox .tox-user__avatar img { - border-radius: 50%; - height: 36px; - object-fit: cover; - vertical-align: middle; - width: 36px; -} -.tox .tox-user__name { - color: #222f3e; - font-size: 14px; - font-style: normal; - font-weight: 700; - line-height: 18px; - text-transform: none; -} -.tox:not([dir="rtl"]) .tox-user__avatar img, -.tox:not([dir="rtl"]) .tox-user__avatar svg { - margin-right: 8px; -} -.tox:not([dir="rtl"]) .tox-user__avatar + .tox-user__name { - margin-left: 8px; -} -.tox[dir="rtl"] .tox-user__avatar img, -.tox[dir="rtl"] .tox-user__avatar svg { - margin-left: 8px; -} -.tox[dir="rtl"] .tox-user__avatar + .tox-user__name { - margin-right: 8px; -} -.tox .tox-dialog-wrap { - align-items: center; - bottom: 0; - display: flex; - justify-content: center; - left: 0; - position: fixed; - right: 0; - top: 0; - z-index: 1100; -} -.tox .tox-dialog-wrap__backdrop { - background-color: rgba(255, 255, 255, 0.75); - bottom: 0; - left: 0; - position: absolute; - right: 0; - top: 0; - z-index: 1; -} -.tox .tox-dialog-wrap__backdrop--opaque { - background-color: #000; -} -.tox .tox-dialog { - background-color: #000; - border-color: #eee; - border-radius: 10px; - border-style: solid; - border-width: 0; - box-shadow: - 0 16px 16px -10px rgba(34, 47, 62, 0.15), - 0 0 40px 1px rgba(34, 47, 62, 0.15); - display: flex; - flex-direction: column; - max-height: 100%; - max-width: 480px; - overflow: hidden; - position: relative; - width: 95vw; - z-index: 2; -} -@media only screen and (max-width: 767px) { - body:not(.tox-force-desktop) .tox .tox-dialog { - align-self: flex-start; - margin: 8px auto; - max-height: calc(100vh - 8px * 2); - width: calc(100vw - 16px); - } -} -.tox .tox-dialog-inline { - z-index: 1100; -} -.tox .tox-dialog__header { - align-items: center; - background-color: #000; - border-bottom: none; - color: #222f3e; - display: flex; - font-size: 16px; - justify-content: space-between; - padding: 8px 16px 0 16px; - position: relative; -} -.tox .tox-dialog__header .tox-button { - z-index: 1; -} -.tox .tox-dialog__draghandle { - cursor: grab; - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} -.tox .tox-dialog__draghandle:active { - cursor: grabbing; -} -.tox .tox-dialog__dismiss { - margin-left: auto; -} -.tox .tox-dialog__title { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - font-size: 20px; - font-style: normal; - font-weight: 400; - line-height: 1.3; - margin: 0; - text-transform: none; -} -.tox .tox-dialog__body { - color: #222f3e; - display: flex; - flex: 1; - font-size: 16px; - font-style: normal; - font-weight: 400; - line-height: 1.3; - min-width: 0; - text-align: left; - text-transform: none; -} -@media only screen and (max-width: 767px) { - body:not(.tox-force-desktop) .tox .tox-dialog__body { - flex-direction: column; - } -} -.tox .tox-dialog__body-nav { - align-items: flex-start; - display: flex; - flex-direction: column; - flex-shrink: 0; - padding: 16px 16px; -} -@media only screen and (min-width: 768px) { - .tox .tox-dialog__body-nav { - max-width: 11em; - } -} -@media only screen and (max-width: 767px) { - body:not(.tox-force-desktop) .tox .tox-dialog__body-nav { - flex-direction: row; - -webkit-overflow-scrolling: touch; - overflow-x: auto; - padding-bottom: 0; - } -} -.tox .tox-dialog__body-nav-item { - border-bottom: 2px solid transparent; - color: rgba(34, 47, 62, 0.7); - display: inline-block; - flex-shrink: 0; - font-size: 14px; - line-height: 1.3; - margin-bottom: 8px; - max-width: 13em; - text-decoration: none; -} -.tox .tox-dialog__body-nav-item:focus { - background-color: rgba(0, 108, 231, 0.1); -} -.tox .tox-dialog__body-nav-item--active { - border-bottom: 2px solid #006ce7; - color: #006ce7; -} -.tox .tox-dialog__body-content { - box-sizing: border-box; - display: flex; - flex: 1; - flex-direction: column; - max-height: min(650px, calc(100vh - 110px)); - overflow: auto; - -webkit-overflow-scrolling: touch; - padding: 16px 16px; -} -.tox .tox-dialog__body-content > * { - margin-bottom: 0; - margin-top: 16px; -} -.tox .tox-dialog__body-content > :first-child { - margin-top: 0; -} -.tox .tox-dialog__body-content > :last-child { - margin-bottom: 0; -} -.tox .tox-dialog__body-content > :only-child { - margin-bottom: 0; - margin-top: 0; -} -.tox .tox-dialog__body-content a { - color: #006ce7; - cursor: pointer; - text-decoration: underline; -} -.tox .tox-dialog__body-content a:focus, -.tox .tox-dialog__body-content a:hover { - color: #003c81; - text-decoration: underline; -} -.tox .tox-dialog__body-content a:focus-visible { - border-radius: 1px; - outline: 2px solid #006ce7; - outline-offset: 2px; -} -.tox .tox-dialog__body-content a:active { - color: #00244e; - text-decoration: underline; -} -.tox .tox-dialog__body-content svg { - fill: #222f3e; -} -.tox .tox-dialog__body-content strong { - font-weight: 700; -} -.tox .tox-dialog__body-content ul { - list-style-type: disc; -} -.tox .tox-dialog__body-content dd, -.tox .tox-dialog__body-content ol, -.tox .tox-dialog__body-content ul { - padding-inline-start: 2.5rem; -} -.tox .tox-dialog__body-content dl, -.tox .tox-dialog__body-content ol, -.tox .tox-dialog__body-content ul { - margin-bottom: 16px; -} -.tox .tox-dialog__body-content dd, -.tox .tox-dialog__body-content dl, -.tox .tox-dialog__body-content dt, -.tox .tox-dialog__body-content ol, -.tox .tox-dialog__body-content ul { - display: block; - margin-inline-end: 0; - margin-inline-start: 0; -} -.tox .tox-dialog__body-content .tox-form__group h1 { - color: #222f3e; - font-size: 20px; - font-style: normal; - font-weight: 700; - letter-spacing: normal; - margin-bottom: 16px; - margin-top: 2rem; - text-transform: none; -} -.tox .tox-dialog__body-content .tox-form__group h2 { - color: #222f3e; - font-size: 16px; - font-style: normal; - font-weight: 700; - letter-spacing: normal; - margin-bottom: 16px; - margin-top: 2rem; - text-transform: none; -} -.tox .tox-dialog__body-content .tox-form__group p { - margin-bottom: 16px; -} -.tox .tox-dialog__body-content .tox-form__group h1:first-child, -.tox .tox-dialog__body-content .tox-form__group h2:first-child, -.tox .tox-dialog__body-content .tox-form__group p:first-child { - margin-top: 0; -} -.tox .tox-dialog__body-content .tox-form__group h1:last-child, -.tox .tox-dialog__body-content .tox-form__group h2:last-child, -.tox .tox-dialog__body-content .tox-form__group p:last-child { - margin-bottom: 0; -} -.tox .tox-dialog__body-content .tox-form__group h1:only-child, -.tox .tox-dialog__body-content .tox-form__group h2:only-child, -.tox .tox-dialog__body-content .tox-form__group p:only-child { - margin-bottom: 0; - margin-top: 0; -} -.tox .tox-dialog__body-content .tox-form__group .tox-label.tox-label--center { - text-align: center; -} -.tox .tox-dialog__body-content .tox-form__group .tox-label.tox-label--end { - text-align: end; -} -.tox .tox-dialog--width-lg { - height: 650px; - max-width: 1200px; -} -.tox .tox-dialog--fullscreen { - height: 100%; - max-width: 100%; -} -.tox .tox-dialog--fullscreen .tox-dialog__body-content { - max-height: 100%; -} -.tox .tox-dialog--width-md { - max-width: 800px; -} -.tox .tox-dialog--width-md .tox-dialog__body-content { - overflow: auto; -} -.tox .tox-dialog__body-content--centered { - text-align: center; -} -.tox .tox-dialog__footer { - align-items: center; - background-color: #000; - border-top: none; - display: flex; - justify-content: space-between; - padding: 8px 16px; -} -.tox .tox-dialog__footer-end, -.tox .tox-dialog__footer-start { - display: flex; -} -.tox .tox-dialog__busy-spinner { - align-items: center; - background-color: rgba(255, 255, 255, 0.75); - bottom: 0; - display: flex; - justify-content: center; - left: 0; - position: absolute; - right: 0; - top: 0; - z-index: 3; -} -.tox .tox-dialog__table { - border-collapse: collapse; - width: 100%; -} -.tox .tox-dialog__table thead th { - font-weight: 700; - padding-bottom: 8px; -} -.tox .tox-dialog__table thead th:first-child { - padding-right: 8px; -} -.tox .tox-dialog__table tbody tr { - border-bottom: 1px solid #626262; -} -.tox .tox-dialog__table tbody tr:last-child { - border-bottom: none; -} -.tox .tox-dialog__table td { - padding-bottom: 8px; - padding-top: 8px; -} -.tox .tox-dialog__table td:first-child { - padding-right: 8px; -} -.tox .tox-dialog__iframe { - min-height: 200px; -} -.tox .tox-dialog__iframe.tox-dialog__iframe--opaque { - background: #000; -} -.tox .tox-navobj-bordered { - position: relative; -} -.tox .tox-navobj-bordered::before { - border: 1px solid #eee; - border-radius: 6px; - content: ""; - inset: 0; - opacity: 1; - pointer-events: none; - position: absolute; - z-index: 1; -} -.tox .tox-navobj-bordered-focus.tox-navobj-bordered::before { - border-color: #006ce7; - box-shadow: 0 0 0 2px rgba(0, 108, 231, 0.25); - outline: 0; -} -.tox .tox-dialog__popups { - position: absolute; - width: 100%; - z-index: 1100; -} -.tox .tox-dialog__body-iframe { - display: flex; - flex: 1; - flex-direction: column; -} -.tox .tox-dialog__body-iframe .tox-navobj { - display: flex; - flex: 1; -} -.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2) { - flex: 1; - height: 100%; -} -.tox .tox-dialog-dock-fadeout { - opacity: 0; - visibility: hidden; -} -.tox .tox-dialog-dock-fadein { - opacity: 1; - visibility: visible; -} -.tox .tox-dialog-dock-transition { - transition: - visibility 0s linear 0.3s, - opacity 0.3s ease; -} -.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein { - transition-delay: 0s; -} -@media only screen and (max-width: 767px) { - body:not(.tox-force-desktop) .tox:not([dir="rtl"]) .tox-dialog__body-nav { - margin-right: 0; - } -} -@media only screen and (max-width: 767px) { - body:not(.tox-force-desktop) - .tox:not([dir="rtl"]) - .tox-dialog__body-nav-item:not(:first-child) { - margin-left: 8px; - } -} -.tox:not([dir="rtl"]) .tox-dialog__footer .tox-dialog__footer-end > *, -.tox:not([dir="rtl"]) .tox-dialog__footer .tox-dialog__footer-start > * { - margin-left: 8px; -} -.tox[dir="rtl"] .tox-dialog__body { - text-align: right; -} -@media only screen and (max-width: 767px) { - body:not(.tox-force-desktop) .tox[dir="rtl"] .tox-dialog__body-nav { - margin-left: 0; - } -} -@media only screen and (max-width: 767px) { - body:not(.tox-force-desktop) - .tox[dir="rtl"] - .tox-dialog__body-nav-item:not(:first-child) { - margin-right: 8px; - } -} -.tox[dir="rtl"] .tox-dialog__footer .tox-dialog__footer-end > *, -.tox[dir="rtl"] .tox-dialog__footer .tox-dialog__footer-start > * { - margin-right: 8px; -} -body.tox-dialog__disable-scroll { - overflow: hidden; -} -.tox .tox-dropzone-container { - display: flex; - flex: 1; -} -.tox .tox-dropzone { - align-items: center; - background: #000; - border: 2px dashed #eee; - box-sizing: border-box; - display: flex; - flex-direction: column; - flex-grow: 1; - justify-content: center; - min-height: 100px; - padding: 10px; -} -.tox .tox-dropzone p { - color: rgba(34, 47, 62, 0.7); - margin: 0 0 16px 0; -} -.tox .tox-edit-area { - display: flex; - flex: 1; - overflow: hidden; - position: relative; -} -.tox .tox-edit-area::before { - border: 2px solid #2d6adf; - border-radius: 4px; - content: ""; - inset: 0; - opacity: 0; - pointer-events: none; - position: absolute; - transition: opacity 0.15s; - z-index: 1; -} -.tox .tox-edit-area__iframe { - background-color: #000; - border: 0; - box-sizing: border-box; - flex: 1; - height: 100%; - position: absolute; - width: 100%; -} -.tox.tox-edit-focus .tox-edit-area::before { - opacity: 1; -} -.tox.tox-inline-edit-area { - border: 1px dotted #eee; -} -.tox .tox-editor-container { - display: flex; - flex: 1 1 auto; - flex-direction: column; - overflow: hidden; -} -.tox .tox-editor-header { - display: grid; - grid-template-columns: 1fr min-content; - z-index: 2; -} -.tox:not(.tox-tinymce-inline) .tox-editor-header { - background-color: #000; - border-bottom: none; - box-shadow: - 0 2px 2px -2px rgba(34, 47, 62, 0.1), - 0 8px 8px -4px rgba(34, 47, 62, 0.07); - padding: 4px 0; -} -.tox:not(.tox-tinymce-inline) - .tox-editor-header:not(.tox-editor-dock-transition) { - transition: box-shadow 0.5s; -} -.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-bottom .tox-editor-header { - border-top: 1px solid #e3e3e3; - box-shadow: none; -} -.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-sticky-on - .tox-editor-header { - background-color: #000; - box-shadow: - 0 2px 2px -2px rgba(34, 47, 62, 0.2), - 0 8px 8px -4px rgba(34, 47, 62, 0.15); - padding: 4px 0; -} -.tox:not( - .tox-tinymce-inline - ).tox-tinymce--toolbar-sticky-on.tox-tinymce--toolbar-bottom - .tox-editor-header { - box-shadow: - 0 2px 2px -2px rgba(34, 47, 62, 0.2), - 0 8px 8px -4px rgba(34, 47, 62, 0.15); -} -.tox.tox:not(.tox-tinymce-inline) .tox-editor-header.tox-editor-header--empty { - background: 0 0; - border: none; - box-shadow: none; - padding: 0; -} -.tox-editor-dock-fadeout { - opacity: 0; - visibility: hidden; -} -.tox-editor-dock-fadein { - opacity: 1; - visibility: visible; -} -.tox-editor-dock-transition { - transition: - visibility 0s linear 0.25s, - opacity 0.25s ease; -} -.tox-editor-dock-transition.tox-editor-dock-fadein { - transition-delay: 0s; -} -.tox .tox-control-wrap { - flex: 1; - position: relative; -} -.tox - .tox-control-wrap:not(.tox-control-wrap--status-invalid) - .tox-control-wrap__status-icon-invalid, -.tox - .tox-control-wrap:not(.tox-control-wrap--status-unknown) - .tox-control-wrap__status-icon-unknown, -.tox - .tox-control-wrap:not(.tox-control-wrap--status-valid) - .tox-control-wrap__status-icon-valid { - display: none; -} -.tox .tox-control-wrap svg { - display: block; -} -.tox .tox-control-wrap__status-icon-wrap { - position: absolute; - top: 50%; - transform: translateY(-50%); -} -.tox .tox-control-wrap__status-icon-invalid svg { - fill: #c00; -} -.tox .tox-control-wrap__status-icon-unknown svg { - fill: orange; -} -.tox .tox-control-wrap__status-icon-valid svg { - fill: green; -} -.tox:not([dir="rtl"]) .tox-control-wrap--status-invalid .tox-textfield, -.tox:not([dir="rtl"]) .tox-control-wrap--status-unknown .tox-textfield, -.tox:not([dir="rtl"]) .tox-control-wrap--status-valid .tox-textfield { - padding-right: 32px; -} -.tox:not([dir="rtl"]) .tox-control-wrap__status-icon-wrap { - right: 4px; -} -.tox[dir="rtl"] .tox-control-wrap--status-invalid .tox-textfield, -.tox[dir="rtl"] .tox-control-wrap--status-unknown .tox-textfield, -.tox[dir="rtl"] .tox-control-wrap--status-valid .tox-textfield { - padding-left: 32px; -} -.tox[dir="rtl"] .tox-control-wrap__status-icon-wrap { - left: 4px; -} -.tox .tox-autocompleter { - max-width: 25em; -} -.tox .tox-autocompleter .tox-menu { - box-sizing: border-box; - max-width: 25em; -} -.tox .tox-autocompleter .tox-autocompleter-highlight { - font-weight: 700; -} -.tox .tox-color-input { - display: flex; - position: relative; - z-index: 1; -} -.tox .tox-color-input .tox-textfield { - z-index: -1; -} -.tox .tox-color-input span { - border-color: rgba(34, 47, 62, 0.2); - border-radius: 6px; - border-style: solid; - border-width: 1px; - box-shadow: none; - box-sizing: border-box; - height: 24px; - position: absolute; - top: 6px; - width: 24px; -} -.tox .tox-color-input span:focus:not([aria-disabled="true"]), -.tox .tox-color-input span:hover:not([aria-disabled="true"]) { - border-color: #006ce7; - cursor: pointer; -} -.tox .tox-color-input span::before { - background-image: linear-gradient( - 45deg, - rgba(0, 0, 0, 0.25) 25%, - transparent 25% - ), - linear-gradient(-45deg, rgba(0, 0, 0, 0.25) 25%, transparent 25%), - linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.25) 75%), - linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.25) 75%); - background-position: - 0 0, - 0 6px, - 6px -6px, - -6px 0; - background-size: 12px 12px; - border: 1px solid #000; - border-radius: 6px; - box-sizing: border-box; - content: ""; - height: 24px; - left: -1px; - position: absolute; - top: -1px; - width: 24px; - z-index: -1; -} -.tox .tox-color-input span[aria-disabled="true"] { - cursor: not-allowed; -} -.tox:not([dir="rtl"]) .tox-color-input .tox-textfield { - padding-left: 36px; -} -.tox:not([dir="rtl"]) .tox-color-input span { - left: 6px; -} -.tox[dir="rtl"] .tox-color-input .tox-textfield { - padding-right: 36px; -} -.tox[dir="rtl"] .tox-color-input span { - right: 6px; -} -.tox .tox-label, -.tox .tox-toolbar-label { - color: rgba(34, 47, 62, 0.7); - display: block; - font-size: 14px; - font-style: normal; - font-weight: 400; - line-height: 1.3; - padding: 0 8px 0 0; - text-transform: none; - white-space: nowrap; -} -.tox .tox-toolbar-label { - padding: 0 8px; -} -.tox[dir="rtl"] .tox-label { - padding: 0 0 0 8px; -} -.tox .tox-form { - display: flex; - flex: 1; - flex-direction: column; -} -.tox .tox-form__group { - box-sizing: border-box; - margin-bottom: 4px; -} -.tox .tox-form-group--maximize { - flex: 1; -} -.tox .tox-form__group--error { - color: #c00; -} -.tox .tox-form__group--collection { - display: flex; -} -.tox .tox-form__grid { - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: space-between; -} -.tox .tox-form__grid--2col > .tox-form__group { - width: calc(50% - (8px / 2)); -} -.tox .tox-form__grid--3col > .tox-form__group { - width: calc(100% / 3 - (8px / 2)); -} -.tox .tox-form__grid--4col > .tox-form__group { - width: calc(25% - (8px / 2)); -} -.tox .tox-form__controls-h-stack { - align-items: center; - display: flex; -} -.tox .tox-form__group--inline { - align-items: center; - display: flex; -} -.tox .tox-form__group--stretched { - display: flex; - flex: 1; - flex-direction: column; -} -.tox .tox-form__group--stretched .tox-textarea { - flex: 1; -} -.tox .tox-form__group--stretched .tox-navobj { - display: flex; - flex: 1; -} -.tox .tox-form__group--stretched .tox-navobj :nth-child(2) { - flex: 1; - height: 100%; -} -.tox:not([dir="rtl"]) .tox-form__controls-h-stack > :not(:first-child) { - margin-left: 4px; -} -.tox[dir="rtl"] .tox-form__controls-h-stack > :not(:first-child) { - margin-right: 4px; -} -.tox .tox-lock.tox-locked .tox-lock-icon__unlock, -.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock { - display: none; -} -.tox .tox-listboxfield .tox-listbox--select, -.tox .tox-textarea, -.tox .tox-textarea-wrap .tox-textarea:focus, -.tox .tox-textfield, -.tox .tox-toolbar-textfield { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - background-color: #000; - border-color: #eee; - border-radius: 6px; - border-style: solid; - border-width: 1px; - box-shadow: none; - box-sizing: border-box; - color: #222f3e; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - font-size: 16px; - line-height: 24px; - margin: 0; - min-height: 34px; - outline: 0; - padding: 5px 5.5px; - resize: none; - width: 100%; -} -.tox .tox-textarea[disabled], -.tox .tox-textfield[disabled] { - background-color: #f2f2f2; - color: rgba(34, 47, 62, 0.85); - cursor: not-allowed; -} -.tox .tox-custom-editor:focus-within, -.tox .tox-listboxfield .tox-listbox--select:focus, -.tox .tox-textarea-wrap:focus-within, -.tox .tox-textarea:focus, -.tox .tox-textfield:focus { - background-color: #000; - border-color: #006ce7; - box-shadow: 0 0 0 2px rgba(0, 108, 231, 0.25); - outline: 0; -} -.tox .tox-toolbar-textfield { - border-width: 0; - margin-bottom: 3px; - margin-top: 2px; - max-width: 250px; -} -.tox .tox-naked-btn { - background-color: transparent; - border: 0; - border-color: transparent; - box-shadow: unset; - color: #006ce7; - cursor: pointer; - display: block; - margin: 0; - padding: 0; -} -.tox .tox-naked-btn svg { - display: block; - fill: #222f3e; -} -.tox:not([dir="rtl"]) .tox-toolbar-textfield + * { - margin-left: 4px; -} -.tox[dir="rtl"] .tox-toolbar-textfield + * { - margin-right: 4px; -} -.tox .tox-listboxfield { - cursor: pointer; - position: relative; -} -.tox .tox-listboxfield .tox-listbox--select[disabled] { - background-color: #f2f2f2; - color: rgba(34, 47, 62, 0.85); - cursor: not-allowed; -} -.tox .tox-listbox__select-label { - cursor: default; - flex: 1; - margin: 0 4px; -} -.tox .tox-listbox__select-chevron { - align-items: center; - display: flex; - justify-content: center; - width: 16px; -} -.tox .tox-listbox__select-chevron svg { - fill: #222f3e; -} -.tox .tox-listboxfield .tox-listbox--select { - align-items: center; - display: flex; -} -.tox:not([dir="rtl"]) .tox-listboxfield svg { - right: 8px; -} -.tox[dir="rtl"] .tox-listboxfield svg { - left: 8px; -} -.tox .tox-selectfield { - cursor: pointer; - position: relative; -} -.tox .tox-selectfield select { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - background-color: #000; - border-color: #eee; - border-radius: 6px; - border-style: solid; - border-width: 1px; - box-shadow: none; - box-sizing: border-box; - color: #222f3e; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - font-size: 16px; - line-height: 24px; - margin: 0; - min-height: 34px; - outline: 0; - padding: 5px 5.5px; - resize: none; - width: 100%; -} -.tox .tox-selectfield select[disabled] { - background-color: #f2f2f2; - color: rgba(34, 47, 62, 0.85); - cursor: not-allowed; -} -.tox .tox-selectfield select::-ms-expand { - display: none; -} -.tox .tox-selectfield select:focus { - background-color: #000; - border-color: #006ce7; - box-shadow: 0 0 0 2px rgba(0, 108, 231, 0.25); - outline: 0; -} -.tox .tox-selectfield svg { - pointer-events: none; - position: absolute; - top: 50%; - transform: translateY(-50%); -} -.tox:not([dir="rtl"]) .tox-selectfield select[size="0"], -.tox:not([dir="rtl"]) .tox-selectfield select[size="1"] { - padding-right: 24px; -} -.tox:not([dir="rtl"]) .tox-selectfield svg { - right: 8px; -} -.tox[dir="rtl"] .tox-selectfield select[size="0"], -.tox[dir="rtl"] .tox-selectfield select[size="1"] { - padding-left: 24px; -} -.tox[dir="rtl"] .tox-selectfield svg { - left: 8px; -} -.tox .tox-textarea-wrap { - border-color: #eee; - border-radius: 6px; - border-style: solid; - border-width: 1px; - display: flex; - flex: 1; - overflow: hidden; -} -.tox .tox-textarea { - -webkit-appearance: textarea; - -moz-appearance: textarea; - appearance: textarea; - white-space: pre-wrap; -} -.tox .tox-textarea-wrap .tox-textarea { - border: none; -} -.tox .tox-textarea-wrap .tox-textarea:focus { - border: none; -} -.tox-fullscreen { - border: 0; - height: 100%; - margin: 0; - overflow: hidden; - overscroll-behavior: none; - padding: 0; - touch-action: pinch-zoom; - width: 100%; -} -.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle { - display: none; -} -.tox-shadowhost.tox-fullscreen, -.tox.tox-tinymce.tox-fullscreen { - left: 0; - position: fixed; - top: 0; - z-index: 1200; -} -.tox.tox-tinymce.tox-fullscreen { - background-color: transparent; -} -.tox-fullscreen .tox.tox-tinymce-aux, -.tox-fullscreen ~ .tox.tox-tinymce-aux { - z-index: 1201; -} -.tox .tox-help__more-link { - list-style: none; - margin-top: 1em; -} -.tox .tox-imagepreview { - background-color: #666; - height: 380px; - overflow: hidden; - position: relative; - width: 100%; -} -.tox .tox-imagepreview.tox-imagepreview__loaded { - overflow: auto; -} -.tox .tox-imagepreview__container { - display: flex; - left: 100vw; - position: absolute; - top: 100vw; -} -.tox .tox-imagepreview__image { - background: url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==); -} -.tox .tox-image-tools .tox-spacer { - flex: 1; -} -.tox .tox-image-tools .tox-bar { - align-items: center; - display: flex; - height: 60px; - justify-content: center; -} -.tox .tox-image-tools .tox-imagepreview, -.tox .tox-image-tools .tox-imagepreview + .tox-bar { - margin-top: 8px; -} -.tox .tox-image-tools .tox-croprect-block { - background: #000; - opacity: 0.5; - position: absolute; - zoom: 1; -} -.tox .tox-image-tools .tox-croprect-handle { - border: 2px solid #000; - height: 20px; - left: 0; - position: absolute; - top: 0; - width: 20px; -} -.tox .tox-image-tools .tox-croprect-handle-move { - border: 0; - cursor: move; - position: absolute; -} -.tox .tox-image-tools .tox-croprect-handle-nw { - border-width: 2px 0 0 2px; - cursor: nw-resize; - left: 100px; - margin: -2px 0 0 -2px; - top: 100px; -} -.tox .tox-image-tools .tox-croprect-handle-ne { - border-width: 2px 2px 0 0; - cursor: ne-resize; - left: 200px; - margin: -2px 0 0 -20px; - top: 100px; -} -.tox .tox-image-tools .tox-croprect-handle-sw { - border-width: 0 0 2px 2px; - cursor: sw-resize; - left: 100px; - margin: -20px 2px 0 -2px; - top: 200px; -} -.tox .tox-image-tools .tox-croprect-handle-se { - border-width: 0 2px 2px 0; - cursor: se-resize; - left: 200px; - margin: -20px 0 0 -20px; - top: 200px; -} -.tox .tox-insert-table-picker { - display: flex; - flex-wrap: wrap; - width: 170px; -} -.tox .tox-insert-table-picker > div { - border-color: #eee; - border-style: solid; - border-width: 0 1px 1px 0; - box-sizing: border-box; - height: 17px; - width: 17px; -} -.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker { - margin: -4px -4px; -} -.tox .tox-insert-table-picker .tox-insert-table-picker__selected { - background-color: rgba(0, 108, 231, 0.5); - border-color: rgba(0, 108, 231, 0.5); -} -.tox .tox-insert-table-picker__label { - color: rgba(34, 47, 62, 0.7); - display: block; - font-size: 14px; - padding: 4px; - text-align: center; - width: 100%; -} -.tox:not([dir="rtl"]) .tox-insert-table-picker > div:nth-child(10n) { - border-right: 0; -} -.tox[dir="rtl"] .tox-insert-table-picker > div:nth-child(10n + 1) { - border-right: 0; -} -.tox .tox-menu { - background-color: #000; - border: 1px solid transparent; - border-radius: 6px; - box-shadow: - 0 0 2px 0 rgba(34, 47, 62, 0.2), - 0 4px 8px 0 rgba(34, 47, 62, 0.15); - display: inline-block; - overflow: hidden; - vertical-align: top; - z-index: 1150; -} -.tox .tox-menu.tox-collection.tox-collection--list { - padding: 0 4px; -} -.tox .tox-menu.tox-collection.tox-collection--toolbar { - padding: 8px; -} -.tox .tox-menu.tox-collection.tox-collection--grid { - padding: 8px; -} -@media only screen and (min-width: 768px) { - .tox .tox-menu .tox-collection__item-label { - overflow-wrap: break-word; - word-break: normal; - } - .tox .tox-dialog__popups .tox-menu .tox-collection__item-label { - word-break: break-all; - } -} -.tox .tox-menu__label blockquote, -.tox .tox-menu__label code, -.tox .tox-menu__label h1, -.tox .tox-menu__label h2, -.tox .tox-menu__label h3, -.tox .tox-menu__label h4, -.tox .tox-menu__label h5, -.tox .tox-menu__label h6, -.tox .tox-menu__label p { - margin: 0; -} -.tox .tox-menubar { - background: repeating-linear-gradient(transparent 0 1px, transparent 1px 39px) - center top 39px/100% calc(100% - 39px) no-repeat; - background-color: #000; - display: flex; - flex: 0 0 auto; - flex-shrink: 0; - flex-wrap: wrap; - grid-column: 1/-1; - grid-row: 1; - padding: 0 11px 0 12px; -} -.tox .tox-promotion + .tox-menubar { - grid-column: 1; -} -.tox .tox-promotion { - background: repeating-linear-gradient(transparent 0 1px, transparent 1px 39px) - center top 39px/100% calc(100% - 39px) no-repeat; - background-color: #000; - grid-column: 2; - grid-row: 1; - padding-inline-end: 8px; - padding-inline-start: 4px; - padding-top: 5px; -} -.tox .tox-promotion-link { - align-items: unsafe center; - background-color: #e8f1f8; - border-radius: 5px; - color: #086be6; - cursor: pointer; - display: flex; - font-size: 14px; - height: 26.6px; - padding: 4px 8px; - white-space: nowrap; -} -.tox .tox-promotion-link:hover { - background-color: #b4d7ff; -} -.tox .tox-promotion-link:focus { - background-color: #d9edf7; -} -.tox .tox-mbtn { - align-items: center; - background: 0 0; - border: 0; - border-radius: 3px; - box-shadow: none; - color: #222f3e; - display: flex; - flex: 0 0 auto; - font-size: 14px; - font-style: normal; - font-weight: 400; - height: 28px; - justify-content: center; - margin: 5px 1px 6px 0; - outline: 0; - overflow: hidden; - padding: 0 4px; - text-transform: none; - width: auto; -} -.tox .tox-mbtn[disabled] { - background-color: transparent; - border: 0; - box-shadow: none; - color: rgba(34, 47, 62, 0.5); - cursor: not-allowed; -} -.tox .tox-mbtn:focus:not(:disabled) { - background: #cce2fa; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-mbtn--active { - background: #a6ccf7; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active) { - background: #cce2fa; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-mbtn__select-label { - cursor: default; - font-weight: 400; - margin: 0 4px; -} -.tox .tox-mbtn[disabled] .tox-mbtn__select-label { - cursor: not-allowed; -} -.tox .tox-mbtn__select-chevron { - align-items: center; - display: flex; - justify-content: center; - width: 16px; - display: none; -} -.tox .tox-notification { - border-radius: 6px; - border-style: solid; - border-width: 1px; - box-shadow: none; - box-sizing: border-box; - display: grid; - font-size: 14px; - font-weight: 400; - grid-template-columns: minmax(40px, 1fr) auto minmax(40px, 1fr); - margin-top: 4px; - opacity: 0; - padding: 4px; - transition: - transform 0.1s ease-in, - opacity 150ms ease-in; -} -.tox .tox-notification p { - font-size: 14px; - font-weight: 400; -} -.tox .tox-notification a { - cursor: pointer; - text-decoration: underline; -} -.tox .tox-notification--in { - opacity: 1; -} -.tox .tox-notification--success { - background-color: #e4eeda; - border-color: #d7e6c8; - color: #222f3e; -} -.tox .tox-notification--success p { - color: #222f3e; -} -.tox .tox-notification--success a { - color: #517342; -} -.tox .tox-notification--success svg { - fill: #222f3e; -} -.tox .tox-notification--error { - background-color: #f5cccc; - border-color: #f0b3b3; - color: #222f3e; -} -.tox .tox-notification--error p { - color: #222f3e; -} -.tox .tox-notification--error a { - color: #77181f; -} -.tox .tox-notification--error svg { - fill: #222f3e; -} -.tox .tox-notification--warn, -.tox .tox-notification--warning { - background-color: #0005cc; - border-color: #0000b3; - color: #222f3e; -} -.tox .tox-notification--warn p, -.tox .tox-notification--warning p { - color: #222f3e; -} -.tox .tox-notification--warn a, -.tox .tox-notification--warning a { - color: #7a6e25; -} -.tox .tox-notification--warn svg, -.tox .tox-notification--warning svg { - fill: #222f3e; -} -.tox .tox-notification--info { - background-color: #d6e7fb; - border-color: #c1dbf9; - color: #222f3e; -} -.tox .tox-notification--info p { - color: #222f3e; -} -.tox .tox-notification--info a { - color: #2a64a6; -} -.tox .tox-notification--info svg { - fill: #222f3e; -} -.tox .tox-notification__body { - align-self: center; - color: #222f3e; - font-size: 14px; - grid-column-end: 3; - grid-column-start: 2; - grid-row-end: 2; - grid-row-start: 1; - text-align: center; - white-space: normal; - word-break: break-all; - word-break: break-word; -} -.tox .tox-notification__body > * { - margin: 0; -} -.tox .tox-notification__body > * + * { - margin-top: 1rem; -} -.tox .tox-notification__icon { - align-self: center; - grid-column-end: 2; - grid-column-start: 1; - grid-row-end: 2; - grid-row-start: 1; - justify-self: end; -} -.tox .tox-notification__icon svg { - display: block; -} -.tox .tox-notification__dismiss { - align-self: start; - grid-column-end: 4; - grid-column-start: 3; - grid-row-end: 2; - grid-row-start: 1; - justify-self: end; -} -.tox .tox-notification .tox-progress-bar { - grid-column-end: 4; - grid-column-start: 1; - grid-row-end: 3; - grid-row-start: 2; - justify-self: center; -} -.tox .tox-pop { - display: inline-block; - position: relative; -} -.tox .tox-pop--resizing { - transition: width 0.1s ease; -} -.tox .tox-pop--resizing .tox-toolbar, -.tox .tox-pop--resizing .tox-toolbar__group { - flex-wrap: nowrap; -} -.tox .tox-pop--transition { - transition: 0.15s ease; - transition-property: left, right, top, bottom; -} -.tox .tox-pop--transition::after, -.tox .tox-pop--transition::before { - transition: - all 0.15s, - visibility 0s, - opacity 75ms ease 75ms; -} -.tox .tox-pop__dialog { - background-color: #000; - border: 1px solid #eee; - border-radius: 6px; - box-shadow: - 0 0 2px 0 rgba(34, 47, 62, 0.2), - 0 4px 8px 0 rgba(34, 47, 62, 0.15); - min-width: 0; - overflow: hidden; -} -.tox .tox-pop__dialog > :not(.tox-toolbar) { - margin: 4px 4px 4px 8px; -} -.tox .tox-pop__dialog .tox-toolbar { - background-color: transparent; - margin-bottom: -1px; -} -.tox .tox-pop::after, -.tox .tox-pop::before { - border-style: solid; - content: ""; - display: block; - height: 0; - opacity: 1; - position: absolute; - width: 0; -} -.tox .tox-pop.tox-pop--inset::after, -.tox .tox-pop.tox-pop--inset::before { - opacity: 0; - transition: - all 0s 0.15s, - visibility 0s, - opacity 75ms ease; -} -.tox .tox-pop.tox-pop--bottom::after, -.tox .tox-pop.tox-pop--bottom::before { - left: 50%; - top: 100%; -} -.tox .tox-pop.tox-pop--bottom::after { - border-color: #000 transparent transparent transparent; - border-width: 8px; - margin-left: -8px; - margin-top: -1px; -} -.tox .tox-pop.tox-pop--bottom::before { - border-color: #eee transparent transparent transparent; - border-width: 9px; - margin-left: -9px; -} -.tox .tox-pop.tox-pop--top::after, -.tox .tox-pop.tox-pop--top::before { - left: 50%; - top: 0; - transform: translateY(-100%); -} -.tox .tox-pop.tox-pop--top::after { - border-color: transparent transparent #000 transparent; - border-width: 8px; - margin-left: -8px; - margin-top: 1px; -} -.tox .tox-pop.tox-pop--top::before { - border-color: transparent transparent #eee transparent; - border-width: 9px; - margin-left: -9px; -} -.tox .tox-pop.tox-pop--left::after, -.tox .tox-pop.tox-pop--left::before { - left: 0; - top: calc(50% - 1px); - transform: translateY(-50%); -} -.tox .tox-pop.tox-pop--left::after { - border-color: transparent #000 transparent transparent; - border-width: 8px; - margin-left: -15px; -} -.tox .tox-pop.tox-pop--left::before { - border-color: transparent #eee transparent transparent; - border-width: 10px; - margin-left: -19px; -} -.tox .tox-pop.tox-pop--right::after, -.tox .tox-pop.tox-pop--right::before { - left: 100%; - top: calc(50% + 1px); - transform: translateY(-50%); -} -.tox .tox-pop.tox-pop--right::after { - border-color: transparent transparent transparent #000; - border-width: 8px; - margin-left: -1px; -} -.tox .tox-pop.tox-pop--right::before { - border-color: transparent transparent transparent #eee; - border-width: 10px; - margin-left: -1px; -} -.tox .tox-pop.tox-pop--align-left::after, -.tox .tox-pop.tox-pop--align-left::before { - left: 20px; -} -.tox .tox-pop.tox-pop--align-right::after, -.tox .tox-pop.tox-pop--align-right::before { - left: calc(100% - 20px); -} -.tox .tox-sidebar-wrap { - display: flex; - flex-direction: row; - flex-grow: 1; - min-height: 0; -} -.tox .tox-sidebar { - background-color: #000; - display: flex; - flex-direction: row; - justify-content: flex-end; -} -.tox .tox-sidebar__slider { - display: flex; - overflow: hidden; -} -.tox .tox-sidebar__pane-container { - display: flex; -} -.tox .tox-sidebar__pane { - display: flex; -} -.tox .tox-sidebar--sliding-closed { - opacity: 0; -} -.tox .tox-sidebar--sliding-open { - opacity: 1; -} -.tox .tox-sidebar--sliding-growing, -.tox .tox-sidebar--sliding-shrinking { - transition: - width 0.5s ease, - opacity 0.5s ease; -} -.tox .tox-selector { - background-color: #4099ff; - border-color: #4099ff; - border-style: solid; - border-width: 1px; - box-sizing: border-box; - display: inline-block; - height: 10px; - position: absolute; - width: 10px; -} -.tox.tox-platform-touch .tox-selector { - height: 12px; - width: 12px; -} -.tox .tox-slider { - align-items: center; - display: flex; - flex: 1; - height: 24px; - justify-content: center; - position: relative; -} -.tox .tox-slider__rail { - background-color: transparent; - border: 1px solid #eee; - border-radius: 6px; - height: 10px; - min-width: 120px; - width: 100%; -} -.tox .tox-slider__handle { - background-color: #006ce7; - border: 2px solid #0054b4; - border-radius: 6px; - box-shadow: none; - height: 24px; - left: 50%; - position: absolute; - top: 50%; - transform: translateX(-50%) translateY(-50%); - width: 14px; -} -.tox .tox-form__controls-h-stack > .tox-slider:not(:first-of-type) { - margin-inline-start: 8px; -} -.tox .tox-form__controls-h-stack > .tox-form__group + .tox-slider { - margin-inline-start: 32px; -} -.tox .tox-form__controls-h-stack > .tox-slider + .tox-form__group { - margin-inline-start: 32px; -} -.tox .tox-source-code { - overflow: auto; -} -.tox .tox-spinner { - display: flex; -} -.tox .tox-spinner > div { - animation: tam-bouncing-dots 1.5s ease-in-out 0s infinite both; - background-color: rgba(34, 47, 62, 0.7); - border-radius: 100%; - height: 8px; - width: 8px; -} -.tox .tox-spinner > div:nth-child(1) { - animation-delay: -0.32s; -} -.tox .tox-spinner > div:nth-child(2) { - animation-delay: -0.16s; -} -@keyframes tam-bouncing-dots { - 0%, - 100%, - 80% { - transform: scale(0); - } - 40% { - transform: scale(1); - } -} -.tox:not([dir="rtl"]) .tox-spinner > div:not(:first-child) { - margin-left: 4px; -} -.tox[dir="rtl"] .tox-spinner > div:not(:first-child) { - margin-right: 4px; -} -.tox .tox-statusbar { - align-items: center; - background-color: #000; - border-top: 1px solid #e3e3e3; - color: rgba(34, 47, 62, 0.7); - display: flex; - flex: 0 0 auto; - font-size: 14px; - font-weight: 400; - height: 25px; - overflow: hidden; - padding: 0 8px; - position: relative; - text-transform: none; -} -.tox .tox-statusbar__path { - display: flex; - flex: 1 1 auto; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.tox .tox-statusbar__right-container { - display: flex; - justify-content: flex-end; - white-space: nowrap; -} -.tox .tox-statusbar__help-text { - text-align: center; -} -.tox .tox-statusbar__text-container { - display: flex; - flex: 1 1 auto; - justify-content: space-between; - overflow: hidden; -} -@media only screen and (min-width: 768px) { - .tox - .tox-statusbar__text-container.tox-statusbar__text-container-3-cols - > .tox-statusbar__help-text, - .tox - .tox-statusbar__text-container.tox-statusbar__text-container-3-cols - > .tox-statusbar__path, - .tox - .tox-statusbar__text-container.tox-statusbar__text-container-3-cols - > .tox-statusbar__right-container { - flex: 0 0 calc(100% / 3); - } -} -.tox .tox-statusbar__text-container.tox-statusbar__text-container--flex-end { - justify-content: flex-end; -} -.tox .tox-statusbar__text-container.tox-statusbar__text-container--flex-start { - justify-content: flex-start; -} -.tox - .tox-statusbar__text-container.tox-statusbar__text-container--space-around { - justify-content: space-around; -} -.tox .tox-statusbar__path > * { - display: inline; - white-space: nowrap; -} -.tox .tox-statusbar__wordcount { - flex: 0 0 auto; - margin-left: 1ch; -} -@media only screen and (max-width: 767px) { - .tox .tox-statusbar__text-container .tox-statusbar__help-text { - display: none; - } - .tox .tox-statusbar__text-container .tox-statusbar__help-text:only-child { - display: block; - } -} -.tox .tox-statusbar a, -.tox .tox-statusbar__path-item, -.tox .tox-statusbar__wordcount { - color: rgba(34, 47, 62, 0.7); - text-decoration: none; -} -.tox .tox-statusbar a:focus:not(:disabled):not([aria-disabled="true"]), -.tox .tox-statusbar a:hover:not(:disabled):not([aria-disabled="true"]), -.tox .tox-statusbar__path-item:focus:not(:disabled):not([aria-disabled="true"]), -.tox .tox-statusbar__path-item:hover:not(:disabled):not([aria-disabled="true"]), -.tox .tox-statusbar__wordcount:focus:not(:disabled):not([aria-disabled="true"]), -.tox - .tox-statusbar__wordcount:hover:not(:disabled):not([aria-disabled="true"]) { - color: #222f3e; - cursor: pointer; -} -.tox .tox-statusbar__branding svg { - fill: rgba(34, 47, 62, 0.8); - height: 1.14em; - vertical-align: -0.28em; - width: 3.6em; -} -.tox - .tox-statusbar__branding - a:focus:not(:disabled):not([aria-disabled="true"]) - svg, -.tox - .tox-statusbar__branding - a:hover:not(:disabled):not([aria-disabled="true"]) - svg { - fill: #222f3e; -} -.tox .tox-statusbar__resize-handle { - align-items: flex-end; - align-self: stretch; - cursor: nwse-resize; - display: flex; - flex: 0 0 auto; - justify-content: flex-end; - margin-left: auto; - margin-right: -8px; - padding-bottom: 3px; - padding-left: 1ch; - padding-right: 3px; -} -.tox .tox-statusbar__resize-handle svg { - display: block; - fill: rgba(34, 47, 62, 0.5); -} -.tox .tox-statusbar__resize-handle:focus svg { - background-color: #dee0e2; - border-radius: 1px 1px 5px 1px; - box-shadow: 0 0 0 2px #dee0e2; -} -.tox:not([dir="rtl"]) .tox-statusbar__path > * { - margin-right: 4px; -} -.tox:not([dir="rtl"]) .tox-statusbar__branding { - margin-left: 2ch; -} -.tox[dir="rtl"] .tox-statusbar { - flex-direction: row-reverse; -} -.tox[dir="rtl"] .tox-statusbar__path > * { - margin-left: 4px; -} -.tox .tox-throbber { - z-index: 1299; -} -.tox .tox-throbber__busy-spinner { - align-items: center; - background-color: rgba(255, 255, 255, 0.6); - bottom: 0; - display: flex; - justify-content: center; - left: 0; - position: absolute; - right: 0; - top: 0; -} -.tox .tox-tbtn { - align-items: center; - background: 0 0; - border: 0; - border-radius: 3px; - box-shadow: none; - color: #222f3e; - display: flex; - flex: 0 0 auto; - font-size: 14px; - font-style: normal; - font-weight: 400; - height: 28px; - justify-content: center; - margin: 6px 1px 5px 0; - outline: 0; - overflow: hidden; - padding: 0; - text-transform: none; - width: 34px; -} -.tox .tox-tbtn svg { - display: block; - fill: #222f3e; -} -.tox .tox-tbtn.tox-tbtn-more { - padding-left: 5px; - padding-right: 5px; - width: inherit; -} -.tox .tox-tbtn:focus { - background: #cce2fa; - border: 0; - box-shadow: none; -} -.tox .tox-tbtn:hover { - background: #cce2fa; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-tbtn:hover svg { - fill: #222f3e; -} -.tox .tox-tbtn:active { - background: #a6ccf7; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-tbtn:active svg { - fill: #222f3e; -} -.tox .tox-tbtn--disabled .tox-tbtn--enabled svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox .tox-tbtn--disabled, -.tox .tox-tbtn--disabled:hover, -.tox .tox-tbtn:disabled, -.tox .tox-tbtn:disabled:hover { - background: 0 0; - border: 0; - box-shadow: none; - color: rgba(34, 47, 62, 0.5); - cursor: not-allowed; -} -.tox .tox-tbtn--disabled svg, -.tox .tox-tbtn--disabled:hover svg, -.tox .tox-tbtn:disabled svg, -.tox .tox-tbtn:disabled:hover svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox .tox-tbtn--enabled, -.tox .tox-tbtn--enabled:hover { - background: #a6ccf7; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-tbtn--enabled:hover > *, -.tox .tox-tbtn--enabled > * { - transform: none; -} -.tox .tox-tbtn--enabled svg, -.tox .tox-tbtn--enabled:hover svg { - fill: #222f3e; -} -.tox .tox-tbtn--enabled.tox-tbtn--disabled svg, -.tox .tox-tbtn--enabled:hover.tox-tbtn--disabled svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) { - color: #222f3e; -} -.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) svg { - fill: #222f3e; -} -.tox .tox-tbtn:active > * { - transform: none; -} -.tox .tox-tbtn--md { - height: 42px; - width: 51px; -} -.tox .tox-tbtn--lg { - flex-direction: column; - height: 56px; - width: 68px; -} -.tox .tox-tbtn--return { - align-self: stretch; - height: unset; - width: 16px; -} -.tox .tox-tbtn--labeled { - padding: 0 4px; - width: unset; -} -.tox .tox-tbtn__vlabel { - display: block; - font-size: 10px; - font-weight: 400; - letter-spacing: -0.025em; - margin-bottom: 4px; - white-space: nowrap; -} -.tox .tox-number-input { - border-radius: 3px; - display: flex; - margin: 6px 1px 5px 0; - padding: 0 4px; - width: auto; -} -.tox .tox-number-input .tox-input-wrapper { - background: #f7f7f7; - display: flex; - pointer-events: none; - text-align: center; -} -.tox .tox-number-input .tox-input-wrapper:focus { - background: #cce2fa; -} -.tox .tox-number-input input { - border-radius: 3px; - color: #222f3e; - font-size: 14px; - margin: 2px 0; - pointer-events: all; - width: 60px; -} -.tox .tox-number-input input:hover { - background: #cce2fa; - color: #222f3e; -} -.tox .tox-number-input input:focus { - background: #000; - color: #222f3e; -} -.tox .tox-number-input input:disabled { - background: 0 0; - border: 0; - box-shadow: none; - color: rgba(34, 47, 62, 0.5); - cursor: not-allowed; -} -.tox .tox-number-input button { - background: #f7f7f7; - color: #222f3e; - height: 28px; - text-align: center; - width: 24px; -} -.tox .tox-number-input button svg { - display: block; - fill: #222f3e; - margin: 0 auto; - transform: scale(0.67); -} -.tox .tox-number-input button:focus { - background: #cce2fa; -} -.tox .tox-number-input button:hover { - background: #cce2fa; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-number-input button:hover svg { - fill: #222f3e; -} -.tox .tox-number-input button:active { - background: #a6ccf7; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-number-input button:active svg { - fill: #222f3e; -} -.tox .tox-number-input button:disabled { - background: 0 0; - border: 0; - box-shadow: none; - color: rgba(34, 47, 62, 0.5); - cursor: not-allowed; -} -.tox .tox-number-input button:disabled svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox .tox-number-input button.minus { - border-radius: 3px 0 0 3px; -} -.tox .tox-number-input button.plus { - border-radius: 0 3px 3px 0; -} -.tox .tox-number-input:focus:not(:active) > .tox-input-wrapper, -.tox .tox-number-input:focus:not(:active) > button { - background: #cce2fa; -} -.tox .tox-tbtn--select { - margin: 6px 1px 5px 0; - padding: 0 4px; - width: auto; -} -.tox .tox-tbtn__select-label { - cursor: default; - font-weight: 400; - height: initial; - margin: 0 4px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.tox .tox-tbtn__select-chevron { - align-items: center; - display: flex; - justify-content: center; - width: 16px; -} -.tox .tox-tbtn__select-chevron svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox .tox-tbtn--bespoke { - background: #f7f7f7; -} -.tox .tox-tbtn--bespoke + .tox-tbtn--bespoke { - margin-inline-start: 4px; -} -.tox .tox-tbtn--bespoke .tox-tbtn__select-label { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - width: 7em; -} -.tox .tox-tbtn--disabled .tox-tbtn__select-label, -.tox .tox-tbtn--select:disabled .tox-tbtn__select-label { - cursor: not-allowed; -} -.tox .tox-split-button { - border: 0; - border-radius: 3px; - box-sizing: border-box; - display: flex; - margin: 6px 1px 5px 0; - overflow: hidden; -} -.tox .tox-split-button:hover { - box-shadow: 0 0 0 1px #cce2fa inset; -} -.tox .tox-split-button:focus { - background: #cce2fa; - box-shadow: none; - color: #222f3e; -} -.tox .tox-split-button > * { - border-radius: 0; -} -.tox .tox-split-button__chevron { - width: 16px; -} -.tox .tox-split-button__chevron svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox .tox-split-button .tox-tbtn { - margin: 0; -} -.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus, -.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover, -.tox .tox-split-button.tox-tbtn--disabled:focus, -.tox .tox-split-button.tox-tbtn--disabled:hover { - background: 0 0; - box-shadow: none; - color: rgba(34, 47, 62, 0.5); -} -.tox.tox-platform-touch .tox-split-button .tox-tbtn--select { - padding: 0 0; -} -.tox.tox-platform-touch - .tox-split-button - .tox-tbtn:not(.tox-tbtn--select):first-child { - width: 30px; -} -.tox.tox-platform-touch .tox-split-button__chevron { - width: 20px; -} -.tox - .tox-split-button.tox-tbtn--disabled - svg - #tox-icon-highlight-bg-color__color, -.tox .tox-split-button.tox-tbtn--disabled svg #tox-icon-text-color__color { - opacity: 0.6; -} -.tox .tox-toolbar-overlord { - background-color: #000; -} -.tox .tox-toolbar, -.tox .tox-toolbar__overflow, -.tox .tox-toolbar__primary { - background-attachment: local; - background-color: #000; - background-image: repeating-linear-gradient( - #e3e3e3 0 1px, - transparent 1px 39px - ); - background-position: center top 40px; - background-repeat: no-repeat; - background-size: calc(100% - 11px * 2) calc(100% - 41px); - display: flex; - flex: 0 0 auto; - flex-shrink: 0; - flex-wrap: wrap; - padding: 0 0; - transform: perspective(1px); -} -.tox .tox-toolbar-overlord > .tox-toolbar, -.tox .tox-toolbar-overlord > .tox-toolbar__overflow, -.tox .tox-toolbar-overlord > .tox-toolbar__primary { - background-position: center top 0; - background-size: calc(100% - 11px * 2) calc(100% - 0px); -} -.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed { - height: 0; - opacity: 0; - padding-bottom: 0; - padding-top: 0; - visibility: hidden; -} -.tox .tox-toolbar__overflow--growing { - transition: - height 0.3s ease, - opacity 0.2s linear 0.1s; -} -.tox .tox-toolbar__overflow--shrinking { - transition: - opacity 0.3s ease, - height 0.2s linear 0.1s, - visibility 0s linear 0.3s; -} -.tox .tox-anchorbar, -.tox .tox-toolbar-overlord { - grid-column: 1/-1; -} -.tox .tox-menubar + .tox-toolbar, -.tox .tox-menubar + .tox-toolbar-overlord { - border-top: 1px solid transparent; - margin-top: -1px; - padding-bottom: 1px; - padding-top: 1px; -} -.tox .tox-toolbar--scrolling { - flex-wrap: nowrap; - overflow-x: auto; -} -.tox .tox-pop .tox-toolbar { - border-width: 0; -} -.tox .tox-toolbar--no-divider { - background-image: none; -} -.tox - .tox-toolbar-overlord - .tox-toolbar:not(.tox-toolbar--scrolling):first-child, -.tox .tox-toolbar-overlord .tox-toolbar__primary { - background-position: center top 39px; -} -.tox .tox-editor-header > .tox-toolbar--scrolling, -.tox .tox-toolbar-overlord .tox-toolbar--scrolling:first-child { - background-image: none; -} -.tox.tox-tinymce-aux .tox-toolbar__overflow { - background-color: #000; - background-position: center top 43px; - background-size: calc(100% - 8px * 2) calc(100% - 51px); - border: none; - border-radius: 6px; - box-shadow: - 0 0 2px 0 rgba(34, 47, 62, 0.2), - 0 4px 8px 0 rgba(34, 47, 62, 0.15); - overscroll-behavior: none; - padding: 4px 0; -} -.tox-pop .tox-pop__dialog .tox-toolbar { - background-position: center top 43px; - background-size: calc(100% - 11px * 2) calc(100% - 51px); - padding: 4px 0; -} -.tox .tox-toolbar__group { - align-items: center; - display: flex; - flex-wrap: wrap; - margin: 0 0; - padding: 0 11px 0 12px; -} -.tox .tox-toolbar__group--pull-right { - margin-left: auto; -} -.tox .tox-toolbar--scrolling .tox-toolbar__group { - flex-shrink: 0; - flex-wrap: nowrap; -} -.tox:not([dir="rtl"]) .tox-toolbar__group:not(:last-of-type) { - border-right: 1px solid transparent; -} -.tox[dir="rtl"] .tox-toolbar__group:not(:last-of-type) { - border-left: 1px solid transparent; -} -.tox .tox-tooltip { - display: inline-block; - padding: 8px; - position: relative; -} -.tox .tox-tooltip__body { - background-color: #222f3e; - border-radius: 6px; - box-shadow: 0 2px 4px rgba(34, 47, 62, 0.3); - color: rgba(255, 255, 255, 0.75); - font-size: 14px; - font-style: normal; - font-weight: 400; - padding: 4px 8px; - text-transform: none; -} -.tox .tox-tooltip__arrow { - position: absolute; -} -.tox .tox-tooltip--down .tox-tooltip__arrow { - border-left: 8px solid transparent; - border-right: 8px solid transparent; - border-top: 8px solid #222f3e; - bottom: 0; - left: 50%; - position: absolute; - transform: translateX(-50%); -} -.tox .tox-tooltip--up .tox-tooltip__arrow { - border-bottom: 8px solid #222f3e; - border-left: 8px solid transparent; - border-right: 8px solid transparent; - left: 50%; - position: absolute; - top: 0; - transform: translateX(-50%); -} -.tox .tox-tooltip--right .tox-tooltip__arrow { - border-bottom: 8px solid transparent; - border-left: 8px solid #222f3e; - border-top: 8px solid transparent; - position: absolute; - right: 0; - top: 50%; - transform: translateY(-50%); -} -.tox .tox-tooltip--left .tox-tooltip__arrow { - border-bottom: 8px solid transparent; - border-right: 8px solid #222f3e; - border-top: 8px solid transparent; - left: 0; - position: absolute; - top: 50%; - transform: translateY(-50%); -} -.tox .tox-tree { - display: flex; - flex-direction: column; -} -.tox .tox-tree .tox-trbtn { - align-items: center; - background: 0 0; - border: 0; - border-radius: 4px; - box-shadow: none; - color: #222f3e; - display: flex; - flex: 0 0 auto; - font-size: 14px; - font-style: normal; - font-weight: 400; - height: 28px; - margin-bottom: 4px; - margin-top: 4px; - outline: 0; - overflow: hidden; - padding: 0; - padding-left: 8px; - text-transform: none; -} -.tox .tox-tree .tox-trbtn .tox-tree__label { - cursor: default; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.tox .tox-tree .tox-trbtn svg { - display: block; - fill: #222f3e; -} -.tox .tox-tree .tox-trbtn:focus { - background: #cce2fa; - border: 0; - box-shadow: none; -} -.tox .tox-tree .tox-trbtn:hover { - background: #cce2fa; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-tree .tox-trbtn:hover svg { - fill: #222f3e; -} -.tox .tox-tree .tox-trbtn:active { - background: #a6ccf7; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-tree .tox-trbtn:active svg { - fill: #222f3e; -} -.tox .tox-tree .tox-trbtn--disabled, -.tox .tox-tree .tox-trbtn--disabled:hover, -.tox .tox-tree .tox-trbtn:disabled, -.tox .tox-tree .tox-trbtn:disabled:hover { - background: 0 0; - border: 0; - box-shadow: none; - color: rgba(34, 47, 62, 0.5); - cursor: not-allowed; -} -.tox .tox-tree .tox-trbtn--disabled svg, -.tox .tox-tree .tox-trbtn--disabled:hover svg, -.tox .tox-tree .tox-trbtn:disabled svg, -.tox .tox-tree .tox-trbtn:disabled:hover svg { - fill: rgba(34, 47, 62, 0.5); -} -.tox .tox-tree .tox-trbtn--enabled, -.tox .tox-tree .tox-trbtn--enabled:hover { - background: #a6ccf7; - border: 0; - box-shadow: none; - color: #222f3e; -} -.tox .tox-tree .tox-trbtn--enabled:hover > *, -.tox .tox-tree .tox-trbtn--enabled > * { - transform: none; -} -.tox .tox-tree .tox-trbtn--enabled svg, -.tox .tox-tree .tox-trbtn--enabled:hover svg { - fill: #222f3e; -} -.tox .tox-tree .tox-trbtn:focus:not(.tox-trbtn--disabled) { - color: #222f3e; -} -.tox .tox-tree .tox-trbtn:focus:not(.tox-trbtn--disabled) svg { - fill: #222f3e; -} -.tox .tox-tree .tox-trbtn:active > * { - transform: none; -} -.tox .tox-tree .tox-trbtn--return { - align-self: stretch; - height: unset; - width: 16px; -} -.tox .tox-tree .tox-trbtn--labeled { - padding: 0 4px; - width: unset; -} -.tox .tox-tree .tox-trbtn__vlabel { - display: block; - font-size: 10px; - font-weight: 400; - letter-spacing: -0.025em; - margin-bottom: 4px; - white-space: nowrap; -} -.tox .tox-tree .tox-tree--directory { - display: flex; - flex-direction: column; -} -.tox .tox-tree .tox-tree--directory .tox-tree--directory__label { - font-weight: 700; -} -.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn { - margin-left: auto; -} -.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn svg { - fill: transparent; -} -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label - .tox-mbtn.tox-mbtn--active - svg, -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label - .tox-mbtn:focus - svg { - fill: #222f3e; -} -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label:focus - .tox-mbtn - svg, -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label:hover - .tox-mbtn - svg { - fill: #222f3e; -} -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label:hover:has(.tox-mbtn:hover) { - background-color: transparent; - color: #222f3e; -} -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label:hover:has(.tox-mbtn:hover) - .tox-chevron - svg { - fill: #222f3e; -} -.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-chevron { - margin-right: 6px; -} -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label:has(+ .tox-tree--directory__children--growing) - .tox-chevron, -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label:has(+ .tox-tree--directory__children--shrinking) - .tox-chevron { - transition: transform 0.5s ease-in-out; -} -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label:has(+ .tox-tree--directory__children--growing) - .tox-chevron, -.tox - .tox-tree - .tox-tree--directory - .tox-tree--directory__label:has(+ .tox-tree--directory__children--open) - .tox-chevron { - transform: rotate(90deg); -} -.tox .tox-tree .tox-tree--leaf__label { - font-weight: 400; -} -.tox .tox-tree .tox-tree--leaf__label .tox-mbtn { - margin-left: auto; -} -.tox .tox-tree .tox-tree--leaf__label .tox-mbtn svg { - fill: transparent; -} -.tox .tox-tree .tox-tree--leaf__label .tox-mbtn.tox-mbtn--active svg, -.tox .tox-tree .tox-tree--leaf__label .tox-mbtn:focus svg { - fill: #222f3e; -} -.tox .tox-tree .tox-tree--leaf__label:hover .tox-mbtn svg { - fill: #222f3e; -} -.tox .tox-tree .tox-tree--leaf__label:hover:has(.tox-mbtn:hover) { - background-color: transparent; - color: #222f3e; -} -.tox - .tox-tree - .tox-tree--leaf__label:hover:has(.tox-mbtn:hover) - .tox-chevron - svg { - fill: #222f3e; -} -.tox .tox-tree .tox-tree--directory__children { - overflow: hidden; - padding-left: 16px; -} -.tox - .tox-tree - .tox-tree--directory__children.tox-tree--directory__children--growing, -.tox - .tox-tree - .tox-tree--directory__children.tox-tree--directory__children--shrinking { - transition: height 0.5s ease-in-out; -} -.tox .tox-tree .tox-trbtn.tox-tree--leaf__label { - display: flex; - justify-content: space-between; -} -.tox .tox-view-wrap, -.tox .tox-view-wrap__slot-container { - background-color: #000; - display: flex; - flex: 1; - flex-direction: column; -} -.tox .tox-view { - display: flex; - flex: 1 1 auto; - flex-direction: column; - overflow: hidden; -} -.tox .tox-view__header { - align-items: center; - display: flex; - font-size: 16px; - justify-content: space-between; - padding: 8px 8px 0 8px; - position: relative; -} -.tox .tox-view--mobile.tox-view__header, -.tox .tox-view--mobile.tox-view__toolbar { - padding: 8px; -} -.tox .tox-view--scrolling { - flex-wrap: nowrap; - overflow-x: auto; -} -.tox .tox-view__toolbar { - display: flex; - flex-direction: row; - gap: 8px; - justify-content: space-between; - padding: 8px 8px 0 8px; -} -.tox .tox-view__toolbar__group { - display: flex; - flex-direction: row; - gap: 12px; -} -.tox .tox-view__header-end, -.tox .tox-view__header-start { - display: flex; -} -.tox .tox-view__pane { - height: 100%; - padding: 8px; - width: 100%; -} -.tox .tox-view__pane_panel { - border: 1px solid #eee; - border-radius: 6px; -} -.tox:not([dir="rtl"]) .tox-view__header .tox-view__header-end > *, -.tox:not([dir="rtl"]) .tox-view__header .tox-view__header-start > * { - margin-left: 8px; -} -.tox[dir="rtl"] .tox-view__header .tox-view__header-end > *, -.tox[dir="rtl"] .tox-view__header .tox-view__header-start > * { - margin-right: 8px; -} -.tox .tox-well { - border: 1px solid #eee; - border-radius: 6px; - padding: 8px; - width: 100%; -} -.tox .tox-well > :first-child { - margin-top: 0; -} -.tox .tox-well > :last-child { - margin-bottom: 0; -} -.tox .tox-well > :only-child { - margin: 0; -} -.tox .tox-custom-editor { - border: 1px solid #eee; - border-radius: 6px; - display: flex; - flex: 1; - overflow: hidden; - position: relative; -} -.tox .tox-dialog-loading::before { - background-color: rgba(0, 0, 0, 0.5); - content: ""; - height: 100%; - position: absolute; - width: 100%; - z-index: 1000; -} -.tox .tox-tab { - cursor: pointer; -} -.tox .tox-dialog__content-js { - display: flex; - flex: 1; -} -.tox .tox-dialog__body-content .tox-collection { - display: flex; - flex: 1; -} diff --git a/src/lib/dist/tinymce/skins/ui/stocknear/skin.shadowdom.min.css b/src/lib/dist/tinymce/skins/ui/stocknear/skin.shadowdom.min.css deleted file mode 100644 index 59b24da3..00000000 --- a/src/lib/dist/tinymce/skins/ui/stocknear/skin.shadowdom.min.css +++ /dev/null @@ -1,30 +0,0 @@ -body.tox-dialog__disable-scroll { - overflow: hidden; -} -.tox-fullscreen { - border: 0; - height: 100%; - margin: 0; - overflow: hidden; - overscroll-behavior: none; - padding: 0; - touch-action: pinch-zoom; - width: 100%; -} -.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle { - display: none; -} -.tox-shadowhost.tox-fullscreen, -.tox.tox-tinymce.tox-fullscreen { - left: 0; - position: fixed; - top: 0; - z-index: 1200; -} -.tox.tox-tinymce.tox-fullscreen { - background-color: transparent; -} -.tox-fullscreen .tox.tox-tinymce-aux, -.tox-fullscreen ~ .tox.tox-tinymce-aux { - z-index: 1201; -} diff --git a/src/lib/dist/tinymce/themes/silver/theme.min.js b/src/lib/dist/tinymce/themes/silver/theme.min.js deleted file mode 100644 index 0eb5cff9..00000000 --- a/src/lib/dist/tinymce/themes/silver/theme.min.js +++ /dev/null @@ -1,25931 +0,0 @@ -/** - * TinyMCE version 6.7.0 (2023-08-30) - */ -!(function () { - "use strict"; - const e = Object.getPrototypeOf, - t = (e, t, o) => { - var n; - return ( - !!o(e, t.prototype) || - (null === (n = e.constructor) || void 0 === n ? void 0 : n.name) === - t.name - ); - }, - o = (e) => (o) => - ((e) => { - const o = typeof e; - return null === e - ? "null" - : "object" === o && Array.isArray(e) - ? "array" - : "object" === o && t(e, String, (e, t) => t.isPrototypeOf(e)) - ? "string" - : o; - })(o) === e, - n = (e) => (t) => typeof t === e, - s = (e) => (t) => e === t, - r = o("string"), - a = o("object"), - i = (o) => ((o, n) => a(o) && t(o, n, (t, o) => e(t) === o))(o, Object), - l = o("array"), - c = s(null), - d = n("boolean"), - u = s(void 0), - m = (e) => null == e, - g = (e) => !m(e), - p = n("function"), - h = n("number"), - f = (e, t) => { - if (l(e)) { - for (let o = 0, n = e.length; o < n; ++o) if (!t(e[o])) return !1; - return !0; - } - return !1; - }, - b = () => {}, - v = (e) => () => e(), - y = - (e, t) => - (...o) => - e(t.apply(null, o)), - x = (e) => () => e, - w = (e) => e, - S = (e, t) => e === t; - function k(e, ...t) { - return (...o) => { - const n = t.concat(o); - return e.apply(null, n); - }; - } - const C = (e) => (t) => !e(t), - O = (e) => () => { - throw new Error(e); - }, - _ = (e) => e(), - T = x(!1), - E = x(!0); - class A { - constructor(e, t) { - (this.tag = e), (this.value = t); - } - static some(e) { - return new A(!0, e); - } - static none() { - return A.singletonNone; - } - fold(e, t) { - return this.tag ? t(this.value) : e(); - } - isSome() { - return this.tag; - } - isNone() { - return !this.tag; - } - map(e) { - return this.tag ? A.some(e(this.value)) : A.none(); - } - bind(e) { - return this.tag ? e(this.value) : A.none(); - } - exists(e) { - return this.tag && e(this.value); - } - forall(e) { - return !this.tag || e(this.value); - } - filter(e) { - return !this.tag || e(this.value) ? this : A.none(); - } - getOr(e) { - return this.tag ? this.value : e; - } - or(e) { - return this.tag ? this : e; - } - getOrThunk(e) { - return this.tag ? this.value : e(); - } - orThunk(e) { - return this.tag ? this : e(); - } - getOrDie(e) { - if (this.tag) return this.value; - throw new Error(null != e ? e : "Called getOrDie on None"); - } - static from(e) { - return g(e) ? A.some(e) : A.none(); - } - getOrNull() { - return this.tag ? this.value : null; - } - getOrUndefined() { - return this.value; - } - each(e) { - this.tag && e(this.value); - } - toArray() { - return this.tag ? [this.value] : []; - } - toString() { - return this.tag ? `some(${this.value})` : "none()"; - } - } - A.singletonNone = new A(!1); - const M = Array.prototype.slice, - D = Array.prototype.indexOf, - B = Array.prototype.push, - F = (e, t) => D.call(e, t), - I = (e, t) => { - const o = F(e, t); - return -1 === o ? A.none() : A.some(o); - }, - R = (e, t) => F(e, t) > -1, - N = (e, t) => { - for (let o = 0, n = e.length; o < n; o++) if (t(e[o], o)) return !0; - return !1; - }, - V = (e, t) => { - const o = []; - for (let n = 0; n < e; n++) o.push(t(n)); - return o; - }, - z = (e, t) => { - const o = []; - for (let n = 0; n < e.length; n += t) { - const s = M.call(e, n, n + t); - o.push(s); - } - return o; - }, - H = (e, t) => { - const o = e.length, - n = new Array(o); - for (let s = 0; s < o; s++) { - const o = e[s]; - n[s] = t(o, s); - } - return n; - }, - L = (e, t) => { - for (let o = 0, n = e.length; o < n; o++) t(e[o], o); - }, - P = (e, t) => { - const o = [], - n = []; - for (let s = 0, r = e.length; s < r; s++) { - const r = e[s]; - (t(r, s) ? o : n).push(r); - } - return { pass: o, fail: n }; - }, - U = (e, t) => { - const o = []; - for (let n = 0, s = e.length; n < s; n++) { - const s = e[n]; - t(s, n) && o.push(s); - } - return o; - }, - W = (e, t, o) => ( - ((e, t) => { - for (let o = e.length - 1; o >= 0; o--) t(e[o], o); - })(e, (e, n) => { - o = t(o, e, n); - }), - o - ), - j = (e, t, o) => ( - L(e, (e, n) => { - o = t(o, e, n); - }), - o - ), - G = (e, t) => - ((e, t, o) => { - for (let n = 0, s = e.length; n < s; n++) { - const s = e[n]; - if (t(s, n)) return A.some(s); - if (o(s, n)) break; - } - return A.none(); - })(e, t, T), - $ = (e, t) => { - for (let o = 0, n = e.length; o < n; o++) - if (t(e[o], o)) return A.some(o); - return A.none(); - }, - q = (e) => { - const t = []; - for (let o = 0, n = e.length; o < n; ++o) { - if (!l(e[o])) - throw new Error( - "Arr.flatten item " + o + " was not an array, input: " + e, - ); - B.apply(t, e[o]); - } - return t; - }, - X = (e, t) => q(H(e, t)), - Y = (e, t) => { - for (let o = 0, n = e.length; o < n; ++o) - if (!0 !== t(e[o], o)) return !1; - return !0; - }, - K = (e) => { - const t = M.call(e, 0); - return t.reverse(), t; - }, - J = (e, t) => U(e, (e) => !R(t, e)), - Z = (e, t) => { - const o = {}; - for (let n = 0, s = e.length; n < s; n++) { - const s = e[n]; - o[String(s)] = t(s, n); - } - return o; - }, - Q = (e) => [e], - ee = (e, t) => { - const o = M.call(e, 0); - return o.sort(t), o; - }, - te = (e, t) => (t >= 0 && t < e.length ? A.some(e[t]) : A.none()), - oe = (e) => te(e, 0), - ne = (e) => te(e, e.length - 1), - se = p(Array.from) ? Array.from : (e) => M.call(e), - re = (e, t) => { - for (let o = 0; o < e.length; o++) { - const n = t(e[o], o); - if (n.isSome()) return n; - } - return A.none(); - }, - ae = Object.keys, - ie = Object.hasOwnProperty, - le = (e, t) => { - const o = ae(e); - for (let n = 0, s = o.length; n < s; n++) { - const s = o[n]; - t(e[s], s); - } - }, - ce = (e, t) => de(e, (e, o) => ({ k: o, v: t(e, o) })), - de = (e, t) => { - const o = {}; - return ( - le(e, (e, n) => { - const s = t(e, n); - o[s.k] = s.v; - }), - o - ); - }, - ue = (e) => (t, o) => { - e[o] = t; - }, - me = (e, t, o, n) => { - le(e, (e, s) => { - (t(e, s) ? o : n)(e, s); - }); - }, - ge = (e, t) => { - const o = {}; - return me(e, t, ue(o), b), o; - }, - pe = (e, t) => { - const o = []; - return ( - le(e, (e, n) => { - o.push(t(e, n)); - }), - o - ); - }, - he = (e, t) => { - const o = ae(e); - for (let n = 0, s = o.length; n < s; n++) { - const s = o[n], - r = e[s]; - if (t(r, s, e)) return A.some(r); - } - return A.none(); - }, - fe = (e) => pe(e, w), - be = (e, t) => (ve(e, t) ? A.from(e[t]) : A.none()), - ve = (e, t) => ie.call(e, t), - ye = (e, t) => ve(e, t) && void 0 !== e[t] && null !== e[t], - xe = (e, t, o = S) => e.exists((e) => o(e, t)), - we = (e) => { - const t = [], - o = (e) => { - t.push(e); - }; - for (let t = 0; t < e.length; t++) e[t].each(o); - return t; - }, - Se = (e, t, o) => - e.isSome() && t.isSome() - ? A.some(o(e.getOrDie(), t.getOrDie())) - : A.none(), - ke = (e, t) => (null != e ? A.some(t(e)) : A.none()), - Ce = (e, t) => (e ? A.some(t) : A.none()), - Oe = (e, t, o) => - "" === t || (e.length >= t.length && e.substr(o, o + t.length) === t), - _e = (e, t) => (Ee(e, t) ? ((e, t) => e.substring(t))(e, t.length) : e), - Te = (e, t, o = 0, n) => { - const s = e.indexOf(t, o); - return -1 !== s && (!!u(n) || s + t.length <= n); - }, - Ee = (e, t) => Oe(e, t, 0), - Ae = (e, t) => Oe(e, t, e.length - t.length), - Me = ((Ao = /^\s+|\s+$/g), (e) => e.replace(Ao, "")), - De = (e) => e.length > 0, - Be = (e) => void 0 !== e.style && p(e.style.getPropertyValue), - Fe = (e) => { - if (null == e) throw new Error("Node cannot be null or undefined"); - return { dom: e }; - }, - Ie = (e, t) => { - const o = (t || document).createElement("div"); - if (((o.innerHTML = e), !o.hasChildNodes() || o.childNodes.length > 1)) { - const t = "HTML does not have a single root node"; - throw (console.error(t, e), new Error(t)); - } - return Fe(o.childNodes[0]); - }, - Re = (e, t) => { - const o = (t || document).createElement(e); - return Fe(o); - }, - Ne = (e, t) => { - const o = (t || document).createTextNode(e); - return Fe(o); - }, - Ve = Fe, - ze = "undefined" != typeof window ? window : Function("return this;")(), - He = (e, t) => - ((e, t) => { - let o = null != t ? t : ze; - for (let t = 0; t < e.length && null != o; ++t) o = o[e[t]]; - return o; - })(e.split("."), t), - Le = Object.getPrototypeOf, - Pe = (e) => { - const t = He("ownerDocument.defaultView", e); - return ( - a(e) && - (((e) => - ((e, t) => { - const o = ((e, t) => He(e, t))(e, t); - if (null == o) - throw new Error(e + " not available on this browser"); - return o; - })("HTMLElement", e))(t).prototype.isPrototypeOf(e) || - /^HTML\w*Element$/.test(Le(e).constructor.name)) - ); - }, - Ue = (e) => e.dom.nodeName.toLowerCase(), - We = (e) => (t) => ((e) => e.dom.nodeType)(t) === e, - je = (e) => Ge(e) && Pe(e.dom), - Ge = We(1), - $e = We(3), - qe = We(9), - Xe = We(11), - Ye = (e) => (t) => Ge(t) && Ue(t) === e, - Ke = (e, t) => { - const o = e.dom; - if (1 !== o.nodeType) return !1; - { - const e = o; - if (void 0 !== e.matches) return e.matches(t); - if (void 0 !== e.msMatchesSelector) return e.msMatchesSelector(t); - if (void 0 !== e.webkitMatchesSelector) - return e.webkitMatchesSelector(t); - if (void 0 !== e.mozMatchesSelector) return e.mozMatchesSelector(t); - throw new Error("Browser lacks native selectors"); - } - }, - Je = (e) => - (1 !== e.nodeType && 9 !== e.nodeType && 11 !== e.nodeType) || - 0 === e.childElementCount, - Ze = (e, t) => e.dom === t.dom, - Qe = (e, t) => { - const o = e.dom, - n = t.dom; - return o !== n && o.contains(n); - }, - et = (e) => Ve(e.dom.ownerDocument), - tt = (e) => (qe(e) ? e : et(e)), - ot = (e) => Ve(tt(e).dom.documentElement), - nt = (e) => Ve(tt(e).dom.defaultView), - st = (e) => A.from(e.dom.parentNode).map(Ve), - rt = (e) => A.from(e.dom.parentElement).map(Ve), - at = (e) => A.from(e.dom.offsetParent).map(Ve), - it = (e) => H(e.dom.childNodes, Ve), - lt = (e, t) => { - const o = e.dom.childNodes; - return A.from(o[t]).map(Ve); - }, - ct = (e) => lt(e, 0), - dt = (e, t) => ({ element: e, offset: t }), - ut = (e, t) => { - const o = it(e); - return o.length > 0 && t < o.length ? dt(o[t], 0) : dt(e, t); - }, - mt = (e) => Xe(e) && g(e.dom.host), - gt = p(Element.prototype.attachShadow) && p(Node.prototype.getRootNode), - pt = x(gt), - ht = gt ? (e) => Ve(e.dom.getRootNode()) : tt, - ft = (e) => (mt(e) ? e : Ve(tt(e).dom.body)), - bt = (e) => { - const t = ht(e); - return mt(t) ? A.some(t) : A.none(); - }, - vt = (e) => Ve(e.dom.host), - yt = (e) => { - const t = $e(e) ? e.dom.parentNode : e.dom; - if (null == t || null === t.ownerDocument) return !1; - const o = t.ownerDocument; - return bt(Ve(t)).fold( - () => o.body.contains(t), - ((n = yt), (s = vt), (e) => n(s(e))), - ); - var n, s; - }, - xt = () => wt(Ve(document)), - wt = (e) => { - const t = e.dom.body; - if (null == t) throw new Error("Body is not available yet"); - return Ve(t); - }, - St = (e, t, o) => { - if (!(r(o) || d(o) || h(o))) - throw ( - (console.error( - "Invalid call to Attribute.set. Key ", - t, - ":: Value ", - o, - ":: Element ", - e, - ), - new Error("Attribute value was not simple")) - ); - e.setAttribute(t, o + ""); - }, - kt = (e, t, o) => { - St(e.dom, t, o); - }, - Ct = (e, t) => { - const o = e.dom; - le(t, (e, t) => { - St(o, t, e); - }); - }, - Ot = (e, t) => { - const o = e.dom.getAttribute(t); - return null === o ? void 0 : o; - }, - _t = (e, t) => A.from(Ot(e, t)), - Tt = (e, t) => { - const o = e.dom; - return !(!o || !o.hasAttribute) && o.hasAttribute(t); - }, - Et = (e, t) => { - e.dom.removeAttribute(t); - }, - At = (e, t, o) => { - if (!r(o)) - throw ( - (console.error( - "Invalid call to CSS.set. Property ", - t, - ":: Value ", - o, - ":: Element ", - e, - ), - new Error("CSS value must be a string: " + o)) - ); - Be(e) && e.style.setProperty(t, o); - }, - Mt = (e, t) => { - Be(e) && e.style.removeProperty(t); - }, - Dt = (e, t, o) => { - const n = e.dom; - At(n, t, o); - }, - Bt = (e, t) => { - const o = e.dom; - le(t, (e, t) => { - At(o, t, e); - }); - }, - Ft = (e, t) => { - const o = e.dom; - le(t, (e, t) => { - e.fold( - () => { - Mt(o, t); - }, - (e) => { - At(o, t, e); - }, - ); - }); - }, - It = (e, t) => { - const o = e.dom, - n = window.getComputedStyle(o).getPropertyValue(t); - return "" !== n || yt(e) ? n : Rt(o, t); - }, - Rt = (e, t) => (Be(e) ? e.style.getPropertyValue(t) : ""), - Nt = (e, t) => { - const o = e.dom, - n = Rt(o, t); - return A.from(n).filter((e) => e.length > 0); - }, - Vt = (e) => { - const t = {}, - o = e.dom; - if (Be(o)) - for (let e = 0; e < o.style.length; e++) { - const n = o.style.item(e); - t[n] = o.style[n]; - } - return t; - }, - zt = (e, t, o) => { - const n = Re(e); - return Dt(n, t, o), Nt(n, t).isSome(); - }, - Ht = (e, t) => { - const o = e.dom; - Mt(o, t), xe(_t(e, "style").map(Me), "") && Et(e, "style"); - }, - Lt = (e) => e.dom.offsetWidth, - Pt = (e, t) => { - const o = (o) => { - const n = t(o); - if (n <= 0 || null === n) { - const t = It(o, e); - return parseFloat(t) || 0; - } - return n; - }, - n = (e, t) => - j( - t, - (t, o) => { - const n = It(e, o), - s = void 0 === n ? 0 : parseInt(n, 10); - return isNaN(s) ? t : t + s; - }, - 0, - ); - return { - set: (t, o) => { - if (!h(o) && !o.match(/^[0-9]+$/)) - throw new Error( - e + ".set accepts only positive integer values. Value was " + o, - ); - const n = t.dom; - Be(n) && (n.style[e] = o + "px"); - }, - get: o, - getOuter: o, - aggregate: n, - max: (e, t, o) => { - const s = n(e, o); - return t > s ? t - s : 0; - }, - }; - }, - Ut = Pt("height", (e) => { - const t = e.dom; - return yt(e) ? t.getBoundingClientRect().height : t.offsetHeight; - }), - Wt = (e) => Ut.get(e), - jt = (e) => Ut.getOuter(e), - Gt = (e, t) => ({ left: e, top: t, translate: (o, n) => Gt(e + o, t + n) }), - $t = Gt, - qt = (e, t) => (void 0 !== e ? e : void 0 !== t ? t : 0), - Xt = (e) => { - const t = e.dom.ownerDocument, - o = t.body, - n = t.defaultView, - s = t.documentElement; - if (o === e.dom) return $t(o.offsetLeft, o.offsetTop); - const r = qt(null == n ? void 0 : n.pageYOffset, s.scrollTop), - a = qt(null == n ? void 0 : n.pageXOffset, s.scrollLeft), - i = qt(s.clientTop, o.clientTop), - l = qt(s.clientLeft, o.clientLeft); - return Yt(e).translate(a - l, r - i); - }, - Yt = (e) => { - const t = e.dom, - o = t.ownerDocument.body; - return o === t - ? $t(o.offsetLeft, o.offsetTop) - : yt(e) - ? ((e) => { - const t = e.getBoundingClientRect(); - return $t(t.left, t.top); - })(t) - : $t(0, 0); - }, - Kt = Pt("width", (e) => e.dom.offsetWidth), - Jt = (e) => Kt.get(e), - Zt = (e) => Kt.getOuter(e), - Qt = (e) => { - let t, - o = !1; - return (...n) => (o || ((o = !0), (t = e.apply(null, n))), t); - }, - eo = () => to(0, 0), - to = (e, t) => ({ major: e, minor: t }), - oo = { - nu: to, - detect: (e, t) => { - const o = String(t).toLowerCase(); - return 0 === e.length - ? eo() - : ((e, t) => { - const o = ((e, t) => { - for (let o = 0; o < e.length; o++) { - const n = e[o]; - if (n.test(t)) return n; - } - })(e, t); - if (!o) return { major: 0, minor: 0 }; - const n = (e) => Number(t.replace(o, "$" + e)); - return to(n(1), n(2)); - })(e, o); - }, - unknown: eo, - }, - no = (e, t) => { - const o = String(t).toLowerCase(); - return G(e, (e) => e.search(o)); - }, - so = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/, - ro = (e) => (t) => Te(t, e), - ao = [ - { - name: "Edge", - versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/], - search: (e) => - Te(e, "edge/") && - Te(e, "chrome") && - Te(e, "safari") && - Te(e, "applewebkit"), - }, - { - name: "Chromium", - brand: "Chromium", - versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/, so], - search: (e) => Te(e, "chrome") && !Te(e, "chromeframe"), - }, - { - name: "IE", - versionRegexes: [ - /.*?msie\ ?([0-9]+)\.([0-9]+).*/, - /.*?rv:([0-9]+)\.([0-9]+).*/, - ], - search: (e) => Te(e, "msie") || Te(e, "trident"), - }, - { - name: "Opera", - versionRegexes: [so, /.*?opera\/([0-9]+)\.([0-9]+).*/], - search: ro("opera"), - }, - { - name: "Firefox", - versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/], - search: ro("firefox"), - }, - { - name: "Safari", - versionRegexes: [so, /.*?cpu os ([0-9]+)_([0-9]+).*/], - search: (e) => - (Te(e, "safari") || Te(e, "mobile/")) && Te(e, "applewebkit"), - }, - ], - io = [ - { - name: "Windows", - search: ro("win"), - versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/], - }, - { - name: "iOS", - search: (e) => Te(e, "iphone") || Te(e, "ipad"), - versionRegexes: [ - /.*?version\/\ ?([0-9]+)\.([0-9]+).*/, - /.*cpu os ([0-9]+)_([0-9]+).*/, - /.*cpu iphone os ([0-9]+)_([0-9]+).*/, - ], - }, - { - name: "Android", - search: ro("android"), - versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/], - }, - { - name: "macOS", - search: ro("mac os x"), - versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/], - }, - { name: "Linux", search: ro("linux"), versionRegexes: [] }, - { name: "Solaris", search: ro("sunos"), versionRegexes: [] }, - { name: "FreeBSD", search: ro("freebsd"), versionRegexes: [] }, - { - name: "ChromeOS", - search: ro("cros"), - versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/], - }, - ], - lo = { browsers: x(ao), oses: x(io) }, - co = "Edge", - uo = "Chromium", - mo = "Opera", - go = "Firefox", - po = "Safari", - ho = (e) => { - const t = e.current, - o = e.version, - n = (e) => () => t === e; - return { - current: t, - version: o, - isEdge: n(co), - isChromium: n(uo), - isIE: n("IE"), - isOpera: n(mo), - isFirefox: n(go), - isSafari: n(po), - }; - }, - fo = () => ho({ current: void 0, version: oo.unknown() }), - bo = ho, - vo = (x(co), x(uo), x("IE"), x(mo), x(go), x(po), "Windows"), - yo = "Android", - xo = "Linux", - wo = "macOS", - So = "Solaris", - ko = "FreeBSD", - Co = "ChromeOS", - Oo = (e) => { - const t = e.current, - o = e.version, - n = (e) => () => t === e; - return { - current: t, - version: o, - isWindows: n(vo), - isiOS: n("iOS"), - isAndroid: n(yo), - isMacOS: n(wo), - isLinux: n(xo), - isSolaris: n(So), - isFreeBSD: n(ko), - isChromeOS: n(Co), - }; - }, - _o = () => Oo({ current: void 0, version: oo.unknown() }), - To = Oo, - Eo = - (x(vo), - x("iOS"), - x(yo), - x(xo), - x(wo), - x(So), - x(ko), - x(Co), - (e) => window.matchMedia(e).matches); - var Ao; - let Mo = Qt(() => - ((e, t, o) => { - const n = lo.browsers(), - s = lo.oses(), - r = t - .bind((e) => - ((e, t) => - re(t.brands, (t) => { - const o = t.brand.toLowerCase(); - return G(e, (e) => { - var t; - return ( - o === - (null === (t = e.brand) || void 0 === t - ? void 0 - : t.toLowerCase()) - ); - }).map((e) => ({ - current: e.name, - version: oo.nu(parseInt(t.version, 10), 0), - })); - }))(n, e), - ) - .orThunk(() => - ((e, t) => - no(e, t).map((e) => { - const o = oo.detect(e.versionRegexes, t); - return { current: e.name, version: o }; - }))(n, e), - ) - .fold(fo, bo), - a = ((e, t) => - no(e, t).map((e) => { - const o = oo.detect(e.versionRegexes, t); - return { current: e.name, version: o }; - }))(s, e).fold(_o, To), - i = ((e, t, o, n) => { - const s = e.isiOS() && !0 === /ipad/i.test(o), - r = e.isiOS() && !s, - a = e.isiOS() || e.isAndroid(), - i = a || n("(pointer:coarse)"), - l = s || (!r && a && n("(min-device-width:768px)")), - c = r || (a && !l), - d = t.isSafari() && e.isiOS() && !1 === /safari/i.test(o), - u = !c && !l && !d; - return { - isiPad: x(s), - isiPhone: x(r), - isTablet: x(l), - isPhone: x(c), - isTouch: x(i), - isAndroid: e.isAndroid, - isiOS: e.isiOS, - isWebView: x(d), - isDesktop: x(u), - }; - })(a, r, e, o); - return { browser: r, os: a, deviceType: i }; - })(navigator.userAgent, A.from(navigator.userAgentData), Eo), - ); - const Do = () => Mo(), - Bo = (e) => { - const t = Ve( - ((e) => { - if (pt() && g(e.target)) { - const t = Ve(e.target); - if ( - Ge(t) && - ((e) => g(e.dom.shadowRoot))(t) && - e.composed && - e.composedPath - ) { - const t = e.composedPath(); - if (t) return oe(t); - } - } - return A.from(e.target); - })(e).getOr(e.target), - ), - o = () => e.stopPropagation(), - n = () => e.preventDefault(), - s = y(n, o); - return ((e, t, o, n, s, r, a) => ({ - target: e, - x: t, - y: o, - stop: n, - prevent: s, - kill: r, - raw: a, - }))(t, e.clientX, e.clientY, o, n, s, e); - }, - Fo = (e, t, o, n, s) => { - const r = ((e, t) => (o) => { - e(o) && t(Bo(o)); - })(o, n); - return e.dom.addEventListener(t, r, s), { unbind: k(Io, e, t, r, s) }; - }, - Io = (e, t, o, n) => { - e.dom.removeEventListener(t, o, n); - }, - Ro = (e, t) => { - st(e).each((o) => { - o.dom.insertBefore(t.dom, e.dom); - }); - }, - No = (e, t) => { - const o = ((e) => A.from(e.dom.nextSibling).map(Ve))(e); - o.fold( - () => { - st(e).each((e) => { - zo(e, t); - }); - }, - (e) => { - Ro(e, t); - }, - ); - }, - Vo = (e, t) => { - ct(e).fold( - () => { - zo(e, t); - }, - (o) => { - e.dom.insertBefore(t.dom, o.dom); - }, - ); - }, - zo = (e, t) => { - e.dom.appendChild(t.dom); - }, - Ho = (e, t) => { - L(t, (t) => { - zo(e, t); - }); - }, - Lo = (e) => { - (e.dom.textContent = ""), - L(it(e), (e) => { - Po(e); - }); - }, - Po = (e) => { - const t = e.dom; - null !== t.parentNode && t.parentNode.removeChild(t); - }, - Uo = (e) => { - const t = void 0 !== e ? e.dom : document, - o = t.body.scrollLeft || t.documentElement.scrollLeft, - n = t.body.scrollTop || t.documentElement.scrollTop; - return $t(o, n); - }, - Wo = (e, t, o) => { - const n = (void 0 !== o ? o.dom : document).defaultView; - n && n.scrollTo(e, t); - }, - jo = (e, t, o, n) => ({ - x: e, - y: t, - width: o, - height: n, - right: e + o, - bottom: t + n, - }), - Go = (e) => { - const t = void 0 === e ? window : e, - o = t.document, - n = Uo(Ve(o)); - return ((e) => { - const t = void 0 === e ? window : e; - return Do().browser.isFirefox() ? A.none() : A.from(t.visualViewport); - })(t).fold( - () => { - const e = t.document.documentElement, - o = e.clientWidth, - s = e.clientHeight; - return jo(n.left, n.top, o, s); - }, - (e) => - jo( - Math.max(e.pageLeft, n.left), - Math.max(e.pageTop, n.top), - e.width, - e.height, - ), - ); - }, - $o = () => Ve(document), - qo = (e, t) => - e.view(t).fold(x([]), (t) => { - const o = e.owner(t), - n = qo(e, o); - return [t].concat(n); - }); - var Xo = Object.freeze({ - __proto__: null, - view: (e) => { - var t; - return ( - e.dom === document - ? A.none() - : A.from( - null === (t = e.dom.defaultView) || void 0 === t - ? void 0 - : t.frameElement, - ) - ).map(Ve); - }, - owner: (e) => et(e), - }); - const Yo = (e) => { - const t = $o(), - o = Uo(t), - n = ((e, t) => { - const o = t.owner(e), - n = qo(t, o); - return A.some(n); - })(e, Xo); - return n.fold(k(Xt, e), (t) => { - const n = Yt(e), - s = W( - t, - (e, t) => { - const o = Yt(t); - return { left: e.left + o.left, top: e.top + o.top }; - }, - { left: 0, top: 0 }, - ); - return $t(s.left + n.left + o.left, s.top + n.top + o.top); - }); - }, - Ko = (e, t, o, n) => ({ - x: e, - y: t, - width: o, - height: n, - right: e + o, - bottom: t + n, - }), - Jo = (e) => { - const t = Xt(e), - o = Zt(e), - n = jt(e); - return Ko(t.left, t.top, o, n); - }, - Zo = (e) => { - const t = Yo(e), - o = Zt(e), - n = jt(e); - return Ko(t.left, t.top, o, n); - }, - Qo = (e, t) => { - const o = Math.max(e.x, t.x), - n = Math.max(e.y, t.y), - s = Math.min(e.right, t.right), - r = Math.min(e.bottom, t.bottom); - return Ko(o, n, s - o, r - n); - }, - en = () => Go(window); - var tn = tinymce.util.Tools.resolve("tinymce.ThemeManager"); - const on = (e) => { - const t = (t) => t(e), - o = x(e), - n = () => s, - s = { - tag: !0, - inner: e, - fold: (t, o) => o(e), - isValue: E, - isError: T, - map: (t) => sn.value(t(e)), - mapError: n, - bind: t, - exists: t, - forall: t, - getOr: o, - or: n, - getOrThunk: o, - orThunk: n, - getOrDie: o, - each: (t) => { - t(e); - }, - toOptional: () => A.some(e), - }; - return s; - }, - nn = (e) => { - const t = () => o, - o = { - tag: !1, - inner: e, - fold: (t, o) => t(e), - isValue: T, - isError: E, - map: t, - mapError: (t) => sn.error(t(e)), - bind: t, - exists: T, - forall: E, - getOr: w, - or: w, - getOrThunk: _, - orThunk: _, - getOrDie: O(String(e)), - each: b, - toOptional: A.none, - }; - return o; - }, - sn = { - value: on, - error: nn, - fromOption: (e, t) => e.fold(() => nn(t), on), - }; - var rn; - !(function (e) { - (e[(e.Error = 0)] = "Error"), (e[(e.Value = 1)] = "Value"); - })(rn || (rn = {})); - const an = (e, t, o) => (e.stype === rn.Error ? t(e.serror) : o(e.svalue)), - ln = (e) => ({ stype: rn.Value, svalue: e }), - cn = (e) => ({ stype: rn.Error, serror: e }), - dn = ln, - un = cn, - mn = an, - gn = (e, t, o, n) => ({ - tag: "field", - key: e, - newKey: t, - presence: o, - prop: n, - }), - pn = (e, t, o) => { - switch (e.tag) { - case "field": - return t(e.key, e.newKey, e.presence, e.prop); - case "custom": - return o(e.newKey, e.instantiator); - } - }, - hn = - (e) => - (...t) => { - if (0 === t.length) throw new Error("Can't merge zero objects"); - const o = {}; - for (let n = 0; n < t.length; n++) { - const s = t[n]; - for (const t in s) ve(s, t) && (o[t] = e(o[t], s[t])); - } - return o; - }, - fn = hn((e, t) => (i(e) && i(t) ? fn(e, t) : t)), - bn = hn((e, t) => t), - vn = (e) => ({ tag: "defaultedThunk", process: e }), - yn = (e) => vn(x(e)), - xn = (e) => ({ tag: "mergeWithThunk", process: e }), - wn = (e) => { - const t = ((e) => { - const t = [], - o = []; - return ( - L(e, (e) => { - an( - e, - (e) => o.push(e), - (e) => t.push(e), - ); - }), - { values: t, errors: o } - ); - })(e); - return t.errors.length > 0 ? ((o = t.errors), y(un, q)(o)) : dn(t.values); - var o; - }, - Sn = (e) => - a(e) && ae(e).length > 100 - ? " removed due to size" - : JSON.stringify(e, null, 2), - kn = (e, t) => un([{ path: e, getErrorInfo: t }]), - Cn = (e) => ({ - extract: (t, o) => - ((e, t) => (e.stype === rn.Error ? t(e.serror) : e))(e(o), (e) => - ((e, t) => kn(e, x(t)))(t, e), - ), - toString: x("val"), - }), - On = Cn(dn), - _n = (e, t, o, n) => n(be(e, t).getOrThunk(() => o(e))), - Tn = (e, t, o, n, s) => { - const r = (e) => s.extract(t.concat([n]), e), - a = (e) => - e.fold( - () => dn(A.none()), - (e) => - ((e, t) => - e.stype === rn.Value - ? { stype: rn.Value, svalue: t(e.svalue) } - : e)(s.extract(t.concat([n]), e), A.some), - ); - switch (e.tag) { - case "required": - return ((e, t, o, n) => - be(t, o).fold( - () => - ((e, t, o) => - kn( - e, - () => - 'Could not find valid *required* value for "' + - t + - '" in ' + - Sn(o), - ))(e, o, t), - n, - ))(t, o, n, r); - case "defaultedThunk": - return _n(o, n, e.process, r); - case "option": - return ((e, t, o) => o(be(e, t)))(o, n, a); - case "defaultedOptionThunk": - return ((e, t, o, n) => - n(be(e, t).map((t) => (!0 === t ? o(e) : t))))(o, n, e.process, a); - case "mergeWithThunk": - return _n(o, n, x({}), (t) => { - const n = fn(e.process(o), t); - return r(n); - }); - } - }, - En = (e) => ({ - extract: (t, o) => e().extract(t, o), - toString: () => e().toString(), - }), - An = (e) => ae(ge(e, g)), - Mn = (e) => { - const t = Dn(e), - o = W(e, (e, t) => pn(t, (t) => fn(e, { [t]: !0 }), x(e)), {}); - return { - extract: (e, n) => { - const s = d(n) ? [] : An(n), - r = U(s, (e) => !ye(o, e)); - return 0 === r.length - ? t.extract(e, n) - : ((e, t) => - kn( - e, - () => - "There are unsupported fields: [" + - t.join(", ") + - "] specified", - ))(e, r); - }, - toString: t.toString, - }; - }, - Dn = (e) => ({ - extract: (t, o) => - ((e, t, o) => { - const n = {}, - s = []; - for (const r of o) - pn( - r, - (o, r, a, i) => { - const l = Tn(a, e, t, o, i); - mn( - l, - (e) => { - s.push(...e); - }, - (e) => { - n[r] = e; - }, - ); - }, - (e, o) => { - n[e] = o(t); - }, - ); - return s.length > 0 ? un(s) : dn(n); - })(t, o, e), - toString: () => { - const t = H(e, (e) => - pn( - e, - (e, t, o, n) => e + " -> " + n.toString(), - (e, t) => "state(" + e + ")", - ), - ); - return "obj{\n" + t.join("\n") + "}"; - }, - }), - Bn = (e) => ({ - extract: (t, o) => { - const n = H(o, (o, n) => e.extract(t.concat(["[" + n + "]"]), o)); - return wn(n); - }, - toString: () => "array(" + e.toString() + ")", - }), - Fn = (e, t) => { - const o = void 0 !== t ? t : w; - return { - extract: (t, n) => { - const s = []; - for (const r of e) { - const e = r.extract(t, n); - if (e.stype === rn.Value) - return { stype: rn.Value, svalue: o(e.svalue) }; - s.push(e); - } - return wn(s); - }, - toString: () => "oneOf(" + H(e, (e) => e.toString()).join(", ") + ")", - }; - }, - In = (e, t) => ({ - extract: (o, n) => { - const s = ae(n), - r = ((t, o) => Bn(Cn(e)).extract(t, o))(o, s); - return ((e, t) => (e.stype === rn.Value ? t(e.svalue) : e))(r, (e) => { - const s = H(e, (e) => gn(e, e, { tag: "required", process: {} }, t)); - return Dn(s).extract(o, n); - }); - }, - toString: () => "setOf(" + t.toString() + ")", - }), - Rn = y(Bn, Dn), - Nn = x(On), - Vn = (e, t) => - Cn((o) => { - const n = typeof o; - return e(o) ? dn(o) : un(`Expected type: ${t} but got: ${n}`); - }), - zn = Vn(h, "number"), - Hn = Vn(r, "string"), - Ln = Vn(d, "boolean"), - Pn = Vn(p, "function"), - Un = (e) => { - if (Object(e) !== e) return !0; - switch ({}.toString.call(e).slice(8, -1)) { - case "Boolean": - case "Number": - case "String": - case "Date": - case "RegExp": - case "Blob": - case "FileList": - case "ImageData": - case "ImageBitmap": - case "ArrayBuffer": - return !0; - case "Array": - case "Object": - return Object.keys(e).every((t) => Un(e[t])); - default: - return !1; - } - }, - Wn = Cn((e) => - Un(e) - ? dn(e) - : un("Expected value to be acceptable for sending via postMessage"), - ), - jn = (e, t) => ({ - extract: (o, n) => - be(n, e).fold( - () => - ((e, t) => - kn( - e, - () => 'Choice schema did not contain choice key: "' + t + '"', - ))(o, e), - (e) => - ((e, t, o, n) => - be(o, n).fold( - () => - ((e, t, o) => - kn( - e, - () => - 'The chosen schema: "' + - o + - '" did not exist in branches: ' + - Sn(t), - ))(e, o, n), - (o) => o.extract(e.concat(["branch: " + n]), t), - ))(o, n, t, e), - ), - toString: () => "chooseOn(" + e + "). Possible values: " + ae(t), - }), - Gn = (e) => Cn((t) => e(t).fold(un, dn)), - $n = (e, t) => In((t) => e(t).fold(cn, ln), t), - qn = (e, t, o) => { - return ( - (n = ((e, t, o) => - ((e, t) => - e.stype === rn.Error - ? { stype: rn.Error, serror: t(e.serror) } - : e)(t.extract([e], o), (e) => ({ input: o, errors: e })))( - e, - t, - o, - )), - an(n, sn.error, sn.value) - ); - var n; - }, - Xn = (e) => - e.fold((e) => { - throw new Error(Kn(e)); - }, w), - Yn = (e, t, o) => Xn(qn(e, t, o)), - Kn = (e) => - "Errors: \n" + - ((e) => { - const t = - e.length > 10 - ? e - .slice(0, 10) - .concat([ - { - path: [], - getErrorInfo: x("... (only showing first ten failures)"), - }, - ]) - : e; - return H( - t, - (e) => - "Failed path: (" + e.path.join(" > ") + ")\n" + e.getErrorInfo(), - ); - })(e.errors).join("\n") + - "\n\nInput object: " + - Sn(e.input), - Jn = (e, t) => jn(e, ce(t, Dn)), - Zn = (e, t) => - ((e, t) => { - const o = Qt(t); - return { - extract: (e, t) => o().extract(e, t), - toString: () => o().toString(), - }; - })(0, t), - Qn = gn, - es = (e, t) => ({ tag: "custom", newKey: e, instantiator: t }), - ts = (e) => - Gn((t) => - R(e, t) - ? sn.value(t) - : sn.error( - `Unsupported value: "${t}", choose one of "${e.join(", ")}".`, - ), - ), - os = (e) => Qn(e, e, { tag: "required", process: {} }, Nn()), - ns = (e, t) => Qn(e, e, { tag: "required", process: {} }, t), - ss = (e) => ns(e, zn), - rs = (e) => ns(e, Hn), - as = (e, t) => Qn(e, e, { tag: "required", process: {} }, ts(t)), - is = (e) => ns(e, Pn), - ls = (e, t) => Qn(e, e, { tag: "required", process: {} }, Dn(t)), - cs = (e, t) => Qn(e, e, { tag: "required", process: {} }, Rn(t)), - ds = (e, t) => Qn(e, e, { tag: "required", process: {} }, Bn(t)), - us = (e) => Qn(e, e, { tag: "option", process: {} }, Nn()), - ms = (e, t) => Qn(e, e, { tag: "option", process: {} }, t), - gs = (e) => ms(e, zn), - ps = (e) => ms(e, Hn), - hs = (e, t) => ms(e, ts(t)), - fs = (e) => ms(e, Pn), - bs = (e, t) => ms(e, Bn(t)), - vs = (e, t) => ms(e, Dn(t)), - ys = (e, t) => Qn(e, e, yn(t), Nn()), - xs = (e, t, o) => Qn(e, e, yn(t), o), - ws = (e, t) => xs(e, t, zn), - Ss = (e, t) => xs(e, t, Hn), - ks = (e, t, o) => xs(e, t, ts(o)), - Cs = (e, t) => xs(e, t, Ln), - Os = (e, t) => xs(e, t, Pn), - _s = (e, t, o) => xs(e, t, Bn(o)), - Ts = (e, t, o) => xs(e, t, Dn(o)), - Es = (e) => { - let t = e; - return { - get: () => t, - set: (e) => { - t = e; - }, - }; - }, - As = (e) => { - if (!l(e)) throw new Error("cases must be an array"); - if (0 === e.length) throw new Error("there must be at least one case"); - const t = [], - o = {}; - return ( - L(e, (n, s) => { - const r = ae(n); - if (1 !== r.length) throw new Error("one and only one name per case"); - const a = r[0], - i = n[a]; - if (void 0 !== o[a]) throw new Error("duplicate key detected:" + a); - if ("cata" === a) - throw new Error("cannot have a case named cata (sorry)"); - if (!l(i)) throw new Error("case arguments must be an array"); - t.push(a), - (o[a] = (...o) => { - const n = o.length; - if (n !== i.length) - throw new Error( - "Wrong number of arguments to case " + - a + - ". Expected " + - i.length + - " (" + - i + - "), got " + - n, - ); - return { - fold: (...t) => { - if (t.length !== e.length) - throw new Error( - "Wrong number of arguments to fold. Expected " + - e.length + - ", got " + - t.length, - ); - return t[s].apply(null, o); - }, - match: (e) => { - const n = ae(e); - if (t.length !== n.length) - throw new Error( - "Wrong number of arguments to match. Expected: " + - t.join(",") + - "\nActual: " + - n.join(","), - ); - if (!Y(t, (e) => R(n, e))) - throw new Error( - "Not all branches were specified when using match. Specified: " + - n.join(", ") + - "\nRequired: " + - t.join(", "), - ); - return e[a].apply(null, o); - }, - log: (e) => { - console.log(e, { - constructors: t, - constructor: a, - params: o, - }); - }, - }; - }); - }), - o - ); - }; - As([ - { bothErrors: ["error1", "error2"] }, - { firstError: ["error1", "value2"] }, - { secondError: ["value1", "error2"] }, - { bothValues: ["value1", "value2"] }, - ]); - const Ms = (e, t) => ((e, t) => ({ [e]: t }))(e, t), - Ds = (e) => - ((e) => { - const t = {}; - return ( - L(e, (e) => { - t[e.key] = e.value; - }), - t - ); - })(e), - Bs = (e) => (p(e) ? e : T), - Fs = (e, t, o) => { - let n = e.dom; - const s = Bs(o); - for (; n.parentNode; ) { - n = n.parentNode; - const e = Ve(n), - o = t(e); - if (o.isSome()) return o; - if (s(e)) break; - } - return A.none(); - }, - Is = (e, t, o) => { - const n = t(e), - s = Bs(o); - return n.orThunk(() => (s(e) ? A.none() : Fs(e, t, s))); - }, - Rs = (e, t) => Ze(e.element, t.event.target), - Ns = { can: E, abort: T, run: b }, - Vs = (e) => { - if (!ye(e, "can") && !ye(e, "abort") && !ye(e, "run")) - throw new Error( - "EventHandler defined by: " + - JSON.stringify(e, null, 2) + - " does not have can, abort, or run!", - ); - return { ...Ns, ...e }; - }, - zs = x, - Hs = zs("touchstart"), - Ls = zs("touchmove"), - Ps = zs("touchend"), - Us = zs("touchcancel"), - Ws = zs("mousedown"), - js = zs("mousemove"), - Gs = zs("mouseout"), - $s = zs("mouseup"), - qs = zs("mouseover"), - Xs = zs("focusin"), - Ys = zs("focusout"), - Ks = zs("keydown"), - Js = zs("keyup"), - Zs = zs("input"), - Qs = zs("change"), - er = zs("click"), - tr = zs("transitioncancel"), - or = zs("transitionend"), - nr = zs("transitionstart"), - sr = zs("selectstart"), - rr = (e) => x("alloy." + e), - ar = { tap: rr("tap") }, - ir = rr("focus"), - lr = rr("blur.post"), - cr = rr("paste.post"), - dr = rr("receive"), - ur = rr("execute"), - mr = rr("focus.item"), - gr = ar.tap, - pr = rr("longpress"), - hr = rr("sandbox.close"), - fr = rr("typeahead.cancel"), - br = rr("system.init"), - vr = rr("system.touchmove"), - yr = rr("system.touchend"), - xr = rr("system.scroll"), - wr = rr("system.resize"), - Sr = rr("system.attached"), - kr = rr("system.detached"), - Cr = rr("system.dismissRequested"), - Or = rr("system.repositionRequested"), - _r = rr("focusmanager.shifted"), - Tr = rr("slotcontainer.visibility"), - Er = rr("system.external.element.scroll"), - Ar = rr("change.tab"), - Mr = rr("dismiss.tab"), - Dr = rr("highlight"), - Br = rr("dehighlight"), - Fr = (e, t) => { - Vr(e, e.element, t, {}); - }, - Ir = (e, t, o) => { - Vr(e, e.element, t, o); - }, - Rr = (e) => { - Fr(e, ur()); - }, - Nr = (e, t, o) => { - Vr(e, t, o, {}); - }, - Vr = (e, t, o, n) => { - const s = { target: t, ...n }; - e.getSystem().triggerEvent(o, t, s); - }, - zr = (e, t, o, n) => { - e.getSystem().triggerEvent(o, t, n.event); - }, - Hr = (e) => Ds(e), - Lr = (e, t) => ({ key: e, value: Vs({ abort: t }) }), - Pr = (e) => ({ - key: e, - value: Vs({ - run: (e, t) => { - t.event.prevent(); - }, - }), - }), - Ur = (e, t) => ({ key: e, value: Vs({ run: t }) }), - Wr = (e, t, o) => ({ - key: e, - value: Vs({ - run: (e, n) => { - t.apply(void 0, [e, n].concat(o)); - }, - }), - }), - jr = (e) => (t) => ({ - key: e, - value: Vs({ - run: (e, o) => { - Rs(e, o) && t(e, o); - }, - }), - }), - Gr = (e, t, o) => - ((e, t) => - Ur(e, (o, n) => { - o.getSystem() - .getByUid(t) - .each((t) => { - zr(t, t.element, e, n); - }); - }))(e, t.partUids[o]), - $r = (e, t) => - Ur(e, (e, o) => { - const n = o.event, - s = e - .getSystem() - .getByDom(n.target) - .getOrThunk(() => - Is( - n.target, - (t) => e.getSystem().getByDom(t).toOptional(), - T, - ).getOr(e), - ); - t(e, s, o); - }), - qr = (e) => - Ur(e, (e, t) => { - t.cut(); - }), - Xr = (e) => - Ur(e, (e, t) => { - t.stop(); - }), - Yr = (e, t) => jr(e)(t), - Kr = jr(Sr()), - Jr = jr(kr()), - Zr = jr(br()), - Qr = ((ra = ur()), (e) => Ur(ra, e)), - ea = (e) => e.dom.innerHTML, - ta = (e, t) => { - const o = et(e).dom, - n = Ve(o.createDocumentFragment()), - s = ((e, t) => { - const o = (t || document).createElement("div"); - return (o.innerHTML = e), it(Ve(o)); - })(t, o); - Ho(n, s), Lo(e), zo(e, n); - }, - oa = (e) => - mt(e) - ? "#shadow-root" - : ((e) => { - const t = Re("div"), - o = Ve(e.dom.cloneNode(!0)); - return zo(t, o), ea(t); - })(((e) => ((e, t) => Ve(e.dom.cloneNode(!1)))(e))(e)), - na = (e) => oa(e), - sa = Hr([ - ((e, t) => ({ - key: e, - value: Vs({ - can: (e, t) => { - const o = t.event, - n = o.originator, - s = o.target; - return ( - !((e, t, o) => Ze(t, e.element) && !Ze(t, o))(e, n, s) || - (console.warn( - ir() + - " did not get interpreted by the desired target. \nOriginator: " + - na(n) + - "\nTarget: " + - na(s) + - "\nCheck the " + - ir() + - " event handlers", - ), - !1) - ); - }, - }), - }))(ir()), - ]); - var ra, - aa = Object.freeze({ __proto__: null, events: sa }); - let ia = 0; - const la = (e) => { - const t = new Date().getTime(), - o = Math.floor(1e9 * Math.random()); - return ia++, e + "_" + o + ia + String(t); - }, - ca = x("alloy-id-"), - da = x("data-alloy-id"), - ua = ca(), - ma = da(), - ga = (e, t) => { - Object.defineProperty(e.dom, ma, { value: t, writable: !0 }); - }, - pa = (e) => { - const t = Ge(e) ? e.dom[ma] : null; - return A.from(t); - }, - ha = (e) => la(e), - fa = w, - ba = (e) => { - const t = (t) => - `The component must be in a context to execute: ${t}` + - (e ? "\n" + na(e().element) + " is not in context." : ""), - o = (e) => () => { - throw new Error(t(e)); - }, - n = (e) => () => { - console.warn(t(e)); - }; - return { - debugInfo: x("fake"), - triggerEvent: n("triggerEvent"), - triggerFocus: n("triggerFocus"), - triggerEscape: n("triggerEscape"), - broadcast: n("broadcast"), - broadcastOn: n("broadcastOn"), - broadcastEvent: n("broadcastEvent"), - build: o("build"), - buildOrPatch: o("buildOrPatch"), - addToWorld: o("addToWorld"), - removeFromWorld: o("removeFromWorld"), - addToGui: o("addToGui"), - removeFromGui: o("removeFromGui"), - getByUid: o("getByUid"), - getByDom: o("getByDom"), - isConnected: T, - }; - }, - va = ba(), - ya = (e) => H(e, (e) => (Ae(e, "/*") ? e.substring(0, e.length - 2) : e)), - xa = (e, t) => { - const o = e.toString(), - n = o.indexOf(")") + 1, - s = o.indexOf("("), - r = o.substring(s + 1, n - 1).split(/,\s*/); - return ( - (e.toFunctionAnnotation = () => ({ name: t, parameters: ya(r) })), e - ); - }, - wa = la("alloy-premade"), - Sa = (e) => ( - Object.defineProperty(e.element.dom, wa, { value: e.uid, writable: !0 }), - Ms(wa, e) - ), - ka = (e) => be(e, wa), - Ca = (e) => - ((e, t) => { - const o = t.toString(), - n = o.indexOf(")") + 1, - s = o.indexOf("("), - r = o.substring(s + 1, n - 1).split(/,\s*/); - return ( - (e.toFunctionAnnotation = () => ({ - name: "OVERRIDE", - parameters: ya(r.slice(1)), - })), - e - ); - })((t, ...o) => e(t.getApis(), t, ...o), e), - Oa = { init: () => _a({ readState: x("No State required") }) }, - _a = (e) => e, - Ta = (e, t) => { - const o = {}; - return ( - le(e, (e, n) => { - le(e, (e, s) => { - const r = be(o, s).getOr([]); - o[s] = r.concat([t(n, e)]); - }); - }), - o - ); - }, - Ea = (e) => ({ - classes: u(e.classes) ? [] : e.classes, - attributes: u(e.attributes) ? {} : e.attributes, - styles: u(e.styles) ? {} : e.styles, - }), - Aa = (e) => e.cHandler, - Ma = (e, t) => ({ name: e, handler: t }), - Da = (e, t) => { - const o = {}; - return ( - L(e, (e) => { - o[e.name()] = e.handlers(t); - }), - o - ); - }, - Ba = (e, t, o) => { - const n = t[o]; - return n - ? ((e, t, o, n) => { - try { - const s = ee(o, (o, s) => { - const r = o[t], - a = s[t], - i = n.indexOf(r), - l = n.indexOf(a); - if (-1 === i) - throw new Error( - "The ordering for " + - e + - " does not have an entry for " + - r + - ".\nOrder specified: " + - JSON.stringify(n, null, 2), - ); - if (-1 === l) - throw new Error( - "The ordering for " + - e + - " does not have an entry for " + - a + - ".\nOrder specified: " + - JSON.stringify(n, null, 2), - ); - return i < l ? -1 : l < i ? 1 : 0; - }); - return sn.value(s); - } catch (e) { - return sn.error([e]); - } - })("Event: " + o, "name", e, n).map((e) => - ((e) => { - const t = ( - (e, t) => - (...t) => - j(e, (e, o) => e && ((e) => e.can)(o).apply(void 0, t), !0) - )(e), - o = ( - (e, t) => - (...t) => - j( - e, - (e, o) => e || ((e) => e.abort)(o).apply(void 0, t), - !1, - ) - )(e); - return { - can: t, - abort: o, - run: (...t) => { - L(e, (e) => { - e.run.apply(void 0, t); - }); - }, - }; - })(H(e, (e) => e.handler)), - ) - : ((e, t) => - sn.error([ - "The event (" + - e + - ') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: ' + - JSON.stringify( - H(t, (e) => e.name), - null, - 2, - ), - ]))(o, e); - }, - Fa = (e, t) => - ((e, t) => { - const o = ((e) => { - const t = [], - o = []; - return ( - L(e, (e) => { - e.fold( - (e) => { - t.push(e); - }, - (e) => { - o.push(e); - }, - ); - }), - { errors: t, values: o } - ); - })(e); - return o.errors.length > 0 - ? ((n = o.errors), sn.error(q(n))) - : ((e, t) => - 0 === e.length - ? sn.value(t) - : sn.value(fn(t, bn.apply(void 0, e))))(o.values, t); - var n; - })( - pe(e, (e, o) => - (1 === e.length ? sn.value(e[0].handler) : Ba(e, t, o)).map((n) => { - const s = ((e) => { - const t = ((e) => (p(e) ? { can: E, abort: T, run: e } : e))(e); - return (e, o, ...n) => { - const s = [e, o].concat(n); - t.abort.apply(void 0, s) - ? o.stop() - : t.can.apply(void 0, s) && t.run.apply(void 0, s); - }; - })(n), - r = - e.length > 1 - ? U(t[o], (t) => N(e, (e) => e.name === t)).join(" > ") - : e[0].name; - return Ms(o, ((e, t) => ({ handler: e, purpose: t }))(s, r)); - }), - ), - {}, - ), - Ia = "alloy.base.behaviour", - Ra = Dn([ - Qn( - "dom", - "dom", - { tag: "required", process: {} }, - Dn([ - os("tag"), - ys("styles", {}), - ys("classes", []), - ys("attributes", {}), - us("value"), - us("innerHtml"), - ]), - ), - os("components"), - os("uid"), - ys("events", {}), - ys("apis", {}), - Qn( - "eventOrder", - "eventOrder", - ((ii = { - [ur()]: ["disabling", Ia, "toggling", "typeaheadevents"], - [ir()]: [Ia, "focusing", "keying"], - [br()]: [Ia, "disabling", "toggling", "representing"], - [Zs()]: [Ia, "representing", "streaming", "invalidating"], - [kr()]: [Ia, "representing", "item-events", "tooltipping"], - [Ws()]: ["focusing", Ia, "item-type-events"], - [Hs()]: ["focusing", Ia, "item-type-events"], - [qs()]: ["item-type-events", "tooltipping"], - [dr()]: ["receiving", "reflecting", "tooltipping"], - }), - xn(x(ii))), - Nn(), - ), - us("domModification"), - ]), - Na = (e) => e.events, - Va = (e, t) => { - const o = Ot(e, t); - return void 0 === o || "" === o ? [] : o.split(" "); - }, - za = (e) => void 0 !== e.dom.classList, - Ha = (e) => Va(e, "class"), - La = (e, t) => { - za(e) - ? e.dom.classList.add(t) - : ((e, t) => { - ((e, t, o) => { - const n = Va(e, t).concat([o]); - kt(e, t, n.join(" ")); - })(e, "class", t); - })(e, t); - }, - Pa = (e, t) => { - za(e) - ? e.dom.classList.remove(t) - : ((e, t) => { - ((e, t, o) => { - const n = U(Va(e, t), (e) => e !== o); - n.length > 0 ? kt(e, t, n.join(" ")) : Et(e, t); - })(e, "class", t); - })(e, t), - ((e) => { - 0 === (za(e) ? e.dom.classList : Ha(e)).length && Et(e, "class"); - })(e); - }, - Ua = (e, t) => za(e) && e.dom.classList.contains(t), - Wa = (e, t) => { - L(t, (t) => { - La(e, t); - }); - }, - ja = (e, t) => { - L(t, (t) => { - Pa(e, t); - }); - }, - Ga = (e, t) => Y(t, (t) => Ua(e, t)), - $a = (e) => e.dom.value, - qa = (e, t) => { - if (void 0 === t) throw new Error("Value.set was undefined"); - e.dom.value = t; - }, - Xa = (e, t, o) => { - o.fold( - () => zo(e, t), - (e) => { - Ze(e, t) || (Ro(e, t), Po(e)); - }, - ); - }, - Ya = (e, t, o) => { - const n = H(t, o), - s = it(e); - return L(s.slice(n.length), Po), n; - }, - Ka = (e, t, o, n) => { - const s = lt(e, t), - r = n(o, s), - a = ((e, t, o) => - lt(e, t).map((e) => { - if (o.exists((t) => !Ze(t, e))) { - const t = o.map(Ue).getOr("span"), - n = Re(t); - return Ro(e, n), n; - } - return e; - }))(e, t, s); - return Xa(e, r.element, a), r; - }, - Ja = (e, t) => { - const o = ae(e), - n = ae(t), - s = J(n, o), - r = ((e, o) => { - const n = {}, - s = {}; - return ( - me(e, (e, o) => !ve(t, o) || e !== t[o], ue(n), ue(s)), - { t: n, f: s } - ); - })(e).t; - return { toRemove: s, toSet: r }; - }, - Za = (e, t) => { - const { - class: o, - style: n, - ...s - } = ((e) => - j(e.dom.attributes, (e, t) => ((e[t.name] = t.value), e), {}))(t), - { toSet: r, toRemove: a } = Ja(e.attributes, s), - i = Vt(t), - { toSet: l, toRemove: c } = Ja(e.styles, i), - d = ((e) => - za(e) - ? ((e) => { - const t = e.dom.classList, - o = new Array(t.length); - for (let e = 0; e < t.length; e++) { - const n = t.item(e); - null !== n && (o[e] = n); - } - return o; - })(e) - : Ha(e))(t), - u = J(d, e.classes), - m = J(e.classes, d); - return ( - L(a, (e) => Et(t, e)), - Ct(t, r), - Wa(t, m), - ja(t, u), - L(c, (e) => Ht(t, e)), - Bt(t, l), - e.innerHtml.fold( - () => { - const o = e.domChildren; - ((e, t) => { - Ya(e, t, (t, o) => { - const n = lt(e, o); - return Xa(e, t, n), t; - }); - })(t, o); - }, - (e) => { - ta(t, e); - }, - ), - (() => { - const o = t, - n = e.value.getOrUndefined(); - n !== $a(o) && qa(o, null != n ? n : ""); - })(), - t - ); - }, - Qa = (e) => { - const t = ((e) => { - const t = be(e, "behaviours").getOr({}); - return X(ae(t), (e) => { - const o = t[e]; - return g(o) ? [o.me] : []; - }); - })(e); - return ((e, t) => - ((e, t) => { - const o = H(t, (e) => vs(e.name(), [os("config"), ys("state", Oa)])), - n = qn("component.behaviours", Dn(o), e.behaviours).fold((t) => { - throw new Error( - Kn(t) + "\nComplete spec:\n" + JSON.stringify(e, null, 2), - ); - }, w); - return { - list: t, - data: ce(n, (e) => { - const t = e.map((e) => ({ - config: e.config, - state: e.state.init(e.config), - })); - return x(t); - }), - }; - })(e, t))(e, t); - }, - ei = (e, t) => { - const o = () => m, - n = Es(va), - s = Xn(((e) => qn("custom.definition", Ra, e))(e)), - r = Qa(e), - a = ((e) => e.list)(r), - i = ((e) => e.data)(r), - l = ((e, t, o) => { - const n = { - ...(s = e).dom, - uid: s.uid, - domChildren: H(s.components, (e) => e.element), - }; - var s; - const r = ((e) => e.domModification.fold(() => Ea({}), Ea))(e), - a = { "alloy.base.modification": r }, - i = - t.length > 0 - ? ((e, t, o, n) => { - const s = { ...t }; - L(o, (t) => { - s[t.name()] = t.exhibit(e, n); - }); - const r = Ta(s, (e, t) => ({ name: e, modification: t })), - a = (e) => - W(e, (e, t) => ({ ...t.modification, ...e }), {}), - i = W(r.classes, (e, t) => t.modification.concat(e), []), - l = a(r.attributes), - c = a(r.styles); - return Ea({ classes: i, attributes: l, styles: c }); - })(o, a, t, n) - : r; - return ( - (l = n), - (c = i), - { - ...l, - attributes: { ...l.attributes, ...c.attributes }, - styles: { ...l.styles, ...c.styles }, - classes: l.classes.concat(c.classes), - } - ); - var l, c; - })(s, a, i), - c = ((e, t) => { - const o = t - .filter( - (t) => - Ue(t) === e.tag && - !((e) => e.innerHtml.isSome() && e.domChildren.length > 0)(e) && - !((e) => ve(e.dom, wa))(t), - ) - .bind((t) => - ((e, t) => { - try { - const o = Za(e, t); - return A.some(o); - } catch (e) { - return A.none(); - } - })(e, t), - ) - .getOrThunk(() => - ((e) => { - const t = Re(e.tag); - Ct(t, e.attributes), - Wa(t, e.classes), - Bt(t, e.styles), - e.innerHtml.each((e) => ta(t, e)); - const o = e.domChildren; - return ( - Ho(t, o), - e.value.each((e) => { - qa(t, e); - }), - t - ); - })(e), - ); - return ga(o, e.uid), o; - })(l, t), - d = ((e, t, o) => { - const n = { "alloy.base.behaviour": Na(e) }; - return ((e, t, o, n) => { - const s = ((e, t, o) => { - const n = { ...o, ...Da(t, e) }; - return Ta(n, Ma); - })(e, o, n); - return Fa(s, t); - })(o, e.eventOrder, t, n).getOrDie(); - })(s, a, i), - u = Es(s.components), - m = { - uid: e.uid, - getSystem: n.get, - config: (t) => { - const o = i; - return ( - p(o[t.name()]) - ? o[t.name()] - : () => { - throw new Error( - "Could not find " + - t.name() + - " in " + - JSON.stringify(e, null, 2), - ); - } - )(); - }, - hasConfigured: (e) => p(i[e.name()]), - spec: e, - readState: (e) => - i[e]() - .map((e) => e.state.readState()) - .getOr("not enabled"), - getApis: () => s.apis, - connect: (e) => { - n.set(e); - }, - disconnect: () => { - n.set(ba(o)); - }, - element: c, - syncComponents: () => { - const e = it(c), - t = X(e, (e) => - n - .get() - .getByDom(e) - .fold(() => [], Q), - ); - u.set(t); - }, - components: u.get, - events: d, - }; - return m; - }, - ti = (e) => { - const t = Ne(e); - return oi({ element: t }); - }, - oi = (e) => { - const t = Yn("external.component", Mn([os("element"), us("uid")]), e), - o = Es(ba()), - n = t.uid.getOrThunk(() => ha("external")); - ga(t.element, n); - const s = { - uid: n, - getSystem: o.get, - config: A.none, - hasConfigured: T, - connect: (e) => { - o.set(e); - }, - disconnect: () => { - o.set(ba(() => s)); - }, - getApis: () => ({}), - element: t.element, - spec: e, - readState: x("No state"), - syncComponents: b, - components: x([]), - events: {}, - }; - return Sa(s); - }, - ni = ha, - si = (e, t) => - ka(e).getOrThunk(() => - ((e, t) => { - const { events: o, ...n } = fa(e), - s = ((e, t) => { - const o = be(e, "components").getOr([]); - return t.fold( - () => H(o, ri), - (e) => H(o, (t, o) => si(t, lt(e, o))), - ); - })(n, t), - r = { ...n, events: { ...aa, ...o }, components: s }; - return sn.value(ei(r, t)); - })(((e) => ve(e, "uid"))(e) ? e : { uid: ni(""), ...e }, t).getOrDie(), - ), - ri = (e) => si(e, A.none()), - ai = Sa; - var ii, - li = (e, t, o, n, s) => - e(o, n) ? A.some(o) : p(s) && s(o) ? A.none() : t(o, n, s); - const ci = (e, t, o) => { - let n = e.dom; - const s = p(o) ? o : T; - for (; n.parentNode; ) { - n = n.parentNode; - const e = Ve(n); - if (t(e)) return A.some(e); - if (s(e)) break; - } - return A.none(); - }, - di = (e, t, o) => li((e, t) => t(e), ci, e, t, o), - ui = (e, t, o) => di(e, t, o).isSome(), - mi = (e, t, o) => ci(e, (e) => Ke(e, t), o), - gi = (e, t) => - ((e, o) => - G(e.dom.childNodes, (e) => { - return (o = Ve(e)), Ke(o, t); - var o; - }).map(Ve))(e), - pi = (e, t) => - ((e, t) => { - const o = void 0 === t ? document : t.dom; - return Je(o) ? A.none() : A.from(o.querySelector(e)).map(Ve); - })(t, e), - hi = (e, t, o) => li((e, t) => Ke(e, t), mi, e, t, o), - fi = "aria-controls", - bi = () => { - const e = la(fi); - return { - id: e, - link: (t) => { - kt(t, fi, e); - }, - unlink: (e) => { - Et(e, fi); - }, - }; - }, - vi = (e, t) => - ui(t, (t) => Ze(t, e.element), T) || - ((e, t) => - ((e) => - di(e, (e) => { - if (!Ge(e)) return !1; - const t = Ot(e, "id"); - return void 0 !== t && t.indexOf(fi) > -1; - }).bind((e) => { - const t = Ot(e, "id"), - o = ht(e); - return pi(o, `[${fi}="${t}"]`); - }))(t).exists((t) => vi(e, t)))(e, t); - var yi; - !(function (e) { - (e[(e.STOP = 0)] = "STOP"), - (e[(e.NORMAL = 1)] = "NORMAL"), - (e[(e.LOGGING = 2)] = "LOGGING"); - })(yi || (yi = {})); - const xi = Es({}), - wi = ["alloy/data/Fields", "alloy/debugging/Debugging"], - Si = (e, t, o) => - ((e, t, o) => { - switch ( - be(xi.get(), e) - .orThunk(() => { - const t = ae(xi.get()); - return re(t, (t) => - e.indexOf(t) > -1 ? A.some(xi.get()[t]) : A.none(), - ); - }) - .getOr(yi.NORMAL) - ) { - case yi.NORMAL: - return o(ki()); - case yi.LOGGING: { - const n = ((e, t) => { - const o = [], - n = new Date().getTime(); - return { - logEventCut: (e, t, n) => { - o.push({ outcome: "cut", target: t, purpose: n }); - }, - logEventStopped: (e, t, n) => { - o.push({ outcome: "stopped", target: t, purpose: n }); - }, - logNoParent: (e, t, n) => { - o.push({ outcome: "no-parent", target: t, purpose: n }); - }, - logEventNoHandlers: (e, t) => { - o.push({ outcome: "no-handlers-left", target: t }); - }, - logEventResponse: (e, t, n) => { - o.push({ outcome: "response", purpose: n, target: t }); - }, - write: () => { - const s = new Date().getTime(); - R(["mousemove", "mouseover", "mouseout", br()], e) || - console.log(e, { - event: e, - time: s - n, - target: t.dom, - sequence: H(o, (e) => - R(["cut", "stopped", "response"], e.outcome) - ? "{" + - e.purpose + - "} " + - e.outcome + - " at (" + - na(e.target) + - ")" - : e.outcome, - ), - }); - }, - }; - })(e, t), - s = o(n); - return n.write(), s; - } - case yi.STOP: - return !0; - } - })(e, t, o), - ki = x({ - logEventCut: b, - logEventStopped: b, - logNoParent: b, - logEventNoHandlers: b, - logEventResponse: b, - write: b, - }), - Ci = x([os("menu"), os("selectedMenu")]), - Oi = x([os("item"), os("selectedItem")]); - x(Dn(Oi().concat(Ci()))); - const _i = x(Dn(Oi())), - Ti = ls("initSize", [os("numColumns"), os("numRows")]), - Ei = () => ls("markers", [os("backgroundMenu")].concat(Ci()).concat(Oi())), - Ai = (e) => ls("markers", H(e, os)), - Mi = (e, t, o) => ( - (() => { - const e = new Error(); - if (void 0 !== e.stack) { - const t = e.stack.split("\n"); - G( - t, - (e) => e.indexOf("alloy") > 0 && !N(wi, (t) => e.indexOf(t) > -1), - ).getOr("unknown"); - } - })(), - Qn( - t, - t, - o, - Gn((e) => sn.value((...t) => e.apply(void 0, t))), - ) - ), - Di = (e) => Mi(0, e, yn(b)), - Bi = (e) => Mi(0, e, yn(A.none)), - Fi = (e) => Mi(0, e, { tag: "required", process: {} }), - Ii = (e) => Mi(0, e, { tag: "required", process: {} }), - Ri = (e, t) => es(e, x(t)), - Ni = (e) => es(e, w), - Vi = x(Ti), - zi = (e, t, o, n, s, r, a, i = !1) => ({ - x: e, - y: t, - bubble: o, - direction: n, - placement: s, - restriction: r, - label: `${a}-${s}`, - alwaysFit: i, - }), - Hi = As([ - { southeast: [] }, - { southwest: [] }, - { northeast: [] }, - { northwest: [] }, - { south: [] }, - { north: [] }, - { east: [] }, - { west: [] }, - ]), - Li = Hi.southeast, - Pi = Hi.southwest, - Ui = Hi.northeast, - Wi = Hi.northwest, - ji = Hi.south, - Gi = Hi.north, - $i = Hi.east, - qi = Hi.west, - Xi = (e, t, o, n) => { - const s = e + t; - return s > n ? o : s < o ? n : s; - }, - Yi = (e, t, o) => Math.min(Math.max(e, t), o), - Ki = (e, t) => - Z(["left", "right", "top", "bottom"], (o) => - be(t, o).map((t) => - ((e, t) => { - switch (t) { - case 1: - return e.x; - case 0: - return e.x + e.width; - case 2: - return e.y; - case 3: - return e.y + e.height; - } - })(e, t), - ), - ), - Ji = "layout", - Zi = (e) => e.x, - Qi = (e, t) => e.x + e.width / 2 - t.width / 2, - el = (e, t) => e.x + e.width - t.width, - tl = (e, t) => e.y - t.height, - ol = (e) => e.y + e.height, - nl = (e, t) => e.y + e.height / 2 - t.height / 2, - sl = (e, t, o) => - zi( - Zi(e), - ol(e), - o.southeast(), - Li(), - "southeast", - Ki(e, { left: 1, top: 3 }), - Ji, - ), - rl = (e, t, o) => - zi( - el(e, t), - ol(e), - o.southwest(), - Pi(), - "southwest", - Ki(e, { right: 0, top: 3 }), - Ji, - ), - al = (e, t, o) => - zi( - Zi(e), - tl(e, t), - o.northeast(), - Ui(), - "northeast", - Ki(e, { left: 1, bottom: 2 }), - Ji, - ), - il = (e, t, o) => - zi( - el(e, t), - tl(e, t), - o.northwest(), - Wi(), - "northwest", - Ki(e, { right: 0, bottom: 2 }), - Ji, - ), - ll = (e, t, o) => - zi( - Qi(e, t), - tl(e, t), - o.north(), - Gi(), - "north", - Ki(e, { bottom: 2 }), - Ji, - ), - cl = (e, t, o) => - zi(Qi(e, t), ol(e), o.south(), ji(), "south", Ki(e, { top: 3 }), Ji), - dl = (e, t, o) => - zi( - ((e) => e.x + e.width)(e), - nl(e, t), - o.east(), - $i(), - "east", - Ki(e, { left: 0 }), - Ji, - ), - ul = (e, t, o) => - zi( - ((e, t) => e.x - t.width)(e, t), - nl(e, t), - o.west(), - qi(), - "west", - Ki(e, { right: 1 }), - Ji, - ), - ml = () => [sl, rl, al, il, cl, ll, dl, ul], - gl = () => [rl, sl, il, al, cl, ll, dl, ul], - pl = () => [al, il, sl, rl, ll, cl], - hl = () => [il, al, rl, sl, ll, cl], - fl = () => [sl, rl, al, il, cl, ll], - bl = () => [rl, sl, il, al, cl, ll]; - var vl = Object.freeze({ - __proto__: null, - events: (e) => - Hr([ - Ur(dr(), (t, o) => { - const n = e.channels, - s = ae(n), - r = o, - a = ((e, t) => (t.universal ? e : U(e, (e) => R(t.channels, e))))( - s, - r, - ); - L(a, (e) => { - const o = n[e], - s = o.schema, - a = Yn( - "channel[" + e + "] data\nReceiver: " + na(t.element), - s, - r.data, - ); - o.onReceive(t, a); - }); - }), - ]), - }), - yl = [ - ns("channels", $n(sn.value, Mn([Fi("onReceive"), ys("schema", Nn())]))), - ]; - const xl = (e, t, o) => - Zr((n, s) => { - o(n, e, t); - }), - wl = (e) => ({ key: e, value: void 0 }), - Sl = (e, t, o, n, s, r, a) => { - const i = (e) => (ye(e, o) ? e[o]() : A.none()), - l = ce(s, (e, t) => - ((e, t, o) => - ((e, t, o) => { - const n = o.toString(), - s = n.indexOf(")") + 1, - r = n.indexOf("("), - a = n.substring(r + 1, s - 1).split(/,\s*/); - return ( - (e.toFunctionAnnotation = () => ({ - name: t, - parameters: ya(a.slice(0, 1).concat(a.slice(3))), - })), - e - ); - })( - (n, ...s) => { - const r = [n].concat(s); - return n.config({ name: x(e) }).fold( - () => { - throw new Error( - "We could not find any behaviour configuration for: " + - e + - ". Using API: " + - o, - ); - }, - (e) => { - const o = Array.prototype.slice.call(r, 1); - return t.apply(void 0, [n, e.config, e.state].concat(o)); - }, - ); - }, - o, - t, - ))(o, e, t), - ), - c = { - ...ce(r, (e, t) => xa(e, t)), - ...l, - revoke: k(wl, o), - config: (t) => { - const n = Yn(o + "-config", e, t); - return { - key: o, - value: { - config: n, - me: c, - configAsRaw: Qt(() => Yn(o + "-config", e, t)), - initialConfig: t, - state: a, - }, - }; - }, - schema: x(t), - exhibit: (e, t) => - Se(i(e), be(n, "exhibit"), (e, o) => - o(t, e.config, e.state), - ).getOrThunk(() => Ea({})), - name: x(o), - handlers: (e) => - i(e) - .map((e) => be(n, "events").getOr(() => ({}))(e.config, e.state)) - .getOr({}), - }; - return c; - }, - kl = (e) => Ds(e), - Cl = Mn([ - os("fields"), - os("name"), - ys("active", {}), - ys("apis", {}), - ys("state", Oa), - ys("extra", {}), - ]), - Ol = (e) => { - const t = Yn("Creating behaviour: " + e.name, Cl, e); - return ((e, t, o, n, s, r) => { - const a = Mn(e), - i = vs(t, [("config", (l = e), ms("config", Mn(l)))]); - var l; - return Sl(a, i, t, o, n, s, r); - })(t.fields, t.name, t.active, t.apis, t.extra, t.state); - }, - _l = Mn([ - os("branchKey"), - os("branches"), - os("name"), - ys("active", {}), - ys("apis", {}), - ys("state", Oa), - ys("extra", {}), - ]), - Tl = (e) => { - const t = Yn("Creating behaviour: " + e.name, _l, e); - return ((e, t, o, n, s, r) => { - const a = e, - i = vs(t, [ms("config", e)]); - return Sl(a, i, t, o, n, s, r); - })( - Jn(t.branchKey, t.branches), - t.name, - t.active, - t.apis, - t.extra, - t.state, - ); - }, - El = x(void 0), - Al = Ol({ fields: yl, name: "receiving", active: vl }); - var Ml = Object.freeze({ - __proto__: null, - exhibit: (e, t) => - Ea({ classes: [], styles: t.useFixed() ? {} : { position: "relative" } }), - }); - const Dl = (e) => e.dom.focus(), - Bl = (e) => e.dom.blur(), - Fl = (e) => { - const t = ht(e).dom; - return e.dom === t.activeElement; - }, - Il = (e = $o()) => A.from(e.dom.activeElement).map(Ve), - Rl = (e) => Il(ht(e)).filter((t) => e.dom.contains(t.dom)), - Nl = (e, t) => { - const o = ht(t), - n = Il(o).bind((e) => { - const o = (t) => Ze(e, t); - return o(t) - ? A.some(t) - : ((e, t) => { - const o = (e) => { - for (let n = 0; n < e.childNodes.length; n++) { - const s = Ve(e.childNodes[n]); - if (t(s)) return A.some(s); - const r = o(e.childNodes[n]); - if (r.isSome()) return r; - } - return A.none(); - }; - return o(e.dom); - })(t, o); - }), - s = e(t); - return ( - n.each((e) => { - Il(o) - .filter((t) => Ze(t, e)) - .fold(() => { - Dl(e); - }, b); - }), - s - ); - }, - Vl = (e, t, o, n, s) => { - const r = (e) => e + "px"; - return { - position: e, - left: t.map(r), - top: o.map(r), - right: n.map(r), - bottom: s.map(r), - }; - }, - zl = (e, t) => { - Ft(e, ((e) => ({ ...e, position: A.some(e.position) }))(t)); - }, - Hl = As([ - { none: [] }, - { relative: ["x", "y", "width", "height"] }, - { fixed: ["x", "y", "width", "height"] }, - ]), - Ll = (e, t, o, n, s, r) => { - const a = t.rect, - i = a.x - o, - l = a.y - n, - c = s - (i + a.width), - d = r - (l + a.height), - u = A.some(i), - m = A.some(l), - g = A.some(c), - p = A.some(d), - h = A.none(); - return t.direction.fold( - () => Vl(e, u, m, h, h), - () => Vl(e, h, m, g, h), - () => Vl(e, u, h, h, p), - () => Vl(e, h, h, g, p), - () => Vl(e, u, m, h, h), - () => Vl(e, u, h, h, p), - () => Vl(e, u, m, h, h), - () => Vl(e, h, m, g, h), - ); - }, - Pl = (e, t) => - e.fold( - () => { - const e = t.rect; - return Vl("absolute", A.some(e.x), A.some(e.y), A.none(), A.none()); - }, - (e, o, n, s) => Ll("absolute", t, e, o, n, s), - (e, o, n, s) => Ll("fixed", t, e, o, n, s), - ), - Ul = (e, t) => { - const o = k(Yo, t), - n = e.fold(o, o, () => { - const e = Uo(); - return Yo(t).translate(-e.left, -e.top); - }), - s = Zt(t), - r = jt(t); - return Ko(n.left, n.top, s, r); - }, - Wl = (e, t) => - t.fold( - () => e.fold(en, en, Ko), - (t) => - e.fold(x(t), x(t), () => { - const o = jl(e, t.x, t.y); - return Ko(o.left, o.top, t.width, t.height); - }), - ), - jl = (e, t, o) => { - const n = $t(t, o); - return e.fold(x(n), x(n), () => { - const e = Uo(); - return n.translate(-e.left, -e.top); - }); - }; - Hl.none; - const Gl = Hl.relative, - $l = Hl.fixed, - ql = "data-alloy-placement", - Xl = (e) => _t(e, ql), - Yl = As([ - { fit: ["reposition"] }, - { nofit: ["reposition", "visibleW", "visibleH", "isVisible"] }, - ]), - Kl = (e, t, o, n) => { - const s = e.bubble, - r = s.offset, - a = ((e, t, o) => { - const n = (n, s) => - t[n] - .map((t) => { - const r = "top" === n || "bottom" === n, - a = r ? o.top : o.left, - i = - ("left" === n || "top" === n ? Math.max : Math.min)( - t, - s, - ) + a; - return r ? Yi(i, e.y, e.bottom) : Yi(i, e.x, e.right); - }) - .getOr(s), - s = n("left", e.x), - r = n("top", e.y), - a = n("right", e.right), - i = n("bottom", e.bottom); - return Ko(s, r, a - s, i - r); - })(n, e.restriction, r), - i = e.x + r.left, - l = e.y + r.top, - c = Ko(i, l, t, o), - { - originInBounds: d, - sizeInBounds: u, - visibleW: m, - visibleH: g, - } = ((e, t) => { - const { x: o, y: n, right: s, bottom: r } = t, - { x: a, y: i, right: l, bottom: c, width: d, height: u } = e; - return { - originInBounds: a >= o && a <= s && i >= n && i <= r, - sizeInBounds: l <= s && l >= o && c <= r && c >= n, - visibleW: Math.min(d, a >= o ? s - a : l - o), - visibleH: Math.min(u, i >= n ? r - i : c - n), - }; - })(c, a), - p = d && u, - h = p - ? c - : ((e, t) => { - const { x: o, y: n, right: s, bottom: r } = t, - { x: a, y: i, width: l, height: c } = e, - d = Math.max(o, s - l), - u = Math.max(n, r - c), - m = Yi(a, o, d), - g = Yi(i, n, u), - p = Math.min(m + l, s) - m, - h = Math.min(g + c, r) - g; - return Ko(m, g, p, h); - })(c, a), - f = h.width > 0 && h.height > 0, - { maxWidth: b, maxHeight: v } = ((e, t, o) => { - const n = x(t.bottom - o.y), - s = x(o.bottom - t.y), - r = ((e, t, o, n) => e.fold(t, t, n, n, t, n, o, o))(e, s, s, n), - a = x(t.right - o.x), - i = x(o.right - t.x), - l = ((e, t, o, n) => e.fold(t, n, t, n, o, o, t, n))(e, i, i, a); - return { maxWidth: l, maxHeight: r }; - })(e.direction, h, n), - y = { - rect: h, - maxHeight: v, - maxWidth: b, - direction: e.direction, - placement: e.placement, - classes: { on: s.classesOn, off: s.classesOff }, - layout: e.label, - testY: l, - }; - return p || e.alwaysFit ? Yl.fit(y) : Yl.nofit(y, m, g, f); - }, - Jl = (e) => { - const t = Es(A.none()), - o = () => t.get().each(e); - return { - clear: () => { - o(), t.set(A.none()); - }, - isSet: () => t.get().isSome(), - get: () => t.get(), - set: (e) => { - o(), t.set(A.some(e)); - }, - }; - }, - Zl = () => Jl((e) => e.unbind()), - Ql = () => { - const e = Jl(b); - return { ...e, on: (t) => e.get().each(t) }; - }, - ec = E, - tc = (e, t, o) => ((e, t, o, n) => Fo(e, t, o, n, !1))(e, t, ec, o), - oc = (e, t, o) => ((e, t, o, n) => Fo(e, t, o, n, !0))(e, t, ec, o), - nc = Bo, - sc = ["top", "bottom", "right", "left"], - rc = "data-alloy-transition-timer", - ac = (e, t, o, n, s, a) => { - const i = ((e, t, o) => - o.exists((o) => { - const n = e.mode; - return "all" === n || o[n] !== t[n]; - }))(n, s, a); - if (i || ((e, t) => Ga(e, t.classes))(e, n)) { - Dt(e, "position", o.position); - const a = Ul(t, e), - l = Pl(t, { ...s, rect: a }), - c = Z(sc, (e) => l[e]); - ((e, t) => { - const o = (e) => parseFloat(e).toFixed(3); - return he( - t, - (t, n) => - !((e, t, o = S) => Se(e, t, o).getOr(e.isNone() && t.isNone()))( - e[n].map(o), - t.map(o), - ), - ).isSome(); - })(o, c) && - (Ft(e, c), - i && - ((e, t) => { - Wa(e, t.classes), - _t(e, rc).each((t) => { - clearTimeout(parseInt(t, 10)), Et(e, rc); - }), - ((e, t) => { - const o = Zl(), - n = Zl(); - let s; - const a = (t) => { - var o; - const n = - null !== (o = t.raw.pseudoElement) && void 0 !== o - ? o - : ""; - return ( - Ze(t.target, e) && !De(n) && R(sc, t.raw.propertyName) - ); - }, - i = (r) => { - if (m(r) || a(r)) { - o.clear(), n.clear(); - const a = null == r ? void 0 : r.raw.type; - (m(a) || a === or()) && - (clearTimeout(s), Et(e, rc), ja(e, t.classes)); - } - }, - l = tc(e, nr(), (t) => { - a(t) && - (l.unbind(), - o.set(tc(e, or(), i)), - n.set(tc(e, tr(), i))); - }), - c = ((e) => { - const t = (t) => { - const o = It(e, t).split(/\s*,\s*/); - return U(o, De); - }, - o = (e) => { - if (r(e) && /^[\d.]+/.test(e)) { - const t = parseFloat(e); - return Ae(e, "ms") ? t : 1e3 * t; - } - return 0; - }, - n = t("transition-delay"), - s = t("transition-duration"); - return j( - s, - (e, t, s) => { - const r = o(n[s]) + o(t); - return Math.max(e, r); - }, - 0, - ); - })(e); - requestAnimationFrame(() => { - (s = setTimeout(i, c + 17)), kt(e, rc, s); - }); - })(e, t); - })(e, n), - Lt(e)); - } else ja(e, n.classes); - }, - ic = (e, t) => { - ((e, t) => { - const o = Ut.max(e, t, [ - "margin-top", - "border-top-width", - "padding-top", - "padding-bottom", - "border-bottom-width", - "margin-bottom", - ]); - Dt(e, "max-height", o + "px"); - })(e, Math.floor(t)); - }, - lc = x((e, t) => { - ic(e, t), Bt(e, { "overflow-x": "hidden", "overflow-y": "auto" }); - }), - cc = x((e, t) => { - ic(e, t); - }), - dc = (e, t, o) => (void 0 === e[t] ? o : e[t]), - uc = (e, t, o, n) => { - const s = ((e, t, o, n) => { - Ht(t, "max-height"), Ht(t, "max-width"); - const s = { width: Zt((r = t)), height: jt(r) }; - var r; - return ((e, t, o, n, s, r) => { - const a = n.width, - i = n.height, - l = (t, l, c, d, u) => { - const m = t(o, n, s, e, r), - g = Kl(m, a, i, r); - return g.fold(x(g), (e, t, o, n) => - (u === n ? o > d || t > c : !u && n) ? g : Yl.nofit(l, c, d, u), - ); - }; - return j( - t, - (e, t) => { - const o = k(l, t); - return e.fold(x(e), o); - }, - Yl.nofit( - { - rect: o, - maxHeight: n.height, - maxWidth: n.width, - direction: Li(), - placement: "southeast", - classes: { on: [], off: [] }, - layout: "none", - testY: o.y, - }, - -1, - -1, - !1, - ), - ).fold(w, w); - })(t, n.preference, e, s, o, n.bounds); - })(e, t, o, n); - return ( - ((e, t, o) => { - const n = Pl(o.origin, t); - o.transition.each((s) => { - ac(e, o.origin, n, s, t, o.lastPlacement); - }), - zl(e, n); - })(t, s, n), - ((e, t) => { - ((e, t) => { - kt(e, ql, t); - })(e, t.placement); - })(t, s), - ((e, t) => { - const o = t.classes; - ja(e, o.off), Wa(e, o.on); - })(t, s), - ((e, t, o) => { - (0, o.maxHeightFunction)(e, t.maxHeight); - })(t, s, n), - ((e, t, o) => { - (0, o.maxWidthFunction)(e, t.maxWidth); - })(t, s, n), - { layout: s.layout, placement: s.placement } - ); - }, - mc = [ - "valignCentre", - "alignLeft", - "alignRight", - "alignCentre", - "top", - "bottom", - "left", - "right", - "inset", - ], - gc = (e, t, o, n = 1) => { - const s = e * n, - r = t * n, - a = (e) => be(o, e).getOr([]), - i = (e, t, o) => { - const n = J(mc, o); - return { offset: $t(e, t), classesOn: X(o, a), classesOff: X(n, a) }; - }; - return { - southeast: () => i(-e, t, ["top", "alignLeft"]), - southwest: () => i(e, t, ["top", "alignRight"]), - south: () => i(-e / 2, t, ["top", "alignCentre"]), - northeast: () => i(-e, -t, ["bottom", "alignLeft"]), - northwest: () => i(e, -t, ["bottom", "alignRight"]), - north: () => i(-e / 2, -t, ["bottom", "alignCentre"]), - east: () => i(e, -t / 2, ["valignCentre", "left"]), - west: () => i(-e, -t / 2, ["valignCentre", "right"]), - insetNortheast: () => i(s, r, ["top", "alignLeft", "inset"]), - insetNorthwest: () => i(-s, r, ["top", "alignRight", "inset"]), - insetNorth: () => i(-s / 2, r, ["top", "alignCentre", "inset"]), - insetSoutheast: () => i(s, -r, ["bottom", "alignLeft", "inset"]), - insetSouthwest: () => i(-s, -r, ["bottom", "alignRight", "inset"]), - insetSouth: () => i(-s / 2, -r, ["bottom", "alignCentre", "inset"]), - insetEast: () => i(-s, -r / 2, ["valignCentre", "right", "inset"]), - insetWest: () => i(s, -r / 2, ["valignCentre", "left", "inset"]), - }; - }, - pc = () => gc(0, 0, {}), - hc = w, - fc = (e, t) => (o) => ("rtl" === bc(o) ? t : e), - bc = (e) => ("rtl" === It(e, "direction") ? "rtl" : "ltr"); - var vc; - !(function (e) { - (e.TopToBottom = "toptobottom"), (e.BottomToTop = "bottomtotop"); - })(vc || (vc = {})); - const yc = "data-alloy-vertical-dir", - xc = (e) => - ui( - e, - (e) => Ge(e) && Ot(e, "data-alloy-vertical-dir") === vc.BottomToTop, - ), - wc = () => - vs("layouts", [ - os("onLtr"), - os("onRtl"), - us("onBottomLtr"), - us("onBottomRtl"), - ]), - Sc = (e, t, o, n, s, r, a) => { - const i = a.map(xc).getOr(!1), - l = t.layouts.map((t) => t.onLtr(e)), - c = t.layouts.map((t) => t.onRtl(e)), - d = i - ? t.layouts - .bind((t) => t.onBottomLtr.map((t) => t(e))) - .or(l) - .getOr(s) - : l.getOr(o), - u = i - ? t.layouts - .bind((t) => t.onBottomRtl.map((t) => t(e))) - .or(c) - .getOr(r) - : c.getOr(n); - return fc(d, u)(e); - }; - var kc = [ - os("hotspot"), - us("bubble"), - ys("overrides", {}), - wc(), - Ri("placement", (e, t, o) => { - const n = t.hotspot, - s = Ul(o, n.element), - r = Sc( - e.element, - t, - fl(), - bl(), - pl(), - hl(), - A.some(t.hotspot.element), - ); - return A.some( - hc({ - anchorBox: s, - bubble: t.bubble.getOr(pc()), - overrides: t.overrides, - layouts: r, - }), - ); - }), - ], - Cc = [ - os("x"), - os("y"), - ys("height", 0), - ys("width", 0), - ys("bubble", pc()), - ys("overrides", {}), - wc(), - Ri("placement", (e, t, o) => { - const n = jl(o, t.x, t.y), - s = Ko(n.left, n.top, t.width, t.height), - r = Sc(e.element, t, ml(), gl(), ml(), gl(), A.none()); - return A.some( - hc({ - anchorBox: s, - bubble: t.bubble, - overrides: t.overrides, - layouts: r, - }), - ); - }), - ]; - const Oc = As([ - { screen: ["point"] }, - { absolute: ["point", "scrollLeft", "scrollTop"] }, - ]), - _c = (e) => e.fold(w, (e, t, o) => e.translate(-t, -o)), - Tc = (e) => e.fold(w, w), - Ec = (e) => j(e, (e, t) => e.translate(t.left, t.top), $t(0, 0)), - Ac = (e) => { - const t = H(e, Tc); - return Ec(t); - }, - Mc = Oc.screen, - Dc = Oc.absolute, - Bc = (e, t, o) => { - const n = et(e.element), - s = Uo(n), - r = ((e, t, o) => { - const n = nt(o.root).dom; - return A.from(n.frameElement) - .map(Ve) - .filter((t) => { - const o = et(t), - n = et(e.element); - return Ze(o, n); - }) - .map(Xt); - })(e, 0, o).getOr(s); - return Dc(r, s.left, s.top); - }, - Fc = (e, t, o, n) => { - const s = Mc($t(e, t)); - return A.some( - ((e, t, o) => ({ point: e, width: t, height: o }))(s, o, n), - ); - }, - Ic = (e, t, o, n, s) => - e.map((e) => { - const r = [t, e.point], - a = - ((i = () => Ac(r)), - (l = () => Ac(r)), - (c = () => - ((e) => { - const t = H(e, _c); - return Ec(t); - })(r)), - n.fold(i, l, c)); - var i, l, c; - const d = - ((p = a.left), - (h = a.top), - (f = e.width), - (b = e.height), - { x: p, y: h, width: f, height: b }), - u = o.showAbove ? pl() : fl(), - m = o.showAbove ? hl() : bl(), - g = Sc(s, o, u, m, u, m, A.none()); - var p, h, f, b; - return hc({ - anchorBox: d, - bubble: o.bubble.getOr(pc()), - overrides: o.overrides, - layouts: g, - }); - }); - var Rc = [ - os("node"), - os("root"), - us("bubble"), - wc(), - ys("overrides", {}), - ys("showAbove", !1), - Ri("placement", (e, t, o) => { - const n = Bc(e, 0, t); - return t.node.filter(yt).bind((s) => { - const r = s.dom.getBoundingClientRect(), - a = Fc(r.left, r.top, r.width, r.height), - i = t.node.getOr(e.element); - return Ic(a, n, t, o, i); - }); - }), - ]; - const Nc = (e, t, o, n) => ({ start: e, soffset: t, finish: o, foffset: n }), - Vc = As([ - { before: ["element"] }, - { on: ["element", "offset"] }, - { after: ["element"] }, - ]), - zc = (Vc.before, Vc.on, Vc.after, (e) => e.fold(w, w, w)), - Hc = As([ - { domRange: ["rng"] }, - { relative: ["startSitu", "finishSitu"] }, - { exact: ["start", "soffset", "finish", "foffset"] }, - ]), - Lc = { - domRange: Hc.domRange, - relative: Hc.relative, - exact: Hc.exact, - exactFromRange: (e) => Hc.exact(e.start, e.soffset, e.finish, e.foffset), - getWin: (e) => { - const t = ((e) => - e.match({ - domRange: (e) => Ve(e.startContainer), - relative: (e, t) => zc(e), - exact: (e, t, o, n) => e, - }))(e); - return nt(t); - }, - range: Nc, - }, - Pc = (e, t, o) => { - const n = e.document.createRange(); - var s; - return ( - (s = n), - t.fold( - (e) => { - s.setStartBefore(e.dom); - }, - (e, t) => { - s.setStart(e.dom, t); - }, - (e) => { - s.setStartAfter(e.dom); - }, - ), - ((e, t) => { - t.fold( - (t) => { - e.setEndBefore(t.dom); - }, - (t, o) => { - e.setEnd(t.dom, o); - }, - (t) => { - e.setEndAfter(t.dom); - }, - ); - })(n, o), - n - ); - }, - Uc = (e, t, o, n, s) => { - const r = e.document.createRange(); - return r.setStart(t.dom, o), r.setEnd(n.dom, s), r; - }, - Wc = (e) => ({ - left: e.left, - top: e.top, - right: e.right, - bottom: e.bottom, - width: e.width, - height: e.height, - }), - jc = As([ - { ltr: ["start", "soffset", "finish", "foffset"] }, - { rtl: ["start", "soffset", "finish", "foffset"] }, - ]), - Gc = (e, t, o) => - t(Ve(o.startContainer), o.startOffset, Ve(o.endContainer), o.endOffset), - $c = (e, t) => - ((e, t) => { - const o = ((e, t) => - t.match({ - domRange: (e) => ({ ltr: x(e), rtl: A.none }), - relative: (t, o) => ({ - ltr: Qt(() => Pc(e, t, o)), - rtl: Qt(() => A.some(Pc(e, o, t))), - }), - exact: (t, o, n, s) => ({ - ltr: Qt(() => Uc(e, t, o, n, s)), - rtl: Qt(() => A.some(Uc(e, n, s, t, o))), - }), - }))(e, t); - return ((e, t) => { - const o = t.ltr(); - return o.collapsed - ? t - .rtl() - .filter((e) => !1 === e.collapsed) - .map((e) => - jc.rtl( - Ve(e.endContainer), - e.endOffset, - Ve(e.startContainer), - e.startOffset, - ), - ) - .getOrThunk(() => Gc(0, jc.ltr, o)) - : Gc(0, jc.ltr, o); - })(0, o); - })(e, t).match({ - ltr: (t, o, n, s) => { - const r = e.document.createRange(); - return r.setStart(t.dom, o), r.setEnd(n.dom, s), r; - }, - rtl: (t, o, n, s) => { - const r = e.document.createRange(); - return r.setStart(n.dom, s), r.setEnd(t.dom, o), r; - }, - }); - jc.ltr, jc.rtl; - const qc = (e, t, o) => - U( - ((e, t) => { - const o = p(t) ? t : T; - let n = e.dom; - const s = []; - for (; null !== n.parentNode && void 0 !== n.parentNode; ) { - const e = n.parentNode, - t = Ve(e); - if ((s.push(t), !0 === o(t))) break; - n = e; - } - return s; - })(e, o), - t, - ), - Xc = (e, t) => - ((e, t) => { - const o = void 0 === t ? document : t.dom; - return Je(o) ? [] : H(o.querySelectorAll(e), Ve); - })(t, e), - Yc = (e) => { - if (e.rangeCount > 0) { - const t = e.getRangeAt(0), - o = e.getRangeAt(e.rangeCount - 1); - return A.some( - Nc( - Ve(t.startContainer), - t.startOffset, - Ve(o.endContainer), - o.endOffset, - ), - ); - } - return A.none(); - }, - Kc = (e) => { - if (null === e.anchorNode || null === e.focusNode) return Yc(e); - { - const t = Ve(e.anchorNode), - o = Ve(e.focusNode); - return ((e, t, o, n) => { - const s = ((e, t, o, n) => { - const s = et(e).dom.createRange(); - return s.setStart(e.dom, t), s.setEnd(o.dom, n), s; - })(e, t, o, n), - r = Ze(e, o) && t === n; - return s.collapsed && !r; - })(t, e.anchorOffset, o, e.focusOffset) - ? A.some(Nc(t, e.anchorOffset, o, e.focusOffset)) - : Yc(e); - } - }, - Jc = (e, t) => - ((e) => { - const t = e.getClientRects(), - o = t.length > 0 ? t[0] : e.getBoundingClientRect(); - return o.width > 0 || o.height > 0 ? A.some(o).map(Wc) : A.none(); - })($c(e, t)), - Zc = ((e, t) => { - const o = (t) => (e(t) ? A.from(t.dom.nodeValue) : A.none()); - return { - get: (t) => { - if (!e(t)) throw new Error("Can only get text value of a text node"); - return o(t).getOr(""); - }, - getOption: o, - set: (t, o) => { - if (!e(t)) - throw new Error("Can only set raw text value of a text node"); - t.dom.nodeValue = o; - }, - }; - })($e), - Qc = (e, t) => ({ element: e, offset: t }), - ed = (e, t) => - $e(e) - ? Qc(e, t) - : ((e, t) => { - const o = it(e); - if (0 === o.length) return Qc(e, t); - if (t < o.length) return Qc(o[t], 0); - { - const e = o[o.length - 1], - t = $e(e) ? ((e) => Zc.get(e))(e).length : it(e).length; - return Qc(e, t); - } - })(e, t), - td = (e) => void 0 !== e.foffset, - od = (e, t) => - t.getSelection - .getOrThunk( - () => () => - ((e) => - ((e) => A.from(e.getSelection()))(e) - .filter((e) => e.rangeCount > 0) - .bind(Kc))(e), - )() - .map((e) => { - if (td(e)) { - const t = ed(e.start, e.soffset), - o = ed(e.finish, e.foffset); - return Lc.range(t.element, t.offset, o.element, o.offset); - } - return e; - }); - var nd = [ - us("getSelection"), - os("root"), - us("bubble"), - wc(), - ys("overrides", {}), - ys("showAbove", !1), - Ri("placement", (e, t, o) => { - const n = nt(t.root).dom, - s = Bc(e, 0, t), - r = od(n, t).bind((e) => { - if (td(e)) { - const t = ((e, t) => - ((e) => { - const t = e.getBoundingClientRect(); - return t.width > 0 || t.height > 0 - ? A.some(t).map(Wc) - : A.none(); - })($c(e, t)))(n, Lc.exactFromRange(e)).orThunk(() => { - const t = Ne("\ufeff"); - Ro(e.start, t); - const o = Jc(n, Lc.exact(t, 0, t, 1)); - return Po(t), o; - }); - return t.bind((e) => Fc(e.left, e.top, e.width, e.height)); - } - { - const t = ce(e, (e) => e.dom.getBoundingClientRect()), - o = { - left: Math.min(t.firstCell.left, t.lastCell.left), - right: Math.max(t.firstCell.right, t.lastCell.right), - top: Math.min(t.firstCell.top, t.lastCell.top), - bottom: Math.max(t.firstCell.bottom, t.lastCell.bottom), - }; - return Fc(o.left, o.top, o.right - o.left, o.bottom - o.top); - } - }), - a = od(n, t) - .bind((e) => - td(e) - ? Ge(e.start) - ? A.some(e.start) - : rt(e.start) - : A.some(e.firstCell), - ) - .getOr(e.element); - return Ic(r, s, t, o, a); - }), - ]; - const sd = "link-layout", - rd = (e) => e.x + e.width, - ad = (e, t) => e.x - t.width, - id = (e, t) => e.y - t.height + e.height, - ld = (e) => e.y, - cd = (e, t, o) => - zi( - rd(e), - ld(e), - o.southeast(), - Li(), - "southeast", - Ki(e, { left: 0, top: 2 }), - sd, - ), - dd = (e, t, o) => - zi( - ad(e, t), - ld(e), - o.southwest(), - Pi(), - "southwest", - Ki(e, { right: 1, top: 2 }), - sd, - ), - ud = (e, t, o) => - zi( - rd(e), - id(e, t), - o.northeast(), - Ui(), - "northeast", - Ki(e, { left: 0, bottom: 3 }), - sd, - ), - md = (e, t, o) => - zi( - ad(e, t), - id(e, t), - o.northwest(), - Wi(), - "northwest", - Ki(e, { right: 1, bottom: 3 }), - sd, - ), - gd = () => [cd, dd, ud, md], - pd = () => [dd, cd, md, ud]; - var hd = [ - os("item"), - wc(), - ys("overrides", {}), - Ri("placement", (e, t, o) => { - const n = Ul(o, t.item.element), - s = Sc(e.element, t, gd(), pd(), gd(), pd(), A.none()); - return A.some( - hc({ - anchorBox: n, - bubble: pc(), - overrides: t.overrides, - layouts: s, - }), - ); - }), - ], - fd = Jn("type", { - selection: nd, - node: Rc, - hotspot: kc, - submenu: hd, - makeshift: Cc, - }); - const bd = [ - ds("classes", Hn), - ks("mode", "all", ["all", "layout", "placement"]), - ], - vd = [ys("useFixed", T), us("getBounds")], - yd = [ns("anchor", fd), vs("transition", bd)], - xd = (e, t, o, n, s, r) => { - const a = Yn("placement.info", Dn(yd), s), - i = a.anchor, - l = n.element, - c = o.get(n.uid); - Nl(() => { - Dt(l, "position", "fixed"); - const s = Nt(l, "visibility"); - Dt(l, "visibility", "hidden"); - const d = t.useFixed() - ? (() => { - const e = document.documentElement; - return $l(0, 0, e.clientWidth, e.clientHeight); - })() - : ((e) => { - const t = Xt(e.element), - o = e.element.dom.getBoundingClientRect(); - return Gl(t.left, t.top, o.width, o.height); - })(e); - i.placement(e, i, d).each((e) => { - const s = r.orThunk(() => t.getBounds.map(_)), - i = ((e, t, o, n, s, r) => - ((e, t, o, n, s, r, a, i) => { - const l = dc(a, "maxHeightFunction", lc()), - c = dc(a, "maxWidthFunction", b), - d = e.anchorBox, - u = e.origin, - m = { - bounds: Wl(u, r), - origin: u, - preference: n, - maxHeightFunction: l, - maxWidthFunction: c, - lastPlacement: s, - transition: i, - }; - return uc(d, t, o, m); - })( - ((e, t) => ((e, t) => ({ anchorBox: e, origin: t }))(e, t))( - t.anchorBox, - e, - ), - n.element, - t.bubble, - t.layouts, - s, - o, - t.overrides, - r, - ))(d, e, s, n, c, a.transition); - o.set(n.uid, i); - }), - s.fold( - () => { - Ht(l, "visibility"); - }, - (e) => { - Dt(l, "visibility", e); - }, - ), - Nt(l, "left").isNone() && - Nt(l, "top").isNone() && - Nt(l, "right").isNone() && - Nt(l, "bottom").isNone() && - xe(Nt(l, "position"), "fixed") && - Ht(l, "position"); - }, l); - }; - var wd = Object.freeze({ - __proto__: null, - position: (e, t, o, n, s) => { - const r = A.none(); - xd(e, t, o, n, s, r); - }, - positionWithinBounds: xd, - getMode: (e, t, o) => (t.useFixed() ? "fixed" : "absolute"), - reset: (e, t, o, n) => { - const s = n.element; - L(["position", "left", "right", "top", "bottom"], (e) => Ht(s, e)), - ((e) => { - Et(e, ql); - })(s), - o.clear(n.uid); - }, - }); - const Sd = Ol({ - fields: vd, - name: "positioning", - active: Ml, - apis: wd, - state: Object.freeze({ - __proto__: null, - init: () => { - let e = {}; - return _a({ - readState: () => e, - clear: (t) => { - g(t) ? delete e[t] : (e = {}); - }, - set: (t, o) => { - e[t] = o; - }, - get: (t) => be(e, t), - }); - }, - }), - }), - kd = (e) => e.getSystem().isConnected(), - Cd = (e) => { - Fr(e, kr()); - const t = e.components(); - L(t, Cd); - }, - Od = (e) => { - const t = e.components(); - L(t, Od), Fr(e, Sr()); - }, - _d = (e, t) => { - e.getSystem().addToWorld(t), yt(e.element) && Od(t); - }, - Td = (e) => { - Cd(e), e.getSystem().removeFromWorld(e); - }, - Ed = (e, t) => { - zo(e.element, t.element); - }, - Ad = (e, t) => { - Md(e, t, zo); - }, - Md = (e, t, o) => { - e.getSystem().addToWorld(t), - o(e.element, t.element), - yt(e.element) && Od(t), - e.syncComponents(); - }, - Dd = (e) => { - Cd(e), Po(e.element), e.getSystem().removeFromWorld(e); - }, - Bd = (e) => { - const t = st(e.element).bind((t) => - e.getSystem().getByDom(t).toOptional(), - ); - Dd(e), - t.each((e) => { - e.syncComponents(); - }); - }, - Fd = (e) => { - const t = e.components(); - L(t, Dd), Lo(e.element), e.syncComponents(); - }, - Id = (e, t) => { - Nd(e, t, zo); - }, - Rd = (e, t) => { - Nd(e, t, No); - }, - Nd = (e, t, o) => { - o(e, t.element); - const n = it(t.element); - L(n, (e) => { - t.getByDom(e).each(Od); - }); - }, - Vd = (e) => { - const t = it(e.element); - L(t, (t) => { - e.getByDom(t).each(Cd); - }), - Po(e.element); - }, - zd = (e, t, o, n) => { - o.get().each((t) => { - Fd(e); - }); - const s = t.getAttachPoint(e); - Ad(s, e); - const r = e.getSystem().build(n); - return Ad(e, r), o.set(r), r; - }, - Hd = (e, t, o, n) => { - const s = zd(e, t, o, n); - return t.onOpen(e, s), s; - }, - Ld = (e, t, o) => { - o.get().each((n) => { - Fd(e), Bd(e), t.onClose(e, n), o.clear(); - }); - }, - Pd = (e, t, o) => o.isOpen(), - Ud = (e, t, o) => { - const n = t.getAttachPoint(e); - Dt(e.element, "position", Sd.getMode(n)), - ((e, t, o, n) => { - Nt(e.element, t).fold( - () => { - Et(e.element, o); - }, - (t) => { - kt(e.element, o, t); - }, - ), - Dt(e.element, t, "hidden"); - })(e, "visibility", t.cloakVisibilityAttr); - }, - Wd = (e, t, o) => { - ((e) => N(["top", "left", "right", "bottom"], (t) => Nt(e, t).isSome()))( - e.element, - ) || Ht(e.element, "position"), - ((e, t, o) => { - _t(e.element, o).fold( - () => Ht(e.element, t), - (o) => Dt(e.element, t, o), - ); - })(e, "visibility", t.cloakVisibilityAttr); - }; - var jd = Object.freeze({ - __proto__: null, - cloak: Ud, - decloak: Wd, - open: Hd, - openWhileCloaked: (e, t, o, n, s) => { - Ud(e, t), Hd(e, t, o, n), s(), Wd(e, t); - }, - close: Ld, - isOpen: Pd, - isPartOf: (e, t, o, n) => - Pd(0, 0, o) && o.get().exists((o) => t.isPartOf(e, o, n)), - getState: (e, t, o) => o.get(), - setContent: (e, t, o, n) => o.get().map(() => zd(e, t, o, n)), - }), - Gd = Object.freeze({ - __proto__: null, - events: (e, t) => - Hr([ - Ur(hr(), (o, n) => { - Ld(o, e, t); - }), - ]), - }), - $d = [ - Di("onOpen"), - Di("onClose"), - os("isPartOf"), - os("getAttachPoint"), - ys("cloakVisibilityAttr", "data-precloak-visibility"), - ], - qd = Object.freeze({ - __proto__: null, - init: () => { - const e = Ql(), - t = x("not-implemented"); - return _a({ - readState: t, - isOpen: e.isSet, - clear: e.clear, - set: e.set, - get: e.get, - }); - }, - }); - const Xd = Ol({ - fields: $d, - name: "sandboxing", - active: Gd, - apis: jd, - state: qd, - }), - Yd = x("dismiss.popups"), - Kd = x("reposition.popups"), - Jd = x("mouse.released"), - Zd = Mn([ - ys("isExtraPart", T), - vs("fireEventInstead", [ys("event", Cr())]), - ]), - Qd = (e) => { - const t = Yn("Dismissal", Zd, e); - return { - [Yd()]: { - schema: Mn([os("target")]), - onReceive: (e, o) => { - Xd.isOpen(e) && - (Xd.isPartOf(e, o.target) || - t.isExtraPart(e, o.target) || - t.fireEventInstead.fold( - () => Xd.close(e), - (t) => Fr(e, t.event), - )); - }, - }, - }; - }, - eu = Mn([vs("fireEventInstead", [ys("event", Or())]), is("doReposition")]), - tu = (e) => { - const t = Yn("Reposition", eu, e); - return { - [Kd()]: { - onReceive: (e) => { - Xd.isOpen(e) && - t.fireEventInstead.fold( - () => t.doReposition(e), - (t) => Fr(e, t.event), - ); - }, - }, - }; - }, - ou = (e, t, o) => { - t.store.manager.onLoad(e, t, o); - }, - nu = (e, t, o) => { - t.store.manager.onUnload(e, t, o); - }; - var su = Object.freeze({ - __proto__: null, - onLoad: ou, - onUnload: nu, - setValue: (e, t, o, n) => { - t.store.manager.setValue(e, t, o, n); - }, - getValue: (e, t, o) => t.store.manager.getValue(e, t, o), - getState: (e, t, o) => o, - }), - ru = Object.freeze({ - __proto__: null, - events: (e, t) => { - const o = e.resetOnDom - ? [ - Kr((o, n) => { - ou(o, e, t); - }), - Jr((o, n) => { - nu(o, e, t); - }), - ] - : [xl(e, t, ou)]; - return Hr(o); - }, - }); - const au = () => { - const e = Es(null); - return _a({ - set: e.set, - get: e.get, - isNotSet: () => null === e.get(), - clear: () => { - e.set(null); - }, - readState: () => ({ mode: "memory", value: e.get() }), - }); - }, - iu = () => { - const e = Es({}), - t = Es({}); - return _a({ - readState: () => ({ - mode: "dataset", - dataByValue: e.get(), - dataByText: t.get(), - }), - lookup: (o) => be(e.get(), o).orThunk(() => be(t.get(), o)), - update: (o) => { - const n = e.get(), - s = t.get(), - r = {}, - a = {}; - L(o, (e) => { - (r[e.value] = e), - be(e, "meta").each((t) => { - be(t, "text").each((t) => { - a[t] = e; - }); - }); - }), - e.set({ ...n, ...r }), - t.set({ ...s, ...a }); - }, - clear: () => { - e.set({}), t.set({}); - }, - }); - }; - var lu = Object.freeze({ - __proto__: null, - memory: au, - dataset: iu, - manual: () => _a({ readState: b }), - init: (e) => e.store.manager.state(e), - }); - const cu = (e, t, o, n) => { - const s = t.store; - o.update([n]), s.setValue(e, n), t.onSetValue(e, n); - }; - var du = [ - us("initialValue"), - os("getFallbackEntry"), - os("getDataKey"), - os("setValue"), - Ri("manager", { - setValue: cu, - getValue: (e, t, o) => { - const n = t.store, - s = n.getDataKey(e); - return o.lookup(s).getOrThunk(() => n.getFallbackEntry(s)); - }, - onLoad: (e, t, o) => { - t.store.initialValue.each((n) => { - cu(e, t, o, n); - }); - }, - onUnload: (e, t, o) => { - o.clear(); - }, - state: iu, - }), - ], - uu = [ - os("getValue"), - ys("setValue", b), - us("initialValue"), - Ri("manager", { - setValue: (e, t, o, n) => { - t.store.setValue(e, n), t.onSetValue(e, n); - }, - getValue: (e, t, o) => t.store.getValue(e), - onLoad: (e, t, o) => { - t.store.initialValue.each((o) => { - t.store.setValue(e, o); - }); - }, - onUnload: b, - state: Oa.init, - }), - ], - mu = [ - us("initialValue"), - Ri("manager", { - setValue: (e, t, o, n) => { - o.set(n), t.onSetValue(e, n); - }, - getValue: (e, t, o) => o.get(), - onLoad: (e, t, o) => { - t.store.initialValue.each((e) => { - o.isNotSet() && o.set(e); - }); - }, - onUnload: (e, t, o) => { - o.clear(); - }, - state: au, - }), - ], - gu = [ - xs( - "store", - { mode: "memory" }, - Jn("mode", { memory: mu, manual: uu, dataset: du }), - ), - Di("onSetValue"), - ys("resetOnDom", !1), - ]; - const pu = Ol({ - fields: gu, - name: "representing", - active: ru, - apis: su, - extra: { - setValueFrom: (e, t) => { - const o = pu.getValue(t); - pu.setValue(e, o); - }, - }, - state: lu, - }), - hu = (e, t) => - Ts( - e, - {}, - H(t, (t) => { - return ( - (o = t.name()), - (n = "Cannot configure " + t.name() + " for " + e), - Qn( - o, - o, - { tag: "option", process: {} }, - Cn((e) => un("The field: " + o + " is forbidden. " + n)), - ) - ); - var o, n; - }).concat([es("dump", w)]), - ), - fu = (e) => e.dump, - bu = (e, t) => ({ ...kl(t), ...e.dump }), - vu = hu, - yu = bu, - xu = "placeholder", - wu = As([ - { single: ["required", "valueThunk"] }, - { multiple: ["required", "valueThunks"] }, - ]), - Su = (e) => ve(e, "uiType"), - ku = (e, t, o, n) => - ((e, t, o, n) => - Su(o) && o.uiType === xu - ? ((e, t, o, n) => - e.exists((e) => e !== o.owner) - ? wu.single(!0, x(o)) - : be(n, o.name).fold( - () => { - throw new Error( - "Unknown placeholder component: " + - o.name + - "\nKnown: [" + - ae(n) + - "]\nNamespace: " + - e.getOr("none") + - "\nSpec: " + - JSON.stringify(o, null, 2), - ); - }, - (e) => e.replace(), - ))(e, 0, o, n) - : wu.single(!1, x(o)))(e, 0, o, n).fold( - (s, r) => { - const a = Su(o) ? r(t, o.config, o.validated) : r(t), - i = be(a, "components").getOr([]), - l = X(i, (o) => ku(e, t, o, n)); - return [{ ...a, components: l }]; - }, - (e, n) => { - if (Su(o)) { - const e = n(t, o.config, o.validated); - return o.validated.preprocess.getOr(w)(e); - } - return n(t); - }, - ), - Cu = wu.single, - Ou = wu.multiple, - _u = x(xu), - Tu = As([ - { required: ["data"] }, - { external: ["data"] }, - { optional: ["data"] }, - { group: ["data"] }, - ]), - Eu = ys("factory", { sketch: w }), - Au = ys("schema", []), - Mu = os("name"), - Du = Qn( - "pname", - "pname", - vn((e) => ""), - Nn(), - ), - Bu = es("schema", () => [us("preprocess")]), - Fu = ys("defaults", x({})), - Iu = ys("overrides", x({})), - Ru = Dn([Eu, Au, Mu, Du, Fu, Iu]), - Nu = Dn([Eu, Au, Mu, Fu, Iu]), - Vu = Dn([Eu, Au, Mu, Du, Fu, Iu]), - zu = Dn([Eu, Bu, Mu, os("unit"), Du, Fu, Iu]), - Hu = (e) => e.fold(A.some, A.none, A.some, A.some), - Lu = (e) => { - const t = (e) => e.name; - return e.fold(t, t, t, t); - }, - Pu = (e, t) => (o) => { - const n = Yn("Converting part type", t, o); - return e(n); - }, - Uu = Pu(Tu.required, Ru), - Wu = Pu(Tu.external, Nu), - ju = Pu(Tu.optional, Vu), - Gu = Pu(Tu.group, zu), - $u = x("entirety"); - var qu = Object.freeze({ - __proto__: null, - required: Uu, - external: Wu, - optional: ju, - group: Gu, - asNamedPart: Hu, - name: Lu, - asCommon: (e) => e.fold(w, w, w, w), - original: $u, - }); - const Xu = (e, t, o, n) => - fn( - t.defaults(e, o, n), - o, - { uid: e.partUids[t.name] }, - t.overrides(e, o, n), - ), - Yu = (e, t) => { - const o = {}; - return ( - L(t, (t) => { - Hu(t).each((t) => { - const n = Ku(e, t.pname); - o[t.name] = (o) => { - const s = Yn("Part: " + t.name + " in " + e, Dn(t.schema), o); - return { ...n, config: o, validated: s }; - }; - }); - }), - o - ); - }, - Ku = (e, t) => ({ uiType: _u(), owner: e, name: t }), - Ju = (e, t, o) => ({ - uiType: _u(), - owner: e, - name: t, - config: o, - validated: {}, - }), - Zu = (e) => - X(e, (e) => - e - .fold(A.none, A.some, A.none, A.none) - .map((e) => ls(e.name, e.schema.concat([Ni($u())]))) - .toArray(), - ), - Qu = (e) => H(e, Lu), - em = (e, t, o) => - ((e, t, o) => { - const n = {}, - s = {}; - return ( - L(o, (e) => { - e.fold( - (e) => { - n[e.pname] = Cu(!0, (t, o, n) => - e.factory.sketch(Xu(t, e, o, n)), - ); - }, - (e) => { - const o = t.parts[e.name]; - s[e.name] = x(e.factory.sketch(Xu(t, e, o[$u()]), o)); - }, - (e) => { - n[e.pname] = Cu(!1, (t, o, n) => - e.factory.sketch(Xu(t, e, o, n)), - ); - }, - (e) => { - n[e.pname] = Ou(!0, (t, o, n) => { - const s = t[e.name]; - return H(s, (o) => - e.factory.sketch( - fn(e.defaults(t, o, n), o, e.overrides(t, o)), - ), - ); - }); - }, - ); - }), - { internals: x(n), externals: x(s) } - ); - })(0, t, o), - tm = (e, t, o) => - ((e, t, o, n) => { - const s = ce(n, (e, t) => - ((e, t) => { - let o = !1; - return { - name: x(e), - required: () => - t.fold( - (e, t) => e, - (e, t) => e, - ), - used: () => o, - replace: () => { - if (o) - throw new Error( - "Trying to use the same placeholder more than once: " + e, - ); - return (o = !0), t; - }, - }; - })(t, e), - ), - r = ((e, t, o, n) => X(o, (o) => ku(e, t, o, n)))(e, t, o, s); - return ( - le(s, (o) => { - if (!1 === o.used() && o.required()) - throw new Error( - "Placeholder: " + - o.name() + - " was not found in components list\nNamespace: " + - e.getOr("none") + - "\nComponents: " + - JSON.stringify(t.components, null, 2), - ); - }), - r - ); - })(A.some(e), t, t.components, o), - om = (e, t, o) => { - const n = t.partUids[o]; - return e.getSystem().getByUid(n).toOptional(); - }, - nm = (e, t, o) => om(e, t, o).getOrDie("Could not find part: " + o), - sm = (e, t, o) => { - const n = {}, - s = t.partUids, - r = e.getSystem(); - return ( - L(o, (e) => { - n[e] = x(r.getByUid(s[e])); - }), - n - ); - }, - rm = (e, t) => { - const o = e.getSystem(); - return ce(t.partUids, (e, t) => x(o.getByUid(e))); - }, - am = (e) => ae(e.partUids), - im = (e, t, o) => { - const n = {}, - s = t.partUids, - r = e.getSystem(); - return ( - L(o, (e) => { - n[e] = x(r.getByUid(s[e]).getOrDie()); - }), - n - ); - }, - lm = (e, t) => { - const o = Qu(t); - return Ds(H(o, (t) => ({ key: t, value: e + "-" + t }))); - }, - cm = (e) => - Qn( - "partUids", - "partUids", - xn((t) => lm(t.uid, e)), - Nn(), - ); - var dm = Object.freeze({ - __proto__: null, - generate: Yu, - generateOne: Ju, - schemas: Zu, - names: Qu, - substitutes: em, - components: tm, - defaultUids: lm, - defaultUidsSchema: cm, - getAllParts: rm, - getAllPartNames: am, - getPart: om, - getPartOrDie: nm, - getParts: sm, - getPartsOrDie: im, - }); - const um = (e, t, o, n, s) => { - const r = ((e, t) => - (e.length > 0 ? [ls("parts", e)] : []) - .concat([ - os("uid"), - ys("dom", {}), - ys("components", []), - Ni("originalSpec"), - ys("debug.sketcher", {}), - ]) - .concat(t))(n, s); - return Yn(e + " [SpecSchema]", Mn(r.concat(t)), o); - }, - mm = (e, t, o, n, s) => { - const r = gm(s), - a = Zu(o), - i = cm(o), - l = um(e, t, r, a, [i]), - c = em(0, l, o); - return n(l, tm(e, l, c.internals()), r, c.externals()); - }, - gm = (e) => (((e) => ve(e, "uid"))(e) ? e : { ...e, uid: ha("uid") }), - pm = Mn([ - os("name"), - os("factory"), - os("configFields"), - ys("apis", {}), - ys("extraApis", {}), - ]), - hm = Mn([ - os("name"), - os("factory"), - os("configFields"), - os("partFields"), - ys("apis", {}), - ys("extraApis", {}), - ]), - fm = (e) => { - const t = Yn("Sketcher for " + e.name, pm, e), - o = ce(t.apis, Ca), - n = ce(t.extraApis, (e, t) => xa(e, t)); - return { - name: t.name, - configFields: t.configFields, - sketch: (e) => - ((e, t, o, n) => { - const s = gm(n); - return o(um(e, t, s, [], []), s); - })(t.name, t.configFields, t.factory, e), - ...o, - ...n, - }; - }, - bm = (e) => { - const t = Yn("Sketcher for " + e.name, hm, e), - o = Yu(t.name, t.partFields), - n = ce(t.apis, Ca), - s = ce(t.extraApis, (e, t) => xa(e, t)); - return { - name: t.name, - partFields: t.partFields, - configFields: t.configFields, - sketch: (e) => mm(t.name, t.configFields, t.partFields, t.factory, e), - parts: o, - ...n, - ...s, - }; - }, - vm = (e) => - (Ye("input")(e) && "radio" !== Ot(e, "type")) || Ye("textarea")(e); - var ym = Object.freeze({ - __proto__: null, - getCurrent: (e, t, o) => t.find(e), - }); - const xm = [os("find")], - wm = Ol({ fields: xm, name: "composing", apis: ym }), - Sm = ["input", "button", "textarea", "select"], - km = (e, t, o) => { - (t.disabled() ? Am : Mm)(e, t); - }, - Cm = (e, t) => !0 === t.useNative && R(Sm, Ue(e.element)), - Om = (e) => { - kt(e.element, "disabled", "disabled"); - }, - _m = (e) => { - Et(e.element, "disabled"); - }, - Tm = (e) => { - kt(e.element, "aria-disabled", "true"); - }, - Em = (e) => { - kt(e.element, "aria-disabled", "false"); - }, - Am = (e, t, o) => { - t.disableClass.each((t) => { - La(e.element, t); - }), - (Cm(e, t) ? Om : Tm)(e), - t.onDisabled(e); - }, - Mm = (e, t, o) => { - t.disableClass.each((t) => { - Pa(e.element, t); - }), - (Cm(e, t) ? _m : Em)(e), - t.onEnabled(e); - }, - Dm = (e, t) => - Cm(e, t) - ? ((e) => Tt(e.element, "disabled"))(e) - : ((e) => "true" === Ot(e.element, "aria-disabled"))(e); - var Bm = Object.freeze({ - __proto__: null, - enable: Mm, - disable: Am, - isDisabled: Dm, - onLoad: km, - set: (e, t, o, n) => { - (n ? Am : Mm)(e, t); - }, - }), - Fm = Object.freeze({ - __proto__: null, - exhibit: (e, t) => - Ea({ classes: t.disabled() ? t.disableClass.toArray() : [] }), - events: (e, t) => Hr([Lr(ur(), (t, o) => Dm(t, e)), xl(e, t, km)]), - }), - Im = [ - Os("disabled", T), - ys("useNative", !0), - us("disableClass"), - Di("onDisabled"), - Di("onEnabled"), - ]; - const Rm = Ol({ fields: Im, name: "disabling", active: Fm, apis: Bm }), - Nm = (e, t, o, n) => { - const s = Xc(e.element, "." + t.highlightClass); - L(s, (o) => { - N(n, (e) => Ze(e.element, o)) || - (Pa(o, t.highlightClass), - e - .getSystem() - .getByDom(o) - .each((o) => { - t.onDehighlight(e, o), Fr(o, Br()); - })); - }); - }, - Vm = (e, t, o, n) => { - Nm(e, t, 0, [n]), - zm(e, t, o, n) || - (La(n.element, t.highlightClass), t.onHighlight(e, n), Fr(n, Dr())); - }, - zm = (e, t, o, n) => Ua(n.element, t.highlightClass), - Hm = (e, t, o) => - pi(e.element, "." + t.itemClass).bind((t) => - e.getSystem().getByDom(t).toOptional(), - ), - Lm = (e, t, o) => { - const n = Xc(e.element, "." + t.itemClass); - return (n.length > 0 ? A.some(n[n.length - 1]) : A.none()).bind((t) => - e.getSystem().getByDom(t).toOptional(), - ); - }, - Pm = (e, t, o, n) => { - const s = Xc(e.element, "." + t.itemClass); - return $(s, (e) => Ua(e, t.highlightClass)).bind((t) => { - const o = Xi(t, n, 0, s.length - 1); - return e.getSystem().getByDom(s[o]).toOptional(); - }); - }, - Um = (e, t, o) => { - const n = Xc(e.element, "." + t.itemClass); - return we(H(n, (t) => e.getSystem().getByDom(t).toOptional())); - }; - var Wm = Object.freeze({ - __proto__: null, - dehighlightAll: (e, t, o) => Nm(e, t, 0, []), - dehighlight: (e, t, o, n) => { - zm(e, t, o, n) && - (Pa(n.element, t.highlightClass), t.onDehighlight(e, n), Fr(n, Br())); - }, - highlight: Vm, - highlightFirst: (e, t, o) => { - Hm(e, t).each((n) => { - Vm(e, t, o, n); - }); - }, - highlightLast: (e, t, o) => { - Lm(e, t).each((n) => { - Vm(e, t, o, n); - }); - }, - highlightAt: (e, t, o, n) => { - ((e, t, o, n) => { - const s = Xc(e.element, "." + t.itemClass); - return A.from(s[n]).fold( - () => sn.error(new Error("No element found with index " + n)), - e.getSystem().getByDom, - ); - })(e, t, 0, n).fold( - (e) => { - throw e; - }, - (n) => { - Vm(e, t, o, n); - }, - ); - }, - highlightBy: (e, t, o, n) => { - const s = Um(e, t); - G(s, n).each((n) => { - Vm(e, t, o, n); - }); - }, - isHighlighted: zm, - getHighlighted: (e, t, o) => - pi(e.element, "." + t.highlightClass).bind((t) => - e.getSystem().getByDom(t).toOptional(), - ), - getFirst: Hm, - getLast: Lm, - getPrevious: (e, t, o) => Pm(e, t, 0, -1), - getNext: (e, t, o) => Pm(e, t, 0, 1), - getCandidates: Um, - }), - jm = [ - os("highlightClass"), - os("itemClass"), - Di("onHighlight"), - Di("onDehighlight"), - ]; - const Gm = Ol({ fields: jm, name: "highlighting", apis: Wm }), - $m = [8], - qm = [9], - Xm = [13], - Ym = [27], - Km = [32], - Jm = [37], - Zm = [38], - Qm = [39], - eg = [40], - tg = (e, t, o) => { - const n = K(e.slice(0, t)), - s = K(e.slice(t + 1)); - return G(n.concat(s), o); - }, - og = (e, t, o) => { - const n = K(e.slice(0, t)); - return G(n, o); - }, - ng = (e, t, o) => { - const n = e.slice(0, t), - s = e.slice(t + 1); - return G(s.concat(n), o); - }, - sg = (e, t, o) => { - const n = e.slice(t + 1); - return G(n, o); - }, - rg = (e) => (t) => { - const o = t.raw; - return R(e, o.which); - }, - ag = (e) => (t) => Y(e, (e) => e(t)), - ig = (e) => !0 === e.raw.shiftKey, - lg = (e) => !0 === e.raw.ctrlKey, - cg = C(ig), - dg = (e, t) => ({ matches: e, classification: t }), - ug = (e, t, o) => { - t.exists((e) => o.exists((t) => Ze(t, e))) || - Ir(e, _r(), { prevFocus: t, newFocus: o }); - }, - mg = () => { - const e = (e) => Rl(e.element); - return { - get: e, - set: (t, o) => { - const n = e(t); - t.getSystem().triggerFocus(o, t.element); - const s = e(t); - ug(t, n, s); - }, - }; - }, - gg = () => { - const e = (e) => Gm.getHighlighted(e).map((e) => e.element); - return { - get: e, - set: (t, o) => { - const n = e(t); - t.getSystem() - .getByDom(o) - .fold(b, (e) => { - Gm.highlight(t, e); - }); - const s = e(t); - ug(t, n, s); - }, - }; - }; - var pg; - !(function (e) { - (e.OnFocusMode = "onFocus"), - (e.OnEnterOrSpaceMode = "onEnterOrSpace"), - (e.OnApiMode = "onApi"); - })(pg || (pg = {})); - const hg = (e, t, o, n, s) => { - const r = (e, t, o, n, s) => { - return ((r = o(e, t, n, s)), - (a = t.event), - G(r, (e) => e.matches(a)).map((e) => e.classification)).bind((o) => - o(e, t, n, s), - ); - var r, a; - }, - a = { - schema: () => - e.concat([ - ys("focusManager", mg()), - xs( - "focusInside", - "onFocus", - Gn((e) => - R(["onFocus", "onEnterOrSpace", "onApi"], e) - ? sn.value(e) - : sn.error("Invalid value for focusInside"), - ), - ), - Ri("handler", a), - Ri("state", t), - Ri("sendFocusIn", s), - ]), - processKey: r, - toEvents: (e, t) => { - const a = - e.focusInside !== pg.OnFocusMode - ? A.none() - : s(e).map((o) => - Ur(ir(), (n, s) => { - o(n, e, t), s.stop(); - }), - ), - i = [ - Ur(Ks(), (n, a) => { - r(n, a, o, e, t).fold( - () => { - ((o, n) => { - const r = rg(Km.concat(Xm))(n.event); - e.focusInside === pg.OnEnterOrSpaceMode && - r && - Rs(o, n) && - s(e).each((s) => { - s(o, e, t), n.stop(); - }); - })(n, a); - }, - (e) => { - a.stop(); - }, - ); - }), - Ur(Js(), (o, s) => { - r(o, s, n, e, t).each((e) => { - s.stop(); - }); - }), - ]; - return Hr(a.toArray().concat(i)); - }, - }; - return a; - }, - fg = (e) => { - const t = [ - us("onEscape"), - us("onEnter"), - ys("selector", '[data-alloy-tabstop="true"]:not(:disabled)'), - ys("firstTabstop", 0), - ys("useTabstopAt", E), - us("visibilitySelector"), - ].concat([e]), - o = (e, t) => { - const o = e.visibilitySelector.bind((e) => hi(t, e)).getOr(t); - return Wt(o) > 0; - }, - n = (e, t) => t.focusManager.get(e).bind((e) => hi(e, t.selector)), - s = (e, t, n) => { - ((e, t) => { - const n = Xc(e.element, t.selector), - s = U(n, (e) => o(t, e)); - return A.from(s[t.firstTabstop]); - })(e, t).each((o) => { - t.focusManager.set(e, o); - }); - }, - r = (e, t, s, r) => { - const a = Xc(e.element, s.selector); - return n(e, s).bind((t) => - $(a, k(Ze, t)).bind((t) => - ((e, t, n, s, r) => - r(t, n, (e) => - ((e, t) => o(e, t) && e.useTabstopAt(t))(s, e), - ).fold( - () => (s.cyclic ? A.some(!0) : A.none()), - (t) => (s.focusManager.set(e, t), A.some(!0)), - ))(e, a, t, s, r), - ), - ); - }, - a = (e, t, o) => { - const n = o.cyclic ? tg : og; - return r(e, 0, o, n); - }, - i = (e, t, o) => { - const n = o.cyclic ? ng : sg; - return r(e, 0, o, n); - }, - l = x([ - dg(ag([ig, rg(qm)]), a), - dg(rg(qm), i), - dg(ag([cg, rg(Xm)]), (e, t, o) => o.onEnter.bind((o) => o(e, t))), - ]), - c = x([ - dg(rg(Ym), (e, t, o) => o.onEscape.bind((o) => o(e, t))), - dg(rg(qm), (e, t, o) => - n(e, o) - .filter((e) => !o.useTabstopAt(e)) - .bind((n) => - (((e) => - ((e) => st(e))(e) - .bind(ct) - .exists((t) => Ze(t, e)))(n) - ? a - : i)(e, t, o), - ), - ), - ]); - return hg(t, Oa.init, l, c, () => A.some(s)); - }; - var bg = fg(es("cyclic", T)), - vg = fg(es("cyclic", E)); - const yg = (e, t, o) => - vm(o) && rg(Km)(t.event) - ? A.none() - : ((e, t, o) => (Nr(e, o, ur()), A.some(!0)))(e, 0, o), - xg = (e, t) => A.some(!0), - wg = [ - ys("execute", yg), - ys("useSpace", !1), - ys("useEnter", !0), - ys("useControlEnter", !1), - ys("useDown", !1), - ], - Sg = (e, t, o) => o.execute(e, t, e.element); - var kg = hg( - wg, - Oa.init, - (e, t, o, n) => { - const s = o.useSpace && !vm(e.element) ? Km : [], - r = o.useEnter ? Xm : [], - a = o.useDown ? eg : [], - i = s.concat(r).concat(a); - return [dg(rg(i), Sg)].concat( - o.useControlEnter ? [dg(ag([lg, rg(Xm)]), Sg)] : [], - ); - }, - (e, t, o, n) => (o.useSpace && !vm(e.element) ? [dg(rg(Km), xg)] : []), - () => A.none(), - ); - const Cg = () => { - const e = Ql(); - return _a({ - readState: () => - e - .get() - .map((e) => ({ - numRows: String(e.numRows), - numColumns: String(e.numColumns), - })) - .getOr({ numRows: "?", numColumns: "?" }), - setGridSize: (t, o) => { - e.set({ numRows: t, numColumns: o }); - }, - getNumRows: () => e.get().map((e) => e.numRows), - getNumColumns: () => e.get().map((e) => e.numColumns), - }); - }; - var Og = Object.freeze({ - __proto__: null, - flatgrid: Cg, - init: (e) => e.state(e), - }); - const _g = (e) => (t, o, n, s) => { - const r = e(t.element); - return Mg(r, t, o, n, s); - }, - Tg = (e, t) => { - const o = fc(e, t); - return _g(o); - }, - Eg = (e, t) => { - const o = fc(t, e); - return _g(o); - }, - Ag = (e) => (t, o, n, s) => Mg(e, t, o, n, s), - Mg = (e, t, o, n, s) => - n.focusManager - .get(t) - .bind((o) => e(t.element, o, n, s)) - .map((e) => (n.focusManager.set(t, e), !0)), - Dg = Ag, - Bg = Ag, - Fg = Ag, - Ig = (e) => !((e) => e.offsetWidth <= 0 && e.offsetHeight <= 0)(e.dom), - Rg = (e, t, o) => { - const n = Xc(e, o); - return ((e, o) => - $(e, (e) => Ze(e, t)).map((t) => ({ index: t, candidates: e })))( - U(n, Ig), - ); - }, - Ng = (e, t) => $(e, (e) => Ze(t, e)), - Vg = (e, t, o, n) => - n(Math.floor(t / o), t % o).bind((t) => { - const n = t.row * o + t.column; - return n >= 0 && n < e.length ? A.some(e[n]) : A.none(); - }), - zg = (e, t, o, n, s) => - Vg(e, t, n, (t, r) => { - const a = t === o - 1 ? e.length - t * n : n, - i = Xi(r, s, 0, a - 1); - return A.some({ row: t, column: i }); - }), - Hg = (e, t, o, n, s) => - Vg(e, t, n, (t, r) => { - const a = Xi(t, s, 0, o - 1), - i = a === o - 1 ? e.length - a * n : n, - l = Yi(r, 0, i - 1); - return A.some({ row: a, column: l }); - }), - Lg = [ - os("selector"), - ys("execute", yg), - Bi("onEscape"), - ys("captureTab", !1), - Vi(), - ], - Pg = (e, t, o) => { - pi(e.element, t.selector).each((o) => { - t.focusManager.set(e, o); - }); - }, - Ug = (e) => (t, o, n, s) => - Rg(t, o, n.selector).bind((t) => - e( - t.candidates, - t.index, - s.getNumRows().getOr(n.initSize.numRows), - s.getNumColumns().getOr(n.initSize.numColumns), - ), - ), - Wg = (e, t, o) => (o.captureTab ? A.some(!0) : A.none()), - jg = Ug((e, t, o, n) => zg(e, t, o, n, -1)), - Gg = Ug((e, t, o, n) => zg(e, t, o, n, 1)), - $g = Ug((e, t, o, n) => Hg(e, t, o, n, -1)), - qg = Ug((e, t, o, n) => Hg(e, t, o, n, 1)), - Xg = x([ - dg(rg(Jm), Tg(jg, Gg)), - dg(rg(Qm), Eg(jg, Gg)), - dg(rg(Zm), Dg($g)), - dg(rg(eg), Bg(qg)), - dg(ag([ig, rg(qm)]), Wg), - dg(ag([cg, rg(qm)]), Wg), - dg(rg(Km.concat(Xm)), (e, t, o, n) => - ((e, t) => t.focusManager.get(e).bind((e) => hi(e, t.selector)))( - e, - o, - ).bind((n) => o.execute(e, t, n)), - ), - ]), - Yg = x([dg(rg(Ym), (e, t, o) => o.onEscape(e, t)), dg(rg(Km), xg)]); - var Kg = hg(Lg, Cg, Xg, Yg, () => A.some(Pg)); - const Jg = (e, t, o, n, s) => { - const r = (e, t, o) => - s(e, t, n, 0, o.length - 1, o[t], (t) => { - return ( - (n = o[t]), - "button" === Ue(n) && "disabled" === Ot(n, "disabled") - ? r(e, t, o) - : A.from(o[t]) - ); - var n; - }); - return Rg(e, o, t).bind((e) => { - const t = e.index, - o = e.candidates; - return r(t, t, o); - }); - }, - Zg = (e, t, o, n) => - Jg(e, t, o, n, (e, t, o, n, s, r, a) => { - const i = Yi(t + o, n, s); - return i === e ? A.from(r) : a(i); - }), - Qg = (e, t, o, n) => - Jg(e, t, o, n, (e, t, o, n, s, r, a) => { - const i = Xi(t, o, n, s); - return i === e ? A.none() : a(i); - }), - ep = [ - os("selector"), - ys("getInitial", A.none), - ys("execute", yg), - Bi("onEscape"), - ys("executeOnMove", !1), - ys("allowVertical", !0), - ys("allowHorizontal", !0), - ys("cycles", !0), - ], - tp = (e, t, o) => - ((e, t) => t.focusManager.get(e).bind((e) => hi(e, t.selector)))( - e, - o, - ).bind((n) => o.execute(e, t, n)), - op = (e, t, o) => { - t.getInitial(e) - .orThunk(() => pi(e.element, t.selector)) - .each((o) => { - t.focusManager.set(e, o); - }); - }, - np = (e, t, o) => (o.cycles ? Qg : Zg)(e, o.selector, t, -1), - sp = (e, t, o) => (o.cycles ? Qg : Zg)(e, o.selector, t, 1), - rp = (e) => (t, o, n, s) => - e(t, o, n, s).bind(() => (n.executeOnMove ? tp(t, o, n) : A.some(!0))), - ap = x([dg(rg(Km), xg), dg(rg(Ym), (e, t, o) => o.onEscape(e, t))]); - var ip = hg( - ep, - Oa.init, - (e, t, o, n) => { - const s = [...(o.allowHorizontal ? Jm : [])].concat( - o.allowVertical ? Zm : [], - ), - r = [...(o.allowHorizontal ? Qm : [])].concat( - o.allowVertical ? eg : [], - ); - return [ - dg(rg(s), rp(Tg(np, sp))), - dg(rg(r), rp(Eg(np, sp))), - dg(rg(Xm), tp), - dg(rg(Km), tp), - ]; - }, - ap, - () => A.some(op), - ); - const lp = (e, t, o) => - A.from(e[t]).bind((e) => - A.from(e[o]).map((e) => ({ rowIndex: t, columnIndex: o, cell: e })), - ), - cp = (e, t, o, n) => { - const s = e[t].length, - r = Xi(o, n, 0, s - 1); - return lp(e, t, r); - }, - dp = (e, t, o, n) => { - const s = Xi(o, n, 0, e.length - 1), - r = e[s].length, - a = Yi(t, 0, r - 1); - return lp(e, s, a); - }, - up = (e, t, o, n) => { - const s = e[t].length, - r = Yi(o + n, 0, s - 1); - return lp(e, t, r); - }, - mp = (e, t, o, n) => { - const s = Yi(o + n, 0, e.length - 1), - r = e[s].length, - a = Yi(t, 0, r - 1); - return lp(e, s, a); - }, - gp = [ - ls("selectors", [os("row"), os("cell")]), - ys("cycles", !0), - ys("previousSelector", A.none), - ys("execute", yg), - ], - pp = (e, t, o) => { - t.previousSelector(e) - .orThunk(() => { - const o = t.selectors; - return pi(e.element, o.cell); - }) - .each((o) => { - t.focusManager.set(e, o); - }); - }, - hp = (e, t) => (o, n, s) => { - const r = s.cycles ? e : t; - return hi(n, s.selectors.row).bind((e) => { - const t = Xc(e, s.selectors.cell); - return Ng(t, n).bind((t) => { - const n = Xc(o, s.selectors.row); - return Ng(n, e).bind((e) => { - const o = ((e, t) => H(e, (e) => Xc(e, t.selectors.cell)))(n, s); - return r(o, e, t).map((e) => e.cell); - }); - }); - }); - }, - fp = hp( - (e, t, o) => cp(e, t, o, -1), - (e, t, o) => up(e, t, o, -1), - ), - bp = hp( - (e, t, o) => cp(e, t, o, 1), - (e, t, o) => up(e, t, o, 1), - ), - vp = hp( - (e, t, o) => dp(e, o, t, -1), - (e, t, o) => mp(e, o, t, -1), - ), - yp = hp( - (e, t, o) => dp(e, o, t, 1), - (e, t, o) => mp(e, o, t, 1), - ), - xp = x([ - dg(rg(Jm), Tg(fp, bp)), - dg(rg(Qm), Eg(fp, bp)), - dg(rg(Zm), Dg(vp)), - dg(rg(eg), Bg(yp)), - dg(rg(Km.concat(Xm)), (e, t, o) => - Rl(e.element).bind((n) => o.execute(e, t, n)), - ), - ]), - wp = x([dg(rg(Km), xg)]); - var Sp = hg(gp, Oa.init, xp, wp, () => A.some(pp)); - const kp = [os("selector"), ys("execute", yg), ys("moveOnTab", !1)], - Cp = (e, t, o) => o.focusManager.get(e).bind((n) => o.execute(e, t, n)), - Op = (e, t, o) => { - pi(e.element, t.selector).each((o) => { - t.focusManager.set(e, o); - }); - }, - _p = (e, t, o) => Qg(e, o.selector, t, -1), - Tp = (e, t, o) => Qg(e, o.selector, t, 1), - Ep = x([ - dg(rg(Zm), Fg(_p)), - dg(rg(eg), Fg(Tp)), - dg(ag([ig, rg(qm)]), (e, t, o, n) => - o.moveOnTab ? Fg(_p)(e, t, o, n) : A.none(), - ), - dg(ag([cg, rg(qm)]), (e, t, o, n) => - o.moveOnTab ? Fg(Tp)(e, t, o, n) : A.none(), - ), - dg(rg(Xm), Cp), - dg(rg(Km), Cp), - ]), - Ap = x([dg(rg(Km), xg)]); - var Mp = hg(kp, Oa.init, Ep, Ap, () => A.some(Op)); - const Dp = [ - Bi("onSpace"), - Bi("onEnter"), - Bi("onShiftEnter"), - Bi("onLeft"), - Bi("onRight"), - Bi("onTab"), - Bi("onShiftTab"), - Bi("onUp"), - Bi("onDown"), - Bi("onEscape"), - ys("stopSpaceKeyup", !1), - us("focusIn"), - ]; - var Bp = hg( - Dp, - Oa.init, - (e, t, o) => [ - dg(rg(Km), o.onSpace), - dg(ag([cg, rg(Xm)]), o.onEnter), - dg(ag([ig, rg(Xm)]), o.onShiftEnter), - dg(ag([ig, rg(qm)]), o.onShiftTab), - dg(ag([cg, rg(qm)]), o.onTab), - dg(rg(Zm), o.onUp), - dg(rg(eg), o.onDown), - dg(rg(Jm), o.onLeft), - dg(rg(Qm), o.onRight), - dg(rg(Km), o.onSpace), - ], - (e, t, o) => [ - ...(o.stopSpaceKeyup ? [dg(rg(Km), xg)] : []), - dg(rg(Ym), o.onEscape), - ], - (e) => e.focusIn, - ); - const Fp = bg.schema(), - Ip = vg.schema(), - Rp = ip.schema(), - Np = Kg.schema(), - Vp = Sp.schema(), - zp = kg.schema(), - Hp = Mp.schema(), - Lp = Bp.schema(), - Pp = Tl({ - branchKey: "mode", - branches: Object.freeze({ - __proto__: null, - acyclic: Fp, - cyclic: Ip, - flow: Rp, - flatgrid: Np, - matrix: Vp, - execution: zp, - menu: Hp, - special: Lp, - }), - name: "keying", - active: { events: (e, t) => e.handler.toEvents(e, t) }, - apis: { - focusIn: (e, t, o) => { - t.sendFocusIn(t).fold( - () => { - e.getSystem().triggerFocus(e.element, e.element); - }, - (n) => { - n(e, t, o); - }, - ); - }, - setGridSize: (e, t, o, n, s) => { - ((e) => ye(e, "setGridSize"))(o) - ? o.setGridSize(n, s) - : console.error("Layout does not support setGridSize"); - }, - }, - state: Og, - }), - Up = (e, t) => { - Nl(() => { - ((e, t, o) => { - const n = e.components(); - ((e) => { - L(e.components(), (e) => Po(e.element)), - Lo(e.element), - e.syncComponents(); - })(e); - const s = o(t), - r = J(n, s); - L(r, (t) => { - Cd(t), e.getSystem().removeFromWorld(t); - }), - L(s, (t) => { - kd(t) - ? Ed(e, t) - : (e.getSystem().addToWorld(t), - Ed(e, t), - yt(e.element) && Od(t)); - }), - e.syncComponents(); - })(e, t, () => H(t, e.getSystem().build)); - }, e.element); - }, - Wp = (e, t) => { - Nl(() => { - ((o, n, s) => { - const r = o.components(), - a = X(n, (e) => ka(e).toArray()); - L(r, (e) => { - R(a, e) || Td(e); - }); - const i = ((e, t, o) => Ya(e, t, (t, n) => Ka(e, n, t, o)))( - e.element, - t, - e.getSystem().buildOrPatch, - ), - l = J(r, i); - L(l, (e) => { - kd(e) && Td(e); - }), - L(i, (e) => { - kd(e) || _d(o, e); - }), - o.syncComponents(); - })(e, t); - }, e.element); - }, - jp = (e, t, o, n) => { - Td(t); - const s = Ka(e.element, o, n, e.getSystem().buildOrPatch); - _d(e, s), e.syncComponents(); - }, - Gp = (e, t, o) => { - const n = e.getSystem().build(o); - Md(e, n, t); - }, - $p = (e, t, o, n) => { - Bd(t), - Gp( - e, - (e, t) => - ((e, t, o) => { - lt(e, o).fold( - () => { - zo(e, t); - }, - (e) => { - Ro(e, t); - }, - ); - })(e, t, o), - n, - ); - }, - qp = (e, t) => e.components(), - Xp = (e, t, o, n, s) => { - const r = qp(e); - return A.from(r[n]).map( - (o) => ( - s.fold( - () => Bd(o), - (s) => { - (t.reuseDom ? jp : $p)(e, o, n, s); - }, - ), - o - ), - ); - }; - var Yp = Object.freeze({ - __proto__: null, - append: (e, t, o, n) => { - Gp(e, zo, n); - }, - prepend: (e, t, o, n) => { - Gp(e, Vo, n); - }, - remove: (e, t, o, n) => { - const s = qp(e), - r = G(s, (e) => Ze(n.element, e.element)); - r.each(Bd); - }, - replaceAt: Xp, - replaceBy: (e, t, o, n, s) => { - const r = qp(e); - return $(r, n).bind((o) => Xp(e, t, 0, o, s)); - }, - set: (e, t, o, n) => (t.reuseDom ? Wp : Up)(e, n), - contents: qp, - }); - const Kp = Ol({ fields: [Cs("reuseDom", !0)], name: "replacing", apis: Yp }), - Jp = (e, t) => { - const o = ((e, t) => { - const o = Hr(t); - return Ol({ - fields: [os("enabled")], - name: e, - active: { events: x(o) }, - }); - })(e, t); - return { - key: e, - value: { - config: {}, - me: o, - configAsRaw: x({}), - initialConfig: {}, - state: Oa, - }, - }; - }, - Zp = (e, t) => { - t.ignore || (Dl(e.element), t.onFocus(e)); - }; - var Qp = Object.freeze({ - __proto__: null, - focus: Zp, - blur: (e, t) => { - t.ignore || Bl(e.element); - }, - isFocused: (e) => Fl(e.element), - }), - eh = Object.freeze({ - __proto__: null, - exhibit: (e, t) => { - const o = t.ignore ? {} : { attributes: { tabindex: "-1" } }; - return Ea(o); - }, - events: (e) => - Hr( - [ - Ur(ir(), (t, o) => { - Zp(t, e), o.stop(); - }), - ].concat( - e.stopMousedown - ? [ - Ur(Ws(), (e, t) => { - t.event.prevent(); - }), - ] - : [], - ), - ), - }), - th = [Di("onFocus"), ys("stopMousedown", !1), ys("ignore", !1)]; - const oh = Ol({ fields: th, name: "focusing", active: eh, apis: Qp }), - nh = (e, t, o, n) => { - const s = o.get(); - o.set(n), - ((e, t, o) => { - t.toggleClass.each((t) => { - o.get() ? La(e.element, t) : Pa(e.element, t); - }); - })(e, t, o), - ((e, t, o) => { - const n = t.aria; - n.update(e, n, o.get()); - })(e, t, o), - s !== n && t.onToggled(e, n); - }, - sh = (e, t, o) => { - nh(e, t, o, !o.get()); - }, - rh = (e, t, o) => { - nh(e, t, o, t.selected); - }; - var ah = Object.freeze({ - __proto__: null, - onLoad: rh, - toggle: sh, - isOn: (e, t, o) => o.get(), - on: (e, t, o) => { - nh(e, t, o, !0); - }, - off: (e, t, o) => { - nh(e, t, o, !1); - }, - set: nh, - }), - ih = Object.freeze({ - __proto__: null, - exhibit: () => Ea({}), - events: (e, t) => { - const o = - ((n = e), - (s = t), - (r = sh), - Qr((e) => { - r(e, n, s); - })); - var n, s, r; - const a = xl(e, t, rh); - return Hr(q([e.toggleOnExecute ? [o] : [], [a]])); - }, - }); - const lh = (e, t, o) => { - kt(e.element, "aria-expanded", o); - }; - var ch = [ - ys("selected", !1), - us("toggleClass"), - ys("toggleOnExecute", !0), - Di("onToggled"), - xs( - "aria", - { mode: "none" }, - Jn("mode", { - pressed: [ - ys("syncWithExpanded", !1), - Ri("update", (e, t, o) => { - kt(e.element, "aria-pressed", o), t.syncWithExpanded && lh(e, 0, o); - }), - ], - checked: [ - Ri("update", (e, t, o) => { - kt(e.element, "aria-checked", o); - }), - ], - expanded: [Ri("update", lh)], - selected: [ - Ri("update", (e, t, o) => { - kt(e.element, "aria-selected", o); - }), - ], - none: [Ri("update", b)], - }), - ), - ]; - const dh = Ol({ - fields: ch, - name: "toggling", - active: ih, - apis: ah, - state: - (!1, - { - init: () => { - const e = Es(false); - return { - get: () => e.get(), - set: (t) => e.set(t), - clear: () => e.set(false), - readState: () => e.get(), - }; - }, - }), - }); - const uh = () => { - const e = (e, t) => { - t.stop(), Rr(e); - }; - return [Ur(er(), e), Ur(gr(), e), qr(Hs()), qr(Ws())]; - }, - mh = (e) => - Hr( - q([ - e - .map((e) => - Qr((t, o) => { - e(t), o.stop(); - }), - ) - .toArray(), - uh(), - ]), - ), - gh = "alloy.item-hover", - ph = "alloy.item-focus", - hh = "alloy.item-toggled", - fh = (e) => { - (Rl(e.element).isNone() || oh.isFocused(e)) && - (oh.isFocused(e) || oh.focus(e), Ir(e, gh, { item: e })); - }, - bh = (e) => { - Ir(e, ph, { item: e }); - }, - vh = x(gh), - yh = x(ph), - xh = x(hh), - wh = (e) => - e.toggling - .map((e) => (e.exclusive ? "menuitemradio" : "menuitemcheckbox")) - .getOr("menuitem"), - Sh = [ - os("data"), - os("components"), - os("dom"), - ys("hasSubmenu", !1), - us("toggling"), - vu("itemBehaviours", [dh, oh, Pp, pu]), - ys("ignoreFocus", !1), - ys("domModification", {}), - Ri("builder", (e) => ({ - dom: e.dom, - domModification: { - ...e.domModification, - attributes: { - role: wh(e), - ...e.domModification.attributes, - "aria-haspopup": e.hasSubmenu, - ...(e.hasSubmenu ? { "aria-expanded": !1 } : {}), - }, - }, - behaviours: yu(e.itemBehaviours, [ - e.toggling.fold(dh.revoke, (e) => - dh.config( - ((e) => ({ - aria: { mode: "checked" }, - ...ge(e, (e, t) => "exclusive" !== t), - onToggled: (t, o) => { - p(e.onToggled) && e.onToggled(t, o), - ((e, t) => { - Ir(e, hh, { item: e, state: t }); - })(t, o); - }, - }))(e), - ), - ), - oh.config({ - ignore: e.ignoreFocus, - stopMousedown: e.ignoreFocus, - onFocus: (e) => { - bh(e); - }, - }), - Pp.config({ mode: "execution" }), - pu.config({ store: { mode: "memory", initialValue: e.data } }), - Jp("item-type-events", [...uh(), Ur(qs(), fh), Ur(mr(), oh.focus)]), - ]), - components: e.components, - eventOrder: e.eventOrder, - })), - ys("eventOrder", {}), - ], - kh = [ - os("dom"), - os("components"), - Ri("builder", (e) => ({ - dom: e.dom, - components: e.components, - events: Hr([Xr(mr())]), - })), - ], - Ch = x("item-widget"), - Oh = x([ - Uu({ - name: "widget", - overrides: (e) => ({ - behaviours: kl([ - pu.config({ - store: { mode: "manual", getValue: (t) => e.data, setValue: b }, - }), - ]), - }), - }), - ]), - _h = [ - os("uid"), - os("data"), - os("components"), - os("dom"), - ys("autofocus", !1), - ys("ignoreFocus", !1), - vu("widgetBehaviours", [pu, oh, Pp]), - ys("domModification", {}), - cm(Oh()), - Ri("builder", (e) => { - const t = em(Ch(), e, Oh()), - o = tm(Ch(), e, t.internals()), - n = (t) => om(t, e, "widget").map((e) => (Pp.focusIn(e), e)), - s = (t, o) => - vm(o.event.target) - ? A.none() - : e.autofocus - ? (o.setSource(t.element), A.none()) - : A.none(); - return { - dom: e.dom, - components: o, - domModification: e.domModification, - events: Hr([ - Qr((e, t) => { - n(e).each((e) => { - t.stop(); - }); - }), - Ur(qs(), fh), - Ur(mr(), (t, o) => { - e.autofocus ? n(t) : oh.focus(t); - }), - ]), - behaviours: yu(e.widgetBehaviours, [ - pu.config({ store: { mode: "memory", initialValue: e.data } }), - oh.config({ - ignore: e.ignoreFocus, - onFocus: (e) => { - bh(e); - }, - }), - Pp.config({ - mode: "special", - focusIn: e.autofocus - ? (e) => { - n(e); - } - : El(), - onLeft: s, - onRight: s, - onEscape: (t, o) => - oh.isFocused(t) || e.autofocus - ? e.autofocus - ? (o.setSource(t.element), A.none()) - : A.none() - : (oh.focus(t), A.some(!0)), - }), - ]), - }; - }), - ], - Th = Jn("type", { widget: _h, item: Sh, separator: kh }), - Eh = x([ - Gu({ - factory: { - sketch: (e) => { - const t = Yn("menu.spec item", Th, e); - return t.builder(t); - }, - }, - name: "items", - unit: "item", - defaults: (e, t) => (ve(t, "uid") ? t : { ...t, uid: ha("item") }), - overrides: (e, t) => ({ - type: t.type, - ignoreFocus: e.fakeFocus, - domModification: { classes: [e.markers.item] }, - }), - }), - ]), - Ah = x([ - os("value"), - os("items"), - os("dom"), - os("components"), - ys("eventOrder", {}), - hu("menuBehaviours", [Gm, pu, wm, Pp]), - xs( - "movement", - { mode: "menu", moveOnTab: !0 }, - Jn("mode", { - grid: [ - Vi(), - Ri("config", (e, t) => ({ - mode: "flatgrid", - selector: "." + e.markers.item, - initSize: { - numColumns: t.initSize.numColumns, - numRows: t.initSize.numRows, - }, - focusManager: e.focusManager, - })), - ], - matrix: [ - Ri("config", (e, t) => ({ - mode: "matrix", - selectors: { row: t.rowSelector, cell: "." + e.markers.item }, - previousSelector: t.previousSelector, - focusManager: e.focusManager, - })), - os("rowSelector"), - ys("previousSelector", A.none), - ], - menu: [ - ys("moveOnTab", !0), - Ri("config", (e, t) => ({ - mode: "menu", - selector: "." + e.markers.item, - moveOnTab: t.moveOnTab, - focusManager: e.focusManager, - })), - ], - }), - ), - ns("markers", _i()), - ys("fakeFocus", !1), - ys("focusManager", mg()), - Di("onHighlight"), - Di("onDehighlight"), - ]), - Mh = x("alloy.menu-focus"), - Dh = bm({ - name: "Menu", - configFields: Ah(), - partFields: Eh(), - factory: (e, t, o, n) => ({ - uid: e.uid, - dom: e.dom, - markers: e.markers, - behaviours: bu(e.menuBehaviours, [ - Gm.config({ - highlightClass: e.markers.selectedItem, - itemClass: e.markers.item, - onHighlight: e.onHighlight, - onDehighlight: e.onDehighlight, - }), - pu.config({ store: { mode: "memory", initialValue: e.value } }), - wm.config({ find: A.some }), - Pp.config(e.movement.config(e, e.movement)), - ]), - events: Hr([ - Ur(yh(), (e, t) => { - const o = t.event; - e.getSystem() - .getByDom(o.target) - .each((o) => { - Gm.highlight(e, o), t.stop(), Ir(e, Mh(), { menu: e, item: o }); - }); - }), - Ur(vh(), (e, t) => { - const o = t.event.item; - Gm.highlight(e, o); - }), - Ur(xh(), (e, t) => { - const { item: o, state: n } = t.event; - n && - "menuitemradio" === Ot(o.element, "role") && - ((e, t) => { - const o = Xc( - e.element, - '[role="menuitemradio"][aria-checked="true"]', - ); - L(o, (o) => { - Ze(o, t.element) || - e - .getSystem() - .getByDom(o) - .each((e) => { - dh.off(e); - }); - }); - })(e, o); - }), - ]), - components: t, - eventOrder: e.eventOrder, - domModification: { attributes: { role: "menu" } }, - }), - }), - Bh = (e, t, o, n) => - be(o, n) - .bind((n) => - be(e, n).bind((n) => { - const s = Bh(e, t, o, n); - return A.some([n].concat(s)); - }), - ) - .getOr([]), - Fh = (e) => ("prepared" === e.type ? A.some(e.menu) : A.none()), - Ih = () => { - const e = Es({}), - t = Es({}), - o = Es({}), - n = Ql(), - s = Es({}), - r = (e) => a(e).bind(Fh), - a = (e) => be(t.get(), e), - i = (t) => be(e.get(), t); - return { - setMenuBuilt: (e, o) => { - t.set({ ...t.get(), [e]: { type: "prepared", menu: o } }); - }, - setContents: (r, a, i, l) => { - n.set(r), e.set(i), t.set(a), s.set(l); - const c = ((e, t) => { - const o = {}; - le(e, (e, t) => { - L(e, (e) => { - o[e] = t; - }); - }); - const n = t, - s = de(t, (e, t) => ({ k: e, v: t })), - r = ce(s, (e, t) => [t].concat(Bh(o, n, s, t))); - return ce(o, (e) => be(r, e).getOr([e])); - })(l, i); - o.set(c); - }, - expand: (t) => - be(e.get(), t).map((e) => { - const n = be(o.get(), t).getOr([]); - return [e].concat(n); - }), - refresh: (e) => be(o.get(), e), - collapse: (e) => - be(o.get(), e).bind((e) => - e.length > 1 ? A.some(e.slice(1)) : A.none(), - ), - lookupMenu: a, - lookupItem: i, - otherMenus: (e) => { - const t = s.get(); - return J(ae(t), e); - }, - getPrimary: () => n.get().bind(r), - getMenus: () => t.get(), - clear: () => { - e.set({}), t.set({}), o.set({}), n.clear(); - }, - isClear: () => n.get().isNone(), - getTriggeringPath: (t, s) => { - const a = U(i(t).toArray(), (e) => r(e).isSome()); - return be(o.get(), t).bind((t) => { - const o = K(a.concat(t)); - return ((e) => { - const t = []; - for (let o = 0; o < e.length; o++) { - const n = e[o]; - if (!n.isSome()) return A.none(); - t.push(n.getOrDie()); - } - return A.some(t); - })( - X(o, (t, a) => - ((t, o, n) => - r(t).bind((s) => - ((t) => he(e.get(), (e, o) => e === t))(t).bind((e) => - o(e).map((e) => ({ - triggeredMenu: s, - triggeringItem: e, - triggeringPath: n, - })), - ), - ))(t, s, o.slice(0, a + 1)).fold( - () => (xe(n.get(), t) ? [] : [A.none()]), - (e) => [A.some(e)], - ), - ), - ); - }); - }, - }; - }, - Rh = Fh, - Nh = la("tiered-menu-item-highlight"), - Vh = la("tiered-menu-item-dehighlight"); - var zh; - !(function (e) { - (e[(e.HighlightMenuAndItem = 0)] = "HighlightMenuAndItem"), - (e[(e.HighlightJustMenu = 1)] = "HighlightJustMenu"), - (e[(e.HighlightNone = 2)] = "HighlightNone"); - })(zh || (zh = {})); - const Hh = x("collapse-item"), - Lh = fm({ - name: "TieredMenu", - configFields: [ - Ii("onExecute"), - Ii("onEscape"), - Fi("onOpenMenu"), - Fi("onOpenSubmenu"), - Di("onRepositionMenu"), - Di("onCollapseMenu"), - ys("highlightOnOpen", zh.HighlightMenuAndItem), - ls("data", [os("primary"), os("menus"), os("expansions")]), - ys("fakeFocus", !1), - Di("onHighlightItem"), - Di("onDehighlightItem"), - Di("onHover"), - Ei(), - os("dom"), - ys("navigateOnHover", !0), - ys("stayInDom", !1), - hu("tmenuBehaviours", [Pp, Gm, wm, Kp]), - ys("eventOrder", {}), - ], - apis: { - collapseMenu: (e, t) => { - e.collapseMenu(t); - }, - highlightPrimary: (e, t) => { - e.highlightPrimary(t); - }, - repositionMenus: (e, t) => { - e.repositionMenus(t); - }, - }, - factory: (e, t) => { - const o = Ql(), - n = Ih(), - s = (e) => pu.getValue(e).value, - r = (t) => - ce(e.data.menus, (e, t) => - X(e.items, (e) => ("separator" === e.type ? [] : [e.data.value])), - ), - a = Gm.highlight, - i = (t, o) => { - a(t, o), - Gm.getHighlighted(o) - .orThunk(() => Gm.getFirst(o)) - .each((n) => { - e.fakeFocus ? Gm.highlight(o, n) : Nr(t, n.element, mr()); - }); - }, - l = (e, t) => - we( - H(t, (t) => - e - .lookupMenu(t) - .bind((e) => - "prepared" === e.type ? A.some(e.menu) : A.none(), - ), - ), - ), - c = (t, o, n) => { - const s = l(o, o.otherMenus(n)); - L(s, (o) => { - ja(o.element, [e.markers.backgroundMenu]), - e.stayInDom || Kp.remove(t, o); - }); - }, - d = (t, n) => { - const r = ((t) => - o.get().getOrThunk(() => { - const n = {}, - r = Xc(t.element, `.${e.markers.item}`), - a = U(r, (e) => "true" === Ot(e, "aria-haspopup")); - return ( - L(a, (e) => { - t.getSystem() - .getByDom(e) - .each((e) => { - const t = s(e); - n[t] = e; - }); - }), - o.set(n), - n - ); - }))(t); - le(r, (e, t) => { - const o = R(n, t); - kt(e.element, "aria-expanded", o); - }); - }, - u = (t, o, n) => - A.from(n[0]).bind((s) => - o.lookupMenu(s).bind((s) => { - if ("notbuilt" === s.type) return A.none(); - { - const r = s.menu, - a = l(o, n.slice(1)); - return ( - L(a, (t) => { - La(t.element, e.markers.backgroundMenu); - }), - yt(r.element) || Kp.append(t, ai(r)), - ja(r.element, [e.markers.backgroundMenu]), - i(t, r), - c(t, o, n), - A.some(r) - ); - } - }), - ); - let m; - !(function (e) { - (e[(e.HighlightSubmenu = 0)] = "HighlightSubmenu"), - (e[(e.HighlightParent = 1)] = "HighlightParent"); - })(m || (m = {})); - const g = (t, o, r = m.HighlightSubmenu) => { - if (o.hasConfigured(Rm) && Rm.isDisabled(o)) return A.some(o); - { - const a = s(o); - return n.expand(a).bind( - (s) => ( - d(t, s), - A.from(s[0]).bind((a) => - n.lookupMenu(a).bind((i) => { - const l = ((e, t, o) => { - if ("notbuilt" === o.type) { - const s = e.getSystem().build(o.nbMenu()); - return n.setMenuBuilt(t, s), s; - } - return o.menu; - })(t, a, i); - return ( - yt(l.element) || Kp.append(t, ai(l)), - e.onOpenSubmenu(t, o, l, K(s)), - r === m.HighlightSubmenu - ? (Gm.highlightFirst(l), u(t, n, s)) - : (Gm.dehighlightAll(l), A.some(o)) - ); - }), - ) - ), - ); - } - }, - p = (t, o) => { - const r = s(o); - return n - .collapse(r) - .bind( - (s) => ( - d(t, s), u(t, n, s).map((n) => (e.onCollapseMenu(t, o, n), n)) - ), - ); - }, - h = (t) => (o, n) => - hi(n.getSource(), `.${e.markers.item}`).bind((e) => - o - .getSystem() - .getByDom(e) - .toOptional() - .bind((e) => t(o, e).map(E)), - ), - f = Hr([ - Ur(Mh(), (e, t) => { - const o = t.event.item; - n.lookupItem(s(o)).each(() => { - const o = t.event.menu; - Gm.highlight(e, o); - const r = s(t.event.item); - n.refresh(r).each((t) => c(e, n, t)); - }); - }), - Qr((t, o) => { - const n = o.event.target; - t.getSystem() - .getByDom(n) - .each((o) => { - 0 === s(o).indexOf("collapse-item") && p(t, o), - g(t, o, m.HighlightSubmenu).fold(() => { - e.onExecute(t, o); - }, b); - }); - }), - Kr((t, o) => { - ((t) => { - const o = ((t, o, n) => - ce(n, (n, s) => { - const r = () => - Dh.sketch({ - ...n, - value: s, - markers: e.markers, - fakeFocus: e.fakeFocus, - onHighlight: (e, t) => { - Ir(e, Nh, { menuComp: e, itemComp: t }); - }, - onDehighlight: (e, t) => { - Ir(e, Vh, { menuComp: e, itemComp: t }); - }, - focusManager: e.fakeFocus ? gg() : mg(), - }); - return s === o - ? { type: "prepared", menu: t.getSystem().build(r()) } - : { type: "notbuilt", nbMenu: r }; - }))(t, e.data.primary, e.data.menus), - s = r(); - return ( - n.setContents(e.data.primary, o, e.data.expansions, s), - n.getPrimary() - ); - })(t).each((o) => { - Kp.append(t, ai(o)), - e.onOpenMenu(t, o), - e.highlightOnOpen === zh.HighlightMenuAndItem - ? i(t, o) - : e.highlightOnOpen === zh.HighlightJustMenu && a(t, o); - }); - }), - Ur(Nh, (t, o) => { - e.onHighlightItem(t, o.event.menuComp, o.event.itemComp); - }), - Ur(Vh, (t, o) => { - e.onDehighlightItem(t, o.event.menuComp, o.event.itemComp); - }), - ...(e.navigateOnHover - ? [ - Ur(vh(), (t, o) => { - const r = o.event.item; - ((e, t) => { - const o = s(t); - n.refresh(o).bind((t) => (d(e, t), u(e, n, t))); - })(t, r), - g(t, r, m.HighlightParent), - e.onHover(t, r); - }), - ] - : []), - ]), - v = (e) => Gm.getHighlighted(e).bind(Gm.getHighlighted), - y = { - collapseMenu: (e) => { - v(e).each((t) => { - p(e, t); - }); - }, - highlightPrimary: (e) => { - n.getPrimary().each((t) => { - i(e, t); - }); - }, - repositionMenus: (t) => { - const o = n.getPrimary().bind((e) => - v(t) - .bind((e) => { - const t = s(e), - o = fe(n.getMenus()), - r = we(H(o, Rh)); - return n.getTriggeringPath(t, (e) => - ((e, t, o) => - re(t, (e) => { - if (!e.getSystem().isConnected()) return A.none(); - const t = Gm.getCandidates(e); - return G(t, (e) => s(e) === o); - }))(0, r, e), - ); - }) - .map((t) => ({ primary: e, triggeringPath: t })), - ); - o.fold( - () => { - ((e) => - A.from(e.components()[0]).filter( - (e) => "menu" === Ot(e.element, "role"), - ))(t).each((o) => { - e.onRepositionMenu(t, o, []); - }); - }, - ({ primary: o, triggeringPath: n }) => { - e.onRepositionMenu(t, o, n); - }, - ); - }, - }; - return { - uid: e.uid, - dom: e.dom, - markers: e.markers, - behaviours: bu(e.tmenuBehaviours, [ - Pp.config({ - mode: "special", - onRight: h((e, t) => - vm(t.element) ? A.none() : g(e, t, m.HighlightSubmenu), - ), - onLeft: h((e, t) => (vm(t.element) ? A.none() : p(e, t))), - onEscape: h((t, o) => - p(t, o).orThunk(() => e.onEscape(t, o).map(() => t)), - ), - focusIn: (e, t) => { - n.getPrimary().each((t) => { - Nr(e, t.element, mr()); - }); - }, - }), - Gm.config({ - highlightClass: e.markers.selectedMenu, - itemClass: e.markers.menu, - }), - wm.config({ find: (e) => Gm.getHighlighted(e) }), - Kp.config({}), - ]), - eventOrder: e.eventOrder, - apis: y, - events: f, - }; - }, - extraApis: { - tieredData: (e, t, o) => ({ primary: e, menus: t, expansions: o }), - singleData: (e, t) => ({ primary: e, menus: Ms(e, t), expansions: {} }), - collapseItem: (e) => ({ value: la(Hh()), meta: { text: e } }), - }, - }), - Ph = fm({ - name: "InlineView", - configFields: [ - os("lazySink"), - Di("onShow"), - Di("onHide"), - fs("onEscape"), - hu("inlineBehaviours", [Xd, pu, Al]), - vs("fireDismissalEventInstead", [ys("event", Cr())]), - vs("fireRepositionEventInstead", [ys("event", Or())]), - ys("getRelated", A.none), - ys("isExtraPart", T), - ys("eventOrder", A.none), - ], - factory: (e, t) => { - const o = (t, o, n, s) => { - const r = e.lazySink(t).getOrDie(); - Xd.openWhileCloaked(t, o, () => - Sd.positionWithinBounds(r, t, n, s()), - ), - pu.setValue( - t, - A.some({ mode: "position", config: n, getBounds: s }), - ); - }, - n = (t, o, n, s) => { - const r = ((e, t, o, n, s) => { - const r = () => e.lazySink(t), - a = - "horizontal" === n.type - ? { layouts: { onLtr: () => fl(), onRtl: () => bl() } } - : {}, - i = (e) => (((e) => 2 === e.length)(e) ? a : {}); - return Lh.sketch({ - dom: { tag: "div" }, - data: n.data, - markers: n.menu.markers, - highlightOnOpen: n.menu.highlightOnOpen, - fakeFocus: n.menu.fakeFocus, - onEscape: () => ( - Xd.close(t), e.onEscape.map((e) => e(t)), A.some(!0) - ), - onExecute: () => A.some(!0), - onOpenMenu: (e, t) => { - Sd.positionWithinBounds(r().getOrDie(), t, o, s()); - }, - onOpenSubmenu: (e, t, o, n) => { - const s = r().getOrDie(); - Sd.position(s, o, { - anchor: { type: "submenu", item: t, ...i(n) }, - }); - }, - onRepositionMenu: (e, t, n) => { - const a = r().getOrDie(); - Sd.positionWithinBounds(a, t, o, s()), - L(n, (e) => { - const t = i(e.triggeringPath); - Sd.position(a, e.triggeredMenu, { - anchor: { - type: "submenu", - item: e.triggeringItem, - ...t, - }, - }); - }); - }, - }); - })(e, t, o, n, s); - Xd.open(t, r), pu.setValue(t, A.some({ mode: "menu", menu: r })); - }, - s = (t) => { - Xd.isOpen(t) && - pu.getValue(t).each((o) => { - switch (o.mode) { - case "menu": - Xd.getState(t).each(Lh.repositionMenus); - break; - case "position": - const n = e.lazySink(t).getOrDie(); - Sd.positionWithinBounds(n, t, o.config, o.getBounds()); - } - }); - }, - r = { - setContent: (e, t) => { - Xd.setContent(e, t); - }, - showAt: (e, t, n) => { - const s = A.none; - o(e, t, n, s); - }, - showWithinBounds: o, - showMenuAt: (e, t, o) => { - n(e, t, o, A.none); - }, - showMenuWithinBounds: n, - hide: (e) => { - Xd.isOpen(e) && (pu.setValue(e, A.none()), Xd.close(e)); - }, - getContent: (e) => Xd.getState(e), - reposition: s, - isOpen: Xd.isOpen, - }; - return { - uid: e.uid, - dom: e.dom, - behaviours: bu(e.inlineBehaviours, [ - Xd.config({ - isPartOf: (t, o, n) => - vi(o, n) || - ((t, o) => e.getRelated(t).exists((e) => vi(e, o)))(t, n), - getAttachPoint: (t) => e.lazySink(t).getOrDie(), - onOpen: (t) => { - e.onShow(t); - }, - onClose: (t) => { - e.onHide(t); - }, - }), - pu.config({ store: { mode: "memory", initialValue: A.none() } }), - Al.config({ - channels: { - ...Qd({ - isExtraPart: t.isExtraPart, - ...e.fireDismissalEventInstead - .map((e) => ({ fireEventInstead: { event: e.event } })) - .getOr({}), - }), - ...tu({ - ...e.fireRepositionEventInstead - .map((e) => ({ fireEventInstead: { event: e.event } })) - .getOr({}), - doReposition: s, - }), - }, - }), - ]), - eventOrder: e.eventOrder, - apis: r, - }; - }, - apis: { - showAt: (e, t, o, n) => { - e.showAt(t, o, n); - }, - showWithinBounds: (e, t, o, n, s) => { - e.showWithinBounds(t, o, n, s); - }, - showMenuAt: (e, t, o, n) => { - e.showMenuAt(t, o, n); - }, - showMenuWithinBounds: (e, t, o, n, s) => { - e.showMenuWithinBounds(t, o, n, s); - }, - hide: (e, t) => { - e.hide(t); - }, - isOpen: (e, t) => e.isOpen(t), - getContent: (e, t) => e.getContent(t), - setContent: (e, t, o) => { - e.setContent(t, o); - }, - reposition: (e, t) => { - e.reposition(t); - }, - }, - }); - var Uh = tinymce.util.Tools.resolve("tinymce.util.Delay"); - const Wh = fm({ - name: "Button", - factory: (e) => { - const t = mh(e.action), - o = e.dom.tag, - n = (t) => be(e.dom, "attributes").bind((e) => be(e, t)); - return { - uid: e.uid, - dom: e.dom, - components: e.components, - events: t, - behaviours: yu(e.buttonBehaviours, [ - oh.config({}), - Pp.config({ mode: "execution", useSpace: !0, useEnter: !0 }), - ]), - domModification: { - attributes: - "button" === o - ? { - type: n("type").getOr("button"), - ...n("role") - .map((e) => ({ role: e })) - .getOr({}), - } - : { role: e.role.getOr(n("role").getOr("button")) }, - }, - eventOrder: e.eventOrder, - }; - }, - configFields: [ - ys("uid", void 0), - os("dom"), - ys("components", []), - vu("buttonBehaviours", [oh, Pp]), - us("action"), - us("role"), - ys("eventOrder", {}), - ], - }), - jh = (e) => { - const t = - ((e) => void 0 !== e.uid)(e) && ye(e, "uid") ? e.uid : ha("memento"); - return { - get: (e) => e.getSystem().getByUid(t).getOrDie(), - getOpt: (e) => e.getSystem().getByUid(t).toOptional(), - asSpec: () => ({ ...e, uid: t }), - }; - }; - var Gh = tinymce.util.Tools.resolve("tinymce.util.I18n"); - const $h = { - indent: !0, - outdent: !0, - "table-insert-column-after": !0, - "table-insert-column-before": !0, - "paste-column-after": !0, - "paste-column-before": !0, - "unordered-list": !0, - "list-bull-circle": !0, - "list-bull-default": !0, - "list-bull-square": !0, - }, - qh = "temporary-placeholder", - Xh = (e) => () => be(e, qh).getOr("!not found!"), - Yh = (e, t) => { - const o = e.toLowerCase(); - if (Gh.isRtl()) { - const e = ((e, t) => (Ae(e, t) ? e : ((e, t) => e + t)(e, t)))( - o, - "-rtl", - ); - return ve(t, e) ? e : o; - } - return o; - }, - Kh = (e, t) => be(t, Yh(e, t)), - Jh = (e, t) => { - const o = t(); - return Kh(e, o).getOrThunk(Xh(o)); - }, - Zh = () => - Jp("add-focusable", [ - Kr((e) => { - gi(e.element, "svg").each((e) => kt(e, "focusable", "false")); - }), - ]), - Qh = (e, t, o, n) => { - var s, r; - const a = ((e) => !!Gh.isRtl() && ve($h, e))(t) ? ["tox-icon--flip"] : [], - i = be(o, Yh(t, o)).or(n).getOrThunk(Xh(o)); - return { - dom: { - tag: e.tag, - attributes: null !== (s = e.attributes) && void 0 !== s ? s : {}, - classes: e.classes.concat(a), - innerHtml: i, - }, - behaviours: kl([ - ...(null !== (r = e.behaviours) && void 0 !== r ? r : []), - Zh(), - ]), - }; - }, - ef = (e, t, o, n = A.none()) => Qh(t, e, o(), n), - tf = { - success: "checkmark", - error: "warning", - err: "error", - warning: "warning", - warn: "warning", - info: "info", - }, - of = fm({ - name: "Notification", - factory: (e) => { - const t = jh({ - dom: { tag: "p", innerHtml: e.translationProvider(e.text) }, - behaviours: kl([Kp.config({})]), - }), - o = (e) => ({ - dom: { - tag: "div", - classes: ["tox-bar"], - styles: { width: `${e}%` }, - }, - }), - n = (e) => ({ - dom: { tag: "div", classes: ["tox-text"], innerHtml: `${e}%` }, - }), - s = jh({ - dom: { - tag: "div", - classes: e.progress - ? ["tox-progress-bar", "tox-progress-indicator"] - : ["tox-progress-bar"], - }, - components: [ - { - dom: { tag: "div", classes: ["tox-bar-container"] }, - components: [o(0)], - }, - n(0), - ], - behaviours: kl([Kp.config({})]), - }), - r = { - updateProgress: (e, t) => { - e.getSystem().isConnected() && - s.getOpt(e).each((e) => { - Kp.set(e, [ - { - dom: { tag: "div", classes: ["tox-bar-container"] }, - components: [o(t)], - }, - n(t), - ]); - }); - }, - updateText: (e, o) => { - if (e.getSystem().isConnected()) { - const n = t.get(e); - Kp.set(n, [ti(o)]); - } - }, - }, - a = q([ - e.icon.toArray(), - e.level.toArray(), - e.level.bind((e) => A.from(tf[e])).toArray(), - ]), - i = jh( - Wh.sketch({ - dom: { - tag: "button", - classes: [ - "tox-notification__dismiss", - "tox-button", - "tox-button--naked", - "tox-button--icon", - ], - }, - components: [ - ef( - "close", - { - tag: "span", - classes: ["tox-icon"], - attributes: { - "aria-label": e.translationProvider("Close"), - }, - }, - e.iconProvider, - ), - ], - action: (t) => { - e.onAction(t); - }, - }), - ), - l = ((e, t, o) => { - const n = o(), - s = G(e, (e) => ve(n, Yh(e, n))); - return Qh( - { tag: "div", classes: ["tox-notification__icon"] }, - s.getOr(qh), - n, - A.none(), - ); - })(a, 0, e.iconProvider), - c = [ - l, - { - dom: { tag: "div", classes: ["tox-notification__body"] }, - components: [t.asSpec()], - behaviours: kl([Kp.config({})]), - }, - ]; - return { - uid: e.uid, - dom: { - tag: "div", - attributes: { role: "alert" }, - classes: e.level - .map((e) => [ - "tox-notification", - "tox-notification--in", - `tox-notification--${e}`, - ]) - .getOr(["tox-notification", "tox-notification--in"]), - }, - behaviours: kl([ - oh.config({}), - Jp("notification-events", [ - Ur(Xs(), (e) => { - i.getOpt(e).each(oh.focus); - }), - ]), - ]), - components: c - .concat(e.progress ? [s.asSpec()] : []) - .concat(e.closeButton ? [i.asSpec()] : []), - apis: r, - }; - }, - configFields: [ - us("level"), - os("progress"), - us("icon"), - os("onAction"), - os("text"), - os("iconProvider"), - os("translationProvider"), - Cs("closeButton", !0), - ], - apis: { - updateProgress: (e, t, o) => { - e.updateProgress(t, o); - }, - updateText: (e, t, o) => { - e.updateText(t, o); - }, - }, - }); - var nf, - sf, - rf = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), - af = tinymce.util.Tools.resolve("tinymce.EditorManager"), - lf = tinymce.util.Tools.resolve("tinymce.Env"); - !(function (e) { - (e.default = "wrap"), - (e.floating = "floating"), - (e.sliding = "sliding"), - (e.scrolling = "scrolling"); - })(nf || (nf = {})), - (function (e) { - (e.auto = "auto"), (e.top = "top"), (e.bottom = "bottom"); - })(sf || (sf = {})); - const cf = (e) => (t) => t.options.get(e), - df = (e) => (t) => A.from(e(t)), - uf = (e) => { - const t = lf.deviceType.isPhone(), - o = lf.deviceType.isTablet() || t, - n = e.options.register, - s = (e) => r(e) || !1 === e, - a = (e) => r(e) || h(e); - n("skin", { processor: (e) => r(e) || !1 === e, default: "oxide" }), - n("skin_url", { processor: "string" }), - n("height", { - processor: a, - default: Math.max(e.getElement().offsetHeight, 400), - }), - n("width", { - processor: a, - default: rf.DOM.getStyle(e.getElement(), "width"), - }), - n("min_height", { processor: "number", default: 100 }), - n("min_width", { processor: "number" }), - n("max_height", { processor: "number" }), - n("max_width", { processor: "number" }), - n("style_formats", { processor: "object[]" }), - n("style_formats_merge", { processor: "boolean", default: !1 }), - n("style_formats_autohide", { processor: "boolean", default: !1 }), - n("line_height_formats", { - processor: "string", - default: "1 1.1 1.2 1.3 1.4 1.5 2", - }), - n("font_family_formats", { - processor: "string", - default: - "Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats", - }), - n("font_size_formats", { - processor: "string", - default: "8pt 10pt 12pt 14pt 18pt 24pt 36pt", - }), - n("font_size_input_default_unit", { - processor: "string", - default: "pt", - }), - n("block_formats", { - processor: "string", - default: - "Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre", - }), - n("content_langs", { processor: "object[]" }), - n("removed_menuitems", { processor: "string", default: "" }), - n("menubar", { processor: (e) => r(e) || d(e), default: !t }), - n("menu", { processor: "object", default: {} }), - n("toolbar", { - processor: (e) => - d(e) || r(e) || l(e) - ? { value: e, valid: !0 } - : { valid: !1, message: "Must be a boolean, string or array." }, - default: !0, - }), - V(9, (e) => { - n("toolbar" + (e + 1), { processor: "string" }); - }), - n("toolbar_mode", { - processor: "string", - default: o ? "scrolling" : "floating", - }), - n("toolbar_groups", { processor: "object", default: {} }), - n("toolbar_location", { processor: "string", default: sf.auto }), - n("toolbar_persist", { processor: "boolean", default: !1 }), - n("toolbar_sticky", { processor: "boolean", default: e.inline }), - n("toolbar_sticky_offset", { processor: "number", default: 0 }), - n("fixed_toolbar_container", { processor: "string", default: "" }), - n("fixed_toolbar_container_target", { processor: "object" }), - n("ui_mode", { processor: "string", default: "combined" }), - n("file_picker_callback", { processor: "function" }), - n("file_picker_validator_handler", { processor: "function" }), - n("file_picker_types", { processor: "string" }), - n("typeahead_urls", { processor: "boolean", default: !0 }), - n("anchor_top", { processor: s, default: "#top" }), - n("anchor_bottom", { processor: s, default: "#bottom" }), - n("draggable_modal", { processor: "boolean", default: !1 }), - n("statusbar", { processor: "boolean", default: !0 }), - n("elementpath", { processor: "boolean", default: !0 }), - n("branding", { processor: "boolean", default: !0 }), - n("promotion", { processor: "boolean", default: !0 }), - n("resize", { - processor: (e) => "both" === e || d(e), - default: !lf.deviceType.isTouch(), - }), - n("sidebar_show", { processor: "string" }), - n("help_accessibility", { - processor: "boolean", - default: e.hasPlugin("help"), - }); - }, - mf = cf("readonly"), - gf = cf("height"), - pf = cf("width"), - hf = df(cf("min_width")), - ff = df(cf("min_height")), - bf = df(cf("max_width")), - vf = df(cf("max_height")), - yf = df(cf("style_formats")), - xf = cf("style_formats_merge"), - wf = cf("style_formats_autohide"), - Sf = cf("content_langs"), - kf = cf("removed_menuitems"), - Cf = cf("toolbar_mode"), - Of = cf("toolbar_groups"), - _f = cf("toolbar_location"), - Tf = cf("fixed_toolbar_container"), - Ef = cf("fixed_toolbar_container_target"), - Af = cf("toolbar_persist"), - Mf = cf("toolbar_sticky_offset"), - Df = cf("menubar"), - Bf = cf("toolbar"), - Ff = cf("file_picker_callback"), - If = cf("file_picker_validator_handler"), - Rf = cf("font_size_input_default_unit"), - Nf = cf("file_picker_types"), - Vf = cf("typeahead_urls"), - zf = cf("anchor_top"), - Hf = cf("anchor_bottom"), - Lf = cf("draggable_modal"), - Pf = cf("statusbar"), - Uf = cf("elementpath"), - Wf = cf("branding"), - jf = cf("resize"), - Gf = cf("paste_as_text"), - $f = cf("sidebar_show"), - qf = cf("promotion"), - Xf = cf("help_accessibility"), - Yf = (e) => !1 === e.options.get("skin"), - Kf = (e) => !1 !== e.options.get("menubar"), - Jf = (e) => { - const t = e.options.get("skin_url"); - if (Yf(e)) return t; - if (t) return e.documentBaseURI.toAbsolute(t); - { - const t = e.options.get("skin"); - return af.baseURL + "/skins/ui/" + t; - } - }, - Zf = (e) => e.options.get("line_height_formats").split(" "), - Qf = (e) => { - const t = Bf(e), - o = r(t), - n = l(t) && t.length > 0; - return !tb(e) && (n || o || !0 === t); - }, - eb = (e) => { - const t = V(9, (t) => e.options.get("toolbar" + (t + 1))), - o = U(t, r); - return Ce(o.length > 0, o); - }, - tb = (e) => - eb(e).fold(() => { - const t = Bf(e); - return f(t, r) && t.length > 0; - }, E), - ob = (e) => _f(e) === sf.bottom, - nb = (e) => { - var t; - if (!e.inline) return A.none(); - const o = null !== (t = Tf(e)) && void 0 !== t ? t : ""; - if (o.length > 0) return pi(xt(), o); - const n = Ef(e); - return g(n) ? A.some(Ve(n)) : A.none(); - }, - sb = (e) => e.inline && nb(e).isSome(), - rb = (e) => nb(e).getOrThunk(() => ft(ht(Ve(e.getElement())))), - ab = (e) => e.inline && !Kf(e) && !Qf(e) && !tb(e), - ib = (e) => - (e.options.get("toolbar_sticky") || e.inline) && !sb(e) && !ab(e), - lb = (e) => !sb(e) && "split" === e.options.get("ui_mode"), - cb = (e) => { - const t = e.options.get("menu"); - return ce(t, (e) => ({ ...e, items: e.items })); - }; - var db = Object.freeze({ - __proto__: null, - get ToolbarMode() { - return nf; - }, - get ToolbarLocation() { - return sf; - }, - register: uf, - getSkinUrl: Jf, - isReadOnly: mf, - isSkinDisabled: Yf, - getHeightOption: gf, - getWidthOption: pf, - getMinWidthOption: hf, - getMinHeightOption: ff, - getMaxWidthOption: bf, - getMaxHeightOption: vf, - getUserStyleFormats: yf, - shouldMergeStyleFormats: xf, - shouldAutoHideStyleFormats: wf, - getLineHeightFormats: Zf, - getContentLanguages: Sf, - getRemovedMenuItems: kf, - isMenubarEnabled: Kf, - isMultipleToolbars: tb, - isToolbarEnabled: Qf, - isToolbarPersist: Af, - getMultipleToolbarsOption: eb, - getUiContainer: rb, - useFixedContainer: sb, - isSplitUiMode: lb, - getToolbarMode: Cf, - isDraggableModal: Lf, - isDistractionFree: ab, - isStickyToolbar: ib, - getStickyToolbarOffset: Mf, - getToolbarLocation: _f, - isToolbarLocationBottom: ob, - getToolbarGroups: Of, - getMenus: cb, - getMenubar: Df, - getToolbar: Bf, - getFilePickerCallback: Ff, - getFilePickerTypes: Nf, - useTypeaheadUrls: Vf, - getAnchorTop: zf, - getAnchorBottom: Hf, - getFilePickerValidatorHandler: If, - getFontSizeInputDefaultUnit: Rf, - useStatusBar: Pf, - useElementPath: Uf, - promotionEnabled: qf, - useBranding: Wf, - getResize: jf, - getPasteAsText: Gf, - getSidebarShow: $f, - useHelpAccessibility: Xf, - }); - const ub = "[data-mce-autocompleter]", - mb = (e) => hi(e, ub); - var gb; - !(function (e) { - (e[(e.CLOSE_ON_EXECUTE = 0)] = "CLOSE_ON_EXECUTE"), - (e[(e.BUBBLE_TO_SANDBOX = 1)] = "BUBBLE_TO_SANDBOX"); - })(gb || (gb = {})); - var pb = gb; - const hb = "tox-menu-nav__js", - fb = "tox-collection__item", - bb = "tox-swatch", - vb = { normal: hb, color: bb }, - yb = "tox-collection__item--enabled", - xb = "tox-collection__item-icon", - wb = "tox-collection__item-label", - Sb = "tox-collection__item-caret", - kb = "tox-collection__item--active", - Cb = "tox-collection__item-container", - Ob = "tox-collection__item-container--row", - _b = (e) => be(vb, e).getOr(hb), - Tb = (e) => ("color" === e ? "tox-swatches" : "tox-menu"), - Eb = (e) => ({ - backgroundMenu: "tox-background-menu", - selectedMenu: "tox-selected-menu", - selectedItem: "tox-collection__item--active", - hasIcons: "tox-menu--has-icons", - menu: Tb(e), - tieredMenu: "tox-tiered-menu", - }), - Ab = (e) => { - const t = Eb(e); - return { - backgroundMenu: t.backgroundMenu, - selectedMenu: t.selectedMenu, - menu: t.menu, - selectedItem: t.selectedItem, - item: _b(e), - }; - }, - Mb = (e, t, o) => { - const n = Eb(o); - return { - tag: "div", - classes: q([[n.menu, `tox-menu-${t}-column`], e ? [n.hasIcons] : []]), - }; - }, - Db = [Dh.parts.items({})], - Bb = (e, t, o) => { - const n = Eb(o); - return { - dom: { tag: "div", classes: q([[n.tieredMenu]]) }, - markers: Ab(o), - }; - }, - Fb = x([ - us("data"), - ys("inputAttributes", {}), - ys("inputStyles", {}), - ys("tag", "input"), - ys("inputClasses", []), - Di("onSetValue"), - ys("styles", {}), - ys("eventOrder", {}), - hu("inputBehaviours", [pu, oh]), - ys("selectOnFocus", !0), - ]), - Ib = (e) => - kl([ - oh.config({ - onFocus: e.selectOnFocus - ? (e) => { - const t = e.element, - o = $a(t); - t.dom.setSelectionRange(0, o.length); - } - : b, - }), - ]), - Rb = (e) => ({ - ...Ib(e), - ...bu(e.inputBehaviours, [ - pu.config({ - store: { - mode: "manual", - ...e.data.map((e) => ({ initialValue: e })).getOr({}), - getValue: (e) => $a(e.element), - setValue: (e, t) => { - $a(e.element) !== t && qa(e.element, t); - }, - }, - onSetValue: e.onSetValue, - }), - ]), - }), - Nb = (e) => ({ - tag: e.tag, - attributes: { type: "text", ...e.inputAttributes }, - styles: e.inputStyles, - classes: e.inputClasses, - }), - Vb = fm({ - name: "Input", - configFields: Fb(), - factory: (e, t) => ({ - uid: e.uid, - dom: Nb(e), - components: [], - behaviours: Rb(e), - eventOrder: e.eventOrder, - }), - }), - zb = la("refetch-trigger-event"), - Hb = la("redirect-menu-item-interaction"), - Lb = "tox-menu__searcher", - Pb = (e) => - pi(e.element, `.${Lb}`).bind((t) => - e.getSystem().getByDom(t).toOptional(), - ), - Ub = Pb, - Wb = (e) => ({ - fetchPattern: pu.getValue(e), - selectionStart: e.element.dom.selectionStart, - selectionEnd: e.element.dom.selectionEnd, - }), - jb = (e) => { - const t = (e, t) => (t.cut(), A.none()), - o = (e, t) => { - const o = { interactionEvent: t.event, eventType: t.event.raw.type }; - return Ir(e, Hb, o), A.some(!0); - }, - n = "searcher-events"; - return { - dom: { tag: "div", classes: [fb] }, - components: [ - Vb.sketch({ - inputClasses: [Lb, "tox-textfield"], - inputAttributes: { - ...e.placeholder - .map((t) => ({ placeholder: e.i18n(t) })) - .getOr({}), - type: "search", - "aria-autocomplete": "list", - }, - inputBehaviours: kl([ - Jp(n, [ - Ur(Zs(), (e) => { - Fr(e, zb); - }), - Ur(Ks(), (e, t) => { - "Escape" === t.event.raw.key && t.stop(); - }), - ]), - Pp.config({ - mode: "special", - onLeft: t, - onRight: t, - onSpace: t, - onEnter: o, - onEscape: o, - onUp: o, - onDown: o, - }), - ]), - eventOrder: { keydown: [n, Pp.name()] }, - }), - ], - }; - }, - Gb = "tox-collection--results__js", - $b = (e) => { - var t; - return e.dom - ? { - ...e, - dom: { - ...e.dom, - attributes: { - ...(null !== (t = e.dom.attributes) && void 0 !== t ? t : {}), - id: la("aria-item-search-result-id"), - "aria-selected": "false", - }, - }, - } - : e; - }, - qb = (e, t) => (o) => { - const n = z(o, t); - return H(n, (t) => ({ dom: e, components: t })); - }, - Xb = (e, t) => { - const o = []; - let n = []; - return ( - L(e, (e, s) => { - t(e, s) - ? (n.length > 0 && o.push(n), - (n = []), - (ve(e.dom, "innerHtml") || - (e.components && e.components.length > 0)) && - n.push(e)) - : n.push(e); - }), - n.length > 0 && o.push(n), - H(o, (e) => ({ - dom: { tag: "div", classes: ["tox-collection__group"] }, - components: e, - })) - ); - }, - Yb = (e, t, o) => - Dh.parts.items({ - preprocess: (n) => { - const s = H(n, o); - return "auto" !== e && e > 1 - ? qb({ tag: "div", classes: ["tox-collection__group"] }, e)(s) - : Xb(s, (e, o) => "separator" === t[o].type); - }, - }), - Kb = (e, t, o = !0) => ({ - dom: { - tag: "div", - classes: ["tox-menu", "tox-collection"].concat( - 1 === e ? ["tox-collection--list"] : ["tox-collection--grid"], - ), - }, - components: [Yb(e, t, w)], - }), - Jb = (e) => N(e, (e) => "icon" in e && void 0 !== e.icon), - Zb = (e) => (console.error(Kn(e)), console.log(e), A.none()), - Qb = (e, t, o, n, s) => { - const r = - ((a = o), - { - dom: { - tag: "div", - classes: ["tox-collection", "tox-collection--horizontal"], - }, - components: [ - Dh.parts.items({ - preprocess: (e) => Xb(e, (e, t) => "separator" === a[t].type), - }), - ], - }); - var a; - return { value: e, dom: r.dom, components: r.components, items: o }; - }, - ev = (e, t, o, n, s) => { - if ("color" === s.menuType) { - const t = ((e) => ({ - dom: { tag: "div", classes: ["tox-menu", "tox-swatches-menu"] }, - components: [ - { - dom: { tag: "div", classes: ["tox-swatches"] }, - components: [ - Dh.parts.items({ - preprocess: - "auto" !== e - ? qb({ tag: "div", classes: ["tox-swatches__row"] }, e) - : w, - }), - ], - }, - ], - }))(n); - return { value: e, dom: t.dom, components: t.components, items: o }; - } - if ("normal" === s.menuType && "auto" === n) { - const t = Kb(n, o); - return { value: e, dom: t.dom, components: t.components, items: o }; - } - if ("normal" === s.menuType || "searchable" === s.menuType) { - const t = - "searchable" !== s.menuType - ? Kb(n, o) - : "search-with-field" === s.searchMode.searchMode - ? ((e, t, o) => { - const n = la("aria-controls-search-results"); - return { - dom: { - tag: "div", - classes: ["tox-menu", "tox-collection"].concat( - 1 === e - ? ["tox-collection--list"] - : ["tox-collection--grid"], - ), - }, - components: [ - jb({ i18n: Gh.translate, placeholder: o.placeholder }), - { - dom: { - tag: "div", - classes: [ - ...(1 === e - ? ["tox-collection--list"] - : ["tox-collection--grid"]), - Gb, - ], - attributes: { id: n }, - }, - components: [Yb(e, t, $b)], - }, - ], - }; - })(n, o, s.searchMode) - : ((e, t, o = !0) => { - const n = la("aria-controls-search-results"); - return { - dom: { - tag: "div", - classes: ["tox-menu", "tox-collection", Gb].concat( - 1 === e - ? ["tox-collection--list"] - : ["tox-collection--grid"], - ), - attributes: { id: n }, - }, - components: [Yb(e, t, $b)], - }; - })(n, o); - return { value: e, dom: t.dom, components: t.components, items: o }; - } - if ("listpreview" === s.menuType && "auto" !== n) { - const t = ((e) => ({ - dom: { - tag: "div", - classes: [ - "tox-menu", - "tox-collection", - "tox-collection--toolbar", - "tox-collection--toolbar-lg", - ], - }, - components: [ - Dh.parts.items({ - preprocess: qb( - { tag: "div", classes: ["tox-collection__group"] }, - e, - ), - }), - ], - }))(n); - return { value: e, dom: t.dom, components: t.components, items: o }; - } - return { value: e, dom: Mb(t, n, s.menuType), components: Db, items: o }; - }, - tv = rs("type"), - ov = rs("name"), - nv = rs("label"), - sv = rs("text"), - rv = rs("title"), - av = rs("icon"), - iv = rs("value"), - lv = is("fetch"), - cv = is("getSubmenuItems"), - dv = is("onAction"), - uv = is("onItemAction"), - mv = Os("onSetup", () => b), - gv = ps("name"), - pv = ps("text"), - hv = ps("icon"), - fv = ps("tooltip"), - bv = ps("label"), - vv = ps("shortcut"), - yv = fs("select"), - xv = Cs("active", !1), - wv = Cs("borderless", !1), - Sv = Cs("enabled", !0), - kv = Cs("primary", !1), - Cv = (e) => ys("columns", e), - Ov = ys("meta", {}), - _v = Os("onAction", b), - Tv = (e) => Ss("type", e), - Ev = (e) => - Qn( - "name", - "name", - vn(() => la(`${e}-name`)), - Hn, - ), - Av = Dn([tv, pv]), - Mv = Dn([Tv("autocompleteitem"), xv, Sv, Ov, iv, pv, hv]), - Dv = [Sv, fv, hv, pv, mv], - Bv = Dn([tv, dv].concat(Dv)), - Fv = (e) => qn("toolbarbutton", Bv, e), - Iv = [xv].concat(Dv), - Rv = Dn(Iv.concat([tv, dv])), - Nv = (e) => qn("ToggleButton", Rv, e), - Vv = [ - Os("predicate", T), - ks("scope", "node", ["node", "editor"]), - ks("position", "selection", ["node", "selection", "line"]), - ], - zv = Dv.concat([Tv("contextformbutton"), kv, dv, es("original", w)]), - Hv = Iv.concat([Tv("contextformbutton"), kv, dv, es("original", w)]), - Lv = Dv.concat([Tv("contextformbutton")]), - Pv = Iv.concat([Tv("contextformtogglebutton")]), - Uv = Jn("type", { contextformbutton: zv, contextformtogglebutton: Hv }), - Wv = Dn( - [ - Tv("contextform"), - Os("initValue", x("")), - bv, - ds("commands", Uv), - ms( - "launch", - Jn("type", { contextformbutton: Lv, contextformtogglebutton: Pv }), - ), - ].concat(Vv), - ), - jv = Dn([Tv("contexttoolbar"), rs("items")].concat(Vv)), - Gv = [tv, rs("src"), ps("alt"), _s("classes", [], Hn)], - $v = Dn(Gv), - qv = [tv, sv, gv, _s("classes", ["tox-collection__item-label"], Hn)], - Xv = Dn(qv), - Yv = En(() => - jn("type", { cardimage: $v, cardtext: Xv, cardcontainer: Kv }), - ), - Kv = Dn([ - tv, - Ss("direction", "horizontal"), - Ss("align", "left"), - Ss("valign", "middle"), - ds("items", Yv), - ]), - Jv = [ - Sv, - pv, - vv, - ("menuitem", - Qn( - "value", - "value", - vn(() => la("menuitem-value")), - Nn(), - )), - Ov, - ]; - const Zv = Dn([tv, bv, ds("items", Yv), mv, _v].concat(Jv)), - Qv = Dn([tv, xv, hv].concat(Jv)), - ey = [tv, rs("fancytype"), _v], - ty = [ys("initData", {})].concat(ey), - oy = [ - fs("select"), - Ts("initData", {}, [ - Cs("allowCustomColors", !0), - Ss("storageKey", "default"), - bs("colors", Nn()), - ]), - ].concat(ey), - ny = Jn("fancytype", { inserttable: ty, colorswatch: oy }), - sy = Dn([tv, mv, _v, hv].concat(Jv)), - ry = Dn([tv, cv, mv, hv].concat(Jv)), - ay = Dn([tv, hv, xv, mv, dv].concat(Jv)), - iy = (e, t, o) => { - const n = Xc(e.element, "." + o); - if (n.length > 0) { - const e = $(n, (e) => { - const o = e.dom.getBoundingClientRect().top, - s = n[0].dom.getBoundingClientRect().top; - return Math.abs(o - s) > t; - }).getOr(n.length); - return A.some({ numColumns: e, numRows: Math.ceil(n.length / e) }); - } - return A.none(); - }, - ly = (e) => ((e, t) => kl([Jp(e, t)]))(la("unnamed-events"), e), - cy = la("tooltip.exclusive"), - dy = la("tooltip.show"), - uy = la("tooltip.hide"), - my = (e, t, o) => { - e.getSystem().broadcastOn([cy], {}); - }; - var gy = Object.freeze({ - __proto__: null, - hideAllExclusive: my, - setComponents: (e, t, o, n) => { - o.getTooltip().each((e) => { - e.getSystem().isConnected() && Kp.set(e, n); - }); - }, - }), - py = Object.freeze({ - __proto__: null, - events: (e, t) => { - const o = (o) => { - t.getTooltip().each((n) => { - Bd(n), e.onHide(o, n), t.clearTooltip(); - }), - t.clearTimer(); - }; - return Hr( - q([ - [ - Ur(dy, (o) => { - t.resetTimer(() => { - ((o) => { - if (!t.isShowing()) { - my(o); - const n = e.lazySink(o).getOrDie(), - s = o.getSystem().build({ - dom: e.tooltipDom, - components: e.tooltipComponents, - events: Hr( - "normal" === e.mode - ? [ - Ur(qs(), (e) => { - Fr(o, dy); - }), - Ur(Gs(), (e) => { - Fr(o, uy); - }), - ] - : [], - ), - behaviours: kl([Kp.config({})]), - }); - t.setTooltip(s), - Ad(n, s), - e.onShow(o, s), - Sd.position(n, s, { anchor: e.anchor(o) }); - } - })(o); - }, e.delay); - }), - Ur(uy, (n) => { - t.resetTimer(() => { - o(n); - }, e.delay); - }), - Ur(dr(), (e, t) => { - const n = t; - n.universal || (R(n.channels, cy) && o(e)); - }), - Jr((e) => { - o(e); - }), - ], - "normal" === e.mode - ? [ - Ur(Xs(), (e) => { - Fr(e, dy); - }), - Ur(lr(), (e) => { - Fr(e, uy); - }), - Ur(qs(), (e) => { - Fr(e, dy); - }), - Ur(Gs(), (e) => { - Fr(e, uy); - }), - ] - : [ - Ur(Dr(), (e, t) => { - Fr(e, dy); - }), - Ur(Br(), (e) => { - Fr(e, uy); - }), - ], - ]), - ); - }, - }), - hy = [ - os("lazySink"), - os("tooltipDom"), - ys("exclusive", !0), - ys("tooltipComponents", []), - ys("delay", 300), - ks("mode", "normal", ["normal", "follow-highlight"]), - ys("anchor", (e) => ({ - type: "hotspot", - hotspot: e, - layouts: { - onLtr: x([cl, ll, sl, al, rl, il]), - onRtl: x([cl, ll, sl, al, rl, il]), - }, - })), - Di("onHide"), - Di("onShow"), - ], - fy = Object.freeze({ - __proto__: null, - init: () => { - const e = Ql(), - t = Ql(), - o = () => { - e.on(clearTimeout); - }, - n = x("not-implemented"); - return _a({ - getTooltip: t.get, - isShowing: t.isSet, - setTooltip: t.set, - clearTooltip: t.clear, - clearTimer: o, - resetTimer: (t, n) => { - o(), e.set(setTimeout(t, n)); - }, - readState: n, - }); - }, - }); - const by = Ol({ - fields: hy, - name: "tooltipping", - active: py, - state: fy, - apis: gy, - }), - vy = "silver.readonly", - yy = Dn([("readonly", ns("readonly", Ln))]); - const xy = (e, t) => { - const o = e.mainUi.outerContainer.element, - n = [e.mainUi.mothership, ...e.uiMotherships]; - t && - L(n, (e) => { - e.broadcastOn([Yd()], { target: o }); - }), - L(n, (e) => { - e.broadcastOn([vy], { readonly: t }); - }); - }, - wy = (e, t) => { - e.on("init", () => { - e.mode.isReadOnly() && xy(t, !0); - }), - e.on("SwitchMode", () => xy(t, e.mode.isReadOnly())), - mf(e) && e.mode.set("readonly"); - }, - Sy = () => - Al.config({ - channels: { - [vy]: { - schema: yy, - onReceive: (e, t) => { - Rm.set(e, t.readonly); - }, - }, - }, - }), - ky = (e) => Rm.config({ disabled: e }), - Cy = (e) => Rm.config({ disabled: e, disableClass: "tox-tbtn--disabled" }), - Oy = (e) => - Rm.config({ - disabled: e, - disableClass: "tox-tbtn--disabled", - useNative: !1, - }), - _y = (e, t) => { - const o = e.getApi(t); - return (e) => { - e(o); - }; - }, - Ty = (e, t) => - Kr((o) => { - _y( - e, - o, - )((o) => { - const n = e.onSetup(o); - p(n) && t.set(n); - }); - }), - Ey = (e, t) => Jr((o) => _y(e, o)(t.get())), - Ay = (e, t) => - Qr((o, n) => { - _y(e, o)(e.onAction), - e.triggersSubmenu || - t !== pb.CLOSE_ON_EXECUTE || - (o.getSystem().isConnected() && Fr(o, hr()), n.stop()); - }), - My = { - [ur()]: ["disabling", "alloy.base.behaviour", "toggling", "item-events"], - }, - Dy = we, - By = (e, t, o, n) => { - const s = Es(b); - return { - type: "item", - dom: t.dom, - components: Dy(t.optComponents), - data: e.data, - eventOrder: My, - hasSubmenu: e.triggersSubmenu, - itemBehaviours: kl( - [ - Jp("item-events", [Ay(e, o), Ty(e, s), Ey(e, s)]), - ((r = () => !e.enabled || n.isDisabled()), - Rm.config({ - disabled: r, - disableClass: "tox-collection__item--state-disabled", - })), - Sy(), - Kp.config({}), - ].concat(e.itemBehaviours), - ), - }; - var r; - }, - Fy = (e) => ({ - value: e.value, - meta: { text: e.text.getOr(""), ...e.meta }, - }), - Iy = (e) => { - const t = lf.os.isMacOS() || lf.os.isiOS(), - o = t - ? { - alt: "\u2325", - ctrl: "\u2303", - shift: "\u21e7", - meta: "\u2318", - access: "\u2303\u2325", - } - : { meta: "Ctrl", access: "Shift+Alt" }, - n = e.split("+"), - s = H(n, (e) => { - const t = e.toLowerCase().trim(); - return ve(o, t) ? o[t] : e; - }); - return t ? s.join("") : s.join("+"); - }, - Ry = (e, t, o = [xb]) => ef(e, { tag: "div", classes: o }, t), - Ny = (e) => ({ - dom: { tag: "div", classes: [wb] }, - components: [ti(Gh.translate(e))], - }), - Vy = (e, t) => ({ dom: { tag: "div", classes: t, innerHtml: e } }), - zy = (e, t) => ({ - dom: { tag: "div", classes: [wb] }, - components: [ - { - dom: { tag: e.tag, styles: e.styles }, - components: [ti(Gh.translate(t))], - }, - ], - }), - Hy = (e) => ({ - dom: { tag: "div", classes: ["tox-collection__item-accessory"] }, - components: [ti(Iy(e))], - }), - Ly = (e) => Ry("checkmark", e, ["tox-collection__item-checkmark"]), - Py = (e) => { - const t = e - .map((e) => ({ - attributes: { title: Gh.translate(e), id: la("menu-item") }, - })) - .getOr({}); - return { tag: "div", classes: [hb, fb], ...t }; - }, - Uy = (e, t, o, n = A.none()) => - "color" === e.presets - ? ((e, t, o) => { - const n = e.ariaLabel, - s = e.value, - r = e.iconContent.map((e) => - ((e, t, o) => { - const n = t(); - return Kh(e, n).or(o).getOrThunk(Xh(n)); - })(e, t.icons, o), - ); - return { - dom: (() => { - const e = bb, - o = r.getOr(""), - a = n.map((e) => ({ title: t.translate(e) })).getOr({}), - i = { tag: "div", attributes: a, classes: [e] }; - return "custom" === s - ? { - ...i, - tag: "button", - classes: [...i.classes, "tox-swatches__picker-btn"], - innerHtml: o, - } - : "remove" === s - ? { - ...i, - classes: [...i.classes, "tox-swatch--remove"], - innerHtml: o, - } - : g(s) - ? { - ...i, - attributes: { ...i.attributes, "data-mce-color": s }, - styles: { "background-color": s }, - innerHtml: o, - } - : i; - })(), - optComponents: [], - }; - })(e, t, n) - : ((e, t, o, n) => { - const s = { tag: "div", classes: [xb] }, - r = o - ? e.iconContent - .map((e) => ef(e, s, t.icons, n)) - .orThunk(() => A.some({ dom: s })) - : A.none(), - a = e.checkMark, - i = A.from(e.meta).fold( - () => Ny, - (e) => (ve(e, "style") ? k(zy, e.style) : Ny), - ), - l = e.htmlContent.fold( - () => e.textContent.map(i), - (e) => A.some(Vy(e, [wb])), - ); - return { - dom: Py(e.ariaLabel), - optComponents: [r, l, e.shortcutContent.map(Hy), a, e.caret], - }; - })(e, t, o, n), - Wy = (e, t) => - be(e, "tooltipWorker") - .map((e) => [ - by.config({ - lazySink: t.getSink, - tooltipDom: { - tag: "div", - classes: ["tox-tooltip-worker-container"], - }, - tooltipComponents: [], - anchor: (e) => ({ - type: "submenu", - item: e, - overrides: { maxHeightFunction: cc }, - }), - mode: "follow-highlight", - onShow: (t, o) => { - e((e) => { - by.setComponents(t, [oi({ element: Ve(e) })]); - }); - }, - }), - ]) - .getOr([]), - jy = (e, t) => { - const o = ((e) => rf.DOM.encode(e))(Gh.translate(e)); - if (t.length > 0) { - const e = new RegExp( - ((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"))(t), - "gi", - ); - return o.replace( - e, - (e) => `${e}`, - ); - } - return o; - }, - Gy = (e, t) => - H(e, (e) => { - switch (e.type) { - case "cardcontainer": - return ((e, t) => { - const o = - "vertical" === e.direction - ? "tox-collection__item-container--column" - : Ob, - n = - "left" === e.align - ? "tox-collection__item-container--align-left" - : "tox-collection__item-container--align-right"; - return { - dom: { - tag: "div", - classes: [ - Cb, - o, - n, - (() => { - switch (e.valign) { - case "top": - return "tox-collection__item-container--valign-top"; - case "middle": - return "tox-collection__item-container--valign-middle"; - case "bottom": - return "tox-collection__item-container--valign-bottom"; - } - })(), - ], - }, - components: t, - }; - })(e, Gy(e.items, t)); - case "cardimage": - return ((e, t, o) => ({ - dom: { - tag: "img", - classes: t, - attributes: { src: e, alt: o.getOr("") }, - }, - }))(e.src, e.classes, e.alt); - case "cardtext": - const o = e.name.exists((e) => R(t.cardText.highlightOn, e)), - n = o ? A.from(t.cardText.matchText).getOr("") : ""; - return Vy(jy(e.text, n), e.classes); - } - }), - $y = Yu(Ch(), Oh()), - qy = (e) => ({ value: Jy(e) }), - Xy = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, - Yy = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, - Ky = (e) => Xy.test(e) || Yy.test(e), - Jy = (e) => _e(e, "#").toUpperCase(), - Zy = (e) => { - const t = e.toString(16); - return (1 === t.length ? "0" + t : t).toUpperCase(); - }, - Qy = (e) => { - const t = Zy(e.red) + Zy(e.green) + Zy(e.blue); - return qy(t); - }, - ex = Math.min, - tx = Math.max, - ox = Math.round, - nx = /^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i, - sx = - /^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i, - rx = (e, t, o, n) => ({ red: e, green: t, blue: o, alpha: n }), - ax = (e) => { - const t = parseInt(e, 10); - return t.toString() === e && t >= 0 && t <= 255; - }, - ix = (e) => { - let t, o, n; - const s = (e.hue || 0) % 360; - let r = e.saturation / 100, - a = e.value / 100; - if (((r = tx(0, ex(r, 1))), (a = tx(0, ex(a, 1))), 0 === r)) - return (t = o = n = ox(255 * a)), rx(t, o, n, 1); - const i = s / 60, - l = a * r, - c = l * (1 - Math.abs((i % 2) - 1)), - d = a - l; - switch (Math.floor(i)) { - case 0: - (t = l), (o = c), (n = 0); - break; - case 1: - (t = c), (o = l), (n = 0); - break; - case 2: - (t = 0), (o = l), (n = c); - break; - case 3: - (t = 0), (o = c), (n = l); - break; - case 4: - (t = c), (o = 0), (n = l); - break; - case 5: - (t = l), (o = 0), (n = c); - break; - default: - t = o = n = 0; - } - return ( - (t = ox(255 * (t + d))), - (o = ox(255 * (o + d))), - (n = ox(255 * (n + d))), - rx(t, o, n, 1) - ); - }, - lx = (e) => { - const t = ((e) => { - const t = ((e) => { - const t = e.value.replace( - Xy, - (e, t, o, n) => t + t + o + o + n + n, - ); - return { value: t }; - })(e), - o = Yy.exec(t.value); - return null === o ? ["FFFFFF", "FF", "FF", "FF"] : o; - })(e), - o = parseInt(t[1], 16), - n = parseInt(t[2], 16), - s = parseInt(t[3], 16); - return rx(o, n, s, 1); - }, - cx = (e, t, o, n) => { - const s = parseInt(e, 10), - r = parseInt(t, 10), - a = parseInt(o, 10), - i = parseFloat(n); - return rx(s, r, a, i); - }, - dx = (e) => { - if ("transparent" === e) return A.some(rx(0, 0, 0, 0)); - const t = nx.exec(e); - if (null !== t) return A.some(cx(t[1], t[2], t[3], "1")); - const o = sx.exec(e); - return null !== o ? A.some(cx(o[1], o[2], o[3], o[4])) : A.none(); - }, - ux = (e) => `rgba(${e.red},${e.green},${e.blue},${e.alpha})`, - mx = rx(255, 0, 0, 1), - gx = (e, t) => { - e.dispatch("ResizeContent", t); - }, - px = (e, t) => { - e.dispatch("TextColorChange", t); - }, - hx = (e, t) => - e.dispatch("ResolveName", { name: t.nodeName.toLowerCase(), target: t }), - fx = (e, t) => () => { - e(), t(); - }, - bx = (e) => - yx(e, "NodeChange", (t) => { - t.setEnabled(e.selection.isEditable()); - }), - vx = (e, t) => (o) => { - const n = bx(e)(o), - s = ((e, t) => (o) => { - const n = Zl(), - s = () => { - o.setActive(e.formatter.match(t)); - const s = e.formatter.formatChanged(t, o.setActive); - n.set(s); - }; - return ( - e.initialized ? s() : e.once("init", s), - () => { - e.off("init", s), n.clear(); - } - ); - })( - e, - t, - )(o); - return () => { - n(), s(); - }; - }, - yx = (e, t, o) => (n) => { - const s = () => o(n), - r = () => { - o(n), e.on(t, s); - }; - return ( - e.initialized ? r() : e.once("init", r), - () => { - e.off("init", r), e.off(t, s); - } - ); - }, - xx = (e) => (t) => () => { - e.undoManager.transact(() => { - e.focus(), e.execCommand("mceToggleFormat", !1, t.format); - }); - }, - wx = (e, t) => () => e.execCommand(t); - var Sx = tinymce.util.Tools.resolve("tinymce.util.LocalStorage"); - const kx = {}, - Cx = (e) => - be(kx, e).getOrThunk(() => { - const t = `tinymce-custom-colors-${e}`, - o = Sx.getItem(t); - if (m(o)) { - const e = Sx.getItem("tinymce-custom-colors"); - Sx.setItem(t, g(e) ? e : "[]"); - } - const n = ((e, t = 10) => { - const o = Sx.getItem(e), - n = r(o) ? JSON.parse(o) : [], - s = t - (a = n).length < 0 ? a.slice(0, t) : a; - var a; - const i = (e) => { - s.splice(e, 1); - }; - return { - add: (o) => { - I(s, o).each(i), - s.unshift(o), - s.length > t && s.pop(), - Sx.setItem(e, JSON.stringify(s)); - }, - state: () => s.slice(0), - }; - })(t, 10); - return (kx[e] = n), n; - }), - Ox = (e, t) => { - Cx(e).add(t); - }, - _x = (e, t, o) => ({ hue: e, saturation: t, value: o }), - Tx = (e) => { - let t = 0, - o = 0, - n = 0; - const s = e.red / 255, - r = e.green / 255, - a = e.blue / 255, - i = Math.min(s, Math.min(r, a)), - l = Math.max(s, Math.max(r, a)); - return i === l - ? ((n = i), _x(0, 0, 100 * n)) - : ((t = s === i ? 3 : a === i ? 1 : 5), - (t = - 60 * (t - (s === i ? r - a : a === i ? s - r : a - s) / (l - i))), - (o = (l - i) / l), - (n = l), - _x(Math.round(t), Math.round(100 * o), Math.round(100 * n))); - }, - Ex = (e) => Qy(ix(e)), - Ax = (e) => { - return ((t = e), Ky(t) ? A.some({ value: Jy(t) }) : A.none()) - .orThunk(() => dx(e).map(Qy)) - .getOrThunk(() => { - const t = document.createElement("canvas"); - (t.height = 1), (t.width = 1); - const o = t.getContext("2d"); - o.clearRect(0, 0, t.width, t.height), - (o.fillStyle = "#FFFFFF"), - (o.fillStyle = e), - o.fillRect(0, 0, 1, 1); - const n = o.getImageData(0, 0, 1, 1).data, - s = n[0], - r = n[1], - a = n[2], - i = n[3]; - return Qy(rx(s, r, a, i)); - }); - var t; - }, - Mx = "forecolor", - Dx = "hilitecolor", - Bx = (e) => { - const t = []; - for (let o = 0; o < e.length; o += 2) - t.push({ - text: e[o + 1], - value: "#" + Ax(e[o]).value, - icon: "checkmark", - type: "choiceitem", - }); - return t; - }, - Fx = (e) => (t) => t.options.get(e), - Ix = "#000000", - Rx = (e, t) => - t === Mx && e.options.isSet("color_map_foreground") - ? Fx("color_map_foreground")(e) - : t === Dx && e.options.isSet("color_map_background") - ? Fx("color_map_background")(e) - : Fx("color_map")(e), - Nx = (e, t = "default") => - Math.max(5, Math.ceil(Math.sqrt(Rx(e, t).length))), - Vx = (e, t) => { - const o = Fx("color_cols")(e), - n = Nx(e, t); - return o === Nx(e) ? n : o; - }, - zx = (e, t = "default") => - Math.round( - t === Mx - ? Fx("color_cols_foreground")(e) - : t === Dx - ? Fx("color_cols_background")(e) - : Fx("color_cols")(e), - ), - Hx = Fx("custom_colors"), - Lx = Fx("color_default_foreground"), - Px = Fx("color_default_background"), - Ux = (e, t) => { - const o = Ve(e.selection.getStart()), - n = - "hilitecolor" === t - ? Is(o, (e) => { - if (Ge(e)) { - const t = It(e, "background-color"); - return Ce( - dx(t).exists((e) => 0 !== e.alpha), - t, - ); - } - return A.none(); - }).getOr("rgba(0, 0, 0, 0)") - : It(o, "color"); - return dx(n).map((e) => "#" + Qy(e).value); - }, - Wx = (e) => { - const t = "choiceitem", - o = { - type: t, - text: "Remove color", - icon: "color-swatch-remove-color", - value: "remove", - }; - return e - ? [ - o, - { - type: t, - text: "Custom color", - icon: "color-picker", - value: "custom", - }, - ] - : [o]; - }, - jx = (e, t, o, n) => { - "custom" === o - ? Jx(e)((o) => { - o.each((o) => { - Ox(t, o), e.execCommand("mceApplyTextcolor", t, o), n(o); - }); - }, Ux(e, t).getOr(Ix)) - : "remove" === o - ? (n(""), e.execCommand("mceRemoveTextcolor", t)) - : (n(o), e.execCommand("mceApplyTextcolor", t, o)); - }, - Gx = (e, t, o) => - e.concat( - ((e) => - H(Cx(e).state(), (e) => ({ - type: "choiceitem", - text: e, - icon: "checkmark", - value: e, - })))(t).concat(Wx(o)), - ), - $x = (e, t, o) => (n) => { - n(Gx(e, t, o)); - }, - qx = (e, t, o) => { - const n = - "forecolor" === t - ? "tox-icon-text-color__color" - : "tox-icon-highlight-bg-color__color"; - e.setIconFill(n, o); - }, - Xx = (e, t) => (o) => { - const n = Ux(e, t); - return xe(n, o.toUpperCase()); - }, - Yx = (e, t, o, n, s) => { - e.ui.registry.addSplitButton(t, { - tooltip: n, - presets: "color", - icon: "forecolor" === t ? "text-color" : "highlight-bg-color", - select: Xx(e, o), - columns: zx(e, o), - fetch: $x(Rx(e, o), o, Hx(e)), - onAction: (t) => { - jx(e, o, s.get(), b); - }, - onItemAction: (n, r) => { - jx(e, o, r, (o) => { - s.set(o), px(e, { name: t, color: o }); - }); - }, - onSetup: (o) => { - qx(o, t, s.get()); - const n = (e) => { - e.name === t && qx(o, e.name, e.color); - }; - return ( - e.on("TextColorChange", n), - fx(bx(e)(o), () => { - e.off("TextColorChange", n); - }) - ); - }, - }); - }, - Kx = (e, t, o, n, s) => { - e.ui.registry.addNestedMenuItem(t, { - text: n, - icon: "forecolor" === t ? "text-color" : "highlight-bg-color", - onSetup: (o) => (qx(o, t, s.get()), bx(e)(o)), - getSubmenuItems: () => [ - { - type: "fancymenuitem", - fancytype: "colorswatch", - select: Xx(e, o), - initData: { storageKey: o }, - onAction: (n) => { - jx(e, o, n.value, (o) => { - s.set(o), px(e, { name: t, color: o }); - }); - }, - }, - ], - }); - }, - Jx = (e) => (t, o) => { - let n = !1; - const s = { colorpicker: o }; - e.windowManager.open({ - title: "Color Picker", - size: "normal", - body: { - type: "panel", - items: [{ type: "colorpicker", name: "colorpicker", label: "Color" }], - }, - buttons: [ - { type: "cancel", name: "cancel", text: "Cancel" }, - { type: "submit", name: "save", text: "Save", primary: !0 }, - ], - initialData: s, - onAction: (e, t) => { - "hex-valid" === t.name && (n = t.value); - }, - onSubmit: (o) => { - const s = o.getData().colorpicker; - n - ? (t(A.from(s)), o.close()) - : e.windowManager.alert( - e.translate(["Invalid hex color code: {0}", s]), - ); - }, - onClose: b, - onCancel: () => { - t(A.none()); - }, - }); - }, - Zx = (e, t, o, n, s, r, a, i) => { - const l = Jb(t), - c = Qx(t, o, n, "color" !== s ? "normal" : "color", r, a, i); - return ev(e, l, c, n, { menuType: s }); - }, - Qx = (e, t, o, n, s, r, a) => - we( - H(e, (i) => { - return "choiceitem" === i.type - ? ((l = i), qn("choicemenuitem", Qv, l)).fold(Zb, (i) => - A.some( - ((e, t, o, n, s, r, a, i = !0) => { - const l = Uy( - { - presets: o, - textContent: t ? e.text : A.none(), - htmlContent: A.none(), - ariaLabel: e.text, - iconContent: e.icon, - shortcutContent: t ? e.shortcut : A.none(), - checkMark: t ? A.some(Ly(a.icons)) : A.none(), - caret: A.none(), - value: e.value, - }, - a, - i, - ); - return fn( - By( - { - data: Fy(e), - enabled: e.enabled, - getApi: (e) => ({ - setActive: (t) => { - dh.set(e, t); - }, - isActive: () => dh.isOn(e), - isEnabled: () => !Rm.isDisabled(e), - setEnabled: (t) => Rm.set(e, !t), - }), - onAction: (t) => n(e.value), - onSetup: (e) => (e.setActive(s), b), - triggersSubmenu: !1, - itemBehaviours: [], - }, - l, - r, - a, - ), - { - toggling: { - toggleClass: yb, - toggleOnExecute: !1, - selected: e.active, - exclusive: !0, - }, - }, - ); - })(i, 1 === o, n, t, r(i.value), s, a, Jb(e)), - ), - ) - : A.none(); - var l; - }), - ), - ew = (e, t) => { - const o = Ab(t); - return 1 === e - ? { mode: "menu", moveOnTab: !0 } - : "auto" === e - ? { - mode: "grid", - selector: "." + o.item, - initSize: { numColumns: 1, numRows: 1 }, - } - : { - mode: "matrix", - rowSelector: - "." + - ("color" === t ? "tox-swatches__row" : "tox-collection__group"), - previousSelector: (e) => - "color" === t ? pi(e.element, "[aria-checked=true]") : A.none(), - }; - }, - tw = la("cell-over"), - ow = la("cell-execute"), - nw = (e, t, o) => { - const n = (o) => Ir(o, ow, { row: e, col: t }), - s = (e, t) => { - t.stop(), n(e); - }; - return ri({ - dom: { tag: "div", attributes: { role: "button", "aria-label": o } }, - behaviours: kl([ - Jp("insert-table-picker-cell", [ - Ur(qs(), oh.focus), - Ur(ur(), n), - Ur(er(), s), - Ur(gr(), s), - ]), - dh.config({ - toggleClass: "tox-insert-table-picker__selected", - toggleOnExecute: !1, - }), - oh.config({ onFocus: (o) => Ir(o, tw, { row: e, col: t }) }), - ]), - }); - }, - sw = (e) => X(e, (e) => H(e, ai)), - rw = (e, t) => ti(`${t}x${e}`), - aw = { - inserttable: (e, t) => { - const o = ( - (e) => (t, o) => - e.shared.providers.translate(`${o} columns, ${t} rows`) - )(t), - n = ((e, t, o) => { - const n = []; - for (let t = 0; t < 10; t++) { - const o = []; - for (let n = 0; n < 10; n++) { - const s = e(t + 1, n + 1); - o.push(nw(t, n, s)); - } - n.push(o); - } - return n; - })(o), - s = rw(0, 0), - r = jh({ - dom: { tag: "span", classes: ["tox-insert-table-picker__label"] }, - components: [s], - behaviours: kl([Kp.config({})]), - }); - return { - type: "widget", - data: { value: la("widget-id") }, - dom: { tag: "div", classes: ["tox-fancymenuitem"] }, - autofocus: !0, - components: [ - $y.widget({ - dom: { tag: "div", classes: ["tox-insert-table-picker"] }, - components: sw(n).concat(r.asSpec()), - behaviours: kl([ - Jp("insert-table-picker", [ - Kr((e) => { - Kp.set(r.get(e), [s]); - }), - $r(tw, (e, t, o) => { - const { row: s, col: a } = o.event; - ((e, t, o, n, s) => { - for (let n = 0; n < 10; n++) - for (let s = 0; s < 10; s++) - dh.set(e[n][s], n <= t && s <= o); - })(n, s, a), - Kp.set(r.get(e), [rw(s + 1, a + 1)]); - }), - $r(ow, (t, o, n) => { - const { row: s, col: r } = n.event; - e.onAction({ numRows: s + 1, numColumns: r + 1 }), - Fr(t, hr()); - }), - ]), - Pp.config({ - initSize: { numRows: 10, numColumns: 10 }, - mode: "flatgrid", - selector: '[role="button"]', - }), - ]), - }), - ], - }; - }, - colorswatch: (e, t) => { - const o = ((e, t) => { - const o = - e.initData.allowCustomColors && t.colorinput.hasCustomColors(); - return e.initData.colors.fold( - () => - Gx( - t.colorinput.getColors(e.initData.storageKey), - e.initData.storageKey, - o, - ), - (e) => e.concat(Wx(o)), - ); - })(e, t), - n = t.colorinput.getColorCols(e.initData.storageKey), - s = "color", - r = { - ...Zx( - la("menu-value"), - o, - (t) => { - e.onAction({ value: t }); - }, - n, - s, - pb.CLOSE_ON_EXECUTE, - e.select.getOr(T), - t.shared.providers, - ), - markers: Ab(s), - movement: ew(n, s), - }; - return { - type: "widget", - data: { value: la("widget-id") }, - dom: { tag: "div", classes: ["tox-fancymenuitem"] }, - autofocus: !0, - components: [$y.widget(Dh.sketch(r))], - }; - }, - }, - iw = (e) => ({ - type: "separator", - dom: { tag: "div", classes: [fb, "tox-collection__group-heading"] }, - components: e.text.map(ti).toArray(), - }); - var lw = Object.freeze({ - __proto__: null, - getCoupled: (e, t, o, n) => o.getOrCreate(e, t, n), - getExistingCoupled: (e, t, o, n) => o.getExisting(e, t, n), - }), - cw = [ns("others", $n(sn.value, Nn()))], - dw = Object.freeze({ - __proto__: null, - init: () => { - const e = {}, - t = (t, o) => { - if (0 === ae(t.others).length) - throw new Error("Cannot find any known coupled components"); - return be(e, o); - }, - o = x({}); - return _a({ - readState: o, - getExisting: (e, o, n) => - t(o, n).orThunk( - () => ( - be(o.others, n).getOrDie( - "No information found for coupled component: " + n, - ), - A.none() - ), - ), - getOrCreate: (o, n, s) => - t(n, s).getOrThunk(() => { - const t = be(n.others, s).getOrDie( - "No information found for coupled component: " + s, - )(o), - r = o.getSystem().build(t); - return (e[s] = r), r; - }), - }); - }, - }); - const uw = Ol({ fields: cw, name: "coupling", apis: lw, state: dw }), - mw = (e) => { - let t = A.none(), - o = []; - const n = (e) => { - s() ? r(e) : o.push(e); - }, - s = () => t.isSome(), - r = (e) => { - t.each((t) => { - setTimeout(() => { - e(t); - }, 0); - }); - }; - return ( - e((e) => { - s() || ((t = A.some(e)), L(o, r), (o = [])); - }), - { - get: n, - map: (e) => - mw((t) => { - n((o) => { - t(e(o)); - }); - }), - isReady: s, - } - ); - }, - gw = { - nu: mw, - pure: (e) => - mw((t) => { - t(e); - }), - }, - pw = (e) => { - setTimeout(() => { - throw e; - }, 0); - }, - hw = (e) => { - const t = (t) => { - e().then(t, pw); - }; - return { - map: (t) => hw(() => e().then(t)), - bind: (t) => hw(() => e().then((e) => t(e).toPromise())), - anonBind: (t) => hw(() => e().then(() => t.toPromise())), - toLazy: () => gw.nu(t), - toCached: () => { - let t = null; - return hw(() => (null === t && (t = e()), t)); - }, - toPromise: e, - get: t, - }; - }, - fw = (e) => hw(() => new Promise(e)), - bw = (e) => hw(() => Promise.resolve(e)), - vw = x("sink"), - yw = x( - ju({ - name: vw(), - overrides: x({ - dom: { tag: "div" }, - behaviours: kl([Sd.config({ useFixed: E })]), - events: Hr([qr(Ks()), qr(Ws()), qr(er())]), - }), - }), - ), - xw = (e, t) => { - const o = e.getHotspot(t).getOr(t), - n = "hotspot", - s = e.getAnchorOverrides(); - return e.layouts.fold( - () => ({ type: n, hotspot: o, overrides: s }), - (e) => ({ type: n, hotspot: o, overrides: s, layouts: e }), - ); - }, - ww = (e, t, o, n, s, r, a) => { - const i = ((e, t, o, n, s, r, a) => { - const i = ((e, t, o) => (0, e.fetch)(o).map(t))(e, t, n), - l = Cw(n, e); - return i.map((e) => - e.bind((e) => - A.from( - Lh.sketch({ - ...r.menu(), - uid: ha(""), - data: e, - highlightOnOpen: a, - onOpenMenu: (e, t) => { - const n = l().getOrDie(); - Sd.position(n, t, { anchor: o }), Xd.decloak(s); - }, - onOpenSubmenu: (e, t, o) => { - const n = l().getOrDie(); - Sd.position(n, o, { anchor: { type: "submenu", item: t } }), - Xd.decloak(s); - }, - onRepositionMenu: (e, t, n) => { - const s = l().getOrDie(); - Sd.position(s, t, { anchor: o }), - L(n, (e) => { - Sd.position(s, e.triggeredMenu, { - anchor: { type: "submenu", item: e.triggeringItem }, - }); - }); - }, - onEscape: () => (oh.focus(n), Xd.close(s), A.some(!0)), - }), - ), - ), - ); - })(e, t, xw(e, o), o, n, s, a); - return i.map( - (e) => ( - e.fold( - () => { - Xd.isOpen(n) && Xd.close(n); - }, - (e) => { - Xd.cloak(n), Xd.open(n, e), r(n); - }, - ), - n - ), - ); - }, - Sw = (e, t, o, n, s, r, a) => (Xd.close(n), bw(n)), - kw = (e, t, o, n, s, r) => { - const a = uw.getCoupled(o, "sandbox"); - return (Xd.isOpen(a) ? Sw : ww)(e, t, o, a, n, s, r); - }, - Cw = (e, t) => - e - .getSystem() - .getByUid(t.uid + "-" + vw()) - .map((e) => () => sn.value(e)) - .getOrThunk(() => - t.lazySink.fold( - () => () => - sn.error( - new Error( - "No internal sink is specified, nor could an external sink be found", - ), - ), - (t) => () => t(e), - ), - ), - Ow = (e) => { - Xd.getState(e).each((e) => { - Lh.repositionMenus(e); - }); - }, - _w = (e, t, o) => { - const n = bi(), - s = Cw(t, e); - return { - dom: { - tag: "div", - classes: e.sandboxClasses, - attributes: { id: n.id, role: "listbox" }, - }, - behaviours: yu(e.sandboxBehaviours, [ - pu.config({ store: { mode: "memory", initialValue: t } }), - Xd.config({ - onOpen: (s, r) => { - const a = xw(e, t); - n.link(t.element), - e.matchWidth && - ((e, t, o) => { - const n = wm.getCurrent(t).getOr(t), - s = Jt(e.element); - o - ? Dt(n.element, "min-width", s + "px") - : ((e, t) => { - Kt.set(e, t); - })(n.element, s); - })(a.hotspot, r, e.useMinWidth), - e.onOpen(a, s, r), - void 0 !== o && void 0 !== o.onOpen && o.onOpen(s, r); - }, - onClose: (e, s) => { - n.unlink(t.element), - void 0 !== o && void 0 !== o.onClose && o.onClose(e, s); - }, - isPartOf: (e, o, n) => vi(o, n) || vi(t, n), - getAttachPoint: () => s().getOrDie(), - }), - wm.config({ - find: (e) => Xd.getState(e).bind((e) => wm.getCurrent(e)), - }), - Al.config({ - channels: { - ...Qd({ isExtraPart: T }), - ...tu({ doReposition: Ow }), - }, - }), - ]), - }; - }, - Tw = (e) => { - const t = uw.getCoupled(e, "sandbox"); - Ow(t); - }, - Ew = () => [ - ys("sandboxClasses", []), - vu("sandboxBehaviours", [wm, Al, Xd, pu]), - ], - Aw = x( - [ - os("dom"), - os("fetch"), - Di("onOpen"), - Bi("onExecute"), - ys("getHotspot", A.some), - ys("getAnchorOverrides", x({})), - wc(), - hu("dropdownBehaviours", [dh, uw, Pp, oh]), - os("toggleClass"), - ys("eventOrder", {}), - us("lazySink"), - ys("matchWidth", !1), - ys("useMinWidth", !1), - us("role"), - ].concat(Ew()), - ), - Mw = x([ - Wu({ - schema: [Ei(), ys("fakeFocus", !1)], - name: "menu", - defaults: (e) => ({ onExecute: e.onExecute }), - }), - yw(), - ]), - Dw = bm({ - name: "Dropdown", - configFields: Aw(), - partFields: Mw(), - factory: (e, t, o, n) => { - const s = (e) => { - Xd.getState(e).each((e) => { - Lh.highlightPrimary(e); - }); - }, - r = (t, o, s) => kw(e, w, t, n, o, s), - a = { - expand: (e) => { - dh.isOn(e) || r(e, b, zh.HighlightNone).get(b); - }, - open: (e) => { - dh.isOn(e) || r(e, b, zh.HighlightMenuAndItem).get(b); - }, - refetch: (t) => - uw.getExistingCoupled(t, "sandbox").fold( - () => r(t, b, zh.HighlightMenuAndItem).map(b), - (o) => ww(e, w, t, o, n, b, zh.HighlightMenuAndItem).map(b), - ), - isOpen: dh.isOn, - close: (e) => { - dh.isOn(e) && r(e, b, zh.HighlightMenuAndItem).get(b); - }, - repositionMenus: (e) => { - dh.isOn(e) && Tw(e); - }, - }, - i = (e, t) => (Rr(e), A.some(!0)); - return { - uid: e.uid, - dom: e.dom, - components: t, - behaviours: bu(e.dropdownBehaviours, [ - dh.config({ - toggleClass: e.toggleClass, - aria: { mode: "expanded" }, - }), - uw.config({ - others: { - sandbox: (t) => - _w(e, t, { - onOpen: () => dh.on(t), - onClose: () => dh.off(t), - }), - }, - }), - Pp.config({ - mode: "special", - onSpace: i, - onEnter: i, - onDown: (e, t) => { - if (Dw.isOpen(e)) { - const t = uw.getCoupled(e, "sandbox"); - s(t); - } else Dw.open(e); - return A.some(!0); - }, - onEscape: (e, t) => - Dw.isOpen(e) ? (Dw.close(e), A.some(!0)) : A.none(), - }), - oh.config({}), - ]), - events: mh( - A.some((e) => { - r(e, s, zh.HighlightMenuAndItem).get(b); - }), - ), - eventOrder: { - ...e.eventOrder, - [ur()]: ["disabling", "toggling", "alloy.base.behaviour"], - }, - apis: a, - domModification: { - attributes: { - "aria-haspopup": "true", - ...e.role.fold( - () => ({}), - (e) => ({ role: e }), - ), - ...("button" === e.dom.tag - ? { - type: ("type", - be(e.dom, "attributes").bind((e) => be(e, "type"))).getOr( - "button", - ), - } - : {}), - }, - }, - }; - }, - apis: { - open: (e, t) => e.open(t), - refetch: (e, t) => e.refetch(t), - expand: (e, t) => e.expand(t), - close: (e, t) => e.close(t), - isOpen: (e, t) => e.isOpen(t), - repositionMenus: (e, t) => e.repositionMenus(t), - }, - }), - Bw = (e, t, o) => { - Ub(e).each((e) => { - var n; - ((e, t) => { - _t(t.element, "id").each((t) => - kt(e.element, "aria-activedescendant", t), - ); - })(e, o), - (Ua((n = t).element, Gb) - ? A.some(n.element) - : pi(n.element, "." + Gb) - ).each((t) => { - _t(t, "id").each((t) => kt(e.element, "aria-controls", t)); - }); - }), - kt(o.element, "aria-selected", "true"); - }, - Fw = (e, t, o) => { - kt(o.element, "aria-selected", "false"); - }, - Iw = (e) => - uw - .getExistingCoupled(e, "sandbox") - .bind(Pb) - .map(Wb) - .map((e) => e.fetchPattern) - .getOr(""); - var Rw; - !(function (e) { - (e[(e.ContentFocus = 0)] = "ContentFocus"), - (e[(e.UiFocus = 1)] = "UiFocus"); - })(Rw || (Rw = {})); - const Nw = (e, t, o, n, s) => { - const r = o.shared.providers, - a = (e) => - s - ? { - ...e, - shortcut: A.none(), - icon: e.text.isSome() ? A.none() : e.icon, - } - : e; - switch (e.type) { - case "menuitem": - return ((i = e), qn("menuitem", sy, i)).fold(Zb, (e) => - A.some( - ((e, t, o, n = !0) => { - const s = Uy( - { - presets: "normal", - iconContent: e.icon, - textContent: e.text, - htmlContent: A.none(), - ariaLabel: e.text, - caret: A.none(), - checkMark: A.none(), - shortcutContent: e.shortcut, - }, - o, - n, - ); - return By( - { - data: Fy(e), - getApi: (e) => ({ - isEnabled: () => !Rm.isDisabled(e), - setEnabled: (t) => Rm.set(e, !t), - }), - enabled: e.enabled, - onAction: e.onAction, - onSetup: e.onSetup, - triggersSubmenu: !1, - itemBehaviours: [], - }, - s, - t, - o, - ); - })(a(e), t, r, n), - ), - ); - case "nestedmenuitem": - return ((e) => qn("nestedmenuitem", ry, e))(e).fold(Zb, (e) => - A.some( - ((e, t, o, n = !0, s = !1) => { - const r = s - ? ((a = o.icons), Ry("chevron-down", a, [Sb])) - : ((e) => Ry("chevron-right", e, [Sb]))(o.icons); - var a; - const i = Uy( - { - presets: "normal", - iconContent: e.icon, - textContent: e.text, - htmlContent: A.none(), - ariaLabel: e.text, - caret: A.some(r), - checkMark: A.none(), - shortcutContent: e.shortcut, - }, - o, - n, - ); - return By( - { - data: Fy(e), - getApi: (e) => ({ - isEnabled: () => !Rm.isDisabled(e), - setEnabled: (t) => Rm.set(e, !t), - setIconFill: (t, o) => { - pi( - e.element, - `svg path[class="${t}"], rect[class="${t}"]`, - ).each((e) => { - kt(e, "fill", o); - }); - }, - }), - enabled: e.enabled, - onAction: b, - onSetup: e.onSetup, - triggersSubmenu: !0, - itemBehaviours: [], - }, - i, - t, - o, - ); - })(a(e), t, r, n, s), - ), - ); - case "togglemenuitem": - return ((e) => qn("togglemenuitem", ay, e))(e).fold(Zb, (e) => - A.some( - ((e, t, o, n = !0) => { - const s = Uy( - { - iconContent: e.icon, - textContent: e.text, - htmlContent: A.none(), - ariaLabel: e.text, - checkMark: A.some(Ly(o.icons)), - caret: A.none(), - shortcutContent: e.shortcut, - presets: "normal", - meta: e.meta, - }, - o, - n, - ); - return fn( - By( - { - data: Fy(e), - enabled: e.enabled, - getApi: (e) => ({ - setActive: (t) => { - dh.set(e, t); - }, - isActive: () => dh.isOn(e), - isEnabled: () => !Rm.isDisabled(e), - setEnabled: (t) => Rm.set(e, !t), - }), - onAction: e.onAction, - onSetup: e.onSetup, - triggersSubmenu: !1, - itemBehaviours: [], - }, - s, - t, - o, - ), - { - toggling: { - toggleClass: yb, - toggleOnExecute: !1, - selected: e.active, - }, - }, - ); - })(a(e), t, r, n), - ), - ); - case "separator": - return ((e) => qn("separatormenuitem", Av, e))(e).fold(Zb, (e) => - A.some(iw(e)), - ); - case "fancymenuitem": - return ((e) => qn("fancymenuitem", ny, e))(e).fold(Zb, (e) => - ((e, t) => be(aw, e.fancytype).map((o) => o(e, t)))(e, o), - ); - default: - return console.error("Unknown item in general menu", e), A.none(); - } - var i; - }, - Vw = (e, t, o, n, s, r, a) => { - const i = 1 === n, - l = !i || Jb(e); - return we( - H(e, (e) => { - switch (e.type) { - case "separator": - return ((n = e), qn("Autocompleter.Separator", Av, n)).fold( - Zb, - (e) => A.some(iw(e)), - ); - case "cardmenuitem": - return ((e) => qn("cardmenuitem", Zv, e))(e).fold(Zb, (e) => - A.some( - ((e, t, o, n) => { - const s = { - dom: Py(e.label), - optComponents: [ - A.some({ - dom: { tag: "div", classes: [Cb, Ob] }, - components: Gy(e.items, n), - }), - ], - }; - return By( - { - data: Fy({ text: A.none(), ...e }), - enabled: e.enabled, - getApi: (e) => ({ - isEnabled: () => !Rm.isDisabled(e), - setEnabled: (t) => { - Rm.set(e, !t), - L(Xc(e.element, "*"), (o) => { - e.getSystem() - .getByDom(o) - .each((e) => { - e.hasConfigured(Rm) && Rm.set(e, !t); - }); - }); - }, - }), - onAction: e.onAction, - onSetup: e.onSetup, - triggersSubmenu: !1, - itemBehaviours: A.from(n.itemBehaviours).getOr([]), - }, - s, - t, - o.providers, - ); - })( - { - ...e, - onAction: (t) => { - e.onAction(t), o(e.value, e.meta); - }, - }, - s, - r, - { - itemBehaviours: Wy(e.meta, r), - cardText: { matchText: t, highlightOn: a }, - }, - ), - ), - ); - default: - return ((e) => qn("Autocompleter.Item", Mv, e))(e).fold(Zb, (e) => - A.some( - ((e, t, o, n, s, r, a, i = !0) => { - const l = Uy( - { - presets: n, - textContent: A.none(), - htmlContent: o ? e.text.map((e) => jy(e, t)) : A.none(), - ariaLabel: e.text, - iconContent: e.icon, - shortcutContent: A.none(), - checkMark: A.none(), - caret: A.none(), - value: e.value, - }, - a.providers, - i, - e.icon, - ); - return By( - { - data: Fy(e), - enabled: e.enabled, - getApi: x({}), - onAction: (t) => s(e.value, e.meta), - onSetup: x(b), - triggersSubmenu: !1, - itemBehaviours: Wy(e.meta, a), - }, - l, - r, - a.providers, - ); - })(e, t, i, "normal", o, s, r, l), - ), - ); - } - var n; - }), - ); - }, - zw = (e, t, o, n, s, r) => { - const a = Jb(t), - i = we( - H(t, (e) => { - const t = (e) => - Nw(e, o, n, ((e) => (s ? !ve(e, "text") : a))(e), s); - return "nestedmenuitem" === e.type && - e.getSubmenuItems().length <= 0 - ? t({ ...e, enabled: !1 }) - : t(e); - }), - ), - l = ((e) => - "no-search" === e.searchMode - ? { menuType: "normal" } - : { menuType: "searchable", searchMode: e })(r); - return (s ? Qb : ev)(e, a, i, 1, l); - }, - Hw = (e) => Lh.singleData(e.value, e), - Lw = (e, t) => { - const o = Es(!1), - n = Es(!1), - s = ri( - Ph.sketch({ - dom: { tag: "div", classes: ["tox-autocompleter"] }, - components: [], - fireDismissalEventInstead: {}, - inlineBehaviours: kl([ - Jp("dismissAutocompleter", [Ur(Cr(), () => c())]), - ]), - lazySink: t.getSink, - }), - ), - r = () => Ph.isOpen(s), - a = n.get, - i = () => { - r() && Ph.hide(s); - }, - l = () => Ph.getContent(s).bind((e) => te(e.components(), 0)), - c = () => e.execCommand("mceAutocompleterClose"), - d = (n) => { - const r = ((n) => { - const s = re(n, (e) => A.from(e.columns)).getOr(1); - return X(n, (n) => { - const r = n.items; - return Vw( - r, - n.matchText, - (t, s) => { - const r = e.selection.getRng(); - ((e, t) => - mb(Ve(t.startContainer)).map((t) => { - const o = e.createRng(); - return o.selectNode(t.dom), o; - }))(e.dom, r).each((r) => { - const a = { - hide: () => c(), - reload: (t) => { - i(), - e.execCommand("mceAutocompleterReload", !1, { - fetchOptions: t, - }); - }, - }; - o.set(!0), n.onAction(a, r, t, s), o.set(!1); - }); - }, - s, - pb.BUBBLE_TO_SANDBOX, - t, - n.highlightOn, - ); - }); - })(n); - r.length > 0 - ? ((t, o) => { - var n; - ((n = Ve(e.getBody())), pi(n, ub)).each((n) => { - const r = re(t, (e) => A.from(e.columns)).getOr(1); - Ph.showMenuAt( - s, - { - anchor: { - type: "node", - root: Ve(e.getBody()), - node: A.from(n), - }, - }, - ((e, t, o, n) => { - const s = ew(t, n), - r = Ab(n); - return { - data: Hw({ - ...e, - movement: s, - menuBehaviours: ly( - "auto" !== t - ? [] - : [ - Kr((e, t) => { - iy(e, 4, r.item).each( - ({ numColumns: t, numRows: o }) => { - Pp.setGridSize(e, o, t); - }, - ); - }), - ], - ), - }), - menu: { - markers: Ab(n), - fakeFocus: o === Rw.ContentFocus, - }, - }; - })( - ev("autocompleter-value", !0, o, r, { - menuType: "normal", - }), - r, - Rw.ContentFocus, - "normal", - ), - ); - }), - l().each(Gm.highlightFirst); - })(n, r) - : i(); - }; - e.on("AutocompleterStart", ({ lookupData: e }) => { - n.set(!0), o.set(!1), d(e); - }), - e.on("AutocompleterUpdate", ({ lookupData: e }) => d(e)), - e.on("AutocompleterEnd", () => { - i(), n.set(!1), o.set(!1); - }); - ((e, t) => { - const o = (e, t) => { - Ir(e, Ks(), { raw: t }); - }, - n = () => e.getMenu().bind(Gm.getHighlighted); - t.on("keydown", (t) => { - const s = t.which; - e.isActive() && - (e.isMenuOpen() - ? 13 === s - ? (n().each(Rr), t.preventDefault()) - : 40 === s - ? (n().fold( - () => { - e.getMenu().each(Gm.highlightFirst); - }, - (e) => { - o(e, t); - }, - ), - t.preventDefault(), - t.stopImmediatePropagation()) - : (37 !== s && 38 !== s && 39 !== s) || - n().each((e) => { - o(e, t), t.preventDefault(), t.stopImmediatePropagation(); - }) - : (13 !== s && 38 !== s && 40 !== s) || e.cancelIfNecessary()); - }), - t.on("NodeChange", (t) => { - e.isActive() && - !e.isProcessingAction() && - mb(Ve(t.element)).isNone() && - e.cancelIfNecessary(); - }); - })( - { - cancelIfNecessary: c, - isMenuOpen: r, - isActive: a, - isProcessingAction: o.get, - getMenu: l, - }, - e, - ); - }, - Pw = ["visible", "hidden", "clip"], - Uw = (e) => Me(e).length > 0 && !R(Pw, e), - Ww = (e) => { - if (je(e)) { - const t = It(e, "overflow-x"), - o = It(e, "overflow-y"); - return Uw(t) || Uw(o); - } - return !1; - }, - jw = (e, t) => - lb(e) - ? ((e) => { - const t = qc(e, Ww), - o = - 0 === t.length - ? bt(e) - .map(vt) - .map((e) => qc(e, Ww)) - .getOr([]) - : t; - return oe(o).map((e) => ({ element: e, others: o.slice(1) })); - })(t) - : A.none(), - Gw = (e) => { - const t = [...H(e.others, Jo), en()]; - return ((e, t) => j(t, (e, t) => Qo(e, t), e))(Jo(e.element), t); - }, - $w = (e, t, o) => hi(e, t, o).isSome(), - qw = (e, t) => { - let o = null; - return { - cancel: () => { - null !== o && (clearTimeout(o), (o = null)); - }, - schedule: (...n) => { - o = setTimeout(() => { - e.apply(null, n), (o = null); - }, t); - }, - }; - }, - Xw = (e) => { - const t = e.raw; - return void 0 === t.touches || 1 !== t.touches.length - ? A.none() - : A.some(t.touches[0]); - }, - Yw = (e, t) => { - const o = { stopBackspace: !0, ...t }, - n = ((e) => { - const t = Ql(), - o = Es(!1), - n = qw((t) => { - e.triggerEvent(pr(), t), o.set(!0); - }, 400), - s = Ds([ - { - key: Hs(), - value: (e) => ( - Xw(e).each((s) => { - n.cancel(); - const r = { x: s.clientX, y: s.clientY, target: e.target }; - n.schedule(e), o.set(!1), t.set(r); - }), - A.none() - ), - }, - { - key: Ls(), - value: (e) => ( - n.cancel(), - Xw(e).each((e) => { - t.on((o) => { - ((e, t) => { - const o = Math.abs(e.clientX - t.x), - n = Math.abs(e.clientY - t.y); - return o > 5 || n > 5; - })(e, o) && t.clear(); - }); - }), - A.none() - ), - }, - { - key: Ps(), - value: (s) => ( - n.cancel(), - t - .get() - .filter((e) => Ze(e.target, s.target)) - .map((t) => - o.get() ? (s.prevent(), !1) : e.triggerEvent(gr(), s), - ) - ), - }, - ]); - return { fireIfReady: (e, t) => be(s, t).bind((t) => t(e)) }; - })(o), - s = H( - [ - "touchstart", - "touchmove", - "touchend", - "touchcancel", - "gesturestart", - "mousedown", - "mouseup", - "mouseover", - "mousemove", - "mouseout", - "click", - ].concat([ - "selectstart", - "input", - "contextmenu", - "change", - "transitionend", - "transitioncancel", - "drag", - "dragstart", - "dragend", - "dragenter", - "dragleave", - "dragover", - "drop", - "keyup", - ]), - (t) => - tc(e, t, (e) => { - n.fireIfReady(e, t).each((t) => { - t && e.kill(); - }), - o.triggerEvent(t, e) && e.kill(); - }), - ), - r = Ql(), - a = tc(e, "paste", (e) => { - n.fireIfReady(e, "paste").each((t) => { - t && e.kill(); - }), - o.triggerEvent("paste", e) && e.kill(), - r.set( - setTimeout(() => { - o.triggerEvent(cr(), e); - }, 0), - ); - }), - i = tc(e, "keydown", (e) => { - o.triggerEvent("keydown", e) - ? e.kill() - : o.stopBackspace && - ((e) => - e.raw.which === $m[0] && - !R(["input", "textarea"], Ue(e.target)) && - !$w(e.target, '[contenteditable="true"]'))(e) && - e.prevent(); - }), - l = tc(e, "focusin", (e) => { - o.triggerEvent("focusin", e) && e.kill(); - }), - c = Ql(), - d = tc(e, "focusout", (e) => { - o.triggerEvent("focusout", e) && e.kill(), - c.set( - setTimeout(() => { - o.triggerEvent(lr(), e); - }, 0), - ); - }); - return { - unbind: () => { - L(s, (e) => { - e.unbind(); - }), - i.unbind(), - l.unbind(), - d.unbind(), - a.unbind(), - r.on(clearTimeout), - c.on(clearTimeout); - }, - }; - }, - Kw = (e, t) => { - const o = be(e, "target").getOr(t); - return Es(o); - }, - Jw = As([{ stopped: [] }, { resume: ["element"] }, { complete: [] }]), - Zw = (e, t, o, n, s, r) => { - const a = e(t, n), - i = ((e, t) => { - const o = Es(!1), - n = Es(!1); - return { - stop: () => { - o.set(!0); - }, - cut: () => { - n.set(!0); - }, - isStopped: o.get, - isCut: n.get, - event: e, - setSource: t.set, - getSource: t.get, - }; - })(o, s); - return a.fold( - () => (r.logEventNoHandlers(t, n), Jw.complete()), - (e) => { - const o = e.descHandler; - return ( - Aa(o)(i), - i.isStopped() - ? (r.logEventStopped(t, e.element, o.purpose), Jw.stopped()) - : i.isCut() - ? (r.logEventCut(t, e.element, o.purpose), Jw.complete()) - : st(e.element).fold( - () => ( - r.logNoParent(t, e.element, o.purpose), Jw.complete() - ), - (n) => ( - r.logEventResponse(t, e.element, o.purpose), Jw.resume(n) - ), - ) - ); - }, - ); - }, - Qw = (e, t, o, n, s, r) => - Zw(e, t, o, n, s, r).fold(E, (n) => Qw(e, t, o, n, s, r), T), - eS = (e, t, o, n, s) => { - const r = Kw(o, n); - return Qw(e, t, o, n, r, s); - }, - tS = () => { - const e = (() => { - const e = {}; - return { - registerId: (t, o, n) => { - le(n, (n, s) => { - const r = void 0 !== e[s] ? e[s] : {}; - (r[o] = ((e, t) => ({ - cHandler: k.apply(void 0, [e.handler].concat(t)), - purpose: e.purpose, - }))(n, t)), - (e[s] = r); - }); - }, - unregisterId: (t) => { - le(e, (e, o) => { - ve(e, t) && delete e[t]; - }); - }, - filterByType: (t) => - be(e, t) - .map((e) => - pe(e, (e, t) => - ((e, t) => ({ id: e, descHandler: t }))(t, e), - ), - ) - .getOr([]), - find: (t, o, n) => - be(e, o).bind((e) => - Is( - n, - (t) => - ((e, t) => - pa(t) - .bind((t) => be(e, t)) - .map((e) => - ((e, t) => ({ element: e, descHandler: t }))(t, e), - ))(e, t), - t, - ), - ), - }; - })(), - t = {}, - o = (o) => { - pa(o.element).each((o) => { - delete t[o], e.unregisterId(o); - }); - }; - return { - find: (t, o, n) => e.find(t, o, n), - filter: (t) => e.filterByType(t), - register: (n) => { - const s = ((e) => { - const t = e.element; - return pa(t).getOrThunk(() => - ((e, t) => { - const o = la(ua + "uid-"); - return ga(t, o), o; - })(0, e.element), - ); - })(n); - ye(t, s) && - ((e, n) => { - const s = t[n]; - if (s !== e) - throw new Error( - 'The tagId "' + - n + - '" is already used by: ' + - na(s.element) + - "\nCannot use it for: " + - na(e.element) + - "\nThe conflicting element is" + - (yt(s.element) ? " " : " not ") + - "already in the DOM", - ); - o(e); - })(n, s); - const r = [n]; - e.registerId(r, s, n.events), (t[s] = n); - }, - unregister: o, - getById: (e) => be(t, e), - }; - }, - oS = fm({ - name: "Container", - factory: (e) => { - const { attributes: t, ...o } = e.dom; - return { - uid: e.uid, - dom: { tag: "div", attributes: { role: "presentation", ...t }, ...o }, - components: e.components, - behaviours: fu(e.containerBehaviours), - events: e.events, - domModification: e.domModification, - eventOrder: e.eventOrder, - }; - }, - configFields: [ - ys("components", []), - hu("containerBehaviours", []), - ys("events", {}), - ys("domModification", {}), - ys("eventOrder", {}), - ], - }), - nS = (e) => { - const t = (t) => st(e.element).fold(E, (e) => Ze(t, e)), - o = tS(), - n = (e, n) => o.find(t, e, n), - s = Yw(e.element, { - triggerEvent: (e, t) => - Si(e, t.target, (o) => - ((e, t, o, n) => eS(e, t, o, o.target, n))(n, e, t, o), - ), - }), - r = { - debugInfo: x("real"), - triggerEvent: (e, t, o) => { - Si(e, t, (s) => eS(n, e, o, t, s)); - }, - triggerFocus: (e, t) => { - pa(e).fold( - () => { - Dl(e); - }, - (o) => { - Si( - ir(), - e, - (o) => ( - ((e, t, o, n, s) => { - const r = Kw(o, n); - Zw(e, t, o, n, r, s); - })( - n, - ir(), - { originator: t, kill: b, prevent: b, target: e }, - e, - o, - ), - !1 - ), - ); - }, - ); - }, - triggerEscape: (e, t) => { - r.triggerEvent("keydown", e.element, t.event); - }, - getByUid: (e) => p(e), - getByDom: (e) => h(e), - build: ri, - buildOrPatch: si, - addToGui: (e) => { - l(e); - }, - removeFromGui: (e) => { - c(e); - }, - addToWorld: (e) => { - a(e); - }, - removeFromWorld: (e) => { - i(e); - }, - broadcast: (e) => { - u(e); - }, - broadcastOn: (e, t) => { - m(e, t); - }, - broadcastEvent: (e, t) => { - g(e, t); - }, - isConnected: E, - }, - a = (e) => { - e.connect(r), - $e(e.element) || - (o.register(e), - L(e.components(), a), - r.triggerEvent(br(), e.element, { target: e.element })); - }, - i = (e) => { - $e(e.element) || (L(e.components(), i), o.unregister(e)), - e.disconnect(); - }, - l = (t) => { - Ad(e, t); - }, - c = (e) => { - Bd(e); - }, - d = (e) => { - const t = o.filter(dr()); - L(t, (t) => { - const o = t.descHandler; - Aa(o)(e); - }); - }, - u = (e) => { - d({ universal: !0, data: e }); - }, - m = (e, t) => { - d({ universal: !1, channels: e, data: t }); - }, - g = (e, t) => - ((e, t, o) => { - const n = ((e) => { - const t = Es(!1); - return { - stop: () => { - t.set(!0); - }, - cut: b, - isStopped: t.get, - isCut: T, - event: e, - setSource: O("Cannot set source of a broadcasted event"), - getSource: O("Cannot get source of a broadcasted event"), - }; - })(t); - return ( - L(e, (e) => { - const t = e.descHandler; - Aa(t)(n); - }), - n.isStopped() - ); - })(o.filter(e), t), - p = (e) => - o - .getById(e) - .fold( - () => - sn.error( - new Error( - 'Could not find component with uid: "' + e + '" in system.', - ), - ), - sn.value, - ), - h = (e) => { - const t = pa(e).getOr("not found"); - return p(t); - }; - return ( - a(e), - { - root: e, - element: e.element, - destroy: () => { - s.unbind(), Po(e.element); - }, - add: l, - remove: c, - getByUid: p, - getByDom: h, - addToWorld: a, - removeFromWorld: i, - broadcast: u, - broadcastOn: m, - broadcastEvent: g, - } - ); - }, - sS = x([ys("prefix", "form-field"), hu("fieldBehaviours", [wm, pu])]), - rS = x([ - ju({ schema: [os("dom")], name: "label" }), - ju({ - factory: { - sketch: (e) => ({ - uid: e.uid, - dom: { - tag: "span", - styles: { display: "none" }, - attributes: { "aria-hidden": "true" }, - innerHtml: e.text, - }, - }), - }, - schema: [os("text")], - name: "aria-descriptor", - }), - Uu({ - factory: { - sketch: (e) => { - const t = ((e, t) => { - const o = {}; - return ( - le(e, (e, n) => { - R(t, n) || (o[n] = e); - }), - o - ); - })(e, ["factory"]); - return e.factory.sketch(t); - }, - }, - schema: [os("factory")], - name: "field", - }), - ]), - aS = bm({ - name: "FormField", - configFields: sS(), - partFields: rS(), - factory: (e, t, o, n) => { - const s = bu(e.fieldBehaviours, [ - wm.config({ find: (t) => om(t, e, "field") }), - pu.config({ - store: { - mode: "manual", - getValue: (e) => wm.getCurrent(e).bind(pu.getValue), - setValue: (e, t) => { - wm.getCurrent(e).each((e) => { - pu.setValue(e, t); - }); - }, - }, - }), - ]), - r = Hr([ - Kr((t, o) => { - const n = sm(t, e, ["label", "field", "aria-descriptor"]); - n.field().each((t) => { - const o = la(e.prefix); - n.label().each((e) => { - kt(e.element, "for", o), kt(t.element, "id", o); - }), - n["aria-descriptor"]().each((o) => { - const n = la(e.prefix); - kt(o.element, "id", n), - kt(t.element, "aria-describedby", n); - }); - }); - }), - ]), - a = { - getField: (t) => om(t, e, "field"), - getLabel: (t) => om(t, e, "label"), - }; - return { - uid: e.uid, - dom: e.dom, - components: t, - behaviours: s, - events: r, - apis: a, - }; - }, - apis: { - getField: (e, t) => e.getField(t), - getLabel: (e, t) => e.getLabel(t), - }, - }); - var iS = Object.freeze({ - __proto__: null, - exhibit: (e, t) => - Ea({ attributes: Ds([{ key: t.tabAttr, value: "true" }]) }), - }), - lS = [ys("tabAttr", "data-alloy-tabstop")]; - const cS = Ol({ fields: lS, name: "tabstopping", active: iS }); - var dS = tinymce.util.Tools.resolve("tinymce.html.Entities"); - const uS = (e, t, o, n) => { - const s = mS(e, t, o, n); - return aS.sketch(s); - }, - mS = (e, t, o, n) => ({ - dom: gS(o), - components: e.toArray().concat([t]), - fieldBehaviours: kl(n), - }), - gS = (e) => ({ tag: "div", classes: ["tox-form__group"].concat(e) }), - pS = (e, t) => - aS.parts.label({ - dom: { tag: "label", classes: ["tox-label"] }, - components: [ti(t.translate(e))], - }), - hS = la("form-component-change"), - fS = la("form-close"), - bS = la("form-cancel"), - vS = la("form-action"), - yS = la("form-submit"), - xS = la("form-block"), - wS = la("form-unblock"), - SS = la("form-tabchange"), - kS = la("form-resize"), - CS = ["input", "textarea"], - OS = (e) => { - const t = Ue(e); - return R(CS, t); - }, - _S = (e, t) => { - const o = t.getRoot(e).getOr(e.element); - Pa(o, t.invalidClass), - t.notify.each((t) => { - OS(e.element) && kt(e.element, "aria-invalid", !1), - t.getContainer(e).each((e) => { - ta(e, t.validHtml); - }), - t.onValid(e); - }); - }, - TS = (e, t, o, n) => { - const s = t.getRoot(e).getOr(e.element); - La(s, t.invalidClass), - t.notify.each((t) => { - OS(e.element) && kt(e.element, "aria-invalid", !0), - t.getContainer(e).each((e) => { - ta(e, n); - }), - t.onInvalid(e, n); - }); - }, - ES = (e, t, o) => - t.validator.fold( - () => bw(sn.value(!0)), - (t) => t.validate(e), - ), - AS = (e, t, o) => ( - t.notify.each((t) => { - t.onValidate(e); - }), - ES(e, t).map((o) => - e.getSystem().isConnected() - ? o.fold( - (o) => (TS(e, t, 0, o), sn.error(o)), - (o) => (_S(e, t), sn.value(o)), - ) - : sn.error("No longer in system"), - ) - ); - var MS = Object.freeze({ - __proto__: null, - markValid: _S, - markInvalid: TS, - query: ES, - run: AS, - isInvalid: (e, t) => { - const o = t.getRoot(e).getOr(e.element); - return Ua(o, t.invalidClass); - }, - }), - DS = Object.freeze({ - __proto__: null, - events: (e, t) => - e.validator - .map((t) => - Hr( - [ - Ur(t.onEvent, (t) => { - AS(t, e).get(w); - }), - ].concat( - t.validateOnLoad - ? [ - Kr((t) => { - AS(t, e).get(b); - }), - ] - : [], - ), - ), - ) - .getOr({}), - }), - BS = [ - os("invalidClass"), - ys("getRoot", A.none), - vs("notify", [ - ys("aria", "alert"), - ys("getContainer", A.none), - ys("validHtml", ""), - Di("onValid"), - Di("onInvalid"), - Di("onValidate"), - ]), - vs("validator", [ - os("validate"), - ys("onEvent", "input"), - ys("validateOnLoad", !0), - ]), - ]; - const FS = Ol({ - fields: BS, - name: "invalidating", - active: DS, - apis: MS, - extra: { - validation: (e) => (t) => { - const o = pu.getValue(t); - return bw(e(o)); - }, - }, - }), - IS = Ol({ - fields: [], - name: "unselecting", - active: Object.freeze({ - __proto__: null, - events: () => Hr([Lr(sr(), E)]), - exhibit: () => - Ea({ - styles: { - "-webkit-user-select": "none", - "user-select": "none", - "-ms-user-select": "none", - "-moz-user-select": "-moz-none", - }, - attributes: { unselectable: "on" }, - }), - }), - }), - RS = la("color-input-change"), - NS = la("color-swatch-change"), - VS = la("color-picker-cancel"), - zS = ju({ schema: [os("dom")], name: "label" }), - HS = (e) => - ju({ - name: e + "-edge", - overrides: (t) => - t.model.manager.edgeActions[e].fold( - () => ({}), - (e) => ({ - events: Hr([ - Wr(Hs(), (t, o, n) => e(t, n), [t]), - Wr(Ws(), (t, o, n) => e(t, n), [t]), - Wr( - js(), - (t, o, n) => { - n.mouseIsDown.get() && e(t, n); - }, - [t], - ), - ]), - }), - ), - }), - LS = HS("top-left"), - PS = HS("top"), - US = HS("top-right"), - WS = HS("right"), - jS = HS("bottom-right"), - GS = HS("bottom"), - $S = HS("bottom-left"); - var qS = [ - zS, - HS("left"), - WS, - PS, - GS, - LS, - US, - $S, - jS, - Uu({ - name: "thumb", - defaults: x({ dom: { styles: { position: "absolute" } } }), - overrides: (e) => ({ - events: Hr([ - Gr(Hs(), e, "spectrum"), - Gr(Ls(), e, "spectrum"), - Gr(Ps(), e, "spectrum"), - Gr(Ws(), e, "spectrum"), - Gr(js(), e, "spectrum"), - Gr($s(), e, "spectrum"), - ]), - }), - }), - Uu({ - schema: [es("mouseIsDown", () => Es(!1))], - name: "spectrum", - overrides: (e) => { - const t = e.model.manager, - o = (o, n) => - t.getValueFromEvent(n).map((n) => t.setValueFrom(o, e, n)); - return { - behaviours: kl([ - Pp.config({ - mode: "special", - onLeft: (o) => t.onLeft(o, e), - onRight: (o) => t.onRight(o, e), - onUp: (o) => t.onUp(o, e), - onDown: (o) => t.onDown(o, e), - }), - oh.config({}), - ]), - events: Hr([ - Ur(Hs(), o), - Ur(Ls(), o), - Ur(Ws(), o), - Ur(js(), (t, n) => { - e.mouseIsDown.get() && o(t, n); - }), - ]), - }; - }, - }), - ]; - const XS = x("slider.change.value"), - YS = (e) => { - const t = e.event.raw; - if (((e) => -1 !== e.type.indexOf("touch"))(t)) { - const e = t; - return void 0 !== e.touches && 1 === e.touches.length - ? A.some(e.touches[0]).map((e) => $t(e.clientX, e.clientY)) - : A.none(); - } - { - const e = t; - return void 0 !== e.clientX - ? A.some(e).map((e) => $t(e.clientX, e.clientY)) - : A.none(); - } - }, - KS = (e) => e.model.minX, - JS = (e) => e.model.minY, - ZS = (e) => e.model.minX - 1, - QS = (e) => e.model.minY - 1, - ek = (e) => e.model.maxX, - tk = (e) => e.model.maxY, - ok = (e) => e.model.maxX + 1, - nk = (e) => e.model.maxY + 1, - sk = (e, t, o) => t(e) - o(e), - rk = (e) => sk(e, ek, KS), - ak = (e) => sk(e, tk, JS), - ik = (e) => rk(e) / 2, - lk = (e) => ak(e) / 2, - ck = (e) => e.stepSize, - dk = (e) => e.snapToGrid, - uk = (e) => e.snapStart, - mk = (e) => e.rounded, - gk = (e, t) => void 0 !== e[t + "-edge"], - pk = (e) => gk(e, "left"), - hk = (e) => gk(e, "right"), - fk = (e) => gk(e, "top"), - bk = (e) => gk(e, "bottom"), - vk = (e) => e.model.value.get(), - yk = (e, t) => ({ x: e, y: t }), - xk = (e, t) => { - Ir(e, XS(), { value: t }); - }, - wk = (e, t, o, n) => - e < t ? e : e > o ? o : e === t ? t - 1 : Math.max(t, e - n), - Sk = (e, t, o, n) => - e > o ? e : e < t ? t : e === o ? o + 1 : Math.min(o, e + n), - kk = (e, t, o) => Math.max(t, Math.min(o, e)), - Ck = (e) => { - const { - min: t, - max: o, - range: n, - value: s, - step: r, - snap: a, - snapStart: i, - rounded: l, - hasMinEdge: c, - hasMaxEdge: d, - minBound: u, - maxBound: m, - screenRange: g, - } = e, - p = c ? t - 1 : t, - h = d ? o + 1 : o; - if (s < u) return p; - if (s > m) return h; - { - const e = ((e, t, o) => Math.min(o, Math.max(e, t)) - t)(s, u, m), - c = kk((e / g) * n + t, p, h); - return a && c >= t && c <= o - ? ((e, t, o, n, s) => - s.fold( - () => { - const s = e - t, - r = Math.round(s / n) * n; - return kk(t + r, t - 1, o + 1); - }, - (t) => { - const s = (e - t) % n, - r = Math.round(s / n), - a = Math.floor((e - t) / n), - i = Math.floor((o - t) / n), - l = t + Math.min(i, a + r) * n; - return Math.max(t, l); - }, - ))(c, t, o, r, i) - : l - ? Math.round(c) - : c; - } - }, - Ok = (e) => { - const { - min: t, - max: o, - range: n, - value: s, - hasMinEdge: r, - hasMaxEdge: a, - maxBound: i, - maxOffset: l, - centerMinEdge: c, - centerMaxEdge: d, - } = e; - return s < t ? (r ? 0 : c) : s > o ? (a ? i : d) : ((s - t) / n) * l; - }, - _k = "top", - Tk = "right", - Ek = "bottom", - Ak = "left", - Mk = (e) => e.element.dom.getBoundingClientRect(), - Dk = (e, t) => e[t], - Bk = (e) => { - const t = Mk(e); - return Dk(t, Ak); - }, - Fk = (e) => { - const t = Mk(e); - return Dk(t, Tk); - }, - Ik = (e) => { - const t = Mk(e); - return Dk(t, _k); - }, - Rk = (e) => { - const t = Mk(e); - return Dk(t, Ek); - }, - Nk = (e) => { - const t = Mk(e); - return Dk(t, "width"); - }, - Vk = (e) => { - const t = Mk(e); - return Dk(t, "height"); - }, - zk = (e, t, o) => (e + t) / 2 - o, - Hk = (e, t) => { - const o = Mk(e), - n = Mk(t), - s = Dk(o, Ak), - r = Dk(o, Tk), - a = Dk(n, Ak); - return zk(s, r, a); - }, - Lk = (e, t) => { - const o = Mk(e), - n = Mk(t), - s = Dk(o, _k), - r = Dk(o, Ek), - a = Dk(n, _k); - return zk(s, r, a); - }, - Pk = (e, t) => { - Ir(e, XS(), { value: t }); - }, - Uk = (e, t, o) => { - const n = { - min: KS(t), - max: ek(t), - range: rk(t), - value: o, - step: ck(t), - snap: dk(t), - snapStart: uk(t), - rounded: mk(t), - hasMinEdge: pk(t), - hasMaxEdge: hk(t), - minBound: Bk(e), - maxBound: Fk(e), - screenRange: Nk(e), - }; - return Ck(n); - }, - Wk = (e) => (t, o) => - ((e, t, o) => { - const n = (e > 0 ? Sk : wk)(vk(o), KS(o), ek(o), ck(o)); - return Pk(t, n), A.some(n); - })(e, t, o).map(E), - jk = (e, t, o, n, s, r) => { - const a = ((e, t, o, n, s) => { - const r = Nk(e), - a = n.bind((t) => A.some(Hk(t, e))).getOr(0), - i = s.bind((t) => A.some(Hk(t, e))).getOr(r), - l = { - min: KS(t), - max: ek(t), - range: rk(t), - value: o, - hasMinEdge: pk(t), - hasMaxEdge: hk(t), - minBound: Bk(e), - minOffset: 0, - maxBound: Fk(e), - maxOffset: r, - centerMinEdge: a, - centerMaxEdge: i, - }; - return Ok(l); - })(t, r, o, n, s); - return Bk(t) - Bk(e) + a; - }, - Gk = Wk(-1), - $k = Wk(1), - qk = A.none, - Xk = A.none, - Yk = { - "top-left": A.none(), - top: A.none(), - "top-right": A.none(), - right: A.some((e, t) => { - xk(e, ok(t)); - }), - "bottom-right": A.none(), - bottom: A.none(), - "bottom-left": A.none(), - left: A.some((e, t) => { - xk(e, ZS(t)); - }), - }; - var Kk = Object.freeze({ - __proto__: null, - setValueFrom: (e, t, o) => { - const n = Uk(e, t, o); - return Pk(e, n), n; - }, - setToMin: (e, t) => { - const o = KS(t); - Pk(e, o); - }, - setToMax: (e, t) => { - const o = ek(t); - Pk(e, o); - }, - findValueOfOffset: Uk, - getValueFromEvent: (e) => YS(e).map((e) => e.left), - findPositionOfValue: jk, - setPositionFromValue: (e, t, o, n) => { - const s = vk(o), - r = jk(e, n.getSpectrum(e), s, n.getLeftEdge(e), n.getRightEdge(e), o), - a = Jt(t.element) / 2; - Dt(t.element, "left", r - a + "px"); - }, - onLeft: Gk, - onRight: $k, - onUp: qk, - onDown: Xk, - edgeActions: Yk, - }); - const Jk = (e, t) => { - Ir(e, XS(), { value: t }); - }, - Zk = (e, t, o) => { - const n = { - min: JS(t), - max: tk(t), - range: ak(t), - value: o, - step: ck(t), - snap: dk(t), - snapStart: uk(t), - rounded: mk(t), - hasMinEdge: fk(t), - hasMaxEdge: bk(t), - minBound: Ik(e), - maxBound: Rk(e), - screenRange: Vk(e), - }; - return Ck(n); - }, - Qk = (e) => (t, o) => - ((e, t, o) => { - const n = (e > 0 ? Sk : wk)(vk(o), JS(o), tk(o), ck(o)); - return Jk(t, n), A.some(n); - })(e, t, o).map(E), - eC = (e, t, o, n, s, r) => { - const a = ((e, t, o, n, s) => { - const r = Vk(e), - a = n.bind((t) => A.some(Lk(t, e))).getOr(0), - i = s.bind((t) => A.some(Lk(t, e))).getOr(r), - l = { - min: JS(t), - max: tk(t), - range: ak(t), - value: o, - hasMinEdge: fk(t), - hasMaxEdge: bk(t), - minBound: Ik(e), - minOffset: 0, - maxBound: Rk(e), - maxOffset: r, - centerMinEdge: a, - centerMaxEdge: i, - }; - return Ok(l); - })(t, r, o, n, s); - return Ik(t) - Ik(e) + a; - }, - tC = A.none, - oC = A.none, - nC = Qk(-1), - sC = Qk(1), - rC = { - "top-left": A.none(), - top: A.some((e, t) => { - xk(e, QS(t)); - }), - "top-right": A.none(), - right: A.none(), - "bottom-right": A.none(), - bottom: A.some((e, t) => { - xk(e, nk(t)); - }), - "bottom-left": A.none(), - left: A.none(), - }; - var aC = Object.freeze({ - __proto__: null, - setValueFrom: (e, t, o) => { - const n = Zk(e, t, o); - return Jk(e, n), n; - }, - setToMin: (e, t) => { - const o = JS(t); - Jk(e, o); - }, - setToMax: (e, t) => { - const o = tk(t); - Jk(e, o); - }, - findValueOfOffset: Zk, - getValueFromEvent: (e) => YS(e).map((e) => e.top), - findPositionOfValue: eC, - setPositionFromValue: (e, t, o, n) => { - const s = vk(o), - r = eC(e, n.getSpectrum(e), s, n.getTopEdge(e), n.getBottomEdge(e), o), - a = Wt(t.element) / 2; - Dt(t.element, "top", r - a + "px"); - }, - onLeft: tC, - onRight: oC, - onUp: nC, - onDown: sC, - edgeActions: rC, - }); - const iC = (e, t) => { - Ir(e, XS(), { value: t }); - }, - lC = (e, t) => ({ x: e, y: t }), - cC = (e, t) => (o, n) => - ((e, t, o, n) => { - const s = e > 0 ? Sk : wk, - r = t ? vk(n).x : s(vk(n).x, KS(n), ek(n), ck(n)), - a = t ? s(vk(n).y, JS(n), tk(n), ck(n)) : vk(n).y; - return iC(o, lC(r, a)), A.some(r); - })(e, t, o, n).map(E), - dC = cC(-1, !1), - uC = cC(1, !1), - mC = cC(-1, !0), - gC = cC(1, !0), - pC = { - "top-left": A.some((e, t) => { - xk(e, yk(ZS(t), QS(t))); - }), - top: A.some((e, t) => { - xk(e, yk(ik(t), QS(t))); - }), - "top-right": A.some((e, t) => { - xk(e, yk(ok(t), QS(t))); - }), - right: A.some((e, t) => { - xk(e, yk(ok(t), lk(t))); - }), - "bottom-right": A.some((e, t) => { - xk(e, yk(ok(t), nk(t))); - }), - bottom: A.some((e, t) => { - xk(e, yk(ik(t), nk(t))); - }), - "bottom-left": A.some((e, t) => { - xk(e, yk(ZS(t), nk(t))); - }), - left: A.some((e, t) => { - xk(e, yk(ZS(t), lk(t))); - }), - }; - var hC = Object.freeze({ - __proto__: null, - setValueFrom: (e, t, o) => { - const n = Uk(e, t, o.left), - s = Zk(e, t, o.top), - r = lC(n, s); - return iC(e, r), r; - }, - setToMin: (e, t) => { - const o = KS(t), - n = JS(t); - iC(e, lC(o, n)); - }, - setToMax: (e, t) => { - const o = ek(t), - n = tk(t); - iC(e, lC(o, n)); - }, - getValueFromEvent: (e) => YS(e), - setPositionFromValue: (e, t, o, n) => { - const s = vk(o), - r = jk( - e, - n.getSpectrum(e), - s.x, - n.getLeftEdge(e), - n.getRightEdge(e), - o, - ), - a = eC( - e, - n.getSpectrum(e), - s.y, - n.getTopEdge(e), - n.getBottomEdge(e), - o, - ), - i = Jt(t.element) / 2, - l = Wt(t.element) / 2; - Dt(t.element, "left", r - i + "px"), Dt(t.element, "top", a - l + "px"); - }, - onLeft: dC, - onRight: uC, - onUp: mC, - onDown: gC, - edgeActions: pC, - }); - const fC = bm({ - name: "Slider", - configFields: [ - ys("stepSize", 1), - ys("onChange", b), - ys("onChoose", b), - ys("onInit", b), - ys("onDragStart", b), - ys("onDragEnd", b), - ys("snapToGrid", !1), - ys("rounded", !0), - us("snapStart"), - ns( - "model", - Jn("mode", { - x: [ - ys("minX", 0), - ys("maxX", 100), - es("value", (e) => Es(e.mode.minX)), - os("getInitialValue"), - Ri("manager", Kk), - ], - y: [ - ys("minY", 0), - ys("maxY", 100), - es("value", (e) => Es(e.mode.minY)), - os("getInitialValue"), - Ri("manager", aC), - ], - xy: [ - ys("minX", 0), - ys("maxX", 100), - ys("minY", 0), - ys("maxY", 100), - es("value", (e) => Es({ x: e.mode.minX, y: e.mode.minY })), - os("getInitialValue"), - Ri("manager", hC), - ], - }), - ), - hu("sliderBehaviours", [Pp, pu]), - es("mouseIsDown", () => Es(!1)), - ], - partFields: qS, - factory: (e, t, o, n) => { - const s = (t) => nm(t, e, "thumb"), - r = (t) => nm(t, e, "spectrum"), - a = (t) => om(t, e, "left-edge"), - i = (t) => om(t, e, "right-edge"), - l = (t) => om(t, e, "top-edge"), - c = (t) => om(t, e, "bottom-edge"), - d = e.model, - u = d.manager, - m = (t, o) => { - u.setPositionFromValue(t, o, e, { - getLeftEdge: a, - getRightEdge: i, - getTopEdge: l, - getBottomEdge: c, - getSpectrum: r, - }); - }, - g = (e, t) => { - d.value.set(t); - const o = s(e); - m(e, o); - }, - p = (t) => { - const o = e.mouseIsDown.get(); - e.mouseIsDown.set(!1), - o && - om(t, e, "thumb").each((o) => { - const n = d.value.get(); - e.onChoose(t, o, n); - }); - }, - h = (t, o) => { - o.stop(), e.mouseIsDown.set(!0), e.onDragStart(t, s(t)); - }, - f = (t, o) => { - o.stop(), e.onDragEnd(t, s(t)), p(t); - }; - return { - uid: e.uid, - dom: e.dom, - components: t, - behaviours: bu(e.sliderBehaviours, [ - Pp.config({ - mode: "special", - focusIn: (t) => om(t, e, "spectrum").map(Pp.focusIn).map(E), - }), - pu.config({ - store: { - mode: "manual", - getValue: (e) => d.value.get(), - setValue: g, - }, - }), - Al.config({ channels: { [Jd()]: { onReceive: p } } }), - ]), - events: Hr([ - Ur(XS(), (t, o) => { - ((t, o) => { - g(t, o); - const n = s(t); - e.onChange(t, n, o), A.some(!0); - })(t, o.event.value); - }), - Kr((t, o) => { - const n = d.getInitialValue(); - d.value.set(n); - const a = s(t); - m(t, a); - const i = r(t); - e.onInit(t, a, i, d.value.get()); - }), - Ur(Hs(), h), - Ur(Ps(), f), - Ur(Ws(), h), - Ur($s(), f), - ]), - apis: { - resetToMin: (t) => { - u.setToMin(t, e); - }, - resetToMax: (t) => { - u.setToMax(t, e); - }, - setValue: g, - refresh: m, - }, - domModification: { styles: { position: "relative" } }, - }; - }, - apis: { - setValue: (e, t, o) => { - e.setValue(t, o); - }, - resetToMin: (e, t) => { - e.resetToMin(t); - }, - resetToMax: (e, t) => { - e.resetToMax(t); - }, - refresh: (e, t) => { - e.refresh(t); - }, - }, - }), - bC = la("rgb-hex-update"), - vC = la("slider-update"), - yC = la("palette-update"), - xC = "form", - wC = [hu("formBehaviours", [pu])], - SC = (e) => "", - kC = (e, t) => ({ - uid: e.uid, - dom: e.dom, - components: t, - behaviours: bu(e.formBehaviours, [ - pu.config({ - store: { - mode: "manual", - getValue: (t) => { - const o = rm(t, e); - return ce(o, (e, t) => - e() - .bind((e) => { - return ( - (o = wm.getCurrent(e)), - (n = new Error( - `Cannot find a current component to extract the value from for form part '${t}': ` + - na(e.element), - )), - o.fold(() => sn.error(n), sn.value) - ); - var o, n; - }) - .map(pu.getValue), - ); - }, - setValue: (t, o) => { - le(o, (o, n) => { - om(t, e, n).each((e) => { - wm.getCurrent(e).each((e) => { - pu.setValue(e, o); - }); - }); - }); - }, - }, - }), - ]), - apis: { getField: (t, o) => om(t, e, o).bind(wm.getCurrent) }, - }), - CC = { - getField: Ca((e, t, o) => e.getField(t, o)), - sketch: (e) => { - const t = (() => { - const e = []; - return { - field: (t, o) => (e.push(t), Ju(xC, SC(t), o)), - record: x(e), - }; - })(), - o = e(t), - n = t.record(), - s = H(n, (e) => Uu({ name: e, pname: SC(e) })); - return mm(xC, wC, s, kC, o); - }, - }, - OC = la("valid-input"), - _C = la("invalid-input"), - TC = la("validating-input"), - EC = "colorcustom.rgb.", - AC = (e, t, o, n) => { - const s = (o, n) => - FS.config({ - invalidClass: t("invalid"), - notify: { - onValidate: (e) => { - Ir(e, TC, { type: o }); - }, - onValid: (e) => { - Ir(e, OC, { type: o, value: pu.getValue(e) }); - }, - onInvalid: (e) => { - Ir(e, _C, { type: o, value: pu.getValue(e) }); - }, - }, - validator: { - validate: (t) => { - const o = pu.getValue(t), - s = n(o) ? sn.value(!0) : sn.error(e("aria.input.invalid")); - return bw(s); - }, - validateOnLoad: !1, - }, - }), - r = (o, n, r, a, i) => { - const l = e(EC + "range"), - c = aS.parts.label({ - dom: { tag: "label", attributes: { "aria-label": a } }, - components: [ti(r)], - }), - d = aS.parts.field({ - data: i, - factory: Vb, - inputAttributes: { - type: "text", - ...("hex" === n ? { "aria-live": "polite" } : {}), - }, - inputClasses: [t("textfield")], - inputBehaviours: kl([s(n, o), cS.config({})]), - onSetValue: (e) => { - FS.isInvalid(e) && FS.run(e).get(b); - }, - }), - u = [c, d], - m = "hex" !== n ? [aS.parts["aria-descriptor"]({ text: l })] : []; - return { - dom: { tag: "div", attributes: { role: "presentation" } }, - components: u.concat(m), - }; - }, - a = (e, t) => { - const o = t.red, - n = t.green, - s = t.blue; - pu.setValue(e, { red: o, green: n, blue: s }); - }, - i = jh({ - dom: { - tag: "div", - classes: [t("rgba-preview")], - styles: { "background-color": "white" }, - attributes: { role: "presentation" }, - }, - }), - l = (e, t) => { - i.getOpt(e).each((e) => { - Dt(e.element, "background-color", "#" + t.value); - }); - }, - c = fm({ - factory: () => { - const s = { - red: Es(A.some(255)), - green: Es(A.some(255)), - blue: Es(A.some(255)), - hex: Es(A.some("ffffff")), - }, - c = (e) => s[e].get(), - d = (e, t) => { - s[e].set(t); - }, - u = (e) => { - const t = e.red, - o = e.green, - n = e.blue; - d("red", A.some(t)), - d("green", A.some(o)), - d("blue", A.some(n)); - }, - m = (e, t) => { - const o = t.event; - "hex" !== o.type ? d(o.type, A.none()) : n(e); - }, - g = (e, t) => { - const n = t.event; - ((e) => "hex" === e.type)(n) - ? ((e, t) => { - o(e); - const n = qy(t); - d("hex", A.some(n.value)); - const s = lx(n); - a(e, s), u(s), Ir(e, bC, { hex: n }), l(e, n); - })(e, n.value) - : ((e, t, o) => { - const n = parseInt(o, 10); - d(t, A.some(n)), - c("red") - .bind((e) => - c("green").bind((t) => - c("blue").map((o) => rx(e, t, o, 1)), - ), - ) - .each((t) => { - const o = ((e, t) => { - const o = Qy(t); - return ( - CC.getField(e, "hex").each((t) => { - oh.isFocused(t) || - pu.setValue(e, { hex: o.value }); - }), - o - ); - })(e, t); - Ir(e, bC, { hex: o }), l(e, o); - }); - })(e, n.type, n.value); - }, - p = (t) => ({ - label: e(EC + t + ".label"), - description: e(EC + t + ".description"), - }), - h = p("red"), - f = p("green"), - b = p("blue"), - v = p("hex"); - return fn( - CC.sketch((o) => ({ - dom: { - tag: "form", - classes: [t("rgb-form")], - attributes: { "aria-label": e("aria.color.picker") }, - }, - components: [ - o.field( - "red", - aS.sketch(r(ax, "red", h.label, h.description, 255)), - ), - o.field( - "green", - aS.sketch(r(ax, "green", f.label, f.description, 255)), - ), - o.field( - "blue", - aS.sketch(r(ax, "blue", b.label, b.description, 255)), - ), - o.field( - "hex", - aS.sketch(r(Ky, "hex", v.label, v.description, "ffffff")), - ), - i.asSpec(), - ], - formBehaviours: kl([ - FS.config({ invalidClass: t("form-invalid") }), - Jp("rgb-form-events", [Ur(OC, g), Ur(_C, m), Ur(TC, m)]), - ]), - })), - { - apis: { - updateHex: (e, t) => { - pu.setValue(e, { hex: t.value }), - ((e, t) => { - const o = lx(t); - a(e, o), u(o); - })(e, t), - l(e, t); - }, - }, - }, - ); - }, - name: "RgbForm", - configFields: [], - apis: { - updateHex: (e, t, o) => { - e.updateHex(t, o); - }, - }, - extraApis: {}, - }); - return c; - }, - MC = (e, t) => { - const o = fm({ - name: "ColourPicker", - configFields: [os("dom"), ys("onValidHex", b), ys("onInvalidHex", b)], - factory: (o) => { - const n = AC(e, t, o.onValidHex, o.onInvalidHex), - s = ((e, t) => { - const o = fC.parts.spectrum({ - dom: { - tag: "canvas", - attributes: { role: "presentation" }, - classes: [t("sv-palette-spectrum")], - }, - }), - n = fC.parts.thumb({ - dom: { - tag: "div", - attributes: { role: "presentation" }, - classes: [t("sv-palette-thumb")], - innerHtml: ``, - }, - }), - s = (e, t) => { - const { width: o, height: n } = e, - s = e.getContext("2d"); - if (null === s) return; - (s.fillStyle = t), s.fillRect(0, 0, o, n); - const r = s.createLinearGradient(0, 0, o, 0); - r.addColorStop(0, "rgba(255,255,255,1)"), - r.addColorStop(1, "rgba(255,255,255,0)"), - (s.fillStyle = r), - s.fillRect(0, 0, o, n); - const a = s.createLinearGradient(0, 0, 0, n); - a.addColorStop(0, "rgba(0,0,0,0)"), - a.addColorStop(1, "rgba(0,0,0,1)"), - (s.fillStyle = a), - s.fillRect(0, 0, o, n); - }; - return fm({ - factory: (e) => { - const r = x({ x: 0, y: 0 }), - a = kl([wm.config({ find: A.some }), oh.config({})]); - return fC.sketch({ - dom: { - tag: "div", - attributes: { role: "presentation" }, - classes: [t("sv-palette")], - }, - model: { mode: "xy", getInitialValue: r }, - rounded: !1, - components: [o, n], - onChange: (e, t, o) => { - Ir(e, yC, { value: o }); - }, - onInit: (e, t, o, n) => { - s(o.element.dom, ux(mx)); - }, - sliderBehaviours: a, - }); - }, - name: "SaturationBrightnessPalette", - configFields: [], - apis: { - setHue: (e, t, o) => { - ((e, t) => { - const o = e.components()[0].element.dom, - n = _x(t, 100, 100), - r = ix(n); - s(o, ux(r)); - })(t, o); - }, - setThumb: (e, t, o) => { - ((e, t) => { - const o = Tx(lx(t)); - fC.setValue(e, { x: o.saturation, y: 100 - o.value }); - })(t, o); - }, - }, - extraApis: {}, - }); - })(0, t), - r = { paletteRgba: Es(mx), paletteHue: Es(0) }, - a = jh( - ((e, t) => { - const o = fC.parts.spectrum({ - dom: { - tag: "div", - classes: [t("hue-slider-spectrum")], - attributes: { role: "presentation" }, - }, - }), - n = fC.parts.thumb({ - dom: { - tag: "div", - classes: [t("hue-slider-thumb")], - attributes: { role: "presentation" }, - }, - }); - return fC.sketch({ - dom: { - tag: "div", - classes: [t("hue-slider")], - attributes: { role: "presentation" }, - }, - rounded: !1, - model: { mode: "y", getInitialValue: x(0) }, - components: [o, n], - sliderBehaviours: kl([oh.config({})]), - onChange: (e, t, o) => { - Ir(e, vC, { value: o }); - }, - }); - })(0, t), - ), - i = jh(s.sketch({})), - l = jh(n.sketch({})), - c = (e, t, o) => { - i.getOpt(e).each((e) => { - s.setHue(e, o); - }); - }, - d = (e, t) => { - l.getOpt(e).each((e) => { - n.updateHex(e, t); - }); - }, - u = (e, t, o) => { - a.getOpt(e).each((e) => { - fC.setValue(e, ((e) => 100 - (e / 360) * 100)(o)); - }); - }, - m = (e, t) => { - i.getOpt(e).each((e) => { - s.setThumb(e, t); - }); - }, - g = (e, t, o, n) => { - ((e, t) => { - const o = lx(e); - r.paletteRgba.set(o), r.paletteHue.set(t); - })(t, o), - L(n, (n) => { - n(e, t, o); - }); - }; - return { - uid: o.uid, - dom: o.dom, - components: [i.asSpec(), a.asSpec(), l.asSpec()], - behaviours: kl([ - Jp("colour-picker-events", [ - Ur( - bC, - (() => { - const e = [c, u, m]; - return (t, o) => { - const n = o.event.hex, - s = ((e) => Tx(lx(e)))(n); - g(t, n, s.hue, e); - }; - })(), - ), - Ur( - yC, - (() => { - const e = [d]; - return (t, o) => { - const n = o.event.value, - s = r.paletteHue.get(), - a = _x(s, n.x, 100 - n.y), - i = Ex(a); - g(t, i, s, e); - }; - })(), - ), - Ur( - vC, - (() => { - const e = [c, d]; - return (t, o) => { - const n = ((e) => ((100 - e) / 100) * 360)(o.event.value), - s = r.paletteRgba.get(), - a = Tx(s), - i = _x(n, a.saturation, a.value), - l = Ex(i); - g(t, l, n, e); - }; - })(), - ), - ]), - wm.config({ find: (e) => l.getOpt(e) }), - Pp.config({ mode: "acyclic" }), - ]), - }; - }, - }); - return o; - }, - DC = () => wm.config({ find: A.some }), - BC = (e) => - wm.config({ - find: (t) => - lt(t.element, e).bind((e) => t.getSystem().getByDom(e).toOptional()), - }), - FC = Dn([ys("preprocess", w), ys("postprocess", w)]), - IC = (e, t) => { - const o = Yn("RepresentingConfigs.memento processors", FC, t); - return pu.config({ - store: { - mode: "manual", - getValue: (t) => { - const n = e.get(t), - s = pu.getValue(n); - return o.postprocess(s); - }, - setValue: (t, n) => { - const s = o.preprocess(n), - r = e.get(t); - pu.setValue(r, s); - }, - }, - }); - }, - RC = (e, t, o) => - pu.config({ - store: { - mode: "manual", - ...e.map((e) => ({ initialValue: e })).getOr({}), - getValue: t, - setValue: o, - }, - }), - NC = (e, t, o) => - RC( - e, - (e) => t(e.element), - (e, t) => o(e.element, t), - ), - VC = (e) => pu.config({ store: { mode: "memory", initialValue: e } }), - zC = { - "colorcustom.rgb.red.label": "R", - "colorcustom.rgb.red.description": "Red component", - "colorcustom.rgb.green.label": "G", - "colorcustom.rgb.green.description": "Green component", - "colorcustom.rgb.blue.label": "B", - "colorcustom.rgb.blue.description": "Blue component", - "colorcustom.rgb.hex.label": "#", - "colorcustom.rgb.hex.description": "Hex color code", - "colorcustom.rgb.range": "Range 0 to 255", - "aria.color.picker": "Color Picker", - "aria.input.invalid": "Invalid input", - }; - var HC = tinymce.util.Tools.resolve("tinymce.Resource"), - LC = tinymce.util.Tools.resolve("tinymce.util.Tools"); - const PC = (e, t) => { - let o = null; - const n = () => { - c(o) || (clearTimeout(o), (o = null)); - }; - return { - cancel: n, - throttle: (...s) => { - n(), - (o = setTimeout(() => { - (o = null), e.apply(null, s); - }, t)); - }, - }; - }, - UC = la("alloy-fake-before-tabstop"), - WC = la("alloy-fake-after-tabstop"), - jC = (e) => ({ - dom: { - tag: "div", - styles: { width: "1px", height: "1px", outline: "none" }, - attributes: { tabindex: "0" }, - classes: e, - }, - behaviours: kl([oh.config({ ignore: !0 }), cS.config({})]), - }), - GC = (e, t) => ({ - dom: { tag: "div", classes: ["tox-navobj", ...e.getOr([])] }, - components: [jC([UC]), t, jC([WC])], - behaviours: kl([BC(1)]), - }), - $C = (e, t) => { - Ir(e, Ks(), { raw: { which: 9, shiftKey: t } }); - }, - qC = (e, t) => { - const o = t.element; - Ua(o, UC) ? $C(e, !0) : Ua(o, WC) && $C(e, !1); - }, - XC = (e) => $w(e, ["." + UC, "." + WC].join(","), T), - YC = la("update-dialog"), - KC = la("update-title"), - JC = la("update-body"), - ZC = la("update-footer"), - QC = la("body-send-message"), - eO = la("dialog-focus-shifted"), - tO = Do().browser, - oO = tO.isSafari(), - nO = tO.isFirefox(), - sO = oO || nO, - rO = tO.isChromium(), - aO = ({ scrollTop: e, scrollHeight: t, clientHeight: o }) => - Math.ceil(e) + o >= t, - iO = (e, t) => e.scrollTo(0, "bottom" === t ? 99999999 : t), - lO = (e, t, o) => { - const n = e.dom; - A.from(n.contentDocument).fold(o, (e) => { - let o = 0; - const s = ((e, t) => { - const o = e.body; - return A.from( - !/^ 1))) - ? o - : e.documentElement, - ); - })(e, t) - .map((e) => ((o = e.scrollTop), e)) - .forall(aO), - r = () => { - const e = n.contentWindow; - g(e) && (s ? iO(e, "bottom") : !s && sO && 0 !== o && iO(e, o)); - }; - oO && n.addEventListener("load", r, { once: !0 }), - e.open(), - e.write(t), - e.close(), - oO || r(); - }); - }, - cO = Ce(sO, oO ? 500 : 200).map((e) => - ((e, t) => { - let o = null, - n = null; - return { - cancel: () => { - c(o) || (clearTimeout(o), (o = null), (n = null)); - }, - throttle: (...s) => { - (n = s), - c(o) && - (o = setTimeout(() => { - const t = n; - (o = null), (n = null), e.apply(null, t); - }, t)); - }, - }; - })(lO, e), - ), - dO = la("toolbar.button.execute"), - uO = la("common-button-display-events"), - mO = { - [ur()]: [ - "disabling", - "alloy.base.behaviour", - "toggling", - "toolbar-button-events", - ], - [Sr()]: ["toolbar-button-events", uO], - [Ws()]: ["focusing", "alloy.base.behaviour", uO], - }, - gO = (e) => Dt(e.element, "width", It(e.element, "width")), - pO = (e, t, o) => - ef( - e, - { - tag: "span", - classes: ["tox-icon", "tox-tbtn__icon-wrap"], - behaviours: o, - }, - t, - ), - hO = (e, t) => pO(e, t, []), - fO = (e, t) => pO(e, t, [Kp.config({})]), - bO = (e, t, o) => ({ - dom: { tag: "span", classes: [`${t}__select-label`] }, - components: [ti(o.translate(e))], - behaviours: kl([Kp.config({})]), - }), - vO = la("update-menu-text"), - yO = la("update-menu-icon"), - xO = (e, t, o) => { - const n = Es(b), - s = e.text.map((e) => jh(bO(e, t, o.providers))), - r = e.icon.map((e) => jh(fO(e, o.providers.icons))), - a = (e, t) => { - const o = pu.getValue(e); - return ( - oh.focus(o), - Ir(o, "keydown", { raw: t.event.raw }), - Dw.close(o), - A.some(!0) - ); - }, - i = e.role.fold( - () => ({}), - (e) => ({ role: e }), - ), - l = e.tooltip.fold( - () => ({}), - (e) => { - const t = o.providers.translate(e); - return { title: t, "aria-label": t }; - }, - ), - c = ef( - "chevron-down", - { tag: "div", classes: [`${t}__select-chevron`] }, - o.providers.icons, - ), - d = la("common-button-display-events"), - u = jh( - Dw.sketch({ - ...(e.uid ? { uid: e.uid } : {}), - ...i, - dom: { - tag: "button", - classes: [t, `${t}--select`].concat( - H(e.classes, (e) => `${t}--${e}`), - ), - attributes: { ...l }, - }, - components: Dy([ - r.map((e) => e.asSpec()), - s.map((e) => e.asSpec()), - A.some(c), - ]), - matchWidth: !0, - useMinWidth: !0, - onOpen: (t, o, n) => { - e.searchable && - ((e) => { - Ub(e).each((e) => oh.focus(e)); - })(n); - }, - dropdownBehaviours: kl([ - ...e.dropdownBehaviours, - ky(() => e.disabled || o.providers.isDisabled()), - Sy(), - IS.config({}), - Kp.config({}), - Jp("dropdown-events", [Ty(e, n), Ey(e, n)]), - Jp(d, [Kr((e, t) => gO(e))]), - Jp("menubutton-update-display-text", [ - Ur(vO, (e, t) => { - s.bind((t) => t.getOpt(e)).each((e) => { - Kp.set(e, [ti(o.providers.translate(t.event.text))]); - }); - }), - Ur(yO, (e, t) => { - r.bind((t) => t.getOpt(e)).each((e) => { - Kp.set(e, [fO(t.event.icon, o.providers.icons)]); - }); - }), - ]), - ]), - eventOrder: fn(mO, { - mousedown: [ - "focusing", - "alloy.base.behaviour", - "item-type-events", - "normal-dropdown-events", - ], - [Sr()]: ["toolbar-button-events", "dropdown-events", d], - }), - sandboxBehaviours: kl([ - Pp.config({ mode: "special", onLeft: a, onRight: a }), - Jp("dropdown-sandbox-events", [ - Ur(zb, (e, t) => { - ((e) => { - const t = pu.getValue(e), - o = Pb(e).map(Wb); - Dw.refetch(t).get(() => { - const e = uw.getCoupled(t, "sandbox"); - o.each((t) => - Pb(e).each((e) => - ((e, t) => { - pu.setValue(e, t.fetchPattern), - (e.element.dom.selectionStart = t.selectionStart), - (e.element.dom.selectionEnd = t.selectionEnd); - })(e, t), - ), - ); - }); - })(e), - t.stop(); - }), - Ur(Hb, (e, t) => { - ((e, t) => { - ((e) => - Xd.getState(e) - .bind(Gm.getHighlighted) - .bind(Gm.getHighlighted))(e).each((o) => { - ((e, t, o, n) => { - const s = { ...n, target: t }; - e.getSystem().triggerEvent(o, t, s); - })( - e, - o.element, - t.event.eventType, - t.event.interactionEvent, - ); - }); - })(e, t), - t.stop(); - }), - ]), - ]), - lazySink: o.getSink, - toggleClass: `${t}--active`, - parts: { - menu: { - ...Bb(0, e.columns, e.presets), - fakeFocus: e.searchable, - onHighlightItem: Bw, - onCollapseMenu: (e, t, o) => { - Gm.getHighlighted(o).each((t) => { - Bw(e, o, t); - }); - }, - onDehighlightItem: Fw, - }, - }, - getAnchorOverrides: () => ({ - maxHeightFunction: (e, t) => { - lc()(e, t - 10); - }, - }), - fetch: (t) => fw(k(e.fetch, t)), - }), - ); - return u.asSpec(); - }, - wO = (e) => "separator" === e.type, - SO = { type: "separator" }, - kO = (e, t) => { - const o = ((e, t) => { - const o = j( - e, - (e, o) => - ((e) => r(e))(o) - ? "" === o - ? e - : "|" === o - ? e.length > 0 && !wO(e[e.length - 1]) - ? e.concat([SO]) - : e - : ve(t, o.toLowerCase()) - ? e.concat([t[o.toLowerCase()]]) - : e - : e.concat([o]), - [], - ); - return o.length > 0 && wO(o[o.length - 1]) && o.pop(), o; - })(r(e) ? e.split(" ") : e, t); - return W( - o, - (e, o) => { - if (((e) => ve(e, "getSubmenuItems"))(o)) { - const n = ((e) => { - const t = be(e, "value").getOrThunk(() => - la("generated-menu-item"), - ); - return fn({ value: t }, e); - })(o), - s = ((e, t) => { - const o = e.getSubmenuItems(), - n = kO(o, t); - return { - item: e, - menus: fn(n.menus, { [e.value]: n.items }), - expansions: fn(n.expansions, { [e.value]: e.value }), - }; - })(n, t); - return { - menus: fn(e.menus, s.menus), - items: [s.item, ...e.items], - expansions: fn(e.expansions, s.expansions), - }; - } - return { ...e, items: [o, ...e.items] }; - }, - { menus: {}, expansions: {}, items: [] }, - ); - }, - CO = (e, t, o, n) => { - const s = la("primary-menu"), - r = kO(e, o.shared.providers.menuItems()); - if (0 === r.items.length) return A.none(); - const a = ((e) => - e.search.fold( - () => ({ searchMode: "no-search" }), - (e) => ({ - searchMode: "search-with-field", - placeholder: e.placeholder, - }), - ))(n), - i = zw(s, r.items, t, o, n.isHorizontalMenu, a), - l = ((e) => - e.search.fold( - () => ({ searchMode: "no-search" }), - (e) => ({ searchMode: "search-with-results" }), - ))(n), - c = ce(r.menus, (e, n) => zw(n, e, t, o, !1, l)), - d = fn(c, Ms(s, i)); - return A.from(Lh.tieredData(s, d, r.expansions)); - }, - OO = (e) => !ve(e, "items"), - _O = "data-value", - TO = (e, t, o, n) => - H(o, (o) => - OO(o) - ? { - type: "togglemenuitem", - text: o.text, - value: o.value, - active: o.value === n, - onAction: () => { - pu.setValue(e, o.value), Ir(e, hS, { name: t }), oh.focus(e); - }, - } - : { - type: "nestedmenuitem", - text: o.text, - getSubmenuItems: () => TO(e, t, o.items, n), - }, - ), - EO = (e, t) => - re(e, (e) => (OO(e) ? Ce(e.value === t, e) : EO(e.items, t))), - AO = fm({ - name: "HtmlSelect", - configFields: [ - os("options"), - hu("selectBehaviours", [oh, pu]), - ys("selectClasses", []), - ys("selectAttributes", {}), - us("data"), - ], - factory: (e, t) => { - const o = H(e.options, (e) => ({ - dom: { tag: "option", value: e.value, innerHtml: e.text }, - })), - n = e.data.map((e) => Ms("initialValue", e)).getOr({}); - return { - uid: e.uid, - dom: { - tag: "select", - classes: e.selectClasses, - attributes: e.selectAttributes, - }, - components: o, - behaviours: bu(e.selectBehaviours, [ - oh.config({}), - pu.config({ - store: { - mode: "manual", - getValue: (e) => $a(e.element), - setValue: (t, o) => { - const n = oe(e.options); - G(e.options, (e) => e.value === o).isSome() - ? qa(t.element, o) - : -1 === t.element.dom.selectedIndex && - "" === o && - n.each((e) => qa(t.element, e.value)); - }, - ...n, - }, - }), - ]), - }; - }, - }), - MO = x([ - ys("field1Name", "field1"), - ys("field2Name", "field2"), - Fi("onLockedChange"), - Ai(["lockClass"]), - ys("locked", !1), - vu("coupledFieldBehaviours", [wm, pu]), - ]), - DO = (e, t) => - Uu({ - factory: aS, - name: e, - overrides: (e) => ({ - fieldBehaviours: kl([ - Jp("coupled-input-behaviour", [ - Ur(Zs(), (o) => { - ((e, t, o) => om(e, t, o).bind(wm.getCurrent))(o, e, t).each( - (t) => { - om(o, e, "lock").each((n) => { - dh.isOn(n) && e.onLockedChange(o, t, n); - }); - }, - ); - }), - ]), - ]), - }), - }), - BO = x([ - DO("field1", "field2"), - DO("field2", "field1"), - Uu({ - factory: Wh, - schema: [os("dom")], - name: "lock", - overrides: (e) => ({ - buttonBehaviours: kl([ - dh.config({ - selected: e.locked, - toggleClass: e.markers.lockClass, - aria: { mode: "pressed" }, - }), - ]), - }), - }), - ]), - FO = bm({ - name: "FormCoupledInputs", - configFields: MO(), - partFields: BO(), - factory: (e, t, o, n) => ({ - uid: e.uid, - dom: e.dom, - components: t, - behaviours: yu(e.coupledFieldBehaviours, [ - wm.config({ find: A.some }), - pu.config({ - store: { - mode: "manual", - getValue: (t) => { - const o = im(t, e, ["field1", "field2"]); - return { - [e.field1Name]: pu.getValue(o.field1()), - [e.field2Name]: pu.getValue(o.field2()), - }; - }, - setValue: (t, o) => { - const n = im(t, e, ["field1", "field2"]); - ye(o, e.field1Name) && pu.setValue(n.field1(), o[e.field1Name]), - ye(o, e.field2Name) && - pu.setValue(n.field2(), o[e.field2Name]); - }, - }, - }), - ]), - apis: { - getField1: (t) => om(t, e, "field1"), - getField2: (t) => om(t, e, "field2"), - getLock: (t) => om(t, e, "lock"), - }, - }), - apis: { - getField1: (e, t) => e.getField1(t), - getField2: (e, t) => e.getField2(t), - getLock: (e, t) => e.getLock(t), - }, - }), - IO = (e) => { - const t = - /^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec( - e, - ); - if (null !== t) { - const e = parseFloat(t[1]), - o = t[2]; - return sn.value({ value: e, unit: o }); - } - return sn.error(e); - }, - RO = (e, t) => { - const o = { "": 96, px: 96, pt: 72, cm: 2.54, pc: 12, mm: 25.4, in: 1 }, - n = (e) => ve(o, e); - return e.unit === t - ? A.some(e.value) - : n(e.unit) && n(t) - ? o[e.unit] === o[t] - ? A.some(e.value) - : A.some((e.value / o[e.unit]) * o[t]) - : A.none(); - }, - NO = (e) => A.none(), - VO = (e, t) => { - const o = e.label.map((e) => pS(e, t)), - n = [ - Rm.config({ disabled: () => e.disabled || t.isDisabled() }), - Sy(), - Pp.config({ - mode: "execution", - useEnter: !0 !== e.multiline, - useControlEnter: !0 === e.multiline, - execute: (e) => (Fr(e, yS), A.some(!0)), - }), - Jp("textfield-change", [ - Ur(Zs(), (t, o) => { - Ir(t, hS, { name: e.name }); - }), - Ur(cr(), (t, o) => { - Ir(t, hS, { name: e.name }); - }), - ]), - cS.config({}), - ], - s = e.validation - .map((e) => - FS.config({ - getRoot: (e) => rt(e.element), - invalidClass: "tox-invalid", - validator: { - validate: (t) => { - const o = pu.getValue(t), - n = e.validator(o); - return bw(!0 === n ? sn.value(o) : sn.error(n)); - }, - validateOnLoad: e.validateOnLoad, - }, - }), - ) - .toArray(), - r = { - ...e.placeholder.fold(x({}), (e) => ({ - placeholder: t.translate(e), - })), - ...e.inputMode.fold(x({}), (e) => ({ inputmode: e })), - }, - a = aS.parts.field({ - tag: !0 === e.multiline ? "textarea" : "input", - ...e.data.map((e) => ({ data: e })).getOr({}), - inputAttributes: r, - inputClasses: [e.classname], - inputBehaviours: kl(q([n, s])), - selectOnFocus: !1, - factory: Vb, - }), - i = e.multiline - ? { - dom: { tag: "div", classes: ["tox-textarea-wrap"] }, - components: [a], - } - : a, - l = (e.flex ? ["tox-form__group--stretched"] : []).concat( - e.maximized ? ["tox-form-group--maximize"] : [], - ), - c = [ - Rm.config({ - disabled: () => e.disabled || t.isDisabled(), - onDisabled: (e) => { - aS.getField(e).each(Rm.disable); - }, - onEnabled: (e) => { - aS.getField(e).each(Rm.enable); - }, - }), - Sy(), - ]; - return uS(o, i, l, c); - }, - zO = (e, t) => - t.getAnimationRoot.fold( - () => e.element, - (t) => t(e), - ), - HO = (e) => e.dimension.property, - LO = (e, t) => e.dimension.getDimension(t), - PO = (e, t) => { - const o = zO(e, t); - ja(o, [t.shrinkingClass, t.growingClass]); - }, - UO = (e, t) => { - Pa(e.element, t.openClass), - La(e.element, t.closedClass), - Dt(e.element, HO(t), "0px"), - Lt(e.element); - }, - WO = (e, t) => { - Pa(e.element, t.closedClass), - La(e.element, t.openClass), - Ht(e.element, HO(t)); - }, - jO = (e, t, o, n) => { - o.setCollapsed(), - Dt(e.element, HO(t), LO(t, e.element)), - PO(e, t), - UO(e, t), - t.onStartShrink(e), - t.onShrunk(e); - }, - GO = (e, t, o, n) => { - const s = n.getOrThunk(() => LO(t, e.element)); - o.setCollapsed(), Dt(e.element, HO(t), s), Lt(e.element); - const r = zO(e, t); - Pa(r, t.growingClass), - La(r, t.shrinkingClass), - UO(e, t), - t.onStartShrink(e); - }, - $O = (e, t, o) => { - const n = LO(t, e.element); - ("0px" === n ? jO : GO)(e, t, o, A.some(n)); - }, - qO = (e, t, o) => { - const n = zO(e, t), - s = Ua(n, t.shrinkingClass), - r = LO(t, e.element); - WO(e, t); - const a = LO(t, e.element); - (s - ? () => { - Dt(e.element, HO(t), r), Lt(e.element); - } - : () => { - UO(e, t); - })(), - Pa(n, t.shrinkingClass), - La(n, t.growingClass), - WO(e, t), - Dt(e.element, HO(t), a), - o.setExpanded(), - t.onStartGrow(e); - }, - XO = (e, t, o) => { - const n = zO(e, t); - return !0 === Ua(n, t.growingClass); - }, - YO = (e, t, o) => { - const n = zO(e, t); - return !0 === Ua(n, t.shrinkingClass); - }; - var KO = Object.freeze({ - __proto__: null, - refresh: (e, t, o) => { - if (o.isExpanded()) { - Ht(e.element, HO(t)); - const o = LO(t, e.element); - Dt(e.element, HO(t), o); - } - }, - grow: (e, t, o) => { - o.isExpanded() || qO(e, t, o); - }, - shrink: (e, t, o) => { - o.isExpanded() && $O(e, t, o); - }, - immediateShrink: (e, t, o) => { - o.isExpanded() && jO(e, t, o); - }, - hasGrown: (e, t, o) => o.isExpanded(), - hasShrunk: (e, t, o) => o.isCollapsed(), - isGrowing: XO, - isShrinking: YO, - isTransitioning: (e, t, o) => XO(e, t) || YO(e, t), - toggleGrow: (e, t, o) => { - (o.isExpanded() ? $O : qO)(e, t, o); - }, - disableTransitions: PO, - immediateGrow: (e, t, o) => { - o.isExpanded() || - (WO(e, t), - Dt(e.element, HO(t), LO(t, e.element)), - PO(e, t), - o.setExpanded(), - t.onStartGrow(e), - t.onGrown(e)); - }, - }), - JO = Object.freeze({ - __proto__: null, - exhibit: (e, t, o) => { - const n = t.expanded; - return Ea( - n - ? { classes: [t.openClass], styles: {} } - : { - classes: [t.closedClass], - styles: Ms(t.dimension.property, "0px"), - }, - ); - }, - events: (e, t) => - Hr([ - Yr(or(), (o, n) => { - n.event.raw.propertyName === e.dimension.property && - (PO(o, e), - t.isExpanded() && Ht(o.element, e.dimension.property), - (t.isExpanded() ? e.onGrown : e.onShrunk)(o)); - }), - ]), - }), - ZO = [ - os("closedClass"), - os("openClass"), - os("shrinkingClass"), - os("growingClass"), - us("getAnimationRoot"), - Di("onShrunk"), - Di("onStartShrink"), - Di("onGrown"), - Di("onStartGrow"), - ys("expanded", !1), - ns( - "dimension", - Jn("property", { - width: [ - Ri("property", "width"), - Ri("getDimension", (e) => Jt(e) + "px"), - ], - height: [ - Ri("property", "height"), - Ri("getDimension", (e) => Wt(e) + "px"), - ], - }), - ), - ]; - const QO = Ol({ - fields: ZO, - name: "sliding", - active: JO, - apis: KO, - state: Object.freeze({ - __proto__: null, - init: (e) => { - const t = Es(e.expanded); - return _a({ - isExpanded: () => !0 === t.get(), - isCollapsed: () => !1 === t.get(), - setCollapsed: k(t.set, !1), - setExpanded: k(t.set, !0), - readState: () => "expanded: " + t.get(), - }); - }, - }), - }), - e_ = (e) => ({ - isEnabled: () => !Rm.isDisabled(e), - setEnabled: (t) => Rm.set(e, !t), - setActive: (t) => { - const o = e.element; - t - ? (La(o, "tox-tbtn--enabled"), kt(o, "aria-pressed", !0)) - : (Pa(o, "tox-tbtn--enabled"), Et(o, "aria-pressed")); - }, - isActive: () => Ua(e.element, "tox-tbtn--enabled"), - setText: (t) => { - Ir(e, vO, { text: t }); - }, - setIcon: (t) => Ir(e, yO, { icon: t }), - }), - t_ = (e, t, o, n, s = !0) => - xO( - { - text: e.text, - icon: e.icon, - tooltip: e.tooltip, - searchable: e.search.isSome(), - role: n, - fetch: (t, n) => { - const s = { pattern: e.search.isSome() ? Iw(t) : "" }; - e.fetch( - (t) => { - n( - CO(t, pb.CLOSE_ON_EXECUTE, o, { - isHorizontalMenu: !1, - search: e.search, - }), - ); - }, - s, - e_(t), - ); - }, - onSetup: e.onSetup, - getApi: e_, - columns: 1, - presets: "normal", - classes: [], - dropdownBehaviours: [...(s ? [cS.config({})] : [])], - }, - t, - o.shared, - ), - o_ = (e, t, o) => { - const n = (e) => (n) => { - const s = !n.isActive(); - n.setActive(s), - e.storage.set(s), - o.shared.getSink().each((o) => { - t() - .getOpt(o) - .each((t) => { - Dl(t.element), - Ir(t, vS, { name: e.name, value: e.storage.get() }); - }); - }); - }, - s = (e) => (t) => { - t.setActive(e.storage.get()); - }; - return (t) => { - t( - H(e, (e) => { - const t = e.text.fold( - () => ({}), - (e) => ({ text: e }), - ); - return { - type: e.type, - active: !1, - ...t, - onAction: n(e), - onSetup: s(e), - }; - }), - ); - }; - }, - n_ = (e) => ({ - dom: { - tag: "span", - classes: ["tox-tree__label"], - attributes: { title: e, "aria-label": e }, - }, - components: [ti(e)], - }), - s_ = la("leaf-label-event-id"), - r_ = ({ - leaf: e, - onLeafAction: t, - visible: o, - treeId: n, - selectedId: s, - backstage: r, - }) => { - const a = e.menu.map((e) => t_(e, "tox-mbtn", r, A.none(), o)), - i = [n_(e.title)]; - return ( - a.each((e) => i.push(e)), - Wh.sketch({ - dom: { - tag: "div", - classes: ["tox-tree--leaf__label", "tox-trbtn"].concat( - o ? ["tox-tree--leaf__label--visible"] : [], - ), - }, - components: i, - role: "treeitem", - action: (o) => { - t(e.id), - o - .getSystem() - .broadcastOn([`update-active-item-${n}`], { value: e.id }); - }, - eventOrder: { [Ks()]: [s_, "keying"] }, - buttonBehaviours: kl([ - ...(o ? [cS.config({})] : []), - dh.config({ - toggleClass: "tox-trbtn--enabled", - toggleOnExecute: !1, - aria: { mode: "selected" }, - }), - Al.config({ - channels: { - [`update-active-item-${n}`]: { - onReceive: (t, o) => { - (o.value === e.id ? dh.on : dh.off)(t); - }, - }, - }, - }), - Jp(s_, [ - Kr((t, o) => { - s.each((o) => { - (o === e.id ? dh.on : dh.off)(t); - }); - }), - Ur(Ks(), (e, t) => { - const o = "ArrowLeft" === t.event.raw.code, - n = "ArrowRight" === t.event.raw.code; - o - ? (mi(e.element, ".tox-tree--directory").each((t) => { - e.getSystem() - .getByDom(t) - .each((e) => { - gi(t, ".tox-tree--directory__label").each((t) => { - e.getSystem().getByDom(t).each(oh.focus); - }); - }); - }), - t.stop()) - : n && t.stop(); - }), - ]), - ]), - }) - ); - }, - a_ = la("directory-label-event-id"), - i_ = ({ directory: e, visible: t, noChildren: o, backstage: n }) => { - const s = e.menu.map((e) => t_(e, "tox-mbtn", n, A.none())), - r = [ - { - dom: { tag: "div", classes: ["tox-chevron"] }, - components: [ - ((a = "chevron-right"), - (i = n.shared.providers.icons), - ((e, t, o) => - ef( - e, - { - tag: "span", - classes: ["tox-tree__icon-wrap", "tox-icon"], - behaviours: [], - }, - t, - ))(a, i)), - ], - }, - n_(e.title), - ]; - var a, i; - s.each((e) => { - r.push(e); - }); - const l = (t) => { - mi(t.element, ".tox-tree--directory").each((o) => { - t.getSystem() - .getByDom(o) - .each((o) => { - const n = !dh.isOn(o); - dh.toggle(o), - Ir(t, "expand-tree-node", { expanded: n, node: e.id }); - }); - }); - }; - return Wh.sketch({ - dom: { - tag: "div", - classes: ["tox-tree--directory__label", "tox-trbtn"].concat( - t ? ["tox-tree--directory__label--visible"] : [], - ), - }, - components: r, - action: l, - eventOrder: { [Ks()]: [a_, "keying"] }, - buttonBehaviours: kl([ - ...(t ? [cS.config({})] : []), - Jp(a_, [ - Ur(Ks(), (e, t) => { - const n = "ArrowRight" === t.event.raw.code, - s = "ArrowLeft" === t.event.raw.code; - n && o && t.stop(), - (n || s) && - mi(e.element, ".tox-tree--directory").each((o) => { - e.getSystem() - .getByDom(o) - .each((o) => { - (!dh.isOn(o) && n) || (dh.isOn(o) && s) - ? (l(e), t.stop()) - : s && - !dh.isOn(o) && - (mi(o.element, ".tox-tree--directory").each((e) => { - gi(e, ".tox-tree--directory__label").each((e) => { - o.getSystem().getByDom(e).each(oh.focus); - }); - }), - t.stop()); - }); - }); - }), - ]), - ]), - }); - }, - l_ = ({ - children: e, - onLeafAction: t, - visible: o, - treeId: n, - expandedIds: s, - selectedId: r, - backstage: a, - }) => ({ - dom: { tag: "div", classes: ["tox-tree--directory__children"] }, - components: e.map((e) => - "leaf" === e.type - ? r_({ - leaf: e, - selectedId: r, - onLeafAction: t, - visible: o, - treeId: n, - backstage: a, - }) - : d_({ - directory: e, - expandedIds: s, - selectedId: r, - onLeafAction: t, - labelTabstopping: o, - treeId: n, - backstage: a, - }), - ), - behaviours: kl([ - QO.config({ - dimension: { property: "height" }, - closedClass: "tox-tree--directory__children--closed", - openClass: "tox-tree--directory__children--open", - growingClass: "tox-tree--directory__children--growing", - shrinkingClass: "tox-tree--directory__children--shrinking", - expanded: o, - }), - Kp.config({}), - ]), - }), - c_ = la("directory-event-id"), - d_ = ({ - directory: e, - onLeafAction: t, - labelTabstopping: o, - treeId: n, - backstage: s, - expandedIds: r, - selectedId: a, - }) => { - const { children: i } = e, - l = Es(r), - c = r.includes(e.id); - return { - dom: { - tag: "div", - classes: ["tox-tree--directory"], - attributes: { role: "treeitem" }, - }, - components: [ - i_({ - directory: e, - visible: o, - noChildren: 0 === e.children.length, - backstage: s, - }), - l_({ - children: i, - expandedIds: r, - selectedId: a, - onLeafAction: t, - visible: c, - treeId: n, - backstage: s, - }), - ], - behaviours: kl([ - Jp(c_, [ - Kr((e, t) => { - dh.set(e, c); - }), - Ur("expand-tree-node", (e, t) => { - const { expanded: o, node: n } = t.event; - l.set(o ? [...l.get(), n] : l.get().filter((e) => e !== n)); - }), - ]), - dh.config({ - ...(e.children.length > 0 ? { aria: { mode: "expanded" } } : {}), - toggleClass: "tox-tree--directory--expanded", - onToggled: (e, o) => { - const r = e.components()[1], - c = - ((d = o), - i.map((e) => - "leaf" === e.type - ? r_({ - leaf: e, - selectedId: a, - onLeafAction: t, - visible: d, - treeId: n, - backstage: s, - }) - : d_({ - directory: e, - expandedIds: l.get(), - selectedId: a, - onLeafAction: t, - labelTabstopping: d, - treeId: n, - backstage: s, - }), - )); - var d; - o ? QO.grow(r) : QO.shrink(r), Kp.set(r, c); - }, - }), - ]), - }; - }, - u_ = la("tree-event-id"); - var m_ = Object.freeze({ - __proto__: null, - events: (e, t) => { - const o = e.stream.streams.setup(e, t); - return Hr( - [Ur(e.event, o), Jr(() => t.cancel())].concat( - e.cancelEvent.map((e) => [Ur(e, () => t.cancel())]).getOr([]), - ), - ); - }, - }); - const g_ = (e) => { - const t = Es(null); - return _a({ - readState: () => ({ timer: null !== t.get() ? "set" : "unset" }), - setTimer: (e) => { - t.set(e); - }, - cancel: () => { - const e = t.get(); - null !== e && e.cancel(); - }, - }); - }; - var p_ = Object.freeze({ - __proto__: null, - throttle: g_, - init: (e) => e.stream.streams.state(e), - }), - h_ = [ - ns( - "stream", - Jn("mode", { - throttle: [ - os("delay"), - ys("stopEvent", !0), - Ri("streams", { - setup: (e, t) => { - const o = e.stream, - n = PC(e.onStream, o.delay); - return ( - t.setTimer(n), - (e, t) => { - n.throttle(e, t), o.stopEvent && t.stop(); - } - ); - }, - state: g_, - }), - ], - }), - ), - ys("event", "input"), - us("cancelEvent"), - Fi("onStream"), - ]; - const f_ = Ol({ fields: h_, name: "streaming", active: m_, state: p_ }), - b_ = (e, t, o) => { - const n = pu.getValue(o); - pu.setValue(t, n), y_(t); - }, - v_ = (e, t) => { - const o = e.element, - n = $a(o), - s = o.dom; - "number" !== Ot(o, "type") && t(s, n); - }, - y_ = (e) => { - v_(e, (e, t) => e.setSelectionRange(t.length, t.length)); - }, - x_ = x("alloy.typeahead.itemexecute"), - w_ = x( - [ - us("lazySink"), - os("fetch"), - ys("minChars", 5), - ys("responseTime", 1e3), - Di("onOpen"), - ys("getHotspot", A.some), - ys("getAnchorOverrides", x({})), - ys("layouts", A.none()), - ys("eventOrder", {}), - Ts("model", {}, [ - ys("getDisplayText", (e) => - void 0 !== e.meta && void 0 !== e.meta.text ? e.meta.text : e.value, - ), - ys("selectsOver", !0), - ys("populateFromBrowse", !0), - ]), - Di("onSetValue"), - Bi("onExecute"), - Di("onItemExecute"), - ys("inputClasses", []), - ys("inputAttributes", {}), - ys("inputStyles", {}), - ys("matchWidth", !0), - ys("useMinWidth", !1), - ys("dismissOnBlur", !0), - Ai(["openClass"]), - us("initialData"), - hu("typeaheadBehaviours", [oh, pu, f_, Pp, dh, uw]), - es("lazyTypeaheadComp", () => Es(A.none)), - es("previewing", () => Es(!0)), - ] - .concat(Fb()) - .concat(Ew()), - ), - S_ = x([ - Wu({ - schema: [Ei()], - name: "menu", - overrides: (e) => ({ - fakeFocus: !0, - onHighlightItem: (t, o, n) => { - e.previewing.get() - ? e.lazyTypeaheadComp.get().each((t) => { - ((e, t, o) => { - if (e.selectsOver) { - const n = pu.getValue(t), - s = e.getDisplayText(n), - r = pu.getValue(o); - return 0 === e.getDisplayText(r).indexOf(s) - ? A.some(() => { - b_(0, t, o), - ((e, t) => { - v_(e, (e, o) => - e.setSelectionRange(t, o.length), - ); - })(t, s.length); - }) - : A.none(); - } - return A.none(); - })(e.model, t, n).fold( - () => { - e.model.selectsOver - ? (Gm.dehighlight(o, n), e.previewing.set(!0)) - : e.previewing.set(!1); - }, - (t) => { - t(), e.previewing.set(!1); - }, - ); - }) - : e.lazyTypeaheadComp.get().each((t) => { - e.model.populateFromBrowse && b_(e.model, t, n), - _t(n.element, "id").each((e) => - kt(t.element, "aria-activedescendant", e), - ); - }); - }, - onExecute: (t, o) => - e.lazyTypeaheadComp - .get() - .map((e) => (Ir(e, x_(), { item: o }), !0)), - onHover: (t, o) => { - e.previewing.set(!1), - e.lazyTypeaheadComp.get().each((t) => { - e.model.populateFromBrowse && b_(e.model, t, o); - }); - }, - }), - }), - ]), - k_ = bm({ - name: "Typeahead", - configFields: w_(), - partFields: S_(), - factory: (e, t, o, n) => { - const s = (t, o, s) => { - e.previewing.set(!1); - const r = uw.getCoupled(t, "sandbox"); - if (Xd.isOpen(r)) - wm.getCurrent(r).each((e) => { - Gm.getHighlighted(e).fold( - () => { - s(e); - }, - () => { - zr(r, e.element, "keydown", o); - }, - ); - }); - else { - const o = (e) => { - wm.getCurrent(e).each(s); - }; - ww(e, a(t), t, r, n, o, zh.HighlightMenuAndItem).get(b); - } - }, - r = Ib(e), - a = (e) => (t) => - t.map((t) => { - const o = fe(t.menus), - n = X(o, (e) => U(e.items, (e) => "item" === e.type)); - return pu.getState(e).update(H(n, (e) => e.data)), t; - }), - i = (e) => wm.getCurrent(e), - l = "typeaheadevents", - c = [ - oh.config({}), - pu.config({ - onSetValue: e.onSetValue, - store: { - mode: "dataset", - getDataKey: (e) => $a(e.element), - getFallbackEntry: (e) => ({ value: e, meta: {} }), - setValue: (t, o) => { - qa(t.element, e.model.getDisplayText(o)); - }, - ...e.initialData.map((e) => Ms("initialValue", e)).getOr({}), - }, - }), - f_.config({ - stream: { - mode: "throttle", - delay: e.responseTime, - stopEvent: !1, - }, - onStream: (t, o) => { - const s = uw.getCoupled(t, "sandbox"); - if (oh.isFocused(t) && $a(t.element).length >= e.minChars) { - const o = i(s).bind((e) => - Gm.getHighlighted(e).map(pu.getValue), - ); - e.previewing.set(!0); - const r = (t) => { - i(s).each((t) => { - o.fold( - () => { - e.model.selectsOver && Gm.highlightFirst(t); - }, - (e) => { - Gm.highlightBy( - t, - (t) => pu.getValue(t).value === e.value, - ), - Gm.getHighlighted(t).orThunk( - () => (Gm.highlightFirst(t), A.none()), - ); - }, - ); - }); - }; - ww(e, a(t), t, s, n, r, zh.HighlightJustMenu).get(b); - } - }, - cancelEvent: fr(), - }), - Pp.config({ - mode: "special", - onDown: (e, t) => (s(e, t, Gm.highlightFirst), A.some(!0)), - onEscape: (e) => { - const t = uw.getCoupled(e, "sandbox"); - return Xd.isOpen(t) ? (Xd.close(t), A.some(!0)) : A.none(); - }, - onUp: (e, t) => (s(e, t, Gm.highlightLast), A.some(!0)), - onEnter: (t) => { - const o = uw.getCoupled(t, "sandbox"), - n = Xd.isOpen(o); - if (n && !e.previewing.get()) - return i(o) - .bind((e) => Gm.getHighlighted(e)) - .map((e) => (Ir(t, x_(), { item: e }), !0)); - { - const s = pu.getValue(t); - return ( - Fr(t, fr()), - e.onExecute(o, t, s), - n && Xd.close(o), - A.some(!0) - ); - } - }, - }), - dh.config({ - toggleClass: e.markers.openClass, - aria: { mode: "expanded" }, - }), - uw.config({ - others: { - sandbox: (t) => - _w(e, t, { - onOpen: () => dh.on(t), - onClose: () => { - e.lazyTypeaheadComp - .get() - .each((e) => Et(e.element, "aria-activedescendant")), - dh.off(t); - }, - }), - }, - }), - Jp( - l, - [ - Kr((t) => { - e.lazyTypeaheadComp.set(A.some(t)); - }), - Jr((t) => { - e.lazyTypeaheadComp.set(A.none()); - }), - Qr((t) => { - const o = b; - kw(e, a(t), t, n, o, zh.HighlightMenuAndItem).get(b); - }), - Ur(x_(), (t, o) => { - const n = uw.getCoupled(t, "sandbox"); - b_(e.model, t, o.event.item), - Fr(t, fr()), - e.onItemExecute(t, n, o.event.item, pu.getValue(t)), - Xd.close(n), - y_(t); - }), - ].concat( - e.dismissOnBlur - ? [ - Ur(lr(), (e) => { - const t = uw.getCoupled(e, "sandbox"); - Rl(t.element).isNone() && Xd.close(t); - }), - ] - : [], - ), - ), - ], - d = { [kr()]: [pu.name(), f_.name(), l], ...e.eventOrder }; - return { - uid: e.uid, - dom: Nb( - fn(e, { - inputAttributes: { - role: "combobox", - "aria-autocomplete": "list", - "aria-haspopup": "true", - }, - }), - ), - behaviours: { ...r, ...bu(e.typeaheadBehaviours, c) }, - eventOrder: d, - }; - }, - }), - C_ = (e) => ({ - ...e, - toCached: () => C_(e.toCached()), - bindFuture: (t) => - C_( - e.bind((e) => - e.fold( - (e) => bw(sn.error(e)), - (e) => t(e), - ), - ), - ), - bindResult: (t) => C_(e.map((e) => e.bind(t))), - mapResult: (t) => C_(e.map((e) => e.map(t))), - mapError: (t) => C_(e.map((e) => e.mapError(t))), - foldResult: (t, o) => e.map((e) => e.fold(t, o)), - withTimeout: (t, o) => - C_( - fw((n) => { - let s = !1; - const r = setTimeout(() => { - (s = !0), n(sn.error(o())); - }, t); - e.get((e) => { - s || (clearTimeout(r), n(e)); - }); - }), - ), - }), - O_ = (e) => C_(fw(e)), - __ = (e, t, o = [], n, s, r) => { - const a = t.fold( - () => ({}), - (e) => ({ action: e }), - ), - i = { - buttonBehaviours: kl( - [ - ky(() => !e.enabled || r.isDisabled()), - Sy(), - cS.config({}), - Jp("button press", [Pr("click"), Pr("mousedown")]), - ].concat(o), - ), - eventOrder: { - click: ["button press", "alloy.base.behaviour"], - mousedown: ["button press", "alloy.base.behaviour"], - }, - ...a, - }, - l = fn(i, { dom: n }); - return fn(l, { components: s }); - }, - T_ = (e, t, o, n = []) => { - const s = { - tag: "button", - classes: ["tox-tbtn"], - attributes: e.tooltip - .map((e) => ({ - "aria-label": o.translate(e), - title: o.translate(e), - })) - .getOr({}), - }, - r = e.icon.map((e) => hO(e, o.icons)), - a = Dy([r]); - return __(e, t, n, s, a, o); - }, - E_ = (e) => { - switch (e) { - case "primary": - return ["tox-button"]; - case "toolbar": - return ["tox-tbtn"]; - default: - return ["tox-button", "tox-button--secondary"]; - } - }, - A_ = (e, t, o, n = [], s = []) => { - const r = o.translate(e.text), - a = e.icon.map((e) => hO(e, o.icons)), - i = [a.getOrThunk(() => ti(r))], - l = e.buttonType.getOr( - e.primary || e.borderless ? "primary" : "secondary", - ), - c = [ - ...E_(l), - ...(a.isSome() ? ["tox-button--icon"] : []), - ...(e.borderless ? ["tox-button--naked"] : []), - ...s, - ]; - return __( - e, - t, - n, - { tag: "button", classes: c, attributes: { title: r } }, - i, - o, - ); - }, - M_ = (e, t, o, n = [], s = []) => { - const r = A_(e, A.some(t), o, n, s); - return Wh.sketch(r); - }, - D_ = (e, t) => (o) => { - "custom" === t - ? Ir(o, vS, { name: e, value: {} }) - : "submit" === t - ? Fr(o, yS) - : "cancel" === t - ? Fr(o, bS) - : console.error("Unknown button type: ", t); - }, - B_ = (e, t, o) => { - if (((e, t) => "menu" === t)(0, t)) { - const t = () => r, - n = e, - s = { - ...e, - type: "menubutton", - search: A.none(), - onSetup: (t) => (t.setEnabled(e.enabled), b), - fetch: o_(n.items, t, o), - }, - r = jh(t_(s, "tox-tbtn", o, A.none())); - return r.asSpec(); - } - if ( - ((e, t) => "custom" === t || "cancel" === t || "submit" === t)(0, t) - ) { - const n = D_(e.name, t), - s = { ...e, borderless: !1 }; - return M_(s, n, o.shared.providers, []); - } - if (((e, t) => "togglebutton" === t)(0, t)) - return ((e, t) => { - var o, n; - const s = e.icon.map((e) => fO(e, t.icons)).map(jh), - r = e.buttonType.getOr(e.primary ? "primary" : "secondary"), - a = { - ...e, - name: null !== (o = e.name) && void 0 !== o ? o : "", - primary: "primary" === r, - tooltip: A.from(e.tooltip), - enabled: null !== (n = e.enabled) && void 0 !== n && n, - borderless: !1, - }, - i = a.tooltip - .map((e) => ({ - "aria-label": t.translate(e), - title: t.translate(e), - })) - .getOr({}), - l = E_(null != r ? r : "secondary"), - c = e.icon.isSome() && e.text.isSome(), - d = { - tag: "button", - classes: [ - ...l.concat(e.icon.isSome() ? ["tox-button--icon"] : []), - ...(e.active ? ["tox-button--enabled"] : []), - ...(c ? ["tox-button--icon-and-text"] : []), - ], - attributes: i, - }, - u = t.translate(e.text.getOr("")), - m = ti(u), - g = [ - ...Dy([s.map((e) => e.asSpec())]), - ...(e.text.isSome() ? [m] : []), - ], - p = __( - a, - A.some((o) => { - Ir(o, vS, { - name: e.name, - value: { - setIcon: (e) => { - s.map((n) => - n.getOpt(o).each((o) => { - Kp.set(o, [fO(e, t.icons)]); - }), - ); - }, - }, - }); - }), - [], - d, - g, - t, - ); - return Wh.sketch(p); - })(e, o.shared.providers); - throw ( - (console.error("Unknown footer button type: ", t), - new Error("Unknown footer button type")) - ); - }, - F_ = { type: "separator" }, - I_ = (e) => ({ - type: "menuitem", - value: e.url, - text: e.title, - meta: { attach: e.attach }, - onAction: b, - }), - R_ = (e, t) => ({ - type: "menuitem", - value: t, - text: e, - meta: { attach: void 0 }, - onAction: b, - }), - N_ = (e, t) => - ((e) => H(e, I_))(((e, t) => U(t, (t) => t.type === e))(e, t)), - V_ = (e) => N_("header", e.targets), - z_ = (e) => N_("anchor", e.targets), - H_ = (e) => - A.from(e.anchorTop) - .map((e) => R_("", e)) - .toArray(), - L_ = (e) => - A.from(e.anchorBottom) - .map((e) => R_("", e)) - .toArray(), - P_ = (e, t) => { - const o = e.toLowerCase(); - return U(t, (e) => { - var t; - const n = - void 0 !== e.meta && void 0 !== e.meta.text ? e.meta.text : e.text, - s = null !== (t = e.value) && void 0 !== t ? t : ""; - return Te(n.toLowerCase(), o) || Te(s.toLowerCase(), o); - }); - }, - U_ = la("aria-invalid"), - W_ = (e, t) => { - e.dom.checked = t; - }, - j_ = (e) => e.dom.checked, - G_ = (e) => (t, o, n, s) => - be(o, "name").fold( - () => e(o, s, A.none()), - (r) => t.field(r, e(o, s, be(n, r))), - ), - $_ = { - bar: G_((e, t) => - ((e, t) => ({ - dom: { - tag: "div", - classes: ["tox-bar", "tox-form__controls-h-stack"], - }, - components: H(e.items, t.interpreter), - }))(e, t.shared), - ), - collection: G_((e, t, o) => - ((e, t, o) => { - const n = e.label.map((e) => pS(e, t)), - s = (e) => (t, o) => { - hi(o.event.target, "[data-collection-item-value]").each((n) => { - e(t, o, n, Ot(n, "data-collection-item-value")); - }); - }, - r = s((o, n, s, r) => { - n.stop(), t.isDisabled() || Ir(o, vS, { name: e.name, value: r }); - }), - a = [ - Ur( - qs(), - s((e, t, o) => { - Dl(o); - }), - ), - Ur(er(), r), - Ur(gr(), r), - Ur( - Xs(), - s((e, t, o) => { - pi(e.element, "." + kb).each((e) => { - Pa(e, kb); - }), - La(o, kb); - }), - ), - Ur( - Ys(), - s((e) => { - pi(e.element, "." + kb).each((e) => { - Pa(e, kb); - }); - }), - ), - Qr( - s((t, o, n, s) => { - Ir(t, vS, { name: e.name, value: s }); - }), - ), - ], - i = (e, t) => H(Xc(e.element, ".tox-collection__item"), t), - l = aS.parts.field({ - dom: { - tag: "div", - classes: ["tox-collection"].concat( - 1 !== e.columns - ? ["tox-collection--grid"] - : ["tox-collection--list"], - ), - }, - components: [], - factory: { sketch: w }, - behaviours: kl([ - Rm.config({ - disabled: t.isDisabled, - onDisabled: (e) => { - i(e, (e) => { - La(e, "tox-collection__item--state-disabled"), - kt(e, "aria-disabled", !0); - }); - }, - onEnabled: (e) => { - i(e, (e) => { - Pa(e, "tox-collection__item--state-disabled"), - Et(e, "aria-disabled"); - }); - }, - }), - Sy(), - Kp.config({}), - pu.config({ - store: { mode: "memory", initialValue: o.getOr([]) }, - onSetValue: (o, n) => { - ((o, n) => { - const s = H(n, (o) => { - const n = Gh.translate(o.text), - s = - 1 === e.columns - ? `
${n}
` - : "", - r = `
${o.icon}
`, - a = { _: " ", " - ": " ", "-": " " }, - i = n.replace(/\_| \- |\-/g, (e) => a[e]); - return `
${r}${s}
`; - }), - r = - "auto" !== e.columns && e.columns > 1 - ? z(s, e.columns) - : [s], - a = H( - r, - (e) => - `
${e.join("")}
`, - ); - ta(o.element, a.join("")); - })(o, n), - "auto" === e.columns && - iy(o, 5, "tox-collection__item").each( - ({ numRows: e, numColumns: t }) => { - Pp.setGridSize(o, e, t); - }, - ), - Fr(o, kS); - }, - }), - cS.config({}), - Pp.config( - ((c = e.columns), - 1 === c - ? { - mode: "menu", - moveOnTab: !1, - selector: ".tox-collection__item", - } - : "auto" === c - ? { - mode: "flatgrid", - selector: ".tox-collection__item", - initSize: { numColumns: 1, numRows: 1 }, - } - : { - mode: "matrix", - selectors: { - row: ".tox-collection__group", - cell: `.${fb}`, - }, - }), - ), - Jp("collection-events", a), - ]), - eventOrder: { - [ur()]: [ - "disabling", - "alloy.base.behaviour", - "collection-events", - ], - }, - }); - var c; - return uS(n, l, ["tox-form__group--collection"], []); - })(e, t.shared.providers, o), - ), - alertbanner: G_((e, t) => - ((e, t) => { - const o = Jh(e.icon, t.icons); - return oS.sketch({ - dom: { - tag: "div", - attributes: { role: "alert" }, - classes: [ - "tox-notification", - "tox-notification--in", - `tox-notification--${e.level}`, - ], - }, - components: [ - { - dom: { - tag: "div", - classes: ["tox-notification__icon"], - innerHtml: e.url ? void 0 : o, - }, - components: e.url - ? [ - Wh.sketch({ - dom: { - tag: "button", - classes: [ - "tox-button", - "tox-button--naked", - "tox-button--icon", - ], - innerHtml: o, - attributes: { title: t.translate(e.iconTooltip) }, - }, - action: (t) => - Ir(t, vS, { name: "alert-banner", value: e.url }), - buttonBehaviours: kl([Zh()]), - }), - ] - : void 0, - }, - { - dom: { - tag: "div", - classes: ["tox-notification__body"], - innerHtml: t.translate(e.text), - }, - }, - ], - }); - })(e, t.shared.providers), - ), - input: G_((e, t, o) => - ((e, t, o) => - VO( - { - name: e.name, - multiline: !1, - label: e.label, - inputMode: e.inputMode, - placeholder: e.placeholder, - flex: !1, - disabled: !e.enabled, - classname: "tox-textfield", - validation: A.none(), - maximized: e.maximized, - data: o, - }, - t, - ))(e, t.shared.providers, o), - ), - textarea: G_((e, t, o) => - ((e, t, o) => - VO( - { - name: e.name, - multiline: !0, - label: e.label, - inputMode: A.none(), - placeholder: e.placeholder, - flex: !0, - disabled: !e.enabled, - classname: "tox-textarea", - validation: A.none(), - maximized: e.maximized, - data: o, - }, - t, - ))(e, t.shared.providers, o), - ), - label: G_((e, t) => - ((e, t) => { - const o = "tox-label"; - return { - dom: { tag: "div", classes: ["tox-form__group"] }, - components: [ - { - dom: { - tag: "label", - classes: [ - o, - ...("center" === e.align ? [`${o}--center`] : []), - ...("end" === e.align ? [`${o}--end`] : []), - ], - }, - components: [ti(t.providers.translate(e.label))], - }, - ...H(e.items, t.interpreter), - ], - behaviours: kl([ - DC(), - Kp.config({}), - ((n = A.none()), NC(n, ea, ta)), - Pp.config({ mode: "acyclic" }), - ]), - }; - var n; - })(e, t.shared), - ), - iframe: - ((vE = (e, t, o) => - ((e, t, o) => { - const n = "tox-dialog__iframe", - s = e.transparent ? [] : [`${n}--opaque`], - r = e.border ? ["tox-navobj-bordered"] : [], - a = { - ...e.label.map((e) => ({ title: e })).getOr({}), - ...o.map((e) => ({ srcdoc: e })).getOr({}), - ...(e.sandboxed - ? { sandbox: "allow-scripts allow-same-origin" } - : {}), - }, - i = ((e, t) => { - const o = Es(e.getOr("")); - return { - getValue: (e) => o.get(), - setValue: (e, n) => { - if (o.get() !== n) { - const o = e.element, - s = () => kt(o, "srcdoc", n); - t ? cO.fold(x(lO), (e) => e.throttle)(o, n, s) : s(); - } - o.set(n); - }, - }; - })(o, e.streamContent), - l = e.label.map((e) => pS(e, t)), - c = aS.parts.field({ - factory: { - sketch: (e) => - GC(A.from(r), { - uid: e.uid, - dom: { tag: "iframe", attributes: a, classes: [n, ...s] }, - behaviours: kl([ - cS.config({}), - oh.config({}), - RC(o, i.getValue, i.setValue), - Al.config({ - channels: { - [eO]: { - onReceive: (e, t) => { - t.newFocus.each((t) => { - rt(e.element).each((o) => { - (Ze(e.element, t) ? La : Pa)( - o, - "tox-navobj-bordered-focus", - ); - }); - }); - }, - }, - }, - }), - ]), - }), - }, - }); - return uS(l, c, ["tox-form__group--stretched"], []); - })(e, t.shared.providers, o)), - (e, t, o, n) => { - const s = fn(t, { source: "dynamic" }); - return G_(vE)(e, s, o, n); - }), - button: G_((e, t) => - ((e, t) => { - const o = D_(e.name, "custom"); - return ( - (n = A.none()), - (s = aS.parts.field({ - factory: Wh, - ...A_(e, A.some(o), t, [VC(""), DC()]), - })), - uS(n, s, [], []) - ); - var n, s; - })(e, t.shared.providers), - ), - checkbox: G_((e, t, o) => - ((e, t, o) => { - const n = (e) => (e.element.dom.click(), A.some(!0)), - s = aS.parts.field({ - factory: { sketch: w }, - dom: { - tag: "input", - classes: ["tox-checkbox__input"], - attributes: { type: "checkbox" }, - }, - behaviours: kl([ - DC(), - Rm.config({ - disabled: () => !e.enabled || t.isDisabled(), - onDisabled: (e) => { - rt(e.element).each((e) => La(e, "tox-checkbox--disabled")); - }, - onEnabled: (e) => { - rt(e.element).each((e) => Pa(e, "tox-checkbox--disabled")); - }, - }), - cS.config({}), - oh.config({}), - NC(o, j_, W_), - Pp.config({ - mode: "special", - onEnter: n, - onSpace: n, - stopSpaceKeyup: !0, - }), - Jp("checkbox-events", [ - Ur(Qs(), (t, o) => { - Ir(t, hS, { name: e.name }); - }), - ]), - ]), - }), - r = aS.parts.label({ - dom: { tag: "span", classes: ["tox-checkbox__label"] }, - components: [ti(t.translate(e.label))], - behaviours: kl([IS.config({})]), - }), - a = (e) => - ef( - "checked" === e ? "selected" : "unselected", - { - tag: "span", - classes: ["tox-icon", "tox-checkbox-icon__" + e], - }, - t.icons, - ), - i = jh({ - dom: { tag: "div", classes: ["tox-checkbox__icons"] }, - components: [a("checked"), a("unchecked")], - }); - return aS.sketch({ - dom: { tag: "label", classes: ["tox-checkbox"] }, - components: [s, i.asSpec(), r], - fieldBehaviours: kl([ - Rm.config({ disabled: () => !e.enabled || t.isDisabled() }), - Sy(), - ]), - }); - })(e, t.shared.providers, o), - ), - colorinput: G_((e, t, o) => - ((e, t, o, n) => { - const s = aS.parts.field({ - factory: Vb, - inputClasses: ["tox-textfield"], - data: n, - onSetValue: (e) => FS.run(e).get(b), - inputBehaviours: kl([ - Rm.config({ disabled: t.providers.isDisabled }), - Sy(), - cS.config({}), - FS.config({ - invalidClass: "tox-textbox-field-invalid", - getRoot: (e) => rt(e.element), - notify: { - onValid: (e) => { - const t = pu.getValue(e); - Ir(e, RS, { color: t }); - }, - }, - validator: { - validateOnLoad: !1, - validate: (e) => { - const t = pu.getValue(e); - if (0 === t.length) return bw(sn.value(!0)); - { - const e = Re("span"); - Dt(e, "background-color", t); - const o = Nt(e, "background-color").fold( - () => sn.error("blah"), - (e) => sn.value(t), - ); - return bw(o); - } - }, - }, - }), - ]), - selectOnFocus: !1, - }), - r = e.label.map((e) => pS(e, t.providers)), - a = (e, t) => { - Ir(e, NS, { value: t }); - }, - i = jh( - ((e, t) => - Dw.sketch({ - dom: e.dom, - components: e.components, - toggleClass: "mce-active", - dropdownBehaviours: kl([ - ky(t.providers.isDisabled), - Sy(), - IS.config({}), - cS.config({}), - ]), - layouts: e.layouts, - sandboxClasses: ["tox-dialog__popups"], - lazySink: t.getSink, - fetch: (o) => - fw((t) => e.fetch(t)).map((n) => - A.from( - Hw( - fn( - Zx( - la("menu-value"), - n, - (t) => { - e.onItemAction(o, t); - }, - e.columns, - e.presets, - pb.CLOSE_ON_EXECUTE, - T, - t.providers, - ), - { movement: ew(e.columns, e.presets) }, - ), - ), - ), - ), - parts: { menu: Bb(0, 0, e.presets) }, - }))( - { - dom: { - tag: "span", - attributes: { - "aria-label": t.providers.translate("Color swatch"), - }, - }, - layouts: { - onRtl: () => [rl, sl, cl], - onLtr: () => [sl, rl, cl], - }, - components: [], - fetch: $x( - o.getColors(e.storageKey), - e.storageKey, - o.hasCustomColors(), - ), - columns: o.getColorCols(e.storageKey), - presets: "color", - onItemAction: (t, n) => { - i.getOpt(t).each((t) => { - "custom" === n - ? o.colorPicker((o) => { - o.fold( - () => Fr(t, VS), - (o) => { - a(t, o), Ox(e.storageKey, o); - }, - ); - }, "#ffffff") - : a(t, "remove" === n ? "" : n); - }); - }, - }, - t, - ), - ); - return aS.sketch({ - dom: { tag: "div", classes: ["tox-form__group"] }, - components: r - .toArray() - .concat([ - { - dom: { tag: "div", classes: ["tox-color-input"] }, - components: [s, i.asSpec()], - }, - ]), - fieldBehaviours: kl([ - Jp("form-field-events", [ - Ur(RS, (t, o) => { - i.getOpt(t).each((e) => { - Dt(e.element, "background-color", o.event.color); - }), - Ir(t, hS, { name: e.name }); - }), - Ur(NS, (e, t) => { - aS.getField(e).each((o) => { - pu.setValue(o, t.event.value), - wm.getCurrent(e).each(oh.focus); - }); - }), - Ur(VS, (e, t) => { - aS.getField(e).each((t) => { - wm.getCurrent(e).each(oh.focus); - }); - }), - ]), - ]), - }); - })(e, t.shared, t.colorinput, o), - ), - colorpicker: G_((e, t, o) => - ((e, t, o) => { - const n = (e) => "tox-" + e, - s = MC( - ( - (e) => (t) => - e.translate(zC[t]) - )(t), - n, - ), - r = jh( - s.sketch({ - dom: { - tag: "div", - classes: [n("color-picker-container")], - attributes: { role: "presentation" }, - }, - onValidHex: (e) => { - Ir(e, vS, { name: "hex-valid", value: !0 }); - }, - onInvalidHex: (e) => { - Ir(e, vS, { name: "hex-valid", value: !1 }); - }, - }), - ); - return { - dom: { tag: "div" }, - components: [r.asSpec()], - behaviours: kl([ - RC( - o, - (e) => { - const t = r.get(e); - return wm - .getCurrent(t) - .bind((e) => pu.getValue(e).hex) - .map((e) => "#" + _e(e, "#")) - .getOr(""); - }, - (e, t) => { - const o = A.from( - /^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(t), - ).bind((e) => te(e, 1)), - n = r.get(e); - wm.getCurrent(n).fold( - () => { - console.log("Can not find form"); - }, - (e) => { - pu.setValue(e, { hex: o.getOr("") }), - CC.getField(e, "hex").each((e) => { - Fr(e, Zs()); - }); - }, - ); - }, - ), - DC(), - ]), - }; - })(0, t.shared.providers, o), - ), - dropzone: G_((e, t, o) => - ((e, t, o) => { - const n = (e, t) => { - t.stop(); - }, - s = (e) => (t, o) => { - L(e, (e) => { - e(t, o); - }); - }, - r = (e, t) => { - var o; - if (!Rm.isDisabled(e)) { - const n = t.event.raw; - i( - e, - null === (o = n.dataTransfer) || void 0 === o - ? void 0 - : o.files, - ); - } - }, - a = (e, t) => { - const o = t.event.raw.target; - i(e, o.files); - }, - i = (o, n) => { - n && - (pu.setValue( - o, - ((e, t) => { - const o = LC.explode(t.getOption("images_file_types")); - return U(se(e), (e) => - N(o, (t) => - Ae(e.name.toLowerCase(), `.${t.toLowerCase()}`), - ), - ); - })(n, t), - ), - Ir(o, hS, { name: e.name })); - }, - l = jh({ - dom: { - tag: "input", - attributes: { type: "file", accept: "image/*" }, - styles: { display: "none" }, - }, - behaviours: kl([Jp("input-file-events", [qr(er()), qr(gr())])]), - }), - c = e.label.map((e) => pS(e, t)), - d = aS.parts.field({ - factory: { - sketch: (e) => ({ - uid: e.uid, - dom: { tag: "div", classes: ["tox-dropzone-container"] }, - behaviours: kl([ - VC(o.getOr([])), - DC(), - Rm.config({}), - dh.config({ - toggleClass: "dragenter", - toggleOnExecute: !1, - }), - Jp("dropzone-events", [ - Ur("dragenter", s([n, dh.toggle])), - Ur("dragleave", s([n, dh.toggle])), - Ur("dragover", n), - Ur("drop", s([n, r])), - Ur(Qs(), a), - ]), - ]), - components: [ - { - dom: { - tag: "div", - classes: ["tox-dropzone"], - styles: {}, - }, - components: [ - { - dom: { tag: "p" }, - components: [ti(t.translate("Drop an image here"))], - }, - Wh.sketch({ - dom: { - tag: "button", - styles: { position: "relative" }, - classes: ["tox-button", "tox-button--secondary"], - }, - components: [ - ti(t.translate("Browse for an image")), - l.asSpec(), - ], - action: (e) => { - l.get(e).element.dom.click(); - }, - buttonBehaviours: kl([ - cS.config({}), - ky(t.isDisabled), - Sy(), - ]), - }), - ], - }, - ], - }), - }, - }); - return uS(c, d, ["tox-form__group--stretched"], []); - })(e, t.shared.providers, o), - ), - grid: G_((e, t) => - ((e, t) => ({ - dom: { - tag: "div", - classes: ["tox-form__grid", `tox-form__grid--${e.columns}col`], - }, - components: H(e.items, t.interpreter), - }))(e, t.shared), - ), - listbox: G_((e, t, o) => - ((e, t, o) => { - const n = t.shared.providers, - s = o - .bind((t) => EO(e.items, t)) - .orThunk(() => oe(e.items).filter(OO)), - r = e.label.map((e) => pS(e, n)), - a = aS.parts.field({ - dom: {}, - factory: { - sketch: (o) => - xO( - { - uid: o.uid, - text: s.map((e) => e.text), - icon: A.none(), - tooltip: e.label, - role: A.none(), - fetch: (o, n) => { - const s = TO(o, e.name, e.items, pu.getValue(o)); - n( - CO(s, pb.CLOSE_ON_EXECUTE, t, { - isHorizontalMenu: !1, - search: A.none(), - }), - ); - }, - onSetup: x(b), - getApi: x({}), - columns: 1, - presets: "normal", - classes: [], - dropdownBehaviours: [ - cS.config({}), - RC( - s.map((e) => e.value), - (e) => Ot(e.element, _O), - (t, o) => { - EO(e.items, o).each((e) => { - kt(t.element, _O, e.value), - Ir(t, vO, { text: e.text }); - }); - }, - ), - ], - }, - "tox-listbox", - t.shared, - ), - }, - }), - i = { - dom: { tag: "div", classes: ["tox-listboxfield"] }, - components: [a], - }; - return aS.sketch({ - dom: { tag: "div", classes: ["tox-form__group"] }, - components: q([r.toArray(), [i]]), - fieldBehaviours: kl([ - Rm.config({ - disabled: x(!e.enabled), - onDisabled: (e) => { - aS.getField(e).each(Rm.disable); - }, - onEnabled: (e) => { - aS.getField(e).each(Rm.enable); - }, - }), - ]), - }); - })(e, t, o), - ), - selectbox: G_((e, t, o) => - ((e, t, o) => { - const n = H(e.items, (e) => ({ - text: t.translate(e.text), - value: e.value, - })), - s = e.label.map((e) => pS(e, t)), - r = aS.parts.field({ - dom: {}, - ...o.map((e) => ({ data: e })).getOr({}), - selectAttributes: { size: e.size }, - options: n, - factory: AO, - selectBehaviours: kl([ - Rm.config({ disabled: () => !e.enabled || t.isDisabled() }), - cS.config({}), - Jp("selectbox-change", [ - Ur(Qs(), (t, o) => { - Ir(t, hS, { name: e.name }); - }), - ]), - ]), - }), - a = - e.size > 1 - ? A.none() - : A.some( - ef( - "chevron-down", - { tag: "div", classes: ["tox-selectfield__icon-js"] }, - t.icons, - ), - ), - i = { - dom: { tag: "div", classes: ["tox-selectfield"] }, - components: q([[r], a.toArray()]), - }; - return aS.sketch({ - dom: { tag: "div", classes: ["tox-form__group"] }, - components: q([s.toArray(), [i]]), - fieldBehaviours: kl([ - Rm.config({ - disabled: () => !e.enabled || t.isDisabled(), - onDisabled: (e) => { - aS.getField(e).each(Rm.disable); - }, - onEnabled: (e) => { - aS.getField(e).each(Rm.enable); - }, - }), - Sy(), - ]), - }); - })(e, t.shared.providers, o), - ), - sizeinput: G_((e, t) => - ((e, t) => { - let o = NO; - const n = la("ratio-event"), - s = (e) => - ef( - e, - { tag: "span", classes: ["tox-icon", "tox-lock-icon__" + e] }, - t.icons, - ), - r = FO.parts.lock({ - dom: { - tag: "button", - classes: [ - "tox-lock", - "tox-button", - "tox-button--naked", - "tox-button--icon", - ], - attributes: { - title: t.translate(e.label.getOr("Constrain proportions")), - }, - }, - components: [s("lock"), s("unlock")], - buttonBehaviours: kl([ - Rm.config({ disabled: () => !e.enabled || t.isDisabled() }), - Sy(), - cS.config({}), - ]), - }), - a = (e) => ({ - dom: { tag: "div", classes: ["tox-form__group"] }, - components: e, - }), - i = (o) => - aS.parts.field({ - factory: Vb, - inputClasses: ["tox-textfield"], - inputBehaviours: kl([ - Rm.config({ disabled: () => !e.enabled || t.isDisabled() }), - Sy(), - cS.config({}), - Jp("size-input-events", [ - Ur(Xs(), (e, t) => { - Ir(e, n, { isField1: o }); - }), - Ur(Qs(), (t, o) => { - Ir(t, hS, { name: e.name }); - }), - ]), - ]), - selectOnFocus: !1, - }), - l = (e) => ({ - dom: { tag: "label", classes: ["tox-label"] }, - components: [ti(t.translate(e))], - }), - c = FO.parts.field1(a([aS.parts.label(l("Width")), i(!0)])), - d = FO.parts.field2(a([aS.parts.label(l("Height")), i(!1)])); - return FO.sketch({ - dom: { tag: "div", classes: ["tox-form__group"] }, - components: [ - { - dom: { tag: "div", classes: ["tox-form__controls-h-stack"] }, - components: [c, d, a([l("\xa0"), r])], - }, - ], - field1Name: "width", - field2Name: "height", - locked: !0, - markers: { lockClass: "tox-locked" }, - onLockedChange: (e, t, n) => { - IO(pu.getValue(e)).each((e) => { - o(e).each((e) => { - pu.setValue( - t, - ((e) => { - const t = { - "": 0, - px: 0, - pt: 1, - mm: 1, - pc: 2, - ex: 2, - em: 2, - ch: 2, - rem: 2, - cm: 3, - in: 4, - "%": 4, - }; - let o = e.value.toFixed((n = e.unit) in t ? t[n] : 1); - var n; - return ( - -1 !== o.indexOf(".") && (o = o.replace(/\.?0*$/, "")), - o + e.unit - ); - })(e), - ); - }); - }); - }, - coupledFieldBehaviours: kl([ - Rm.config({ - disabled: () => !e.enabled || t.isDisabled(), - onDisabled: (e) => { - FO.getField1(e).bind(aS.getField).each(Rm.disable), - FO.getField2(e).bind(aS.getField).each(Rm.disable), - FO.getLock(e).each(Rm.disable); - }, - onEnabled: (e) => { - FO.getField1(e).bind(aS.getField).each(Rm.enable), - FO.getField2(e).bind(aS.getField).each(Rm.enable), - FO.getLock(e).each(Rm.enable); - }, - }), - Sy(), - Jp("size-input-events2", [ - Ur(n, (e, t) => { - const n = t.event.isField1, - s = n ? FO.getField1(e) : FO.getField2(e), - r = n ? FO.getField2(e) : FO.getField1(e), - a = s.map(pu.getValue).getOr(""), - i = r.map(pu.getValue).getOr(""); - o = ((e, t) => { - const o = IO(e).toOptional(), - n = IO(t).toOptional(); - return Se(o, n, (e, t) => - RO(e, t.unit) - .map((e) => t.value / e) - .map((e) => { - return ( - (o = e), - (n = t.unit), - (e) => - RO(e, n).map((e) => ({ value: e * o, unit: n })) - ); - var o, n; - }) - .getOr(NO), - ).getOr(NO); - })(a, i); - }), - ]), - ]), - }); - })(e, t.shared.providers), - ), - slider: G_((e, t, o) => - ((e, t, o) => { - const n = fC.parts.label({ - dom: { tag: "label", classes: ["tox-label"] }, - components: [ti(t.translate(e.label))], - }), - s = fC.parts.spectrum({ - dom: { - tag: "div", - classes: ["tox-slider__rail"], - attributes: { role: "presentation" }, - }, - }), - r = fC.parts.thumb({ - dom: { - tag: "div", - classes: ["tox-slider__handle"], - attributes: { role: "presentation" }, - }, - }); - return fC.sketch({ - dom: { - tag: "div", - classes: ["tox-slider"], - attributes: { role: "presentation" }, - }, - model: { - mode: "x", - minX: e.min, - maxX: e.max, - getInitialValue: x( - o.getOrThunk(() => (Math.abs(e.max) - Math.abs(e.min)) / 2), - ), - }, - components: [n, s, r], - sliderBehaviours: kl([DC(), oh.config({})]), - onChoose: (t, o, n) => { - Ir(t, hS, { name: e.name, value: n }); - }, - }); - })(e, t.shared.providers, o), - ), - urlinput: G_((e, t, o) => - ((e, t, o, n) => { - const s = t.shared.providers, - r = (t) => { - const n = pu.getValue(t); - o.addToHistory(n.value, e.filetype); - }, - a = { - ...n.map((e) => ({ initialData: e })).getOr({}), - dismissOnBlur: !0, - inputClasses: ["tox-textfield"], - sandboxClasses: ["tox-dialog__popups"], - inputAttributes: { "aria-errormessage": U_, type: "url" }, - minChars: 0, - responseTime: 0, - fetch: (n) => { - const s = ((e, t, o) => { - var n, s; - const r = pu.getValue(t), - a = - null !== - (s = - null === (n = null == r ? void 0 : r.meta) || - void 0 === n - ? void 0 - : n.text) && void 0 !== s - ? s - : r.value; - return o.getLinkInformation().fold( - () => [], - (t) => { - const n = P_( - a, - ((e) => H(e, (e) => R_(e, e)))(o.getHistory(e)), - ); - return "file" === e - ? ((s = [ - n, - P_(a, V_(t)), - P_(a, q([H_(t), z_(t), L_(t)])), - ]), - j( - s, - (e, t) => - 0 === e.length || 0 === t.length - ? e.concat(t) - : e.concat(F_, t), - [], - )) - : n; - var s; - }, - ); - })(e.filetype, n, o), - r = CO(s, pb.BUBBLE_TO_SANDBOX, t, { - isHorizontalMenu: !1, - search: A.none(), - }); - return bw(r); - }, - getHotspot: (e) => g.getOpt(e), - onSetValue: (e, t) => { - e.hasConfigured(FS) && FS.run(e).get(b); - }, - typeaheadBehaviours: kl([ - ...o - .getValidationHandler() - .map((t) => - FS.config({ - getRoot: (e) => rt(e.element), - invalidClass: "tox-control-wrap--status-invalid", - notify: { - onInvalid: (e, t) => { - c.getOpt(e).each((e) => { - kt(e.element, "title", s.translate(t)); - }); - }, - }, - validator: { - validate: (o) => { - const n = pu.getValue(o); - return O_((o) => { - t({ type: e.filetype, url: n.value }, (e) => { - if ("invalid" === e.status) { - const t = sn.error(e.message); - o(t); - } else { - const t = sn.value(e.message); - o(t); - } - }); - }); - }, - validateOnLoad: !1, - }, - }), - ) - .toArray(), - Rm.config({ disabled: () => !e.enabled || s.isDisabled() }), - cS.config({}), - Jp("urlinput-events", [ - Ur(Zs(), (t) => { - const o = $a(t.element), - n = o.trim(); - n !== o && qa(t.element, n), - "file" === e.filetype && Ir(t, hS, { name: e.name }); - }), - Ur(Qs(), (t) => { - Ir(t, hS, { name: e.name }), r(t); - }), - Ur(cr(), (t) => { - Ir(t, hS, { name: e.name }), r(t); - }), - ]), - ]), - eventOrder: { - [Zs()]: ["streaming", "urlinput-events", "invalidating"], - }, - model: { - getDisplayText: (e) => e.value, - selectsOver: !1, - populateFromBrowse: !1, - }, - markers: { openClass: "tox-textfield--popup-open" }, - lazySink: t.shared.getSink, - parts: { menu: Bb(0, 0, "normal") }, - onExecute: (e, t, o) => { - Ir(t, yS, {}); - }, - onItemExecute: (t, o, n, s) => { - r(t), Ir(t, hS, { name: e.name }); - }, - }, - i = aS.parts.field({ ...a, factory: k_ }), - l = e.label.map((e) => pS(e, s)), - c = jh( - ((e, t, o = e, n = e) => - ef( - o, - { - tag: "div", - classes: ["tox-icon", "tox-control-wrap__status-icon-" + e], - attributes: { - title: s.translate(n), - "aria-live": "polite", - ...t.fold( - () => ({}), - (e) => ({ id: e }), - ), - }, - }, - s.icons, - ))("invalid", A.some(U_), "warning"), - ), - d = jh({ - dom: { - tag: "div", - classes: ["tox-control-wrap__status-icon-wrap"], - }, - components: [c.asSpec()], - }), - u = o.getUrlPicker(e.filetype), - m = la("browser.url.event"), - g = jh({ - dom: { tag: "div", classes: ["tox-control-wrap"] }, - components: [i, d.asSpec()], - behaviours: kl([ - Rm.config({ disabled: () => !e.enabled || s.isDisabled() }), - ]), - }), - p = jh( - M_( - { - name: e.name, - icon: A.some("browse"), - text: e.label.getOr(""), - enabled: e.enabled, - primary: !1, - buttonType: A.none(), - borderless: !0, - }, - (e) => Fr(e, m), - s, - [], - ["tox-browse-url"], - ), - ); - return aS.sketch({ - dom: gS([]), - components: l - .toArray() - .concat([ - { - dom: { tag: "div", classes: ["tox-form__controls-h-stack"] }, - components: q([ - [g.asSpec()], - u.map(() => p.asSpec()).toArray(), - ]), - }, - ]), - fieldBehaviours: kl([ - Rm.config({ - disabled: () => !e.enabled || s.isDisabled(), - onDisabled: (e) => { - aS.getField(e).each(Rm.disable), p.getOpt(e).each(Rm.disable); - }, - onEnabled: (e) => { - aS.getField(e).each(Rm.enable), p.getOpt(e).each(Rm.enable); - }, - }), - Sy(), - Jp("url-input-events", [ - Ur(m, (t) => { - wm.getCurrent(t).each((o) => { - const n = pu.getValue(o), - s = { fieldname: e.name, ...n }; - u.each((n) => { - n(s).get((n) => { - pu.setValue(o, n), Ir(t, hS, { name: e.name }); - }); - }); - }); - }), - ]), - ]), - }); - })(e, t, t.urlinput, o), - ), - customeditor: G_((e) => { - const t = Ql(), - o = jh({ dom: { tag: e.tag } }), - n = Ql(); - return { - dom: { tag: "div", classes: ["tox-custom-editor"] }, - behaviours: kl([ - Jp("custom-editor-events", [ - Kr((s) => { - o.getOpt(s).each((o) => { - (((e) => ve(e, "init"))(e) - ? e.init(o.element.dom) - : HC.load(e.scriptId, e.scriptUrl).then((t) => - t(o.element.dom, e.settings), - ) - ).then((e) => { - n.on((t) => { - e.setValue(t); - }), - n.clear(), - t.set(e); - }); - }); - }), - ]), - RC( - A.none(), - () => - t.get().fold( - () => n.get().getOr(""), - (e) => e.getValue(), - ), - (e, o) => { - t.get().fold( - () => n.set(o), - (e) => e.setValue(o), - ); - }, - ), - DC(), - ]), - components: [o.asSpec()], - }; - }), - htmlpanel: G_((e) => - "presentation" === e.presets - ? oS.sketch({ - dom: { - tag: "div", - classes: ["tox-form__group"], - innerHtml: e.html, - }, - }) - : oS.sketch({ - dom: { - tag: "div", - classes: ["tox-form__group"], - innerHtml: e.html, - attributes: { role: "document" }, - }, - containerBehaviours: kl([cS.config({}), oh.config({})]), - }), - ), - imagepreview: G_((e, t, o) => - ((e, t) => { - const o = Es(t.getOr({ url: "" })), - n = jh({ - dom: { - tag: "img", - classes: ["tox-imagepreview__image"], - attributes: t.map((e) => ({ src: e.url })).getOr({}), - }, - }), - s = jh({ - dom: { - tag: "div", - classes: ["tox-imagepreview__container"], - attributes: { role: "presentation" }, - }, - components: [n.asSpec()], - }), - r = {}; - e.height.each((e) => (r.height = e)); - const a = t.map((e) => ({ - url: e.url, - zoom: A.from(e.zoom), - cachedWidth: A.from(e.cachedWidth), - cachedHeight: A.from(e.cachedHeight), - })); - return { - dom: { - tag: "div", - classes: ["tox-imagepreview"], - styles: r, - attributes: { role: "presentation" }, - }, - components: [s.asSpec()], - behaviours: kl([ - DC(), - RC( - a, - () => o.get(), - (e, t) => { - const r = { url: t.url }; - t.zoom.each((e) => (r.zoom = e)), - t.cachedWidth.each((e) => (r.cachedWidth = e)), - t.cachedHeight.each((e) => (r.cachedHeight = e)), - o.set(r); - const a = () => { - const { cachedWidth: t, cachedHeight: o, zoom: n } = r; - if (!u(t) && !u(o)) { - if (u(n)) { - const n = ((e, t, o) => { - const n = Jt(e), - s = Wt(e); - return Math.min(n / t, s / o, 1); - })(e.element, t, o); - r.zoom = n; - } - const a = ((e, t, o, n, s) => { - const r = o * s, - a = n * s, - i = Math.max(0, e / 2 - r / 2), - l = Math.max(0, t / 2 - a / 2); - return { - left: i.toString() + "px", - top: l.toString() + "px", - width: r.toString() + "px", - height: a.toString() + "px", - }; - })(Jt(e.element), Wt(e.element), t, o, r.zoom); - s.getOpt(e).each((e) => { - Bt(e.element, a); - }); - } - }; - n.getOpt(e).each((o) => { - const n = o.element; - var s; - t.url !== Ot(n, "src") && - (kt(n, "src", t.url), - Pa(e.element, "tox-imagepreview__loaded")), - a(), - ((s = n), - new Promise((e, t) => { - const o = () => { - r(), e(s); - }, - n = [ - tc(s, "load", o), - tc(s, "error", () => { - r(), - t( - "Unable to load data from image: " + - s.dom.src, - ); - }), - ], - r = () => L(n, (e) => e.unbind()); - s.dom.complete && o(); - })).then((t) => { - e.getSystem().isConnected() && - (La(e.element, "tox-imagepreview__loaded"), - (r.cachedWidth = t.dom.naturalWidth), - (r.cachedHeight = t.dom.naturalHeight), - a()); - }); - }); - }, - ), - ]), - }; - })(e, o), - ), - table: G_((e, t) => - ((e, t) => { - const o = (e) => ({ dom: { tag: "td", innerHtml: t.translate(e) } }); - return { - dom: { tag: "table", classes: ["tox-dialog__table"] }, - components: [ - ((s = e.header), - { - dom: { tag: "thead" }, - components: [ - { - dom: { tag: "tr" }, - components: H(s, (e) => ({ - dom: { tag: "th", innerHtml: t.translate(e) }, - })), - }, - ], - }), - ((n = e.cells), - { - dom: { tag: "tbody" }, - components: H(n, (e) => ({ - dom: { tag: "tr" }, - components: H(e, o), - })), - }), - ], - behaviours: kl([cS.config({}), oh.config({})]), - }; - var n, s; - })(e, t.shared.providers), - ), - tree: G_((e, t) => - ((e, t) => { - const o = e.onLeafAction.getOr(b), - n = e.onToggleExpand.getOr(b), - s = e.defaultExpandedIds, - r = Es(s), - a = Es(e.defaultSelectedId), - i = la("tree-id"), - l = (n, s) => - e.items.map((e) => - "leaf" === e.type - ? r_({ - leaf: e, - selectedId: n, - onLeafAction: o, - visible: !0, - treeId: i, - backstage: t, - }) - : d_({ - directory: e, - selectedId: n, - onLeafAction: o, - expandedIds: s, - labelTabstopping: !0, - treeId: i, - backstage: t, - }), - ); - return { - dom: { - tag: "div", - classes: ["tox-tree"], - attributes: { role: "tree" }, - }, - components: l(a.get(), r.get()), - behaviours: kl([ - Pp.config({ - mode: "flow", - selector: - ".tox-tree--leaf__label--visible, .tox-tree--directory__label--visible", - cycles: !1, - }), - Jp(u_, [ - Ur("expand-tree-node", (e, t) => { - const { expanded: o, node: s } = t.event; - r.set(o ? [...r.get(), s] : r.get().filter((e) => e !== s)), - n(r.get(), { expanded: o, node: s }); - }), - ]), - Al.config({ - channels: { - [`update-active-item-${i}`]: { - onReceive: (e, t) => { - a.set(A.some(t.value)), - Kp.set(e, l(A.some(t.value), r.get())); - }, - }, - }, - }), - Kp.config({}), - ]), - }; - })(e, t), - ), - panel: G_((e, t) => - ((e, t) => ({ - dom: { tag: "div", classes: e.classes }, - components: H(e.items, t.shared.interpreter), - }))(e, t), - ), - }, - q_ = { field: (e, t) => t, record: x([]) }, - X_ = (e, t, o, n) => { - const s = fn(n, { shared: { interpreter: (t) => Y_(e, t, o, s) } }); - return Y_(e, t, o, s); - }, - Y_ = (e, t, o, n) => - be($_, t.type).fold( - () => ( - console.error( - `Unknown factory type "${t.type}", defaulting to container: `, - t, - ), - t - ), - (s) => s(e, t, o, n), - ), - K_ = (e, t, o) => Y_(q_, e, t, o), - J_ = "layout-inset", - Z_ = (e) => e.x, - Q_ = (e, t) => e.x + e.width / 2 - t.width / 2, - eT = (e, t) => e.x + e.width - t.width, - tT = (e) => e.y, - oT = (e, t) => e.y + e.height - t.height, - nT = (e, t) => e.y + e.height / 2 - t.height / 2, - sT = (e, t, o) => - zi( - eT(e, t), - oT(e, t), - o.insetSouthwest(), - Wi(), - "southwest", - Ki(e, { right: 0, bottom: 3 }), - J_, - ), - rT = (e, t, o) => - zi( - Z_(e), - oT(e, t), - o.insetSoutheast(), - Ui(), - "southeast", - Ki(e, { left: 1, bottom: 3 }), - J_, - ), - aT = (e, t, o) => - zi( - eT(e, t), - tT(e), - o.insetNorthwest(), - Pi(), - "northwest", - Ki(e, { right: 0, top: 2 }), - J_, - ), - iT = (e, t, o) => - zi( - Z_(e), - tT(e), - o.insetNortheast(), - Li(), - "northeast", - Ki(e, { left: 1, top: 2 }), - J_, - ), - lT = (e, t, o) => - zi(Q_(e, t), tT(e), o.insetNorth(), ji(), "north", Ki(e, { top: 2 }), J_), - cT = (e, t, o) => - zi( - Q_(e, t), - oT(e, t), - o.insetSouth(), - Gi(), - "south", - Ki(e, { bottom: 3 }), - J_, - ), - dT = (e, t, o) => - zi( - eT(e, t), - nT(e, t), - o.insetEast(), - qi(), - "east", - Ki(e, { right: 0 }), - J_, - ), - uT = (e, t, o) => - zi(Z_(e), nT(e, t), o.insetWest(), $i(), "west", Ki(e, { left: 1 }), J_), - mT = (e) => { - switch (e) { - case "north": - return lT; - case "northeast": - return iT; - case "northwest": - return aT; - case "south": - return cT; - case "southeast": - return rT; - case "southwest": - return sT; - case "east": - return dT; - case "west": - return uT; - } - }, - gT = (e, t, o, n, s) => Xl(n).map(mT).getOr(lT)(e, t, o, n, s), - pT = (e) => { - switch (e) { - case "north": - return cT; - case "northeast": - return rT; - case "northwest": - return sT; - case "south": - return lT; - case "southeast": - return iT; - case "southwest": - return aT; - case "east": - return uT; - case "west": - return dT; - } - }, - hT = (e, t, o, n, s) => Xl(n).map(pT).getOr(lT)(e, t, o, n, s), - fT = { - valignCentre: [], - alignCentre: [], - alignLeft: [], - alignRight: [], - right: [], - left: [], - bottom: [], - top: [], - }, - bT = (e, t, o) => { - const n = { maxHeightFunction: cc() }; - return () => - o() - ? { - type: "node", - root: ft(ht(e())), - node: A.from(e()), - bubble: gc(12, 12, fT), - layouts: { onRtl: () => [iT], onLtr: () => [aT] }, - overrides: n, - } - : { - type: "hotspot", - hotspot: t(), - bubble: gc(-12, 12, fT), - layouts: { onRtl: () => [sl, rl, cl], onLtr: () => [rl, sl, cl] }, - overrides: n, - }; - }, - vT = (e, t, o, n) => { - const s = { maxHeightFunction: cc() }; - return () => - n() - ? { - type: "node", - root: ft(ht(t())), - node: A.from(t()), - bubble: gc(12, 12, fT), - layouts: { onRtl: () => [lT], onLtr: () => [lT] }, - overrides: s, - } - : e - ? { - type: "node", - root: ft(ht(t())), - node: A.from(t()), - bubble: gc(0, -jt(t()), fT), - layouts: { onRtl: () => [ll], onLtr: () => [ll] }, - overrides: s, - } - : { - type: "hotspot", - hotspot: o(), - bubble: gc(0, 0, fT), - layouts: { onRtl: () => [ll], onLtr: () => [ll] }, - overrides: s, - }; - }, - yT = (e, t, o) => () => - o() - ? { - type: "node", - root: ft(ht(e())), - node: A.from(e()), - layouts: { onRtl: () => [lT], onLtr: () => [lT] }, - } - : { - type: "hotspot", - hotspot: t(), - layouts: { onRtl: () => [cl], onLtr: () => [cl] }, - }, - xT = (e, t) => () => ({ - type: "selection", - root: t(), - getSelection: () => { - const t = e.selection.getRng(), - o = e.model.table.getSelectedCells(); - if (o.length > 1) { - const e = o[0], - t = o[o.length - 1], - n = { firstCell: Ve(e), lastCell: Ve(t) }; - return A.some(n); - } - return A.some( - Lc.range( - Ve(t.startContainer), - t.startOffset, - Ve(t.endContainer), - t.endOffset, - ), - ); - }, - }), - wT = (e) => (t) => ({ type: "node", root: e(), node: t }), - ST = (e, t, o, n) => { - const s = sb(e), - r = () => Ve(e.getBody()), - a = () => Ve(e.getContentAreaContainer()), - i = () => s || !n(); - return { - inlineDialog: bT(a, t, i), - inlineBottomDialog: vT(e.inline, a, o, i), - banner: yT(a, t, i), - cursor: xT(e, r), - node: wT(r), - }; - }, - kT = (e) => (t, o) => { - Jx(e)(t, o); - }, - CT = (e) => () => Hx(e), - OT = (e) => (t) => Rx(e, t), - _T = (e) => (t) => zx(e, t), - TT = (e) => () => Lf(e), - ET = (e) => ye(e, "items"), - AT = (e) => ye(e, "format"), - MT = [ - { - title: "Headings", - items: [ - { title: "Heading 1", format: "h1" }, - { title: "Heading 2", format: "h2" }, - { title: "Heading 3", format: "h3" }, - { title: "Heading 4", format: "h4" }, - { title: "Heading 5", format: "h5" }, - { title: "Heading 6", format: "h6" }, - ], - }, - { - title: "Inline", - items: [ - { title: "Bold", format: "bold" }, - { title: "Italic", format: "italic" }, - { title: "Underline", format: "underline" }, - { title: "Strikethrough", format: "strikethrough" }, - { title: "Superscript", format: "superscript" }, - { title: "Subscript", format: "subscript" }, - { title: "Code", format: "code" }, - ], - }, - { - title: "Blocks", - items: [ - { title: "Paragraph", format: "p" }, - { title: "Blockquote", format: "blockquote" }, - { title: "Div", format: "div" }, - { title: "Pre", format: "pre" }, - ], - }, - { - title: "Align", - items: [ - { title: "Left", format: "alignleft" }, - { title: "Center", format: "aligncenter" }, - { title: "Right", format: "alignright" }, - { title: "Justify", format: "alignjustify" }, - ], - }, - ], - DT = (e) => - j( - e, - (e, t) => { - if (ve(t, "items")) { - const o = DT(t.items); - return { - customFormats: e.customFormats.concat(o.customFormats), - formats: e.formats.concat([{ title: t.title, items: o.formats }]), - }; - } - if ( - ve(t, "inline") || - ((e) => ve(e, "block"))(t) || - ((e) => ve(e, "selector"))(t) - ) { - const o = `custom-${r(t.name) ? t.name : t.title.toLowerCase()}`; - return { - customFormats: e.customFormats.concat([{ name: o, format: t }]), - formats: e.formats.concat([ - { title: t.title, format: o, icon: t.icon }, - ]), - }; - } - return { ...e, formats: e.formats.concat(t) }; - }, - { customFormats: [], formats: [] }, - ), - BT = (e) => - yf(e) - .map((t) => { - const o = ((e, t) => { - const o = DT(t), - n = (t) => { - L(t, (t) => { - e.formatter.has(t.name) || - e.formatter.register(t.name, t.format); - }); - }; - return ( - e.formatter - ? n(o.customFormats) - : e.on("init", () => { - n(o.customFormats); - }), - o.formats - ); - })(e, t); - return xf(e) ? MT.concat(o) : o; - }) - .getOr(MT), - FT = (e, t, o) => ({ - ...e, - type: "formatter", - isSelected: t(e.format), - getStylePreview: o(e.format), - }), - IT = (e, t, o, n) => { - const s = (t) => - H(t, (t) => - ET(t) - ? ((e) => { - const t = s(e.items); - return { ...e, type: "submenu", getStyleItems: x(t) }; - })(t) - : AT(t) - ? ((e) => FT(e, o, n))(t) - : ((e) => { - const t = ae(e); - return 1 === t.length && R(t, "title"); - })(t) - ? { ...t, type: "separator" } - : ((t) => { - const s = r(t.name) ? t.name : la(t.title), - a = `custom-${s}`, - i = { - ...t, - type: "formatter", - format: a, - isSelected: o(a), - getStylePreview: n(a), - }; - return e.formatter.register(s, i), i; - })(t), - ); - return s(t); - }, - RT = LC.trim, - NT = (e) => (t) => { - if (((e) => g(e) && 1 === e.nodeType)(t)) { - if (t.contentEditable === e) return !0; - if (t.getAttribute("data-mce-contenteditable") === e) return !0; - } - return !1; - }, - VT = NT("true"), - zT = NT("false"), - HT = (e, t, o, n, s) => ({ - type: e, - title: t, - url: o, - level: n, - attach: s, - }), - LT = (e) => e.innerText || e.textContent, - PT = (e) => - ((e) => e && "A" === e.nodeName && void 0 !== (e.id || e.name))(e) && - WT(e), - UT = (e) => e && /^(H[1-6])$/.test(e.nodeName), - WT = (e) => - ((e) => { - let t = e; - for (; (t = t.parentNode); ) { - const e = t.contentEditable; - if (e && "inherit" !== e) return VT(t); - } - return !1; - })(e) && !zT(e), - jT = (e) => UT(e) && WT(e), - GT = (e) => { - var t; - const o = ((e) => (e.id ? e.id : la("h")))(e); - return HT( - "header", - null !== (t = LT(e)) && void 0 !== t ? t : "", - "#" + o, - ((e) => (UT(e) ? parseInt(e.nodeName.substr(1), 10) : 0))(e), - () => { - e.id = o; - }, - ); - }, - $T = (e) => { - const t = e.id || e.name, - o = LT(e); - return HT("anchor", o || "#" + t, "#" + t, 0, b); - }, - qT = (e) => RT(e.title).length > 0, - XT = (e) => { - const t = ((e) => { - const t = H(Xc(Ve(e), "h1,h2,h3,h4,h5,h6,a:not([href])"), (e) => e.dom); - return t; - })(e); - return U( - ((e) => H(U(e, jT), GT))(t).concat(((e) => H(U(e, PT), $T))(t)), - qT, - ); - }, - YT = "tinymce-url-history", - KT = (e) => r(e) && /^https?/.test(e), - JT = (e) => - a(e) && - he(e, (e) => { - return !(l((t = e)) && t.length <= 5 && Y(t, KT)); - var t; - }).isNone(), - ZT = () => { - const e = Sx.getItem(YT); - if (null === e) return {}; - let t; - try { - t = JSON.parse(e); - } catch (e) { - if (e instanceof SyntaxError) - return ( - console.log("Local storage " + YT + " was not valid JSON", e), {} - ); - throw e; - } - return JT(t) - ? t - : (console.log("Local storage " + YT + " was not valid format", t), {}); - }, - QT = (e) => { - const t = ZT(); - return be(t, e).getOr([]); - }, - eE = (e, t) => { - if (!KT(e)) return; - const o = ZT(), - n = be(o, t).getOr([]), - s = U(n, (t) => t !== e); - (o[t] = [e].concat(s).slice(0, 5)), - ((e) => { - if (!JT(e)) - throw new Error("Bad format for history:\n" + JSON.stringify(e)); - Sx.setItem(YT, JSON.stringify(e)); - })(o); - }, - tE = (e) => !!e, - oE = (e) => ce(LC.makeMap(e, /[, ]/), tE), - nE = (e) => A.from(Ff(e)), - sE = (e) => A.from(e).filter(r).getOrUndefined(), - rE = (e) => ({ - getHistory: QT, - addToHistory: eE, - getLinkInformation: () => - ((e) => - Vf(e) - ? A.some({ - targets: XT(e.getBody()), - anchorTop: sE(zf(e)), - anchorBottom: sE(Hf(e)), - }) - : A.none())(e), - getValidationHandler: () => ((e) => A.from(If(e)))(e), - getUrlPicker: (t) => - ((e, t) => - ((e, t) => { - const o = ((e) => { - const t = A.from(Nf(e)).filter(tE).map(oE); - return nE(e).fold(T, (e) => - t.fold(E, (e) => ae(e).length > 0 && e), - ); - })(e); - return d(o) ? (o ? nE(e) : A.none()) : o[t] ? nE(e) : A.none(); - })(e, t).map( - (o) => (n) => - fw((s) => { - const i = { - filetype: t, - fieldname: n.fieldname, - ...A.from(n.meta).getOr({}), - }; - o.call( - e, - (e, t) => { - if (!r(e)) throw new Error("Expected value to be string"); - if (void 0 !== t && !a(t)) - throw new Error("Expected meta to be a object"); - s({ value: e, meta: t }); - }, - n.value, - i, - ); - }), - ))(e, t), - }), - aE = dm, - iE = qu, - lE = x([ - ys("shell", !1), - os("makeItem"), - ys("setupItem", b), - vu("listBehaviours", [Kp]), - ]), - cE = ju({ - name: "items", - overrides: () => ({ behaviours: kl([Kp.config({})]) }), - }), - dE = x([cE]), - uE = bm({ - name: x("CustomList")(), - configFields: lE(), - partFields: dE(), - factory: (e, t, o, n) => { - const s = e.shell - ? { behaviours: [Kp.config({})], components: [] } - : { behaviours: [], components: t }; - return { - uid: e.uid, - dom: e.dom, - components: s.components, - behaviours: bu(e.listBehaviours, s.behaviours), - apis: { - setItems: (t, o) => { - var n; - ((n = t), e.shell ? A.some(n) : om(n, e, "items")).fold( - () => { - throw ( - (console.error( - "Custom List was defined to not be a shell, but no item container was specified in components", - ), - new Error( - "Custom List was defined to not be a shell, but no item container was specified in components", - )) - ); - }, - (n) => { - const s = Kp.contents(n), - r = o.length, - a = r - s.length, - i = a > 0 ? V(a, () => e.makeItem()) : [], - l = s.slice(r); - L(l, (e) => Kp.remove(n, e)), L(i, (e) => Kp.append(n, e)); - const c = Kp.contents(n); - L(c, (n, s) => { - e.setupItem(t, n, o[s], s); - }); - }, - ); - }, - }, - }; - }, - apis: { - setItems: (e, t, o) => { - e.setItems(t, o); - }, - }, - }), - mE = x([os("dom"), ys("shell", !0), hu("toolbarBehaviours", [Kp])]), - gE = x([ - ju({ - name: "groups", - overrides: () => ({ behaviours: kl([Kp.config({})]) }), - }), - ]), - pE = bm({ - name: "Toolbar", - configFields: mE(), - partFields: gE(), - factory: (e, t, o, n) => { - const s = e.shell - ? { behaviours: [Kp.config({})], components: [] } - : { behaviours: [], components: t }; - return { - uid: e.uid, - dom: e.dom, - components: s.components, - behaviours: bu(e.toolbarBehaviours, s.behaviours), - apis: { - setGroups: (t, o) => { - var n; - ((n = t), e.shell ? A.some(n) : om(n, e, "groups")).fold( - () => { - throw ( - (console.error( - "Toolbar was defined to not be a shell, but no groups container was specified in components", - ), - new Error( - "Toolbar was defined to not be a shell, but no groups container was specified in components", - )) - ); - }, - (e) => { - Kp.set(e, o); - }, - ); - }, - refresh: b, - }, - domModification: { attributes: { role: "group" } }, - }; - }, - apis: { - setGroups: (e, t, o) => { - e.setGroups(t, o); - }, - }, - }), - hE = b, - fE = T, - bE = x([]); - var vE, - yE = Object.freeze({ - __proto__: null, - setup: hE, - isDocked: fE, - getBehaviours: bE, - }); - const xE = (e) => - (xe(Nt(e, "position"), "fixed") ? A.none() : at(e)).orThunk(() => { - const t = Re("span"); - return st(e).bind((e) => { - zo(e, t); - const o = at(t); - return Po(t), o; - }); - }), - wE = (e) => - xE(e) - .map(Xt) - .getOrThunk(() => $t(0, 0)), - SE = (e, t) => { - const o = e.element; - La(o, t.transitionClass), - Pa(o, t.fadeOutClass), - La(o, t.fadeInClass), - t.onShow(e); - }, - kE = (e, t) => { - const o = e.element; - La(o, t.transitionClass), - Pa(o, t.fadeInClass), - La(o, t.fadeOutClass), - t.onHide(e); - }, - CE = (e, t) => e.y >= t.y, - OE = (e, t) => e.bottom <= t.bottom, - _E = (e, t, o) => ({ location: "top", leftX: t, topY: o.bounds.y - e.y }), - TE = (e, t, o) => ({ - location: "bottom", - leftX: t, - bottomY: e.bottom - o.bounds.bottom, - }), - EE = (e) => e.box.x - e.win.x, - AE = (e, t, o) => - o.getInitialPos().map((o) => { - const n = ((e, t) => { - const o = t.optScrollEnv.fold( - x(e.bounds.y), - (t) => t.scrollElmTop + (e.bounds.y - t.currentScrollTop), - ); - return $t(e.bounds.x, o); - })(o, t); - return { box: Ko(n.left, n.top, Jt(e), Wt(e)), location: o.location }; - }), - ME = (e, t, o, n, s) => { - const r = ((e, t) => { - const o = t.optScrollEnv.fold( - x(e.y), - (t) => e.y + t.currentScrollTop - t.scrollElmTop, - ); - return $t(e.x, o); - })(t, o), - a = Ko(r.left, r.top, t.width, t.height); - n.setInitialPos({ - style: Vt(e), - position: It(e, "position") || "static", - bounds: a, - location: s.location, - }); - }, - DE = (e, t, o) => - o.getInitialPos().bind((n) => { - var s; - switch ((o.clearInitialPos(), n.position)) { - case "static": - return A.some({ morph: "static" }); - case "absolute": - const o = xE(e).getOr(xt()), - r = Jo(o), - a = null !== (s = o.dom.scrollTop) && void 0 !== s ? s : 0; - return A.some({ - morph: "absolute", - positionCss: Vl( - "absolute", - be(n.style, "left").map((e) => t.x - r.x), - be(n.style, "top").map((e) => t.y - r.y + a), - be(n.style, "right").map((e) => r.right - t.right), - be(n.style, "bottom").map((e) => r.bottom - t.bottom), - ), - }); - default: - return A.none(); - } - }), - BE = (e) => { - switch (e.location) { - case "top": - return A.some({ - morph: "fixed", - positionCss: Vl( - "fixed", - A.some(e.leftX), - A.some(e.topY), - A.none(), - A.none(), - ), - }); - case "bottom": - return A.some({ - morph: "fixed", - positionCss: Vl( - "fixed", - A.some(e.leftX), - A.none(), - A.none(), - A.some(e.bottomY), - ), - }); - default: - return A.none(); - } - }, - FE = (e, t, o) => { - const n = e.element; - return xe(Nt(n, "position"), "fixed") - ? ((e, t, o) => - ((e, t, o) => - AE(e, t, o) - .filter(({ box: e }) => - ((e, t, o) => - Y(e, (e) => { - switch (e) { - case "bottom": - return OE(t, o.bounds); - case "top": - return CE(t, o.bounds); - } - }))(o.getModes(), e, t), - ) - .bind(({ box: t }) => DE(e, t, o)))(e, t, o).orThunk(() => - t.optScrollEnv - .bind((n) => AE(e, t, o)) - .bind(({ box: e, location: o }) => { - const n = en(), - s = EE({ win: n, box: e }), - r = "top" === o ? _E(n, s, t) : TE(n, s, t); - return BE(r); - }), - ))(n, t, o) - : ((e, t, o) => { - const n = Jo(e), - s = en(), - r = ((e, t, o) => { - const n = t.win, - s = t.box, - r = EE(t); - return re(e, (e) => { - switch (e) { - case "bottom": - return OE(s, o.bounds) ? A.none() : A.some(TE(n, r, o)); - case "top": - return CE(s, o.bounds) ? A.none() : A.some(_E(n, r, o)); - default: - return A.none(); - } - }).getOr({ location: "no-dock" }); - })(o.getModes(), { win: s, box: n }, t); - return "top" === r.location || "bottom" === r.location - ? (ME(e, n, t, o, r), BE(r)) - : A.none(); - })(n, t, o); - }, - IE = (e, t, o) => { - o.setDocked(!1), - L(["left", "right", "top", "bottom", "position"], (t) => - Ht(e.element, t), - ), - t.onUndocked(e); - }, - RE = (e, t, o, n) => { - const s = "fixed" === n.position; - o.setDocked(s), zl(e.element, n), (s ? t.onDocked : t.onUndocked)(e); - }, - NE = (e, t, o, n, s = !1) => { - t.contextual.each((t) => { - t.lazyContext(e).each((r) => { - const a = ((e, t) => e.y < t.bottom && e.bottom > t.y)(r, n.bounds); - a !== o.isVisible() && - (o.setVisible(a), - s && !a - ? (Wa(e.element, [t.fadeOutClass]), t.onHide(e)) - : (a ? SE : kE)(e, t)); - }); - }); - }, - VE = (e, t, o, n, s) => { - NE(e, t, o, n, !0), RE(e, t, o, s.positionCss); - }, - zE = (e, t, o) => { - e.getSystem().isConnected() && - ((e, t, o) => { - const n = t.lazyViewport(e); - NE(e, t, o, n), - FE(e, n, o).each((s) => { - ((e, t, o, n, s) => { - switch (s.morph) { - case "static": - return IE(e, t, o); - case "absolute": - return RE(e, t, o, s.positionCss); - case "fixed": - VE(e, t, o, n, s); - } - })(e, t, o, n, s); - }); - })(e, t, o); - }, - HE = (e, t, o) => { - o.isDocked() && - ((e, t, o) => { - const n = e.element; - o.setDocked(!1); - const s = t.lazyViewport(e); - ((e, t, o) => { - const n = e.element; - return AE(n, t, o).bind(({ box: e }) => DE(n, e, o)); - })(e, s, o).each((n) => { - switch (n.morph) { - case "static": - IE(e, t, o); - break; - case "absolute": - RE(e, t, o, n.positionCss); - } - }), - o.setVisible(!0), - t.contextual.each((t) => { - ja(n, [t.fadeInClass, t.fadeOutClass, t.transitionClass]), - t.onShow(e); - }), - zE(e, t, o); - })(e, t, o); - }, - LE = (e) => (t, o, n) => { - const s = o.lazyViewport(t); - ((e, t, o, n) => { - const s = Jo(e), - r = en(), - a = n(r, EE({ win: r, box: s }), t); - return "bottom" === a.location || "top" === a.location - ? (((e, t, o, n, s) => { - n.getInitialPos().fold( - () => ME(e, t, o, n, s), - () => b, - ); - })(e, s, t, o, a), - BE(a)) - : A.none(); - })(t.element, s, n, e).each((e) => { - VE(t, o, n, s, e); - }); - }, - PE = LE(_E), - UE = LE(TE); - var WE = Object.freeze({ - __proto__: null, - refresh: zE, - reset: HE, - isDocked: (e, t, o) => o.isDocked(), - getModes: (e, t, o) => o.getModes(), - setModes: (e, t, o, n) => o.setModes(n), - forceDockToTop: PE, - forceDockToBottom: UE, - }), - jE = Object.freeze({ - __proto__: null, - events: (e, t) => - Hr([ - Yr(or(), (o, n) => { - e.contextual.each((e) => { - Ua(o.element, e.transitionClass) && - (ja(o.element, [e.transitionClass, e.fadeInClass]), - (t.isVisible() ? e.onShown : e.onHidden)(o)), - n.stop(); - }); - }), - Ur(xr(), (o, n) => { - zE(o, e, t); - }), - Ur(Er(), (o, n) => { - zE(o, e, t); - }), - Ur(wr(), (o, n) => { - HE(o, e, t); - }), - ]), - }), - GE = [ - vs("contextual", [ - rs("fadeInClass"), - rs("fadeOutClass"), - rs("transitionClass"), - is("lazyContext"), - Di("onShow"), - Di("onShown"), - Di("onHide"), - Di("onHidden"), - ]), - Os("lazyViewport", () => ({ bounds: en(), optScrollEnv: A.none() })), - _s("modes", ["top", "bottom"], Hn), - Di("onDocked"), - Di("onUndocked"), - ]; - const $E = Ol({ - fields: GE, - name: "docking", - active: jE, - apis: WE, - state: Object.freeze({ - __proto__: null, - init: (e) => { - const t = Es(!1), - o = Es(!0), - n = Ql(), - s = Es(e.modes); - return _a({ - isDocked: t.get, - setDocked: t.set, - getInitialPos: n.get, - setInitialPos: n.set, - clearInitialPos: n.clear, - isVisible: o.get, - setVisible: o.set, - getModes: s.get, - setModes: s.set, - readState: () => - `docked: ${t.get()}, visible: ${o.get()}, modes: ${s.get().join(",")}`, - }); - }, - }), - }), - qE = x(la("toolbar-height-change")), - XE = { - fadeInClass: "tox-editor-dock-fadein", - fadeOutClass: "tox-editor-dock-fadeout", - transitionClass: "tox-editor-dock-transition", - }, - YE = "tox-tinymce--toolbar-sticky-on", - KE = "tox-tinymce--toolbar-sticky-off", - JE = (e, t) => R($E.getModes(e), t), - ZE = (e) => { - const t = e.element; - rt(t).each((o) => { - const n = "padding-" + $E.getModes(e)[0]; - if ($E.isDocked(e)) { - const e = Jt(o); - Dt(t, "width", e + "px"), - Dt( - o, - n, - ((e) => - jt(e) + - (parseInt(It(e, "margin-top"), 10) || 0) + - (parseInt(It(e, "margin-bottom"), 10) || 0))(t) + "px", - ); - } else Ht(t, "width"), Ht(o, n); - }); - }, - QE = (e, t) => { - t - ? (Pa(e, XE.fadeOutClass), Wa(e, [XE.transitionClass, XE.fadeInClass])) - : (Pa(e, XE.fadeInClass), Wa(e, [XE.fadeOutClass, XE.transitionClass])); - }, - eA = (e, t) => { - const o = Ve(e.getContainer()); - t ? (La(o, YE), Pa(o, KE)) : (La(o, KE), Pa(o, YE)); - }, - tA = (e, t) => { - const o = Ql(), - n = t.getSink, - s = (e) => { - n().each((t) => e(t.element)); - }, - r = (t) => { - e.inline || ZE(t), - eA(e, $E.isDocked(t)), - t.getSystem().broadcastOn([Kd()], {}), - n().each((e) => e.getSystem().broadcastOn([Kd()], {})); - }, - a = e.inline - ? [] - : [Al.config({ channels: { [qE()]: { onReceive: ZE } } })]; - return [ - oh.config({}), - $E.config({ - contextual: { - lazyContext: (t) => { - const o = jt(t.element), - n = e.inline ? e.getContentAreaContainer() : e.getContainer(); - return A.from(n).map((n) => { - const s = Jo(Ve(n)); - return jw(e, t.element).fold( - () => { - const e = s.height - o, - n = s.y + (JE(t, "top") ? 0 : o); - return Ko(s.x, n, s.width, e); - }, - (e) => { - const n = Qo(s, Gw(e)), - r = JE(t, "top") ? n.y : n.y + o; - return Ko(n.x, r, n.width, n.height - o); - }, - ); - }); - }, - onShow: () => { - s((e) => QE(e, !0)); - }, - onShown: (e) => { - s((e) => ja(e, [XE.transitionClass, XE.fadeInClass])), - o.get().each((t) => { - ((e, t) => { - const o = et(t); - Il(o) - .filter((e) => !Ze(t, e)) - .filter((t) => Ze(t, Ve(o.dom.body)) || Qe(e, t)) - .each(() => Dl(t)); - })(e.element, t), - o.clear(); - }); - }, - onHide: (e) => { - ((e, t) => - Rl(e).orThunk(() => - t() - .toOptional() - .bind((e) => Rl(e.element)), - ))(e.element, n).fold(o.clear, o.set), - s((e) => QE(e, !1)); - }, - onHidden: () => { - s((e) => ja(e, [XE.transitionClass])); - }, - ...XE, - }, - lazyViewport: (t) => - jw(e, t.element).fold( - () => { - const o = en(), - n = Mf(e), - s = o.y + (JE(t, "top") ? n : 0), - r = o.height - (JE(t, "bottom") ? n : 0); - return { - bounds: Ko(o.x, s, o.width, r), - optScrollEnv: A.none(), - }; - }, - (e) => ({ - bounds: Gw(e), - optScrollEnv: A.some({ - currentScrollTop: e.element.dom.scrollTop, - scrollElmTop: Xt(e.element).top, - }), - }), - ), - modes: [t.header.getDockingMode()], - onDocked: r, - onUndocked: r, - }), - ...a, - ]; - }; - var oA = Object.freeze({ - __proto__: null, - setup: (e, t, o) => { - e.inline || - (t.header.isPositionedAtTop() || - e.on("ResizeEditor", () => { - o().each($E.reset); - }), - e.on("ResizeWindow ResizeEditor", () => { - o().each(ZE); - }), - e.on("SkinLoaded", () => { - o().each((e) => { - $E.isDocked(e) ? $E.reset(e) : $E.refresh(e); - }); - }), - e.on("FullscreenStateChanged", () => { - o().each($E.reset); - })), - e.on("AfterScrollIntoView", (e) => { - o().each((t) => { - $E.refresh(t); - const o = t.element; - Ig(o) && - ((e, t) => { - const o = et(t), - n = nt(t).dom.innerHeight, - s = Uo(o), - r = Ve(e.elm), - a = Zo(r), - i = Wt(r), - l = a.y, - c = l + i, - d = Xt(t), - u = Wt(t), - m = d.top, - g = m + u, - p = Math.abs(m - s.top) < 2, - h = Math.abs(g - (s.top + n)) < 2; - if (p && l < g) Wo(s.left, l - u, o); - else if (h && c > m) { - const e = l - n + i + u; - Wo(s.left, e, o); - } - })(e, o); - }); - }), - e.on("PostRender", () => { - eA(e, !1); - }); - }, - isDocked: (e) => e().map($E.isDocked).getOr(!1), - getBehaviours: tA, - }); - const nA = Dn( - [tv, ns("items", Fn([Rn([ov, ds("items", Hn)]), Hn]))].concat(Dv), - ), - sA = [ - ps("text"), - ps("tooltip"), - ps("icon"), - xs( - "search", - !1, - Fn([Ln, Dn([ps("placeholder")])], (e) => - d(e) ? (e ? A.some({ placeholder: A.none() }) : A.none()) : A.some(e), - ), - ), - is("fetch"), - Os("onSetup", () => b), - ], - rA = Dn([tv, ...sA]), - aA = (e) => qn("menubutton", rA, e), - iA = Dn([ - tv, - fv, - hv, - pv, - yv, - lv, - mv, - ks("presets", "normal", ["normal", "color", "listpreview"]), - Cv(1), - dv, - uv, - ]); - var lA = fm({ - factory: (e, t) => { - const o = { - focus: Pp.focusIn, - setMenus: (e, o) => { - const n = H(o, (e) => { - const o = { - type: "menubutton", - text: e.text, - fetch: (t) => { - t(e.getItems()); - }, - }, - n = aA(o) - .mapError((e) => Kn(e)) - .getOrDie(); - return t_(n, "tox-mbtn", t.backstage, A.some("menuitem")); - }); - Kp.set(e, n); - }, - }; - return { - uid: e.uid, - dom: e.dom, - components: [], - behaviours: kl([ - Kp.config({}), - Jp("menubar-events", [ - Kr((t) => { - e.onSetup(t); - }), - Ur(qs(), (e, t) => { - pi(e.element, ".tox-mbtn--active").each((o) => { - hi(t.event.target, ".tox-mbtn").each((t) => { - Ze(o, t) || - e - .getSystem() - .getByDom(o) - .each((o) => { - e.getSystem() - .getByDom(t) - .each((e) => { - Dw.expand(e), Dw.close(o), oh.focus(e); - }); - }); - }); - }); - }), - Ur(_r(), (e, t) => { - t.event.prevFocus - .bind((t) => e.getSystem().getByDom(t).toOptional()) - .each((o) => { - t.event.newFocus - .bind((t) => e.getSystem().getByDom(t).toOptional()) - .each((e) => { - Dw.isOpen(o) && (Dw.expand(e), Dw.close(o)); - }); - }); - }), - ]), - Pp.config({ - mode: "flow", - selector: ".tox-mbtn", - onEscape: (t) => (e.onEscape(t), A.some(!0)), - }), - cS.config({}), - ]), - apis: o, - domModification: { attributes: { role: "menubar" } }, - }; - }, - name: "silver.Menubar", - configFields: [ - os("dom"), - os("uid"), - os("onEscape"), - os("backstage"), - ys("onSetup", b), - ], - apis: { - focus: (e, t) => { - e.focus(t); - }, - setMenus: (e, t, o) => { - e.setMenus(t, o); - }, - }, - }); - const cA = "container", - dA = [hu("slotBehaviours", [])], - uA = (e) => "", - mA = (e, t) => { - const o = (t) => am(e), - n = (t, o) => (n, s) => - om(n, e, s) - .map((e) => t(e, s)) - .getOr(o), - s = (e, t) => "true" !== Ot(e.element, "aria-hidden"), - r = n(s, !1), - a = n((e, t) => { - if (s(e)) { - const o = e.element; - Dt(o, "display", "none"), - kt(o, "aria-hidden", "true"), - Ir(e, Tr(), { name: t, visible: !1 }); - } - }), - i = ((e) => (t, o) => { - L(o, (o) => e(t, o)); - })(a), - l = n((e, t) => { - if (!s(e)) { - const o = e.element; - Ht(o, "display"), - Et(o, "aria-hidden"), - Ir(e, Tr(), { name: t, visible: !0 }); - } - }), - c = { - getSlotNames: o, - getSlot: (t, o) => om(t, e, o), - isShowing: r, - hideSlot: a, - hideAllSlots: (e) => i(e, o()), - showSlot: l, - }; - return { - uid: e.uid, - dom: e.dom, - components: t, - behaviours: fu(e.slotBehaviours), - apis: c, - }; - }, - gA = ce( - { - getSlotNames: (e, t) => e.getSlotNames(t), - getSlot: (e, t, o) => e.getSlot(t, o), - isShowing: (e, t, o) => e.isShowing(t, o), - hideSlot: (e, t, o) => e.hideSlot(t, o), - hideAllSlots: (e, t) => e.hideAllSlots(t), - showSlot: (e, t, o) => e.showSlot(t, o), - }, - (e) => Ca(e), - ), - pA = { - ...gA, - sketch: (e) => { - const t = (() => { - const e = []; - return { - slot: (t, o) => (e.push(t), Ju(cA, uA(t), o)), - record: x(e), - }; - })(), - o = e(t), - n = t.record(), - s = H(n, (e) => Uu({ name: e, pname: uA(e) })); - return mm(cA, dA, s, mA, o); - }, - }, - hA = Dn([hv, fv, Os("onShow", b), Os("onHide", b), mv]), - fA = (e) => ({ element: () => e.element.dom }), - bA = (e, t) => { - const o = H(ae(t), (e) => { - const o = t[e], - n = Xn(((e) => qn("sidebar", hA, e))(o)); - return { - name: e, - getApi: fA, - onSetup: n.onSetup, - onShow: n.onShow, - onHide: n.onHide, - }; - }); - return H(o, (t) => { - const n = Es(b); - return e.slot(t.name, { - dom: { tag: "div", classes: ["tox-sidebar__pane"] }, - behaviours: ly([ - Ty(t, n), - Ey(t, n), - Ur(Tr(), (e, t) => { - const n = t.event, - s = G(o, (e) => e.name === n.name); - s.each((t) => { - (n.visible ? t.onShow : t.onHide)(t.getApi(e)); - }); - }), - ]), - }); - }); - }, - vA = (e) => - pA.sketch((t) => ({ - dom: { tag: "div", classes: ["tox-sidebar__pane-container"] }, - components: bA(t, e), - slotBehaviours: ly([Kr((e) => pA.hideAllSlots(e))]), - })), - yA = (e, t) => { - kt(e, "role", t); - }, - xA = (e) => - wm - .getCurrent(e) - .bind((e) => - QO.isGrowing(e) || QO.hasGrown(e) - ? wm - .getCurrent(e) - .bind((e) => G(pA.getSlotNames(e), (t) => pA.isShowing(e, t))) - : A.none(), - ), - wA = la("FixSizeEvent"), - SA = la("AutoSizeEvent"); - var kA = Object.freeze({ - __proto__: null, - block: (e, t, o, n) => { - kt(e.element, "aria-busy", !0); - const s = t.getRoot(e).getOr(e), - r = kl([ - Pp.config({ - mode: "special", - onTab: () => A.some(!0), - onShiftTab: () => A.some(!0), - }), - oh.config({}), - ]), - a = n(s, r), - i = s.getSystem().build(a); - Kp.append(s, ai(i)), - i.hasConfigured(Pp) && t.focus && Pp.focusIn(i), - o.isBlocked() || t.onBlock(e), - o.blockWith(() => Kp.remove(s, i)); - }, - unblock: (e, t, o) => { - Et(e.element, "aria-busy"), o.isBlocked() && t.onUnblock(e), o.clear(); - }, - isBlocked: (e, t, o) => o.isBlocked(), - }), - CA = [ - Os("getRoot", A.none), - Cs("focus", !0), - Di("onBlock"), - Di("onUnblock"), - ]; - const OA = Ol({ - fields: CA, - name: "blocking", - apis: kA, - state: Object.freeze({ - __proto__: null, - init: () => { - const e = Jl((e) => e.destroy()); - return _a({ - readState: e.isSet, - blockWith: (t) => { - e.set({ destroy: t }); - }, - clear: e.clear, - isBlocked: e.isSet, - }); - }, - }), - }), - _A = (e) => { - const t = Ie(e), - o = it(t), - n = ((e) => { - const t = void 0 !== e.dom.attributes ? e.dom.attributes : []; - return j( - t, - (e, t) => ("class" === t.name ? e : { ...e, [t.name]: t.value }), - {}, - ); - })(t), - s = ((e) => Array.prototype.slice.call(e.dom.classList, 0))(t), - r = 0 === o.length ? {} : { innerHtml: ea(t) }; - return { tag: Ue(t), classes: s, attributes: n, ...r }; - }, - TA = (e) => wm.getCurrent(e).each((e) => Dl(e.element)), - EA = (e, t, o) => { - const n = Es(!1), - s = Ql(), - r = (o) => { - var s; - n.get() && - (!((e) => "focusin" === e.type)((s = o)) || - !(s.composed ? oe(s.composedPath()) : A.from(s.target)) - .map(Ve) - .filter(Ge) - .exists((e) => Ua(e, "mce-pastebin"))) && - (o.preventDefault(), TA(t()), e.editorManager.setActive(e)); - }; - e.inline || - e.on("PreInit", () => { - e.dom.bind(e.getWin(), "focusin", r), - e.on("BeforeExecCommand", (e) => { - "mcefocus" === e.command.toLowerCase() && !0 !== e.value && r(e); - }); - }); - const a = (s) => { - s !== n.get() && - (n.set(s), - ((e, t, o, n) => { - const s = t.element; - if ( - (((e, t) => { - const o = "tabindex", - n = `data-mce-${o}`; - A.from(e.iframeElement) - .map(Ve) - .each((e) => { - t - ? (_t(e, o).each((t) => kt(e, n, t)), kt(e, o, -1)) - : (Et(e, o), - _t(e, n).each((t) => { - kt(e, o, t), Et(e, n); - })); - }); - })(e, o), - o) - ) - OA.block( - t, - ((e) => (t, o) => ({ - dom: { - tag: "div", - attributes: { - "aria-label": e.translate("Loading..."), - tabindex: "0", - }, - classes: ["tox-throbber__busy-spinner"], - }, - components: [ - { - dom: _A( - '
', - ), - }, - ], - }))(n), - ), - Ht(s, "display"), - Et(s, "aria-hidden"), - e.hasFocus() && TA(t); - else { - const o = wm.getCurrent(t).exists((e) => Fl(e.element)); - OA.unblock(t), - Dt(s, "display", "none"), - kt(s, "aria-hidden", "true"), - o && e.focus(); - } - })(e, t(), s, o.providers), - ((e, t) => { - e.dispatch("AfterProgressState", { state: t }); - })(e, s)); - }; - e.on("ProgressState", (t) => { - if ((s.on(clearTimeout), h(t.time))) { - const o = Uh.setEditorTimeout(e, () => a(t.state), t.time); - s.set(o); - } else a(t.state), s.clear(); - }); - }, - AA = (e, t, o) => ({ within: e, extra: t, withinWidth: o }), - MA = (e, t, o) => { - const n = j( - e, - (e, t) => - ((e, t) => { - const n = o(e); - return A.some({ element: e, start: t, finish: t + n, width: n }); - })(t, e.len).fold(x(e), (t) => ({ - len: t.finish, - list: e.list.concat([t]), - })), - { len: 0, list: [] }, - ).list, - s = U(n, (e) => e.finish <= t), - r = W(s, (e, t) => e + t.width, 0); - return { within: s, extra: n.slice(s.length), withinWidth: r }; - }, - DA = (e) => H(e, (e) => e.element), - BA = (e, t) => { - const o = H(t, (e) => ai(e)); - pE.setGroups(e, o); - }, - FA = (e, t, o) => { - const n = t.builtGroups.get(); - if (0 === n.length) return; - const s = nm(e, t, "primary"), - r = uw.getCoupled(e, "overflowGroup"); - Dt(s.element, "visibility", "hidden"); - const a = n.concat([r]), - i = re(a, (e) => - Rl(e.element).bind((t) => e.getSystem().getByDom(t).toOptional()), - ); - o([]), BA(s, a); - const l = ((e, t, o, n) => { - const s = ((e, t, o) => { - const n = MA(t, e, o); - return 0 === n.extra.length ? A.some(n) : A.none(); - })(e, t, o).getOrThunk(() => MA(t, e - o(n), o)), - r = s.within, - a = s.extra, - i = s.withinWidth; - return 1 === a.length && a[0].width <= o(n) - ? ((e, t, o) => { - const n = DA(e.concat(t)); - return AA(n, [], o); - })(r, a, i) - : a.length >= 1 - ? ((e, t, o, n) => { - const s = DA(e).concat([o]); - return AA(s, DA(t), n); - })(r, a, n, i) - : ((e, t, o) => AA(DA(e), [], o))(r, 0, i); - })(Jt(s.element), t.builtGroups.get(), (e) => Jt(e.element), r); - 0 === l.extra.length - ? (Kp.remove(s, r), o([])) - : (BA(s, l.within), o(l.extra)), - Ht(s.element, "visibility"), - Lt(s.element), - i.each(oh.focus); - }, - IA = x([ - hu("splitToolbarBehaviours", [uw]), - es("builtGroups", () => Es([])), - ]), - RA = x( - [ - Ai(["overflowToggledClass"]), - fs("getOverflowBounds"), - os("lazySink"), - es("overflowGroups", () => Es([])), - Di("onOpened"), - Di("onClosed"), - ].concat(IA()), - ), - NA = x([ - Uu({ factory: pE, schema: mE(), name: "primary" }), - Wu({ schema: mE(), name: "overflow" }), - Wu({ name: "overflow-button" }), - Wu({ name: "overflow-group" }), - ]), - VA = x((e, t) => { - ((e, t) => { - const o = Kt.max(e, t, [ - "margin-left", - "border-left-width", - "padding-left", - "padding-right", - "border-right-width", - "margin-right", - ]); - Dt(e, "max-width", o + "px"); - })(e, Math.floor(t)); - }), - zA = x([ - Ai(["toggledClass"]), - os("lazySink"), - is("fetch"), - fs("getBounds"), - vs("fireDismissalEventInstead", [ys("event", Cr())]), - wc(), - Di("onToggled"), - ]), - HA = x([ - Wu({ - name: "button", - overrides: (e) => ({ - dom: { attributes: { "aria-haspopup": "true" } }, - buttonBehaviours: kl([ - dh.config({ - toggleClass: e.markers.toggledClass, - aria: { mode: "expanded" }, - toggleOnExecute: !1, - onToggled: e.onToggled, - }), - ]), - }), - }), - Wu({ - factory: pE, - schema: mE(), - name: "toolbar", - overrides: (e) => ({ - toolbarBehaviours: kl([ - Pp.config({ - mode: "cyclic", - onEscape: (t) => (om(t, e, "button").each(oh.focus), A.none()), - }), - ]), - }), - }), - ]), - LA = Ql(), - PA = (e, t) => { - const o = uw.getCoupled(e, "toolbarSandbox"); - Xd.isOpen(o) ? Xd.close(o) : Xd.open(o, t.toolbar()); - }, - UA = (e, t, o, n) => { - const s = o.getBounds.map((e) => e()), - r = o.lazySink(e).getOrDie(); - Sd.positionWithinBounds( - r, - t, - { - anchor: { - type: "hotspot", - hotspot: e, - layouts: n, - overrides: { maxWidthFunction: VA() }, - }, - }, - s, - ); - }, - WA = (e, t, o, n, s) => { - pE.setGroups(t, s), UA(e, t, o, n), dh.on(e); - }, - jA = bm({ - name: "FloatingToolbarButton", - factory: (e, t, o, n) => ({ - ...Wh.sketch({ - ...n.button(), - action: (e) => { - PA(e, n); - }, - buttonBehaviours: yu({ dump: n.button().buttonBehaviours }, [ - uw.config({ - others: { - toolbarSandbox: (t) => - ((e, t, o) => { - const n = bi(); - return { - dom: { tag: "div", attributes: { id: n.id } }, - behaviours: kl([ - Pp.config({ - mode: "special", - onEscape: (e) => (Xd.close(e), A.some(!0)), - }), - Xd.config({ - onOpen: (s, r) => { - const a = LA.get().getOr(!1); - o.fetch().get((s) => { - WA(e, r, o, t.layouts, s), - n.link(e.element), - a || Pp.focusIn(r); - }); - }, - onClose: () => { - dh.off(e), - LA.get().getOr(!1) || oh.focus(e), - n.unlink(e.element); - }, - isPartOf: (t, o, n) => vi(o, n) || vi(e, n), - getAttachPoint: () => o.lazySink(e).getOrDie(), - }), - Al.config({ - channels: { - ...Qd({ - isExtraPart: T, - ...o.fireDismissalEventInstead - .map((e) => ({ - fireEventInstead: { event: e.event }, - })) - .getOr({}), - }), - ...tu({ - doReposition: () => { - Xd.getState( - uw.getCoupled(e, "toolbarSandbox"), - ).each((n) => { - UA(e, n, o, t.layouts); - }); - }, - }), - }, - }), - ]), - }; - })(t, o, e), - }, - }), - ]), - }), - apis: { - setGroups: (t, n) => { - Xd.getState(uw.getCoupled(t, "toolbarSandbox")).each((s) => { - WA(t, s, e, o.layouts, n); - }); - }, - reposition: (t) => { - Xd.getState(uw.getCoupled(t, "toolbarSandbox")).each((n) => { - UA(t, n, e, o.layouts); - }); - }, - toggle: (e) => { - PA(e, n); - }, - toggleWithoutFocusing: (e) => { - ((e, t) => { - LA.set(!0), PA(e, t), LA.clear(); - })(e, n); - }, - getToolbar: (e) => Xd.getState(uw.getCoupled(e, "toolbarSandbox")), - isOpen: (e) => Xd.isOpen(uw.getCoupled(e, "toolbarSandbox")), - }, - }), - configFields: zA(), - partFields: HA(), - apis: { - setGroups: (e, t, o) => { - e.setGroups(t, o); - }, - reposition: (e, t) => { - e.reposition(t); - }, - toggle: (e, t) => { - e.toggle(t); - }, - toggleWithoutFocusing: (e, t) => { - e.toggleWithoutFocusing(t); - }, - getToolbar: (e, t) => e.getToolbar(t), - isOpen: (e, t) => e.isOpen(t), - }, - }), - GA = x([os("items"), Ai(["itemSelector"]), hu("tgroupBehaviours", [Pp])]), - $A = x([Gu({ name: "items", unit: "item" })]), - qA = bm({ - name: "ToolbarGroup", - configFields: GA(), - partFields: $A(), - factory: (e, t, o, n) => ({ - uid: e.uid, - dom: e.dom, - components: t, - behaviours: bu(e.tgroupBehaviours, [ - Pp.config({ mode: "flow", selector: e.markers.itemSelector }), - ]), - domModification: { attributes: { role: "toolbar" } }, - }), - }), - XA = (e) => H(e, (e) => ai(e)), - YA = (e, t, o) => { - FA(e, o, (n) => { - o.overflowGroups.set(n), - t.getOpt(e).each((e) => { - jA.setGroups(e, XA(n)); - }); - }); - }, - KA = bm({ - name: "SplitFloatingToolbar", - configFields: RA(), - partFields: NA(), - factory: (e, t, o, n) => { - const s = jh( - jA.sketch({ - fetch: () => - fw((t) => { - t(XA(e.overflowGroups.get())); - }), - layouts: { - onLtr: () => [rl, sl], - onRtl: () => [sl, rl], - onBottomLtr: () => [il, al], - onBottomRtl: () => [al, il], - }, - getBounds: o.getOverflowBounds, - lazySink: e.lazySink, - fireDismissalEventInstead: {}, - markers: { toggledClass: e.markers.overflowToggledClass }, - parts: { button: n["overflow-button"](), toolbar: n.overflow() }, - onToggled: (t, o) => e[o ? "onOpened" : "onClosed"](t), - }), - ); - return { - uid: e.uid, - dom: e.dom, - components: t, - behaviours: bu(e.splitToolbarBehaviours, [ - uw.config({ - others: { - overflowGroup: () => - qA.sketch({ ...n["overflow-group"](), items: [s.asSpec()] }), - }, - }), - ]), - apis: { - setGroups: (t, o) => { - e.builtGroups.set(H(o, t.getSystem().build)), YA(t, s, e); - }, - refresh: (t) => YA(t, s, e), - toggle: (e) => { - s.getOpt(e).each((e) => { - jA.toggle(e); - }); - }, - toggleWithoutFocusing: (e) => { - s.getOpt(e).each(jA.toggleWithoutFocusing); - }, - isOpen: (e) => s.getOpt(e).map(jA.isOpen).getOr(!1), - reposition: (e) => { - s.getOpt(e).each((e) => { - jA.reposition(e); - }); - }, - getOverflow: (e) => s.getOpt(e).bind(jA.getToolbar), - }, - domModification: { attributes: { role: "group" } }, - }; - }, - apis: { - setGroups: (e, t, o) => { - e.setGroups(t, o); - }, - refresh: (e, t) => { - e.refresh(t); - }, - reposition: (e, t) => { - e.reposition(t); - }, - toggle: (e, t) => { - e.toggle(t); - }, - toggleWithoutFocusing: (e, t) => { - e.toggle(t); - }, - isOpen: (e, t) => e.isOpen(t), - getOverflow: (e, t) => e.getOverflow(t), - }, - }), - JA = x( - [ - Ai([ - "closedClass", - "openClass", - "shrinkingClass", - "growingClass", - "overflowToggledClass", - ]), - Di("onOpened"), - Di("onClosed"), - ].concat(IA()), - ), - ZA = x([ - Uu({ factory: pE, schema: mE(), name: "primary" }), - Uu({ - factory: pE, - schema: mE(), - name: "overflow", - overrides: (e) => ({ - toolbarBehaviours: kl([ - QO.config({ - dimension: { property: "height" }, - closedClass: e.markers.closedClass, - openClass: e.markers.openClass, - shrinkingClass: e.markers.shrinkingClass, - growingClass: e.markers.growingClass, - onShrunk: (t) => { - om(t, e, "overflow-button").each((e) => { - dh.off(e), oh.focus(e); - }), - e.onClosed(t); - }, - onGrown: (t) => { - Pp.focusIn(t), e.onOpened(t); - }, - onStartGrow: (t) => { - om(t, e, "overflow-button").each(dh.on); - }, - }), - Pp.config({ - mode: "acyclic", - onEscape: (t) => ( - om(t, e, "overflow-button").each(oh.focus), A.some(!0) - ), - }), - ]), - }), - }), - Wu({ - name: "overflow-button", - overrides: (e) => ({ - buttonBehaviours: kl([ - dh.config({ - toggleClass: e.markers.overflowToggledClass, - aria: { mode: "pressed" }, - toggleOnExecute: !1, - }), - ]), - }), - }), - Wu({ name: "overflow-group" }), - ]), - QA = (e, t) => { - om(e, t, "overflow-button") - .bind(() => om(e, t, "overflow")) - .each((o) => { - eM(e, t), QO.toggleGrow(o); - }); - }, - eM = (e, t) => { - om(e, t, "overflow").each((o) => { - FA(e, t, (e) => { - const t = H(e, (e) => ai(e)); - pE.setGroups(o, t); - }), - om(e, t, "overflow-button").each((e) => { - QO.hasGrown(o) && dh.on(e); - }), - QO.refresh(o); - }); - }, - tM = bm({ - name: "SplitSlidingToolbar", - configFields: JA(), - partFields: ZA(), - factory: (e, t, o, n) => { - const s = "alloy.toolbar.toggle"; - return { - uid: e.uid, - dom: e.dom, - components: t, - behaviours: bu(e.splitToolbarBehaviours, [ - uw.config({ - others: { - overflowGroup: (e) => - qA.sketch({ - ...n["overflow-group"](), - items: [ - Wh.sketch({ - ...n["overflow-button"](), - action: (t) => { - Fr(e, s); - }, - }), - ], - }), - }, - }), - Jp("toolbar-toggle-events", [ - Ur(s, (t) => { - QA(t, e); - }), - ]), - ]), - apis: { - setGroups: (t, o) => { - ((t, o) => { - const n = H(o, t.getSystem().build); - e.builtGroups.set(n); - })(t, o), - eM(t, e); - }, - refresh: (t) => eM(t, e), - toggle: (t) => QA(t, e), - isOpen: (t) => - ((e, t) => om(e, t, "overflow").map(QO.hasGrown).getOr(!1))(t, e), - }, - domModification: { attributes: { role: "group" } }, - }; - }, - apis: { - setGroups: (e, t, o) => { - e.setGroups(t, o); - }, - refresh: (e, t) => { - e.refresh(t); - }, - toggle: (e, t) => { - e.toggle(t); - }, - isOpen: (e, t) => e.isOpen(t), - }, - }), - oM = (e) => { - const t = e.title.fold( - () => ({}), - (e) => ({ attributes: { title: e } }), - ); - return { - dom: { tag: "div", classes: ["tox-toolbar__group"], ...t }, - components: [qA.parts.items({})], - items: e.items, - markers: { - itemSelector: - "*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled]), .tox-number-input:not([disabled])", - }, - tgroupBehaviours: kl([cS.config({}), oh.config({})]), - }; - }, - nM = (e) => qA.sketch(oM(e)), - sM = (e, t) => { - const o = Kr((t) => { - const o = H(e.initGroups, nM); - pE.setGroups(t, o); - }); - return kl([ - Oy(e.providers.isDisabled), - Sy(), - Pp.config({ - mode: t, - onEscape: e.onEscape, - selector: ".tox-toolbar__group", - }), - Jp("toolbar-events", [o]), - ]); - }, - rM = (e) => { - const t = e.cyclicKeying ? "cyclic" : "acyclic"; - return { - uid: e.uid, - dom: { tag: "div", classes: ["tox-toolbar-overlord"] }, - parts: { - "overflow-group": oM({ title: A.none(), items: [] }), - "overflow-button": T_( - { - name: "more", - icon: A.some("more-drawer"), - enabled: !0, - tooltip: A.some("Reveal or hide additional toolbar items"), - primary: !1, - buttonType: A.none(), - borderless: !1, - }, - A.none(), - e.providers, - ), - }, - splitToolbarBehaviours: sM(e, t), - }; - }, - aM = (e) => { - const t = rM(e), - o = KA.parts.primary({ - dom: { tag: "div", classes: ["tox-toolbar__primary"] }, - }); - return KA.sketch({ - ...t, - lazySink: e.getSink, - getOverflowBounds: () => { - const t = e.moreDrawerData.lazyHeader().element, - o = Zo(t), - n = ot(t), - s = Zo(n), - r = Math.max(n.dom.scrollHeight, s.height); - return Ko(o.x + 4, s.y, o.width - 8, r); - }, - parts: { - ...t.parts, - overflow: { - dom: { - tag: "div", - classes: ["tox-toolbar__overflow"], - attributes: e.attributes, - }, - }, - }, - components: [o], - markers: { overflowToggledClass: "tox-tbtn--enabled" }, - onOpened: (t) => e.onToggled(t, !0), - onClosed: (t) => e.onToggled(t, !1), - }); - }, - iM = (e) => { - const t = tM.parts.primary({ - dom: { tag: "div", classes: ["tox-toolbar__primary"] }, - }), - o = tM.parts.overflow({ - dom: { tag: "div", classes: ["tox-toolbar__overflow"] }, - }), - n = rM(e); - return tM.sketch({ - ...n, - components: [t, o], - markers: { - openClass: "tox-toolbar__overflow--open", - closedClass: "tox-toolbar__overflow--closed", - growingClass: "tox-toolbar__overflow--growing", - shrinkingClass: "tox-toolbar__overflow--shrinking", - overflowToggledClass: "tox-tbtn--enabled", - }, - onOpened: (t) => { - t.getSystem().broadcastOn([qE()], { type: "opened" }), - e.onToggled(t, !0); - }, - onClosed: (t) => { - t.getSystem().broadcastOn([qE()], { type: "closed" }), - e.onToggled(t, !1); - }, - }); - }, - lM = (e) => { - const t = e.cyclicKeying ? "cyclic" : "acyclic"; - return pE.sketch({ - uid: e.uid, - dom: { - tag: "div", - classes: ["tox-toolbar"].concat( - e.type === nf.scrolling ? ["tox-toolbar--scrolling"] : [], - ), - }, - components: [pE.parts.groups({})], - toolbarBehaviours: sM(e, t), - }); - }, - cM = [ - pv, - hv, - ps("tooltip"), - ks("buttonType", "secondary", ["primary", "secondary"]), - Cs("borderless", !1), - is("onAction"), - ], - dM = { - button: [...cM, sv, as("type", ["button"])], - togglebutton: [...cM, Cs("active", !1), as("type", ["togglebutton"])], - }, - uM = [as("type", ["group"]), _s("buttons", [], Jn("type", dM))], - mM = Jn("type", { ...dM, group: uM }), - gM = Dn([_s("buttons", [], mM), is("onShow"), is("onHide")]), - pM = (e, t) => - ((e, t) => { - var o, n; - const s = "togglebutton" === e.type, - r = e.icon.map((e) => fO(e, t.icons)).map(jh), - a = { - ...e, - name: s - ? e.text.getOr(e.icon.getOr("")) - : null !== (o = e.text) && void 0 !== o - ? o - : e.icon.getOr(""), - primary: "primary" === e.buttonType, - buttonType: A.from(e.buttonType), - tooltip: e.tooltip, - icon: e.icon, - enabled: !0, - borderless: e.borderless, - }, - i = E_(null !== (n = e.buttonType) && void 0 !== n ? n : "secondary"), - l = s ? e.text.map(t.translate) : A.some(t.translate(e.text)), - c = l.map(ti), - d = a.tooltip - .or(l) - .map((e) => ({ - "aria-label": t.translate(e), - title: t.translate(e), - })) - .getOr({}), - u = r.map((e) => e.asSpec()), - m = Dy([u, c]), - g = e.icon.isSome() && c.isSome(), - p = { - tag: "button", - classes: i - .concat(...(e.icon.isSome() && !g ? ["tox-button--icon"] : [])) - .concat(...(g ? ["tox-button--icon-and-text"] : [])) - .concat(...(e.borderless ? ["tox-button--naked"] : [])) - .concat( - ...("togglebutton" === e.type && e.active - ? ["tox-button--enabled"] - : []), - ), - attributes: d, - }, - h = __( - a, - A.some((o) => { - const n = (e) => { - r.map((n) => - n.getOpt(o).each((o) => { - Kp.set(o, [fO(e, t.icons)]); - }), - ); - }; - return s - ? e.onAction({ - setIcon: n, - setActive: (e) => { - const t = o.element; - e - ? (La(t, "tox-button--enabled"), - kt(t, "aria-pressed", !0)) - : (Pa(t, "tox-button--enabled"), Et(t, "aria-pressed")); - }, - isActive: () => Ua(o.element, "tox-button--enabled"), - }) - : "button" === e.type - ? e.onAction({ setIcon: n }) - : void 0; - }), - [], - p, - m, - t, - ); - return Wh.sketch(h); - })(e, t), - hM = Do().deviceType, - fM = hM.isPhone(), - bM = hM.isTablet(); - var vM = bm({ - name: "silver.View", - configFields: [os("viewConfig")], - partFields: [ - ju({ - factory: { - sketch: (e) => { - let t = !1; - const o = H(e.buttons, (o) => - "group" === o.type - ? ((t = !0), - ((e, t) => ({ - dom: { tag: "div", classes: ["tox-view__toolbar__group"] }, - components: H(e.buttons, (e) => pM(e, t)), - }))(o, e.providers)) - : pM(o, e.providers), - ); - return { - uid: e.uid, - dom: { - tag: "div", - classes: [ - t ? "tox-view__toolbar" : "tox-view__header", - ...(fM || bM - ? ["tox-view--mobile", "tox-view--scrolling"] - : []), - ], - }, - behaviours: kl([ - oh.config({}), - Pp.config({ - mode: "flow", - selector: "button, .tox-button", - focusInside: pg.OnEnterOrSpaceMode, - }), - ]), - components: t - ? o - : [ - oS.sketch({ - dom: { tag: "div", classes: ["tox-view__header-start"] }, - components: [], - }), - oS.sketch({ - dom: { tag: "div", classes: ["tox-view__header-end"] }, - components: o, - }), - ], - }; - }, - }, - schema: [os("buttons"), os("providers")], - name: "header", - }), - ju({ - factory: { - sketch: (e) => ({ - uid: e.uid, - dom: { tag: "div", classes: ["tox-view__pane"] }, - }), - }, - schema: [], - name: "pane", - }), - ], - factory: (e, t, o, n) => { - const s = { - getPane: (t) => aE.getPart(t, e, "pane"), - getOnShow: (t) => e.viewConfig.onShow, - getOnHide: (t) => e.viewConfig.onHide, - }; - return { uid: e.uid, dom: e.dom, components: t, apis: s }; - }, - apis: { - getPane: (e, t) => e.getPane(t), - getOnShow: (e, t) => e.getOnShow(t), - getOnHide: (e, t) => e.getOnHide(t), - }, - }); - const yM = (e, t, o) => - pe(t, (t, n) => { - const s = Xn(qn("view", gM, t)); - return e.slot( - n, - vM.sketch({ - dom: { tag: "div", classes: ["tox-view"] }, - viewConfig: s, - components: [ - ...(s.buttons.length > 0 - ? [vM.parts.header({ buttons: s.buttons, providers: o })] - : []), - vM.parts.pane({}), - ], - }), - ); - }), - xM = (e, t) => - pA.sketch((o) => ({ - dom: { tag: "div", classes: ["tox-view-wrap__slot-container"] }, - components: yM(o, e, t), - slotBehaviours: ly([Kr((e) => pA.hideAllSlots(e))]), - })), - wM = (e) => G(pA.getSlotNames(e), (t) => pA.isShowing(e, t)), - SM = (e, t, o) => { - pA.getSlot(e, t).each((e) => { - vM.getPane(e).each((t) => { - var n; - o(e)(((n = t.element.dom), { getContainer: x(n) })); - }); - }); - }; - var kM = fm({ - factory: (e, t) => { - const o = { - setViews: (e, o) => { - Kp.set(e, [xM(o, t.backstage.shared.providers)]); - }, - whichView: (e) => wm.getCurrent(e).bind(wM), - toggleView: (e, t, o, n) => - wm.getCurrent(e).exists((s) => { - const r = wM(s), - a = r.exists((e) => n === e), - i = pA.getSlot(s, n).isSome(); - return ( - i && - (pA.hideAllSlots(s), - a - ? (((e) => { - const t = e.element; - Dt(t, "display", "none"), kt(t, "aria-hidden", "true"); - })(e), - t()) - : (o(), - ((e) => { - const t = e.element; - Ht(t, "display"), Et(t, "aria-hidden"); - })(e), - pA.showSlot(s, n), - ((e, t) => { - SM(e, t, vM.getOnShow); - })(s, n)), - r.each((e) => ((e, t) => SM(e, t, vM.getOnHide))(s, e))), - i - ); - }), - }; - return { - uid: e.uid, - dom: { - tag: "div", - classes: ["tox-view-wrap"], - attributes: { "aria-hidden": "true" }, - styles: { display: "none" }, - }, - components: [], - behaviours: kl([ - Kp.config({}), - wm.config({ - find: (e) => { - const t = Kp.contents(e); - return oe(t); - }, - }), - ]), - apis: o, - }; - }, - name: "silver.ViewWrapper", - configFields: [os("backstage")], - apis: { - setViews: (e, t, o) => e.setViews(t, o), - toggleView: (e, t, o, n, s) => e.toggleView(t, o, n, s), - whichView: (e, t) => e.whichView(t), - }, - }); - const CM = iE.optional({ - factory: lA, - name: "menubar", - schema: [os("backstage")], - }), - OM = iE.optional({ - factory: { - sketch: (e) => - uE.sketch({ - uid: e.uid, - dom: e.dom, - listBehaviours: kl([ - Pp.config({ mode: "acyclic", selector: ".tox-toolbar" }), - ]), - makeItem: () => - lM({ - type: e.type, - uid: la("multiple-toolbar-item"), - cyclicKeying: !1, - initGroups: [], - providers: e.providers, - onEscape: () => (e.onEscape(), A.some(!0)), - }), - setupItem: (e, t, o, n) => { - pE.setGroups(t, o); - }, - shell: !0, - }), - }, - name: "multiple-toolbar", - schema: [os("dom"), os("onEscape")], - }), - _M = iE.optional({ - factory: { - sketch: (e) => { - const t = ((e) => - e.type === nf.sliding ? iM : e.type === nf.floating ? aM : lM)(e); - return t({ - type: e.type, - uid: e.uid, - onEscape: () => (e.onEscape(), A.some(!0)), - onToggled: (t, o) => e.onToolbarToggled(o), - cyclicKeying: !1, - initGroups: [], - getSink: e.getSink, - providers: e.providers, - moreDrawerData: { - lazyToolbar: e.lazyToolbar, - lazyMoreButton: e.lazyMoreButton, - lazyHeader: e.lazyHeader, - }, - attributes: e.attributes, - }); - }, - }, - name: "toolbar", - schema: [os("dom"), os("onEscape"), os("getSink")], - }), - TM = iE.optional({ - factory: { - sketch: (e) => { - const t = e.editor, - o = e.sticky ? tA : bE; - return { - uid: e.uid, - dom: e.dom, - components: e.components, - behaviours: kl(o(t, e.sharedBackstage)), - }; - }, - }, - name: "header", - schema: [os("dom")], - }), - EM = iE.optional({ - factory: { - sketch: (e) => ({ - uid: e.uid, - dom: e.dom, - components: [ - { - dom: { - tag: "a", - attributes: { - href: "https://www.tiny.cloud/tinymce-self-hosted-premium-features/?utm_source=TinyMCE&utm_medium=SPAP&utm_campaign=SPAP&utm_id=editorreferral", - rel: "noopener", - target: "_blank", - "aria-hidden": "true", - }, - classes: ["tox-promotion-link"], - innerHtml: "\u26a1\ufe0fUpgrade", - }, - }, - ], - }), - }, - name: "promotion", - schema: [os("dom")], - }), - AM = iE.optional({ name: "socket", schema: [os("dom")] }), - MM = iE.optional({ - factory: { - sketch: (e) => ({ - uid: e.uid, - dom: { - tag: "div", - classes: ["tox-sidebar"], - attributes: { role: "presentation" }, - }, - components: [ - { - dom: { tag: "div", classes: ["tox-sidebar__slider"] }, - components: [], - behaviours: kl([ - cS.config({}), - oh.config({}), - QO.config({ - dimension: { property: "width" }, - closedClass: "tox-sidebar--sliding-closed", - openClass: "tox-sidebar--sliding-open", - shrinkingClass: "tox-sidebar--sliding-shrinking", - growingClass: "tox-sidebar--sliding-growing", - onShrunk: (e) => { - wm.getCurrent(e).each(pA.hideAllSlots), Fr(e, SA); - }, - onGrown: (e) => { - Fr(e, SA); - }, - onStartGrow: (e) => { - Ir(e, wA, { width: Nt(e.element, "width").getOr("") }); - }, - onStartShrink: (e) => { - Ir(e, wA, { width: Jt(e.element) + "px" }); - }, - }), - Kp.config({}), - wm.config({ - find: (e) => { - const t = Kp.contents(e); - return oe(t); - }, - }), - ]), - }, - ], - behaviours: kl([ - BC(0), - Jp("sidebar-sliding-events", [ - Ur(wA, (e, t) => { - Dt(e.element, "width", t.event.width); - }), - Ur(SA, (e, t) => { - Ht(e.element, "width"); - }), - ]), - ]), - }), - }, - name: "sidebar", - schema: [os("dom")], - }), - DM = iE.optional({ - factory: { - sketch: (e) => ({ - uid: e.uid, - dom: { - tag: "div", - attributes: { "aria-hidden": "true" }, - classes: ["tox-throbber"], - styles: { display: "none" }, - }, - behaviours: kl([ - Kp.config({}), - OA.config({ focus: !1 }), - wm.config({ find: (e) => oe(e.components()) }), - ]), - components: [], - }), - }, - name: "throbber", - schema: [os("dom")], - }), - BM = iE.optional({ - factory: kM, - name: "viewWrapper", - schema: [os("backstage")], - }), - FM = iE.optional({ - factory: { - sketch: (e) => ({ - uid: e.uid, - dom: { tag: "div", classes: ["tox-editor-container"] }, - components: e.components, - }), - }, - name: "editorContainer", - schema: [], - }); - var IM = bm({ - name: "OuterContainer", - factory: (e, t, o) => { - let n = !1; - const s = { - getSocket: (t) => aE.getPart(t, e, "socket"), - setSidebar: (t, o, n) => { - aE.getPart(t, e, "sidebar").each((e) => - ((e, t, o) => { - wm.getCurrent(e).each((n) => { - Kp.set(n, [vA(t)]); - const s = null == o ? void 0 : o.toLowerCase(); - r(s) && - ve(t, s) && - wm.getCurrent(n).each((t) => { - pA.showSlot(t, s), - QO.immediateGrow(n), - Ht(n.element, "width"), - yA(e.element, "region"); - }); - }); - })(e, o, n), - ); - }, - toggleSidebar: (t, o) => { - aE.getPart(t, e, "sidebar").each((e) => - ((e, t) => { - wm.getCurrent(e).each((o) => { - wm.getCurrent(o).each((n) => { - QO.hasGrown(o) - ? pA.isShowing(n, t) - ? (QO.shrink(o), yA(e.element, "presentation")) - : (pA.hideAllSlots(n), - pA.showSlot(n, t), - yA(e.element, "region")) - : (pA.hideAllSlots(n), - pA.showSlot(n, t), - QO.grow(o), - yA(e.element, "region")); - }); - }); - })(e, o), - ); - }, - whichSidebar: (t) => aE.getPart(t, e, "sidebar").bind(xA).getOrNull(), - getHeader: (t) => aE.getPart(t, e, "header"), - getToolbar: (t) => aE.getPart(t, e, "toolbar"), - setToolbar: (t, o) => { - aE.getPart(t, e, "toolbar").each((e) => { - const t = H(o, nM); - e.getApis().setGroups(e, t); - }); - }, - setToolbars: (t, o) => { - aE.getPart(t, e, "multiple-toolbar").each((e) => { - const t = H(o, (e) => H(e, nM)); - uE.setItems(e, t); - }); - }, - refreshToolbar: (t) => { - aE.getPart(t, e, "toolbar").each((e) => e.getApis().refresh(e)); - }, - toggleToolbarDrawer: (t) => { - aE.getPart(t, e, "toolbar").each((e) => { - ke(e.getApis().toggle, (t) => t(e)); - }); - }, - toggleToolbarDrawerWithoutFocusing: (t) => { - aE.getPart(t, e, "toolbar").each((e) => { - ke(e.getApis().toggleWithoutFocusing, (t) => t(e)); - }); - }, - isToolbarDrawerToggled: (t) => - aE - .getPart(t, e, "toolbar") - .bind((e) => A.from(e.getApis().isOpen).map((t) => t(e))) - .getOr(!1), - getThrobber: (t) => aE.getPart(t, e, "throbber"), - focusToolbar: (t) => { - aE.getPart(t, e, "toolbar") - .orThunk(() => aE.getPart(t, e, "multiple-toolbar")) - .each((e) => { - Pp.focusIn(e); - }); - }, - setMenubar: (t, o) => { - aE.getPart(t, e, "menubar").each((e) => { - lA.setMenus(e, o); - }); - }, - focusMenubar: (t) => { - aE.getPart(t, e, "menubar").each((e) => { - lA.focus(e); - }); - }, - setViews: (t, o) => { - aE.getPart(t, e, "viewWrapper").each((e) => { - kM.setViews(e, o); - }); - }, - toggleView: (t, o) => - aE.getPart(t, e, "viewWrapper").exists((e) => - kM.toggleView( - e, - () => s.showMainView(t), - () => s.hideMainView(t), - o, - ), - ), - whichView: (t) => - aE.getPart(t, e, "viewWrapper").bind(kM.whichView).getOrNull(), - hideMainView: (t) => { - (n = s.isToolbarDrawerToggled(t)), - n && s.toggleToolbarDrawer(t), - aE.getPart(t, e, "editorContainer").each((e) => { - const t = e.element; - Dt(t, "display", "none"), kt(t, "aria-hidden", "true"); - }); - }, - showMainView: (t) => { - n && s.toggleToolbarDrawer(t), - aE.getPart(t, e, "editorContainer").each((e) => { - const t = e.element; - Ht(t, "display"), Et(t, "aria-hidden"); - }); - }, - }; - return { - uid: e.uid, - dom: e.dom, - components: t, - apis: s, - behaviours: e.behaviours, - }; - }, - configFields: [os("dom"), os("behaviours")], - partFields: [TM, CM, _M, OM, AM, MM, EM, DM, BM, FM], - apis: { - getSocket: (e, t) => e.getSocket(t), - setSidebar: (e, t, o, n) => { - e.setSidebar(t, o, n); - }, - toggleSidebar: (e, t, o) => { - e.toggleSidebar(t, o); - }, - whichSidebar: (e, t) => e.whichSidebar(t), - getHeader: (e, t) => e.getHeader(t), - getToolbar: (e, t) => e.getToolbar(t), - setToolbar: (e, t, o) => { - e.setToolbar(t, o); - }, - setToolbars: (e, t, o) => { - e.setToolbars(t, o); - }, - refreshToolbar: (e, t) => e.refreshToolbar(t), - toggleToolbarDrawer: (e, t) => { - e.toggleToolbarDrawer(t); - }, - toggleToolbarDrawerWithoutFocusing: (e, t) => { - e.toggleToolbarDrawerWithoutFocusing(t); - }, - isToolbarDrawerToggled: (e, t) => e.isToolbarDrawerToggled(t), - getThrobber: (e, t) => e.getThrobber(t), - setMenubar: (e, t, o) => { - e.setMenubar(t, o); - }, - focusMenubar: (e, t) => { - e.focusMenubar(t); - }, - focusToolbar: (e, t) => { - e.focusToolbar(t); - }, - setViews: (e, t, o) => { - e.setViews(t, o); - }, - toggleView: (e, t, o) => e.toggleView(t, o), - whichView: (e, t) => e.whichView(t), - }, - }); - const RM = { - file: { - title: "File", - items: - "newdocument restoredraft | preview | export print | deleteallconversations", - }, - edit: { - title: "Edit", - items: - "undo redo | cut copy paste pastetext | selectall | searchreplace", - }, - view: { - title: "View", - items: - "code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments", - }, - insert: { - title: "Insert", - items: - "image link media addcomment pageembed template inserttemplate codesample inserttable accordion | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime", - }, - format: { - title: "Format", - items: - "bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat", - }, - tools: { - title: "Tools", - items: - "aidialog aishortcuts | spellchecker spellcheckerlanguage | autocorrect capitalization | a11ycheck code typography wordcount addtemplate", - }, - table: { - title: "Table", - items: - "inserttable | cell row column | advtablesort | tableprops deletetable", - }, - help: { title: "Help", items: "help" }, - }, - NM = (e) => e.split(" "), - VM = (e, t) => { - const o = { ...RM, ...t.menus }, - n = ae(t.menus).length > 0, - s = - void 0 === t.menubar || !0 === t.menubar - ? NM("file edit view insert format tools table help") - : NM(!1 === t.menubar ? "" : t.menubar), - a = U(s, (e) => { - const o = ve(RM, e); - return n ? o || be(t.menus, e).exists((e) => ve(e, "items")) : o; - }), - i = H(a, (n) => { - const s = o[n]; - return ((e, t, o) => { - const n = kf(o).split(/[ ,]/); - return { - text: e.title, - getItems: () => - X(e.items, (e) => { - const o = e.toLowerCase(); - return 0 === o.trim().length || N(n, (e) => e === o) - ? [] - : "separator" === o || "|" === o - ? [{ type: "separator" }] - : t.menuItems[o] - ? [t.menuItems[o]] - : []; - }), - }; - })({ title: s.title, items: NM(s.items) }, t, e); - }); - return U( - i, - (e) => - e.getItems().length > 0 && - N(e.getItems(), (e) => r(e) || "separator" !== e.type), - ); - }, - zM = (e) => { - const t = () => { - (e._skinLoaded = !0), - ((e) => { - e.dispatch("SkinLoaded"); - })(e); - }; - return () => { - e.initialized ? t() : e.on("init", t); - }; - }, - HM = (e, t, o) => (e.on("remove", () => o.unload(t)), o.load(t)), - LM = (e, t) => HM(e, t + "/skin.min.css", e.ui.styleSheetLoader), - PM = (e, t) => { - var o; - return ( - (o = Ve(e.getElement())), - bt(o).isSome() - ? HM(e, t + "/skin.shadowdom.min.css", rf.DOM.styleSheetLoader) - : Promise.resolve() - ); - }, - UM = (e, t) => { - const o = Jf(t); - return ( - o && - t.contentCSS.push( - o + (e ? "/content.inline" : "/content") + ".min.css", - ), - !Yf(t) && r(o) - ? Promise.all([LM(t, o), PM(t, o)]).then( - zM(t), - ( - (e, t) => () => - ((e, t) => { - e.dispatch("SkinLoadError", t); - })(e, { message: "Skin could not be loaded" }) - )(t), - ) - : Promise.resolve(zM(t)()) - ); - }, - WM = k(UM, !1), - jM = k(UM, !0), - GM = (e, t, o) => { - const n = (e, n, r, a) => { - const i = t.shared.providers.translate(e.title); - if ("separator" === e.type) - return A.some({ type: "separator", text: i }); - if ("submenu" === e.type) { - const t = X(e.getStyleItems(), (e) => s(e, n, a)); - return 0 === n && t.length <= 0 - ? A.none() - : A.some({ - type: "nestedmenuitem", - text: i, - enabled: t.length > 0, - getSubmenuItems: () => - X(e.getStyleItems(), (e) => s(e, n, a)), - }); - } - return A.some({ - type: "togglemenuitem", - text: i, - icon: e.icon, - active: e.isSelected(a), - enabled: !r, - onAction: o.onAction(e), - ...e.getStylePreview().fold( - () => ({}), - (e) => ({ meta: { style: e } }), - ), - }); - }, - s = (e, t, s) => { - const r = "formatter" === e.type && o.isInvalid(e); - return 0 === t - ? r - ? [] - : n(e, t, !1, s).toArray() - : n(e, t, r, s).toArray(); - }, - r = (e) => { - const t = o.getCurrentValue(), - n = o.shouldHide ? 0 : 1; - return X(e, (e) => s(e, n, t)); - }; - return { - validateItems: r, - getFetch: (e, t) => (o, n) => { - const s = t(), - a = r(s); - n( - CO(a, pb.CLOSE_ON_EXECUTE, e, { - isHorizontalMenu: !1, - search: A.none(), - }), - ); - }, - }; - }, - $M = (e, t, o) => { - const n = o.dataset, - s = - "basic" === n.type - ? () => H(n.data, (e) => FT(e, o.isSelectedFor, o.getPreviewFor)) - : n.getData; - return { items: GM(0, t, o), getStyleItems: s }; - }, - qM = (e, t, o) => { - const { items: n, getStyleItems: s } = $M(0, t, o), - r = yx(e, "NodeChange", (t) => { - const n = t.getComponent(); - o.updateText(n), Rm.set(t.getComponent(), !e.selection.isEditable()); - }); - return xO( - { - text: o.icon.isSome() ? A.none() : o.text, - icon: o.icon, - tooltip: A.from(o.tooltip), - role: A.none(), - fetch: n.getFetch(t, s), - onSetup: r, - getApi: (e) => ({ getComponent: x(e) }), - columns: 1, - presets: "normal", - classes: o.icon.isSome() ? [] : ["bespoke"], - dropdownBehaviours: [], - }, - "tox-tbtn", - t.shared, - ); - }; - var XM; - !(function (e) { - (e[(e.SemiColon = 0)] = "SemiColon"), (e[(e.Space = 1)] = "Space"); - })(XM || (XM = {})); - const YM = (e, t, o) => { - const n = - ((s = ((e, t) => - t === XM.SemiColon ? e.replace(/;$/, "").split(";") : e.split(" "))( - e.options.get(t), - o, - )), - H(s, (e) => { - let t = e, - o = e; - const n = e.split("="); - return ( - n.length > 1 && ((t = n[0]), (o = n[1])), { title: t, format: o } - ); - })); - var s; - return { type: "basic", data: n }; - }, - KM = [ - { - title: "Left", - icon: "align-left", - format: "alignleft", - command: "JustifyLeft", - }, - { - title: "Center", - icon: "align-center", - format: "aligncenter", - command: "JustifyCenter", - }, - { - title: "Right", - icon: "align-right", - format: "alignright", - command: "JustifyRight", - }, - { - title: "Justify", - icon: "align-justify", - format: "alignjustify", - command: "JustifyFull", - }, - ], - JM = (e) => { - const t = { type: "basic", data: KM }; - return { - tooltip: "Align", - text: A.none(), - icon: A.some("align-left"), - isSelectedFor: (t) => () => e.formatter.match(t), - getCurrentValue: A.none, - getPreviewFor: (e) => A.none, - onAction: (t) => () => - G(KM, (e) => e.format === t.format).each((t) => - e.execCommand(t.command), - ), - updateText: (t) => { - const o = G(KM, (t) => e.formatter.match(t.format)).fold( - x("left"), - (e) => e.title.toLowerCase(), - ); - Ir(t, yO, { icon: `align-${o}` }); - }, - dataset: t, - shouldHide: !1, - isInvalid: (t) => !e.formatter.canApply(t.format), - }; - }, - ZM = (e, t) => { - const o = t(), - n = H(o, (e) => e.format); - return A.from(e.formatter.closest(n)) - .bind((e) => G(o, (t) => t.format === e)) - .orThunk(() => - Ce(e.formatter.match("p"), { title: "Paragraph", format: "p" }), - ); - }, - QM = (e) => { - const t = "Paragraph", - o = YM(e, "block_formats", XM.SemiColon); - return { - tooltip: "Blocks", - text: A.some(t), - icon: A.none(), - isSelectedFor: (t) => () => e.formatter.match(t), - getCurrentValue: A.none, - getPreviewFor: (t) => () => { - const o = e.formatter.get(t); - return o - ? A.some({ - tag: (o.length > 0 && (o[0].inline || o[0].block)) || "div", - styles: e.dom.parseStyle(e.formatter.getCssText(t)), - }) - : A.none(); - }, - onAction: xx(e), - updateText: (n) => { - const s = ZM(e, () => o.data).fold(x(t), (e) => e.title); - Ir(n, vO, { text: s }); - }, - dataset: o, - shouldHide: !1, - isInvalid: (t) => !e.formatter.canApply(t.format), - }; - }, - eD = [ - "-apple-system", - "Segoe UI", - "Roboto", - "Helvetica Neue", - "sans-serif", - ], - tD = (e) => { - const t = e.split(/\s*,\s*/); - return H(t, (e) => e.replace(/^['"]+|['"]+$/g, "")); - }, - oD = (e) => { - const t = "System Font", - o = () => { - const o = (e) => (e ? tD(e)[0] : ""), - s = e.queryCommandValue("FontName"), - r = n.data, - a = s ? s.toLowerCase() : "", - i = G(r, (e) => { - const t = e.format; - return ( - t.toLowerCase() === a || - o(t).toLowerCase() === o(a).toLowerCase() - ); - }).orThunk(() => - Ce( - ((e) => - 0 === e.indexOf("-apple-system") && - (() => { - const t = tD(e.toLowerCase()); - return Y(eD, (e) => t.indexOf(e.toLowerCase()) > -1); - })())(a), - { title: t, format: a }, - ), - ); - return { matchOpt: i, font: s }; - }, - n = YM(e, "font_family_formats", XM.SemiColon); - return { - tooltip: "Fonts", - text: A.some(t), - icon: A.none(), - isSelectedFor: (e) => (t) => t.exists((t) => t.format === e), - getCurrentValue: () => { - const { matchOpt: e } = o(); - return e; - }, - getPreviewFor: (e) => () => - A.some({ - tag: "div", - styles: -1 === e.indexOf("dings") ? { "font-family": e } : {}, - }), - onAction: (t) => () => { - e.undoManager.transact(() => { - e.focus(), e.execCommand("FontName", !1, t.format); - }); - }, - updateText: (e) => { - const { matchOpt: t, font: n } = o(), - s = t.fold(x(n), (e) => e.title); - Ir(e, vO, { text: s }); - }, - dataset: n, - shouldHide: !1, - isInvalid: T, - }; - }, - nD = { - unsupportedLength: [ - "em", - "ex", - "cap", - "ch", - "ic", - "rem", - "lh", - "rlh", - "vw", - "vh", - "vi", - "vb", - "vmin", - "vmax", - "cm", - "mm", - "Q", - "in", - "pc", - "pt", - "px", - ], - fixed: ["px", "pt"], - relative: ["%"], - empty: [""], - }, - sD = (() => { - const e = "[0-9]+", - t = "[eE][+-]?" + e, - o = (e) => `(?:${e})?`, - n = [ - "Infinity", - e + "\\." + o(e) + o(t), - "\\." + e + o(t), - e + o(t), - ].join("|"); - return new RegExp(`^([+-]?(?:${n}))(.*)$`); - })(), - rD = (e, t) => - A.from(sD.exec(e)).bind((e) => { - const o = Number(e[1]), - n = e[2]; - return ((e, t) => N(t, (t) => N(nD[t], (t) => e === t)))(n, t) - ? A.some({ value: o, unit: n }) - : A.none(); - }), - aD = { - tab: x(9), - escape: x(27), - enter: x(13), - backspace: x(8), - delete: x(46), - left: x(37), - up: x(38), - right: x(39), - down: x(40), - space: x(32), - home: x(36), - end: x(35), - pageUp: x(33), - pageDown: x(34), - }, - iD = { - "8pt": "1", - "10pt": "2", - "12pt": "3", - "14pt": "4", - "18pt": "5", - "24pt": "6", - "36pt": "7", - }, - lD = { - "xx-small": "7pt", - "x-small": "8pt", - small: "10pt", - medium: "12pt", - large: "14pt", - "x-large": "18pt", - "xx-large": "24pt", - }, - cD = (e, t) => - /[0-9.]+px$/.test(e) - ? ((e, t) => { - const o = Math.pow(10, t); - return Math.round(e * o) / o; - })((72 * parseInt(e, 10)) / 96, t || 0) + "pt" - : be(lD, e).getOr(e), - dD = (e) => be(iD, e).getOr(""), - uD = (e) => { - const t = () => { - let t = A.none(); - const o = n.data, - s = e.queryCommandValue("FontSize"); - if (s) - for (let e = 3; t.isNone() && e >= 0; e--) { - const n = cD(s, e), - r = dD(n); - t = G( - o, - (e) => e.format === s || e.format === n || e.format === r, - ); - } - return { matchOpt: t, size: s }; - }, - o = x(A.none), - n = YM(e, "font_size_formats", XM.Space); - return { - tooltip: "Font sizes", - text: A.some("12pt"), - icon: A.none(), - isSelectedFor: (e) => (t) => t.exists((t) => t.format === e), - getPreviewFor: o, - getCurrentValue: () => { - const { matchOpt: e } = t(); - return e; - }, - onAction: (t) => () => { - e.undoManager.transact(() => { - e.focus(), e.execCommand("FontSize", !1, t.format); - }); - }, - updateText: (e) => { - const { matchOpt: o, size: n } = t(), - s = o.fold(x(n), (e) => e.title); - Ir(e, vO, { text: s }); - }, - dataset: n, - shouldHide: !1, - isInvalid: T, - }; - }, - mD = (e, t) => { - const o = "Paragraph"; - return { - tooltip: "Formats", - text: A.some(o), - icon: A.none(), - isSelectedFor: (t) => () => e.formatter.match(t), - getCurrentValue: A.none, - getPreviewFor: (t) => () => { - const o = e.formatter.get(t); - return void 0 !== o - ? A.some({ - tag: (o.length > 0 && (o[0].inline || o[0].block)) || "div", - styles: e.dom.parseStyle(e.formatter.getCssText(t)), - }) - : A.none(); - }, - onAction: xx(e), - updateText: (t) => { - const n = (e) => - ET(e) - ? X(e.items, n) - : AT(e) - ? [{ title: e.title, format: e.format }] - : [], - s = X(BT(e), n), - r = ZM(e, x(s)).fold(x(o), (e) => e.title); - Ir(t, vO, { text: r }); - }, - shouldHide: wf(e), - isInvalid: (t) => !e.formatter.canApply(t.format), - dataset: t, - }; - }, - gD = x( - [ - os("toggleClass"), - os("fetch"), - Fi("onExecute"), - ys("getHotspot", A.some), - ys("getAnchorOverrides", x({})), - wc(), - Fi("onItemExecute"), - us("lazySink"), - os("dom"), - Di("onOpen"), - hu("splitDropdownBehaviours", [uw, Pp, oh]), - ys("matchWidth", !1), - ys("useMinWidth", !1), - ys("eventOrder", {}), - us("role"), - ].concat(Ew()), - ), - pD = Uu({ - factory: Wh, - schema: [os("dom")], - name: "arrow", - defaults: () => ({ buttonBehaviours: kl([oh.revoke()]) }), - overrides: (e) => ({ - dom: { tag: "span", attributes: { role: "presentation" } }, - action: (t) => { - t.getSystem().getByUid(e.uid).each(Rr); - }, - buttonBehaviours: kl([ - dh.config({ toggleOnExecute: !1, toggleClass: e.toggleClass }), - ]), - }), - }), - hD = Uu({ - factory: Wh, - schema: [os("dom")], - name: "button", - defaults: () => ({ buttonBehaviours: kl([oh.revoke()]) }), - overrides: (e) => ({ - dom: { tag: "span", attributes: { role: "presentation" } }, - action: (t) => { - t.getSystem() - .getByUid(e.uid) - .each((o) => { - e.onExecute(o, t); - }); - }, - }), - }), - fD = x([ - pD, - hD, - ju({ - factory: { - sketch: (e) => ({ - uid: e.uid, - dom: { - tag: "span", - styles: { display: "none" }, - attributes: { "aria-hidden": "true" }, - innerHtml: e.text, - }, - }), - }, - schema: [os("text")], - name: "aria-descriptor", - }), - Wu({ - schema: [Ei()], - name: "menu", - defaults: (e) => ({ - onExecute: (t, o) => { - t.getSystem() - .getByUid(e.uid) - .each((n) => { - e.onItemExecute(n, t, o); - }); - }, - }), - }), - yw(), - ]), - bD = bm({ - name: "SplitDropdown", - configFields: gD(), - partFields: fD(), - factory: (e, t, o, n) => { - const s = (e) => { - wm.getCurrent(e).each((e) => { - Gm.highlightFirst(e), Pp.focusIn(e); - }); - }, - r = (t) => { - kw(e, w, t, n, s, zh.HighlightMenuAndItem).get(b); - }, - a = (t) => { - const o = nm(t, e, "button"); - return Rr(o), A.some(!0); - }, - i = { - ...Hr([ - Kr((t, o) => { - om(t, e, "aria-descriptor").each((e) => { - const o = la("aria"); - kt(e.element, "id", o), kt(t.element, "aria-describedby", o); - }); - }), - ]), - ...mh(A.some(r)), - }, - l = { - repositionMenus: (e) => { - dh.isOn(e) && Tw(e); - }, - }; - return { - uid: e.uid, - dom: e.dom, - components: t, - apis: l, - eventOrder: { - ...e.eventOrder, - [ur()]: ["disabling", "toggling", "alloy.base.behaviour"], - }, - events: i, - behaviours: bu(e.splitDropdownBehaviours, [ - uw.config({ - others: { - sandbox: (t) => { - const o = nm(t, e, "arrow"); - return _w(e, t, { - onOpen: () => { - dh.on(o), dh.on(t); - }, - onClose: () => { - dh.off(o), dh.off(t); - }, - }); - }, - }, - }), - Pp.config({ - mode: "special", - onSpace: a, - onEnter: a, - onDown: (e) => (r(e), A.some(!0)), - }), - oh.config({}), - dh.config({ toggleOnExecute: !1, aria: { mode: "expanded" } }), - ]), - domModification: { - attributes: { role: e.role.getOr("button"), "aria-haspopup": !0 }, - }, - }; - }, - apis: { repositionMenus: (e, t) => e.repositionMenus(t) }, - }), - vD = (e) => ({ - isEnabled: () => !Rm.isDisabled(e), - setEnabled: (t) => Rm.set(e, !t), - setText: (t) => Ir(e, vO, { text: t }), - setIcon: (t) => Ir(e, yO, { icon: t }), - }), - yD = (e) => ({ - setActive: (t) => { - dh.set(e, t); - }, - isActive: () => dh.isOn(e), - isEnabled: () => !Rm.isDisabled(e), - setEnabled: (t) => Rm.set(e, !t), - setText: (t) => Ir(e, vO, { text: t }), - setIcon: (t) => Ir(e, yO, { icon: t }), - }), - xD = (e, t) => - e - .map((e) => ({ "aria-label": t.translate(e), title: t.translate(e) })) - .getOr({}), - wD = la("focus-button"), - SD = (e, t, o, n, s) => { - const r = t.map((e) => jh(bO(e, "tox-tbtn", s))), - a = e.map((e) => jh(fO(e, s.icons))); - return { - dom: { - tag: "button", - classes: ["tox-tbtn"].concat(t.isSome() ? ["tox-tbtn--select"] : []), - attributes: xD(o, s), - }, - components: Dy([a.map((e) => e.asSpec()), r.map((e) => e.asSpec())]), - eventOrder: { - [Ws()]: ["focusing", "alloy.base.behaviour", uO], - [Sr()]: [uO, "toolbar-group-button-events"], - }, - buttonBehaviours: kl( - [ - Oy(s.isDisabled), - Sy(), - Jp(uO, [ - Kr((e, t) => gO(e)), - Ur(vO, (e, t) => { - r.bind((t) => t.getOpt(e)).each((e) => { - Kp.set(e, [ti(s.translate(t.event.text))]); - }); - }), - Ur(yO, (e, t) => { - a.bind((t) => t.getOpt(e)).each((e) => { - Kp.set(e, [fO(t.event.icon, s.icons)]); - }); - }), - Ur(Ws(), (e, t) => { - t.event.prevent(), Fr(e, wD); - }), - ]), - ].concat(n.getOr([])), - ), - }; - }, - kD = (e, t, o) => { - var n; - const s = Es(b), - r = SD(e.icon, e.text, e.tooltip, A.none(), o); - return Wh.sketch({ - dom: r.dom, - components: r.components, - eventOrder: mO, - buttonBehaviours: { - ...kl( - [ - Jp("toolbar-button-events", [ - ((a = { onAction: e.onAction, getApi: t.getApi }), - Qr((e, t) => { - _y( - a, - e, - )((t) => { - Ir(e, dO, { buttonApi: t }), a.onAction(t); - }); - })), - Ty(t, s), - Ey(t, s), - ]), - Oy(() => !e.enabled || o.isDisabled()), - Sy(), - ].concat(t.toolbarButtonBehaviours), - ), - [uO]: - null === (n = r.buttonBehaviours) || void 0 === n ? void 0 : n[uO], - }, - }); - var a; - }, - CD = (e, t, o) => - kD( - e, - { - toolbarButtonBehaviours: - o.length > 0 ? [Jp("toolbarButtonWith", o)] : [], - getApi: vD, - onSetup: e.onSetup, - }, - t, - ), - OD = (e, t, o) => - kD( - e, - { - toolbarButtonBehaviours: [ - Kp.config({}), - dh.config({ - toggleClass: "tox-tbtn--enabled", - aria: { mode: "pressed" }, - toggleOnExecute: !1, - }), - ].concat(o.length > 0 ? [Jp("toolbarToggleButtonWith", o)] : []), - getApi: yD, - onSetup: e.onSetup, - }, - t, - ), - _D = (e, t, o) => (n) => - fw((e) => t.fetch(e)).map((s) => - A.from( - Hw( - fn( - Zx( - la("menu-value"), - s, - (o) => { - t.onItemAction(e(n), o); - }, - t.columns, - t.presets, - pb.CLOSE_ON_EXECUTE, - t.select.getOr(T), - o, - ), - { - movement: ew(t.columns, t.presets), - menuBehaviours: ly( - "auto" !== t.columns - ? [] - : [ - Kr((e, o) => { - iy(e, 4, _b(t.presets)).each( - ({ numRows: t, numColumns: o }) => { - Pp.setGridSize(e, t, o); - }, - ); - }), - ], - ), - }, - ), - ), - ), - ), - TD = [ - { name: "history", items: ["undo", "redo"] }, - { name: "ai", items: ["aidialog", "aishortcuts"] }, - { name: "styles", items: ["styles"] }, - { name: "formatting", items: ["bold", "italic"] }, - { - name: "alignment", - items: ["alignleft", "aligncenter", "alignright", "alignjustify"], - }, - { name: "indentation", items: ["outdent", "indent"] }, - { name: "permanent pen", items: ["permanentpen"] }, - { name: "comments", items: ["addcomment"] }, - ], - ED = (e, t) => (o, n, s) => { - const r = e(o) - .mapError((e) => Kn(e)) - .getOrDie(); - return t(r, n, s); - }, - AD = { - button: ED(Fv, (e, t) => { - return (o = e), (n = t.shared.providers), CD(o, n, []); - var o, n; - }), - togglebutton: ED(Nv, (e, t) => { - return (o = e), (n = t.shared.providers), OD(o, n, []); - var o, n; - }), - menubutton: ED(aA, (e, t) => t_(e, "tox-tbtn", t, A.none(), !1)), - splitbutton: ED( - (e) => qn("SplitButton", iA, e), - (e, t) => - ((e, t) => { - const o = (e) => ({ - isEnabled: () => !Rm.isDisabled(e), - setEnabled: (t) => Rm.set(e, !t), - setIconFill: (t, o) => { - pi( - e.element, - `svg path[class="${t}"], rect[class="${t}"]`, - ).each((e) => { - kt(e, "fill", o); - }); - }, - setActive: (t) => { - kt(e.element, "aria-pressed", t), - pi(e.element, "span").each((o) => { - e.getSystem() - .getByDom(o) - .each((e) => dh.set(e, t)); - }); - }, - isActive: () => - pi(e.element, "span").exists((t) => - e.getSystem().getByDom(t).exists(dh.isOn), - ), - setText: (t) => - pi(e.element, "span").each((o) => - e - .getSystem() - .getByDom(o) - .each((e) => Ir(e, vO, { text: t })), - ), - setIcon: (t) => - pi(e.element, "span").each((o) => - e - .getSystem() - .getByDom(o) - .each((e) => Ir(e, yO, { icon: t })), - ), - }), - n = Es(b), - s = { getApi: o, onSetup: e.onSetup }; - return bD.sketch({ - dom: { - tag: "div", - classes: ["tox-split-button"], - attributes: { - "aria-pressed": !1, - ...xD(e.tooltip, t.providers), - }, - }, - onExecute: (t) => { - const n = o(t); - n.isEnabled() && e.onAction(n); - }, - onItemExecute: (e, t, o) => {}, - splitDropdownBehaviours: kl([ - Cy(t.providers.isDisabled), - Sy(), - Jp("split-dropdown-events", [ - Kr((e, t) => gO(e)), - Ur(wD, oh.focus), - Ty(s, n), - Ey(s, n), - ]), - IS.config({}), - ]), - eventOrder: { - [Sr()]: ["alloy.base.behaviour", "split-dropdown-events"], - }, - toggleClass: "tox-tbtn--enabled", - lazySink: t.getSink, - fetch: _D(o, e, t.providers), - parts: { menu: Bb(0, e.columns, e.presets) }, - components: [ - bD.parts.button( - SD( - e.icon, - e.text, - A.none(), - A.some([ - dh.config({ - toggleClass: "tox-tbtn--enabled", - toggleOnExecute: !1, - }), - ]), - t.providers, - ), - ), - bD.parts.arrow({ - dom: { - tag: "button", - classes: ["tox-tbtn", "tox-split-button__chevron"], - innerHtml: Jh("chevron-down", t.providers.icons), - }, - buttonBehaviours: kl([ - Cy(t.providers.isDisabled), - Sy(), - Zh(), - ]), - }), - bD.parts["aria-descriptor"]({ - text: t.providers.translate( - "To open the popup, press Shift+Enter", - ), - }), - ], - }); - })(e, t.shared), - ), - grouptoolbarbutton: ED( - (e) => qn("GroupToolbarButton", nA, e), - (e, t, o) => { - const n = o.ui.registry.getAll().buttons, - s = { - [yc]: t.shared.header.isPositionedAtTop() - ? vc.TopToBottom - : vc.BottomToTop, - }; - if (Cf(o) === nf.floating) - return ((e, t, o, n) => { - const s = t.shared, - r = Es(b), - a = { - toolbarButtonBehaviours: [], - getApi: vD, - onSetup: e.onSetup, - }, - i = [Jp("toolbar-group-button-events", [Ty(a, r), Ey(a, r)])]; - return jA.sketch({ - lazySink: s.getSink, - fetch: () => - fw((t) => { - t(H(o(e.items), nM)); - }), - markers: { toggledClass: "tox-tbtn--enabled" }, - parts: { - button: SD(e.icon, e.text, e.tooltip, A.some(i), s.providers), - toolbar: { - dom: { - tag: "div", - classes: ["tox-toolbar__overflow"], - attributes: n, - }, - }, - }, - }); - })( - e, - t, - (e) => - DD( - o, - { buttons: n, toolbar: e, allowToolbarGroups: !1 }, - t, - A.none(), - ), - s, - ); - throw new Error( - "Toolbar groups are only supported when using floating toolbar mode", - ); - }, - ), - }, - MD = { - styles: (e, t) => { - const o = { type: "advanced", ...t.styles }; - return qM(e, t, mD(e, o)); - }, - fontsize: (e, t) => qM(e, t, uD(e)), - fontsizeinput: (e, t) => - ((e, t, o) => { - let n = A.none(); - const s = yx(e, "NodeChange SwitchMode", (t) => { - const s = t.getComponent(); - (n = A.some(s)), - o.updateInputValue(s), - Rm.set(s, !e.selection.isEditable()); - }), - r = (e) => ({ getComponent: x(e) }), - a = Es(b), - i = la("custom-number-input-events"), - l = (e, t, s) => { - const r = n.map((e) => pu.getValue(e)).getOr(""), - a = o.getNewValue(r, e), - i = r.length - `${a}`.length, - l = n.map((e) => e.element.dom.selectionStart - i), - c = n.map((e) => e.element.dom.selectionEnd - i); - o.onAction(a, s), - n.each((e) => { - pu.setValue(e, a), - t && - (l.each((t) => (e.element.dom.selectionStart = t)), - c.each((t) => (e.element.dom.selectionEnd = t))); - }); - }, - c = (e, t) => l((e, t) => e - t, e, t), - d = (e, t) => l((e, t) => e + t, e, t), - u = (e) => rt(e.element).fold(A.none, (e) => (Dl(e), A.some(!0))), - m = (e) => - Fl(e.element) - ? (ct(e.element).each((e) => Dl(e)), A.some(!0)) - : A.none(), - g = (o, n, s, i) => { - const l = t.shared.providers.translate(s), - c = la("altExecuting"), - d = yx(e, "NodeChange SwitchMode", (t) => { - Rm.set(t.getComponent(), !e.selection.isEditable()); - }), - u = (e) => { - Rm.isDisabled(e) || o(!0); - }; - return Wh.sketch({ - dom: { - tag: "button", - attributes: { title: l, "aria-label": l }, - classes: i.concat(n), - }, - components: [hO(n, t.shared.providers.icons)], - buttonBehaviours: kl([ - Rm.config({}), - Jp(c, [ - Ty({ onSetup: d, getApi: r }, a), - Ey({ getApi: r }, a), - Ur(Ks(), (e, t) => { - (t.event.raw.keyCode !== aD.space() && - t.event.raw.keyCode !== aD.enter()) || - Rm.isDisabled(e) || - o(!1); - }), - Ur(er(), u), - Ur(Ps(), u), - ]), - ]), - eventOrder: { - [Ks()]: [c, "keying"], - [er()]: [c, "alloy.base.behaviour"], - [Ps()]: [c, "alloy.base.behaviour"], - }, - }); - }, - p = jh( - g((e) => c(!1, e), "minus", "Decrease font size", [ - "highlight-on-focus", - ]), - ), - h = jh( - g((e) => d(!1, e), "plus", "Increase font size", [ - "highlight-on-focus", - ]), - ), - f = jh({ - dom: { - tag: "div", - classes: ["tox-input-wrapper", "highlight-on-focus"], - }, - components: [ - Vb.sketch({ - inputBehaviours: kl([ - Rm.config({}), - Jp(i, [ - Ty({ onSetup: s, getApi: r }, a), - Ey({ getApi: r }, a), - ]), - Jp("input-update-display-text", [ - Ur(vO, (e, t) => { - pu.setValue(e, t.event.text); - }), - Ur(Ys(), (e) => { - o.onAction(pu.getValue(e)); - }), - Ur(Qs(), (e) => { - o.onAction(pu.getValue(e)); - }), - ]), - Pp.config({ - mode: "special", - onEnter: (e) => (l(w, !0, !0), A.some(!0)), - onEscape: u, - onUp: (e) => (d(!0, !1), A.some(!0)), - onDown: (e) => (c(!0, !1), A.some(!0)), - onLeft: (e, t) => (t.cut(), A.none()), - onRight: (e, t) => (t.cut(), A.none()), - }), - ]), - }), - ], - behaviours: kl([ - oh.config({}), - Pp.config({ - mode: "special", - onEnter: m, - onSpace: m, - onEscape: u, - }), - Jp("input-wrapper-events", [ - Ur(qs(), (e) => { - L([p, h], (t) => { - const o = Ve(t.get(e).element.dom); - Fl(o) && Bl(o); - }); - }), - ]), - ]), - }); - return { - dom: { tag: "div", classes: ["tox-number-input"] }, - components: [p.asSpec(), f.asSpec(), h.asSpec()], - behaviours: kl([ - oh.config({}), - Pp.config({ - mode: "flow", - focusInside: pg.OnEnterOrSpaceMode, - cycles: !1, - selector: "button, .tox-input-wrapper", - onEscape: (e) => - Fl(e.element) ? A.none() : (Dl(e.element), A.some(!0)), - }), - ]), - }; - })( - e, - t, - ((e) => { - const t = () => e.queryCommandValue("FontSize"); - return { - updateInputValue: (e) => Ir(e, vO, { text: t() }), - onAction: (t, o) => - e.execCommand("FontSize", !1, t, { skip_focus: !o }), - getNewValue: (o, n) => { - rD(o, ["unsupportedLength", "empty"]); - const s = rD(o, ["unsupportedLength", "empty"]).or( - rD(t(), ["unsupportedLength", "empty"]), - ), - r = s.map((e) => e.value).getOr(16), - a = Rf(e), - i = s - .map((e) => e.unit) - .filter((e) => "" !== e) - .getOr(a), - l = n( - r, - ((e) => { - var t; - return null !== - (t = { - em: { step: 0.1 }, - cm: { step: 0.1 }, - in: { step: 0.1 }, - pc: { step: 0.1 }, - ch: { step: 0.1 }, - rem: { step: 0.1 }, - }[e]) && void 0 !== t - ? t - : { step: 1 }; - })(i).step, - ); - return `${((e) => e >= 0)(l) ? l : r}${i}`; - }, - }; - })(e), - ), - fontfamily: (e, t) => qM(e, t, oD(e)), - blocks: (e, t) => qM(e, t, QM(e)), - align: (e, t) => qM(e, t, JM(e)), - }, - DD = (e, t, o, n) => { - const s = ((e) => { - const t = e.toolbar, - o = e.buttons; - return !1 === t - ? [] - : void 0 === t || !0 === t - ? ((e) => { - const t = H(TD, (t) => { - const o = U(t.items, (t) => ve(e, t) || ve(MD, t)); - return { name: t.name, items: o }; - }); - return U(t, (e) => e.items.length > 0); - })(o) - : r(t) - ? ((e) => { - const t = e.split("|"); - return H(t, (e) => ({ items: e.trim().split(" ") })); - })(t) - : ((e) => f(e, (e) => ve(e, "name") && ve(e, "items")))(t) - ? t - : (console.error( - "Toolbar type should be string, string[], boolean or ToolbarGroup[]", - ), - []); - })(t), - a = H(s, (s) => { - const r = X(s.items, (s) => - 0 === s.trim().length - ? [] - : ((e, t, o, n, s, r) => - be(t, o.toLowerCase()) - .orThunk(() => - r.bind((e) => re(e, (e) => be(t, e + o.toLowerCase()))), - ) - .fold( - () => be(MD, o.toLowerCase()).map((t) => t(e, s)), - (t) => - "grouptoolbarbutton" !== t.type || n - ? ((e, t, o) => - be(AD, e.type).fold( - () => ( - console.error( - "skipping button defined by", - e, - ), - A.none() - ), - (n) => A.some(n(e, t, o)), - ))(t, s, e) - : (console.warn( - `Ignoring the '${o}' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested.`, - ), - A.none()), - ))(e, t.buttons, s, t.allowToolbarGroups, o, n).toArray(), - ); - return { title: A.from(e.translate(s.name)), items: r }; - }); - return U(a, (e) => e.items.length > 0); - }, - BD = (e, t, o, n) => { - const s = t.mainUi.outerContainer, - a = o.toolbar, - i = o.buttons; - if (f(a, r)) { - const t = a.map((t) => { - const s = { - toolbar: t, - buttons: i, - allowToolbarGroups: o.allowToolbarGroups, - }; - return DD(e, s, n, A.none()); - }); - IM.setToolbars(s, t); - } else IM.setToolbar(s, DD(e, o, n, A.none())); - }, - FD = Do(), - ID = FD.os.isiOS() && FD.os.version.major <= 12; - var RD = Object.freeze({ - __proto__: null, - render: async (e, t, o, n, s) => { - const { mainUi: r, uiMotherships: a } = t, - i = Es(0), - l = r.outerContainer; - await WM(e); - const d = Ve(s.targetNode), - u = ft(ht(d)); - Rd(d, r.mothership), - ((e, t, o) => { - lb(e) && Rd(o.mainUi.mothership.element, o.popupUi.mothership), - Id(t, o.dialogUi.mothership); - })(e, u, t), - e.on("PostRender", () => { - IM.setSidebar(l, o.sidebar, $f(e)), - BD(e, t, o, n), - i.set(e.getWin().innerWidth), - IM.setMenubar(l, VM(e, o)), - IM.setViews(l, o.views), - ((e, t) => { - const { uiMotherships: o } = t, - n = e.dom; - let s = e.getWin(); - const r = e.getDoc().documentElement, - a = Es($t(s.innerWidth, s.innerHeight)), - i = Es($t(r.offsetWidth, r.offsetHeight)), - l = () => { - const t = a.get(); - (t.left === s.innerWidth && t.top === s.innerHeight) || - (a.set($t(s.innerWidth, s.innerHeight)), gx(e)); - }, - c = () => { - const t = e.getDoc().documentElement, - o = i.get(); - (o.left === t.offsetWidth && o.top === t.offsetHeight) || - (i.set($t(t.offsetWidth, t.offsetHeight)), gx(e)); - }, - d = (t) => { - ((e, t) => { - e.dispatch("ScrollContent", t); - })(e, t); - }; - n.bind(s, "resize", l), n.bind(s, "scroll", d); - const u = oc(Ve(e.getBody()), "load", c); - e.on("hide", () => { - L(o, (e) => { - Dt(e.element, "display", "none"); - }); - }), - e.on("show", () => { - L(o, (e) => { - Ht(e.element, "display"); - }); - }), - e.on("NodeChange", c), - e.on("remove", () => { - u.unbind(), - n.unbind(s, "resize", l), - n.unbind(s, "scroll", d), - (s = null); - }); - })(e, t); - }); - const m = IM.getSocket(l).getOrDie( - "Could not find expected socket element", - ); - if (ID) { - Bt(m.element, { - overflow: "scroll", - "-webkit-overflow-scrolling": "touch", - }); - const t = ((e, t) => { - let o = null; - return { - cancel: () => { - c(o) || (clearTimeout(o), (o = null)); - }, - throttle: (...t) => { - c(o) && - (o = setTimeout(() => { - (o = null), e.apply(null, t); - }, 20)); - }, - }; - })(() => { - e.dispatch("ScrollContent"); - }), - o = tc(m.element, "scroll", t.throttle); - e.on("remove", o.unbind); - } - wy(e, t), - e.addCommand("ToggleSidebar", (t, o) => { - IM.toggleSidebar(l, o), e.dispatch("ToggleSidebar"); - }), - e.addQueryValueHandler("ToggleSidebar", () => { - var e; - return null !== (e = IM.whichSidebar(l)) && void 0 !== e ? e : ""; - }), - e.addCommand("ToggleView", (t, o) => { - if (IM.toggleView(l, o)) { - const t = l.element; - r.mothership.broadcastOn([Yd()], { target: t }), - L(a, (e) => { - e.broadcastOn([Yd()], { target: t }); - }), - c(IM.whichView(l)) && - (e.focus(), e.nodeChanged(), IM.refreshToolbar(l)); - } - }), - e.addQueryValueHandler("ToggleView", () => { - var e; - return null !== (e = IM.whichView(l)) && void 0 !== e ? e : ""; - }); - const g = Cf(e); - (g !== nf.sliding && g !== nf.floating) || - e.on("ResizeWindow ResizeEditor ResizeContent", () => { - const o = e.getWin().innerWidth; - o !== i.get() && - (IM.refreshToolbar(t.mainUi.outerContainer), i.set(o)); - }); - const p = { - setEnabled: (e) => { - xy(t, !e); - }, - isEnabled: () => !Rm.isDisabled(l), - }; - return { - iframeContainer: m.element.dom, - editorContainer: l.element.dom, - api: p, - }; - }, - }); - const ND = (e) => - /^[0-9\.]+(|px)$/i.test("" + e) ? A.some(parseInt("" + e, 10)) : A.none(), - VD = (e) => (h(e) ? e + "px" : e), - zD = (e, t, o) => { - const n = t.filter((t) => e < t), - s = o.filter((t) => e > t); - return n.or(s).getOr(e); - }, - HD = (e) => { - const t = pf(e), - o = hf(e), - n = bf(e); - return ND(t).map((e) => zD(e, o, n)); - }, - { ToolbarLocation: LD, ToolbarMode: PD } = db, - UD = (e, t, o, n, s) => { - const { mainUi: r, uiMotherships: a } = o, - i = rf.DOM, - l = sb(e), - c = ib(e), - d = bf(e).or(HD(e)), - u = n.shared.header, - m = u.isPositionedAtTop, - g = Cf(e), - p = g === PD.sliding || g === PD.floating, - h = Es(!1), - f = () => h.get() && !e.removed, - b = (e) => - p - ? e.fold(x(0), (e) => - e.components().length > 1 ? Wt(e.components()[1].element) : 0, - ) - : 0, - v = () => { - L(a, (e) => { - e.broadcastOn([Kd()], {}); - }); - }, - y = (o) => { - if (!f()) return; - l || - s.on((e) => { - const o = d.getOrThunk(() => { - const e = ND(It(xt(), "margin-left")).getOr(0); - return Jt(xt()) - Xt(t).left + e; - }); - Dt(e.element, "max-width", o + "px"); - }); - const n = l - ? A.none() - : (() => { - if (l) return A.none(); - if ( - Xt(r.outerContainer.element).left + - Zt(r.outerContainer.element) >= - window.innerWidth - 40 || - Nt(r.outerContainer.element, "width").isSome() - ) { - Dt(r.outerContainer.element, "position", "absolute"), - Dt(r.outerContainer.element, "left", "0px"), - Ht(r.outerContainer.element, "width"); - const e = Zt(r.outerContainer.element); - return A.some(e); - } - return A.none(); - })(); - p && IM.refreshToolbar(r.outerContainer), - l || - ((o) => { - s.on((n) => { - const s = IM.getToolbar(r.outerContainer), - a = b(s), - i = Jo(t), - { top: l, left: c } = ((e, t) => - lb(e) ? xE(t) : A.none())( - e, - r.outerContainer.element, - ).fold( - () => ({ - top: m() - ? Math.max(i.y - Wt(n.element) + a, 0) - : i.bottom, - left: i.x, - }), - (e) => { - var t; - const o = Jo(e), - s = - null !== (t = e.dom.scrollTop) && void 0 !== t - ? t - : 0, - r = Ze(e, xt()), - l = r - ? Math.max(i.y - Wt(n.element) + a, 0) - : i.y - o.y + s - Wt(n.element) + a; - return { - top: m() ? l : i.bottom, - left: r ? i.x : i.x - o.x, - }; - }, - ), - d = { - position: "absolute", - left: Math.round(c) + "px", - top: Math.round(l) + "px", - }, - u = o - .map((e) => { - const t = Uo(), - o = window.innerWidth - (c - t.left); - return { width: Math.max(Math.min(e, o), 150) + "px" }; - }) - .getOr({}); - Bt(r.outerContainer.element, { ...d, ...u }); - }); - })(n), - c && s.on(o), - v(); - }, - w = () => - !(l || !c || !f()) && - s.get().exists((o) => { - const n = u.getDockingMode(), - a = ((o) => { - switch (_f(e)) { - case LD.auto: - const e = IM.getToolbar(r.outerContainer), - n = b(e), - s = Wt(o.element) - n, - a = Jo(t); - if (a.y > s) return "top"; - { - const e = ot(t), - o = Math.max(e.dom.scrollHeight, Wt(e)); - return a.bottom < o - s || en().bottom < a.bottom - s - ? "bottom" - : "top"; - } - case LD.bottom: - return "bottom"; - case LD.top: - default: - return "top"; - } - })(o); - return ( - a !== n && - ((i = a), - s.on((e) => { - $E.setModes(e, [i]), u.setDockingMode(i); - const t = m() ? vc.TopToBottom : vc.BottomToTop; - kt(e.element, yc, t); - }), - !0) - ); - var i; - }); - return { - isVisible: f, - isPositionedAtTop: m, - show: () => { - h.set(!0), - Dt(r.outerContainer.element, "display", "flex"), - i.addClass(e.getBody(), "mce-edit-focus"), - L(a, (e) => { - Ht(e.element, "display"); - }), - w(), - lb(e) - ? y((e) => ($E.isDocked(e) ? $E.reset(e) : $E.refresh(e))) - : y($E.refresh); - }, - hide: () => { - h.set(!1), - Dt(r.outerContainer.element, "display", "none"), - i.removeClass(e.getBody(), "mce-edit-focus"), - L(a, (e) => { - Dt(e.element, "display", "none"); - }); - }, - update: y, - updateMode: () => { - w() && y($E.reset); - }, - repositionPopups: v, - }; - }, - WD = (e, t) => { - const o = Jo(e); - return { pos: t ? o.y : o.bottom, bounds: o }; - }; - var jD = Object.freeze({ - __proto__: null, - render: async (e, t, o, n, s) => { - const { mainUi: r } = t, - a = Ql(), - i = Ve(s.targetNode), - l = UD(e, i, t, n, a), - c = Af(e); - await jM(e); - const d = () => { - if (a.isSet()) return void l.show(); - a.set(IM.getHeader(r.outerContainer).getOrDie()); - const s = rb(e); - lb(e) - ? (Rd(i, r.mothership), Rd(i, t.popupUi.mothership)) - : Id(s, r.mothership), - Id(s, t.dialogUi.mothership), - BD(e, t, o, n), - IM.setMenubar(r.outerContainer, VM(e, o)), - l.show(), - ((e, t, o, n) => { - const s = Es(WD(t, o.isPositionedAtTop())), - r = (n) => { - const { pos: r, bounds: a } = WD(t, o.isPositionedAtTop()), - { pos: i, bounds: l } = s.get(), - c = a.height !== l.height || a.width !== l.width; - s.set({ pos: r, bounds: a }), - c && gx(e, n), - o.isVisible() && - (i !== r - ? o.update($E.reset) - : c && (o.updateMode(), o.repositionPopups())); - }; - n || (e.on("activate", o.show), e.on("deactivate", o.hide)), - e.on("SkinLoaded ResizeWindow", () => o.update($E.reset)), - e.on("NodeChange keydown", (e) => { - requestAnimationFrame(() => r(e)); - }); - let a = 0; - const i = PC(() => o.update($E.refresh), 33); - e.on("ScrollWindow", () => { - const e = Uo().left; - e !== a && ((a = e), i.throttle()), o.updateMode(); - }), - lb(e) && - e.on("ElementScroll", (e) => { - o.update($E.refresh); - }); - const l = Zl(); - l.set(oc(Ve(e.getBody()), "load", (e) => r(e.raw))), - e.on("remove", () => { - l.clear(); - }); - })(e, i, l, c), - e.nodeChanged(); - }; - e.on("show", d), - e.on("hide", l.hide), - c || (e.on("focus", d), e.on("blur", l.hide)), - e.on("init", () => { - (e.hasFocus() || c) && d(); - }), - wy(e, t); - const u = { - show: d, - hide: l.hide, - setEnabled: (e) => { - xy(t, !e); - }, - isEnabled: () => !Rm.isDisabled(r.outerContainer), - }; - return { editorContainer: r.outerContainer.element.dom, api: u }; - }, - }); - const GD = "contexttoolbar-hide", - $D = (e, t) => - Ur(dO, (o, n) => { - const s = ((e) => ({ - hide: () => Fr(e, hr()), - getValue: () => pu.getValue(e), - }))(e.get(o)); - t.onAction(s, n.event.buttonApi); - }), - qD = (e, t) => { - const o = e.label.fold( - () => ({}), - (e) => ({ "aria-label": e }), - ), - n = jh( - Vb.sketch({ - inputClasses: ["tox-toolbar-textfield", "tox-toolbar-nav-js"], - data: e.initValue(), - inputAttributes: o, - selectOnFocus: !0, - inputBehaviours: kl([ - Pp.config({ - mode: "special", - onEnter: (e) => s.findPrimary(e).map((e) => (Rr(e), !0)), - onLeft: (e, t) => (t.cut(), A.none()), - onRight: (e, t) => (t.cut(), A.none()), - }), - ]), - }), - ), - s = ((e, t, o) => { - const n = H(t, (t) => - jh( - ((e, t, o) => - ((e) => "contextformtogglebutton" === e.type)(t) - ? ((e, t, o) => { - const { primary: n, ...s } = t.original, - r = Xn(Nv({ ...s, type: "togglebutton", onAction: b })); - return OD(r, o, [$D(e, t)]); - })(e, t, o) - : ((e, t, o) => { - const { primary: n, ...s } = t.original, - r = Xn(Fv({ ...s, type: "button", onAction: b })); - return CD(r, o, [$D(e, t)]); - })(e, t, o))(e, t, o), - ), - ); - return { - asSpecs: () => H(n, (e) => e.asSpec()), - findPrimary: (e) => - re(t, (t, o) => - t.primary - ? A.from(n[o]) - .bind((t) => t.getOpt(e)) - .filter(C(Rm.isDisabled)) - : A.none(), - ), - }; - })(n, e.commands, t); - return [ - { title: A.none(), items: [n.asSpec()] }, - { title: A.none(), items: s.asSpecs() }, - ]; - }, - XD = (e, t, o) => t.bottom - e.y >= o && e.bottom - t.y >= o, - YD = (e) => { - const t = ((e) => { - const t = e.getBoundingClientRect(); - if (t.height <= 0 && t.width <= 0) { - const o = ut(Ve(e.startContainer), e.startOffset).element; - return ($e(o) ? st(o) : A.some(o)) - .filter(Ge) - .map((e) => e.dom.getBoundingClientRect()) - .getOr(t); - } - return t; - })(e.selection.getRng()); - if (e.inline) { - const e = Uo(); - return Ko(e.left + t.left, e.top + t.top, t.width, t.height); - } - { - const o = Zo(Ve(e.getBody())); - return Ko(o.x + t.left, o.y + t.top, t.width, t.height); - } - }, - KD = (e, t, o, n = 0) => { - const s = Go(window), - r = Jo(Ve(e.getContentAreaContainer())), - a = Kf(e) || Qf(e) || tb(e), - { x: i, width: l } = ((e, t, o) => { - const n = Math.max(e.x + o, t.x); - return { x: n, width: Math.min(e.right - o, t.right) - n }; - })(r, s, n); - if (e.inline && !a) return Ko(i, s.y, l, s.height); - { - const a = t.header.isPositionedAtTop(), - { y: c, bottom: d } = ((e, t, o, n, s, r) => { - const a = Ve(e.getContainer()), - i = pi(a, ".tox-editor-header").getOr(a), - l = Jo(i), - c = l.y >= t.bottom, - d = n && !c; - if (e.inline && d) - return { y: Math.max(l.bottom + r, o.y), bottom: o.bottom }; - if (e.inline && !d) - return { y: o.y, bottom: Math.min(l.y - r, o.bottom) }; - const u = "line" === s ? Jo(a) : t; - return d - ? { - y: Math.max(l.bottom + r, o.y), - bottom: Math.min(u.bottom - r, o.bottom), - } - : { - y: Math.max(u.y + r, o.y), - bottom: Math.min(l.y - r, o.bottom), - }; - })(e, r, s, a, o, n); - return Ko(i, c, l, d - c); - } - }, - JD = { - valignCentre: [], - alignCentre: [], - alignLeft: ["tox-pop--align-left"], - alignRight: ["tox-pop--align-right"], - right: ["tox-pop--right"], - left: ["tox-pop--left"], - bottom: ["tox-pop--bottom"], - top: ["tox-pop--top"], - inset: ["tox-pop--inset"], - }, - ZD = { maxHeightFunction: cc(), maxWidthFunction: VA() }, - QD = (e) => "node" === e, - eB = (e, t, o, n, s) => { - const r = YD(e), - a = n.lastElement().exists((e) => Ze(o, e)); - return ((e, t) => { - const o = e.selection.getRng(), - n = ut(Ve(o.startContainer), o.startOffset); - return ( - o.startContainer === o.endContainer && - o.startOffset === o.endOffset - 1 && - Ze(n.element, t) - ); - })(e, o) - ? a - ? gT - : lT - : a - ? ((e, o, s) => { - const a = Nt(e, "position"); - Dt(e, "position", o); - const i = XD(r, Jo(t), -20) && !n.isReposition() ? hT : gT; - return a.each((t) => Dt(e, "position", t)), i; - })(t, n.getMode()) - : ("fixed" === n.getMode() ? s.y + Uo().top : s.y) + (Wt(t) + 12) <= - r.y - ? lT - : cT; - }, - tB = (e, t, o, n) => { - const s = (t) => (n, s, r, a, i) => ({ - ...eB(e, a, t, o, i)({ ...n, y: i.y, height: i.height }, s, r, a, i), - alwaysFit: !0, - }), - r = (e) => (QD(n) ? [s(e)] : []); - return t - ? { - onLtr: (e) => [cl, sl, rl, al, il, ll].concat(r(e)), - onRtl: (e) => [cl, rl, sl, il, al, ll].concat(r(e)), - } - : { - onLtr: (e) => [ll, cl, al, sl, il, rl].concat(r(e)), - onRtl: (e) => [ll, cl, il, rl, al, sl].concat(r(e)), - }; - }, - oB = (e, t) => { - const o = U(t, (t) => t.predicate(e.dom)), - { pass: n, fail: s } = P(o, (e) => "contexttoolbar" === e.type); - return { contextToolbars: n, contextForms: s }; - }, - nB = (e, t) => { - const o = {}, - n = [], - s = [], - r = {}, - a = {}, - i = ae(e); - return ( - L(i, (i) => { - const l = e[i]; - "contextform" === l.type - ? ((e, i) => { - const l = Xn(qn("ContextForm", Wv, i)); - (o[e] = l), - l.launch.map((o) => { - r["form:" + e] = { - ...i.launch, - type: - "contextformtogglebutton" === o.type - ? "togglebutton" - : "button", - onAction: () => { - t(l); - }, - }; - }), - "editor" === l.scope ? s.push(l) : n.push(l), - (a[e] = l); - })(i, l) - : "contexttoolbar" === l.type && - ((e, t) => { - var o; - ((o = t), qn("ContextToolbar", jv, o)).each((o) => { - "editor" === t.scope ? s.push(o) : n.push(o), (a[e] = o); - }); - })(i, l); - }), - { - forms: o, - inNodeScope: n, - inEditorScope: s, - lookupTable: a, - formNavigators: r, - } - ); - }, - sB = la("forward-slide"), - rB = la("backward-slide"), - aB = la("change-slide-event"), - iB = "tox-pop--resizing", - lB = "tox-pop--transition", - cB = (e, t, o, n) => { - const s = n.backstage, - r = s.shared, - a = Do().deviceType.isTouch, - i = Ql(), - l = Ql(), - c = Ql(), - d = ri( - ((e) => { - const t = Es([]); - return Ph.sketch({ - dom: { tag: "div", classes: ["tox-pop"] }, - fireDismissalEventInstead: { event: "doNotDismissYet" }, - onShow: (e) => { - t.set([]), - Ph.getContent(e).each((e) => { - Ht(e.element, "visibility"); - }), - Pa(e.element, iB), - Ht(e.element, "width"); - }, - inlineBehaviours: kl([ - Jp("context-toolbar-events", [ - Yr(or(), (e, t) => { - "width" === t.event.raw.propertyName && - (Pa(e.element, iB), Ht(e.element, "width")); - }), - Ur(aB, (e, t) => { - const o = e.element; - Ht(o, "width"); - const n = Jt(o); - Ph.setContent(e, t.event.contents), La(o, iB); - const s = Jt(o); - Dt(o, "width", n + "px"), - Ph.getContent(e).each((e) => { - t.event.focus - .bind((e) => (Dl(e), Rl(o))) - .orThunk(() => (Pp.focusIn(e), Il(ht(o)))); - }), - setTimeout(() => { - Dt(e.element, "width", s + "px"); - }, 0); - }), - Ur(sB, (e, o) => { - Ph.getContent(e).each((o) => { - t.set( - t.get().concat([{ bar: o, focus: Il(ht(e.element)) }]), - ); - }), - Ir(e, aB, { - contents: o.event.forwardContents, - focus: A.none(), - }); - }), - Ur(rB, (e, o) => { - ne(t.get()).each((o) => { - t.set(t.get().slice(0, t.get().length - 1)), - Ir(e, aB, { contents: ai(o.bar), focus: o.focus }); - }); - }), - ]), - Pp.config({ - mode: "special", - onEscape: (o) => - ne(t.get()).fold( - () => e.onEscape(), - (e) => (Fr(o, rB), A.some(!0)), - ), - }), - ]), - lazySink: () => sn.value(e.sink), - }); - })({ sink: o, onEscape: () => (e.focus(), A.some(!0)) }), - ), - u = () => { - const t = c.get().getOr("node"), - o = QD(t) ? 1 : 0; - return KD(e, r, t, o); - }, - m = () => !(e.removed || (a() && s.isContextMenuOpen())), - g = () => { - if (m()) { - const t = u(), - o = xe(c.get(), "node") - ? ((e, t) => - t - .filter((e) => yt(e) && je(e)) - .map(Zo) - .getOrThunk(() => YD(e)))(e, i.get()) - : YD(e); - return t.height <= 0 || !XD(o, t, 0.01); - } - return !0; - }, - p = () => { - i.clear(), l.clear(), c.clear(), Ph.hide(d); - }, - h = () => { - if (Ph.isOpen(d)) { - const e = d.element; - Ht(e, "display"), - g() ? Dt(e, "display", "none") : (l.set(0), Ph.reposition(d)); - } - }, - f = (t) => ({ - dom: { tag: "div", classes: ["tox-pop__dialog"] }, - components: [t], - behaviours: kl([ - Pp.config({ mode: "acyclic" }), - Jp("pop-dialog-wrap-events", [ - Kr((t) => { - e.shortcuts.add("ctrl+F9", "focus statusbar", () => - Pp.focusIn(t), - ); - }), - Jr((t) => { - e.shortcuts.remove("ctrl+F9"); - }), - ]), - ]), - }), - v = Qt(() => - nB(t, (e) => { - const t = y([e]); - Ir(d, sB, { forwardContents: f(t) }); - }), - ), - y = (t) => { - const { buttons: o } = e.ui.registry.getAll(), - s = { ...o, ...v().formNavigators }, - a = Cf(e) === nf.scrolling ? nf.scrolling : nf.default, - i = q( - H(t, (t) => - "contexttoolbar" === t.type - ? ((t, o) => - DD( - e, - { - buttons: t, - toolbar: o.items, - allowToolbarGroups: !1, - }, - n.backstage, - A.some(["form:"]), - ))(s, t) - : ((e, t) => qD(e, t))(t, r.providers), - ), - ); - return lM({ - type: a, - uid: la("context-toolbar"), - initGroups: i, - onEscape: A.none, - cyclicKeying: !0, - providers: r.providers, - }); - }, - x = (t, n) => { - if ((S.cancel(), !m())) return; - const s = y(t), - p = t[0].position, - h = ((t, n) => { - const s = "node" === t ? r.anchors.node(n) : r.anchors.cursor(), - c = ((e, t, o, n) => - "line" === t - ? { - bubble: gc(12, 0, JD), - layouts: { onLtr: () => [dl], onRtl: () => [ul] }, - overrides: ZD, - } - : { - bubble: gc(0, 12, JD, 1 / 12), - layouts: tB(e, o, n, t), - overrides: ZD, - })(e, t, a(), { - lastElement: i.get, - isReposition: () => xe(l.get(), 0), - getMode: () => Sd.getMode(o), - }); - return fn(s, c); - })(p, n); - c.set(p), l.set(1); - const b = d.element; - Ht(b, "display"), - ((e) => xe(Se(e, i.get(), Ze), !0))(n) || - (Pa(b, lB), Sd.reset(o, d)), - Ph.showWithinBounds( - d, - f(s), - { anchor: h, transition: { classes: [lB], mode: "placement" } }, - () => A.some(u()), - ), - n.fold(i.clear, i.set), - g() && Dt(b, "display", "none"); - }; - let w = !1; - const S = PC(() => { - !e.hasFocus() || - e.removed || - w || - (Ua(d.element, lB) - ? S.throttle() - : ((e, t) => { - const o = Ve(t.getBody()), - n = (e) => Ze(e, o), - s = Ve(t.selection.getNode()); - return ((e) => !n(e) && !Qe(o, e))(s) - ? A.none() - : ((e, t, o) => { - const n = oB(e, t); - if (n.contextForms.length > 0) - return A.some({ - elem: e, - toolbars: [n.contextForms[0]], - }); - { - const t = oB(e, o); - if (t.contextForms.length > 0) - return A.some({ - elem: e, - toolbars: [t.contextForms[0]], - }); - if ( - n.contextToolbars.length > 0 || - t.contextToolbars.length > 0 - ) { - const o = ((e) => { - if (e.length <= 1) return e; - { - const t = (t) => N(e, (e) => e.position === t), - o = (t) => U(e, (e) => e.position === t), - n = t("selection"), - s = t("node"); - if (n || s) { - if (s && n) { - const e = o("node"), - t = H(o("selection"), (e) => ({ - ...e, - position: "node", - })); - return e.concat(t); - } - return o(n ? "selection" : "node"); - } - return o("line"); - } - })(n.contextToolbars.concat(t.contextToolbars)); - return A.some({ elem: e, toolbars: o }); - } - return A.none(); - } - })(s, e.inNodeScope, e.inEditorScope).orThunk(() => - ((e, t, o) => - e(t) - ? A.none() - : Fs( - t, - (e) => { - if (Ge(e)) { - const { - contextToolbars: t, - contextForms: n, - } = oB(e, o.inNodeScope), - s = - n.length > 0 - ? n - : ((e) => { - if (e.length <= 1) return e; - { - const t = (t) => - G(e, (e) => e.position === t); - return t("selection") - .orThunk(() => t("node")) - .orThunk(() => t("line")) - .map((e) => e.position) - .fold( - () => [], - (t) => - U( - e, - (e) => e.position === t, - ), - ); - } - })(t); - return s.length > 0 - ? A.some({ elem: e, toolbars: s }) - : A.none(); - } - return A.none(); - }, - e, - ))(n, s, e), - ); - })(v(), e).fold(p, (e) => { - x(e.toolbars, A.some(e.elem)); - })); - }, 17); - e.on("init", () => { - e.on("remove", p), - e.on( - "ScrollContent ScrollWindow ObjectResized ResizeEditor longpress", - h, - ), - e.on("click keyup focus SetContent", S.throttle), - e.on(GD, p), - e.on("contexttoolbar-show", (t) => { - const o = v(); - be(o.lookupTable, t.toolbarKey).each((o) => { - x([o], Ce(t.target !== e, t.target)), - Ph.getContent(d).each(Pp.focusIn); - }); - }), - e.on("focusout", (t) => { - Uh.setEditorTimeout( - e, - () => { - Rl(o.element).isNone() && Rl(d.element).isNone() && p(); - }, - 0, - ); - }), - e.on("SwitchMode", () => { - e.mode.isReadOnly() && p(); - }), - e.on("AfterProgressState", (t) => { - t.state ? p() : e.hasFocus() && S.throttle(); - }), - e.on("dragstart", () => { - w = !0; - }), - e.on("dragend drop", () => { - w = !1; - }), - e.on("NodeChange", (e) => { - Rl(d.element).fold(S.throttle, b); - }); - }); - }, - dB = (e, t) => { - const o = () => { - const o = t.getOptions(e), - n = t.getCurrent(e).map(t.hash), - s = Ql(); - return H(o, (o) => ({ - type: "togglemenuitem", - text: t.display(o), - onSetup: (r) => { - const a = (e) => { - e && (s.on((e) => e.setActive(!1)), s.set(r)), r.setActive(e); - }; - a(xe(n, t.hash(o))); - const i = t.watcher(e, o, a); - return () => { - s.clear(), i(); - }; - }, - onAction: () => t.setCurrent(e, o), - })); - }; - e.ui.registry.addMenuButton(t.name, { - tooltip: t.text, - icon: t.icon, - fetch: (e) => e(o()), - onSetup: t.onToolbarSetup, - }), - e.ui.registry.addNestedMenuItem(t.name, { - type: "nestedmenuitem", - text: t.text, - getSubmenuItems: o, - onSetup: t.onMenuSetup, - }); - }, - uB = (e) => { - dB( - e, - ((e) => ({ - name: "lineheight", - text: "Line height", - icon: "line-height", - getOptions: Zf, - hash: (e) => - ((e, t) => - rD(e, ["fixed", "relative", "empty"]).map( - ({ value: e, unit: t }) => e + t, - ))(e).getOr(e), - display: w, - watcher: (e, t, o) => - e.formatter.formatChanged("lineheight", o, !1, { value: t }).unbind, - getCurrent: (e) => A.from(e.queryCommandValue("LineHeight")), - setCurrent: (e, t) => e.execCommand("LineHeight", !1, t), - onToolbarSetup: bx(e), - onMenuSetup: bx(e), - }))(e), - ), - ((e) => - A.from(Sf(e)).map((t) => ({ - name: "language", - text: "Language", - icon: "language", - getOptions: x(t), - hash: (e) => - u(e.customCode) ? e.code : `${e.code}/${e.customCode}`, - display: (e) => e.title, - watcher: (e, t, o) => { - var n; - return e.formatter.formatChanged("lang", o, !1, { - value: t.code, - customValue: - null !== (n = t.customCode) && void 0 !== n ? n : null, - }).unbind; - }, - getCurrent: (e) => { - const t = Ve(e.selection.getNode()); - return Is(t, (e) => - A.some(e) - .filter(Ge) - .bind((e) => - _t(e, "lang").map((t) => ({ - code: t, - customCode: _t(e, "data-mce-lang").getOrUndefined(), - title: "", - })), - ), - ); - }, - setCurrent: (e, t) => e.execCommand("Lang", !1, t), - onToolbarSetup: (t) => { - const o = Zl(); - return ( - t.setActive(e.formatter.match("lang", {}, void 0, !0)), - o.set(e.formatter.formatChanged("lang", t.setActive, !0)), - fx(o.clear, bx(e)(t)) - ); - }, - onMenuSetup: bx(e), - })))(e).each((t) => dB(e, t)); - }, - mB = (e) => - yx(e, "NodeChange", (t) => { - t.setEnabled( - e.queryCommandState("outdent") && e.selection.isEditable(), - ); - }), - gB = (e, t) => (o) => { - o.setActive(t.get()); - const n = (e) => { - t.set(e.state), o.setActive(e.state); - }; - return ( - e.on("PastePlainTextToggle", n), - fx(() => e.off("PastePlainTextToggle", n), bx(e)(o)) - ); - }, - pB = (e, t) => () => { - e.execCommand("mceToggleFormat", !1, t); - }, - hB = (e) => { - ((e) => { - ((e) => { - LC.each( - [ - { name: "bold", text: "Bold", icon: "bold" }, - { name: "italic", text: "Italic", icon: "italic" }, - { name: "underline", text: "Underline", icon: "underline" }, - { - name: "strikethrough", - text: "Strikethrough", - icon: "strike-through", - }, - { name: "subscript", text: "Subscript", icon: "subscript" }, - { name: "superscript", text: "Superscript", icon: "superscript" }, - ], - (t, o) => { - e.ui.registry.addToggleButton(t.name, { - tooltip: t.text, - icon: t.icon, - onSetup: vx(e, t.name), - onAction: pB(e, t.name), - }); - }, - ); - for (let t = 1; t <= 6; t++) { - const o = "h" + t; - e.ui.registry.addToggleButton(o, { - text: o.toUpperCase(), - tooltip: "Heading " + t, - onSetup: vx(e, o), - onAction: pB(e, o), - }); - } - })(e), - ((e) => { - LC.each( - [ - { name: "copy", text: "Copy", action: "Copy", icon: "copy" }, - { name: "help", text: "Help", action: "mceHelp", icon: "help" }, - { - name: "selectall", - text: "Select all", - action: "SelectAll", - icon: "select-all", - }, - { - name: "newdocument", - text: "New document", - action: "mceNewDocument", - icon: "new-document", - }, - { - name: "print", - text: "Print", - action: "mcePrint", - icon: "print", - }, - ], - (t) => { - e.ui.registry.addButton(t.name, { - tooltip: t.text, - icon: t.icon, - onAction: wx(e, t.action), - }); - }, - ), - LC.each( - [ - { name: "cut", text: "Cut", action: "Cut", icon: "cut" }, - { - name: "paste", - text: "Paste", - action: "Paste", - icon: "paste", - }, - { - name: "removeformat", - text: "Clear formatting", - action: "RemoveFormat", - icon: "remove-formatting", - }, - { - name: "remove", - text: "Remove", - action: "Delete", - icon: "remove", - }, - { - name: "hr", - text: "Horizontal line", - action: "InsertHorizontalRule", - icon: "horizontal-rule", - }, - ], - (t) => { - e.ui.registry.addButton(t.name, { - tooltip: t.text, - icon: t.icon, - onSetup: bx(e), - onAction: wx(e, t.action), - }); - }, - ); - })(e), - ((e) => { - LC.each( - [ - { - name: "blockquote", - text: "Blockquote", - action: "mceBlockQuote", - icon: "quote", - }, - ], - (t) => { - e.ui.registry.addToggleButton(t.name, { - tooltip: t.text, - icon: t.icon, - onAction: wx(e, t.action), - onSetup: vx(e, t.name), - }); - }, - ); - })(e); - })(e), - ((e) => { - LC.each( - [ - { - name: "newdocument", - text: "New document", - action: "mceNewDocument", - icon: "new-document", - }, - { - name: "copy", - text: "Copy", - action: "Copy", - icon: "copy", - shortcut: "Meta+C", - }, - { - name: "selectall", - text: "Select all", - action: "SelectAll", - icon: "select-all", - shortcut: "Meta+A", - }, - { - name: "print", - text: "Print...", - action: "mcePrint", - icon: "print", - shortcut: "Meta+P", - }, - ], - (t) => { - e.ui.registry.addMenuItem(t.name, { - text: t.text, - icon: t.icon, - shortcut: t.shortcut, - onAction: wx(e, t.action), - }); - }, - ), - LC.each( - [ - { - name: "bold", - text: "Bold", - action: "Bold", - icon: "bold", - shortcut: "Meta+B", - }, - { - name: "italic", - text: "Italic", - action: "Italic", - icon: "italic", - shortcut: "Meta+I", - }, - { - name: "underline", - text: "Underline", - action: "Underline", - icon: "underline", - shortcut: "Meta+U", - }, - { - name: "strikethrough", - text: "Strikethrough", - action: "Strikethrough", - icon: "strike-through", - }, - { - name: "subscript", - text: "Subscript", - action: "Subscript", - icon: "subscript", - }, - { - name: "superscript", - text: "Superscript", - action: "Superscript", - icon: "superscript", - }, - { - name: "removeformat", - text: "Clear formatting", - action: "RemoveFormat", - icon: "remove-formatting", - }, - { - name: "cut", - text: "Cut", - action: "Cut", - icon: "cut", - shortcut: "Meta+X", - }, - { - name: "paste", - text: "Paste", - action: "Paste", - icon: "paste", - shortcut: "Meta+V", - }, - { - name: "hr", - text: "Horizontal line", - action: "InsertHorizontalRule", - icon: "horizontal-rule", - }, - ], - (t) => { - e.ui.registry.addMenuItem(t.name, { - text: t.text, - icon: t.icon, - shortcut: t.shortcut, - onSetup: bx(e), - onAction: wx(e, t.action), - }); - }, - ), - e.ui.registry.addMenuItem("codeformat", { - text: "Code", - icon: "sourcecode", - onSetup: bx(e), - onAction: pB(e, "code"), - }); - })(e); - }, - fB = (e, t) => - yx(e, "Undo Redo AddUndo TypingUndo ClearUndos SwitchMode", (o) => { - o.setEnabled(!e.mode.isReadOnly() && e.undoManager[t]()); - }), - bB = (e) => - yx(e, "VisualAid", (t) => { - t.setActive(e.hasVisual); - }), - vB = (e, t) => { - ((e) => { - L( - [ - { - name: "alignleft", - text: "Align left", - cmd: "JustifyLeft", - icon: "align-left", - }, - { - name: "aligncenter", - text: "Align center", - cmd: "JustifyCenter", - icon: "align-center", - }, - { - name: "alignright", - text: "Align right", - cmd: "JustifyRight", - icon: "align-right", - }, - { - name: "alignjustify", - text: "Justify", - cmd: "JustifyFull", - icon: "align-justify", - }, - ], - (t) => { - e.ui.registry.addToggleButton(t.name, { - tooltip: t.text, - icon: t.icon, - onAction: wx(e, t.cmd), - onSetup: vx(e, t.name), - }); - }, - ), - e.ui.registry.addButton("alignnone", { - tooltip: "No alignment", - icon: "align-none", - onSetup: bx(e), - onAction: wx(e, "JustifyNone"), - }); - })(e), - hB(e), - ((e, t) => { - ((e, t) => { - const o = $M(0, t, JM(e)); - e.ui.registry.addNestedMenuItem("align", { - text: t.shared.providers.translate("Align"), - onSetup: bx(e), - getSubmenuItems: () => o.items.validateItems(o.getStyleItems()), - }); - })(e, t), - ((e, t) => { - const o = $M(0, t, oD(e)); - e.ui.registry.addNestedMenuItem("fontfamily", { - text: t.shared.providers.translate("Fonts"), - onSetup: bx(e), - getSubmenuItems: () => o.items.validateItems(o.getStyleItems()), - }); - })(e, t), - ((e, t) => { - const o = { type: "advanced", ...t.styles }, - n = $M(0, t, mD(e, o)); - e.ui.registry.addNestedMenuItem("styles", { - text: "Formats", - onSetup: bx(e), - getSubmenuItems: () => n.items.validateItems(n.getStyleItems()), - }); - })(e, t), - ((e, t) => { - const o = $M(0, t, QM(e)); - e.ui.registry.addNestedMenuItem("blocks", { - text: "Blocks", - onSetup: bx(e), - getSubmenuItems: () => o.items.validateItems(o.getStyleItems()), - }); - })(e, t), - ((e, t) => { - const o = $M(0, t, uD(e)); - e.ui.registry.addNestedMenuItem("fontsize", { - text: "Font sizes", - onSetup: bx(e), - getSubmenuItems: () => o.items.validateItems(o.getStyleItems()), - }); - })(e, t); - })(e, t), - ((e) => { - ((e) => { - e.ui.registry.addMenuItem("undo", { - text: "Undo", - icon: "undo", - shortcut: "Meta+Z", - onSetup: fB(e, "hasUndo"), - onAction: wx(e, "undo"), - }), - e.ui.registry.addMenuItem("redo", { - text: "Redo", - icon: "redo", - shortcut: "Meta+Y", - onSetup: fB(e, "hasRedo"), - onAction: wx(e, "redo"), - }); - })(e), - ((e) => { - e.ui.registry.addButton("undo", { - tooltip: "Undo", - icon: "undo", - enabled: !1, - onSetup: fB(e, "hasUndo"), - onAction: wx(e, "undo"), - }), - e.ui.registry.addButton("redo", { - tooltip: "Redo", - icon: "redo", - enabled: !1, - onSetup: fB(e, "hasRedo"), - onAction: wx(e, "redo"), - }); - })(e); - })(e), - ((e) => { - ((e) => { - e.addCommand("mceApplyTextcolor", (t, o) => { - ((e, t, o) => { - e.undoManager.transact(() => { - e.focus(), - e.formatter.apply(t, { value: o }), - e.nodeChanged(); - }); - })(e, t, o); - }), - e.addCommand("mceRemoveTextcolor", (t) => { - ((e, t) => { - e.undoManager.transact(() => { - e.focus(), - e.formatter.remove(t, { value: null }, void 0, !0), - e.nodeChanged(); - }); - })(e, t); - }); - })(e); - const t = Lx(e), - o = Px(e), - n = Es(t), - s = Es(o); - Yx(e, "forecolor", "forecolor", "Text color", n), - Yx(e, "backcolor", "hilitecolor", "Background color", s), - Kx(e, "forecolor", "forecolor", "Text color", n), - Kx(e, "backcolor", "hilitecolor", "Background color", s); - })(e), - ((e) => { - ((e) => { - e.ui.registry.addButton("visualaid", { - tooltip: "Visual aids", - text: "Visual aids", - onAction: wx(e, "mceToggleVisualAid"), - }); - })(e), - ((e) => { - e.ui.registry.addToggleMenuItem("visualaid", { - text: "Visual aids", - onSetup: bB(e), - onAction: wx(e, "mceToggleVisualAid"), - }); - })(e); - })(e), - ((e) => { - ((e) => { - e.ui.registry.addButton("outdent", { - tooltip: "Decrease indent", - icon: "outdent", - onSetup: mB(e), - onAction: wx(e, "outdent"), - }), - e.ui.registry.addButton("indent", { - tooltip: "Increase indent", - icon: "indent", - onSetup: bx(e), - onAction: wx(e, "indent"), - }); - })(e); - })(e), - uB(e), - ((e) => { - const t = Es(Gf(e)), - o = () => e.execCommand("mceTogglePlainTextPaste"); - e.ui.registry.addToggleButton("pastetext", { - active: !1, - icon: "paste-text", - tooltip: "Paste as text", - onAction: o, - onSetup: gB(e, t), - }), - e.ui.registry.addToggleMenuItem("pastetext", { - text: "Paste as text", - icon: "paste-text", - onAction: o, - onSetup: gB(e, t), - }); - })(e); - }, - yB = (e) => (r(e) ? e.split(/[ ,]/) : e), - xB = (e) => (t) => t.options.get(e), - wB = xB("contextmenu_never_use_native"), - SB = xB("contextmenu_avoid_overlap"), - kB = (e) => { - const t = e.ui.registry.getAll().contextMenus, - o = e.options.get("contextmenu"); - return e.options.isSet("contextmenu") ? o : U(o, (e) => ve(t, e)); - }, - CB = (e, t) => ({ type: "makeshift", x: e, y: t }), - OB = (e) => "longpress" === e.type || 0 === e.type.indexOf("touch"), - _B = (e, t) => - "contextmenu" === t.type || "longpress" === t.type - ? e.inline - ? ((e) => { - if (OB(e)) { - const t = e.touches[0]; - return CB(t.pageX, t.pageY); - } - return CB(e.pageX, e.pageY); - })(t) - : ((e, t) => { - const o = rf.DOM.getPos(e); - return ((e, t, o) => CB(e.x + t, e.y + o))(t, o.x, o.y); - })( - e.getContentAreaContainer(), - ((e) => { - if (OB(e)) { - const t = e.touches[0]; - return CB(t.clientX, t.clientY); - } - return CB(e.clientX, e.clientY); - })(t), - ) - : TB(e), - TB = (e) => ({ type: "selection", root: Ve(e.selection.getNode()) }), - EB = (e, t, o) => { - switch (o) { - case "node": - return ((e) => ({ - type: "node", - node: A.some(Ve(e.selection.getNode())), - root: Ve(e.getBody()), - }))(e); - case "point": - return _B(e, t); - case "selection": - return TB(e); - } - }, - AB = (e, t, o, n, s, r) => { - const a = o(), - i = EB(e, t, r); - CO(a, pb.CLOSE_ON_EXECUTE, n, { - isHorizontalMenu: !1, - search: A.none(), - }).map((e) => { - t.preventDefault(), - Ph.showMenuAt( - s, - { anchor: i }, - { menu: { markers: Ab("normal") }, data: e }, - ); - }); - }, - MB = { - onLtr: () => [cl, sl, rl, al, il, ll, lT, cT, iT, rT, aT, sT], - onRtl: () => [cl, rl, sl, il, al, ll, lT, cT, aT, sT, iT, rT], - }, - DB = { - valignCentre: [], - alignCentre: [], - alignLeft: ["tox-pop--align-left"], - alignRight: ["tox-pop--align-right"], - right: ["tox-pop--right"], - left: ["tox-pop--left"], - bottom: ["tox-pop--bottom"], - top: ["tox-pop--top"], - }, - BB = (e, t, o, n, s, r) => { - const a = Do(), - i = a.os.isiOS(), - l = a.os.isMacOS(), - c = a.os.isAndroid(), - d = a.deviceType.isTouch(), - u = () => { - const a = o(); - ((e, t, o, n, s, r, a) => { - const i = ((e, t, o) => { - const n = EB(e, t, o); - return { - bubble: gc(0, "point" === o ? 12 : 0, DB), - layouts: MB, - overrides: { maxWidthFunction: VA(), maxHeightFunction: cc() }, - ...n, - }; - })(e, t, r); - CO(o, pb.CLOSE_ON_EXECUTE, n, { - isHorizontalMenu: !0, - search: A.none(), - }).map((o) => { - t.preventDefault(); - const l = a ? zh.HighlightMenuAndItem : zh.HighlightNone; - Ph.showMenuWithinBounds( - s, - { anchor: i }, - { - menu: { markers: Ab("normal"), highlightOnOpen: l }, - data: o, - type: "horizontal", - }, - () => - A.some(KD(e, n.shared, "node" === r ? "node" : "selection")), - ), - e.dispatch(GD); - }); - })(e, t, a, n, s, r, !(c || i || (l && d))); - }; - if ((l || i) && "node" !== r) { - const o = () => { - ((e) => { - const t = e.selection.getRng(), - o = () => { - Uh.setEditorTimeout( - e, - () => { - e.selection.setRng(t); - }, - 10, - ), - r(); - }; - e.once("touchend", o); - const n = (e) => { - e.preventDefault(), e.stopImmediatePropagation(); - }; - e.on("mousedown", n, !0); - const s = () => r(); - e.once("longpresscancel", s); - const r = () => { - e.off("touchend", o), - e.off("longpresscancel", s), - e.off("mousedown", n); - }; - })(e), - u(); - }; - ((e, t) => { - const o = e.selection; - if (o.isCollapsed() || t.touches.length < 1) return !1; - { - const n = t.touches[0], - s = o.getRng(); - return Jc(e.getWin(), Lc.domRange(s)).exists( - (e) => - e.left <= n.clientX && - e.right >= n.clientX && - e.top <= n.clientY && - e.bottom >= n.clientY, - ); - } - })(e, t) - ? o() - : (e.once("selectionchange", o), - e.once("touchend", () => e.off("selectionchange", o))); - } else u(); - }, - FB = (e) => (r(e) ? "|" === e : "separator" === e.type), - IB = { type: "separator" }, - RB = (e) => { - const t = (e) => ({ - text: e.text, - icon: e.icon, - enabled: e.enabled, - shortcut: e.shortcut, - }); - if (r(e)) return e; - switch (e.type) { - case "separator": - return IB; - case "submenu": - return { - type: "nestedmenuitem", - ...t(e), - getSubmenuItems: () => { - const t = e.getSubmenuItems(); - return r(t) ? t : H(t, RB); - }, - }; - default: - const o = e; - return { type: "menuitem", ...t(o), onAction: v(o.onAction) }; - } - }, - NB = (e, t) => { - if (0 === t.length) return e; - const o = ne(e) - .filter((e) => !FB(e)) - .fold( - () => [], - (e) => [IB], - ); - return e.concat(o).concat(t).concat([IB]); - }, - VB = (e, t) => - !((e) => "longpress" === e.type || ve(e, "touches"))(t) && - (2 !== t.button || (t.target === e.getBody() && "" === t.pointerType)), - zB = (e, t) => (VB(e, t) ? e.selection.getStart(!0) : t.target), - HB = (e, t, o) => { - const n = Do().deviceType.isTouch, - s = ri( - Ph.sketch({ - dom: { tag: "div" }, - lazySink: t, - onEscape: () => e.focus(), - onShow: () => o.setContextMenuState(!0), - onHide: () => o.setContextMenuState(!1), - fireDismissalEventInstead: {}, - inlineBehaviours: kl([ - Jp("dismissContextMenu", [ - Ur(Cr(), (t, o) => { - Xd.close(t), e.focus(); - }), - ]), - ]), - }), - ), - a = () => Ph.hide(s), - i = (t) => { - if ( - (wB(e) && t.preventDefault(), - ((e, t) => t.ctrlKey && !wB(e))(e, t) || - ((e) => 0 === kB(e).length)(e)) - ) - return; - const a = ((e, t) => { - const o = SB(e), - n = VB(e, t) ? "selection" : "point"; - if (De(o)) { - const s = zB(e, t); - return $w(Ve(s), o) ? "node" : n; - } - return n; - })(e, t); - (n() ? BB : AB)( - e, - t, - () => { - const o = zB(e, t), - n = e.ui.registry.getAll(), - s = kB(e); - return ((e, t, o) => { - const n = j( - t, - (t, n) => - be(e, n.toLowerCase()) - .map((e) => { - const n = e.update(o); - if (r(n) && De(Me(n))) return NB(t, n.split(" ")); - if (l(n) && n.length > 0) { - const e = H(n, RB); - return NB(t, e); - } - return t; - }) - .getOrThunk(() => t.concat([n])), - [], - ); - return n.length > 0 && FB(n[n.length - 1]) && n.pop(), n; - })(n.contextMenus, s, o); - }, - o, - s, - a, - ); - }; - e.on("init", () => { - const t = - "ResizeEditor ScrollContent ScrollWindow longpresscancel" + - (n() ? "" : " ResizeWindow"); - e.on(t, a), e.on("longpress contextmenu", i); - }); - }, - LB = As([ - { offset: ["x", "y"] }, - { absolute: ["x", "y"] }, - { fixed: ["x", "y"] }, - ]), - PB = (e) => (t) => t.translate(-e.left, -e.top), - UB = (e) => (t) => t.translate(e.left, e.top), - WB = (e) => (t, o) => j(e, (e, t) => t(e), $t(t, o)), - jB = (e, t, o) => e.fold(WB([UB(o), PB(t)]), WB([PB(t)]), WB([])), - GB = (e, t, o) => e.fold(WB([UB(o)]), WB([]), WB([UB(t)])), - $B = (e, t, o) => e.fold(WB([]), WB([PB(o)]), WB([UB(t), PB(o)])), - qB = (e, t, o) => { - const n = e.fold( - (e, t) => ({ - position: A.some("absolute"), - left: A.some(e + "px"), - top: A.some(t + "px"), - }), - (e, t) => ({ - position: A.some("absolute"), - left: A.some(e - o.left + "px"), - top: A.some(t - o.top + "px"), - }), - (e, t) => ({ - position: A.some("fixed"), - left: A.some(e + "px"), - top: A.some(t + "px"), - }), - ); - return { right: A.none(), bottom: A.none(), ...n }; - }, - XB = (e, t, o, n) => { - const s = (e, s) => (r, a) => { - const i = e(t, o, n); - return s(r.getOr(i.left), a.getOr(i.top)); - }; - return e.fold(s($B, YB), s(GB, KB), s(jB, JB)); - }, - YB = LB.offset, - KB = LB.absolute, - JB = LB.fixed, - ZB = (e, t) => { - const o = Ot(e, t); - return u(o) ? NaN : parseInt(o, 10); - }, - QB = (e, t, o, n, s, r) => { - const a = ((e, t, o, n) => - ((e, t) => { - const o = e.element, - n = ZB(o, t.leftAttr), - s = ZB(o, t.topAttr); - return isNaN(n) || isNaN(s) ? A.none() : A.some($t(n, s)); - })(e, t).fold( - () => o, - (e) => JB(e.left + n.left, e.top + n.top), - ))(e, t, o, n), - i = t.mustSnap ? tF(e, t, a, s, r) : oF(e, t, a, s, r), - l = jB(a, s, r); - return ( - ((e, t, o) => { - const n = e.element; - kt(n, t.leftAttr, o.left + "px"), kt(n, t.topAttr, o.top + "px"); - })(e, t, l), - i.fold( - () => ({ coord: JB(l.left, l.top), extra: A.none() }), - (e) => ({ coord: e.output, extra: e.extra }), - ) - ); - }, - eF = (e, t, o, n) => - re(e, (e) => { - const s = e.sensor, - r = ((e, t, o, n, s, r) => { - const a = GB(e, s, r), - i = GB(t, s, r); - return ( - Math.abs(a.left - i.left) <= o && Math.abs(a.top - i.top) <= n - ); - })(t, s, e.range.left, e.range.top, o, n); - return r - ? A.some({ output: XB(e.output, t, o, n), extra: e.extra }) - : A.none(); - }), - tF = (e, t, o, n, s) => { - const r = t.getSnapPoints(e); - return eF(r, o, n, s).orThunk(() => { - const e = j( - r, - (e, t) => { - const r = t.sensor, - a = ((e, t, o, n, s, r) => { - const a = GB(e, s, r), - i = GB(t, s, r), - l = Math.abs(a.left - i.left), - c = Math.abs(a.top - i.top); - return $t(l, c); - })(o, r, t.range.left, t.range.top, n, s); - return e.deltas.fold( - () => ({ deltas: A.some(a), snap: A.some(t) }), - (o) => - (a.left + a.top) / 2 <= (o.left + o.top) / 2 - ? { deltas: A.some(a), snap: A.some(t) } - : e, - ); - }, - { deltas: A.none(), snap: A.none() }, - ); - return e.snap.map((e) => ({ - output: XB(e.output, o, n, s), - extra: e.extra, - })); - }); - }, - oF = (e, t, o, n, s) => { - const r = t.getSnapPoints(e); - return eF(r, o, n, s); - }; - var nF = Object.freeze({ - __proto__: null, - snapTo: (e, t, o, n) => { - const s = t.getTarget(e.element); - if (t.repositionTarget) { - const t = et(e.element), - o = Uo(t), - r = wE(s), - a = ((e, t, o) => ({ - coord: XB(e.output, e.output, t, o), - extra: e.extra, - }))(n, o, r), - i = qB(a.coord, 0, r); - Ft(s, i); - } - }, - }); - const sF = "data-initial-z-index", - rF = (e, t) => { - e.getSystem().addToGui(t), - ((e) => { - st(e.element) - .filter(Ge) - .each((t) => { - Nt(t, "z-index").each((e) => { - kt(t, sF, e); - }), - Dt(t, "z-index", It(e.element, "z-index")); - }); - })(t); - }, - aF = (e) => { - ((e) => { - st(e.element) - .filter(Ge) - .each((e) => { - _t(e, sF).fold( - () => Ht(e, "z-index"), - (t) => Dt(e, "z-index", t), - ), - Et(e, sF); - }); - })(e), - e.getSystem().removeFromGui(e); - }, - iF = (e, t, o) => - e - .getSystem() - .build( - oS.sketch({ - dom: { - styles: { - left: "0px", - top: "0px", - width: "100%", - height: "100%", - position: "fixed", - "z-index": "1000000000000000", - }, - classes: [t], - }, - events: o, - }), - ); - var lF = vs("snaps", [ - os("getSnapPoints"), - Di("onSensor"), - os("leftAttr"), - os("topAttr"), - ys("lazyViewport", en), - ys("mustSnap", !1), - ]); - const cF = [ - ys("useFixed", T), - os("blockerClass"), - ys("getTarget", w), - ys("onDrag", b), - ys("repositionTarget", !0), - ys("onDrop", b), - Os("getBounds", en), - lF, - ], - dF = (e) => { - return ((t = Nt(e, "left")), - (o = Nt(e, "top")), - (n = Nt(e, "position")), - t.isSome() && o.isSome() && n.isSome() - ? A.some( - ((e, t, o) => - ("fixed" === o ? JB : YB)(parseInt(e, 10), parseInt(t, 10)))( - t.getOrDie(), - o.getOrDie(), - n.getOrDie(), - ), - ) - : A.none()).getOrThunk(() => { - const t = Xt(e); - return KB(t.left, t.top); - }); - var t, o, n; - }, - uF = (e, t) => ({ - bounds: e.getBounds(), - height: jt(t.element), - width: Zt(t.element), - }), - mF = (e, t, o, n, s) => { - const r = o.update(n, s), - a = o.getStartData().getOrThunk(() => uF(t, e)); - r.each((o) => { - ((e, t, o, n) => { - const s = t.getTarget(e.element); - if (t.repositionTarget) { - const r = et(e.element), - a = Uo(r), - i = wE(s), - l = dF(s), - c = ((e, t, o, n, s, r, a) => - ((e, t, o, n, s) => { - const r = s.bounds, - a = GB(t, o, n), - i = Yi(a.left, r.x, r.x + r.width - s.width), - l = Yi(a.top, r.y, r.y + r.height - s.height), - c = KB(i, l); - return t.fold( - () => { - const e = $B(c, o, n); - return YB(e.left, e.top); - }, - x(c), - () => { - const e = jB(c, o, n); - return JB(e.left, e.top); - }, - ); - })( - 0, - t.fold( - () => { - const e = - ((t = o), - (a = r.left), - (i = r.top), - t.fold( - (e, t) => YB(e + a, t + i), - (e, t) => KB(e + a, t + i), - (e, t) => JB(e + a, t + i), - )); - var t, a, i; - const l = jB(e, n, s); - return JB(l.left, l.top); - }, - (t) => { - const a = QB(e, t, o, r, n, s); - return ( - a.extra.each((o) => { - t.onSensor(e, o); - }), - a.coord - ); - }, - ), - n, - s, - a, - ))(e, t.snaps, l, a, i, n, o), - d = qB(c, 0, i); - Ft(s, d); - } - t.onDrag(e, s, n); - })(e, t, a, o); - }); - }, - gF = (e, t, o, n) => { - t.each(aF), - o.snaps.each((t) => { - ((e, t) => { - ((e, t) => { - const o = e.element; - Et(o, t.leftAttr), Et(o, t.topAttr); - })(e, t); - })(e, t); - }); - const s = o.getTarget(e.element); - n.reset(), o.onDrop(e, s); - }, - pF = (e) => (t, o) => { - const n = (e) => { - o.setStartData(uF(t, e)); - }; - return Hr([ - Ur(xr(), (e) => { - o.getStartData().each(() => n(e)); - }), - ...e(t, o, n), - ]); - }; - var hF = Object.freeze({ - __proto__: null, - getData: (e) => A.from($t(e.x, e.y)), - getDelta: (e, t) => $t(t.left - e.left, t.top - e.top), - }); - const fF = (e, t, o) => [ - Ur(Ws(), (n, s) => { - if (0 !== s.event.raw.button) return; - s.stop(); - const r = () => gF(n, A.some(l), e, t), - a = qw(r, 200), - i = { - drop: r, - delayDrop: a.schedule, - forceDrop: r, - move: (o) => { - a.cancel(), mF(n, e, t, hF, o); - }, - }, - l = iF( - n, - e.blockerClass, - ((e) => - Hr([ - Ur(Ws(), e.forceDrop), - Ur($s(), e.drop), - Ur(js(), (t, o) => { - e.move(o.event); - }), - Ur(Gs(), e.delayDrop), - ]))(i), - ); - o(n), rF(n, l); - }), - ], - bF = [...cF, Ri("dragger", { handlers: pF(fF) })]; - var vF = Object.freeze({ - __proto__: null, - getData: (e) => { - const t = e.raw.touches; - return 1 === t.length - ? ((e) => { - const t = e[0]; - return A.some($t(t.clientX, t.clientY)); - })(t) - : A.none(); - }, - getDelta: (e, t) => $t(t.left - e.left, t.top - e.top), - }); - const yF = (e, t, o) => { - const n = Ql(), - s = (o) => { - gF(o, n.get(), e, t), n.clear(); - }; - return [ - Ur(Hs(), (r, a) => { - a.stop(); - const i = () => s(r), - l = { - drop: i, - delayDrop: b, - forceDrop: i, - move: (o) => { - mF(r, e, t, vF, o); - }, - }, - c = iF( - r, - e.blockerClass, - ((e) => - Hr([ - Ur(Hs(), e.forceDrop), - Ur(Ps(), e.drop), - Ur(Us(), e.drop), - Ur(Ls(), (t, o) => { - e.move(o.event); - }), - ]))(l), - ); - n.set(c), o(r), rF(r, c); - }), - Ur(Ls(), (o, n) => { - n.stop(), mF(o, e, t, vF, n.event); - }), - Ur(Ps(), (e, t) => { - t.stop(), s(e); - }), - Ur(Us(), s), - ]; - }, - xF = bF, - wF = [...cF, Ri("dragger", { handlers: pF(yF) })], - SF = [ - ...cF, - Ri("dragger", { - handlers: pF((e, t, o) => [...fF(e, t, o), ...yF(e, t, o)]), - }), - ]; - var kF = Object.freeze({ - __proto__: null, - mouse: xF, - touch: wF, - mouseOrTouch: SF, - }), - CF = Object.freeze({ - __proto__: null, - init: () => { - let e = A.none(), - t = A.none(); - const o = x({}); - return _a({ - readState: o, - reset: () => { - (e = A.none()), (t = A.none()); - }, - update: (t, o) => - t.getData(o).bind((o) => - ((t, o) => { - const n = e.map((e) => t.getDelta(e, o)); - return (e = A.some(o)), n; - })(t, o), - ), - getStartData: () => t, - setStartData: (e) => { - t = A.some(e); - }, - }); - }, - }); - const OF = Tl({ - branchKey: "mode", - branches: kF, - name: "dragging", - active: { events: (e, t) => e.dragger.handlers(e, t) }, - extra: { - snap: (e) => ({ - sensor: e.sensor, - range: e.range, - output: e.output, - extra: A.from(e.extra), - }), - }, - state: CF, - apis: nF, - }), - _F = (e, t, o, n, s, r) => - e.fold( - () => - OF.snap({ - sensor: KB(o - 20, n - 20), - range: $t(s, r), - output: KB(A.some(o), A.some(n)), - extra: { td: t }, - }), - (e) => { - const s = o - 20, - r = n - 20, - a = e.element.dom.getBoundingClientRect(); - return OF.snap({ - sensor: KB(s, r), - range: $t(40, 40), - output: KB(A.some(o - a.width / 2), A.some(n - a.height / 2)), - extra: { td: t }, - }); - }, - ), - TF = (e, t, o) => ({ - getSnapPoints: e, - leftAttr: "data-drag-left", - topAttr: "data-drag-top", - onSensor: (e, n) => { - const s = n.td; - ((e, t) => e.exists((e) => Ze(e, t)))(t.get(), s) || (t.set(s), o(s)); - }, - mustSnap: !0, - }), - EF = (e) => - jh( - Wh.sketch({ - dom: { tag: "div", classes: ["tox-selector"] }, - buttonBehaviours: kl([ - OF.config({ - mode: "mouseOrTouch", - blockerClass: "blocker", - snaps: e, - }), - IS.config({}), - ]), - eventOrder: { - mousedown: ["dragging", "alloy.base.behaviour"], - touchstart: ["dragging", "alloy.base.behaviour"], - }, - }), - ), - AF = (e, t) => { - const o = Es([]), - n = Es([]), - s = Es(!1), - r = Ql(), - a = Ql(), - i = (e) => { - const o = Zo(e); - return _F(u.getOpt(t), e, o.x, o.y, o.width, o.height); - }, - l = (e) => { - const o = Zo(e); - return _F(m.getOpt(t), e, o.right, o.bottom, o.width, o.height); - }, - c = TF( - () => H(o.get(), (e) => i(e)), - r, - (t) => { - a.get().each((o) => { - e.dispatch("TableSelectorChange", { start: t, finish: o }); - }); - }, - ), - d = TF( - () => H(n.get(), (e) => l(e)), - a, - (t) => { - r.get().each((o) => { - e.dispatch("TableSelectorChange", { start: o, finish: t }); - }); - }, - ), - u = EF(c), - m = EF(d), - g = ri(u.asSpec()), - p = ri(m.asSpec()), - h = (t, o, n, s) => { - const r = n(o); - OF.snapTo(t, r), - ((t, o, n, r) => { - const a = o.dom.getBoundingClientRect(); - Ht(t.element, "display"); - const i = nt(Ve(e.getBody())).dom.innerHeight, - l = a[s] < 0, - c = ((e, t) => e[s] > t)(a, i); - (l || c) && Dt(t.element, "display", "none"); - })(t, o); - }, - f = (e) => h(g, e, i, "top"), - b = (e) => h(p, e, l, "bottom"); - Do().deviceType.isTouch() && - (e.on("TableSelectionChange", (e) => { - s.get() || (Ad(t, g), Ad(t, p), s.set(!0)), - r.set(e.start), - a.set(e.finish), - e.otherCells.each((t) => { - o.set(t.upOrLeftCells), - n.set(t.downOrRightCells), - f(e.start), - b(e.finish); - }); - }), - e.on("ResizeEditor ResizeWindow ScrollContent", () => { - r.get().each(f), a.get().each(b); - }), - e.on("TableSelectionClear", () => { - s.get() && (Bd(g), Bd(p), s.set(!1)), r.clear(), a.clear(); - })); - }, - MF = (e, t, o) => { - var n; - const s = null !== (n = t.delimiter) && void 0 !== n ? n : "\u203a"; - return { - dom: { - tag: "div", - classes: ["tox-statusbar__path"], - attributes: { role: "navigation" }, - }, - behaviours: kl([ - Pp.config({ mode: "flow", selector: "div[role=button]" }), - Rm.config({ disabled: o.isDisabled }), - Sy(), - cS.config({}), - Kp.config({}), - Jp("elementPathEvents", [ - Kr((t, n) => { - e.shortcuts.add("alt+F11", "focus statusbar elementpath", () => - Pp.focusIn(t), - ), - e.on("NodeChange", (n) => { - const r = ((t) => { - const o = []; - let n = t.length; - for (; n-- > 0; ) { - const r = t[n]; - if ( - 1 === r.nodeType && - "BR" !== (s = r).nodeName && - !s.getAttribute("data-mce-bogus") && - "bookmark" !== s.getAttribute("data-mce-type") - ) { - const t = hx(e, r); - if ( - (t.isDefaultPrevented() || - o.push({ name: t.name, element: r }), - t.isPropagationStopped()) - ) - break; - } - } - var s; - return o; - })(n.parents), - a = - r.length > 0 - ? j( - r, - (t, n, r) => { - const a = ((t, n, s) => - Wh.sketch({ - dom: { - tag: "div", - classes: ["tox-statusbar__path-item"], - attributes: { - "data-index": s, - "aria-level": s + 1, - }, - }, - components: [ti(t)], - action: (t) => { - e.focus(), - e.selection.select(n), - e.nodeChanged(); - }, - buttonBehaviours: kl([ - ky(o.isDisabled), - Sy(), - ]), - }))(n.name, n.element, r); - return 0 === r - ? t.concat([a]) - : t.concat([ - { - dom: { - tag: "div", - classes: [ - "tox-statusbar__path-divider", - ], - attributes: { "aria-hidden": !0 }, - }, - components: [ti(` ${s} `)], - }, - a, - ]); - }, - [], - ) - : []; - Kp.set(t, a); - }); - }), - ]), - ]), - components: [], - }; - }; - var DF; - !(function (e) { - (e[(e.None = 0)] = "None"), - (e[(e.Both = 1)] = "Both"), - (e[(e.Vertical = 2)] = "Vertical"); - })(DF || (DF = {})); - const BF = (e, t, o) => { - const n = Ve(e.getContainer()), - s = ((e, t, o, n, s) => { - const r = { height: zD(n + t.top, ff(e), vf(e)) }; - return o === DF.Both && (r.width = zD(s + t.left, hf(e), bf(e))), r; - })(e, t, o, Wt(n), Jt(n)); - le(s, (e, t) => { - h(e) && Dt(n, t, VD(e)); - }), - ((e) => { - e.dispatch("ResizeEditor"); - })(e); - }, - FF = (e, t, o, n) => { - const s = $t(20 * o, 20 * n); - return BF(e, s, t), A.some(!0); - }, - IF = (e, t) => { - const o = () => { - const o = [], - n = Xf(e), - s = Uf(e), - r = Wf(e) || e.hasPlugin("wordcount"); - return ( - s && o.push(MF(e, {}, t)), - n && - o.push( - (() => { - const e = Iy("Alt+0"); - return { - dom: { tag: "div", classes: ["tox-statusbar__help-text"] }, - components: [ti(Gh.translate(["Press {0} for help", e]))], - }; - })(), - ), - r && - o.push( - (() => { - const o = []; - return ( - e.hasPlugin("wordcount") && - o.push( - ((e, t) => { - const o = (e, o, n) => - Kp.set(e, [ti(t.translate(["{0} " + n, o[n]]))]); - return Wh.sketch({ - dom: { - tag: "button", - classes: ["tox-statusbar__wordcount"], - }, - components: [], - buttonBehaviours: kl([ - ky(t.isDisabled), - Sy(), - cS.config({}), - Kp.config({}), - pu.config({ - store: { - mode: "memory", - initialValue: { - mode: "words", - count: { words: 0, characters: 0 }, - }, - }, - }), - Jp("wordcount-events", [ - Qr((e) => { - const t = pu.getValue(e), - n = - "words" === t.mode ? "characters" : "words"; - pu.setValue(e, { mode: n, count: t.count }), - o(e, t.count, n); - }), - Kr((t) => { - e.on("wordCountUpdate", (e) => { - const { mode: n } = pu.getValue(t); - pu.setValue(t, { - mode: n, - count: e.wordCount, - }), - o(t, e.wordCount, n); - }); - }), - ]), - ]), - eventOrder: { - [ur()]: [ - "disabling", - "alloy.base.behaviour", - "wordcount-events", - ], - }, - }); - })(e, t), - ), - Wf(e) && - o.push({ - dom: { - tag: "span", - classes: ["tox-statusbar__branding"], - }, - components: [ - { - dom: { - tag: "a", - attributes: { - href: "https://www.tiny.cloud/powered-by-tiny?utm_campaign=editor_referral&utm_medium=poweredby&utm_source=tinymce&utm_content=v6", - rel: "noopener", - target: "_blank", - "aria-label": Gh.translate([ - "Powered by {0}", - "Tiny", - ]), - }, - innerHtml: - '\n \n\n'.trim(), - }, - behaviours: kl([oh.config({})]), - }, - ], - }), - { - dom: { - tag: "div", - classes: ["tox-statusbar__right-container"], - }, - components: o, - } - ); - })(), - ), - o.length > 0 - ? [ - { - dom: { - tag: "div", - classes: [ - "tox-statusbar__text-container", - ...(() => { - const e = "tox-statusbar__text-container--flex-start", - t = "tox-statusbar__text-container--flex-end"; - if (n) { - const o = "tox-statusbar__text-container-3-cols"; - return r || s - ? r && !s - ? [o, t] - : [o, e] - : [ - o, - "tox-statusbar__text-container--space-around", - ]; - } - return [r && !s ? t : e]; - })(), - ], - }, - components: o, - }, - ] - : [] - ); - }; - return { - dom: { tag: "div", classes: ["tox-statusbar"] }, - components: (() => { - const n = o(), - s = ((e, t) => { - const o = ((e) => { - const t = jf(e); - return !1 === t - ? DF.None - : "both" === t - ? DF.Both - : DF.Vertical; - })(e); - if (o === DF.None) return A.none(); - const n = - o === DF.Both - ? "Press the arrow keys to resize the editor." - : "Press the Up and Down arrow keys to resize the editor."; - return A.some( - ef( - "resize-handle", - { - tag: "div", - classes: ["tox-statusbar__resize-handle"], - attributes: { - title: t.translate("Resize"), - "aria-label": t.translate(n), - }, - behaviours: [ - OF.config({ - mode: "mouse", - repositionTarget: !1, - onDrag: (t, n, s) => BF(e, s, o), - blockerClass: "tox-blocker", - }), - Pp.config({ - mode: "special", - onLeft: () => FF(e, o, -1, 0), - onRight: () => FF(e, o, 1, 0), - onUp: () => FF(e, o, 0, -1), - onDown: () => FF(e, o, 0, 1), - }), - cS.config({}), - oh.config({}), - ], - }, - t.icons, - ), - ); - })(e, t); - return n.concat(s.toArray()); - })(), - }; - }, - RF = (e, t) => t.get().getOrDie(`UI for ${e} has not been rendered`), - NF = (e, t) => { - const o = e.inline, - n = o ? jD : RD, - s = ib(e) ? oA : yE, - r = (() => { - const e = Ql(), - t = Ql(), - o = Ql(); - return { - dialogUi: e, - popupUi: t, - mainUi: o, - getUiMotherships: () => { - const o = e.get().map((e) => e.mothership), - n = t.get().map((e) => e.mothership); - return o.fold( - () => n.toArray(), - (e) => - n.fold( - () => [e], - (t) => (Ze(e.element, t.element) ? [e] : [e, t]), - ), - ); - }, - lazyGetInOuterOrDie: (e, t) => () => - o - .get() - .bind((e) => t(e.outerContainer)) - .getOrDie(`Could not find ${e} element in OuterContainer`), - }; - })(), - a = Ql(), - i = Ql(), - l = Ql(), - c = Do().deviceType.isTouch() ? ["tox-platform-touch"] : [], - d = ob(e), - u = Cf(e), - m = jh({ dom: { tag: "div", classes: ["tox-anchorbar"] } }), - g = jh({ dom: { tag: "div", classes: ["tox-bottom-anchorbar"] } }), - p = () => - r.mainUi - .get() - .map((e) => e.outerContainer) - .bind(IM.getHeader), - h = r.lazyGetInOuterOrDie("anchor bar", m.getOpt), - f = r.lazyGetInOuterOrDie("bottom anchor bar", g.getOpt), - b = r.lazyGetInOuterOrDie("toolbar", IM.getToolbar), - v = r.lazyGetInOuterOrDie("throbber", IM.getThrobber), - y = ((e, t, o, n) => { - const s = Es(!1), - r = ((e) => { - const t = Es(ob(e) ? "bottom" : "top"); - return { - isPositionedAtTop: () => "top" === t.get(), - getDockingMode: t.get, - setDockingMode: t.set, - }; - })(t), - a = { - icons: () => t.ui.registry.getAll().icons, - menuItems: () => t.ui.registry.getAll().menuItems, - translate: Gh.translate, - isDisabled: () => t.mode.isReadOnly() || !t.ui.isEnabled(), - getOption: t.options.get, - }, - i = rE(t), - l = ((e) => { - const t = (t) => () => e.formatter.match(t), - o = (t) => () => { - const o = e.formatter.get(t); - return void 0 !== o - ? A.some({ - tag: - (o.length > 0 && (o[0].inline || o[0].block)) || - "div", - styles: e.dom.parseStyle(e.formatter.getCssText(t)), - }) - : A.none(); - }, - n = Es([]), - s = Es([]), - r = Es(!1); - return ( - e.on("PreInit", (s) => { - const r = BT(e), - a = IT(e, r, t, o); - n.set(a); - }), - e.on("addStyleModifications", (n) => { - const a = IT(e, n.items, t, o); - s.set(a), r.set(n.replace); - }), - { - getData: () => { - const e = r.get() ? [] : n.get(), - t = s.get(); - return e.concat(t); - }, - } - ); - })(t), - c = ((e) => ({ - colorPicker: kT(e), - hasCustomColors: CT(e), - getColors: OT(e), - getColorCols: _T(e), - }))(t), - d = ((e) => ({ isDraggableModal: TT(e) }))(t), - u = { - shared: { - providers: a, - anchors: ST(t, o, n, r.isPositionedAtTop), - header: r, - }, - urlinput: i, - styles: l, - colorinput: c, - dialog: d, - isContextMenuOpen: () => s.get(), - setContextMenuState: (e) => s.set(e), - }, - m = { - ...u, - shared: { - ...u.shared, - interpreter: (e) => K_(e, {}, m), - getSink: e.popup, - }, - }, - g = { - ...u, - shared: { - ...u.shared, - interpreter: (e) => K_(e, {}, g), - getSink: e.dialog, - }, - }; - return { popup: m, dialog: g }; - })( - { - popup: () => - sn.fromOption( - r.popupUi.get().map((e) => e.sink), - "(popup) UI has not been rendered", - ), - dialog: () => - sn.fromOption( - r.dialogUi.get().map((e) => e.sink), - "UI has not been rendered", - ), - }, - e, - h, - f, - ), - x = () => { - const t = (() => { - const t = { - attributes: { [yc]: d ? vc.BottomToTop : vc.TopToBottom }, - }, - o = IM.parts.menubar({ - dom: { tag: "div", classes: ["tox-menubar"] }, - backstage: y.popup, - onEscape: () => { - e.focus(); - }, - }), - n = IM.parts.toolbar({ - dom: { tag: "div", classes: ["tox-toolbar"] }, - getSink: y.popup.shared.getSink, - providers: y.popup.shared.providers, - onEscape: () => { - e.focus(); - }, - onToolbarToggled: (t) => { - ((e, t) => { - e.dispatch("ToggleToolbarDrawer", { state: t }); - })(e, t); - }, - type: u, - lazyToolbar: b, - lazyHeader: () => - p().getOrDie("Could not find header element"), - ...t, - }), - s = IM.parts["multiple-toolbar"]({ - dom: { tag: "div", classes: ["tox-toolbar-overlord"] }, - providers: y.popup.shared.providers, - onEscape: () => { - e.focus(); - }, - type: u, - }), - r = tb(e), - a = Qf(e), - i = Kf(e), - l = qf(e), - c = IM.parts.promotion({ - dom: { tag: "div", classes: ["tox-promotion"] }, - }), - g = r || a || i, - h = l ? [c, o] : [o]; - return IM.parts.header({ - dom: { - tag: "div", - classes: ["tox-editor-header"].concat( - g ? [] : ["tox-editor-header--empty"], - ), - ...t, - }, - components: q([ - i ? h : [], - r ? [s] : a ? [n] : [], - sb(e) ? [] : [m.asSpec()], - ]), - sticky: ib(e), - editor: e, - sharedBackstage: y.popup.shared, - }); - })(), - n = { - dom: { tag: "div", classes: ["tox-sidebar-wrap"] }, - components: [ - IM.parts.socket({ - dom: { tag: "div", classes: ["tox-edit-area"] }, - }), - IM.parts.sidebar({ - dom: { tag: "div", classes: ["tox-sidebar"] }, - }), - ], - }, - s = IM.parts.throbber({ - dom: { tag: "div", classes: ["tox-throbber"] }, - backstage: y.popup, - }), - r = IM.parts.viewWrapper({ backstage: y.popup }), - i = - Pf(e) && !o ? A.some(IF(e, y.popup.shared.providers)) : A.none(), - l = q([d ? [] : [t], o ? [] : [n], d ? [t] : []]), - h = IM.parts.editorContainer({ - components: q([l, o ? [] : [g.asSpec(), ...i.toArray()]]), - }), - f = ab(e), - v = { - role: "application", - ...(Gh.isRtl() ? { dir: "rtl" } : {}), - ...(f ? { "aria-hidden": "true" } : {}), - }, - x = ri( - IM.sketch({ - dom: { - tag: "div", - classes: ["tox", "tox-tinymce"] - .concat(o ? ["tox-tinymce-inline"] : []) - .concat(d ? ["tox-tinymce--toolbar-bottom"] : []) - .concat(c), - styles: { - visibility: "hidden", - ...(f ? { opacity: "0", border: "0" } : {}), - }, - attributes: v, - }, - components: [h, ...(o ? [] : [r]), s], - behaviours: kl([ - Sy(), - Rm.config({ disableClass: "tox-tinymce--disabled" }), - Pp.config({ - mode: "cyclic", - selector: - ".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a, .tox-statusbar__resize-handle", - }), - ]), - }), - ), - w = nS(x); - return a.set(w), { mothership: w, outerContainer: x }; - }, - w = (t) => { - const o = VD( - ((e) => { - const t = ((e) => { - const t = gf(e), - o = ff(e), - n = vf(e); - return ND(t).map((e) => zD(e, o, n)); - })(e); - return t.getOr(gf(e)); - })(e), - ), - n = VD(((e) => HD(e).getOr(pf(e)))(e)); - return ( - e.inline || - (zt("div", "width", n) && Dt(t.element, "width", n), - zt("div", "height", o) - ? Dt(t.element, "height", o) - : Dt(t.element, "height", "400px")), - o - ); - }; - return { - popups: { backstage: y.popup, getMothership: () => RF("popups", l) }, - dialogs: { backstage: y.dialog, getMothership: () => RF("dialogs", i) }, - renderUI: () => { - const o = x(), - a = (() => { - const t = rb(e), - o = Ze(xt(), t) && "grid" === It(t, "display"), - n = { - dom: { - tag: "div", - classes: [ - "tox", - "tox-silver-sink", - "tox-tinymce-aux", - ].concat(c), - attributes: { ...(Gh.isRtl() ? { dir: "rtl" } : {}) }, - }, - behaviours: kl([ - Sd.config({ useFixed: () => s.isDocked(p) }), - ]), - }, - r = { - dom: { styles: { width: document.body.clientWidth + "px" } }, - events: Hr([ - Ur(wr(), (e) => { - Dt(e.element, "width", document.body.clientWidth + "px"); - }), - ]), - }, - a = ri(fn(n, o ? r : {})), - l = nS(a); - return i.set(l), { sink: a, mothership: l }; - })(), - d = lb(e) - ? (() => { - const e = { - dom: { - tag: "div", - classes: [ - "tox", - "tox-silver-sink", - "tox-silver-popup-sink", - "tox-tinymce-aux", - ].concat(c), - attributes: { ...(Gh.isRtl() ? { dir: "rtl" } : {}) }, - }, - behaviours: kl([ - Sd.config({ - useFixed: () => s.isDocked(p), - getBounds: () => t.getPopupSinkBounds(), - }), - ]), - }, - o = ri(e), - n = nS(o); - return l.set(n), { sink: o, mothership: n }; - })() - : ((e) => (l.set(e.mothership), e))(a); - r.dialogUi.set(a), r.popupUi.set(d), r.mainUi.set(o); - return ((t) => { - const { mainUi: o, popupUi: r, uiMotherships: a } = t; - ce(Of(e), (t, o) => { - e.ui.registry.addGroupToolbarButton(o, t); - }); - const { - buttons: i, - menuItems: l, - contextToolbars: c, - sidebars: d, - views: m, - } = e.ui.registry.getAll(), - g = eb(e), - h = { - menuItems: l, - menus: cb(e), - menubar: Df(e), - toolbar: g.getOrThunk(() => Bf(e)), - allowToolbarGroups: u === nf.floating, - buttons: i, - sidebar: d, - views: m, - }; - var f; - (f = o.outerContainer), - e.addShortcut("alt+F9", "focus menubar", () => { - IM.focusMenubar(f); - }), - e.addShortcut("alt+F10", "focus toolbar", () => { - IM.focusToolbar(f); - }), - e.addCommand("ToggleToolbarDrawer", (e, t) => { - (null == t ? void 0 : t.skipFocus) - ? IM.toggleToolbarDrawerWithoutFocusing(f) - : IM.toggleToolbarDrawer(f); - }), - e.addQueryStateHandler("ToggleToolbarDrawer", () => - IM.isToolbarDrawerToggled(f), - ), - ((e, t, o) => { - const n = (e, n) => { - L([t, ...o], (t) => { - t.broadcastEvent(e, n); - }); - }, - s = (e, n) => { - L([t, ...o], (t) => { - t.broadcastOn([e], n); - }); - }, - r = (e) => s(Yd(), { target: e.target }), - a = $o(), - i = tc(a, "touchstart", r), - l = tc(a, "touchmove", (e) => n(vr(), e)), - c = tc(a, "touchend", (e) => n(yr(), e)), - d = tc(a, "mousedown", r), - u = tc(a, "mouseup", (e) => { - 0 === e.raw.button && s(Jd(), { target: e.target }); - }), - m = (e) => s(Yd(), { target: Ve(e.target) }), - g = (e) => { - 0 === e.button && s(Jd(), { target: Ve(e.target) }); - }, - p = () => { - L(e.editorManager.get(), (t) => { - e !== t && - t.dispatch("DismissPopups", { relatedTarget: e }); - }); - }, - h = (e) => n(xr(), nc(e)), - f = (e) => { - s(Kd(), {}), n(wr(), nc(e)); - }, - b = ht(Ve(e.getElement())), - v = oc(b, "scroll", (o) => { - requestAnimationFrame(() => { - if (null != e.getContainer()) { - const s = jw(e, t.element) - .map((e) => [e.element, ...e.others]) - .getOr([]); - N(s, (e) => Ze(e, o.target)) && - (e.dispatch("ElementScroll", { - target: o.target.dom, - }), - n(Er(), o)); - } - }); - }), - y = () => s(Kd(), {}), - x = (t) => { - t.state && s(Yd(), { target: Ve(e.getContainer()) }); - }, - w = (e) => { - s(Yd(), { target: Ve(e.relatedTarget.getContainer()) }); - }; - e.on("PostRender", () => { - e.on("click", m), - e.on("tap", m), - e.on("mouseup", g), - e.on("mousedown", p), - e.on("ScrollWindow", h), - e.on("ResizeWindow", f), - e.on("ResizeEditor", y), - e.on("AfterProgressState", x), - e.on("DismissPopups", w); - }), - e.on("remove", () => { - e.off("click", m), - e.off("tap", m), - e.off("mouseup", g), - e.off("mousedown", p), - e.off("ScrollWindow", h), - e.off("ResizeWindow", f), - e.off("ResizeEditor", y), - e.off("AfterProgressState", x), - e.off("DismissPopups", w), - d.unbind(), - i.unbind(), - l.unbind(), - c.unbind(), - u.unbind(), - v.unbind(); - }), - e.on("detach", () => { - L([t, ...o], Vd), L([t, ...o], (e) => e.destroy()); - }); - })(e, o.mothership, a), - s.setup(e, y.popup.shared, p), - vB(e, y.popup), - HB(e, y.popup.shared.getSink, y.popup), - ((e) => { - const { sidebars: t } = e.ui.registry.getAll(); - L(ae(t), (o) => { - const n = t[o], - s = () => - xe(A.from(e.queryCommandValue("ToggleSidebar")), o); - e.ui.registry.addToggleButton(o, { - icon: n.icon, - tooltip: n.tooltip, - onAction: (t) => { - e.execCommand("ToggleSidebar", !1, o), t.setActive(s()); - }, - onSetup: (t) => { - t.setActive(s()); - const o = () => t.setActive(s()); - return ( - e.on("ToggleSidebar", o), - () => { - e.off("ToggleSidebar", o); - } - ); - }, - }); - }); - })(e), - EA(e, v, y.popup.shared), - cB(e, c, r.sink, { backstage: y.popup }), - AF(e, r.sink); - const b = { - targetNode: e.getElement(), - height: w(o.outerContainer), - }; - return n.render(e, t, h, y.popup, b); - })({ - popupUi: d, - dialogUi: a, - mainUi: o, - uiMotherships: r.getUiMotherships(), - }); - }, - }; - }, - VF = x([ - os("lazySink"), - us("dragBlockClass"), - Os("getBounds", en), - ys("useTabstopAt", E), - ys("firstTabstop", 0), - ys("eventOrder", {}), - hu("modalBehaviours", [Pp]), - Bi("onExecute"), - Ii("onEscape"), - ]), - zF = { sketch: w }, - HF = x([ - ju({ - name: "draghandle", - overrides: (e, t) => ({ - behaviours: kl([ - OF.config({ - mode: "mouse", - getTarget: (e) => mi(e, '[role="dialog"]').getOr(e), - blockerClass: e.dragBlockClass.getOrDie( - new Error( - "The drag blocker class was not specified for a dialog with a drag handle: \n" + - JSON.stringify(t, null, 2), - ).message, - ), - getBounds: e.getDragBounds, - }), - ]), - }), - }), - Uu({ schema: [os("dom")], name: "title" }), - Uu({ factory: zF, schema: [os("dom")], name: "close" }), - Uu({ factory: zF, schema: [os("dom")], name: "body" }), - ju({ factory: zF, schema: [os("dom")], name: "footer" }), - Wu({ - factory: { - sketch: (e, t) => ({ ...e, dom: t.dom, components: t.components }), - }, - schema: [ - ys("dom", { - tag: "div", - styles: { - position: "fixed", - left: "0px", - top: "0px", - right: "0px", - bottom: "0px", - }, - }), - ys("components", []), - ], - name: "blocker", - }), - ]), - LF = bm({ - name: "ModalDialog", - configFields: VF(), - partFields: HF(), - factory: (e, t, o, n) => { - const s = Ql(), - r = la("modal-events"), - a = { - ...e.eventOrder, - [Sr()]: [r].concat(e.eventOrder["alloy.system.attached"] || []), - }; - return { - uid: e.uid, - dom: e.dom, - components: t, - apis: { - show: (t) => { - s.set(t); - const o = e.lazySink(t).getOrDie(), - r = n.blocker(), - a = o.getSystem().build({ - ...r, - components: r.components.concat([ai(t)]), - behaviours: kl([ - oh.config({}), - Jp("dialog-blocker-events", [ - Yr(Xs(), () => { - OA.isBlocked(t) || Pp.focusIn(t); - }), - ]), - ]), - }); - Ad(o, a), Pp.focusIn(t); - }, - hide: (e) => { - s.clear(), - st(e.element).each((t) => { - e.getSystem() - .getByDom(t) - .each((e) => { - Bd(e); - }); - }); - }, - getBody: (t) => nm(t, e, "body"), - getFooter: (t) => om(t, e, "footer"), - setIdle: (e) => { - OA.unblock(e); - }, - setBusy: (e, t) => { - OA.block(e, t); - }, - }, - eventOrder: a, - domModification: { - attributes: { role: "dialog", "aria-modal": "true" }, - }, - behaviours: bu(e.modalBehaviours, [ - Kp.config({}), - Pp.config({ - mode: "cyclic", - onEnter: e.onExecute, - onEscape: e.onEscape, - useTabstopAt: e.useTabstopAt, - firstTabstop: e.firstTabstop, - }), - OA.config({ getRoot: s.get }), - Jp(r, [ - Kr((t) => { - ((e, t) => { - const o = _t(e, "id").fold(() => { - const e = la("dialog-label"); - return kt(t, "id", e), e; - }, w); - kt(e, "aria-labelledby", o); - })(t.element, nm(t, e, "title").element); - }), - ]), - ]), - }; - }, - apis: { - show: (e, t) => { - e.show(t); - }, - hide: (e, t) => { - e.hide(t); - }, - getBody: (e, t) => e.getBody(t), - getFooter: (e, t) => e.getFooter(t), - setBusy: (e, t, o) => { - e.setBusy(t, o); - }, - setIdle: (e, t) => { - e.setIdle(t); - }, - }, - }), - PF = Dn([tv, ov].concat(Jv)), - UF = Ln, - WF = [ - Ev("button"), - hv, - ks("align", "end", ["start", "end"]), - kv, - Sv, - hs("buttonType", ["primary", "secondary"]), - ], - jF = [...WF, sv], - GF = [as("type", ["submit", "cancel", "custom"]), ...jF], - $F = [as("type", ["menu"]), pv, fv, hv, ds("items", PF), ...WF], - qF = [ - ...WF, - as("type", ["togglebutton"]), - rs("tooltip"), - hv, - pv, - Cs("active", !1), - ], - XF = Jn("type", { - submit: GF, - cancel: GF, - custom: GF, - menu: $F, - togglebutton: qF, - }), - YF = [ - tv, - sv, - as("level", ["info", "warn", "error", "success"]), - av, - ys("url", ""), - ], - KF = Dn(YF), - JF = [ - tv, - sv, - Sv, - Ev("button"), - hv, - wv, - hs("buttonType", ["primary", "secondary", "toolbar"]), - kv, - ], - ZF = Dn(JF), - QF = [tv, ov], - eI = QF.concat([bv]), - tI = QF.concat([nv, Sv]), - oI = Dn(tI), - nI = Ln, - sI = eI.concat([Cv("auto")]), - rI = Dn(sI), - aI = Rn([iv, sv, av]), - iI = eI.concat([Ss("storageKey", "default")]), - lI = Dn(iI), - cI = Hn, - dI = Dn(eI), - uI = Hn, - mI = QF.concat([ - Ss("tag", "textarea"), - rs("scriptId"), - rs("scriptUrl"), - xs("settings", void 0, Wn), - ]), - gI = QF.concat([Ss("tag", "textarea"), is("init")]), - pI = Gn((e) => - qn("customeditor.old", Mn(gI), e).orThunk(() => - qn("customeditor.new", Mn(mI), e), - ), - ), - hI = Hn, - fI = Dn(eI), - bI = Bn(On), - vI = (e) => [tv, ss("columns"), e], - yI = [ - tv, - rs("html"), - ks("presets", "presentation", ["presentation", "document"]), - ], - xI = Dn(yI), - wI = eI.concat([ - Cs("border", !1), - Cs("sandboxed", !0), - Cs("streamContent", !1), - Cs("transparent", !0), - ]), - SI = Dn(wI), - kI = Hn, - CI = Dn(QF.concat([ps("height")])), - OI = Dn([rs("url"), gs("zoom"), gs("cachedWidth"), gs("cachedHeight")]), - _I = eI.concat([ - ps("inputMode"), - ps("placeholder"), - Cs("maximized", !1), - Sv, - ]), - TI = Dn(_I), - EI = Hn, - AI = (e) => [tv, nv, e, ks("align", "start", ["start", "center", "end"])], - MI = [sv, iv], - DI = [ - sv, - ds( - "items", - Zn(0, () => BI), - ), - ], - BI = Fn([Dn(MI), Dn(DI)]), - FI = eI.concat([ds("items", BI), Sv]), - II = Dn(FI), - RI = Hn, - NI = eI.concat([cs("items", [sv, iv]), ws("size", 1), Sv]), - VI = Dn(NI), - zI = Hn, - HI = eI.concat([Cs("constrain", !0), Sv]), - LI = Dn(HI), - PI = Dn([rs("width"), rs("height")]), - UI = QF.concat([nv, ws("min", 0), ws("max", 0)]), - WI = Dn(UI), - jI = zn, - GI = [tv, ds("header", Hn), ds("cells", Bn(Hn))], - $I = Dn(GI), - qI = eI.concat([ps("placeholder"), Cs("maximized", !1), Sv]), - XI = Dn(qI), - YI = Hn, - KI = [as("type", ["directory", "leaf"]), rv, rs("id"), ms("menu", rA)], - JI = Dn(KI), - ZI = KI.concat([ - ds( - "children", - Zn(0, () => jn("type", { directory: QI, leaf: JI })), - ), - ]), - QI = Dn(ZI), - eR = jn("type", { directory: QI, leaf: JI }), - tR = [ - tv, - ds("items", eR), - fs("onLeafAction"), - fs("onToggleExpand"), - _s("defaultExpandedIds", [], Hn), - ps("defaultSelectedId"), - ], - oR = Dn(tR), - nR = eI.concat([ks("filetype", "file", ["image", "media", "file"]), Sv]), - sR = Dn(nR), - rR = Dn([iv, Ov]), - aR = (e) => - Qn( - "items", - "items", - { tag: "required", process: {} }, - Bn( - Gn((t) => - qn(`Checking item of ${e}`, iR, t).fold( - (e) => sn.error(Kn(e)), - (e) => sn.value(e), - ), - ), - ), - ), - iR = En(() => { - return jn("type", { - alertbanner: KF, - bar: Dn(((e = aR("bar")), [tv, e])), - button: ZF, - checkbox: oI, - colorinput: lI, - colorpicker: dI, - dropzone: fI, - grid: Dn(vI(aR("grid"))), - iframe: SI, - input: TI, - listbox: II, - selectbox: VI, - sizeinput: LI, - slider: WI, - textarea: XI, - urlinput: sR, - customeditor: pI, - htmlpanel: xI, - imagepreview: CI, - collection: rI, - label: Dn(AI(aR("label"))), - table: $I, - tree: oR, - panel: cR, - }); - var e; - }), - lR = [tv, ys("classes", []), ds("items", iR)], - cR = Dn(lR), - dR = [Ev("tab"), rv, ds("items", iR)], - uR = [tv, cs("tabs", dR)], - mR = Dn(uR), - gR = jF, - pR = XF, - hR = Dn([ - rs("title"), - ns("body", jn("type", { panel: cR, tabpanel: mR })), - Ss("size", "normal"), - _s("buttons", [], pR), - ys("initialData", {}), - Os("onAction", b), - Os("onChange", b), - Os("onSubmit", b), - Os("onClose", b), - Os("onCancel", b), - Os("onTabChange", b), - ]), - fR = Dn([as("type", ["cancel", "custom"]), ...gR]), - bR = Dn([ - rs("title"), - rs("url"), - gs("height"), - gs("width"), - bs("buttons", fR), - Os("onAction", b), - Os("onCancel", b), - Os("onClose", b), - Os("onMessage", b), - ]), - vR = (e) => (a(e) ? [e].concat(X(fe(e), vR)) : l(e) ? X(e, vR) : []), - yR = (e) => r(e.type) && r(e.name), - xR = { - checkbox: nI, - colorinput: cI, - colorpicker: uI, - dropzone: bI, - input: EI, - iframe: kI, - imagepreview: OI, - selectbox: zI, - sizeinput: PI, - slider: jI, - listbox: RI, - size: PI, - textarea: YI, - urlinput: rR, - customeditor: hI, - collection: aI, - togglemenuitem: UF, - }, - wR = (e) => { - const t = ((e) => U(vR(e), yR))(e), - o = X(t, (e) => - ((e) => A.from(xR[e.type]))(e).fold( - () => [], - (t) => [ns(e.name, t)], - ), - ); - return Dn(o); - }, - SR = (e) => { - var t; - return { - internalDialog: Xn(qn("dialog", hR, e)), - dataValidator: wR(e), - initialData: null !== (t = e.initialData) && void 0 !== t ? t : {}, - }; - }, - kR = { - open: (e, t) => { - const o = SR(t); - return e(o.internalDialog, o.initialData, o.dataValidator); - }, - openUrl: (e, t) => e(Xn(qn("dialog", bR, t))), - redial: (e) => SR(e), - }; - var CR = Object.freeze({ - __proto__: null, - events: (e, t) => { - const o = (o, n) => { - e.updateState.each((e) => { - const s = e(o, n); - t.set(s); - }), - e.renderComponents.each((s) => { - const r = s(n, t.get()); - (e.reuseDom ? Wp : Up)(o, r); - }); - }; - return Hr([ - Ur(dr(), (t, n) => { - const s = n; - if (!s.universal) { - const n = e.channel; - R(s.channels, n) && o(t, s.data); - } - }), - Kr((t, n) => { - e.initialData.each((e) => { - o(t, e); - }); - }), - ]); - }, - }), - OR = Object.freeze({ __proto__: null, getState: (e, t, o) => o }), - _R = [ - os("channel"), - us("renderComponents"), - us("updateState"), - us("initialData"), - Cs("reuseDom", !0), - ]; - const TR = Ol({ - fields: _R, - name: "reflecting", - active: CR, - apis: OR, - state: Object.freeze({ - __proto__: null, - init: () => { - const e = Es(A.none()); - return { - readState: () => e.get().getOr("none"), - get: e.get, - set: e.set, - clear: () => e.set(A.none()), - }; - }, - }), - }), - ER = (e) => { - const t = [], - o = {}; - return ( - le(e, (e, n) => { - e.fold( - () => { - t.push(n); - }, - (e) => { - o[n] = e; - }, - ); - }), - t.length > 0 ? sn.error(t) : sn.value(o) - ); - }, - AR = (e, t, o) => { - const n = jh( - CC.sketch((n) => ({ - dom: { tag: "div", classes: ["tox-form"].concat(e.classes) }, - components: H(e.items, (e) => X_(n, e, t, o)), - })), - ); - return { - dom: { tag: "div", classes: ["tox-dialog__body"] }, - components: [ - { - dom: { tag: "div", classes: ["tox-dialog__body-content"] }, - components: [n.asSpec()], - }, - ], - behaviours: kl([ - Pp.config({ mode: "acyclic", useTabstopAt: C(XC) }), - ((s = n), wm.config({ find: s.getOpt })), - IC(n, { - postprocess: (e) => ER(e).fold((e) => (console.error(e), {}), w), - }), - Jp("dialog-body-panel", [ - Ur(Xs(), (e, t) => { - e.getSystem().broadcastOn([eO], { - newFocus: A.some(t.event.target), - }); - }), - ]), - ]), - }; - var s; - }, - MR = fm({ - name: "TabButton", - configFields: [ - ys("uid", void 0), - os("value"), - Qn( - "dom", - "dom", - xn(() => ({ - attributes: { - role: "tab", - id: la("aria"), - "aria-selected": "false", - }, - })), - Nn(), - ), - us("action"), - ys("domModification", {}), - hu("tabButtonBehaviours", [oh, Pp, pu]), - os("view"), - ], - factory: (e, t) => ({ - uid: e.uid, - dom: e.dom, - components: e.components, - events: mh(e.action), - behaviours: bu(e.tabButtonBehaviours, [ - oh.config({}), - Pp.config({ mode: "execution", useSpace: !0, useEnter: !0 }), - pu.config({ store: { mode: "memory", initialValue: e.value } }), - ]), - domModification: e.domModification, - }), - }), - DR = x([ - os("tabs"), - os("dom"), - ys("clickToDismiss", !1), - hu("tabbarBehaviours", [Gm, Pp]), - Ai(["tabClass", "selectedClass"]), - ]), - BR = Gu({ - factory: MR, - name: "tabs", - unit: "tab", - overrides: (e) => { - const t = (e, t) => { - Gm.dehighlight(e, t), Ir(e, Mr(), { tabbar: e, button: t }); - }, - o = (e, t) => { - Gm.highlight(e, t), Ir(e, Ar(), { tabbar: e, button: t }); - }; - return { - action: (n) => { - const s = n.getSystem().getByUid(e.uid).getOrDie(), - r = Gm.isHighlighted(s, n); - (r && e.clickToDismiss ? t : r ? b : o)(s, n); - }, - domModification: { classes: [e.markers.tabClass] }, - }; - }, - }), - FR = x([BR]), - IR = bm({ - name: "Tabbar", - configFields: DR(), - partFields: FR(), - factory: (e, t, o, n) => ({ - uid: e.uid, - dom: e.dom, - components: t, - "debug.sketcher": "Tabbar", - domModification: { attributes: { role: "tablist" } }, - behaviours: bu(e.tabbarBehaviours, [ - Gm.config({ - highlightClass: e.markers.selectedClass, - itemClass: e.markers.tabClass, - onHighlight: (e, t) => { - kt(t.element, "aria-selected", "true"); - }, - onDehighlight: (e, t) => { - kt(t.element, "aria-selected", "false"); - }, - }), - Pp.config({ - mode: "flow", - getInitial: (e) => Gm.getHighlighted(e).map((e) => e.element), - selector: "." + e.markers.tabClass, - executeOnMove: !0, - }), - ]), - }), - }), - RR = fm({ - name: "Tabview", - configFields: [hu("tabviewBehaviours", [Kp])], - factory: (e, t) => ({ - uid: e.uid, - dom: e.dom, - behaviours: bu(e.tabviewBehaviours, [Kp.config({})]), - domModification: { attributes: { role: "tabpanel" } }, - }), - }), - NR = x([ - ys("selectFirst", !0), - Di("onChangeTab"), - Di("onDismissTab"), - ys("tabs", []), - hu("tabSectionBehaviours", []), - ]), - VR = Uu({ - factory: IR, - schema: [os("dom"), ls("markers", [os("tabClass"), os("selectedClass")])], - name: "tabbar", - defaults: (e) => ({ tabs: e.tabs }), - }), - zR = Uu({ factory: RR, name: "tabview" }), - HR = x([VR, zR]), - LR = bm({ - name: "TabSection", - configFields: NR(), - partFields: HR(), - factory: (e, t, o, n) => { - const s = (t, o) => { - om(t, e, "tabbar").each((e) => { - o(e).each(Rr); - }); - }; - return { - uid: e.uid, - dom: e.dom, - components: t, - behaviours: fu(e.tabSectionBehaviours), - events: Hr( - q([ - e.selectFirst - ? [ - Kr((e, t) => { - s(e, Gm.getFirst); - }), - ] - : [], - [ - Ur(Ar(), (t, o) => { - ((t) => { - const o = pu.getValue(t); - om(t, e, "tabview").each((n) => { - G(e.tabs, (e) => e.value === o).each((o) => { - const s = o.view(); - _t(t.element, "id").each((e) => { - kt(n.element, "aria-labelledby", e); - }), - Kp.set(n, s), - e.onChangeTab(n, t, s); - }); - }); - })(o.event.button); - }), - Ur(Mr(), (t, o) => { - const n = o.event.button; - e.onDismissTab(t, n); - }), - ], - ]), - ), - apis: { - getViewItems: (t) => - om(t, e, "tabview") - .map((e) => Kp.contents(e)) - .getOr([]), - showTab: (e, t) => { - s(e, (e) => { - const o = Gm.getCandidates(e); - return G(o, (e) => pu.getValue(e) === t).filter( - (t) => !Gm.isHighlighted(e, t), - ); - }); - }, - }, - }; - }, - apis: { - getViewItems: (e, t) => e.getViewItems(t), - showTab: (e, t, o) => { - e.showTab(t, o); - }, - }, - }), - PR = (e, t) => { - Dt(e, "height", t + "px"), Dt(e, "flex-basis", t + "px"); - }, - UR = (e, t, o) => { - mi(e, '[role="dialog"]').each((e) => { - pi(e, '[role="tablist"]').each((n) => { - o.get() - .map( - (o) => ( - Dt(t, "height", "0"), - Dt(t, "flex-basis", "0"), - Math.min( - o, - ((e, t, o) => { - const n = ot(e).dom, - s = mi(e, ".tox-dialog-wrap").getOr(e); - let r; - r = - "fixed" === It(s, "position") - ? Math.max(n.clientHeight, window.innerHeight) - : Math.max(n.offsetHeight, n.scrollHeight); - const a = Wt(t), - i = - t.dom.offsetLeft >= o.dom.offsetLeft + Jt(o) - ? Math.max(Wt(o), a) - : a, - l = parseInt(It(e, "margin-top"), 10) || 0, - c = parseInt(It(e, "margin-bottom"), 10) || 0; - return r - (Wt(e) + l + c - i); - })(e, t, n), - ) - ), - ) - .each((e) => { - PR(t, e); - }); - }); - }); - }, - WR = (e) => pi(e, '[role="tabpanel"]'), - jR = "send-data-to-section", - GR = "send-data-to-view", - $R = (e, t, o) => { - const n = Es({}), - s = (e) => { - const t = pu.getValue(e), - o = ER(t).getOr({}), - s = n.get(), - r = fn(s, o); - n.set(r); - }, - r = (e) => { - const t = n.get(); - pu.setValue(e, t); - }, - a = Es(null), - i = H(e.tabs, (e) => ({ - value: e.name, - dom: { tag: "div", classes: ["tox-dialog__body-nav-item"] }, - components: [ti(o.shared.providers.translate(e.title))], - view: () => [ - CC.sketch((n) => ({ - dom: { tag: "div", classes: ["tox-form"] }, - components: H(e.items, (e) => X_(n, e, t, o)), - formBehaviours: kl([ - Pp.config({ mode: "acyclic", useTabstopAt: C(XC) }), - Jp("TabView.form.events", [Kr(r), Jr(s)]), - Al.config({ - channels: Ds([ - { key: jR, value: { onReceive: s } }, - { key: GR, value: { onReceive: r } }, - ]), - }), - ]), - })), - ], - })), - l = ((e) => { - const t = Ql(), - o = [ - Kr((o) => { - const n = o.element; - WR(n).each((s) => { - Dt(s, "visibility", "hidden"), - o - .getSystem() - .getByDom(s) - .toOptional() - .each((o) => { - const n = ((e, t, o) => - H(e, (n, s) => { - Kp.set(o, e[s].view()); - const r = t.dom.getBoundingClientRect(); - return Kp.set(o, []), r.height; - }))(e, s, o), - r = ((e) => - oe(ee(e, (e, t) => (e > t ? -1 : e < t ? 1 : 0))))( - n, - ); - r.fold(t.clear, t.set); - }), - UR(n, s, t), - Ht(s, "visibility"), - ((e, t) => { - oe(e).each((e) => LR.showTab(t, e.value)); - })(e, o), - requestAnimationFrame(() => { - UR(n, s, t); - }); - }); - }), - Ur(wr(), (e) => { - const o = e.element; - WR(o).each((e) => { - UR(o, e, t); - }); - }), - Ur(kS, (e, o) => { - const n = e.element; - WR(n).each((e) => { - const o = Il(ht(e)); - Dt(e, "visibility", "hidden"); - const s = Nt(e, "height").map((e) => parseInt(e, 10)); - Ht(e, "height"), Ht(e, "flex-basis"); - const r = e.dom.getBoundingClientRect().height; - s.forall((e) => r > e) - ? (t.set(r), UR(n, e, t)) - : s.each((t) => { - PR(e, t); - }), - Ht(e, "visibility"), - o.each(Dl); - }); - }), - ]; - return { extraEvents: o, selectFirst: !1 }; - })(i); - return LR.sketch({ - dom: { tag: "div", classes: ["tox-dialog__body"] }, - onChangeTab: (e, t, o) => { - const n = pu.getValue(t); - Ir(e, SS, { name: n, oldName: a.get() }), a.set(n); - }, - tabs: i, - components: [ - LR.parts.tabbar({ - dom: { tag: "div", classes: ["tox-dialog__body-nav"] }, - components: [IR.parts.tabs({})], - markers: { - tabClass: "tox-tab", - selectedClass: "tox-dialog__body-nav-item--active", - }, - tabbarBehaviours: kl([cS.config({})]), - }), - LR.parts.tabview({ - dom: { tag: "div", classes: ["tox-dialog__body-content"] }, - }), - ], - selectFirst: l.selectFirst, - tabSectionBehaviours: kl([ - Jp("tabpanel", l.extraEvents), - Pp.config({ mode: "acyclic" }), - wm.config({ find: (e) => oe(LR.getViewItems(e)) }), - RC( - A.none(), - (e) => (e.getSystem().broadcastOn([jR], {}), n.get()), - (e, t) => { - n.set(t), e.getSystem().broadcastOn([GR], {}); - }, - ), - ]), - }); - }, - qR = (e, t, o, n, s) => ({ - dom: { - tag: "div", - classes: ["tox-dialog__content-js"], - attributes: { - ...o.map((e) => ({ id: e })).getOr({}), - ...(s ? { "aria-live": "polite" } : {}), - }, - }, - components: [], - behaviours: kl([ - BC(0), - TR.config({ - channel: `${JC}-${t}`, - updateState: (e, t) => - A.some({ isTabPanel: () => "tabpanel" === t.body.type }), - renderComponents: (e) => { - const t = e.body; - return "tabpanel" === t.type - ? [$R(t, e.initialData, n)] - : [AR(t, e.initialData, n)]; - }, - initialData: e, - }), - ]), - }); - function XR(e) { - return ( - (XR = - "function" == typeof Symbol && "symbol" == typeof Symbol.iterator - ? function (e) { - return typeof e; - } - : function (e) { - return e && - "function" == typeof Symbol && - e.constructor === Symbol && - e !== Symbol.prototype - ? "symbol" - : typeof e; - }), - XR(e) - ); - } - function YR(e, t) { - return ( - (YR = - Object.setPrototypeOf || - function (e, t) { - return (e.__proto__ = t), e; - }), - YR(e, t) - ); - } - function KR(e, t, o) { - return ( - (KR = (function () { - if ("undefined" == typeof Reflect || !Reflect.construct) return !1; - if (Reflect.construct.sham) return !1; - if ("function" == typeof Proxy) return !0; - try { - return ( - Boolean.prototype.valueOf.call( - Reflect.construct(Boolean, [], function () {}), - ), - !0 - ); - } catch (e) { - return !1; - } - })() - ? Reflect.construct - : function (e, t, o) { - var n = [null]; - n.push.apply(n, t); - var s = new (Function.bind.apply(e, n))(); - return o && YR(s, o.prototype), s; - }), - KR.apply(null, arguments) - ); - } - function JR(e) { - return ( - (function (e) { - if (Array.isArray(e)) return ZR(e); - })(e) || - (function (e) { - if ( - ("undefined" != typeof Symbol && null != e[Symbol.iterator]) || - null != e["@@iterator"] - ) - return Array.from(e); - })(e) || - (function (e, t) { - if (e) { - if ("string" == typeof e) return ZR(e, t); - var o = Object.prototype.toString.call(e).slice(8, -1); - return ( - "Object" === o && e.constructor && (o = e.constructor.name), - "Map" === o || "Set" === o - ? Array.from(e) - : "Arguments" === o || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o) - ? ZR(e, t) - : void 0 - ); - } - })(e) || - (function () { - throw new TypeError( - "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.", - ); - })() - ); - } - function ZR(e, t) { - (null == t || t > e.length) && (t = e.length); - for (var o = 0, n = new Array(t); o < t; o++) n[o] = e[o]; - return n; - } - var QR = Object.hasOwnProperty, - eN = Object.setPrototypeOf, - tN = Object.isFrozen, - oN = Object.getPrototypeOf, - nN = Object.getOwnPropertyDescriptor, - sN = Object.freeze, - rN = Object.seal, - aN = Object.create, - iN = "undefined" != typeof Reflect && Reflect, - lN = iN.apply, - cN = iN.construct; - lN || - (lN = function (e, t, o) { - return e.apply(t, o); - }), - sN || - (sN = function (e) { - return e; - }), - rN || - (rN = function (e) { - return e; - }), - cN || - (cN = function (e, t) { - return KR(e, JR(t)); - }); - var dN, - uN = wN(Array.prototype.forEach), - mN = wN(Array.prototype.pop), - gN = wN(Array.prototype.push), - pN = wN(String.prototype.toLowerCase), - hN = wN(String.prototype.match), - fN = wN(String.prototype.replace), - bN = wN(String.prototype.indexOf), - vN = wN(String.prototype.trim), - yN = wN(RegExp.prototype.test), - xN = - ((dN = TypeError), - function () { - for (var e = arguments.length, t = new Array(e), o = 0; o < e; o++) - t[o] = arguments[o]; - return cN(dN, t); - }); - function wN(e) { - return function (t) { - for ( - var o = arguments.length, n = new Array(o > 1 ? o - 1 : 0), s = 1; - s < o; - s++ - ) - n[s - 1] = arguments[s]; - return lN(e, t, n); - }; - } - function SN(e, t) { - eN && eN(e, null); - for (var o = t.length; o--; ) { - var n = t[o]; - if ("string" == typeof n) { - var s = pN(n); - s !== n && (tN(t) || (t[o] = s), (n = s)); - } - e[n] = !0; - } - return e; - } - function kN(e) { - var t, - o = aN(null); - for (t in e) lN(QR, e, [t]) && (o[t] = e[t]); - return o; - } - function CN(e, t) { - for (; null !== e; ) { - var o = nN(e, t); - if (o) { - if (o.get) return wN(o.get); - if ("function" == typeof o.value) return wN(o.value); - } - e = oN(e); - } - return function (e) { - return console.warn("fallback value for", e), null; - }; - } - var ON = sN([ - "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", - "section", - "select", - "shadow", - "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", - ]), - _N = sN([ - "svg", - "a", - "altglyph", - "altglyphdef", - "altglyphitem", - "animatecolor", - "animatemotion", - "animatetransform", - "circle", - "clippath", - "defs", - "desc", - "ellipse", - "filter", - "font", - "g", - "glyph", - "glyphref", - "hkern", - "image", - "line", - "lineargradient", - "marker", - "mask", - "metadata", - "mpath", - "path", - "pattern", - "polygon", - "polyline", - "radialgradient", - "rect", - "stop", - "style", - "switch", - "symbol", - "text", - "textpath", - "title", - "tref", - "tspan", - "view", - "vkern", - ]), - TN = sN([ - "feBlend", - "feColorMatrix", - "feComponentTransfer", - "feComposite", - "feConvolveMatrix", - "feDiffuseLighting", - "feDisplacementMap", - "feDistantLight", - "feFlood", - "feFuncA", - "feFuncB", - "feFuncG", - "feFuncR", - "feGaussianBlur", - "feImage", - "feMerge", - "feMergeNode", - "feMorphology", - "feOffset", - "fePointLight", - "feSpecularLighting", - "feSpotLight", - "feTile", - "feTurbulence", - ]), - EN = sN([ - "animate", - "color-profile", - "cursor", - "discard", - "fedropshadow", - "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", - ]), - AN = sN([ - "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", - ]), - MN = sN([ - "maction", - "maligngroup", - "malignmark", - "mlongdiv", - "mscarries", - "mscarry", - "msgroup", - "mstack", - "msline", - "msrow", - "semantics", - "annotation", - "annotation-xml", - "mprescripts", - "none", - ]), - DN = sN(["#text"]), - BN = sN([ - "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", - "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", - "xmlns", - "slot", - ]), - FN = sN([ - "accent-height", - "accumulate", - "additive", - "alignment-baseline", - "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", - "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", - "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", - "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", - "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", - ]), - IN = sN([ - "accent", - "accentunder", - "align", - "bevelled", - "close", - "columnsalign", - "columnlines", - "columnspan", - "denomalign", - "depth", - "dir", - "display", - "displaystyle", - "encoding", - "fence", - "frame", - "height", - "href", - "id", - "largeop", - "length", - "linethickness", - "lspace", - "lquote", - "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", - ]), - RN = sN([ - "xlink:href", - "xml:id", - "xlink:title", - "xml:space", - "xmlns:xlink", - ]), - NN = rN(/\{\{[\w\W]*|[\w\W]*\}\}/gm), - VN = rN(/<%[\w\W]*|[\w\W]*%>/gm), - zN = rN(/^data-[\-\w.\u00B7-\uFFFF]/), - HN = rN(/^aria-[\-\w]+$/), - LN = rN( - /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i, - ), - PN = rN(/^(?:\w+script|data):/i), - UN = rN(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), - WN = rN(/^html$/i), - jN = function () { - return "undefined" == typeof window ? null : window; - }, - GN = (function e() { - var t = - arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : jN(), - o = function (t) { - return e(t); - }; - if ( - ((o.version = "2.3.8"), - (o.removed = []), - !t || !t.document || 9 !== t.document.nodeType) - ) - return (o.isSupported = !1), o; - var n = t.document, - s = t.document, - r = t.DocumentFragment, - a = t.HTMLTemplateElement, - i = t.Node, - l = t.Element, - c = t.NodeFilter, - d = t.NamedNodeMap, - u = void 0 === d ? t.NamedNodeMap || t.MozNamedAttrMap : d, - m = t.HTMLFormElement, - g = t.DOMParser, - p = t.trustedTypes, - h = l.prototype, - f = CN(h, "cloneNode"), - b = CN(h, "nextSibling"), - v = CN(h, "childNodes"), - y = CN(h, "parentNode"); - if ("function" == typeof a) { - var x = s.createElement("template"); - x.content && x.content.ownerDocument && (s = x.content.ownerDocument); - } - var w = (function (e, t) { - if ("object" !== XR(e) || "function" != typeof e.createPolicy) - return null; - var o = null, - n = "data-tt-policy-suffix"; - t.currentScript && - t.currentScript.hasAttribute(n) && - (o = t.currentScript.getAttribute(n)); - var s = "dompurify" + (o ? "#" + o : ""); - try { - return e.createPolicy(s, { - createHTML: function (e) { - return e; - }, - }); - } catch (e) { - return ( - console.warn( - "TrustedTypes policy " + s + " could not be created.", - ), - null - ); - } - })(p, n), - S = w ? w.createHTML("") : "", - k = s, - C = k.implementation, - O = k.createNodeIterator, - _ = k.createDocumentFragment, - T = k.getElementsByTagName, - E = n.importNode, - A = {}; - try { - A = kN(s).documentMode ? s.documentMode : {}; - } catch (e) {} - var M = {}; - o.isSupported = - "function" == typeof y && - C && - void 0 !== C.createHTMLDocument && - 9 !== A; - var D, - B, - F = NN, - I = VN, - R = zN, - N = HN, - V = PN, - z = UN, - H = LN, - L = null, - P = SN({}, [].concat(JR(ON), JR(_N), JR(TN), JR(AN), JR(DN))), - U = null, - W = SN({}, [].concat(JR(BN), JR(FN), JR(IN), JR(RN))), - j = Object.seal( - Object.create(null, { - tagNameCheck: { - writable: !0, - configurable: !1, - enumerable: !0, - value: null, - }, - attributeNameCheck: { - writable: !0, - configurable: !1, - enumerable: !0, - value: null, - }, - allowCustomizedBuiltInElements: { - writable: !0, - configurable: !1, - enumerable: !0, - value: !1, - }, - }), - ), - G = null, - $ = null, - q = !0, - X = !0, - Y = !1, - K = !1, - J = !1, - Z = !1, - Q = !1, - ee = !1, - te = !1, - oe = !1, - ne = !0, - se = !0, - re = !1, - ae = {}, - ie = null, - le = SN({}, [ - "annotation-xml", - "audio", - "colgroup", - "desc", - "foreignobject", - "head", - "iframe", - "math", - "mi", - "mn", - "mo", - "ms", - "mtext", - "noembed", - "noframes", - "noscript", - "plaintext", - "script", - "style", - "svg", - "template", - "thead", - "title", - "video", - "xmp", - ]), - ce = null, - de = SN({}, ["audio", "video", "img", "source", "image", "track"]), - ue = null, - me = SN({}, [ - "alt", - "class", - "for", - "id", - "label", - "name", - "pattern", - "placeholder", - "role", - "summary", - "title", - "value", - "style", - "xmlns", - ]), - ge = "http://www.w3.org/1998/Math/MathML", - pe = "http://www.w3.org/2000/svg", - he = "http://www.w3.org/1999/xhtml", - fe = he, - be = !1, - ve = ["application/xhtml+xml", "text/html"], - ye = null, - xe = s.createElement("form"), - we = function (e) { - return e instanceof RegExp || e instanceof Function; - }, - Se = function (e) { - (ye && ye === e) || - ((e && "object" === XR(e)) || (e = {}), - (e = kN(e)), - (L = "ALLOWED_TAGS" in e ? SN({}, e.ALLOWED_TAGS) : P), - (U = "ALLOWED_ATTR" in e ? SN({}, e.ALLOWED_ATTR) : W), - (ue = - "ADD_URI_SAFE_ATTR" in e ? SN(kN(me), e.ADD_URI_SAFE_ATTR) : me), - (ce = - "ADD_DATA_URI_TAGS" in e ? SN(kN(de), e.ADD_DATA_URI_TAGS) : de), - (ie = "FORBID_CONTENTS" in e ? SN({}, e.FORBID_CONTENTS) : le), - (G = "FORBID_TAGS" in e ? SN({}, e.FORBID_TAGS) : {}), - ($ = "FORBID_ATTR" in e ? SN({}, e.FORBID_ATTR) : {}), - (ae = "USE_PROFILES" in e && e.USE_PROFILES), - (q = !1 !== e.ALLOW_ARIA_ATTR), - (X = !1 !== e.ALLOW_DATA_ATTR), - (Y = e.ALLOW_UNKNOWN_PROTOCOLS || !1), - (K = e.SAFE_FOR_TEMPLATES || !1), - (J = e.WHOLE_DOCUMENT || !1), - (ee = e.RETURN_DOM || !1), - (te = e.RETURN_DOM_FRAGMENT || !1), - (oe = e.RETURN_TRUSTED_TYPE || !1), - (Q = e.FORCE_BODY || !1), - (ne = !1 !== e.SANITIZE_DOM), - (se = !1 !== e.KEEP_CONTENT), - (re = e.IN_PLACE || !1), - (H = e.ALLOWED_URI_REGEXP || H), - (fe = e.NAMESPACE || he), - e.CUSTOM_ELEMENT_HANDLING && - we(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && - (j.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), - e.CUSTOM_ELEMENT_HANDLING && - we(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && - (j.attributeNameCheck = - e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), - e.CUSTOM_ELEMENT_HANDLING && - "boolean" == - typeof e.CUSTOM_ELEMENT_HANDLING - .allowCustomizedBuiltInElements && - (j.allowCustomizedBuiltInElements = - e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), - (D = D = - -1 === ve.indexOf(e.PARSER_MEDIA_TYPE) - ? "text/html" - : e.PARSER_MEDIA_TYPE), - (B = - "application/xhtml+xml" === D - ? function (e) { - return e; - } - : pN), - K && (X = !1), - te && (ee = !0), - ae && - ((L = SN({}, JR(DN))), - (U = []), - !0 === ae.html && (SN(L, ON), SN(U, BN)), - !0 === ae.svg && (SN(L, _N), SN(U, FN), SN(U, RN)), - !0 === ae.svgFilters && (SN(L, TN), SN(U, FN), SN(U, RN)), - !0 === ae.mathMl && (SN(L, AN), SN(U, IN), SN(U, RN))), - e.ADD_TAGS && (L === P && (L = kN(L)), SN(L, e.ADD_TAGS)), - e.ADD_ATTR && (U === W && (U = kN(U)), SN(U, e.ADD_ATTR)), - e.ADD_URI_SAFE_ATTR && SN(ue, e.ADD_URI_SAFE_ATTR), - e.FORBID_CONTENTS && - (ie === le && (ie = kN(ie)), SN(ie, e.FORBID_CONTENTS)), - se && (L["#text"] = !0), - J && SN(L, ["html", "head", "body"]), - L.table && (SN(L, ["tbody"]), delete G.tbody), - sN && sN(e), - (ye = e)); - }, - ke = SN({}, ["mi", "mo", "mn", "ms", "mtext"]), - Ce = SN({}, ["foreignobject", "desc", "title", "annotation-xml"]), - Oe = SN({}, ["title", "style", "font", "a", "script"]), - _e = SN({}, _N); - SN(_e, TN), SN(_e, EN); - var Te = SN({}, AN); - SN(Te, MN); - var Ee = function (e) { - gN(o.removed, { element: e }); - try { - e.parentNode.removeChild(e); - } catch (t) { - try { - e.outerHTML = S; - } catch (t) { - e.remove(); - } - } - }, - Ae = function (e, t) { - try { - gN(o.removed, { attribute: t.getAttributeNode(e), from: t }); - } catch (e) { - gN(o.removed, { attribute: null, from: t }); - } - if ((t.removeAttribute(e), "is" === e && !U[e])) - if (ee || te) - try { - Ee(t); - } catch (e) {} - else - try { - t.setAttribute(e, ""); - } catch (e) {} - }, - Me = function (e) { - var t, o; - if (Q) e = "" + e; - else { - var n = hN(e, /^[\r\n\t ]+/); - o = n && n[0]; - } - "application/xhtml+xml" === D && - (e = - '' + - e + - ""); - var r = w ? w.createHTML(e) : e; - if (fe === he) - try { - t = new g().parseFromString(r, D); - } catch (e) {} - if (!t || !t.documentElement) { - t = C.createDocument(fe, "template", null); - try { - t.documentElement.innerHTML = be ? "" : r; - } catch (e) {} - } - var a = t.body || t.documentElement; - return ( - e && - o && - a.insertBefore(s.createTextNode(o), a.childNodes[0] || null), - fe === he - ? T.call(t, J ? "html" : "body")[0] - : J - ? t.documentElement - : a - ); - }, - De = function (e) { - return O.call( - e.ownerDocument || e, - e, - c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT, - null, - !1, - ); - }, - Be = function (e) { - return "object" === XR(i) - ? e instanceof i - : e && - "object" === XR(e) && - "number" == typeof e.nodeType && - "string" == typeof e.nodeName; - }, - Fe = function (e, t, n) { - M[e] && - uN(M[e], function (e) { - e.call(o, t, n, ye); - }); - }, - Ie = function (e) { - var t, n; - if ( - (Fe("beforeSanitizeElements", e, null), - (n = e) instanceof m && - ("string" != typeof n.nodeName || - "string" != typeof n.textContent || - "function" != typeof n.removeChild || - !(n.attributes instanceof u) || - "function" != typeof n.removeAttribute || - "function" != typeof n.setAttribute || - "string" != typeof n.namespaceURI || - "function" != typeof n.insertBefore)) - ) - return Ee(e), !0; - if (yN(/[\u0080-\uFFFF]/, e.nodeName)) return Ee(e), !0; - var s = B(e.nodeName); - if ( - (Fe("uponSanitizeElement", e, { tagName: s, allowedTags: L }), - e.hasChildNodes() && - !Be(e.firstElementChild) && - (!Be(e.content) || !Be(e.content.firstElementChild)) && - yN(/<[/\w]/g, e.innerHTML) && - yN(/<[/\w]/g, e.textContent)) - ) - return Ee(e), !0; - if ("select" === s && yN(/