@ebl-vue/editor-full 2.31.53 → 2.31.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +400 -380
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode(':root{--color-border: #EFF0F1}.ebl-editor{cursor:text;font-size:16px;font-weight:400;background-color:#fff;height:100%;overflow:auto;position:relative;padding-top:15px}.ebl-editor.outline{padding-right:280px}.ebl-editor.outline .codex-editor{-webkit-box-flex:1;-ms-flex:1;flex:1}@media (max-width:1240px){.ebl-outline{display:none}.ebl-editor.outline{padding-right:0}}@media (min-width:1240px){.ebl-editor.readonly .ce-block__content{max-width:100%;padding-left:100px;padding-right:100px}}.ce-toolbar,.ce-inline-toolbar{z-index:1000}.ce-toolbar__plus{border:1px solid #EFF0F1}.ce-toolbar .ce-popover__items,.ce-popover-clone .ce-popover__items{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.ce-toolbar .ce-popover__items .ce-popover-item,.ce-popover-clone .ce-popover__items .ce-popover-item{position:relative}.ce-toolbar .ce-popover__items .ce-popover-item__title,.ce-popover-clone .ce-popover__items .ce-popover-item__title{display:none}.ce-toolbar .ce-popover-item-html,.ce-toolbar .ce-popover-item-separator,.ce-toolbar .ce-popover-item[data-item-name=convert-to],.ce-popover-clone .ce-popover-item-html,.ce-popover-clone .ce-popover-item-separator,.ce-popover-clone .ce-popover-item[data-item-name=convert-to]{width:100%}.ce-toolbar .ce-popover-item-html[data-item-name=list-setting],.ce-popover-clone .ce-popover-item-html[data-item-name=list-setting]{width:auto;overflow:hidden}.ce-toolbar .ce-popover-item-html[data-item-name=list-setting-start-with],.ce-popover-clone .ce-popover-item-html[data-item-name=list-setting-start-with]{border-radius:6px;padding:3px}.ce-toolbar .ce-popover-item-html[data-item-name=list-setting-start-with]:hover,.ce-popover-clone .ce-popover-item-html[data-item-name=list-setting-start-with]:hover{background-color:#f8f8f8}.ce-toolbar .ce-popover-item[data-item-name=convert-to] .ce-popover-item__title,.ce-popover-clone .ce-popover-item[data-item-name=convert-to] .ce-popover-item__title{display:block}.ce-toolbar .ce-popover-item[data-item-name=add-below],.ce-popover-clone .ce-popover-item[data-item-name=add-below]{width:100%}.ce-toolbar .ce-popover-item[data-item-name=add-below] .ce-popover-item__title,.ce-popover-clone .ce-popover-item[data-item-name=add-below] .ce-popover-item__title{display:block}.ce-toolbar .ce-popover-item[data-item-name=list-setting],.ce-popover-clone .ce-popover-item[data-item-name=list-setting]{width:100%}.ce-toolbar .ce-popover-item[data-item-name=list-setting] .ce-popover-item__title,.ce-popover-clone .ce-popover-item[data-item-name=list-setting] .ce-popover-item__title{display:block}.ce-popover--inline .ce-popover-item-html{padding:0 2px}.ce-inline-toolbar .ce-popover__items{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ce-inline-toolbar .ce-popover__items{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.ce-inline-toolbar .ce-popover__items .ce-popover-item__title{display:none}.ebl-editor ::-webkit-scrollbar{width:6px;height:6px}.ebl-editor ::-webkit-scrollbar-track{background:#f1f1f1;border-radius:1px}.ebl-editor ::-webkit-scrollbar-thumb{background:silver;border-radius:10px;border:1px solid #fff}.ebl-editor ::-webkit-scrollbar-thumb:hover{background:#555}.cdx-notifies{left:50%!important}.cdx-notifies{-webkit-transform:translateX(-50%);transform:translate(-50%);top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ebl-er-doc-outline-item{padding:7px 24px;cursor:pointer;white-space:normal;word-wrap:break-word}.ebl-er-doc-outline-item:hover{background-color:#f6f6f6}.ebl-er-doc-outline-item.selected{background-color:#ebebeb}.ebl-outline .level_1{padding-left:24px}.ebl-outline .level_2{padding-left:42px}.ebl-outline .level_3{padding-left:60px}.ce-popover--inline .ce-popover--nested .ce-popover__container{width:-webkit-min-content!important;width:-moz-min-content!important;width:min-content!important;min-width:0!important;min-width:initial!important}.ce-popover--inline .ce-popover--nested .ce-popover__items{width:-webkit-max-content;width:-moz-max-content;width:max-content}.editorjs__color-selector-container{display:grid;grid-gap:10px;padding:4px}.editorjs__color-selector__container-item{width:30px;height:30px;display:block;cursor:pointer;border-radius:100%;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}.editorjs__color-selector__container-item:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.cel-inline-bold{font-weight:700}.cel-inline-strikethrough{-webkit-text-decoration:line-through;text-decoration:line-through}.cel-inline-italic{font-style:italic}.cel-inline-code{margin-left:2px;margin-right:2px;background-color:#f5f6f7;border:1px solid #dee0e3;border-color:#dee0e3;border-width:1px 0;border-radius:4px;padding:1px 5px 1px 4px}.cel-inline-underline{-webkit-text-decoration:underline;text-decoration:underline}.cel-inline-mark{background-color:#ff0;padding:2px}.cel-inline-link-input-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;gap:5px}.cel-inline-link-input{-webkit-box-flex:1;-ms-flex:1;flex:1;background:#f8f8f8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:4px 8px;font-size:14px;line-height:22px;outline:none;margin:0;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;font-weight:500;font-family:inherit}.cel-inline-link-input-btn{width:50px;border-radius:5px;background-color:#161c27;color:#fff;border:none;cursor:pointer}.cel-inline-link-input-btn.disabled{opacity:.4;cursor:not-allowed}.cel-fake-background{background-color:#a8d6ff}.editorjs__color-selector__input{width:1px;height:1px;opacity:0}.editorjs__color-selector__container-item-none{background-color:transparent;border:1px solid #e6e6e6;position:relative}.editorjs__color-selector__container-item-none:before{content:"";position:absolute;top:50%;left:50%;width:1px;height:35px;background-color:#e6e6e6;-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}.cel-inline-gray-text{color:#646a73}.cel-inline-pink-text{color:#d83931}.cel-inline-orange-text{color:#de7802}.cel-inline-yellow-text{color:#dc9b04}.cel-inline-green-text{color:#2ea121}.cel-inline-blue-text{color:#245bdb}.cel-inline-purple-text{color:#6425d0}.ebl-er-doc{font-family:var(--font-family);font-size:16px;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box}.ebl-er-header{height:var(--ebl-er-header-height);-webkit-box-sizing:border-box;box-sizing:border-box;position:sticky;top:0;z-index:10}.ebl-er-footer{height:var(--ebl-er-footer-height);-webkit-box-sizing:border-box;box-sizing:border-box}.ebl-er-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;min-height:calc(100vh - var(--ebl-er-header-height))}.ebl-er-doc-menu{width:var(--ebl-er-doc-menu-width);-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;height:calc(100vh - var(--ebl-er-header-height));position:sticky;top:var(--ebl-er-header-height)}.ebl-er-doc-menu-content{-webkit-box-sizing:border-box;box-sizing:border-box}.ebl-er-doc-content{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;max-width:calc(100% - var(--ebl-er-doc-menu-width));-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.ebl-er-doc-content-container{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-flex:1;-ms-flex:1;flex:1;padding:0 50px 50px;width:100%;overflow-x:hidden;white-space:normal;word-wrap:break-word}.ebl-er-doc-content-inner-wrap{margin:0 auto}.ebl-er-doc-content-inner .ce-block{width:100%}.ebl-er-doc-outline{width:280px;-webkit-box-sizing:border-box;box-sizing:border-box;height:calc(100vh - var(--ebl-er-header-height));position:sticky;top:var(--ebl-er-header-height);overflow:auto;padding:12px}.ebl-er-doc-pre-next{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:33px 0}@media (max-width:960px){.ebl-er-doc-outline{display:none}}.ebl-er-doc ::-webkit-scrollbar{width:6px;height:6px}.ebl-er-doc ::-webkit-scrollbar-track{background:#f1f1f1;border-radius:1px}.ebl-er-doc ::-webkit-scrollbar-thumb{background:silver;border-radius:10px;border:1px solid #fff}.ebl-er-doc ::-webkit-scrollbar-thumb:hover{background:#555}.ce-el-link-wrapper{position:absolute;z-index:1000;width:auto;max-width:300px;height:46px;padding:6px 20px;border:1px solid #eff0f1;border-radius:6px;background-color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.ce-el-link-input{border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:4px 8px;background-color:#f8f8f8;font-size:12px;line-height:22px;margin:0;-webkit-box-flex:1;-ms-flex:1;flex:1;width:260px}.ce-el-link-input.ce-el-link__noedit{display:none}.ce-el-link-btn-wrap{width:50px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.ce-el-link-btn{width:50px;background-color:#161c27;color:#fff;border-radius:6px;margin-left:5px;display:block}.ce-el-link-btn.ce-el-link__noedit{display:none}.ce-el-link-icon-btn{width:24px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-left:5px;cursor:pointer;display:none}.ce-el-link-icon-btn.ce-el-link__noedit{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-el-link-input-text{padding-right:20px;display:none}.ce-el-link-input-text.ce-el-link__noedit{display:block}.ce-block--drop-target .ce-block__content:before{content:"";position:absolute;top:50%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #a0a0a0;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{background:none}.ce-header{padding:15px 0 3px;margin:0;line-height:1.25;outline:none}.ce-header p,.ce-header div{padding:0!important;margin:0!important}.ce-tune-alignment--right{text-align:right}.ce-tune-alignment--center{text-align:center}.ce-tune-alignment--left{text-align:left}.ce-paragraph{line-height:2!important}.ce-paragraph{outline:none}.ce-block:only-of-type .ce-paragraph[data-placeholder-active]:empty:before,.ce-block:only-of-type .ce-paragraph[data-placeholder-active][data-empty=true]:before{content:attr(data-placeholder-active)}.ce-paragraph p:first-of-type{margin-top:0}.ce-paragraph p:last-of-type{margin-bottom:0}.ce-editorjs-x-shiki{border-radius:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 0;border:2px solid transparent;position:relative}.ce-editorjs-x-shiki.editable:hover{border:2px solid #C0C0C0}.ce-editorjs-x-shiki__lang{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:8px}.ce-editorjs-x-shiki__code{position:relative;float:left;min-width:100%;overflow:hidden;height:auto;min-height:60px}.ce-editorjs-x-shiki__code__dragHandler{position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translate(-50%);bottom:-5px;cursor:ns-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:8px;width:60px;background-color:silver;border-radius:5px;display:none}.ce-editorjs-x-shiki:hover .ce-editorjs-x-shiki__code__dragHandler{display:block}.ce-editorjs-x-shiki__selector{display:-webkit-box;display:-ms-flexbox;display:flex;gap:15px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom-style:solid;border-color:#9ca3af0d;border-bottom-width:1px;padding:0 8px 8px}.ce-editorjs-x-shiki__selector-language,.ce-editorjs-x-shiki__selector-theme{font-size:13px;font-family:inherit}.ce-editorjs-x-shiki__selector-language{width:90px}.ce-editorjs-x-shiki__selector select{border:none;outline:none}.ce-editorjs-x-shiki__span{position:relative;z-index:0;padding:20px 20px 20px 55px;margin:0;white-space:pre;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__span code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__textarea{all:unset;white-space:pre;background-color:transparent;position:absolute;padding:20px 20px 20px 55px;inset:0;color:transparent;z-index:0;font-size:13px;caret-color:#999;resize:none;border:none;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__textarea::-moz-selection{background-color:#083ca9;color:#fff}.ce-editorjs-x-shiki__textarea::selection{background-color:#083ca9;color:#fff}.ce-editorjs-x-shiki__copy{width:24px;height:24px;cursor:pointer;position:relative;margin-right:0}.ce-editorjs-x-shiki__copy_tip{font-size:12px;width:60px;margin-left:-20px;background-color:#0c0c0c;color:#ececec;text-align:center;border-radius:6px;padding:5px 10px;position:absolute;z-index:1;top:125%;-webkit-transition:opacity .3s;transition:opacity .3s;visibility:hidden;opacity:0}.ce-editorjs-x-shiki__copy_tip:after{content:"";position:absolute;bottom:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:transparent transparent #0c0c0c transparent}.ce-editorjs-x-shiki__copy_tip.visible{visibility:visible;opacity:1}.ce-editorjs-x-shiki__span.shiki .line:before{content:attr(data-line);width:40px;display:inline-block;text-align:right;color:#888;position:absolute;left:0}.ce-editorjs-x-shiki__code ::-webkit-scrollbar{width:8px;height:8px}.ce-editorjs-x-shiki__code ::-webkit-scrollbar-track{background:#22272e;border-radius:1px}.ce-editorjs-x-shiki__code ::-webkit-scrollbar-thumb{background:silver;border-radius:10px;border:2px solid #22272e}.ce-editorjs-x-shiki__code ::-webkit-scrollbar-thumb:hover{background:#555}.ce-block--selected .ce-editorjs-x-shiki{outline:2px solid #4299e1}.ce-block--selected .ce-editorjs-x-shiki,.ce-block--selected .ce-editorjs-x-shiki__selector-language,.ce-block--selected .ce-editorjs-x-shiki__span{background-color:#e1f2ff!important}.cdx-quote{overflow:hidden;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box;word-wrap:break-word;word-break:break-all}.cdx-quote blockquote{margin:0}.cdx-block-quote{border:solid #acacac;border-width:0 0 0 3px;-webkit-box-shadow:none;box-shadow:none;color:#666;line-height:1.6em;padding:1px 0 0 12px}.ce-delimiter__line__wrapper{height:24px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-delimiter__line{-webkit-box-flex:1;-ms-flex:1;flex:1;height:2px;background-color:#eff0f1}.cdx-list{margin:0;padding:0;outline:none;display:grid;counter-reset:item;grid-gap:var(--spacing-s);padding:var(--spacing-xs);--spacing-s: 8px;--spacing-xs: 6px;--list-counter-type: numeric;--radius-border: 5px;--checkbox-background: #fff;--color-border: #C9C9C9;--color-bg-checked: #369FFF;--line-height: 1.45em;--color-bg-checked-hover: #0059AB;--color-tick: #fff;--size-checkbox: 1.2em}.cdx-list ol{padding-left:0}.cdx-list__item{line-height:var(--line-height);display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;grid-template-areas:"checkbox content" ". child"}.cdx-list__item-children{display:grid;grid-area:child;grid-gap:var(--spacing-s);padding-top:var(--spacing-s)}.cdx-list__item [contenteditable]{outline:none}.cdx-list__item-content{word-break:break-word;white-space:pre-wrap;grid-area:content;padding-left:var(--spacing-s)}.cdx-list__item:before{counter-increment:item;white-space:nowrap}.cdx-list-ordered .cdx-list__item:before{content:counters(item,".",var(--list-counter-type)) "."}.cdx-list-ordered{counter-reset:item}.cdx-list-unordered{padding-left:0}.cdx-list-unordered .cdx-list__item:before{content:"•"}.cdx-list-checklist .cdx-list__item:before{content:""}.cdx-list__settings .cdx-settings-button{width:50%}.cdx-list__checkbox{padding-top:calc((var(--line-height) - var(--size-checkbox)) / 2);grid-area:checkbox;width:var(--size-checkbox);height:var(--size-checkbox);display:-webkit-box;display:-ms-flexbox;display:flex;cursor:pointer}.cdx-list__checkbox svg{opacity:0;height:var(--size-checkbox);width:var(--size-checkbox);left:-1px;top:-1px;position:absolute}@media (hover: hover){.cdx-list__checkbox:not(.cdx-list__checkbox--no-hover):hover .cdx-list__checkbox-check svg{opacity:1}}.cdx-list__checkbox--checked{line-height:var(--line-height)}@media (hover: hover){.cdx-list__checkbox--checked:not(.cdx-list__checkbox--checked--no-hover):hover .cdx-checklist__checkbox-check{background:var(--color-bg-checked-hover);border-color:var(--color-bg-checked-hover)}}.cdx-list__checkbox--checked .cdx-list__checkbox-check{background:var(--color-bg-checked);border-color:var(--color-bg-checked)}.cdx-list__checkbox--checked .cdx-list__checkbox-check svg{opacity:1}.cdx-list__checkbox--checked .cdx-list__checkbox-check svg path{stroke:var(--color-tick)}.cdx-list__checkbox--checked .cdx-list__checkbox-check:before{opacity:0;visibility:visible;-webkit-transform:scale(2.5);transform:scale(2.5)}.cdx-list__checkbox-check{cursor:pointer;display:inline-block;position:relative;margin:0 auto;width:var(--size-checkbox);height:var(--size-checkbox);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:var(--radius-border);border:1px solid var(--color-border);background:var(--checkbox-background)}.cdx-list__checkbox-check:before{content:"";position:absolute;inset:0;border-radius:100%;background-color:var(--color-bg-checked);visibility:hidden;pointer-events:none;-webkit-transform:scale(1);transform:scale(1);-webkit-transition:opacity .4s,-webkit-transform .4s ease-out;transition:opacity .4s,-webkit-transform .4s ease-out;transition:transform .4s ease-out,opacity .4s;transition:transform .4s ease-out,opacity .4s,-webkit-transform .4s ease-out}.cdx-list__checkbox-check--disabled{pointer-events:none}.cdx-list-start-with-field{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;overflow:hidden;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.cdx-list-start-with-field--invalid{background:#ffeced;border:1px solid #E13F3F}.cdx-list-start-with-field:hover{background-color:#f8f8f8}.cdx-list-start-with-field--invalid .cdx-list-start-with-field__input{color:#e13f3f}.cdx-list-start-with-field__startlabel{width:70px;font-size:14px}.cdx-list-start-with-field__input-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden}.cdx-list-start-with-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;line-height:22px;-webkit-box-flex:1;-ms-flex:1;flex:1;border:1px solid rgba(226,226,229,1);border-radius:6px;padding:0 10px;width:50px;text-align:center}.cdx-list-start-with-field__input::-webkit-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::-moz-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input:-ms-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::-ms-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::placeholder{color:var(--grayText);font-weight:500}.cdx-alert{position:relative;padding:10px;border-radius:5px;margin-bottom:10px;margin-top:10px}.cdx-alert-primary{background-color:#ebf8ff;border:1px solid #4299e1;color:#2b6cb0}.cdx-alert-secondary{background-color:#f7fafc;border:1px solid #cbd5e0;color:#222731}.cdx-alert-info{background-color:#e6fdff;border:1px solid #4cd4ce;color:#00727c}.cdx-alert-success{background-color:#f0fff4;border:1px solid #68d391;color:#2f855a}.cdx-alert-warning{background-color:#fffaf0;border:1px solid #ed8936;color:#c05621}.cdx-alert-danger{background-color:#fff5f5;border:1px solid #fc8181;color:#c53030}.cdx-alert-light{background-color:#fff;border:1px solid #edf2f7;color:#1a202c}.cdx-alert-dark{background-color:#2d3748;border:1px solid #1a202c;color:#d3d3d3}.cdx-alert-align-left{text-align:left}.cdx-alert-align-center{text-align:center}.cdx-alert-align-right{text-align:right}.cdx-alert__message{outline:none}.cdx-alert [contentEditable=true][data-placeholder]:before{position:absolute;content:attr(data-placeholder);color:#707684;font-weight:400;opacity:0}.cdx-alert [contentEditable=true][data-placeholder]:empty:before{opacity:1}.cdx-alert [contentEditable=true][data-placeholder]:empty:focus:before{opacity:0}.ce-popover__item[data-item-name=alert-primary] .ce-popover__item-icon svg #background{fill:#ebf8ff;stroke:#4299e1}.ce-popover__item[data-item-name=alert-primary] .ce-popover__item-icon svg #content{fill:#2b6cb0}.ce-popover__item[data-item-name=alert-secondary] .ce-popover__item-icon svg #background{fill:#f7fafc;stroke:#cbd5e0}.ce-popover__item[data-item-name=alert-secondary] .ce-popover__item-icon svg #content{fill:#222731}.ce-popover__item[data-item-name=alert-info] .ce-popover__item-icon svg #background{fill:#e6fdff;stroke:#4cd4ce}.ce-popover__item[data-item-name=alert-info] .ce-popover__item-icon svg #content{fill:#00727c}.ce-popover__item[data-item-name=alert-success] .ce-popover__item-icon svg #background{fill:#f0fff4;stroke:#68d391}.ce-popover__item[data-item-name=alert-success] .ce-popover__item-icon svg #content{fill:#2f855a}.ce-popover__item[data-item-name=alert-warning] .ce-popover__item-icon svg #background{fill:#fffaf0;stroke:#ed8936}.ce-popover__item[data-item-name=alert-warning] .ce-popover__item-icon svg #content{fill:#c05621}.ce-popover__item[data-item-name=alert-danger] .ce-popover__item-icon svg #background{fill:#fff5f5;stroke:#fc8181}.ce-popover__item[data-item-name=alert-danger] .ce-popover__item-icon svg #content{fill:#c53030}.ce-popover__item[data-item-name=alert-light] .ce-popover__item-icon svg #background{fill:#fff;stroke:#edf2f7}.ce-popover__item[data-item-name=alert-light] .ce-popover__item-icon svg #content{fill:#1a202c}.ce-popover__item[data-item-name=alert-dark] .ce-popover__item-icon svg #background{fill:#2d3748;stroke:#1a202c}.ce-popover__item[data-item-name=alert-dark] .ce-popover__item-icon svg #content{fill:#d3d3d3}.cdx-alert_setting__icon_wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:10px}.cdx-alert_setting__icon_wrapper_align{margin-top:10px}.cdx-alert_setting__icon{display:inline-block;width:24px;height:24px;text-align:center;line-height:24px;cursor:pointer}.cdx-alert_setting__icon_active{opacity:.3}.ce-block--selected .cdx-alert{outline:2px solid #4299e1}.ce-popover-indent-item{cursor:default!important}.ce-popover-indent-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:3px}.ce-popover-indent-item[version^="2.26"]{gap:10px}.ce-popover-indent-item:hover{background-color:transparent!important}.ce-popover-indent-item .ce-popover-item__icon{width:26px;height:26px;cursor:pointer;will-change:background-color,color;transition:.3s background-color,.3s color;padding:0;border-width:0px;color:#000;background-color:#fff;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;-webkit-transition:.3s background-color,.3s color;-moz-transition:.3s background-color,.3s color;-ms-transition:.3s background-color,.3s color;-o-transition:.3s background-color,.3s color}.ce-popover-indent-item .ce-popover-item--disabled{color:#707684;opacity:.3;cursor:default}.ce-popover-indent-item .ce-popover-item__icon:focus{outline:none}.ce-popover-indent-item[version^="2.26"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.27"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.28"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.29"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.26"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.27"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.28"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.29"] .ce-popover-item__icon{box-shadow:0 0 0 1px #c9c9cc7a!important;-webkit-box-shadow:0 0 0 1px rgba(201,201,204,.48)!important}.ce-popover-indent-item[version^="2.26"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.27"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.28"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.29"] .ce-popover-item__icon:hover{background-color:#eff2f5}.ce-highlight-indent{display:inline-block;height:1.6em;top:50%;position:absolute;transform:translateY(-50%);-webkit-transform:translate(0px,-50%);-moz-transform:translate(0px,-50%);-ms-transform:translate(0px,-50%);-o-transform:translate(0px,-50%)}.ce-popover-indent-item[version^="2.3"] .ce-popover-item__title{margin-left:4px}.tc-wrap{--color-background: #f9f9fb;--color-text-secondary: #7b7e89;--color-border: #e8e8eb;--cell-size: 34px;--toolbox-icon-size: 18px;--toolbox-padding: 6px;--toolbox-aiming-field-size: calc(var(--toolbox-icon-size) + var(--toolbox-padding)*2);--col-width: 100px 100px 100px;position:relative;height:100%;margin-top:var(--toolbox-icon-size);-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-grid;z-index:0}.tc-wrap svg{vertical-align:top}@media print{.tc-wrap{border-left-color:var(--color-border);border-left-style:solid;border-left-width:1px}}@media print{.tc-wrap .tc-row:after{display:none}}.tc-table{position:relative;width:100%;height:100%;display:grid;font-size:14px;border-top:1px solid var(--color-border);border-left:1px solid var(--color-border);line-height:1.4;overflow-x:auto}.tc-table:after{width:calc(var(--cell-size));height:100%;left:calc(var(--cell-size)*-1);top:0}.tc-table:after,.tc-table:before{position:absolute;content:""}.tc-table:before{width:100%;height:var(--toolbox-aiming-field-size);top:calc(var(--toolbox-aiming-field-size)*-1);left:0}.tc-table--heading .tc-row:first-child{font-weight:600;border-bottom:2px solid var(--color-border);position:sticky;top:0;z-index:2;background:var(--color-background)}.tc-table--heading .tc-row:first-child [contenteditable]:empty:before{content:attr(heading);color:var(--color-text-secondary)}.tc-table--heading .tc-row:first-child:after{bottom:-2px;border-bottom:2px solid var(--color-border)}.tc-add-column,.tc-add-row{display:-webkit-box;display:-ms-flexbox;display:flex;color:var(--color-text-secondary)}@media print{.tc-add{display:none}}.tc-add-column{display:grid;border-top:1px solid var(--color-border);grid-auto-rows:var(--cell-size);-webkit-box-align:center;-ms-flex-align:center;align-items:center;justify-items:center}.tc-add-column svg{padding:5px;position:sticky;top:0;background-color:var(--color-background)}.tc-add-column--disabled{visibility:hidden}@media print{.tc-add-column{display:none}}.tc-add-row{height:var(--cell-size);-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-left:4px;position:relative}.tc-add-row--disabled{display:none}.tc-add-row:before{content:"";position:absolute;right:calc(var(--cell-size)*-1);width:var(--cell-size);height:100%}@media print{.tc-add-row{display:none}}.tc-add-column,.tc-add-row{-webkit-transition:0s;transition:0s;cursor:pointer;will-change:background-color}.tc-add-column:hover,.tc-add-row:hover{-webkit-transition:background-color .1s ease;transition:background-color .1s ease;background-color:var(--color-background)}.tc-add-row{margin-top:1px}.tc-add-row:hover:before{-webkit-transition:.1s;transition:.1s;background-color:var(--color-background)}.tc-row{display:grid;grid-template-columns:var(--col-width);position:relative;border-bottom:1px solid var(--color-border)}.tc-row--selected{background:var(--color-background)}.tc-row--selected:after{background:var(--color-background)}.tc-cell{border-right:1px solid var(--color-border);padding:6px 12px;overflow:hidden;outline:none;line-break:normal}.tc-cell--selected{background:var(--color-background)}.tc-wrap--readonly .tc-row:after{display:none}.tc-toolbox{--toolbox-padding: 6px;--popover-margin: 30px;--toggler-click-zone-size: 30px;--toggler-dots-color: #7b7e89;--toggler-dots-color-hovered: #1d202b;position:absolute;cursor:pointer;z-index:1;opacity:0;-webkit-transition:opacity .1s;transition:opacity .1s;will-change:left,opacity}.tc-toolbox--column{top:calc(var(--toggler-click-zone-size)*-1);-webkit-transform:translate(calc(var(--toggler-click-zone-size)*-1/2));transform:translate(calc(var(--toggler-click-zone-size)*-1/2));will-change:left,opacity}.tc-toolbox--row{left:calc(var(--popover-margin)*-1);-webkit-transform:translateY(calc(var(--toggler-click-zone-size)*-1/2));transform:translateY(calc(var(--toggler-click-zone-size)*-1/2));margin-top:-1px;will-change:top,opacity}.tc-toolbox--showed{opacity:1}.tc-toolbox .tc-popover{position:absolute;top:0;left:var(--popover-margin)}.tc-toolbox__toggler{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:var(--toggler-click-zone-size);height:var(--toggler-click-zone-size);color:var(--toggler-dots-color);opacity:0;-webkit-transition:opacity .15s ease;transition:opacity .15s ease;will-change:opacity}.tc-toolbox__toggler:hover{color:var(--toggler-dots-color-hovered)}.tc-toolbox__toggler svg{fill:currentColor}.tc-wrap:hover .tc-toolbox__toggler{opacity:1}.tc-settings .cdx-settings-button{width:50%;margin:0}.tc-popover{--color-border: #eaeaea;--color-background: #fff;--color-background-hover: rgba(232, 232, 235, .49);--color-background-confirm: #e24a4a;--color-background-confirm-hover: #d54040;--color-text-confirm: #fff;background:var(--color-background);border:1px solid var(--color-border);-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.12941);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;padding:6px;display:none;will-change:opacity,transform}.tc-popover--opened{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-animation:menuShowing .1s cubic-bezier(.215,.61,.355,1) forwards;animation:menuShowing .1s cubic-bezier(.215,.61,.355,1) forwards}.tc-popover__item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:2px 14px 2px 2px;border-radius:5px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tc-popover__item:hover{background:var(--color-background-hover)}.tc-popover__item:not(:last-of-type){margin-bottom:2px}.tc-popover__item-icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:26px;height:26px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:var(--color-background);border-radius:5px;border:1px solid var(--color-border);margin-right:8px}.tc-popover__item-label{line-height:22px;font-size:14px;font-weight:500}.tc-popover__item--confirm{background:var(--color-background-confirm);color:var(--color-text-confirm)}.tc-popover__item--confirm:hover{background-color:var(--color-background-confirm-hover)}.tc-popover__item--confirm .tc-popover__item-icon{background:var(--color-background-confirm);border-color:#0000001a}.tc-popover__item--confirm .tc-popover__item-icon svg{-webkit-transition:-webkit-transform .2s ease-in;transition:-webkit-transform .2s ease-in;transition:transform .2s ease-in;transition:transform .2s ease-in,-webkit-transform .2s ease-in;-webkit-transform:rotate(90deg) scale(1.2);transform:rotate(90deg) scale(1.2)}.tc-popover__item--hidden{display:none}@-webkit-keyframes menuShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes menuShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.cell-resizable{cursor:col-resize}.image-tool{--bg-color: #cdd1e0;--front-color: #388ae5;--border-color: #e8e8eb;display:inline-block}.image-tool__image{border-radius:3px;overflow:hidden;margin-bottom:10px;padding-bottom:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.image-tool__image-picture{max-width:100%;vertical-align:bottom;display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.image-tool__image-preloader{width:150px;height:150px;border-radius:50%;background-size:cover;margin:auto;position:relative;background-color:var(--bg-color);background-position:center center}.image-tool__image-preloader:after{content:"";position:absolute;z-index:3;width:60px;height:60px;border-radius:50%;border:2px solid var(--bg-color);border-top-color:var(--front-color);left:50%;top:50%;margin-top:-30px;margin-left:-30px;-webkit-animation:image-preloader-spin 2s infinite linear;animation:image-preloader-spin 2s infinite linear;-webkit-box-sizing:border-box;box-sizing:border-box}.image-tool__caption{visibility:hidden;position:absolute;bottom:0;left:0;margin-bottom:10px}.image-tool__caption[contentEditable=true][data-placeholder]:before{position:absolute!important}.image-tool__caption[contentEditable=true][data-placeholder]:before{content:attr(data-placeholder);color:#707684;font-weight:400;display:none}.image-tool__caption[contentEditable=true][data-placeholder]:empty:before{display:block}.image-tool__caption[contentEditable=true][data-placeholder]:empty:focus:before{display:none}.image-tool--empty .image-tool__image,.image-tool--empty .image-tool__image-preloader{display:none}.image-tool--empty .image-tool__caption,.image-tool--uploading .image-tool__caption{visibility:hidden!important}.image-tool .cdx-button{display:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.image-tool .cdx-button svg{height:auto;margin:0 6px 0 0}.image-tool--filled .cdx-button,.image-tool--filled .image-tool__image-preloader{display:none}.image-tool--uploading{width:100%}.image-tool--uploading .resizable{display:none!important}.image-tool--uploading .image-tool__image{min-height:200px;display:-webkit-box;display:-ms-flexbox;display:flex;background-color:#fff}.image-tool--uploading .image-tool__image-picture,.image-tool--uploading .cdx-button{display:none}.image-tool--withBorder .image-tool__image{border:1px solid var(--border-color)}.image-tool--withBackground .image-tool__image{padding:15px;background:var(--bg-color)}.image-tool--withBackground .image-tool__image-picture{max-width:60%;margin:0 auto}.image-tool--stretched .image-tool__image-picture{width:100%}.image-tool--caption .image-tool__caption{visibility:visible}.image-tool--caption{padding-bottom:50px}@-webkit-keyframes image-preloader-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes image-preloader-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cdx-image-tool-tune--floatLeft .cdx-block,.cdx-image-tool-tune--center .cdx-block,.cdx-image-tool-tune--floatRight .cdx-block,.cdx-image-tool-tune--floatLeft .image-tool__image,.cdx-image-tool-tune--center .image-tool__image,.cdx-image-tool-tune--floatRight .image-tool__image{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}:root{--primary: #2492F5;--primary-content: #E9F4FE}.cdx-settings-button--active{background:#e9f4fe;color:#2492f5}.cdx-settings-button:hover{background:#e9f4fe}.cdx-image-tool-tune--center{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media all and (min-width: 470px){.codex-editor:not(.read-only) .cdx-image-tool-tune--floatLeft.ce-block__content,.codex-editor:not(.read-only) .cdx-image-tool-tune--floatRight.ce-block__content{min-height:20px}.cdx-image-tool-tune--floatLeft.ce-block__content .image-tool__image,.cdx-image-tool-tune--floatRight.ce-block__content .image-tool__image{margin-top:40px}.cdx-image-tool-tune--floatLeft.ce-block__content .image-tool__image{margin-left:20px}.cdx-image-tool-tune--floatRight.ce-block__content .image-tool__image{margin-right:20px}.cdx-image-tool-tune--floatLeft.ce-block__content .cdx-input,.cdx-image-tool-tune--floatRight.ce-block__content .cdx-input{width:calc(100% - 20px)}.cdx-image-tool-tune--floatLeft.ce-block__content .cdx-input{margin-left:20px}.cdx-image-tool-tune--floatRight.ce-block__content .cdx-input{margin-right:20px}.cdx-image-tool-tune--floatLeft .cdx-block{float:left;margin-right:10px}.cdx-image-tool-tune--floatRight .cdx-block{float:right;margin-left:10px}.cdx-image-tool-tune--sizeSmall .cdx-block{max-width:25%!important}.cdx-image-tool-tune--sizeMiddle .cdx-block{max-width:50%!important}.cdx-image-tool-tune--sizeLarge .cdx-block{max-width:75%!important}}.cdx-image-tool-tune--sizeLarge img,.cdx-image-tool-tune--sizeSmall img,.cdx-image-tool-tune--sizeMiddle img{-o-object-fit:cover;object-fit:cover;max-width:100%}.codex-editor.read-only .cdx-input.image-tool__caption:empty,.read-only>.codex-editor .cdx-input.image-tool__caption:empty{display:none}.cdx-image-tool-tune--resize .cdx-block{position:relative;overflow:visible}.cdx-image-tool-tune--resize .cdx-block .resizable{display:none}.cdx-image-tool-tune--resize .image-tool__image-picture{width:100%!important}.cdx-image-tool-tune--resize .cdx-block:hover .resizable{display:block}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer{-webkit-box-sizing:border-box;box-sizing:border-box;width:14px;height:14px;border-radius:50%;background:#e9f4fe;border:3px solid #2492F5;position:absolute}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.top-left{left:-8px;top:2px;cursor:nwse-resize}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.top-right{right:-8px;top:1px;cursor:nesw-resize}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.bottom-left{left:-9px;bottom:10px;cursor:nesw-resize}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.bottom-right{right:-9px;bottom:10px;cursor:nwse-resize}.cdx-image-tool-tune--crop:hover,.cdx-image-tool-tune--crop.isCropping,.cdx-image-tool-tune--resize:hover{z-index:2}.cdx-image-tool-tune--crop .image-tool__image{position:relative}.cdx-image-tool-tune--crop .isCropping .image-tool__image{min-height:600px;min-width:100%}.cdx-image-tool-tune--crop .image-tool__image .crop-btn,.cdx-image-tool-tune--crop .image-tool__image .crop-save{position:absolute;top:0;left:0;padding:7px;background:#2492f5;color:#e9f4fe;text-align:center;line-height:20px;cursor:pointer;display:none}.cdx-image-tool-tune--crop .image-tool__image:hover .crop-btn,.cdx-image-tool-tune--crop .image-tool__image:hover .crop-save{display:block}.cdx-image-tool-tune--crop .image-tool__image img.isCropped{position:absolute;min-width:0;min-width:initial;max-width:none;max-width:initial;min-height:0;min-height:initial;max-height:none;max-height:initial}.cdx-image-tool-tune--crop .cdx-block.image-tool.isCropping{min-width:0!important;min-width:initial!important;max-width:none!important;max-width:initial!important;min-height:0!important;min-height:initial!important;max-height:none!important;max-height:initial!important}.image-tool__caption{background-color:#fff}.image-tool{position:relative;z-index:1}.cdx-image-tool-tune{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;gap:4px;width:100%}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import
|
|
4
|
-
import { isCaretAtStartOfInput as
|
|
5
|
-
import { bundledLanguagesInfo as
|
|
1
|
+
(function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode(':root{--color-border: #EFF0F1}.ebl-editor{cursor:text;font-size:16px;font-weight:400;background-color:#fff;height:100%;overflow:auto;position:relative;padding-top:15px}.ebl-editor.outline{padding-right:280px}.ebl-editor.outline .codex-editor{-webkit-box-flex:1;-ms-flex:1;flex:1}@media (max-width:1240px){.ebl-outline{display:none}.ebl-editor.outline{padding-right:0}}@media (min-width:1240px){.ebl-editor.readonly .ce-block__content{max-width:100%;padding-left:100px;padding-right:100px}}.ce-toolbar,.ce-inline-toolbar{z-index:1000}.ce-toolbar__plus{border:1px solid #EFF0F1}.ce-toolbar .ce-popover__items,.ce-popover-clone .ce-popover__items{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.ce-toolbar .ce-popover__items .ce-popover-item,.ce-popover-clone .ce-popover__items .ce-popover-item{position:relative}.ce-toolbar .ce-popover__items .ce-popover-item__title,.ce-popover-clone .ce-popover__items .ce-popover-item__title{display:none}.ce-toolbar .ce-popover-item-html,.ce-toolbar .ce-popover-item-separator,.ce-toolbar .ce-popover-item[data-item-name=convert-to],.ce-popover-clone .ce-popover-item-html,.ce-popover-clone .ce-popover-item-separator,.ce-popover-clone .ce-popover-item[data-item-name=convert-to]{width:100%}.ce-toolbar .ce-popover-item-html[data-item-name=list-setting],.ce-popover-clone .ce-popover-item-html[data-item-name=list-setting]{width:auto;overflow:hidden}.ce-toolbar .ce-popover-item-html[data-item-name=list-setting-start-with],.ce-popover-clone .ce-popover-item-html[data-item-name=list-setting-start-with]{border-radius:6px;padding:3px}.ce-toolbar .ce-popover-item-html[data-item-name=list-setting-start-with]:hover,.ce-popover-clone .ce-popover-item-html[data-item-name=list-setting-start-with]:hover{background-color:#f8f8f8}.ce-toolbar .ce-popover-item[data-item-name=convert-to] .ce-popover-item__title,.ce-popover-clone .ce-popover-item[data-item-name=convert-to] .ce-popover-item__title{display:block}.ce-toolbar .ce-popover-item[data-item-name=add-below],.ce-popover-clone .ce-popover-item[data-item-name=add-below]{width:100%}.ce-toolbar .ce-popover-item[data-item-name=add-below] .ce-popover-item__title,.ce-popover-clone .ce-popover-item[data-item-name=add-below] .ce-popover-item__title{display:block}.ce-toolbar .ce-popover-item[data-item-name=list-setting],.ce-popover-clone .ce-popover-item[data-item-name=list-setting]{width:100%}.ce-toolbar .ce-popover-item[data-item-name=list-setting] .ce-popover-item__title,.ce-popover-clone .ce-popover-item[data-item-name=list-setting] .ce-popover-item__title{display:block}.ce-popover--inline .ce-popover-item-html{padding:0 2px}.ce-inline-toolbar .ce-popover__items{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ce-inline-toolbar .ce-popover__items{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.ce-inline-toolbar .ce-popover__items .ce-popover-item__title{display:none}.ebl-editor ::-webkit-scrollbar{width:6px;height:6px}.ebl-editor ::-webkit-scrollbar-track{background:#f1f1f1;border-radius:1px}.ebl-editor ::-webkit-scrollbar-thumb{background:silver;border-radius:10px;border:1px solid #fff}.ebl-editor ::-webkit-scrollbar-thumb:hover{background:#555}.cdx-notifies{left:50%!important}.cdx-notifies{-webkit-transform:translateX(-50%);transform:translate(-50%);top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ebl-er-doc-outline-item{padding:7px 24px;cursor:pointer;white-space:normal;word-wrap:break-word}.ebl-er-doc-outline-item:hover{background-color:#f6f6f6}.ebl-er-doc-outline-item.selected{background-color:#ebebeb}.ebl-outline .level_1{padding-left:24px}.ebl-outline .level_2{padding-left:42px}.ebl-outline .level_3{padding-left:60px}.ce-popover--inline .ce-popover--nested .ce-popover__container{width:-webkit-min-content!important;width:-moz-min-content!important;width:min-content!important;min-width:0!important;min-width:initial!important}.ce-popover--inline .ce-popover--nested .ce-popover__items{width:-webkit-max-content;width:-moz-max-content;width:max-content}.editorjs__color-selector-container{display:grid;grid-gap:10px;padding:4px}.editorjs__color-selector__container-item{width:30px;height:30px;display:block;cursor:pointer;border-radius:100%;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}.editorjs__color-selector__container-item:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.cel-inline-bold{font-weight:700}.cel-inline-strikethrough{-webkit-text-decoration:line-through;text-decoration:line-through}.cel-inline-italic{font-style:italic}.cel-inline-code{margin-left:2px;margin-right:2px;background-color:#f5f6f7;border:1px solid #dee0e3;border-color:#dee0e3;border-width:1px 0;border-radius:4px;padding:1px 5px 1px 4px}.cel-inline-underline{-webkit-text-decoration:underline;text-decoration:underline}.cel-inline-underline.cel-inline-strikethrough{-webkit-text-decoration:underline line-through;text-decoration:underline line-through}.cel-inline-mark{background-color:#ff0;padding:2px}.cel-inline-link-input-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;gap:5px}.cel-inline-link-input{-webkit-box-flex:1;-ms-flex:1;flex:1;background:#f8f8f8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:4px 8px;font-size:14px;line-height:22px;outline:none;margin:0;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;font-weight:500;font-family:inherit}.cel-inline-link-input-btn{width:50px;border-radius:5px;background-color:#161c27;color:#fff;border:none;cursor:pointer}.cel-inline-link-input-btn.disabled{opacity:.4;cursor:not-allowed}.cel-fake-background{background-color:#a8d6ff}.editorjs__color-selector__input{width:1px;height:1px;opacity:0}.editorjs__color-selector__container-item-none{background-color:transparent;border:1px solid #e6e6e6;position:relative}.editorjs__color-selector__container-item-none:before{content:"";position:absolute;top:50%;left:50%;width:1px;height:35px;background-color:#e6e6e6;-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}.cel-inline-gray-text{color:#646a73}.cel-inline-pink-text{color:#d83931}.cel-inline-orange-text{color:#de7802}.cel-inline-yellow-text{color:#dc9b04}.cel-inline-green-text{color:#2ea121}.cel-inline-blue-text{color:#245bdb}.cel-inline-purple-text{color:#6425d0}.ebl-er-doc{font-family:var(--font-family);font-size:16px;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box}.ebl-er-header{height:var(--ebl-er-header-height);-webkit-box-sizing:border-box;box-sizing:border-box;position:sticky;top:0;z-index:10}.ebl-er-footer{height:var(--ebl-er-footer-height);-webkit-box-sizing:border-box;box-sizing:border-box}.ebl-er-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;min-height:calc(100vh - var(--ebl-er-header-height))}.ebl-er-doc-menu{width:var(--ebl-er-doc-menu-width);-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;height:calc(100vh - var(--ebl-er-header-height));position:sticky;top:var(--ebl-er-header-height)}.ebl-er-doc-menu-content{-webkit-box-sizing:border-box;box-sizing:border-box}.ebl-er-doc-content{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;max-width:calc(100% - var(--ebl-er-doc-menu-width));-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.ebl-er-doc-content-container{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-flex:1;-ms-flex:1;flex:1;padding:0 50px 50px;width:100%;overflow-x:hidden;white-space:normal;word-wrap:break-word}.ebl-er-doc-content-inner-wrap{margin:0 auto}.ebl-er-doc-content-inner .ce-block{width:100%}.ebl-er-doc-outline{width:280px;-webkit-box-sizing:border-box;box-sizing:border-box;height:calc(100vh - var(--ebl-er-header-height));position:sticky;top:var(--ebl-er-header-height);overflow:auto;padding:12px}.ebl-er-doc-pre-next{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:33px 0}@media (max-width:960px){.ebl-er-doc-outline{display:none}}.ebl-er-doc ::-webkit-scrollbar{width:6px;height:6px}.ebl-er-doc ::-webkit-scrollbar-track{background:#f1f1f1;border-radius:1px}.ebl-er-doc ::-webkit-scrollbar-thumb{background:silver;border-radius:10px;border:1px solid #fff}.ebl-er-doc ::-webkit-scrollbar-thumb:hover{background:#555}.ce-el-link-wrapper{position:absolute;z-index:1000;width:auto;max-width:300px;height:46px;padding:6px 20px;border:1px solid #eff0f1;border-radius:6px;background-color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.ce-el-link-input{border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:4px 8px;background-color:#f8f8f8;font-size:12px;line-height:22px;margin:0;-webkit-box-flex:1;-ms-flex:1;flex:1;width:260px}.ce-el-link-input.ce-el-link__noedit{display:none}.ce-el-link-btn-wrap{width:50px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.ce-el-link-btn{width:50px;background-color:#161c27;color:#fff;border-radius:6px;margin-left:5px;display:block}.ce-el-link-btn.ce-el-link__noedit{display:none}.ce-el-link-icon-btn{width:24px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-left:5px;cursor:pointer;display:none}.ce-el-link-icon-btn.ce-el-link__noedit{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-el-link-input-text{padding-right:20px;display:none}.ce-el-link-input-text.ce-el-link__noedit{display:block}.ce-block--drop-target .ce-block__content:before{content:"";position:absolute;top:50%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #a0a0a0;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{background:none}.ce-header{padding:15px 0 3px;margin:0;line-height:1.25;outline:none}.ce-header p,.ce-header div{padding:0!important;margin:0!important}.ce-tune-alignment--right{text-align:right}.ce-tune-alignment--center{text-align:center}.ce-tune-alignment--left{text-align:left}.ce-paragraph{line-height:2!important}.ce-paragraph{outline:none}.ce-block:only-of-type .ce-paragraph[data-placeholder-active]:empty:before,.ce-block:only-of-type .ce-paragraph[data-placeholder-active][data-empty=true]:before{content:attr(data-placeholder-active)}.ce-paragraph p:first-of-type{margin-top:0}.ce-paragraph p:last-of-type{margin-bottom:0}.ce-editorjs-x-shiki{border-radius:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 0;border:2px solid transparent;position:relative}.ce-editorjs-x-shiki.editable:hover{border:2px solid #C0C0C0}.ce-editorjs-x-shiki__lang{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:8px}.ce-editorjs-x-shiki__code{position:relative;float:left;min-width:100%;overflow:hidden;height:auto;min-height:60px}.ce-editorjs-x-shiki__code__dragHandler{position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translate(-50%);bottom:-5px;cursor:ns-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:8px;width:60px;background-color:silver;border-radius:5px;display:none}.ce-editorjs-x-shiki:hover .ce-editorjs-x-shiki__code__dragHandler{display:block}.ce-editorjs-x-shiki__selector{display:-webkit-box;display:-ms-flexbox;display:flex;gap:15px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom-style:solid;border-color:#9ca3af0d;border-bottom-width:1px;padding:0 8px 8px}.ce-editorjs-x-shiki__selector-language,.ce-editorjs-x-shiki__selector-theme{font-size:13px;font-family:inherit}.ce-editorjs-x-shiki__selector-language{width:90px}.ce-editorjs-x-shiki__selector select{border:none;outline:none}.ce-editorjs-x-shiki__span{position:relative;z-index:0;padding:20px 20px 20px 55px;margin:0;white-space:pre;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__span code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__textarea{all:unset;white-space:pre;background-color:transparent;position:absolute;padding:20px 20px 20px 55px;inset:0;color:transparent;z-index:0;font-size:13px;caret-color:#999;resize:none;border:none;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__textarea::-moz-selection{background-color:#083ca9;color:#fff}.ce-editorjs-x-shiki__textarea::selection{background-color:#083ca9;color:#fff}.ce-editorjs-x-shiki__copy{width:24px;height:24px;cursor:pointer;position:relative;margin-right:0}.ce-editorjs-x-shiki__copy_tip{font-size:12px;width:60px;margin-left:-20px;background-color:#0c0c0c;color:#ececec;text-align:center;border-radius:6px;padding:5px 10px;position:absolute;z-index:1;top:125%;-webkit-transition:opacity .3s;transition:opacity .3s;visibility:hidden;opacity:0}.ce-editorjs-x-shiki__copy_tip:after{content:"";position:absolute;bottom:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:transparent transparent #0c0c0c transparent}.ce-editorjs-x-shiki__copy_tip.visible{visibility:visible;opacity:1}.ce-editorjs-x-shiki__span.shiki .line:before{content:attr(data-line);width:40px;display:inline-block;text-align:right;color:#888;position:absolute;left:0}.ce-editorjs-x-shiki__code ::-webkit-scrollbar{width:8px;height:8px}.ce-editorjs-x-shiki__code ::-webkit-scrollbar-track{background:#22272e;border-radius:1px}.ce-editorjs-x-shiki__code ::-webkit-scrollbar-thumb{background:silver;border-radius:10px;border:2px solid #22272e}.ce-editorjs-x-shiki__code ::-webkit-scrollbar-thumb:hover{background:#555}.ce-block--selected .ce-editorjs-x-shiki{outline:2px solid #4299e1}.ce-block--selected .ce-editorjs-x-shiki,.ce-block--selected .ce-editorjs-x-shiki__selector-language,.ce-block--selected .ce-editorjs-x-shiki__span{background-color:#e1f2ff!important}.cdx-quote{overflow:hidden;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box;word-wrap:break-word;word-break:break-all}.cdx-quote blockquote{margin:0}.cdx-block-quote{border:solid #acacac;border-width:0 0 0 3px;-webkit-box-shadow:none;box-shadow:none;color:#666;line-height:1.6em;padding:1px 0 0 12px}.ce-delimiter__line__wrapper{height:24px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-delimiter__line{-webkit-box-flex:1;-ms-flex:1;flex:1;height:2px;background-color:#eff0f1}.cdx-list{margin:0;padding:0;outline:none;display:grid;counter-reset:item;grid-gap:var(--spacing-s);padding:var(--spacing-xs);--spacing-s: 8px;--spacing-xs: 6px;--list-counter-type: numeric;--radius-border: 5px;--checkbox-background: #fff;--color-border: #C9C9C9;--color-bg-checked: #369FFF;--line-height: 1.45em;--color-bg-checked-hover: #0059AB;--color-tick: #fff;--size-checkbox: 1.2em}.cdx-list ol{padding-left:0}.cdx-list__item{line-height:var(--line-height);display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;grid-template-areas:"checkbox content" ". child"}.cdx-list__item-children{display:grid;grid-area:child;grid-gap:var(--spacing-s);padding-top:var(--spacing-s)}.cdx-list__item [contenteditable]{outline:none}.cdx-list__item-content{word-break:break-word;white-space:pre-wrap;grid-area:content;padding-left:var(--spacing-s)}.cdx-list__item:before{counter-increment:item;white-space:nowrap}.cdx-list-ordered .cdx-list__item:before{content:counters(item,".",var(--list-counter-type)) "."}.cdx-list-ordered{counter-reset:item}.cdx-list-unordered{padding-left:0}.cdx-list-unordered .cdx-list__item:before{content:"•"}.cdx-list-checklist .cdx-list__item:before{content:""}.cdx-list__settings .cdx-settings-button{width:50%}.cdx-list__checkbox{padding-top:calc((var(--line-height) - var(--size-checkbox)) / 2);grid-area:checkbox;width:var(--size-checkbox);height:var(--size-checkbox);display:-webkit-box;display:-ms-flexbox;display:flex;cursor:pointer}.cdx-list__checkbox svg{opacity:0;height:var(--size-checkbox);width:var(--size-checkbox);left:-1px;top:-1px;position:absolute}@media (hover: hover){.cdx-list__checkbox:not(.cdx-list__checkbox--no-hover):hover .cdx-list__checkbox-check svg{opacity:1}}.cdx-list__checkbox--checked{line-height:var(--line-height)}@media (hover: hover){.cdx-list__checkbox--checked:not(.cdx-list__checkbox--checked--no-hover):hover .cdx-checklist__checkbox-check{background:var(--color-bg-checked-hover);border-color:var(--color-bg-checked-hover)}}.cdx-list__checkbox--checked .cdx-list__checkbox-check{background:var(--color-bg-checked);border-color:var(--color-bg-checked)}.cdx-list__checkbox--checked .cdx-list__checkbox-check svg{opacity:1}.cdx-list__checkbox--checked .cdx-list__checkbox-check svg path{stroke:var(--color-tick)}.cdx-list__checkbox--checked .cdx-list__checkbox-check:before{opacity:0;visibility:visible;-webkit-transform:scale(2.5);transform:scale(2.5)}.cdx-list__checkbox-check{cursor:pointer;display:inline-block;position:relative;margin:0 auto;width:var(--size-checkbox);height:var(--size-checkbox);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:var(--radius-border);border:1px solid var(--color-border);background:var(--checkbox-background)}.cdx-list__checkbox-check:before{content:"";position:absolute;inset:0;border-radius:100%;background-color:var(--color-bg-checked);visibility:hidden;pointer-events:none;-webkit-transform:scale(1);transform:scale(1);-webkit-transition:opacity .4s,-webkit-transform .4s ease-out;transition:opacity .4s,-webkit-transform .4s ease-out;transition:transform .4s ease-out,opacity .4s;transition:transform .4s ease-out,opacity .4s,-webkit-transform .4s ease-out}.cdx-list__checkbox-check--disabled{pointer-events:none}.cdx-list-start-with-field{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;overflow:hidden;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.cdx-list-start-with-field--invalid{background:#ffeced;border:1px solid #E13F3F}.cdx-list-start-with-field:hover{background-color:#f8f8f8}.cdx-list-start-with-field--invalid .cdx-list-start-with-field__input{color:#e13f3f}.cdx-list-start-with-field__startlabel{width:70px;font-size:14px}.cdx-list-start-with-field__input-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden}.cdx-list-start-with-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;line-height:22px;-webkit-box-flex:1;-ms-flex:1;flex:1;border:1px solid rgba(226,226,229,1);border-radius:6px;padding:0 10px;width:50px;text-align:center}.cdx-list-start-with-field__input::-webkit-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::-moz-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input:-ms-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::-ms-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::placeholder{color:var(--grayText);font-weight:500}.cdx-alert{position:relative;padding:10px;border-radius:5px;margin-bottom:10px;margin-top:10px}.cdx-alert-primary{background-color:#ebf8ff;border:1px solid #4299e1;color:#2b6cb0}.cdx-alert-secondary{background-color:#f7fafc;border:1px solid #cbd5e0;color:#222731}.cdx-alert-info{background-color:#e6fdff;border:1px solid #4cd4ce;color:#00727c}.cdx-alert-success{background-color:#f0fff4;border:1px solid #68d391;color:#2f855a}.cdx-alert-warning{background-color:#fffaf0;border:1px solid #ed8936;color:#c05621}.cdx-alert-danger{background-color:#fff5f5;border:1px solid #fc8181;color:#c53030}.cdx-alert-light{background-color:#fff;border:1px solid #edf2f7;color:#1a202c}.cdx-alert-dark{background-color:#2d3748;border:1px solid #1a202c;color:#d3d3d3}.cdx-alert-align-left{text-align:left}.cdx-alert-align-center{text-align:center}.cdx-alert-align-right{text-align:right}.cdx-alert__message{outline:none}.cdx-alert [contentEditable=true][data-placeholder]:before{position:absolute;content:attr(data-placeholder);color:#707684;font-weight:400;opacity:0}.cdx-alert [contentEditable=true][data-placeholder]:empty:before{opacity:1}.cdx-alert [contentEditable=true][data-placeholder]:empty:focus:before{opacity:0}.ce-popover__item[data-item-name=alert-primary] .ce-popover__item-icon svg #background{fill:#ebf8ff;stroke:#4299e1}.ce-popover__item[data-item-name=alert-primary] .ce-popover__item-icon svg #content{fill:#2b6cb0}.ce-popover__item[data-item-name=alert-secondary] .ce-popover__item-icon svg #background{fill:#f7fafc;stroke:#cbd5e0}.ce-popover__item[data-item-name=alert-secondary] .ce-popover__item-icon svg #content{fill:#222731}.ce-popover__item[data-item-name=alert-info] .ce-popover__item-icon svg #background{fill:#e6fdff;stroke:#4cd4ce}.ce-popover__item[data-item-name=alert-info] .ce-popover__item-icon svg #content{fill:#00727c}.ce-popover__item[data-item-name=alert-success] .ce-popover__item-icon svg #background{fill:#f0fff4;stroke:#68d391}.ce-popover__item[data-item-name=alert-success] .ce-popover__item-icon svg #content{fill:#2f855a}.ce-popover__item[data-item-name=alert-warning] .ce-popover__item-icon svg #background{fill:#fffaf0;stroke:#ed8936}.ce-popover__item[data-item-name=alert-warning] .ce-popover__item-icon svg #content{fill:#c05621}.ce-popover__item[data-item-name=alert-danger] .ce-popover__item-icon svg #background{fill:#fff5f5;stroke:#fc8181}.ce-popover__item[data-item-name=alert-danger] .ce-popover__item-icon svg #content{fill:#c53030}.ce-popover__item[data-item-name=alert-light] .ce-popover__item-icon svg #background{fill:#fff;stroke:#edf2f7}.ce-popover__item[data-item-name=alert-light] .ce-popover__item-icon svg #content{fill:#1a202c}.ce-popover__item[data-item-name=alert-dark] .ce-popover__item-icon svg #background{fill:#2d3748;stroke:#1a202c}.ce-popover__item[data-item-name=alert-dark] .ce-popover__item-icon svg #content{fill:#d3d3d3}.cdx-alert_setting__icon_wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:10px}.cdx-alert_setting__icon_wrapper_align{margin-top:10px}.cdx-alert_setting__icon{display:inline-block;width:24px;height:24px;text-align:center;line-height:24px;cursor:pointer}.cdx-alert_setting__icon_active{opacity:.3}.ce-block--selected .cdx-alert{outline:2px solid #4299e1}.ce-popover-indent-item{cursor:default!important}.ce-popover-indent-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:3px}.ce-popover-indent-item[version^="2.26"]{gap:10px}.ce-popover-indent-item:hover{background-color:transparent!important}.ce-popover-indent-item .ce-popover-item__icon{width:26px;height:26px;cursor:pointer;will-change:background-color,color;transition:.3s background-color,.3s color;padding:0;border-width:0px;color:#000;background-color:#fff;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;-webkit-transition:.3s background-color,.3s color;-moz-transition:.3s background-color,.3s color;-ms-transition:.3s background-color,.3s color;-o-transition:.3s background-color,.3s color}.ce-popover-indent-item .ce-popover-item--disabled{color:#707684;opacity:.3;cursor:default}.ce-popover-indent-item .ce-popover-item__icon:focus{outline:none}.ce-popover-indent-item[version^="2.26"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.27"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.28"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.29"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.26"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.27"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.28"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.29"] .ce-popover-item__icon{box-shadow:0 0 0 1px #c9c9cc7a!important;-webkit-box-shadow:0 0 0 1px rgba(201,201,204,.48)!important}.ce-popover-indent-item[version^="2.26"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.27"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.28"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.29"] .ce-popover-item__icon:hover{background-color:#eff2f5}.ce-highlight-indent{display:inline-block;height:1.6em;top:50%;position:absolute;transform:translateY(-50%);-webkit-transform:translate(0px,-50%);-moz-transform:translate(0px,-50%);-ms-transform:translate(0px,-50%);-o-transform:translate(0px,-50%)}.ce-popover-indent-item[version^="2.3"] .ce-popover-item__title{margin-left:4px}.tc-wrap{--color-background: #f9f9fb;--color-text-secondary: #7b7e89;--color-border: #e8e8eb;--cell-size: 34px;--toolbox-icon-size: 18px;--toolbox-padding: 6px;--toolbox-aiming-field-size: calc(var(--toolbox-icon-size) + var(--toolbox-padding)*2);--col-width: 100px 100px 100px;position:relative;height:100%;margin-top:var(--toolbox-icon-size);-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-grid;z-index:0}.tc-wrap svg{vertical-align:top}@media print{.tc-wrap{border-left-color:var(--color-border);border-left-style:solid;border-left-width:1px}}@media print{.tc-wrap .tc-row:after{display:none}}.tc-table{position:relative;width:100%;height:100%;display:grid;font-size:14px;border-top:1px solid var(--color-border);border-left:1px solid var(--color-border);line-height:1.4;overflow-x:auto}.tc-table:after{width:calc(var(--cell-size));height:100%;left:calc(var(--cell-size)*-1);top:0}.tc-table:after,.tc-table:before{position:absolute;content:""}.tc-table:before{width:100%;height:var(--toolbox-aiming-field-size);top:calc(var(--toolbox-aiming-field-size)*-1);left:0}.tc-table--heading .tc-row:first-child{font-weight:600;border-bottom:2px solid var(--color-border);position:sticky;top:0;z-index:2;background:var(--color-background)}.tc-table--heading .tc-row:first-child [contenteditable]:empty:before{content:attr(heading);color:var(--color-text-secondary)}.tc-table--heading .tc-row:first-child:after{bottom:-2px;border-bottom:2px solid var(--color-border)}.tc-add-column,.tc-add-row{display:-webkit-box;display:-ms-flexbox;display:flex;color:var(--color-text-secondary)}@media print{.tc-add{display:none}}.tc-add-column{display:grid;border-top:1px solid var(--color-border);grid-auto-rows:var(--cell-size);-webkit-box-align:center;-ms-flex-align:center;align-items:center;justify-items:center}.tc-add-column svg{padding:5px;position:sticky;top:0;background-color:var(--color-background)}.tc-add-column--disabled{visibility:hidden}@media print{.tc-add-column{display:none}}.tc-add-row{height:var(--cell-size);-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-left:4px;position:relative}.tc-add-row--disabled{display:none}.tc-add-row:before{content:"";position:absolute;right:calc(var(--cell-size)*-1);width:var(--cell-size);height:100%}@media print{.tc-add-row{display:none}}.tc-add-column,.tc-add-row{-webkit-transition:0s;transition:0s;cursor:pointer;will-change:background-color}.tc-add-column:hover,.tc-add-row:hover{-webkit-transition:background-color .1s ease;transition:background-color .1s ease;background-color:var(--color-background)}.tc-add-row{margin-top:1px}.tc-add-row:hover:before{-webkit-transition:.1s;transition:.1s;background-color:var(--color-background)}.tc-row{display:grid;grid-template-columns:var(--col-width);position:relative;border-bottom:1px solid var(--color-border)}.tc-row--selected{background:var(--color-background)}.tc-row--selected:after{background:var(--color-background)}.tc-cell{border-right:1px solid var(--color-border);padding:6px 12px;overflow:hidden;outline:none;line-break:normal}.tc-cell--selected{background:var(--color-background)}.tc-wrap--readonly .tc-row:after{display:none}.tc-toolbox{--toolbox-padding: 6px;--popover-margin: 30px;--toggler-click-zone-size: 30px;--toggler-dots-color: #7b7e89;--toggler-dots-color-hovered: #1d202b;position:absolute;cursor:pointer;z-index:1;opacity:0;-webkit-transition:opacity .1s;transition:opacity .1s;will-change:left,opacity}.tc-toolbox--column{top:calc(var(--toggler-click-zone-size)*-1);-webkit-transform:translate(calc(var(--toggler-click-zone-size)*-1/2));transform:translate(calc(var(--toggler-click-zone-size)*-1/2));will-change:left,opacity}.tc-toolbox--row{left:calc(var(--popover-margin)*-1);-webkit-transform:translateY(calc(var(--toggler-click-zone-size)*-1/2));transform:translateY(calc(var(--toggler-click-zone-size)*-1/2));margin-top:-1px;will-change:top,opacity}.tc-toolbox--showed{opacity:1}.tc-toolbox .tc-popover{position:absolute;top:0;left:var(--popover-margin)}.tc-toolbox__toggler{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:var(--toggler-click-zone-size);height:var(--toggler-click-zone-size);color:var(--toggler-dots-color);opacity:0;-webkit-transition:opacity .15s ease;transition:opacity .15s ease;will-change:opacity}.tc-toolbox__toggler:hover{color:var(--toggler-dots-color-hovered)}.tc-toolbox__toggler svg{fill:currentColor}.tc-wrap:hover .tc-toolbox__toggler{opacity:1}.tc-settings .cdx-settings-button{width:50%;margin:0}.tc-popover{--color-border: #eaeaea;--color-background: #fff;--color-background-hover: rgba(232, 232, 235, .49);--color-background-confirm: #e24a4a;--color-background-confirm-hover: #d54040;--color-text-confirm: #fff;background:var(--color-background);border:1px solid var(--color-border);-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.12941);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;padding:6px;display:none;will-change:opacity,transform}.tc-popover--opened{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-animation:menuShowing .1s cubic-bezier(.215,.61,.355,1) forwards;animation:menuShowing .1s cubic-bezier(.215,.61,.355,1) forwards}.tc-popover__item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:2px 14px 2px 2px;border-radius:5px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tc-popover__item:hover{background:var(--color-background-hover)}.tc-popover__item:not(:last-of-type){margin-bottom:2px}.tc-popover__item-icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:26px;height:26px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:var(--color-background);border-radius:5px;border:1px solid var(--color-border);margin-right:8px}.tc-popover__item-label{line-height:22px;font-size:14px;font-weight:500}.tc-popover__item--confirm{background:var(--color-background-confirm);color:var(--color-text-confirm)}.tc-popover__item--confirm:hover{background-color:var(--color-background-confirm-hover)}.tc-popover__item--confirm .tc-popover__item-icon{background:var(--color-background-confirm);border-color:#0000001a}.tc-popover__item--confirm .tc-popover__item-icon svg{-webkit-transition:-webkit-transform .2s ease-in;transition:-webkit-transform .2s ease-in;transition:transform .2s ease-in;transition:transform .2s ease-in,-webkit-transform .2s ease-in;-webkit-transform:rotate(90deg) scale(1.2);transform:rotate(90deg) scale(1.2)}.tc-popover__item--hidden{display:none}@-webkit-keyframes menuShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes menuShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.cell-resizable{cursor:col-resize}.image-tool{--bg-color: #cdd1e0;--front-color: #388ae5;--border-color: #e8e8eb;display:inline-block}.image-tool__image{border-radius:3px;overflow:hidden;margin-bottom:10px;padding-bottom:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.image-tool__image-picture{max-width:100%;vertical-align:bottom;display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.image-tool__image-preloader{width:150px;height:150px;border-radius:50%;background-size:cover;margin:auto;position:relative;background-color:var(--bg-color);background-position:center center}.image-tool__image-preloader:after{content:"";position:absolute;z-index:3;width:60px;height:60px;border-radius:50%;border:2px solid var(--bg-color);border-top-color:var(--front-color);left:50%;top:50%;margin-top:-30px;margin-left:-30px;-webkit-animation:image-preloader-spin 2s infinite linear;animation:image-preloader-spin 2s infinite linear;-webkit-box-sizing:border-box;box-sizing:border-box}.image-tool__caption{visibility:hidden;position:absolute;bottom:0;left:0;margin-bottom:10px}.image-tool__caption[contentEditable=true][data-placeholder]:before{position:absolute!important}.image-tool__caption[contentEditable=true][data-placeholder]:before{content:attr(data-placeholder);color:#707684;font-weight:400;display:none}.image-tool__caption[contentEditable=true][data-placeholder]:empty:before{display:block}.image-tool__caption[contentEditable=true][data-placeholder]:empty:focus:before{display:none}.image-tool--empty .image-tool__image,.image-tool--empty .image-tool__image-preloader{display:none}.image-tool--empty .image-tool__caption,.image-tool--uploading .image-tool__caption{visibility:hidden!important}.image-tool .cdx-button{display:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.image-tool .cdx-button svg{height:auto;margin:0 6px 0 0}.image-tool--filled .cdx-button,.image-tool--filled .image-tool__image-preloader{display:none}.image-tool--uploading{width:100%}.image-tool--uploading .resizable{display:none!important}.image-tool--uploading .image-tool__image{min-height:200px;display:-webkit-box;display:-ms-flexbox;display:flex;background-color:#fff}.image-tool--uploading .image-tool__image-picture,.image-tool--uploading .cdx-button{display:none}.image-tool--withBorder .image-tool__image{border:1px solid var(--border-color)}.image-tool--withBackground .image-tool__image{padding:15px;background:var(--bg-color)}.image-tool--withBackground .image-tool__image-picture{max-width:60%;margin:0 auto}.image-tool--stretched .image-tool__image-picture{width:100%}.image-tool--caption .image-tool__caption{visibility:visible}.image-tool--caption{padding-bottom:50px}@-webkit-keyframes image-preloader-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes image-preloader-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cdx-image-tool-tune--floatLeft .cdx-block,.cdx-image-tool-tune--center .cdx-block,.cdx-image-tool-tune--floatRight .cdx-block,.cdx-image-tool-tune--floatLeft .image-tool__image,.cdx-image-tool-tune--center .image-tool__image,.cdx-image-tool-tune--floatRight .image-tool__image{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}:root{--primary: #2492F5;--primary-content: #E9F4FE}.cdx-settings-button--active{background:#e9f4fe;color:#2492f5}.cdx-settings-button:hover{background:#e9f4fe}.cdx-image-tool-tune--center{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media all and (min-width: 470px){.codex-editor:not(.read-only) .cdx-image-tool-tune--floatLeft.ce-block__content,.codex-editor:not(.read-only) .cdx-image-tool-tune--floatRight.ce-block__content{min-height:20px}.cdx-image-tool-tune--floatLeft.ce-block__content .image-tool__image,.cdx-image-tool-tune--floatRight.ce-block__content .image-tool__image{margin-top:40px}.cdx-image-tool-tune--floatLeft.ce-block__content .image-tool__image{margin-left:20px}.cdx-image-tool-tune--floatRight.ce-block__content .image-tool__image{margin-right:20px}.cdx-image-tool-tune--floatLeft.ce-block__content .cdx-input,.cdx-image-tool-tune--floatRight.ce-block__content .cdx-input{width:calc(100% - 20px)}.cdx-image-tool-tune--floatLeft.ce-block__content .cdx-input{margin-left:20px}.cdx-image-tool-tune--floatRight.ce-block__content .cdx-input{margin-right:20px}.cdx-image-tool-tune--floatLeft .cdx-block{float:left;margin-right:10px}.cdx-image-tool-tune--floatRight .cdx-block{float:right;margin-left:10px}.cdx-image-tool-tune--sizeSmall .cdx-block{max-width:25%!important}.cdx-image-tool-tune--sizeMiddle .cdx-block{max-width:50%!important}.cdx-image-tool-tune--sizeLarge .cdx-block{max-width:75%!important}}.cdx-image-tool-tune--sizeLarge img,.cdx-image-tool-tune--sizeSmall img,.cdx-image-tool-tune--sizeMiddle img{-o-object-fit:cover;object-fit:cover;max-width:100%}.codex-editor.read-only .cdx-input.image-tool__caption:empty,.read-only>.codex-editor .cdx-input.image-tool__caption:empty{display:none}.cdx-image-tool-tune--resize .cdx-block{position:relative;overflow:visible}.cdx-image-tool-tune--resize .cdx-block .resizable{display:none}.cdx-image-tool-tune--resize .image-tool__image-picture{width:100%!important}.cdx-image-tool-tune--resize .cdx-block:hover .resizable{display:block}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer{-webkit-box-sizing:border-box;box-sizing:border-box;width:14px;height:14px;border-radius:50%;background:#e9f4fe;border:3px solid #2492F5;position:absolute}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.top-left{left:-8px;top:2px;cursor:nwse-resize}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.top-right{right:-8px;top:1px;cursor:nesw-resize}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.bottom-left{left:-9px;bottom:10px;cursor:nesw-resize}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.bottom-right{right:-9px;bottom:10px;cursor:nwse-resize}.cdx-image-tool-tune--crop:hover,.cdx-image-tool-tune--crop.isCropping,.cdx-image-tool-tune--resize:hover{z-index:2}.cdx-image-tool-tune--crop .image-tool__image{position:relative}.cdx-image-tool-tune--crop .isCropping .image-tool__image{min-height:600px;min-width:100%}.cdx-image-tool-tune--crop .image-tool__image .crop-btn,.cdx-image-tool-tune--crop .image-tool__image .crop-save{position:absolute;top:0;left:0;padding:7px;background:#2492f5;color:#e9f4fe;text-align:center;line-height:20px;cursor:pointer;display:none}.cdx-image-tool-tune--crop .image-tool__image:hover .crop-btn,.cdx-image-tool-tune--crop .image-tool__image:hover .crop-save{display:block}.cdx-image-tool-tune--crop .image-tool__image img.isCropped{position:absolute;min-width:0;min-width:initial;max-width:none;max-width:initial;min-height:0;min-height:initial;max-height:none;max-height:initial}.cdx-image-tool-tune--crop .cdx-block.image-tool.isCropping{min-width:0!important;min-width:initial!important;max-width:none!important;max-width:initial!important;min-height:0!important;min-height:initial!important;max-height:none!important;max-height:initial!important}.image-tool__caption{background-color:#fff}.image-tool{position:relative;z-index:1}.cdx-image-tool-tune{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;gap:4px;width:100%}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
+
import { defineComponent as Rn, inject as Nn, onMounted as An, toRaw as Ot, onUnmounted as _n, watch as Mn, createElementBlock as On, openBlock as In } from "vue";
|
|
3
|
+
import Hn, { SelectionUtils as xt } from "@ebl-vue/editorjs";
|
|
4
|
+
import { isCaretAtStartOfInput as kn, focus as Bn, getCaretNodeAndOffset as Dn } from "@editorjs/caret";
|
|
5
|
+
import { bundledLanguagesInfo as Pn, codeToHtml as zn } from "shiki";
|
|
6
6
|
import * as Tt from "@editorjs/dom";
|
|
7
|
-
import { make as Re, isEmpty as
|
|
7
|
+
import { make as Re, isEmpty as jt } from "@editorjs/dom";
|
|
8
8
|
import Et from "axios";
|
|
9
|
-
const
|
|
9
|
+
const Yt = Symbol("INSTALLED_KEY"), Wn = (_, e) => (_.install = (t) => {
|
|
10
10
|
for (const n of [_, ...Object.values({})]) t.component(n.name, n);
|
|
11
11
|
}, _);
|
|
12
|
-
function
|
|
12
|
+
function Fn() {
|
|
13
13
|
var _ = "object", e = "undefined", t = ["startContainer", "startOffset", "endContainer", "endOffset", "collapsed", "commonAncestorContainer"], n = ["setStart", "setStartBefore", "setStartAfter", "setEnd", "setEndBefore", "setEndAfter", "collapse", "selectNode", "selectNodeContents", "compareBoundaryPoints", "deleteContents", "extractContents", "cloneContents", "insertNode", "surroundContents", "cloneRange", "toString", "detach"], s = ["boundingHeight", "boundingLeft", "boundingTop", "boundingWidth", "htmlText", "text"], a = ["collapse", "compareEndPoints", "duplicate", "moveToElementText", "parentElement", "select", "setEndPoint", "getBoundingClientRect"];
|
|
14
14
|
function c(p, x) {
|
|
15
15
|
var L = typeof p[x];
|
|
@@ -34,7 +34,7 @@ function Wn() {
|
|
|
34
34
|
function H(p) {
|
|
35
35
|
return g(p, "body") ? p.body : p.getElementsByTagName("body")[0];
|
|
36
36
|
}
|
|
37
|
-
var B,
|
|
37
|
+
var B, X, ie = {}, de = typeof window != e && typeof document != e, fe = { isHostMethod: c, isHostObject: g, isHostProperty: C, areHostMethods: b, areHostObjects: M, areHostProperties: A, isTextRange: R, getBody: H, forEach: [].forEach ? function(p, x) {
|
|
38
38
|
p.forEach(x);
|
|
39
39
|
} : function(p, x) {
|
|
40
40
|
for (var L = 0, F = p.length; L < F; ++L) x(p[L], L);
|
|
@@ -74,11 +74,11 @@ function Wn() {
|
|
|
74
74
|
for (var J = [], ee = 0, K = F.length; ee < K; ++ee) J[ee] = F[ee];
|
|
75
75
|
return J;
|
|
76
76
|
}), fe.toArray = p;
|
|
77
|
-
}(), de && (c(document, "addEventListener") ?
|
|
77
|
+
}(), de && (c(document, "addEventListener") ? X = function(p, x, L) {
|
|
78
78
|
p.addEventListener(x, L, !1);
|
|
79
|
-
} : c(document, "attachEvent") ?
|
|
79
|
+
} : c(document, "attachEvent") ? X = function(p, x, L) {
|
|
80
80
|
p.attachEvent("on" + x, L);
|
|
81
|
-
} : Ae("Document does not have required addEventListener or attachEvent method"), fe.addListener =
|
|
81
|
+
} : Ae("Document does not have required addEventListener or attachEvent method"), fe.addListener = X);
|
|
82
82
|
var Be = [];
|
|
83
83
|
function Ye(p) {
|
|
84
84
|
return p.message || p.description || String(p);
|
|
@@ -431,7 +431,7 @@ function Wn() {
|
|
|
431
431
|
return null;
|
|
432
432
|
};
|
|
433
433
|
}
|
|
434
|
-
var Ie = Ne([9, 11]),
|
|
434
|
+
var Ie = Ne([9, 11]), Ge = Ne([5, 6, 10, 12]), Pe = Ne([6, 10, 12]), nt = Ne([1]);
|
|
435
435
|
function be(o, f) {
|
|
436
436
|
if (Pe(o, f)) throw new ee("INVALID_NODE_TYPE_ERR");
|
|
437
437
|
}
|
|
@@ -441,20 +441,20 @@ function Wn() {
|
|
|
441
441
|
function je(o, f) {
|
|
442
442
|
if (f < 0 || f > (K(o) ? o.length : o.childNodes.length)) throw new ee("INDEX_SIZE_ERR");
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function it(o, f) {
|
|
445
445
|
if (Ie(o, !0) !== Ie(f, !0)) throw new ee("WRONG_DOCUMENT_ERR");
|
|
446
446
|
}
|
|
447
447
|
function ze(o) {
|
|
448
|
-
if (
|
|
448
|
+
if (Ge(o, !0)) throw new ee("NO_MODIFICATION_ALLOWED_ERR");
|
|
449
449
|
}
|
|
450
450
|
function ft(o, f) {
|
|
451
451
|
if (!o) throw new ee(f);
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function Xe(o, f) {
|
|
454
454
|
return f <= (K(o) ? o.length : o.childNodes.length);
|
|
455
455
|
}
|
|
456
456
|
function mt(o) {
|
|
457
|
-
return !!o.startContainer && !!o.endContainer && !(P && (L.isBrokenNode(o.startContainer) || L.isBrokenNode(o.endContainer))) && v(o.startContainer) == v(o.endContainer) &&
|
|
457
|
+
return !!o.startContainer && !!o.endContainer && !(P && (L.isBrokenNode(o.startContainer) || L.isBrokenNode(o.endContainer))) && v(o.startContainer) == v(o.endContainer) && Xe(o.startContainer, o.startOffset) && Xe(o.endContainer, o.endOffset);
|
|
458
458
|
}
|
|
459
459
|
function pe(o) {
|
|
460
460
|
if (!mt(o)) throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: (" + o.inspect() + ")");
|
|
@@ -479,7 +479,7 @@ function Wn() {
|
|
|
479
479
|
var i = o.startContainer, l = o.startOffset, m = o.endContainer, k = o.endOffset, w = i === m;
|
|
480
480
|
K(m) && k > 0 && k < m.length && y(m, k, f), K(i) && l > 0 && l < i.length && (i = y(i, l, f), w ? (k -= l, m = i) : m == i.parentNode && k >= ue(i) && k++, l = 0), o.setStartAndEnd(i, l, m, k);
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function st(o) {
|
|
483
483
|
pe(o);
|
|
484
484
|
var f = o.commonAncestorContainer.parentNode.cloneNode(!1);
|
|
485
485
|
return f.appendChild(o.cloneContents()), f.innerHTML;
|
|
@@ -502,19 +502,19 @@ function Wn() {
|
|
|
502
502
|
}
|
|
503
503
|
function kt(o, f) {
|
|
504
504
|
function i(w, N) {
|
|
505
|
-
return function(
|
|
506
|
-
Ee(
|
|
507
|
-
var j = (w ? Y : Z)(
|
|
505
|
+
return function(G) {
|
|
506
|
+
Ee(G, ge), Ee(v(G), Me);
|
|
507
|
+
var j = (w ? Y : Z)(G);
|
|
508
508
|
(N ? l : m)(this, j.node, j.offset);
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
|
-
function l(w, N,
|
|
511
|
+
function l(w, N, G) {
|
|
512
512
|
var j = w.endContainer, oe = w.endOffset;
|
|
513
|
-
N === w.startContainer &&
|
|
513
|
+
N === w.startContainer && G === w.startOffset || (v(N) == v(j) && u(N, G, j, oe) != 1 || (j = N, oe = G), f(w, N, G, j, oe));
|
|
514
514
|
}
|
|
515
|
-
function m(w, N,
|
|
515
|
+
function m(w, N, G) {
|
|
516
516
|
var j = w.startContainer, oe = w.startOffset;
|
|
517
|
-
N === w.endContainer &&
|
|
517
|
+
N === w.endContainer && G === w.endOffset || (v(N) == v(j) && u(N, G, j, oe) != -1 || (j = N, oe = G), f(w, j, oe, N, G));
|
|
518
518
|
}
|
|
519
519
|
var k = function() {
|
|
520
520
|
};
|
|
@@ -523,7 +523,7 @@ function Wn() {
|
|
|
523
523
|
}, setEnd: function(w, N) {
|
|
524
524
|
be(w, !0), je(w, N), m(this, w, N);
|
|
525
525
|
}, setStartAndEnd: function() {
|
|
526
|
-
var w = arguments, N = w[0],
|
|
526
|
+
var w = arguments, N = w[0], G = w[1], j = N, oe = G;
|
|
527
527
|
switch (w.length) {
|
|
528
528
|
case 3:
|
|
529
529
|
oe = w[2];
|
|
@@ -531,17 +531,17 @@ function Wn() {
|
|
|
531
531
|
case 4:
|
|
532
532
|
j = w[2], oe = w[3];
|
|
533
533
|
}
|
|
534
|
-
be(N, !0), je(N,
|
|
535
|
-
}, setBoundary: function(w, N,
|
|
536
|
-
this["set" + (
|
|
534
|
+
be(N, !0), je(N, G), be(j, !0), je(j, oe), f(this, N, G, j, oe);
|
|
535
|
+
}, setBoundary: function(w, N, G) {
|
|
536
|
+
this["set" + (G ? "Start" : "End")](w, N);
|
|
537
537
|
}, setStartBefore: i(!0, !0), setStartAfter: i(!1, !0), setEndBefore: i(!0, !1), setEndAfter: i(!1, !1), collapse: function(w) {
|
|
538
538
|
pe(this), w ? f(this, this.startContainer, this.startOffset, this.startContainer, this.startOffset) : f(this, this.endContainer, this.endOffset, this.endContainer, this.endOffset);
|
|
539
539
|
}, selectNodeContents: function(w) {
|
|
540
540
|
be(w, !0), f(this, w, 0, w, O(w));
|
|
541
541
|
}, selectNode: function(w) {
|
|
542
542
|
be(w, !1), Ee(w, ge);
|
|
543
|
-
var N = Y(w),
|
|
544
|
-
f(this, N.node, N.offset,
|
|
543
|
+
var N = Y(w), G = Z(w);
|
|
544
|
+
f(this, N.node, N.offset, G.node, G.offset);
|
|
545
545
|
}, extractContents: Qe(D, f), deleteContents: Qe(S, f), canSurroundContents: function() {
|
|
546
546
|
pe(this), ze(this.startContainer), ze(this.endContainer);
|
|
547
547
|
var w = new ne(this, !0), N = w._first && I(w._first, this) || w._last && I(w._last, this);
|
|
@@ -552,41 +552,41 @@ function Wn() {
|
|
|
552
552
|
dt(this, w);
|
|
553
553
|
}, normalizeBoundaries: function() {
|
|
554
554
|
pe(this);
|
|
555
|
-
var w, N = this.startContainer,
|
|
555
|
+
var w, N = this.startContainer, G = this.startOffset, j = this.endContainer, oe = this.endOffset, Je = function(Le) {
|
|
556
556
|
var We = Le.nextSibling;
|
|
557
557
|
We && We.nodeType == Le.nodeType && (j = Le, oe = Le.length, Le.appendData(We.data), W(We));
|
|
558
558
|
}, ht = function(Le) {
|
|
559
559
|
var We = Le.previousSibling;
|
|
560
560
|
if (We && We.nodeType == Le.nodeType) {
|
|
561
561
|
N = Le;
|
|
562
|
-
var
|
|
563
|
-
if (
|
|
562
|
+
var xn = Le.length;
|
|
563
|
+
if (G = We.length, Le.insertData(0, We.data), W(We), N == j) oe += G, j = N;
|
|
564
564
|
else if (j == Le.parentNode) {
|
|
565
|
-
var
|
|
566
|
-
oe ==
|
|
565
|
+
var Kt = ue(Le);
|
|
566
|
+
oe == Kt ? (j = Le, oe = xn) : oe > Kt && oe--;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
},
|
|
570
|
-
if (K(j)) oe == j.length ? Je(j) : oe == 0 && (w = j.previousSibling) && w.nodeType == j.nodeType && (oe = w.length, N == j && (
|
|
569
|
+
}, At = !0;
|
|
570
|
+
if (K(j)) oe == j.length ? Je(j) : oe == 0 && (w = j.previousSibling) && w.nodeType == j.nodeType && (oe = w.length, N == j && (At = !1), w.appendData(j.data), W(j), j = w);
|
|
571
571
|
else {
|
|
572
572
|
if (oe > 0) {
|
|
573
|
-
var
|
|
574
|
-
|
|
573
|
+
var _t = j.childNodes[oe - 1];
|
|
574
|
+
_t && K(_t) && Je(_t);
|
|
575
575
|
}
|
|
576
|
-
|
|
576
|
+
At = !this.collapsed;
|
|
577
577
|
}
|
|
578
|
-
if (
|
|
579
|
-
if (K(N))
|
|
580
|
-
else if (
|
|
581
|
-
var
|
|
582
|
-
|
|
578
|
+
if (At) {
|
|
579
|
+
if (K(N)) G == 0 ? ht(N) : G == N.length && (w = N.nextSibling) && w.nodeType == N.nodeType && (j == w && (j = N, oe += N.length), N.appendData(w.data), W(w));
|
|
580
|
+
else if (G < N.childNodes.length) {
|
|
581
|
+
var Mt = N.childNodes[G];
|
|
582
|
+
Mt && K(Mt) && ht(Mt);
|
|
583
583
|
}
|
|
584
|
-
} else N = j,
|
|
585
|
-
f(this, N,
|
|
584
|
+
} else N = j, G = oe;
|
|
585
|
+
f(this, N, G, j, oe);
|
|
586
586
|
}, collapseToPoint: function(w, N) {
|
|
587
587
|
be(w, !0), je(w, N), this.setStartAndEnd(w, N);
|
|
588
588
|
}, parentElement: function() {
|
|
589
|
-
return pe(this), this.commonAncestorContainer ?
|
|
589
|
+
return pe(this), this.commonAncestorContainer ? nt(this.commonAncestorContainer, !0) : null;
|
|
590
590
|
} }), yt(o);
|
|
591
591
|
}
|
|
592
592
|
function Ze(o, f, i, l, m) {
|
|
@@ -599,7 +599,7 @@ function Wn() {
|
|
|
599
599
|
}
|
|
600
600
|
F.extend(p.rangePrototype, { compareBoundaryPoints: function(o, f) {
|
|
601
601
|
var i, l, m, k;
|
|
602
|
-
pe(this),
|
|
602
|
+
pe(this), it(this.startContainer, f.startContainer);
|
|
603
603
|
var w = o == 3 || o == 0 ? "start" : "end", N = o == 1 || o == 0 ? "start" : "end";
|
|
604
604
|
return i = this[w + "Container"], l = this[w + "Offset"], m = f[N + "Container"], k = f[N + "Offset"], u(i, l, m, k);
|
|
605
605
|
}, insertNode: function(o) {
|
|
@@ -640,9 +640,9 @@ function Wn() {
|
|
|
640
640
|
var l = this.comparePoint(f, i), m = this.comparePoint(f, i + 1);
|
|
641
641
|
return l < 0 ? m > 0 ? 2 : 0 : m > 0 ? 1 : 3;
|
|
642
642
|
}, comparePoint: function(o, f) {
|
|
643
|
-
return pe(this), ft(o, "HIERARCHY_REQUEST_ERR"),
|
|
643
|
+
return pe(this), ft(o, "HIERARCHY_REQUEST_ERR"), it(o, this.startContainer), u(o, f, this.startContainer, this.startOffset) < 0 ? -1 : u(o, f, this.endContainer, this.endOffset) > 0 ? 1 : 0;
|
|
644
644
|
}, createContextualFragment: Ct, toHtml: function() {
|
|
645
|
-
return
|
|
645
|
+
return st(this);
|
|
646
646
|
}, intersectsNode: function(o, f) {
|
|
647
647
|
if (pe(this), v(o) != v(this.startContainer)) return !1;
|
|
648
648
|
var i = o.parentNode, l = ue(o);
|
|
@@ -650,7 +650,7 @@ function Wn() {
|
|
|
650
650
|
var m = u(i, l, this.endContainer, this.endOffset), k = u(i, l + 1, this.startContainer, this.startOffset);
|
|
651
651
|
return f ? m <= 0 && k >= 0 : m < 0 && k > 0;
|
|
652
652
|
}, isPointInRange: function(o, f) {
|
|
653
|
-
return pe(this), ft(o, "HIERARCHY_REQUEST_ERR"),
|
|
653
|
+
return pe(this), ft(o, "HIERARCHY_REQUEST_ERR"), it(o, this.startContainer), u(o, f, this.startContainer, this.startOffset) >= 0 && u(o, f, this.endContainer, this.endOffset) <= 0;
|
|
654
654
|
}, intersectsRange: function(o) {
|
|
655
655
|
return te(this, o, !1);
|
|
656
656
|
}, intersectsOrTouchesRange: function(o) {
|
|
@@ -688,16 +688,16 @@ function Wn() {
|
|
|
688
688
|
return pe(this), function(i, l, m) {
|
|
689
689
|
var k, w = !(!l || !l.length), N = !!m;
|
|
690
690
|
w && (k = new RegExp("^(" + l.join("|") + ")$"));
|
|
691
|
-
var
|
|
691
|
+
var G = [];
|
|
692
692
|
return d(new ne(i, !1), function(j) {
|
|
693
693
|
if ((!w || k.test(j.nodeType)) && (!N || m(j))) {
|
|
694
694
|
var oe = i.startContainer;
|
|
695
695
|
if (j != oe || !K(oe) || i.startOffset != oe.length) {
|
|
696
696
|
var Je = i.endContainer;
|
|
697
|
-
j == Je && K(Je) && i.endOffset == 0 ||
|
|
697
|
+
j == Je && K(Je) && i.endOffset == 0 || G.push(j);
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
}),
|
|
700
|
+
}), G;
|
|
701
701
|
}(this, o, f);
|
|
702
702
|
}, getDocument: function() {
|
|
703
703
|
return U(this);
|
|
@@ -713,7 +713,7 @@ function Wn() {
|
|
|
713
713
|
}, moveToBookmark: function(o) {
|
|
714
714
|
var f = o.containerNode, i = 0;
|
|
715
715
|
this.setStart(f, 0), this.collapse(!0);
|
|
716
|
-
for (var l, m, k, w, N = [f],
|
|
716
|
+
for (var l, m, k, w, N = [f], G = !1, j = !1; !j && (l = N.pop()); ) if (l.nodeType == 3) m = i + l.length, !G && o.start >= i && o.start <= m && (this.setStart(l, o.start - i), G = !0), G && o.end >= i && o.end <= m && (this.setEnd(l, o.end - i), j = !0), i = m;
|
|
717
717
|
else for (k = (w = l.childNodes).length; k--; ) N.push(w[k]);
|
|
718
718
|
}, getName: function() {
|
|
719
719
|
return "DomRange";
|
|
@@ -724,7 +724,7 @@ function Wn() {
|
|
|
724
724
|
}, inspect: function() {
|
|
725
725
|
return $(this);
|
|
726
726
|
}, detach: function() {
|
|
727
|
-
} }), kt(Ve, Ze), F.extend(Ve, { rangeProperties: se, RangeIterator: ne, copyComparisonConstants: yt, createPrototypeRange: kt, inspect: $, toHtml:
|
|
727
|
+
} }), kt(Ve, Ze), F.extend(Ve, { rangeProperties: se, RangeIterator: ne, copyComparisonConstants: yt, createPrototypeRange: kt, inspect: $, toHtml: st, getRangeDocument: U, rangesEqual: function(o, f) {
|
|
728
728
|
return o.startContainer === f.startContainer && o.startOffset === f.startOffset && o.endContainer === f.endContainer && o.endOffset === f.endOffset;
|
|
729
729
|
} }), p.DomRange = Ve;
|
|
730
730
|
}), q.createCoreModule("WrappedRange", ["DomRange"], function(p, x) {
|
|
@@ -841,8 +841,8 @@ function Wn() {
|
|
|
841
841
|
if ($ = te.nextSibling, he == -1 && $ && u($)) {
|
|
842
842
|
var Ne;
|
|
843
843
|
if (Y.setEndPoint(W ? "EndToStart" : "EndToEnd", v), /[\r\n]/.test($.data)) {
|
|
844
|
-
var Ie = Y.duplicate(),
|
|
845
|
-
for (Ne = Ie.moveStart("character",
|
|
844
|
+
var Ie = Y.duplicate(), Ge = Ie.text.replace(/\r\n/g, "\r").length;
|
|
845
|
+
for (Ne = Ie.moveStart("character", Ge); (he = Ie.compareEndPoints("StartToEnd", Ie)) == -1; ) Ne++, Ie.moveStart("character", 1);
|
|
846
846
|
} else Ne = Y.text.length;
|
|
847
847
|
D = new K($, Ne);
|
|
848
848
|
} else d = (I || !W) && te.previousSibling, D = (S = (I || W) && te.nextSibling) && u(S) ? new K(S, 0) : d && u(d) ? new K(d, d.data.length) : new K(Z, J.getNodeIndex(te));
|
|
@@ -946,7 +946,7 @@ function Wn() {
|
|
|
946
946
|
var i = window.getSelection();
|
|
947
947
|
if (i) {
|
|
948
948
|
for (var l = i.rangeCount, m = l > 1, k = [], w = Z(i), N = 0; N < l; ++N) k[N] = i.getRangeAt(N);
|
|
949
|
-
var
|
|
949
|
+
var G = K.createTestElement(document, "", !1), j = G.appendChild(document.createTextNode(" ")), oe = document.createRange();
|
|
950
950
|
if (oe.setStart(j, 1), oe.collapse(!0), i.removeAllRanges(), i.addRange(oe), we = i.rangeCount == 1, i.removeAllRanges(), !m) {
|
|
951
951
|
var Je = window.navigator.appVersion.match(/Chrome\/(.*?) /);
|
|
952
952
|
if (Je && parseInt(Je[1]) >= 36) Ce = !1;
|
|
@@ -955,11 +955,11 @@ function Wn() {
|
|
|
955
955
|
oe.setStart(j, 0), ht.setEnd(j, 3), ht.setStart(j, 2), i.addRange(oe), i.addRange(ht), Ce = i.rangeCount == 2;
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
|
-
for (K.removeNode(
|
|
958
|
+
for (K.removeNode(G), i.removeAllRanges(), N = 0; N < l; ++N) N == 0 && w ? Ne ? Ne(i, k[N]) : (p.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"), i.addRange(k[N])) : i.addRange(k[N]);
|
|
959
959
|
}
|
|
960
960
|
}(), O.selectionSupportsMultipleRanges = Ce, O.collapsedNonEditableSelectionsSupported = we;
|
|
961
|
-
var Ie,
|
|
962
|
-
function
|
|
961
|
+
var Ie, Ge, Pe = !1;
|
|
962
|
+
function nt(i, l, m) {
|
|
963
963
|
var k = m ? "end" : "start", w = m ? "start" : "end";
|
|
964
964
|
i.anchorNode = l[k + "Container"], i.anchorOffset = l[k + "Offset"], i.focusNode = l[w + "Container"], i.focusOffset = l[w + "Offset"];
|
|
965
965
|
}
|
|
@@ -973,7 +973,7 @@ function Wn() {
|
|
|
973
973
|
var l;
|
|
974
974
|
return i instanceof h ? ((l = p.createNativeRange(i.getDocument())).setEnd(i.endContainer, i.endOffset), l.setStart(i.startContainer, i.startOffset)) : i instanceof u ? l = i.nativeRange : O.implementsDomRange && i instanceof K.getWindow(i.startContainer).Range && (l = i), l;
|
|
975
975
|
}
|
|
976
|
-
function
|
|
976
|
+
function it(i) {
|
|
977
977
|
var l = i.getNodes();
|
|
978
978
|
if (!function(m) {
|
|
979
979
|
if (!m.length || m[0].nodeType != 1) return !1;
|
|
@@ -987,9 +987,9 @@ function Wn() {
|
|
|
987
987
|
}
|
|
988
988
|
function ft(i, l) {
|
|
989
989
|
var m = new u(l);
|
|
990
|
-
i._ranges = [m],
|
|
990
|
+
i._ranges = [m], nt(i, m, !1), i.rangeCount = 1, i.isCollapsed = m.collapsed, Ee(i);
|
|
991
991
|
}
|
|
992
|
-
function
|
|
992
|
+
function Xe(i) {
|
|
993
993
|
if (i._ranges.length = 0, i.docSelection.type == "None") be(i);
|
|
994
994
|
else {
|
|
995
995
|
var l = i.docSelection.createRange();
|
|
@@ -997,18 +997,18 @@ function Wn() {
|
|
|
997
997
|
else {
|
|
998
998
|
i.rangeCount = l.length;
|
|
999
999
|
for (var m, k = v(l.item(0)), w = 0; w < i.rangeCount; ++w) (m = p.createRange(k)).selectNode(l.item(w)), i._ranges.push(m);
|
|
1000
|
-
i.isCollapsed = i.rangeCount == 1 && i._ranges[0].collapsed,
|
|
1000
|
+
i.isCollapsed = i.rangeCount == 1 && i._ranges[0].collapsed, nt(i, i._ranges[i.rangeCount - 1], !1), Ee(i);
|
|
1001
1001
|
}
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|
|
1004
1004
|
function mt(i, l) {
|
|
1005
|
-
for (var m = i.docSelection.createRange(), k =
|
|
1005
|
+
for (var m = i.docSelection.createRange(), k = it(l), w = v(m.item(0)), N = P(w).createControlRange(), G = 0, j = m.length; G < j; ++G) N.add(m.item(G));
|
|
1006
1006
|
try {
|
|
1007
1007
|
N.add(k);
|
|
1008
1008
|
} catch (oe) {
|
|
1009
1009
|
throw x.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)");
|
|
1010
1010
|
}
|
|
1011
|
-
N.select(),
|
|
1011
|
+
N.select(), Xe(i);
|
|
1012
1012
|
}
|
|
1013
1013
|
function pe(i, l, m) {
|
|
1014
1014
|
this.nativeSelection = i, this.docSelection = l, this._ranges = [], this.win = m, this.refresh();
|
|
@@ -1020,13 +1020,13 @@ function Wn() {
|
|
|
1020
1020
|
return i.anchorNode === i.focusNode && i.anchorOffset === i.focusOffset;
|
|
1021
1021
|
} : function(i) {
|
|
1022
1022
|
return !!i.rangeCount && i.getRangeAt(i.rangeCount - 1).collapsed;
|
|
1023
|
-
}, r(d, "getRangeAt") ?
|
|
1023
|
+
}, r(d, "getRangeAt") ? Ge = function(i, l) {
|
|
1024
1024
|
try {
|
|
1025
1025
|
return i.getRangeAt(l);
|
|
1026
1026
|
} catch (m) {
|
|
1027
1027
|
return null;
|
|
1028
1028
|
}
|
|
1029
|
-
} : $ && (
|
|
1029
|
+
} : $ && (Ge = function(i) {
|
|
1030
1030
|
var l = v(i.anchorNode), m = p.createRange(l);
|
|
1031
1031
|
return m.setStartAndEnd(i.anchorNode, i.anchorOffset, i.focusNode, i.focusOffset), m.collapsed !== this.isCollapsed && m.setStartAndEnd(i.focusNode, i.focusOffset, i.anchorNode, i.anchorOffset), m;
|
|
1032
1032
|
}), pe.prototype = p.selectionPrototype;
|
|
@@ -1042,17 +1042,17 @@ function Wn() {
|
|
|
1042
1042
|
return l ? (l.nativeSelection = m, l.docSelection = k, l.refresh()) : (l = new pe(m, k, i), qe.push({ win: i, selection: l })), l;
|
|
1043
1043
|
};
|
|
1044
1044
|
p.getSelection = dt, ue.createAliasForDeprecatedMethod(p, "getIframeSelection", "getSelection");
|
|
1045
|
-
var
|
|
1045
|
+
var st, se = pe.prototype;
|
|
1046
1046
|
function wt(i, l) {
|
|
1047
|
-
for (var m, k = v(l[0].startContainer), w = P(k).createControlRange(), N = 0,
|
|
1048
|
-
m =
|
|
1047
|
+
for (var m, k = v(l[0].startContainer), w = P(k).createControlRange(), N = 0, G = l.length; N < G; ++N) {
|
|
1048
|
+
m = it(l[N]);
|
|
1049
1049
|
try {
|
|
1050
1050
|
w.add(m);
|
|
1051
1051
|
} catch (j) {
|
|
1052
1052
|
throw x.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)");
|
|
1053
1053
|
}
|
|
1054
1054
|
}
|
|
1055
|
-
w.select(),
|
|
1055
|
+
w.select(), Xe(i);
|
|
1056
1056
|
}
|
|
1057
1057
|
if (!he && $ && ue.areHostMethods(d, ["removeAllRanges", "addRange"])) {
|
|
1058
1058
|
se.removeAllRanges = function() {
|
|
@@ -1074,10 +1074,10 @@ function Wn() {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
if (this.rangeCount = this.nativeSelection.rangeCount, this.rangeCount == m + 1) {
|
|
1076
1076
|
if (p.config.checkSelectionRanges) {
|
|
1077
|
-
var w =
|
|
1077
|
+
var w = Ge(this.nativeSelection, this.rangeCount - 1);
|
|
1078
1078
|
w && !W(w, i) && (i = new u(w));
|
|
1079
1079
|
}
|
|
1080
|
-
this._ranges[this.rangeCount - 1] = i,
|
|
1080
|
+
this._ranges[this.rangeCount - 1] = i, nt(this, i, Qe(this.nativeSelection)), this.isCollapsed = F(this), Ee(this);
|
|
1081
1081
|
} else this.refresh();
|
|
1082
1082
|
}
|
|
1083
1083
|
} : function(i, l) {
|
|
@@ -1106,7 +1106,7 @@ function Wn() {
|
|
|
1106
1106
|
}
|
|
1107
1107
|
be(this);
|
|
1108
1108
|
}, se.addRange = function(i) {
|
|
1109
|
-
this.docSelection.type == z ? mt(this, i) : (p.WrappedTextRange.rangeToTextRange(i).select(), this._ranges[0] = i, this.rangeCount = 1, this.isCollapsed = this._ranges[0].collapsed,
|
|
1109
|
+
this.docSelection.type == z ? mt(this, i) : (p.WrappedTextRange.rangeToTextRange(i).select(), this._ranges[0] = i, this.rangeCount = 1, this.isCollapsed = this._ranges[0].collapsed, nt(this, i, !1), Ee(this));
|
|
1110
1110
|
}, se.setRanges = function(i) {
|
|
1111
1111
|
this.removeAllRanges();
|
|
1112
1112
|
var l = i.length;
|
|
@@ -1116,22 +1116,22 @@ function Wn() {
|
|
|
1116
1116
|
if (se.getRangeAt = function(i) {
|
|
1117
1117
|
if (i < 0 || i >= this.rangeCount) throw new y("INDEX_SIZE_ERR");
|
|
1118
1118
|
return this._ranges[i].cloneRange();
|
|
1119
|
-
}, he)
|
|
1119
|
+
}, he) st = function(i) {
|
|
1120
1120
|
var l;
|
|
1121
|
-
p.isSelectionValid(i.win) ? l = i.docSelection.createRange() : (l = P(i.win.document).createTextRange()).collapse(!0), i.docSelection.type == z ?
|
|
1121
|
+
p.isSelectionValid(i.win) ? l = i.docSelection.createRange() : (l = P(i.win.document).createTextRange()).collapse(!0), i.docSelection.type == z ? Xe(i) : ze(l) ? ft(i, l) : be(i);
|
|
1122
1122
|
};
|
|
1123
|
-
else if (r(d, "getRangeAt") && typeof d.rangeCount == ee)
|
|
1124
|
-
if (Pe && te && i.docSelection.type == z)
|
|
1123
|
+
else if (r(d, "getRangeAt") && typeof d.rangeCount == ee) st = function(i) {
|
|
1124
|
+
if (Pe && te && i.docSelection.type == z) Xe(i);
|
|
1125
1125
|
else if (i._ranges.length = i.rangeCount = i.nativeSelection.rangeCount, i.rangeCount) {
|
|
1126
1126
|
for (var l = 0, m = i.rangeCount; l < m; ++l) i._ranges[l] = new p.WrappedRange(i.nativeSelection.getRangeAt(l));
|
|
1127
|
-
|
|
1127
|
+
nt(i, i._ranges[i.rangeCount - 1], Qe(i.nativeSelection)), i.isCollapsed = F(i), Ee(i);
|
|
1128
1128
|
} else be(i);
|
|
1129
1129
|
};
|
|
1130
1130
|
else {
|
|
1131
1131
|
if (!$ || typeof d.isCollapsed != J || typeof S.collapsed != J || !O.implementsDomRange) return x.fail("No means of obtaining a Range or TextRange from the user's selection was found"), !1;
|
|
1132
|
-
|
|
1132
|
+
st = function(i) {
|
|
1133
1133
|
var l, m = i.nativeSelection;
|
|
1134
|
-
m.anchorNode ? (l =
|
|
1134
|
+
m.anchorNode ? (l = Ge(m, 0), i._ranges = [l], i.rangeCount = 1, function(k) {
|
|
1135
1135
|
var w = k.nativeSelection;
|
|
1136
1136
|
k.anchorNode = w.anchorNode, k.anchorOffset = w.anchorOffset, k.focusNode = w.focusNode, k.focusOffset = w.focusOffset;
|
|
1137
1137
|
}(i), i.isCollapsed = F(i), Ee(i)) : be(i);
|
|
@@ -1139,7 +1139,7 @@ function Wn() {
|
|
|
1139
1139
|
}
|
|
1140
1140
|
se.refresh = function(i) {
|
|
1141
1141
|
var l = i ? this._ranges.slice(0) : null, m = this.anchorNode, k = this.anchorOffset;
|
|
1142
|
-
if (
|
|
1142
|
+
if (st(this), i) {
|
|
1143
1143
|
var w = l.length;
|
|
1144
1144
|
if (w != this._ranges.length || this.anchorNode != m || this.anchorOffset != k) return !0;
|
|
1145
1145
|
for (; w--; ) if (!W(l[w], this._ranges[w])) return !0;
|
|
@@ -1166,13 +1166,13 @@ function Wn() {
|
|
|
1166
1166
|
}
|
|
1167
1167
|
function f(i) {
|
|
1168
1168
|
var l = [], m = new T(i.anchorNode, i.anchorOffset), k = new T(i.focusNode, i.focusOffset), w = typeof i.getName == "function" ? i.getName() : "Selection";
|
|
1169
|
-
if (i.rangeCount !== void 0) for (var N = 0,
|
|
1169
|
+
if (i.rangeCount !== void 0) for (var N = 0, G = i.rangeCount; N < G; ++N) l[N] = h.inspect(i.getRangeAt(N));
|
|
1170
1170
|
return "[" + w + "(Ranges: " + l.join(", ") + ")(anchor: " + m.inspect() + ", focus: " + k.inspect() + "]";
|
|
1171
1171
|
}
|
|
1172
1172
|
se.removeRange = Pe && te ? function(i) {
|
|
1173
1173
|
if (this.docSelection.type == z) {
|
|
1174
|
-
for (var l = this.docSelection.createRange(), m =
|
|
1175
|
-
w.select(),
|
|
1174
|
+
for (var l = this.docSelection.createRange(), m = it(i), k = v(l.item(0)), w = P(k).createControlRange(), N = !1, G = 0, j = l.length; G < j; ++G) l.item(G) !== m || N ? w.add(l.item(G)) : N = !0;
|
|
1175
|
+
w.select(), Xe(this);
|
|
1176
1176
|
} else kt(this, i);
|
|
1177
1177
|
} : function(i) {
|
|
1178
1178
|
kt(this, i);
|
|
@@ -1283,9 +1283,9 @@ function Wn() {
|
|
|
1283
1283
|
var le = !1, ve = function(p) {
|
|
1284
1284
|
le || (le = !0, !q.initialized && q.config.autoInitialize && Oe());
|
|
1285
1285
|
};
|
|
1286
|
-
return de && (document.readyState == "complete" ? ve() : (c(document, "addEventListener") && document.addEventListener("DOMContentLoaded", ve, !1),
|
|
1286
|
+
return de && (document.readyState == "complete" ? ve() : (c(document, "addEventListener") && document.addEventListener("DOMContentLoaded", ve, !1), X(window, "load", ve))), q;
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1288
|
+
function Un(_) {
|
|
1289
1289
|
return _.createModule("ClassApplier", ["WrappedSelection"], function(e, t) {
|
|
1290
1290
|
var n = e.dom, s = n.DomPosition, a = n.arrayContains, c = e.util, g = c.forEach, C = c.isHostMethod(document, "createElementNS");
|
|
1291
1291
|
function E(r, h) {
|
|
@@ -1323,11 +1323,11 @@ function Fn(_) {
|
|
|
1323
1323
|
function B(r) {
|
|
1324
1324
|
return typeof r.className == "string" ? r.className : r.getAttribute("class");
|
|
1325
1325
|
}
|
|
1326
|
-
function
|
|
1326
|
+
function X(r) {
|
|
1327
1327
|
return r && r.split(/\s+/).sort().join(" ");
|
|
1328
1328
|
}
|
|
1329
1329
|
function ie(r) {
|
|
1330
|
-
return
|
|
1330
|
+
return X(B(r));
|
|
1331
1331
|
}
|
|
1332
1332
|
function de(r, h) {
|
|
1333
1333
|
return ie(r) == ie(h);
|
|
@@ -1480,7 +1480,7 @@ function Fn(_) {
|
|
|
1480
1480
|
var I = document.createElement(v.elementTagName);
|
|
1481
1481
|
v.elementProperties = v.copyPropertiesToElement(P, I, !0), E(W, function(Y, Z) {
|
|
1482
1482
|
v.attrExceptions.push(Y), W[Y] = "" + Z;
|
|
1483
|
-
}), v.elementAttributes = W, v.elementSortedClassName = v.elementProperties.hasOwnProperty("className") ?
|
|
1483
|
+
}), v.elementAttributes = W, v.elementSortedClassName = v.elementProperties.hasOwnProperty("className") ? X(v.elementProperties.className + " " + r) : r, v.applyToAnyTagName = !1;
|
|
1484
1484
|
var U = typeof u;
|
|
1485
1485
|
if (U == "string") u == "*" ? v.applyToAnyTagName = !0 : v.tagNames = b(u.toLowerCase()).split(/\s*,\s*/);
|
|
1486
1486
|
else if (U == "object" && typeof u.length == "number") for (v.tagNames = [], T = 0, O = u.length; T < O; ++T) u[T] == "*" ? v.applyToAnyTagName = !0 : v.tagNames.push(u[T].toLowerCase());
|
|
@@ -1488,7 +1488,7 @@ function Fn(_) {
|
|
|
1488
1488
|
}
|
|
1489
1489
|
ue.prototype = { elementTagName: "span", elementProperties: {}, elementAttributes: {}, ignoreWhiteSpace: !0, applyToEditableOnly: !1, useExistingElements: !0, removeEmptyElements: !0, onElementCreate: null, copyPropertiesToElement: function(r, h, u) {
|
|
1490
1490
|
var y, T, O, z, v, P, W = {};
|
|
1491
|
-
for (var I in r) if (r.hasOwnProperty(I)) if (z = r[I], v = h[I], I == "className") R(h, z), R(h, this.className), h[I] =
|
|
1491
|
+
for (var I in r) if (r.hasOwnProperty(I)) if (z = r[I], v = h[I], I == "className") R(h, z), R(h, this.className), h[I] = X(h[I]), u && (W[I] = z);
|
|
1492
1492
|
else if (I == "style") {
|
|
1493
1493
|
for (y in T = v, u && (W[I] = O = {}), r[I]) r[I].hasOwnProperty(y) && (T[y] = z[y], u && (O[y] = T[y]));
|
|
1494
1494
|
this.attrExceptions.push(I);
|
|
@@ -1663,8 +1663,8 @@ function Fn(_) {
|
|
|
1663
1663
|
}, c.createAliasForDeprecatedMethod(e, "createCssClassApplier", "createClassApplier", t);
|
|
1664
1664
|
}), _;
|
|
1665
1665
|
}
|
|
1666
|
-
const
|
|
1667
|
-
class
|
|
1666
|
+
const Gt = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M19 17V10.2135C19 10.1287 18.9011 10.0824 18.836 10.1367L16 12.5"/></svg>', Xt = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 11C16 10 19 9.5 19 12C19 13.9771 16.0684 13.9997 16.0012 16.8981C15.9999 16.9533 16.0448 17 16.1 17L19.3 17"/></svg>', Qt = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 11C16 10.5 16.8323 10 17.6 10C18.3677 10 19.5 10.311 19.5 11.5C19.5 12.5315 18.7474 12.9022 18.548 12.9823C18.5378 12.9864 18.5395 13.0047 18.5503 13.0063C18.8115 13.0456 20 13.3065 20 14.8C20 16 19.5 17 17.8 17C17.8 17 16 17 16 16.3"/></svg>', Zt = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M18 10L15.2834 14.8511C15.246 14.9178 15.294 15 15.3704 15C16.8489 15 18.7561 15 20.2 15M19 17C19 15.7187 19 14.8813 19 13.6"/></svg>', Jt = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 15.9C16 15.9 16.3768 17 17.8 17C19.5 17 20 15.6199 20 14.7C20 12.7323 17.6745 12.0486 16.1635 12.9894C16.094 13.0327 16 12.9846 16 12.9027V10.1C16 10.0448 16.0448 10 16.1 10H19.8"/></svg>', en = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M19.5 10C16.5 10.5 16 13.3285 16 15M16 15V15C16 16.1046 16.8954 17 18 17H18.3246C19.3251 17 20.3191 16.3492 20.2522 15.3509C20.0612 12.4958 16 12.6611 16 15Z"/></svg>', tn = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9.2 12L11.0586 13.8586C11.1367 13.9367 11.2633 13.9367 11.3414 13.8586L14.7 10.5"/><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/></svg>', nn = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8 8L12 12M12 12L16 16M12 12L16 8M12 12L8 16"/></svg>', sn = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7.69998 12.6L7.67896 12.62C6.53993 13.7048 6.52012 15.5155 7.63516 16.625V16.625C8.72293 17.7073 10.4799 17.7102 11.5712 16.6314L13.0263 15.193C14.0703 14.1609 14.2141 12.525 13.3662 11.3266L13.22 11.12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16.22 11.12L16.3564 10.9805C17.2895 10.0265 17.3478 8.5207 16.4914 7.49733V7.49733C15.5691 6.39509 13.9269 6.25143 12.8271 7.17675L11.3901 8.38588C10.0935 9.47674 9.95706 11.4241 11.0888 12.6852L11.12 12.72"/></svg>', rn = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><line x1="9" x2="19" y1="7" y2="7" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="9" x2="19" y1="12" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="9" x2="19" y1="17" y2="17" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5.00001 17H4.99002"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5.00001 12H4.99002"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M5.00001 7H4.99002"/></svg>', on = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><line x1="12" x2="19" y1="7" y2="7" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="12" x2="19" y1="12" y2="12" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><line x1="12" x2="19" y1="17" y2="17" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7.79999 14L7.79999 7.2135C7.79999 7.12872 7.7011 7.0824 7.63597 7.13668L4.79999 9.5"/></svg>', bn = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5.13968 15.32L8.69058 11.5661C9.02934 11.2036 9.48873 11 9.96774 11C10.4467 11 10.9061 11.2036 11.2449 11.5661L15.3871 16M13.5806 14.0664L15.0132 12.533C15.3519 12.1705 15.8113 11.9668 16.2903 11.9668C16.7693 11.9668 17.2287 12.1705 17.5675 12.533L18.841 13.9634"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.7778 9.33331H13.7867"/></svg>', Sn = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8 9V7.2C8 7.08954 8.08954 7 8.2 7L12 7M16 9V7.2C16 7.08954 15.9105 7 15.8 7L12 7M12 7L12 17M12 17H10M12 17H14"/></svg>', Tn = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M15.7795 11.5C15.7795 11.5 16.053 11.1962 16.5497 10.6722C17.4442 9.72856 17.4701 8.2475 16.5781 7.30145V7.30145C15.6482 6.31522 14.0873 6.29227 13.1288 7.25073L11.8796 8.49999"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8.24517 12.3883C8.24517 12.3883 7.97171 12.6922 7.47504 13.2161C6.58051 14.1598 6.55467 15.6408 7.44666 16.5869V16.5869C8.37653 17.5731 9.93744 17.5961 10.8959 16.6376L12.1452 15.3883"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M17.7802 15.1032L16.597 14.9422C16.0109 14.8624 15.4841 15.3059 15.4627 15.8969L15.4199 17.0818"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6.39064 9.03238L7.58432 9.06668C8.17551 9.08366 8.6522 8.58665 8.61056 7.99669L8.5271 6.81397"/><line x1="12.1142" x2="11.7" y1="12.2" y2="11.7858" stroke="currentColor" stroke-linecap="round" stroke-width="2"/></svg>', an = '<svg t="1763708081701" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2604" width="24" height="24"><path d="M469.3330000000001 725.333H896V640H469.3330000000001v85.333zM128 512l170.667 170.667V341.3330000000001L128 512z m0 384h768v-85.333H128V896z m0-768v85.333h768V128H128z m341.333 256H896v-85.333H469.3330000000001V384z m0 170.667H896v-85.334H469.3330000000001v85.334z" p-id="2605" fill="#000000"></path></svg>', ln = '<svg t="1763708124227" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2788" width="24" height="24"><path d="M128 896h768v-85.333H128V896z m0-554.667v341.334L298.667 512 128 341.333z m341.333 384H896V640H469.333v85.333zM128 128v85.333h768V128H128z m341.333 256H896v-85.333H469.333V384z m0 170.667H896v-85.334H469.333v85.334z" p-id="2789" fill="#000000"></path></svg>';
|
|
1667
|
+
class $n {
|
|
1668
1668
|
constructor(e, t) {
|
|
1669
1669
|
this.holder = document.getElementById(e), this.holder.addEventListener("click", (n) => {
|
|
1670
1670
|
this.holder.querySelectorAll('div[data-input-wrap="true"]').forEach((s) => {
|
|
@@ -1700,13 +1700,13 @@ class Un {
|
|
|
1700
1700
|
const R = document.createElement("div");
|
|
1701
1701
|
R.setAttribute("class", "ce-el-link-btn-wrap");
|
|
1702
1702
|
const H = document.createElement("div");
|
|
1703
|
-
H.innerHTML =
|
|
1703
|
+
H.innerHTML = Tn, H.setAttribute("class", "ce-el-link-icon-btn ce-el-link-unlink-btn ce-el-link__noedit"), H.setAttribute("title", "取消链接");
|
|
1704
1704
|
const B = document.createElement("div");
|
|
1705
1705
|
B.innerHTML = '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="2483" width="20" height="20"><path d="M391.467 736.322a31.99 31.99 0 0 1-13.783 8.126l-232.261 66.798c-12.088 3.477-23.276-7.711-19.799-19.799l66.798-232.261a32 32 0 0 1 8.126-13.782l472.869-472.87c12.496-12.496 32.758-12.496 45.254 0L864.335 218.2c12.497 12.496 12.497 32.758 0 45.255L391.467 736.322z m248.009-516.709l77.781 77.782 56.569-56.569-77.782-77.782-56.568 56.569z m-50.912 50.911L265.88 593.209l-31.401 109.182 109.182-31.401 322.685-322.684-77.782-77.782zM129.001 889h768v72h-768v-72z" fill="#323338" ></path></svg>', B.setAttribute("class", "ce-el-link-icon-btn ce-el-link-edit-btn ce-el-link__noedit"), B.setAttribute("title", "编辑链接");
|
|
1706
|
-
const
|
|
1707
|
-
|
|
1708
|
-
ie.preventDefault(), ie.stopPropagation(), M.classList.remove("ce-el-link__noedit"), A.classList.remove("ce-el-link__noedit"), B.classList.remove("ce-el-link__noedit"), H.classList.remove("ce-el-link__noedit"),
|
|
1709
|
-
}),
|
|
1706
|
+
const X = document.createElement("button");
|
|
1707
|
+
X.setAttribute("type", "button"), X.setAttribute("class", "ce-el-link-btn ce-el-link__noedit"), X.innerHTML = "确定", R.appendChild(B), R.appendChild(H), R.appendChild(X), B.addEventListener("click", (ie) => {
|
|
1708
|
+
ie.preventDefault(), ie.stopPropagation(), M.classList.remove("ce-el-link__noedit"), A.classList.remove("ce-el-link__noedit"), B.classList.remove("ce-el-link__noedit"), H.classList.remove("ce-el-link__noedit"), X.classList.remove("ce-el-link__noedit"), s.removeEventListener("mouseout", this.mouseOut), b.removeEventListener("mouseout", this.mouseOut);
|
|
1709
|
+
}), X.addEventListener("click", (ie) => {
|
|
1710
1710
|
var de;
|
|
1711
1711
|
ie.preventDefault(), ie.stopPropagation(), s.href = M.value, (de = s.querySelector('div[data-input-wrap="true"]')) == null || de.remove();
|
|
1712
1712
|
}), H.addEventListener("click", (ie) => {
|
|
@@ -1727,7 +1727,7 @@ class Un {
|
|
|
1727
1727
|
return !0;
|
|
1728
1728
|
}
|
|
1729
1729
|
}
|
|
1730
|
-
class
|
|
1730
|
+
class jn {
|
|
1731
1731
|
constructor(e, t, n, s) {
|
|
1732
1732
|
const { blocks: a, toolbar: c } = n;
|
|
1733
1733
|
this.toolbar = c, this.borderStyle = s || "1px dashed #aaa", this.api = a, this.holder = document.getElementById(e), this.readOnly = t, this.startBlock = null, this.endBlock = null, this.setDragListener(), this.setDropListener();
|
|
@@ -1797,7 +1797,7 @@ class $n {
|
|
|
1797
1797
|
this.isTheOnlyBlock() || this.api.move(this.endBlock, this.startBlock);
|
|
1798
1798
|
}
|
|
1799
1799
|
}
|
|
1800
|
-
class
|
|
1800
|
+
class qn {
|
|
1801
1801
|
constructor(e, t, n) {
|
|
1802
1802
|
this.holder = document.getElementById(e), this.readOnly = t, this.editor = n, this.blockSelection = n.blockSelection, this.readOnly || this.setListener();
|
|
1803
1803
|
}
|
|
@@ -1806,7 +1806,7 @@ class jn {
|
|
|
1806
1806
|
var n;
|
|
1807
1807
|
(n = this.holder) == null || n.querySelectorAll(".cdx-alert__message,.cdx-block-quote,.ce-editorjs-x-shiki__textarea").forEach((s) => {
|
|
1808
1808
|
s.getAttribute("data-block-backspace") !== "true" && (s.addEventListener("keydown", (a) => {
|
|
1809
|
-
if (a.code === "Backspace" &&
|
|
1809
|
+
if (a.code === "Backspace" && kn(s)) {
|
|
1810
1810
|
a.preventDefault(), a.stopPropagation();
|
|
1811
1811
|
const c = this.editor.blockManager.currentBlock;
|
|
1812
1812
|
this.blockSelection.selectBlock(c);
|
|
@@ -1819,7 +1819,7 @@ class jn {
|
|
|
1819
1819
|
return !0;
|
|
1820
1820
|
}
|
|
1821
1821
|
}
|
|
1822
|
-
class
|
|
1822
|
+
class Vn {
|
|
1823
1823
|
constructor({ data: e, config: t, api: n, readOnly: s }) {
|
|
1824
1824
|
this.api = n, this.readOnly = s, this._settings = { placeholder: "H1" }, this._data = this.normalizeData(e), this._element = this.getTag();
|
|
1825
1825
|
}
|
|
@@ -1887,7 +1887,7 @@ class qn {
|
|
|
1887
1887
|
e.dataset.placeholder = this.api.i18n.t(this._settings.placeholder || "");
|
|
1888
1888
|
}
|
|
1889
1889
|
get defaultLevel() {
|
|
1890
|
-
return { number: 1, tag: "H1", svg:
|
|
1890
|
+
return { number: 1, tag: "H1", svg: Gt };
|
|
1891
1891
|
}
|
|
1892
1892
|
onPaste(e) {
|
|
1893
1893
|
const t = e.detail;
|
|
@@ -1897,10 +1897,10 @@ class qn {
|
|
|
1897
1897
|
}
|
|
1898
1898
|
}
|
|
1899
1899
|
static get toolbox() {
|
|
1900
|
-
return { icon:
|
|
1900
|
+
return { icon: Gt, title: "H1" };
|
|
1901
1901
|
}
|
|
1902
1902
|
}
|
|
1903
|
-
class
|
|
1903
|
+
class Kn {
|
|
1904
1904
|
constructor({ data: e, config: t, api: n, readOnly: s }) {
|
|
1905
1905
|
this.api = n, this.readOnly = s, this._settings = { placeholder: "H2" }, this._data = this.normalizeData(e), this._element = this.getTag();
|
|
1906
1906
|
}
|
|
@@ -1981,7 +1981,7 @@ class Vn {
|
|
|
1981
1981
|
return { icon: Xt, title: "H2" };
|
|
1982
1982
|
}
|
|
1983
1983
|
}
|
|
1984
|
-
class
|
|
1984
|
+
class Yn {
|
|
1985
1985
|
constructor({ data: e, config: t, api: n, readOnly: s }) {
|
|
1986
1986
|
this.api = n, this.readOnly = s, this._settings = { placeholder: "H3" }, this._data = this.normalizeData(e), this._element = this.getTag();
|
|
1987
1987
|
}
|
|
@@ -2049,7 +2049,7 @@ class Kn {
|
|
|
2049
2049
|
e.dataset.placeholder = this.api.i18n.t(this._settings.placeholder || "");
|
|
2050
2050
|
}
|
|
2051
2051
|
get defaultLevel() {
|
|
2052
|
-
return { number: 3, tag: "H3", svg:
|
|
2052
|
+
return { number: 3, tag: "H3", svg: Qt };
|
|
2053
2053
|
}
|
|
2054
2054
|
onPaste(e) {
|
|
2055
2055
|
const t = e.detail;
|
|
@@ -2059,10 +2059,10 @@ class Kn {
|
|
|
2059
2059
|
}
|
|
2060
2060
|
}
|
|
2061
2061
|
static get toolbox() {
|
|
2062
|
-
return { icon:
|
|
2062
|
+
return { icon: Qt, title: "H3" };
|
|
2063
2063
|
}
|
|
2064
2064
|
}
|
|
2065
|
-
class
|
|
2065
|
+
class Gn {
|
|
2066
2066
|
constructor({ data: e, config: t, api: n, readOnly: s }) {
|
|
2067
2067
|
this.api = n, this.readOnly = s, this._settings = { placeholder: "H4" }, this._data = this.normalizeData(e), this._element = this.getTag();
|
|
2068
2068
|
}
|
|
@@ -2130,7 +2130,7 @@ class Yn {
|
|
|
2130
2130
|
e.dataset.placeholder = this.api.i18n.t(this._settings.placeholder || "");
|
|
2131
2131
|
}
|
|
2132
2132
|
get defaultLevel() {
|
|
2133
|
-
return { number: 4, tag: "H4", svg:
|
|
2133
|
+
return { number: 4, tag: "H4", svg: Zt };
|
|
2134
2134
|
}
|
|
2135
2135
|
onPaste(e) {
|
|
2136
2136
|
const t = e.detail;
|
|
@@ -2140,7 +2140,7 @@ class Yn {
|
|
|
2140
2140
|
}
|
|
2141
2141
|
}
|
|
2142
2142
|
static get toolbox() {
|
|
2143
|
-
return { icon:
|
|
2143
|
+
return { icon: Zt, title: "H4" };
|
|
2144
2144
|
}
|
|
2145
2145
|
}
|
|
2146
2146
|
class Xn {
|
|
@@ -2211,7 +2211,7 @@ class Xn {
|
|
|
2211
2211
|
e.dataset.placeholder = this.api.i18n.t(this._settings.placeholder || "");
|
|
2212
2212
|
}
|
|
2213
2213
|
get defaultLevel() {
|
|
2214
|
-
return { number: 5, tag: "H5", svg:
|
|
2214
|
+
return { number: 5, tag: "H5", svg: Jt };
|
|
2215
2215
|
}
|
|
2216
2216
|
onPaste(e) {
|
|
2217
2217
|
const t = e.detail;
|
|
@@ -2221,10 +2221,10 @@ class Xn {
|
|
|
2221
2221
|
}
|
|
2222
2222
|
}
|
|
2223
2223
|
static get toolbox() {
|
|
2224
|
-
return { icon:
|
|
2224
|
+
return { icon: Jt, title: "H5" };
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|
|
2227
|
-
class
|
|
2227
|
+
class Qn {
|
|
2228
2228
|
constructor({ data: e, config: t, api: n, readOnly: s }) {
|
|
2229
2229
|
this.api = n, this.readOnly = s, this._settings = { placeholder: "H6" }, this._data = this.normalizeData(e), this._element = this.getTag();
|
|
2230
2230
|
}
|
|
@@ -2292,7 +2292,7 @@ class Gn {
|
|
|
2292
2292
|
e.dataset.placeholder = this.api.i18n.t(this._settings.placeholder || "");
|
|
2293
2293
|
}
|
|
2294
2294
|
get defaultLevel() {
|
|
2295
|
-
return { number: 6, tag: "H6", svg:
|
|
2295
|
+
return { number: 6, tag: "H6", svg: en };
|
|
2296
2296
|
}
|
|
2297
2297
|
onPaste(e) {
|
|
2298
2298
|
const t = e.detail;
|
|
@@ -2302,10 +2302,10 @@ class Gn {
|
|
|
2302
2302
|
}
|
|
2303
2303
|
}
|
|
2304
2304
|
static get toolbox() {
|
|
2305
|
-
return { icon:
|
|
2305
|
+
return { icon: en, title: "H6" };
|
|
2306
2306
|
}
|
|
2307
2307
|
}
|
|
2308
|
-
class
|
|
2308
|
+
class qt {
|
|
2309
2309
|
static get DEFAULT_ALIGNMENT() {
|
|
2310
2310
|
return "left";
|
|
2311
2311
|
}
|
|
@@ -2314,7 +2314,7 @@ class jt {
|
|
|
2314
2314
|
}
|
|
2315
2315
|
getAlignment() {
|
|
2316
2316
|
var e, t;
|
|
2317
|
-
return (e = this.settings) != null && e.blocks && this.settings.blocks.hasOwnProperty(this.block.name) ? this.settings.blocks[this.block.name] : (t = this.settings) != null && t.default ? this.settings.default :
|
|
2317
|
+
return (e = this.settings) != null && e.blocks && this.settings.blocks.hasOwnProperty(this.block.name) ? this.settings.blocks[this.block.name] : (t = this.settings) != null && t.default ? this.settings.default : qt.DEFAULT_ALIGNMENT;
|
|
2318
2318
|
}
|
|
2319
2319
|
constructor({ api: e, data: t, config: n, block: s }) {
|
|
2320
2320
|
this.api = e, this.block = s, this.settings = n, this.data = t || { alignment: this.getAlignment() }, this.alignmentSettings = [{ name: "left", icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M17 7L5 7"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M17 17H5"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M13 12L5 12"/></svg>' }, { name: "center", icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M18 7L6 7"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M18 17H6"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 12L8 12"/></svg>' }, { name: "right", icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M19 7L7 7"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M19 17H7"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M19 12L11 12"/></svg>' }], this._CSS = { alignment: { left: "ce-tune-alignment--left", center: "ce-tune-alignment--center", right: "ce-tune-alignment--right" } };
|
|
@@ -2342,13 +2342,13 @@ class jt {
|
|
|
2342
2342
|
return this.data;
|
|
2343
2343
|
}
|
|
2344
2344
|
}
|
|
2345
|
-
class
|
|
2345
|
+
class Vt {
|
|
2346
2346
|
static get DEFAULT_PLACEHOLDER() {
|
|
2347
2347
|
return "";
|
|
2348
2348
|
}
|
|
2349
2349
|
constructor({ data: e, config: t, api: n, readOnly: s }) {
|
|
2350
2350
|
var a;
|
|
2351
|
-
this.api = n, this.readOnly = s, this._CSS = { block: this.api.styles.block, wrapper: "ce-paragraph" }, this.readOnly || (this.onKeyUp = this.onKeyUp.bind(this)), this._placeholder = t.placeholder ? t.placeholder :
|
|
2351
|
+
this.api = n, this.readOnly = s, this._CSS = { block: this.api.styles.block, wrapper: "ce-paragraph" }, this.readOnly || (this.onKeyUp = this.onKeyUp.bind(this)), this._placeholder = t.placeholder ? t.placeholder : Vt.DEFAULT_PLACEHOLDER, this._data = e != null ? e : {}, this._element = null, this._preserveBlank = (a = t.preserveBlank) != null ? a : !1;
|
|
2352
2352
|
}
|
|
2353
2353
|
onKeyUp(e) {
|
|
2354
2354
|
if (e.code !== "Backspace" && e.code !== "Delete" || !this._element) return;
|
|
@@ -2398,7 +2398,7 @@ class qt {
|
|
|
2398
2398
|
return { tags: ["P", "div", "br"] };
|
|
2399
2399
|
}
|
|
2400
2400
|
static get toolbox() {
|
|
2401
|
-
return { icon:
|
|
2401
|
+
return { icon: Sn, title: "Text" };
|
|
2402
2402
|
}
|
|
2403
2403
|
}
|
|
2404
2404
|
class St {
|
|
@@ -2468,7 +2468,7 @@ class St {
|
|
|
2468
2468
|
}
|
|
2469
2469
|
drawView() {
|
|
2470
2470
|
const e = document.createElement("div"), t = document.createElement("div"), n = document.createElement("div"), s = document.createElement("div"), a = document.createElement("div"), c = document.createElement("div"), g = document.createElement("select"), C = document.createElement("select"), E = document.createElement("span"), b = document.createElement("textarea"), M = document.createElement("div");
|
|
2471
|
-
return M.classList.add("ce-editorjs-x-shiki__code__dragHandler"), e.classList.add(this.CSS.baseClass, this.CSS.wrapper), this.readOnly ? e.classList.add("read-only") : e.classList.add("editable"), t.classList.add("ce-editorjs-x-shiki__code"), n.classList.add("ce-editorjs-x-shiki__selector"), s.classList.add("ce-editorjs-x-shiki__lang"), a.classList.add("ce-editorjs-x-shiki__copy"), c.classList.add("ce-editorjs-x-shiki__copy_tip"), g.classList.add(this.CSS.selectorLanguage), b.classList.add(this.CSS.textarea, this.CSS.input), s.innerHTML = this.data.lang, a.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.25 8.5H10.25C9.2835 8.5 8.5 9.2835 8.5 10.25V17.25C8.5 18.2165 9.2835 19 10.25 19H17.25C18.2165 19 19 18.2165 19 17.25V10.25C19 9.2835 18.2165 8.5 17.25 8.5Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.5 8.5V6.75C15.5 6.28587 15.3156 5.84075 14.9874 5.51256C14.6592 5.18437 14.2141 5 13.75 5H6.75C6.28587 5 5.84075 5.18437 5.51256 5.51256C5.18437 5.84075 5 6.28587 5 6.75V13.75C5 14.2141 5.18437 14.6592 5.51256 14.9874C5.84075 15.3156 6.28587 15.5 6.75 15.5H8.5"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 12L15.5 12"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15.5L15.5 15.5"/></svg>', c.innerText = this.api.i18n.t("Copied"),
|
|
2471
|
+
return M.classList.add("ce-editorjs-x-shiki__code__dragHandler"), e.classList.add(this.CSS.baseClass, this.CSS.wrapper), this.readOnly ? e.classList.add("read-only") : e.classList.add("editable"), t.classList.add("ce-editorjs-x-shiki__code"), n.classList.add("ce-editorjs-x-shiki__selector"), s.classList.add("ce-editorjs-x-shiki__lang"), a.classList.add("ce-editorjs-x-shiki__copy"), c.classList.add("ce-editorjs-x-shiki__copy_tip"), g.classList.add(this.CSS.selectorLanguage), b.classList.add(this.CSS.textarea, this.CSS.input), s.innerHTML = this.data.lang, a.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.25 8.5H10.25C9.2835 8.5 8.5 9.2835 8.5 10.25V17.25C8.5 18.2165 9.2835 19 10.25 19H17.25C18.2165 19 19 18.2165 19 17.25V10.25C19 9.2835 18.2165 8.5 17.25 8.5Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.5 8.5V6.75C15.5 6.28587 15.3156 5.84075 14.9874 5.51256C14.6592 5.18437 14.2141 5 13.75 5H6.75C6.28587 5 5.84075 5.18437 5.51256 5.51256C5.18437 5.84075 5 6.28587 5 6.75V13.75C5 14.2141 5.18437 14.6592 5.51256 14.9874C5.84075 15.3156 6.28587 15.5 6.75 15.5H8.5"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 12L15.5 12"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15.5L15.5 15.5"/></svg>', c.innerText = this.api.i18n.t("Copied"), Pn.forEach((A) => {
|
|
2472
2472
|
const R = document.createElement("option");
|
|
2473
2473
|
R.value = A.id, R.text = A.name, g.appendChild(R);
|
|
2474
2474
|
}), g.value = this.data.lang, b.value = this.data.code, b.placeholder = this.placeholder, b.spellcheck = !1, b.autocomplete = "off", b.autocapitalize = "off", this.readOnly && (b.disabled = !0), t.appendChild(E), t.appendChild(b), e.appendChild(M), this.data.resizeSize && this.data.resizeSize > 0 && (t.style.height = this.data.resizeSize + "px"), this.readOnly ? n.appendChild(s) : n.appendChild(g), a.appendChild(c), n.appendChild(a), e.appendChild(n), e.appendChild(t), this.runShiki().then(({ html: A, preStyle: R }) => {
|
|
@@ -2513,7 +2513,7 @@ class St {
|
|
|
2513
2513
|
}
|
|
2514
2514
|
async runShiki() {
|
|
2515
2515
|
let e = "";
|
|
2516
|
-
return { html: await
|
|
2516
|
+
return { html: await zn(this.data.code, { lang: this._selectorLanguage, theme: this._selectorTheme, transformers: [{ preprocess: (t) => `${t}`, pre(t) {
|
|
2517
2517
|
var n;
|
|
2518
2518
|
this.addClassToHast(t, "ce-editorjs-x-shiki__span"), e = ((n = t.properties) == null ? void 0 : n.style) || "";
|
|
2519
2519
|
}, line(t, n) {
|
|
@@ -2553,7 +2553,7 @@ class St {
|
|
|
2553
2553
|
}
|
|
2554
2554
|
}
|
|
2555
2555
|
}
|
|
2556
|
-
class
|
|
2556
|
+
class Zn {
|
|
2557
2557
|
constructor({ data: e, api: t, readOnly: n }) {
|
|
2558
2558
|
this.api = t, this.readOnly = n, this._data = { text: e.text || "" }, this._CSS = { baseClass: this.api.styles.block, wrapper: "cdx-quote", text: "cdx-quote__text", input: this.api.styles.input };
|
|
2559
2559
|
}
|
|
@@ -2600,7 +2600,7 @@ class Qn {
|
|
|
2600
2600
|
return { text: { br: !0 } };
|
|
2601
2601
|
}
|
|
2602
2602
|
}
|
|
2603
|
-
class
|
|
2603
|
+
class Jn {
|
|
2604
2604
|
static get isReadOnlySupported() {
|
|
2605
2605
|
return !0;
|
|
2606
2606
|
}
|
|
@@ -2648,7 +2648,7 @@ class Fe {
|
|
|
2648
2648
|
}
|
|
2649
2649
|
getItemContent(e) {
|
|
2650
2650
|
const t = e.querySelector(`.${Fe.CSS.itemContent}`);
|
|
2651
|
-
return t ?
|
|
2651
|
+
return t ? jt(t) ? "" : t.innerHTML : "";
|
|
2652
2652
|
}
|
|
2653
2653
|
getItemMeta() {
|
|
2654
2654
|
return {};
|
|
@@ -2674,7 +2674,7 @@ class Ue {
|
|
|
2674
2674
|
}
|
|
2675
2675
|
getItemContent(e) {
|
|
2676
2676
|
const t = e.querySelector(`.${Ue.CSS.itemContent}`);
|
|
2677
|
-
return t ?
|
|
2677
|
+
return t ? jt(t) ? "" : t.innerHTML : "";
|
|
2678
2678
|
}
|
|
2679
2679
|
getItemMeta() {
|
|
2680
2680
|
return {};
|
|
@@ -2683,7 +2683,7 @@ class Ue {
|
|
|
2683
2683
|
return {};
|
|
2684
2684
|
}
|
|
2685
2685
|
}
|
|
2686
|
-
function
|
|
2686
|
+
function rt(_) {
|
|
2687
2687
|
return _.nodeType === Node.ELEMENT_NODE;
|
|
2688
2688
|
}
|
|
2689
2689
|
class me {
|
|
@@ -2709,7 +2709,7 @@ class me {
|
|
|
2709
2709
|
}
|
|
2710
2710
|
getItemContent(e) {
|
|
2711
2711
|
const t = e.querySelector(`.${me.CSS.itemContent}`);
|
|
2712
|
-
return t ?
|
|
2712
|
+
return t ? jt(t) ? "" : t.innerHTML : "";
|
|
2713
2713
|
}
|
|
2714
2714
|
getItemMeta(e) {
|
|
2715
2715
|
const t = e.querySelector(`.${me.CSS.checkboxContainer}`);
|
|
@@ -2725,7 +2725,7 @@ class me {
|
|
|
2725
2725
|
e.classList.remove(me.CSS.noHover);
|
|
2726
2726
|
}
|
|
2727
2727
|
}
|
|
2728
|
-
function
|
|
2728
|
+
function It(_, e = "after") {
|
|
2729
2729
|
const t = [];
|
|
2730
2730
|
let n;
|
|
2731
2731
|
function s(a) {
|
|
@@ -2743,32 +2743,32 @@ function Ke(_, e = !0) {
|
|
|
2743
2743
|
let t = _;
|
|
2744
2744
|
return _.classList.contains(ke.item) && (t = _.querySelector(`.${ke.itemChildren}`)), t === null ? [] : e ? Array.from(t.querySelectorAll(`:scope > .${ke.item}`)) : Array.from(t.querySelectorAll(`.${ke.item}`));
|
|
2745
2745
|
}
|
|
2746
|
-
function
|
|
2746
|
+
function lt(_) {
|
|
2747
2747
|
return _.querySelector(`.${ke.itemChildren}`);
|
|
2748
2748
|
}
|
|
2749
|
-
function
|
|
2749
|
+
function Ht(_) {
|
|
2750
2750
|
let e = _;
|
|
2751
|
-
_.classList.contains(ke.item) && (e =
|
|
2751
|
+
_.classList.contains(ke.item) && (e = lt(_)), e !== null && Ke(e).length === 0 && e.remove();
|
|
2752
2752
|
}
|
|
2753
|
-
function
|
|
2753
|
+
function Ut(_) {
|
|
2754
2754
|
return _.querySelector(`.${ke.itemContent}`);
|
|
2755
2755
|
}
|
|
2756
2756
|
function ut(_, e = !0) {
|
|
2757
|
-
const t =
|
|
2758
|
-
t &&
|
|
2757
|
+
const t = Ut(_);
|
|
2758
|
+
t && Bn(t, e);
|
|
2759
2759
|
}
|
|
2760
|
-
class
|
|
2760
|
+
class Bt {
|
|
2761
2761
|
get currentItem() {
|
|
2762
2762
|
const e = window.getSelection();
|
|
2763
2763
|
if (!e) return null;
|
|
2764
2764
|
let t = e.anchorNode;
|
|
2765
|
-
return t ? (
|
|
2765
|
+
return t ? (rt(t) || (t = t.parentNode), t && rt(t) ? t.closest(`.${ke.item}`) : null) : null;
|
|
2766
2766
|
}
|
|
2767
2767
|
get currentItemLevel() {
|
|
2768
2768
|
const e = this.currentItem;
|
|
2769
2769
|
if (e === null) return null;
|
|
2770
2770
|
let t = e.parentNode, n = 0;
|
|
2771
|
-
for (; t !== null && t !== this.listWrapper; )
|
|
2771
|
+
for (; t !== null && t !== this.listWrapper; ) rt(t) && t.classList.contains(ke.item) && (n += 1), t = t.parentNode;
|
|
2772
2772
|
return n + 1;
|
|
2773
2773
|
}
|
|
2774
2774
|
constructor({ data: e, config: t, api: n, readOnly: s, block: a }, c) {
|
|
@@ -2790,7 +2790,7 @@ class Ht {
|
|
|
2790
2790
|
}
|
|
2791
2791
|
save(e) {
|
|
2792
2792
|
const t = e != null ? e : this.listWrapper, n = (c) => Ke(c).map((g) => {
|
|
2793
|
-
const C =
|
|
2793
|
+
const C = lt(g);
|
|
2794
2794
|
return { content: this.renderer.getItemContent(g), meta: this.renderer.getItemMeta(g), items: C ? n(C) : [] };
|
|
2795
2795
|
}), s = t ? n(t) : [];
|
|
2796
2796
|
let a = { style: this.data.style, meta: {}, items: s };
|
|
@@ -2800,11 +2800,11 @@ class Ht {
|
|
|
2800
2800
|
return { tags: ["OL", "UL", "LI"] };
|
|
2801
2801
|
}
|
|
2802
2802
|
merge(e) {
|
|
2803
|
-
const t = this.block.holder.querySelectorAll(`.${ke.item}`), n = t[t.length - 1], s =
|
|
2803
|
+
const t = this.block.holder.querySelectorAll(`.${ke.item}`), n = t[t.length - 1], s = Ut(n);
|
|
2804
2804
|
if (n === null || s === null || (s.insertAdjacentHTML("beforeend", e.items[0].content), this.listWrapper === void 0)) return;
|
|
2805
2805
|
const a = Ke(this.listWrapper);
|
|
2806
2806
|
if (a.length === 0) return;
|
|
2807
|
-
let c =
|
|
2807
|
+
let c = lt(a[a.length - 1]);
|
|
2808
2808
|
const g = e.items.shift();
|
|
2809
2809
|
g !== void 0 && (g.items.length !== 0 && (c === null && (c = this.renderer.renderWrapper(!1)), this.appendItems(g.items, c)), e.items.length > 0 && this.appendItems(e.items, this.listWrapper));
|
|
2810
2810
|
}
|
|
@@ -2853,21 +2853,21 @@ class Ht {
|
|
|
2853
2853
|
backspace(e) {
|
|
2854
2854
|
var n;
|
|
2855
2855
|
const t = this.currentItem;
|
|
2856
|
-
t !== null &&
|
|
2856
|
+
t !== null && kn(t) && ((n = window.getSelection()) == null ? void 0 : n.isCollapsed) !== !1 && (e.stopPropagation(), t.parentNode !== this.listWrapper || t.previousElementSibling !== null ? (e.preventDefault(), this.mergeItemWithPrevious(t)) : this.convertFirstItemToDefaultBlock());
|
|
2857
2857
|
}
|
|
2858
2858
|
shiftTab(e) {
|
|
2859
2859
|
e.stopPropagation(), e.preventDefault(), this.currentItem !== null && this.unshiftItem(this.currentItem);
|
|
2860
2860
|
}
|
|
2861
2861
|
unshiftItem(e) {
|
|
2862
|
-
if (!e.parentNode || !
|
|
2862
|
+
if (!e.parentNode || !rt(e.parentNode)) return;
|
|
2863
2863
|
const t = e.parentNode.closest(`.${ke.item}`);
|
|
2864
2864
|
if (!t) return;
|
|
2865
|
-
let n =
|
|
2865
|
+
let n = lt(e);
|
|
2866
2866
|
if (e.parentElement === null) return;
|
|
2867
|
-
const s =
|
|
2867
|
+
const s = It(e);
|
|
2868
2868
|
s !== null && (n === null && (n = this.renderer.renderWrapper(!1)), s.forEach((a) => {
|
|
2869
2869
|
n.appendChild(a);
|
|
2870
|
-
}), e.appendChild(n)), t.after(e), ut(e, !1),
|
|
2870
|
+
}), e.appendChild(n)), t.after(e), ut(e, !1), Ht(t);
|
|
2871
2871
|
}
|
|
2872
2872
|
splitList(e) {
|
|
2873
2873
|
const t = Ke(e), n = this.block, s = this.api.blocks.getCurrentBlockIndex();
|
|
@@ -2876,7 +2876,7 @@ class Ht {
|
|
|
2876
2876
|
this.unshiftItem(C), ut(e, !1);
|
|
2877
2877
|
}
|
|
2878
2878
|
if (e.previousElementSibling === null && e.parentNode === this.listWrapper) return void this.convertItemToDefaultBlock(s);
|
|
2879
|
-
const a =
|
|
2879
|
+
const a = It(e);
|
|
2880
2880
|
if (a === null) return;
|
|
2881
2881
|
const c = this.renderer.renderWrapper(!0);
|
|
2882
2882
|
a.forEach((C) => {
|
|
@@ -2886,7 +2886,7 @@ class Ht {
|
|
|
2886
2886
|
g.meta.start = this.data.style == "ordered" ? 1 : void 0, this.api.blocks.insert(n == null ? void 0 : n.name, g, this.config, s + 1), this.convertItemToDefaultBlock(s + 1), c.remove();
|
|
2887
2887
|
}
|
|
2888
2888
|
splitItem(e) {
|
|
2889
|
-
const [t] =
|
|
2889
|
+
const [t] = Dn();
|
|
2890
2890
|
if (t === null) return;
|
|
2891
2891
|
const n = this.renderItem(null);
|
|
2892
2892
|
e == null || e.after(n), ut(n);
|
|
@@ -2894,9 +2894,9 @@ class Ht {
|
|
|
2894
2894
|
mergeItemWithPrevious(e) {
|
|
2895
2895
|
var M;
|
|
2896
2896
|
const t = e.previousElementSibling, n = e.parentNode;
|
|
2897
|
-
if (n === null || !
|
|
2897
|
+
if (n === null || !rt(n)) return;
|
|
2898
2898
|
const s = n.closest(`.${ke.item}`);
|
|
2899
|
-
if (!t && !s || t && !
|
|
2899
|
+
if (!t && !s || t && !rt(t)) return;
|
|
2900
2900
|
let a;
|
|
2901
2901
|
if (t) {
|
|
2902
2902
|
const A = Ke(t, !1);
|
|
@@ -2905,17 +2905,17 @@ class Ht {
|
|
|
2905
2905
|
const c = this.renderer.getItemContent(e);
|
|
2906
2906
|
if (!a) return;
|
|
2907
2907
|
ut(a, !1);
|
|
2908
|
-
const g =
|
|
2908
|
+
const g = Ut(a);
|
|
2909
2909
|
if (g === null) return;
|
|
2910
2910
|
g.insertAdjacentHTML("beforeend", c);
|
|
2911
2911
|
const C = Ke(e);
|
|
2912
|
-
if (C.length === 0) return e.remove(), void
|
|
2913
|
-
const E = t || s, b = (M =
|
|
2912
|
+
if (C.length === 0) return e.remove(), void Ht(a);
|
|
2913
|
+
const E = t || s, b = (M = lt(E)) != null ? M : this.renderer.renderWrapper(!1);
|
|
2914
2914
|
t ? C.forEach((A) => {
|
|
2915
2915
|
b.appendChild(A);
|
|
2916
2916
|
}) : C.forEach((A) => {
|
|
2917
2917
|
b.prepend(A);
|
|
2918
|
-
}),
|
|
2918
|
+
}), lt(E) === null && a.appendChild(b), e.remove();
|
|
2919
2919
|
}
|
|
2920
2920
|
addTab(e) {
|
|
2921
2921
|
var a;
|
|
@@ -2927,8 +2927,8 @@ class Ht {
|
|
|
2927
2927
|
if (c !== null && c === this.config.maxLevel) return;
|
|
2928
2928
|
}
|
|
2929
2929
|
const n = t.previousSibling;
|
|
2930
|
-
if (n === null || !
|
|
2931
|
-
const s =
|
|
2930
|
+
if (n === null || !rt(n)) return;
|
|
2931
|
+
const s = lt(n);
|
|
2932
2932
|
if (s)
|
|
2933
2933
|
s.appendChild(t), Ke(t).forEach((c) => {
|
|
2934
2934
|
s.appendChild(c);
|
|
@@ -2939,7 +2939,7 @@ class Ht {
|
|
|
2939
2939
|
c.appendChild(g);
|
|
2940
2940
|
}), n.appendChild(c);
|
|
2941
2941
|
}
|
|
2942
|
-
|
|
2942
|
+
Ht(t), ut(t, !1);
|
|
2943
2943
|
}
|
|
2944
2944
|
convertItemToDefaultBlock(e, t) {
|
|
2945
2945
|
let n;
|
|
@@ -2954,7 +2954,7 @@ class Ht {
|
|
|
2954
2954
|
const c = t[0];
|
|
2955
2955
|
this.unshiftItem(c), ut(e);
|
|
2956
2956
|
}
|
|
2957
|
-
const n =
|
|
2957
|
+
const n = It(e), s = this.api.blocks.getCurrentBlockIndex(), a = n === null;
|
|
2958
2958
|
this.convertItemToDefaultBlock(s, a);
|
|
2959
2959
|
}
|
|
2960
2960
|
renderItem(e, t) {
|
|
@@ -2976,8 +2976,8 @@ class Ht {
|
|
|
2976
2976
|
});
|
|
2977
2977
|
}
|
|
2978
2978
|
}
|
|
2979
|
-
const pt = { wrapper: `${Te}-start-with-field`, input: `${Te}-start-with-field__input`, startWithElementWrapperInvalid: `${Te}-start-with-field--invalid` }, bt = /* @__PURE__ */ new Map([["Numeric", "numeric"], ["Lower Roman", "lower-roman"], ["Upper Roman", "upper-roman"], ["Lower Alpha", "lower-alpha"], ["Upper Alpha", "upper-alpha"]]),
|
|
2980
|
-
class
|
|
2979
|
+
const pt = { wrapper: `${Te}-start-with-field`, input: `${Te}-start-with-field__input`, startWithElementWrapperInvalid: `${Te}-start-with-field--invalid` }, bt = /* @__PURE__ */ new Map([["Numeric", "numeric"], ["Lower Roman", "lower-roman"], ["Upper Roman", "upper-roman"], ["Lower Alpha", "lower-alpha"], ["Upper Alpha", "upper-alpha"]]), cn = /* @__PURE__ */ new Map([["numeric", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 14.2L10 7.4135C10 7.32872 9.90111 7.28241 9.83598 7.33668L7 9.7" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>'], ["lower-roman", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 14.2L10 9.5" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 7.01L10 7" stroke="black" stroke-width="1.8" stroke-linecap="round"/></svg>'], ["upper-roman", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 14.2L10 7.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>'], ["lower-alpha", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.2087 14.2H14.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M11.5 14.5C11.5 14.5 11 13.281 11 12.5M7 9.5C7 9.5 7.5 8.5 9 8.5C10.5 8.5 11 9.5 11 10.5L11 11.5M11 11.5L11 12.5M11 11.5C11 11.5 7 11 7 13C7 15.3031 11 15 11 12.5" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>'], ["upper-alpha", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.0087 14.2H16" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M7 14.2L7.78865 12M13 14.2L12.1377 12M7.78865 12C7.78865 12 9.68362 7 10 7C10.3065 7 12.1377 12 12.1377 12M7.78865 12L12.1377 12" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>']]);
|
|
2980
|
+
class Rt {
|
|
2981
2981
|
static get isReadOnlySupported() {
|
|
2982
2982
|
return !0;
|
|
2983
2983
|
}
|
|
@@ -2985,13 +2985,13 @@ class xt {
|
|
|
2985
2985
|
return !0;
|
|
2986
2986
|
}
|
|
2987
2987
|
static get toolbox() {
|
|
2988
|
-
return [{ icon:
|
|
2988
|
+
return [{ icon: rn, title: "Unordered List", data: { style: "unordered" } }, { icon: on, title: "Ordered List", data: { style: "ordered" } }, { icon: tn, title: "Checklist", data: { style: "checklist" } }];
|
|
2989
2989
|
}
|
|
2990
2990
|
static get pasteConfig() {
|
|
2991
2991
|
return { tags: ["OL", "UL", "LI"] };
|
|
2992
2992
|
}
|
|
2993
2993
|
static get conversionConfig() {
|
|
2994
|
-
return { export: (e) =>
|
|
2994
|
+
return { export: (e) => Rt.joinRecursive(e), import: (e, t) => ({ meta: {}, items: [{ content: e, meta: {}, items: [] }], style: (t == null ? void 0 : t.defaultStyle) !== void 0 ? t.defaultStyle : "unordered" }) };
|
|
2995
2995
|
}
|
|
2996
2996
|
get listStyle() {
|
|
2997
2997
|
return this.data.style || this.defaultListStyle;
|
|
@@ -3022,7 +3022,7 @@ class xt {
|
|
|
3022
3022
|
}(e) : c, this.listStyle === "ordered" && this.data.meta.counterType === void 0 && (this.data.meta.counterType = "numeric"), this.changeTabulatorByStyle();
|
|
3023
3023
|
}
|
|
3024
3024
|
static joinRecursive(e) {
|
|
3025
|
-
return e.items.map((t) => `${t.content} ${
|
|
3025
|
+
return e.items.map((t) => `${t.content} ${Rt.joinRecursive(t)}`).join("");
|
|
3026
3026
|
}
|
|
3027
3027
|
render() {
|
|
3028
3028
|
return this.listElement = this.list.render(), this.listElement;
|
|
@@ -3035,28 +3035,28 @@ class xt {
|
|
|
3035
3035
|
}
|
|
3036
3036
|
renderSettings() {
|
|
3037
3037
|
var t;
|
|
3038
|
-
const e = [{ label: this.api.i18n.t("Unordered"), icon:
|
|
3038
|
+
const e = [{ label: this.api.i18n.t("Unordered"), icon: rn, closeOnActivate: !0, isActive: this.listStyle == "unordered", onActivate: () => {
|
|
3039
3039
|
this.listStyle = "unordered";
|
|
3040
|
-
} }, { label: this.api.i18n.t("Ordered"), icon:
|
|
3040
|
+
} }, { label: this.api.i18n.t("Ordered"), icon: on, closeOnActivate: !0, isActive: this.listStyle == "ordered", onActivate: () => {
|
|
3041
3041
|
this.listStyle = "ordered";
|
|
3042
|
-
} }, { label: this.api.i18n.t("Checklist"), icon:
|
|
3042
|
+
} }, { label: this.api.i18n.t("Checklist"), icon: tn, closeOnActivate: !0, isActive: this.listStyle == "checklist", onActivate: () => {
|
|
3043
3043
|
this.listStyle = "checklist";
|
|
3044
3044
|
} }];
|
|
3045
3045
|
if (this.listStyle === "ordered") {
|
|
3046
3046
|
const n = function(c, g, { value: C, placeholder: E, attributes: b, sanitize: M }) {
|
|
3047
3047
|
const A = Tt.make("div", pt.wrapper), R = Tt.make("div", "cdx-list-start-with-field__startlabel", { innerText: c }), H = Tt.make("div", "cdx-list-start-with-field__input-wrapper"), B = Tt.make("input", pt.input, { placeholder: E, tabIndex: -1, value: C, type: "number" });
|
|
3048
|
-
for (const
|
|
3048
|
+
for (const X in b) B.setAttribute(X, b[X]);
|
|
3049
3049
|
return A.appendChild(R), H.appendChild(B), A.appendChild(H), B.addEventListener("input", () => {
|
|
3050
3050
|
M !== void 0 && (B.value = M(B.value));
|
|
3051
|
-
const
|
|
3052
|
-
|
|
3051
|
+
const X = B.checkValidity();
|
|
3052
|
+
X || A.classList.contains(pt.startWithElementWrapperInvalid) || A.classList.add(pt.startWithElementWrapperInvalid), X && A.classList.contains(pt.startWithElementWrapperInvalid) && A.classList.remove(pt.startWithElementWrapperInvalid), X && g(B.value);
|
|
3053
3053
|
}), A;
|
|
3054
3054
|
}(this.api.i18n.t("Start with"), (c) => this.changeStartWith(Number(c)), { value: String((t = this.data.meta.start) != null ? t : 1), placeholder: "", attributes: { required: "true" }, sanitize: (c) => function(g) {
|
|
3055
3055
|
return g.replace(/\D+/g, "");
|
|
3056
|
-
}(c) }), s = [{ label: this.api.i18n.t("Start with"), icon: '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 14.2L8 7.4135C8 7.32872 7.90111 7.28241 7.83598 7.33668L5 9.7" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M14 13L16.4167 10.7778M16.4167 10.7778L14 8.5M16.4167 10.7778H11.6562" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>', name: "list-setting-start-with", element: n, type: "html" }], a = { label: this.api.i18n.t("Counter type"), name: "list-setting", icon:
|
|
3056
|
+
}(c) }), s = [{ label: this.api.i18n.t("Start with"), icon: '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 14.2L8 7.4135C8 7.32872 7.90111 7.28241 7.83598 7.33668L5 9.7" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M14 13L16.4167 10.7778M16.4167 10.7778L14 8.5M16.4167 10.7778H11.6562" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>', name: "list-setting-start-with", element: n, type: "html" }], a = { label: this.api.i18n.t("Counter type"), name: "list-setting", icon: cn.get(this.data.meta.counterType), children: { items: [] } };
|
|
3057
3057
|
bt.forEach((c, g) => {
|
|
3058
3058
|
const C = bt.get(g);
|
|
3059
|
-
this.defaultCounterTypes.includes(C) && a.children.items.push({ title: this.api.i18n.t(g), icon:
|
|
3059
|
+
this.defaultCounterTypes.includes(C) && a.children.items.push({ title: this.api.i18n.t(g), icon: cn.get(C), isActive: this.data.meta.counterType === bt.get(g), closeOnActivate: !0, onActivate: () => {
|
|
3060
3060
|
this.changeCounters(bt.get(g));
|
|
3061
3061
|
} });
|
|
3062
3062
|
}), a.children.items.length > 1 && s.push(a), e.push({ type: "separator" }, ...s);
|
|
@@ -3089,17 +3089,17 @@ class xt {
|
|
|
3089
3089
|
changeTabulatorByStyle() {
|
|
3090
3090
|
switch (this.listStyle) {
|
|
3091
3091
|
case "ordered":
|
|
3092
|
-
this.list = new
|
|
3092
|
+
this.list = new Bt({ data: this.data, readOnly: this.readOnly, api: this.api, config: this.config, block: this.block }, new Fe(this.readOnly, this.config));
|
|
3093
3093
|
break;
|
|
3094
3094
|
case "unordered":
|
|
3095
|
-
this.list = new
|
|
3095
|
+
this.list = new Bt({ data: this.data, readOnly: this.readOnly, api: this.api, config: this.config, block: this.block }, new Ue(this.readOnly, this.config));
|
|
3096
3096
|
break;
|
|
3097
3097
|
case "checklist":
|
|
3098
|
-
this.list = new
|
|
3098
|
+
this.list = new Bt({ data: this.data, readOnly: this.readOnly, api: this.api, config: this.config, block: this.block }, new me(this.readOnly, this.config));
|
|
3099
3099
|
}
|
|
3100
3100
|
}
|
|
3101
3101
|
}
|
|
3102
|
-
class
|
|
3102
|
+
class dn {
|
|
3103
3103
|
constructor(e) {
|
|
3104
3104
|
this.target = e, this.isContentEditable = e && e.contentEditable;
|
|
3105
3105
|
}
|
|
@@ -3131,7 +3131,7 @@ class cn {
|
|
|
3131
3131
|
return n;
|
|
3132
3132
|
}
|
|
3133
3133
|
}
|
|
3134
|
-
class
|
|
3134
|
+
class ei {
|
|
3135
3135
|
constructor(e, t, n) {
|
|
3136
3136
|
this.holder = t, this.observer = null, this.debounceTimer = n, this.mutationDebouncer = this.debounce(() => {
|
|
3137
3137
|
e();
|
|
@@ -3171,12 +3171,12 @@ class Jn {
|
|
|
3171
3171
|
document.dispatchEvent(e), (t = this.observer) == null || t.disconnect();
|
|
3172
3172
|
}
|
|
3173
3173
|
}
|
|
3174
|
-
class
|
|
3174
|
+
class ti {
|
|
3175
3175
|
constructor({ editor: e, config: t = {}, onUpdate: n, maxLength: s }) {
|
|
3176
3176
|
this.position = 0;
|
|
3177
3177
|
const a = { maxLength: 30, onUpdate() {
|
|
3178
|
-
}, config: { debounceTimer: 200, shortcuts: { undo: ["CMD+Z"], redo: ["CMD+Y", "CMD+SHIFT+Z"] } } }, { blocks: c, caret: g } = e, { configuration: C } = e, { holder: E, defaultBlock: b } = C, M = a.config.shortcuts, { shortcuts: A } = t, R = { ...M, ...A }, H = Array.isArray(R.undo) ? R.undo : [R.undo], B = Array.isArray(R.redo) ? R.redo : [R.redo],
|
|
3179
|
-
this.holder = typeof E == "string" ? document.getElementById(E) : E, this.editor = e, this.defaultBlock = b, this.blocks = c, this.caret = g, this.shouldSaveHistory = !0, this.readOnly = C.readOnly, this.maxLength = s || a.maxLength, this.onUpdate = n || a.onUpdate, this.config = { debounceTimer: ie, shortcuts: { undo: H, redo: B } }, new
|
|
3178
|
+
}, config: { debounceTimer: 200, shortcuts: { undo: ["CMD+Z"], redo: ["CMD+Y", "CMD+SHIFT+Z"] } } }, { blocks: c, caret: g } = e, { configuration: C } = e, { holder: E, defaultBlock: b } = C, M = a.config.shortcuts, { shortcuts: A } = t, R = { ...M, ...A }, H = Array.isArray(R.undo) ? R.undo : [R.undo], B = Array.isArray(R.redo) ? R.redo : [R.redo], X = a.config.debounceTimer, { debounceTimer: ie = X } = t;
|
|
3179
|
+
this.holder = typeof E == "string" ? document.getElementById(E) : E, this.editor = e, this.defaultBlock = b, this.blocks = c, this.caret = g, this.shouldSaveHistory = !0, this.readOnly = C.readOnly, this.maxLength = s || a.maxLength, this.onUpdate = n || a.onUpdate, this.config = { debounceTimer: ie, shortcuts: { undo: H, redo: B } }, new ei(() => this.registerChange(), this.holder, this.config.debounceTimer).setMutationObserver(), this.setEventListeners(), this.initialItem = null, this.clear();
|
|
3180
3180
|
}
|
|
3181
3181
|
static get isReadOnlySupported() {
|
|
3182
3182
|
return !0;
|
|
@@ -3214,7 +3214,7 @@ class ei {
|
|
|
3214
3214
|
}
|
|
3215
3215
|
getCaretIndex(e) {
|
|
3216
3216
|
const t = this.holder.getElementsByClassName("ce-block__content");
|
|
3217
|
-
return new
|
|
3217
|
+
return new dn(t[e].firstChild).getPos();
|
|
3218
3218
|
}
|
|
3219
3219
|
insertDeletedBlock(e, t, n) {
|
|
3220
3220
|
for (let s = 0; s < e.length; s += 1) if (!t[s] || e[s].id !== t[s].id) {
|
|
@@ -3260,7 +3260,7 @@ class ei {
|
|
|
3260
3260
|
}
|
|
3261
3261
|
setCaretIndex(e, t) {
|
|
3262
3262
|
if (t && t !== -1) {
|
|
3263
|
-
const n = this.holder.getElementsByClassName("ce-block__content"), s = new
|
|
3263
|
+
const n = this.holder.getElementsByClassName("ce-block__content"), s = new dn(n[e].firstChild);
|
|
3264
3264
|
setTimeout(() => s.setPos(t), 50);
|
|
3265
3265
|
} else this.caret.setToBlock(e, "end");
|
|
3266
3266
|
}
|
|
@@ -3298,7 +3298,7 @@ class ei {
|
|
|
3298
3298
|
return n.push(s), n;
|
|
3299
3299
|
}
|
|
3300
3300
|
setEventListeners() {
|
|
3301
|
-
const { holder: e } = this, { shortcuts: t } = this.config, { undo: n, redo: s } = t, a = n.map((R) => R.replace(/ /g, "").split("+")), c = s.map((R) => R.replace(/ /g, "").split("+")), g = a.map((R) => this.parseKeys(R)), C = c.map((R) => this.parseKeys(R)), E = (R, H) => H.reduce((B,
|
|
3301
|
+
const { holder: e } = this, { shortcuts: t } = this.config, { undo: n, redo: s } = t, a = n.map((R) => R.replace(/ /g, "").split("+")), c = s.map((R) => R.replace(/ /g, "").split("+")), g = a.map((R) => this.parseKeys(R)), C = c.map((R) => this.parseKeys(R)), E = (R, H) => H.reduce((B, X) => B || ((ie, de) => de.length === 3 && ie[de[0]] && ie[de[1]] && ie.key.toLowerCase() === de[2])(R, X), !1), b = (R, H, B) => !(!((X, ie) => ie.reduce((de, fe) => de || ((q, ye) => ye.length === 2 && q[ye[0]] && q.key.toLowerCase() === ye[1])(X, fe), !1))(R, H) || E(R, B)) || !!E(R, H), M = (R) => {
|
|
3302
3302
|
b(R, g, C) && (R.preventDefault(), this.undo());
|
|
3303
3303
|
}, A = (R) => {
|
|
3304
3304
|
b(R, C, g) && (R.preventDefault(), this.redo());
|
|
@@ -3428,15 +3428,15 @@ class et {
|
|
|
3428
3428
|
return { message: !0, type: !1, alignType: !1 };
|
|
3429
3429
|
}
|
|
3430
3430
|
}
|
|
3431
|
-
const
|
|
3431
|
+
const hn = { orientation: !1 }, Se = class Se {
|
|
3432
3432
|
constructor({ api: e, data: t, config: n, block: s, ...a }) {
|
|
3433
3433
|
var g, C, E, b, M, A;
|
|
3434
3434
|
this.wrapper = document.createElement("div"), this.DEFAULT_INDENT_KEY = "Tab", this.lastResizeTimeout = null, this.cachedMaxWidthForContent = null, this.api = e, this.block = s, !n && "settings" in a && (n = (g = a.settings) != null ? g : {}), this.config = { indentSize: 24, maxIndent: 8, minIndent: 0, multiblock: !1, autoIndent: !1, tuneName: null, orientation: "horizontal", customBlockIndentLimits: {}, handleShortcut: void 0, direction: "ltr", directionChangeHandler: null, version: "2.30", ...n != null ? n : {} }, this.changeConfigBasedOnVersionIfNeeded(), (C = this.config) != null && C.directionChangeHandler && this.config.directionChangeHandler(this.alignmentChangeListener.bind(this));
|
|
3435
3435
|
const c = (A = (M = this.config.customBlockIndentLimits[(b = (E = this.block) == null ? void 0 : E.name) != null ? b : ""]) == null ? void 0 : M.min) != null ? A : this.config.minIndent;
|
|
3436
3436
|
this.data = { indentLevel: c, ...t != null ? t : {} }, this.config.multiblock && this.config.tuneName, window.addEventListener("resize", (R) => this.onResize.call(this, R)), this.api.events.on("block changed", ({ event: R }) => {
|
|
3437
|
-
var
|
|
3437
|
+
var X;
|
|
3438
3438
|
const H = R.detail.target.id;
|
|
3439
|
-
((
|
|
3439
|
+
((X = this.block) == null ? void 0 : X.id) === H && this.shouldApplyAutoIndent && queueMicrotask(() => this.autoIndentBlock());
|
|
3440
3440
|
});
|
|
3441
3441
|
}
|
|
3442
3442
|
static get isTune() {
|
|
@@ -3464,15 +3464,15 @@ const dn = { orientation: !1 }, Se = class Se {
|
|
|
3464
3464
|
const C = `${this.TuneNames.indentLeft}-${(c = this.block) == null ? void 0 : c.id}`, E = `${this.TuneNames.indentRight}-${(g = this.block) == null ? void 0 : g.id}`;
|
|
3465
3465
|
return [{ title: this.rightText, hint: { title: this.api.i18n.t(this.rightText) }, onActivate: (b, M) => {
|
|
3466
3466
|
this.handleIndentRight(), b.title = this.rightText;
|
|
3467
|
-
}, icon:
|
|
3467
|
+
}, icon: ln, name: E }, { title: this.leftText, hint: { title: this.api.i18n.t(this.leftText) }, onActivate: (b, M) => {
|
|
3468
3468
|
this.handleIndentLeft(), b.title = this.leftText;
|
|
3469
|
-
}, icon:
|
|
3469
|
+
}, icon: an, name: C }];
|
|
3470
3470
|
}
|
|
3471
3471
|
const t = `
|
|
3472
3472
|
<div class="${this.CSS.popoverItem} ${this.CSS.customPopoverItem}" data-item-name='indent' version=${this.config.version}>
|
|
3473
|
-
<button type="button" class="${this.CSS.popoverItemIcon}" data-${this.TuneNames.indentLeft}>${
|
|
3473
|
+
<button type="button" class="${this.CSS.popoverItemIcon}" data-${this.TuneNames.indentLeft}>${an}</button>
|
|
3474
3474
|
<span class="${this.CSS.popoverItemTitle}">${this.api.sanitizer.clean(this.api.i18n.t("Indent"), {})}</span>
|
|
3475
|
-
<button type="button" class="${this.CSS.popoverItemIcon}" data-${this.TuneNames.indentRight} style="margin-left:10px;">${
|
|
3475
|
+
<button type="button" class="${this.CSS.popoverItemIcon}" data-${this.TuneNames.indentRight} style="margin-left:10px;">${ln}</button>
|
|
3476
3476
|
</div>
|
|
3477
3477
|
`, n = this.createElementFromTemplate(t), s = n.querySelector(`[data-${this.TuneNames.indentRight}]`), a = n.querySelector(`[data-${this.TuneNames.indentLeft}]`);
|
|
3478
3478
|
return s && (s.addEventListener("click", () => this.handleIndentRight()), this.api.tooltip.onHover(s, this.api.i18n.t("Indent right"), { placement: "top" })), a && (a.addEventListener("click", () => this.handleIndentLeft()), this.api.tooltip.onHover(a, this.api.i18n.t("Indent left"), { placement: "top" })), n;
|
|
@@ -3666,7 +3666,7 @@ const dn = { orientation: !1 }, Se = class Se {
|
|
|
3666
3666
|
return new DOMParser().parseFromString(e, "text/html").body.firstChild;
|
|
3667
3667
|
}
|
|
3668
3668
|
changeConfigBasedOnVersionIfNeeded() {
|
|
3669
|
-
this.config.version && this.config.version < "2.27" && this.config.orientation === "vertical" && (this.config.orientation = "horizontal",
|
|
3669
|
+
this.config.version && this.config.version < "2.27" && this.config.orientation === "vertical" && (this.config.orientation = "horizontal", hn.orientation, hn.orientation = !0);
|
|
3670
3670
|
}
|
|
3671
3671
|
maxWidthForContent(e) {
|
|
3672
3672
|
const t = e.querySelector(`.${this.EditorCSS.content}`);
|
|
@@ -3678,26 +3678,26 @@ const dn = { orientation: !1 }, Se = class Se {
|
|
|
3678
3678
|
}
|
|
3679
3679
|
};
|
|
3680
3680
|
Se.DATA_WRAPPER_NAME = "data-block-indent-wrapper", Se.DATA_FOCUSED = "data-focused", Se.DATA_INDENT_LEVEL = "data-indent-level";
|
|
3681
|
-
let
|
|
3681
|
+
let $t = Se;
|
|
3682
3682
|
function He(_, e, t = {}) {
|
|
3683
3683
|
const n = document.createElement(_);
|
|
3684
3684
|
Array.isArray(e) ? n.classList.add(...e) : e && n.classList.add(e);
|
|
3685
3685
|
for (const s in t) Object.prototype.hasOwnProperty.call(t, s) && (n[s] = t[s]);
|
|
3686
3686
|
return n;
|
|
3687
3687
|
}
|
|
3688
|
-
function
|
|
3688
|
+
function un(_) {
|
|
3689
3689
|
const e = _.getBoundingClientRect();
|
|
3690
3690
|
return { y1: Math.floor(e.top + window.pageYOffset), x1: Math.floor(e.left + window.pageXOffset), x2: Math.floor(e.right + window.pageXOffset), y2: Math.floor(e.bottom + window.pageYOffset) };
|
|
3691
3691
|
}
|
|
3692
|
-
function
|
|
3693
|
-
const t =
|
|
3692
|
+
function Dt(_, e) {
|
|
3693
|
+
const t = un(_), n = un(e);
|
|
3694
3694
|
return { fromTopBorder: n.y1 - t.y1, fromLeftBorder: n.x1 - t.x1, fromRightBorder: t.x2 - n.x2, fromBottomBorder: t.y2 - n.y2 };
|
|
3695
3695
|
}
|
|
3696
|
-
function
|
|
3696
|
+
function pn(_, e) {
|
|
3697
3697
|
var t;
|
|
3698
3698
|
return (t = e == null ? void 0 : e.parentNode) == null ? void 0 : t.insertBefore(_, e);
|
|
3699
3699
|
}
|
|
3700
|
-
function
|
|
3700
|
+
function gn(_, e = !0) {
|
|
3701
3701
|
const t = document.createRange(), n = window.getSelection();
|
|
3702
3702
|
t.selectNodeContents(_), t.collapse(e), n == null || n.removeAllRanges(), n == null || n.addRange(t);
|
|
3703
3703
|
}
|
|
@@ -3791,8 +3791,8 @@ class tt {
|
|
|
3791
3791
|
(e = this.popover) == null || e.close(), this.wrapper.classList.remove(tt.CSS.toolboxShowed);
|
|
3792
3792
|
}
|
|
3793
3793
|
}
|
|
3794
|
-
const
|
|
3795
|
-
class
|
|
3794
|
+
const fn = "tc-wrap", ni = "tc-wrap--readonly", mn = "tc-table", ot = "tc-row", vn = "tc-table--heading", Pt = "tc-row--selected", at = "tc-cell", zt = "tc-cell--selected", Wt = "tc-add-row", Cn = "tc-add-row--disabled", Ft = "tc-add-column", wn = "tc-add-column--disabled";
|
|
3795
|
+
class ii {
|
|
3796
3796
|
constructor(e, t, n, s) {
|
|
3797
3797
|
this.minCellWidhth = 50, this.defaultCellWidth = 100, this.handleDocumentMousedown = (a) => {
|
|
3798
3798
|
this.wrapper.contains(a.target) && a.target.classList.contains("cell-resizable") && (a.preventDefault(), this.isDragging = !0, this.table.classList.add("table-resizing"), document.addEventListener("mousemove", this.handleDocumentMousemove), document.addEventListener("mouseup", this.handleDocumentMouseup), this.draggingColumn = this.hoveredColumn, this.startWidth = this.colWidthArr[this.draggingColumn - 1], this.mouseStartX = a.clientX);
|
|
@@ -3804,9 +3804,9 @@ class ni {
|
|
|
3804
3804
|
this.updateToolboxesPosition(), this.isDragging = !1, this.table.classList.remove("table-resizing"), document.removeEventListener("mousemove", this.handleDocumentMousemove), document.removeEventListener("mouseup", this.handleDocumentMouseup);
|
|
3805
3805
|
}, this.readOnly = e, this.api = t, this.data = n, this.config = s, this.wrapper = null, this.table = null, this.hoveredCell = null, this.isDragging = !1, this.draggingColumn = 0, this.startWidth = 0, this.mouseStartX = 0, this.colWidthArr = [], this.focusedCell = { row: 0, col: 0 }, this.toolboxColumn = this.createColumnToolbox(), this.toolboxRow = this.createRowToolbox(), this.createTableWrapper(), this.hoveredRow = 0, this.hoveredColumn = 0, this.selectedRow = 0, this.selectedColumn = 0, this.tunes = { withHeadings: !1 }, this.resize(), this.data.colWidth && this.data.colWidth.length > 0 && (this.colWidthArr = this.data.colWidth), this.updateColWidth(), this.fill(), this.focusedCell = { row: 0, column: 0 }, this.documentClicked = (a) => {
|
|
3806
3806
|
let c = a.target;
|
|
3807
|
-
const g = c.closest(`.${
|
|
3807
|
+
const g = c.closest(`.${mn}`) !== null, C = c.closest(`.${fn}`) === null;
|
|
3808
3808
|
(g || C) && this.hideToolboxes();
|
|
3809
|
-
const E = c.closest(`.${
|
|
3809
|
+
const E = c.closest(`.${Wt}`), b = c.closest(`.${Ft}`);
|
|
3810
3810
|
E && E.parentNode === this.wrapper ? (this.addRow(void 0, !0), this.hideToolboxes()) : b && b.parentNode === this.wrapper && (this.addColumn(void 0, !0), this.hideToolboxes());
|
|
3811
3811
|
}, this.readOnly || this.bindEvents();
|
|
3812
3812
|
}
|
|
@@ -3824,8 +3824,8 @@ class ni {
|
|
|
3824
3824
|
}
|
|
3825
3825
|
getCellInCol(e) {
|
|
3826
3826
|
const t = [];
|
|
3827
|
-
return this.table.querySelectorAll(`.${
|
|
3828
|
-
const s = n.querySelector(`.${
|
|
3827
|
+
return this.table.querySelectorAll(`.${ot}`).forEach((n) => {
|
|
3828
|
+
const s = n.querySelector(`.${at}:nth-child(${e})`);
|
|
3829
3829
|
s && t.push(s);
|
|
3830
3830
|
}), t;
|
|
3831
3831
|
}
|
|
@@ -3834,7 +3834,7 @@ class ni {
|
|
|
3834
3834
|
this.addColumn(this.selectedColumn, !0), this.hideToolboxes(), this.updateColWidth();
|
|
3835
3835
|
} }, { label: this.api.i18n.t("Add column to right"), icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.13333 14.9167L12.4667 18.25M12.4667 18.25L15.8 14.9167M12.4667 18.25L12.4667 10.0833C12.4667 9.19928 12.1155 8.35143 11.4904 7.72631C10.8652 7.10119 10.0174 6.75 9.13333 6.75"/></svg>', hideIf: () => this.numberOfColumns === this.config.maxcols, onClick: () => {
|
|
3836
3836
|
this.addColumn(this.selectedColumn + 1, !0), this.hideToolboxes(), this.updateColWidth();
|
|
3837
|
-
} }, { label: this.api.i18n.t("Delete column"), icon:
|
|
3837
|
+
} }, { label: this.api.i18n.t("Delete column"), icon: nn, hideIf: () => this.numberOfColumns === 1, confirmationRequired: !0, onClick: () => {
|
|
3838
3838
|
this.deleteColumn(this.selectedColumn), this.hideToolboxes(), this.updateColWidth();
|
|
3839
3839
|
} }], onOpen: () => {
|
|
3840
3840
|
this.selectColumn(this.hoveredColumn), this.hideRowToolbox();
|
|
@@ -3847,7 +3847,7 @@ class ni {
|
|
|
3847
3847
|
this.addRow(this.selectedRow, !0), this.hideToolboxes();
|
|
3848
3848
|
} }, { label: this.api.i18n.t("Add row below"), icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.8833 9.16666L18.2167 12.5M18.2167 12.5L14.8833 15.8333M18.2167 12.5H10.05C9.16594 12.5 8.31809 12.1488 7.69297 11.5237C7.06785 10.8986 6.71666 10.0507 6.71666 9.16666"/></svg>', hideIf: () => this.numberOfRows === this.config.maxrows, onClick: () => {
|
|
3849
3849
|
this.addRow(this.selectedRow + 1, !0), this.hideToolboxes();
|
|
3850
|
-
} }, { label: this.api.i18n.t("Delete row"), icon:
|
|
3850
|
+
} }, { label: this.api.i18n.t("Delete row"), icon: nn, hideIf: () => this.numberOfRows === 1, confirmationRequired: !0, onClick: () => {
|
|
3851
3851
|
this.deleteRow(this.selectedRow), this.hideToolboxes();
|
|
3852
3852
|
} }], onOpen: () => {
|
|
3853
3853
|
this.selectRow(this.hoveredRow), this.hideColumnToolbox();
|
|
@@ -3859,16 +3859,16 @@ class ni {
|
|
|
3859
3859
|
this.focusedCell.row !== this.numberOfRows ? (this.focusedCell.row += 1, this.focusCell()) : (this.addRow(), this.focusedCell.row += 1, this.focusCell(), this.updateToolboxesPosition(0, 0));
|
|
3860
3860
|
}
|
|
3861
3861
|
getCell(e, t) {
|
|
3862
|
-
return this.table.querySelectorAll(`.${
|
|
3862
|
+
return this.table.querySelectorAll(`.${ot}:nth-child(${e}) .${at}`)[t - 1];
|
|
3863
3863
|
}
|
|
3864
3864
|
getRow(e) {
|
|
3865
|
-
return this.table.querySelector(`.${
|
|
3865
|
+
return this.table.querySelector(`.${ot}:nth-child(${e})`);
|
|
3866
3866
|
}
|
|
3867
3867
|
getRowByCell(e) {
|
|
3868
3868
|
return e.parentElement;
|
|
3869
3869
|
}
|
|
3870
3870
|
getRowFirstCell(e) {
|
|
3871
|
-
return e.querySelector(`.${
|
|
3871
|
+
return e.querySelector(`.${at}:first-child`);
|
|
3872
3872
|
}
|
|
3873
3873
|
setCellContent(e, t, n) {
|
|
3874
3874
|
this.getCell(e, t).innerHTML = n;
|
|
@@ -3880,24 +3880,24 @@ class ni {
|
|
|
3880
3880
|
for (let c = 1; c <= this.numberOfRows; c++) {
|
|
3881
3881
|
let g;
|
|
3882
3882
|
const C = this.createCell();
|
|
3883
|
-
if (e > 0 && e <= n ? (g = this.getCell(c, e),
|
|
3883
|
+
if (e > 0 && e <= n ? (g = this.getCell(c, e), pn(C, g)) : g = this.getRow(c).appendChild(C), c === 1) {
|
|
3884
3884
|
const E = this.getCell(c, e > 0 ? e : n + 1);
|
|
3885
|
-
E && t &&
|
|
3885
|
+
E && t && gn(E);
|
|
3886
3886
|
}
|
|
3887
3887
|
}
|
|
3888
|
-
const s = this.wrapper.querySelector(`.${
|
|
3889
|
-
(a = this.config) != null && a.maxcols && this.numberOfColumns > this.config.maxcols - 1 && s && s.classList.add(
|
|
3888
|
+
const s = this.wrapper.querySelector(`.${Ft}`);
|
|
3889
|
+
(a = this.config) != null && a.maxcols && this.numberOfColumns > this.config.maxcols - 1 && s && s.classList.add(wn), this.addHeadingAttrToFirstRow(), this.colWidthArr.splice(e - 1, 0, this.defaultCellWidth);
|
|
3890
3890
|
}
|
|
3891
3891
|
addRow(e = -1, t = !1) {
|
|
3892
|
-
let n, s = He("div",
|
|
3892
|
+
let n, s = He("div", ot);
|
|
3893
3893
|
this.tunes.withHeadings && this.removeHeadingAttrFromFirstRow();
|
|
3894
3894
|
let a = this.numberOfColumns;
|
|
3895
3895
|
if (this.config && this.config.maxrows && this.numberOfRows >= this.config.maxrows) return;
|
|
3896
|
-
e > 0 && e <= this.numberOfRows ? n =
|
|
3896
|
+
e > 0 && e <= this.numberOfRows ? n = pn(s, this.getRow(e)) : n = this.table.appendChild(s), this.fillRow(n, a), this.tunes.withHeadings && this.addHeadingAttrToFirstRow();
|
|
3897
3897
|
const c = this.getRowFirstCell(n);
|
|
3898
|
-
c && t &&
|
|
3899
|
-
const g = this.wrapper.querySelector(`.${
|
|
3900
|
-
return this.config && this.config.maxrows && this.numberOfRows >= this.config.maxrows && g && g.classList.add(
|
|
3898
|
+
c && t && gn(c);
|
|
3899
|
+
const g = this.wrapper.querySelector(`.${Wt}`);
|
|
3900
|
+
return this.config && this.config.maxrows && this.numberOfRows >= this.config.maxrows && g && g.classList.add(Cn), n;
|
|
3901
3901
|
}
|
|
3902
3902
|
deleteColumn(e) {
|
|
3903
3903
|
for (let n = 1; n <= this.numberOfRows; n++) {
|
|
@@ -3905,16 +3905,16 @@ class ni {
|
|
|
3905
3905
|
if (!s) return;
|
|
3906
3906
|
s.remove();
|
|
3907
3907
|
}
|
|
3908
|
-
const t = this.wrapper.querySelector(`.${
|
|
3909
|
-
t && t.classList.remove(
|
|
3908
|
+
const t = this.wrapper.querySelector(`.${Ft}`);
|
|
3909
|
+
t && t.classList.remove(wn), this.colWidthArr.splice(e - 1, 1);
|
|
3910
3910
|
}
|
|
3911
3911
|
deleteRow(e) {
|
|
3912
3912
|
this.getRow(e).remove();
|
|
3913
|
-
const t = this.wrapper.querySelector(`.${
|
|
3914
|
-
t && t.classList.remove(
|
|
3913
|
+
const t = this.wrapper.querySelector(`.${Wt}`);
|
|
3914
|
+
t && t.classList.remove(Cn), this.addHeadingAttrToFirstRow();
|
|
3915
3915
|
}
|
|
3916
3916
|
createTableWrapper() {
|
|
3917
|
-
this.wrapper = He("div",
|
|
3917
|
+
this.wrapper = He("div", fn), this.table = He("div", mn), this.readOnly && this.wrapper.classList.add(ni), this.wrapper.appendChild(this.toolboxRow.element), this.wrapper.appendChild(this.toolboxColumn.element), this.wrapper.appendChild(this.table);
|
|
3918
3918
|
}
|
|
3919
3919
|
computeInitialSize() {
|
|
3920
3920
|
const e = this.data && this.data.content, t = Array.isArray(e), n = !!t && e.length, s = t ? e.length : void 0, a = n ? e[0].length : void 0, c = Number.parseInt(this.config && this.config.rows), g = Number.parseInt(this.config && this.config.cols), C = !isNaN(c) && c > 0 ? c : void 0, E = !isNaN(g) && g > 0 ? g : void 0;
|
|
@@ -3941,13 +3941,13 @@ class ni {
|
|
|
3941
3941
|
}
|
|
3942
3942
|
}
|
|
3943
3943
|
createCell() {
|
|
3944
|
-
return He("div",
|
|
3944
|
+
return He("div", at, { contentEditable: !this.readOnly });
|
|
3945
3945
|
}
|
|
3946
3946
|
get numberOfRows() {
|
|
3947
3947
|
return this.table.childElementCount;
|
|
3948
3948
|
}
|
|
3949
3949
|
get numberOfColumns() {
|
|
3950
|
-
return this.numberOfRows ? this.table.querySelectorAll(`.${
|
|
3950
|
+
return this.numberOfRows ? this.table.querySelectorAll(`.${ot}:first-child .${at}`).length : 0;
|
|
3951
3951
|
}
|
|
3952
3952
|
get isColumnMenuShowing() {
|
|
3953
3953
|
return this.selectedColumn !== 0;
|
|
@@ -3974,7 +3974,7 @@ class ni {
|
|
|
3974
3974
|
}
|
|
3975
3975
|
focusInTableListener(e) {
|
|
3976
3976
|
const t = e.target, n = this.getRowByCell(t);
|
|
3977
|
-
n && (this.focusedCell = { row: Array.from(this.table.querySelectorAll(`.${
|
|
3977
|
+
n && (this.focusedCell = { row: Array.from(this.table.querySelectorAll(`.${ot}`)).indexOf(n) + 1, column: Array.from(n.querySelectorAll(`.${at}`)).indexOf(t) + 1 });
|
|
3978
3978
|
}
|
|
3979
3979
|
hideToolboxes() {
|
|
3980
3980
|
this.hideRowToolbox(), this.hideColumnToolbox(), this.updateToolboxesPosition();
|
|
@@ -3998,12 +3998,12 @@ class ni {
|
|
|
3998
3998
|
for (var s = 0; s < t - 1; s++) n += this.colWidthArr[s];
|
|
3999
3999
|
return n += this.colWidthArr[t - 1] / 2, { left: `${n}px` };
|
|
4000
4000
|
}), this.isRowMenuShowing || e > 0 && e <= this.numberOfRows && this.toolboxRow.show(() => {
|
|
4001
|
-
const n = this.getRow(e), { fromTopBorder: s } =
|
|
4001
|
+
const n = this.getRow(e), { fromTopBorder: s } = Dt(this.table, n), { height: a } = n.getBoundingClientRect();
|
|
4002
4002
|
return { top: `${Math.ceil(s + a / 2)}px` };
|
|
4003
4003
|
});
|
|
4004
4004
|
}
|
|
4005
4005
|
setHeadingsSetting(e) {
|
|
4006
|
-
this.tunes.withHeadings = e, e ? (this.table.classList.add(
|
|
4006
|
+
this.tunes.withHeadings = e, e ? (this.table.classList.add(vn), this.addHeadingAttrToFirstRow()) : (this.table.classList.remove(vn), this.removeHeadingAttrFromFirstRow());
|
|
4007
4007
|
}
|
|
4008
4008
|
addHeadingAttrToFirstRow() {
|
|
4009
4009
|
for (let e = 1; e <= this.numberOfColumns; e++) {
|
|
@@ -4019,32 +4019,32 @@ class ni {
|
|
|
4019
4019
|
}
|
|
4020
4020
|
selectRow(e) {
|
|
4021
4021
|
const t = this.getRow(e);
|
|
4022
|
-
t && (this.selectedRow = e, t.classList.add(
|
|
4022
|
+
t && (this.selectedRow = e, t.classList.add(Pt));
|
|
4023
4023
|
}
|
|
4024
4024
|
unselectRow() {
|
|
4025
4025
|
if (this.selectedRow <= 0) return;
|
|
4026
|
-
const e = this.table.querySelector(`.${
|
|
4027
|
-
e && e.classList.remove(
|
|
4026
|
+
const e = this.table.querySelector(`.${Pt}`);
|
|
4027
|
+
e && e.classList.remove(Pt), this.selectedRow = 0;
|
|
4028
4028
|
}
|
|
4029
4029
|
selectColumn(e) {
|
|
4030
4030
|
for (let t = 1; t <= this.numberOfRows; t++) {
|
|
4031
4031
|
const n = this.getCell(t, e);
|
|
4032
|
-
n && n.classList.add(
|
|
4032
|
+
n && n.classList.add(zt);
|
|
4033
4033
|
}
|
|
4034
4034
|
this.selectedColumn = e;
|
|
4035
4035
|
}
|
|
4036
4036
|
unselectColumn() {
|
|
4037
4037
|
if (this.selectedColumn <= 0) return;
|
|
4038
|
-
let e = this.table.querySelectorAll(`.${
|
|
4038
|
+
let e = this.table.querySelectorAll(`.${zt}`);
|
|
4039
4039
|
Array.from(e).forEach((t) => {
|
|
4040
|
-
t.classList.remove(
|
|
4040
|
+
t.classList.remove(zt);
|
|
4041
4041
|
}), this.selectedColumn = 0;
|
|
4042
4042
|
}
|
|
4043
4043
|
getHoveredCell(e) {
|
|
4044
4044
|
let t = this.hoveredRow, n = this.hoveredColumn;
|
|
4045
4045
|
const { width: s, height: a, x: c, y: g } = function(A, R) {
|
|
4046
|
-
const H = A.getBoundingClientRect(), { width: B, height:
|
|
4047
|
-
return { width: B, height:
|
|
4046
|
+
const H = A.getBoundingClientRect(), { width: B, height: X, x: ie, y: de } = H, { clientX: fe, clientY: q } = R;
|
|
4047
|
+
return { width: B, height: X, x: fe - ie, y: q - de };
|
|
4048
4048
|
}(this.table, e);
|
|
4049
4049
|
if (c >= 0) {
|
|
4050
4050
|
const A = ({ fromLeftBorder: H }) => c < H, R = ({ fromRightBorder: H }) => c > s - H;
|
|
@@ -4058,14 +4058,14 @@ class ni {
|
|
|
4058
4058
|
return { row: C, column: E, deltaXCell: b, deltaYCell: M };
|
|
4059
4059
|
}
|
|
4060
4060
|
getMousePositionRelateToCell(e, t, n, s) {
|
|
4061
|
-
const a = this.getCell(e, t), { fromTopBorder: c, fromLeftBorder: g } =
|
|
4061
|
+
const a = this.getCell(e, t), { fromTopBorder: c, fromLeftBorder: g } = Dt(this.table, a);
|
|
4062
4062
|
return { deltaXCell: n - g, deltaYCell: s - c };
|
|
4063
4063
|
}
|
|
4064
4064
|
binSearch(e, t, n, s) {
|
|
4065
4065
|
let a, c = 0, g = e + 1, C = 0;
|
|
4066
4066
|
for (; c < g - 1 && C < 10; ) {
|
|
4067
4067
|
a = Math.ceil((c + g) / 2);
|
|
4068
|
-
const E = t(a), b =
|
|
4068
|
+
const E = t(a), b = Dt(this.table, E);
|
|
4069
4069
|
if (n(b)) g = a;
|
|
4070
4070
|
else {
|
|
4071
4071
|
if (!s(b)) break;
|
|
@@ -4078,7 +4078,7 @@ class ni {
|
|
|
4078
4078
|
getData() {
|
|
4079
4079
|
const e = [];
|
|
4080
4080
|
for (let t = 1; t <= this.numberOfRows; t++) {
|
|
4081
|
-
const n = this.table.querySelector(`.${
|
|
4081
|
+
const n = this.table.querySelector(`.${ot}:nth-child(${t})`), s = Array.from(n.querySelectorAll(`.${at}`));
|
|
4082
4082
|
s.every((a) => !a.textContent.trim()) || e.push(s.map((a) => a.innerHTML));
|
|
4083
4083
|
}
|
|
4084
4084
|
return e;
|
|
@@ -4087,7 +4087,7 @@ class ni {
|
|
|
4087
4087
|
document.removeEventListener("click", this.documentClicked);
|
|
4088
4088
|
}
|
|
4089
4089
|
}
|
|
4090
|
-
class
|
|
4090
|
+
class si {
|
|
4091
4091
|
static get isReadOnlySupported() {
|
|
4092
4092
|
return !0;
|
|
4093
4093
|
}
|
|
@@ -4101,7 +4101,7 @@ class ii {
|
|
|
4101
4101
|
return { icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M10 5V18.5"/><path stroke="currentColor" stroke-width="2" d="M5 10H19"/><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/></svg>', title: "Table" };
|
|
4102
4102
|
}
|
|
4103
4103
|
render() {
|
|
4104
|
-
return this.table = new
|
|
4104
|
+
return this.table = new ii(this.readOnly, this.api, this.data, this.config), this.container = He("div", this.api.styles.block), this.container.appendChild(this.table.getWrapper()), this.table.setHeadingsSetting(this.data.withHeadings), this.container;
|
|
4105
4105
|
}
|
|
4106
4106
|
renderSettings() {
|
|
4107
4107
|
return [{ label: this.api.i18n.t("With headings"), icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M5 10H19"/><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/></svg>', isActive: this.data.withHeadings, closeOnActivate: !0, toggle: !0, hint: { title: this.api.i18n.t("With headings") }, onActivate: () => {
|
|
@@ -4138,7 +4138,7 @@ function gt(_, e = null, t = {}) {
|
|
|
4138
4138
|
return n;
|
|
4139
4139
|
}
|
|
4140
4140
|
var Lt = ((_) => (_.Empty = "empty", _.Uploading = "uploading", _.Filled = "filled", _))(Lt || {});
|
|
4141
|
-
class
|
|
4141
|
+
class ri {
|
|
4142
4142
|
constructor({ api: e, config: t, onSelectFile: n, readOnly: s }) {
|
|
4143
4143
|
this.api = e, this.config = t, this.onSelectFile = n, this.readOnly = s, this.nodes = { wrapper: gt("div", [this.CSS.baseClass, this.CSS.wrapper]), imageContainer: gt("div", [this.CSS.imageContainer]), fileButton: this.createFileButton(), imageEl: void 0, imagePreloader: gt("div", this.CSS.imagePreloader), caption: gt("div", [this.CSS.input, this.CSS.caption], { contentEditable: !this.readOnly }) }, this.nodes.caption.dataset.placeholder = this.config.captionPlaceholder, this.nodes.imageContainer.appendChild(this.nodes.imagePreloader), this.nodes.wrapper.appendChild(this.nodes.imageContainer), this.nodes.wrapper.appendChild(this.nodes.caption), this.nodes.wrapper.appendChild(this.nodes.fileButton);
|
|
4144
4144
|
}
|
|
@@ -4176,12 +4176,12 @@ class si {
|
|
|
4176
4176
|
createFileButton() {
|
|
4177
4177
|
var t;
|
|
4178
4178
|
const e = gt("div", [this.CSS.button]);
|
|
4179
|
-
return e.innerHTML = (t = this.config.buttonContent) != null ? t : `${
|
|
4179
|
+
return e.innerHTML = (t = this.config.buttonContent) != null ? t : `${bn} ${this.api.i18n.t("Select an Image")}`, e.addEventListener("click", () => {
|
|
4180
4180
|
this.onSelectFile();
|
|
4181
4181
|
}), e;
|
|
4182
4182
|
}
|
|
4183
4183
|
}
|
|
4184
|
-
class
|
|
4184
|
+
class oi {
|
|
4185
4185
|
constructor({ config: e, onUpload: t, onError: n }) {
|
|
4186
4186
|
this.config = e, this.onUpload = t, this.onError = n;
|
|
4187
4187
|
}
|
|
@@ -4189,24 +4189,24 @@ class ri {
|
|
|
4189
4189
|
var H;
|
|
4190
4190
|
let n = "", s = "";
|
|
4191
4191
|
const a = await function(B = {}) {
|
|
4192
|
-
let
|
|
4192
|
+
let X = !0;
|
|
4193
4193
|
return new Promise((ie, de) => {
|
|
4194
4194
|
let fe = document.createElement("INPUT");
|
|
4195
4195
|
fe.type = "file", B.multiple && fe.setAttribute("multiple", "multiple"), B.accept && fe.setAttribute("accept", B.accept), fe.style.display = "none", document.body.appendChild(fe), fe.addEventListener("change", (q) => {
|
|
4196
|
-
|
|
4196
|
+
X = !1;
|
|
4197
4197
|
const ye = q.target.files;
|
|
4198
4198
|
ie(ye), document.body.removeChild(fe);
|
|
4199
4199
|
}, !1), window.addEventListener("focus", () => {
|
|
4200
4200
|
setTimeout(() => {
|
|
4201
|
-
|
|
4201
|
+
X && ie([]);
|
|
4202
4202
|
}, 1e3);
|
|
4203
4203
|
}, { once: !0 }), fe.click();
|
|
4204
4204
|
});
|
|
4205
4205
|
}({ accept: (H = this.config.types) != null ? H : "image/*" });
|
|
4206
4206
|
if (!(a && a.length > 0)) return void t();
|
|
4207
4207
|
(function(B) {
|
|
4208
|
-
const
|
|
4209
|
-
|
|
4208
|
+
const X = new FileReader();
|
|
4209
|
+
X.readAsDataURL(B), X.onload = (ie) => {
|
|
4210
4210
|
e(ie.target.result);
|
|
4211
4211
|
};
|
|
4212
4212
|
})(a[0]);
|
|
@@ -4215,8 +4215,8 @@ class ri {
|
|
|
4215
4215
|
if (!g.includes(E.toLowerCase())) return void this.onError("文件类型不支持");
|
|
4216
4216
|
let b = {};
|
|
4217
4217
|
if (this.config.tokenInfo) {
|
|
4218
|
-
const B = this.config.tokenInfo.token,
|
|
4219
|
-
B &&
|
|
4218
|
+
const B = this.config.tokenInfo.token, X = this.config.tokenInfo.tokenName, ie = this.config.tokenInfo.tokenPrefix;
|
|
4219
|
+
B && X && (b[X] = ie + " " + B);
|
|
4220
4220
|
}
|
|
4221
4221
|
b["Content-Type"] = "application/json";
|
|
4222
4222
|
const M = Et.create({ timeout: 18e5, headers: b }), A = await M.post(this.config.endpoints.byFile, { fileName: c.name, contentType: c.type });
|
|
@@ -4224,8 +4224,8 @@ class ri {
|
|
|
4224
4224
|
const R = A.data;
|
|
4225
4225
|
if (!R.success) return void this.onError(R.message);
|
|
4226
4226
|
n = R.data.cdn, n && !n.endsWith && (n += "/"), s = R.data.objectKey, Et.create({ timeout: 18e5, headers: { "Content-Type": c.type } }).put(R.data.presignedUrl, c).then((B) => {
|
|
4227
|
-
let
|
|
4228
|
-
|
|
4227
|
+
let X = {};
|
|
4228
|
+
X = B.status === 200 ? { success: 1, file: { url: n + s } } : { success: 0, message: B.statusText }, this.onUpload(X);
|
|
4229
4229
|
}).catch((B) => {
|
|
4230
4230
|
this.onError(B);
|
|
4231
4231
|
});
|
|
@@ -4268,10 +4268,10 @@ class ri {
|
|
|
4268
4268
|
});
|
|
4269
4269
|
}
|
|
4270
4270
|
}
|
|
4271
|
-
class
|
|
4271
|
+
class Nt {
|
|
4272
4272
|
constructor({ data: e, config: t, api: n, readOnly: s, block: a }) {
|
|
4273
4273
|
var c;
|
|
4274
|
-
this.isCaptionEnabled = null, this.api = n, this.block = a, this.config = { endpoints: t.endpoints, additionalRequestData: t.additionalRequestData, additionalRequestHeaders: t.additionalRequestHeaders, field: t.field, types: t.types, captionPlaceholder: this.api.i18n.t((c = t.captionPlaceholder) != null ? c : "Caption"), buttonContent: t.buttonContent, uploader: t.uploader, actions: t.actions, features: t.features || {}, tokenInfo: t.tokenInfo }, this.uploader = new
|
|
4274
|
+
this.isCaptionEnabled = null, this.api = n, this.block = a, this.config = { endpoints: t.endpoints, additionalRequestData: t.additionalRequestData, additionalRequestHeaders: t.additionalRequestHeaders, field: t.field, types: t.types, captionPlaceholder: this.api.i18n.t((c = t.captionPlaceholder) != null ? c : "Caption"), buttonContent: t.buttonContent, uploader: t.uploader, actions: t.actions, features: t.features || {}, tokenInfo: t.tokenInfo }, this.uploader = new oi({ config: this.config, onUpload: (g) => this.onUpload(g), onError: (g) => this.uploadingFailed(g) }), this.ui = new ri({ api: n, config: this.config, onSelectFile: () => {
|
|
4275
4275
|
this.uploader.uploadSelectedFile({ onPreview: (g) => {
|
|
4276
4276
|
this.ui.showPreloader(g);
|
|
4277
4277
|
}, noSelectedFile: () => {
|
|
@@ -4289,7 +4289,7 @@ class Rt {
|
|
|
4289
4289
|
return !0;
|
|
4290
4290
|
}
|
|
4291
4291
|
static get toolbox() {
|
|
4292
|
-
return { icon:
|
|
4292
|
+
return { icon: bn, title: "Image" };
|
|
4293
4293
|
}
|
|
4294
4294
|
static get tunes() {
|
|
4295
4295
|
return [{ name: "withBorder", icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18.9919 9.5H19.0015"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.5 5H14.5096"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M14.625 5H15C17.2091 5 19 6.79086 19 9V9.375"/><path stroke="currentColor" stroke-width="2" d="M9.375 5L9 5C6.79086 5 5 6.79086 5 9V9.375"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.3725 5H9.38207"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 9.5H5.00957"/><path stroke="currentColor" stroke-width="2" d="M9.375 19H9C6.79086 19 5 17.2091 5 15V14.625"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.3725 19H9.38207"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 14.55H5.00957"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 13V16M16 19V16M19 16H16M16 16H13"/></svg>', title: "With border", toggle: !0 }, { name: "stretched", icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 9L20 12L17 15"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14 12H20"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 9L4 12L7 15"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 12H10"/></svg>', title: "Stretch image", toggle: !0 }, { name: "withBackground", icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 19V19C9.13623 19 8.20435 19 7.46927 18.6955C6.48915 18.2895 5.71046 17.5108 5.30448 16.5307C5 15.7956 5 14.8638 5 13V12C5 9.19108 5 7.78661 5.67412 6.77772C5.96596 6.34096 6.34096 5.96596 6.77772 5.67412C7.78661 5 9.19108 5 12 5H13.5C14.8956 5 15.5933 5 16.1611 5.17224C17.4395 5.56004 18.44 6.56046 18.8278 7.83886C19 8.40666 19 9.10444 19 10.5V10.5"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 13V16M16 19V16M19 16H16M16 16H13"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6.5 17.5L17.5 6.5"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18.9919 10.5H19.0015"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.9919 19H11.0015"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13L13 5"/></svg>', title: "With background", toggle: !0 }];
|
|
@@ -4307,8 +4307,8 @@ class Rt {
|
|
|
4307
4307
|
}
|
|
4308
4308
|
renderSettings() {
|
|
4309
4309
|
var a;
|
|
4310
|
-
const e =
|
|
4311
|
-
((a = this.config.features) == null ? void 0 : a.caption) === "optional" && e.push({ name: "caption", icon:
|
|
4310
|
+
const e = Nt.tunes.concat(this.config.actions || []), t = { border: "withBorder", background: "withBackground", stretch: "stretched", caption: "caption" };
|
|
4311
|
+
((a = this.config.features) == null ? void 0 : a.caption) === "optional" && e.push({ name: "caption", icon: Sn, title: "With caption", toggle: !0 });
|
|
4312
4312
|
const n = e.filter((c) => {
|
|
4313
4313
|
var C, E;
|
|
4314
4314
|
const g = Object.keys(t).find((b) => t[b] === c.name);
|
|
@@ -4351,7 +4351,7 @@ class Rt {
|
|
|
4351
4351
|
}
|
|
4352
4352
|
set data(e) {
|
|
4353
4353
|
var t;
|
|
4354
|
-
this.image = e.file, this._data.caption = e.caption || "", this.ui.fillCaption(this._data.caption),
|
|
4354
|
+
this.image = e.file, this._data.caption = e.caption || "", this.ui.fillCaption(this._data.caption), Nt.tunes.forEach(({ name: n }) => {
|
|
4355
4355
|
const s = e[n] !== void 0 && (e[n] === !0 || e[n] === "true");
|
|
4356
4356
|
this.setTune(n, s);
|
|
4357
4357
|
}), (e.caption || ((t = this.config.features) == null ? void 0 : t.caption) === !0) && this.setTune("caption", !0);
|
|
@@ -4387,7 +4387,7 @@ class Rt {
|
|
|
4387
4387
|
this.ui.showPreloader(e), this.uploader.uploadByUrl(e);
|
|
4388
4388
|
}
|
|
4389
4389
|
}
|
|
4390
|
-
class
|
|
4390
|
+
class ai {
|
|
4391
4391
|
constructor({ api: e, data: t, config: n, block: s }) {
|
|
4392
4392
|
var a, c, g, C, E, b, M, A, R;
|
|
4393
4393
|
this.settings = [], this.api = e, this.block = s, this.data = { floatLeft: (a = t == null ? void 0 : t.floatLeft) != null ? a : !1, floatRight: (c = t == null ? void 0 : t.floatRight) != null ? c : !1, center: (g = t == null ? void 0 : t.center) != null ? g : !1, sizeSmall: (C = t == null ? void 0 : t.sizeSmall) != null ? C : !1, sizeMiddle: (E = t == null ? void 0 : t.sizeMiddle) != null ? E : !1, sizeLarge: (b = t == null ? void 0 : t.sizeLarge) != null ? b : !1, resize: (A = (M = t == null ? void 0 : t.resize) != null ? M : n == null ? void 0 : n.resize) != null ? A : !1, resizeSize: (R = t == null ? void 0 : t.resizeSize) != null ? R : 0 }, this.wrapper = void 0, this.buttons = [], this.styles = { settingsButton: "cdx-settings-button", settingsButtonActive: "cdx-settings-button--active", settingsButtonModifier: "", settingsButtonModifierActive: "" };
|
|
@@ -4532,13 +4532,13 @@ class oi {
|
|
|
4532
4532
|
this.setTune(e);
|
|
4533
4533
|
}
|
|
4534
4534
|
}
|
|
4535
|
-
class
|
|
4535
|
+
class ct {
|
|
4536
4536
|
constructor(e, t) {
|
|
4537
4537
|
this.styleTypeClass = { bold: "cel-inline-bold", italic: "cel-inline-italic", code: "cel-inline-code", underline: "cel-inline-underline", color: "cel-inline-color", mark: "cel-inline-mark", link: "cel-inline-link", strikethrough: "cel-inline-strikethrough" }, this.saveSel = null, this.type = e, this.tag = e == "link" ? "A" : "SPAN", this.rangy = t;
|
|
4538
4538
|
const n = t.modules.ClassApplier;
|
|
4539
4539
|
if (t.supported && n && n.supported) {
|
|
4540
|
-
const s = { elementTagName: this.tag, ignoreWhiteSpace: !0, applyToEditableOnly: !0, tagNames: [
|
|
4541
|
-
this.applier = t.createClassApplier(this.styleTypeClass[this.type], s);
|
|
4540
|
+
const s = { elementTagName: this.tag, ignoreWhiteSpace: !0, applyToEditableOnly: !0, tagNames: ["a", "span"], normalize: !0, useExistingElements: e != "link" };
|
|
4541
|
+
this.applier = t.createClassApplier(this.styleTypeClass[this.type], s), this.fakeBackgroundApplier = t.createClassApplier("cel-fake-background", { elementTagName: "span", tagNames: ["span"], normalize: !1, useExistingElements: !1 });
|
|
4542
4542
|
}
|
|
4543
4543
|
}
|
|
4544
4544
|
surround() {
|
|
@@ -4552,10 +4552,7 @@ class nt {
|
|
|
4552
4552
|
}
|
|
4553
4553
|
fakeBackground(e = !1) {
|
|
4554
4554
|
const t = this.rangy.modules.ClassApplier;
|
|
4555
|
-
|
|
4556
|
-
const n = { elementTagName: "span", tagNames: ["span"], normalize: !1, useExistingElements: !1 }, s = this.rangy.createClassApplier("cel-fake-background", n);
|
|
4557
|
-
e ? s.undoToSelection() : s.applyToSelection();
|
|
4558
|
-
}
|
|
4555
|
+
this.rangy.supported && t && t.supported && (e ? this.fakeBackgroundApplier.undoToSelection() : this.fakeBackgroundApplier.applyToSelection());
|
|
4559
4556
|
}
|
|
4560
4557
|
wrapByPropertys(e) {
|
|
4561
4558
|
const t = this.rangy.modules.ClassApplier;
|
|
@@ -4571,28 +4568,6 @@ class nt {
|
|
|
4571
4568
|
this.rangy.createClassApplier(this.styleTypeClass[this.type], n).undoToSelection();
|
|
4572
4569
|
}
|
|
4573
4570
|
}
|
|
4574
|
-
wrapColor(e, t) {
|
|
4575
|
-
const n = this.rangy.modules.ClassApplier;
|
|
4576
|
-
if (this.rangy.supported && n && n.supported) {
|
|
4577
|
-
const s = { elementTagName: this.tag, ignoreWhiteSpace: !0, applyToEditableOnly: !0, tagNames: [this.tag], normalize: !0, useExistingElements: !1 };
|
|
4578
|
-
this.rangy.createClassApplier(e, s).applyToSelection();
|
|
4579
|
-
}
|
|
4580
|
-
}
|
|
4581
|
-
unWrapColorAll(e) {
|
|
4582
|
-
const t = { elementTagName: this.tag, ignoreWhiteSpace: !0, applyToEditableOnly: !0, tagNames: [this.tag], normalize: !0, useExistingElements: !1 };
|
|
4583
|
-
for (let [n, s] of Object.entries(e))
|
|
4584
|
-
n !== "none" && this.rangy.createClassApplier(s, t).undoToSelection();
|
|
4585
|
-
}
|
|
4586
|
-
findStateColor(e) {
|
|
4587
|
-
let t = "";
|
|
4588
|
-
const n = { elementTagName: this.tag, ignoreWhiteSpace: !0, applyToEditableOnly: !0, tagNames: [this.tag], normalize: !0, useExistingElements: !1 };
|
|
4589
|
-
for (let [s, a] of Object.entries(e))
|
|
4590
|
-
if (this.rangy.createClassApplier(a, n).isAppliedToSelection()) {
|
|
4591
|
-
t = a;
|
|
4592
|
-
break;
|
|
4593
|
-
}
|
|
4594
|
-
return t;
|
|
4595
|
-
}
|
|
4596
4571
|
checkState() {
|
|
4597
4572
|
return this.applier.isAppliedToSelection();
|
|
4598
4573
|
}
|
|
@@ -4610,10 +4585,13 @@ class nt {
|
|
|
4610
4585
|
removeAllRanges() {
|
|
4611
4586
|
this.rangy.removeAllRanges();
|
|
4612
4587
|
}
|
|
4588
|
+
getSaveSel() {
|
|
4589
|
+
return this.saveSel;
|
|
4590
|
+
}
|
|
4613
4591
|
}
|
|
4614
|
-
class
|
|
4592
|
+
class li {
|
|
4615
4593
|
constructor({ api: e, config: t }) {
|
|
4616
|
-
this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new
|
|
4594
|
+
this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new ct("bold", t.rangy);
|
|
4617
4595
|
}
|
|
4618
4596
|
static get isInline() {
|
|
4619
4597
|
return !0;
|
|
@@ -4636,9 +4614,9 @@ class ai {
|
|
|
4636
4614
|
return "CMD+B";
|
|
4637
4615
|
}
|
|
4638
4616
|
}
|
|
4639
|
-
class
|
|
4617
|
+
class ci {
|
|
4640
4618
|
constructor({ api: e, config: t }) {
|
|
4641
|
-
this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new
|
|
4619
|
+
this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new ct("strikethrough", t.rangy);
|
|
4642
4620
|
}
|
|
4643
4621
|
static get isInline() {
|
|
4644
4622
|
return !0;
|
|
@@ -4661,9 +4639,9 @@ class li {
|
|
|
4661
4639
|
return "CMD+SHIFT+X";
|
|
4662
4640
|
}
|
|
4663
4641
|
}
|
|
4664
|
-
class
|
|
4642
|
+
class di {
|
|
4665
4643
|
constructor({ api: e, config: t }) {
|
|
4666
|
-
this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new
|
|
4644
|
+
this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new ct("italic", t.rangy);
|
|
4667
4645
|
}
|
|
4668
4646
|
static get isInline() {
|
|
4669
4647
|
return !0;
|
|
@@ -4686,9 +4664,9 @@ class ci {
|
|
|
4686
4664
|
return "CMD+I";
|
|
4687
4665
|
}
|
|
4688
4666
|
}
|
|
4689
|
-
class
|
|
4667
|
+
class hi {
|
|
4690
4668
|
constructor({ api: e, config: t }) {
|
|
4691
|
-
this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new
|
|
4669
|
+
this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new ct("code", t.rangy);
|
|
4692
4670
|
}
|
|
4693
4671
|
static get isInline() {
|
|
4694
4672
|
return !0;
|
|
@@ -4711,9 +4689,9 @@ class di {
|
|
|
4711
4689
|
return "CMD+SHIFT+C";
|
|
4712
4690
|
}
|
|
4713
4691
|
}
|
|
4714
|
-
class
|
|
4692
|
+
class ui {
|
|
4715
4693
|
constructor({ api: e, config: t }) {
|
|
4716
|
-
this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new
|
|
4694
|
+
this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new ct("underline", t.rangy);
|
|
4717
4695
|
}
|
|
4718
4696
|
static get isInline() {
|
|
4719
4697
|
return !0;
|
|
@@ -4736,9 +4714,9 @@ class hi {
|
|
|
4736
4714
|
return "CMD+U";
|
|
4737
4715
|
}
|
|
4738
4716
|
}
|
|
4739
|
-
class
|
|
4717
|
+
class pi {
|
|
4740
4718
|
constructor({ api: e, config: t }) {
|
|
4741
|
-
this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new
|
|
4719
|
+
this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new ct("mark", t.rangy);
|
|
4742
4720
|
}
|
|
4743
4721
|
static get isInline() {
|
|
4744
4722
|
return !0;
|
|
@@ -4758,35 +4736,39 @@ class ui {
|
|
|
4758
4736
|
return { span: { class: !0 } };
|
|
4759
4737
|
}
|
|
4760
4738
|
}
|
|
4761
|
-
class
|
|
4739
|
+
class gi {
|
|
4762
4740
|
constructor({ api: e, config: t }) {
|
|
4763
|
-
this.
|
|
4741
|
+
this.ENTER_KEY = 13, this.inputOpened = !1, this.button = null, this.input = null, this.okbtn = null, this.toolbar = e.toolbar, this.inlineToolbar = e.inlineToolbar, this.i18n = e.i18n, this.selection = new xt(), this.iconClasses = { base: e.styles.inlineToolButton, active: e.styles.inlineToolButtonActive }, this.inlineToolUtils = new ct("link", t.rangy);
|
|
4764
4742
|
}
|
|
4765
4743
|
static get isInline() {
|
|
4766
4744
|
return !0;
|
|
4767
4745
|
}
|
|
4768
4746
|
render() {
|
|
4769
|
-
|
|
4747
|
+
var t;
|
|
4748
|
+
this.button = document.createElement("button"), this.button.setAttribute("type", "button"), this.button.classList.add(this.iconClasses.base), this.button.innerHTML = sn;
|
|
4749
|
+
const e = this.inlineToolUtils.checkState();
|
|
4750
|
+
return (t = this.button) == null || t.classList.toggle(this.iconClasses.active, e), this.button.innerHTML = e ? Tn : sn, this.button;
|
|
4770
4751
|
}
|
|
4771
4752
|
renderActions() {
|
|
4772
|
-
const e =
|
|
4773
|
-
return e
|
|
4774
|
-
|
|
4775
|
-
}), this.input.addEventListener("input", (
|
|
4776
|
-
var
|
|
4777
|
-
const
|
|
4778
|
-
if (
|
|
4779
|
-
const
|
|
4780
|
-
this.okbtn && (this.validateURL(
|
|
4753
|
+
const e = document.createElement("div");
|
|
4754
|
+
return e.classList.add("cel-inline-link-input-wrap"), this.input = document.createElement("input"), this.input.placeholder = this.i18n.t("Add a link"), this.input.enterKeyHint = "done", this.input.classList.add("cel-inline-link-input"), this.input.setAttribute("name", "link"), this.input.addEventListener("keydown", (t) => {
|
|
4755
|
+
t.keyCode === this.ENTER_KEY && this.enterPressed(t);
|
|
4756
|
+
}), this.input.addEventListener("input", (t) => {
|
|
4757
|
+
var s;
|
|
4758
|
+
const n = t.target;
|
|
4759
|
+
if (n) {
|
|
4760
|
+
const a = n.value;
|
|
4761
|
+
this.okbtn && (this.validateURL(a) ? (this.okbtn.classList.remove("disabled"), this.okbtn.disabled = !1) : ((s = this.okbtn) == null || s.classList.add("disabled"), this.okbtn.disabled = !0));
|
|
4781
4762
|
}
|
|
4782
|
-
}),
|
|
4783
|
-
this.enterPressed(
|
|
4784
|
-
}),
|
|
4763
|
+
}), e.appendChild(this.input), this.okbtn = document.createElement("button"), this.okbtn.type = "button", this.okbtn.innerText = this.i18n.t("Save"), this.okbtn.classList.add("cel-inline-link-input-btn"), this.okbtn.classList.add("disabled"), this.okbtn.disabled = !0, this.okbtn.addEventListener("click", (t) => {
|
|
4764
|
+
this.enterPressed(t);
|
|
4765
|
+
}), e.appendChild(this.okbtn), e;
|
|
4785
4766
|
}
|
|
4786
4767
|
enterPressed(e) {
|
|
4787
4768
|
var n;
|
|
4788
4769
|
let t = ((n = this.input) == null ? void 0 : n.value) || "";
|
|
4789
|
-
t.trim()
|
|
4770
|
+
if (!t.trim()) return this.selection.restore(), e.preventDefault(), void this.closeActions();
|
|
4771
|
+
this.validateURL(t) && (t = this.prepareLink(t), this.selection.restore(), this.selection.removeFakeBackground(), this.insertLink(t), e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), this.selection.collapseToEnd(), this.inlineToolbar.close());
|
|
4790
4772
|
}
|
|
4791
4773
|
prepareLink(e) {
|
|
4792
4774
|
return e = e.trim(), e = this.addProtocol(e);
|
|
@@ -4800,28 +4782,30 @@ class pi {
|
|
|
4800
4782
|
return !!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$", "i").test(e);
|
|
4801
4783
|
}
|
|
4802
4784
|
surround(e) {
|
|
4803
|
-
if (this.inlineToolUtils.checkState()) {
|
|
4785
|
+
if (e && (this.inputOpened ? (this.selection.restore(), this.selection.removeFakeBackground()) : (this.selection.setFakeBackground(), this.selection.save()), this.inlineToolUtils.checkState())) {
|
|
4804
4786
|
const t = this.inlineToolUtils.getSelfOrAncestorWithClass(e);
|
|
4805
4787
|
if (t && t.tagName == "A") {
|
|
4806
4788
|
const n = t.getAttribute("href");
|
|
4807
|
-
this.
|
|
4789
|
+
this.unlink(n);
|
|
4808
4790
|
}
|
|
4809
|
-
|
|
4791
|
+
return this.closeActions(), void this.toolbar.close();
|
|
4792
|
+
}
|
|
4793
|
+
this.toggleActions();
|
|
4794
|
+
}
|
|
4795
|
+
toggleActions() {
|
|
4796
|
+
this.inputOpened ? this.closeActions(!1) : this.openActions(!0);
|
|
4810
4797
|
}
|
|
4811
4798
|
openActions(e = !1) {
|
|
4812
4799
|
var t;
|
|
4813
4800
|
e && ((t = this.input) == null || t.focus()), this.inputOpened = !0;
|
|
4814
4801
|
}
|
|
4815
|
-
closeActions() {
|
|
4816
|
-
var t;
|
|
4817
|
-
if (!this.inputOpened) return;
|
|
4818
|
-
const e = this.rangy.saveSelection();
|
|
4819
|
-
this.isFakeBackgroundEnabled && (this.inlineToolUtils.restoreSelection(), this.inlineToolUtils.fakeBackground(!0)), (t = this.input) == null || t.setAttribute("value", ""), this.inputOpened = !1, this.rangy.restoreSelection(e), this.rangy.getSelection().removeAllRanges();
|
|
4820
|
-
}
|
|
4821
|
-
checkState() {
|
|
4802
|
+
closeActions(e = !0) {
|
|
4822
4803
|
var t;
|
|
4823
|
-
|
|
4824
|
-
|
|
4804
|
+
if (this.selection.isFakeBackgroundEnabled) {
|
|
4805
|
+
const n = new xt();
|
|
4806
|
+
n.save(), this.selection.restore(), this.selection.removeFakeBackground(), n.restore();
|
|
4807
|
+
}
|
|
4808
|
+
(t = this.input) == null || t.setAttribute("value", ""), e && this.selection.clearSaved(), this.inputOpened = !1;
|
|
4825
4809
|
}
|
|
4826
4810
|
static get sanitize() {
|
|
4827
4811
|
return { a: { class: !0, href: !0, target: !0 } };
|
|
@@ -4832,18 +4816,28 @@ class pi {
|
|
|
4832
4816
|
clear() {
|
|
4833
4817
|
this.closeActions();
|
|
4834
4818
|
}
|
|
4819
|
+
insertLink(e) {
|
|
4820
|
+
this.inlineToolUtils.wrapByPropertys({ href: e, target: "_blank" });
|
|
4821
|
+
}
|
|
4822
|
+
unlink(e) {
|
|
4823
|
+
this.inlineToolUtils.unWrapByPropertys({ href: e, target: "_blank" });
|
|
4824
|
+
}
|
|
4835
4825
|
}
|
|
4836
|
-
class
|
|
4826
|
+
class fi {
|
|
4837
4827
|
constructor({ api: e, config: t }) {
|
|
4838
|
-
this.colors = { none: "inherit", "#646a73": "cel-inline-gray-text", "#d83931": "cel-inline-pink-text", "#de7802": "cel-inline-orange-text", "#dc9b04": "cel-inline-yellow-text", "#2ea121": "cel-inline-green-text", "#245bdb": "cel-inline-blue-text", "#6425d0": "cel-inline-purple-text" }, this.columns =
|
|
4828
|
+
this.button = null, this.colors = { none: "inherit", "#646a73": "cel-inline-gray-text", "#d83931": "cel-inline-pink-text", "#de7802": "cel-inline-orange-text", "#dc9b04": "cel-inline-yellow-text", "#2ea121": "cel-inline-green-text", "#245bdb": "cel-inline-blue-text", "#6425d0": "cel-inline-purple-text" }, this.columns = 3, this.colorOpened = !1, this.api = e, this.iconClasses = { base: e.styles.inlineToolButton, active: e.styles.inlineToolButtonActive }, this.rangy = t.rangy, this.selection = new xt();
|
|
4839
4829
|
}
|
|
4840
4830
|
static get isInline() {
|
|
4841
4831
|
return !0;
|
|
4842
4832
|
}
|
|
4843
4833
|
render() {
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4834
|
+
var n;
|
|
4835
|
+
this.button = document.createElement("button"), this.button.setAttribute("type", "button"), this.button.classList.add(this.iconClasses.base), this.button.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M5.24296 11.4075C5.23167 10.6253 5.52446 9.8395 6.12132 9.24264L9.65686 5.70711C10.0474 5.31658 10.6809 5.31693 11.0714 5.70745L16.0205 10.6565C16.2268 10.8629 16.3243 11.1371 16.3126 11.4075M5.24296 11.4075C5.25382 12.1607 5.54661 12.9106 6.12132 13.4853L8 15.364M5.24296 11.4075H11.9565M16.3126 11.4075C16.3022 11.6487 16.205 11.8869 16.0208 12.0711L12.4853 15.6066C11.3137 16.7782 9.41421 16.7782 8.24264 15.6066L8 15.364M16.3126 11.4075H11.9565M8 15.364L11.9565 11.4075"/><path stroke="currentColor" stroke-width="2" d="M20 17.4615C20 18.3112 19.3284 19 18.5 19C17.6716 19 17 18.3112 17 17.4615C17 16.6119 17.9 15.6154 18.5 15C19.1 15.6154 20 16.6119 20 17.4615Z"/></svg>', this.button.addEventListener("mousedown", (s) => {
|
|
4836
|
+
s.preventDefault();
|
|
4837
|
+
});
|
|
4838
|
+
const e = this.findStateColor();
|
|
4839
|
+
let t = !1;
|
|
4840
|
+
return e && e !== "" && (t = !0), (n = this.button) == null || n.classList.toggle(this.iconClasses.active, t), this.button;
|
|
4847
4841
|
}
|
|
4848
4842
|
renderActions() {
|
|
4849
4843
|
const e = document.createElement("div");
|
|
@@ -4851,33 +4845,59 @@ class gi {
|
|
|
4851
4845
|
for (let [t, n] of Object.entries(this.colors)) {
|
|
4852
4846
|
const s = document.createElement("div");
|
|
4853
4847
|
this.api.tooltip.onHover(s, this.api.i18n.t(t)), s.classList.add("editorjs__color-selector__container-item"), s.style.backgroundColor = t, t == "none" && s.classList.add("editorjs__color-selector__container-item-none"), s.onclick = (a) => {
|
|
4854
|
-
this.
|
|
4855
|
-
const c = a.currentTarget.classList.contains("editorjs__color-selector__container-item-none");
|
|
4856
|
-
this.inlineToolUtils.unWrapColorAll(this.colors), c || this.inlineToolUtils.wrapColor(n, this.lastRange);
|
|
4848
|
+
this.selection.restore(), this.unWrapColorAll(), a.currentTarget.classList.contains("editorjs__color-selector__container-item-none") || this.wrapColor(n), a.preventDefault(), a.stopPropagation(), a.stopImmediatePropagation();
|
|
4857
4849
|
}, e.append(s);
|
|
4858
4850
|
}
|
|
4859
4851
|
return e.addEventListener("click", (t) => {
|
|
4860
|
-
t.stopPropagation(), t.
|
|
4852
|
+
t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation();
|
|
4861
4853
|
}), e;
|
|
4862
4854
|
}
|
|
4863
4855
|
surround(e) {
|
|
4864
|
-
this.
|
|
4856
|
+
e && (this.colorOpened ? this.selection.restore() : this.selection.save()), this.toggleActions();
|
|
4865
4857
|
}
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4858
|
+
toggleActions() {
|
|
4859
|
+
this.colorOpened ? this.closeActions(!1) : this.openActions(!0);
|
|
4860
|
+
}
|
|
4861
|
+
openActions(e = !1) {
|
|
4862
|
+
this.colorOpened = !0;
|
|
4863
|
+
}
|
|
4864
|
+
closeActions(e = !0) {
|
|
4865
|
+
const t = new xt();
|
|
4866
|
+
t.save(), this.selection.restore(), t.restore(), e && this.selection.clearSaved(), this.colorOpened = !1;
|
|
4867
|
+
}
|
|
4868
|
+
findStateColor() {
|
|
4869
|
+
let e = "";
|
|
4870
|
+
const t = { elementTagName: "span", ignoreWhiteSpace: !0, applyToEditableOnly: !0, tagNames: ["span"], normalize: !0, useExistingElements: !1 };
|
|
4871
|
+
for (let [, n] of Object.entries(this.colors))
|
|
4872
|
+
if (this.rangy.createClassApplier(n, t).isAppliedToSelection()) {
|
|
4873
|
+
e = n;
|
|
4874
|
+
break;
|
|
4875
|
+
}
|
|
4876
|
+
return e;
|
|
4872
4877
|
}
|
|
4873
4878
|
static get sanitize() {
|
|
4874
4879
|
return { span: { class: !0, style: !0 } };
|
|
4875
4880
|
}
|
|
4881
|
+
wrapColor(e) {
|
|
4882
|
+
const t = this.rangy.modules.ClassApplier;
|
|
4883
|
+
if (this.rangy.supported && t && t.supported) {
|
|
4884
|
+
const n = { elementTagName: "span", ignoreWhiteSpace: !0, applyToEditableOnly: !0, tagNames: ["span"], normalize: !0, useExistingElements: !1 };
|
|
4885
|
+
this.rangy.createClassApplier(e, n).applyToSelection();
|
|
4886
|
+
}
|
|
4887
|
+
}
|
|
4888
|
+
unWrapColorAll() {
|
|
4889
|
+
const e = this.rangy.modules.ClassApplier;
|
|
4890
|
+
if (this.rangy.supported && e && e.supported) {
|
|
4891
|
+
const t = { elementTagName: "span", ignoreWhiteSpace: !0, applyToEditableOnly: !0, tagNames: ["span"], normalize: !0, useExistingElements: !1 };
|
|
4892
|
+
for (let [n, s] of Object.entries(this.colors))
|
|
4893
|
+
n !== "none" && this.rangy.createClassApplier(s, t).undoToSelection();
|
|
4894
|
+
}
|
|
4895
|
+
}
|
|
4876
4896
|
}
|
|
4877
|
-
const
|
|
4878
|
-
let n =
|
|
4879
|
-
n =
|
|
4880
|
-
return H.createModule("SaveRestore", ["WrappedSelection"], function(B,
|
|
4897
|
+
const mi = { class: "ebl-editor", id: "holder" }, vi = Rn({ name: "EblEditor", inheritAttrs: !1, __name: "Editor", props: { readOnly: { type: Boolean, default: !1 }, placeholder: { default: "Enter something" }, data: { default: () => ({ blocks: [] }) }, locale: { default: {} }, tokenInfo: { default: { token: "", tokenName: "Authorization", tokenPrefix: "Bearer" } } }, emits: ["onReady", "onChange"], setup(_, { expose: e, emit: t }) {
|
|
4898
|
+
let n = Fn();
|
|
4899
|
+
n = Un(n), n = function(H) {
|
|
4900
|
+
return H.createModule("SaveRestore", ["WrappedSelection"], function(B, X) {
|
|
4881
4901
|
var ie = B.dom, de = ie.removeNode, fe = B.Selection.isDirectionBackward;
|
|
4882
4902
|
function q(V, re) {
|
|
4883
4903
|
return (re || document).getElementById(V);
|
|
@@ -4888,7 +4908,7 @@ const fi = { class: "ebl-editor", id: "holder" }, mi = xn({ name: "EblEditor", i
|
|
|
4888
4908
|
}
|
|
4889
4909
|
function $e(V, re, Q, ae) {
|
|
4890
4910
|
var le = q(Q, V);
|
|
4891
|
-
le ? (re[ae ? "setStartBefore" : "setEndBefore"](le), de(le)) :
|
|
4911
|
+
le ? (re[ae ? "setStartBefore" : "setEndBefore"](le), de(le)) : X.warn("Marker element has been removed. Cannot restore selection.");
|
|
4892
4912
|
}
|
|
4893
4913
|
function Ae(V, re) {
|
|
4894
4914
|
return re.compareBoundaryPoints(V.START_TO_START, V);
|
|
@@ -4909,7 +4929,7 @@ const fi = { class: "ebl-editor", id: "holder" }, mi = xn({ name: "EblEditor", i
|
|
|
4909
4929
|
le.style.display = "inline";
|
|
4910
4930
|
var ve = le.previousSibling;
|
|
4911
4931
|
ve && ve.nodeType == 3 ? (de(le), ae.collapseToPoint(ve, ve.length)) : (ae.collapseBefore(le), de(le));
|
|
4912
|
-
} else
|
|
4932
|
+
} else X.warn("Marker element has been removed. Cannot restore selection.");
|
|
4913
4933
|
} else $e(Q, ae, V.startMarkerId, !0), $e(Q, ae, V.endMarkerId, !1);
|
|
4914
4934
|
return re && ae.normalizeBoundaries(), ae;
|
|
4915
4935
|
}
|
|
@@ -4929,7 +4949,7 @@ const fi = { class: "ebl-editor", id: "holder" }, mi = xn({ name: "EblEditor", i
|
|
|
4929
4949
|
Q && de(Q);
|
|
4930
4950
|
}
|
|
4931
4951
|
B.util.extend(B, { saveRange: Be, restoreRange: Ye, saveRanges: Oe, restoreRanges: _e, saveSelection: function(V) {
|
|
4932
|
-
if (!B.isSelectionValid(V)) return
|
|
4952
|
+
if (!B.isSelectionValid(V)) return X.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."), null;
|
|
4933
4953
|
var re = B.getSelection(V), Q = re.getAllRanges(), ae = Q.length == 1 && re.isBackward(), le = Oe(Q, ae);
|
|
4934
4954
|
return ae ? re.setSingleRange(Q[0], ae) : re.setRanges(Q), { win: V, rangeInfos: le, restored: !1 };
|
|
4935
4955
|
}, restoreSelection: function(V, re) {
|
|
@@ -4942,19 +4962,19 @@ const fi = { class: "ebl-editor", id: "holder" }, mi = xn({ name: "EblEditor", i
|
|
|
4942
4962
|
} });
|
|
4943
4963
|
}), H;
|
|
4944
4964
|
}(n);
|
|
4945
|
-
const s =
|
|
4965
|
+
const s = Nn("EblEditorSettings");
|
|
4946
4966
|
let a = t;
|
|
4947
4967
|
const c = _;
|
|
4948
4968
|
let g = { blocks: [] }, C = null, E = null;
|
|
4949
4969
|
const b = ["indent", "blockAlignment"], M = ["linkTool", "boldTool", "strikethrough", "italicTool", "inlineCode", "underline", "Color", "marker"];
|
|
4950
|
-
|
|
4951
|
-
n.init(), C = new
|
|
4970
|
+
An(() => {
|
|
4971
|
+
n.init(), C = new Hn({ minHeight: 300, holder: "holder", autofocus: !0, defaultBlock: "paragraph", placeholder: c.placeholder, tunes: b, tools: { linkTool: { class: gi, config: { rangy: n }, shortcut: "CMD+K" }, boldTool: { class: li, config: { rangy: n }, shortcut: "CMD+B" }, strikethrough: { class: ci, config: { rangy: n }, shortcut: "CMD+SHIFT+X" }, italicTool: { class: di, config: { rangy: n }, shortcut: "CMD+I" }, inlineCode: { class: hi, config: { rangy: n }, shortcut: "CMD+SHIFT+C" }, underline: { class: ui, config: { rangy: n }, shortcut: "CMD+U" }, Color: { class: fi, config: { rangy: n } }, marker: { class: pi, config: { rangy: n } }, indent: { class: $t }, alert: { class: et, inlineToolbar: M }, List: { class: Rt, inlineToolbar: M, config: { defaultStyle: "checklist", maxLevel: 4 } }, h1: { class: Vn, inlineToolbar: M }, h2: { class: Kn, inlineToolbar: M }, h3: { class: Yn, inlineToolbar: M }, h4: { class: Gn, inlineToolbar: M }, h5: { class: Xn, inlineToolbar: M }, h6: { class: Qn, inlineToolbar: M }, paragraph: { class: Vt, inlineToolbar: M }, blockAlignment: { class: qt, inlineToolbar: !1 }, code: { tunes: [], class: St, config: { lang: "javascript", theme: "github-dark-dimmed" } }, quote: { tunes: ["blockAlignment"], class: Zn, inlineToolbar: M }, delimiter: Jn, table: { class: si, inlineToolbar: M, config: { rows: 2, cols: 3 } }, image: { class: Nt, inlineToolbar: !1, tunes: b.concat(["imageResize"]), config: { types: ".png,.jpeg,.jpg,.gif,.webp", tokenInfo: c.tokenInfo, endpoints: { byFile: s == null ? void 0 : s.fileUploadEndpoint }, features: { caption: !1, stretch: !1, border: !1, background: !1 } } }, imageResize: { class: ai, config: { resize: !0, crop: !1 } } }, readOnly: c.readOnly, i18n: c.locale, onChange: (H, B) => {
|
|
4952
4972
|
a("onChange", H, B);
|
|
4953
4973
|
}, onReady: () => {
|
|
4954
|
-
new
|
|
4955
|
-
} }), g =
|
|
4974
|
+
new jn("holder", c.readOnly, C, "1px solid #999"), new $n("holder", c.readOnly), new qn("holder", c.readOnly, C), c.data && c.data.blocks && c.data.blocks.length > 0 && (E = new ti({ editor: C, config: { debounceTimer: 200, maxLength: 100 }, onUpdate: () => {
|
|
4975
|
+
} }), g = Ot(c.data), E.initialize(g), R(g)), a("onReady");
|
|
4956
4976
|
} });
|
|
4957
|
-
}),
|
|
4977
|
+
}), _n(() => {
|
|
4958
4978
|
C !== null && (C.destroy(), C = null);
|
|
4959
4979
|
});
|
|
4960
4980
|
let A = !1;
|
|
@@ -4965,32 +4985,32 @@ const fi = { class: "ebl-editor", id: "holder" }, mi = xn({ name: "EblEditor", i
|
|
|
4965
4985
|
});
|
|
4966
4986
|
}));
|
|
4967
4987
|
}
|
|
4968
|
-
return
|
|
4969
|
-
H && H.blocks && H.blocks.length !== 0 && (g =
|
|
4988
|
+
return Mn(() => c.data, (H, B) => {
|
|
4989
|
+
H && H.blocks && H.blocks.length !== 0 && (g = Ot(H), R(Ot(H)), E != null && (E.clear(), E.initialize(g)));
|
|
4970
4990
|
}, { deep: !0 }), e({ validate: function() {
|
|
4971
4991
|
return new Promise((H, B) => {
|
|
4972
4992
|
if (C === null) return H(!1);
|
|
4973
|
-
C.save().then((
|
|
4993
|
+
C.save().then((X) => X.blocks.length > 0 ? H(!0) : H(!1));
|
|
4974
4994
|
});
|
|
4975
4995
|
}, getData: function() {
|
|
4976
4996
|
return new Promise((H, B) => {
|
|
4977
4997
|
if (C === null) return H(null);
|
|
4978
|
-
C.save().then((
|
|
4998
|
+
C.save().then((X) => H(X));
|
|
4979
4999
|
});
|
|
4980
|
-
} }), (H, B) => (
|
|
4981
|
-
} }),
|
|
4982
|
-
let
|
|
4983
|
-
for (let _ in
|
|
4984
|
-
const e =
|
|
4985
|
-
|
|
5000
|
+
} }), (H, B) => (In(), On("div", mi));
|
|
5001
|
+
} }), yn = [vi];
|
|
5002
|
+
let En = [];
|
|
5003
|
+
for (let _ in yn) {
|
|
5004
|
+
const e = Wn(yn[_]);
|
|
5005
|
+
En.push(e);
|
|
4986
5006
|
}
|
|
4987
|
-
const
|
|
4988
|
-
e[
|
|
4989
|
-
} }))(
|
|
5007
|
+
const Ti = { messages: { ui: { blockTunes: { toggler: { "Click to tune": "可拖拽和点击" } }, toolbar: { toolbox: { Add: "添加", Filter: "过滤", "Nothing found": "无内容" }, popover: { Filter: "过滤", "Nothing found": "无内容" } }, popover: { Filter: "筛选", "Nothing found": "未找到任何内容", "Convert to": "转化为", "Add below": "在下方插入" } }, toolNames: { Text: "段落", H1: "一级标题", H2: "二级标题", H3: "三级标题", H4: "四级标题", H5: "五级标题", H6: "六级标题", "Ordered List": "有序列表", "Unordered List": "无序列表", Checklist: "任务列表", Quote: "引用", Code: "代码块", Delimiter: "分割线", Link: "链接", LinkTool: "链接", Bold: "加粗", BoldTool: "粗体", Italic: "倾斜", ItalicTool: "斜体", Alert: "高亮块", indent: "缩进", Marker: "文本高亮", Color: "文本颜色", Underline: "下划线", InlineCode: "行内代码", Table: "表格", Image: "图片", Strikethrough: "删除线" }, tools: { image: { "Couldn’t upload image. Please try another.": "上传图片失败,请稍后重试。" }, table: { "Add row above": "在上面插入行", "Add row below": "在下面插入行", "Delete row": "删除行", "Add column to left": "在左边插入列", "Add column to right": "在右边插入列", "Delete column": "删除列", "With headings": "使用标题行", "Without headings": "不使用标题行" }, marker: { Marker: "突出显示" }, linkTool: { "Add a link": "添加链接", Save: "确定", "Pasted link is not valid.": "链接地址无效" }, List: { Unordered: "无序", Ordered: "有序", Checklist: "任务列表", "Counter type": "计数器类型", Numeric: "阿拉伯数字", "Lower Roman": "小写罗马数字", "Upper Roman": "大写罗马数字", "Lower Alpha": "小写字母", "Upper Alpha": "大写字母", "Start with": "开始序号" }, paragraph: { "Enter something": "请输入内容" }, stub: { "The block can not be displayed correctly.": "该模块不能放置在这里" }, code: { "Enter your code": "输入代码", Copied: "已复制", "Unable to copy": "复制失败" }, convertTo: { "Convert to": "转化为" }, alert: { "alert-primary": "主要样式", "alert-secondary": "次要样式", "alert-info": "信息", "alert-success": "成功", "alert-warning": "警告", "alert-danger": "危险", "alert-light": "浅色", "alert-dark": "深色", "align-left": "左对齐", "align-center": "居中", "align-right": "右对齐", "Type here...": "输入内容" }, Color: { "#646a73": "灰色", "#d83931": "红色", "#de7802": "橙色", "#dc9b04": "黄色", "#2ea121": "绿色", "#245bdb": "蓝色", "#6425d0": "紫色", none: "恢复默认" } }, blockTunes: { delete: { Delete: "删除", "Click to delete": "点击删除" }, moveUp: { "Move up": "向上移" }, moveDown: { "Move down": "向下移" }, filter: { Filter: "过滤" }, blockAlignment: { "left align": "左对齐", "center align": "居中对齐", "right align": "右对齐", "justify align": "两端对齐" }, indent: { "Indent right": "向右缩进", "Indent left": "向左缩进" } } } }, Ln = /* @__PURE__ */ ((_ = []) => ({ version: "2.31.55", install: (e, t) => {
|
|
5008
|
+
e[Yt] || (e[Yt] = !0, _.forEach((n) => e.use(n)), e.provide("EblEditorSettings", t));
|
|
5009
|
+
} }))(En), Ei = Ln.install, Li = Ln.version;
|
|
4990
5010
|
export {
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
5011
|
+
vi as EblEditor,
|
|
5012
|
+
Ln as default,
|
|
5013
|
+
Ei as install,
|
|
5014
|
+
Li as version,
|
|
5015
|
+
Ti as zhCn
|
|
4996
5016
|
};
|