From 6be9ffb79b0da7c628bd2a0cebc0acfce5fd5a52 Mon Sep 17 00:00:00 2001 From: droguljic Date: Wed, 16 Jun 2021 11:35:31 +0200 Subject: [PATCH] Add image uploader plugin Image uploader plugin allows to upload images from local machine by utilizing Tailor storage service and Jodit uploader module. Inside local example the uploader module will insert images as Base64 data URLs. Toolbar image popup now hosts two tabs, `Upload` and `URL`. --- bili.config.js | 3 + dist/server/index.js | 55 + dist/tce-jodit.css | 4 +- dist/tce-jodit.es.js | 274 +- dist/tce-jodit.js | 277 +- dist/tce-jodit.umd.js | 15115 ++++++++++++++++----- dist/tce-jodit.umd.min.js | 2 +- dist/tce-jodit.umd.min.js.map | 2 +- package-lock.json | 321 +- package.json | 2 + src/edit/Editor.vue | 117 +- src/edit/index.vue | 48 +- src/edit/plugins/image-uploader/index.js | 88 + src/server/index.js | 55 + 14 files changed, 13035 insertions(+), 3328 deletions(-) create mode 100644 dist/server/index.js create mode 100644 src/edit/plugins/image-uploader/index.js create mode 100644 src/server/index.js diff --git a/bili.config.js b/bili.config.js index fdf56d1..7d53e7f 100644 --- a/bili.config.js +++ b/bili.config.js @@ -32,6 +32,9 @@ module.exports = { { find: '@', replacement: path.resolve(__dirname, './src') } ] }, + copy: { + targets: [{ src: 'src/server', dest: 'dist' }] + }, visualizer: { sourceMap: true, open: false diff --git a/dist/server/index.js b/dist/server/index.js new file mode 100644 index 0000000..0d92665 --- /dev/null +++ b/dist/server/index.js @@ -0,0 +1,55 @@ +'use strict'; + +const uniqBy = require('lodash/uniqBy'); + +function hasUploads(element) { + return Array.isArray(element.data.uploads) && element.data.uploads.length; +} + +function getContentReplaceArgs(upload, isLoading) { + return isLoading + ? [new RegExp(upload.key, 'gi'), upload.publicUrl] + : [ + new RegExp( + `(src\\s*=\\s*["'“”‘’])https?://\\b[^\\s]+${upload.key}[^\\s]*\\b(["'“”‘’])`, + 'gi' + ), + `$1${upload.key}$2` + ]; +} + +function adjustContent(content, uploads, isLoading = false) { + return content && uploads + .filter(upload => upload.key && upload.publicUrl) + .reduce( + (acc, upload) => acc.replace(...getContentReplaceArgs(upload, isLoading)), + content + ); +} + +function processUploads(element, { storage }) { + if (!hasUploads(element)) return element; + const uniqueUploads = uniqBy(element.data.uploads, 'key'); + element.data.content = adjustContent(element.data.content, uniqueUploads); + element.data.uploads = uniqueUploads.map(upload => { + delete upload.publicUrl; + return upload; + }); + return element; +} + +async function resolveUploads(element, { storage, storageProxy }) { + if (!hasUploads(element)) return element; + const { content, uploads } = element.data; + await Promise.all(uploads.map(async upload => { + if (!(await storage.fileExists(upload.key))) return; + upload.publicUrl = await storageProxy.getFileUrl(upload.key); + })); + element.data.content = adjustContent(content, uploads, true); + return element; +} + +module.exports = { + beforeSave: processUploads, + afterLoaded: resolveUploads +}; diff --git a/dist/tce-jodit.css b/dist/tce-jodit.css index 47b5c30..a6cf464 100644 --- a/dist/tce-jodit.css +++ b/dist/tce-jodit.css @@ -7,5 +7,5 @@ */ .jodit-wysiwyg{outline:0}.jodit-wysiwyg::-moz-selection, .jodit-wysiwyg ::-moz-selection{background:#b5d6fd;color:#4c4c4c}.jodit-wysiwyg::selection,.jodit-wysiwyg ::selection{background:#b5d6fd;color:#4c4c4c}.jodit-container:not(.jodit_inline) .jodit-wysiwyg{margin:0;outline:0;overflow-x:auto;padding:8px;position:relative}.jodit-container:not(.jodit_inline) .jodit-wysiwyg img{max-width:100%;position:relative}.jodit-container:not(.jodit_inline) .jodit-wysiwyg jodit-media{position:relative}.jodit-container:not(.jodit_inline) .jodit-wysiwyg jodit-media *{position:relative;z-index:0}.jodit-container:not(.jodit_inline) .jodit-wysiwyg jodit-media:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:1}.jodit-form{color:#4c4c4c;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px}.jodit-form.jodit_error{border-color:#ff3b3b;-webkit-box-shadow:inset 0 0 3px 0 hsla(0,0%,74%,.3);box-shadow:inset 0 0 3px 0 hsla(0,0%,74%,.3)}@media (max-width:768px){.jodit-form{min-width:150px}}.jodit-form button{background:#d6d6d6;border:none;color:#4c4c4c;cursor:pointer;font-size:16px;height:36px;line-height:1;margin-bottom:8px;margin-top:8px;outline:none;padding:8px;text-decoration:none;-webkit-transition:background .2s ease 0s;-o-transition:background .2s ease 0s;transition:background .2s ease 0s}.jodit-form button:hover{background-color:#ecebe9;color:#4c4c4c}.jodit-form button:active{background:#ecebe9;color:#4c4c4c}.jodit-form label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:8px;text-align:left;white-space:nowrap}.jodit-form label:last-child{margin-bottom:0}.jodit-form .jodit-form__center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit .jodit-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:1px solid #dadada;border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;height:32px;line-height:32px;outline:none;padding:0 8px;width:100%}.jodit .jodit-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:1px solid #dadada;border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;height:32px;line-height:32px;outline:none;padding:0 8px;width:100%}.jodit .jodit-textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:1px solid #dadada;border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;height:32px;line-height:32px;outline:none;padding:0 8px;width:100%}.jodit .jodit-input[disabled]{background-color:#f0f0f0;color:#dadada}.jodit .jodit-select[disabled]{background-color:#f0f0f0;color:#dadada}.jodit .jodit-textarea[disabled]{background-color:#f0f0f0;color:#dadada}.jodit .jodit-input_has-error_true{border-color:#ff3b3b}.jodit .jodit-select_has-error_true{border-color:#ff3b3b}.jodit .jodit-textarea_has-error_true{border-color:#ff3b3b}.jodit .jodit-input:focus{border-color:#66afe9;outline:0}.jodit-checkbox{border:0;cursor:pointer;height:16px;margin:0 calc(8px/2) 0 0;outline:none;padding:0;position:relative;width:16px;z-index:2}.jodit-select{background-image:url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0Ljk1IDEwIj48ZGVmcz48c3R5bGU+LmNscy0ye2ZpbGw6IzQ0NH08L3N0eWxlPjwvZGVmcz48cGF0aCBzdHlsZT0iZmlsbDojZmZmIiBkPSJNMCAwaDQuOTV2MTBIMHoiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Im0xLjQxIDQuNjcgMS4wNy0xLjQ5IDEuMDYgMS40OUgxLjQxek0zLjU0IDUuMzMgMi40OCA2LjgyIDEuNDEgNS4zM2gyLjEzeiIvPjwvc3ZnPg==);background-position:98% 50%;background-repeat:no-repeat;padding-right:calc(8px*2)}.jodit-textarea{height:auto}.jodit-form__group{min-width:180px}.jodit-textarea{min-width:180px}.jodit-form__group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.jodit-form__group{margin-bottom:8px}.jodit-form__group>label{margin-bottom:8px}.jodit-button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#dadada;border:0;border-radius:.25rem;color:#4c4c4c;cursor:pointer;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:calc(8px*4);-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;line-height:1;margin:0;padding:0 8px;position:relative;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:auto}.jodit-button svg{display:inline-block;height:24px;width:24px}.jodit-button svg+span{margin-left:calc(8px/2)}.jodit-button:active,.jodit-button:focus{outline:0}.jodit-button.disabled{opacity:.7}.jodit-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:8px}.jodit-button .jodit_icon,.jodit-button svg,.jodit-dialog__header .jodit_icon,.jodit-dialog__header svg{display:inline-block;height:16px;vertical-align:middle;width:16px}.jodi-switcher{display:inline-block;height:32px;position:relative;width:60px}.jodi-switcher input{height:0;opacity:0;width:0}.jodi-switcher__slider{background-color:#dadada;border-radius:undefined;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;-webkit-transition:.4s;-o-transition:.4s;transition:.4s}.jodi-switcher__slider:before{background-color:#fff;border-radius:50%;bottom:undefined;content:"";height:undefined;left:undefined;position:absolute;-webkit-transition:.4s;-o-transition:.4s;transition:.4s;width:undefined}input:checked+.jodi-switcher__slider{background-color:#2196f3}input:checked+.jodi-switcher__slider:before{-webkit-transform:undefined;-ms-transform:undefined;transform:undefined}input:focus+.jodi-switcher__slider{-webkit-box-shadow:0 0 1px #2196f3;box-shadow:0 0 1px #2196f3}.jodit-button-group{display:-webkit-box;display:-ms-flexbox;display:flex}.jodit-button-group input{display:none}.jodit-button-group button{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.jodit-button-group button+button{margin-left:-1px}.jodit-button-group button:first-child,.jodit-button-group input:first-child+button{border-bottom-right-radius:0;border-right:0;border-top-right-radius:0}.jodit-button-group button:last-child,.jodit-button-group input:last-child+button{border-bottom-left-radius:0;border-left:0;border-top-left-radius:0}.jodit-button-group input[type=checkbox]:checked+button,.jodit-button-group input[type=checkbox]:not(:checked)+button+button{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.3),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.3),0 1px 2px rgba(0,0,0,.05)}.jodit_text_icons .jodit_icon{font-size:14px;width:auto}.jodit_text_icons .jodit_icon:first-letter{text-transform:uppercase}.jodit_text_icons .jodit-tabs .jodit-tabs__buttons>a{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;width:auto}.jodit_text_icons .jodit-tabs .jodit-tabs__buttons>a i{width:auto}.jodit_text_icons.jodit-dialog .jodit-button{color:rgba(0,0,0,0.75);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;padding:8px;width:auto}.jodit_text_icons.jodit-dialog .jodit-dialog__header a{color:rgba(0,0,0,0.75);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;padding:8px;width:auto}.jodit_text_icons.jodit-dialog .jodit-button .jodit_icon,.jodit_text_icons.jodit-dialog .jodit-dialog__header a .jodit_icon{width:auto}.jodit-grid{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}.jodit-grid.jodit-grid_column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}@media (max-width:480px){.jodit-grid.jodit-grid_xs-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.jodit-grid [class*=jodit_col-]{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.jodit-grid .jodit_col-lg-5-5{width:100%}.jodit-grid .jodit_col-lg-4-5{width:80%}.jodit-grid .jodit_col-lg-3-5{width:60%}.jodit-grid .jodit_col-lg-2-5{width:40%}.jodit-grid .jodit_col-lg-1-5{width:20%}.jodit-grid .jodit_col-lg-4-4{width:100%}.jodit-grid .jodit_col-lg-3-4{width:75%}.jodit-grid .jodit_col-lg-2-4{width:50%}.jodit-grid .jodit_col-lg-1-4{width:25%}@media (max-width:992px){.jodit-grid .jodit_col-md-5-5{width:100%}.jodit-grid .jodit_col-md-4-5{width:80%}.jodit-grid .jodit_col-md-3-5{width:60%}.jodit-grid .jodit_col-md-2-5{width:40%}.jodit-grid .jodit_col-md-1-5{width:20%}.jodit-grid .jodit_col-md-4-4{width:100%}.jodit-grid .jodit_col-md-3-4{width:75%}.jodit-grid .jodit_col-md-2-4{width:50%}.jodit-grid .jodit_col-md-1-4{width:25%}}@media (max-width:768px){.jodit-grid .jodit_col-sm-5-5{width:100%}.jodit-grid .jodit_col-sm-4-5{width:80%}.jodit-grid .jodit_col-sm-3-5{width:60%}.jodit-grid .jodit_col-sm-2-5{width:40%}.jodit-grid .jodit_col-sm-1-5{width:20%}.jodit-grid .jodit_col-sm-4-4{width:100%}.jodit-grid .jodit_col-sm-3-4{width:75%}.jodit-grid .jodit_col-sm-2-4{width:50%}.jodit-grid .jodit_col-sm-1-4{width:25%}}@media (max-width:480px){.jodit-grid .jodit_col-xs-5-5{width:100%}.jodit-grid .jodit_col-xs-4-5{width:80%}.jodit-grid .jodit_col-xs-3-5{width:60%}.jodit-grid .jodit_col-xs-2-5{width:40%}.jodit-grid .jodit_col-xs-1-5{width:20%}.jodit-grid .jodit_col-xs-4-4{width:100%}.jodit-grid .jodit_col-xs-3-4{width:75%}.jodit-grid .jodit_col-xs-2-4{width:50%}.jodit-grid .jodit_col-xs-1-4{width:25%}}@-webkit-keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.jodit-icon_loader{-webkit-animation:a 2s ease-out 0s infinite;animation:a 2s ease-out 0s infinite;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAABRsSURBVHja7F1/aJfVGn/33RgUg8FiNfK2WCykyS7GLoYyUbwYipZMumgLo+iPS9HlXhSHkRXdislESxMz0mapuaFo2myjkfnNlTQ2FJdTu8NvLVcrdbpcfGvxrfs823m/vXt3fjznvOedzr0PPJzzPe+7d+97Ps95nuc851fGAw884CD98ccfI1Jqmc3UpEyQz4FkMqRTgYshn8fymZ57SyGbzf5mENIOz9+ngE9Atg/SLkhPQHoWeEDn3SmpSZlJnvf7ypUrTpb7IyMjY+gGN6WWmaY84l2T3c+u58D1csjOgvwsyBdBvsDRo2zgMl/ZNM59vcAJ4Dj8nzikLa5QmBLv28YCfPd3li7gPHBMwKdcEwhCJgN6FoLOWJtUgiWovALG04FXsbI44xbgw8AplbaU/Q+ZQNgGf0gA/JWhC1aQyle1eN91rPRKKKuEsjzZvSph0m2RiutpIYRrfZC8B+l7kB6jgq0CnQIy9X39v2NYQW5FeUFQlQVN/aALyiYBPw/5M5B+Dvw02vMggqcDukEl57F3xHf9H747+4bA5oD6dzqaYEgAqIDbBl9RhvZ4H/B5yL+IDp3oXhmwNkm3lTLn80VIz+O3QFqm2/rHwgeI6QDOa006LZ3Q4lHNNwK3AVeYAD4WgmHQUivYNzWyb7xufICYaavXVbuKZ6MXfwRVJ+TnXW+Am/oMnNaO3/Y5pPitcyh/a6LqtXwAt+J01LVFEzAJ0jpIj7JunJYd1wHchnBQHUSC3Uan8WPgPVgHlBiBCcAkH4Da2i2DjwGZlcy5W0K17zLwVb9NgaY4iJpawJs+BCnWwUo3SKXT4oOAP8IHCFsIfMCguj8JaQ2kOaaA227d10ALuIR1gHVxErjctPtHBd8btSR3A4MIgSePAZxqVPeQlthq7ZRuZVABCVkLuGkJpGgKsY4ybfUEVO84qhsoAzSgrUfHZ1UQVe99B6o2oMYdwg7latAq5iROGoueQExW6UE0gCe/ANIh9SZ6jqkWsN3STZ0rHWEgpkNmEvILxqQbSAXaAPxqSBswQkbpbpo6fGPR0m3GBYjBIIwqNjCTEAr4wkBQUA0AjKNrdZCu0okAqgQhTKCDhFxV91BNgsDuYx3WQZptG3xtDUCJEDKvthGuLVEJlq4gUMyAylfQERadPrhKOHTmB3Ces4RFEXNsgW8UClbZcEhxqPQIpHOord2k1ZsAH4YvYNJXN3EgWX4Ocw4LbIEvDQSJfADJtULWxSuj+BBUP4DaC6D0DkyFg6JKTVo/5brvXqzbo2zSi3af3/9bGgrW1Ar5kH4MXEzVHEHVf5CuYZC4fti9AoI/gXX8Eda5Tp9f9I4xWWsnOoc5zNMv1okjmKp/vzay3epNJ4+YmALdoWBPWTHksc5zTU1AekqYt7LcWTruTYTZQdmQHoB0GuXv/de8L8e7xrsuA8kPNtx3AZIOxp3APc7wvD6kvi+//DLh3nvPPfegWs1jf4dBGGxpOA+hlOXzgw7VBjEBnDKcs4jzDOZDOmjqD2SJQFGBx9JaSOcQ7xVO2RIJhf86AfB+Z3huHs7Ra2pra+ugtubTp0+jMLgC0e6/ftddd6EgzMO5iGwSaq4NITCdLczy6GzXAj8KnDIxAaM0AKeViwCtgbRSNgGUJwQyDaACngO4w6S/CXgb8KEvvvgiFUaw59y5c64mWXvnnXdmsijdYxjpdP6cXh6oS0g1Bb48zpFEzValA3663pcuXaoleSzFltBIlWhRmWx+v6yMcQJ4PU7A/Oyzz/qca0R33HEHrjlAEJa73rns24JqA0keTUGTjglIJpNOxsMPP6wLfiGkx53hxRbcewwXc1BAx0u4gGMNcP2nn36acq4juv322ytZ5K7UlhBo5LER3AvcTXU60wKgYbsyWTCi3LTV6wLvKesGrvrkk0/qneucCgoKHoJkHbxvYRAhMMij/zMbVzZRTMAvv/wycj4AoRv4Mk7oII4HkLp+vC6drwxt/FrgKeMBfKTe3t69UMFTgPG9B3WcQdMeBsvjhJJqnYGqjMrKSmr/tZxNWAi87o9i+1l5O6SPNjc3dzrjlPLz83HyC/aWpqk0gWZUUHZtJvxuUZmAtAYgtHycr/a6qIXz2DQI5OH1UDRjPIOPdOHChU6o+JmQXW+68JYS4vUB/bozvN5RGAImdwPZA3AC51RKrMAfyBHFGCRBnz4oe7ypqemgc4PQxYsX0YytuOWWW3BRaa3DWd0U1A/w/Z4KvBx4jcoExAitE6dzPStr3RR/QKQ5fOUJ4PsaGxtvGPC9dOnSJfyu+7ALa9MJFPx+lkU05YNBBDVdg0uwKc4eAWCZ83cC8jM+/PDDLucGpr6+Pvy+GWz/ASs9AMFvd7ax1ATEFOBjmLdSBraN3gBwHHhmQ0NDrzMB6PLly73MUYubOs3EiB/GJebyTEB6QogCnGrV6KAFR7AVeP4HH3ww4EwgunLlCn7vfACi1UQDqMb5PWUvm5qAB3HESXNomKz2GaOHv/DAgQNJZwJSf38/fvdC3J5G1iPQnf3jK5sGvx80MQHP69hxHWZ/2wN8//vvv3/BmcD0008/XWCaoEcUJ6C0eoUWeFbXBOBCzTKKJ2/YExgEXrRv374eJyLn6tWrWA+LAJRBy+o/rQUQUx0TsFwzRKzLK/bu3dseQf8nDQwMYH2sCOL0ibx9Vr6cagIKmf0nxe8pguC7vn/Pnj2bIshH088//4z1st+m+veUI6ZFFBOwLGj/XqIh0O4/HkEtJgDmcZ4/EED9e69VKk0ACoDN1u/jqrq6uv4IZjElk0msnypbwPs0wTKVCUBnYbLuMC5REA7v3r37vQhikhBgPTWrTAEFeB9NZt3C0SbAr/6DdPM4jF7/PyNotUzBU26vgAo8x+7zri3jmgAgnOJdKYrVB9QEb+zcubMrgpVOv/76K9bXGzrACwTJfw1D+9k8EzAXOE8GviEPAK+JIDXSAlhvA7yWTWztvMfiXM65PBNQrgLfUBi2v/vuu70RnPo0ODjYC0BtN3D2VNfLR5gAz04eRn17yb0p4A0RlIEI6y+la/MV1xf4fYACSEtDiP031dbWRrY/AP32229dAGCTrs1XrHHEaesFXh+gXCfooyEM2yIIrdC2ADZ/1D1eM+CagHLJ5ExTxrl9hyLsrDiDWI99EjApgPvLRwhAmQh4HV/Axwe3bt06GMEXnFKpFK4tOBgQcH95WdoEAE01nc8Xi8VEArA3gs4q7VWpfsHaCpEg4GrnoeXhOEKUw3u4yZYqbGo4Lk2KR5hZpcOsXjO9GIm0AYFycTErmoDJVLWu0Tto3bJly0CEmT36/fffkzh/UKfVE3yLkix3Xx+v5FjYaaslgiwUZxDrdbrm38guF6EAFFKAF5kEwcFPrRFcoVCrIdAiKsSlYUWqFi/zBwTXOiKsQqGOIKe1cQRmSAPkmYIv0ADY9Yuif+GYgC5Wv9kB1L6X8lAA8k3BFwhB94YNG1IRXPYJutwpINwBpNjSI/O5AhDQGUxEUIVKCRMBEGiFIQG4yX+Daf+fPacvwihUM2Czfm/KcgMLtjZZhudEY//hks2VVJlZ7tJvi5SMMApVA9gMsOVkXYvDFiO6fggFACUqJ6qKcaMBbD5uAH2AlE0fIKJxRSnUAGizcykePtWzjOo1VA2gpa0V2CVRALBbURDwQV4qiGAKVQDyLZ571JfFum0lFqTJvScvgilUytPxAxSY9boawMbD3OtFEUahaoAinQap0gA4JSzhPswSFz733HOZEVT2KZlMYr0WesGV7KpOoQRqgG6DVi4rx5EqjFWfjSCz3vqLHd9IoGyYnoBjNwpAwhBoWXlpJAChCECpv66p5ycJBCSBcwI7daZ7E83FtAiuUGgaT/WLACaYhk4MBCVk0UDKWb2c3+URVqFogOm8OqccqMW5d+Dmm29OuGsDOyw7gmUvvfRSFBCySFevXsX6LBO1cIoG8NEQ5u7KoFbLi0Kz3fODI7JGeHbwTSJADcxCq1cAWnR39yYIQUWEmVX1X2G6SYTgnhavABwL0uoF91dUV1dnR9AFp/7+fjysq0IGvIEGODYkAOwa7t/XYXl3kDzgBRF8Vgg3eczT2SqGYP97vBoA83ELrd6/WPSJCDsr6v8Jw91BRdfS6za9ewQ1qVo9RQv47plXU1NTHEFoTpcvX8aTwueJgKdoAI4wpE8Y9e4SdtgdGLK4S1gm8L8jGAO1fqy/TNmiUE1hQIwPj9AADOQk7ugRdJ9ADj+2bt26aI6AAV26dAnr7THqnsFEYTgEnBRtFl0fwk6hOcCrIjiNaBXOAKIcuq3hG4w4fTXma+lNOEHEZFs4hcA8+eqrr0a+gAZdvHgRbf+TsrMDDMxBr2v/eT7A0L5+8HN7AKdPFhncHMGqZftfB84Wga0yBwKtsN1hk4B5PsCIrd0C2HwRz924cWNlBK2afvzxx0rX89c5Qo4gCNv85bwDI7r8XUKqynfL/KmHazZt2pQbQSymH374AffuqeEB7gWXCrzHFCCmXf5niE4NWxPkJFAJ41GmtRHMUtWP9TNJdYScgQZYo3NoFEYF21WmgAq8776KzZs3Px1BPZq+//57rJcKXhg3oClo90b/qCeHvqLjA2j6B+u2bNlSFkH+J3333XdlAMo6ntq3cJroK6K4gOzgyP2oBaj2nqIdPGXYKzjw5ptvToqgd5yenh5U+Qcgmy07UdxQA7QD7xfFClSnh68Oelag6H5n+Fj6j9566638iQz++fPn8wGMRq/dV4EviwVwrq0W9QpUJsAdINof5LRQxfNLgBu2bt06IaePffvttzjDp8EZ3r6dDL7sQEkfyAdVW82rjo9H/hdkB2y2ft89eEB149tvvz2hlqh/8803OazlTzMFX6ENcKLvU7LgEMUEuIc9vqLb+inBJE8ezyo+un379gkxaPT111/jdx4FEGbJwOd1A2VdQ9896Pj1qIJDMSJI6yHpNGnpGlHFqVgp77zzzg29tjCRSBQx8KfKWrmJBvDkO4HXU3oI7pQwFUDpc/8s9ABk14uB23bs2HFDTiU7d+7cAqj4NrbESxtojeAQYjWoOnyaqwF4AsFSnDm81lT1y2YZ+cpwLmHDzp07a3bt2nVDTCrt6urKBq5hDl8eBXCTHgGjtWxTaVK8IEYFjKWrvVPIdU8VE2kMgUCsBD6ye/fukvEM/ldffVUCFX4EsitVtl3UYjU0wDHg1dQIodQJFJShKXgE0j5dLaACn6MJkKcDH6+rq6uur68fV72EM2fO5Jw9e7YasseBp5u0cKoQsDxO9Vrqqn6R2hdGAjWEoBvSR03B9wPNA95HGDVcBXxqz549D40H8E+fPo3vecoZntGTreqzmwgBRyDw2Plu3TBxxmuvvcYFUQYwy+OQ5UoV6DITQzEJnGsdbLSyfvHixdfVptSnTp2qZMJaqtsVVtWbAiP0zap498ryt956q5OxYcMGyj/gpbhbxS5IlwSJBQQYYsZVzWtREBYtWnTN9ic+efIkOq1LmM9SZDKplioQgrJ6ZpZTVODd32kBIEoZL0UvvdFdCBoUfGo8gXM0/UHgHTireeHChaFrhePHj+N0dzxqdxnwg2xwS0vD6YIvwAOnd89nvhkZeJduu+02J2Pjxo0UKZO9GM7w+cjdFMIgCmiqAXj39bO5DPFYLNY8b948ayeXtLW1lbIT1mcxzjVZUGtqCjh44Bj/34H7ZXjJhCItAAHAd1Mc0fvcPYAqCPhBhIHDF5jP0MF2QkmwE02HTMjs2bPTpqOlpSXPVeHABSwoVcLsOebzTWZH2fADOClO7ZqB3yfDTWUSUACyiHZG9UJY0SiNH7PKIjsiqt6BooegIhTMOYxHUTweN3q26EAN/wkr3t+qvEaKczbvxzoXPcf7brL/a9oNFKXYPZzpnUpGlX6dbqHIDIRNlIWXsuibbjdQkGLdzoQ0YfJ/uJFAamsndllw19HZzDlxVGFmkcqilFnSEFotnnKNOlZPGQX0lWOdzoa01xR47nCwDtBEpwbHoedj94wy0KSKCOoIQhgaQrXZgkoYdMCXPAvrcr57WITuXEHlcLCu00cQGjza7BEcRjbRAFSNQAXXVAh0zuY1BV/Q2r3pekixnz+oGRomvVtMV9Vr3I/98RXAC73LzoM4grIWb1sIxgp8iSnAOlsIKdZhynB8QG8wiKIBDPyCQ5C9F0cRKY6gDFwZ2DaFIEzwCS3e3b/nXlzKras1dFr/KA2go/5FLVRwfzdzDtfodgupZoFqGohbqIYGPsH+Yx3NxF6V7D2omkXlmMZM1T8PDMXfoUl4BruKkHaaaANbtj2MnoEJ+L6/72RdvGe8Kt9kjqBOj4SsAUyvce7BCSV/Ba6C/EBYXcSg5oIKtqkj5ikbgLSKqfwWaheRWqZ6j1gIAFPuQW2AI3lTIN0b1CSonMSwYgCU6wqQ8NunsOHcQcozVKZIVwhiKjVuMEihY0YwevgPSDG0eUy3ezjWYOsEhRRAHWPf/A93Egc1MKTj+FGEIGZhIEgJiMzPYPlmHNxgjmLTtRSCsOw+o2YWzcNvbTYIBVsVgrQGsAW+6cCSJx9nUcS/QbrfVAjCDgQZ/P1+yOM33Q9pPMizqCaAKgSxsMCntk6B2sdVyYsh/QvwC7hriY4QhCkUGi0e3/kF/AYow29pJ8YArJkAihDEwgRfVyNw8rif7X+B74Y8qs03nOGNDq0IgQ3Afff0sXecAfm72bv3UFoxpdWbtH7V32cFcfgoLcyCEKQdJ9zVHNL/AM9ijOP808MYD/CP7UvuO8ZGP+OMB3nP4T1PNfYvey/KXAPKd2XpevA27iWYANk9g8yZamblOa5A4FQtZ/jEsjybWsBTaX1sQkbcA/iACAQd0E2EQgU8RUiyKC02qGnQjS6qwPP9LQJwiLFLuUwQcBuaIiYQuBjTPc8wk/32VtYJFq104xQnmLlJMPuNNr3fUEuQQtDUVm8DeNcc/F+AAQBKd8HaIWdjwQAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;display:inline-block;height:48px;vertical-align:middle;width:48px;will-change:transform}.jodit-icon{fill:#4c4c4c;background:50% no-repeat;background-size:contain;height:14px;overflow:visible;-webkit-transform-origin:0 0!important;-ms-transform-origin:0 0!important;transform-origin:0 0!important;width:14px}.jodit-icon{stroke:#4c4c4c}.jodit-icon_close{stroke:#4c4c4c}svg.jodit-icon{height:auto;isolation:isolate}.jodit-icon_text{font-size:14px}.jodit,.jodit *,.jodit-container,.jodit-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.jodit-container .jodit-workplace,.jodit .jodit-workplace{overflow:auto;position:relative}.jodit-container .jodit-workplace .jodit-wysiwyg,.jodit-container .jodit-workplace .jodit-wysiwyg_iframe,.jodit .jodit-workplace .jodit-wysiwyg,.jodit .jodit-workplace .jodit-wysiwyg_iframe{height:100%;width:100%}.jodit-container:not(.jodit_inline){background-color:#fff;border:1px solid #dadada;border-radius:3px}.jodit-container:not(.jodit_inline) .jodit-workplace{border:0 solid #dadada;max-height:100%}.jodit-container:not(.jodit_inline).jodit_disabled{background:#dadada}.jodit-container:not(.jodit_inline).jodit_disabled .jodit-workplace{opacity:.4}.jodit_disabled{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.jodit_hidden{display:none!important}.jodit_vertical_middle{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.jodit-box{background:0 0;border:0;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;width:auto}.jodit-dialog_theme_dark .jodit-toolbar-collection_mode_horizontal:after{background-color:#6b6b6b}.jodit-dialog_theme_dark .jodit-toolbar-editor-collection_mode_horizontal:after{background-color:#6b6b6b}.jodit_theme_dark .jodit-toolbar-collection_mode_horizontal:after{background-color:#6b6b6b}.jodit_theme_dark .jodit-toolbar-editor-collection_mode_horizontal:after{background-color:#6b6b6b}.jodit-dialog_theme_dark.jodit-container{background-color:#575757}.jodit-dialog_theme_dark.jodit-container.jodit_disabled{background-color:#575757}.jodit_theme_dark.jodit-container{background-color:#575757}.jodit_theme_dark.jodit-container.jodit_disabled{background-color:#575757}.jodit-dialog_theme_dark.jodit-container:not(.jodit_inline) .jodit-workplace{border-color:#575757}.jodit_theme_dark.jodit-container:not(.jodit_inline) .jodit-workplace{border-color:#575757}.jodit-dialog_theme_dark .jodit-popup__content{background:#575757}.jodit_theme_dark .jodit-popup__content{background:#575757}.jodit-dialog_theme_dark .jodit-toolbar-button__text{color:#d1cccc}.jodit-dialog_theme_dark .jodit-ui-button__text{color:#d1cccc}.jodit_theme_dark .jodit-toolbar-button__text{color:#d1cccc}.jodit_theme_dark .jodit-ui-button__text{color:#d1cccc}.jodit-dialog_theme_dark .jodit-toolbar-button:hover:not([disabled]){background-color:#787878}.jodit-dialog_theme_dark .jodit-toolbar-button__button:hover:not([disabled]){background-color:#787878}.jodit-dialog_theme_dark .jodit-toolbar-button__trigger:hover:not([disabled]){background-color:#787878}.jodit-dialog_theme_dark .jodit-ui-button:hover:not([disabled]){background-color:#787878}.jodit-dialog_theme_dark .jodit-ui-button__button:hover:not([disabled]){background-color:#787878}.jodit-dialog_theme_dark .jodit-ui-button__trigger:hover:not([disabled]){background-color:#787878}.jodit_theme_dark .jodit-toolbar-button:hover:not([disabled]){background-color:#787878}.jodit_theme_dark .jodit-toolbar-button__button:hover:not([disabled]){background-color:#787878}.jodit_theme_dark .jodit-toolbar-button__trigger:hover:not([disabled]){background-color:#787878}.jodit_theme_dark .jodit-ui-button:hover:not([disabled]){background-color:#787878}.jodit_theme_dark .jodit-ui-button__button:hover:not([disabled]){background-color:#787878}.jodit_theme_dark .jodit-ui-button__trigger:hover:not([disabled]){background-color:#787878}.jodit-dialog_theme_dark .jodit-status-bar,.jodit_theme_dark .jodit-status-bar{background-color:rgba(95,92,92,.8);border-color:rgba(95,92,92,.8)}.jodit-dialog_theme_dark .jodit-status-bar{color:#d1cccc}.jodit-dialog_theme_dark .jodit-status-bar .jodit-status-bar__item span{color:#d1cccc}.jodit_theme_dark .jodit-status-bar{color:#d1cccc}.jodit_theme_dark .jodit-status-bar .jodit-status-bar__item span{color:#d1cccc}.jodit-dialog_theme_dark .jodit-toolbar__box:not(:empty){background:#5f5c5c}.jodit_theme_dark .jodit-toolbar__box:not(:empty){background:#5f5c5c}.jodit-dialog_theme_dark .jodit-icon{fill:silver;stroke:silver}.jodit-dialog_theme_dark .jodit-toolbar-button .jodit-toolbar-button__trigger{fill:silver;stroke:silver}.jodit-dialog_theme_dark .jodit__upload-button svg{fill:silver;stroke:silver}.jodit_theme_dark .jodit-icon{fill:silver;stroke:silver}.jodit_theme_dark .jodit-toolbar-button .jodit-toolbar-button__trigger{fill:silver;stroke:silver}.jodit_theme_dark .jodit__upload-button svg{fill:silver;stroke:silver}.jodit-dialog_theme_dark .jodit-icon-close{stroke:silver}.jodit_theme_dark .jodit-icon-close{stroke:silver}.jodit-dialog_theme_dark .jodit-wysiwyg{background-color:#575757;color:#d1cccc}.jodit-dialog_theme_dark .jodit-wysiwyg_iframe{background-color:#575757;color:#d1cccc}.jodit_theme_dark .jodit-wysiwyg{background-color:#575757;color:#d1cccc}.jodit_theme_dark .jodit-wysiwyg_iframe{background-color:#575757;color:#d1cccc}.jodit-dialog_theme_dark .jodit-form input[type=text]{background-color:rgba(81,81,81,0.41);border-color:#686767;color:#d1cccc}.jodit-dialog_theme_dark .jodit-form input[type=url]{background-color:rgba(81,81,81,0.41);border-color:#686767;color:#d1cccc}.jodit-dialog_theme_dark .jodit-form textarea{background-color:rgba(81,81,81,0.41);border-color:#686767;color:#d1cccc}.jodit_theme_dark .jodit-form input[type=text]{background-color:rgba(81,81,81,0.41);border-color:#686767;color:#d1cccc}.jodit_theme_dark .jodit-form input[type=url]{background-color:rgba(81,81,81,0.41);border-color:#686767;color:#d1cccc}.jodit_theme_dark .jodit-form textarea{background-color:rgba(81,81,81,0.41);border-color:#686767;color:#d1cccc}.jodit-dialog_theme_dark .jodit-form button{background-color:hsla(0,0%,41%,0.75);color:#d1cccc}.jodit_theme_dark .jodit-form button{background-color:hsla(0,0%,41%,0.75);color:#d1cccc}.jodit-dialog_theme_dark .jodit-placeholder{color:hsla(0,5%,81%,0.8)}.jodit_theme_dark .jodit-placeholder{color:hsla(0,5%,81%,0.8)}.jodit-dialog_theme_dark .jodit-drag-and-drop__file-box{color:#d1cccc}.jodit-dialog_theme_dark .jodit_uploadfile_button{color:#d1cccc}.jodit_theme_dark .jodit-drag-and-drop__file-box{color:#d1cccc}.jodit_theme_dark .jodit_uploadfile_button{color:#d1cccc}.jodit-dialog_theme_dark .jodit-drag-and-drop__file-box:hover{background-color:hsla(0,0%,41%,0.75)}.jodit-dialog_theme_dark .jodit_uploadfile_button:hover{background-color:hsla(0,0%,41%,0.75)}.jodit_theme_dark .jodit-drag-and-drop__file-box:hover{background-color:hsla(0,0%,41%,0.75)}.jodit_theme_dark .jodit_uploadfile_button:hover{background-color:hsla(0,0%,41%,0.75)}.jodit-dialog_theme_dark .jodit-add-new-line:before{border-top-color:#686767}.jodit_theme_dark .jodit-add-new-line:before{border-top-color:#686767}.jodit-dialog_theme_dark .jodit-add-new-line span{background:hsla(0,0%,41%,0.75);border-color:#686767}.jodit_theme_dark .jodit-add-new-line span{background:hsla(0,0%,41%,0.75);border-color:#686767}.jodit-dialog_theme_dark .jodit-add-new-line span svg{fill:#d1cccc}.jodit_theme_dark .jodit-add-new-line span svg{fill:#d1cccc}.jodit-dialog_theme_dark .jodit-resizer>i{background:hsla(0,0%,41%,0.75);border-color:silver}.jodit_theme_dark .jodit-resizer>i{background:hsla(0,0%,41%,0.75);border-color:silver}.jodit-dialog_theme_dark .jodit-input{background-color:#787878;border-color:#444;color:#444}.jodit-dialog_theme_dark .jodit-select{background-color:#787878;border-color:#444;color:#444}.jodit_theme_dark .jodit-input{background-color:#787878;border-color:#444;color:#444}.jodit_theme_dark .jodit-select{background-color:#787878;border-color:#444;color:#444}.jodit-dialog_theme_dark.jodit-dialog{background-color:#575757}.jodit_theme_dark.jodit-dialog{background-color:#575757}.jodit-dialog_theme_dark.jodit-dialog .jodit-dialog__header{border-color:#444}.jodit-dialog_theme_dark.jodit-dialog .jodit-filebrowser__files.active .jodit-filebrowser__files-item{border-color:#444}.jodit_theme_dark.jodit-dialog .jodit-dialog__header{border-color:#444}.jodit_theme_dark.jodit-dialog .jodit-filebrowser__files.active .jodit-filebrowser__files-item{border-color:#444}.jodit-dialog_theme_dark.jodit-dialog .jodit-filebrowser__files.active .jodit-filebrowser__files-item-info{background-color:#d1cccc}.jodit_theme_dark.jodit-dialog .jodit-filebrowser__files.active .jodit-filebrowser__files-item-info{background-color:#d1cccc}.jodit-ui-button-icon-text__icon{display:none}.jodit-ui-button-icon-text__icon:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.jodit-ui-button-icon-text__text{display:none}.jodit-ui-button-icon-text__text:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-ui-button-icon-text_context_menu .jodit-ui-button-icon-text__text{-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left;padding-left:8px;position:relative}.jodit-ui-button-icon-text_context_menu .jodit-ui-button-icon-text__text:before{border-left:1px solid #dadada;content:"";height:35px;left:0;position:absolute;top:calc(8px*-1)}.jodit-ui-button-icon-text__icon:not(:empty)+.jodit-ui-button-icon-text__text:not(:empty){margin-left:8px}.jodit-ui-button-icon-text__icon:empty+.jodit-ui-button-icon-text__text:not(:empty){padding:0 8px}.jodit-ui-button_clear{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:0 0;border:0;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;font-style:normal;outline:0;padding:0;position:relative;text-align:center;text-decoration:none;text-transform:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-ui-button-sizes{height:34px;min-width:34px}.jodit-ui-button-sizes .jodit-icon{height:14px;width:14px}.jodit-ui-button-sizes button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:34px;min-width:34px;padding:0}.jodit-ui-button-sizes_text-icons_true button{padding:0 8px}.jodit-ui-button-sizes_size_tiny{height:16px;min-width:16px}.jodit-ui-button-sizes_size_tiny .jodit-icon{height:8px;width:8px}.jodit-ui-button-sizes_size_tiny button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:16px;min-width:16px;padding:0}.jodit-ui-button-sizes_size_tiny_text-icons_true button{padding:0 8px}.jodit-ui-button-sizes_size_xsmall{height:22px;min-width:22px}.jodit-ui-button-sizes_size_xsmall .jodit-icon{height:10px;width:10px}.jodit-ui-button-sizes_size_xsmall button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:22px;min-width:22px;padding:0}.jodit-ui-button-sizes_size_xsmall_text-icons_true button{padding:0 8px}.jodit-ui-button-sizes_size_small{height:28px;min-width:28px}.jodit-ui-button-sizes_size_small .jodit-icon{height:12px;width:12px}.jodit-ui-button-sizes_size_small button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:28px;min-width:28px;padding:0}.jodit-ui-button-sizes_size_small_text-icons_true button{padding:0 8px}.jodit-ui-button-sizes_size_large{height:40px;min-width:40px}.jodit-ui-button-sizes_size_large .jodit-icon{height:16px;width:16px}.jodit-ui-button-sizes_size_large button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:40px;min-width:40px;padding:0}.jodit-ui-button-sizes_size_large_text-icons_true button{padding:0 8px}.jodit-ui-button-statuses_status_default{background-color:#d8d8d8;color:#212529}.jodit-ui-button-statuses_status_default svg{fill:#212529;stroke:#212529}.jodit-ui-button-statuses_status_default [disabled]{opacity:.7}.jodit-ui-button-statuses_status_default:hover:not([disabled]){background-color:#c9cdd1;color:#212529}.jodit-ui-button-statuses_status_default:hover:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-ui-button-statuses_status_default:active:not([disabled]){background-color:#dae0e5;color:#212529}.jodit-ui-button-statuses_status_default:active:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-ui-button-statuses_status_default:focus:not([disabled]){outline:1px dashed #dae0e5}.jodit-ui-button-statuses_status_primary{background-color:#007bff;color:#fff}.jodit-ui-button-statuses_status_primary svg{fill:#fff;stroke:#fff}.jodit-ui-button-statuses_status_primary [disabled]{opacity:.7}.jodit-ui-button-statuses_status_primary:hover:not([disabled]){background-color:#0069d9;color:#fff}.jodit-ui-button-statuses_status_primary:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button-statuses_status_primary:active:not([disabled]){background-color:#0062cc;color:#fff}.jodit-ui-button-statuses_status_primary:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button-statuses_status_primary:focus:not([disabled]){outline:1px dashed #0062cc}.jodit-ui-button-statuses_status_secondary{background-color:#d8d8d8;border-radius:0;color:#212529}.jodit-ui-button-statuses_status_secondary svg{fill:#212529;stroke:#212529}.jodit-ui-button-statuses_status_secondary [disabled]{opacity:.7}.jodit-ui-button-statuses_status_secondary:hover:not([disabled]){background-color:#c9cdd1;color:#212529}.jodit-ui-button-statuses_status_secondary:hover:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-ui-button-statuses_status_secondary:active:not([disabled]){background-color:#dae0e5;color:#212529}.jodit-ui-button-statuses_status_secondary:active:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-ui-button-statuses_status_secondary:focus:not([disabled]){outline:1px dashed #dae0e5}.jodit-ui-button-statuses_status_success{background-color:#28a745;color:#fff}.jodit-ui-button-statuses_status_success svg{fill:#fff;stroke:#fff}.jodit-ui-button-statuses_status_success [disabled]{opacity:.7}.jodit-ui-button-statuses_status_success:hover:not([disabled]){background-color:#218838;color:#fff}.jodit-ui-button-statuses_status_success:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button-statuses_status_success:active:not([disabled]){background-color:#1e7e34;color:#fff}.jodit-ui-button-statuses_status_success:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button-statuses_status_success:focus:not([disabled]){outline:1px dashed #1e7e34}.jodit-ui-button-statuses_status_danger{background-color:#dc3545;color:#fff}.jodit-ui-button-statuses_status_danger svg{fill:#fff;stroke:#fff}.jodit-ui-button-statuses_status_danger [disabled]{opacity:.7}.jodit-ui-button-statuses_status_danger:hover:not([disabled]){background-color:#c82333;color:#fff}.jodit-ui-button-statuses_status_danger:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button-statuses_status_danger:active:not([disabled]){background-color:#bd2130;color:#fff}.jodit-ui-button-statuses_status_danger:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button-statuses_status_danger:focus:not([disabled]){outline:1px dashed #bd2130}.jodit-ui-button-style{border-radius:3px;padding:0 8px}.jodit-ui-button,.jodit-ui-button-style{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-ui-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:0 0;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;font-style:normal;height:34px;min-width:34px;outline:0;padding:0;padding:0 8px;position:relative;text-align:center;text-decoration:none;text-transform:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-ui-button:hover:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-ui-button:active:not([disabled]){background-color:hsla(0,0%,86%,0.4);outline:0}.jodit-ui-button[aria-pressed=true]:not([disabled]){background-color:hsla(0,0%,86%,0.4);outline:0}.jodit-ui-button[aria-pressed=true]:hover:not([disabled]){background-color:hsla(0,0%,86%,0.6)}.jodit-ui-button[disabled]{opacity:.3;pointer-events:none}.jodit-ui-button .jodit-icon{height:14px;width:14px}.jodit-ui-button button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:34px;min-width:34px;padding:0}.jodit-ui-button_text-icons_true button{padding:0 8px}.jodit-ui-button_size_tiny{height:16px;min-width:16px}.jodit-ui-button_size_tiny .jodit-icon{height:8px;width:8px}.jodit-ui-button_size_tiny button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:16px;min-width:16px;padding:0}.jodit-ui-button_size_tiny_text-icons_true button{padding:0 8px}.jodit-ui-button_size_xsmall{height:22px;min-width:22px}.jodit-ui-button_size_xsmall .jodit-icon{height:10px;width:10px}.jodit-ui-button_size_xsmall button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:22px;min-width:22px;padding:0}.jodit-ui-button_size_xsmall_text-icons_true button{padding:0 8px}.jodit-ui-button_size_small{height:28px;min-width:28px}.jodit-ui-button_size_small .jodit-icon{height:12px;width:12px}.jodit-ui-button_size_small button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:28px;min-width:28px;padding:0}.jodit-ui-button_size_small_text-icons_true button{padding:0 8px}.jodit-ui-button_size_large{height:40px;min-width:40px}.jodit-ui-button_size_large .jodit-icon{height:16px;width:16px}.jodit-ui-button_size_large button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:40px;min-width:40px;padding:0}.jodit-ui-button_size_large_text-icons_true button{padding:0 8px}.jodit-ui-button__icon{display:none}.jodit-ui-button__icon:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.jodit-ui-button__text{display:none}.jodit-ui-button__text:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-ui-button_context_menu .jodit-ui-button__text{-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left;padding-left:8px;position:relative}.jodit-ui-button_context_menu .jodit-ui-button__text:before{border-left:1px solid #dadada;content:"";height:35px;left:0;position:absolute;top:calc(8px*-1)}.jodit-ui-button__icon:not(:empty)+.jodit-ui-button__text:not(:empty){margin-left:8px}.jodit-ui-button__icon:empty+.jodit-ui-button__text:not(:empty){padding:0 8px}.jodit-ui-button:focus:not([disabled]){outline:1px dashed #b5d6fd}.jodit-ui-button_status_default{background-color:#d8d8d8;color:#212529}.jodit-ui-button_status_default svg{fill:#212529;stroke:#212529}.jodit-ui-button_status_default [disabled]{opacity:.7}.jodit-ui-button_status_default:hover:not([disabled]){background-color:#c9cdd1;color:#212529}.jodit-ui-button_status_default:hover:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-ui-button_status_default:active:not([disabled]){background-color:#dae0e5;color:#212529}.jodit-ui-button_status_default:active:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-ui-button_status_default:focus:not([disabled]){outline:1px dashed #dae0e5}.jodit-ui-button_status_primary{background-color:#007bff;color:#fff}.jodit-ui-button_status_primary svg{fill:#fff;stroke:#fff}.jodit-ui-button_status_primary [disabled]{opacity:.7}.jodit-ui-button_status_primary:hover:not([disabled]){background-color:#0069d9;color:#fff}.jodit-ui-button_status_primary:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button_status_primary:active:not([disabled]){background-color:#0062cc;color:#fff}.jodit-ui-button_status_primary:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button_status_primary:focus:not([disabled]){outline:1px dashed #0062cc}.jodit-ui-button_status_secondary{background-color:#d8d8d8;border-radius:0;color:#212529}.jodit-ui-button_status_secondary svg{fill:#212529;stroke:#212529}.jodit-ui-button_status_secondary [disabled]{opacity:.7}.jodit-ui-button_status_secondary:hover:not([disabled]){background-color:#c9cdd1;color:#212529}.jodit-ui-button_status_secondary:hover:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-ui-button_status_secondary:active:not([disabled]){background-color:#dae0e5;color:#212529}.jodit-ui-button_status_secondary:active:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-ui-button_status_secondary:focus:not([disabled]){outline:1px dashed #dae0e5}.jodit-ui-button_status_success{background-color:#28a745;color:#fff}.jodit-ui-button_status_success svg{fill:#fff;stroke:#fff}.jodit-ui-button_status_success [disabled]{opacity:.7}.jodit-ui-button_status_success:hover:not([disabled]){background-color:#218838;color:#fff}.jodit-ui-button_status_success:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button_status_success:active:not([disabled]){background-color:#1e7e34;color:#fff}.jodit-ui-button_status_success:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button_status_success:focus:not([disabled]){outline:1px dashed #1e7e34}.jodit-ui-button_status_danger{background-color:#dc3545;color:#fff}.jodit-ui-button_status_danger svg{fill:#fff;stroke:#fff}.jodit-ui-button_status_danger [disabled]{opacity:.7}.jodit-ui-button_status_danger:hover:not([disabled]){background-color:#c82333;color:#fff}.jodit-ui-button_status_danger:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button_status_danger:active:not([disabled]){background-color:#bd2130;color:#fff}.jodit-ui-button_status_danger:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button_status_danger:focus:not([disabled]){outline:1px dashed #bd2130}.jodit-ui-list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.jodit-ui-list_mode_vertical .jodit-ui-group{background-color:transparent;border:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.jodit-ui-list_mode_vertical .jodit-toolbar-button{height:auto;min-height:calc(14px + calc(14px*2 - 8px) + 2px*2)}.jodit-ui-list_mode_vertical .jodit-toolbar-button__button{height:auto;min-height:calc(14px + calc(14px*2 - 8px) + 2px*2);width:100%}.jodit-ui-list_mode_vertical .jodit-toolbar-button__text:not(:empty){-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left}.jodit-ui-separator{border-left:0;border-right:1px solid #dadada;cursor:default;margin:2px;padding:0}.jodit-ui-break{border-top:1px solid #dadada;-ms-flex-preferred-size:100%;flex-basis:100%;height:0!important;width:0}.jodit-ui-group{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;-ms-flex-negative:0;flex-shrink:0;-ms-flex-wrap:wrap;flex-wrap:wrap;max-width:100%}.jodit-ui-group_separated_true:not(:last-child):after{border-left:0;border-right:1px solid #dadada;content:"";cursor:default;margin:2px;padding:0}.jodit-ui-group:last-child{border-bottom:0}.jodit-ui-button-group{margin-bottom:8px}.jodit-ui-button-group__label{color:#a5a5a5;display:block;font-size:.8em;margin-bottom:calc(8px/4)}.jodit-ui-button-group__options{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.jodit-ui-button-group .jodit-ui-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.jodit-ui-button-group .jodit-ui-button+.jodit-ui-button{border-bottom-left-radius:0;border-left:1px solid hsla(0,0%,86%,0.4);border-top-left-radius:0}.jodit-ui-button-group .jodit-ui-button[aria-pressed=true]:not([disabled]){background-color:#dcdcdc;border-left:0;-webkit-box-shadow:inset 0 0 3px 0 #4c4c4c;box-shadow:inset 0 0 3px 0 #4c4c4c;color:#4c4c4c;outline:0}.jodit-ui-button-group .jodit-ui-button[aria-pressed=true]:not([disabled])+.jodit-ui-button{border:0}.jodit-popup{background:0 0;border:0;-webkit-box-shadow:0 4px 1px -2px rgba(76,76,76,0.2),0 3px 3px 0 rgba(76,76,76,0.15),0 1px 4px 0 rgba(76,76,76,0.13);box-shadow:0 4px 1px -2px rgba(76,76,76,0.2),0 3px 3px 0 rgba(76,76,76,0.15),0 1px 4px 0 rgba(76,76,76,0.13);display:inline-block;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;position:fixed;-webkit-transform:translateZ(0);transform:translateZ(0);width:auto;z-index:10000001}.jodit-popup__content{overflow-scrolling:touch;background:#fff;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;max-height:300px;overflow:auto;padding:8px}.jodit-popup_padding_false .jodit-popup__content{padding:0}.jodit-popup_max-height_false .jodit-popup__content{max-height:-webkit-fit-content;max-height:-moz-fit-content;max-height:fit-content}.jodit-ui-label{color:#a5a5a5;display:block;font-size:.8em;margin-bottom:calc(8px/4)}.jodit-ui-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-bottom:8px}.jodit-ui-input__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:0;border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;height:32px;line-height:32px;outline:none;padding:0 8px;width:100%}.jodit-ui-input__input[disabled]{background-color:#f0f0f0;color:#dadada}.jodit-ui-input__input_has-error_true{border-color:#ff3b3b}.jodit-ui-input__input:focus{outline:0}.jodit-ui-input_theme_dark .jodit-ui-input__input{background-color:#dadada}.jodit-ui-input_has-error_true .jodit-ui-input__input{border-color:#ff3b3b}.jodit-ui-input__error{color:#a5a5a5;display:block;font-size:.8em;margin-bottom:calc(8px/4)}.jodit-ui-input__label{color:#a5a5a5;display:block;font-size:.8em;margin-bottom:calc(8px/4)}.jodit-ui-input__error{color:#ff3b3b}.jodit-ui-input_has-error_true .jodit-ui-input__label{color:#ff3b3b}.jodit-ui-input__wrapper{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#fff;border:1px solid #dadada;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;min-width:200px}@media (max-width:480px){.jodit-ui-input__wrapper{min-width:140px}}.jodit-ui-input_theme_dark .jodit-ui-input__wrapper{background-color:#dadada;border-color:#dadada}.jodit-ui-input_focused_true .jodit-ui-input__wrapper{-webkit-box-shadow:0 0 0 0.05rem rgba(0,123,255,0.25);box-shadow:0 0 0 0.05rem rgba(0,123,255,0.25)}.jodit-ui-input__icon:not(:empty){-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;padding:0 8px}.jodit-ui-input__icon:not(:empty) svg{fill:#dadada;height:16px;width:16px}.jodit-ui-input__icon:not(:empty)+.jodit-ui-input__input{padding-left:0}.jodit-ui-input__clear{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;opacity:.8;padding:0 8px 0 0}.jodit-ui-input__clear:active{opacity:1;-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1)}.jodit-ui-input__clear svg{fill:#dadada;height:12px;width:12px}.jodit-ui-input_theme_dark .jodit-ui-input__clear svg{fill:#4c4c4c}.jodit-ui-input_theme_dark .jodit-ui-input__icon svg{fill:#4c4c4c}.jodit-ui-block .jodit-ui-input{margin-bottom:0}.jodit-ui-text-area{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-bottom:8px;width:100%}.jodit-ui-text-area__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:0;border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;height:32px;line-height:32px;outline:none;padding:0 8px;width:100%}.jodit-ui-text-area__input[disabled]{background-color:#f0f0f0;color:#dadada}.jodit-ui-text-area__input_has-error_true{border-color:#ff3b3b}.jodit-ui-text-area__input:focus{outline:0}.jodit-ui-text-area_theme_dark .jodit-ui-text-area__input{background-color:#dadada}.jodit-ui-text-area_has-error_true .jodit-ui-text-area__input{border-color:#ff3b3b}.jodit-ui-text-area__error{color:#a5a5a5;display:block;font-size:.8em;margin-bottom:calc(8px/4)}.jodit-ui-text-area__label{color:#a5a5a5;display:block;font-size:.8em;margin-bottom:calc(8px/4)}.jodit-ui-text-area__error{color:#ff3b3b}.jodit-ui-text-area_has-error_true .jodit-ui-text-area__label{color:#ff3b3b}.jodit-ui-text-area__wrapper{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#fff;border:1px solid #dadada;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;min-width:200px}@media (max-width:480px){.jodit-ui-text-area__wrapper{min-width:140px}}.jodit-ui-text-area_theme_dark .jodit-ui-text-area__wrapper{background-color:#dadada;border-color:#dadada}.jodit-ui-text-area_focused_true .jodit-ui-text-area__wrapper{-webkit-box-shadow:0 0 0 0.05rem rgba(0,123,255,0.25);box-shadow:0 0 0 0.05rem rgba(0,123,255,0.25)}.jodit-ui-text-area__icon:not(:empty){-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;padding:0 8px}.jodit-ui-text-area__icon:not(:empty) svg{fill:#dadada;height:16px;width:16px}.jodit-ui-text-area__icon:not(:empty)+.jodit-ui-text-area__input{padding-left:0}.jodit-ui-text-area__clear{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;opacity:.8;padding:0 8px 0 0}.jodit-ui-text-area__clear:active{opacity:1;-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1)}.jodit-ui-text-area__clear svg{fill:#dadada;height:12px;width:12px}.jodit-ui-text-area_theme_dark .jodit-ui-text-area__clear svg{fill:#4c4c4c}.jodit-ui-text-area_theme_dark .jodit-ui-text-area__icon svg{fill:#4c4c4c}.jodit-ui-text-area__input{min-height:60px}.jodit-ui-checkbox{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;margin-bottom:8px}.jodit-ui-checkbox__input{margin-right:8px}.jodit-ui-block .jodit-ui-checkbox{margin-bottom:0}.jodit-ui-select{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-bottom:8px}.jodit-ui-select__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:0;border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;height:32px;line-height:32px;outline:none;padding:0 8px;width:100%}.jodit-ui-select__input[disabled]{background-color:#f0f0f0;color:#dadada}.jodit-ui-select__input_has-error_true{border-color:#ff3b3b}.jodit-ui-select__input:focus{outline:0}.jodit-ui-select_theme_dark .jodit-ui-select__input{background-color:#dadada}.jodit-ui-select_has-error_true .jodit-ui-select__input{border-color:#ff3b3b}.jodit-ui-select__error{color:#a5a5a5;display:block;font-size:.8em;margin-bottom:calc(8px/4)}.jodit-ui-select__label{color:#a5a5a5;display:block;font-size:.8em;margin-bottom:calc(8px/4)}.jodit-ui-select__error{color:#ff3b3b}.jodit-ui-select_has-error_true .jodit-ui-select__label{color:#ff3b3b}.jodit-ui-select__wrapper{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#fff;border:1px solid #dadada;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;min-width:200px}@media (max-width:480px){.jodit-ui-select__wrapper{min-width:140px}}.jodit-ui-select_theme_dark .jodit-ui-select__wrapper{background-color:#dadada;border-color:#dadada}.jodit-ui-select_focused_true .jodit-ui-select__wrapper{-webkit-box-shadow:0 0 0 0.05rem rgba(0,123,255,0.25);box-shadow:0 0 0 0.05rem rgba(0,123,255,0.25)}.jodit-ui-select__icon:not(:empty){-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;padding:0 8px}.jodit-ui-select__icon:not(:empty) svg{fill:#dadada;height:16px;width:16px}.jodit-ui-select__icon:not(:empty)+.jodit-ui-select__input{padding-left:0}.jodit-ui-select__clear{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;opacity:.8;padding:0 8px 0 0}.jodit-ui-select__clear:active{opacity:1;-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1)}.jodit-ui-select__clear svg{fill:#dadada;height:12px;width:12px}.jodit-ui-select_theme_dark .jodit-ui-select__clear svg{fill:#4c4c4c}.jodit-ui-select_theme_dark .jodit-ui-select__icon svg{fill:#4c4c4c}.jodit-ui-select__input{background-image:url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0Ljk1IDEwIj48ZGVmcz48c3R5bGU+LmNscy0ye2ZpbGw6IzQ0NH08L3N0eWxlPjwvZGVmcz48cGF0aCBzdHlsZT0iZmlsbDojZmZmIiBkPSJNMCAwaDQuOTV2MTBIMHoiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Im0xLjQxIDQuNjcgMS4wNy0xLjQ5IDEuMDYgMS40OUgxLjQxek0zLjU0IDUuMzMgMi40OCA2LjgyIDEuNDEgNS4zM2gyLjEzeiIvPjwvc3ZnPg==);background-position:98% 50%;background-repeat:no-repeat;padding-right:calc(8px*2)}.jodit-ui-select_size_tiny{margin-bottom:0}.jodit-ui-select_size_tiny .jodit-ui-select__input{height:calc(32px/1.8);line-height:calc(32px/1.8)}.jodit-ui-select_variant_outline .jodit-ui-select__wrapper{border:0}.jodit-ui-select_variant_outline .jodit-ui-select__wrapper select{outline:0}.jodit-ui-select_width_auto{width:auto}.jodit-ui-select_width_auto .jodit-ui-select__wrapper{min-width:auto}.jodit-ui-file-input{overflow:hidden;position:relative}.jodit-ui-file-input__input{bottom:0;cursor:pointer;font-size:400px;margin:0 calc(8px*-1) 0 0;opacity:0;padding:0;position:absolute;right:0;top:0}.jodit-ui-block{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;margin-bottom:8px}.jodit-ui-block_width_full{width:100%}.jodit-ui-block_align_full{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.jodit-ui-block_align_right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.jodit-ui-block_padding_true{padding:8px}@-webkit-keyframes b{30%{opacity:.6}60%{opacity:0}to{opacity:.6}}@keyframes b{30%{opacity:.6}60%{opacity:0}to{opacity:.6}}.jodit-progress-bar{border-radius:1px;height:2px;left:0;opacity:.7;position:absolute;top:0;z-index:2147483647}.jodit-progress-bar div{background:#b91f1f;height:2px;position:relative;-webkit-transition:width .5s ease-out,opacity .5s linear;-o-transition:width .5s ease-out,opacity .5s linear;transition:width .5s ease-out,opacity .5s linear;will-change:width,opacity}.jodit-progress-bar div:after{-webkit-animation:b 2s ease-out 0s infinite;animation:b 2s ease-out 0s infinite;border-radius:100%;-webkit-box-shadow:#b91f1f 1px 0 6px 1px;box-shadow:#b91f1f 1px 0 6px 1px;content:"";display:inline-block;height:2px;opacity:.6;position:absolute;top:0}.jodit-progress-bar div:before{-webkit-animation:b 2s ease-out 0s infinite;animation:b 2s ease-out 0s infinite;border-radius:100%;-webkit-box-shadow:#b91f1f 1px 0 6px 1px;box-shadow:#b91f1f 1px 0 6px 1px;content:"";display:inline-block;height:2px;opacity:.6;position:absolute;top:0}.jodit-progress-bar div:before{clip:rect(-6px,90px,14px,-6px);right:-80px;width:180px}.jodit-progress-bar div:after{clip:rect(-6px,22px,14px,8px);right:0;width:20px}.jodit-context-menu{background:0 0;border:0;-webkit-box-shadow:0 4px 1px -2px rgba(76,76,76,0.2),0 3px 3px 0 rgba(76,76,76,0.15),0 1px 4px 0 rgba(76,76,76,0.13);box-shadow:0 4px 1px -2px rgba(76,76,76,0.2),0 3px 3px 0 rgba(76,76,76,0.15),0 1px 4px 0 rgba(76,76,76,0.13);display:inline-block;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;position:fixed;-webkit-transform:translateZ(0);transform:translateZ(0);width:auto;z-index:10000001;z-index:30000005}.jodit-context-menu__content{overflow-scrolling:touch;background:#fff;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;max-height:300px;overflow:auto;padding:8px}.jodit-context-menu_padding_false .jodit-context-menu__content{padding:0}.jodit-context-menu_max-height_false .jodit-context-menu__content{max-height:-webkit-fit-content;max-height:-moz-fit-content;max-height:fit-content}.jodit-context-menu .jodit-ui-button{display:-webkit-box;display:-ms-flexbox;display:flex}.jodit-context-menu__actions{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px}.jodit-context-menu__actions button{width:100%}.jodit-context-menu_theme_dark .jodit-context-menu__content{background-color:#575757}.jodit-dialog{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;height:0;position:absolute;width:0;will-change:left,top,width,height}.jodit-dialog_moved_true{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-dialog *{-webkit-box-sizing:border-box;box-sizing:border-box}.jodit-dialog .jodit_elfinder,.jodit-dialog .jodit_elfinder *{-webkit-box-sizing:initial;box-sizing:initial}.jodit-dialog__overlay{background-color:rgba(0,0,0,.5);display:none;height:100%;left:0;overflow:auto;position:fixed;text-align:center;top:0;white-space:nowrap;width:100%;z-index:20000003}.jodit-dialog_static_true .jodit-dialog__overlay{display:none}.jodit-dialog_active_true,.jodit-dialog_modal_true .jodit-dialog__overlay{display:block}.jodit-dialog__panel{background-color:#fff;-webkit-box-shadow:0 8px calc(8px*2) rgba(0,0,0,0.19),0 6px 6px rgba(0,0,0,.23);box-shadow:0 8px calc(8px*2) rgba(0,0,0,0.19),0 6px 6px rgba(0,0,0,.23);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-flow:column nowrap;flex-flow:column nowrap;left:0;max-height:100%;max-width:100%;min-height:100px;min-width:200px;position:fixed;text-align:left;top:0;white-space:normal;z-index:20000004}@media (max-width:480px){.jodit-dialog__panel{height:100%!important;left:0!important;max-width:100%;top:0!important;width:100%!important}}.jodit-dialog_static_true{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;height:auto;position:static;width:auto}.jodit-dialog_static_true .jodit-dialog__panel{left:auto!important;position:relative;top:auto!important;width:100%!important}.jodit-dialog_theme_dark{background-color:#353535;color:#fff}.jodit-dialog_theme_dark .jodit-dialog__panel{background-color:#353535;color:#fff}.jodit-dialog__header{border-bottom:1px solid #dadada;cursor:move;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;min-height:50px;overflow:hidden;text-align:left}@media (max-width:480px){.jodit-dialog__header{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.jodit-dialog__header-title{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:3;flex-shrink:3;font-size:18px;font-weight:400;line-height:48px;margin:0;padding:0 8px;vertical-align:top}.jodit-dialog__header-toolbar{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:3;flex-shrink:3;font-size:18px;font-weight:400;line-height:48px;margin:0;padding:0 8px;vertical-align:top}@media (max-width:480px){.jodit-dialog__header-toolbar{padding-left:0}}.jodit-dialog__header-button{color:#222;-ms-flex-preferred-size:48px;flex-basis:48px;font-size:28px;height:48px;line-height:48px;text-align:center;text-decoration:none;-webkit-transition:background-color .2s ease 0s;-o-transition:background-color .2s ease 0s;transition:background-color .2s ease 0s}.jodit-dialog__header-button:hover{background-color:#ecebe9}.jodit-dialog__header .jodit_toolbar{background:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.jodit-dialog__header .jodit_toolbar>li.jodit-toolbar-button .jodit-input{padding-left:8px;width:auto}.jodit-dialog_slim_true .jodit-dialog__header{min-height:10px}.jodit-dialog_slim_true .jodit-dialog__header-title{padding:0 calc(8px/4)}.jodit-dialog_slim_true .jodit-dialog__header-toolbar{padding:0 calc(8px/4)}.jodit-dialog_theme_dark .jodit-dialog__header{border-color:#4c4c4c}.jodit-dialog_fullsize_true .jodit-dialog__header{cursor:default}.jodit-dialog__content{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:100px;overflow:auto}.jodit-dialog__content .jodit-form__group{margin-bottom:calc(8px*1.5);padding:0 8px}.jodit-dialog__content .jodit-form__group:first-child{margin-top:8px}.jodit-dialog__content .jodit-form__group label+.jodit-grid{margin-top:calc(8px/2)}.jodit-dialog__content .jodit-form__group label+.jodit-input_group{margin-top:calc(8px/2)}.jodit-dialog__content .jodit-form__group label+.jodit-select{margin-top:calc(8px/2)}.jodit-dialog__content .jodit-form__group label+input{margin-top:calc(8px/2)}.jodit-dialog__content .jodit-form__group .jodit-input_group{border-collapse:separate;display:table;width:100%}.jodit-dialog__content .jodit-form__group .jodit-input_group>*{display:table-cell;height:34px;vertical-align:middle}.jodit-dialog__content .jodit-form__group .jodit-input_group>input{margin:0!important}.jodit-dialog__content .jodit-form__group .jodit-input_group>input:not([class*=col-]){width:100%}.jodit-dialog__content .jodit-form__group .jodit-input_group-buttons{font-size:0;vertical-align:middle;white-space:nowrap;width:1%}.jodit-dialog__content .jodit-form__group .jodit-input_group-buttons>.jodit-button{border:1px solid #dadada;border-radius:0;height:34px;line-height:34px;margin-left:-1px}.jodit-dialog__footer{display:none;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:8px}.jodit-dialog__footer button{margin-right:calc(8px/2)}.jodit-dialog__footer button:last-child{margin-right:0}.jodit-dialog__column{display:-webkit-box;display:-ms-flexbox;display:flex}.jodit-dialog__resizer{border-bottom:10px solid #dadada;border-left:10px solid transparent;border-right:0 solid transparent;bottom:0;cursor:se-resize;display:inline-block;height:0;opacity:1;position:absolute;right:0;width:0}.jodit-dialog__resizer:hover{border-bottom-color:rgba(0,0,0,.6)}@media (max-width:480px){.jodit-dialog__resizer{display:none}}.jodit-dialog_prompt{max-width:300px;min-width:200px;padding:8px;word-break:break-all}.jodit-dialog_prompt label{display:block;margin-bottom:calc(8px/2)}.jodit-dialog_alert{max-width:300px;min-width:200px;padding:8px;word-break:break-all}.jodit-dialog_footer_true .jodit-dialog__footer{display:-webkit-box;display:-ms-flexbox;display:flex}.jodit_fullsize .jodit-dialog__panel{bottom:0!important;height:100%!important;left:0!important;right:0!important;top:0!important;width:100%!important}.jodit_fullsize .jodit-dialog__panel .jodit-dialog__resizer{display:none}.jodit-toolbar__box:not(:empty){background-color:#f9f9f9;border-bottom:1px solid #dadada;border-radius:3px 3px 0 0;overflow:hidden}.jodit-toolbar-collection,.jodit-toolbar-editor-collection{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.jodit-toolbar-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent calc(calc(14px + calc(14px*2 - 8px) + 2px*2) - 1px),#dadada calc(14px + calc(14px*2 - 8px) + 2px*2));background-image:repeating-linear-gradient(transparent 0,transparent calc(calc(14px + calc(14px*2 - 8px) + 2px*2) - 1px),#dadada calc(14px + calc(14px*2 - 8px) + 2px*2));position:relative}.jodit-toolbar-editor-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent calc(calc(14px + calc(14px*2 - 8px) + 2px*2) - 1px),#dadada calc(14px + calc(14px*2 - 8px) + 2px*2));background-image:repeating-linear-gradient(transparent 0,transparent calc(calc(14px + calc(14px*2 - 8px) + 2px*2) - 1px),#dadada calc(14px + calc(14px*2 - 8px) + 2px*2));position:relative}.jodit-toolbar-collection_mode_horizontal:after{background-color:#fff;bottom:0;content:"";display:block;height:1px;left:0;position:absolute;width:100%}.jodit-toolbar-editor-collection_mode_horizontal:after{background-color:#fff;bottom:0;content:"";display:block;height:1px;left:0;position:absolute;width:100%}.jodit-toolbar-collection_size_tiny.jodit-toolbar-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 19px,#dadada 20px);background-image:repeating-linear-gradient(transparent 0,transparent 19px,#dadada 20px)}.jodit-toolbar-collection_size_tiny.jodit-toolbar-editor-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 19px,#dadada 20px);background-image:repeating-linear-gradient(transparent 0,transparent 19px,#dadada 20px)}.jodit-toolbar-editor-collection_size_tiny.jodit-toolbar-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 19px,#dadada 20px);background-image:repeating-linear-gradient(transparent 0,transparent 19px,#dadada 20px)}.jodit-toolbar-editor-collection_size_tiny.jodit-toolbar-editor-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 19px,#dadada 20px);background-image:repeating-linear-gradient(transparent 0,transparent 19px,#dadada 20px)}.jodit-toolbar-collection_size_xsmall.jodit-toolbar-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 25px,#dadada 26px);background-image:repeating-linear-gradient(transparent 0,transparent 25px,#dadada 26px)}.jodit-toolbar-collection_size_xsmall.jodit-toolbar-editor-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 25px,#dadada 26px);background-image:repeating-linear-gradient(transparent 0,transparent 25px,#dadada 26px)}.jodit-toolbar-editor-collection_size_xsmall.jodit-toolbar-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 25px,#dadada 26px);background-image:repeating-linear-gradient(transparent 0,transparent 25px,#dadada 26px)}.jodit-toolbar-editor-collection_size_xsmall.jodit-toolbar-editor-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 25px,#dadada 26px);background-image:repeating-linear-gradient(transparent 0,transparent 25px,#dadada 26px)}.jodit-toolbar-collection_size_small.jodit-toolbar-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 31px,#dadada 32px);background-image:repeating-linear-gradient(transparent 0,transparent 31px,#dadada 32px)}.jodit-toolbar-collection_size_small.jodit-toolbar-editor-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 31px,#dadada 32px);background-image:repeating-linear-gradient(transparent 0,transparent 31px,#dadada 32px)}.jodit-toolbar-editor-collection_size_small.jodit-toolbar-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 31px,#dadada 32px);background-image:repeating-linear-gradient(transparent 0,transparent 31px,#dadada 32px)}.jodit-toolbar-editor-collection_size_small.jodit-toolbar-editor-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 31px,#dadada 32px);background-image:repeating-linear-gradient(transparent 0,transparent 31px,#dadada 32px)}.jodit-toolbar-collection_size_middle.jodit-toolbar-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 37px,#dadada 38px);background-image:repeating-linear-gradient(transparent 0,transparent 37px,#dadada 38px)}.jodit-toolbar-collection_size_middle.jodit-toolbar-editor-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 37px,#dadada 38px);background-image:repeating-linear-gradient(transparent 0,transparent 37px,#dadada 38px)}.jodit-toolbar-editor-collection_size_middle.jodit-toolbar-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 37px,#dadada 38px);background-image:repeating-linear-gradient(transparent 0,transparent 37px,#dadada 38px)}.jodit-toolbar-editor-collection_size_middle.jodit-toolbar-editor-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 37px,#dadada 38px);background-image:repeating-linear-gradient(transparent 0,transparent 37px,#dadada 38px)}.jodit-toolbar-collection_size_large.jodit-toolbar-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 43px,#dadada 44px);background-image:repeating-linear-gradient(transparent 0,transparent 43px,#dadada 44px)}.jodit-toolbar-collection_size_large.jodit-toolbar-editor-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 43px,#dadada 44px);background-image:repeating-linear-gradient(transparent 0,transparent 43px,#dadada 44px)}.jodit-toolbar-editor-collection_size_large.jodit-toolbar-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 43px,#dadada 44px);background-image:repeating-linear-gradient(transparent 0,transparent 43px,#dadada 44px)}.jodit-toolbar-editor-collection_size_large.jodit-toolbar-editor-collection_mode_horizontal{background-image:-o-repeating-linear-gradient(transparent 0,transparent 43px,#dadada 44px);background-image:repeating-linear-gradient(transparent 0,transparent 43px,#dadada 44px)}.jodit-toolbar-collection_mode_vertical .jodit-ui-group,.jodit-toolbar-editor-collection_mode_vertical .jodit-ui-group{background-color:transparent;border:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.jodit-toolbar-collection_mode_vertical .jodit-toolbar-button{height:auto;min-height:calc(14px + calc(14px*2 - 8px) + 2px*2)}.jodit-toolbar-editor-collection_mode_vertical .jodit-toolbar-button{height:auto;min-height:calc(14px + calc(14px*2 - 8px) + 2px*2)}.jodit-toolbar-collection_mode_vertical .jodit-toolbar-button__button{height:auto;min-height:calc(14px + calc(14px*2 - 8px) + 2px*2);width:100%}.jodit-toolbar-editor-collection_mode_vertical .jodit-toolbar-button__button{height:auto;min-height:calc(14px + calc(14px*2 - 8px) + 2px*2);width:100%}.jodit-toolbar-collection_mode_vertical .jodit-toolbar-button__text:not(:empty),.jodit-toolbar-editor-collection_mode_vertical .jodit-toolbar-button__text:not(:empty){-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left}.jodit-toolbar-collection .jodit-toolbar-button{margin:2px 1px;padding:0}.jodit-toolbar-collection .jodit-toolbar-content{margin:2px 1px;padding:0}.jodit-toolbar-editor-collection .jodit-toolbar-button{margin:2px 1px;padding:0}.jodit-toolbar-editor-collection .jodit-toolbar-content{margin:2px 1px;padding:0}.jodit-dialog .jodit-toolbar-collection_mode_horizontal,.jodit-dialog .jodit-toolbar-editor-collection_mode_horizontal{background-image:none}.jodit-toolbar-button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:1px solid transparent;border-radius:3px;display:-webkit-box;display:-ms-flexbox;display:flex;height:34px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-width:34px;overflow:hidden}.jodit-toolbar-button__icon{display:none}.jodit-toolbar-button__icon:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.jodit-toolbar-button__text{display:none}.jodit-toolbar-button__text:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-toolbar-button_context_menu .jodit-toolbar-button__text{-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left;padding-left:8px;position:relative}.jodit-toolbar-button_context_menu .jodit-toolbar-button__text:before{border-left:1px solid #dadada;content:"";height:35px;left:0;position:absolute;top:calc(8px*-1)}.jodit-toolbar-button__icon:not(:empty)+.jodit-toolbar-button__text:not(:empty){margin-left:8px}.jodit-toolbar-button__icon:empty+.jodit-toolbar-button__text:not(:empty){padding:0 8px;padding:0}.jodit-toolbar-button .jodit-icon{height:14px;width:14px}.jodit-toolbar-button button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:34px;min-width:34px;padding:0}.jodit-toolbar-button_text-icons_true button{padding:0 8px}.jodit-toolbar-button_size_tiny{height:16px;min-width:16px}.jodit-toolbar-button_size_tiny .jodit-icon{height:8px;width:8px}.jodit-toolbar-button_size_tiny button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:16px;min-width:16px;padding:0}.jodit-toolbar-button_size_tiny_text-icons_true button{padding:0 8px}.jodit-toolbar-button_size_xsmall{height:22px;min-width:22px}.jodit-toolbar-button_size_xsmall .jodit-icon{height:10px;width:10px}.jodit-toolbar-button_size_xsmall button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:22px;min-width:22px;padding:0}.jodit-toolbar-button_size_xsmall_text-icons_true button{padding:0 8px}.jodit-toolbar-button_size_small{height:28px;min-width:28px}.jodit-toolbar-button_size_small .jodit-icon{height:12px;width:12px}.jodit-toolbar-button_size_small button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:28px;min-width:28px;padding:0}.jodit-toolbar-button_size_small_text-icons_true button{padding:0 8px}.jodit-toolbar-button_size_large{height:40px;min-width:40px}.jodit-toolbar-button_size_large .jodit-icon{height:16px;width:16px}.jodit-toolbar-button_size_large button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:40px;min-width:40px;padding:0}.jodit-toolbar-button_size_large_text-icons_true button{padding:0 8px}.jodit-toolbar-button__button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:0 0;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-style:normal;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;outline:0;padding:0;padding:0 8px;position:relative;text-align:center;text-decoration:none;text-transform:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-toolbar-button__button:hover:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-toolbar-button__button:active:not([disabled]){background-color:hsla(0,0%,86%,0.4);outline:0}.jodit-toolbar-button__button[aria-pressed=true]:not([disabled]){background-color:hsla(0,0%,86%,0.4);outline:0}.jodit-toolbar-button__button[aria-pressed=true]:hover:not([disabled]){background-color:hsla(0,0%,86%,0.6)}.jodit-toolbar-button__button[disabled]{opacity:.3;pointer-events:none}.jodit-toolbar-button__trigger{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:0 3px 3px 0;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;opacity:.4;width:14px}.jodit-toolbar-button__trigger:hover:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-toolbar-button__trigger:active:not([disabled]){background-color:hsla(0,0%,86%,0.4);outline:0}.jodit-toolbar-button__trigger[aria-pressed=true]:not([disabled]){background-color:hsla(0,0%,86%,0.4);outline:0}.jodit-toolbar-button__trigger[aria-pressed=true]:hover:not([disabled]){background-color:hsla(0,0%,86%,0.6)}.jodit-toolbar-button__trigger[disabled]{opacity:.3;pointer-events:none}.jodit-toolbar-button__trigger svg{width:10px}.jodit-toolbar-button_size_tiny .jodit-toolbar-button__trigger{width:8px}.jodit-toolbar-button_size_tiny .jodit-toolbar-button__trigger svg{width:4px}.jodit-toolbar-button_size_xsmall .jodit-toolbar-button__trigger{width:10px}.jodit-toolbar-button_size_xsmall .jodit-toolbar-button__trigger svg{width:6px}.jodit-toolbar-button_size_small .jodit-toolbar-button__trigger{width:12px}.jodit-toolbar-button_size_small .jodit-toolbar-button__trigger svg{width:8px}.jodit-toolbar-button_size_large .jodit-toolbar-button__trigger{width:16px}.jodit-toolbar-button_size_large .jodit-toolbar-button__trigger svg{width:12px}.jodit-toolbar-button_with-trigger_true .jodit-toolbar-button__button{border-radius:3px 0 0 3px}.jodit-toolbar-button_with-trigger_true:hover:not([disabled]){border-color:#dadada}.jodit-toolbar-content{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:0 0;border:1px solid transparent;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-style:normal;height:34px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-width:34px;outline:0;padding:0;position:relative;text-align:center;text-decoration:none;text-transform:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-toolbar-content:hover:not([disabled]){background-color:#dcdcdc}.jodit-toolbar-content:active:not([disabled]){background-color:hsla(0,0%,86%,0.4);outline:0}.jodit-toolbar-content[aria-pressed=true]:not([disabled]){background-color:hsla(0,0%,86%,0.4);outline:0}.jodit-toolbar-content[aria-pressed=true]:hover:not([disabled]){background-color:hsla(0,0%,86%,0.6)}.jodit-toolbar-content[disabled]{opacity:.3;pointer-events:none}.jodit-toolbar-content .jodit-icon{height:14px;width:14px}.jodit-toolbar-content button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:34px;min-width:34px;padding:0}.jodit-toolbar-content_text-icons_true button{padding:0 8px}.jodit-toolbar-content_size_tiny{height:16px;min-width:16px}.jodit-toolbar-content_size_tiny .jodit-icon{height:8px;width:8px}.jodit-toolbar-content_size_tiny button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:16px;min-width:16px;padding:0}.jodit-toolbar-content_size_tiny_text-icons_true button{padding:0 8px}.jodit-toolbar-content_size_xsmall{height:22px;min-width:22px}.jodit-toolbar-content_size_xsmall .jodit-icon{height:10px;width:10px}.jodit-toolbar-content_size_xsmall button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:22px;min-width:22px;padding:0}.jodit-toolbar-content_size_xsmall_text-icons_true button{padding:0 8px}.jodit-toolbar-content_size_small{height:28px;min-width:28px}.jodit-toolbar-content_size_small .jodit-icon{height:12px;width:12px}.jodit-toolbar-content_size_small button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:28px;min-width:28px;padding:0}.jodit-toolbar-content_size_small_text-icons_true button{padding:0 8px}.jodit-toolbar-content_size_large{height:40px;min-width:40px}.jodit-toolbar-content_size_large .jodit-icon{height:16px;width:16px}.jodit-toolbar-content_size_large button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:40px;min-width:40px;padding:0}.jodit-toolbar-content_size_large_text-icons_true button{padding:0 8px}.jodit-toolbar-content__icon{display:none}.jodit-toolbar-content__icon:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.jodit-toolbar-content__text{display:none}.jodit-toolbar-content__text:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-toolbar-content_context_menu .jodit-toolbar-content__text{-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left;padding-left:8px;position:relative}.jodit-toolbar-content_context_menu .jodit-toolbar-content__text:before{border-left:1px solid #dadada;content:"";height:35px;left:0;position:absolute;top:calc(8px*-1)}.jodit-toolbar-content__icon:not(:empty)+.jodit-toolbar-content__text:not(:empty){margin-left:8px}.jodit-toolbar-content__icon:empty+.jodit-toolbar-content__text:not(:empty){padding:0 8px}.jodit-toolbar-content:focus:not([disabled]){outline:1px dashed #b5d6fd}.jodit-toolbar-content_status_default{background-color:#d8d8d8;color:#212529}.jodit-toolbar-content_status_default svg{fill:#212529;stroke:#212529}.jodit-toolbar-content_status_default [disabled]{opacity:.7}.jodit-toolbar-content_status_default:hover:not([disabled]){background-color:#c9cdd1;color:#212529}.jodit-toolbar-content_status_default:hover:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-toolbar-content_status_default:active:not([disabled]){background-color:#dae0e5;color:#212529}.jodit-toolbar-content_status_default:active:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-toolbar-content_status_default:focus:not([disabled]){outline:1px dashed #dae0e5}.jodit-toolbar-content_status_primary{background-color:#007bff;color:#fff}.jodit-toolbar-content_status_primary svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_status_primary [disabled]{opacity:.7}.jodit-toolbar-content_status_primary:hover:not([disabled]){background-color:#0069d9;color:#fff}.jodit-toolbar-content_status_primary:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_status_primary:active:not([disabled]){background-color:#0062cc;color:#fff}.jodit-toolbar-content_status_primary:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_status_primary:focus:not([disabled]){outline:1px dashed #0062cc}.jodit-toolbar-content_status_secondary{background-color:#d8d8d8;border-radius:0;color:#212529}.jodit-toolbar-content_status_secondary svg{fill:#212529;stroke:#212529}.jodit-toolbar-content_status_secondary [disabled]{opacity:.7}.jodit-toolbar-content_status_secondary:hover:not([disabled]){background-color:#c9cdd1;color:#212529}.jodit-toolbar-content_status_secondary:hover:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-toolbar-content_status_secondary:active:not([disabled]){background-color:#dae0e5;color:#212529}.jodit-toolbar-content_status_secondary:active:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-toolbar-content_status_secondary:focus:not([disabled]){outline:1px dashed #dae0e5}.jodit-toolbar-content_status_success{background-color:#28a745;color:#fff}.jodit-toolbar-content_status_success svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_status_success [disabled]{opacity:.7}.jodit-toolbar-content_status_success:hover:not([disabled]){background-color:#218838;color:#fff}.jodit-toolbar-content_status_success:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_status_success:active:not([disabled]){background-color:#1e7e34;color:#fff}.jodit-toolbar-content_status_success:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_status_success:focus:not([disabled]){outline:1px dashed #1e7e34}.jodit-toolbar-content_status_danger{background-color:#dc3545;color:#fff}.jodit-toolbar-content_status_danger svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_status_danger [disabled]{opacity:.7}.jodit-toolbar-content_status_danger:hover:not([disabled]){background-color:#c82333;color:#fff}.jodit-toolbar-content_status_danger:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_status_danger:active:not([disabled]){background-color:#bd2130;color:#fff}.jodit-toolbar-content_status_danger:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_status_danger:focus:not([disabled]){outline:1px dashed #bd2130}.jodit-toolbar-content:hover:not([disabled]){background-color:transparent;opacity:1;outline:0}.jodit-filebrowser{display:-webkit-box;display:-ms-flexbox;display:flex;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;height:100%}.jodit-filebrowser_no_files{padding:8px}@media (max-width:480px){.jodit-filebrowser{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-flow:column-reverse;flex-flow:column-reverse}}.jodit-filebrowser__loader{height:100%;left:0;position:absolute;top:0;width:100%}.jodit-filebrowser__loader i{font-style:normal;left:50%;margin-left:calc(48px/-2);margin-top:calc(48px/-2);opacity:.7;position:absolute;top:50%}.jodit-filebrowser__status{background-color:#4a4a4a;border-top:1px solid hsla(0,0%,50%,.4);bottom:0;color:#b38888;font-size:12px;left:0;opacity:0;padding:6px;position:absolute;right:0;text-align:right;-webkit-transition:opacity .3s linear;-o-transition:opacity .3s linear;transition:opacity .3s linear;visibility:hidden;word-break:break-all}.jodit-filebrowser__status.jodit-filebrowser_success{color:#c5c5c5}.jodit-filebrowser__status.jodit-filebrowser_active{opacity:1;visibility:visible}.jodit-filebrowser__files,.jodit-filebrowser__tree{display:none;height:100%;overflow-anchor:auto;position:relative;vertical-align:top}.jodit-filebrowser__files .jodit-button,.jodit-filebrowser__tree .jodit-button{border-radius:0}.jodit-filebrowser__files.jodit-filebrowser_active,.jodit-filebrowser__tree.jodit-filebrowser_active{display:-webkit-box;display:-ms-flexbox;display:flex}.jodit-filebrowser__files::-webkit-scrollbar{width:calc(8px/2)}.jodit-filebrowser__tree::-webkit-scrollbar{width:calc(8px/2)}.jodit-filebrowser__files::-webkit-scrollbar-track,.jodit-filebrowser__tree::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}.jodit-filebrowser__files::-webkit-scrollbar-thumb,.jodit-filebrowser__tree::-webkit-scrollbar-thumb{background-color:#a9a9a9;outline:1px solid #708090}.jodit-filebrowser__tree.jodit-filebrowser_active{background-color:#3f3f3f;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:290px;min-width:200px;overflow-y:auto;width:31%;z-index:2}@media (max-width:480px){.jodit-filebrowser__tree.jodit-filebrowser_active{height:100px;max-width:100%;width:auto}}.jodit-filebrowser__tree.jodit-filebrowser_active::-webkit-scrollbar{width:calc(8px/2)}.jodit-filebrowser__tree.jodit-filebrowser_active::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}.jodit-filebrowser__tree.jodit-filebrowser_active::-webkit-scrollbar-thumb{background-color:hsla(0,0%,50%,.5);outline:1px solid #708090}.jodit-filebrowser__tree.jodit-filebrowser_active .jodit-filebrowser__source-title{background:#5a5a5a;border-bottom:1px solid #484848;color:#969696;display:block;font-size:12px;padding:2px 4px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;word-break:break-all}.jodit-filebrowser__tree.jodit-filebrowser_active .jodit-filebrowser__tree-item{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid #474747;color:#b1b1b1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;min-height:38px;padding:calc(8px/2) 8px;position:relative;text-decoration:none;-webkit-transition:background-color .2s ease 0s;-o-transition:background-color .2s ease 0s;transition:background-color .2s ease 0s;word-break:break-all}.jodit-filebrowser__tree.jodit-filebrowser_active .jodit-filebrowser__tree-item-title{-webkit-box-flex:1;-ms-flex:1;flex:1}.jodit-filebrowser__tree.jodit-filebrowser_active .jodit-filebrowser__tree-item .jodit-icon_folder{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;height:calc(12px + 4px);-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-left:calc(8px/2);opacity:.3;width:calc(12px + 4px)}.jodit-filebrowser__tree.jodit-filebrowser_active .jodit-filebrowser__tree-item .jodit-icon_folder svg{fill:#b1b1b1!important;stroke:#b1b1b1!important;height:12px;width:12px}.jodit-filebrowser__tree.jodit-filebrowser_active .jodit-filebrowser__tree-item .jodit-icon_folder:hover{background:#696969}.jodit-filebrowser__tree.jodit-filebrowser_active .jodit-filebrowser__tree-item:hover{background-color:#ecebe9;color:#222}.jodit-filebrowser__tree.jodit-filebrowser_active .jodit-filebrowser__tree-item:hover i.jodit-icon_folder{opacity:.6}.jodit-filebrowser__files.jodit-filebrowser_active{-ms-flex-line-pack:start;align-content:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;overflow-y:auto;padding:calc(8px/2);width:100%}.jodit-filebrowser__files.jodit-filebrowser_active .jodit-filebrowser__source-title{background:#5a5a5a;color:#969696;display:block;font-size:16px;margin:calc(8px*-1);margin-bottom:0;padding:8px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;word-break:break-all}.jodit-filebrowser__files.jodit-filebrowser_active a+.jodit-filebrowser__source-title{margin-top:8px}.jodit-filebrowser__files.jodit-filebrowser_active .jodit-filebrowser__files-item{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:1px solid #dadada;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:0;height:150px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:calc(8px/2);overflow:hidden;position:relative;text-align:center;-webkit-transition:border .1s linear,bottom .1s linear;-o-transition:border .1s linear,bottom .1s linear;transition:border .1s linear,bottom .1s linear;width:150px}@media (max-width:480px){.jodit-filebrowser__files.jodit-filebrowser_active .jodit-filebrowser__files-item{width:calc(50% - 8px)}}.jodit-filebrowser__files.jodit-filebrowser_active .jodit-filebrowser__files-item img{max-width:100%}.jodit-filebrowser__files.jodit-filebrowser_active .jodit-filebrowser__files-item:hover{border-color:#433b5c}.jodit-filebrowser__files.jodit-filebrowser_active .jodit-filebrowser__files-item_active_true{background-color:#b5b5b5;border-color:#1e88e5}.jodit-filebrowser__files.jodit-filebrowser_active .jodit-filebrowser__files-item_active_true .jodit-filebrowser__files-item-info{background-color:#b5b5b5;color:#fff;text-shadow:none}.jodit-filebrowser__files.jodit-filebrowser_active .jodit-filebrowser__files-item-info{background-color:#e9e9e9;bottom:0;color:#333;font-size:14px;left:0;line-height:16px;opacity:.85;overflow:visible;padding:.3em .6em;position:absolute;right:0;text-align:left;text-shadow:#eee 0 1px 0;-webkit-transition:opacity .4s ease;-o-transition:opacity .4s ease;transition:opacity .4s ease;white-space:normal}.jodit-filebrowser__files.jodit-filebrowser_active .jodit-filebrowser__files-item-info>span{display:block;font-size:.75em;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap}.jodit-filebrowser__files.jodit-filebrowser_active .jodit-filebrowser__files-item-info>span.jodit-filebrowser__files-item-info-filename{font-size:.9em;font-weight:700}.jodit-filebrowser__files.jodit-filebrowser_active .jodit-filebrowser__files-item:hover:not(.jodit-filebrowser__files-item_active_true) .jodit-filebrowser__files-item-info{bottom:-100px}.jodit-filebrowser__files.jodit-filebrowser_active.jodit-filebrowser__files_view_list{scroll-behavior:smooth}.jodit-filebrowser__files.jodit-filebrowser_active.jodit-filebrowser__files_view_list a{border-width:0 0 1px;display:block;height:26px;line-height:26px;margin:0;text-align:left;white-space:nowrap;width:100%}.jodit-filebrowser__files.jodit-filebrowser_active.jodit-filebrowser__files_view_list a img{display:inline-block;margin-left:4px;max-width:16px;min-width:16px;vertical-align:middle}.jodit-filebrowser__files.jodit-filebrowser_active.jodit-filebrowser__files_view_list a .jodit-filebrowser__files-item-info{background-color:transparent;display:inline-block;font-size:0;height:100%;line-height:inherit;margin-left:4px;padding:0;position:static;vertical-align:middle;width:calc(100% - 20px)}.jodit-filebrowser__files.jodit-filebrowser_active.jodit-filebrowser__files_view_list a .jodit-filebrowser__files-item-info>span{display:inline-block;font-size:12px;height:100%}.jodit-filebrowser__files.jodit-filebrowser_active.jodit-filebrowser__files_view_list a .jodit-filebrowser__files-item-info>span.jodit-filebrowser__files-item-info-filename{width:50%}.jodit-filebrowser__files.jodit-filebrowser_active.jodit-filebrowser__files_view_list a .jodit-filebrowser__files-item-info>span.jodit-filebrowser__files-item-info-filechanged,.jodit-filebrowser__files.jodit-filebrowser_active.jodit-filebrowser__files_view_list a .jodit-filebrowser__files-item-info>span.jodit-filebrowser__files-item-info-filesize{width:25%}.jodit-filebrowser__files.jodit-filebrowser_active.jodit-filebrowser__files_view_list a:hover{background-color:#433b5c}.jodit-filebrowser__files.jodit-filebrowser_active.jodit-filebrowser__files_view_list a:hover .jodit-filebrowser__files-item-info{color:#fff;text-shadow:none}.jodit-filebrowser__files.jodit-filebrowser_active.jodit-filebrowser__files_view_list a:before{content:"";display:inline-block;height:100%;vertical-align:middle}.jodit_draghover{background-color:#ecebe9}.jodit-dialog .jodit-dialog__header-title.jodit-filebrowser__title-box{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;padding-left:8px}.jodit-filebrowser_preview{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;max-height:100%;max-width:1000px;min-height:700px;min-width:600px;position:relative;text-align:center}@media (max-width:768px){.jodit-filebrowser_preview{height:100%;max-height:100%;max-width:100%;min-height:auto;min-width:auto}}.jodit-filebrowser_preview_box{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-filebrowser_preview_navigation{height:100%;left:0;position:absolute;top:0}.jodit-filebrowser_preview_navigation-next{left:auto;right:0}.jodit-filebrowser_preview_navigation svg{fill:#9e9ba7;height:45px;margin-top:-22px;position:relative;top:50%;-webkit-transition:fill .3s linear;-o-transition:fill .3s linear;transition:fill .3s linear;width:45px}.jodit-filebrowser_preview_navigation:hover svg{fill:#000}.jodit-filebrowser_preview img{max-height:100%;max-width:100%}.jodit-image-editor{height:100%;overflow:hidden;padding:8px;width:100%}@media (max-width:768px){.jodit-image-editor{height:auto}}.jodit-image-editor>div,.jodit-image-editor>div>div{height:100%}@media (max-width:768px){.jodit-image-editor>div,.jodit-image-editor>div>div{height:auto;min-height:200px}}.jodit-image-editor *{-webkit-box-sizing:border-box;box-sizing:border-box}.jodit-image-editor .jodit-image-editor__slider-title{background-color:#f9f9f9;border-bottom:1px solid hsla(0,0%,62%,.31);color:#333;cursor:pointer;font-weight:700;line-height:1em;padding:.8em 1em;-o-text-overflow:ellipsis;text-overflow:ellipsis;text-shadow:#f3f3f3 0 1px 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.jodit-image-editor .jodit-image-editor__slider-title svg{display:inline-block;margin-right:8px;vertical-align:middle;width:16px}.jodit-image-editor .jodit-image-editor__slider-content{display:none}.jodit-image-editor .jodit-image-editor__slider.jodit-image-editor_active .jodit-image-editor__slider-title{background-color:#5d5d5d;color:#fff;text-shadow:#000 0 1px 0}.jodit-image-editor .jodit-image-editor__slider.jodit-image-editor_active .jodit-image-editor__slider-title svg{fill:#fff}.jodit-image-editor .jodit-image-editor__slider.jodit-image-editor_active .jodit-image-editor__slider-content{display:block}.jodit-image-editor__area{background-color:#eee;background-image:-o-linear-gradient(45deg,#dadada 25%,transparent 25%,transparent 75%,#dadada 75%,#dadada),-o-linear-gradient(45deg,#dadada 25%,transparent 25%,transparent 75%,#dadada 75%,#dadada);background-image:linear-gradient(45deg,#dadada 25%,transparent 25%,transparent 75%,#dadada 75%,#dadada),linear-gradient(45deg,#dadada 25%,transparent 25%,transparent 75%,#dadada 75%,#dadada);background-position:0 0,15px 15px;background-size:30px 30px;display:none;height:100%;overflow:hidden;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.jodit-image-editor__area.jodit-image-editor_active{display:block}.jodit-image-editor__area .jodit-image-editor__box{height:100%;overflow:hidden;pointer-events:none;position:relative;z-index:1}.jodit-image-editor__area .jodit-image-editor__box img{max-height:100%;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-image-editor__area .jodit-image-editor__croper{background-repeat:no-repeat;border:1px solid #fff;-webkit-box-shadow:0 0 11px #000;box-shadow:0 0 11px #000;height:100px;left:20px;pointer-events:none;position:absolute;top:8px;width:100px;z-index:2}.jodit-image-editor__area .jodit-image-editor__resizer{background-repeat:no-repeat;border:1px solid #fff;-webkit-box-shadow:0 0 11px #000;box-shadow:0 0 11px #000;height:100px;left:20px;pointer-events:none;position:absolute;top:8px;width:100px;z-index:2}.jodit-image-editor__area .jodit-image-editor__croper i.jodit_bottomright{background-color:#8c7878;border:1px solid #383838;border-radius:50%;bottom:calc(8px*-1);-webkit-box-shadow:0 0 11px #000;box-shadow:0 0 11px #000;cursor:se-resize;display:inline-block;height:20px;pointer-events:all;position:absolute;right:calc(8px*-1);width:20px;z-index:4}.jodit-image-editor__area .jodit-image-editor__resizer i.jodit_bottomright{background-color:#8c7878;border:1px solid #383838;border-radius:50%;bottom:calc(8px*-1);-webkit-box-shadow:0 0 11px #000;box-shadow:0 0 11px #000;cursor:se-resize;display:inline-block;height:20px;pointer-events:all;position:absolute;right:calc(8px*-1);width:20px;z-index:4}.jodit-image-editor__area .jodit-image-editor__croper i.jodit_bottomright:active,.jodit-image-editor__area .jodit-image-editor__resizer i.jodit_bottomright:active{border:1px solid #ff0}.jodit-image-editor__area.jodit-image-editor__area_crop{background:#eee;height:100%;line-height:100%;position:relative;text-align:center}.jodit-image-editor__area.jodit-image-editor__area_crop .jodit-image-editor__box{height:100%;line-height:100%;overflow:visible;pointer-events:all;text-align:left}.jodit-image-editor__area.jodit-image-editor__area_crop .jodit-image-editor__box img{height:100%;max-height:100%;max-width:100%;width:100%}.jodit-image-editor__area.jodit-image-editor__area_crop .jodit-image-editor__box:after{background:hsla(0,0%,100%,.3);bottom:0;content:"";left:0;margin:auto;position:absolute;right:0;top:0;z-index:1}.jodit-image-editor__area.jodit-image-editor__area_crop .jodit-image-editor__box .jodit-image-editor__croper{cursor:move;pointer-events:all}.jodit-image-editor__area.jodit-image-editor__area_crop .jodit-image-editor__box .jodit-image-editor__croper i.jodit-image-editor__sizes{background:rgba(0,0,0,.2);border-radius:.4em;bottom:-30px;color:#fff;display:block;font-size:12px;left:100%;padding:9px 6px;position:absolute;text-align:center;text-shadow:none;white-space:pre}.jodit-image-editor__area.jodit-image-editor__area_crop.jodit-image-editor_active{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-status-bar{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#f9f9f9;border-radius:0 0 3px 3px;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:11px;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;overflow:hidden;padding:0 calc(8px/2)}.jodit-status-bar:before{content:"";-webkit-box-flex:1;-ms-flex:auto;flex:auto;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.jodit-status-bar .jodit-status-bar__item{line-height:1.57142857em;margin:0 8px 0 0;-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0;padding:0}.jodit-status-bar .jodit-status-bar__item{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;font-size:11px}.jodit-status-bar .jodit-status-bar__item>span{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;font-size:11px}.jodit-status-bar .jodit-status-bar__item.jodit-status-bar__item-right{margin:0 0 0 8px;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.jodit-status-bar .jodit-status-bar__item a{border-radius:3px;cursor:default;text-decoration:none}.jodit-status-bar .jodit-status-bar__item a:hover{background-color:#dadada;color:#222;text-decoration:none}.jodit-workplace+.jodit-status-bar:not(:empty){border-top:1px solid #dadada}.jodit_disabled .jodit-status-bar{opacity:.4}.jodit-drag-and-drop__file-box{border:1px dashed #dadada;margin:8px 0;overflow:hidden;padding:25px 0;position:relative;text-align:center;width:100%}.jodit_uploadfile_button{border:1px dashed #dadada;margin:8px 0;overflow:hidden;padding:25px 0;position:relative;text-align:center;width:100%}.jodit-drag-and-drop__file-box:hover{background-color:#ecebe9}.jodit_uploadfile_button:hover{background-color:#ecebe9}.jodit-drag-and-drop__file-box input,.jodit_uploadfile_button input{bottom:0;cursor:pointer;font-size:400px;left:0;margin:0;opacity:0;padding:0;position:absolute;right:0;top:0}@media (max-width:768px){.jodit-drag-and-drop__file-box{max-width:100%;min-width:180px;width:auto}}.jodit-add-new-line{display:block;height:1px;outline:none;position:fixed;top:0;z-index:1}.jodit-add-new-line,.jodit-add-new-line *{-webkit-box-sizing:border-box;box-sizing:border-box}.jodit-add-new-line:after{background-color:#6b6b6b;content:"";display:block;height:1px;width:calc(100% - 30px)}.jodit-add-new-line span{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:hsla(40,7%,92%,0.3);border:1px solid #6b6b6b;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;height:calc(8px*2);-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:absolute;right:0;width:30px}.jodit-add-new-line span:hover{background:#ecebe9}.jodit-add-new-line_after span{bottom:0}.jodit-add-new-line svg{fill:#6b6b6b;width:16px}.jodit-source__mode .jodit-add-new-line{display:none!important}.jodit-about{padding:20px}.jodit-about a{color:#459ce7;text-decoration:none}.jodit-about a:focus,.jodit-about a:hover{color:#23527c;outline:0;text-decoration:underline}.jodit-about div{margin-bottom:calc(8px/2)}.jodit-paste-storage{max-width:600px;padding:8px}@media (max-width:768px){.jodit-paste-storage{max-width:100%}}.jodit-paste-storage>div{border:1px solid #dadada;max-height:300px;max-width:100%}.jodit-paste-storage>div:first-child{margin-bottom:8px}.jodit-paste-storage>div:first-child a{border:1px solid transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:#4c4c4c;display:block;margin:0;max-width:100%;outline:none;overflow:hidden;padding:calc(8px/2);text-decoration:none;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:pre}.jodit-paste-storage>div:first-child a.jodit_active{background-color:#575757;color:#fff}.jodit-paste-storage>div:first-child a:focus{outline:none}.jodit-paste-storage>div:last-child{overflow:auto;padding:8px}.jodit-paste-storage>div:last-child li,.jodit-paste-storage>div:last-child ul{margin:0}.jodit-color-picker{margin:0;text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-color-picker .jodit-color-picker__group{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-bottom:calc(8px/2);max-width:calc(24px*10);white-space:normal}.jodit-color-picker a{border:1px solid transparent;display:block;height:24px;text-align:center;text-decoration:none;vertical-align:middle;width:24px}.jodit-color-picker a:hover{border-color:#000}.jodit-color-picker a.jodit_active{border:2px solid #1e88e5}.jodit-color-picker a:active{border:2px solid #1e88e5}.jodit-color-picker__native svg{display:inline-block;height:16px;margin-right:4px;width:16px}.jodit-color-picker__native input{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:18px;padding:0;width:18px}.jodit-color-picker__native input[type=color]::-webkit-color-swatch-wrapper{padding:0}.jodit-color-picker__native input input[type=color]::-webkit-color-swatch{border:none}.jodit-tabs{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px}.jodit-tabs .jodit-tabs__buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;line-height:18px;margin-bottom:calc(8px/2);margin-top:4px}.jodit-tabs .jodit-tabs__buttons>*{margin-left:calc(8px/2)}.jodit-tabs .jodit-tabs__buttons>:only-of-type{width:100%}.jodit-tabs .jodit-tabs__buttons>:first-child{margin-left:0}@media (max-width:480px){.jodit-tabs .jodit-tabs__buttons{display:block}.jodit-tabs .jodit-tabs__buttons>*{margin-left:0;width:100%}}.jodit-tabs__button{min-width:80px}.jodit-tabs__button_columns_3{width:100%/3}.jodit-tabs__button_columns_2{width:50%}.jodit-tabs .jodit-tabs__wrapper .jodit-tab{display:none}.jodit-tabs .jodit-tabs__wrapper .jodit-tab.jodit-tab_active{display:block}.jodit-tabs .jodit-tabs__wrapper .jodit-tab.jodit-tab_empty{min-height:100px;min-width:220px}.jodit_error_box_for_messages{bottom:0;height:0;overflow:visible;position:absolute;right:0;width:0;z-index:3}.jodit_error_box_for_messages>*{background:rgba(255,0,0,.29);border:1px solid hsla(0,65%,67%,.44);bottom:0;color:#e02b2b;display:block;font-size:14px;opacity:0;padding:2px 7px;position:absolute;right:calc(8px/2);-webkit-transition:opacity .1s linear,bottom .3s linear;-o-transition:opacity .1s linear,bottom .3s linear;transition:opacity .1s linear,bottom .3s linear;white-space:pre}.jodit_error_box_for_messages>.active{opacity:1}.jodit_error_box_for_messages>.info{background:rgba(204,229,247,.71);border:1px solid hsla(0,0%,60%,.44);color:#776565}.jodit_error_box_for_messages>.success{background:rgba(77,236,112,.29);border:1px solid hsla(0,0%,58%,.44);color:#5d5a5a}.jodit_fullsize-box_true{overflow:visible!important;position:static!important;z-index:100000!important}body.jodit_fullsize-box_true,html.jodit_fullsize-box_true{height:0!important;overflow:initial!important;width:0!important}html.jodit_fullsize-box_true{position:fixed!important}.jodit_fullsize{bottom:0;left:0;max-width:none!important;position:absolute;right:0;top:0;z-index:100000}.jodit_fullsize .toolbar{width:100%!important}.jodit_fullsize .jodit__area,.jodit_fullsize .jodit_editor{height:100%}.jodit-properties__lock>svg,.jodit-properties__unlock>svg{fill:#222;display:inline-block;font-size:8px;font-style:normal;height:14px;line-height:14px;overflow:hidden;-webkit-transform-origin:0 0!important;-ms-transform-origin:0 0!important;transform-origin:0 0!important;vertical-align:middle;width:14px}.jodit-properties .jodit-properties_view_box{padding:8px}.jodit-properties .jodit-properties_view_box .jodit-properties_image_view{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#f6f6f6;display:-webkit-box;display:-ms-flexbox;display:flex;height:150px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:0 0 8px;padding:0}.jodit-properties .jodit-properties_view_box .jodit-properties_image_view img{max-height:100%;max-width:100%}.jodit-properties .jodit-properties_view_box .jodit-properties_image_sizes.jodit-form__group{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin:0!important;min-width:auto;padding:0!important}.jodit-properties .jodit-properties_view_box .jodit-properties_image_sizes.jodit-form__group a{cursor:pointer;display:inline-block}.jodit-properties .jodit-properties_view_box .jodit-properties_image_sizes.jodit-form__group .jodit-input{width:calc(50% - 8px)!important}.jodit-popup-inline__container{min-width:700px;z-index:1300}.jodit-placeholder{color:#a5a5a5;display:block;left:0;padding:8px;pointer-events:none;position:absolute;top:0;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important;width:100%;z-index:1}[data-jodit_iframe_wrapper]{display:block;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[data-jodit_iframe_wrapper]:after{background:transparent;bottom:0;content:"";cursor:pointer;display:block;left:0;position:absolute;right:0;top:0;z-index:1}.jodit-resizer{border:1px solid #4c4c4c;font-size:0;height:100px;left:0;pointer-events:none;position:absolute;top:0;width:100px}.jodit-resizer *{-webkit-box-sizing:border-box;box-sizing:border-box}.jodit-resizer>span{background-color:#a5a5a5;color:#fff;font-size:12px;height:24px;left:50%;line-height:24px;margin-left:calc(70px/-2);margin-top:calc(24px/-2);opacity:0;overflow:visible;text-align:center;top:50%;-webkit-transition:opacity .2s linear;-o-transition:opacity .2s linear;transition:opacity .2s linear;width:70px}.jodit-resizer>i,.jodit-resizer>span{display:inline-block;position:absolute}.jodit-resizer>i{background-color:#dadada;border:1px solid #4c4c4c;height:8px;pointer-events:all;width:8px;z-index:4}.jodit-resizer>i:hover{background-color:#f8f8f8}.jodit-resizer>i:first-child{cursor:nw-resize;left:calc(8px/-2);top:calc(8px/-2)}.jodit-resizer>i:nth-child(2){cursor:ne-resize;right:calc(8px/-2);top:calc(8px/-2)}.jodit-resizer>i:nth-child(3){bottom:calc(8px/-2);cursor:se-resize;right:calc(8px/-2)}.jodit-resizer>i:nth-child(4){bottom:calc(8px/-2);cursor:sw-resize;left:calc(8px/-2)}.jodit-search{height:0;position:absolute;right:0;top:0;visibility:hidden;width:0}.jodit-search_sticky{position:fixed}.jodit-search.jodit-search_active{visibility:visible}.jodit-search .jodit-search__box{background-color:#f9f9f9;border:solid #dadada;border-width:0 0 1px 1px;display:-webkit-box;display:-ms-flexbox;display:flex;max-width:100vw;padding:calc(8px/2);position:absolute;right:0;width:320px}.jodit-search .jodit-search__box input{background-color:transparent;border:0;height:100%;margin:0;outline:none;padding:0 8px;width:100%}.jodit-search .jodit-search__box input[data-ref=replace]{display:none}.jodit-search .jodit-search__box input:not(:focus)+input:not(:focus){border-top:1px solid #dadada}.jodit-search .jodit-search__box .jodit-search__buttons{height:30px}.jodit-search .jodit-search__box .jodit-search__counts{height:30px}.jodit-search .jodit-search__box .jodit-search__inputs{height:30px}.jodit-search .jodit-search__box .jodit-search__inputs{padding-right:calc(8px/2);width:60%}.jodit-search .jodit-search__box .jodit-search__counts{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-left:1px solid #dadada;color:#dadada;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:15%}.jodit-search .jodit-search__box .jodit-search__buttons{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding-left:0}.jodit-search .jodit-search__box .jodit-search__buttons button{background-color:transparent;border:1px solid transparent;height:100%;margin-right:1%;width:32%}.jodit-search .jodit-search__box .jodit-search__buttons button[data-ref=replace-btn]{border:1px solid #dadada;display:none;margin-top:2px;width:100%}.jodit-search .jodit-search__box .jodit-search__buttons button:hover{background-color:#ecebe9}.jodit-search .jodit-search__box .jodit-search__buttons button:focus{border:1px solid rgba(181,214,253,0.5)}.jodit-search .jodit-search__box .jodit-search__buttons button:active{border:1px solid #b5d6fd;-webkit-transform:scale(0.95);-ms-transform:scale(0.95);transform:scale(0.95)}.jodit-search.jodit-search_replace .jodit-search__counts{height:calc(30px*2)}.jodit-search.jodit-search_replace .jodit-search__inputs{height:calc(30px*2)}.jodit-search.jodit-search_replace .jodit-search__counts input{height:50%;-webkit-transition:background-color 0.1s linear;-o-transition:background-color 0.1s linear;transition:background-color 0.1s linear}.jodit-search.jodit-search_replace .jodit-search__inputs input{height:50%;-webkit-transition:background-color 0.1s linear;-o-transition:background-color 0.1s linear;transition:background-color 0.1s linear}.jodit-search.jodit-search_replace .jodit-search__counts input:focus{-webkit-box-shadow:inset 0 0 3px 0 #dadada;box-shadow:inset 0 0 3px 0 #dadada}.jodit-search.jodit-search_replace .jodit-search__inputs input:focus{-webkit-box-shadow:inset 0 0 3px 0 #dadada;box-shadow:inset 0 0 3px 0 #dadada}.jodit-search.jodit-search_replace .jodit-search__buttons{-ms-flex-wrap:wrap;flex-wrap:wrap}.jodit-search.jodit-search_replace .jodit-search__buttons button[data-ref=replace-btn],.jodit-search.jodit-search_replace .jodit-search__inputs input[data-ref=replace]{display:block}.jodit-container:not(.jodit_inline){min-height:100px}.jodit-container:not(.jodit_inline) .jodit-workplace{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:auto;min-height:50px;overflow:hidden}.jodit-container:not(.jodit_inline) .jodit-editor__resize{position:relative}.jodit-container:not(.jodit_inline) .jodit-editor__resize a{border-bottom:0 dashed transparent;border-left:0 dashed transparent;border-right:7px solid #dadada;border-top:7px dashed transparent;bottom:0;cursor:se-resize;height:0;overflow:hidden;position:absolute;right:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:0}.jodit-source{background-color:#323232;display:none;-webkit-box-flex:1;-ms-flex:auto;flex:auto;overflow:auto;position:relative}.jodit-source,.jodit-source .jodit-source__mirror-fake{min-height:100%}.jodit-source *{font:12px/normal Monaco,Menlo,Ubuntu Mono,Consolas,source-code-pro,monospace}.jodit-container.jodit-source__mode .jodit-wysiwyg,.jodit-container.jodit-source__mode .jodit-wysiwyg_iframe{display:none!important}.jodit-container.jodit-source__mode .jodit-source{display:block!important}.jodit-container.jodit_split_mode .jodit-workplace{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.jodit-container.jodit_split_mode .jodit-source,.jodit-container.jodit_split_mode .jodit-wysiwyg,.jodit-container.jodit_split_mode .jodit-wysiwyg_iframe{display:block!important;-webkit-box-flex:1;-ms-flex:1;flex:1;width:50%}.jodit-source__mirror{background:#323232;border:0;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:#f0f0f0;font:12px/normal Monaco,Menlo,Ubuntu Mono,Consolas,source-code-pro,monospace;height:100%;line-height:1.5;margin:0;min-height:100%;outline:none;overflow:auto;padding:8px;resize:none;-moz-tab-size:2em;-o-tab-size:2em;tab-size:2em;white-space:pre-wrap;width:100%;z-index:2}.jodit-source__mirror::-moz-selection{background:#bdbdbd}.jodit-source__mirror::selection{background:#bdbdbd}.jodit_sticky-dummy_toolbar{display:none}.jodit_sticky>.jodit-toolbar__box{border-bottom:1px solid #dadada;left:auto;position:fixed;position:sticky;top:0;z-index:3}.jodit_sticky .jodit_sticky-dummy_toolbar{display:block}.jodit-symbols{padding:8px;width:460px}.jodit-symbols .jodit-symbols__container_preview,.jodit-symbols .jodit-symbols__container_table{display:inline-block;vertical-align:top}.jodit-symbols .jodit-symbols__container_table{width:88%}.jodit-symbols .jodit-symbols__container_preview{width:12%}.jodit-symbols .jodit-symbols__container_preview .jodit-symbols__preview{border:1px solid #dadada;font-size:34px;padding:20px 0;text-align:center}.jodit-symbols table{border:0;border-spacing:0;table-layout:fixed}.jodit-symbols table td{padding:0}.jodit-symbols table td a{border:1px solid transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:#4c4c4c;display:inline-block;font-size:16px;height:calc(18px*1.2);line-height:calc(18px*1.2);text-align:center;text-decoration:none;vertical-align:top;width:calc(18px*1.2)}.jodit-symbols table td a:focus{outline:2px solid #dadada}.jodit-symbols table td a:hover{outline:2px solid #dadada}.jodit-table-resizer{cursor:col-resize;margin-left:calc(8px/-2);padding-left:calc(8px/2);padding-right:calc(8px/2);position:absolute;z-index:3}.jodit-table-resizer:after{border:0;content:"";display:block;height:100%;width:0}.jodit-table-resizer_moved{background-color:#b5d6fd;z-index:2}.jodit-table-resizer_moved:after{border-right:1px solid moved}.jodit-wysiwyg table{border:none;border-collapse:collapse;empty-cells:show;margin-bottom:1em;margin-top:1em;max-width:100%;table-layout:fixed}.jodit-wysiwyg table tr{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-wysiwyg table tr td,.jodit-wysiwyg table tr th{border:1px solid #bfbfbf;min-width:2em;padding:.4em;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;vertical-align:middle}.jodit-form__inserter .jodit-form__table-creator-box{display:-webkit-box;display:-ms-flexbox;display:flex}@media (max-width:768px){.jodit-form__inserter .jodit-form__table-creator-box{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.jodit-form__inserter .jodit-form__table-creator-box .jodit-form__container{font-size:0;margin:0;min-width:180px;padding:0}.jodit-form__inserter .jodit-form__table-creator-box .jodit-form__container>div>span{border:1px solid #dadada;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;height:18px;margin-bottom:2px;margin-left:2px;vertical-align:top;width:18px}.jodit-form__inserter .jodit-form__table-creator-box .jodit-form__container>div>span:first-child{margin-left:0}.jodit-form__inserter .jodit-form__table-creator-box .jodit-form__container>div>span.jodit_hovered{background:#7a450f;border-color:#7a450f}.jodit-form__inserter .jodit-form__table-creator-box .jodit-form__options{font-size:14px}.jodit-form__inserter .jodit-form__table-creator-box .jodit-form__options label{padding-top:0;text-align:left}.jodit-form__inserter .jodit-form__table-creator-box .jodit-form__options label input{margin-right:8px}.jodit-form__inserter label{font-size:14px;margin:0;padding:8px;text-align:center}.jodit-tooltip{text-rendering:optimizeLegibility;background:#727171;background-clip:padding-box;border-radius:2px;color:#fff;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;font-size:11px;line-height:1.4;max-width:120px;opacity:0;padding:calc(8px/4) calc(8px/2);position:fixed;-webkit-transition:opacity .2s ease 0s;-o-transition:opacity .2s ease 0s;transition:opacity .2s ease 0s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:normal;width:auto;z-index:10000002}@media (max-width:768px){.jodit-tooltip{display:none}}.jodit-tooltip.jodit-tooltip_visible{opacity:1}.jodit-xpath{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:calc(8px/-2)}.jodit-xpath__item{display:-webkit-box;display:-ms-flexbox;display:flex;height:11px;line-height:calc(11px - 1px)}.jodit-xpath__item a{color:#4c4c4c;font-size:11px;margin-left:2px;outline:0;padding:0 3px} .jodit-toolbar-editor-collection_container{min-height:72px}.jodit-toolbar-editor-collection{margin:0!important;padding:0!important;font-family:Roboto,Helvetica,Arial,sans-serif;font-size:16px;line-height:16px;text-align:initial;background:0 0!important;border:none;box-shadow:none}.jodit-toolbar-editor-collection_mode_horizontal{padding:20px 12px 0!important}.jodit-toolbar-editor-collection .jodit-ui-group .jodit-toolbar-button{min-width:30px;line-height:100%}.jodit-toolbar-editor-collection .jodit-ui-group .jodit-toolbar-button:focus{outline:0}.jodit-toolbar-editor-collection .jodit-ui-group .jodit-toolbar-button .jodit-icon{display:inline-block;width:20px;height:20px;color:#333;font-size:20px;line-height:20px;vertical-align:top}.jodit-toolbar-editor-collection .jodit-ui-group .jodit-toolbar-button .jodit-icon.stack{position:relative}.jodit-toolbar-editor-collection .jodit-ui-group .jodit-toolbar-button .jodit-icon .stacked{position:absolute;top:0;left:0;width:100%;height:100%;line-height:100%;text-align:center}.jodit-toolbar-editor-collection .jodit-toolbar-button{transition:all .2s linear,opacity .1s linear}.jodit-toolbar-editor-collection .jodit-toolbar-button_with-trigger_true{padding:0 5px;border:none}.jodit-toolbar-editor-collection .jodit-toolbar-button_with-trigger_true .jodit-toolbar-button__trigger{opacity:1;background:0 0}.jodit-toolbar-editor-collection .jodit-toolbar-button_with-trigger_true .jodit-toolbar-button__trigger svg{fill:currentColor}.jodit-toolbar-editor-collection .jodit-toolbar-button:active:not([disabled]){color:#ff6590;background:#ffe5ec}.jodit-toolbar-editor-collection .jodit-toolbar-button:active:not([disabled])>button{color:inherit;background:inherit}.jodit-toolbar-editor-collection .jodit-toolbar-button:active:not([disabled]) .jodit-icon{color:inherit}.jodit-toolbar-editor-collection .jodit-toolbar-button:active:not([disabled]) .jodit-toolbar-button__trigger svg{fill:currentColor}.jodit-toolbar-editor-collection .jodit-toolbar-button:hover:not([disabled]){background-color:transparent;color:#ff6590;background:0 0}.jodit-toolbar-editor-collection .jodit-toolbar-button:hover:not([disabled])>button{color:inherit;background:inherit}.jodit-toolbar-editor-collection .jodit-toolbar-button:hover:not([disabled]) .jodit-icon{color:inherit}.jodit-toolbar-editor-collection .jodit-toolbar-button:hover:not([disabled]) .jodit-toolbar-button__trigger svg{fill:currentColor}.jodit-toolbar-editor-collection .jodit-toolbar-button[aria-pressed=true]:not([disabled]){color:#ff6590;background:#ffe5ec}.jodit-toolbar-editor-collection .jodit-toolbar-button[aria-pressed=true]:not([disabled])>button{color:inherit;background:inherit}.jodit-toolbar-editor-collection .jodit-toolbar-button[aria-pressed=true]:not([disabled]) .jodit-icon{color:inherit}.jodit-toolbar-editor-collection .jodit-toolbar-button[aria-pressed=true]:not([disabled]) .jodit-toolbar-button__trigger svg{fill:currentColor}.jodit-toolbar-editor-collection .jodit-toolbar-button.popup_open,.jodit-toolbar-editor-collection .jodit-toolbar-button.popup_open:hover{color:#c3c3c3;background:0 0}.jodit-toolbar-editor-collection .jodit-toolbar-button.popup_open:hover>button,.jodit-toolbar-editor-collection .jodit-toolbar-button.popup_open>button{color:inherit;background:inherit}.jodit-toolbar-editor-collection .jodit-toolbar-button.popup_open .jodit-icon,.jodit-toolbar-editor-collection .jodit-toolbar-button.popup_open:hover .jodit-icon{color:inherit}.jodit-toolbar-editor-collection .jodit-toolbar-button.popup_open .jodit-toolbar-button__trigger svg,.jodit-toolbar-editor-collection .jodit-toolbar-button.popup_open:hover .jodit-toolbar-button__trigger svg{fill:currentColor}.jodit-toolbar-editor-collection .jodit-toolbar-button.jodit-toolbar-button-separator{min-width:0}.jodit-toolbar-editor-collection .jodit-toolbar-button>a .jodit-with_dropdownlist-trigger{vertical-align:top}.jodit-toolbar-editor-collection .jodit-toolbar-button .picker_label{display:inline-block;height:20px;line-height:20px}.jodit-toolbar-editor-collection .jodit-toolbar-button .picker_label .mdi{display:none}.jodit-toolbar-editor-collection .jodit-toolbar-button blockquote{border:none}.jodit-toolbar-editor-collection_list>.jodit-toolbar-editor-collection,.jodit-toolbar-editor-collection_list>.jodit-toolbar-editor-collection .jodit-toolbar-editor-collection{padding:0!important;background:#fff;border:1px solid #ccc;box-shadow:rgba(0,0,0,.2) 0 2px 8px}.jodit-toolbar-editor-collection_list>.jodit-toolbar-editor-collection .jodit-toolbar-button>button{padding:8px 16px}.jodit-toolbar-button-left .jodit-toolbar-editor-collection_list>.jodit-toolbar-editor-collection .jodit-toolbar-button>button{padding:8px 12px}.jodit-colorpicker>div{margin-bottom:8px}.jodit-colorpicker .btn_reset_color{width:auto}.jodit-colorpicker .btn_reset_color:active,.jodit-colorpicker .btn_reset_color:hover{color:#ff6590;background:0 0}.jodit-colorpicker .btn_reset_color span{float:none}.jodit-colorpicker .btn_reset_color>span{display:inline-block;height:20px;line-height:20px}.jodit-colorpicker .btn_reset_color>span:focus{outline:0}.jodit-colorpicker .btn_reset_color>span span.jodit-icon{color:inherit}.jodit-colorpicker .selected_color_marker::before{display:none}.jodit-colorpicker .selected_color_marker svg{display:none}.jodit-toolbar-editor-collection_popup{margin-top:6px}.jodit-toolbar-button_tooltip .jodit-toolbar-button__icon{display:block;width:20px;height:20px;font-size:20px}.jodit-toolbar-button_tooltip .jodit-toolbar-button__text{display:none} -.jodit-wrapper[data-v-28543044] .jodit-container:not(.jodit_inline){display:flex;min-height:140px;flex-direction:column;border:none}.jodit-wrapper[data-v-28543044] .jodit-container:not(.jodit_inline) .jodit-workplace{border:none}.jodit-wrapper[data-v-28543044] .jodit-placeholder{font-style:italic}.jodit-wrapper[data-v-28543044] .jodit-source{background:0 0}.jodit-wrapper[data-v-28543044] .jodit-source .ace-editor{font-size:13px;font-family:Menlo,"Ubuntu Mono",Consolas,source-code-pro,monospace}.jodit-wrapper[data-v-28543044] .jodit-status-bar{height:26px;margin-top:auto;line-height:25px;background-color:transparent;border:none}.jodit-wrapper[data-v-28543044] .jodit-status-bar .jodit-status-bar__item{line-height:inherit}.jodit-wrapper[data-v-28543044] .jodit-status-bar .jodit-toolbar-button{line-height:inherit;vertical-align:top}.jodit-wrapper[data-v-28543044] .jodit-status-bar .jodit-toolbar-button>a{vertical-align:middle}.jodit-wrapper[data-v-28543044] .jodit-status-bar .jodit-toolbar-button .jodit-icon{display:inline-block;width:18px;height:18px;color:#333;font-size:18px;line-height:18px} -.jodit-container[data-v-147d3590]{min-width:11.25rem;min-height:8.75rem}.tce-jodit-html[data-v-147d3590] {text-align:initial}.tce-jodit-html[data-v-147d3590] .jodit-container{border:none}.tce-jodit-html[data-v-147d3590] .jodit-workplace,.tce-jodit-html[data-v-147d3590] .jodit-wysiwyg{overflow:visible}.tce-jodit-html[data-v-147d3590] .jodit-wysiwyg{overflow-wrap:break-word}.tce-jodit-html[data-v-147d3590] .tce-jodit-tooltip{display:inline-block;position:relative;background:rgba(205,215,220,.7);text-decoration:underline dotted #37474f;cursor:help}.tce-jodit-html[data-v-147d3590] .tce-jodit-tooltip::before{content:"";position:absolute;bottom:100%;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #37474f}.tce-jodit-html[data-v-147d3590] .tce-jodit-tooltip::after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 6px - 1px);left:-.625rem;min-width:9.375rem;max-width:18.75rem;padding:.375rem;text-align:center;color:#fff;font-size:.9em;background:#37474f;border-radius:2px}.tce-jodit-html[data-v-147d3590] .tce-jodit-tooltip::after,.tce-jodit-html[data-v-147d3590] .tce-jodit-tooltip::before{visibility:hidden;transition:opacity .1s ease-out,margin .1s ease-out;opacity:0}.tce-jodit-html[data-v-147d3590] .tce-jodit-tooltip:hover::after,.tce-jodit-html[data-v-147d3590] .tce-jodit-tooltip:hover::before{visibility:visible;margin-bottom:.25rem;opacity:1}[data-v-147d3590] .jodit-container:not(.jodit-inline){min-height:8.75rem;font-size:1rem;background:0 0!important}.jodit-html-placeholder[data-v-147d3590]{display:flex;align-items:center;flex-direction:column;min-height:8.75rem;margin-bottom:0;padding:.5rem 0 0}.jodit-html-placeholder .placeholder-avatar[data-v-147d3590]{display:flex;justify-content:center;align-items:center;width:3.75rem;height:3.75rem;padding-top:.125rem;color:#f1f1f1;font-size:2rem;line-height:2rem;background:#263238;border-radius:50%}.jodit-html-placeholder .placeholder-avatar .divider[data-v-147d3590]{font-size:.75rem}.jodit-html-placeholder .message[data-v-147d3590]{padding:.5rem 0;text-align:center;font-family:Roboto,sans-serif;font-size:1rem;font-weight:400;line-height:1.75rem}.jodit-html-placeholder .message span[data-v-147d3590]{display:block}.jodit-html-placeholder .message .heading[data-v-147d3590]{padding:.5rem 0;font-size:1.5rem;line-height:2rem}.tce-jodit-html.disabled .placeholder-avatar[data-v-147d3590]{background:#424242}.tce-jodit-html.disabled .message[data-v-147d3590]{color:#424242}.tce-jodit-html.sm .jodit-container[data-v-147d3590]{min-height:5.5rem}.tce-jodit-html.sm[data-v-147d3590] .jodit-container:not(.jodit-inline){min-height:5.5rem}.tce-jodit-html.sm .jodit-html-placeholder[data-v-147d3590]{min-height:5.5rem}.tce-jodit-html.sm .jodit-html-placeholder .placeholder-avatar[data-v-147d3590]{width:2.5rem;height:2.5rem;font-size:1.25rem;font-weight:500}.tce-jodit-html.sm .jodit-html-placeholder .message[data-v-147d3590]{padding:0}.tce-jodit-html.sm .jodit-html-placeholder .heading[data-v-147d3590]{padding:.5rem 0 0 0;font-size:.875rem!important;font-weight:500;line-height:1.25rem} \ No newline at end of file +.jodit-wrapper[data-v-a1556a42] .jodit-container:not(.jodit_inline){display:flex;min-height:140px;flex-direction:column;border:none}.jodit-wrapper[data-v-a1556a42] .jodit-container:not(.jodit_inline) .jodit-workplace{border:none}.jodit-wrapper[data-v-a1556a42] .jodit-placeholder{font-style:italic}.jodit-wrapper[data-v-a1556a42] .jodit-source{background:0 0}.jodit-wrapper[data-v-a1556a42] .jodit-source .ace-editor{font-size:13px;font-family:Menlo,"Ubuntu Mono",Consolas,source-code-pro,monospace}.jodit-wrapper[data-v-a1556a42] .jodit-status-bar{height:26px;margin-top:auto;line-height:25px;background-color:transparent;border:none}.jodit-wrapper[data-v-a1556a42] .jodit-status-bar .jodit-status-bar__item{line-height:inherit}.jodit-wrapper[data-v-a1556a42] .jodit-status-bar .jodit-toolbar-button{line-height:inherit;vertical-align:top}.jodit-wrapper[data-v-a1556a42] .jodit-status-bar .jodit-toolbar-button>a{vertical-align:middle}.jodit-wrapper[data-v-a1556a42] .jodit-status-bar .jodit-toolbar-button .jodit-icon{display:inline-block;width:18px;height:18px;color:#333;font-size:18px;line-height:18px}.jodit-wrapper[data-v-a1556a42] .jodit_error_box_for_messages>.load{box-sizing:border-box;color:#fff}@keyframes dots-data-v-a1556a42{0%{opacity:0}30%{opacity:1}100%{opacity:0}}.jodit-wrapper[data-v-a1556a42] .jodit_error_box_for_messages>.load>.dot{display:inline-block;width:4px;height:4px;margin-right:6px;border-radius:50%;background-color:currentColor;animation-name:dots-data-v-a1556a42;animation-duration:1.5s;animation-iteration-count:infinite;animation-fill-mode:both}.jodit-wrapper[data-v-a1556a42] .jodit_error_box_for_messages>.load>.dot:nth-child(1){margin-left:6px}.jodit-wrapper[data-v-a1556a42] .jodit_error_box_for_messages>.load>.dot:nth-child(2){animation-delay:.3s}.jodit-wrapper[data-v-a1556a42] .jodit_error_box_for_messages>.load>.dot:nth-child(3){margin-right:0;animation-delay:.5s} +.jodit-container[data-v-5027ddb9]{min-width:11.25rem;min-height:8.75rem}.tce-jodit-html[data-v-5027ddb9] {text-align:initial}.tce-jodit-html[data-v-5027ddb9] .jodit-container{border:none}.tce-jodit-html[data-v-5027ddb9] .jodit-workplace,.tce-jodit-html[data-v-5027ddb9] .jodit-wysiwyg{overflow:visible}.tce-jodit-html[data-v-5027ddb9] .jodit-wysiwyg{overflow-wrap:break-word}.tce-jodit-html[data-v-5027ddb9] .tce-jodit-tooltip{display:inline-block;position:relative;background:rgba(205,215,220,.7);text-decoration:underline dotted #37474f;cursor:help}.tce-jodit-html[data-v-5027ddb9] .tce-jodit-tooltip::before{content:"";position:absolute;bottom:100%;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #37474f}.tce-jodit-html[data-v-5027ddb9] .tce-jodit-tooltip::after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 6px - 1px);left:-.625rem;min-width:9.375rem;max-width:18.75rem;padding:.375rem;text-align:center;color:#fff;font-size:.9em;background:#37474f;border-radius:2px}.tce-jodit-html[data-v-5027ddb9] .tce-jodit-tooltip::after,.tce-jodit-html[data-v-5027ddb9] .tce-jodit-tooltip::before{visibility:hidden;transition:opacity .1s ease-out,margin .1s ease-out;opacity:0}.tce-jodit-html[data-v-5027ddb9] .tce-jodit-tooltip:hover::after,.tce-jodit-html[data-v-5027ddb9] .tce-jodit-tooltip:hover::before{visibility:visible;margin-bottom:.25rem;opacity:1}[data-v-5027ddb9] .jodit-container:not(.jodit-inline){min-height:8.75rem;font-size:1rem;background:0 0!important}.jodit-html-placeholder[data-v-5027ddb9]{display:flex;align-items:center;flex-direction:column;min-height:8.75rem;margin-bottom:0;padding:.5rem 0 0}.jodit-html-placeholder .placeholder-avatar[data-v-5027ddb9]{display:flex;justify-content:center;align-items:center;width:3.75rem;height:3.75rem;padding-top:.125rem;color:#f1f1f1;font-size:2rem;line-height:2rem;background:#263238;border-radius:50%}.jodit-html-placeholder .placeholder-avatar .divider[data-v-5027ddb9]{font-size:.75rem}.jodit-html-placeholder .message[data-v-5027ddb9]{padding:.5rem 0;text-align:center;font-family:Roboto,sans-serif;font-size:1rem;font-weight:400;line-height:1.75rem}.jodit-html-placeholder .message span[data-v-5027ddb9]{display:block}.jodit-html-placeholder .message .heading[data-v-5027ddb9]{padding:.5rem 0;font-size:1.5rem;line-height:2rem}.tce-jodit-html.disabled .placeholder-avatar[data-v-5027ddb9]{background:#424242}.tce-jodit-html.disabled .message[data-v-5027ddb9]{color:#424242}.tce-jodit-html.sm .jodit-container[data-v-5027ddb9]{min-height:5.5rem}.tce-jodit-html.sm[data-v-5027ddb9] .jodit-container:not(.jodit-inline){min-height:5.5rem}.tce-jodit-html.sm .jodit-html-placeholder[data-v-5027ddb9]{min-height:5.5rem}.tce-jodit-html.sm .jodit-html-placeholder .placeholder-avatar[data-v-5027ddb9]{width:2.5rem;height:2.5rem;font-size:1.25rem;font-weight:500}.tce-jodit-html.sm .jodit-html-placeholder .message[data-v-5027ddb9]{padding:0}.tce-jodit-html.sm .jodit-html-placeholder .heading[data-v-5027ddb9]{padding:.5rem 0 0 0;font-size:.875rem!important;font-weight:500;line-height:1.25rem} \ No newline at end of file diff --git a/dist/tce-jodit.es.js b/dist/tce-jodit.es.js index f819271..a1cb864 100644 --- a/dist/tce-jodit.es.js +++ b/dist/tce-jodit.es.js @@ -1,7 +1,9 @@ import 'jodit/build/jodit.min.css'; import debounce from 'lodash/debounce'; +import isEmpty$1 from 'lodash/isEmpty'; import { Jodit, JoditVue } from 'jodit-vue'; import autoBind from 'auto-bind'; +import cuid from 'cuid'; import cloneDeep from 'lodash/cloneDeep'; import keysIn from 'lodash/keysIn'; import uniqueId from 'lodash/uniqueId'; @@ -11,6 +13,7 @@ import 'brace/mode/html'; import 'brace/theme/chrome'; import scrollparent from 'scrollparent'; import isFunction$2 from 'lodash/isFunction'; +import Vue from 'vue'; var name = "@extensionengine/tce-jodit"; var version = "1.0.0"; @@ -232,6 +235,107 @@ const normalize = (() => { }; })(); +class Loader { + constructor(jodit) { + this.jodit = jodit; + autoBind(this); + } + + show() { + this.element = this.jodit.create.div('jodit_error_box_for_messages'); + this.jodit.workplace.appendChild(this.element); + const dots = Array(3).fill().map(() => this.jodit.create.span('dot')); + const text = this.jodit.create.text('Uploading'); + const content = this.jodit.create.div('active info load', [text, ...dots]); + this.element.appendChild(content); + return this; + } + + hide() { + const { + Dom + } = this.jodit.constructor.modules; + Dom.safeRemove(this.element); + } + +} +/** @typedef {import('jodit').IJodit} Jodit */ + + +class ImageUploaderPlugin { + static get pluginName() { + return 'image-uploader'; + } + + constructor(options) { + options.uploadFilesEvent = options.uploadFilesEvent || 'joditUploadFiles'; + options.filesUploadEndedEvent = options.filesUploadEndedEvent || 'joditFilesUploadEnded'; + options.imagesAsBase64 = options.imagesAsBase64 || false; + autoBind(this); + } + /** + * @param {Jodit} jodit + */ + + + init(jodit) { + jodit.options.uploader.insertImageAsBase64URI = this.options.imagesAsBase64; + if (this.options.imagesAsBase64) return; // Jodit shows upload tab if the url option for the Uploader module is defined, only checks if truthy + + jodit.options.uploader.url = Symbol('NONE'); // Monkey patch the send method to provide uploading logic, original implementation utilizes the url option + + jodit.uploader.send = this.send; + } + /** + * @param {FormData} data + * @param {function} success + */ + + + send(data, success) { + const loader = new Loader(this.jodit).show(); + const opId = cuid(); + const deferred = {}; + const promise = new Promise(resolve => Object.assign(deferred, { + resolve + })); + + const finalize = ({ + id: evtId, + response + }) => { + if (evtId !== opId) return; + this.jodit.events.off(this.options.filesUploadEndedEvent, finalize); + if (response.err) console.error(response.err); + const result = { ...(response.err ? { + success: false, + data: { + messages: ['Failed to upload'] + } + } : { + success: true, + data: { + files: response.files.map(file => file.publicUrl), + isImages: Array.of(response.files.length).fill(true), + baseurl: '' + } + }) + }; + success.call(this.jodit.uploader, result); + loader.hide(); + deferred.resolve(); + }; + + this.jodit.events.on(this.options.filesUploadEndedEvent, finalize); + this.jodit.events.fire(this.options.uploadFilesEvent, { + id: opId, + formData: data + }); + return promise; + } + +} + const mdiIcons = { source: 'code-tags', bold: 'format-bold', @@ -1452,6 +1556,8 @@ class TooltipPlugin { // const JODIT_READY_EVENT = 'joditReady'; +const JODIT_UPLOAD_FILES_EVENT = 'joditUploadFiles'; +const JODIT_FILES_UPLOAD_ENDED_EVENT = 'joditFilesUploadEnded'; /** @type {import('jodit/src/Config').Config & import('jodit/src/plugins')} */ const joditConfig = { @@ -1485,6 +1591,13 @@ const plugins = [{ use: FontControlsPlugin }, { use: ToolbarPopupsPlugin +}, { + use: ImageUploaderPlugin, + options: { + uploadFilesEvent: JODIT_UPLOAD_FILES_EVENT, + filesUploadEndedEvent: JODIT_FILES_UPLOAD_ENDED_EVENT, + imagesAsBase64: false + } }, { use: SourceEditorPlugin }, { @@ -1496,6 +1609,11 @@ const plugins = [{ } }]; var script$1 = { + inject: { + $elementBus: { + default: null + } + }, props: { value: { type: String, @@ -1512,32 +1630,94 @@ var script$1 = { readonly: { type: Boolean, default: false + }, + storageResponses: { + type: Object, + default: () => ({}) } }, + data: () => ({ + uploadCallbacks: {} + }), computed: { config: vm => ({ ...joditConfig, minHeight: vm.minHeight, placeholder: !vm.value ? vm.placeholder : '', - plugins - }) + plugins: vm.getPlugins() + }), + + editor() { + return this.$refs.jodit.editor; + } + }, methods: { input(value) { return this.$emit('input', value); + }, + + getPlugins() { + return plugins.map(plugin => { + if (plugin.use === ImageUploaderPlugin) plugin.options.imagesAsBase64 = !this.$elementBus; + return plugin; + }); + }, + + uploadFiles({ + id, + formData + }) { + const fileForms = Array.from(formData.values()).filter(value => value instanceof File).map(file => { + const singleFileForm = new FormData(); + singleFileForm.append('file', file, file.name); + return singleFileForm; + }); + + this.uploadCallbacks[id] = response => { + delete this.uploadCallbacks[id]; + this.editor.events.fire(JODIT_FILES_UPLOAD_ENDED_EVENT, { + id, + response + }); + }; + + this.$elementBus.emit('upload', { + id, + fileForms + }); } }, watch: { readonly(state) { - const { - editor - } = this.$refs.jodit; - if (!editor) return; - editor.setReadOnly(state); - if (!state) editor.selection.focus(); + if (!this.editor) return; + this.editor.setReadOnly(state); + if (!state) this.editor.selection.focus(); + }, + + storageResponses: { + deep: true, + + handler(value) { + Object.entries(value).forEach(([id, response]) => { + const callback = this.uploadCallbacks[id]; + if (typeof callback !== 'function') return; + callback(response); + this.$elementBus.emit('responseConsumed', id); + }); + } + } + }, + mounted() { + this.editor.events.on(JODIT_UPLOAD_FILES_EVENT, this.uploadFiles); }, + + beforeDestroy() { + this.editor.events.off(JODIT_UPLOAD_FILES_EVENT, this.uploadFiles); + }, + components: { JoditVue } @@ -1574,7 +1754,7 @@ var __vue_staticRenderFns__$1 = []; const __vue_inject_styles__$1 = undefined; /* scoped */ -const __vue_scope_id__$1 = "data-v-28543044"; +const __vue_scope_id__$1 = "data-v-a1556a42"; /* module identifier */ const __vue_module_identifier__$1 = undefined; @@ -1595,6 +1775,14 @@ var JoditEditor = normalizeComponent({ // var script = { name: 'tce-jodit-html', + inject: { + $elementBus: { + default: null + }, + $storageService: { + default: null + } + }, props: { element: { type: Object, @@ -1626,27 +1814,54 @@ var script = { return { content: (_vm$element$data$cont = (_vm$element = vm.element) === null || _vm$element === void 0 ? void 0 : (_vm$element$data = _vm$element.data) === null || _vm$element$data === void 0 ? void 0 : _vm$element$data.content) !== null && _vm$element$data$cont !== void 0 ? _vm$element$data$cont : '', - readonly: false + readonly: false, + storageResponses: {} }; }, computed: { + clientHeight() { + var _this$$el$clientHeigh, _this$$el; + + return (_this$$el$clientHeigh = (_this$$el = this.$el) === null || _this$$el === void 0 ? void 0 : _this$$el.clientHeight) !== null && _this$$el$clientHeigh !== void 0 ? _this$$el$clientHeigh : 300; + }, + + repositoryId() { + var _this$element; + + return (_this$element = this.element) === null || _this$element === void 0 ? void 0 : _this$element.repositoryId; + }, + + uploads() { + var _this$element$data$up, _this$element2, _this$element2$data; + + return (_this$element$data$up = (_this$element2 = this.element) === null || _this$element2 === void 0 ? void 0 : (_this$element2$data = _this$element2.data) === null || _this$element2$data === void 0 ? void 0 : _this$element2$data.uploads) !== null && _this$element$data$up !== void 0 ? _this$element$data$up : []; + }, + hasChanges() { - var _this$element$data$co, _this$element, _this$element$data; + var _this$element$data$co, _this$element3, _this$element3$data; - const previousValue = (_this$element$data$co = (_this$element = this.element) === null || _this$element === void 0 ? void 0 : (_this$element$data = _this$element.data) === null || _this$element$data === void 0 ? void 0 : _this$element$data.content) !== null && _this$element$data$co !== void 0 ? _this$element$data$co : ''; + const previousValue = (_this$element$data$co = (_this$element3 = this.element) === null || _this$element3 === void 0 ? void 0 : (_this$element3$data = _this$element3.data) === null || _this$element3$data === void 0 ? void 0 : _this$element3$data.content) !== null && _this$element$data$co !== void 0 ? _this$element$data$co : ''; return previousValue !== this.content; } }, methods: { - save() { - if (!this.hasChanges) return; + save(files = []) { + if (!this.hasChanges && isEmpty$1(files)) return; const { element, content } = this; + const newUploads = files.map(({ + key, + url + }) => ({ + key, + url + })); this.$emit('save', { ...element.data, - content + content, + uploads: [...this.uploads, ...newUploads] }); } @@ -1679,6 +1894,28 @@ var script = { this.save(); }, 4000) }, + + mounted() { + var _this$$elementBus, _this$$elementBus2; + + (_this$$elementBus = this.$elementBus) === null || _this$$elementBus === void 0 ? void 0 : _this$$elementBus.on('upload', ({ + id, + fileForms + }) => { + const response = {}; + Promise.all(fileForms.map(form => this.$storageService.upload(this.repositoryId, form))).then(files => { + response.files = files; + this.save(files); + }).catch(err => { + response.err = err; + }).finally(() => Vue.set(this.storageResponses, id, response)); + }); + (_this$$elementBus2 = this.$elementBus) === null || _this$$elementBus2 === void 0 ? void 0 : _this$$elementBus2.on('responseConsumed', id => { + // Avoid reactivity as response is consumed and no longer needed + delete this.storageResponses[id]; + }); + }, + components: { JoditEditor } @@ -1709,8 +1946,9 @@ var __vue_render__ = function () { staticClass: "heading" }, [_vm._v("HTML component")]), _vm._v(" "), !_vm.dense ? _c('span', [_vm._v("Select to edit")]) : _vm._e()])]) : [_vm.isFocused ? _c('jodit-editor', { attrs: { - "min-height": _vm.$el.clientHeight, - "readonly": _vm.readonly + "min-height": _vm.clientHeight, + "readonly": _vm.readonly, + "storage-responses": _vm.storageResponses }, model: { value: _vm.content, @@ -1747,7 +1985,7 @@ var __vue_staticRenderFns__ = [function () { const __vue_inject_styles__ = undefined; /* scoped */ -const __vue_scope_id__ = "data-v-147d3590"; +const __vue_scope_id__ = "data-v-5027ddb9"; /* module identifier */ const __vue_module_identifier__ = undefined; diff --git a/dist/tce-jodit.js b/dist/tce-jodit.js index 500cb33..827e627 100644 --- a/dist/tce-jodit.js +++ b/dist/tce-jodit.js @@ -4,8 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true }); require('jodit/build/jodit.min.css'); var debounce = require('lodash/debounce'); +var isEmpty$1 = require('lodash/isEmpty'); var joditVue = require('jodit-vue'); var autoBind = require('auto-bind'); +var cuid = require('cuid'); var cloneDeep = require('lodash/cloneDeep'); var keysIn = require('lodash/keysIn'); var uniqueId = require('lodash/uniqueId'); @@ -15,11 +17,14 @@ require('brace/mode/html'); require('brace/theme/chrome'); var scrollparent = require('scrollparent'); var isFunction$2 = require('lodash/isFunction'); +var Vue = require('vue'); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var debounce__default = /*#__PURE__*/_interopDefaultLegacy(debounce); +var isEmpty__default = /*#__PURE__*/_interopDefaultLegacy(isEmpty$1); var autoBind__default = /*#__PURE__*/_interopDefaultLegacy(autoBind); +var cuid__default = /*#__PURE__*/_interopDefaultLegacy(cuid); var cloneDeep__default = /*#__PURE__*/_interopDefaultLegacy(cloneDeep); var keysIn__default = /*#__PURE__*/_interopDefaultLegacy(keysIn); var uniqueId__default = /*#__PURE__*/_interopDefaultLegacy(uniqueId); @@ -27,6 +32,7 @@ var ace__default = /*#__PURE__*/_interopDefaultLegacy(ace); var beautify__default = /*#__PURE__*/_interopDefaultLegacy(beautify); var scrollparent__default = /*#__PURE__*/_interopDefaultLegacy(scrollparent); var isFunction__default = /*#__PURE__*/_interopDefaultLegacy(isFunction$2); +var Vue__default = /*#__PURE__*/_interopDefaultLegacy(Vue); var name = "@extensionengine/tce-jodit"; var version = "1.0.0"; @@ -248,6 +254,107 @@ const normalize = (() => { }; })(); +class Loader { + constructor(jodit) { + this.jodit = jodit; + autoBind__default['default'](this); + } + + show() { + this.element = this.jodit.create.div('jodit_error_box_for_messages'); + this.jodit.workplace.appendChild(this.element); + const dots = Array(3).fill().map(() => this.jodit.create.span('dot')); + const text = this.jodit.create.text('Uploading'); + const content = this.jodit.create.div('active info load', [text, ...dots]); + this.element.appendChild(content); + return this; + } + + hide() { + const { + Dom + } = this.jodit.constructor.modules; + Dom.safeRemove(this.element); + } + +} +/** @typedef {import('jodit').IJodit} Jodit */ + + +class ImageUploaderPlugin { + static get pluginName() { + return 'image-uploader'; + } + + constructor(options) { + options.uploadFilesEvent = options.uploadFilesEvent || 'joditUploadFiles'; + options.filesUploadEndedEvent = options.filesUploadEndedEvent || 'joditFilesUploadEnded'; + options.imagesAsBase64 = options.imagesAsBase64 || false; + autoBind__default['default'](this); + } + /** + * @param {Jodit} jodit + */ + + + init(jodit) { + jodit.options.uploader.insertImageAsBase64URI = this.options.imagesAsBase64; + if (this.options.imagesAsBase64) return; // Jodit shows upload tab if the url option for the Uploader module is defined, only checks if truthy + + jodit.options.uploader.url = Symbol('NONE'); // Monkey patch the send method to provide uploading logic, original implementation utilizes the url option + + jodit.uploader.send = this.send; + } + /** + * @param {FormData} data + * @param {function} success + */ + + + send(data, success) { + const loader = new Loader(this.jodit).show(); + const opId = cuid__default['default'](); + const deferred = {}; + const promise = new Promise(resolve => Object.assign(deferred, { + resolve + })); + + const finalize = ({ + id: evtId, + response + }) => { + if (evtId !== opId) return; + this.jodit.events.off(this.options.filesUploadEndedEvent, finalize); + if (response.err) console.error(response.err); + const result = { ...(response.err ? { + success: false, + data: { + messages: ['Failed to upload'] + } + } : { + success: true, + data: { + files: response.files.map(file => file.publicUrl), + isImages: Array.of(response.files.length).fill(true), + baseurl: '' + } + }) + }; + success.call(this.jodit.uploader, result); + loader.hide(); + deferred.resolve(); + }; + + this.jodit.events.on(this.options.filesUploadEndedEvent, finalize); + this.jodit.events.fire(this.options.uploadFilesEvent, { + id: opId, + formData: data + }); + return promise; + } + +} + const mdiIcons = { source: 'code-tags', bold: 'format-bold', @@ -1468,6 +1575,8 @@ class TooltipPlugin { // const JODIT_READY_EVENT = 'joditReady'; +const JODIT_UPLOAD_FILES_EVENT = 'joditUploadFiles'; +const JODIT_FILES_UPLOAD_ENDED_EVENT = 'joditFilesUploadEnded'; /** @type {import('jodit/src/Config').Config & import('jodit/src/plugins')} */ const joditConfig = { @@ -1501,6 +1610,13 @@ const plugins = [{ use: FontControlsPlugin }, { use: ToolbarPopupsPlugin +}, { + use: ImageUploaderPlugin, + options: { + uploadFilesEvent: JODIT_UPLOAD_FILES_EVENT, + filesUploadEndedEvent: JODIT_FILES_UPLOAD_ENDED_EVENT, + imagesAsBase64: false + } }, { use: SourceEditorPlugin }, { @@ -1512,6 +1628,11 @@ const plugins = [{ } }]; var script$1 = { + inject: { + $elementBus: { + default: null + } + }, props: { value: { type: String, @@ -1528,32 +1649,94 @@ var script$1 = { readonly: { type: Boolean, default: false + }, + storageResponses: { + type: Object, + default: () => ({}) } }, + data: () => ({ + uploadCallbacks: {} + }), computed: { config: vm => ({ ...joditConfig, minHeight: vm.minHeight, placeholder: !vm.value ? vm.placeholder : '', - plugins - }) + plugins: vm.getPlugins() + }), + + editor() { + return this.$refs.jodit.editor; + } + }, methods: { input(value) { return this.$emit('input', value); + }, + + getPlugins() { + return plugins.map(plugin => { + if (plugin.use === ImageUploaderPlugin) plugin.options.imagesAsBase64 = !this.$elementBus; + return plugin; + }); + }, + + uploadFiles({ + id, + formData + }) { + const fileForms = Array.from(formData.values()).filter(value => value instanceof File).map(file => { + const singleFileForm = new FormData(); + singleFileForm.append('file', file, file.name); + return singleFileForm; + }); + + this.uploadCallbacks[id] = response => { + delete this.uploadCallbacks[id]; + this.editor.events.fire(JODIT_FILES_UPLOAD_ENDED_EVENT, { + id, + response + }); + }; + + this.$elementBus.emit('upload', { + id, + fileForms + }); } }, watch: { readonly(state) { - const { - editor - } = this.$refs.jodit; - if (!editor) return; - editor.setReadOnly(state); - if (!state) editor.selection.focus(); + if (!this.editor) return; + this.editor.setReadOnly(state); + if (!state) this.editor.selection.focus(); + }, + + storageResponses: { + deep: true, + + handler(value) { + Object.entries(value).forEach(([id, response]) => { + const callback = this.uploadCallbacks[id]; + if (typeof callback !== 'function') return; + callback(response); + this.$elementBus.emit('responseConsumed', id); + }); + } + } + }, + mounted() { + this.editor.events.on(JODIT_UPLOAD_FILES_EVENT, this.uploadFiles); }, + + beforeDestroy() { + this.editor.events.off(JODIT_UPLOAD_FILES_EVENT, this.uploadFiles); + }, + components: { JoditVue: joditVue.JoditVue } @@ -1590,7 +1773,7 @@ var __vue_staticRenderFns__$1 = []; const __vue_inject_styles__$1 = undefined; /* scoped */ -const __vue_scope_id__$1 = "data-v-28543044"; +const __vue_scope_id__$1 = "data-v-a1556a42"; /* module identifier */ const __vue_module_identifier__$1 = undefined; @@ -1611,6 +1794,14 @@ var JoditEditor = normalizeComponent({ // var script = { name: 'tce-jodit-html', + inject: { + $elementBus: { + default: null + }, + $storageService: { + default: null + } + }, props: { element: { type: Object, @@ -1642,27 +1833,54 @@ var script = { return { content: (_vm$element$data$cont = (_vm$element = vm.element) === null || _vm$element === void 0 ? void 0 : (_vm$element$data = _vm$element.data) === null || _vm$element$data === void 0 ? void 0 : _vm$element$data.content) !== null && _vm$element$data$cont !== void 0 ? _vm$element$data$cont : '', - readonly: false + readonly: false, + storageResponses: {} }; }, computed: { + clientHeight() { + var _this$$el$clientHeigh, _this$$el; + + return (_this$$el$clientHeigh = (_this$$el = this.$el) === null || _this$$el === void 0 ? void 0 : _this$$el.clientHeight) !== null && _this$$el$clientHeigh !== void 0 ? _this$$el$clientHeigh : 300; + }, + + repositoryId() { + var _this$element; + + return (_this$element = this.element) === null || _this$element === void 0 ? void 0 : _this$element.repositoryId; + }, + + uploads() { + var _this$element$data$up, _this$element2, _this$element2$data; + + return (_this$element$data$up = (_this$element2 = this.element) === null || _this$element2 === void 0 ? void 0 : (_this$element2$data = _this$element2.data) === null || _this$element2$data === void 0 ? void 0 : _this$element2$data.uploads) !== null && _this$element$data$up !== void 0 ? _this$element$data$up : []; + }, + hasChanges() { - var _this$element$data$co, _this$element, _this$element$data; + var _this$element$data$co, _this$element3, _this$element3$data; - const previousValue = (_this$element$data$co = (_this$element = this.element) === null || _this$element === void 0 ? void 0 : (_this$element$data = _this$element.data) === null || _this$element$data === void 0 ? void 0 : _this$element$data.content) !== null && _this$element$data$co !== void 0 ? _this$element$data$co : ''; + const previousValue = (_this$element$data$co = (_this$element3 = this.element) === null || _this$element3 === void 0 ? void 0 : (_this$element3$data = _this$element3.data) === null || _this$element3$data === void 0 ? void 0 : _this$element3$data.content) !== null && _this$element$data$co !== void 0 ? _this$element$data$co : ''; return previousValue !== this.content; } }, methods: { - save() { - if (!this.hasChanges) return; + save(files = []) { + if (!this.hasChanges && isEmpty__default['default'](files)) return; const { element, content } = this; + const newUploads = files.map(({ + key, + url + }) => ({ + key, + url + })); this.$emit('save', { ...element.data, - content + content, + uploads: [...this.uploads, ...newUploads] }); } @@ -1695,6 +1913,28 @@ var script = { this.save(); }, 4000) }, + + mounted() { + var _this$$elementBus, _this$$elementBus2; + + (_this$$elementBus = this.$elementBus) === null || _this$$elementBus === void 0 ? void 0 : _this$$elementBus.on('upload', ({ + id, + fileForms + }) => { + const response = {}; + Promise.all(fileForms.map(form => this.$storageService.upload(this.repositoryId, form))).then(files => { + response.files = files; + this.save(files); + }).catch(err => { + response.err = err; + }).finally(() => Vue__default['default'].set(this.storageResponses, id, response)); + }); + (_this$$elementBus2 = this.$elementBus) === null || _this$$elementBus2 === void 0 ? void 0 : _this$$elementBus2.on('responseConsumed', id => { + // Avoid reactivity as response is consumed and no longer needed + delete this.storageResponses[id]; + }); + }, + components: { JoditEditor } @@ -1725,8 +1965,9 @@ var __vue_render__ = function () { staticClass: "heading" }, [_vm._v("HTML component")]), _vm._v(" "), !_vm.dense ? _c('span', [_vm._v("Select to edit")]) : _vm._e()])]) : [_vm.isFocused ? _c('jodit-editor', { attrs: { - "min-height": _vm.$el.clientHeight, - "readonly": _vm.readonly + "min-height": _vm.clientHeight, + "readonly": _vm.readonly, + "storage-responses": _vm.storageResponses }, model: { value: _vm.content, @@ -1763,7 +2004,7 @@ var __vue_staticRenderFns__ = [function () { const __vue_inject_styles__ = undefined; /* scoped */ -const __vue_scope_id__ = "data-v-147d3590"; +const __vue_scope_id__ = "data-v-5027ddb9"; /* module identifier */ const __vue_module_identifier__ = undefined; diff --git a/dist/tce-jodit.umd.js b/dist/tce-jodit.umd.js index df5b695..2038250 100644 --- a/dist/tce-jodit.umd.js +++ b/dist/tce-jodit.umd.js @@ -1,12 +1,13 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jodit-vue'), require('auto-bind'), require('brace'), require('js-beautify/js/src/html'), require('brace/mode/html'), require('brace/theme/chrome'), require('scrollparent')) : - typeof define === 'function' && define.amd ? define(['exports', 'jodit-vue', 'auto-bind', 'brace', 'js-beautify/js/src/html', 'brace/mode/html', 'brace/theme/chrome', 'scrollparent'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.__TAILOR_CONTENT_ELEMENTS__ = global.__TAILOR_CONTENT_ELEMENTS__ || {}, global.__TAILOR_CONTENT_ELEMENTS__['@extensionengine/tce-jodit'] = {}), global.joditVue, global.autoBind, global.ace, global.beautify, null, null, global.scrollparent)); -}(this, (function (exports, joditVue, autoBind, ace, beautify, html, chrome, scrollparent) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jodit-vue'), require('auto-bind'), require('cuid'), require('brace'), require('js-beautify/js/src/html'), require('brace/mode/html'), require('brace/theme/chrome'), require('scrollparent')) : + typeof define === 'function' && define.amd ? define(['exports', 'jodit-vue', 'auto-bind', 'cuid', 'brace', 'js-beautify/js/src/html', 'brace/mode/html', 'brace/theme/chrome', 'scrollparent'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.__TAILOR_CONTENT_ELEMENTS__ = global.__TAILOR_CONTENT_ELEMENTS__ || {}, global.__TAILOR_CONTENT_ELEMENTS__['@extensionengine/tce-jodit'] = {}), global.joditVue, global.autoBind, global.cuid, global.ace, global.beautify, null, null, global.scrollparent)); +}(this, (function (exports, joditVue, autoBind, cuid, ace, beautify, html, chrome, scrollparent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var autoBind__default = /*#__PURE__*/_interopDefaultLegacy(autoBind); + var cuid__default = /*#__PURE__*/_interopDefaultLegacy(cuid); var ace__default = /*#__PURE__*/_interopDefaultLegacy(ace); var beautify__default = /*#__PURE__*/_interopDefaultLegacy(beautify); var scrollparent__default = /*#__PURE__*/_interopDefaultLegacy(scrollparent); @@ -47,12 +48,12 @@ * _.isObject(null); * // => false */ - function isObject(value) { + function isObject$1(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } - var isObject_1 = isObject; + var isObject_1 = isObject$1; var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; @@ -111,17 +112,17 @@ var _Symbol = Symbol$1; /** Used for built-in method references. */ - var objectProto$c = Object.prototype; + var objectProto$d = Object.prototype; /** Used to check objects for own properties. */ - var hasOwnProperty$9 = objectProto$c.hasOwnProperty; + var hasOwnProperty$b = objectProto$d.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ - var nativeObjectToString$1 = objectProto$c.toString; + var nativeObjectToString$1 = objectProto$d.toString; /** Built-in value references. */ var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined; @@ -134,7 +135,7 @@ * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { - var isOwn = hasOwnProperty$9.call(value, symToStringTag$1), + var isOwn = hasOwnProperty$b.call(value, symToStringTag$1), tag = value[symToStringTag$1]; try { @@ -156,14 +157,14 @@ var _getRawTag = getRawTag; /** Used for built-in method references. */ - var objectProto$b = Object.prototype; + var objectProto$c = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ - var nativeObjectToString = objectProto$b.toString; + var nativeObjectToString = objectProto$c.toString; /** * Converts `value` to a string using `Object.prototype.toString`. @@ -301,7 +302,7 @@ * _.toNumber('3.2'); * // => 3.2 */ - function toNumber(value) { + function toNumber$1(value) { if (typeof value == 'number') { return value; } @@ -322,7 +323,7 @@ : (reIsBadHex.test(value) ? NAN : +value); } - var toNumber_1 = toNumber; + var toNumber_1 = toNumber$1; /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; @@ -512,3996 +513,12714 @@ var debounce_1 = debounce; - /** @typedef {import('jodit').IJodit} Jodit */ + /** Used for built-in method references. */ + var objectProto$b = Object.prototype; - class AutofocusPlugin { - static get pluginName() { - return 'autofocus'; - } + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$b; - constructor(options) { - options.readyEvent = options.readyEvent || 'joditReady'; - options.cursorStyle = options.cursorStyle || 'auto'; - autoBind__default['default'](this); - } - /** - * @param {Jodit} jodit - */ + return value === proto; + } + var _isPrototype = isPrototype; - init(jodit) { - jodit.editor.style.cursor = this.options.cursorStyle; - } - /** - * @param {Jodit} jodit - */ + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + var _overArg = overArg; - afterInit(jodit) { - setTimeout(() => { - jodit.selection.focus(); - jodit.events.fire(this.options.readyEvent); - }, 0); - } + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeKeys = _overArg(Object.keys, Object); - } + var _nativeKeys = nativeKeys; - const isString$1 = arg => typeof arg === 'string'; + /** Used for built-in method references. */ + var objectProto$a = Object.prototype; - const splitArray$1 = arg => isString$1(arg) ? arg.split(/[,\s]+/) : arg; - /** @typedef {import('jodit/src/Config').Config & import('jodit/src/plugins')} Config */ + /** Used to check objects for own properties. */ + var hasOwnProperty$a = objectProto$a.hasOwnProperty; - /** @typedef {import('jodit').IJodit} Jodit */ + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!_isPrototype(object)) { + return _nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty$a.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + var _baseKeys = baseKeys; - class ExternalToolbarPlugin { - static get pluginName() { - return 'external-toolbar'; - } + /** `Object#toString` result references. */ + var asyncTag = '[object AsyncFunction]', + funcTag$2 = '[object Function]', + genTag$1 = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; - constructor(options) { - options.readyEvent = options.readyEvent || 'ready'; - autoBind__default['default'](this); + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction$2(value) { + if (!isObject_1(value)) { + return false; } - /** - * @param {Config} config - */ + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = _baseGetTag(value); + return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag; + } + var isFunction_1 = isFunction$2; - apply(config) { - config.toolbar = false; - this.options.buttons = splitArray$1(config.buttons).concat(config.extraButtons); - } - /** - * @param {Jodit} jodit - */ + /** Used to detect overreaching core-js shims. */ + var coreJsData = _root['__core-js_shared__']; + var _coreJsData = coreJsData; - init(jodit) { - jodit.setPanel(this.options.toolbarContainer); - } + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); } - const JODIT_CONTROL_FONT = 'font'; - const JODIT_CONTROL_FONTSIZE = 'fontsize'; - const JODIT_CONTROL_PARAGRAPH_STYLE = 'paragraph'; + var _isMasked = isMasked; - const isEmpty = el => !el.innerHTML; + /** Used for built-in method references. */ + var funcProto$1 = Function.prototype; - const find = (arr, cb, defVal) => arr.find(cb) || defVal; - /** @typedef {import('jodit/src/Config').Config & import('jodit/src/plugins')} Config */ + /** Used to resolve the decompiled source of functions. */ + var funcToString$1 = funcProto$1.toString; - /** @typedef {import('jodit').IJodit} Jodit */ + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString$1.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } - /** @typedef {import('jodit').IToolbarButton} Button */ + var _toSource = toSource; - /** @typedef {import('jodit').IControlType true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) { + return isObjectLike_1(value) && hasOwnProperty$8.call(value, 'callee') && + !propertyIsEnumerable$1.call(value, 'callee'); + }; + + var isArguments_1 = isArguments; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + var isArray_1 = isArray; + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER$1 = 9007199254740991; + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1; + } + + var isLength_1 = isLength; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength_1(value.length) && !isFunction_1(value); + } + + var isArrayLike_1 = isArrayLike; + + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + function stubFalse() { + return false; + } + + var stubFalse_1 = stubFalse; + + var isBuffer_1 = createCommonjsModule(function (module, exports) { + /** Detect free variable `exports`. */ + var freeExports = exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Built-in value references. */ + var Buffer = moduleExports ? _root.Buffer : undefined; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse_1; + + module.exports = isBuffer; + }); + + /** `Object#toString` result references. */ + var argsTag$1 = '[object Arguments]', + arrayTag$1 = '[object Array]', + boolTag$2 = '[object Boolean]', + dateTag$2 = '[object Date]', + errorTag$1 = '[object Error]', + funcTag$1 = '[object Function]', + mapTag$4 = '[object Map]', + numberTag$2 = '[object Number]', + objectTag$1 = '[object Object]', + regexpTag$2 = '[object RegExp]', + setTag$4 = '[object Set]', + stringTag$2 = '[object String]', + weakMapTag$1 = '[object WeakMap]'; + + var arrayBufferTag$2 = '[object ArrayBuffer]', + dataViewTag$2 = '[object DataView]', + float32Tag$2 = '[object Float32Array]', + float64Tag$2 = '[object Float64Array]', + int8Tag$2 = '[object Int8Array]', + int16Tag$2 = '[object Int16Array]', + int32Tag$2 = '[object Int32Array]', + uint8Tag$2 = '[object Uint8Array]', + uint8ClampedTag$2 = '[object Uint8ClampedArray]', + uint16Tag$2 = '[object Uint16Array]', + uint32Tag$2 = '[object Uint32Array]'; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = + typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = + typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = + typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = + typedArrayTags[uint32Tag$2] = true; + typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = + typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] = + typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$2] = + typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] = + typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] = + typedArrayTags[objectTag$1] = typedArrayTags[regexpTag$2] = + typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] = + typedArrayTags[weakMapTag$1] = false; + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike_1(value) && + isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)]; + } + + var _baseIsTypedArray = baseIsTypedArray; + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + + var _baseUnary = baseUnary; + + var _nodeUtil = createCommonjsModule(function (module, exports) { + /** Detect free variable `exports`. */ + var freeExports = exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && _freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + module.exports = nodeUtil; + }); + + /* Node.js helper references. */ + var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray; + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray; + + var isTypedArray_1 = isTypedArray; + + /** `Object#toString` result references. */ + var mapTag$3 = '[object Map]', + setTag$3 = '[object Set]'; + + /** Used for built-in method references. */ + var objectProto$7 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$7 = objectProto$7.hasOwnProperty; + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty$1(value) { + if (value == null) { + return true; + } + if (isArrayLike_1(value) && + (isArray_1(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer_1(value) || isTypedArray_1(value) || isArguments_1(value))) { + return !value.length; + } + var tag = _getTag(value); + if (tag == mapTag$3 || tag == setTag$3) { + return !value.size; + } + if (_isPrototype(value)) { + return !_baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty$7.call(value, key)) { + return false; + } + } + return true; + } + + var isEmpty_1 = isEmpty$1; + + /** @typedef {import('jodit').IJodit} Jodit */ + + class AutofocusPlugin { + static get pluginName() { + return 'autofocus'; + } + + constructor(options) { + options.readyEvent = options.readyEvent || 'joditReady'; + options.cursorStyle = options.cursorStyle || 'auto'; + autoBind__default['default'](this); + } + /** + * @param {Jodit} jodit + */ + + + init(jodit) { + jodit.editor.style.cursor = this.options.cursorStyle; + } + /** + * @param {Jodit} jodit + */ + + + afterInit(jodit) { + setTimeout(() => { + jodit.selection.focus(); + jodit.events.fire(this.options.readyEvent); + }, 0); + } + + } + + const isString$1 = arg => typeof arg === 'string'; + + const splitArray$1 = arg => isString$1(arg) ? arg.split(/[,\s]+/) : arg; + /** @typedef {import('jodit/src/Config').Config & import('jodit/src/plugins')} Config */ + + /** @typedef {import('jodit').IJodit} Jodit */ + + + class ExternalToolbarPlugin { + static get pluginName() { + return 'external-toolbar'; + } + + constructor(options) { + options.readyEvent = options.readyEvent || 'ready'; + autoBind__default['default'](this); + } + /** + * @param {Config} config + */ + + + apply(config) { + config.toolbar = false; + this.options.buttons = splitArray$1(config.buttons).concat(config.extraButtons); + } + /** + * @param {Jodit} jodit + */ + + + init(jodit) { + jodit.setPanel(this.options.toolbarContainer); + } + + } + + const JODIT_CONTROL_FONT = 'font'; + const JODIT_CONTROL_FONTSIZE = 'fontsize'; + const JODIT_CONTROL_PARAGRAPH_STYLE = 'paragraph'; + + const isEmpty = el => !el.innerHTML; + + const find = (arr, cb, defVal) => arr.find(cb) || defVal; + /** @typedef {import('jodit/src/Config').Config & import('jodit/src/plugins')} Config */ + + /** @typedef {import('jodit').IJodit} Jodit */ + + /** @typedef {import('jodit').IToolbarButton} Button */ + + /** @typedef {import('jodit').IControlType control.isActiveChild(jodit, { + args + })); + if (entry) return entry; + if (isEmpty(jodit.editor)) return [null, defaultValue]; + + if (control.name === JODIT_CONTROL_FONT) { + const { + fontFamily: currentFontFamily + } = getComputedStyle(jodit.editor); + return find(entries, ([fontFamily]) => { + return normalize$1.fontFamily(fontFamily) === currentFontFamily; + }, [null, defaultValue]); + } + + if (control.name === JODIT_CONTROL_FONTSIZE) { + const { + fontSize: currentFontSize + } = getComputedStyle(jodit.editor); + return find(entries, ([_, fontSize]) => { + return fontSize === normalize$1.fontSize(currentFontSize); + }, [null, defaultValue]); + } + + if (control.name === JODIT_CONTROL_PARAGRAPH_STYLE) { + return find(entries, ([_, style]) => { + return style.toLowerCase() === 'normal'; + }, [null, defaultValue]); + } + } + + } + + const normalize$1 = (() => { + const span = document.createElement('span'); + return { + fontFamily(str) { + span.style.fontFamily = str; + return span.style.fontFamily; + }, + + fontSize(str) { + return String(parseFloat(str)); + } + + }; + })(); + + class Loader { + constructor(jodit) { + this.jodit = jodit; + autoBind__default['default'](this); + } + + show() { + this.element = this.jodit.create.div('jodit_error_box_for_messages'); + this.jodit.workplace.appendChild(this.element); + const dots = Array(3).fill().map(() => this.jodit.create.span('dot')); + const text = this.jodit.create.text('Uploading'); + const content = this.jodit.create.div('active info load', [text, ...dots]); + this.element.appendChild(content); + return this; + } + + hide() { + const { + Dom + } = this.jodit.constructor.modules; + Dom.safeRemove(this.element); + } + + } + /** @typedef {import('jodit').IJodit} Jodit */ + + + class ImageUploaderPlugin { + static get pluginName() { + return 'image-uploader'; + } + + constructor(options) { + options.uploadFilesEvent = options.uploadFilesEvent || 'joditUploadFiles'; + options.filesUploadEndedEvent = options.filesUploadEndedEvent || 'joditFilesUploadEnded'; + options.imagesAsBase64 = options.imagesAsBase64 || false; + autoBind__default['default'](this); + } + /** + * @param {Jodit} jodit + */ + + + init(jodit) { + jodit.options.uploader.insertImageAsBase64URI = this.options.imagesAsBase64; + if (this.options.imagesAsBase64) return; // Jodit shows upload tab if the url option for the Uploader module is defined, only checks if truthy + + jodit.options.uploader.url = Symbol('NONE'); // Monkey patch the send method to provide uploading logic, original implementation utilizes the url option + + jodit.uploader.send = this.send; + } + /** + * @param {FormData} data + * @param {function} success + */ + + + send(data, success) { + const loader = new Loader(this.jodit).show(); + const opId = cuid__default['default'](); + const deferred = {}; + const promise = new Promise(resolve => Object.assign(deferred, { + resolve + })); + + const finalize = ({ + id: evtId, + response + }) => { + if (evtId !== opId) return; + this.jodit.events.off(this.options.filesUploadEndedEvent, finalize); + if (response.err) console.error(response.err); + const result = { ...(response.err ? { + success: false, + data: { + messages: ['Failed to upload'] + } + } : { + success: true, + data: { + files: response.files.map(file => file.publicUrl), + isImages: Array.of(response.files.length).fill(true), + baseurl: '' + } + }) + }; + success.call(this.jodit.uploader, result); + loader.hide(); + deferred.resolve(); + }; + + this.jodit.events.on(this.options.filesUploadEndedEvent, finalize); + this.jodit.events.fire(this.options.uploadFilesEvent, { + id: opId, + formData: data + }); + return promise; + } + + } + + const mdiIcons = { + source: 'code-tags', + bold: 'format-bold', + strikethrough: 'format-strikethrough', + underline: 'format-underline', + italic: 'format-italic', + superscript: 'format-superscript', + subscript: 'format-subscript', + ul: 'format-list-bulleted', + ol: 'format-list-numbered', + outdent: 'format-indent-decrease', + indent: 'format-indent-increase', + font: 'format-font', + fontsize: 'format-size', + paragraph: 'format-pilcrow', + image: 'image-plus', + tooltip: 'tooltip-text', + file: 'file-plus', + video: 'video-plus', + table: 'table-plus', + link: 'link', + + /* align */ + ...{ + left: 'format-align-left', + center: 'format-align-center', + right: 'format-align-right', + justify: 'format-align-justify' + }, + undo: 'undo', + redo: 'redo', + cut: 'content-cut', + hr: 'minus', + eraser: 'format-clear', + copyformat: 'format-paint', + + /* symbol */ + omega: 'omega', + // NOTE: `fullsize` icon can NOT be changed! + // fullsize: 'arrow-expand-all', + + /* selectall */ + 'select-all': 'select-all', + print: 'printer', + dots: 'dots-vertical', + cancel: 'close', + // popup toolbar icons + valign: 'format-align-top', + splitv: 'format-columns', + merge: 'table-merge-cells', + addcolumn: 'table-column-plus-after', + addrow: 'table-row-plus-after', + bin: 'trash-can', + eye: 'eye', + unlink: 'link-off', + pencil: 'pencil' + }; + const textColor = ` + + + + + `; + function getMdiIcon(name) { + if (!name || !mdiIcons[name]) return; + if (name === 'brush') return textColor; + const code = mdiIcons[name]; + return ``; + } + + const CSS_NO_COLOR = ''; + const JODIT_COLORPICKER = '.jodit_colorpicker'; + const JODIT_COMMAND_BACKGROUND_COLOR = 'background'; + const JODIT_COMMAND_TEXT_COLOR = 'forecolor'; + const JODIT_CONTROL_ALIGN = 'align'; + const JODIT_CONTROL_COLOR = 'brush'; + const JODIT_DEFAULT_EVENT_NAMESPACE$2 = 'JoditEventDefaultNamespace'; + const JODIT_PICKER_SELECTION_EVENTS = ['mousedown', 'touchend']; + + const noop$1 = () => {}; + /** @typedef {import('jodit/src/Config').Config & import('jodit/src/plugins')} Config */ + + /** @typedef {import('jodit').IJodit} Jodit */ + + /** @typedef {import('jodit').IToolbarButton} Button */ + + /** @typedef {import('jodit').IControlType it.name === JODIT_CONTROL_COLOR); + + if (control) { + const { + popup: createPopup = noop$1 + } = control; + + control.popup = function () { + const popup = createPopup.apply(this, arguments); + if (!popup) return popup; + return self.inlineColorPopup(popup, ...arguments); + }; + } + } + } + /** + * @param {Jodit} jodit + * @param {Control} control + * @param {Button} button + */ + + + getAlignmentLabel(jodit, control, button) { + // Show current alignment inside button label. + const currentValue = control.data && control.data.currentValue; + if (!currentValue) return; + button.textBox.innerHTML = ''; + button.textBox.appendChild(button.createIcon(currentValue, control)); + } + /** + * @param {Jodit} jodit + * @param {Control} control + * @param {Button} button + */ + + + getColorLabel(jodit, control, button) { + // Colorize material design `color-helper` icon. + const colorHelper = button.textBox.querySelector('.mdi-color-helper'); + const svg = button.textBox.querySelector('svg'); + if (!colorHelper || !svg) return; + colorHelper.style.color = svg.style.fill; + } + /** + * @param {HTMLElement} popup + * @param {Jodit} jodit + * @param {Node} current + * @param {Control} control + * @param {Function} close + */ + + + colorPopup(popup, jodit, current, control, close = noop$1) { + const { + events, + options + } = jodit; + const pickers = getColorPickers(popup, { + defaultTab: options.colorPickerDefaultTab + }); // Add reset color buttons to main toolbar's colorpicker/s. + + onSelect(events, this.addResetButton(pickers.textColor), () => { + jodit.execCommand(JODIT_COMMAND_TEXT_COLOR, false, CSS_NO_COLOR); + close(); + }); + onSelect(events, this.addResetButton(pickers.backgroundColor), () => { + jodit.execCommand(JODIT_COMMAND_BACKGROUND_COLOR, false, CSS_NO_COLOR); + close(); + }); + return popup; + } + /** + * @param {HTMLElement} popup + * @param {Jodit} jodit + * @param {HTMLTableElement} table + */ + + + inlineColorPopup(popup, jodit, table) { + const self = this; + const { + constructor: Jodit, + events + } = jodit; + const pickers = getColorPickers(popup, { + defaultTab: 'background' + }); + pickers.forEach(picker => { + const selected = picker.querySelector('.active'); + if (selected) this.changeSelectedMarker(selected); + const [eventDesc] = events.getStore(picker).get(JODIT_PICKER_SELECTION_EVENTS[0], JODIT_DEFAULT_EVENT_NAMESPACE$2); + const oldListener = eventDesc && eventDesc.originalCallback; + if (!oldListener) return; + replaceListener$1(jodit, picker, JODIT_PICKER_SELECTION_EVENTS.join(' '), newListener, oldListener); + + function newListener(e) { + oldListener.apply(this, arguments); + self.onColorChange(e, picker); + } + }); // Add reset color buttons to inline toolbar's colorpicker/s. + + onSelect(events, this.addResetButton(pickers.textColor), () => { + const selectedCells = Jodit.modules.Table.getAllSelectedCells(table); + selectedCells.forEach(cell => cell.style.color = CSS_NO_COLOR); + jodit.setEditorValue(); + }); + onSelect(events, this.addResetButton(pickers.backgroundColor), () => { + const selectedCells = Jodit.modules.Table.getAllSelectedCells(table); + selectedCells.forEach(cell => cell.style.backgroundColor = CSS_NO_COLOR); + jodit.setEditorValue(); + }); + onSelect(events, this.addResetButton(pickers.borderColor), () => { + const selectedCells = Jodit.modules.Table.getAllSelectedCells(table); + selectedCells.forEach(cell => cell.style.borderColor = CSS_NO_COLOR); + jodit.setEditorValue(); + }); + return popup; + } + /** + * @param {Event} e + * @param {HTMLElement} picker + */ + + + onColorChange(e, picker) { + const { + constructor: Jodit + } = this.jodit; + const button = Jodit.modules.Dom.up(e.target, el => el.matches('[data-color]'), picker); + if (!button) return; + const selected = picker.querySelector('.active'); + if (!selected) return; + + if (this.isResetButton(button)) { + selected.classList.remove('active'); + selected.innerHTML = ''; + return; + } + + this.changeSelectedMarker(selected); + } + /** + * @param {HTMLElement} picker + * @return {HTMLSpanElement} + */ + + + addResetButton(picker) { + const btnResetColor = picker && Array.from(picker.children).filter(el => el.matches('a')).pop(); + if (!btnResetColor) return document.createElement('span'); + btnResetColor.classList.add(this.options.btnResetColorClass); + btnResetColor.innerHTML = ''; + const tabIndex = this.jodit.options.allowTabNavigation ? 0 : -1; + btnResetColor.appendChild(createButton({ + icon: 'mdi-water-off', + text: 'None', + tabIndex + })); + return btnResetColor; + } + /** + * @param {HTMLAnchorElement} selected + */ + + + changeSelectedMarker(selected) { + // Swap eye icon marking selected color with colorized bullet. + selected.classList.add(this.options.selectedMarkerClass); + const svg = selected.querySelector('svg'); + const circle = createIcon('mdi-circle'); + Object.assign(circle.style, { + color: svg.style.fill, + fontSize: '8px' + }); + selected.appendChild(circle); + } + /** + * @param {Jodit} jodit + */ + + + init({ + events + }) { + events.on('getIcon', getMdiIcon); + } + /** + * @param {Jodit} jodit + */ + + + beforeDestruct(jodit) { + jodit.events.off('getIcon', getMdiIcon); + } + + } + /** + * @param {HTMLElement} popup + * @param {Object} options + * @param {String} options.defaultTab + * @returns {ColorPickers} + */ + + function getColorPickers(popup, { + defaultTab + }) { + const pickers = Array.from(popup.querySelectorAll(JODIT_COLORPICKER)); + if (pickers.length <= 0) return pickers; + let textColor, backgroundColor, borderColor; + + if (defaultTab === 'background') { + [backgroundColor, textColor, borderColor] = pickers; + } else if (defaultTab === 'color') { + [textColor, backgroundColor, borderColor] = pickers; + } + + return Object.assign(pickers, { + textColor, + backgroundColor, + borderColor + }); + } + /** + * @param {Events} events + * @param {Object} target + * @param {EventListener} listener + */ + + + function onSelect(events, target, listener) { + return events.on(target, JODIT_PICKER_SELECTION_EVENTS.join(' '), listener); + } + /** + * @param {Jodit} jodit + * @param {Object} target + * @param {String} events + * @param {EventListener} listener + * @param {EventListener} oldListener + */ + + + function replaceListener$1(jodit, target, events, listener, oldListener) { + jodit.events.off(target, events, oldListener).on(target, events, listener); + } + /** + * @param {Object} options + * @param {String} options.icon + * @param {String} options.text + * @param {Number} [options.tabIndex=0] + * @returns {HTMLSpanElement} + */ + + + function createButton({ + icon, + text, + tabIndex = 0 + }) { + const btn = document.createElement('span'); + btn.tabIndex = tabIndex; + btn.setAttribute('role', 'button'); + btn.appendChild(createIcon(icon)); + btn.innerHTML += text; + return btn; + } + /** + * @param {String} name + * @returns {HTMLSpanElement} + */ + + function createIcon(name) { + const icon = document.createElement('span'); + icon.classList.add('jodit_icon', 'mdi', name); + return icon; + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + var _listCacheClear = listCacheClear; + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + var eq_1 = eq; + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq_1(array[length][0], key)) { + return length; + } + } + return -1; + } + + var _assocIndexOf = assocIndexOf; + + /** Used for built-in method references. */ + var arrayProto$1 = Array.prototype; + + /** Built-in value references. */ + var splice = arrayProto$1.splice; + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = _assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + var _listCacheDelete = listCacheDelete; + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = _assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + var _listCacheGet = listCacheGet; + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return _assocIndexOf(this.__data__, key) > -1; + } + + var _listCacheHas = listCacheHas; + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = _assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + var _listCacheSet = listCacheSet; + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = _listCacheClear; + ListCache.prototype['delete'] = _listCacheDelete; + ListCache.prototype.get = _listCacheGet; + ListCache.prototype.has = _listCacheHas; + ListCache.prototype.set = _listCacheSet; + + var _ListCache = ListCache; + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new _ListCache; + this.size = 0; + } + + var _stackClear = stackClear; + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + var _stackDelete = stackDelete; + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + var _stackGet = stackGet; + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + var _stackHas = stackHas; + + /* Built-in method references that are verified to be native. */ + var nativeCreate = _getNative(Object, 'create'); + + var _nativeCreate = nativeCreate; + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = _nativeCreate ? _nativeCreate(null) : {}; + this.size = 0; + } + + var _hashClear = hashClear; + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + var _hashDelete = hashDelete; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED$1 = '__lodash_hash_undefined__'; + + /** Used for built-in method references. */ + var objectProto$6 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$6 = objectProto$6.hasOwnProperty; + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (_nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED$1 ? undefined : result; + } + return hasOwnProperty$6.call(data, key) ? data[key] : undefined; + } + + var _hashGet = hashGet; + + /** Used for built-in method references. */ + var objectProto$5 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$5 = objectProto$5.hasOwnProperty; + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$5.call(data, key); + } + + var _hashHas = hashHas; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + var _hashSet = hashSet; + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + // Add methods to `Hash`. + Hash.prototype.clear = _hashClear; + Hash.prototype['delete'] = _hashDelete; + Hash.prototype.get = _hashGet; + Hash.prototype.has = _hashHas; + Hash.prototype.set = _hashSet; + + var _Hash = Hash; + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new _Hash, + 'map': new (_Map || _ListCache), + 'string': new _Hash + }; + } + + var _mapCacheClear = mapCacheClear; + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + var _isKeyable = isKeyable; + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return _isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + var _getMapData = getMapData; + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = _getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + var _mapCacheDelete = mapCacheDelete; + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return _getMapData(this, key).get(key); + } + + var _mapCacheGet = mapCacheGet; + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return _getMapData(this, key).has(key); + } + + var _mapCacheHas = mapCacheHas; + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = _getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + var _mapCacheSet = mapCacheSet; + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = _mapCacheClear; + MapCache.prototype['delete'] = _mapCacheDelete; + MapCache.prototype.get = _mapCacheGet; + MapCache.prototype.has = _mapCacheHas; + MapCache.prototype.set = _mapCacheSet; + + var _MapCache = MapCache; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof _ListCache) { + var pairs = data.__data__; + if (!_Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new _MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + var _stackSet = stackSet; + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new _ListCache(entries); + this.size = data.size; + } + + // Add methods to `Stack`. + Stack.prototype.clear = _stackClear; + Stack.prototype['delete'] = _stackDelete; + Stack.prototype.get = _stackGet; + Stack.prototype.has = _stackHas; + Stack.prototype.set = _stackSet; + + var _Stack = Stack; + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + var _arrayEach = arrayEach; + + var defineProperty = (function() { + try { + var func = _getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + var _defineProperty = defineProperty; + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && _defineProperty) { + _defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + + var _baseAssignValue = baseAssignValue; + + /** Used for built-in method references. */ + var objectProto$4 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$4 = objectProto$4.hasOwnProperty; + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty$4.call(object, key) && eq_1(objValue, value)) || + (value === undefined && !(key in object))) { + _baseAssignValue(object, key, value); + } + } + + var _assignValue = assignValue; + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + _baseAssignValue(object, key, newValue); + } else { + _assignValue(object, key, newValue); + } + } + return object; + } + + var _copyObject = copyObject; + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + var _baseTimes = baseTimes; + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + var _isIndex = isIndex; + + /** Used for built-in method references. */ + var objectProto$3 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$3 = objectProto$3.hasOwnProperty; + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray_1(value), + isArg = !isArr && isArguments_1(value), + isBuff = !isArr && !isArg && isBuffer_1(value), + isType = !isArr && !isArg && !isBuff && isTypedArray_1(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? _baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty$3.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + _isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } + + var _arrayLikeKeys = arrayLikeKeys; + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object); + } + + var keys_1 = keys; + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && _copyObject(source, keys_1(source), object); + } + + var _baseAssign = baseAssign; + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + var _nativeKeysIn = nativeKeysIn; + + /** Used for built-in method references. */ + var objectProto$2 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$2 = objectProto$2.hasOwnProperty; + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject_1(object)) { + return _nativeKeysIn(object); + } + var isProto = _isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty$2.call(object, key)))) { + result.push(key); + } + } + return result; + } + + var _baseKeysIn = baseKeysIn; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn$1(object) { + return isArrayLike_1(object) ? _arrayLikeKeys(object, true) : _baseKeysIn(object); + } + + var keysIn_1 = keysIn$1; + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && _copyObject(source, keysIn_1(source), object); + } + + var _baseAssignIn = baseAssignIn; + + var _cloneBuffer = createCommonjsModule(function (module, exports) { + /** Detect free variable `exports`. */ + var freeExports = exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Built-in value references. */ + var Buffer = moduleExports ? _root.Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + module.exports = cloneBuffer; + }); + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + var _copyArray = copyArray; + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + var _arrayFilter = arrayFilter; + + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + function stubArray() { + return []; + } + + var stubArray_1 = stubArray; + + /** Used for built-in method references. */ + var objectProto$1 = Object.prototype; + + /** Built-in value references. */ + var propertyIsEnumerable = objectProto$1.propertyIsEnumerable; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeGetSymbols$1 = Object.getOwnPropertySymbols; + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols$1 ? stubArray_1 : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return _arrayFilter(nativeGetSymbols$1(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + var _getSymbols = getSymbols; + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return _copyObject(source, _getSymbols(source), object); + } + + var _copySymbols = copySymbols; + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + var _arrayPush = arrayPush; + + /** Built-in value references. */ + var getPrototype = _overArg(Object.getPrototypeOf, Object); + + var _getPrototype = getPrototype; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeGetSymbols = Object.getOwnPropertySymbols; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols ? stubArray_1 : function(object) { + var result = []; + while (object) { + _arrayPush(result, _getSymbols(object)); + object = _getPrototype(object); + } + return result; + }; + + var _getSymbolsIn = getSymbolsIn; + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return _copyObject(source, _getSymbolsIn(source), object); + } + + var _copySymbolsIn = copySymbolsIn; + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray_1(object) ? result : _arrayPush(result, symbolsFunc(object)); + } + + var _baseGetAllKeys = baseGetAllKeys; + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return _baseGetAllKeys(object, keys_1, _getSymbols); + } + + var _getAllKeys = getAllKeys; + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return _baseGetAllKeys(object, keysIn_1, _getSymbolsIn); + } + + var _getAllKeysIn = getAllKeysIn; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$1 = objectProto.hasOwnProperty; + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty$1.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + var _initCloneArray = initCloneArray; + + /** Built-in value references. */ + var Uint8Array = _root.Uint8Array; + + var _Uint8Array = Uint8Array; + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new _Uint8Array(result).set(new _Uint8Array(arrayBuffer)); + return result; + } + + var _cloneArrayBuffer = cloneArrayBuffer; + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? _cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + var _cloneDataView = cloneDataView; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + var _cloneRegExp = cloneRegExp; + + /** Used to convert symbols to primitives and strings. */ + var symbolProto$1 = _Symbol ? _Symbol.prototype : undefined, + symbolValueOf = symbolProto$1 ? symbolProto$1.valueOf : undefined; + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + var _cloneSymbol = cloneSymbol; + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? _cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + var _cloneTypedArray = cloneTypedArray; + + /** `Object#toString` result references. */ + var boolTag$1 = '[object Boolean]', + dateTag$1 = '[object Date]', + mapTag$2 = '[object Map]', + numberTag$1 = '[object Number]', + regexpTag$1 = '[object RegExp]', + setTag$2 = '[object Set]', + stringTag$1 = '[object String]', + symbolTag$1 = '[object Symbol]'; + + var arrayBufferTag$1 = '[object ArrayBuffer]', + dataViewTag$1 = '[object DataView]', + float32Tag$1 = '[object Float32Array]', + float64Tag$1 = '[object Float64Array]', + int8Tag$1 = '[object Int8Array]', + int16Tag$1 = '[object Int16Array]', + int32Tag$1 = '[object Int32Array]', + uint8Tag$1 = '[object Uint8Array]', + uint8ClampedTag$1 = '[object Uint8ClampedArray]', + uint16Tag$1 = '[object Uint16Array]', + uint32Tag$1 = '[object Uint32Array]'; + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag$1: + return _cloneArrayBuffer(object); + + case boolTag$1: + case dateTag$1: + return new Ctor(+object); + + case dataViewTag$1: + return _cloneDataView(object, isDeep); + + case float32Tag$1: case float64Tag$1: + case int8Tag$1: case int16Tag$1: case int32Tag$1: + case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1: + return _cloneTypedArray(object, isDeep); + + case mapTag$2: + return new Ctor; + + case numberTag$1: + case stringTag$1: + return new Ctor(object); + + case regexpTag$1: + return _cloneRegExp(object); + + case setTag$2: + return new Ctor; + + case symbolTag$1: + return _cloneSymbol(object); + } + } + + var _initCloneByTag = initCloneByTag; + + /** Built-in value references. */ + var objectCreate = Object.create; + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject_1(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + var _baseCreate = baseCreate; + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !_isPrototype(object)) + ? _baseCreate(_getPrototype(object)) + : {}; + } + + var _initCloneObject = initCloneObject; + + /** `Object#toString` result references. */ + var mapTag$1 = '[object Map]'; + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike_1(value) && _getTag(value) == mapTag$1; + } + + var _baseIsMap = baseIsMap; + + /* Node.js helper references. */ + var nodeIsMap = _nodeUtil && _nodeUtil.isMap; + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? _baseUnary(nodeIsMap) : _baseIsMap; + + var isMap_1 = isMap; + + /** `Object#toString` result references. */ + var setTag$1 = '[object Set]'; + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike_1(value) && _getTag(value) == setTag$1; + } + + var _baseIsSet = baseIsSet; + + /* Node.js helper references. */ + var nodeIsSet = _nodeUtil && _nodeUtil.isSet; + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? _baseUnary(nodeIsSet) : _baseIsSet; + + var isSet_1 = isSet; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG$1 = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG$1 = 4; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG$1, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG$1; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject_1(value)) { + return value; + } + var isArr = isArray_1(value); + if (isArr) { + result = _initCloneArray(value); + if (!isDeep) { + return _copyArray(value, result); + } + } else { + var tag = _getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer_1(value)) { + return _cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : _initCloneObject(value); + if (!isDeep) { + return isFlat + ? _copySymbolsIn(value, _baseAssignIn(result, value)) + : _copySymbols(value, _baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = _initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new _Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet_1(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap_1(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? _getAllKeysIn : _getAllKeys) + : (isFlat ? keysIn : keys_1); + + var props = isArr ? undefined : keysFunc(value); + _arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + _assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + var _baseClone = baseClone; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return _baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + var cloneDeep_1 = cloneDeep; + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + var _arrayMap = arrayMap; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0; + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = _Symbol ? _Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray_1(value)) { + // Recursively convert values (susceptible to call stack limits). + return _arrayMap(value, baseToString) + ''; + } + if (isSymbol_1(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + var _baseToString = baseToString; + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString$1(value) { + return value == null ? '' : _baseToString(value); + } + + var toString_1 = toString$1; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ + function uniqueId(prefix) { + var id = ++idCounter; + return toString_1(prefix) + id; + } + + var uniqueId_1 = uniqueId; + + const isFunction$1 = arg => typeof arg === 'function'; + + const isString = arg => typeof arg === 'string'; + + const splitArray = arg => isString(arg) ? arg.split(/[,\s]+/) : arg; + /** @typedef {import('jodit/src/Config').Config & import('jodit/src/plugins')} Config */ + + /** @typedef {import('jodit').IJodit} Jodit */ + + + class PluginProxy { + /** + * @param {Object} plugin + * @param {Jodit} jodit + */ + constructor(plugin, jodit) { + this._plugin = plugin; + this.jodit = jodit; + autoBind__default['default'](this); + jodit.attachEvents({ + afterInit: this.afterInit, + beforeDestruct: this.beforeDestruct + }); + } + + afterInit() { + if (!isFunction$1(this._plugin.afterInit)) return; + + this._plugin.afterInit(this.jodit); + } + + beforeDestruct() { + this.jodit.events.off('beforeDestruct', this.beforeDestruct); + if (!isFunction$1(this._plugin.beforeDestruct)) return; + + this._plugin.beforeDestruct(this.jodit); + } + + destruct() { + if (!isFunction$1(this._plugin.destruct)) return; + + this._plugin.destruct(); + } + + } + + function extend$1(Jodit) { + /** + * @param {Config} config + */ + Jodit.prototype.$applyPlugins = function (config) { + const { + plugins = [] + } = config; + const disablePlugins = splitArray(config.disablePlugins); + this.__plugins = this.__plugins = {}; + this.$plugins = new Map(); + plugins.forEach(({ + use: Plugin, + options = {} + }) => { + const { + pluginName + } = Plugin; + if (disablePlugins.includes(pluginName)) return; // Create plugin instance with provided options. + + const plugin = new Plugin(options); + plugin.options = options; + this.$plugins.set(pluginName, plugin); + this.__plugins[uniqueId_1('plugin_proxy__')] = new PluginProxy(plugin, this); // Apply plugin on jodit options. + + if (isFunction$1(plugin.apply)) plugin.apply(config, Jodit); + }); + }; + + Object.defineProperty(Jodit.prototype, 'options', { + enumerable: true, + configurable: false, + + get() { + return this.$options; + }, + + set(options = {}) { + if (this.isJodit) { + options = cloneOptions(options); + this.$applyPlugins(options); + } + + this.$options = options; + } + + }); + const { + afterInitHook + } = Jodit.prototype; + + Jodit.prototype.afterInitHook = function () { + this.$plugins.forEach(plugin => { + if (isFunction$1(plugin.init)) plugin.init(this, plugin.options); + plugin.jodit = this; + }); + return afterInitHook.apply(this, arguments); + }; + } + + function cloneOptions(options) { + const shared = ['ownerDocument', 'ownerWindow']; + return Object.fromEntries(keysIn_1(options).map(key => { + const value = options[key]; + if (shared.includes(key)) return [key, value]; + return [key, cloneDeep_1(value)]; + })); + } + + // NOTE: `brace` is browserify compatible ACE wrapper. + + window.ace = ace__default['default']; + /** @typedef {import('jodit/src/Config').Config & import('jodit/src/plugins')} Config */ + + /** @typedef {import('jodit').IJodit} Jodit */ + + class SourceEditorPlugin { + static get pluginName() { + return 'source-editor'; + } + + constructor(options) { + options.theme = options.theme || 'ace/theme/chrome'; + autoBind__default['default'](this); + } + /** + * @param {Config} config + */ + + + apply(config) { + config.sourceEditorNativeOptions = config.sourceEditorNativeOptions || {}; + Object.assign(config.sourceEditorNativeOptions, { + mode: 'ace/mode/html', + theme: this.options.theme + }); + } + /** + * @param {Jodit} jodit + */ + + + init(jodit) { + if (jodit.options.beautifyHTML) { + // NOTE: Unfortunately jodit gets beautify function from window global. :( + window.html_beautify = beautify__default['default']; + } + + jodit.events.on('aceInited', this.onAceEditorReady); + } + + onAceEditorReady() { + const { + source + } = this.jodit.__plugins; + /** @type {import('brace').Editor} */ + + const aceEditor = source.aceEditor; + aceEditor.setShowPrintMargin(false); + } + /** + * @param {Jodit} jodit + */ + + + beforeDestruct(jodit) { + jodit.events.off('aceInited', this.onAceEditorReady); + } + + } + + const JODIT_RECALC_POPUP_POSITION_EVENT = 'recalcPositionPopup'; + const JODIT_DEFAULT_EVENT_NAMESPACE$1 = 'JoditEventDefaultNamespace'; + /** @typedef {import('jodit').IJodit} Jodit */ + + class TablePopupsPlugin { + static get pluginName() { + return 'table-popups'; + } + + constructor() { + autoBind__default['default'](this); + } + /** + * @param {Jodit} jodit + */ + + + init(jodit) { + const self = this; + const { + afterInitHook + } = jodit; + + jodit.afterInitHook = function () { + afterInitHook.apply(this, arguments); + self.observeTables(jodit); + self.scrollContainer = scrollparent__default['default'](jodit.container); + if (self.scrollContainer) self.addScrollHandler(jodit); + }; + } + /** + * @param {Jodit} jodit + */ + + + observeTables(jodit) { + const { + constructor: Jodit + } = jodit; + const { + table + } = jodit.__plugins; + const { + $$: query + } = Jodit.modules.Helpers; + query('table', jodit.editor).forEach(tableEl => { + if (table[table.__key]) return; + table.observe(tableEl); + }); + } + /** + * @param {Jodit} jodit + */ + + + addScrollHandler(jodit) { + const [eventDesc] = jodit.events.getStore(jodit.events).get(JODIT_RECALC_POPUP_POSITION_EVENT, JODIT_DEFAULT_EVENT_NAMESPACE$1); + const recalcPopupPosition = eventDesc && eventDesc.originalCallback; + if (!recalcPopupPosition) return; + this.scrollHandler = this.createScrollHandler(recalcPopupPosition); + jodit.events.on(this.scrollContainer, 'scroll', this.scrollHandler); + } + /** + * @param {Function} recalcPopupPosition + */ + + + createScrollHandler(recalcPopupPosition) { + return scrollHandler.bind(this); + + function scrollHandler() { + const { + inlinePopup + } = this.jodit.__plugins; + if (!inlinePopup || !inlinePopup.isShown) return; + return recalcPopupPosition.call(inlinePopup); + } + } + /** + * @param {Jodit} jodit + */ + + + beforeDestruct(jodit) { + if (this.scrollContainer && this.scrollHandler) { + jodit.events.off(this.scrollContainer, 'scroll', this.scrollHandler); + } + } + + } + + // + // + // + // + const id = 'joditToolbar'; + const buttons = [[['source', 'Source']], [['undo', 'Undo'], ['redo', 'Redo'], ['cut', 'Cut selection'], ['copyformat', 'Paint format']], [['paragraph', 'Style'], ['font', 'Font'], ['fontsize', 'Font size']], [['bold', 'Bold'], ['italic', 'Italic'], ['underline', 'Underline'], ['strikethrough', 'Strikethrough']], [['brush', 'Text color']], [['link', 'Insert link...'], ['table', 'Insert table'], ['image', 'Image'], ['tooltip', 'Tooltip'], ['symbol', 'Insert special character'], ['hr', 'Horizontal line']], [['ol', 'Numbered list'], ['ul', 'Bulleted list'], ['outdent', 'Decrease indent'], ['indent', 'Increase indent']], [['align', 'Alignment']], [['subscript', 'Subscript'], ['superscript', 'Superscript']], [['eraser', 'Clear formatting']]]; + var script$2 = { + get $containerId() { + return `#${id}`; + }, + + get $buttons() { + return buttons; + }, + + computed: { + id: () => id, + buttons: () => buttons + } + }; + + function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { + if (typeof shadowMode !== 'boolean') { + createInjectorSSR = createInjector; + createInjector = shadowMode; + shadowMode = false; + } + // Vue.extend constructor export interop. + const options = typeof script === 'function' ? script.options : script; + // render functions + if (template && template.render) { + options.render = template.render; + options.staticRenderFns = template.staticRenderFns; + options._compiled = true; + // functional template + if (isFunctionalTemplate) { + options.functional = true; + } + } + // scopedId + if (scopeId) { + options._scopeId = scopeId; + } + let hook; + if (moduleIdentifier) { + // server build + hook = function (context) { + // 2.3 injection + context = + context || // cached call + (this.$vnode && this.$vnode.ssrContext) || // stateful + (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional + // 2.2 with runInNewContext: true + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__; + } + // inject component styles + if (style) { + style.call(this, createInjectorSSR(context)); + } + // register component module identifier for async chunk inference + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier); + } + }; + // used by ssr in case component is cached and beforeCreate + // never gets called + options._ssrRegister = hook; + } + else if (style) { + hook = shadowMode + ? function (context) { + style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot)); + } + : function (context) { + style.call(this, createInjector(context)); + }; + } + if (hook) { + if (options.functional) { + // register for functional component in vue file + const originalRender = options.render; + options.render = function renderWithStyleInjection(h, context) { + hook.call(context); + return originalRender(h, context); + }; + } + else { + // inject component registration as beforeCreate hook + const existing = options.beforeCreate; + options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; + } + } + return script; + } + + typeof navigator !== 'undefined' && + /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase()); + + /* script */ + const __vue_script__$2 = script$2; + /* template */ + + var __vue_render__$2 = function () { + var _vm = this; + + var _h = _vm.$createElement; + + var _c = _vm._self._c || _h; + + return _c('div', { + staticClass: "jodit-toolbar-editor-collection_container", + attrs: { + "id": _vm.id + } + }); + }; + + var __vue_staticRenderFns__$2 = []; + /* style */ + + const __vue_inject_styles__$2 = undefined; + /* scoped */ + + const __vue_scope_id__$2 = undefined; + /* module identifier */ + + const __vue_module_identifier__$2 = undefined; + /* functional template */ + + const __vue_is_functional_template__$2 = false; + /* style inject */ + + /* style inject SSR */ + + /* style inject shadow dom */ + + var Toolbar = normalizeComponent({ + render: __vue_render__$2, + staticRenderFns: __vue_staticRenderFns__$2 + }, __vue_inject_styles__$2, __vue_script__$2, __vue_scope_id__$2, __vue_is_functional_template__$2, __vue_module_identifier__$2, false, undefined, undefined, undefined); + + /** @typedef {import('jodit').IJodit} Jodit */ + + class ToolbarBuilderPlugin { + static get pluginName() { + return 'toolbar-builder'; + } + + constructor(options) { + options.buttons = options.buttons || []; + options.separator = options.separator || '|'; + autoBind__default['default'](this); + } + /** + * @param {Config} config + * @param {*} Jodit + */ + + + apply(config, Jodit) { + const language = config.language || 'en'; + config.language = uniqueId_1(`${language}_`); + Jodit.lang[config.language] = cloneDeep_1(Jodit.lang[language]); + this.options.language = config.language; + config.buttons = []; + this.options.buttons.forEach(it => this.addGroup(config, Jodit, it)); + } + + addGroup(config, Jodit, controls = []) { + const buttons = controls.reduce((acc, [name, tooltip]) => { + const control = config.controls[name]; + const lang = Jodit.lang[this.options.language]; + if (!control) return acc; + control.tooltip = control.tooltip || tooltip; + Object.assign(lang, { + [control.tooltip]: tooltip + }); + Object.assign(control, { + hotkeys: [] + }); + acc.push(name); + return acc; + }, []); + + if (config.buttons.length > 0 && buttons.length > 0) { + config.buttons.push(this.options.separator); + } + + config.buttons = config.buttons.concat(buttons); + } + + } + + const JODIT_DEFAULT_EVENT_NAMESPACE = 'JoditEventDefaultNamespace'; + const JODIT_POPUP_ARROW = '.jodit_popup_triangle'; + const JODIT_POPUP_TRIGGER_EVENTS = ['mousedown', 'touchend']; + const JODIT_TOOLBAR_BUTTON = '.jodit_toolbar_btn'; + const toggle = Symbol('toggle'); + + const hide = el => el.style.display = 'none'; + + const isToolbarButton = el => el.matches(JODIT_TOOLBAR_BUTTON); + /** @typedef {import('jodit/src/Config').Config & import('jodit/src/plugins')} Config */ + + /** @typedef {import('jodit').IJodit} Jodit */ + + /** @typedef {import('jodit').IComponent} Component */ + + + class ToolbarPopupsPlugin { + static get pluginName() { + return 'toolbar-popups'; + } + + constructor(options) { + options.popupOpenClass = options.popupOpenClass || 'popup_open'; + autoBind__default['default'](this); + this.popups = new Map(); + } + /** + * @param {Jodit} jodit + */ + + + init(jodit) { + jodit.events.on('beforeOpenPopup', this.beforeOpenPopup); + } + /** + * @param {Component} popup + */ + + + beforeOpenPopup(popup) { + const self = this; + if (!isToolbarButton(popup.target)) return; + hide(popup.container); + this.popups.set(popup.target, popup); + const { + calcPosition, + doClose + } = popup; + + popup.calcPosition = function () { + calcPosition.apply(this, arguments); + self.onOpenPopup(popup); + }; + + popup.doClose = function () { + doClose.apply(this, arguments); + self.onClosePopup(popup); + }; + + const [eventDesc] = this.jodit.events.getStore(popup.target).get(JODIT_POPUP_TRIGGER_EVENTS[0], JODIT_DEFAULT_EVENT_NAMESPACE); + const oldListener = eventDesc && eventDesc.originalCallback; + if (!oldListener || oldListener[toggle]) return; + replaceListener(this.jodit, popup.target, JODIT_POPUP_TRIGGER_EVENTS.join(' '), this.createToggleAction(popup.target, oldListener), oldListener); + } + /** + * @param {Component} popup + */ + + + onOpenPopup(popup) { + popup.target.classList.add(this.options.popupOpenClass); + const arrow = popup.container.querySelector(JODIT_POPUP_ARROW); + if (arrow) arrow.style.marginLeft = 0; + Object.assign(popup.container.style, { + marginLeft: 0, + display: 'initial' + }); + } + /** + * @param {Component} popup + */ + + + onClosePopup(popup) { + this.popups.delete(popup.target, popup); + popup.target.classList.remove(this.options.popupOpenClass); + } + /** + * @param {Object} target + * @param {EventListener} listener + * @returns {EventListener} + */ + + + createToggleAction(target, listener) { + const self = this; + return Object.assign(togglePopup, { + [toggle]: true + }); + + function togglePopup() { + const popup = self.popups.get(target); + + if (popup && popup.isOpened) { + popup.close(); + return; + } + + return listener.apply(this, arguments); + } + } + /** + * @param {Jodit} jodit + */ + + + beforeDestruct(jodit) { + jodit.events.off('beforeOpenPopup', this.beforeOpenPopup); + } + + } + /** + * @param {Jodit} jodit + * @param {Object} target + * @param {String} events + * @param {EventListener} listener + * @param {EventListener} oldListener + */ + + function replaceListener(jodit, target, events, listener, oldListener) { + jodit.events.off(target, events, oldListener).on(target, events, listener); + } + + const TOOLTIP_CONTROL = 'tooltip'; + const TOOLTIP_TAG = 'span'; + const TOOLTIP_ATTR = 'data-tooltip'; + const TOOLTIP_CLASS = 'tce-jodit-tooltip'; + const TOOLTIP_POPUP_FORM = ` +
+
+
+ Tooltip + +
+
+
+
+ Text + +
+
+
+ + +
+
`; + + const isTooltipNode = node => { + if (!node || !isFunction_1(node.hasAttribute)) return false; + return node.hasAttribute(TOOLTIP_ATTR); + }; + + const isHtmlElement = el => el && el instanceof HTMLElement; + /** @typedef {import('jodit').IJodit} Jodit */ + + /** @typedef {import('jodit').IToolbarButton} Button */ + + /** @typedef {import('jodit').IControlType isHtmlElement(el) && el.matches('table'), editor); + } + /** + * @param {Jodit} jodit + */ + + + isActive(jodit) { + const { + constructor: Jodit, + editor, + selection + } = jodit; + if (!jodit.isInited || !selection.isFocused()) return; + let start = selection.sel.anchorNode; + if (start.nodeType !== Node.ELEMENT_NODE) start = start.parentElement; + const { + Dom + } = Jodit.modules; + return Dom.up(start, el => isHtmlElement(el) && el.matches(`.${TOOLTIP_CLASS}`), editor); + } + /** + * @param {Jodit} jodit + * @param {Node} current + * @param {Control} self + * @param {Function} close + */ + + + createTooltipPopup(jodit, current, self, close) { + const { + constructor: Jodit, + events, + selection + } = jodit; + const { + val + } = Jodit.modules.Helpers; + const form = jodit.create.fromHTML(TOOLTIP_POPUP_FORM); + const deleteButton = form.querySelector('button[name=delete]'); + current = Jodit.modules.Dom.up(current, isTooltipNode, jodit.editor); + + if (current) { + const tooltipValue = current.getAttribute(TOOLTIP_ATTR) || ''; + val(form, 'textarea[name=tooltip]', tooltipValue); + val(form, 'input[name=text]', current.innerText); + } else { + const { + sel + } = selection; + val(form, 'input[name=text]', sel ? sel.toString() : ''); + deleteButton.style.display = 'none'; + } + + this.selectionInfo = selection.save(); + events.on(form, 'submit', event => this.attachTooltip(event, current, close)); + events.on(deleteButton, 'click', event => this.detachTooltip(event, current, close)); + return form; + } + /** + * @param {Event} event + * @param {Node} current + * @param {Function} close + */ + + + attachTooltip(event, current, close) { + const { + constructor: Jodit, + selection + } = this.jodit; + const { + val + } = Jodit.modules.Helpers; + event.preventDefault(); + selection.restore(this.selectionInfo); + this.selectionInfo = null; + const tooltipElement = current || document.createElement(TOOLTIP_TAG); + const tooltipValue = val(event.target, 'textarea[name=tooltip]'); + const innerText = val(event.target, 'input[name=text]'); + tooltipElement.setAttribute(TOOLTIP_ATTR, tooltipValue); + tooltipElement.classList.add(TOOLTIP_CLASS); + tooltipElement.innerText = innerText; + if (!current && innerText) selection.insertNode(tooltipElement); + close(); + } + /** + * @param {Event} event + * @param {Node} current + * @param {Function} close + */ + + + detachTooltip(event, current, close) { + const { + constructor: Jodit, + selection + } = this.jodit; + event.preventDefault(); + if (current) Jodit.modules.Dom.unwrap(current); + selection.restore(this.selectionInfo); + this.selectionInfo = null; + close(); + } + + } + + // + const JODIT_READY_EVENT = 'joditReady'; + const JODIT_UPLOAD_FILES_EVENT = 'joditUploadFiles'; + const JODIT_FILES_UPLOAD_ENDED_EVENT = 'joditFilesUploadEnded'; + /** @type {import('jodit/src/Config').Config & import('jodit/src/plugins')} */ + + const joditConfig = { + autofocus: true, + addNewLineOnDBLClick: false, + showTooltipDelay: 350, + colorPickerDefaultTab: 'color', + disablePlugins: ['fullsize'], + language: 'en', + extraIcons: { + tooltip: '' + } + }; + extend$1(joditVue.Jodit); + const plugins = [{ + use: MdiIconsPlugin + }, { + use: TooltipPlugin + }, { + use: ToolbarBuilderPlugin, + options: { + buttons: Toolbar.$buttons + } + }, { + use: ExternalToolbarPlugin, + options: { + readyEvent: JODIT_READY_EVENT, + toolbarContainer: Toolbar.$containerId + } + }, { + use: FontControlsPlugin + }, { + use: ToolbarPopupsPlugin + }, { + use: ImageUploaderPlugin, + options: { + uploadFilesEvent: JODIT_UPLOAD_FILES_EVENT, + filesUploadEndedEvent: JODIT_FILES_UPLOAD_ENDED_EVENT, + imagesAsBase64: false + } + }, { + use: SourceEditorPlugin + }, { + use: TablePopupsPlugin + }, { + use: AutofocusPlugin, + options: { + readyEvent: JODIT_READY_EVENT + } + }]; + var script$1 = { + inject: { + $elementBus: { + default: null + } + }, + props: { + value: { + type: String, + required: true + }, + minHeight: { + type: Number, + required: true + }, + placeholder: { + type: String, + default: 'Insert text here...' + }, + readonly: { + type: Boolean, + default: false + }, + storageResponses: { + type: Object, + default: () => ({}) + } + }, + data: () => ({ + uploadCallbacks: {} + }), + computed: { + config: vm => ({ ...joditConfig, + minHeight: vm.minHeight, + placeholder: !vm.value ? vm.placeholder : '', + plugins: vm.getPlugins() + }), + + editor() { + return this.$refs.jodit.editor; + } + + }, + methods: { + input(value) { + return this.$emit('input', value); + }, + + getPlugins() { + return plugins.map(plugin => { + if (plugin.use === ImageUploaderPlugin) plugin.options.imagesAsBase64 = !this.$elementBus; + return plugin; + }); + }, + + uploadFiles({ + id, + formData + }) { + const fileForms = Array.from(formData.values()).filter(value => value instanceof File).map(file => { + const singleFileForm = new FormData(); + singleFileForm.append('file', file, file.name); + return singleFileForm; + }); + + this.uploadCallbacks[id] = response => { + delete this.uploadCallbacks[id]; + this.editor.events.fire(JODIT_FILES_UPLOAD_ENDED_EVENT, { + id, + response + }); + }; + + this.$elementBus.emit('upload', { + id, + fileForms + }); + } + + }, + watch: { + readonly(state) { + if (!this.editor) return; + this.editor.setReadOnly(state); + if (!state) this.editor.selection.focus(); + }, + + storageResponses: { + deep: true, + + handler(value) { + Object.entries(value).forEach(([id, response]) => { + const callback = this.uploadCallbacks[id]; + if (typeof callback !== 'function') return; + callback(response); + this.$elementBus.emit('responseConsumed', id); + }); + } + + } + }, + + mounted() { + this.editor.events.on(JODIT_UPLOAD_FILES_EVENT, this.uploadFiles); + }, + + beforeDestroy() { + this.editor.events.off(JODIT_UPLOAD_FILES_EVENT, this.uploadFiles); + }, + + components: { + JoditVue: joditVue.JoditVue + } + }; + + /* script */ + const __vue_script__$1 = script$1; + /* template */ + + var __vue_render__$1 = function () { + var _vm = this; + + var _h = _vm.$createElement; + + var _c = _vm._self._c || _h; + + return _c('div', { + staticClass: "jodit-wrapper" + }, [_c('jodit-vue', { + ref: "jodit", + attrs: { + "config": _vm.config, + "value": _vm.value + }, + on: { + "input": _vm.input + } + })], 1); + }; + + var __vue_staticRenderFns__$1 = []; + /* style */ + + const __vue_inject_styles__$1 = undefined; + /* scoped */ + + const __vue_scope_id__$1 = "data-v-a1556a42"; + /* module identifier */ + + const __vue_module_identifier__$1 = undefined; + /* functional template */ + + const __vue_is_functional_template__$1 = false; + /* style inject */ + + /* style inject SSR */ + + /* style inject shadow dom */ + + var JoditEditor = normalizeComponent({ + render: __vue_render__$1, + staticRenderFns: __vue_staticRenderFns__$1 + }, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined); + + /*! + * Vue.js v2.6.14 + * (c) 2014-2021 Evan You + * Released under the MIT License. + */ + /* */ + + var emptyObject = Object.freeze({}); + + // These helpers produce better VM code in JS engines due to their + // explicitness and function inlining. + function isUndef (v) { + return v === undefined || v === null + } + + function isDef (v) { + return v !== undefined && v !== null + } + + function isTrue (v) { + return v === true + } + + function isFalse (v) { + return v === false + } + + /** + * Check if value is primitive. + */ + function isPrimitive (value) { + return ( + typeof value === 'string' || + typeof value === 'number' || + // $flow-disable-line + typeof value === 'symbol' || + typeof value === 'boolean' + ) + } + + /** + * Quick object check - this is primarily used to tell + * Objects from primitive values when we know the value + * is a JSON-compliant type. + */ + function isObject (obj) { + return obj !== null && typeof obj === 'object' + } + + /** + * Get the raw type string of a value, e.g., [object Object]. + */ + var _toString = Object.prototype.toString; + + function toRawType (value) { + return _toString.call(value).slice(8, -1) + } + + /** + * Strict object type check. Only returns true + * for plain JavaScript objects. + */ + function isPlainObject (obj) { + return _toString.call(obj) === '[object Object]' + } + + function isRegExp (v) { + return _toString.call(v) === '[object RegExp]' + } + + /** + * Check if val is a valid array index. + */ + function isValidArrayIndex (val) { + var n = parseFloat(String(val)); + return n >= 0 && Math.floor(n) === n && isFinite(val) + } + + function isPromise (val) { + return ( + isDef(val) && + typeof val.then === 'function' && + typeof val.catch === 'function' + ) + } + + /** + * Convert a value to a string that is actually rendered. + */ + function toString (val) { + return val == null + ? '' + : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString) + ? JSON.stringify(val, null, 2) + : String(val) + } + + /** + * Convert an input value to a number for persistence. + * If the conversion fails, return original string. + */ + function toNumber (val) { + var n = parseFloat(val); + return isNaN(n) ? val : n + } + + /** + * Make a map and return a function for checking if a key + * is in that map. + */ + function makeMap ( + str, + expectsLowerCase + ) { + var map = Object.create(null); + var list = str.split(','); + for (var i = 0; i < list.length; i++) { + map[list[i]] = true; + } + return expectsLowerCase + ? function (val) { return map[val.toLowerCase()]; } + : function (val) { return map[val]; } + } + + /** + * Check if a tag is a built-in tag. + */ + var isBuiltInTag = makeMap('slot,component', true); + + /** + * Check if an attribute is a reserved attribute. + */ + var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is'); + + /** + * Remove an item from an array. + */ + function remove (arr, item) { + if (arr.length) { + var index = arr.indexOf(item); + if (index > -1) { + return arr.splice(index, 1) + } + } + } + + /** + * Check whether an object has the property. + */ + var hasOwnProperty = Object.prototype.hasOwnProperty; + function hasOwn (obj, key) { + return hasOwnProperty.call(obj, key) + } + + /** + * Create a cached version of a pure function. + */ + function cached (fn) { + var cache = Object.create(null); + return (function cachedFn (str) { + var hit = cache[str]; + return hit || (cache[str] = fn(str)) + }) + } + + /** + * Camelize a hyphen-delimited string. + */ + var camelizeRE = /-(\w)/g; + var camelize = cached(function (str) { + return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; }) + }); + + /** + * Capitalize a string. + */ + var capitalize = cached(function (str) { + return str.charAt(0).toUpperCase() + str.slice(1) + }); + + /** + * Hyphenate a camelCase string. + */ + var hyphenateRE = /\B([A-Z])/g; + var hyphenate = cached(function (str) { + return str.replace(hyphenateRE, '-$1').toLowerCase() + }); + + /** + * Simple bind polyfill for environments that do not support it, + * e.g., PhantomJS 1.x. Technically, we don't need this anymore + * since native bind is now performant enough in most browsers. + * But removing it would mean breaking code that was able to run in + * PhantomJS 1.x, so this must be kept for backward compatibility. + */ + + /* istanbul ignore next */ + function polyfillBind (fn, ctx) { + function boundFn (a) { + var l = arguments.length; + return l + ? l > 1 + ? fn.apply(ctx, arguments) + : fn.call(ctx, a) + : fn.call(ctx) + } + + boundFn._length = fn.length; + return boundFn + } + + function nativeBind (fn, ctx) { + return fn.bind(ctx) + } + + var bind = Function.prototype.bind + ? nativeBind + : polyfillBind; + + /** + * Convert an Array-like object to a real Array. + */ + function toArray (list, start) { + start = start || 0; + var i = list.length - start; + var ret = new Array(i); + while (i--) { + ret[i] = list[i + start]; + } + return ret + } + + /** + * Mix properties into target object. + */ + function extend (to, _from) { + for (var key in _from) { + to[key] = _from[key]; + } + return to + } + + /** + * Merge an Array of Objects into a single Object. + */ + function toObject (arr) { + var res = {}; + for (var i = 0; i < arr.length; i++) { + if (arr[i]) { + extend(res, arr[i]); + } + } + return res + } - if (control = controls[JODIT_CONTROL_PARAGRAPH_STYLE]) { - Object.assign(control, { - defaultValue: this.options.defaultParagraphStyle, - getLabel: this.getLabel - }); + /* eslint-disable no-unused-vars */ + + /** + * Perform no operation. + * Stubbing args to make Flow happy without leaving useless transpiled code + * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/). + */ + function noop (a, b, c) {} + + /** + * Always return false. + */ + var no = function (a, b, c) { return false; }; + + /* eslint-enable no-unused-vars */ + + /** + * Return the same value. + */ + var identity = function (_) { return _; }; + + /** + * Check if two values are loosely equal - that is, + * if they are plain objects, do they have the same shape? + */ + function looseEqual (a, b) { + if (a === b) { return true } + var isObjectA = isObject(a); + var isObjectB = isObject(b); + if (isObjectA && isObjectB) { + try { + var isArrayA = Array.isArray(a); + var isArrayB = Array.isArray(b); + if (isArrayA && isArrayB) { + return a.length === b.length && a.every(function (e, i) { + return looseEqual(e, b[i]) + }) + } else if (a instanceof Date && b instanceof Date) { + return a.getTime() === b.getTime() + } else if (!isArrayA && !isArrayB) { + var keysA = Object.keys(a); + var keysB = Object.keys(b); + return keysA.length === keysB.length && keysA.every(function (key) { + return looseEqual(a[key], b[key]) + }) + } else { + /* istanbul ignore next */ + return false + } + } catch (e) { + /* istanbul ignore next */ + return false + } + } else if (!isObjectA && !isObjectB) { + return String(a) === String(b) + } else { + return false + } + } + + /** + * Return the first index at which a loosely equal value can be + * found in the array (if value is a plain object, the array must + * contain an object of the same shape), or -1 if it is not present. + */ + function looseIndexOf (arr, val) { + for (var i = 0; i < arr.length; i++) { + if (looseEqual(arr[i], val)) { return i } + } + return -1 + } + + /** + * Ensure a function is called only once. + */ + function once (fn) { + var called = false; + return function () { + if (!called) { + called = true; + fn.apply(this, arguments); } } + } + + var SSR_ATTR = 'data-server-rendered'; + + var ASSET_TYPES = [ + 'component', + 'directive', + 'filter' + ]; + + var LIFECYCLE_HOOKS = [ + 'beforeCreate', + 'created', + 'beforeMount', + 'mounted', + 'beforeUpdate', + 'updated', + 'beforeDestroy', + 'destroyed', + 'activated', + 'deactivated', + 'errorCaptured', + 'serverPrefetch' + ]; + + /* */ + + + + var config = ({ /** - * @param {Jodit} jodit - * @param {Control} control - * @param {Button} button + * Option merge strategies (used in core/util/options) */ + // $flow-disable-line + optionMergeStrategies: Object.create(null), + /** + * Whether to suppress warnings. + */ + silent: false, - getLabel(jodit, control, button) { - const entry = this.getActiveEntry(jodit, control, control.defaultValue); - const [, key] = entry; - const icon = button.createIcon(control.icon, control); - const label = document.createElement('span'); - label.classList.add(this.options.pickerLabelClass); - label.appendChild(icon); - label.innerHTML += key; - button.textBox.innerHTML = ''; - button.textBox.appendChild(label); - return false; - } /** - * @param {Jodit} jodit - * @param {Control} control - * @returns {[*, String]} + * Show production mode tip message on boot? */ + productionTip: "development" !== 'production', + /** + * Whether to enable devtools + */ + devtools: "development" !== 'production', - getActiveEntry(jodit, control, defaultValue) { - if (!jodit.isInited) return [null, defaultValue]; - const entries = Object.entries(control.list); - const entry = entries.find(args => control.isActiveChild(jodit, { - args - })); - if (entry) return entry; - if (isEmpty(jodit.editor)) return [null, defaultValue]; + /** + * Whether to record perf + */ + performance: false, - if (control.name === JODIT_CONTROL_FONT) { - const { - fontFamily: currentFontFamily - } = getComputedStyle(jodit.editor); - return find(entries, ([fontFamily]) => { - return normalize.fontFamily(fontFamily) === currentFontFamily; - }, [null, defaultValue]); - } + /** + * Error handler for watcher errors + */ + errorHandler: null, - if (control.name === JODIT_CONTROL_FONTSIZE) { - const { - fontSize: currentFontSize - } = getComputedStyle(jodit.editor); - return find(entries, ([_, fontSize]) => { - return fontSize === normalize.fontSize(currentFontSize); - }, [null, defaultValue]); - } + /** + * Warn handler for watcher warns + */ + warnHandler: null, - if (control.name === JODIT_CONTROL_PARAGRAPH_STYLE) { - return find(entries, ([_, style]) => { - return style.toLowerCase() === 'normal'; - }, [null, defaultValue]); - } - } + /** + * Ignore certain custom elements + */ + ignoredElements: [], - } + /** + * Custom user key aliases for v-on + */ + // $flow-disable-line + keyCodes: Object.create(null), - const normalize = (() => { - const span = document.createElement('span'); - return { - fontFamily(str) { - span.style.fontFamily = str; - return span.style.fontFamily; - }, + /** + * Check if a tag is reserved so that it cannot be registered as a + * component. This is platform-dependent and may be overwritten. + */ + isReservedTag: no, - fontSize(str) { - return String(parseFloat(str)); - } + /** + * Check if an attribute is reserved so that it cannot be used as a component + * prop. This is platform-dependent and may be overwritten. + */ + isReservedAttr: no, - }; - })(); + /** + * Check if a tag is an unknown element. + * Platform-dependent. + */ + isUnknownElement: no, - const mdiIcons = { - source: 'code-tags', - bold: 'format-bold', - strikethrough: 'format-strikethrough', - underline: 'format-underline', - italic: 'format-italic', - superscript: 'format-superscript', - subscript: 'format-subscript', - ul: 'format-list-bulleted', - ol: 'format-list-numbered', - outdent: 'format-indent-decrease', - indent: 'format-indent-increase', - font: 'format-font', - fontsize: 'format-size', - paragraph: 'format-pilcrow', - image: 'image-plus', - tooltip: 'tooltip-text', - file: 'file-plus', - video: 'video-plus', - table: 'table-plus', - link: 'link', + /** + * Get the namespace of an element + */ + getTagNamespace: noop, - /* align */ - ...{ - left: 'format-align-left', - center: 'format-align-center', - right: 'format-align-right', - justify: 'format-align-justify' - }, - undo: 'undo', - redo: 'redo', - cut: 'content-cut', - hr: 'minus', - eraser: 'format-clear', - copyformat: 'format-paint', + /** + * Parse the real tag name for the specific platform. + */ + parsePlatformTagName: identity, - /* symbol */ - omega: 'omega', - // NOTE: `fullsize` icon can NOT be changed! - // fullsize: 'arrow-expand-all', + /** + * Check if an attribute must be bound using property, e.g. value + * Platform-dependent. + */ + mustUseProp: no, - /* selectall */ - 'select-all': 'select-all', - print: 'printer', - dots: 'dots-vertical', - cancel: 'close', - // popup toolbar icons - valign: 'format-align-top', - splitv: 'format-columns', - merge: 'table-merge-cells', - addcolumn: 'table-column-plus-after', - addrow: 'table-row-plus-after', - bin: 'trash-can', - eye: 'eye', - unlink: 'link-off', - pencil: 'pencil' - }; - const textColor = ` - - - - - `; - function getMdiIcon(name) { - if (!name || !mdiIcons[name]) return; - if (name === 'brush') return textColor; - const code = mdiIcons[name]; - return ``; + /** + * Perform updates asynchronously. Intended to be used by Vue Test Utils + * This will significantly reduce performance if set to false. + */ + async: true, + + /** + * Exposed for legacy reasons + */ + _lifecycleHooks: LIFECYCLE_HOOKS + }); + + /* */ + + /** + * unicode letters used for parsing html tags, component names and property paths. + * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname + * skipping \u10000-\uEFFFF due to it freezing up PhantomJS + */ + var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/; + + /** + * Check if a string starts with $ or _ + */ + function isReserved (str) { + var c = (str + '').charCodeAt(0); + return c === 0x24 || c === 0x5F } - const CSS_NO_COLOR = ''; - const JODIT_COLORPICKER = '.jodit_colorpicker'; - const JODIT_COMMAND_BACKGROUND_COLOR = 'background'; - const JODIT_COMMAND_TEXT_COLOR = 'forecolor'; - const JODIT_CONTROL_ALIGN = 'align'; - const JODIT_CONTROL_COLOR = 'brush'; - const JODIT_DEFAULT_EVENT_NAMESPACE$2 = 'JoditEventDefaultNamespace'; - const JODIT_PICKER_SELECTION_EVENTS = ['mousedown', 'touchend']; + /** + * Define a property. + */ + function def (obj, key, val, enumerable) { + Object.defineProperty(obj, key, { + value: val, + enumerable: !!enumerable, + writable: true, + configurable: true + }); + } - const noop = () => {}; - /** @typedef {import('jodit/src/Config').Config & import('jodit/src/plugins')} Config */ + /** + * Parse simple path. + */ + var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]")); + function parsePath (path) { + if (bailRE.test(path)) { + return + } + var segments = path.split('.'); + return function (obj) { + for (var i = 0; i < segments.length; i++) { + if (!obj) { return } + obj = obj[segments[i]]; + } + return obj + } + } - /** @typedef {import('jodit').IJodit} Jodit */ + /* */ + + // can we use __proto__? + var hasProto = '__proto__' in {}; + + // Browser environment sniffing + var inBrowser = typeof window !== 'undefined'; + var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform; + var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase(); + var UA = inBrowser && window.navigator.userAgent.toLowerCase(); + var isIE = UA && /msie|trident/.test(UA); + var isIE9 = UA && UA.indexOf('msie 9.0') > 0; + var isEdge = UA && UA.indexOf('edge/') > 0; + (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android'); + var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios'); + UA && /chrome\/\d+/.test(UA) && !isEdge; + UA && /phantomjs/.test(UA); + var isFF = UA && UA.match(/firefox\/(\d+)/); + + // Firefox has a "watch" function on Object.prototype... + var nativeWatch = ({}).watch; + + var supportsPassive = false; + if (inBrowser) { + try { + var opts = {}; + Object.defineProperty(opts, 'passive', ({ + get: function get () { + /* istanbul ignore next */ + supportsPassive = true; + } + })); // https://github.com/facebook/flow/issues/285 + window.addEventListener('test-passive', null, opts); + } catch (e) {} + } - /** @typedef {import('jodit').IToolbarButton} Button */ + // this needs to be lazy-evaled because vue may be required before + // vue-server-renderer can set VUE_ENV + var _isServer; + var isServerRendering = function () { + if (_isServer === undefined) { + /* istanbul ignore if */ + if (!inBrowser && !inWeex && typeof global !== 'undefined') { + // detect presence of vue-server-renderer and avoid + // Webpack shimming the process + _isServer = global['process'] && global['process'].env.VUE_ENV === 'server'; + } else { + _isServer = false; + } + } + return _isServer + }; + + // detect devtools + var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__; + + /* istanbul ignore next */ + function isNative (Ctor) { + return typeof Ctor === 'function' && /native code/.test(Ctor.toString()) + } - /** @typedef {import('jodit').IControlType' + } + var options = typeof vm === 'function' && vm.cid != null + ? vm.options + : vm._isVue + ? vm.$options || vm.constructor.options + : vm; + var name = options.name || options._componentTag; + var file = options.__file; + if (!name && file) { + var match = file.match(/([^/\\]+)\.vue$/); + name = match && match[1]; + } - apply({ - controls, - popup - }) { - const self = this; - let control; + return ( + (name ? ("<" + (classify(name)) + ">") : "") + + (file && includeFile !== false ? (" at " + file) : '') + ) + }; - if (control = controls[JODIT_CONTROL_ALIGN]) { - const { - getLabel = noop - } = control; + var repeat = function (str, n) { + var res = ''; + while (n) { + if (n % 2 === 1) { res += str; } + if (n > 1) { str += str; } + n >>= 1; + } + return res + }; - control.getLabel = function () { - const result = getLabel.apply(this, arguments); - self.getAlignmentLabel(...arguments); - return result; - }; + generateComponentTrace = function (vm) { + if (vm._isVue && vm.$parent) { + var tree = []; + var currentRecursiveSequence = 0; + while (vm) { + if (tree.length > 0) { + var last = tree[tree.length - 1]; + if (last.constructor === vm.constructor) { + currentRecursiveSequence++; + vm = vm.$parent; + continue + } else if (currentRecursiveSequence > 0) { + tree[tree.length - 1] = [last, currentRecursiveSequence]; + currentRecursiveSequence = 0; + } + } + tree.push(vm); + vm = vm.$parent; + } + return '\n\nfound in\n\n' + tree + .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm) + ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)") + : formatComponentName(vm))); }) + .join('\n') + } else { + return ("\n\n(found in " + (formatComponentName(vm)) + ")") } + }; + } - if (control = controls[JODIT_CONTROL_COLOR]) { - const { - getLabel = noop - } = control; + /* */ - control.getLabel = function () { - const result = getLabel.apply(this, arguments); - self.getColorLabel(...arguments); - return result; - }; + var uid = 0; - const { - popup: createPopup = noop - } = control; + /** + * A dep is an observable that can have multiple + * directives subscribing to it. + */ + var Dep = function Dep () { + this.id = uid++; + this.subs = []; + }; - control.popup = function () { - const popup = createPopup.apply(this, arguments); - if (!popup) return popup; - return self.colorPopup(popup, ...arguments); - }; - } + Dep.prototype.addSub = function addSub (sub) { + this.subs.push(sub); + }; - if (Array.isArray(popup.table)) { - control = popup.table.find(it => it.name === JODIT_CONTROL_COLOR); + Dep.prototype.removeSub = function removeSub (sub) { + remove(this.subs, sub); + }; - if (control) { - const { - popup: createPopup = noop - } = control; + Dep.prototype.depend = function depend () { + if (Dep.target) { + Dep.target.addDep(this); + } + }; - control.popup = function () { - const popup = createPopup.apply(this, arguments); - if (!popup) return popup; - return self.inlineColorPopup(popup, ...arguments); - }; - } - } + Dep.prototype.notify = function notify () { + // stabilize the subscriber list first + var subs = this.subs.slice(); + if (!config.async) { + // subs aren't sorted in scheduler if not running async + // we need to sort them now to make sure they fire in correct + // order + subs.sort(function (a, b) { return a.id - b.id; }); } - /** - * @param {Jodit} jodit - * @param {Control} control - * @param {Button} button - */ + for (var i = 0, l = subs.length; i < l; i++) { + subs[i].update(); + } + }; + // The current target watcher being evaluated. + // This is globally unique because only one watcher + // can be evaluated at a time. + Dep.target = null; + var targetStack = []; - getAlignmentLabel(jodit, control, button) { - // Show current alignment inside button label. - const currentValue = control.data && control.data.currentValue; - if (!currentValue) return; - button.textBox.innerHTML = ''; - button.textBox.appendChild(button.createIcon(currentValue, control)); - } - /** - * @param {Jodit} jodit - * @param {Control} control - * @param {Button} button - */ + function pushTarget (target) { + targetStack.push(target); + Dep.target = target; + } + function popTarget () { + targetStack.pop(); + Dep.target = targetStack[targetStack.length - 1]; + } - getColorLabel(jodit, control, button) { - // Colorize material design `color-helper` icon. - const colorHelper = button.textBox.querySelector('.mdi-color-helper'); - const svg = button.textBox.querySelector('svg'); - if (!colorHelper || !svg) return; - colorHelper.style.color = svg.style.fill; - } - /** - * @param {HTMLElement} popup - * @param {Jodit} jodit - * @param {Node} current - * @param {Control} control - * @param {Function} close - */ + /* */ + var VNode = function VNode ( + tag, + data, + children, + text, + elm, + context, + componentOptions, + asyncFactory + ) { + this.tag = tag; + this.data = data; + this.children = children; + this.text = text; + this.elm = elm; + this.ns = undefined; + this.context = context; + this.fnContext = undefined; + this.fnOptions = undefined; + this.fnScopeId = undefined; + this.key = data && data.key; + this.componentOptions = componentOptions; + this.componentInstance = undefined; + this.parent = undefined; + this.raw = false; + this.isStatic = false; + this.isRootInsert = true; + this.isComment = false; + this.isCloned = false; + this.isOnce = false; + this.asyncFactory = asyncFactory; + this.asyncMeta = undefined; + this.isAsyncPlaceholder = false; + }; - colorPopup(popup, jodit, current, control, close = noop) { - const { - events, - options - } = jodit; - const pickers = getColorPickers(popup, { - defaultTab: options.colorPickerDefaultTab - }); // Add reset color buttons to main toolbar's colorpicker/s. + var prototypeAccessors = { child: { configurable: true } }; - onSelect(events, this.addResetButton(pickers.textColor), () => { - jodit.execCommand(JODIT_COMMAND_TEXT_COLOR, false, CSS_NO_COLOR); - close(); - }); - onSelect(events, this.addResetButton(pickers.backgroundColor), () => { - jodit.execCommand(JODIT_COMMAND_BACKGROUND_COLOR, false, CSS_NO_COLOR); - close(); - }); - return popup; - } - /** - * @param {HTMLElement} popup - * @param {Jodit} jodit - * @param {HTMLTableElement} table - */ + // DEPRECATED: alias for componentInstance for backwards compat. + /* istanbul ignore next */ + prototypeAccessors.child.get = function () { + return this.componentInstance + }; + Object.defineProperties( VNode.prototype, prototypeAccessors ); - inlineColorPopup(popup, jodit, table) { - const self = this; - const { - constructor: Jodit, - events - } = jodit; - const pickers = getColorPickers(popup, { - defaultTab: 'background' - }); - pickers.forEach(picker => { - const selected = picker.querySelector('.active'); - if (selected) this.changeSelectedMarker(selected); - const [eventDesc] = events.getStore(picker).get(JODIT_PICKER_SELECTION_EVENTS[0], JODIT_DEFAULT_EVENT_NAMESPACE$2); - const oldListener = eventDesc && eventDesc.originalCallback; - if (!oldListener) return; - replaceListener$1(jodit, picker, JODIT_PICKER_SELECTION_EVENTS.join(' '), newListener, oldListener); + var createEmptyVNode = function (text) { + if ( text === void 0 ) text = ''; - function newListener(e) { - oldListener.apply(this, arguments); - self.onColorChange(e, picker); - } - }); // Add reset color buttons to inline toolbar's colorpicker/s. + var node = new VNode(); + node.text = text; + node.isComment = true; + return node + }; - onSelect(events, this.addResetButton(pickers.textColor), () => { - const selectedCells = Jodit.modules.Table.getAllSelectedCells(table); - selectedCells.forEach(cell => cell.style.color = CSS_NO_COLOR); - jodit.setEditorValue(); - }); - onSelect(events, this.addResetButton(pickers.backgroundColor), () => { - const selectedCells = Jodit.modules.Table.getAllSelectedCells(table); - selectedCells.forEach(cell => cell.style.backgroundColor = CSS_NO_COLOR); - jodit.setEditorValue(); - }); - onSelect(events, this.addResetButton(pickers.borderColor), () => { - const selectedCells = Jodit.modules.Table.getAllSelectedCells(table); - selectedCells.forEach(cell => cell.style.borderColor = CSS_NO_COLOR); - jodit.setEditorValue(); - }); - return popup; - } - /** - * @param {Event} e - * @param {HTMLElement} picker - */ + function createTextVNode (val) { + return new VNode(undefined, undefined, undefined, String(val)) + } + // optimized shallow clone + // used for static nodes and slot nodes because they may be reused across + // multiple renders, cloning them avoids errors when DOM manipulations rely + // on their elm reference. + function cloneVNode (vnode) { + var cloned = new VNode( + vnode.tag, + vnode.data, + // #7975 + // clone children array to avoid mutating original in case of cloning + // a child. + vnode.children && vnode.children.slice(), + vnode.text, + vnode.elm, + vnode.context, + vnode.componentOptions, + vnode.asyncFactory + ); + cloned.ns = vnode.ns; + cloned.isStatic = vnode.isStatic; + cloned.key = vnode.key; + cloned.isComment = vnode.isComment; + cloned.fnContext = vnode.fnContext; + cloned.fnOptions = vnode.fnOptions; + cloned.fnScopeId = vnode.fnScopeId; + cloned.asyncMeta = vnode.asyncMeta; + cloned.isCloned = true; + return cloned + } - onColorChange(e, picker) { - const { - constructor: Jodit - } = this.jodit; - const button = Jodit.modules.Dom.up(e.target, el => el.matches('[data-color]'), picker); - if (!button) return; - const selected = picker.querySelector('.active'); - if (!selected) return; + /* + * not type checking this file because flow doesn't play well with + * dynamically accessing methods on Array prototype + */ - if (this.isResetButton(button)) { - selected.classList.remove('active'); - selected.innerHTML = ''; - return; + var arrayProto = Array.prototype; + var arrayMethods = Object.create(arrayProto); + + var methodsToPatch = [ + 'push', + 'pop', + 'shift', + 'unshift', + 'splice', + 'sort', + 'reverse' + ]; + + /** + * Intercept mutating methods and emit events + */ + methodsToPatch.forEach(function (method) { + // cache original method + var original = arrayProto[method]; + def(arrayMethods, method, function mutator () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var result = original.apply(this, args); + var ob = this.__ob__; + var inserted; + switch (method) { + case 'push': + case 'unshift': + inserted = args; + break + case 'splice': + inserted = args.slice(2); + break } + if (inserted) { ob.observeArray(inserted); } + // notify change + ob.dep.notify(); + return result + }); + }); - this.changeSelectedMarker(selected); - } - /** - * @param {HTMLElement} picker - * @return {HTMLSpanElement} - */ + /* */ + var arrayKeys = Object.getOwnPropertyNames(arrayMethods); - addResetButton(picker) { - const btnResetColor = picker && Array.from(picker.children).filter(el => el.matches('a')).pop(); - if (!btnResetColor) return document.createElement('span'); - btnResetColor.classList.add(this.options.btnResetColorClass); - btnResetColor.innerHTML = ''; - const tabIndex = this.jodit.options.allowTabNavigation ? 0 : -1; - btnResetColor.appendChild(createButton({ - icon: 'mdi-water-off', - text: 'None', - tabIndex - })); - return btnResetColor; - } - /** - * @param {HTMLAnchorElement} selected - */ + /** + * In some cases we may want to disable observation inside a component's + * update computation. + */ + var shouldObserve = true; + function toggleObserving (value) { + shouldObserve = value; + } - changeSelectedMarker(selected) { - // Swap eye icon marking selected color with colorized bullet. - selected.classList.add(this.options.selectedMarkerClass); - const svg = selected.querySelector('svg'); - const circle = createIcon('mdi-circle'); - Object.assign(circle.style, { - color: svg.style.fill, - fontSize: '8px' - }); - selected.appendChild(circle); + /** + * Observer class that is attached to each observed + * object. Once attached, the observer converts the target + * object's property keys into getter/setters that + * collect dependencies and dispatch updates. + */ + var Observer = function Observer (value) { + this.value = value; + this.dep = new Dep(); + this.vmCount = 0; + def(value, '__ob__', this); + if (Array.isArray(value)) { + if (hasProto) { + protoAugment(value, arrayMethods); + } else { + copyAugment(value, arrayMethods, arrayKeys); + } + this.observeArray(value); + } else { + this.walk(value); } - /** - * @param {Jodit} jodit - */ + }; + /** + * Walk through all properties and convert them into + * getter/setters. This method should only be called when + * value type is Object. + */ + Observer.prototype.walk = function walk (obj) { + var keys = Object.keys(obj); + for (var i = 0; i < keys.length; i++) { + defineReactive$$1(obj, keys[i]); + } + }; - init({ - events - }) { - events.on('getIcon', getMdiIcon); + /** + * Observe a list of Array items. + */ + Observer.prototype.observeArray = function observeArray (items) { + for (var i = 0, l = items.length; i < l; i++) { + observe(items[i]); } - /** - * @param {Jodit} jodit - */ + }; + // helpers - beforeDestruct(jodit) { - jodit.events.off('getIcon', getMdiIcon); + /** + * Augment a target Object or Array by intercepting + * the prototype chain using __proto__ + */ + function protoAugment (target, src) { + /* eslint-disable no-proto */ + target.__proto__ = src; + /* eslint-enable no-proto */ + } + + /** + * Augment a target Object or Array by defining + * hidden properties. + */ + /* istanbul ignore next */ + function copyAugment (target, src, keys) { + for (var i = 0, l = keys.length; i < l; i++) { + var key = keys[i]; + def(target, key, src[key]); } + } + /** + * Attempt to create an observer instance for a value, + * returns the new observer if successfully observed, + * or the existing observer if the value already has one. + */ + function observe (value, asRootData) { + if (!isObject(value) || value instanceof VNode) { + return + } + var ob; + if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { + ob = value.__ob__; + } else if ( + shouldObserve && + !isServerRendering() && + (Array.isArray(value) || isPlainObject(value)) && + Object.isExtensible(value) && + !value._isVue + ) { + ob = new Observer(value); + } + if (asRootData && ob) { + ob.vmCount++; + } + return ob } + /** - * @param {HTMLElement} popup - * @param {Object} options - * @param {String} options.defaultTab - * @returns {ColorPickers} + * Define a reactive property on an Object. */ + function defineReactive$$1 ( + obj, + key, + val, + customSetter, + shallow + ) { + var dep = new Dep(); - function getColorPickers(popup, { - defaultTab - }) { - const pickers = Array.from(popup.querySelectorAll(JODIT_COLORPICKER)); - if (pickers.length <= 0) return pickers; - let textColor, backgroundColor, borderColor; + var property = Object.getOwnPropertyDescriptor(obj, key); + if (property && property.configurable === false) { + return + } - if (defaultTab === 'background') { - [backgroundColor, textColor, borderColor] = pickers; - } else if (defaultTab === 'color') { - [textColor, backgroundColor, borderColor] = pickers; + // cater for pre-defined getter/setters + var getter = property && property.get; + var setter = property && property.set; + if ((!getter || setter) && arguments.length === 2) { + val = obj[key]; } - return Object.assign(pickers, { - textColor, - backgroundColor, - borderColor + var childOb = !shallow && observe(val); + Object.defineProperty(obj, key, { + enumerable: true, + configurable: true, + get: function reactiveGetter () { + var value = getter ? getter.call(obj) : val; + if (Dep.target) { + dep.depend(); + if (childOb) { + childOb.dep.depend(); + if (Array.isArray(value)) { + dependArray(value); + } + } + } + return value + }, + set: function reactiveSetter (newVal) { + var value = getter ? getter.call(obj) : val; + /* eslint-disable no-self-compare */ + if (newVal === value || (newVal !== newVal && value !== value)) { + return + } + /* eslint-enable no-self-compare */ + if (customSetter) { + customSetter(); + } + // #7981: for accessor properties without setter + if (getter && !setter) { return } + if (setter) { + setter.call(obj, newVal); + } else { + val = newVal; + } + childOb = !shallow && observe(newVal); + dep.notify(); + } }); } + /** - * @param {Events} events - * @param {Object} target - * @param {EventListener} listener + * Set a property on an object. Adds the new property and + * triggers change notification if the property doesn't + * already exist. */ - - - function onSelect(events, target, listener) { - return events.on(target, JODIT_PICKER_SELECTION_EVENTS.join(' '), listener); + function set (target, key, val) { + if ((isUndef(target) || isPrimitive(target)) + ) { + warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target)))); + } + if (Array.isArray(target) && isValidArrayIndex(key)) { + target.length = Math.max(target.length, key); + target.splice(key, 1, val); + return val + } + if (key in target && !(key in Object.prototype)) { + target[key] = val; + return val + } + var ob = (target).__ob__; + if (target._isVue || (ob && ob.vmCount)) { + warn( + 'Avoid adding reactive properties to a Vue instance or its root $data ' + + 'at runtime - declare it upfront in the data option.' + ); + return val + } + if (!ob) { + target[key] = val; + return val + } + defineReactive$$1(ob.value, key, val); + ob.dep.notify(); + return val } + /** - * @param {Jodit} jodit - * @param {Object} target - * @param {String} events - * @param {EventListener} listener - * @param {EventListener} oldListener + * Delete a property and trigger change if necessary. */ - - - function replaceListener$1(jodit, target, events, listener, oldListener) { - jodit.events.off(target, events, oldListener).on(target, events, listener); + function del (target, key) { + if ((isUndef(target) || isPrimitive(target)) + ) { + warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target)))); + } + if (Array.isArray(target) && isValidArrayIndex(key)) { + target.splice(key, 1); + return + } + var ob = (target).__ob__; + if (target._isVue || (ob && ob.vmCount)) { + warn( + 'Avoid deleting properties on a Vue instance or its root $data ' + + '- just set it to null.' + ); + return + } + if (!hasOwn(target, key)) { + return + } + delete target[key]; + if (!ob) { + return + } + ob.dep.notify(); } + /** - * @param {Object} options - * @param {String} options.icon - * @param {String} options.text - * @param {Number} [options.tabIndex=0] - * @returns {HTMLSpanElement} + * Collect dependencies on array elements when the array is touched, since + * we cannot intercept array element access like property getters. */ + function dependArray (value) { + for (var e = (void 0), i = 0, l = value.length; i < l; i++) { + e = value[i]; + e && e.__ob__ && e.__ob__.dep.depend(); + if (Array.isArray(e)) { + dependArray(e); + } + } + } + /* */ - function createButton({ - icon, - text, - tabIndex = 0 - }) { - const btn = document.createElement('span'); - btn.tabIndex = tabIndex; - btn.setAttribute('role', 'button'); - btn.appendChild(createIcon(icon)); - btn.innerHTML += text; - return btn; - } /** - * @param {String} name - * @returns {HTMLSpanElement} + * Option overwriting strategies are functions that handle + * how to merge a parent option value and a child option + * value into the final value. */ + var strats = config.optionMergeStrategies; - function createIcon(name) { - const icon = document.createElement('span'); - icon.classList.add('jodit_icon', 'mdi', name); - return icon; + /** + * Options with restrictions + */ + { + strats.el = strats.propsData = function (parent, child, vm, key) { + if (!vm) { + warn( + "option \"" + key + "\" can only be used during instance " + + 'creation with the `new` keyword.' + ); + } + return defaultStrat(parent, child) + }; } /** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache + * Helper that recursively merges two data objects together. */ - function listCacheClear() { - this.__data__ = []; - this.size = 0; + function mergeData (to, from) { + if (!from) { return to } + var key, toVal, fromVal; + + var keys = hasSymbol + ? Reflect.ownKeys(from) + : Object.keys(from); + + for (var i = 0; i < keys.length; i++) { + key = keys[i]; + // in case the object is already observed... + if (key === '__ob__') { continue } + toVal = to[key]; + fromVal = from[key]; + if (!hasOwn(to, key)) { + set(to, key, fromVal); + } else if ( + toVal !== fromVal && + isPlainObject(toVal) && + isPlainObject(fromVal) + ) { + mergeData(toVal, fromVal); + } + } + return to } - var _listCacheClear = listCacheClear; - /** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true + * Data */ - function eq(value, other) { - return value === other || (value !== value && other !== other); + function mergeDataOrFn ( + parentVal, + childVal, + vm + ) { + if (!vm) { + // in a Vue.extend merge, both should be functions + if (!childVal) { + return parentVal + } + if (!parentVal) { + return childVal + } + // when parentVal & childVal are both present, + // we need to return a function that returns the + // merged result of both functions... no need to + // check if parentVal is a function here because + // it has to be a function to pass previous merges. + return function mergedDataFn () { + return mergeData( + typeof childVal === 'function' ? childVal.call(this, this) : childVal, + typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal + ) + } + } else { + return function mergedInstanceDataFn () { + // instance merge + var instanceData = typeof childVal === 'function' + ? childVal.call(vm, vm) + : childVal; + var defaultData = typeof parentVal === 'function' + ? parentVal.call(vm, vm) + : parentVal; + if (instanceData) { + return mergeData(instanceData, defaultData) + } else { + return defaultData + } + } + } } - var eq_1 = eq; + strats.data = function ( + parentVal, + childVal, + vm + ) { + if (!vm) { + if (childVal && typeof childVal !== 'function') { + warn( + 'The "data" option should be a function ' + + 'that returns a per-instance value in component ' + + 'definitions.', + vm + ); + + return parentVal + } + return mergeDataOrFn(parentVal, childVal) + } + + return mergeDataOrFn(parentVal, childVal, vm) + }; /** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. + * Hooks and props are merged as arrays. */ - function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq_1(array[length][0], key)) { - return length; + function mergeHook ( + parentVal, + childVal + ) { + var res = childVal + ? parentVal + ? parentVal.concat(childVal) + : Array.isArray(childVal) + ? childVal + : [childVal] + : parentVal; + return res + ? dedupeHooks(res) + : res + } + + function dedupeHooks (hooks) { + var res = []; + for (var i = 0; i < hooks.length; i++) { + if (res.indexOf(hooks[i]) === -1) { + res.push(hooks[i]); } } - return -1; + return res } - var _assocIndexOf = assocIndexOf; - - /** Used for built-in method references. */ - var arrayProto = Array.prototype; - - /** Built-in value references. */ - var splice = arrayProto.splice; + LIFECYCLE_HOOKS.forEach(function (hook) { + strats[hook] = mergeHook; + }); /** - * Removes `key` and its value from the list cache. + * Assets * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. + * When a vm is present (instance creation), we need to do + * a three-way merge between constructor options, instance + * options and parent options. */ - function listCacheDelete(key) { - var data = this.__data__, - index = _assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); + function mergeAssets ( + parentVal, + childVal, + vm, + key + ) { + var res = Object.create(parentVal || null); + if (childVal) { + assertObjectType(key, childVal, vm); + return extend(res, childVal) } else { - splice.call(data, index, 1); + return res } - --this.size; - return true; } - var _listCacheDelete = listCacheDelete; + ASSET_TYPES.forEach(function (type) { + strats[type + 's'] = mergeAssets; + }); /** - * Gets the list cache value for `key`. + * Watchers. * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. + * Watchers hashes should not overwrite one + * another, so we merge them as arrays. */ - function listCacheGet(key) { - var data = this.__data__, - index = _assocIndexOf(data, key); + strats.watch = function ( + parentVal, + childVal, + vm, + key + ) { + // work around Firefox's Object.prototype.watch... + if (parentVal === nativeWatch) { parentVal = undefined; } + if (childVal === nativeWatch) { childVal = undefined; } + /* istanbul ignore if */ + if (!childVal) { return Object.create(parentVal || null) } + { + assertObjectType(key, childVal, vm); + } + if (!parentVal) { return childVal } + var ret = {}; + extend(ret, parentVal); + for (var key$1 in childVal) { + var parent = ret[key$1]; + var child = childVal[key$1]; + if (parent && !Array.isArray(parent)) { + parent = [parent]; + } + ret[key$1] = parent + ? parent.concat(child) + : Array.isArray(child) ? child : [child]; + } + return ret + }; - return index < 0 ? undefined : data[index][1]; - } + /** + * Other object hashes. + */ + strats.props = + strats.methods = + strats.inject = + strats.computed = function ( + parentVal, + childVal, + vm, + key + ) { + if (childVal && "development" !== 'production') { + assertObjectType(key, childVal, vm); + } + if (!parentVal) { return childVal } + var ret = Object.create(null); + extend(ret, parentVal); + if (childVal) { extend(ret, childVal); } + return ret + }; + strats.provide = mergeDataOrFn; - var _listCacheGet = listCacheGet; + /** + * Default strategy. + */ + var defaultStrat = function (parentVal, childVal) { + return childVal === undefined + ? parentVal + : childVal + }; /** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + * Validate component names */ - function listCacheHas(key) { - return _assocIndexOf(this.__data__, key) > -1; + function checkComponents (options) { + for (var key in options.components) { + validateComponentName(key); + } } - var _listCacheHas = listCacheHas; + function validateComponentName (name) { + if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) { + warn( + 'Invalid component name: "' + name + '". Component names ' + + 'should conform to valid custom element name in html5 specification.' + ); + } + if (isBuiltInTag(name) || config.isReservedTag(name)) { + warn( + 'Do not use built-in or reserved HTML elements as component ' + + 'id: ' + name + ); + } + } /** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. + * Ensure all props option syntax are normalized into the + * Object-based format. */ - function listCacheSet(key, value) { - var data = this.__data__, - index = _assocIndexOf(data, key); - - if (index < 0) { - ++this.size; - data.push([key, value]); + function normalizeProps (options, vm) { + var props = options.props; + if (!props) { return } + var res = {}; + var i, val, name; + if (Array.isArray(props)) { + i = props.length; + while (i--) { + val = props[i]; + if (typeof val === 'string') { + name = camelize(val); + res[name] = { type: null }; + } else { + warn('props must be strings when using array syntax.'); + } + } + } else if (isPlainObject(props)) { + for (var key in props) { + val = props[key]; + name = camelize(key); + res[name] = isPlainObject(val) + ? val + : { type: val }; + } } else { - data[index][1] = value; + warn( + "Invalid value for option \"props\": expected an Array or an Object, " + + "but got " + (toRawType(props)) + ".", + vm + ); } - return this; + options.props = res; } - var _listCacheSet = listCacheSet; - /** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * Normalize all injections into Object-based format */ - function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); + function normalizeInject (options, vm) { + var inject = options.inject; + if (!inject) { return } + var normalized = options.inject = {}; + if (Array.isArray(inject)) { + for (var i = 0; i < inject.length; i++) { + normalized[inject[i]] = { from: inject[i] }; + } + } else if (isPlainObject(inject)) { + for (var key in inject) { + var val = inject[key]; + normalized[key] = isPlainObject(val) + ? extend({ from: key }, val) + : { from: val }; + } + } else { + warn( + "Invalid value for option \"inject\": expected an Array or an Object, " + + "but got " + (toRawType(inject)) + ".", + vm + ); } } - // Add methods to `ListCache`. - ListCache.prototype.clear = _listCacheClear; - ListCache.prototype['delete'] = _listCacheDelete; - ListCache.prototype.get = _listCacheGet; - ListCache.prototype.has = _listCacheHas; - ListCache.prototype.set = _listCacheSet; - - var _ListCache = ListCache; - /** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack + * Normalize raw function directives into object format. */ - function stackClear() { - this.__data__ = new _ListCache; - this.size = 0; + function normalizeDirectives (options) { + var dirs = options.directives; + if (dirs) { + for (var key in dirs) { + var def$$1 = dirs[key]; + if (typeof def$$1 === 'function') { + dirs[key] = { bind: def$$1, update: def$$1 }; + } + } + } } - var _stackClear = stackClear; + function assertObjectType (name, value, vm) { + if (!isPlainObject(value)) { + warn( + "Invalid value for option \"" + name + "\": expected an Object, " + + "but got " + (toRawType(value)) + ".", + vm + ); + } + } /** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. + * Merge two option objects into a new one. + * Core utility used in both instantiation and inheritance. */ - function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); + function mergeOptions ( + parent, + child, + vm + ) { + { + checkComponents(child); + } + + if (typeof child === 'function') { + child = child.options; + } + + normalizeProps(child, vm); + normalizeInject(child, vm); + normalizeDirectives(child); + + // Apply extends and mixins on the child options, + // but only if it is a raw options object that isn't + // the result of another mergeOptions call. + // Only merged options has the _base property. + if (!child._base) { + if (child.extends) { + parent = mergeOptions(parent, child.extends, vm); + } + if (child.mixins) { + for (var i = 0, l = child.mixins.length; i < l; i++) { + parent = mergeOptions(parent, child.mixins[i], vm); + } + } + } - this.size = data.size; - return result; + var options = {}; + var key; + for (key in parent) { + mergeField(key); + } + for (key in child) { + if (!hasOwn(parent, key)) { + mergeField(key); + } + } + function mergeField (key) { + var strat = strats[key] || defaultStrat; + options[key] = strat(parent[key], child[key], vm, key); + } + return options } - var _stackDelete = stackDelete; - /** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. + * Resolve an asset. + * This function is used because child instances need access + * to assets defined in its ancestor chain. */ - function stackGet(key) { - return this.__data__.get(key); + function resolveAsset ( + options, + type, + id, + warnMissing + ) { + /* istanbul ignore if */ + if (typeof id !== 'string') { + return + } + var assets = options[type]; + // check local registration variations first + if (hasOwn(assets, id)) { return assets[id] } + var camelizedId = camelize(id); + if (hasOwn(assets, camelizedId)) { return assets[camelizedId] } + var PascalCaseId = capitalize(camelizedId); + if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] } + // fallback to prototype chain + var res = assets[id] || assets[camelizedId] || assets[PascalCaseId]; + if (warnMissing && !res) { + warn( + 'Failed to resolve ' + type.slice(0, -1) + ': ' + id, + options + ); + } + return res } - var _stackGet = stackGet; + /* */ + + + + function validateProp ( + key, + propOptions, + propsData, + vm + ) { + var prop = propOptions[key]; + var absent = !hasOwn(propsData, key); + var value = propsData[key]; + // boolean casting + var booleanIndex = getTypeIndex(Boolean, prop.type); + if (booleanIndex > -1) { + if (absent && !hasOwn(prop, 'default')) { + value = false; + } else if (value === '' || value === hyphenate(key)) { + // only cast empty string / same name to boolean if + // boolean has higher priority + var stringIndex = getTypeIndex(String, prop.type); + if (stringIndex < 0 || booleanIndex < stringIndex) { + value = true; + } + } + } + // check default value + if (value === undefined) { + value = getPropDefaultValue(vm, prop, key); + // since the default value is a fresh copy, + // make sure to observe it. + var prevShouldObserve = shouldObserve; + toggleObserving(true); + observe(value); + toggleObserving(prevShouldObserve); + } + { + assertProp(prop, key, value, vm, absent); + } + return value + } /** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + * Get the default value of a prop. */ - function stackHas(key) { - return this.__data__.has(key); + function getPropDefaultValue (vm, prop, key) { + // no default, return undefined + if (!hasOwn(prop, 'default')) { + return undefined + } + var def = prop.default; + // warn against non-factory defaults for Object & Array + if (isObject(def)) { + warn( + 'Invalid default value for prop "' + key + '": ' + + 'Props with type Object/Array must use a factory function ' + + 'to return the default value.', + vm + ); + } + // the raw prop value was also undefined from previous render, + // return previous default value to avoid unnecessary watcher trigger + if (vm && vm.$options.propsData && + vm.$options.propsData[key] === undefined && + vm._props[key] !== undefined + ) { + return vm._props[key] + } + // call factory function for non-Function types + // a value is Function if its prototype is function even across different execution context + return typeof def === 'function' && getType(prop.type) !== 'Function' + ? def.call(vm) + : def } - var _stackHas = stackHas; + /** + * Assert whether a prop is valid. + */ + function assertProp ( + prop, + name, + value, + vm, + absent + ) { + if (prop.required && absent) { + warn( + 'Missing required prop: "' + name + '"', + vm + ); + return + } + if (value == null && !prop.required) { + return + } + var type = prop.type; + var valid = !type || type === true; + var expectedTypes = []; + if (type) { + if (!Array.isArray(type)) { + type = [type]; + } + for (var i = 0; i < type.length && !valid; i++) { + var assertedType = assertType(value, type[i], vm); + expectedTypes.push(assertedType.expectedType || ''); + valid = assertedType.valid; + } + } - /** `Object#toString` result references. */ - var asyncTag = '[object AsyncFunction]', - funcTag$2 = '[object Function]', - genTag$1 = '[object GeneratorFunction]', - proxyTag = '[object Proxy]'; + var haveExpectedTypes = expectedTypes.some(function (t) { return t; }); + if (!valid && haveExpectedTypes) { + warn( + getInvalidTypeMessage(name, value, expectedTypes), + vm + ); + return + } + var validator = prop.validator; + if (validator) { + if (!validator(value)) { + warn( + 'Invalid prop: custom validator check failed for prop "' + name + '".', + vm + ); + } + } + } + + var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/; + + function assertType (value, type, vm) { + var valid; + var expectedType = getType(type); + if (simpleCheckRE.test(expectedType)) { + var t = typeof value; + valid = t === expectedType.toLowerCase(); + // for primitive wrapper objects + if (!valid && t === 'object') { + valid = value instanceof type; + } + } else if (expectedType === 'Object') { + valid = isPlainObject(value); + } else if (expectedType === 'Array') { + valid = Array.isArray(value); + } else { + try { + valid = value instanceof type; + } catch (e) { + warn('Invalid prop type: "' + String(type) + '" is not a constructor', vm); + valid = false; + } + } + return { + valid: valid, + expectedType: expectedType + } + } + + var functionTypeCheckRE = /^\s*function (\w+)/; /** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false + * Use function string name to check built-in types, + * because a simple equality check will fail when running + * across different vms / iframes. */ - function isFunction$2(value) { - if (!isObject_1(value)) { - return false; + function getType (fn) { + var match = fn && fn.toString().match(functionTypeCheckRE); + return match ? match[1] : '' + } + + function isSameType (a, b) { + return getType(a) === getType(b) + } + + function getTypeIndex (type, expectedTypes) { + if (!Array.isArray(expectedTypes)) { + return isSameType(expectedTypes, type) ? 0 : -1 } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = _baseGetTag(value); - return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag; + for (var i = 0, len = expectedTypes.length; i < len; i++) { + if (isSameType(expectedTypes[i], type)) { + return i + } + } + return -1 } - var isFunction_1 = isFunction$2; + function getInvalidTypeMessage (name, value, expectedTypes) { + var message = "Invalid prop: type check failed for prop \"" + name + "\"." + + " Expected " + (expectedTypes.map(capitalize).join(', ')); + var expectedType = expectedTypes[0]; + var receivedType = toRawType(value); + // check if we need to specify expected value + if ( + expectedTypes.length === 1 && + isExplicable(expectedType) && + isExplicable(typeof value) && + !isBoolean(expectedType, receivedType) + ) { + message += " with value " + (styleValue(value, expectedType)); + } + message += ", got " + receivedType + " "; + // check if we need to specify received value + if (isExplicable(receivedType)) { + message += "with value " + (styleValue(value, receivedType)) + "."; + } + return message + } - /** Used to detect overreaching core-js shims. */ - var coreJsData = _root['__core-js_shared__']; + function styleValue (value, type) { + if (type === 'String') { + return ("\"" + value + "\"") + } else if (type === 'Number') { + return ("" + (Number(value))) + } else { + return ("" + value) + } + } - var _coreJsData = coreJsData; + var EXPLICABLE_TYPES = ['string', 'number', 'boolean']; + function isExplicable (value) { + return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; }) + } - /** Used to detect methods masquerading as native. */ - var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; - }()); + function isBoolean () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; - /** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ - function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); + return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; }) } - var _isMasked = isMasked; + /* */ - /** Used for built-in method references. */ - var funcProto$1 = Function.prototype; + function handleError (err, vm, info) { + // Deactivate deps tracking while processing error handler to avoid possible infinite rendering. + // See: https://github.com/vuejs/vuex/issues/1505 + pushTarget(); + try { + if (vm) { + var cur = vm; + while ((cur = cur.$parent)) { + var hooks = cur.$options.errorCaptured; + if (hooks) { + for (var i = 0; i < hooks.length; i++) { + try { + var capture = hooks[i].call(cur, err, vm, info) === false; + if (capture) { return } + } catch (e) { + globalHandleError(e, cur, 'errorCaptured hook'); + } + } + } + } + } + globalHandleError(err, vm, info); + } finally { + popTarget(); + } + } - /** Used to resolve the decompiled source of functions. */ - var funcToString$1 = funcProto$1.toString; + function invokeWithErrorHandling ( + handler, + context, + args, + vm, + info + ) { + var res; + try { + res = args ? handler.apply(context, args) : handler.call(context); + if (res && !res._isVue && isPromise(res) && !res._handled) { + res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); }); + // issue #9511 + // avoid catch triggering multiple times when nested calls + res._handled = true; + } + } catch (e) { + handleError(e, vm, info); + } + return res + } - /** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. - */ - function toSource(func) { - if (func != null) { - try { - return funcToString$1.call(func); - } catch (e) {} + function globalHandleError (err, vm, info) { + if (config.errorHandler) { try { - return (func + ''); - } catch (e) {} + return config.errorHandler.call(null, err, vm, info) + } catch (e) { + // if the user intentionally throws the original error in the handler, + // do not log it twice + if (e !== err) { + logError(e, null, 'config.errorHandler'); + } + } } - return ''; + logError(err, vm, info); } - var _toSource = toSource; + function logError (err, vm, info) { + { + warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm); + } + /* istanbul ignore else */ + if ((inBrowser || inWeex) && typeof console !== 'undefined') { + console.error(err); + } else { + throw err + } + } - /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + /* */ - /** Used to detect host constructors (Safari). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; + var isUsingMicroTask = false; - /** Used for built-in method references. */ - var funcProto = Function.prototype, - objectProto$a = Object.prototype; + var callbacks = []; + var pending = false; - /** Used to resolve the decompiled source of functions. */ - var funcToString = funcProto.toString; + function flushCallbacks () { + pending = false; + var copies = callbacks.slice(0); + callbacks.length = 0; + for (var i = 0; i < copies.length; i++) { + copies[i](); + } + } - /** Used to check objects for own properties. */ - var hasOwnProperty$8 = objectProto$a.hasOwnProperty; + // Here we have async deferring wrappers using microtasks. + // In 2.5 we used (macro) tasks (in combination with microtasks). + // However, it has subtle problems when state is changed right before repaint + // (e.g. #6813, out-in transitions). + // Also, using (macro) tasks in event handler would cause some weird behaviors + // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109). + // So we now use microtasks everywhere, again. + // A major drawback of this tradeoff is that there are some scenarios + // where microtasks have too high a priority and fire in between supposedly + // sequential events (e.g. #4521, #6690, which have workarounds) + // or even between bubbling of the same event (#6566). + var timerFunc; + + // The nextTick behavior leverages the microtask queue, which can be accessed + // via either native Promise.then or MutationObserver. + // MutationObserver has wider support, however it is seriously bugged in + // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It + // completely stops working after triggering a few times... so, if native + // Promise is available, we will use it: + /* istanbul ignore next, $flow-disable-line */ + if (typeof Promise !== 'undefined' && isNative(Promise)) { + var p = Promise.resolve(); + timerFunc = function () { + p.then(flushCallbacks); + // In problematic UIWebViews, Promise.then doesn't completely break, but + // it can get stuck in a weird state where callbacks are pushed into the + // microtask queue but the queue isn't being flushed, until the browser + // needs to do some other work, e.g. handle a timer. Therefore we can + // "force" the microtask queue to be flushed by adding an empty timer. + if (isIOS) { setTimeout(noop); } + }; + isUsingMicroTask = true; + } else if (!isIE && typeof MutationObserver !== 'undefined' && ( + isNative(MutationObserver) || + // PhantomJS and iOS 7.x + MutationObserver.toString() === '[object MutationObserverConstructor]' + )) { + // Use MutationObserver where native Promise is not available, + // e.g. PhantomJS, iOS7, Android 4.4 + // (#6466 MutationObserver is unreliable in IE11) + var counter = 1; + var observer = new MutationObserver(flushCallbacks); + var textNode = document.createTextNode(String(counter)); + observer.observe(textNode, { + characterData: true + }); + timerFunc = function () { + counter = (counter + 1) % 2; + textNode.data = String(counter); + }; + isUsingMicroTask = true; + } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) { + // Fallback to setImmediate. + // Technically it leverages the (macro) task queue, + // but it is still a better choice than setTimeout. + timerFunc = function () { + setImmediate(flushCallbacks); + }; + } else { + // Fallback to setTimeout. + timerFunc = function () { + setTimeout(flushCallbacks, 0); + }; + } + + function nextTick (cb, ctx) { + var _resolve; + callbacks.push(function () { + if (cb) { + try { + cb.call(ctx); + } catch (e) { + handleError(e, ctx, 'nextTick'); + } + } else if (_resolve) { + _resolve(ctx); + } + }); + if (!pending) { + pending = true; + timerFunc(); + } + // $flow-disable-line + if (!cb && typeof Promise !== 'undefined') { + return new Promise(function (resolve) { + _resolve = resolve; + }) + } + } + + /* */ + + /* not type checking this file because flow doesn't play well with Proxy */ + + var initProxy; + + { + var allowedGlobals = makeMap( + 'Infinity,undefined,NaN,isFinite,isNaN,' + + 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + + 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' + + 'require' // for Webpack/Browserify + ); + + var warnNonPresent = function (target, key) { + warn( + "Property or method \"" + key + "\" is not defined on the instance but " + + 'referenced during render. Make sure that this property is reactive, ' + + 'either in the data option, or for class-based components, by ' + + 'initializing the property. ' + + 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', + target + ); + }; + + var warnReservedPrefix = function (target, key) { + warn( + "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " + + 'properties starting with "$" or "_" are not proxied in the Vue instance to ' + + 'prevent conflicts with Vue internals. ' + + 'See: https://vuejs.org/v2/api/#data', + target + ); + }; + + var hasProxy = + typeof Proxy !== 'undefined' && isNative(Proxy); + + if (hasProxy) { + var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact'); + config.keyCodes = new Proxy(config.keyCodes, { + set: function set (target, key, value) { + if (isBuiltInModifier(key)) { + warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key)); + return false + } else { + target[key] = value; + return true + } + } + }); + } + + var hasHandler = { + has: function has (target, key) { + var has = key in target; + var isAllowed = allowedGlobals(key) || + (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data)); + if (!has && !isAllowed) { + if (key in target.$data) { warnReservedPrefix(target, key); } + else { warnNonPresent(target, key); } + } + return has || !isAllowed + } + }; + + var getHandler = { + get: function get (target, key) { + if (typeof key === 'string' && !(key in target)) { + if (key in target.$data) { warnReservedPrefix(target, key); } + else { warnNonPresent(target, key); } + } + return target[key] + } + }; + + initProxy = function initProxy (vm) { + if (hasProxy) { + // determine which proxy handler to use + var options = vm.$options; + var handlers = options.render && options.render._withStripped + ? getHandler + : hasHandler; + vm._renderProxy = new Proxy(vm, handlers); + } else { + vm._renderProxy = vm; + } + }; + } + + /* */ - /** Used to detect if a method is native. */ - var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty$8).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' - ); + var seenObjects = new _Set(); /** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. + * Recursively traverse an object to evoke all converted + * getters, so that every nested property inside the object + * is collected as a "deep" dependency. */ - function baseIsNative(value) { - if (!isObject_1(value) || _isMasked(value)) { - return false; - } - var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor; - return pattern.test(_toSource(value)); + function traverse (val) { + _traverse(val, seenObjects); + seenObjects.clear(); } - var _baseIsNative = baseIsNative; + function _traverse (val, seen) { + var i, keys; + var isA = Array.isArray(val); + if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) { + return + } + if (val.__ob__) { + var depId = val.__ob__.dep.id; + if (seen.has(depId)) { + return + } + seen.add(depId); + } + if (isA) { + i = val.length; + while (i--) { _traverse(val[i], seen); } + } else { + keys = Object.keys(val); + i = keys.length; + while (i--) { _traverse(val[keys[i]], seen); } + } + } - /** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ - function getValue(object, key) { - return object == null ? undefined : object[key]; + var mark; + var measure; + + { + var perf = inBrowser && window.performance; + /* istanbul ignore if */ + if ( + perf && + perf.mark && + perf.measure && + perf.clearMarks && + perf.clearMeasures + ) { + mark = function (tag) { return perf.mark(tag); }; + measure = function (name, startTag, endTag) { + perf.measure(name, startTag, endTag); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + // perf.clearMeasures(name) + }; + } } - var _getValue = getValue; + /* */ - /** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ - function getNative(object, key) { - var value = _getValue(object, key); - return _baseIsNative(value) ? value : undefined; + var normalizeEvent = cached(function (name) { + var passive = name.charAt(0) === '&'; + name = passive ? name.slice(1) : name; + var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first + name = once$$1 ? name.slice(1) : name; + var capture = name.charAt(0) === '!'; + name = capture ? name.slice(1) : name; + return { + name: name, + once: once$$1, + capture: capture, + passive: passive + } + }); + + function createFnInvoker (fns, vm) { + function invoker () { + var arguments$1 = arguments; + + var fns = invoker.fns; + if (Array.isArray(fns)) { + var cloned = fns.slice(); + for (var i = 0; i < cloned.length; i++) { + invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler"); + } + } else { + // return handler return value for single handlers + return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler") + } + } + invoker.fns = fns; + return invoker } - var _getNative = getNative; + function updateListeners ( + on, + oldOn, + add, + remove$$1, + createOnceHandler, + vm + ) { + var name, cur, old, event; + for (name in on) { + cur = on[name]; + old = oldOn[name]; + event = normalizeEvent(name); + if (isUndef(cur)) { + warn( + "Invalid handler for event \"" + (event.name) + "\": got " + String(cur), + vm + ); + } else if (isUndef(old)) { + if (isUndef(cur.fns)) { + cur = on[name] = createFnInvoker(cur, vm); + } + if (isTrue(event.once)) { + cur = on[name] = createOnceHandler(event.name, cur, event.capture); + } + add(event.name, cur, event.capture, event.passive, event.params); + } else if (cur !== old) { + old.fns = cur; + on[name] = old; + } + } + for (name in oldOn) { + if (isUndef(on[name])) { + event = normalizeEvent(name); + remove$$1(event.name, oldOn[name], event.capture); + } + } + } - /* Built-in method references that are verified to be native. */ - var Map$1 = _getNative(_root, 'Map'); + /* */ - var _Map = Map$1; + function mergeVNodeHook (def, hookKey, hook) { + if (def instanceof VNode) { + def = def.data.hook || (def.data.hook = {}); + } + var invoker; + var oldHook = def[hookKey]; - /* Built-in method references that are verified to be native. */ - var nativeCreate = _getNative(Object, 'create'); + function wrappedHook () { + hook.apply(this, arguments); + // important: remove merged hook to ensure it's called only once + // and prevent memory leak + remove(invoker.fns, wrappedHook); + } - var _nativeCreate = nativeCreate; + if (isUndef(oldHook)) { + // no existing hook + invoker = createFnInvoker([wrappedHook]); + } else { + /* istanbul ignore if */ + if (isDef(oldHook.fns) && isTrue(oldHook.merged)) { + // already a merged invoker + invoker = oldHook; + invoker.fns.push(wrappedHook); + } else { + // existing plain hook + invoker = createFnInvoker([oldHook, wrappedHook]); + } + } - /** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ - function hashClear() { - this.__data__ = _nativeCreate ? _nativeCreate(null) : {}; - this.size = 0; + invoker.merged = true; + def[hookKey] = invoker; } - var _hashClear = hashClear; + /* */ + + function extractPropsFromVNodeData ( + data, + Ctor, + tag + ) { + // we are only extracting raw values here. + // validation and default values are handled in the child + // component itself. + var propOptions = Ctor.options.props; + if (isUndef(propOptions)) { + return + } + var res = {}; + var attrs = data.attrs; + var props = data.props; + if (isDef(attrs) || isDef(props)) { + for (var key in propOptions) { + var altKey = hyphenate(key); + { + var keyInLowerCase = key.toLowerCase(); + if ( + key !== keyInLowerCase && + attrs && hasOwn(attrs, keyInLowerCase) + ) { + tip( + "Prop \"" + keyInLowerCase + "\" is passed to component " + + (formatComponentName(tag || Ctor)) + ", but the declared prop name is" + + " \"" + key + "\". " + + "Note that HTML attributes are case-insensitive and camelCased " + + "props need to use their kebab-case equivalents when using in-DOM " + + "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"." + ); + } + } + checkProp(res, props, key, altKey, true) || + checkProp(res, attrs, key, altKey, false); + } + } + return res + } - /** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; + function checkProp ( + res, + hash, + key, + altKey, + preserve + ) { + if (isDef(hash)) { + if (hasOwn(hash, key)) { + res[key] = hash[key]; + if (!preserve) { + delete hash[key]; + } + return true + } else if (hasOwn(hash, altKey)) { + res[key] = hash[altKey]; + if (!preserve) { + delete hash[altKey]; + } + return true + } + } + return false } - var _hashDelete = hashDelete; + /* */ - /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED$1 = '__lodash_hash_undefined__'; + // The template compiler attempts to minimize the need for normalization by + // statically analyzing the template at compile time. + // + // For plain HTML markup, normalization can be completely skipped because the + // generated render function is guaranteed to return Array. There are + // two cases where extra normalization is needed: + + // 1. When the children contains components - because a functional component + // may return an Array instead of a single root. In this case, just a simple + // normalization is needed - if any child is an Array, we flatten the whole + // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep + // because functional components already normalize their own children. + function simpleNormalizeChildren (children) { + for (var i = 0; i < children.length; i++) { + if (Array.isArray(children[i])) { + return Array.prototype.concat.apply([], children) + } + } + return children + } - /** Used for built-in method references. */ - var objectProto$9 = Object.prototype; + // 2. When the children contains constructs that always generated nested Arrays, + // e.g.