diff --git a/flossom-ui/.env.development b/flossom-ui/.env.development index 5fdbb7b..f24aaee 100644 --- a/flossom-ui/.env.development +++ b/flossom-ui/.env.development @@ -5,7 +5,7 @@ VUE_APP_TITLE = 花至管理系统 ENV = 'development' # 花至管理系统/开发环境 -VUE_APP_BASE_API = '/dev-api' +VUE_APP_BASE_API = '/prod-api' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/flossom-ui/package.json b/flossom-ui/package.json index 10bd79a..17c2bef 100644 --- a/flossom-ui/package.json +++ b/flossom-ui/package.json @@ -5,7 +5,7 @@ "author": "花至", "license": "MIT", "scripts": { - "dev": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service serve", + "dev": "vue-cli-service serve --mode development", "build:prod": "vue-cli-service build", "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", @@ -45,11 +45,13 @@ "file-saver": "2.0.5", "fuse.js": "6.4.3", "highlight.js": "9.18.5", + "i": "^0.3.7", "js-beautify": "1.13.0", "js-cookie": "3.0.1", "jsencrypt": "3.0.0-rc.1", + "npm": "^10.2.5", "nprogress": "0.2.0", - "quill": "1.3.7", + "quill": "^2.0.0-beta.0", "screenfull": "5.0.2", "sortablejs": "1.10.2", "vue": "2.6.12", diff --git a/flossom-ui/src/assets/js/quillv2.min.css b/flossom-ui/src/assets/js/quillv2.min.css new file mode 100644 index 0000000..453a467 --- /dev/null +++ b/flossom-ui/src/assets/js/quillv2.min.css @@ -0,0 +1,978 @@ +/*! + * Quill Editor v2.0.0-dev.3 + * https://quilljs.com/ + * Copyright (c) 2014, Jason Chen + * Copyright (c) 2013, salesforce.com + */ +.ql-container { + box-sizing: border-box; + font-family: Helvetica, Arial, sans-serif; + font-size: 13px; + height: 100%; + margin: 0; + position: relative; +} +.ql-container.ql-disabled .ql-tooltip { + visibility: hidden; +} +.ql-container:not(.ql-disabled) li[data-list="checked"] > .ql-ui, +.ql-container:not(.ql-disabled) li[data-list="unchecked"] > .ql-ui { + cursor: pointer; +} +.ql-clipboard { + left: -100000px; + height: 1px; + overflow-y: hidden; + position: absolute; + top: 50%; +} +.ql-clipboard p { + margin: 0; + padding: 0; +} +.ql-editor { + box-sizing: border-box; + counter-reset: list-0; + line-height: 1.42; + height: 100%; + outline: 0; + overflow-y: auto; + padding: 12px 15px; + tab-size: 4; + -moz-tab-size: 4; + text-align: left; + white-space: pre-wrap; + word-wrap: break-word; +} +.ql-editor > * { + cursor: text; +} +.ql-editor blockquote, +.ql-editor h1, +.ql-editor h2, +.ql-editor h3, +.ql-editor h4, +.ql-editor h5, +.ql-editor h6, +.ql-editor ol, +.ql-editor p, +.ql-editor pre { + margin: 0; + padding: 0; +} +.ql-editor h1, +.ql-editor h2, +.ql-editor h3, +.ql-editor h4, +.ql-editor h5, +.ql-editor h6, +.ql-editor p { + counter-reset: list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 + list-9; +} +.ql-editor table { + border-collapse: collapse; +} +.ql-editor td { + border: 1px solid #000; + padding: 2px 5px; +} +.ql-editor ol { + padding-left: 1.5em; +} +.ql-editor li { + list-style-type: none; + padding-left: 1.5em; + position: relative; +} +.ql-editor li > .ql-ui:before { + display: inline-block; + margin-left: -1.5em; + margin-right: 0.3em; + text-align: right; + white-space: nowrap; + width: 1.2em; +} +.ql-editor li[data-list="checked"] > .ql-ui, +.ql-editor li[data-list="unchecked"] > .ql-ui { + color: #777; +} +.ql-editor li[data-list="bullet"] > .ql-ui:before { + content: "\2022"; +} +.ql-editor li[data-list="checked"] > .ql-ui:before { + content: "\2611"; +} +.ql-editor li[data-list="unchecked"] > .ql-ui:before { + content: "\2610"; +} +.ql-editor li[data-list="ordered"] { + counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9; + counter-increment: list-0; +} +.ql-editor li[data-list="ordered"] > .ql-ui:before { + content: counter(list-0, decimal) ". "; +} +.ql-editor li[data-list="ordered"].ql-indent-1 { + counter-increment: list-1; +} +.ql-editor li[data-list="ordered"].ql-indent-1 > .ql-ui:before { + content: counter(list-1, lower-alpha) ". "; +} +.ql-editor li[data-list="ordered"].ql-indent-1 { + counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9; +} +.ql-editor li[data-list="ordered"].ql-indent-2 { + counter-increment: list-2; +} +.ql-editor li[data-list="ordered"].ql-indent-2 > .ql-ui:before { + content: counter(list-2, lower-roman) ". "; +} +.ql-editor li[data-list="ordered"].ql-indent-2 { + counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9; +} +.ql-editor li[data-list="ordered"].ql-indent-3 { + counter-increment: list-3; +} +.ql-editor li[data-list="ordered"].ql-indent-3 > .ql-ui:before { + content: counter(list-3, decimal) ". "; +} +.ql-editor li[data-list="ordered"].ql-indent-3 { + counter-reset: list-4 list-5 list-6 list-7 list-8 list-9; +} +.ql-editor li[data-list="ordered"].ql-indent-4 { + counter-increment: list-4; +} +.ql-editor li[data-list="ordered"].ql-indent-4 > .ql-ui:before { + content: counter(list-4, lower-alpha) ". "; +} +.ql-editor li[data-list="ordered"].ql-indent-4 { + counter-reset: list-5 list-6 list-7 list-8 list-9; +} +.ql-editor li[data-list="ordered"].ql-indent-5 { + counter-increment: list-5; +} +.ql-editor li[data-list="ordered"].ql-indent-5 > .ql-ui:before { + content: counter(list-5, lower-roman) ". "; +} +.ql-editor li[data-list="ordered"].ql-indent-5 { + counter-reset: list-6 list-7 list-8 list-9; +} +.ql-editor li[data-list="ordered"].ql-indent-6 { + counter-increment: list-6; +} +.ql-editor li[data-list="ordered"].ql-indent-6 > .ql-ui:before { + content: counter(list-6, decimal) ". "; +} +.ql-editor li[data-list="ordered"].ql-indent-6 { + counter-reset: list-7 list-8 list-9; +} +.ql-editor li[data-list="ordered"].ql-indent-7 { + counter-increment: list-7; +} +.ql-editor li[data-list="ordered"].ql-indent-7 > .ql-ui:before { + content: counter(list-7, lower-alpha) ". "; +} +.ql-editor li[data-list="ordered"].ql-indent-7 { + counter-reset: list-8 list-9; +} +.ql-editor li[data-list="ordered"].ql-indent-8 { + counter-increment: list-8; +} +.ql-editor li[data-list="ordered"].ql-indent-8 > .ql-ui:before { + content: counter(list-8, lower-roman) ". "; +} +.ql-editor li[data-list="ordered"].ql-indent-8 { + counter-reset: list-9; +} +.ql-editor li[data-list="ordered"].ql-indent-9 { + counter-increment: list-9; +} +.ql-editor li[data-list="ordered"].ql-indent-9 > .ql-ui:before { + content: counter(list-9, decimal) ". "; +} +.ql-editor .ql-indent-1:not(.ql-direction-rtl) { + padding-left: 3em; +} +.ql-editor li.ql-indent-1:not(.ql-direction-rtl) { + padding-left: 4.5em; +} +.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right { + padding-right: 3em; +} +.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right { + padding-right: 4.5em; +} +.ql-editor .ql-indent-2:not(.ql-direction-rtl) { + padding-left: 6em; +} +.ql-editor li.ql-indent-2:not(.ql-direction-rtl) { + padding-left: 7.5em; +} +.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right { + padding-right: 6em; +} +.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right { + padding-right: 7.5em; +} +.ql-editor .ql-indent-3:not(.ql-direction-rtl) { + padding-left: 9em; +} +.ql-editor li.ql-indent-3:not(.ql-direction-rtl) { + padding-left: 10.5em; +} +.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right { + padding-right: 9em; +} +.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right { + padding-right: 10.5em; +} +.ql-editor .ql-indent-4:not(.ql-direction-rtl) { + padding-left: 12em; +} +.ql-editor li.ql-indent-4:not(.ql-direction-rtl) { + padding-left: 13.5em; +} +.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right { + padding-right: 12em; +} +.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right { + padding-right: 13.5em; +} +.ql-editor .ql-indent-5:not(.ql-direction-rtl) { + padding-left: 15em; +} +.ql-editor li.ql-indent-5:not(.ql-direction-rtl) { + padding-left: 16.5em; +} +.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right { + padding-right: 15em; +} +.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right { + padding-right: 16.5em; +} +.ql-editor .ql-indent-6:not(.ql-direction-rtl) { + padding-left: 18em; +} +.ql-editor li.ql-indent-6:not(.ql-direction-rtl) { + padding-left: 19.5em; +} +.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right { + padding-right: 18em; +} +.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right { + padding-right: 19.5em; +} +.ql-editor .ql-indent-7:not(.ql-direction-rtl) { + padding-left: 21em; +} +.ql-editor li.ql-indent-7:not(.ql-direction-rtl) { + padding-left: 22.5em; +} +.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right { + padding-right: 21em; +} +.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right { + padding-right: 22.5em; +} +.ql-editor .ql-indent-8:not(.ql-direction-rtl) { + padding-left: 24em; +} +.ql-editor li.ql-indent-8:not(.ql-direction-rtl) { + padding-left: 25.5em; +} +.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right { + padding-right: 24em; +} +.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right { + padding-right: 25.5em; +} +.ql-editor .ql-indent-9:not(.ql-direction-rtl) { + padding-left: 27em; +} +.ql-editor li.ql-indent-9:not(.ql-direction-rtl) { + padding-left: 28.5em; +} +.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right { + padding-right: 27em; +} +.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right { + padding-right: 28.5em; +} +.ql-editor li.ql-direction-rtl { + padding-right: 1.5em; +} +.ql-editor li.ql-direction-rtl > .ql-ui:before { + margin-left: 0.3em; + margin-right: -1.5em; + text-align: left; +} +.ql-editor table { + table-layout: fixed; + width: 100%; +} +.ql-editor table td { + outline: 0; +} +.ql-editor .ql-code-block-container { + font-family: monospace; +} +.ql-editor .ql-video { + display: block; + max-width: 100%; +} +.ql-editor .ql-video.ql-align-center { + margin: 0 auto; +} +.ql-editor .ql-video.ql-align-right { + margin: 0 0 0 auto; +} +.ql-editor .ql-bg-black { + background-color: #000; +} +.ql-editor .ql-bg-red { + background-color: #e60000; +} +.ql-editor .ql-bg-orange { + background-color: #f90; +} +.ql-editor .ql-bg-yellow { + background-color: #ff0; +} +.ql-editor .ql-bg-green { + background-color: #008a00; +} +.ql-editor .ql-bg-blue { + background-color: #06c; +} +.ql-editor .ql-bg-purple { + background-color: #93f; +} +.ql-editor .ql-color-white { + color: #fff; +} +.ql-editor .ql-color-red { + color: #e60000; +} +.ql-editor .ql-color-orange { + color: #f90; +} +.ql-editor .ql-color-yellow { + color: #ff0; +} +.ql-editor .ql-color-green { + color: #008a00; +} +.ql-editor .ql-color-blue { + color: #06c; +} +.ql-editor .ql-color-purple { + color: #93f; +} +.ql-editor .ql-font-serif { + font-family: Georgia, Times New Roman, serif; +} +.ql-editor .ql-font-monospace { + font-family: Monaco, Courier New, monospace; +} +.ql-editor .ql-size-small { + font-size: 0.75em; +} +.ql-editor .ql-size-large { + font-size: 1.5em; +} +.ql-editor .ql-size-huge { + font-size: 2.5em; +} +.ql-editor .ql-direction-rtl { + direction: rtl; + text-align: inherit; +} +.ql-editor .ql-align-center { + text-align: center; +} +.ql-editor .ql-align-justify { + text-align: justify; +} +.ql-editor .ql-align-right { + text-align: right; +} +.ql-editor .ql-ui { + position: absolute; +} +.ql-editor.ql-blank::before { + color: rgba(0, 0, 0, 0.6); + content: attr(data-placeholder); + font-style: italic; + left: 15px; + pointer-events: none; + position: absolute; + right: 15px; +} +.ql-snow .ql-toolbar:after, +.ql-snow.ql-toolbar:after { + clear: both; + content: ""; + display: table; +} +.ql-snow .ql-toolbar button, +.ql-snow.ql-toolbar button { + background: 0 0; + border: none; + cursor: pointer; + display: inline-block; + float: left; + height: 24px; + padding: 3px 5px; + width: 28px; +} +.ql-snow .ql-toolbar button svg, +.ql-snow.ql-toolbar button svg { + float: left; + height: 100%; +} +.ql-snow .ql-toolbar button:active:hover, +.ql-snow.ql-toolbar button:active:hover { + outline: 0; +} +.ql-snow .ql-toolbar input.ql-image[type="file"], +.ql-snow.ql-toolbar input.ql-image[type="file"] { + display: none; +} +.ql-snow .ql-toolbar .ql-picker-item.ql-selected, +.ql-snow .ql-toolbar .ql-picker-item:hover, +.ql-snow .ql-toolbar .ql-picker-label.ql-active, +.ql-snow .ql-toolbar .ql-picker-label:hover, +.ql-snow .ql-toolbar button.ql-active, +.ql-snow .ql-toolbar button:focus, +.ql-snow .ql-toolbar button:hover, +.ql-snow.ql-toolbar .ql-picker-item.ql-selected, +.ql-snow.ql-toolbar .ql-picker-item:hover, +.ql-snow.ql-toolbar .ql-picker-label.ql-active, +.ql-snow.ql-toolbar .ql-picker-label:hover, +.ql-snow.ql-toolbar button.ql-active, +.ql-snow.ql-toolbar button:focus, +.ql-snow.ql-toolbar button:hover { + color: #06c; +} +.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill, +.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill, +.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill, +.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, +.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill, +.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill, +.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill, +.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill, +.ql-snow .ql-toolbar button.ql-active .ql-fill, +.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill, +.ql-snow .ql-toolbar button:focus .ql-fill, +.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill, +.ql-snow .ql-toolbar button:hover .ql-fill, +.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill, +.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill, +.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill, +.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill, +.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, +.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill, +.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill, +.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill, +.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill, +.ql-snow.ql-toolbar button.ql-active .ql-fill, +.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill, +.ql-snow.ql-toolbar button:focus .ql-fill, +.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill, +.ql-snow.ql-toolbar button:hover .ql-fill, +.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill { + fill: #06c; +} +.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke, +.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter, +.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke, +.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter, +.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke, +.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter, +.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke, +.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter, +.ql-snow .ql-toolbar button.ql-active .ql-stroke, +.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter, +.ql-snow .ql-toolbar button:focus .ql-stroke, +.ql-snow .ql-toolbar button:focus .ql-stroke-miter, +.ql-snow .ql-toolbar button:hover .ql-stroke, +.ql-snow .ql-toolbar button:hover .ql-stroke-miter, +.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke, +.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter, +.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke, +.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter, +.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke, +.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter, +.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke, +.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter, +.ql-snow.ql-toolbar button.ql-active .ql-stroke, +.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter, +.ql-snow.ql-toolbar button:focus .ql-stroke, +.ql-snow.ql-toolbar button:focus .ql-stroke-miter, +.ql-snow.ql-toolbar button:hover .ql-stroke, +.ql-snow.ql-toolbar button:hover .ql-stroke-miter { + stroke: #06c; +} +@media (pointer: coarse) { + .ql-snow .ql-toolbar button:hover:not(.ql-active), + .ql-snow.ql-toolbar button:hover:not(.ql-active) { + color: #444; + } + .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill, + .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill, + .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill, + .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill { + fill: #444; + } + .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke, + .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter, + .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke, + .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter { + stroke: #444; + } +} +.ql-snow { + box-sizing: border-box; +} +.ql-snow * { + box-sizing: border-box; +} +.ql-snow .ql-hidden { + display: none; +} +.ql-snow .ql-out-bottom, +.ql-snow .ql-out-top { + visibility: hidden; +} +.ql-snow .ql-tooltip { + position: absolute; + transform: translateY(10px); +} +.ql-snow .ql-tooltip a { + cursor: pointer; + text-decoration: none; +} +.ql-snow .ql-tooltip.ql-flip { + transform: translateY(-10px); +} +.ql-snow .ql-formats { + display: inline-block; + vertical-align: middle; +} +.ql-snow .ql-formats:after { + clear: both; + content: ""; + display: table; +} +.ql-snow .ql-stroke { + fill: none; + stroke: #444; + stroke-linecap: round; + stroke-linejoin: round; + stroke-width: 2; +} +.ql-snow .ql-stroke-miter { + fill: none; + stroke: #444; + stroke-miterlimit: 10; + stroke-width: 2; +} +.ql-snow .ql-fill, +.ql-snow .ql-stroke.ql-fill { + fill: #444; +} +.ql-snow .ql-empty { + fill: none; +} +.ql-snow .ql-even { + fill-rule: evenodd; +} +.ql-snow .ql-stroke.ql-thin, +.ql-snow .ql-thin { + stroke-width: 1; +} +.ql-snow .ql-transparent { + opacity: 0.4; +} +.ql-snow .ql-direction svg:last-child { + display: none; +} +.ql-snow .ql-direction.ql-active svg:last-child { + display: inline; +} +.ql-snow .ql-direction.ql-active svg:first-child { + display: none; +} +.ql-snow .ql-editor h1 { + font-size: 2em; +} +.ql-snow .ql-editor h2 { + font-size: 1.5em; +} +.ql-snow .ql-editor h3 { + font-size: 1.17em; +} +.ql-snow .ql-editor h4 { + font-size: 1em; +} +.ql-snow .ql-editor h5 { + font-size: 0.83em; +} +.ql-snow .ql-editor h6 { + font-size: 0.67em; +} +.ql-snow .ql-editor a { + text-decoration: underline; +} +.ql-snow .ql-editor blockquote { + border-left: 4px solid #ccc; + margin-bottom: 5px; + margin-top: 5px; + padding-left: 16px; +} +.ql-snow .ql-editor .ql-code-block-container, +.ql-snow .ql-editor code { + background-color: #f0f0f0; + border-radius: 3px; +} +.ql-snow .ql-editor .ql-code-block-container { + margin-bottom: 5px; + margin-top: 5px; + padding: 5px 10px; +} +.ql-snow .ql-editor code { + font-size: 85%; + padding: 2px 4px; +} +.ql-snow .ql-editor .ql-code-block-container { + background-color: #23241f; + color: #f8f8f2; + overflow: visible; +} +.ql-snow .ql-editor img { + max-width: 100%; +} +.ql-snow .ql-picker { + color: #444; + display: inline-block; + float: left; + font-size: 14px; + font-weight: 500; + height: 24px; + position: relative; + vertical-align: middle; +} +.ql-snow .ql-picker-label { + cursor: pointer; + display: inline-block; + height: 100%; + padding-left: 8px; + padding-right: 2px; + position: relative; + width: 100%; +} +.ql-snow .ql-picker-label::before { + display: inline-block; + line-height: 22px; +} +.ql-snow .ql-picker-options { + background-color: #fff; + display: none; + min-width: 100%; + padding: 4px 8px; + position: absolute; + white-space: nowrap; +} +.ql-snow .ql-picker-options .ql-picker-item { + cursor: pointer; + display: block; + padding-bottom: 5px; + padding-top: 5px; +} +.ql-snow .ql-picker.ql-expanded .ql-picker-label { + color: #ccc; + z-index: 2; +} +.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill { + fill: #ccc; +} +.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke { + stroke: #ccc; +} +.ql-snow .ql-picker.ql-expanded .ql-picker-options { + display: block; + margin-top: -1px; + top: 100%; + z-index: 1; +} +.ql-snow .ql-color-picker, +.ql-snow .ql-icon-picker { + width: 28px; +} +.ql-snow .ql-color-picker .ql-picker-label, +.ql-snow .ql-icon-picker .ql-picker-label { + padding: 2px 4px; +} +.ql-snow .ql-color-picker .ql-picker-label svg, +.ql-snow .ql-icon-picker .ql-picker-label svg { + right: 4px; +} +.ql-snow .ql-icon-picker .ql-picker-options { + padding: 4px 0; +} +.ql-snow .ql-icon-picker .ql-picker-item { + height: 24px; + width: 24px; + padding: 2px 4px; +} +.ql-snow .ql-color-picker .ql-picker-options { + padding: 3px 5px; + width: 152px; +} +.ql-snow .ql-color-picker .ql-picker-item { + border: 1px solid transparent; + float: left; + height: 16px; + margin: 2px; + padding: 0; + width: 16px; +} +.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg { + position: absolute; + margin-top: -9px; + right: 0; + top: 50%; + width: 18px; +} +.ql-snow + .ql-picker.ql-font + .ql-picker-item[data-label]:not([data-label=""])::before, +.ql-snow + .ql-picker.ql-font + .ql-picker-label[data-label]:not([data-label=""])::before, +.ql-snow + .ql-picker.ql-header + .ql-picker-item[data-label]:not([data-label=""])::before, +.ql-snow + .ql-picker.ql-header + .ql-picker-label[data-label]:not([data-label=""])::before, +.ql-snow + .ql-picker.ql-size + .ql-picker-item[data-label]:not([data-label=""])::before, +.ql-snow + .ql-picker.ql-size + .ql-picker-label[data-label]:not([data-label=""])::before { + content: attr(data-label); +} +.ql-snow .ql-picker.ql-header { + width: 98px; +} +.ql-snow .ql-picker.ql-header .ql-picker-item::before, +.ql-snow .ql-picker.ql-header .ql-picker-label::before { + content: "Normal"; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before { + content: "Heading 1"; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before { + content: "Heading 2"; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before { + content: "Heading 3"; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before { + content: "Heading 4"; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before { + content: "Heading 5"; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before { + content: "Heading 6"; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { + font-size: 2em; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { + font-size: 1.5em; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { + font-size: 1.17em; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { + font-size: 1em; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { + font-size: 0.83em; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { + font-size: 0.67em; +} +.ql-snow .ql-picker.ql-font { + width: 108px; +} +.ql-snow .ql-picker.ql-font .ql-picker-item::before, +.ql-snow .ql-picker.ql-font .ql-picker-label::before { + content: "Sans Serif"; +} +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before, +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before { + content: "Serif"; +} +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before, +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before { + content: "Monospace"; +} +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before { + font-family: Georgia, Times New Roman, serif; +} +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before { + font-family: Monaco, Courier New, monospace; +} +.ql-snow .ql-picker.ql-size { + width: 98px; +} +.ql-snow .ql-picker.ql-size .ql-picker-item::before, +.ql-snow .ql-picker.ql-size .ql-picker-label::before { + content: "Normal"; +} +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before { + content: "Small"; +} +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before { + content: "Large"; +} +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before { + content: "Huge"; +} +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before { + font-size: 10px; +} +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before { + font-size: 18px; +} +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before { + font-size: 32px; +} +.ql-snow .ql-color-picker.ql-background .ql-picker-item { + background-color: #fff; +} +.ql-snow .ql-color-picker.ql-color .ql-picker-item { + background-color: #000; +} +.ql-code-block-container { + position: relative; +} +.ql-code-block-container .ql-ui { + right: 5px; + top: 5px; +} +.ql-toolbar.ql-snow { + border: 1px solid #ccc; + box-sizing: border-box; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + padding: 8px; +} +.ql-toolbar.ql-snow .ql-formats { + margin-right: 15px; +} +.ql-toolbar.ql-snow .ql-picker-label { + border: 1px solid transparent; +} +.ql-toolbar.ql-snow .ql-picker-options { + border: 1px solid transparent; + box-shadow: rgba(0, 0, 0, 0.2) 0 2px 8px; +} +.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label { + border-color: #ccc; +} +.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options { + border-color: #ccc; +} +.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected, +.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover { + border-color: #000; +} +.ql-toolbar.ql-snow + .ql-container.ql-snow { + border-top: 0; +} +.ql-snow .ql-tooltip { + background-color: #fff; + border: 1px solid #ccc; + box-shadow: 0 0 5px #ddd; + color: #444; + padding: 5px 12px; + white-space: nowrap; +} +.ql-snow .ql-tooltip::before { + content: "Visit URL:"; + line-height: 26px; + margin-right: 8px; +} +.ql-snow .ql-tooltip input[type="text"] { + display: none; + border: 1px solid #ccc; + font-size: 13px; + height: 26px; + margin: 0; + padding: 3px 5px; + width: 170px; +} +.ql-snow .ql-tooltip a.ql-preview { + display: inline-block; + max-width: 200px; + overflow-x: hidden; + text-overflow: ellipsis; + vertical-align: top; +} +.ql-snow .ql-tooltip a.ql-action::after { + border-right: 1px solid #ccc; + content: "Edit"; + margin-left: 16px; + padding-right: 8px; +} +.ql-snow .ql-tooltip a.ql-remove::before { + content: "Remove"; + margin-left: 8px; +} +.ql-snow .ql-tooltip a { + line-height: 26px; +} +.ql-snow .ql-tooltip.ql-editing a.ql-preview, +.ql-snow .ql-tooltip.ql-editing a.ql-remove { + display: none; +} +.ql-snow .ql-tooltip.ql-editing input[type="text"] { + display: inline-block; +} +.ql-snow .ql-tooltip.ql-editing a.ql-action::after { + border-right: 0; + content: "Save"; + padding-right: 0; +} +.ql-snow .ql-tooltip[data-mode="link"]::before { + content: "Enter link:"; +} +.ql-snow .ql-tooltip[data-mode="formula"]::before { + content: "Enter formula:"; +} +.ql-snow .ql-tooltip[data-mode="video"]::before { + content: "Enter video:"; +} +.ql-snow a { + color: #06c; +} +.ql-container.ql-snow { + border: 1px solid #ccc; +} +/*# sourceMappingURL=quill.snow.min.css.map */ diff --git a/flossom-ui/src/assets/js/quillv2.min.js b/flossom-ui/src/assets/js/quillv2.min.js new file mode 100644 index 0000000..7d7620c --- /dev/null +++ b/flossom-ui/src/assets/js/quillv2.min.js @@ -0,0 +1,8272 @@ +/*! + * Quill Editor v2.0.0-dev.3 + * https://quilljs.com/ + * Copyright (c) 2014, Jason Chen + * Copyright (c) 2013, salesforce.com + */ +!(function (t, e) { + "object" == typeof exports && "object" == typeof module + ? (module.exports = e()) + : "function" == typeof define && define.amd + ? define([], e) + : "object" == typeof exports + ? (exports.Quill = e()) + : (t.Quill = e()); +})(window, function () { + return (function (t) { + var e = {}; + function s(i) { + if (e[i]) return e[i].exports; + var r = (e[i] = { i: i, l: !1, exports: {} }); + return t[i].call(r.exports, r, r.exports, s), (r.l = !0), r.exports; + } + return ( + (s.m = t), + (s.c = e), + (s.d = function (t, e, i) { + s.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: i }); + }), + (s.r = function (t) { + "undefined" != typeof Symbol && + Symbol.toStringTag && + Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), + Object.defineProperty(t, "__esModule", { value: !0 }); + }), + (s.t = function (t, e) { + if ((1 & e && (t = s(t)), 8 & e)) return t; + if (4 & e && "object" == typeof t && t && t.__esModule) return t; + var i = Object.create(null); + if ( + (s.r(i), + Object.defineProperty(i, "default", { enumerable: !0, value: t }), + 2 & e && "string" != typeof t) + ) + for (var r in t) + s.d( + i, + r, + function (e) { + return t[e]; + }.bind(null, r) + ); + return i; + }), + (s.n = function (t) { + var e = + t && t.__esModule + ? function () { + return t.default; + } + : function () { + return t; + }; + return s.d(e, "a", e), e; + }), + (s.o = function (t, e) { + return Object.prototype.hasOwnProperty.call(t, e); + }), + (s.p = ""), + s((s.s = 36)) + ); + })([ + function (t, e, s) { + "use strict"; + var i; + s.r(e), + (function (t) { + (t[(t.TYPE = 3)] = "TYPE"), + (t[(t.LEVEL = 12)] = "LEVEL"), + (t[(t.ATTRIBUTE = 13)] = "ATTRIBUTE"), + (t[(t.BLOT = 14)] = "BLOT"), + (t[(t.INLINE = 7)] = "INLINE"), + (t[(t.BLOCK = 11)] = "BLOCK"), + (t[(t.BLOCK_BLOT = 10)] = "BLOCK_BLOT"), + (t[(t.INLINE_BLOT = 6)] = "INLINE_BLOT"), + (t[(t.BLOCK_ATTRIBUTE = 9)] = "BLOCK_ATTRIBUTE"), + (t[(t.INLINE_ATTRIBUTE = 5)] = "INLINE_ATTRIBUTE"), + (t[(t.ANY = 15)] = "ANY"); + })(i || (i = {})); + var r = i; + var n = class { + constructor() { + (this.head = null), (this.tail = null), (this.length = 0); + } + append(...t) { + this.insertBefore(t[0], null), + t.length > 1 && this.append.apply(this, t.slice(1)); + } + at(t) { + const e = this.iterator(); + let s = e(); + for (; s && t > 0; ) (t -= 1), (s = e()); + return s; + } + contains(t) { + const e = this.iterator(); + let s = e(); + for (; s; ) { + if (s === t) return !0; + s = e(); + } + return !1; + } + indexOf(t) { + const e = this.iterator(); + let s = e(), + i = 0; + for (; s; ) { + if (s === t) return i; + (i += 1), (s = e()); + } + return -1; + } + insertBefore(t, e) { + null != t && + (this.remove(t), + (t.next = e), + null != e + ? ((t.prev = e.prev), + null != e.prev && (e.prev.next = t), + (e.prev = t), + e === this.head && (this.head = t)) + : null != this.tail + ? ((this.tail.next = t), (t.prev = this.tail), (this.tail = t)) + : ((t.prev = null), (this.head = this.tail = t)), + (this.length += 1)); + } + offset(t) { + let e = 0, + s = this.head; + for (; null != s; ) { + if (s === t) return e; + (e += s.length()), (s = s.next); + } + return -1; + } + remove(t) { + this.contains(t) && + (null != t.prev && (t.prev.next = t.next), + null != t.next && (t.next.prev = t.prev), + t === this.head && (this.head = t.next), + t === this.tail && (this.tail = t.prev), + (this.length -= 1)); + } + iterator(t = this.head) { + return () => { + const e = t; + return null != t && (t = t.next), e; + }; + } + find(t, e = !1) { + const s = this.iterator(); + let i = s(); + for (; i; ) { + const r = i.length(); + if ( + t < r || + (e && t === r && (null == i.next || 0 !== i.next.length())) + ) + return [i, t]; + (t -= r), (i = s()); + } + return [null, 0]; + } + forEach(t) { + const e = this.iterator(); + let s = e(); + for (; s; ) t(s), (s = e()); + } + forEachAt(t, e, s) { + if (e <= 0) return; + const [i, r] = this.find(t); + let n = t - r; + const l = this.iterator(i); + let o = l(); + for (; o && n < t + e; ) { + const i = o.length(); + t > n + ? s(o, t - n, Math.min(e, n + i - t)) + : s(o, 0, Math.min(i, t + e - n)), + (n += i), + (o = l()); + } + } + map(t) { + return this.reduce((e, s) => (e.push(t(s)), e), []); + } + reduce(t, e) { + const s = this.iterator(); + let i = s(); + for (; i; ) (e = t(e, i)), (i = s()); + return e; + } + }; + class l extends Error { + constructor(t) { + super((t = "[Parchment] " + t)), + (this.message = t), + (this.name = this.constructor.name); + } + } + class o { + constructor() { + (this.attributes = {}), + (this.classes = {}), + (this.tags = {}), + (this.types = {}); + } + static find(t, e = !1) { + return null == t + ? null + : this.blots.has(t) + ? this.blots.get(t) || null + : e + ? this.find(t.parentNode, e) + : null; + } + create(t, e, s) { + const i = this.query(e); + if (null == i) throw new l(`Unable to create ${e} blot`); + const r = i, + n = new r( + t, + e instanceof Node || e.nodeType === Node.TEXT_NODE + ? e + : r.create(s), + s + ); + return o.blots.set(n.domNode, n), n; + } + find(t, e = !1) { + return o.find(t, e); + } + query(t, e = r.ANY) { + let s; + if ("string" == typeof t) s = this.types[t] || this.attributes[t]; + else if (t instanceof Text || t.nodeType === Node.TEXT_NODE) + s = this.types.text; + else if ("number" == typeof t) + t & r.LEVEL & r.BLOCK + ? (s = this.types.block) + : t & r.LEVEL & r.INLINE && (s = this.types.inline); + else if (t instanceof HTMLElement) { + (t.getAttribute("class") || "") + .split(/\s+/) + .some((t) => !!(s = this.classes[t])), + (s = s || this.tags[t.tagName]); + } + return null == s + ? null + : e & r.LEVEL & s.scope && e & r.TYPE & s.scope + ? s + : null; + } + register(...t) { + if (t.length > 1) return t.map((t) => this.register(t)); + const e = t[0]; + if ("string" != typeof e.blotName && "string" != typeof e.attrName) + throw new l("Invalid definition"); + if ("abstract" === e.blotName) + throw new l("Cannot register abstract class"); + if ( + ((this.types[e.blotName || e.attrName] = e), + "string" == typeof e.keyName) + ) + this.attributes[e.keyName] = e; + else if ( + (null != e.className && (this.classes[e.className] = e), + null != e.tagName) + ) { + Array.isArray(e.tagName) + ? (e.tagName = e.tagName.map((t) => t.toUpperCase())) + : (e.tagName = e.tagName.toUpperCase()), + (Array.isArray(e.tagName) ? e.tagName : [e.tagName]).forEach( + (t) => { + (null != this.tags[t] && null != e.className) || + (this.tags[t] = e); + } + ); + } + return e; + } + } + o.blots = new WeakMap(); + class a { + constructor(t, e) { + (this.scroll = t), + (this.domNode = e), + o.blots.set(e, this), + (this.prev = null), + (this.next = null); + } + static create(t) { + if (null == this.tagName) + throw new l("Blot definition missing tagName"); + let e; + return ( + Array.isArray(this.tagName) + ? ("string" == typeof t && + ((t = t.toUpperCase()), + parseInt(t, 10).toString() === t && (t = parseInt(t, 10))), + (e = + "number" == typeof t + ? document.createElement(this.tagName[t - 1]) + : this.tagName.indexOf(t) > -1 + ? document.createElement(t) + : document.createElement(this.tagName[0]))) + : (e = document.createElement(this.tagName)), + this.className && e.classList.add(this.className), + e + ); + } + get statics() { + return this.constructor; + } + attach() {} + clone() { + const t = this.domNode.cloneNode(!1); + return this.scroll.create(t); + } + detach() { + null != this.parent && this.parent.removeChild(this), + o.blots.delete(this.domNode); + } + deleteAt(t, e) { + this.isolate(t, e).remove(); + } + formatAt(t, e, s, i) { + const n = this.isolate(t, e); + if (null != this.scroll.query(s, r.BLOT) && i) n.wrap(s, i); + else if (null != this.scroll.query(s, r.ATTRIBUTE)) { + const t = this.scroll.create(this.statics.scope); + n.wrap(t), t.format(s, i); + } + } + insertAt(t, e, s) { + const i = + null == s + ? this.scroll.create("text", e) + : this.scroll.create(e, s), + r = this.split(t); + this.parent.insertBefore(i, r || void 0); + } + isolate(t, e) { + const s = this.split(t); + if (null == s) throw new Error("Attempt to isolate at end"); + return s.split(e), s; + } + length() { + return 1; + } + offset(t = this.parent) { + return null == this.parent || this === t + ? 0 + : this.parent.children.offset(this) + this.parent.offset(t); + } + optimize(t) { + !this.statics.requiredContainer || + this.parent instanceof this.statics.requiredContainer || + this.wrap(this.statics.requiredContainer.blotName); + } + remove() { + null != this.domNode.parentNode && + this.domNode.parentNode.removeChild(this.domNode), + this.detach(); + } + replaceWith(t, e) { + const s = "string" == typeof t ? this.scroll.create(t, e) : t; + return ( + null != this.parent && + (this.parent.insertBefore(s, this.next || void 0), this.remove()), + s + ); + } + split(t, e) { + return 0 === t ? this : this.next; + } + update(t, e) {} + wrap(t, e) { + const s = "string" == typeof t ? this.scroll.create(t, e) : t; + if ( + (null != this.parent && + this.parent.insertBefore(s, this.next || void 0), + "function" != typeof s.appendChild) + ) + throw new l(`Cannot wrap ${t}`); + return s.appendChild(this), s; + } + } + a.blotName = "abstract"; + var u = a; + class c extends u { + constructor(t, e) { + super(t, e), (this.uiNode = null), this.build(); + } + appendChild(t) { + this.insertBefore(t); + } + attach() { + super.attach(), + this.children.forEach((t) => { + t.attach(); + }); + } + attachUI(t) { + null != this.uiNode && this.uiNode.remove(), + (this.uiNode = t), + c.uiClass && this.uiNode.classList.add(c.uiClass), + this.uiNode.setAttribute("contenteditable", "false"), + this.domNode.insertBefore(this.uiNode, this.domNode.firstChild); + } + build() { + (this.children = new n()), + Array.from(this.domNode.childNodes) + .filter((t) => t !== this.uiNode) + .reverse() + .forEach((t) => { + try { + const e = h(t, this.scroll); + this.insertBefore(e, this.children.head || void 0); + } catch (t) { + if (t instanceof l) return; + throw t; + } + }); + } + deleteAt(t, e) { + if (0 === t && e === this.length()) return this.remove(); + this.children.forEachAt(t, e, (t, e, s) => { + t.deleteAt(e, s); + }); + } + descendant(t, e = 0) { + const [s, i] = this.children.find(e); + return (null == t.blotName && t(s)) || + (null != t.blotName && s instanceof t) + ? [s, i] + : s instanceof c + ? s.descendant(t, i) + : [null, -1]; + } + descendants(t, e = 0, s = Number.MAX_VALUE) { + let i = [], + r = s; + return ( + this.children.forEachAt(e, s, (e, s, n) => { + ((null == t.blotName && t(e)) || + (null != t.blotName && e instanceof t)) && + i.push(e), + e instanceof c && (i = i.concat(e.descendants(t, s, r))), + (r -= n); + }), + i + ); + } + detach() { + this.children.forEach((t) => { + t.detach(); + }), + super.detach(); + } + enforceAllowedChildren() { + let t = !1; + this.children.forEach((e) => { + if (t) return; + this.statics.allowedChildren.some((t) => e instanceof t) || + (e.statics.scope === r.BLOCK_BLOT + ? (null != e.next && this.splitAfter(e), + null != e.prev && this.splitAfter(e.prev), + e.parent.unwrap(), + (t = !0)) + : e instanceof c + ? e.unwrap() + : e.remove()); + }); + } + formatAt(t, e, s, i) { + this.children.forEachAt(t, e, (t, e, r) => { + t.formatAt(e, r, s, i); + }); + } + insertAt(t, e, s) { + const [i, r] = this.children.find(t); + if (i) i.insertAt(r, e, s); + else { + const t = + null == s + ? this.scroll.create("text", e) + : this.scroll.create(e, s); + this.appendChild(t); + } + } + insertBefore(t, e) { + null != t.parent && t.parent.children.remove(t); + let s = null; + this.children.insertBefore(t, e || null), + null != e && (s = e.domNode), + (this.domNode.parentNode === t.domNode && + this.domNode.nextSibling === s) || + this.domNode.insertBefore(t.domNode, s), + (t.parent = this), + t.attach(); + } + length() { + return this.children.reduce((t, e) => t + e.length(), 0); + } + moveChildren(t, e) { + this.children.forEach((s) => { + t.insertBefore(s, e); + }); + } + optimize(t) { + if ( + (super.optimize(t), + this.enforceAllowedChildren(), + null != this.uiNode && + this.uiNode !== this.domNode.firstChild && + this.domNode.insertBefore(this.uiNode, this.domNode.firstChild), + 0 === this.children.length) + ) + if (null != this.statics.defaultChild) { + const t = this.scroll.create(this.statics.defaultChild.blotName); + this.appendChild(t); + } else this.remove(); + } + path(t, e = !1) { + const [s, i] = this.children.find(t, e), + r = [[this, t]]; + return s instanceof c + ? r.concat(s.path(i, e)) + : (null != s && r.push([s, i]), r); + } + removeChild(t) { + this.children.remove(t); + } + replaceWith(t, e) { + const s = "string" == typeof t ? this.scroll.create(t, e) : t; + return s instanceof c && this.moveChildren(s), super.replaceWith(s); + } + split(t, e = !1) { + if (!e) { + if (0 === t) return this; + if (t === this.length()) return this.next; + } + const s = this.clone(); + return ( + this.parent && this.parent.insertBefore(s, this.next || void 0), + this.children.forEachAt(t, this.length(), (t, i, r) => { + const n = t.split(i, e); + null != n && s.appendChild(n); + }), + s + ); + } + splitAfter(t) { + const e = this.clone(); + for (; null != t.next; ) e.appendChild(t.next); + return ( + this.parent && this.parent.insertBefore(e, this.next || void 0), e + ); + } + unwrap() { + this.parent && this.moveChildren(this.parent, this.next || void 0), + this.remove(); + } + update(t, e) { + const s = [], + i = []; + t.forEach((t) => { + t.target === this.domNode && + "childList" === t.type && + (s.push.apply(s, t.addedNodes), i.push.apply(i, t.removedNodes)); + }), + i.forEach((t) => { + if ( + null != t.parentNode && + "IFRAME" !== t.tagName && + document.body.compareDocumentPosition(t) & + Node.DOCUMENT_POSITION_CONTAINED_BY + ) + return; + const e = this.scroll.find(t); + null != e && + ((null != e.domNode.parentNode && + e.domNode.parentNode !== this.domNode) || + e.detach()); + }), + s + .filter((t) => t.parentNode === this.domNode || t === this.uiNode) + .sort((t, e) => + t === e + ? 0 + : t.compareDocumentPosition(e) & + Node.DOCUMENT_POSITION_FOLLOWING + ? 1 + : -1 + ) + .forEach((t) => { + let e = null; + null != t.nextSibling && (e = this.scroll.find(t.nextSibling)); + const s = h(t, this.scroll); + (s.next === e && null != s.next) || + (null != s.parent && s.parent.removeChild(this), + this.insertBefore(s, e || void 0)); + }), + this.enforceAllowedChildren(); + } + } + function h(t, e) { + let s = e.find(t); + if (null == s) + try { + s = e.create(t); + } catch (i) { + (s = e.create(r.INLINE)), + Array.from(t.childNodes).forEach((t) => { + s.domNode.appendChild(t); + }), + t.parentNode && t.parentNode.replaceChild(s.domNode, t), + s.attach(); + } + return s; + } + c.uiClass = ""; + var d = c; + class f extends d { + checkMerge() { + return ( + null !== this.next && + this.next.statics.blotName === this.statics.blotName + ); + } + deleteAt(t, e) { + super.deleteAt(t, e), this.enforceAllowedChildren(); + } + formatAt(t, e, s, i) { + super.formatAt(t, e, s, i), this.enforceAllowedChildren(); + } + insertAt(t, e, s) { + super.insertAt(t, e, s), this.enforceAllowedChildren(); + } + optimize(t) { + super.optimize(t), + this.children.length > 0 && + null != this.next && + this.checkMerge() && + (this.next.moveChildren(this), this.next.remove()); + } + } + (f.blotName = "container"), (f.scope = r.BLOCK_BLOT); + var p = f; + class m extends u { + static value(t) { + return !0; + } + index(t, e) { + return this.domNode === t || + this.domNode.compareDocumentPosition(t) & + Node.DOCUMENT_POSITION_CONTAINED_BY + ? Math.min(e, 1) + : -1; + } + position(t, e) { + let s = Array.from(this.parent.domNode.childNodes).indexOf( + this.domNode + ); + return t > 0 && (s += 1), [this.parent.domNode, s]; + } + value() { + return { + [this.statics.blotName]: this.statics.value(this.domNode) || !0, + }; + } + } + m.scope = r.INLINE_BLOT; + var g = m; + class b { + static keys(t) { + return Array.from(t.attributes).map((t) => t.name); + } + constructor(t, e, s = {}) { + (this.attrName = t), (this.keyName = e); + const i = r.TYPE & r.ATTRIBUTE; + (this.scope = + null != s.scope ? (s.scope & r.LEVEL) | i : r.ATTRIBUTE), + null != s.whitelist && (this.whitelist = s.whitelist); + } + add(t, e) { + return !!this.canAdd(t, e) && (t.setAttribute(this.keyName, e), !0); + } + canAdd(t, e) { + return ( + null == this.whitelist || + ("string" == typeof e + ? this.whitelist.indexOf(e.replace(/["']/g, "")) > -1 + : this.whitelist.indexOf(e) > -1) + ); + } + remove(t) { + t.removeAttribute(this.keyName); + } + value(t) { + const e = t.getAttribute(this.keyName); + return this.canAdd(t, e) && e ? e : ""; + } + } + function y(t, e) { + return (t.getAttribute("class") || "") + .split(/\s+/) + .filter((t) => 0 === t.indexOf(`${e}-`)); + } + var v = class extends b { + static keys(t) { + return (t.getAttribute("class") || "") + .split(/\s+/) + .map((t) => t.split("-").slice(0, -1).join("-")); + } + add(t, e) { + return ( + !!this.canAdd(t, e) && + (this.remove(t), t.classList.add(`${this.keyName}-${e}`), !0) + ); + } + remove(t) { + y(t, this.keyName).forEach((e) => { + t.classList.remove(e); + }), + 0 === t.classList.length && t.removeAttribute("class"); + } + value(t) { + const e = (y(t, this.keyName)[0] || "").slice( + this.keyName.length + 1 + ); + return this.canAdd(t, e) ? e : ""; + } + }; + function x(t) { + const e = t.split("-"), + s = e + .slice(1) + .map((t) => t[0].toUpperCase() + t.slice(1)) + .join(""); + return e[0] + s; + } + var N = class extends b { + static keys(t) { + return (t.getAttribute("style") || "") + .split(";") + .map((t) => t.split(":")[0].trim()); + } + add(t, e) { + return !!this.canAdd(t, e) && ((t.style[x(this.keyName)] = e), !0); + } + remove(t) { + (t.style[x(this.keyName)] = ""), + t.getAttribute("style") || t.removeAttribute("style"); + } + value(t) { + const e = t.style[x(this.keyName)]; + return this.canAdd(t, e) ? e : ""; + } + }; + var E = class { + constructor(t) { + (this.attributes = {}), (this.domNode = t), this.build(); + } + attribute(t, e) { + e + ? t.add(this.domNode, e) && + (null != t.value(this.domNode) + ? (this.attributes[t.attrName] = t) + : delete this.attributes[t.attrName]) + : (t.remove(this.domNode), delete this.attributes[t.attrName]); + } + build() { + this.attributes = {}; + const t = o.find(this.domNode); + if (null == t) return; + const e = b.keys(this.domNode), + s = v.keys(this.domNode), + i = N.keys(this.domNode); + e.concat(s) + .concat(i) + .forEach((e) => { + const s = t.scroll.query(e, r.ATTRIBUTE); + s instanceof b && (this.attributes[s.attrName] = s); + }); + } + copy(t) { + Object.keys(this.attributes).forEach((e) => { + const s = this.attributes[e].value(this.domNode); + t.format(e, s); + }); + } + move(t) { + this.copy(t), + Object.keys(this.attributes).forEach((t) => { + this.attributes[t].remove(this.domNode); + }), + (this.attributes = {}); + } + values() { + return Object.keys(this.attributes).reduce( + (t, e) => ((t[e] = this.attributes[e].value(this.domNode)), t), + {} + ); + } + }; + class A extends d { + constructor(t, e) { + super(t, e), (this.attributes = new E(this.domNode)); + } + static formats(t, e) { + const s = e.query(A.blotName); + if (null == s || t.tagName !== s.tagName) + return ( + "string" == typeof this.tagName || + (Array.isArray(this.tagName) ? t.tagName.toLowerCase() : void 0) + ); + } + format(t, e) { + if (t !== this.statics.blotName || e) { + const s = this.scroll.query(t, r.INLINE); + if (null == s) return; + s instanceof b + ? this.attributes.attribute(s, e) + : !e || + (t === this.statics.blotName && this.formats()[t] === e) || + this.replaceWith(t, e); + } else + this.children.forEach((t) => { + t instanceof A || (t = t.wrap(A.blotName, !0)), + this.attributes.copy(t); + }), + this.unwrap(); + } + formats() { + const t = this.attributes.values(), + e = this.statics.formats(this.domNode, this.scroll); + return null != e && (t[this.statics.blotName] = e), t; + } + formatAt(t, e, s, i) { + if (null != this.formats()[s] || this.scroll.query(s, r.ATTRIBUTE)) { + this.isolate(t, e).format(s, i); + } else super.formatAt(t, e, s, i); + } + optimize(t) { + super.optimize(t); + const e = this.formats(); + if (0 === Object.keys(e).length) return this.unwrap(); + const s = this.next; + s instanceof A && + s.prev === this && + (function (t, e) { + if (Object.keys(t).length !== Object.keys(e).length) return !1; + for (const s in t) if (t[s] !== e[s]) return !1; + return !0; + })(e, s.formats()) && + (s.moveChildren(this), s.remove()); + } + replaceWith(t, e) { + const s = super.replaceWith(t, e); + return this.attributes.copy(s), s; + } + update(t, e) { + super.update(t, e), + t.some( + (t) => t.target === this.domNode && "attributes" === t.type + ) && this.attributes.build(); + } + wrap(t, e) { + const s = super.wrap(t, e); + return s instanceof A && this.attributes.move(s), s; + } + } + (A.allowedChildren = [A, g]), + (A.blotName = "inline"), + (A.scope = r.INLINE_BLOT), + (A.tagName = "SPAN"); + var q = A; + class w extends d { + constructor(t, e) { + super(t, e), (this.attributes = new E(this.domNode)); + } + static formats(t, e) { + const s = e.query(w.blotName); + if (null == s || t.tagName !== s.tagName) + return ( + "string" == typeof this.tagName || + (Array.isArray(this.tagName) ? t.tagName.toLowerCase() : void 0) + ); + } + format(t, e) { + const s = this.scroll.query(t, r.BLOCK); + null != s && + (s instanceof b + ? this.attributes.attribute(s, e) + : t !== this.statics.blotName || e + ? !e || + (t === this.statics.blotName && this.formats()[t] === e) || + this.replaceWith(t, e) + : this.replaceWith(w.blotName)); + } + formats() { + const t = this.attributes.values(), + e = this.statics.formats(this.domNode, this.scroll); + return null != e && (t[this.statics.blotName] = e), t; + } + formatAt(t, e, s, i) { + null != this.scroll.query(s, r.BLOCK) + ? this.format(s, i) + : super.formatAt(t, e, s, i); + } + insertAt(t, e, s) { + if (null == s || null != this.scroll.query(e, r.INLINE)) + super.insertAt(t, e, s); + else { + const i = this.split(t); + if (null == i) + throw new Error("Attempt to insertAt after block boundaries"); + { + const t = this.scroll.create(e, s); + i.parent.insertBefore(t, i); + } + } + } + replaceWith(t, e) { + const s = super.replaceWith(t, e); + return this.attributes.copy(s), s; + } + update(t, e) { + super.update(t, e), + t.some( + (t) => t.target === this.domNode && "attributes" === t.type + ) && this.attributes.build(); + } + } + (w.blotName = "block"), + (w.scope = r.BLOCK_BLOT), + (w.tagName = "P"), + (w.allowedChildren = [q, w, g]); + var k = w; + var L = class extends g { + static formats(t, e) {} + format(t, e) { + super.formatAt(0, this.length(), t, e); + } + formatAt(t, e, s, i) { + 0 === t && e === this.length() + ? this.format(s, i) + : super.formatAt(t, e, s, i); + } + formats() { + return this.statics.formats(this.domNode, this.scroll); + } + }; + const T = { + attributes: !0, + characterData: !0, + characterDataOldValue: !0, + childList: !0, + subtree: !0, + }, + S = 100; + class O extends d { + constructor(t, e) { + super(null, e), + (this.registry = t), + (this.scroll = this), + this.build(), + (this.observer = new MutationObserver((t) => { + this.update(t); + })), + this.observer.observe(this.domNode, T), + this.attach(); + } + create(t, e) { + return this.registry.create(this, t, e); + } + find(t, e = !1) { + return this.registry.find(t, e); + } + query(t, e = r.ANY) { + return this.registry.query(t, e); + } + register(...t) { + return this.registry.register(...t); + } + build() { + null != this.scroll && super.build(); + } + detach() { + super.detach(), this.observer.disconnect(); + } + deleteAt(t, e) { + this.update(), + 0 === t && e === this.length() + ? this.children.forEach((t) => { + t.remove(); + }) + : super.deleteAt(t, e); + } + formatAt(t, e, s, i) { + this.update(), super.formatAt(t, e, s, i); + } + insertAt(t, e, s) { + this.update(), super.insertAt(t, e, s); + } + optimize(t = [], e = {}) { + super.optimize(e); + const s = e.mutationsMap || new WeakMap(); + let i = Array.from(this.observer.takeRecords()); + for (; i.length > 0; ) t.push(i.pop()); + const r = (t, e = !0) => { + null != t && + t !== this && + null != t.domNode.parentNode && + (s.has(t.domNode) || s.set(t.domNode, []), e && r(t.parent)); + }, + n = (t) => { + s.has(t.domNode) && + (t instanceof d && t.children.forEach(n), + s.delete(t.domNode), + t.optimize(e)); + }; + let l = t; + for (let e = 0; l.length > 0; e += 1) { + if (e >= S) + throw new Error( + "[Parchment] Maximum optimize iterations reached" + ); + for ( + l.forEach((t) => { + const e = this.find(t.target, !0); + null != e && + (e.domNode === t.target && + ("childList" === t.type + ? (r(this.find(t.previousSibling, !1)), + Array.from(t.addedNodes).forEach((t) => { + const e = this.find(t, !1); + r(e, !1), + e instanceof d && + e.children.forEach((t) => { + r(t, !1); + }); + })) + : "attributes" === t.type && r(e.prev)), + r(e)); + }), + this.children.forEach(n), + i = (l = Array.from(this.observer.takeRecords())).slice(); + i.length > 0; + + ) + t.push(i.pop()); + } + } + update(t, e = {}) { + t = t || this.observer.takeRecords(); + const s = new WeakMap(); + t + .map((t) => { + const e = o.find(t.target, !0); + return null == e + ? null + : s.has(e.domNode) + ? (s.get(e.domNode).push(t), null) + : (s.set(e.domNode, [t]), e); + }) + .forEach((t) => { + null != t && + t !== this && + s.has(t.domNode) && + t.update(s.get(t.domNode) || [], e); + }), + (e.mutationsMap = s), + s.has(this.domNode) && super.update(s.get(this.domNode), e), + this.optimize(t, e); + } + } + (O.blotName = "scroll"), + (O.defaultChild = k), + (O.allowedChildren = [k, p]), + (O.scope = r.BLOCK_BLOT), + (O.tagName = "DIV"); + var C = O; + class _ extends g { + constructor(t, e) { + super(t, e), (this.text = this.statics.value(this.domNode)); + } + static create(t) { + return document.createTextNode(t); + } + static value(t) { + return t.data; + } + deleteAt(t, e) { + this.domNode.data = this.text = + this.text.slice(0, t) + this.text.slice(t + e); + } + index(t, e) { + return this.domNode === t ? e : -1; + } + insertAt(t, e, s) { + null == s + ? ((this.text = this.text.slice(0, t) + e + this.text.slice(t)), + (this.domNode.data = this.text)) + : super.insertAt(t, e, s); + } + length() { + return this.text.length; + } + optimize(t) { + super.optimize(t), + (this.text = this.statics.value(this.domNode)), + 0 === this.text.length + ? this.remove() + : this.next instanceof _ && + this.next.prev === this && + (this.insertAt(this.length(), this.next.value()), + this.next.remove()); + } + position(t, e = !1) { + return [this.domNode, t]; + } + split(t, e = !1) { + if (!e) { + if (0 === t) return this; + if (t === this.length()) return this.next; + } + const s = this.scroll.create(this.domNode.splitText(t)); + return ( + this.parent.insertBefore(s, this.next || void 0), + (this.text = this.statics.value(this.domNode)), + s + ); + } + update(t, e) { + t.some( + (t) => "characterData" === t.type && t.target === this.domNode + ) && (this.text = this.statics.value(this.domNode)); + } + value() { + return this.text; + } + } + (_.blotName = "text"), (_.scope = r.INLINE_BLOT); + var M = _; + s.d(e, "ParentBlot", function () { + return d; + }), + s.d(e, "ContainerBlot", function () { + return p; + }), + s.d(e, "LeafBlot", function () { + return g; + }), + s.d(e, "EmbedBlot", function () { + return L; + }), + s.d(e, "ScrollBlot", function () { + return C; + }), + s.d(e, "BlockBlot", function () { + return k; + }), + s.d(e, "InlineBlot", function () { + return q; + }), + s.d(e, "TextBlot", function () { + return M; + }), + s.d(e, "Attributor", function () { + return b; + }), + s.d(e, "ClassAttributor", function () { + return v; + }), + s.d(e, "StyleAttributor", function () { + return N; + }), + s.d(e, "AttributorStore", function () { + return E; + }), + s.d(e, "Registry", function () { + return o; + }), + s.d(e, "Scope", function () { + return r; + }); + }, + function (t, e, s) { + "use strict"; + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t }; + }, + r = i(s(11)), + n = i(s(2)), + l = i(s(40)), + o = i(s(41)), + a = i(s(21)), + u = String.fromCharCode(0), + c = (function () { + function t(t) { + Array.isArray(t) + ? (this.ops = t) + : null != t && Array.isArray(t.ops) + ? (this.ops = t.ops) + : (this.ops = []); + } + return ( + (t.prototype.insert = function (t, e) { + var s = {}; + return "string" == typeof t && 0 === t.length + ? this + : ((s.insert = t), + null != e && + "object" == typeof e && + Object.keys(e).length > 0 && + (s.attributes = e), + this.push(s)); + }), + (t.prototype.delete = function (t) { + return t <= 0 ? this : this.push({ delete: t }); + }), + (t.prototype.retain = function (t, e) { + if (t <= 0) return this; + var s = { retain: t }; + return ( + null != e && + "object" == typeof e && + Object.keys(e).length > 0 && + (s.attributes = e), + this.push(s) + ); + }), + (t.prototype.push = function (t) { + var e = this.ops.length, + s = this.ops[e - 1]; + if (((t = n.default(!0, {}, t)), "object" == typeof s)) { + if ("number" == typeof t.delete && "number" == typeof s.delete) + return ( + (this.ops[e - 1] = { delete: s.delete + t.delete }), this + ); + if ( + "number" == typeof s.delete && + null != t.insert && + ((e -= 1), "object" != typeof (s = this.ops[e - 1])) + ) + return this.ops.unshift(t), this; + if (r.default(t.attributes, s.attributes)) { + if ( + "string" == typeof t.insert && + "string" == typeof s.insert + ) + return ( + (this.ops[e - 1] = { insert: s.insert + t.insert }), + "object" == typeof t.attributes && + (this.ops[e - 1].attributes = t.attributes), + this + ); + if ( + "number" == typeof t.retain && + "number" == typeof s.retain + ) + return ( + (this.ops[e - 1] = { retain: s.retain + t.retain }), + "object" == typeof t.attributes && + (this.ops[e - 1].attributes = t.attributes), + this + ); + } + } + return ( + e === this.ops.length + ? this.ops.push(t) + : this.ops.splice(e, 0, t), + this + ); + }), + (t.prototype.chop = function () { + var t = this.ops[this.ops.length - 1]; + return t && t.retain && !t.attributes && this.ops.pop(), this; + }), + (t.prototype.filter = function (t) { + return this.ops.filter(t); + }), + (t.prototype.forEach = function (t) { + this.ops.forEach(t); + }), + (t.prototype.map = function (t) { + return this.ops.map(t); + }), + (t.prototype.partition = function (t) { + var e = [], + s = []; + return ( + this.forEach(function (i) { + (t(i) ? e : s).push(i); + }), + [e, s] + ); + }), + (t.prototype.reduce = function (t, e) { + return this.ops.reduce(t, e); + }), + (t.prototype.changeLength = function () { + return this.reduce(function (t, e) { + return e.insert + ? t + a.default.length(e) + : e.delete + ? t - e.delete + : t; + }, 0); + }), + (t.prototype.length = function () { + return this.reduce(function (t, e) { + return t + a.default.length(e); + }, 0); + }), + (t.prototype.slice = function (e, s) { + void 0 === e && (e = 0), void 0 === s && (s = 1 / 0); + for ( + var i = [], r = a.default.iterator(this.ops), n = 0; + n < s && r.hasNext(); + + ) { + var l = void 0; + n < e ? (l = r.next(e - n)) : ((l = r.next(s - n)), i.push(l)), + (n += a.default.length(l)); + } + return new t(i); + }), + (t.prototype.compose = function (e) { + var s = a.default.iterator(this.ops), + i = a.default.iterator(e.ops), + n = [], + l = i.peek(); + if ( + null != l && + "number" == typeof l.retain && + null == l.attributes + ) { + for ( + var u = l.retain; + "insert" === s.peekType() && s.peekLength() <= u; + + ) + (u -= s.peekLength()), n.push(s.next()); + l.retain - u > 0 && i.next(l.retain - u); + } + for (var c = new t(n); s.hasNext() || i.hasNext(); ) + if ("insert" === i.peekType()) c.push(i.next()); + else if ("delete" === s.peekType()) c.push(s.next()); + else { + var h = Math.min(s.peekLength(), i.peekLength()), + d = s.next(h), + f = i.next(h); + if ("number" == typeof f.retain) { + var p = {}; + "number" == typeof d.retain + ? (p.retain = h) + : (p.insert = d.insert); + var m = o.default.compose( + d.attributes, + f.attributes, + "number" == typeof d.retain + ); + if ( + (m && (p.attributes = m), + c.push(p), + !i.hasNext() && r.default(c.ops[c.ops.length - 1], p)) + ) { + var g = new t(s.rest()); + return c.concat(g).chop(); + } + } else + "number" == typeof f.delete && + "number" == typeof d.retain && + c.push(f); + } + return c.chop(); + }), + (t.prototype.concat = function (e) { + var s = new t(this.ops.slice()); + return ( + e.ops.length > 0 && + (s.push(e.ops[0]), (s.ops = s.ops.concat(e.ops.slice(1)))), + s + ); + }), + (t.prototype.diff = function (e, s) { + if (this.ops === e.ops) return new t(); + var i = [this, e].map(function (t) { + return t + .map(function (s) { + if (null != s.insert) + return "string" == typeof s.insert ? s.insert : u; + throw new Error( + "diff() called " + + (t === e ? "on" : "with") + + " non-document" + ); + }) + .join(""); + }), + n = new t(), + c = l.default(i[0], i[1], s), + h = a.default.iterator(this.ops), + d = a.default.iterator(e.ops); + return ( + c.forEach(function (t) { + for (var e = t[1].length; e > 0; ) { + var s = 0; + switch (t[0]) { + case l.default.INSERT: + (s = Math.min(d.peekLength(), e)), n.push(d.next(s)); + break; + case l.default.DELETE: + (s = Math.min(e, h.peekLength())), + h.next(s), + n.delete(s); + break; + case l.default.EQUAL: + s = Math.min(h.peekLength(), d.peekLength(), e); + var i = h.next(s), + a = d.next(s); + r.default(i.insert, a.insert) + ? n.retain( + s, + o.default.diff(i.attributes, a.attributes) + ) + : n.push(a).delete(s); + } + e -= s; + } + }), + n.chop() + ); + }), + (t.prototype.eachLine = function (e, s) { + void 0 === s && (s = "\n"); + for ( + var i = a.default.iterator(this.ops), r = new t(), n = 0; + i.hasNext(); + + ) { + if ("insert" !== i.peekType()) return; + var l = i.peek(), + o = a.default.length(l) - i.peekLength(), + u = + "string" == typeof l.insert + ? l.insert.indexOf(s, o) - o + : -1; + if (u < 0) r.push(i.next()); + else if (u > 0) r.push(i.next(u)); + else { + if (!1 === e(r, i.next(1).attributes || {}, n)) return; + (n += 1), (r = new t()); + } + } + r.length() > 0 && e(r, {}, n); + }), + (t.prototype.transform = function (e, s) { + if ((void 0 === s && (s = !1), (s = !!s), "number" == typeof e)) + return this.transformPosition(e, s); + for ( + var i = e, + r = a.default.iterator(this.ops), + n = a.default.iterator(i.ops), + l = new t(); + r.hasNext() || n.hasNext(); + + ) + if ( + "insert" !== r.peekType() || + (!s && "insert" === n.peekType()) + ) + if ("insert" === n.peekType()) l.push(n.next()); + else { + var u = Math.min(r.peekLength(), n.peekLength()), + c = r.next(u), + h = n.next(u); + if (c.delete) continue; + h.delete + ? l.push(h) + : l.retain( + u, + o.default.transform(c.attributes, h.attributes, s) + ); + } + else l.retain(a.default.length(r.next())); + return l.chop(); + }), + (t.prototype.transformPosition = function (t, e) { + void 0 === e && (e = !1), (e = !!e); + for ( + var s = a.default.iterator(this.ops), i = 0; + s.hasNext() && i <= t; + + ) { + var r = s.peekLength(), + n = s.peekType(); + s.next(), + "delete" !== n + ? ("insert" === n && (i < t || !e) && (t += r), (i += r)) + : (t -= Math.min(r, t - i)); + } + return t; + }), + (t.Op = a.default), + (t.AttributeMap = o.default), + t + ); + })(); + t.exports = c; + }, + function (t, e) { + "use strict"; + var s = Object.prototype.hasOwnProperty, + i = Object.prototype.toString, + r = Object.defineProperty, + n = Object.getOwnPropertyDescriptor, + l = function (t) { + return "function" == typeof Array.isArray + ? Array.isArray(t) + : "[object Array]" === i.call(t); + }, + o = function (t) { + if (!t || "[object Object]" !== i.call(t)) return !1; + var e, + r = s.call(t, "constructor"), + n = + t.constructor && + t.constructor.prototype && + s.call(t.constructor.prototype, "isPrototypeOf"); + if (t.constructor && !r && !n) return !1; + for (e in t); + return void 0 === e || s.call(t, e); + }, + a = function (t, e) { + r && "__proto__" === e.name + ? r(t, e.name, { + enumerable: !0, + configurable: !0, + value: e.newValue, + writable: !0, + }) + : (t[e.name] = e.newValue); + }, + u = function (t, e) { + if ("__proto__" === e) { + if (!s.call(t, e)) return; + if (n) return n(t, e).value; + } + return t[e]; + }; + t.exports = function t() { + var e, + s, + i, + r, + n, + c, + h = arguments[0], + d = 1, + f = arguments.length, + p = !1; + for ( + "boolean" == typeof h && ((p = h), (h = arguments[1] || {}), (d = 2)), + (null == h || ("object" != typeof h && "function" != typeof h)) && + (h = {}); + d < f; + ++d + ) + if (null != (e = arguments[d])) + for (s in e) + (i = u(h, s)), + h !== (r = u(e, s)) && + (p && r && (o(r) || (n = l(r))) + ? (n + ? ((n = !1), (c = i && l(i) ? i : [])) + : (c = i && o(i) ? i : {}), + a(h, { name: s, newValue: t(p, c, r) })) + : void 0 !== r && a(h, { name: s, newValue: r })); + return h; + }; + }, + function (t, e, s) { + "use strict"; + Object.defineProperty(e, "__esModule", { value: !0 }), + (e.default = e.BlockEmbed = e.bubbleFormats = e.blockDelta = void 0); + var i = u(s(2)), + r = u(s(1)), + n = s(0), + l = u(s(9)), + o = u(s(5)), + a = u(s(6)); + function u(t) { + return t && t.__esModule ? t : { default: t }; + } + const c = 1; + class h extends n.BlockBlot { + constructor(t, e) { + super(t, e), (this.cache = {}); + } + delta() { + return ( + null == this.cache.delta && (this.cache.delta = f(this)), + this.cache.delta + ); + } + deleteAt(t, e) { + super.deleteAt(t, e), (this.cache = {}); + } + formatAt(t, e, s, i) { + e <= 0 || + (this.scroll.query(s, n.Scope.BLOCK) + ? t + e === this.length() && this.format(s, i) + : super.formatAt(t, Math.min(e, this.length() - t - 1), s, i), + (this.cache = {})); + } + insertAt(t, e, s) { + if (null != s) return super.insertAt(t, e, s), void (this.cache = {}); + if (0 === e.length) return; + const i = e.split("\n"), + r = i.shift(); + r.length > 0 && + (t < this.length() - 1 || null == this.children.tail + ? super.insertAt(Math.min(t, this.length() - 1), r) + : this.children.tail.insertAt(this.children.tail.length(), r), + (this.cache = {})); + let n = this; + i.reduce( + (t, e) => ((n = n.split(t, !0)).insertAt(0, e), e.length), + t + r.length + ); + } + insertBefore(t, e) { + const s = this.children.head; + super.insertBefore(t, e), + s instanceof l.default && s.remove(), + (this.cache = {}); + } + length() { + return ( + null == this.cache.length && + (this.cache.length = super.length() + c), + this.cache.length + ); + } + moveChildren(t, e) { + super.moveChildren(t, e), (this.cache = {}); + } + optimize(t) { + super.optimize(t), (this.cache = {}); + } + path(t) { + return super.path(t, !0); + } + removeChild(t) { + super.removeChild(t), (this.cache = {}); + } + split(t, e = !1) { + if (e && (0 === t || t >= this.length() - c)) { + const e = this.clone(); + return 0 === t + ? (this.parent.insertBefore(e, this), this) + : (this.parent.insertBefore(e, this.next), e); + } + const s = super.split(t, e); + return (this.cache = {}), s; + } + } + (h.blotName = "block"), + (h.tagName = "P"), + (h.defaultChild = l.default), + (h.allowedChildren = [l.default, o.default, n.EmbedBlot, a.default]); + class d extends n.EmbedBlot { + attach() { + super.attach(), + (this.attributes = new n.AttributorStore(this.domNode)); + } + delta() { + return new r.default().insert( + this.value(), + (0, i.default)(this.formats(), this.attributes.values()) + ); + } + format(t, e) { + const s = this.scroll.query(t, n.Scope.BLOCK_ATTRIBUTE); + null != s && this.attributes.attribute(s, e); + } + formatAt(t, e, s, i) { + this.format(s, i); + } + insertAt(t, e, s) { + if ("string" == typeof e && e.endsWith("\n")) { + const s = this.scroll.create(h.blotName); + this.parent.insertBefore(s, 0 === t ? this : this.next), + s.insertAt(0, e.slice(0, -1)); + } else super.insertAt(t, e, s); + } + } + function f(t) { + return t + .descendants(n.LeafBlot) + .reduce( + (t, e) => (0 === e.length() ? t : t.insert(e.value(), p(e))), + new r.default() + ) + .insert("\n", p(t)); + } + function p(t, e = {}) { + return null == t + ? e + : ("function" == typeof t.formats && + delete (e = (0, i.default)(e, t.formats()))["code-token"], + null == t.parent || + "scroll" === t.parent.statics.blotName || + t.parent.statics.scope !== t.statics.scope + ? e + : p(t.parent, e)); + } + (d.scope = n.Scope.BLOCK_BLOT), + (e.blockDelta = f), + (e.bubbleFormats = p), + (e.BlockEmbed = d), + (e.default = h); + }, + function (t, e, s) { + "use strict"; + Object.defineProperty(e, "__esModule", { value: !0 }), + (e.default = e.overload = e.expandConfig = e.globalRegistry = void 0); + var i = (function () { + return function (t, e) { + if (Array.isArray(t)) return t; + if (Symbol.iterator in Object(t)) + return (function (t, e) { + var s = [], + i = !0, + r = !1, + n = void 0; + try { + for ( + var l, o = t[Symbol.iterator](); + !(i = (l = o.next()).done) && + (s.push(l.value), !e || s.length !== e); + i = !0 + ); + } catch (t) { + (r = !0), (n = t); + } finally { + try { + !i && o.return && o.return(); + } finally { + if (r) throw n; + } + } + return s; + })(t, e); + throw new TypeError( + "Invalid attempt to destructure non-iterable instance" + ); + }; + })(), + r = m(s(1)), + n = (function (t) { + if (t && t.__esModule) return t; + var e = {}; + if (null != t) + for (var s in t) + Object.prototype.hasOwnProperty.call(t, s) && (e[s] = t[s]); + return (e.default = t), e; + })(s(0)), + l = m(s(2)), + o = m(s(43)), + a = m(s(8)), + u = m(s(7)), + c = s(13), + h = m(c), + d = m(s(22)), + f = m(s(10)), + p = m(s(23)); + function m(t) { + return t && t.__esModule ? t : { default: t }; + } + const g = (0, f.default)("quill"), + b = new n.Registry(); + n.ParentBlot.uiClass = "ql-ui"; + class y { + static debug(t) { + !0 === t && (t = "log"), f.default.level(t); + } + static find(t) { + return d.default.get(t) || b.find(t); + } + static import(t) { + return ( + null == this.imports[t] && + g.error(`Cannot import ${t}. Are you sure it was registered?`), + this.imports[t] + ); + } + static register(t, e, s = !1) { + if ("string" != typeof t) { + const s = t.attrName || t.blotName; + "string" == typeof s + ? this.register(`formats/${s}`, t, e) + : Object.keys(t).forEach((s) => { + this.register(s, t[s], e); + }); + } else + null == this.imports[t] || s || g.warn(`Overwriting ${t} with`, e), + (this.imports[t] = e), + (t.startsWith("blots/") || t.startsWith("formats/")) && + "abstract" !== e.blotName && + b.register(e), + "function" == typeof e.register && e.register(b); + } + constructor(t, e = {}) { + if ( + ((this.options = v(t, e)), + (this.container = this.options.container), + null == this.container) + ) + return g.error("Invalid Quill container", t); + this.options.debug && y.debug(this.options.debug); + const s = this.container.innerHTML.trim(); + this.container.classList.add("ql-container"), + (this.container.innerHTML = ""), + d.default.set(this.container, this), + (this.root = this.addContainer("ql-editor")), + this.root.addEventListener("dragstart", (t) => { + t.preventDefault(); + }), + this.root.classList.add("ql-blank"), + this.root.setAttribute("data-gramm", !1), + (this.scrollingContainer = + this.options.scrollingContainer || this.root), + (this.emitter = new a.default()); + const r = this.options.registry.query(n.ScrollBlot.blotName); + (this.scroll = new r(this.options.registry, this.root, { + emitter: this.emitter, + })), + (this.editor = new o.default(this.scroll)), + (this.selection = new h.default(this.scroll, this.emitter)), + (this.theme = new this.options.theme(this, this.options)), + (this.keyboard = this.theme.addModule("keyboard")), + (this.clipboard = this.theme.addModule("clipboard")), + (this.history = this.theme.addModule("history")), + (this.uploader = this.theme.addModule("uploader")), + this.theme.init(), + this.emitter.on(a.default.events.EDITOR_CHANGE, (t) => { + t === a.default.events.TEXT_CHANGE && + this.root.classList.toggle("ql-blank", this.editor.isBlank()); + }), + this.emitter.on(a.default.events.SCROLL_UPDATE, (t, e) => { + const s = this.selection.lastRange; + var r = this.selection.getRange(); + const n = i(r, 1)[0], + l = s && n ? { oldRange: s, newRange: n } : void 0; + x.call(this, () => this.editor.update(null, e, l), t); + }); + const l = this.clipboard.convert({ + html: `${s}
${(0, o.escapeText)(s)}`;
+ }
+ }
+ class f extends i.default {
+ static register() {
+ c.default.register(d);
+ }
+ }
+ class p extends l.default {}
+ (p.blotName = "code"),
+ (p.tagName = "CODE"),
+ (f.blotName = "code-block"),
+ (f.className = "ql-code-block"),
+ (f.tagName = "DIV"),
+ (d.blotName = "code-block-container"),
+ (d.className = "ql-code-block-container"),
+ (d.tagName = "DIV"),
+ (d.allowedChildren = [f]),
+ (f.allowedChildren = [a.default, r.default, n.default]),
+ (f.requiredContainer = d),
+ (f.TAB = " "),
+ (e.Code = p),
+ (e.CodeBlockContainer = d),
+ (e.default = f);
+ },
+ function (t, e, s) {
+ "use strict";
+ var i = _(s(64)),
+ r = _(s(65)),
+ n = _(s(66)),
+ l = _(s(67)),
+ o = _(s(68)),
+ a = _(s(69)),
+ u = _(s(70)),
+ c = _(s(71)),
+ h = _(s(72)),
+ d = _(s(73)),
+ f = _(s(74)),
+ p = _(s(75)),
+ m = _(s(76)),
+ g = _(s(77)),
+ b = _(s(78)),
+ y = _(s(79)),
+ v = _(s(80)),
+ x = _(s(81)),
+ N = _(s(82)),
+ E = _(s(83)),
+ A = _(s(84)),
+ q = _(s(85)),
+ w = _(s(86)),
+ k = _(s(87)),
+ L = _(s(88)),
+ T = _(s(89)),
+ S = _(s(90)),
+ O = _(s(91)),
+ C = _(s(92));
+ function _(t) {
+ return t && t.__esModule ? t : { default: t };
+ }
+ t.exports = {
+ align: {
+ "": i.default,
+ center: r.default,
+ right: n.default,
+ justify: l.default,
+ },
+ background: o.default,
+ blockquote: a.default,
+ bold: u.default,
+ clean: c.default,
+ code: h.default,
+ "code-block": h.default,
+ color: d.default,
+ direction: { "": f.default, rtl: p.default },
+ formula: m.default,
+ header: { 1: g.default, 2: b.default },
+ italic: y.default,
+ image: v.default,
+ indent: { "+1": x.default, "-1": N.default },
+ link: E.default,
+ list: { bullet: A.default, check: q.default, ordered: w.default },
+ script: { sub: k.default, super: L.default },
+ strike: T.default,
+ table: S.default,
+ underline: O.default,
+ video: C.default,
+ };
+ },
+ function (t, e, s) {
+ "use strict";
+ var i =
+ (this && this.__importDefault) ||
+ function (t) {
+ return t && t.__esModule ? t : { default: t };
+ };
+ Object.defineProperty(e, "__esModule", { value: !0 });
+ var r,
+ n = i(s(42));
+ !(function (t) {
+ (t.iterator = function (t) {
+ return new n.default(t);
+ }),
+ (t.length = function (t) {
+ return "number" == typeof t.delete
+ ? t.delete
+ : "number" == typeof t.retain
+ ? t.retain
+ : "string" == typeof t.insert
+ ? t.insert.length
+ : 1;
+ });
+ })(r || (r = {})),
+ (e.default = r);
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 }),
+ (e.default = new WeakMap());
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 });
+ class i {
+ constructor(t, e) {
+ (this.quill = t), (this.options = e), (this.modules = {});
+ }
+ init() {
+ Object.keys(this.options.modules).forEach((t) => {
+ null == this.modules[t] && this.addModule(t);
+ });
+ }
+ addModule(t) {
+ const e = this.quill.constructor.import(`modules/${t}`);
+ return (
+ (this.modules[t] = new e(
+ this.quill,
+ this.options.modules[t] || {}
+ )),
+ this.modules[t]
+ );
+ }
+ }
+ (i.DEFAULTS = { modules: {} }),
+ (i.themes = { default: i }),
+ (e.default = i);
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 });
+ var i = s(0),
+ r = (function (t) {
+ return t && t.__esModule ? t : { default: t };
+ })(s(6));
+ const n = "\ufeff";
+ e.default = class extends i.EmbedBlot {
+ constructor(t, e) {
+ super(t, e),
+ (this.contentNode = document.createElement("span")),
+ this.contentNode.setAttribute("contenteditable", !1),
+ Array.from(this.domNode.childNodes).forEach((t) => {
+ this.contentNode.appendChild(t);
+ }),
+ (this.leftGuard = document.createTextNode(n)),
+ (this.rightGuard = document.createTextNode(n)),
+ this.domNode.appendChild(this.leftGuard),
+ this.domNode.appendChild(this.contentNode),
+ this.domNode.appendChild(this.rightGuard);
+ }
+ index(t, e) {
+ return t === this.leftGuard
+ ? 0
+ : t === this.rightGuard
+ ? 1
+ : super.index(t, e);
+ }
+ restore(t) {
+ let e, s;
+ const i = t.data.split(n).join("");
+ if (t === this.leftGuard)
+ if (this.prev instanceof r.default) {
+ const t = this.prev.length();
+ this.prev.insertAt(t, i),
+ (e = {
+ startNode: this.prev.domNode,
+ startOffset: t + i.length,
+ });
+ } else
+ (s = document.createTextNode(i)),
+ this.parent.insertBefore(this.scroll.create(s), this),
+ (e = { startNode: s, startOffset: i.length });
+ else
+ t === this.rightGuard &&
+ (this.next instanceof r.default
+ ? (this.next.insertAt(0, i),
+ (e = { startNode: this.next.domNode, startOffset: i.length }))
+ : ((s = document.createTextNode(i)),
+ this.parent.insertBefore(this.scroll.create(s), this.next),
+ (e = { startNode: s, startOffset: i.length })));
+ return (t.data = n), e;
+ }
+ update(t, e) {
+ t.forEach((t) => {
+ if (
+ "characterData" === t.type &&
+ (t.target === this.leftGuard || t.target === this.rightGuard)
+ ) {
+ const s = this.restore(t.target);
+ s && (e.range = s);
+ }
+ });
+ }
+ };
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 }),
+ (e.traverse =
+ e.matchText =
+ e.matchNewline =
+ e.matchBlot =
+ e.matchAttributor =
+ e.default =
+ void 0);
+ var i = (function () {
+ return function (t, e) {
+ if (Array.isArray(t)) return t;
+ if (Symbol.iterator in Object(t))
+ return (function (t, e) {
+ var s = [],
+ i = !0,
+ r = !1,
+ n = void 0;
+ try {
+ for (
+ var l, o = t[Symbol.iterator]();
+ !(i = (l = o.next()).done) &&
+ (s.push(l.value), !e || s.length !== e);
+ i = !0
+ );
+ } catch (t) {
+ (r = !0), (n = t);
+ } finally {
+ try {
+ !i && o.return && o.return();
+ } finally {
+ if (r) throw n;
+ }
+ }
+ return s;
+ })(t, e);
+ throw new TypeError(
+ "Invalid attempt to destructure non-iterable instance"
+ );
+ };
+ })(),
+ r = b(s(2)),
+ n = b(s(1)),
+ l = s(0),
+ o = b(s(4)),
+ a = b(s(10)),
+ u = b(s(7)),
+ c = s(26),
+ h = s(27),
+ d = b(s(19)),
+ f = s(18),
+ p = s(28),
+ m = s(29),
+ g = s(30);
+ function b(t) {
+ return t && t.__esModule ? t : { default: t };
+ }
+ const y = (0, a.default)("quill:clipboard"),
+ v = [
+ [Node.TEXT_NODE, _],
+ [Node.TEXT_NODE, C],
+ [
+ "br",
+ function (t, e) {
+ q(e, "\n") || e.insert("\n");
+ return e;
+ },
+ ],
+ [Node.ELEMENT_NODE, C],
+ [Node.ELEMENT_NODE, O],
+ [Node.ELEMENT_NODE, S],
+ [
+ Node.ELEMENT_NODE,
+ function (t, e) {
+ const s = {},
+ i = t.style || {};
+ "italic" === i.fontStyle && (s.italic = !0);
+ (i.fontWeight.startsWith("bold") ||
+ parseInt(i.fontWeight, 10) >= 700) &&
+ (s.bold = !0);
+ Object.keys(s).length > 0 && (e = A(e, s));
+ if (parseFloat(i.textIndent || 0) > 0)
+ return new n.default().insert("\t").concat(e);
+ return e;
+ },
+ ],
+ [
+ "li",
+ function (t, e, s) {
+ const i = s.query(t);
+ if (null == i || "list" !== i.blotName || !q(e, "\n")) return e;
+ let r = -1,
+ l = t.parentNode;
+ for (; null != l; )
+ ["OL", "UL"].includes(l.tagName) && (r += 1),
+ (l = l.parentNode);
+ return r <= 0
+ ? e
+ : e.compose(
+ new n.default()
+ .retain(e.length() - 1)
+ .retain(1, { indent: r })
+ );
+ },
+ ],
+ [
+ "ol, ul",
+ function (t, e) {
+ const s = "OL" === t.tagName ? "ordered" : "bullet";
+ return A(e, "list", s);
+ },
+ ],
+ [
+ "pre",
+ function (t, e, s) {
+ const i = s.query("code-block"),
+ r = !i || i.formats(t, s);
+ return A(e, "code-block", r);
+ },
+ ],
+ [
+ "tr",
+ function (t, e) {
+ const s =
+ "TABLE" === t.parentNode.tagName
+ ? t.parentNode
+ : t.parentNode.parentNode,
+ i = Array.from(s.querySelectorAll("tr")).indexOf(t) + 1;
+ return A(e, "table", i);
+ },
+ ],
+ ["b", T.bind(T, "bold")],
+ ["i", T.bind(T, "italic")],
+ [
+ "style",
+ function () {
+ return new n.default();
+ },
+ ],
+ ],
+ x = [c.AlignAttribute, p.DirectionAttribute].reduce(
+ (t, e) => ((t[e.keyName] = e), t),
+ {}
+ ),
+ N = [
+ c.AlignStyle,
+ h.BackgroundStyle,
+ f.ColorStyle,
+ p.DirectionStyle,
+ m.FontStyle,
+ g.SizeStyle,
+ ].reduce((t, e) => ((t[e.keyName] = e), t), {});
+ class E extends u.default {
+ constructor(t, e) {
+ super(t, e),
+ this.quill.root.addEventListener("copy", (t) =>
+ this.onCaptureCopy(t, !1)
+ ),
+ this.quill.root.addEventListener("cut", (t) =>
+ this.onCaptureCopy(t, !0)
+ ),
+ this.quill.root.addEventListener(
+ "paste",
+ this.onCapturePaste.bind(this)
+ ),
+ (this.matchers = []),
+ v.concat(this.options.matchers).forEach(([t, e]) => {
+ this.addMatcher(t, e);
+ });
+ }
+ addMatcher(t, e) {
+ this.matchers.push([t, e]);
+ }
+ convert({ html: t, text: e }, s = {}) {
+ if (s[d.default.blotName])
+ return new n.default().insert(e, {
+ [d.default.blotName]: s[d.default.blotName],
+ });
+ if (!t) return new n.default().insert(e || "");
+ const r = new DOMParser().parseFromString(t, "text/html").body,
+ l = new WeakMap();
+ var o = this.prepareMatching(r, l),
+ a = i(o, 2);
+ const u = a[0],
+ c = a[1],
+ h = L(this.quill.scroll, r, u, c, l);
+ return q(h, "\n") &&
+ (null == h.ops[h.ops.length - 1].attributes || s.table)
+ ? h.compose(new n.default().retain(h.length() - 1).delete(1))
+ : h;
+ }
+ dangerouslyPasteHTML(t, e, s = o.default.sources.API) {
+ if ("string" == typeof t) {
+ const s = this.convert({ html: t, text: "" });
+ this.quill.setContents(s, e),
+ this.quill.setSelection(0, o.default.sources.SILENT);
+ } else {
+ const i = this.convert({ html: e, text: "" });
+ this.quill.updateContents(new n.default().retain(t).concat(i), s),
+ this.quill.setSelection(t + i.length(), o.default.sources.SILENT);
+ }
+ }
+ onCaptureCopy(t, e = !1) {
+ if (t.defaultPrevented) return;
+ t.preventDefault();
+ var s = this.quill.selection.getRange();
+ const r = i(s, 1)[0];
+ if (null == r) return;
+ var n = this.onCopy(r, e);
+ const l = n.html,
+ a = n.text;
+ t.clipboardData.setData("text/plain", a),
+ t.clipboardData.setData("text/html", l),
+ e && this.quill.deleteText(r, o.default.sources.USER);
+ }
+ onCapturePaste(t) {
+ if (t.defaultPrevented || !this.quill.isEnabled()) return;
+ t.preventDefault();
+ const e = this.quill.getSelection(!0);
+ if (null == e) return;
+ const s = t.clipboardData.getData("text/html"),
+ i = t.clipboardData.getData("text/plain"),
+ r = Array.from(t.clipboardData.files || []);
+ !s && r.length > 0
+ ? this.quill.uploader.upload(e, r)
+ : this.onPaste(e, { html: s, text: i });
+ }
+ onCopy(t) {
+ const e = this.quill.getText(t);
+ return { html: this.quill.getSemanticHTML(t), text: e };
+ }
+ onPaste(t, { text: e, html: s }) {
+ const i = this.quill.getFormat(t.index),
+ r = this.convert({ text: e, html: s }, i);
+ y.log("onPaste", r, { text: e, html: s });
+ const l = new n.default().retain(t.index).delete(t.length).concat(r);
+ this.quill.updateContents(l, o.default.sources.USER),
+ this.quill.setSelection(
+ l.length() - t.length,
+ o.default.sources.SILENT
+ ),
+ this.quill.scrollIntoView();
+ }
+ prepareMatching(t, e) {
+ const s = [],
+ r = [];
+ return (
+ this.matchers.forEach((n) => {
+ var l = i(n, 2);
+ const o = l[0],
+ a = l[1];
+ switch (o) {
+ case Node.TEXT_NODE:
+ r.push(a);
+ break;
+ case Node.ELEMENT_NODE:
+ s.push(a);
+ break;
+ default:
+ Array.from(t.querySelectorAll(o)).forEach((t) => {
+ if (e.has(t)) {
+ e.get(t).push(a);
+ } else e.set(t, [a]);
+ });
+ }
+ }),
+ [s, r]
+ );
+ }
+ }
+ function A(t, e, s) {
+ return "object" == typeof e
+ ? Object.keys(e).reduce((t, s) => A(t, s, e[s]), t)
+ : t.reduce(
+ (t, i) =>
+ i.attributes && i.attributes[e]
+ ? t.push(i)
+ : t.insert(
+ i.insert,
+ (0, r.default)({}, { [e]: s }, i.attributes)
+ ),
+ new n.default()
+ );
+ }
+ function q(t, e) {
+ let s = "";
+ for (let i = t.ops.length - 1; i >= 0 && s.length < e.length; --i) {
+ const e = t.ops[i];
+ if ("string" != typeof e.insert) break;
+ s = e.insert + s;
+ }
+ return s.slice(-1 * e.length) === e;
+ }
+ function w(t) {
+ return (
+ 0 !== t.childNodes.length &&
+ [
+ "address",
+ "article",
+ "blockquote",
+ "canvas",
+ "dd",
+ "div",
+ "dl",
+ "dt",
+ "fieldset",
+ "figcaption",
+ "figure",
+ "footer",
+ "form",
+ "h1",
+ "h2",
+ "h3",
+ "h4",
+ "h5",
+ "h6",
+ "header",
+ "iframe",
+ "li",
+ "main",
+ "nav",
+ "ol",
+ "output",
+ "p",
+ "pre",
+ "section",
+ "table",
+ "td",
+ "tr",
+ "ul",
+ "video",
+ ].includes(t.tagName.toLowerCase())
+ );
+ }
+ E.DEFAULTS = { matchers: [] };
+ const k = new WeakMap();
+ function L(t, e, s, i, r) {
+ return e.nodeType === e.TEXT_NODE
+ ? i.reduce((s, i) => i(e, s, t), new n.default())
+ : e.nodeType === e.ELEMENT_NODE
+ ? Array.from(e.childNodes || []).reduce((n, l) => {
+ let o = L(t, l, s, i, r);
+ return (
+ l.nodeType === e.ELEMENT_NODE &&
+ ((o = s.reduce((e, s) => s(l, e, t), o)),
+ (o = (r.get(l) || []).reduce((e, s) => s(l, e, t), o))),
+ n.concat(o)
+ );
+ }, new n.default())
+ : new n.default();
+ }
+ function T(t, e, s) {
+ return A(s, t, !0);
+ }
+ function S(t, e, s) {
+ const i = l.Attributor.keys(t),
+ r = l.ClassAttributor.keys(t),
+ n = l.StyleAttributor.keys(t),
+ o = {};
+ return (
+ i
+ .concat(r)
+ .concat(n)
+ .forEach((e) => {
+ let i = s.query(e, l.Scope.ATTRIBUTE);
+ (null != i && ((o[i.attrName] = i.value(t)), o[i.attrName])) ||
+ (null == (i = x[e]) ||
+ (i.attrName !== e && i.keyName !== e) ||
+ (o[i.attrName] = i.value(t) || void 0),
+ null == (i = N[e]) ||
+ (i.attrName !== e && i.keyName !== e) ||
+ ((i = N[e]), (o[i.attrName] = i.value(t) || void 0)));
+ }),
+ Object.keys(o).length > 0 ? A(e, o) : e
+ );
+ }
+ function O(t, e, s) {
+ const i = s.query(t);
+ if (null == i) return e;
+ if (i.prototype instanceof l.EmbedBlot) {
+ const e = {},
+ r = i.value(t);
+ if (null != r)
+ return (
+ (e[i.blotName] = r), new n.default().insert(e, i.formats(t, s))
+ );
+ } else if (
+ (i.prototype instanceof l.BlockBlot && !q(e, "\n") && e.insert("\n"),
+ "function" == typeof i.formats)
+ )
+ return A(e, i.blotName, i.formats(t, s));
+ return e;
+ }
+ function C(t, e) {
+ return (
+ q(e, "\n") ||
+ ((w(t) || (e.length() > 0 && t.nextSibling && w(t.nextSibling))) &&
+ e.insert("\n")),
+ e
+ );
+ }
+ function _(t, e) {
+ let s = t.data;
+ if ("O:P" === t.parentNode.tagName) return e.insert(s.trim());
+ if (0 === s.trim().length) return e;
+ if (
+ !(function t(e) {
+ return (
+ null != e &&
+ (k.has(e) ||
+ ("PRE" === e.tagName
+ ? k.set(e, !0)
+ : k.set(e, t(e.parentNode))),
+ k.get(e))
+ );
+ })(t)
+ ) {
+ const e = (t, e) => {
+ const s = e.replace(/[^\u00a0]/g, "");
+ return s.length < 1 && t ? " " : s;
+ };
+ (s = (s = s.replace(/\r\n/g, " ").replace(/\n/g, " ")).replace(
+ /\s\s+/g,
+ e.bind(e, !0)
+ )),
+ ((null == t.previousSibling && w(t.parentNode)) ||
+ (null != t.previousSibling && w(t.previousSibling))) &&
+ (s = s.replace(/^\s+/, e.bind(e, !1))),
+ ((null == t.nextSibling && w(t.parentNode)) ||
+ (null != t.nextSibling && w(t.nextSibling))) &&
+ (s = s.replace(/\s+$/, e.bind(e, !1)));
+ }
+ return e.insert(s);
+ }
+ (e.default = E),
+ (e.matchAttributor = S),
+ (e.matchBlot = O),
+ (e.matchNewline = C),
+ (e.matchText = _),
+ (e.traverse = L);
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 }),
+ (e.AlignStyle = e.AlignClass = e.AlignAttribute = void 0);
+ var i = s(0);
+ const r = {
+ scope: i.Scope.BLOCK,
+ whitelist: ["right", "center", "justify"],
+ },
+ n = new i.Attributor("align", "align", r),
+ l = new i.ClassAttributor("align", "ql-align", r),
+ o = new i.StyleAttributor("align", "text-align", r);
+ (e.AlignAttribute = n), (e.AlignClass = l), (e.AlignStyle = o);
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 }),
+ (e.BackgroundStyle = e.BackgroundClass = void 0);
+ var i = s(0),
+ r = s(18);
+ const n = new i.ClassAttributor("background", "ql-bg", {
+ scope: i.Scope.INLINE,
+ }),
+ l = new r.ColorAttributor("background", "background-color", {
+ scope: i.Scope.INLINE,
+ });
+ (e.BackgroundClass = n), (e.BackgroundStyle = l);
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 }),
+ (e.DirectionStyle = e.DirectionClass = e.DirectionAttribute = void 0);
+ var i = s(0);
+ const r = { scope: i.Scope.BLOCK, whitelist: ["rtl"] },
+ n = new i.Attributor("direction", "dir", r),
+ l = new i.ClassAttributor("direction", "ql-direction", r),
+ o = new i.StyleAttributor("direction", "direction", r);
+ (e.DirectionAttribute = n),
+ (e.DirectionClass = l),
+ (e.DirectionStyle = o);
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 }),
+ (e.FontClass = e.FontStyle = void 0);
+ var i = s(0);
+ const r = { scope: i.Scope.INLINE, whitelist: ["serif", "monospace"] },
+ n = new i.ClassAttributor("font", "ql-font", r);
+ const l = new (class extends i.StyleAttributor {
+ value(t) {
+ return super.value(t).replace(/["']/g, "");
+ }
+ })("font", "font-family", r);
+ (e.FontStyle = l), (e.FontClass = n);
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 }),
+ (e.SizeStyle = e.SizeClass = void 0);
+ var i = s(0);
+ const r = new i.ClassAttributor("size", "ql-size", {
+ scope: i.Scope.INLINE,
+ whitelist: ["small", "large", "huge"],
+ }),
+ n = new i.StyleAttributor("size", "font-size", {
+ scope: i.Scope.INLINE,
+ whitelist: ["10px", "18px", "32px"],
+ });
+ (e.SizeClass = r), (e.SizeStyle = n);
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 });
+ var i = (function (t) {
+ return t && t.__esModule ? t : { default: t };
+ })(s(5));
+ class r extends i.default {
+ static create() {
+ return super.create();
+ }
+ static formats() {
+ return !0;
+ }
+ optimize(t) {
+ super.optimize(t),
+ this.domNode.tagName !== this.statics.tagName[0] &&
+ this.replaceWith(this.statics.blotName);
+ }
+ }
+ (r.blotName = "bold"), (r.tagName = ["STRONG", "B"]), (e.default = r);
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 });
+ var i = (function (t) {
+ return t && t.__esModule ? t : { default: t };
+ })(s(16));
+ e.default = class extends i.default {
+ constructor(t, e) {
+ super(t),
+ (this.label.innerHTML = e),
+ this.container.classList.add("ql-color-picker"),
+ Array.from(this.container.querySelectorAll(".ql-picker-item"))
+ .slice(0, 7)
+ .forEach((t) => {
+ t.classList.add("ql-primary");
+ });
+ }
+ buildItem(t) {
+ const e = super.buildItem(t);
+ return (e.style.backgroundColor = t.getAttribute("value") || ""), e;
+ }
+ selectItem(t, e) {
+ super.selectItem(t, e);
+ const s = this.label.querySelector(".ql-color-label"),
+ i = (t && t.getAttribute("data-value")) || "";
+ s &&
+ ("line" === s.tagName ? (s.style.stroke = i) : (s.style.fill = i));
+ }
+ };
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 });
+ var i = (function (t) {
+ return t && t.__esModule ? t : { default: t };
+ })(s(16));
+ e.default = class extends i.default {
+ constructor(t, e) {
+ super(t),
+ this.container.classList.add("ql-icon-picker"),
+ Array.from(
+ this.container.querySelectorAll(".ql-picker-item")
+ ).forEach((t) => {
+ t.innerHTML = e[t.getAttribute("data-value") || ""];
+ }),
+ (this.defaultItem = this.container.querySelector(".ql-selected")),
+ this.selectItem(this.defaultItem);
+ }
+ selectItem(t, e) {
+ super.selectItem(t, e);
+ const s = t || this.defaultItem;
+ this.label.innerHTML !== s.innerHTML &&
+ (this.label.innerHTML = s.innerHTML);
+ }
+ };
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 });
+ e.default = class {
+ constructor(t, e) {
+ (this.quill = t),
+ (this.boundsContainer = e || document.body),
+ (this.root = t.addContainer("ql-tooltip")),
+ (this.root.innerHTML = this.constructor.TEMPLATE),
+ this.quill.root === this.quill.scrollingContainer &&
+ this.quill.root.addEventListener("scroll", () => {
+ this.root.style.marginTop = `${
+ -1 * this.quill.root.scrollTop
+ }px`;
+ }),
+ this.hide();
+ }
+ hide() {
+ this.root.classList.add("ql-hidden");
+ }
+ position(t) {
+ const e = t.left + t.width / 2 - this.root.offsetWidth / 2,
+ s = t.bottom + this.quill.root.scrollTop;
+ (this.root.style.left = `${e}px`),
+ (this.root.style.top = `${s}px`),
+ this.root.classList.remove("ql-flip");
+ const i = this.boundsContainer.getBoundingClientRect(),
+ r = this.root.getBoundingClientRect();
+ let n = 0;
+ if (
+ (r.right > i.right &&
+ ((n = i.right - r.right), (this.root.style.left = `${e + n}px`)),
+ r.left < i.left &&
+ ((n = i.left - r.left), (this.root.style.left = `${e + n}px`)),
+ r.bottom > i.bottom)
+ ) {
+ const e = r.bottom - r.top,
+ i = t.bottom - t.top + e;
+ (this.root.style.top = `${s - i}px`),
+ this.root.classList.add("ql-flip");
+ }
+ return n;
+ }
+ show() {
+ this.root.classList.remove("ql-editing"),
+ this.root.classList.remove("ql-hidden");
+ }
+ };
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 }),
+ (e.default = e.BaseTooltip = void 0);
+ var i = c(s(2)),
+ r = c(s(8)),
+ n = c(s(23)),
+ l = c(s(32)),
+ o = c(s(33)),
+ a = c(s(16)),
+ u = c(s(34));
+ function c(t) {
+ return t && t.__esModule ? t : { default: t };
+ }
+ const h = [!1, "center", "right", "justify"],
+ d = [
+ "#000000",
+ "#e60000",
+ "#ff9900",
+ "#ffff00",
+ "#008a00",
+ "#0066cc",
+ "#9933ff",
+ "#ffffff",
+ "#facccc",
+ "#ffebcc",
+ "#ffffcc",
+ "#cce8cc",
+ "#cce0f5",
+ "#ebd6ff",
+ "#bbbbbb",
+ "#f06666",
+ "#ffc266",
+ "#ffff66",
+ "#66b966",
+ "#66a3e0",
+ "#c285ff",
+ "#888888",
+ "#a10000",
+ "#b26b00",
+ "#b2b200",
+ "#006100",
+ "#0047b2",
+ "#6b24b2",
+ "#444444",
+ "#5c0000",
+ "#663d00",
+ "#666600",
+ "#003700",
+ "#002966",
+ "#3d1466",
+ ],
+ f = [!1, "serif", "monospace"],
+ p = ["1", "2", "3", !1],
+ m = ["small", !1, "large", "huge"];
+ class g extends n.default {
+ constructor(t, e) {
+ super(t, e);
+ const s = (e) => {
+ document.body.contains(t.root)
+ ? (null == this.tooltip ||
+ this.tooltip.root.contains(e.target) ||
+ document.activeElement === this.tooltip.textbox ||
+ this.quill.hasFocus() ||
+ this.tooltip.hide(),
+ null != this.pickers &&
+ this.pickers.forEach((t) => {
+ t.container.contains(e.target) || t.close();
+ }))
+ : document.body.removeEventListener("click", s);
+ };
+ t.emitter.listenDOM("click", document.body, s);
+ }
+ addModule(t) {
+ const e = super.addModule(t);
+ return "toolbar" === t && this.extendToolbar(e), e;
+ }
+ buildButtons(t, e) {
+ Array.from(t).forEach((t) => {
+ (t.getAttribute("class") || "").split(/\s+/).forEach((s) => {
+ if (
+ s.startsWith("ql-") &&
+ ((s = s.slice("ql-".length)), null != e[s])
+ )
+ if ("direction" === s) t.innerHTML = e[s][""] + e[s].rtl;
+ else if ("string" == typeof e[s]) t.innerHTML = e[s];
+ else {
+ const i = t.value || "";
+ null != i && e[s][i] && (t.innerHTML = e[s][i]);
+ }
+ });
+ });
+ }
+ buildPickers(t, e) {
+ this.pickers = Array.from(t).map((t) => {
+ if (t.classList.contains("ql-align"))
+ return (
+ null == t.querySelector("option") && b(t, h),
+ new o.default(t, e.align)
+ );
+ if (
+ t.classList.contains("ql-background") ||
+ t.classList.contains("ql-color")
+ ) {
+ const s = t.classList.contains("ql-background")
+ ? "background"
+ : "color";
+ return (
+ null == t.querySelector("option") &&
+ b(t, d, "background" === s ? "#ffffff" : "#000000"),
+ new l.default(t, e[s])
+ );
+ }
+ return (
+ null == t.querySelector("option") &&
+ (t.classList.contains("ql-font")
+ ? b(t, f)
+ : t.classList.contains("ql-header")
+ ? b(t, p)
+ : t.classList.contains("ql-size") && b(t, m)),
+ new a.default(t)
+ );
+ });
+ this.quill.on(r.default.events.EDITOR_CHANGE, () => {
+ this.pickers.forEach((t) => {
+ t.update();
+ });
+ });
+ }
+ }
+ g.DEFAULTS = (0, i.default)(!0, {}, n.default.DEFAULTS, {
+ modules: {
+ toolbar: {
+ handlers: {
+ formula() {
+ this.quill.theme.tooltip.edit("formula");
+ },
+ image() {
+ let t = this.container.querySelector(
+ "input.ql-image[type=file]"
+ );
+ null == t &&
+ ((t = document.createElement("input")).setAttribute(
+ "type",
+ "file"
+ ),
+ t.setAttribute(
+ "accept",
+ this.quill.uploader.options.mimetypes.join(", ")
+ ),
+ t.classList.add("ql-image"),
+ t.addEventListener("change", () => {
+ const e = this.quill.getSelection(!0);
+ this.quill.uploader.upload(e, t.files), (t.value = "");
+ }),
+ this.container.appendChild(t)),
+ t.click();
+ },
+ video() {
+ this.quill.theme.tooltip.edit("video");
+ },
+ },
+ },
+ },
+ });
+ function b(t, e, s = !1) {
+ e.forEach((e) => {
+ const i = document.createElement("option");
+ e === s
+ ? i.setAttribute("selected", "selected")
+ : i.setAttribute("value", e),
+ t.appendChild(i);
+ });
+ }
+ (e.BaseTooltip = class extends u.default {
+ constructor(t, e) {
+ super(t, e),
+ (this.textbox = this.root.querySelector('input[type="text"]')),
+ this.listen();
+ }
+ listen() {
+ this.textbox.addEventListener("keydown", (t) => {
+ "Enter" === t.key
+ ? (this.save(), t.preventDefault())
+ : "Escape" === t.key && (this.cancel(), t.preventDefault());
+ });
+ }
+ cancel() {
+ this.hide();
+ }
+ edit(t = "link", e = null) {
+ this.root.classList.remove("ql-hidden"),
+ this.root.classList.add("ql-editing"),
+ null != e
+ ? (this.textbox.value = e)
+ : t !== this.root.getAttribute("data-mode") &&
+ (this.textbox.value = ""),
+ this.position(
+ this.quill.getBounds(this.quill.selection.savedRange)
+ ),
+ this.textbox.select(),
+ this.textbox.setAttribute(
+ "placeholder",
+ this.textbox.getAttribute(`data-${t}`) || ""
+ ),
+ this.root.setAttribute("data-mode", t);
+ }
+ restoreFocus() {
+ const t = this.quill.scrollingContainer.scrollTop;
+ this.quill.focus(), (this.quill.scrollingContainer.scrollTop = t);
+ }
+ save() {
+ let t = this.textbox.value;
+ switch (this.root.getAttribute("data-mode")) {
+ case "link": {
+ const e = this.quill.root.scrollTop;
+ this.linkRange
+ ? (this.quill.formatText(
+ this.linkRange,
+ "link",
+ t,
+ r.default.sources.USER
+ ),
+ delete this.linkRange)
+ : (this.restoreFocus(),
+ this.quill.format("link", t, r.default.sources.USER)),
+ (this.quill.root.scrollTop = e);
+ break;
+ }
+ case "video":
+ t = (function (t) {
+ let e =
+ t.match(
+ /^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/
+ ) ||
+ t.match(
+ /^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/
+ );
+ return e
+ ? `${e[1] || "https"}://www.youtube.com/embed/${
+ e[2]
+ }?showinfo=0`
+ : (e = t.match(
+ /^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/
+ ))
+ ? `${e[1] || "https"}://player.vimeo.com/video/${e[2]}/`
+ : t;
+ })(t);
+ case "formula": {
+ if (!t) break;
+ const e = this.quill.getSelection(!0);
+ if (null != e) {
+ const s = e.index + e.length;
+ this.quill.insertEmbed(
+ s,
+ this.root.getAttribute("data-mode"),
+ t,
+ r.default.sources.USER
+ ),
+ "formula" === this.root.getAttribute("data-mode") &&
+ this.quill.insertText(s + 1, " ", r.default.sources.USER),
+ this.quill.setSelection(s + 2, r.default.sources.USER);
+ }
+ break;
+ }
+ }
+ (this.textbox.value = ""), this.hide();
+ }
+ }),
+ (e.default = g);
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 });
+ var i = B(s(37)),
+ r = s(26),
+ n = s(28),
+ l = B(s(49)),
+ o = B(s(50)),
+ a = B(s(51)),
+ u = B(s(52)),
+ c = s(27),
+ h = s(18),
+ d = s(29),
+ f = s(30),
+ p = B(s(31)),
+ m = B(s(53)),
+ g = B(s(15)),
+ b = B(s(54)),
+ y = B(s(55)),
+ v = B(s(56)),
+ x = B(s(57)),
+ N = B(s(58)),
+ E = B(s(59)),
+ A = s(19),
+ q = B(A),
+ w = B(s(60)),
+ k = B(s(61)),
+ L = B(s(63)),
+ T = B(s(20)),
+ S = B(s(16)),
+ O = B(s(32)),
+ C = B(s(33)),
+ _ = B(s(34)),
+ M = B(s(94)),
+ R = B(s(95));
+ function B(t) {
+ return t && t.__esModule ? t : { default: t };
+ }
+ i.default.register(
+ {
+ "attributors/attribute/direction": n.DirectionAttribute,
+ "attributors/class/align": r.AlignClass,
+ "attributors/class/background": c.BackgroundClass,
+ "attributors/class/color": h.ColorClass,
+ "attributors/class/direction": n.DirectionClass,
+ "attributors/class/font": d.FontClass,
+ "attributors/class/size": f.SizeClass,
+ "attributors/style/align": r.AlignStyle,
+ "attributors/style/background": c.BackgroundStyle,
+ "attributors/style/color": h.ColorStyle,
+ "attributors/style/direction": n.DirectionStyle,
+ "attributors/style/font": d.FontStyle,
+ "attributors/style/size": f.SizeStyle,
+ },
+ !0
+ ),
+ i.default.register(
+ {
+ "formats/align": r.AlignClass,
+ "formats/direction": n.DirectionClass,
+ "formats/indent": l.default,
+ "formats/background": c.BackgroundStyle,
+ "formats/color": h.ColorStyle,
+ "formats/font": d.FontClass,
+ "formats/size": f.SizeClass,
+ "formats/blockquote": o.default,
+ "formats/code-block": q.default,
+ "formats/header": a.default,
+ "formats/list": u.default,
+ "formats/bold": p.default,
+ "formats/code": A.Code,
+ "formats/italic": m.default,
+ "formats/link": g.default,
+ "formats/script": b.default,
+ "formats/strike": y.default,
+ "formats/underline": v.default,
+ "formats/formula": x.default,
+ "formats/image": N.default,
+ "formats/video": E.default,
+ "modules/syntax": w.default,
+ "modules/table": k.default,
+ "modules/toolbar": L.default,
+ "themes/bubble": M.default,
+ "themes/snow": R.default,
+ "ui/icons": T.default,
+ "ui/picker": S.default,
+ "ui/icon-picker": C.default,
+ "ui/color-picker": O.default,
+ "ui/tooltip": _.default,
+ },
+ !0
+ ),
+ (e.default = i.default);
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 });
+ var i = b(s(4)),
+ r = s(3),
+ n = b(r),
+ l = b(s(9)),
+ o = b(s(12)),
+ a = b(s(14)),
+ u = b(s(24)),
+ c = b(s(5)),
+ h = b(s(45)),
+ d = b(s(6)),
+ f = b(s(25)),
+ p = b(s(46)),
+ m = b(s(47)),
+ g = b(s(48));
+ function b(t) {
+ return t && t.__esModule ? t : { default: t };
+ }
+ i.default.register({
+ "blots/block": n.default,
+ "blots/block/embed": r.BlockEmbed,
+ "blots/break": l.default,
+ "blots/container": o.default,
+ "blots/cursor": a.default,
+ "blots/embed": u.default,
+ "blots/inline": c.default,
+ "blots/scroll": h.default,
+ "blots/text": d.default,
+ "modules/clipboard": f.default,
+ "modules/history": p.default,
+ "modules/keyboard": m.default,
+ "modules/uploader": g.default,
+ }),
+ (e.default = i.default);
+ },
+ function (t, e) {
+ function s(t) {
+ var e = [];
+ for (var s in t) e.push(s);
+ return e;
+ }
+ (t.exports = "function" == typeof Object.keys ? Object.keys : s).shim = s;
+ },
+ function (t, e) {
+ var s =
+ "[object Arguments]" ==
+ (function () {
+ return Object.prototype.toString.call(arguments);
+ })();
+ function i(t) {
+ return "[object Arguments]" == Object.prototype.toString.call(t);
+ }
+ function r(t) {
+ return (
+ (t &&
+ "object" == typeof t &&
+ "number" == typeof t.length &&
+ Object.prototype.hasOwnProperty.call(t, "callee") &&
+ !Object.prototype.propertyIsEnumerable.call(t, "callee")) ||
+ !1
+ );
+ }
+ ((e = t.exports = s ? i : r).supported = i), (e.unsupported = r);
+ },
+ function (t, e) {
+ var s = -1,
+ i = 1,
+ r = 0;
+ function n(t, e, u, c) {
+ if (t === e) return t ? [[r, t]] : [];
+ if (null != u) {
+ var p = (function (t, e, s) {
+ var i = "number" == typeof s ? { index: s, length: 0 } : s.oldRange,
+ r = "number" == typeof s ? null : s.newRange,
+ n = t.length,
+ l = e.length;
+ if (0 === i.length && (null === r || 0 === r.length)) {
+ var o = i.index,
+ a = t.slice(0, o),
+ u = t.slice(o),
+ c = r ? r.index : null,
+ h = o + l - n;
+ if ((null === c || c === h) && !(h < 0 || h > l)) {
+ var d = e.slice(0, h),
+ p = e.slice(h);
+ if (p === u) {
+ var m = Math.min(o, h),
+ g = a.slice(0, m),
+ b = d.slice(0, m);
+ if (g === b) {
+ var y = a.slice(m),
+ v = d.slice(m);
+ return f(g, y, v, u);
+ }
+ }
+ }
+ if (null === c || c === o) {
+ var x = o,
+ d = e.slice(0, x),
+ p = e.slice(x);
+ if (d === a) {
+ var N = Math.min(n - x, l - x),
+ E = u.slice(u.length - N),
+ A = p.slice(p.length - N);
+ if (E === A) {
+ var y = u.slice(0, u.length - N),
+ v = p.slice(0, p.length - N);
+ return f(a, y, v, E);
+ }
+ }
+ }
+ }
+ if (i.length > 0 && r && 0 === r.length) {
+ var g = t.slice(0, i.index),
+ E = t.slice(i.index + i.length),
+ m = g.length,
+ N = E.length;
+ if (!(l < m + N)) {
+ var b = e.slice(0, m),
+ A = e.slice(l - N);
+ if (g === b && E === A) {
+ var y = t.slice(m, n - N),
+ v = e.slice(m, l - N);
+ return f(g, y, v, E);
+ }
+ }
+ }
+ return null;
+ })(t, e, u);
+ if (p) return p;
+ }
+ var m = o(t, e),
+ g = t.substring(0, m);
+ m = a((t = t.substring(m)), (e = e.substring(m)));
+ var b = t.substring(t.length - m),
+ y = (function (t, e) {
+ var u;
+ if (!t) return [[i, e]];
+ if (!e) return [[s, t]];
+ var c = t.length > e.length ? t : e,
+ h = t.length > e.length ? e : t,
+ d = c.indexOf(h);
+ if (-1 !== d)
+ return (
+ (u = [
+ [i, c.substring(0, d)],
+ [r, h],
+ [i, c.substring(d + h.length)],
+ ]),
+ t.length > e.length && (u[0][0] = u[2][0] = s),
+ u
+ );
+ if (1 === h.length)
+ return [
+ [s, t],
+ [i, e],
+ ];
+ var f = (function (t, e) {
+ var s = t.length > e.length ? t : e,
+ i = t.length > e.length ? e : t;
+ if (s.length < 4 || 2 * i.length < s.length) return null;
+ function r(t, e, s) {
+ for (
+ var i,
+ r,
+ n,
+ l,
+ u = t.substring(s, s + Math.floor(t.length / 4)),
+ c = -1,
+ h = "";
+ -1 !== (c = e.indexOf(u, c + 1));
+
+ ) {
+ var d = o(t.substring(s), e.substring(c)),
+ f = a(t.substring(0, s), e.substring(0, c));
+ h.length < f + d &&
+ ((h = e.substring(c - f, c) + e.substring(c, c + d)),
+ (i = t.substring(0, s - f)),
+ (r = t.substring(s + d)),
+ (n = e.substring(0, c - f)),
+ (l = e.substring(c + d)));
+ }
+ return 2 * h.length >= t.length ? [i, r, n, l, h] : null;
+ }
+ var n,
+ l,
+ u,
+ c,
+ h,
+ d = r(s, i, Math.ceil(s.length / 4)),
+ f = r(s, i, Math.ceil(s.length / 2));
+ if (!d && !f) return null;
+ n = f ? (d && d[4].length > f[4].length ? d : f) : d;
+ t.length > e.length
+ ? ((l = n[0]), (u = n[1]), (c = n[2]), (h = n[3]))
+ : ((c = n[0]), (h = n[1]), (l = n[2]), (u = n[3]));
+ var p = n[4];
+ return [l, u, c, h, p];
+ })(t, e);
+ if (f) {
+ var p = f[0],
+ m = f[1],
+ g = f[2],
+ b = f[3],
+ y = f[4],
+ v = n(p, g),
+ x = n(m, b);
+ return v.concat([[r, y]], x);
+ }
+ return (function (t, e) {
+ for (
+ var r = t.length,
+ n = e.length,
+ o = Math.ceil((r + n) / 2),
+ a = o,
+ u = 2 * o,
+ c = new Array(u),
+ h = new Array(u),
+ d = 0;
+ d < u;
+ d++
+ )
+ (c[d] = -1), (h[d] = -1);
+ (c[a + 1] = 0), (h[a + 1] = 0);
+ for (
+ var f = r - n,
+ p = f % 2 != 0,
+ m = 0,
+ g = 0,
+ b = 0,
+ y = 0,
+ v = 0;
+ v < o;
+ v++
+ ) {
+ for (var x = -v + m; x <= v - g; x += 2) {
+ for (
+ var N = a + x,
+ E =
+ (L =
+ x === -v || (x !== v && c[N - 1] < c[N + 1])
+ ? c[N + 1]
+ : c[N - 1] + 1) - x;
+ L < r && E < n && t.charAt(L) === e.charAt(E);
+
+ )
+ L++, E++;
+ if (((c[N] = L), L > r)) g += 2;
+ else if (E > n) m += 2;
+ else if (p) {
+ var A = a + f - x;
+ if (A >= 0 && A < u && -1 !== h[A]) {
+ var q = r - h[A];
+ if (L >= q) return l(t, e, L, E);
+ }
+ }
+ }
+ for (var w = -v + b; w <= v - y; w += 2) {
+ for (
+ var A = a + w,
+ k =
+ (q =
+ w === -v || (w !== v && h[A - 1] < h[A + 1])
+ ? h[A + 1]
+ : h[A - 1] + 1) - w;
+ q < r &&
+ k < n &&
+ t.charAt(r - q - 1) === e.charAt(n - k - 1);
+
+ )
+ q++, k++;
+ if (((h[A] = q), q > r)) y += 2;
+ else if (k > n) b += 2;
+ else if (!p) {
+ var N = a + f - w;
+ if (N >= 0 && N < u && -1 !== c[N]) {
+ var L = c[N],
+ E = a + L - N;
+ if (L >= (q = r - q)) return l(t, e, L, E);
+ }
+ }
+ }
+ }
+ return [
+ [s, t],
+ [i, e],
+ ];
+ })(t, e);
+ })(
+ (t = t.substring(0, t.length - m)),
+ (e = e.substring(0, e.length - m))
+ );
+ return (
+ g && y.unshift([r, g]),
+ b && y.push([r, b]),
+ (function t(e, n) {
+ e.push([r, ""]);
+ var l = 0;
+ var u = 0;
+ var c = 0;
+ var f = "";
+ var p = "";
+ var m;
+ for (; l < e.length; )
+ if (l < e.length - 1 && !e[l][1]) e.splice(l, 1);
+ else
+ switch (e[l][0]) {
+ case i:
+ c++, (p += e[l][1]), l++;
+ break;
+ case s:
+ u++, (f += e[l][1]), l++;
+ break;
+ case r:
+ var g = l - c - u - 1;
+ if (n) {
+ if (g >= 0 && d(e[g][1])) {
+ var b = e[g][1].slice(-1);
+ if (
+ ((e[g][1] = e[g][1].slice(0, -1)),
+ (f = b + f),
+ (p = b + p),
+ !e[g][1])
+ ) {
+ e.splice(g, 1), l--;
+ var y = g - 1;
+ e[y] &&
+ e[y][0] === i &&
+ (c++, (p = e[y][1] + p), y--),
+ e[y] &&
+ e[y][0] === s &&
+ (u++, (f = e[y][1] + f), y--),
+ (g = y);
+ }
+ }
+ if (h(e[l][1])) {
+ var b = e[l][1].charAt(0);
+ (e[l][1] = e[l][1].slice(1)), (f += b), (p += b);
+ }
+ }
+ if (l < e.length - 1 && !e[l][1]) {
+ e.splice(l, 1);
+ break;
+ }
+ if (f.length > 0 || p.length > 0) {
+ f.length > 0 &&
+ p.length > 0 &&
+ (0 !== (m = o(p, f)) &&
+ (g >= 0
+ ? (e[g][1] += p.substring(0, m))
+ : (e.splice(0, 0, [r, p.substring(0, m)]), l++),
+ (p = p.substring(m)),
+ (f = f.substring(m))),
+ 0 !== (m = a(p, f)) &&
+ ((e[l][1] = p.substring(p.length - m) + e[l][1]),
+ (p = p.substring(0, p.length - m)),
+ (f = f.substring(0, f.length - m))));
+ var v = c + u;
+ 0 === f.length && 0 === p.length
+ ? (e.splice(l - v, v), (l -= v))
+ : 0 === f.length
+ ? (e.splice(l - v, v, [i, p]), (l = l - v + 1))
+ : 0 === p.length
+ ? (e.splice(l - v, v, [s, f]), (l = l - v + 1))
+ : (e.splice(l - v, v, [s, f], [i, p]), (l = l - v + 2));
+ }
+ 0 !== l && e[l - 1][0] === r
+ ? ((e[l - 1][1] += e[l][1]), e.splice(l, 1))
+ : l++,
+ (c = 0),
+ (u = 0),
+ (f = ""),
+ (p = "");
+ }
+ "" === e[e.length - 1][1] && e.pop();
+ var x = !1;
+ l = 1;
+ for (; l < e.length - 1; )
+ e[l - 1][0] === r &&
+ e[l + 1][0] === r &&
+ (e[l][1].substring(e[l][1].length - e[l - 1][1].length) ===
+ e[l - 1][1]
+ ? ((e[l][1] =
+ e[l - 1][1] +
+ e[l][1].substring(
+ 0,
+ e[l][1].length - e[l - 1][1].length
+ )),
+ (e[l + 1][1] = e[l - 1][1] + e[l + 1][1]),
+ e.splice(l - 1, 1),
+ (x = !0))
+ : e[l][1].substring(0, e[l + 1][1].length) == e[l + 1][1] &&
+ ((e[l - 1][1] += e[l + 1][1]),
+ (e[l][1] =
+ e[l][1].substring(e[l + 1][1].length) + e[l + 1][1]),
+ e.splice(l + 1, 1),
+ (x = !0))),
+ l++;
+ x && t(e, n);
+ })(y, c),
+ y
+ );
+ }
+ function l(t, e, s, i) {
+ var r = t.substring(0, s),
+ l = e.substring(0, i),
+ o = t.substring(s),
+ a = e.substring(i),
+ u = n(r, l),
+ c = n(o, a);
+ return u.concat(c);
+ }
+ function o(t, e) {
+ if (!t || !e || t.charAt(0) !== e.charAt(0)) return 0;
+ for (var s = 0, i = Math.min(t.length, e.length), r = i, n = 0; s < r; )
+ t.substring(n, r) == e.substring(n, r) ? (n = s = r) : (i = r),
+ (r = Math.floor((i - s) / 2 + s));
+ return u(t.charCodeAt(r - 1)) && r--, r;
+ }
+ function a(t, e) {
+ if (!t || !e || t.slice(-1) !== e.slice(-1)) return 0;
+ for (var s = 0, i = Math.min(t.length, e.length), r = i, n = 0; s < r; )
+ t.substring(t.length - r, t.length - n) ==
+ e.substring(e.length - r, e.length - n)
+ ? (n = s = r)
+ : (i = r),
+ (r = Math.floor((i - s) / 2 + s));
+ return c(t.charCodeAt(t.length - r)) && r--, r;
+ }
+ function u(t) {
+ return t >= 55296 && t <= 56319;
+ }
+ function c(t) {
+ return t >= 56320 && t <= 57343;
+ }
+ function h(t) {
+ return c(t.charCodeAt(0));
+ }
+ function d(t) {
+ return u(t.charCodeAt(t.length - 1));
+ }
+ function f(t, e, n, l) {
+ return d(t) || h(l)
+ ? null
+ : (function (t) {
+ for (var e = [], s = 0; s < t.length; s++)
+ t[s][1].length > 0 && e.push(t[s]);
+ return e;
+ })([
+ [r, t],
+ [s, e],
+ [i, n],
+ [r, l],
+ ]);
+ }
+ function p(t, e, s) {
+ return n(t, e, s, !0);
+ }
+ (p.INSERT = i), (p.DELETE = s), (p.EQUAL = r), (t.exports = p);
+ },
+ function (t, e, s) {
+ "use strict";
+ var i =
+ (this && this.__importDefault) ||
+ function (t) {
+ return t && t.__esModule ? t : { default: t };
+ };
+ Object.defineProperty(e, "__esModule", { value: !0 });
+ var r,
+ n = i(s(11)),
+ l = i(s(2));
+ !(function (t) {
+ (t.compose = function (t, e, s) {
+ void 0 === t && (t = {}),
+ void 0 === e && (e = {}),
+ "object" != typeof t && (t = {}),
+ "object" != typeof e && (e = {});
+ var i = l.default(!0, {}, e);
+ for (var r in (s ||
+ (i = Object.keys(i).reduce(function (t, e) {
+ return null != i[e] && (t[e] = i[e]), t;
+ }, {})),
+ t))
+ void 0 !== t[r] && void 0 === e[r] && (i[r] = t[r]);
+ return Object.keys(i).length > 0 ? i : void 0;
+ }),
+ (t.diff = function (t, e) {
+ void 0 === t && (t = {}),
+ void 0 === e && (e = {}),
+ "object" != typeof t && (t = {}),
+ "object" != typeof e && (e = {});
+ var s = Object.keys(t)
+ .concat(Object.keys(e))
+ .reduce(function (s, i) {
+ return (
+ n.default(t[i], e[i]) ||
+ (s[i] = void 0 === e[i] ? null : e[i]),
+ s
+ );
+ }, {});
+ return Object.keys(s).length > 0 ? s : void 0;
+ }),
+ (t.transform = function (t, e, s) {
+ if ((void 0 === s && (s = !1), "object" != typeof t)) return e;
+ if ("object" == typeof e) {
+ if (!s) return e;
+ var i = Object.keys(e).reduce(function (s, i) {
+ return void 0 === t[i] && (s[i] = e[i]), s;
+ }, {});
+ return Object.keys(i).length > 0 ? i : void 0;
+ }
+ });
+ })(r || (r = {})),
+ (e.default = r);
+ },
+ function (t, e, s) {
+ "use strict";
+ var i =
+ (this && this.__importDefault) ||
+ function (t) {
+ return t && t.__esModule ? t : { default: t };
+ };
+ Object.defineProperty(e, "__esModule", { value: !0 });
+ var r = i(s(21)),
+ n = (function () {
+ function t(t) {
+ (this.ops = t), (this.index = 0), (this.offset = 0);
+ }
+ return (
+ (t.prototype.hasNext = function () {
+ return this.peekLength() < 1 / 0;
+ }),
+ (t.prototype.next = function (t) {
+ t || (t = 1 / 0);
+ var e = this.ops[this.index];
+ if (e) {
+ var s = this.offset,
+ i = r.default.length(e);
+ if (
+ (t >= i - s
+ ? ((t = i - s), (this.index += 1), (this.offset = 0))
+ : (this.offset += t),
+ "number" == typeof e.delete)
+ )
+ return { delete: t };
+ var n = {};
+ return (
+ e.attributes && (n.attributes = e.attributes),
+ "number" == typeof e.retain
+ ? (n.retain = t)
+ : "string" == typeof e.insert
+ ? (n.insert = e.insert.substr(s, t))
+ : (n.insert = e.insert),
+ n
+ );
+ }
+ return { retain: 1 / 0 };
+ }),
+ (t.prototype.peek = function () {
+ return this.ops[this.index];
+ }),
+ (t.prototype.peekLength = function () {
+ return this.ops[this.index]
+ ? r.default.length(this.ops[this.index]) - this.offset
+ : 1 / 0;
+ }),
+ (t.prototype.peekType = function () {
+ return this.ops[this.index]
+ ? "number" == typeof this.ops[this.index].delete
+ ? "delete"
+ : "number" == typeof this.ops[this.index].retain
+ ? "retain"
+ : "insert"
+ : "retain";
+ }),
+ (t.prototype.rest = function () {
+ if (this.hasNext()) {
+ if (0 === this.offset) return this.ops.slice(this.index);
+ var t = this.offset,
+ e = this.index,
+ s = this.next(),
+ i = this.ops.slice(this.index);
+ return (this.offset = t), (this.index = e), [s].concat(i);
+ }
+ return [];
+ }),
+ t
+ );
+ })();
+ e.default = n;
+ },
+ function (t, e, s) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", { value: !0 });
+ var i = (function () {
+ return function (t, e) {
+ if (Array.isArray(t)) return t;
+ if (Symbol.iterator in Object(t))
+ return (function (t, e) {
+ var s = [],
+ i = !0,
+ r = !1,
+ n = void 0;
+ try {
+ for (
+ var l, o = t[Symbol.iterator]();
+ !(i = (l = o.next()).done) &&
+ (s.push(l.value), !e || s.length !== e);
+ i = !0
+ );
+ } catch (t) {
+ (r = !0), (n = t);
+ } finally {
+ try {
+ !i && o.return && o.return();
+ } finally {
+ if (r) throw n;
+ }
+ }
+ return s;
+ })(t, e);
+ throw new TypeError(
+ "Invalid attempt to destructure non-iterable instance"
+ );
+ };
+ })(),
+ r = b(s(17)),
+ n = b(s(11)),
+ l = b(s(2)),
+ o = s(1),
+ a = b(o),
+ u = s(0),
+ c = s(13),
+ h = b(s(14)),
+ d = s(3),
+ f = b(d),
+ p = b(s(9)),
+ m = s(6),
+ g = b(m);
+ function b(t) {
+ return t && t.__esModule ? t : { default: t };
+ }
+ const y = /^[ -~]*$/;
+ function v(t, e, s) {
+ if (0 === t.length) {
+ var r = E(s.pop());
+ const t = i(r, 1)[0];
+ return e <= 0 ? `${t}>` : `${t}>${v([], e - 1, s)}`;
+ }
+ var n = (function (t) {
+ return Array.isArray(t) ? t : Array.from(t);
+ })(t),
+ l = n[0];
+ const o = l.child,
+ a = l.offset,
+ u = l.length,
+ c = l.indent,
+ h = l.type,
+ d = n.slice(1);
+ var f = E(h),
+ p = i(f, 2);
+ const m = p[0],
+ g = p[1];
+ if (c > e) return s.push(h), `<${m}>