From: Louis Jeckel Date: Tue, 8 Sep 2020 17:09:20 +0000 (+0200) Subject: socialArticles ckeditor X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a92fbc47c8022994a2f4a98f223c88ff35e077f5;p=psq.git socialArticles ckeditor --- diff --git a/app/Models/SocialArticle.php b/app/Models/SocialArticle.php index acbc509..87cd679 100644 --- a/app/Models/SocialArticle.php +++ b/app/Models/SocialArticle.php @@ -14,10 +14,11 @@ use A17\Twill\Models\Model; class SocialArticle extends Model { - use HasBlocks, HasSlug, HasMedias; + use HasSlug, HasMedias; protected $fillable = [ 'published', + 'content', 'title', ]; diff --git a/app/Repositories/SocialArticleRepository.php b/app/Repositories/SocialArticleRepository.php index e439c88..7774540 100644 --- a/app/Repositories/SocialArticleRepository.php +++ b/app/Repositories/SocialArticleRepository.php @@ -13,7 +13,7 @@ use App\Models\SocialArticle; class SocialArticleRepository extends ModuleRepository { - use HandleBlocks, HandleSlugs, HandleMedias; + use HandleSlugs, HandleMedias; public function __construct(SocialArticle $model) { diff --git a/database/migrations/2020_09_08_165135_add_content_to_social_articles_table.php b/database/migrations/2020_09_08_165135_add_content_to_social_articles_table.php new file mode 100644 index 0000000..b0994c4 --- /dev/null +++ b/database/migrations/2020_09_08_165135_add_content_to_social_articles_table.php @@ -0,0 +1,32 @@ +text('content')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('social_articles', function (Blueprint $table) { + $table->dropColumn('content'); + }); + } +} diff --git a/public/assets/admin/css/main-form.9825424d.css b/public/assets/admin/css/main-form.9825424d.css new file mode 100644 index 0000000..3e46e73 --- /dev/null +++ b/public/assets/admin/css/main-form.9825424d.css @@ -0,0 +1 @@ +.icon--add[data-v-1a811cfe],.icon--add svg[data-v-1a811cfe]{width:10px;height:10px}.icon--arrow-external[data-v-1a811cfe],.icon--arrow-external svg[data-v-1a811cfe]{width:8px;height:8px}.icon--arrow-sort[data-v-1a811cfe],.icon--arrow-sort svg[data-v-1a811cfe]{width:9px;height:11px}.icon--check[data-v-1a811cfe],.icon--check svg[data-v-1a811cfe]{width:11px;height:11px}.icon--close_icon[data-v-1a811cfe],.icon--close_icon svg[data-v-1a811cfe]{width:10px;height:10px}.icon--close_modal[data-v-1a811cfe],.icon--close_modal svg[data-v-1a811cfe]{width:16px;height:16px}.icon--colors[data-v-1a811cfe],.icon--colors svg[data-v-1a811cfe]{width:17px;height:17px}.icon--content-editor[data-v-1a811cfe],.icon--content-editor svg[data-v-1a811cfe]{width:14px;height:13px}.icon--crop[data-v-1a811cfe],.icon--crop svg[data-v-1a811cfe]{width:16px;height:18px}.icon--download[data-v-1a811cfe],.icon--download svg[data-v-1a811cfe]{width:12px;height:16px}.icon--drag[data-v-1a811cfe],.icon--drag svg[data-v-1a811cfe]{width:8px;height:17px}.icon--dropdown_default[data-v-1a811cfe],.icon--dropdown_default svg[data-v-1a811cfe]{width:9px;height:5px}.icon--dropdown_module[data-v-1a811cfe],.icon--dropdown_module svg[data-v-1a811cfe]{width:10px;height:6px}.icon--edit[data-v-1a811cfe],.icon--edit svg[data-v-1a811cfe]{width:13px;height:13px}.icon--edit_large[data-v-1a811cfe],.icon--edit_large svg[data-v-1a811cfe]{width:14px;height:14px}.icon--editor[data-v-1a811cfe],.icon--editor svg[data-v-1a811cfe]{width:14px;height:13px}.icon--expand[data-v-1a811cfe],.icon--expand svg[data-v-1a811cfe]{width:10px;height:10px}.icon--fix-grid[data-v-1a811cfe],.icon--fix-grid svg[data-v-1a811cfe]{width:18px;height:14px}.icon--flex-grid[data-v-1a811cfe],.icon--flex-grid svg[data-v-1a811cfe]{width:18px;height:17px}.icon--google-sign-in[data-v-1a811cfe],.icon--google-sign-in svg[data-v-1a811cfe]{width:23px;height:24px}.icon--image-text[data-v-1a811cfe],.icon--image-text svg[data-v-1a811cfe]{width:30px;height:13px}.icon--image[data-v-1a811cfe],.icon--image svg[data-v-1a811cfe]{width:19px;height:15px}.icon--info[data-v-1a811cfe],.icon--info svg[data-v-1a811cfe]{width:21px;height:21px}.icon--location[data-v-1a811cfe],.icon--location svg[data-v-1a811cfe]{width:12px;height:16px}.icon--media-grid[data-v-1a811cfe],.icon--media-grid svg[data-v-1a811cfe]{width:12px;height:12px}.icon--media-list[data-v-1a811cfe],.icon--media-list svg[data-v-1a811cfe]{width:16px;height:10px}.icon--more-dots[data-v-1a811cfe],.icon--more-dots svg[data-v-1a811cfe]{width:14px;height:4px}.icon--pagination_left[data-v-1a811cfe],.icon--pagination_left svg[data-v-1a811cfe],.icon--pagination_right[data-v-1a811cfe],.icon--pagination_right svg[data-v-1a811cfe]{width:9px;height:15px}.icon--preferences[data-v-1a811cfe],.icon--preferences svg[data-v-1a811cfe]{width:26px;height:16px}.icon--preview-desktop[data-v-1a811cfe],.icon--preview-desktop svg[data-v-1a811cfe]{width:39px;height:30px}.icon--preview-mobile[data-v-1a811cfe],.icon--preview-mobile svg[data-v-1a811cfe]{width:12px;height:18px}.icon--preview-tablet-h[data-v-1a811cfe],.icon--preview-tablet-h svg[data-v-1a811cfe]{width:27px;height:20px}.icon--preview-tablet-v[data-v-1a811cfe],.icon--preview-tablet-v svg[data-v-1a811cfe]{width:20px;height:27px}.icon--preview[data-v-1a811cfe],.icon--preview svg[data-v-1a811cfe]{width:22px;height:14px}.icon--publish[data-v-1a811cfe],.icon--publish svg[data-v-1a811cfe]{width:22px;height:15px}.icon--quote[data-v-1a811cfe],.icon--quote svg[data-v-1a811cfe]{width:16px;height:13px}.icon--revision-compare[data-v-1a811cfe],.icon--revision-compare svg[data-v-1a811cfe],.icon--revision-single[data-v-1a811cfe],.icon--revision-single svg[data-v-1a811cfe]{width:23px;height:16px}.icon--search[data-v-1a811cfe],.icon--search svg[data-v-1a811cfe]{width:20px;height:20px}.icon--slideshow[data-v-1a811cfe],.icon--slideshow svg[data-v-1a811cfe]{width:20px;height:16px}.icon--star-feature[data-v-1a811cfe],.icon--star-feature_active[data-v-1a811cfe],.icon--star-feature_active svg[data-v-1a811cfe],.icon--star-feature svg[data-v-1a811cfe]{width:20px;height:19px}.icon--text-2col[data-v-1a811cfe],.icon--text-2col svg[data-v-1a811cfe]{width:26px;height:13px}.icon--text[data-v-1a811cfe],.icon--text svg[data-v-1a811cfe]{width:17px;height:13px}.icon--trash[data-v-1a811cfe],.icon--trash svg[data-v-1a811cfe]{width:15px;height:17px}.icon--video[data-v-1a811cfe],.icon--video svg[data-v-1a811cfe]{width:23px;height:23px}.icon--website[data-v-1a811cfe],.icon--website svg[data-v-1a811cfe]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-1a811cfe],.icon--wysiwyg_anchor svg[data-v-1a811cfe]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-1a811cfe],.icon--wysiwyg_bold svg[data-v-1a811cfe]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-1a811cfe],.icon--wysiwyg_header-2[data-v-1a811cfe],.icon--wysiwyg_header-3 svg[data-v-1a811cfe],.icon--wysiwyg_header-3[data-v-1a811cfe],.icon--wysiwyg_header-4 svg[data-v-1a811cfe],.icon--wysiwyg_header-4[data-v-1a811cfe],.icon--wysiwyg_header-5 svg[data-v-1a811cfe],.icon--wysiwyg_header-5[data-v-1a811cfe],.icon--wysiwyg_header-6 svg[data-v-1a811cfe],.icon--wysiwyg_header-6[data-v-1a811cfe],.icon--wysiwyg_header[data-v-1a811cfe],.icon--wysiwyg_header svg[data-v-1a811cfe]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-1a811cfe],.icon--wysiwyg_italic svg[data-v-1a811cfe]{width:10px;height:13px}.icon--wysiwyg_link[data-v-1a811cfe],.icon--wysiwyg_link svg[data-v-1a811cfe]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-1a811cfe],.icon--wysiwyg_underline svg[data-v-1a811cfe]{width:12px;height:13px}.icon--ae[data-v-1a811cfe],.icon--ae svg[data-v-1a811cfe],.icon--ai[data-v-1a811cfe],.icon--ai svg[data-v-1a811cfe],.icon--ase[data-v-1a811cfe],.icon--ase svg[data-v-1a811cfe]{width:20px;height:26px}.icon--cut[data-v-1a811cfe],.icon--cut svg[data-v-1a811cfe],.icon--dir[data-v-1a811cfe],.icon--dir_protected[data-v-1a811cfe],.icon--dir_protected svg[data-v-1a811cfe],.icon--dir_shared[data-v-1a811cfe],.icon--dir_shared svg[data-v-1a811cfe],.icon--dir svg[data-v-1a811cfe]{width:26px;height:21px}.icon--dmg[data-v-1a811cfe],.icon--dmg svg[data-v-1a811cfe],.icon--doc[data-v-1a811cfe],.icon--doc svg[data-v-1a811cfe],.icon--eps[data-v-1a811cfe],.icon--eps svg[data-v-1a811cfe],.icon--fla[data-v-1a811cfe],.icon--fla svg[data-v-1a811cfe],.icon--fnt[data-v-1a811cfe],.icon--fnt svg[data-v-1a811cfe],.icon--gen[data-v-1a811cfe],.icon--gen svg[data-v-1a811cfe],.icon--html[data-v-1a811cfe],.icon--html svg[data-v-1a811cfe],.icon--img[data-v-1a811cfe],.icon--img svg[data-v-1a811cfe],.icon--indd[data-v-1a811cfe],.icon--indd svg[data-v-1a811cfe],.icon--key[data-v-1a811cfe],.icon--key svg[data-v-1a811cfe],.icon--merlin[data-v-1a811cfe],.icon--merlin svg[data-v-1a811cfe]{width:20px;height:26px}.icon--net[data-v-1a811cfe],.icon--net svg[data-v-1a811cfe]{width:26px;height:21px}.icon--numbers[data-v-1a811cfe],.icon--numbers svg[data-v-1a811cfe],.icon--pages[data-v-1a811cfe],.icon--pages svg[data-v-1a811cfe],.icon--pdf[data-v-1a811cfe],.icon--pdf svg[data-v-1a811cfe],.icon--ppt[data-v-1a811cfe],.icon--ppt svg[data-v-1a811cfe],.icon--psd[data-v-1a811cfe],.icon--psd svg[data-v-1a811cfe]{width:20px;height:26px}.icon--site[data-v-1a811cfe],.icon--site svg[data-v-1a811cfe]{width:26px;height:21px}.icon--slide[data-v-1a811cfe],.icon--slide svg[data-v-1a811cfe],.icon--snd[data-v-1a811cfe],.icon--snd svg[data-v-1a811cfe],.icon--sql[data-v-1a811cfe],.icon--sql svg[data-v-1a811cfe],.icon--swf[data-v-1a811cfe],.icon--swf svg[data-v-1a811cfe],.icon--txt[data-v-1a811cfe],.icon--txt svg[data-v-1a811cfe],.icon--vid[data-v-1a811cfe],.icon--vid svg[data-v-1a811cfe],.icon--xls[data-v-1a811cfe],.icon--xls svg[data-v-1a811cfe],.icon--zip[data-v-1a811cfe],.icon--zip svg[data-v-1a811cfe]{width:20px;height:26px}.container[data-v-1a811cfe]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-1a811cfe]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-1a811cfe]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-1a811cfe]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-1a811cfe]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-1a811cfe]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-1a811cfe]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-1a811cfe]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-1a811cfe]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-1a811cfe]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-1a811cfe]{width:auto}}.stickyNav[data-v-1a811cfe]{background-color:hsla(0,0%,94.9%,.95);border-bottom:1px solid rgba(0,0,0,.05);background-clip:padding-box}@media screen and (min-width:850px){.stickyNav[data-v-1a811cfe]{height:90px;z-index:10;overflow:hidden}.stickyNav.sticky__fixed[data-v-1a811cfe],.stickyNav.sticky__fixedBottom[data-v-1a811cfe],.stickyNav.sticky__fixedTop[data-v-1a811cfe]{height:60px}.stickyNav.sticky__fixed .container[data-v-1a811cfe],.stickyNav.sticky__fixedBottom .container[data-v-1a811cfe],.stickyNav.sticky__fixedTop .container[data-v-1a811cfe]{padding-top:14px}.stickyNav.sticky__fixed .stickyNav__links[data-v-1a811cfe],.stickyNav.sticky__fixedBottom .stickyNav__links[data-v-1a811cfe],.stickyNav.sticky__fixedTop .stickyNav__links[data-v-1a811cfe]{opacity:1;visibility:visible;-webkit-transition:opacity .25s;transition:opacity .25s}.stickyNav.sticky__fixed .titleEditor[data-v-1a811cfe],.stickyNav.sticky__fixedBottom .titleEditor[data-v-1a811cfe],.stickyNav.sticky__fixedTop .titleEditor[data-v-1a811cfe]{opacity:0;visibility:hidden;-webkit-transition:opacity .25s ease,visibility 0s .25s;transition:opacity .25s ease,visibility 0s .25s}.stickyNav.sticky__fixed .titleEditor[data-v-1a811cfe]:first-child,.stickyNav.sticky__fixedBottom .titleEditor[data-v-1a811cfe]:first-child,.stickyNav.sticky__fixedTop .titleEditor[data-v-1a811cfe]:first-child{opacity:1;visibility:visible;-webkit-transition:opacity .25s;transition:opacity .25s}}.titleEditor[data-v-1a811cfe]{opacity:1;visibility:visible;-webkit-transition:opacity .25s;transition:opacity .25s}.stickyNav__links[data-v-1a811cfe]{opacity:0;visibility:hidden;-webkit-transition:opacity .25s ease,visibility 0s .25s;transition:opacity .25s ease,visibility 0s .25s;display:-webkit-box;display:-ms-flexbox;display:flex}.stickyNav__links a[data-v-1a811cfe]{display:block;height:35px;line-height:35px;border-radius:17px;padding:0 17px;text-decoration:none;color:#8c8c8c;background-color:hsla(0,0%,100%,0);-webkit-transition:background-color .25s linear;transition:background-color .25s linear}.stickyNav__links a[data-v-1a811cfe]:hover{color:#262626}.stickyNav__links a.s--on[data-v-1a811cfe]{background-color:#fff;color:#262626}.stickyNav__nav[data-v-1a811cfe]{position:relative}.stickyNav__nav .stickyNav__links[data-v-1a811cfe]{position:absolute}.stickyNav__actions>div[data-v-1a811cfe]{display:-webkit-box;display:-ms-flexbox;display:flex}.stickyNav__actions>div .button[data-v-1a811cfe]{margin-left:20px}@media screen and (max-width:849px){.stickyNav__actions>div .button[data-v-1a811cfe]{margin-left:0;margin-top:20px}}@media screen and (max-width:849px){.stickyNav__actions>div[data-v-1a811cfe]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.stickyNav .container[data-v-1a811cfe]{display:block;padding-top:26px;padding-bottom:26px}@media screen and (min-width:850px){.stickyNav .container[data-v-1a811cfe]{display:-webkit-box;display:-ms-flexbox;display:flex}}@media screen and (min-width:850px){.stickyNav__nav[data-v-1a811cfe]{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}}.icon--add[data-v-4e050f8e],.icon--add svg[data-v-4e050f8e]{width:10px;height:10px}.icon--arrow-external[data-v-4e050f8e],.icon--arrow-external svg[data-v-4e050f8e]{width:8px;height:8px}.icon--arrow-sort[data-v-4e050f8e],.icon--arrow-sort svg[data-v-4e050f8e]{width:9px;height:11px}.icon--check[data-v-4e050f8e],.icon--check svg[data-v-4e050f8e]{width:11px;height:11px}.icon--close_icon[data-v-4e050f8e],.icon--close_icon svg[data-v-4e050f8e]{width:10px;height:10px}.icon--close_modal[data-v-4e050f8e],.icon--close_modal svg[data-v-4e050f8e]{width:16px;height:16px}.icon--colors[data-v-4e050f8e],.icon--colors svg[data-v-4e050f8e]{width:17px;height:17px}.icon--content-editor[data-v-4e050f8e],.icon--content-editor svg[data-v-4e050f8e]{width:14px;height:13px}.icon--crop[data-v-4e050f8e],.icon--crop svg[data-v-4e050f8e]{width:16px;height:18px}.icon--download[data-v-4e050f8e],.icon--download svg[data-v-4e050f8e]{width:12px;height:16px}.icon--drag[data-v-4e050f8e],.icon--drag svg[data-v-4e050f8e]{width:8px;height:17px}.icon--dropdown_default[data-v-4e050f8e],.icon--dropdown_default svg[data-v-4e050f8e]{width:9px;height:5px}.icon--dropdown_module[data-v-4e050f8e],.icon--dropdown_module svg[data-v-4e050f8e]{width:10px;height:6px}.icon--edit[data-v-4e050f8e],.icon--edit svg[data-v-4e050f8e]{width:13px;height:13px}.icon--edit_large[data-v-4e050f8e],.icon--edit_large svg[data-v-4e050f8e]{width:14px;height:14px}.icon--editor[data-v-4e050f8e],.icon--editor svg[data-v-4e050f8e]{width:14px;height:13px}.icon--expand[data-v-4e050f8e],.icon--expand svg[data-v-4e050f8e]{width:10px;height:10px}.icon--fix-grid[data-v-4e050f8e],.icon--fix-grid svg[data-v-4e050f8e]{width:18px;height:14px}.icon--flex-grid[data-v-4e050f8e],.icon--flex-grid svg[data-v-4e050f8e]{width:18px;height:17px}.icon--google-sign-in[data-v-4e050f8e],.icon--google-sign-in svg[data-v-4e050f8e]{width:23px;height:24px}.icon--image-text[data-v-4e050f8e],.icon--image-text svg[data-v-4e050f8e]{width:30px;height:13px}.icon--image[data-v-4e050f8e],.icon--image svg[data-v-4e050f8e]{width:19px;height:15px}.icon--info[data-v-4e050f8e],.icon--info svg[data-v-4e050f8e]{width:21px;height:21px}.icon--location[data-v-4e050f8e],.icon--location svg[data-v-4e050f8e]{width:12px;height:16px}.icon--media-grid[data-v-4e050f8e],.icon--media-grid svg[data-v-4e050f8e]{width:12px;height:12px}.icon--media-list[data-v-4e050f8e],.icon--media-list svg[data-v-4e050f8e]{width:16px;height:10px}.icon--more-dots[data-v-4e050f8e],.icon--more-dots svg[data-v-4e050f8e]{width:14px;height:4px}.icon--pagination_left[data-v-4e050f8e],.icon--pagination_left svg[data-v-4e050f8e],.icon--pagination_right[data-v-4e050f8e],.icon--pagination_right svg[data-v-4e050f8e]{width:9px;height:15px}.icon--preferences[data-v-4e050f8e],.icon--preferences svg[data-v-4e050f8e]{width:26px;height:16px}.icon--preview-desktop[data-v-4e050f8e],.icon--preview-desktop svg[data-v-4e050f8e]{width:39px;height:30px}.icon--preview-mobile[data-v-4e050f8e],.icon--preview-mobile svg[data-v-4e050f8e]{width:12px;height:18px}.icon--preview-tablet-h[data-v-4e050f8e],.icon--preview-tablet-h svg[data-v-4e050f8e]{width:27px;height:20px}.icon--preview-tablet-v[data-v-4e050f8e],.icon--preview-tablet-v svg[data-v-4e050f8e]{width:20px;height:27px}.icon--preview[data-v-4e050f8e],.icon--preview svg[data-v-4e050f8e]{width:22px;height:14px}.icon--publish[data-v-4e050f8e],.icon--publish svg[data-v-4e050f8e]{width:22px;height:15px}.icon--quote[data-v-4e050f8e],.icon--quote svg[data-v-4e050f8e]{width:16px;height:13px}.icon--revision-compare[data-v-4e050f8e],.icon--revision-compare svg[data-v-4e050f8e],.icon--revision-single[data-v-4e050f8e],.icon--revision-single svg[data-v-4e050f8e]{width:23px;height:16px}.icon--search[data-v-4e050f8e],.icon--search svg[data-v-4e050f8e]{width:20px;height:20px}.icon--slideshow[data-v-4e050f8e],.icon--slideshow svg[data-v-4e050f8e]{width:20px;height:16px}.icon--star-feature[data-v-4e050f8e],.icon--star-feature_active[data-v-4e050f8e],.icon--star-feature_active svg[data-v-4e050f8e],.icon--star-feature svg[data-v-4e050f8e]{width:20px;height:19px}.icon--text-2col[data-v-4e050f8e],.icon--text-2col svg[data-v-4e050f8e]{width:26px;height:13px}.icon--text[data-v-4e050f8e],.icon--text svg[data-v-4e050f8e]{width:17px;height:13px}.icon--trash[data-v-4e050f8e],.icon--trash svg[data-v-4e050f8e]{width:15px;height:17px}.icon--video[data-v-4e050f8e],.icon--video svg[data-v-4e050f8e]{width:23px;height:23px}.icon--website[data-v-4e050f8e],.icon--website svg[data-v-4e050f8e]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-4e050f8e],.icon--wysiwyg_anchor svg[data-v-4e050f8e]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-4e050f8e],.icon--wysiwyg_bold svg[data-v-4e050f8e]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-4e050f8e],.icon--wysiwyg_header-2[data-v-4e050f8e],.icon--wysiwyg_header-3 svg[data-v-4e050f8e],.icon--wysiwyg_header-3[data-v-4e050f8e],.icon--wysiwyg_header-4 svg[data-v-4e050f8e],.icon--wysiwyg_header-4[data-v-4e050f8e],.icon--wysiwyg_header-5 svg[data-v-4e050f8e],.icon--wysiwyg_header-5[data-v-4e050f8e],.icon--wysiwyg_header-6 svg[data-v-4e050f8e],.icon--wysiwyg_header-6[data-v-4e050f8e],.icon--wysiwyg_header[data-v-4e050f8e],.icon--wysiwyg_header svg[data-v-4e050f8e]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-4e050f8e],.icon--wysiwyg_italic svg[data-v-4e050f8e]{width:10px;height:13px}.icon--wysiwyg_link[data-v-4e050f8e],.icon--wysiwyg_link svg[data-v-4e050f8e]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-4e050f8e],.icon--wysiwyg_underline svg[data-v-4e050f8e]{width:12px;height:13px}.icon--ae[data-v-4e050f8e],.icon--ae svg[data-v-4e050f8e],.icon--ai[data-v-4e050f8e],.icon--ai svg[data-v-4e050f8e],.icon--ase[data-v-4e050f8e],.icon--ase svg[data-v-4e050f8e]{width:20px;height:26px}.icon--cut[data-v-4e050f8e],.icon--cut svg[data-v-4e050f8e],.icon--dir[data-v-4e050f8e],.icon--dir_protected[data-v-4e050f8e],.icon--dir_protected svg[data-v-4e050f8e],.icon--dir_shared[data-v-4e050f8e],.icon--dir_shared svg[data-v-4e050f8e],.icon--dir svg[data-v-4e050f8e]{width:26px;height:21px}.icon--dmg[data-v-4e050f8e],.icon--dmg svg[data-v-4e050f8e],.icon--doc[data-v-4e050f8e],.icon--doc svg[data-v-4e050f8e],.icon--eps[data-v-4e050f8e],.icon--eps svg[data-v-4e050f8e],.icon--fla[data-v-4e050f8e],.icon--fla svg[data-v-4e050f8e],.icon--fnt[data-v-4e050f8e],.icon--fnt svg[data-v-4e050f8e],.icon--gen[data-v-4e050f8e],.icon--gen svg[data-v-4e050f8e],.icon--html[data-v-4e050f8e],.icon--html svg[data-v-4e050f8e],.icon--img[data-v-4e050f8e],.icon--img svg[data-v-4e050f8e],.icon--indd[data-v-4e050f8e],.icon--indd svg[data-v-4e050f8e],.icon--key[data-v-4e050f8e],.icon--key svg[data-v-4e050f8e],.icon--merlin[data-v-4e050f8e],.icon--merlin svg[data-v-4e050f8e]{width:20px;height:26px}.icon--net[data-v-4e050f8e],.icon--net svg[data-v-4e050f8e]{width:26px;height:21px}.icon--numbers[data-v-4e050f8e],.icon--numbers svg[data-v-4e050f8e],.icon--pages[data-v-4e050f8e],.icon--pages svg[data-v-4e050f8e],.icon--pdf[data-v-4e050f8e],.icon--pdf svg[data-v-4e050f8e],.icon--ppt[data-v-4e050f8e],.icon--ppt svg[data-v-4e050f8e],.icon--psd[data-v-4e050f8e],.icon--psd svg[data-v-4e050f8e]{width:20px;height:26px}.icon--site[data-v-4e050f8e],.icon--site svg[data-v-4e050f8e]{width:26px;height:21px}.icon--slide[data-v-4e050f8e],.icon--slide svg[data-v-4e050f8e],.icon--snd[data-v-4e050f8e],.icon--snd svg[data-v-4e050f8e],.icon--sql[data-v-4e050f8e],.icon--sql svg[data-v-4e050f8e],.icon--swf[data-v-4e050f8e],.icon--swf svg[data-v-4e050f8e],.icon--txt[data-v-4e050f8e],.icon--txt svg[data-v-4e050f8e],.icon--vid[data-v-4e050f8e],.icon--vid svg[data-v-4e050f8e],.icon--xls[data-v-4e050f8e],.icon--xls svg[data-v-4e050f8e],.icon--zip[data-v-4e050f8e],.icon--zip svg[data-v-4e050f8e]{width:20px;height:26px}.container[data-v-4e050f8e]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-4e050f8e]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-4e050f8e]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-4e050f8e]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-4e050f8e]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-4e050f8e]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-4e050f8e]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-4e050f8e]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-4e050f8e]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-4e050f8e]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-4e050f8e]{width:auto}}.titleEditor[data-v-4e050f8e]{margin-bottom:20px}@media screen and (min-width:850px){.titleEditor[data-v-4e050f8e]{margin-bottom:0}}.titleEditor__title[data-v-4e050f8e]{font-weight:600}.titleEditor__title a[data-v-4e050f8e]{text-decoration:none}.titleEditor__title .icon[data-v-4e050f8e]{color:#a6a6a6;margin-left:7px}.titleEditor__title a:hover .icon[data-v-4e050f8e]{color:#262626}.stickyNav.sticky__fixedTop .titleEditor__title[data-v-4e050f8e]{line-height:35px}.titleEditor--error .titleEditor__title .f--underlined--o[data-v-4e050f8e],.titleEditor--error .titleEditor__title .icon[data-v-4e050f8e],.titleEditor--error .titleEditor__title:hover .f--underlined--o[data-v-4e050f8e],.titleEditor--error .titleEditor__title:hover .icon[data-v-4e050f8e]{color:#e61414}.titleEditor--error .titleEditor__title:hover .f--underlined--o[data-v-4e050f8e]{text-decoration:none;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(75%,rgba(230,20,20,.5)),color-stop(75%,rgba(230,20,20,.5)));background-image:linear-gradient(180deg,rgba(230,20,20,.5) 75%,rgba(230,20,20,.5) 0);background-repeat:repeat-x;background-size:1px 1px;background-position:0 98%}.titleEditor__title-only[data-v-4e050f8e]{line-height:35px}.titleEditor__permalink[data-v-4e050f8e]{text-decoration:none;display:inline-block;white-space:nowrap}.stickyNav.sticky__fixedTop .titleEditor__permalink[data-v-4e050f8e]{display:none}.icon--add[data-v-2e81738b],.icon--add svg[data-v-2e81738b]{width:10px;height:10px}.icon--arrow-external[data-v-2e81738b],.icon--arrow-external svg[data-v-2e81738b]{width:8px;height:8px}.icon--arrow-sort[data-v-2e81738b],.icon--arrow-sort svg[data-v-2e81738b]{width:9px;height:11px}.icon--check[data-v-2e81738b],.icon--check svg[data-v-2e81738b]{width:11px;height:11px}.icon--close_icon[data-v-2e81738b],.icon--close_icon svg[data-v-2e81738b]{width:10px;height:10px}.icon--close_modal[data-v-2e81738b],.icon--close_modal svg[data-v-2e81738b]{width:16px;height:16px}.icon--colors[data-v-2e81738b],.icon--colors svg[data-v-2e81738b]{width:17px;height:17px}.icon--content-editor[data-v-2e81738b],.icon--content-editor svg[data-v-2e81738b]{width:14px;height:13px}.icon--crop[data-v-2e81738b],.icon--crop svg[data-v-2e81738b]{width:16px;height:18px}.icon--download[data-v-2e81738b],.icon--download svg[data-v-2e81738b]{width:12px;height:16px}.icon--drag[data-v-2e81738b],.icon--drag svg[data-v-2e81738b]{width:8px;height:17px}.icon--dropdown_default[data-v-2e81738b],.icon--dropdown_default svg[data-v-2e81738b]{width:9px;height:5px}.icon--dropdown_module[data-v-2e81738b],.icon--dropdown_module svg[data-v-2e81738b]{width:10px;height:6px}.icon--edit[data-v-2e81738b],.icon--edit svg[data-v-2e81738b]{width:13px;height:13px}.icon--edit_large[data-v-2e81738b],.icon--edit_large svg[data-v-2e81738b]{width:14px;height:14px}.icon--editor[data-v-2e81738b],.icon--editor svg[data-v-2e81738b]{width:14px;height:13px}.icon--expand[data-v-2e81738b],.icon--expand svg[data-v-2e81738b]{width:10px;height:10px}.icon--fix-grid[data-v-2e81738b],.icon--fix-grid svg[data-v-2e81738b]{width:18px;height:14px}.icon--flex-grid[data-v-2e81738b],.icon--flex-grid svg[data-v-2e81738b]{width:18px;height:17px}.icon--google-sign-in[data-v-2e81738b],.icon--google-sign-in svg[data-v-2e81738b]{width:23px;height:24px}.icon--image-text[data-v-2e81738b],.icon--image-text svg[data-v-2e81738b]{width:30px;height:13px}.icon--image[data-v-2e81738b],.icon--image svg[data-v-2e81738b]{width:19px;height:15px}.icon--info[data-v-2e81738b],.icon--info svg[data-v-2e81738b]{width:21px;height:21px}.icon--location[data-v-2e81738b],.icon--location svg[data-v-2e81738b]{width:12px;height:16px}.icon--media-grid[data-v-2e81738b],.icon--media-grid svg[data-v-2e81738b]{width:12px;height:12px}.icon--media-list[data-v-2e81738b],.icon--media-list svg[data-v-2e81738b]{width:16px;height:10px}.icon--more-dots[data-v-2e81738b],.icon--more-dots svg[data-v-2e81738b]{width:14px;height:4px}.icon--pagination_left[data-v-2e81738b],.icon--pagination_left svg[data-v-2e81738b],.icon--pagination_right[data-v-2e81738b],.icon--pagination_right svg[data-v-2e81738b]{width:9px;height:15px}.icon--preferences[data-v-2e81738b],.icon--preferences svg[data-v-2e81738b]{width:26px;height:16px}.icon--preview-desktop[data-v-2e81738b],.icon--preview-desktop svg[data-v-2e81738b]{width:39px;height:30px}.icon--preview-mobile[data-v-2e81738b],.icon--preview-mobile svg[data-v-2e81738b]{width:12px;height:18px}.icon--preview-tablet-h[data-v-2e81738b],.icon--preview-tablet-h svg[data-v-2e81738b]{width:27px;height:20px}.icon--preview-tablet-v[data-v-2e81738b],.icon--preview-tablet-v svg[data-v-2e81738b]{width:20px;height:27px}.icon--preview[data-v-2e81738b],.icon--preview svg[data-v-2e81738b]{width:22px;height:14px}.icon--publish[data-v-2e81738b],.icon--publish svg[data-v-2e81738b]{width:22px;height:15px}.icon--quote[data-v-2e81738b],.icon--quote svg[data-v-2e81738b]{width:16px;height:13px}.icon--revision-compare[data-v-2e81738b],.icon--revision-compare svg[data-v-2e81738b],.icon--revision-single[data-v-2e81738b],.icon--revision-single svg[data-v-2e81738b]{width:23px;height:16px}.icon--search[data-v-2e81738b],.icon--search svg[data-v-2e81738b]{width:20px;height:20px}.icon--slideshow[data-v-2e81738b],.icon--slideshow svg[data-v-2e81738b]{width:20px;height:16px}.icon--star-feature[data-v-2e81738b],.icon--star-feature_active[data-v-2e81738b],.icon--star-feature_active svg[data-v-2e81738b],.icon--star-feature svg[data-v-2e81738b]{width:20px;height:19px}.icon--text-2col[data-v-2e81738b],.icon--text-2col svg[data-v-2e81738b]{width:26px;height:13px}.icon--text[data-v-2e81738b],.icon--text svg[data-v-2e81738b]{width:17px;height:13px}.icon--trash[data-v-2e81738b],.icon--trash svg[data-v-2e81738b]{width:15px;height:17px}.icon--video[data-v-2e81738b],.icon--video svg[data-v-2e81738b]{width:23px;height:23px}.icon--website[data-v-2e81738b],.icon--website svg[data-v-2e81738b]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-2e81738b],.icon--wysiwyg_anchor svg[data-v-2e81738b]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-2e81738b],.icon--wysiwyg_bold svg[data-v-2e81738b]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-2e81738b],.icon--wysiwyg_header-2[data-v-2e81738b],.icon--wysiwyg_header-3 svg[data-v-2e81738b],.icon--wysiwyg_header-3[data-v-2e81738b],.icon--wysiwyg_header-4 svg[data-v-2e81738b],.icon--wysiwyg_header-4[data-v-2e81738b],.icon--wysiwyg_header-5 svg[data-v-2e81738b],.icon--wysiwyg_header-5[data-v-2e81738b],.icon--wysiwyg_header-6 svg[data-v-2e81738b],.icon--wysiwyg_header-6[data-v-2e81738b],.icon--wysiwyg_header[data-v-2e81738b],.icon--wysiwyg_header svg[data-v-2e81738b]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-2e81738b],.icon--wysiwyg_italic svg[data-v-2e81738b]{width:10px;height:13px}.icon--wysiwyg_link[data-v-2e81738b],.icon--wysiwyg_link svg[data-v-2e81738b]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-2e81738b],.icon--wysiwyg_underline svg[data-v-2e81738b]{width:12px;height:13px}.icon--ae[data-v-2e81738b],.icon--ae svg[data-v-2e81738b],.icon--ai[data-v-2e81738b],.icon--ai svg[data-v-2e81738b],.icon--ase[data-v-2e81738b],.icon--ase svg[data-v-2e81738b]{width:20px;height:26px}.icon--cut[data-v-2e81738b],.icon--cut svg[data-v-2e81738b],.icon--dir[data-v-2e81738b],.icon--dir_protected[data-v-2e81738b],.icon--dir_protected svg[data-v-2e81738b],.icon--dir_shared[data-v-2e81738b],.icon--dir_shared svg[data-v-2e81738b],.icon--dir svg[data-v-2e81738b]{width:26px;height:21px}.icon--dmg[data-v-2e81738b],.icon--dmg svg[data-v-2e81738b],.icon--doc[data-v-2e81738b],.icon--doc svg[data-v-2e81738b],.icon--eps[data-v-2e81738b],.icon--eps svg[data-v-2e81738b],.icon--fla[data-v-2e81738b],.icon--fla svg[data-v-2e81738b],.icon--fnt[data-v-2e81738b],.icon--fnt svg[data-v-2e81738b],.icon--gen[data-v-2e81738b],.icon--gen svg[data-v-2e81738b],.icon--html[data-v-2e81738b],.icon--html svg[data-v-2e81738b],.icon--img[data-v-2e81738b],.icon--img svg[data-v-2e81738b],.icon--indd[data-v-2e81738b],.icon--indd svg[data-v-2e81738b],.icon--key[data-v-2e81738b],.icon--key svg[data-v-2e81738b],.icon--merlin[data-v-2e81738b],.icon--merlin svg[data-v-2e81738b]{width:20px;height:26px}.icon--net[data-v-2e81738b],.icon--net svg[data-v-2e81738b]{width:26px;height:21px}.icon--numbers[data-v-2e81738b],.icon--numbers svg[data-v-2e81738b],.icon--pages[data-v-2e81738b],.icon--pages svg[data-v-2e81738b],.icon--pdf[data-v-2e81738b],.icon--pdf svg[data-v-2e81738b],.icon--ppt[data-v-2e81738b],.icon--ppt svg[data-v-2e81738b],.icon--psd[data-v-2e81738b],.icon--psd svg[data-v-2e81738b]{width:20px;height:26px}.icon--site[data-v-2e81738b],.icon--site svg[data-v-2e81738b]{width:26px;height:21px}.icon--slide[data-v-2e81738b],.icon--slide svg[data-v-2e81738b],.icon--snd[data-v-2e81738b],.icon--snd svg[data-v-2e81738b],.icon--sql[data-v-2e81738b],.icon--sql svg[data-v-2e81738b],.icon--swf[data-v-2e81738b],.icon--swf svg[data-v-2e81738b],.icon--txt[data-v-2e81738b],.icon--txt svg[data-v-2e81738b],.icon--vid[data-v-2e81738b],.icon--vid svg[data-v-2e81738b],.icon--xls[data-v-2e81738b],.icon--xls svg[data-v-2e81738b],.icon--zip[data-v-2e81738b],.icon--zip svg[data-v-2e81738b]{width:20px;height:26px}.container[data-v-2e81738b]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-2e81738b]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-2e81738b]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-2e81738b]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-2e81738b]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-2e81738b]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-2e81738b]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-2e81738b]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-2e81738b]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-2e81738b]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-2e81738b]{width:auto}}.switcher[data-v-2e81738b]{height:50px;line-height:50px;background:#a6a6a6;color:#fff;padding:0 20px;margin:-1px -1px 0 -1px;padding:0 21px;border-top-left-radius:2px;border-top-right-radius:2px;-webkit-transition:background-color .25s linear;transition:background-color .25s linear}.switcher__title[data-v-2e81738b]{display:inline;font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.switcher__button[data-v-2e81738b]{float:right;position:relative;top:16px;cursor:pointer}.switcher__button input[data-v-2e81738b]{position:absolute;opacity:0}.switcher__label[data-v-2e81738b]{margin-right:15px}.switcher__switcher[data-v-2e81738b]{display:inline-block;height:12px;border-radius:6px;width:40px;background:#4d4d4d;-webkit-box-shadow:inset 0 0 1px #000;box-shadow:inset 0 0 1px #000;position:relative}.switcher__switcher[data-v-2e81738b]:after,.switcher__switcher[data-v-2e81738b]:before{content:"";position:absolute;display:block;height:18px;width:18px;border-radius:50%;left:0;top:-3px;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition:all .25s cubic-bezier(.5,-.6,.5,1.6);transition:all .25s cubic-bezier(.5,-.6,.5,1.6)}.switcher__switcher[data-v-2e81738b]:after{background:#fff;-webkit-box-shadow:0 0 1px #666;box-shadow:0 0 1px #666}.switcher__switcher[data-v-2e81738b]:before{background:#fff;-webkit-box-shadow:0 0 0 3px rgba(0,0,0,.1);box-shadow:0 0 0 3px rgba(0,0,0,.1);opacity:0}.switcher--active[data-v-2e81738b]{background:#d3ecd9;color:#1d9f3c}.switcher--active .switcher__switcher[data-v-2e81738b]{background:#1d9f3c;-webkit-box-shadow:inset 0 0 1px rgba(0,0,0,.4);box-shadow:inset 0 0 1px rgba(0,0,0,.4)}.switcher--active .switcher__switcher[data-v-2e81738b]:after,.switcher--active .switcher__switcher[data-v-2e81738b]:before{-webkit-transform:translateX(22px);transform:translateX(22px)}.switcher__button:focus .switcher__switcher[data-v-2e81738b]:before,.switcher__button:hover .switcher__switcher[data-v-2e81738b]:before,.switcher__button input:focus+.switcher__switcher[data-v-2e81738b]:before{opacity:1}.switcher--expired[data-v-2e81738b]{background:#a6a6a6;color:#fff}.switcher--expired .switcher__switcher[data-v-2e81738b]{background:#4d4d4d;-webkit-box-shadow:inset 0 0 1px #000;box-shadow:inset 0 0 1px #000}.icon--add[data-v-0dd10376],.icon--add svg[data-v-0dd10376]{width:10px;height:10px}.icon--arrow-external[data-v-0dd10376],.icon--arrow-external svg[data-v-0dd10376]{width:8px;height:8px}.icon--arrow-sort[data-v-0dd10376],.icon--arrow-sort svg[data-v-0dd10376]{width:9px;height:11px}.icon--check[data-v-0dd10376],.icon--check svg[data-v-0dd10376]{width:11px;height:11px}.icon--close_icon[data-v-0dd10376],.icon--close_icon svg[data-v-0dd10376]{width:10px;height:10px}.icon--close_modal[data-v-0dd10376],.icon--close_modal svg[data-v-0dd10376]{width:16px;height:16px}.icon--colors[data-v-0dd10376],.icon--colors svg[data-v-0dd10376]{width:17px;height:17px}.icon--content-editor[data-v-0dd10376],.icon--content-editor svg[data-v-0dd10376]{width:14px;height:13px}.icon--crop[data-v-0dd10376],.icon--crop svg[data-v-0dd10376]{width:16px;height:18px}.icon--download[data-v-0dd10376],.icon--download svg[data-v-0dd10376]{width:12px;height:16px}.icon--drag[data-v-0dd10376],.icon--drag svg[data-v-0dd10376]{width:8px;height:17px}.icon--dropdown_default[data-v-0dd10376],.icon--dropdown_default svg[data-v-0dd10376]{width:9px;height:5px}.icon--dropdown_module[data-v-0dd10376],.icon--dropdown_module svg[data-v-0dd10376]{width:10px;height:6px}.icon--edit[data-v-0dd10376],.icon--edit svg[data-v-0dd10376]{width:13px;height:13px}.icon--edit_large[data-v-0dd10376],.icon--edit_large svg[data-v-0dd10376]{width:14px;height:14px}.icon--editor[data-v-0dd10376],.icon--editor svg[data-v-0dd10376]{width:14px;height:13px}.icon--expand[data-v-0dd10376],.icon--expand svg[data-v-0dd10376]{width:10px;height:10px}.icon--fix-grid[data-v-0dd10376],.icon--fix-grid svg[data-v-0dd10376]{width:18px;height:14px}.icon--flex-grid[data-v-0dd10376],.icon--flex-grid svg[data-v-0dd10376]{width:18px;height:17px}.icon--google-sign-in[data-v-0dd10376],.icon--google-sign-in svg[data-v-0dd10376]{width:23px;height:24px}.icon--image-text[data-v-0dd10376],.icon--image-text svg[data-v-0dd10376]{width:30px;height:13px}.icon--image[data-v-0dd10376],.icon--image svg[data-v-0dd10376]{width:19px;height:15px}.icon--info[data-v-0dd10376],.icon--info svg[data-v-0dd10376]{width:21px;height:21px}.icon--location[data-v-0dd10376],.icon--location svg[data-v-0dd10376]{width:12px;height:16px}.icon--media-grid[data-v-0dd10376],.icon--media-grid svg[data-v-0dd10376]{width:12px;height:12px}.icon--media-list[data-v-0dd10376],.icon--media-list svg[data-v-0dd10376]{width:16px;height:10px}.icon--more-dots[data-v-0dd10376],.icon--more-dots svg[data-v-0dd10376]{width:14px;height:4px}.icon--pagination_left[data-v-0dd10376],.icon--pagination_left svg[data-v-0dd10376],.icon--pagination_right[data-v-0dd10376],.icon--pagination_right svg[data-v-0dd10376]{width:9px;height:15px}.icon--preferences[data-v-0dd10376],.icon--preferences svg[data-v-0dd10376]{width:26px;height:16px}.icon--preview-desktop[data-v-0dd10376],.icon--preview-desktop svg[data-v-0dd10376]{width:39px;height:30px}.icon--preview-mobile[data-v-0dd10376],.icon--preview-mobile svg[data-v-0dd10376]{width:12px;height:18px}.icon--preview-tablet-h[data-v-0dd10376],.icon--preview-tablet-h svg[data-v-0dd10376]{width:27px;height:20px}.icon--preview-tablet-v[data-v-0dd10376],.icon--preview-tablet-v svg[data-v-0dd10376]{width:20px;height:27px}.icon--preview[data-v-0dd10376],.icon--preview svg[data-v-0dd10376]{width:22px;height:14px}.icon--publish[data-v-0dd10376],.icon--publish svg[data-v-0dd10376]{width:22px;height:15px}.icon--quote[data-v-0dd10376],.icon--quote svg[data-v-0dd10376]{width:16px;height:13px}.icon--revision-compare[data-v-0dd10376],.icon--revision-compare svg[data-v-0dd10376],.icon--revision-single[data-v-0dd10376],.icon--revision-single svg[data-v-0dd10376]{width:23px;height:16px}.icon--search[data-v-0dd10376],.icon--search svg[data-v-0dd10376]{width:20px;height:20px}.icon--slideshow[data-v-0dd10376],.icon--slideshow svg[data-v-0dd10376]{width:20px;height:16px}.icon--star-feature[data-v-0dd10376],.icon--star-feature_active[data-v-0dd10376],.icon--star-feature_active svg[data-v-0dd10376],.icon--star-feature svg[data-v-0dd10376]{width:20px;height:19px}.icon--text-2col[data-v-0dd10376],.icon--text-2col svg[data-v-0dd10376]{width:26px;height:13px}.icon--text[data-v-0dd10376],.icon--text svg[data-v-0dd10376]{width:17px;height:13px}.icon--trash[data-v-0dd10376],.icon--trash svg[data-v-0dd10376]{width:15px;height:17px}.icon--video[data-v-0dd10376],.icon--video svg[data-v-0dd10376]{width:23px;height:23px}.icon--website[data-v-0dd10376],.icon--website svg[data-v-0dd10376]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-0dd10376],.icon--wysiwyg_anchor svg[data-v-0dd10376]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-0dd10376],.icon--wysiwyg_bold svg[data-v-0dd10376]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-0dd10376],.icon--wysiwyg_header-2[data-v-0dd10376],.icon--wysiwyg_header-3 svg[data-v-0dd10376],.icon--wysiwyg_header-3[data-v-0dd10376],.icon--wysiwyg_header-4 svg[data-v-0dd10376],.icon--wysiwyg_header-4[data-v-0dd10376],.icon--wysiwyg_header-5 svg[data-v-0dd10376],.icon--wysiwyg_header-5[data-v-0dd10376],.icon--wysiwyg_header-6 svg[data-v-0dd10376],.icon--wysiwyg_header-6[data-v-0dd10376],.icon--wysiwyg_header[data-v-0dd10376],.icon--wysiwyg_header svg[data-v-0dd10376]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-0dd10376],.icon--wysiwyg_italic svg[data-v-0dd10376]{width:10px;height:13px}.icon--wysiwyg_link[data-v-0dd10376],.icon--wysiwyg_link svg[data-v-0dd10376]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-0dd10376],.icon--wysiwyg_underline svg[data-v-0dd10376]{width:12px;height:13px}.icon--ae[data-v-0dd10376],.icon--ae svg[data-v-0dd10376],.icon--ai[data-v-0dd10376],.icon--ai svg[data-v-0dd10376],.icon--ase[data-v-0dd10376],.icon--ase svg[data-v-0dd10376]{width:20px;height:26px}.icon--cut[data-v-0dd10376],.icon--cut svg[data-v-0dd10376],.icon--dir[data-v-0dd10376],.icon--dir_protected[data-v-0dd10376],.icon--dir_protected svg[data-v-0dd10376],.icon--dir_shared[data-v-0dd10376],.icon--dir_shared svg[data-v-0dd10376],.icon--dir svg[data-v-0dd10376]{width:26px;height:21px}.icon--dmg[data-v-0dd10376],.icon--dmg svg[data-v-0dd10376],.icon--doc[data-v-0dd10376],.icon--doc svg[data-v-0dd10376],.icon--eps[data-v-0dd10376],.icon--eps svg[data-v-0dd10376],.icon--fla[data-v-0dd10376],.icon--fla svg[data-v-0dd10376],.icon--fnt[data-v-0dd10376],.icon--fnt svg[data-v-0dd10376],.icon--gen[data-v-0dd10376],.icon--gen svg[data-v-0dd10376],.icon--html[data-v-0dd10376],.icon--html svg[data-v-0dd10376],.icon--img[data-v-0dd10376],.icon--img svg[data-v-0dd10376],.icon--indd[data-v-0dd10376],.icon--indd svg[data-v-0dd10376],.icon--key[data-v-0dd10376],.icon--key svg[data-v-0dd10376],.icon--merlin[data-v-0dd10376],.icon--merlin svg[data-v-0dd10376]{width:20px;height:26px}.icon--net[data-v-0dd10376],.icon--net svg[data-v-0dd10376]{width:26px;height:21px}.icon--numbers[data-v-0dd10376],.icon--numbers svg[data-v-0dd10376],.icon--pages[data-v-0dd10376],.icon--pages svg[data-v-0dd10376],.icon--pdf[data-v-0dd10376],.icon--pdf svg[data-v-0dd10376],.icon--ppt[data-v-0dd10376],.icon--ppt svg[data-v-0dd10376],.icon--psd[data-v-0dd10376],.icon--psd svg[data-v-0dd10376]{width:20px;height:26px}.icon--site[data-v-0dd10376],.icon--site svg[data-v-0dd10376]{width:26px;height:21px}.icon--slide[data-v-0dd10376],.icon--slide svg[data-v-0dd10376],.icon--snd[data-v-0dd10376],.icon--snd svg[data-v-0dd10376],.icon--sql[data-v-0dd10376],.icon--sql svg[data-v-0dd10376],.icon--swf[data-v-0dd10376],.icon--swf svg[data-v-0dd10376],.icon--txt[data-v-0dd10376],.icon--txt svg[data-v-0dd10376],.icon--vid[data-v-0dd10376],.icon--vid svg[data-v-0dd10376],.icon--xls[data-v-0dd10376],.icon--xls svg[data-v-0dd10376],.icon--zip[data-v-0dd10376],.icon--zip svg[data-v-0dd10376]{width:20px;height:26px}.container[data-v-0dd10376]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-0dd10376]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-0dd10376]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-0dd10376]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-0dd10376]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-0dd10376]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-0dd10376]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-0dd10376]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-0dd10376]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-0dd10376]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-0dd10376]{width:auto}}.accordion[data-v-0dd10376]{border-bottom:1px solid #f2f2f2;background-color:#fff;-webkit-transition:background-color .25s linear;transition:background-color .25s linear;overflow:hidden}.accordion__trigger[data-v-0dd10376]{padding:0 40px 0 20px;display:block;background-color:transparent;-webkit-appearance:none;cursor:pointer;font-size:1em;outline:none;margin:0;border:0 none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;letter-spacing:inherit;background:transparent;height:55px;width:100%;text-align:left;position:relative;color:#262626;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.accordion__trigger .icon[data-v-0dd10376]{display:block;-webkit-transform-origin:50% 50%;transform-origin:50% 50%;position:absolute;right:20px;top:50%;margin-top:-4px;-webkit-transition:-webkit-transform .25s linear;transition:-webkit-transform .25s linear;transition:transform .25s linear;transition:transform .25s linear,-webkit-transform .25s linear}.accordion__trigger[data-v-0dd10376]:focus,.accordion__trigger[data-v-0dd10376]:hover{background:#fbfbfb}.accordion__trigger .icon[data-v-0dd10376]{color:#8c8c8c}.accordion__value[data-v-0dd10376]{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;text-align:right;color:#8c8c8c;padding-left:10px;overflow:hidden}.accordion__value>[data-v-0dd10376]{overflow:hidden;text-overflow:ellipsis}.accordion__dropdown[data-v-0dd10376]{overflow:hidden;max-height:0;height:auto;-webkit-transition:max-height .275s ease;transition:max-height .275s ease}.accordion__list[data-v-0dd10376]{border-top:1px solid #f2f2f2;padding:12px 20px}.accordion__fields[data-v-0dd10376]{border-top:1px solid #f2f2f2;padding:20px}.accordion__list .accordion__fields[data-v-0dd10376]{border-top:0 none;padding:8px 0}.s--open[data-v-0dd10376]{background-color:#fbfbfb}.s--open .accordion__dropdown[data-v-0dd10376]{max-height:250px;overflow-y:auto}.s--open .icon[data-v-0dd10376]{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.accordion .accordion__list .input{margin-top:0}.accordion .accordion__list .input+.input{margin-top:10px}.icon--add[data-v-042fcdcb],.icon--add svg[data-v-042fcdcb]{width:10px;height:10px}.icon--arrow-external[data-v-042fcdcb],.icon--arrow-external svg[data-v-042fcdcb]{width:8px;height:8px}.icon--arrow-sort[data-v-042fcdcb],.icon--arrow-sort svg[data-v-042fcdcb]{width:9px;height:11px}.icon--check[data-v-042fcdcb],.icon--check svg[data-v-042fcdcb]{width:11px;height:11px}.icon--close_icon[data-v-042fcdcb],.icon--close_icon svg[data-v-042fcdcb]{width:10px;height:10px}.icon--close_modal[data-v-042fcdcb],.icon--close_modal svg[data-v-042fcdcb]{width:16px;height:16px}.icon--colors[data-v-042fcdcb],.icon--colors svg[data-v-042fcdcb]{width:17px;height:17px}.icon--content-editor[data-v-042fcdcb],.icon--content-editor svg[data-v-042fcdcb]{width:14px;height:13px}.icon--crop[data-v-042fcdcb],.icon--crop svg[data-v-042fcdcb]{width:16px;height:18px}.icon--download[data-v-042fcdcb],.icon--download svg[data-v-042fcdcb]{width:12px;height:16px}.icon--drag[data-v-042fcdcb],.icon--drag svg[data-v-042fcdcb]{width:8px;height:17px}.icon--dropdown_default[data-v-042fcdcb],.icon--dropdown_default svg[data-v-042fcdcb]{width:9px;height:5px}.icon--dropdown_module[data-v-042fcdcb],.icon--dropdown_module svg[data-v-042fcdcb]{width:10px;height:6px}.icon--edit[data-v-042fcdcb],.icon--edit svg[data-v-042fcdcb]{width:13px;height:13px}.icon--edit_large[data-v-042fcdcb],.icon--edit_large svg[data-v-042fcdcb]{width:14px;height:14px}.icon--editor[data-v-042fcdcb],.icon--editor svg[data-v-042fcdcb]{width:14px;height:13px}.icon--expand[data-v-042fcdcb],.icon--expand svg[data-v-042fcdcb]{width:10px;height:10px}.icon--fix-grid[data-v-042fcdcb],.icon--fix-grid svg[data-v-042fcdcb]{width:18px;height:14px}.icon--flex-grid[data-v-042fcdcb],.icon--flex-grid svg[data-v-042fcdcb]{width:18px;height:17px}.icon--google-sign-in[data-v-042fcdcb],.icon--google-sign-in svg[data-v-042fcdcb]{width:23px;height:24px}.icon--image-text[data-v-042fcdcb],.icon--image-text svg[data-v-042fcdcb]{width:30px;height:13px}.icon--image[data-v-042fcdcb],.icon--image svg[data-v-042fcdcb]{width:19px;height:15px}.icon--info[data-v-042fcdcb],.icon--info svg[data-v-042fcdcb]{width:21px;height:21px}.icon--location[data-v-042fcdcb],.icon--location svg[data-v-042fcdcb]{width:12px;height:16px}.icon--media-grid[data-v-042fcdcb],.icon--media-grid svg[data-v-042fcdcb]{width:12px;height:12px}.icon--media-list[data-v-042fcdcb],.icon--media-list svg[data-v-042fcdcb]{width:16px;height:10px}.icon--more-dots[data-v-042fcdcb],.icon--more-dots svg[data-v-042fcdcb]{width:14px;height:4px}.icon--pagination_left[data-v-042fcdcb],.icon--pagination_left svg[data-v-042fcdcb],.icon--pagination_right[data-v-042fcdcb],.icon--pagination_right svg[data-v-042fcdcb]{width:9px;height:15px}.icon--preferences[data-v-042fcdcb],.icon--preferences svg[data-v-042fcdcb]{width:26px;height:16px}.icon--preview-desktop[data-v-042fcdcb],.icon--preview-desktop svg[data-v-042fcdcb]{width:39px;height:30px}.icon--preview-mobile[data-v-042fcdcb],.icon--preview-mobile svg[data-v-042fcdcb]{width:12px;height:18px}.icon--preview-tablet-h[data-v-042fcdcb],.icon--preview-tablet-h svg[data-v-042fcdcb]{width:27px;height:20px}.icon--preview-tablet-v[data-v-042fcdcb],.icon--preview-tablet-v svg[data-v-042fcdcb]{width:20px;height:27px}.icon--preview[data-v-042fcdcb],.icon--preview svg[data-v-042fcdcb]{width:22px;height:14px}.icon--publish[data-v-042fcdcb],.icon--publish svg[data-v-042fcdcb]{width:22px;height:15px}.icon--quote[data-v-042fcdcb],.icon--quote svg[data-v-042fcdcb]{width:16px;height:13px}.icon--revision-compare[data-v-042fcdcb],.icon--revision-compare svg[data-v-042fcdcb],.icon--revision-single[data-v-042fcdcb],.icon--revision-single svg[data-v-042fcdcb]{width:23px;height:16px}.icon--search[data-v-042fcdcb],.icon--search svg[data-v-042fcdcb]{width:20px;height:20px}.icon--slideshow[data-v-042fcdcb],.icon--slideshow svg[data-v-042fcdcb]{width:20px;height:16px}.icon--star-feature[data-v-042fcdcb],.icon--star-feature_active[data-v-042fcdcb],.icon--star-feature_active svg[data-v-042fcdcb],.icon--star-feature svg[data-v-042fcdcb]{width:20px;height:19px}.icon--text-2col[data-v-042fcdcb],.icon--text-2col svg[data-v-042fcdcb]{width:26px;height:13px}.icon--text[data-v-042fcdcb],.icon--text svg[data-v-042fcdcb]{width:17px;height:13px}.icon--trash[data-v-042fcdcb],.icon--trash svg[data-v-042fcdcb]{width:15px;height:17px}.icon--video[data-v-042fcdcb],.icon--video svg[data-v-042fcdcb]{width:23px;height:23px}.icon--website[data-v-042fcdcb],.icon--website svg[data-v-042fcdcb]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-042fcdcb],.icon--wysiwyg_anchor svg[data-v-042fcdcb]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-042fcdcb],.icon--wysiwyg_bold svg[data-v-042fcdcb]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-042fcdcb],.icon--wysiwyg_header-2[data-v-042fcdcb],.icon--wysiwyg_header-3 svg[data-v-042fcdcb],.icon--wysiwyg_header-3[data-v-042fcdcb],.icon--wysiwyg_header-4 svg[data-v-042fcdcb],.icon--wysiwyg_header-4[data-v-042fcdcb],.icon--wysiwyg_header-5 svg[data-v-042fcdcb],.icon--wysiwyg_header-5[data-v-042fcdcb],.icon--wysiwyg_header-6 svg[data-v-042fcdcb],.icon--wysiwyg_header-6[data-v-042fcdcb],.icon--wysiwyg_header[data-v-042fcdcb],.icon--wysiwyg_header svg[data-v-042fcdcb]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-042fcdcb],.icon--wysiwyg_italic svg[data-v-042fcdcb]{width:10px;height:13px}.icon--wysiwyg_link[data-v-042fcdcb],.icon--wysiwyg_link svg[data-v-042fcdcb]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-042fcdcb],.icon--wysiwyg_underline svg[data-v-042fcdcb]{width:12px;height:13px}.icon--ae[data-v-042fcdcb],.icon--ae svg[data-v-042fcdcb],.icon--ai[data-v-042fcdcb],.icon--ai svg[data-v-042fcdcb],.icon--ase[data-v-042fcdcb],.icon--ase svg[data-v-042fcdcb]{width:20px;height:26px}.icon--cut[data-v-042fcdcb],.icon--cut svg[data-v-042fcdcb],.icon--dir[data-v-042fcdcb],.icon--dir_protected[data-v-042fcdcb],.icon--dir_protected svg[data-v-042fcdcb],.icon--dir_shared[data-v-042fcdcb],.icon--dir_shared svg[data-v-042fcdcb],.icon--dir svg[data-v-042fcdcb]{width:26px;height:21px}.icon--dmg[data-v-042fcdcb],.icon--dmg svg[data-v-042fcdcb],.icon--doc[data-v-042fcdcb],.icon--doc svg[data-v-042fcdcb],.icon--eps[data-v-042fcdcb],.icon--eps svg[data-v-042fcdcb],.icon--fla[data-v-042fcdcb],.icon--fla svg[data-v-042fcdcb],.icon--fnt[data-v-042fcdcb],.icon--fnt svg[data-v-042fcdcb],.icon--gen[data-v-042fcdcb],.icon--gen svg[data-v-042fcdcb],.icon--html[data-v-042fcdcb],.icon--html svg[data-v-042fcdcb],.icon--img[data-v-042fcdcb],.icon--img svg[data-v-042fcdcb],.icon--indd[data-v-042fcdcb],.icon--indd svg[data-v-042fcdcb],.icon--key[data-v-042fcdcb],.icon--key svg[data-v-042fcdcb],.icon--merlin[data-v-042fcdcb],.icon--merlin svg[data-v-042fcdcb]{width:20px;height:26px}.icon--net[data-v-042fcdcb],.icon--net svg[data-v-042fcdcb]{width:26px;height:21px}.icon--numbers[data-v-042fcdcb],.icon--numbers svg[data-v-042fcdcb],.icon--pages[data-v-042fcdcb],.icon--pages svg[data-v-042fcdcb],.icon--pdf[data-v-042fcdcb],.icon--pdf svg[data-v-042fcdcb],.icon--ppt[data-v-042fcdcb],.icon--ppt svg[data-v-042fcdcb],.icon--psd[data-v-042fcdcb],.icon--psd svg[data-v-042fcdcb]{width:20px;height:26px}.icon--site[data-v-042fcdcb],.icon--site svg[data-v-042fcdcb]{width:26px;height:21px}.icon--slide[data-v-042fcdcb],.icon--slide svg[data-v-042fcdcb],.icon--snd[data-v-042fcdcb],.icon--snd svg[data-v-042fcdcb],.icon--sql[data-v-042fcdcb],.icon--sql svg[data-v-042fcdcb],.icon--swf[data-v-042fcdcb],.icon--swf svg[data-v-042fcdcb],.icon--txt[data-v-042fcdcb],.icon--txt svg[data-v-042fcdcb],.icon--vid[data-v-042fcdcb],.icon--vid svg[data-v-042fcdcb],.icon--xls[data-v-042fcdcb],.icon--xls svg[data-v-042fcdcb],.icon--zip[data-v-042fcdcb],.icon--zip svg[data-v-042fcdcb]{width:20px;height:26px}.container[data-v-042fcdcb]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-042fcdcb]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-042fcdcb]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-042fcdcb]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-042fcdcb]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-042fcdcb]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-042fcdcb]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-042fcdcb]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-042fcdcb]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-042fcdcb]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-042fcdcb]{width:auto}}.revaccordion__scroller[data-v-042fcdcb]{height:100%;overflow:hidden;overflow-y:auto;max-height:165px;margin:-12px -20px}.revaccordion__list[data-v-042fcdcb]{padding:12px 20px}.revaccordion__item a[data-v-042fcdcb]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:no-wrap;flex-wrap:no-wrap;color:#8c8c8c;padding:7.5px 20px;margin-left:-20px;margin-right:-20px;text-decoration:none}.revaccordion__item a[data-v-042fcdcb]:focus,.revaccordion__item a[data-v-042fcdcb]:hover{color:#262626;background:#f2f2f2}.revaccordion__author[data-v-042fcdcb]{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;white-space:nowrap}.revaccordion__datetime[data-v-042fcdcb]{padding-left:10px;color:#3278b8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.icon--add[data-v-5a88e420],.icon--add svg[data-v-5a88e420]{width:10px;height:10px}.icon--arrow-external[data-v-5a88e420],.icon--arrow-external svg[data-v-5a88e420]{width:8px;height:8px}.icon--arrow-sort[data-v-5a88e420],.icon--arrow-sort svg[data-v-5a88e420]{width:9px;height:11px}.icon--check[data-v-5a88e420],.icon--check svg[data-v-5a88e420]{width:11px;height:11px}.icon--close_icon[data-v-5a88e420],.icon--close_icon svg[data-v-5a88e420]{width:10px;height:10px}.icon--close_modal[data-v-5a88e420],.icon--close_modal svg[data-v-5a88e420]{width:16px;height:16px}.icon--colors[data-v-5a88e420],.icon--colors svg[data-v-5a88e420]{width:17px;height:17px}.icon--content-editor[data-v-5a88e420],.icon--content-editor svg[data-v-5a88e420]{width:14px;height:13px}.icon--crop[data-v-5a88e420],.icon--crop svg[data-v-5a88e420]{width:16px;height:18px}.icon--download[data-v-5a88e420],.icon--download svg[data-v-5a88e420]{width:12px;height:16px}.icon--drag[data-v-5a88e420],.icon--drag svg[data-v-5a88e420]{width:8px;height:17px}.icon--dropdown_default[data-v-5a88e420],.icon--dropdown_default svg[data-v-5a88e420]{width:9px;height:5px}.icon--dropdown_module[data-v-5a88e420],.icon--dropdown_module svg[data-v-5a88e420]{width:10px;height:6px}.icon--edit[data-v-5a88e420],.icon--edit svg[data-v-5a88e420]{width:13px;height:13px}.icon--edit_large[data-v-5a88e420],.icon--edit_large svg[data-v-5a88e420]{width:14px;height:14px}.icon--editor[data-v-5a88e420],.icon--editor svg[data-v-5a88e420]{width:14px;height:13px}.icon--expand[data-v-5a88e420],.icon--expand svg[data-v-5a88e420]{width:10px;height:10px}.icon--fix-grid[data-v-5a88e420],.icon--fix-grid svg[data-v-5a88e420]{width:18px;height:14px}.icon--flex-grid[data-v-5a88e420],.icon--flex-grid svg[data-v-5a88e420]{width:18px;height:17px}.icon--google-sign-in[data-v-5a88e420],.icon--google-sign-in svg[data-v-5a88e420]{width:23px;height:24px}.icon--image-text[data-v-5a88e420],.icon--image-text svg[data-v-5a88e420]{width:30px;height:13px}.icon--image[data-v-5a88e420],.icon--image svg[data-v-5a88e420]{width:19px;height:15px}.icon--info[data-v-5a88e420],.icon--info svg[data-v-5a88e420]{width:21px;height:21px}.icon--location[data-v-5a88e420],.icon--location svg[data-v-5a88e420]{width:12px;height:16px}.icon--media-grid[data-v-5a88e420],.icon--media-grid svg[data-v-5a88e420]{width:12px;height:12px}.icon--media-list[data-v-5a88e420],.icon--media-list svg[data-v-5a88e420]{width:16px;height:10px}.icon--more-dots[data-v-5a88e420],.icon--more-dots svg[data-v-5a88e420]{width:14px;height:4px}.icon--pagination_left[data-v-5a88e420],.icon--pagination_left svg[data-v-5a88e420],.icon--pagination_right[data-v-5a88e420],.icon--pagination_right svg[data-v-5a88e420]{width:9px;height:15px}.icon--preferences[data-v-5a88e420],.icon--preferences svg[data-v-5a88e420]{width:26px;height:16px}.icon--preview-desktop[data-v-5a88e420],.icon--preview-desktop svg[data-v-5a88e420]{width:39px;height:30px}.icon--preview-mobile[data-v-5a88e420],.icon--preview-mobile svg[data-v-5a88e420]{width:12px;height:18px}.icon--preview-tablet-h[data-v-5a88e420],.icon--preview-tablet-h svg[data-v-5a88e420]{width:27px;height:20px}.icon--preview-tablet-v[data-v-5a88e420],.icon--preview-tablet-v svg[data-v-5a88e420]{width:20px;height:27px}.icon--preview[data-v-5a88e420],.icon--preview svg[data-v-5a88e420]{width:22px;height:14px}.icon--publish[data-v-5a88e420],.icon--publish svg[data-v-5a88e420]{width:22px;height:15px}.icon--quote[data-v-5a88e420],.icon--quote svg[data-v-5a88e420]{width:16px;height:13px}.icon--revision-compare[data-v-5a88e420],.icon--revision-compare svg[data-v-5a88e420],.icon--revision-single[data-v-5a88e420],.icon--revision-single svg[data-v-5a88e420]{width:23px;height:16px}.icon--search[data-v-5a88e420],.icon--search svg[data-v-5a88e420]{width:20px;height:20px}.icon--slideshow[data-v-5a88e420],.icon--slideshow svg[data-v-5a88e420]{width:20px;height:16px}.icon--star-feature[data-v-5a88e420],.icon--star-feature_active[data-v-5a88e420],.icon--star-feature_active svg[data-v-5a88e420],.icon--star-feature svg[data-v-5a88e420]{width:20px;height:19px}.icon--text-2col[data-v-5a88e420],.icon--text-2col svg[data-v-5a88e420]{width:26px;height:13px}.icon--text[data-v-5a88e420],.icon--text svg[data-v-5a88e420]{width:17px;height:13px}.icon--trash[data-v-5a88e420],.icon--trash svg[data-v-5a88e420]{width:15px;height:17px}.icon--video[data-v-5a88e420],.icon--video svg[data-v-5a88e420]{width:23px;height:23px}.icon--website[data-v-5a88e420],.icon--website svg[data-v-5a88e420]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-5a88e420],.icon--wysiwyg_anchor svg[data-v-5a88e420]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-5a88e420],.icon--wysiwyg_bold svg[data-v-5a88e420]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-5a88e420],.icon--wysiwyg_header-2[data-v-5a88e420],.icon--wysiwyg_header-3 svg[data-v-5a88e420],.icon--wysiwyg_header-3[data-v-5a88e420],.icon--wysiwyg_header-4 svg[data-v-5a88e420],.icon--wysiwyg_header-4[data-v-5a88e420],.icon--wysiwyg_header-5 svg[data-v-5a88e420],.icon--wysiwyg_header-5[data-v-5a88e420],.icon--wysiwyg_header-6 svg[data-v-5a88e420],.icon--wysiwyg_header-6[data-v-5a88e420],.icon--wysiwyg_header[data-v-5a88e420],.icon--wysiwyg_header svg[data-v-5a88e420]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-5a88e420],.icon--wysiwyg_italic svg[data-v-5a88e420]{width:10px;height:13px}.icon--wysiwyg_link[data-v-5a88e420],.icon--wysiwyg_link svg[data-v-5a88e420]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-5a88e420],.icon--wysiwyg_underline svg[data-v-5a88e420]{width:12px;height:13px}.icon--ae[data-v-5a88e420],.icon--ae svg[data-v-5a88e420],.icon--ai[data-v-5a88e420],.icon--ai svg[data-v-5a88e420],.icon--ase[data-v-5a88e420],.icon--ase svg[data-v-5a88e420]{width:20px;height:26px}.icon--cut[data-v-5a88e420],.icon--cut svg[data-v-5a88e420],.icon--dir[data-v-5a88e420],.icon--dir_protected[data-v-5a88e420],.icon--dir_protected svg[data-v-5a88e420],.icon--dir_shared[data-v-5a88e420],.icon--dir_shared svg[data-v-5a88e420],.icon--dir svg[data-v-5a88e420]{width:26px;height:21px}.icon--dmg[data-v-5a88e420],.icon--dmg svg[data-v-5a88e420],.icon--doc[data-v-5a88e420],.icon--doc svg[data-v-5a88e420],.icon--eps[data-v-5a88e420],.icon--eps svg[data-v-5a88e420],.icon--fla[data-v-5a88e420],.icon--fla svg[data-v-5a88e420],.icon--fnt[data-v-5a88e420],.icon--fnt svg[data-v-5a88e420],.icon--gen[data-v-5a88e420],.icon--gen svg[data-v-5a88e420],.icon--html[data-v-5a88e420],.icon--html svg[data-v-5a88e420],.icon--img[data-v-5a88e420],.icon--img svg[data-v-5a88e420],.icon--indd[data-v-5a88e420],.icon--indd svg[data-v-5a88e420],.icon--key[data-v-5a88e420],.icon--key svg[data-v-5a88e420],.icon--merlin[data-v-5a88e420],.icon--merlin svg[data-v-5a88e420]{width:20px;height:26px}.icon--net[data-v-5a88e420],.icon--net svg[data-v-5a88e420]{width:26px;height:21px}.icon--numbers[data-v-5a88e420],.icon--numbers svg[data-v-5a88e420],.icon--pages[data-v-5a88e420],.icon--pages svg[data-v-5a88e420],.icon--pdf[data-v-5a88e420],.icon--pdf svg[data-v-5a88e420],.icon--ppt[data-v-5a88e420],.icon--ppt svg[data-v-5a88e420],.icon--psd[data-v-5a88e420],.icon--psd svg[data-v-5a88e420]{width:20px;height:26px}.icon--site[data-v-5a88e420],.icon--site svg[data-v-5a88e420]{width:26px;height:21px}.icon--slide[data-v-5a88e420],.icon--slide svg[data-v-5a88e420],.icon--snd[data-v-5a88e420],.icon--snd svg[data-v-5a88e420],.icon--sql[data-v-5a88e420],.icon--sql svg[data-v-5a88e420],.icon--swf[data-v-5a88e420],.icon--swf svg[data-v-5a88e420],.icon--txt[data-v-5a88e420],.icon--txt svg[data-v-5a88e420],.icon--vid[data-v-5a88e420],.icon--vid svg[data-v-5a88e420],.icon--xls[data-v-5a88e420],.icon--xls svg[data-v-5a88e420],.icon--zip[data-v-5a88e420],.icon--zip svg[data-v-5a88e420]{width:20px;height:26px}.container[data-v-5a88e420]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-5a88e420]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-5a88e420]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-5a88e420]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-5a88e420]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-5a88e420]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-5a88e420]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-5a88e420]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-5a88e420]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-5a88e420]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-5a88e420]{width:auto}}.revaccordion__scroller[data-v-5a88e420]{height:100%;overflow:hidden;overflow-y:auto;max-height:165px;margin:-12px -20px}.revaccordion__list[data-v-5a88e420]{padding:12px 20px}.revaccordion__item[data-v-5a88e420]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:no-wrap;flex-wrap:no-wrap;color:#8c8c8c;padding:7.5px 20px;cursor:pointer;margin-left:-20px;margin-right:-20px}.revaccordion__item[data-v-5a88e420]:hover{color:#262626;background:#f2f2f2}.revaccordion__author[data-v-5a88e420]{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.revaccordion__datetime[data-v-5a88e420]{color:#3278b8;white-space:nowrap;overflow:hidden}.icon--add[data-v-40868c5c],.icon--add svg[data-v-40868c5c]{width:10px;height:10px}.icon--arrow-external[data-v-40868c5c],.icon--arrow-external svg[data-v-40868c5c]{width:8px;height:8px}.icon--arrow-sort[data-v-40868c5c],.icon--arrow-sort svg[data-v-40868c5c]{width:9px;height:11px}.icon--check[data-v-40868c5c],.icon--check svg[data-v-40868c5c]{width:11px;height:11px}.icon--close_icon[data-v-40868c5c],.icon--close_icon svg[data-v-40868c5c]{width:10px;height:10px}.icon--close_modal[data-v-40868c5c],.icon--close_modal svg[data-v-40868c5c]{width:16px;height:16px}.icon--colors[data-v-40868c5c],.icon--colors svg[data-v-40868c5c]{width:17px;height:17px}.icon--content-editor[data-v-40868c5c],.icon--content-editor svg[data-v-40868c5c]{width:14px;height:13px}.icon--crop[data-v-40868c5c],.icon--crop svg[data-v-40868c5c]{width:16px;height:18px}.icon--download[data-v-40868c5c],.icon--download svg[data-v-40868c5c]{width:12px;height:16px}.icon--drag[data-v-40868c5c],.icon--drag svg[data-v-40868c5c]{width:8px;height:17px}.icon--dropdown_default[data-v-40868c5c],.icon--dropdown_default svg[data-v-40868c5c]{width:9px;height:5px}.icon--dropdown_module[data-v-40868c5c],.icon--dropdown_module svg[data-v-40868c5c]{width:10px;height:6px}.icon--edit[data-v-40868c5c],.icon--edit svg[data-v-40868c5c]{width:13px;height:13px}.icon--edit_large[data-v-40868c5c],.icon--edit_large svg[data-v-40868c5c]{width:14px;height:14px}.icon--editor[data-v-40868c5c],.icon--editor svg[data-v-40868c5c]{width:14px;height:13px}.icon--expand[data-v-40868c5c],.icon--expand svg[data-v-40868c5c]{width:10px;height:10px}.icon--fix-grid[data-v-40868c5c],.icon--fix-grid svg[data-v-40868c5c]{width:18px;height:14px}.icon--flex-grid[data-v-40868c5c],.icon--flex-grid svg[data-v-40868c5c]{width:18px;height:17px}.icon--google-sign-in[data-v-40868c5c],.icon--google-sign-in svg[data-v-40868c5c]{width:23px;height:24px}.icon--image-text[data-v-40868c5c],.icon--image-text svg[data-v-40868c5c]{width:30px;height:13px}.icon--image[data-v-40868c5c],.icon--image svg[data-v-40868c5c]{width:19px;height:15px}.icon--info[data-v-40868c5c],.icon--info svg[data-v-40868c5c]{width:21px;height:21px}.icon--location[data-v-40868c5c],.icon--location svg[data-v-40868c5c]{width:12px;height:16px}.icon--media-grid[data-v-40868c5c],.icon--media-grid svg[data-v-40868c5c]{width:12px;height:12px}.icon--media-list[data-v-40868c5c],.icon--media-list svg[data-v-40868c5c]{width:16px;height:10px}.icon--more-dots[data-v-40868c5c],.icon--more-dots svg[data-v-40868c5c]{width:14px;height:4px}.icon--pagination_left[data-v-40868c5c],.icon--pagination_left svg[data-v-40868c5c],.icon--pagination_right[data-v-40868c5c],.icon--pagination_right svg[data-v-40868c5c]{width:9px;height:15px}.icon--preferences[data-v-40868c5c],.icon--preferences svg[data-v-40868c5c]{width:26px;height:16px}.icon--preview-desktop[data-v-40868c5c],.icon--preview-desktop svg[data-v-40868c5c]{width:39px;height:30px}.icon--preview-mobile[data-v-40868c5c],.icon--preview-mobile svg[data-v-40868c5c]{width:12px;height:18px}.icon--preview-tablet-h[data-v-40868c5c],.icon--preview-tablet-h svg[data-v-40868c5c]{width:27px;height:20px}.icon--preview-tablet-v[data-v-40868c5c],.icon--preview-tablet-v svg[data-v-40868c5c]{width:20px;height:27px}.icon--preview[data-v-40868c5c],.icon--preview svg[data-v-40868c5c]{width:22px;height:14px}.icon--publish[data-v-40868c5c],.icon--publish svg[data-v-40868c5c]{width:22px;height:15px}.icon--quote[data-v-40868c5c],.icon--quote svg[data-v-40868c5c]{width:16px;height:13px}.icon--revision-compare[data-v-40868c5c],.icon--revision-compare svg[data-v-40868c5c],.icon--revision-single[data-v-40868c5c],.icon--revision-single svg[data-v-40868c5c]{width:23px;height:16px}.icon--search[data-v-40868c5c],.icon--search svg[data-v-40868c5c]{width:20px;height:20px}.icon--slideshow[data-v-40868c5c],.icon--slideshow svg[data-v-40868c5c]{width:20px;height:16px}.icon--star-feature[data-v-40868c5c],.icon--star-feature_active[data-v-40868c5c],.icon--star-feature_active svg[data-v-40868c5c],.icon--star-feature svg[data-v-40868c5c]{width:20px;height:19px}.icon--text-2col[data-v-40868c5c],.icon--text-2col svg[data-v-40868c5c]{width:26px;height:13px}.icon--text[data-v-40868c5c],.icon--text svg[data-v-40868c5c]{width:17px;height:13px}.icon--trash[data-v-40868c5c],.icon--trash svg[data-v-40868c5c]{width:15px;height:17px}.icon--video[data-v-40868c5c],.icon--video svg[data-v-40868c5c]{width:23px;height:23px}.icon--website[data-v-40868c5c],.icon--website svg[data-v-40868c5c]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-40868c5c],.icon--wysiwyg_anchor svg[data-v-40868c5c]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-40868c5c],.icon--wysiwyg_bold svg[data-v-40868c5c]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-40868c5c],.icon--wysiwyg_header-2[data-v-40868c5c],.icon--wysiwyg_header-3 svg[data-v-40868c5c],.icon--wysiwyg_header-3[data-v-40868c5c],.icon--wysiwyg_header-4 svg[data-v-40868c5c],.icon--wysiwyg_header-4[data-v-40868c5c],.icon--wysiwyg_header-5 svg[data-v-40868c5c],.icon--wysiwyg_header-5[data-v-40868c5c],.icon--wysiwyg_header-6 svg[data-v-40868c5c],.icon--wysiwyg_header-6[data-v-40868c5c],.icon--wysiwyg_header[data-v-40868c5c],.icon--wysiwyg_header svg[data-v-40868c5c]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-40868c5c],.icon--wysiwyg_italic svg[data-v-40868c5c]{width:10px;height:13px}.icon--wysiwyg_link[data-v-40868c5c],.icon--wysiwyg_link svg[data-v-40868c5c]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-40868c5c],.icon--wysiwyg_underline svg[data-v-40868c5c]{width:12px;height:13px}.icon--ae[data-v-40868c5c],.icon--ae svg[data-v-40868c5c],.icon--ai[data-v-40868c5c],.icon--ai svg[data-v-40868c5c],.icon--ase[data-v-40868c5c],.icon--ase svg[data-v-40868c5c]{width:20px;height:26px}.icon--cut[data-v-40868c5c],.icon--cut svg[data-v-40868c5c],.icon--dir[data-v-40868c5c],.icon--dir_protected[data-v-40868c5c],.icon--dir_protected svg[data-v-40868c5c],.icon--dir_shared[data-v-40868c5c],.icon--dir_shared svg[data-v-40868c5c],.icon--dir svg[data-v-40868c5c]{width:26px;height:21px}.icon--dmg[data-v-40868c5c],.icon--dmg svg[data-v-40868c5c],.icon--doc[data-v-40868c5c],.icon--doc svg[data-v-40868c5c],.icon--eps[data-v-40868c5c],.icon--eps svg[data-v-40868c5c],.icon--fla[data-v-40868c5c],.icon--fla svg[data-v-40868c5c],.icon--fnt[data-v-40868c5c],.icon--fnt svg[data-v-40868c5c],.icon--gen[data-v-40868c5c],.icon--gen svg[data-v-40868c5c],.icon--html[data-v-40868c5c],.icon--html svg[data-v-40868c5c],.icon--img[data-v-40868c5c],.icon--img svg[data-v-40868c5c],.icon--indd[data-v-40868c5c],.icon--indd svg[data-v-40868c5c],.icon--key[data-v-40868c5c],.icon--key svg[data-v-40868c5c],.icon--merlin[data-v-40868c5c],.icon--merlin svg[data-v-40868c5c]{width:20px;height:26px}.icon--net[data-v-40868c5c],.icon--net svg[data-v-40868c5c]{width:26px;height:21px}.icon--numbers[data-v-40868c5c],.icon--numbers svg[data-v-40868c5c],.icon--pages[data-v-40868c5c],.icon--pages svg[data-v-40868c5c],.icon--pdf[data-v-40868c5c],.icon--pdf svg[data-v-40868c5c],.icon--ppt[data-v-40868c5c],.icon--ppt svg[data-v-40868c5c],.icon--psd[data-v-40868c5c],.icon--psd svg[data-v-40868c5c]{width:20px;height:26px}.icon--site[data-v-40868c5c],.icon--site svg[data-v-40868c5c]{width:26px;height:21px}.icon--slide[data-v-40868c5c],.icon--slide svg[data-v-40868c5c],.icon--snd[data-v-40868c5c],.icon--snd svg[data-v-40868c5c],.icon--sql[data-v-40868c5c],.icon--sql svg[data-v-40868c5c],.icon--swf[data-v-40868c5c],.icon--swf svg[data-v-40868c5c],.icon--txt[data-v-40868c5c],.icon--txt svg[data-v-40868c5c],.icon--vid[data-v-40868c5c],.icon--vid svg[data-v-40868c5c],.icon--xls[data-v-40868c5c],.icon--xls svg[data-v-40868c5c],.icon--zip[data-v-40868c5c],.icon--zip svg[data-v-40868c5c]{width:20px;height:26px}.container[data-v-40868c5c]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-40868c5c]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-40868c5c]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-40868c5c]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-40868c5c]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-40868c5c]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-40868c5c]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-40868c5c]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-40868c5c]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-40868c5c]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-40868c5c]{width:auto}}.multibutton[data-v-40868c5c]{height:40px;position:relative;display:block}.multibutton .dropdown[data-v-40868c5c]{display:-webkit-box;display:-ms-flexbox;display:flex}.multibutton .dropdown>button[data-v-40868c5c]:first-child{display:block;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.multibutton .dropdown__content[data-v-40868c5c]{max-width:100%;width:100%}.multibutton__trigger[data-v-40868c5c]{background-color:transparent;-webkit-appearance:none;cursor:pointer;font-size:1em;outline:none;margin:0;border:0 none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;letter-spacing:inherit;height:40px;line-height:40px;text-align:center;border-top-right-radius:2px;border-bottom-right-radius:2px;border-top-left-radius:0;border-bottom-left-radius:0;background:#1d9f3c;color:#fff;margin-left:-2px;border-left:1px solid #1a8f36;padding:0 10px;-webkit-transition:color .2s linear,border-color .2s linear,background-color .2s linear;transition:color .2s linear,border-color .2s linear,background-color .2s linear}.multibutton__trigger[data-v-40868c5c]:focus,.multibutton__trigger[data-v-40868c5c]:hover{background:#1a8f36}.multibutton__trigger .icon[data-v-40868c5c]{color:#fff;position:relative;top:-3px}.icon--add[data-v-6d7750c6],.icon--add svg[data-v-6d7750c6]{width:10px;height:10px}.icon--arrow-external[data-v-6d7750c6],.icon--arrow-external svg[data-v-6d7750c6]{width:8px;height:8px}.icon--arrow-sort[data-v-6d7750c6],.icon--arrow-sort svg[data-v-6d7750c6]{width:9px;height:11px}.icon--check[data-v-6d7750c6],.icon--check svg[data-v-6d7750c6]{width:11px;height:11px}.icon--close_icon[data-v-6d7750c6],.icon--close_icon svg[data-v-6d7750c6]{width:10px;height:10px}.icon--close_modal[data-v-6d7750c6],.icon--close_modal svg[data-v-6d7750c6]{width:16px;height:16px}.icon--colors[data-v-6d7750c6],.icon--colors svg[data-v-6d7750c6]{width:17px;height:17px}.icon--content-editor[data-v-6d7750c6],.icon--content-editor svg[data-v-6d7750c6]{width:14px;height:13px}.icon--crop[data-v-6d7750c6],.icon--crop svg[data-v-6d7750c6]{width:16px;height:18px}.icon--download[data-v-6d7750c6],.icon--download svg[data-v-6d7750c6]{width:12px;height:16px}.icon--drag[data-v-6d7750c6],.icon--drag svg[data-v-6d7750c6]{width:8px;height:17px}.icon--dropdown_default[data-v-6d7750c6],.icon--dropdown_default svg[data-v-6d7750c6]{width:9px;height:5px}.icon--dropdown_module[data-v-6d7750c6],.icon--dropdown_module svg[data-v-6d7750c6]{width:10px;height:6px}.icon--edit[data-v-6d7750c6],.icon--edit svg[data-v-6d7750c6]{width:13px;height:13px}.icon--edit_large[data-v-6d7750c6],.icon--edit_large svg[data-v-6d7750c6]{width:14px;height:14px}.icon--editor[data-v-6d7750c6],.icon--editor svg[data-v-6d7750c6]{width:14px;height:13px}.icon--expand[data-v-6d7750c6],.icon--expand svg[data-v-6d7750c6]{width:10px;height:10px}.icon--fix-grid[data-v-6d7750c6],.icon--fix-grid svg[data-v-6d7750c6]{width:18px;height:14px}.icon--flex-grid[data-v-6d7750c6],.icon--flex-grid svg[data-v-6d7750c6]{width:18px;height:17px}.icon--google-sign-in[data-v-6d7750c6],.icon--google-sign-in svg[data-v-6d7750c6]{width:23px;height:24px}.icon--image-text[data-v-6d7750c6],.icon--image-text svg[data-v-6d7750c6]{width:30px;height:13px}.icon--image[data-v-6d7750c6],.icon--image svg[data-v-6d7750c6]{width:19px;height:15px}.icon--info[data-v-6d7750c6],.icon--info svg[data-v-6d7750c6]{width:21px;height:21px}.icon--location[data-v-6d7750c6],.icon--location svg[data-v-6d7750c6]{width:12px;height:16px}.icon--media-grid[data-v-6d7750c6],.icon--media-grid svg[data-v-6d7750c6]{width:12px;height:12px}.icon--media-list[data-v-6d7750c6],.icon--media-list svg[data-v-6d7750c6]{width:16px;height:10px}.icon--more-dots[data-v-6d7750c6],.icon--more-dots svg[data-v-6d7750c6]{width:14px;height:4px}.icon--pagination_left[data-v-6d7750c6],.icon--pagination_left svg[data-v-6d7750c6],.icon--pagination_right[data-v-6d7750c6],.icon--pagination_right svg[data-v-6d7750c6]{width:9px;height:15px}.icon--preferences[data-v-6d7750c6],.icon--preferences svg[data-v-6d7750c6]{width:26px;height:16px}.icon--preview-desktop[data-v-6d7750c6],.icon--preview-desktop svg[data-v-6d7750c6]{width:39px;height:30px}.icon--preview-mobile[data-v-6d7750c6],.icon--preview-mobile svg[data-v-6d7750c6]{width:12px;height:18px}.icon--preview-tablet-h[data-v-6d7750c6],.icon--preview-tablet-h svg[data-v-6d7750c6]{width:27px;height:20px}.icon--preview-tablet-v[data-v-6d7750c6],.icon--preview-tablet-v svg[data-v-6d7750c6]{width:20px;height:27px}.icon--preview[data-v-6d7750c6],.icon--preview svg[data-v-6d7750c6]{width:22px;height:14px}.icon--publish[data-v-6d7750c6],.icon--publish svg[data-v-6d7750c6]{width:22px;height:15px}.icon--quote[data-v-6d7750c6],.icon--quote svg[data-v-6d7750c6]{width:16px;height:13px}.icon--revision-compare[data-v-6d7750c6],.icon--revision-compare svg[data-v-6d7750c6],.icon--revision-single[data-v-6d7750c6],.icon--revision-single svg[data-v-6d7750c6]{width:23px;height:16px}.icon--search[data-v-6d7750c6],.icon--search svg[data-v-6d7750c6]{width:20px;height:20px}.icon--slideshow[data-v-6d7750c6],.icon--slideshow svg[data-v-6d7750c6]{width:20px;height:16px}.icon--star-feature[data-v-6d7750c6],.icon--star-feature_active[data-v-6d7750c6],.icon--star-feature_active svg[data-v-6d7750c6],.icon--star-feature svg[data-v-6d7750c6]{width:20px;height:19px}.icon--text-2col[data-v-6d7750c6],.icon--text-2col svg[data-v-6d7750c6]{width:26px;height:13px}.icon--text[data-v-6d7750c6],.icon--text svg[data-v-6d7750c6]{width:17px;height:13px}.icon--trash[data-v-6d7750c6],.icon--trash svg[data-v-6d7750c6]{width:15px;height:17px}.icon--video[data-v-6d7750c6],.icon--video svg[data-v-6d7750c6]{width:23px;height:23px}.icon--website[data-v-6d7750c6],.icon--website svg[data-v-6d7750c6]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-6d7750c6],.icon--wysiwyg_anchor svg[data-v-6d7750c6]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-6d7750c6],.icon--wysiwyg_bold svg[data-v-6d7750c6]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-6d7750c6],.icon--wysiwyg_header-2[data-v-6d7750c6],.icon--wysiwyg_header-3 svg[data-v-6d7750c6],.icon--wysiwyg_header-3[data-v-6d7750c6],.icon--wysiwyg_header-4 svg[data-v-6d7750c6],.icon--wysiwyg_header-4[data-v-6d7750c6],.icon--wysiwyg_header-5 svg[data-v-6d7750c6],.icon--wysiwyg_header-5[data-v-6d7750c6],.icon--wysiwyg_header-6 svg[data-v-6d7750c6],.icon--wysiwyg_header-6[data-v-6d7750c6],.icon--wysiwyg_header[data-v-6d7750c6],.icon--wysiwyg_header svg[data-v-6d7750c6]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-6d7750c6],.icon--wysiwyg_italic svg[data-v-6d7750c6]{width:10px;height:13px}.icon--wysiwyg_link[data-v-6d7750c6],.icon--wysiwyg_link svg[data-v-6d7750c6]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-6d7750c6],.icon--wysiwyg_underline svg[data-v-6d7750c6]{width:12px;height:13px}.icon--ae[data-v-6d7750c6],.icon--ae svg[data-v-6d7750c6],.icon--ai[data-v-6d7750c6],.icon--ai svg[data-v-6d7750c6],.icon--ase[data-v-6d7750c6],.icon--ase svg[data-v-6d7750c6]{width:20px;height:26px}.icon--cut[data-v-6d7750c6],.icon--cut svg[data-v-6d7750c6],.icon--dir[data-v-6d7750c6],.icon--dir_protected[data-v-6d7750c6],.icon--dir_protected svg[data-v-6d7750c6],.icon--dir_shared[data-v-6d7750c6],.icon--dir_shared svg[data-v-6d7750c6],.icon--dir svg[data-v-6d7750c6]{width:26px;height:21px}.icon--dmg[data-v-6d7750c6],.icon--dmg svg[data-v-6d7750c6],.icon--doc[data-v-6d7750c6],.icon--doc svg[data-v-6d7750c6],.icon--eps[data-v-6d7750c6],.icon--eps svg[data-v-6d7750c6],.icon--fla[data-v-6d7750c6],.icon--fla svg[data-v-6d7750c6],.icon--fnt[data-v-6d7750c6],.icon--fnt svg[data-v-6d7750c6],.icon--gen[data-v-6d7750c6],.icon--gen svg[data-v-6d7750c6],.icon--html[data-v-6d7750c6],.icon--html svg[data-v-6d7750c6],.icon--img[data-v-6d7750c6],.icon--img svg[data-v-6d7750c6],.icon--indd[data-v-6d7750c6],.icon--indd svg[data-v-6d7750c6],.icon--key[data-v-6d7750c6],.icon--key svg[data-v-6d7750c6],.icon--merlin[data-v-6d7750c6],.icon--merlin svg[data-v-6d7750c6]{width:20px;height:26px}.icon--net[data-v-6d7750c6],.icon--net svg[data-v-6d7750c6]{width:26px;height:21px}.icon--numbers[data-v-6d7750c6],.icon--numbers svg[data-v-6d7750c6],.icon--pages[data-v-6d7750c6],.icon--pages svg[data-v-6d7750c6],.icon--pdf[data-v-6d7750c6],.icon--pdf svg[data-v-6d7750c6],.icon--ppt[data-v-6d7750c6],.icon--ppt svg[data-v-6d7750c6],.icon--psd[data-v-6d7750c6],.icon--psd svg[data-v-6d7750c6]{width:20px;height:26px}.icon--site[data-v-6d7750c6],.icon--site svg[data-v-6d7750c6]{width:26px;height:21px}.icon--slide[data-v-6d7750c6],.icon--slide svg[data-v-6d7750c6],.icon--snd[data-v-6d7750c6],.icon--snd svg[data-v-6d7750c6],.icon--sql[data-v-6d7750c6],.icon--sql svg[data-v-6d7750c6],.icon--swf[data-v-6d7750c6],.icon--swf svg[data-v-6d7750c6],.icon--txt[data-v-6d7750c6],.icon--txt svg[data-v-6d7750c6],.icon--vid[data-v-6d7750c6],.icon--vid svg[data-v-6d7750c6],.icon--xls[data-v-6d7750c6],.icon--xls svg[data-v-6d7750c6],.icon--zip[data-v-6d7750c6],.icon--zip svg[data-v-6d7750c6]{width:20px;height:26px}.container[data-v-6d7750c6]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-6d7750c6]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-6d7750c6]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-6d7750c6]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-6d7750c6]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-6d7750c6]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-6d7750c6]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-6d7750c6]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-6d7750c6]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-6d7750c6]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-6d7750c6]{width:auto}}.publisher__wrapper[data-v-6d7750c6]{border-radius:2px;border:1px solid #e5e5e5;background:#fff;margin-bottom:20px}.publisher__trash[data-v-6d7750c6]{padding:0 10px;margin-bottom:20px}.publisher__item[data-v-6d7750c6]{border-bottom:1px solid #f2f2f2}.publisher__item[data-v-6d7750c6]:last-child{border-bottom:0 none}.publisher__item[data-v-6d7750c6]{color:#8c8c8c}.publisher__item a[data-v-6d7750c6]{color:#3278b8;text-decoration:none}.revisionaccordion__list[data-v-6d7750c6]{padding:20px}.publisher__link[data-v-6d7750c6]{height:55px;line-height:55px;padding:0 20px;display:block}.publisher__link .icon[data-v-6d7750c6]{margin-right:10px;color:#3278b8}.publisher__item--btns[data-v-6d7750c6]{padding:10px}.icon--add[data-v-761dbeaa],.icon--add svg[data-v-761dbeaa]{width:10px;height:10px}.icon--arrow-external[data-v-761dbeaa],.icon--arrow-external svg[data-v-761dbeaa]{width:8px;height:8px}.icon--arrow-sort[data-v-761dbeaa],.icon--arrow-sort svg[data-v-761dbeaa]{width:9px;height:11px}.icon--check[data-v-761dbeaa],.icon--check svg[data-v-761dbeaa]{width:11px;height:11px}.icon--close_icon[data-v-761dbeaa],.icon--close_icon svg[data-v-761dbeaa]{width:10px;height:10px}.icon--close_modal[data-v-761dbeaa],.icon--close_modal svg[data-v-761dbeaa]{width:16px;height:16px}.icon--colors[data-v-761dbeaa],.icon--colors svg[data-v-761dbeaa]{width:17px;height:17px}.icon--content-editor[data-v-761dbeaa],.icon--content-editor svg[data-v-761dbeaa]{width:14px;height:13px}.icon--crop[data-v-761dbeaa],.icon--crop svg[data-v-761dbeaa]{width:16px;height:18px}.icon--download[data-v-761dbeaa],.icon--download svg[data-v-761dbeaa]{width:12px;height:16px}.icon--drag[data-v-761dbeaa],.icon--drag svg[data-v-761dbeaa]{width:8px;height:17px}.icon--dropdown_default[data-v-761dbeaa],.icon--dropdown_default svg[data-v-761dbeaa]{width:9px;height:5px}.icon--dropdown_module[data-v-761dbeaa],.icon--dropdown_module svg[data-v-761dbeaa]{width:10px;height:6px}.icon--edit[data-v-761dbeaa],.icon--edit svg[data-v-761dbeaa]{width:13px;height:13px}.icon--edit_large[data-v-761dbeaa],.icon--edit_large svg[data-v-761dbeaa]{width:14px;height:14px}.icon--editor[data-v-761dbeaa],.icon--editor svg[data-v-761dbeaa]{width:14px;height:13px}.icon--expand[data-v-761dbeaa],.icon--expand svg[data-v-761dbeaa]{width:10px;height:10px}.icon--fix-grid[data-v-761dbeaa],.icon--fix-grid svg[data-v-761dbeaa]{width:18px;height:14px}.icon--flex-grid[data-v-761dbeaa],.icon--flex-grid svg[data-v-761dbeaa]{width:18px;height:17px}.icon--google-sign-in[data-v-761dbeaa],.icon--google-sign-in svg[data-v-761dbeaa]{width:23px;height:24px}.icon--image-text[data-v-761dbeaa],.icon--image-text svg[data-v-761dbeaa]{width:30px;height:13px}.icon--image[data-v-761dbeaa],.icon--image svg[data-v-761dbeaa]{width:19px;height:15px}.icon--info[data-v-761dbeaa],.icon--info svg[data-v-761dbeaa]{width:21px;height:21px}.icon--location[data-v-761dbeaa],.icon--location svg[data-v-761dbeaa]{width:12px;height:16px}.icon--media-grid[data-v-761dbeaa],.icon--media-grid svg[data-v-761dbeaa]{width:12px;height:12px}.icon--media-list[data-v-761dbeaa],.icon--media-list svg[data-v-761dbeaa]{width:16px;height:10px}.icon--more-dots[data-v-761dbeaa],.icon--more-dots svg[data-v-761dbeaa]{width:14px;height:4px}.icon--pagination_left[data-v-761dbeaa],.icon--pagination_left svg[data-v-761dbeaa],.icon--pagination_right[data-v-761dbeaa],.icon--pagination_right svg[data-v-761dbeaa]{width:9px;height:15px}.icon--preferences[data-v-761dbeaa],.icon--preferences svg[data-v-761dbeaa]{width:26px;height:16px}.icon--preview-desktop[data-v-761dbeaa],.icon--preview-desktop svg[data-v-761dbeaa]{width:39px;height:30px}.icon--preview-mobile[data-v-761dbeaa],.icon--preview-mobile svg[data-v-761dbeaa]{width:12px;height:18px}.icon--preview-tablet-h[data-v-761dbeaa],.icon--preview-tablet-h svg[data-v-761dbeaa]{width:27px;height:20px}.icon--preview-tablet-v[data-v-761dbeaa],.icon--preview-tablet-v svg[data-v-761dbeaa]{width:20px;height:27px}.icon--preview[data-v-761dbeaa],.icon--preview svg[data-v-761dbeaa]{width:22px;height:14px}.icon--publish[data-v-761dbeaa],.icon--publish svg[data-v-761dbeaa]{width:22px;height:15px}.icon--quote[data-v-761dbeaa],.icon--quote svg[data-v-761dbeaa]{width:16px;height:13px}.icon--revision-compare[data-v-761dbeaa],.icon--revision-compare svg[data-v-761dbeaa],.icon--revision-single[data-v-761dbeaa],.icon--revision-single svg[data-v-761dbeaa]{width:23px;height:16px}.icon--search[data-v-761dbeaa],.icon--search svg[data-v-761dbeaa]{width:20px;height:20px}.icon--slideshow[data-v-761dbeaa],.icon--slideshow svg[data-v-761dbeaa]{width:20px;height:16px}.icon--star-feature[data-v-761dbeaa],.icon--star-feature_active[data-v-761dbeaa],.icon--star-feature_active svg[data-v-761dbeaa],.icon--star-feature svg[data-v-761dbeaa]{width:20px;height:19px}.icon--text-2col[data-v-761dbeaa],.icon--text-2col svg[data-v-761dbeaa]{width:26px;height:13px}.icon--text[data-v-761dbeaa],.icon--text svg[data-v-761dbeaa]{width:17px;height:13px}.icon--trash[data-v-761dbeaa],.icon--trash svg[data-v-761dbeaa]{width:15px;height:17px}.icon--video[data-v-761dbeaa],.icon--video svg[data-v-761dbeaa]{width:23px;height:23px}.icon--website[data-v-761dbeaa],.icon--website svg[data-v-761dbeaa]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-761dbeaa],.icon--wysiwyg_anchor svg[data-v-761dbeaa]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-761dbeaa],.icon--wysiwyg_bold svg[data-v-761dbeaa]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-761dbeaa],.icon--wysiwyg_header-2[data-v-761dbeaa],.icon--wysiwyg_header-3 svg[data-v-761dbeaa],.icon--wysiwyg_header-3[data-v-761dbeaa],.icon--wysiwyg_header-4 svg[data-v-761dbeaa],.icon--wysiwyg_header-4[data-v-761dbeaa],.icon--wysiwyg_header-5 svg[data-v-761dbeaa],.icon--wysiwyg_header-5[data-v-761dbeaa],.icon--wysiwyg_header-6 svg[data-v-761dbeaa],.icon--wysiwyg_header-6[data-v-761dbeaa],.icon--wysiwyg_header[data-v-761dbeaa],.icon--wysiwyg_header svg[data-v-761dbeaa]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-761dbeaa],.icon--wysiwyg_italic svg[data-v-761dbeaa]{width:10px;height:13px}.icon--wysiwyg_link[data-v-761dbeaa],.icon--wysiwyg_link svg[data-v-761dbeaa]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-761dbeaa],.icon--wysiwyg_underline svg[data-v-761dbeaa]{width:12px;height:13px}.icon--ae[data-v-761dbeaa],.icon--ae svg[data-v-761dbeaa],.icon--ai[data-v-761dbeaa],.icon--ai svg[data-v-761dbeaa],.icon--ase[data-v-761dbeaa],.icon--ase svg[data-v-761dbeaa]{width:20px;height:26px}.icon--cut[data-v-761dbeaa],.icon--cut svg[data-v-761dbeaa],.icon--dir[data-v-761dbeaa],.icon--dir_protected[data-v-761dbeaa],.icon--dir_protected svg[data-v-761dbeaa],.icon--dir_shared[data-v-761dbeaa],.icon--dir_shared svg[data-v-761dbeaa],.icon--dir svg[data-v-761dbeaa]{width:26px;height:21px}.icon--dmg[data-v-761dbeaa],.icon--dmg svg[data-v-761dbeaa],.icon--doc[data-v-761dbeaa],.icon--doc svg[data-v-761dbeaa],.icon--eps[data-v-761dbeaa],.icon--eps svg[data-v-761dbeaa],.icon--fla[data-v-761dbeaa],.icon--fla svg[data-v-761dbeaa],.icon--fnt[data-v-761dbeaa],.icon--fnt svg[data-v-761dbeaa],.icon--gen[data-v-761dbeaa],.icon--gen svg[data-v-761dbeaa],.icon--html[data-v-761dbeaa],.icon--html svg[data-v-761dbeaa],.icon--img[data-v-761dbeaa],.icon--img svg[data-v-761dbeaa],.icon--indd[data-v-761dbeaa],.icon--indd svg[data-v-761dbeaa],.icon--key[data-v-761dbeaa],.icon--key svg[data-v-761dbeaa],.icon--merlin[data-v-761dbeaa],.icon--merlin svg[data-v-761dbeaa]{width:20px;height:26px}.icon--net[data-v-761dbeaa],.icon--net svg[data-v-761dbeaa]{width:26px;height:21px}.icon--numbers[data-v-761dbeaa],.icon--numbers svg[data-v-761dbeaa],.icon--pages[data-v-761dbeaa],.icon--pages svg[data-v-761dbeaa],.icon--pdf[data-v-761dbeaa],.icon--pdf svg[data-v-761dbeaa],.icon--ppt[data-v-761dbeaa],.icon--ppt svg[data-v-761dbeaa],.icon--psd[data-v-761dbeaa],.icon--psd svg[data-v-761dbeaa]{width:20px;height:26px}.icon--site[data-v-761dbeaa],.icon--site svg[data-v-761dbeaa]{width:26px;height:21px}.icon--slide[data-v-761dbeaa],.icon--slide svg[data-v-761dbeaa],.icon--snd[data-v-761dbeaa],.icon--snd svg[data-v-761dbeaa],.icon--sql[data-v-761dbeaa],.icon--sql svg[data-v-761dbeaa],.icon--swf[data-v-761dbeaa],.icon--swf svg[data-v-761dbeaa],.icon--txt[data-v-761dbeaa],.icon--txt svg[data-v-761dbeaa],.icon--vid[data-v-761dbeaa],.icon--vid svg[data-v-761dbeaa],.icon--xls[data-v-761dbeaa],.icon--xls svg[data-v-761dbeaa],.icon--zip[data-v-761dbeaa],.icon--zip svg[data-v-761dbeaa]{width:20px;height:26px}.container[data-v-761dbeaa]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-761dbeaa]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-761dbeaa]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-761dbeaa]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-761dbeaa]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-761dbeaa]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-761dbeaa]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-761dbeaa]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-761dbeaa]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-761dbeaa]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-761dbeaa]{width:auto}}.pagenav[data-v-761dbeaa]{border-radius:2px;border:1px solid #e5e5e5;background:#fff;margin-bottom:20px}.pagenav__form[data-v-761dbeaa]{padding:0 20px 20px 20px;margin-top:-15px}.pagenav__nav[data-v-761dbeaa]{display:-webkit-box;display:-ms-flexbox;display:flex}.pagenav__form+.pagenav__nav .pagenav__btn[data-v-761dbeaa]{border-top:1px solid #f2f2f2}.pagenav__btn[data-v-761dbeaa]{border-right:1px solid #f2f2f2;padding:0 20px;-webkit-box-flex:1;-ms-flex:1 0 0px;flex:1 0 0px;overflow:hidden;height:48px;line-height:48px;text-decoration:none;color:#8c8c8c;opacity:.5}.pagenav__btn[data-v-761dbeaa]:last-child{border-right:0 none}a.pagenav__btn[data-v-761dbeaa]{opacity:1}a.pagenav__btn[data-v-761dbeaa]:focus,a.pagenav__btn[data-v-761dbeaa]:hover{color:#262626;background:#fbfbfb}.pagenav__btn+.pagenav__btn[data-v-761dbeaa]{text-align:right}.icon--add[data-v-751399b0],.icon--add svg[data-v-751399b0]{width:10px;height:10px}.icon--arrow-external[data-v-751399b0],.icon--arrow-external svg[data-v-751399b0]{width:8px;height:8px}.icon--arrow-sort[data-v-751399b0],.icon--arrow-sort svg[data-v-751399b0]{width:9px;height:11px}.icon--check[data-v-751399b0],.icon--check svg[data-v-751399b0]{width:11px;height:11px}.icon--close_icon[data-v-751399b0],.icon--close_icon svg[data-v-751399b0]{width:10px;height:10px}.icon--close_modal[data-v-751399b0],.icon--close_modal svg[data-v-751399b0]{width:16px;height:16px}.icon--colors[data-v-751399b0],.icon--colors svg[data-v-751399b0]{width:17px;height:17px}.icon--content-editor[data-v-751399b0],.icon--content-editor svg[data-v-751399b0]{width:14px;height:13px}.icon--crop[data-v-751399b0],.icon--crop svg[data-v-751399b0]{width:16px;height:18px}.icon--download[data-v-751399b0],.icon--download svg[data-v-751399b0]{width:12px;height:16px}.icon--drag[data-v-751399b0],.icon--drag svg[data-v-751399b0]{width:8px;height:17px}.icon--dropdown_default[data-v-751399b0],.icon--dropdown_default svg[data-v-751399b0]{width:9px;height:5px}.icon--dropdown_module[data-v-751399b0],.icon--dropdown_module svg[data-v-751399b0]{width:10px;height:6px}.icon--edit[data-v-751399b0],.icon--edit svg[data-v-751399b0]{width:13px;height:13px}.icon--edit_large[data-v-751399b0],.icon--edit_large svg[data-v-751399b0]{width:14px;height:14px}.icon--editor[data-v-751399b0],.icon--editor svg[data-v-751399b0]{width:14px;height:13px}.icon--expand[data-v-751399b0],.icon--expand svg[data-v-751399b0]{width:10px;height:10px}.icon--fix-grid[data-v-751399b0],.icon--fix-grid svg[data-v-751399b0]{width:18px;height:14px}.icon--flex-grid[data-v-751399b0],.icon--flex-grid svg[data-v-751399b0]{width:18px;height:17px}.icon--google-sign-in[data-v-751399b0],.icon--google-sign-in svg[data-v-751399b0]{width:23px;height:24px}.icon--image-text[data-v-751399b0],.icon--image-text svg[data-v-751399b0]{width:30px;height:13px}.icon--image[data-v-751399b0],.icon--image svg[data-v-751399b0]{width:19px;height:15px}.icon--info[data-v-751399b0],.icon--info svg[data-v-751399b0]{width:21px;height:21px}.icon--location[data-v-751399b0],.icon--location svg[data-v-751399b0]{width:12px;height:16px}.icon--media-grid[data-v-751399b0],.icon--media-grid svg[data-v-751399b0]{width:12px;height:12px}.icon--media-list[data-v-751399b0],.icon--media-list svg[data-v-751399b0]{width:16px;height:10px}.icon--more-dots[data-v-751399b0],.icon--more-dots svg[data-v-751399b0]{width:14px;height:4px}.icon--pagination_left[data-v-751399b0],.icon--pagination_left svg[data-v-751399b0],.icon--pagination_right[data-v-751399b0],.icon--pagination_right svg[data-v-751399b0]{width:9px;height:15px}.icon--preferences[data-v-751399b0],.icon--preferences svg[data-v-751399b0]{width:26px;height:16px}.icon--preview-desktop[data-v-751399b0],.icon--preview-desktop svg[data-v-751399b0]{width:39px;height:30px}.icon--preview-mobile[data-v-751399b0],.icon--preview-mobile svg[data-v-751399b0]{width:12px;height:18px}.icon--preview-tablet-h[data-v-751399b0],.icon--preview-tablet-h svg[data-v-751399b0]{width:27px;height:20px}.icon--preview-tablet-v[data-v-751399b0],.icon--preview-tablet-v svg[data-v-751399b0]{width:20px;height:27px}.icon--preview[data-v-751399b0],.icon--preview svg[data-v-751399b0]{width:22px;height:14px}.icon--publish[data-v-751399b0],.icon--publish svg[data-v-751399b0]{width:22px;height:15px}.icon--quote[data-v-751399b0],.icon--quote svg[data-v-751399b0]{width:16px;height:13px}.icon--revision-compare[data-v-751399b0],.icon--revision-compare svg[data-v-751399b0],.icon--revision-single[data-v-751399b0],.icon--revision-single svg[data-v-751399b0]{width:23px;height:16px}.icon--search[data-v-751399b0],.icon--search svg[data-v-751399b0]{width:20px;height:20px}.icon--slideshow[data-v-751399b0],.icon--slideshow svg[data-v-751399b0]{width:20px;height:16px}.icon--star-feature[data-v-751399b0],.icon--star-feature_active[data-v-751399b0],.icon--star-feature_active svg[data-v-751399b0],.icon--star-feature svg[data-v-751399b0]{width:20px;height:19px}.icon--text-2col[data-v-751399b0],.icon--text-2col svg[data-v-751399b0]{width:26px;height:13px}.icon--text[data-v-751399b0],.icon--text svg[data-v-751399b0]{width:17px;height:13px}.icon--trash[data-v-751399b0],.icon--trash svg[data-v-751399b0]{width:15px;height:17px}.icon--video[data-v-751399b0],.icon--video svg[data-v-751399b0]{width:23px;height:23px}.icon--website[data-v-751399b0],.icon--website svg[data-v-751399b0]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-751399b0],.icon--wysiwyg_anchor svg[data-v-751399b0]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-751399b0],.icon--wysiwyg_bold svg[data-v-751399b0]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-751399b0],.icon--wysiwyg_header-2[data-v-751399b0],.icon--wysiwyg_header-3 svg[data-v-751399b0],.icon--wysiwyg_header-3[data-v-751399b0],.icon--wysiwyg_header-4 svg[data-v-751399b0],.icon--wysiwyg_header-4[data-v-751399b0],.icon--wysiwyg_header-5 svg[data-v-751399b0],.icon--wysiwyg_header-5[data-v-751399b0],.icon--wysiwyg_header-6 svg[data-v-751399b0],.icon--wysiwyg_header-6[data-v-751399b0],.icon--wysiwyg_header[data-v-751399b0],.icon--wysiwyg_header svg[data-v-751399b0]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-751399b0],.icon--wysiwyg_italic svg[data-v-751399b0]{width:10px;height:13px}.icon--wysiwyg_link[data-v-751399b0],.icon--wysiwyg_link svg[data-v-751399b0]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-751399b0],.icon--wysiwyg_underline svg[data-v-751399b0]{width:12px;height:13px}.icon--ae[data-v-751399b0],.icon--ae svg[data-v-751399b0],.icon--ai[data-v-751399b0],.icon--ai svg[data-v-751399b0],.icon--ase[data-v-751399b0],.icon--ase svg[data-v-751399b0]{width:20px;height:26px}.icon--cut[data-v-751399b0],.icon--cut svg[data-v-751399b0],.icon--dir[data-v-751399b0],.icon--dir_protected[data-v-751399b0],.icon--dir_protected svg[data-v-751399b0],.icon--dir_shared[data-v-751399b0],.icon--dir_shared svg[data-v-751399b0],.icon--dir svg[data-v-751399b0]{width:26px;height:21px}.icon--dmg[data-v-751399b0],.icon--dmg svg[data-v-751399b0],.icon--doc[data-v-751399b0],.icon--doc svg[data-v-751399b0],.icon--eps[data-v-751399b0],.icon--eps svg[data-v-751399b0],.icon--fla[data-v-751399b0],.icon--fla svg[data-v-751399b0],.icon--fnt[data-v-751399b0],.icon--fnt svg[data-v-751399b0],.icon--gen[data-v-751399b0],.icon--gen svg[data-v-751399b0],.icon--html[data-v-751399b0],.icon--html svg[data-v-751399b0],.icon--img[data-v-751399b0],.icon--img svg[data-v-751399b0],.icon--indd[data-v-751399b0],.icon--indd svg[data-v-751399b0],.icon--key[data-v-751399b0],.icon--key svg[data-v-751399b0],.icon--merlin[data-v-751399b0],.icon--merlin svg[data-v-751399b0]{width:20px;height:26px}.icon--net[data-v-751399b0],.icon--net svg[data-v-751399b0]{width:26px;height:21px}.icon--numbers[data-v-751399b0],.icon--numbers svg[data-v-751399b0],.icon--pages[data-v-751399b0],.icon--pages svg[data-v-751399b0],.icon--pdf[data-v-751399b0],.icon--pdf svg[data-v-751399b0],.icon--ppt[data-v-751399b0],.icon--ppt svg[data-v-751399b0],.icon--psd[data-v-751399b0],.icon--psd svg[data-v-751399b0]{width:20px;height:26px}.icon--site[data-v-751399b0],.icon--site svg[data-v-751399b0]{width:26px;height:21px}.icon--slide[data-v-751399b0],.icon--slide svg[data-v-751399b0],.icon--snd[data-v-751399b0],.icon--snd svg[data-v-751399b0],.icon--sql[data-v-751399b0],.icon--sql svg[data-v-751399b0],.icon--swf[data-v-751399b0],.icon--swf svg[data-v-751399b0],.icon--txt[data-v-751399b0],.icon--txt svg[data-v-751399b0],.icon--vid[data-v-751399b0],.icon--vid svg[data-v-751399b0],.icon--xls[data-v-751399b0],.icon--xls svg[data-v-751399b0],.icon--zip[data-v-751399b0],.icon--zip svg[data-v-751399b0]{width:20px;height:26px}.container[data-v-751399b0]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-751399b0]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-751399b0]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-751399b0]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-751399b0]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-751399b0]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-751399b0]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-751399b0]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-751399b0]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-751399b0]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-751399b0]{width:auto}}.block__content[data-v-751399b0]{display:none;padding:35px 15px;background:#fff}.block--open>.block__content[data-v-751399b0]{display:block}.block--open>.block__header[data-v-751399b0]{border-bottom:1px solid #f2f2f2}.block__header[data-v-751399b0]{height:50px;line-height:50px;background:#f4f9fd;padding:0 15px;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;background-clip:padding-box}.block__handle[data-v-751399b0]{position:absolute;height:10px;width:40px;left:50%;top:50%;margin-left:-20px;margin-top:-5px;cursor:move;background:repeating-linear-gradient(180deg,#bfbfbf,#bfbfbf 2px,transparent 0,transparent 4px)}.block__handle[data-v-751399b0]:before{position:absolute;display:block;content:"";background:repeating-linear-gradient(90deg,#f4f9fd,#f4f9fd 2px,transparent 0,transparent 4px);width:100%;height:100%}.block__counter[data-v-751399b0]{border:1px solid #e5e5e5;border-radius:50%;height:26px;width:26px;text-align:center;display:inline-block;line-height:25px;margin-right:10px;background:#fff;color:#8c8c8c;-webkit-font-feature-settings:"kern";font-feature-settings:"kern";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;margin-top:12px}.dropdown .block__counter[data-v-751399b0]{cursor:pointer}.dropdown--active .block__counter[data-v-751399b0],.dropdown .block__counter[data-v-751399b0]:hover{color:#262626;border-color:#262626}.block__title[data-v-751399b0]{font-weight:600;height:50px;line-height:50px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.block__toggle[data-v-751399b0]{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.block__toggle .dropdown[data-v-751399b0]{display:inline-block}.block__actions[data-v-751399b0]{text-align:right;font-size:0;padding-top:12px;padding-bottom:12px}.block__actions>[data-v-751399b0]{margin-left:10px;font-size:15px}.block__actions .dropdown>button[data-v-751399b0],.block__actions .dropdown[data-v-751399b0],.block__actions>button[data-v-751399b0]{display:inline-block;vertical-align:top;height:26px}.block__actions button[data-action][data-v-751399b0]{display:none}.block__actions .dropdown--active button[data-action][data-v-751399b0]{display:inline-block}.block__header[data-v-751399b0]:hover{background:#eaf4fa}.block__header:hover .block__handle[data-v-751399b0]:before{background:repeating-linear-gradient(90deg,#eaf4fa,#eaf4fa 2px,transparent 0,transparent 4px)}.block--focus .block__header button[data-action][data-v-751399b0],.block__header:hover button[data-action][data-v-751399b0]{display:inline-block}.block__content>.browserField[data-v-751399b0],.block__content>.media[data-v-751399b0],.block__content>.slideshow[data-v-751399b0]{margin:-35px;border:0 none}.block--small .block__header[data-v-751399b0]{background:#fbfbfb}.block--small .block__header .block__handle[data-v-751399b0]{background:repeating-linear-gradient(180deg,#bfbfbf,#bfbfbf 2px,transparent 0,transparent 4px)}.block--small .block__header .block__handle[data-v-751399b0]:before{background:repeating-linear-gradient(90deg,#fbfbfb,#fbfbfb 2px,transparent 0,transparent 4px)}.block--small .block__header[data-v-751399b0]:hover{background:#f2f2f2}.block--small .block__header:hover .block__handle[data-v-751399b0]:before{background:repeating-linear-gradient(90deg,#f2f2f2,#f2f2f2 2px,transparent 0,transparent 4px)}.block--small .block__counter[data-v-751399b0]{display:none}.block .block__content .block__body>.browserField,.block .block__content .block__body>.media,.block .block__content .block__body>.slideshow{margin-left:-15px;margin-right:-15px;border:0 none}.block .block__content .block__body>.browserField:last-child,.block .block__content .block__body>.media:last-child,.block .block__content .block__body>.slideshow:last-child{margin-bottom:-15px}.icon--add[data-v-4165f148],.icon--add svg[data-v-4165f148]{width:10px;height:10px}.icon--arrow-external[data-v-4165f148],.icon--arrow-external svg[data-v-4165f148]{width:8px;height:8px}.icon--arrow-sort[data-v-4165f148],.icon--arrow-sort svg[data-v-4165f148]{width:9px;height:11px}.icon--check[data-v-4165f148],.icon--check svg[data-v-4165f148]{width:11px;height:11px}.icon--close_icon[data-v-4165f148],.icon--close_icon svg[data-v-4165f148]{width:10px;height:10px}.icon--close_modal[data-v-4165f148],.icon--close_modal svg[data-v-4165f148]{width:16px;height:16px}.icon--colors[data-v-4165f148],.icon--colors svg[data-v-4165f148]{width:17px;height:17px}.icon--content-editor[data-v-4165f148],.icon--content-editor svg[data-v-4165f148]{width:14px;height:13px}.icon--crop[data-v-4165f148],.icon--crop svg[data-v-4165f148]{width:16px;height:18px}.icon--download[data-v-4165f148],.icon--download svg[data-v-4165f148]{width:12px;height:16px}.icon--drag[data-v-4165f148],.icon--drag svg[data-v-4165f148]{width:8px;height:17px}.icon--dropdown_default[data-v-4165f148],.icon--dropdown_default svg[data-v-4165f148]{width:9px;height:5px}.icon--dropdown_module[data-v-4165f148],.icon--dropdown_module svg[data-v-4165f148]{width:10px;height:6px}.icon--edit[data-v-4165f148],.icon--edit svg[data-v-4165f148]{width:13px;height:13px}.icon--edit_large[data-v-4165f148],.icon--edit_large svg[data-v-4165f148]{width:14px;height:14px}.icon--editor[data-v-4165f148],.icon--editor svg[data-v-4165f148]{width:14px;height:13px}.icon--expand[data-v-4165f148],.icon--expand svg[data-v-4165f148]{width:10px;height:10px}.icon--fix-grid[data-v-4165f148],.icon--fix-grid svg[data-v-4165f148]{width:18px;height:14px}.icon--flex-grid[data-v-4165f148],.icon--flex-grid svg[data-v-4165f148]{width:18px;height:17px}.icon--google-sign-in[data-v-4165f148],.icon--google-sign-in svg[data-v-4165f148]{width:23px;height:24px}.icon--image-text[data-v-4165f148],.icon--image-text svg[data-v-4165f148]{width:30px;height:13px}.icon--image[data-v-4165f148],.icon--image svg[data-v-4165f148]{width:19px;height:15px}.icon--info[data-v-4165f148],.icon--info svg[data-v-4165f148]{width:21px;height:21px}.icon--location[data-v-4165f148],.icon--location svg[data-v-4165f148]{width:12px;height:16px}.icon--media-grid[data-v-4165f148],.icon--media-grid svg[data-v-4165f148]{width:12px;height:12px}.icon--media-list[data-v-4165f148],.icon--media-list svg[data-v-4165f148]{width:16px;height:10px}.icon--more-dots[data-v-4165f148],.icon--more-dots svg[data-v-4165f148]{width:14px;height:4px}.icon--pagination_left[data-v-4165f148],.icon--pagination_left svg[data-v-4165f148],.icon--pagination_right[data-v-4165f148],.icon--pagination_right svg[data-v-4165f148]{width:9px;height:15px}.icon--preferences[data-v-4165f148],.icon--preferences svg[data-v-4165f148]{width:26px;height:16px}.icon--preview-desktop[data-v-4165f148],.icon--preview-desktop svg[data-v-4165f148]{width:39px;height:30px}.icon--preview-mobile[data-v-4165f148],.icon--preview-mobile svg[data-v-4165f148]{width:12px;height:18px}.icon--preview-tablet-h[data-v-4165f148],.icon--preview-tablet-h svg[data-v-4165f148]{width:27px;height:20px}.icon--preview-tablet-v[data-v-4165f148],.icon--preview-tablet-v svg[data-v-4165f148]{width:20px;height:27px}.icon--preview[data-v-4165f148],.icon--preview svg[data-v-4165f148]{width:22px;height:14px}.icon--publish[data-v-4165f148],.icon--publish svg[data-v-4165f148]{width:22px;height:15px}.icon--quote[data-v-4165f148],.icon--quote svg[data-v-4165f148]{width:16px;height:13px}.icon--revision-compare[data-v-4165f148],.icon--revision-compare svg[data-v-4165f148],.icon--revision-single[data-v-4165f148],.icon--revision-single svg[data-v-4165f148]{width:23px;height:16px}.icon--search[data-v-4165f148],.icon--search svg[data-v-4165f148]{width:20px;height:20px}.icon--slideshow[data-v-4165f148],.icon--slideshow svg[data-v-4165f148]{width:20px;height:16px}.icon--star-feature[data-v-4165f148],.icon--star-feature_active[data-v-4165f148],.icon--star-feature_active svg[data-v-4165f148],.icon--star-feature svg[data-v-4165f148]{width:20px;height:19px}.icon--text-2col[data-v-4165f148],.icon--text-2col svg[data-v-4165f148]{width:26px;height:13px}.icon--text[data-v-4165f148],.icon--text svg[data-v-4165f148]{width:17px;height:13px}.icon--trash[data-v-4165f148],.icon--trash svg[data-v-4165f148]{width:15px;height:17px}.icon--video[data-v-4165f148],.icon--video svg[data-v-4165f148]{width:23px;height:23px}.icon--website[data-v-4165f148],.icon--website svg[data-v-4165f148]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-4165f148],.icon--wysiwyg_anchor svg[data-v-4165f148]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-4165f148],.icon--wysiwyg_bold svg[data-v-4165f148]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-4165f148],.icon--wysiwyg_header-2[data-v-4165f148],.icon--wysiwyg_header-3 svg[data-v-4165f148],.icon--wysiwyg_header-3[data-v-4165f148],.icon--wysiwyg_header-4 svg[data-v-4165f148],.icon--wysiwyg_header-4[data-v-4165f148],.icon--wysiwyg_header-5 svg[data-v-4165f148],.icon--wysiwyg_header-5[data-v-4165f148],.icon--wysiwyg_header-6 svg[data-v-4165f148],.icon--wysiwyg_header-6[data-v-4165f148],.icon--wysiwyg_header[data-v-4165f148],.icon--wysiwyg_header svg[data-v-4165f148]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-4165f148],.icon--wysiwyg_italic svg[data-v-4165f148]{width:10px;height:13px}.icon--wysiwyg_link[data-v-4165f148],.icon--wysiwyg_link svg[data-v-4165f148]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-4165f148],.icon--wysiwyg_underline svg[data-v-4165f148]{width:12px;height:13px}.icon--ae[data-v-4165f148],.icon--ae svg[data-v-4165f148],.icon--ai[data-v-4165f148],.icon--ai svg[data-v-4165f148],.icon--ase[data-v-4165f148],.icon--ase svg[data-v-4165f148]{width:20px;height:26px}.icon--cut[data-v-4165f148],.icon--cut svg[data-v-4165f148],.icon--dir[data-v-4165f148],.icon--dir_protected[data-v-4165f148],.icon--dir_protected svg[data-v-4165f148],.icon--dir_shared[data-v-4165f148],.icon--dir_shared svg[data-v-4165f148],.icon--dir svg[data-v-4165f148]{width:26px;height:21px}.icon--dmg[data-v-4165f148],.icon--dmg svg[data-v-4165f148],.icon--doc[data-v-4165f148],.icon--doc svg[data-v-4165f148],.icon--eps[data-v-4165f148],.icon--eps svg[data-v-4165f148],.icon--fla[data-v-4165f148],.icon--fla svg[data-v-4165f148],.icon--fnt[data-v-4165f148],.icon--fnt svg[data-v-4165f148],.icon--gen[data-v-4165f148],.icon--gen svg[data-v-4165f148],.icon--html[data-v-4165f148],.icon--html svg[data-v-4165f148],.icon--img[data-v-4165f148],.icon--img svg[data-v-4165f148],.icon--indd[data-v-4165f148],.icon--indd svg[data-v-4165f148],.icon--key[data-v-4165f148],.icon--key svg[data-v-4165f148],.icon--merlin[data-v-4165f148],.icon--merlin svg[data-v-4165f148]{width:20px;height:26px}.icon--net[data-v-4165f148],.icon--net svg[data-v-4165f148]{width:26px;height:21px}.icon--numbers[data-v-4165f148],.icon--numbers svg[data-v-4165f148],.icon--pages[data-v-4165f148],.icon--pages svg[data-v-4165f148],.icon--pdf[data-v-4165f148],.icon--pdf svg[data-v-4165f148],.icon--ppt[data-v-4165f148],.icon--ppt svg[data-v-4165f148],.icon--psd[data-v-4165f148],.icon--psd svg[data-v-4165f148]{width:20px;height:26px}.icon--site[data-v-4165f148],.icon--site svg[data-v-4165f148]{width:26px;height:21px}.icon--slide[data-v-4165f148],.icon--slide svg[data-v-4165f148],.icon--snd[data-v-4165f148],.icon--snd svg[data-v-4165f148],.icon--sql[data-v-4165f148],.icon--sql svg[data-v-4165f148],.icon--swf[data-v-4165f148],.icon--swf svg[data-v-4165f148],.icon--txt[data-v-4165f148],.icon--txt svg[data-v-4165f148],.icon--vid[data-v-4165f148],.icon--vid svg[data-v-4165f148],.icon--xls[data-v-4165f148],.icon--xls svg[data-v-4165f148],.icon--zip[data-v-4165f148],.icon--zip svg[data-v-4165f148]{width:20px;height:26px}.container[data-v-4165f148]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-4165f148]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-4165f148]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-4165f148]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-4165f148]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-4165f148]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-4165f148]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-4165f148]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-4165f148]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-4165f148]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-4165f148]{width:auto}}.content[data-v-4165f148]{margin-top:20px}.content__container[data-v-4165f148]{margin-bottom:20px}.content__container+.dropdown[data-v-4165f148]{display:inline-block}.content__actions[data-v-4165f148]{display:-webkit-box;display:-ms-flexbox;display:flex}.content__secondaryActions[data-v-4165f148]{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;text-align:right;margin-left:20px;padding-top:8px}.content__item[data-v-4165f148]{border:1px solid #e5e5e5;border-top:0 none}.content__item.sortable-ghost[data-v-4165f148]{opacity:.5}.content__actions button .content__icon[data-v-4165f148]{margin-right:0;margin-left:-15px;min-width:55px;text-align:center;height:40px}.content__item[data-v-4165f148]:first-child{border-top:1px solid #e5e5e5}.icon--add[data-v-f570ad32],.icon--add svg[data-v-f570ad32]{width:10px;height:10px}.icon--arrow-external[data-v-f570ad32],.icon--arrow-external svg[data-v-f570ad32]{width:8px;height:8px}.icon--arrow-sort[data-v-f570ad32],.icon--arrow-sort svg[data-v-f570ad32]{width:9px;height:11px}.icon--check[data-v-f570ad32],.icon--check svg[data-v-f570ad32]{width:11px;height:11px}.icon--close_icon[data-v-f570ad32],.icon--close_icon svg[data-v-f570ad32]{width:10px;height:10px}.icon--close_modal[data-v-f570ad32],.icon--close_modal svg[data-v-f570ad32]{width:16px;height:16px}.icon--colors[data-v-f570ad32],.icon--colors svg[data-v-f570ad32]{width:17px;height:17px}.icon--content-editor[data-v-f570ad32],.icon--content-editor svg[data-v-f570ad32]{width:14px;height:13px}.icon--crop[data-v-f570ad32],.icon--crop svg[data-v-f570ad32]{width:16px;height:18px}.icon--download[data-v-f570ad32],.icon--download svg[data-v-f570ad32]{width:12px;height:16px}.icon--drag[data-v-f570ad32],.icon--drag svg[data-v-f570ad32]{width:8px;height:17px}.icon--dropdown_default[data-v-f570ad32],.icon--dropdown_default svg[data-v-f570ad32]{width:9px;height:5px}.icon--dropdown_module[data-v-f570ad32],.icon--dropdown_module svg[data-v-f570ad32]{width:10px;height:6px}.icon--edit[data-v-f570ad32],.icon--edit svg[data-v-f570ad32]{width:13px;height:13px}.icon--edit_large[data-v-f570ad32],.icon--edit_large svg[data-v-f570ad32]{width:14px;height:14px}.icon--editor[data-v-f570ad32],.icon--editor svg[data-v-f570ad32]{width:14px;height:13px}.icon--expand[data-v-f570ad32],.icon--expand svg[data-v-f570ad32]{width:10px;height:10px}.icon--fix-grid[data-v-f570ad32],.icon--fix-grid svg[data-v-f570ad32]{width:18px;height:14px}.icon--flex-grid[data-v-f570ad32],.icon--flex-grid svg[data-v-f570ad32]{width:18px;height:17px}.icon--google-sign-in[data-v-f570ad32],.icon--google-sign-in svg[data-v-f570ad32]{width:23px;height:24px}.icon--image-text[data-v-f570ad32],.icon--image-text svg[data-v-f570ad32]{width:30px;height:13px}.icon--image[data-v-f570ad32],.icon--image svg[data-v-f570ad32]{width:19px;height:15px}.icon--info[data-v-f570ad32],.icon--info svg[data-v-f570ad32]{width:21px;height:21px}.icon--location[data-v-f570ad32],.icon--location svg[data-v-f570ad32]{width:12px;height:16px}.icon--media-grid[data-v-f570ad32],.icon--media-grid svg[data-v-f570ad32]{width:12px;height:12px}.icon--media-list[data-v-f570ad32],.icon--media-list svg[data-v-f570ad32]{width:16px;height:10px}.icon--more-dots[data-v-f570ad32],.icon--more-dots svg[data-v-f570ad32]{width:14px;height:4px}.icon--pagination_left[data-v-f570ad32],.icon--pagination_left svg[data-v-f570ad32],.icon--pagination_right[data-v-f570ad32],.icon--pagination_right svg[data-v-f570ad32]{width:9px;height:15px}.icon--preferences[data-v-f570ad32],.icon--preferences svg[data-v-f570ad32]{width:26px;height:16px}.icon--preview-desktop[data-v-f570ad32],.icon--preview-desktop svg[data-v-f570ad32]{width:39px;height:30px}.icon--preview-mobile[data-v-f570ad32],.icon--preview-mobile svg[data-v-f570ad32]{width:12px;height:18px}.icon--preview-tablet-h[data-v-f570ad32],.icon--preview-tablet-h svg[data-v-f570ad32]{width:27px;height:20px}.icon--preview-tablet-v[data-v-f570ad32],.icon--preview-tablet-v svg[data-v-f570ad32]{width:20px;height:27px}.icon--preview[data-v-f570ad32],.icon--preview svg[data-v-f570ad32]{width:22px;height:14px}.icon--publish[data-v-f570ad32],.icon--publish svg[data-v-f570ad32]{width:22px;height:15px}.icon--quote[data-v-f570ad32],.icon--quote svg[data-v-f570ad32]{width:16px;height:13px}.icon--revision-compare[data-v-f570ad32],.icon--revision-compare svg[data-v-f570ad32],.icon--revision-single[data-v-f570ad32],.icon--revision-single svg[data-v-f570ad32]{width:23px;height:16px}.icon--search[data-v-f570ad32],.icon--search svg[data-v-f570ad32]{width:20px;height:20px}.icon--slideshow[data-v-f570ad32],.icon--slideshow svg[data-v-f570ad32]{width:20px;height:16px}.icon--star-feature[data-v-f570ad32],.icon--star-feature_active[data-v-f570ad32],.icon--star-feature_active svg[data-v-f570ad32],.icon--star-feature svg[data-v-f570ad32]{width:20px;height:19px}.icon--text-2col[data-v-f570ad32],.icon--text-2col svg[data-v-f570ad32]{width:26px;height:13px}.icon--text[data-v-f570ad32],.icon--text svg[data-v-f570ad32]{width:17px;height:13px}.icon--trash[data-v-f570ad32],.icon--trash svg[data-v-f570ad32]{width:15px;height:17px}.icon--video[data-v-f570ad32],.icon--video svg[data-v-f570ad32]{width:23px;height:23px}.icon--website[data-v-f570ad32],.icon--website svg[data-v-f570ad32]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-f570ad32],.icon--wysiwyg_anchor svg[data-v-f570ad32]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-f570ad32],.icon--wysiwyg_bold svg[data-v-f570ad32]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-f570ad32],.icon--wysiwyg_header-2[data-v-f570ad32],.icon--wysiwyg_header-3 svg[data-v-f570ad32],.icon--wysiwyg_header-3[data-v-f570ad32],.icon--wysiwyg_header-4 svg[data-v-f570ad32],.icon--wysiwyg_header-4[data-v-f570ad32],.icon--wysiwyg_header-5 svg[data-v-f570ad32],.icon--wysiwyg_header-5[data-v-f570ad32],.icon--wysiwyg_header-6 svg[data-v-f570ad32],.icon--wysiwyg_header-6[data-v-f570ad32],.icon--wysiwyg_header[data-v-f570ad32],.icon--wysiwyg_header svg[data-v-f570ad32]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-f570ad32],.icon--wysiwyg_italic svg[data-v-f570ad32]{width:10px;height:13px}.icon--wysiwyg_link[data-v-f570ad32],.icon--wysiwyg_link svg[data-v-f570ad32]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-f570ad32],.icon--wysiwyg_underline svg[data-v-f570ad32]{width:12px;height:13px}.icon--ae[data-v-f570ad32],.icon--ae svg[data-v-f570ad32],.icon--ai[data-v-f570ad32],.icon--ai svg[data-v-f570ad32],.icon--ase[data-v-f570ad32],.icon--ase svg[data-v-f570ad32]{width:20px;height:26px}.icon--cut[data-v-f570ad32],.icon--cut svg[data-v-f570ad32],.icon--dir[data-v-f570ad32],.icon--dir_protected[data-v-f570ad32],.icon--dir_protected svg[data-v-f570ad32],.icon--dir_shared[data-v-f570ad32],.icon--dir_shared svg[data-v-f570ad32],.icon--dir svg[data-v-f570ad32]{width:26px;height:21px}.icon--dmg[data-v-f570ad32],.icon--dmg svg[data-v-f570ad32],.icon--doc[data-v-f570ad32],.icon--doc svg[data-v-f570ad32],.icon--eps[data-v-f570ad32],.icon--eps svg[data-v-f570ad32],.icon--fla[data-v-f570ad32],.icon--fla svg[data-v-f570ad32],.icon--fnt[data-v-f570ad32],.icon--fnt svg[data-v-f570ad32],.icon--gen[data-v-f570ad32],.icon--gen svg[data-v-f570ad32],.icon--html[data-v-f570ad32],.icon--html svg[data-v-f570ad32],.icon--img[data-v-f570ad32],.icon--img svg[data-v-f570ad32],.icon--indd[data-v-f570ad32],.icon--indd svg[data-v-f570ad32],.icon--key[data-v-f570ad32],.icon--key svg[data-v-f570ad32],.icon--merlin[data-v-f570ad32],.icon--merlin svg[data-v-f570ad32]{width:20px;height:26px}.icon--net[data-v-f570ad32],.icon--net svg[data-v-f570ad32]{width:26px;height:21px}.icon--numbers[data-v-f570ad32],.icon--numbers svg[data-v-f570ad32],.icon--pages[data-v-f570ad32],.icon--pages svg[data-v-f570ad32],.icon--pdf[data-v-f570ad32],.icon--pdf svg[data-v-f570ad32],.icon--ppt[data-v-f570ad32],.icon--ppt svg[data-v-f570ad32],.icon--psd[data-v-f570ad32],.icon--psd svg[data-v-f570ad32]{width:20px;height:26px}.icon--site[data-v-f570ad32],.icon--site svg[data-v-f570ad32]{width:26px;height:21px}.icon--slide[data-v-f570ad32],.icon--slide svg[data-v-f570ad32],.icon--snd[data-v-f570ad32],.icon--snd svg[data-v-f570ad32],.icon--sql[data-v-f570ad32],.icon--sql svg[data-v-f570ad32],.icon--swf[data-v-f570ad32],.icon--swf svg[data-v-f570ad32],.icon--txt[data-v-f570ad32],.icon--txt svg[data-v-f570ad32],.icon--vid[data-v-f570ad32],.icon--vid svg[data-v-f570ad32],.icon--xls[data-v-f570ad32],.icon--xls svg[data-v-f570ad32],.icon--zip[data-v-f570ad32],.icon--zip svg[data-v-f570ad32]{width:20px;height:26px}.container[data-v-f570ad32]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-f570ad32]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-f570ad32]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-f570ad32]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-f570ad32]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-f570ad32]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-f570ad32]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-f570ad32]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-f570ad32]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-f570ad32]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-f570ad32]{width:auto}}.content[data-v-f570ad32]{margin-top:20px}.content__content[data-v-f570ad32]{margin-bottom:20px}.content__content+.dropdown[data-v-f570ad32]{display:inline-block}.content__item[data-v-f570ad32]{border:1px solid #e5e5e5;border-top:0 none}.content__item.sortable-ghost[data-v-f570ad32]{opacity:.5}.content__item[data-v-f570ad32]:first-child{border-top:1px solid #e5e5e5}.content__trigger[data-v-f570ad32]{display:-webkit-box;display:-ms-flexbox;display:flex}.content__button[data-v-f570ad32]{display:block;width:100%;text-align:center;margin-top:-5px}.content__note[data-v-f570ad32]{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;text-align:right}.icon--add[data-v-e145ff86],.icon--add svg[data-v-e145ff86]{width:10px;height:10px}.icon--arrow-external[data-v-e145ff86],.icon--arrow-external svg[data-v-e145ff86]{width:8px;height:8px}.icon--arrow-sort[data-v-e145ff86],.icon--arrow-sort svg[data-v-e145ff86]{width:9px;height:11px}.icon--check[data-v-e145ff86],.icon--check svg[data-v-e145ff86]{width:11px;height:11px}.icon--close_icon[data-v-e145ff86],.icon--close_icon svg[data-v-e145ff86]{width:10px;height:10px}.icon--close_modal[data-v-e145ff86],.icon--close_modal svg[data-v-e145ff86]{width:16px;height:16px}.icon--colors[data-v-e145ff86],.icon--colors svg[data-v-e145ff86]{width:17px;height:17px}.icon--content-editor[data-v-e145ff86],.icon--content-editor svg[data-v-e145ff86]{width:14px;height:13px}.icon--crop[data-v-e145ff86],.icon--crop svg[data-v-e145ff86]{width:16px;height:18px}.icon--download[data-v-e145ff86],.icon--download svg[data-v-e145ff86]{width:12px;height:16px}.icon--drag[data-v-e145ff86],.icon--drag svg[data-v-e145ff86]{width:8px;height:17px}.icon--dropdown_default[data-v-e145ff86],.icon--dropdown_default svg[data-v-e145ff86]{width:9px;height:5px}.icon--dropdown_module[data-v-e145ff86],.icon--dropdown_module svg[data-v-e145ff86]{width:10px;height:6px}.icon--edit[data-v-e145ff86],.icon--edit svg[data-v-e145ff86]{width:13px;height:13px}.icon--edit_large[data-v-e145ff86],.icon--edit_large svg[data-v-e145ff86]{width:14px;height:14px}.icon--editor[data-v-e145ff86],.icon--editor svg[data-v-e145ff86]{width:14px;height:13px}.icon--expand[data-v-e145ff86],.icon--expand svg[data-v-e145ff86]{width:10px;height:10px}.icon--fix-grid[data-v-e145ff86],.icon--fix-grid svg[data-v-e145ff86]{width:18px;height:14px}.icon--flex-grid[data-v-e145ff86],.icon--flex-grid svg[data-v-e145ff86]{width:18px;height:17px}.icon--google-sign-in[data-v-e145ff86],.icon--google-sign-in svg[data-v-e145ff86]{width:23px;height:24px}.icon--image-text[data-v-e145ff86],.icon--image-text svg[data-v-e145ff86]{width:30px;height:13px}.icon--image[data-v-e145ff86],.icon--image svg[data-v-e145ff86]{width:19px;height:15px}.icon--info[data-v-e145ff86],.icon--info svg[data-v-e145ff86]{width:21px;height:21px}.icon--location[data-v-e145ff86],.icon--location svg[data-v-e145ff86]{width:12px;height:16px}.icon--media-grid[data-v-e145ff86],.icon--media-grid svg[data-v-e145ff86]{width:12px;height:12px}.icon--media-list[data-v-e145ff86],.icon--media-list svg[data-v-e145ff86]{width:16px;height:10px}.icon--more-dots[data-v-e145ff86],.icon--more-dots svg[data-v-e145ff86]{width:14px;height:4px}.icon--pagination_left[data-v-e145ff86],.icon--pagination_left svg[data-v-e145ff86],.icon--pagination_right[data-v-e145ff86],.icon--pagination_right svg[data-v-e145ff86]{width:9px;height:15px}.icon--preferences[data-v-e145ff86],.icon--preferences svg[data-v-e145ff86]{width:26px;height:16px}.icon--preview-desktop[data-v-e145ff86],.icon--preview-desktop svg[data-v-e145ff86]{width:39px;height:30px}.icon--preview-mobile[data-v-e145ff86],.icon--preview-mobile svg[data-v-e145ff86]{width:12px;height:18px}.icon--preview-tablet-h[data-v-e145ff86],.icon--preview-tablet-h svg[data-v-e145ff86]{width:27px;height:20px}.icon--preview-tablet-v[data-v-e145ff86],.icon--preview-tablet-v svg[data-v-e145ff86]{width:20px;height:27px}.icon--preview[data-v-e145ff86],.icon--preview svg[data-v-e145ff86]{width:22px;height:14px}.icon--publish[data-v-e145ff86],.icon--publish svg[data-v-e145ff86]{width:22px;height:15px}.icon--quote[data-v-e145ff86],.icon--quote svg[data-v-e145ff86]{width:16px;height:13px}.icon--revision-compare[data-v-e145ff86],.icon--revision-compare svg[data-v-e145ff86],.icon--revision-single[data-v-e145ff86],.icon--revision-single svg[data-v-e145ff86]{width:23px;height:16px}.icon--search[data-v-e145ff86],.icon--search svg[data-v-e145ff86]{width:20px;height:20px}.icon--slideshow[data-v-e145ff86],.icon--slideshow svg[data-v-e145ff86]{width:20px;height:16px}.icon--star-feature[data-v-e145ff86],.icon--star-feature_active[data-v-e145ff86],.icon--star-feature_active svg[data-v-e145ff86],.icon--star-feature svg[data-v-e145ff86]{width:20px;height:19px}.icon--text-2col[data-v-e145ff86],.icon--text-2col svg[data-v-e145ff86]{width:26px;height:13px}.icon--text[data-v-e145ff86],.icon--text svg[data-v-e145ff86]{width:17px;height:13px}.icon--trash[data-v-e145ff86],.icon--trash svg[data-v-e145ff86]{width:15px;height:17px}.icon--video[data-v-e145ff86],.icon--video svg[data-v-e145ff86]{width:23px;height:23px}.icon--website[data-v-e145ff86],.icon--website svg[data-v-e145ff86]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-e145ff86],.icon--wysiwyg_anchor svg[data-v-e145ff86]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-e145ff86],.icon--wysiwyg_bold svg[data-v-e145ff86]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-e145ff86],.icon--wysiwyg_header-2[data-v-e145ff86],.icon--wysiwyg_header-3 svg[data-v-e145ff86],.icon--wysiwyg_header-3[data-v-e145ff86],.icon--wysiwyg_header-4 svg[data-v-e145ff86],.icon--wysiwyg_header-4[data-v-e145ff86],.icon--wysiwyg_header-5 svg[data-v-e145ff86],.icon--wysiwyg_header-5[data-v-e145ff86],.icon--wysiwyg_header-6 svg[data-v-e145ff86],.icon--wysiwyg_header-6[data-v-e145ff86],.icon--wysiwyg_header[data-v-e145ff86],.icon--wysiwyg_header svg[data-v-e145ff86]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-e145ff86],.icon--wysiwyg_italic svg[data-v-e145ff86]{width:10px;height:13px}.icon--wysiwyg_link[data-v-e145ff86],.icon--wysiwyg_link svg[data-v-e145ff86]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-e145ff86],.icon--wysiwyg_underline svg[data-v-e145ff86]{width:12px;height:13px}.icon--ae[data-v-e145ff86],.icon--ae svg[data-v-e145ff86],.icon--ai[data-v-e145ff86],.icon--ai svg[data-v-e145ff86],.icon--ase[data-v-e145ff86],.icon--ase svg[data-v-e145ff86]{width:20px;height:26px}.icon--cut[data-v-e145ff86],.icon--cut svg[data-v-e145ff86],.icon--dir[data-v-e145ff86],.icon--dir_protected[data-v-e145ff86],.icon--dir_protected svg[data-v-e145ff86],.icon--dir_shared[data-v-e145ff86],.icon--dir_shared svg[data-v-e145ff86],.icon--dir svg[data-v-e145ff86]{width:26px;height:21px}.icon--dmg[data-v-e145ff86],.icon--dmg svg[data-v-e145ff86],.icon--doc[data-v-e145ff86],.icon--doc svg[data-v-e145ff86],.icon--eps[data-v-e145ff86],.icon--eps svg[data-v-e145ff86],.icon--fla[data-v-e145ff86],.icon--fla svg[data-v-e145ff86],.icon--fnt[data-v-e145ff86],.icon--fnt svg[data-v-e145ff86],.icon--gen[data-v-e145ff86],.icon--gen svg[data-v-e145ff86],.icon--html[data-v-e145ff86],.icon--html svg[data-v-e145ff86],.icon--img[data-v-e145ff86],.icon--img svg[data-v-e145ff86],.icon--indd[data-v-e145ff86],.icon--indd svg[data-v-e145ff86],.icon--key[data-v-e145ff86],.icon--key svg[data-v-e145ff86],.icon--merlin[data-v-e145ff86],.icon--merlin svg[data-v-e145ff86]{width:20px;height:26px}.icon--net[data-v-e145ff86],.icon--net svg[data-v-e145ff86]{width:26px;height:21px}.icon--numbers[data-v-e145ff86],.icon--numbers svg[data-v-e145ff86],.icon--pages[data-v-e145ff86],.icon--pages svg[data-v-e145ff86],.icon--pdf[data-v-e145ff86],.icon--pdf svg[data-v-e145ff86],.icon--ppt[data-v-e145ff86],.icon--ppt svg[data-v-e145ff86],.icon--psd[data-v-e145ff86],.icon--psd svg[data-v-e145ff86]{width:20px;height:26px}.icon--site[data-v-e145ff86],.icon--site svg[data-v-e145ff86]{width:26px;height:21px}.icon--slide[data-v-e145ff86],.icon--slide svg[data-v-e145ff86],.icon--snd[data-v-e145ff86],.icon--snd svg[data-v-e145ff86],.icon--sql[data-v-e145ff86],.icon--sql svg[data-v-e145ff86],.icon--swf[data-v-e145ff86],.icon--swf svg[data-v-e145ff86],.icon--txt[data-v-e145ff86],.icon--txt svg[data-v-e145ff86],.icon--vid[data-v-e145ff86],.icon--vid svg[data-v-e145ff86],.icon--xls[data-v-e145ff86],.icon--xls svg[data-v-e145ff86],.icon--zip[data-v-e145ff86],.icon--zip svg[data-v-e145ff86]{width:20px;height:26px}.container[data-v-e145ff86]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-e145ff86]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-e145ff86]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-e145ff86]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-e145ff86]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-e145ff86]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-e145ff86]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-e145ff86]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-e145ff86]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-e145ff86]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-e145ff86]{width:auto}}.form__field[data-v-e145ff86]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0 15px}.form__field input[data-v-e145ff86]{padding:0}.form__field .form__field--showMap a[data-v-e145ff86]{font-size:11px;letter-spacing:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-decoration:none;color:#8c8c8c;-webkit-transition:color .25s;transition:color .25s}.form__field .form__field--showMap a[data-v-e145ff86]:hover{color:#666}.form__field .form__field--showMap a span[data-v-e145ff86]{margin-right:5px}.icon--add[data-v-b7b05f42],.icon--add svg[data-v-b7b05f42]{width:10px;height:10px}.icon--arrow-external[data-v-b7b05f42],.icon--arrow-external svg[data-v-b7b05f42]{width:8px;height:8px}.icon--arrow-sort[data-v-b7b05f42],.icon--arrow-sort svg[data-v-b7b05f42]{width:9px;height:11px}.icon--check[data-v-b7b05f42],.icon--check svg[data-v-b7b05f42]{width:11px;height:11px}.icon--close_icon[data-v-b7b05f42],.icon--close_icon svg[data-v-b7b05f42]{width:10px;height:10px}.icon--close_modal[data-v-b7b05f42],.icon--close_modal svg[data-v-b7b05f42]{width:16px;height:16px}.icon--colors[data-v-b7b05f42],.icon--colors svg[data-v-b7b05f42]{width:17px;height:17px}.icon--content-editor[data-v-b7b05f42],.icon--content-editor svg[data-v-b7b05f42]{width:14px;height:13px}.icon--crop[data-v-b7b05f42],.icon--crop svg[data-v-b7b05f42]{width:16px;height:18px}.icon--download[data-v-b7b05f42],.icon--download svg[data-v-b7b05f42]{width:12px;height:16px}.icon--drag[data-v-b7b05f42],.icon--drag svg[data-v-b7b05f42]{width:8px;height:17px}.icon--dropdown_default[data-v-b7b05f42],.icon--dropdown_default svg[data-v-b7b05f42]{width:9px;height:5px}.icon--dropdown_module[data-v-b7b05f42],.icon--dropdown_module svg[data-v-b7b05f42]{width:10px;height:6px}.icon--edit[data-v-b7b05f42],.icon--edit svg[data-v-b7b05f42]{width:13px;height:13px}.icon--edit_large[data-v-b7b05f42],.icon--edit_large svg[data-v-b7b05f42]{width:14px;height:14px}.icon--editor[data-v-b7b05f42],.icon--editor svg[data-v-b7b05f42]{width:14px;height:13px}.icon--expand[data-v-b7b05f42],.icon--expand svg[data-v-b7b05f42]{width:10px;height:10px}.icon--fix-grid[data-v-b7b05f42],.icon--fix-grid svg[data-v-b7b05f42]{width:18px;height:14px}.icon--flex-grid[data-v-b7b05f42],.icon--flex-grid svg[data-v-b7b05f42]{width:18px;height:17px}.icon--google-sign-in[data-v-b7b05f42],.icon--google-sign-in svg[data-v-b7b05f42]{width:23px;height:24px}.icon--image-text[data-v-b7b05f42],.icon--image-text svg[data-v-b7b05f42]{width:30px;height:13px}.icon--image[data-v-b7b05f42],.icon--image svg[data-v-b7b05f42]{width:19px;height:15px}.icon--info[data-v-b7b05f42],.icon--info svg[data-v-b7b05f42]{width:21px;height:21px}.icon--location[data-v-b7b05f42],.icon--location svg[data-v-b7b05f42]{width:12px;height:16px}.icon--media-grid[data-v-b7b05f42],.icon--media-grid svg[data-v-b7b05f42]{width:12px;height:12px}.icon--media-list[data-v-b7b05f42],.icon--media-list svg[data-v-b7b05f42]{width:16px;height:10px}.icon--more-dots[data-v-b7b05f42],.icon--more-dots svg[data-v-b7b05f42]{width:14px;height:4px}.icon--pagination_left[data-v-b7b05f42],.icon--pagination_left svg[data-v-b7b05f42],.icon--pagination_right[data-v-b7b05f42],.icon--pagination_right svg[data-v-b7b05f42]{width:9px;height:15px}.icon--preferences[data-v-b7b05f42],.icon--preferences svg[data-v-b7b05f42]{width:26px;height:16px}.icon--preview-desktop[data-v-b7b05f42],.icon--preview-desktop svg[data-v-b7b05f42]{width:39px;height:30px}.icon--preview-mobile[data-v-b7b05f42],.icon--preview-mobile svg[data-v-b7b05f42]{width:12px;height:18px}.icon--preview-tablet-h[data-v-b7b05f42],.icon--preview-tablet-h svg[data-v-b7b05f42]{width:27px;height:20px}.icon--preview-tablet-v[data-v-b7b05f42],.icon--preview-tablet-v svg[data-v-b7b05f42]{width:20px;height:27px}.icon--preview[data-v-b7b05f42],.icon--preview svg[data-v-b7b05f42]{width:22px;height:14px}.icon--publish[data-v-b7b05f42],.icon--publish svg[data-v-b7b05f42]{width:22px;height:15px}.icon--quote[data-v-b7b05f42],.icon--quote svg[data-v-b7b05f42]{width:16px;height:13px}.icon--revision-compare[data-v-b7b05f42],.icon--revision-compare svg[data-v-b7b05f42],.icon--revision-single[data-v-b7b05f42],.icon--revision-single svg[data-v-b7b05f42]{width:23px;height:16px}.icon--search[data-v-b7b05f42],.icon--search svg[data-v-b7b05f42]{width:20px;height:20px}.icon--slideshow[data-v-b7b05f42],.icon--slideshow svg[data-v-b7b05f42]{width:20px;height:16px}.icon--star-feature[data-v-b7b05f42],.icon--star-feature_active[data-v-b7b05f42],.icon--star-feature_active svg[data-v-b7b05f42],.icon--star-feature svg[data-v-b7b05f42]{width:20px;height:19px}.icon--text-2col[data-v-b7b05f42],.icon--text-2col svg[data-v-b7b05f42]{width:26px;height:13px}.icon--text[data-v-b7b05f42],.icon--text svg[data-v-b7b05f42]{width:17px;height:13px}.icon--trash[data-v-b7b05f42],.icon--trash svg[data-v-b7b05f42]{width:15px;height:17px}.icon--video[data-v-b7b05f42],.icon--video svg[data-v-b7b05f42]{width:23px;height:23px}.icon--website[data-v-b7b05f42],.icon--website svg[data-v-b7b05f42]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-b7b05f42],.icon--wysiwyg_anchor svg[data-v-b7b05f42]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-b7b05f42],.icon--wysiwyg_bold svg[data-v-b7b05f42]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-b7b05f42],.icon--wysiwyg_header-2[data-v-b7b05f42],.icon--wysiwyg_header-3 svg[data-v-b7b05f42],.icon--wysiwyg_header-3[data-v-b7b05f42],.icon--wysiwyg_header-4 svg[data-v-b7b05f42],.icon--wysiwyg_header-4[data-v-b7b05f42],.icon--wysiwyg_header-5 svg[data-v-b7b05f42],.icon--wysiwyg_header-5[data-v-b7b05f42],.icon--wysiwyg_header-6 svg[data-v-b7b05f42],.icon--wysiwyg_header-6[data-v-b7b05f42],.icon--wysiwyg_header[data-v-b7b05f42],.icon--wysiwyg_header svg[data-v-b7b05f42]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-b7b05f42],.icon--wysiwyg_italic svg[data-v-b7b05f42]{width:10px;height:13px}.icon--wysiwyg_link[data-v-b7b05f42],.icon--wysiwyg_link svg[data-v-b7b05f42]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-b7b05f42],.icon--wysiwyg_underline svg[data-v-b7b05f42]{width:12px;height:13px}.icon--ae[data-v-b7b05f42],.icon--ae svg[data-v-b7b05f42],.icon--ai[data-v-b7b05f42],.icon--ai svg[data-v-b7b05f42],.icon--ase[data-v-b7b05f42],.icon--ase svg[data-v-b7b05f42]{width:20px;height:26px}.icon--cut[data-v-b7b05f42],.icon--cut svg[data-v-b7b05f42],.icon--dir[data-v-b7b05f42],.icon--dir_protected[data-v-b7b05f42],.icon--dir_protected svg[data-v-b7b05f42],.icon--dir_shared[data-v-b7b05f42],.icon--dir_shared svg[data-v-b7b05f42],.icon--dir svg[data-v-b7b05f42]{width:26px;height:21px}.icon--dmg[data-v-b7b05f42],.icon--dmg svg[data-v-b7b05f42],.icon--doc[data-v-b7b05f42],.icon--doc svg[data-v-b7b05f42],.icon--eps[data-v-b7b05f42],.icon--eps svg[data-v-b7b05f42],.icon--fla[data-v-b7b05f42],.icon--fla svg[data-v-b7b05f42],.icon--fnt[data-v-b7b05f42],.icon--fnt svg[data-v-b7b05f42],.icon--gen[data-v-b7b05f42],.icon--gen svg[data-v-b7b05f42],.icon--html[data-v-b7b05f42],.icon--html svg[data-v-b7b05f42],.icon--img[data-v-b7b05f42],.icon--img svg[data-v-b7b05f42],.icon--indd[data-v-b7b05f42],.icon--indd svg[data-v-b7b05f42],.icon--key[data-v-b7b05f42],.icon--key svg[data-v-b7b05f42],.icon--merlin[data-v-b7b05f42],.icon--merlin svg[data-v-b7b05f42]{width:20px;height:26px}.icon--net[data-v-b7b05f42],.icon--net svg[data-v-b7b05f42]{width:26px;height:21px}.icon--numbers[data-v-b7b05f42],.icon--numbers svg[data-v-b7b05f42],.icon--pages[data-v-b7b05f42],.icon--pages svg[data-v-b7b05f42],.icon--pdf[data-v-b7b05f42],.icon--pdf svg[data-v-b7b05f42],.icon--ppt[data-v-b7b05f42],.icon--ppt svg[data-v-b7b05f42],.icon--psd[data-v-b7b05f42],.icon--psd svg[data-v-b7b05f42]{width:20px;height:26px}.icon--site[data-v-b7b05f42],.icon--site svg[data-v-b7b05f42]{width:26px;height:21px}.icon--slide[data-v-b7b05f42],.icon--slide svg[data-v-b7b05f42],.icon--snd[data-v-b7b05f42],.icon--snd svg[data-v-b7b05f42],.icon--sql[data-v-b7b05f42],.icon--sql svg[data-v-b7b05f42],.icon--swf[data-v-b7b05f42],.icon--swf svg[data-v-b7b05f42],.icon--txt[data-v-b7b05f42],.icon--txt svg[data-v-b7b05f42],.icon--vid[data-v-b7b05f42],.icon--vid svg[data-v-b7b05f42],.icon--xls[data-v-b7b05f42],.icon--xls svg[data-v-b7b05f42],.icon--zip[data-v-b7b05f42],.icon--zip svg[data-v-b7b05f42]{width:20px;height:26px}.container[data-v-b7b05f42]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-b7b05f42]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-b7b05f42]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-b7b05f42]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-b7b05f42]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-b7b05f42]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-b7b05f42]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-b7b05f42]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-b7b05f42]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-b7b05f42]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-b7b05f42]{width:auto}}.overlay[data-v-b7b05f42]{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.4);z-index:400;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;opacity:0;visibility:hidden;-webkit-transition:opacity .35s ease,visibility 0s .35s;transition:opacity .35s ease,visibility 0s .35s;padding:0;background-color:#333}.overlay+.overlay[data-v-b7b05f42]{z-index:401}.overlay__window[data-v-b7b05f42]{background:#fff;min-width:50vw;position:relative;border-radius:2px;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;width:100%;height:100%;max-width:inherit}.overlay__content[data-v-b7b05f42]{overflow:hidden;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;height:100%}.overlay__header[data-v-b7b05f42]{background:#000;color:#fff;padding:0 20px;height:60px;line-height:60px;position:relative;font-weight:600;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.overlay__close[data-v-b7b05f42]{background-color:transparent;-webkit-appearance:none;cursor:pointer;font-size:1em;outline:none;margin:0;border:0 none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;letter-spacing:inherit;position:absolute;left:0;top:0;background:transparent;height:60px;color:#8c8c8c;padding:22px 20px;text-align:left}.overlay__close[data-v-b7b05f42]:focus,.overlay__close[data-v-b7b05f42]:hover{color:#fff}.overlay__closeLabel[data-v-b7b05f42]{position:relative;margin-left:10px;top:-2px}.overlay__content[data-v-b7b05f42]{padding:0;display:-webkit-box;display:-ms-flexbox;display:flex}.overlay__content>button[data-v-b7b05f42]{margin-bottom:20px}.overlay--active[data-v-b7b05f42]{opacity:1;visibility:visible;-webkit-transition:opacity .35s;transition:opacity .35s}.overlay--hidden[data-v-b7b05f42]{display:none}.icon--add[data-v-7b1f8f6c],.icon--add svg[data-v-7b1f8f6c]{width:10px;height:10px}.icon--arrow-external[data-v-7b1f8f6c],.icon--arrow-external svg[data-v-7b1f8f6c]{width:8px;height:8px}.icon--arrow-sort[data-v-7b1f8f6c],.icon--arrow-sort svg[data-v-7b1f8f6c]{width:9px;height:11px}.icon--check[data-v-7b1f8f6c],.icon--check svg[data-v-7b1f8f6c]{width:11px;height:11px}.icon--close_icon[data-v-7b1f8f6c],.icon--close_icon svg[data-v-7b1f8f6c]{width:10px;height:10px}.icon--close_modal[data-v-7b1f8f6c],.icon--close_modal svg[data-v-7b1f8f6c]{width:16px;height:16px}.icon--colors[data-v-7b1f8f6c],.icon--colors svg[data-v-7b1f8f6c]{width:17px;height:17px}.icon--content-editor[data-v-7b1f8f6c],.icon--content-editor svg[data-v-7b1f8f6c]{width:14px;height:13px}.icon--crop[data-v-7b1f8f6c],.icon--crop svg[data-v-7b1f8f6c]{width:16px;height:18px}.icon--download[data-v-7b1f8f6c],.icon--download svg[data-v-7b1f8f6c]{width:12px;height:16px}.icon--drag[data-v-7b1f8f6c],.icon--drag svg[data-v-7b1f8f6c]{width:8px;height:17px}.icon--dropdown_default[data-v-7b1f8f6c],.icon--dropdown_default svg[data-v-7b1f8f6c]{width:9px;height:5px}.icon--dropdown_module[data-v-7b1f8f6c],.icon--dropdown_module svg[data-v-7b1f8f6c]{width:10px;height:6px}.icon--edit[data-v-7b1f8f6c],.icon--edit svg[data-v-7b1f8f6c]{width:13px;height:13px}.icon--edit_large[data-v-7b1f8f6c],.icon--edit_large svg[data-v-7b1f8f6c]{width:14px;height:14px}.icon--editor[data-v-7b1f8f6c],.icon--editor svg[data-v-7b1f8f6c]{width:14px;height:13px}.icon--expand[data-v-7b1f8f6c],.icon--expand svg[data-v-7b1f8f6c]{width:10px;height:10px}.icon--fix-grid[data-v-7b1f8f6c],.icon--fix-grid svg[data-v-7b1f8f6c]{width:18px;height:14px}.icon--flex-grid[data-v-7b1f8f6c],.icon--flex-grid svg[data-v-7b1f8f6c]{width:18px;height:17px}.icon--google-sign-in[data-v-7b1f8f6c],.icon--google-sign-in svg[data-v-7b1f8f6c]{width:23px;height:24px}.icon--image-text[data-v-7b1f8f6c],.icon--image-text svg[data-v-7b1f8f6c]{width:30px;height:13px}.icon--image[data-v-7b1f8f6c],.icon--image svg[data-v-7b1f8f6c]{width:19px;height:15px}.icon--info[data-v-7b1f8f6c],.icon--info svg[data-v-7b1f8f6c]{width:21px;height:21px}.icon--location[data-v-7b1f8f6c],.icon--location svg[data-v-7b1f8f6c]{width:12px;height:16px}.icon--media-grid[data-v-7b1f8f6c],.icon--media-grid svg[data-v-7b1f8f6c]{width:12px;height:12px}.icon--media-list[data-v-7b1f8f6c],.icon--media-list svg[data-v-7b1f8f6c]{width:16px;height:10px}.icon--more-dots[data-v-7b1f8f6c],.icon--more-dots svg[data-v-7b1f8f6c]{width:14px;height:4px}.icon--pagination_left[data-v-7b1f8f6c],.icon--pagination_left svg[data-v-7b1f8f6c],.icon--pagination_right[data-v-7b1f8f6c],.icon--pagination_right svg[data-v-7b1f8f6c]{width:9px;height:15px}.icon--preferences[data-v-7b1f8f6c],.icon--preferences svg[data-v-7b1f8f6c]{width:26px;height:16px}.icon--preview-desktop[data-v-7b1f8f6c],.icon--preview-desktop svg[data-v-7b1f8f6c]{width:39px;height:30px}.icon--preview-mobile[data-v-7b1f8f6c],.icon--preview-mobile svg[data-v-7b1f8f6c]{width:12px;height:18px}.icon--preview-tablet-h[data-v-7b1f8f6c],.icon--preview-tablet-h svg[data-v-7b1f8f6c]{width:27px;height:20px}.icon--preview-tablet-v[data-v-7b1f8f6c],.icon--preview-tablet-v svg[data-v-7b1f8f6c]{width:20px;height:27px}.icon--preview[data-v-7b1f8f6c],.icon--preview svg[data-v-7b1f8f6c]{width:22px;height:14px}.icon--publish[data-v-7b1f8f6c],.icon--publish svg[data-v-7b1f8f6c]{width:22px;height:15px}.icon--quote[data-v-7b1f8f6c],.icon--quote svg[data-v-7b1f8f6c]{width:16px;height:13px}.icon--revision-compare[data-v-7b1f8f6c],.icon--revision-compare svg[data-v-7b1f8f6c],.icon--revision-single[data-v-7b1f8f6c],.icon--revision-single svg[data-v-7b1f8f6c]{width:23px;height:16px}.icon--search[data-v-7b1f8f6c],.icon--search svg[data-v-7b1f8f6c]{width:20px;height:20px}.icon--slideshow[data-v-7b1f8f6c],.icon--slideshow svg[data-v-7b1f8f6c]{width:20px;height:16px}.icon--star-feature[data-v-7b1f8f6c],.icon--star-feature_active[data-v-7b1f8f6c],.icon--star-feature_active svg[data-v-7b1f8f6c],.icon--star-feature svg[data-v-7b1f8f6c]{width:20px;height:19px}.icon--text-2col[data-v-7b1f8f6c],.icon--text-2col svg[data-v-7b1f8f6c]{width:26px;height:13px}.icon--text[data-v-7b1f8f6c],.icon--text svg[data-v-7b1f8f6c]{width:17px;height:13px}.icon--trash[data-v-7b1f8f6c],.icon--trash svg[data-v-7b1f8f6c]{width:15px;height:17px}.icon--video[data-v-7b1f8f6c],.icon--video svg[data-v-7b1f8f6c]{width:23px;height:23px}.icon--website[data-v-7b1f8f6c],.icon--website svg[data-v-7b1f8f6c]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-7b1f8f6c],.icon--wysiwyg_anchor svg[data-v-7b1f8f6c]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-7b1f8f6c],.icon--wysiwyg_bold svg[data-v-7b1f8f6c]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-7b1f8f6c],.icon--wysiwyg_header-2[data-v-7b1f8f6c],.icon--wysiwyg_header-3 svg[data-v-7b1f8f6c],.icon--wysiwyg_header-3[data-v-7b1f8f6c],.icon--wysiwyg_header-4 svg[data-v-7b1f8f6c],.icon--wysiwyg_header-4[data-v-7b1f8f6c],.icon--wysiwyg_header-5 svg[data-v-7b1f8f6c],.icon--wysiwyg_header-5[data-v-7b1f8f6c],.icon--wysiwyg_header-6 svg[data-v-7b1f8f6c],.icon--wysiwyg_header-6[data-v-7b1f8f6c],.icon--wysiwyg_header[data-v-7b1f8f6c],.icon--wysiwyg_header svg[data-v-7b1f8f6c]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-7b1f8f6c],.icon--wysiwyg_italic svg[data-v-7b1f8f6c]{width:10px;height:13px}.icon--wysiwyg_link[data-v-7b1f8f6c],.icon--wysiwyg_link svg[data-v-7b1f8f6c]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-7b1f8f6c],.icon--wysiwyg_underline svg[data-v-7b1f8f6c]{width:12px;height:13px}.icon--ae[data-v-7b1f8f6c],.icon--ae svg[data-v-7b1f8f6c],.icon--ai[data-v-7b1f8f6c],.icon--ai svg[data-v-7b1f8f6c],.icon--ase[data-v-7b1f8f6c],.icon--ase svg[data-v-7b1f8f6c]{width:20px;height:26px}.icon--cut[data-v-7b1f8f6c],.icon--cut svg[data-v-7b1f8f6c],.icon--dir[data-v-7b1f8f6c],.icon--dir_protected[data-v-7b1f8f6c],.icon--dir_protected svg[data-v-7b1f8f6c],.icon--dir_shared[data-v-7b1f8f6c],.icon--dir_shared svg[data-v-7b1f8f6c],.icon--dir svg[data-v-7b1f8f6c]{width:26px;height:21px}.icon--dmg[data-v-7b1f8f6c],.icon--dmg svg[data-v-7b1f8f6c],.icon--doc[data-v-7b1f8f6c],.icon--doc svg[data-v-7b1f8f6c],.icon--eps[data-v-7b1f8f6c],.icon--eps svg[data-v-7b1f8f6c],.icon--fla[data-v-7b1f8f6c],.icon--fla svg[data-v-7b1f8f6c],.icon--fnt[data-v-7b1f8f6c],.icon--fnt svg[data-v-7b1f8f6c],.icon--gen[data-v-7b1f8f6c],.icon--gen svg[data-v-7b1f8f6c],.icon--html[data-v-7b1f8f6c],.icon--html svg[data-v-7b1f8f6c],.icon--img[data-v-7b1f8f6c],.icon--img svg[data-v-7b1f8f6c],.icon--indd[data-v-7b1f8f6c],.icon--indd svg[data-v-7b1f8f6c],.icon--key[data-v-7b1f8f6c],.icon--key svg[data-v-7b1f8f6c],.icon--merlin[data-v-7b1f8f6c],.icon--merlin svg[data-v-7b1f8f6c]{width:20px;height:26px}.icon--net[data-v-7b1f8f6c],.icon--net svg[data-v-7b1f8f6c]{width:26px;height:21px}.icon--numbers[data-v-7b1f8f6c],.icon--numbers svg[data-v-7b1f8f6c],.icon--pages[data-v-7b1f8f6c],.icon--pages svg[data-v-7b1f8f6c],.icon--pdf[data-v-7b1f8f6c],.icon--pdf svg[data-v-7b1f8f6c],.icon--ppt[data-v-7b1f8f6c],.icon--ppt svg[data-v-7b1f8f6c],.icon--psd[data-v-7b1f8f6c],.icon--psd svg[data-v-7b1f8f6c]{width:20px;height:26px}.icon--site[data-v-7b1f8f6c],.icon--site svg[data-v-7b1f8f6c]{width:26px;height:21px}.icon--slide[data-v-7b1f8f6c],.icon--slide svg[data-v-7b1f8f6c],.icon--snd[data-v-7b1f8f6c],.icon--snd svg[data-v-7b1f8f6c],.icon--sql[data-v-7b1f8f6c],.icon--sql svg[data-v-7b1f8f6c],.icon--swf[data-v-7b1f8f6c],.icon--swf svg[data-v-7b1f8f6c],.icon--txt[data-v-7b1f8f6c],.icon--txt svg[data-v-7b1f8f6c],.icon--vid[data-v-7b1f8f6c],.icon--vid svg[data-v-7b1f8f6c],.icon--xls[data-v-7b1f8f6c],.icon--xls svg[data-v-7b1f8f6c],.icon--zip[data-v-7b1f8f6c],.icon--zip svg[data-v-7b1f8f6c]{width:20px;height:26px}.container[data-v-7b1f8f6c]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-7b1f8f6c]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-7b1f8f6c]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-7b1f8f6c]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-7b1f8f6c]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-7b1f8f6c]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-7b1f8f6c]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-7b1f8f6c]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-7b1f8f6c]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-7b1f8f6c]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-7b1f8f6c]{width:auto}}.previewerframe[data-v-7b1f8f6c]{width:100%;height:100%;margin:0 auto;max-width:calc(100% - 20px);display:block;-webkit-transform:translateX(-50%);transform:translateX(-50%);-webkit-transition:width .3s ease;transition:width .3s ease;position:absolute;top:0;bottom:0;left:50%;background:#fff}.icon--add[data-v-617a3800],.icon--add svg[data-v-617a3800]{width:10px;height:10px}.icon--arrow-external[data-v-617a3800],.icon--arrow-external svg[data-v-617a3800]{width:8px;height:8px}.icon--arrow-sort[data-v-617a3800],.icon--arrow-sort svg[data-v-617a3800]{width:9px;height:11px}.icon--check[data-v-617a3800],.icon--check svg[data-v-617a3800]{width:11px;height:11px}.icon--close_icon[data-v-617a3800],.icon--close_icon svg[data-v-617a3800]{width:10px;height:10px}.icon--close_modal[data-v-617a3800],.icon--close_modal svg[data-v-617a3800]{width:16px;height:16px}.icon--colors[data-v-617a3800],.icon--colors svg[data-v-617a3800]{width:17px;height:17px}.icon--content-editor[data-v-617a3800],.icon--content-editor svg[data-v-617a3800]{width:14px;height:13px}.icon--crop[data-v-617a3800],.icon--crop svg[data-v-617a3800]{width:16px;height:18px}.icon--download[data-v-617a3800],.icon--download svg[data-v-617a3800]{width:12px;height:16px}.icon--drag[data-v-617a3800],.icon--drag svg[data-v-617a3800]{width:8px;height:17px}.icon--dropdown_default[data-v-617a3800],.icon--dropdown_default svg[data-v-617a3800]{width:9px;height:5px}.icon--dropdown_module[data-v-617a3800],.icon--dropdown_module svg[data-v-617a3800]{width:10px;height:6px}.icon--edit[data-v-617a3800],.icon--edit svg[data-v-617a3800]{width:13px;height:13px}.icon--edit_large[data-v-617a3800],.icon--edit_large svg[data-v-617a3800]{width:14px;height:14px}.icon--editor[data-v-617a3800],.icon--editor svg[data-v-617a3800]{width:14px;height:13px}.icon--expand[data-v-617a3800],.icon--expand svg[data-v-617a3800]{width:10px;height:10px}.icon--fix-grid[data-v-617a3800],.icon--fix-grid svg[data-v-617a3800]{width:18px;height:14px}.icon--flex-grid[data-v-617a3800],.icon--flex-grid svg[data-v-617a3800]{width:18px;height:17px}.icon--google-sign-in[data-v-617a3800],.icon--google-sign-in svg[data-v-617a3800]{width:23px;height:24px}.icon--image-text[data-v-617a3800],.icon--image-text svg[data-v-617a3800]{width:30px;height:13px}.icon--image[data-v-617a3800],.icon--image svg[data-v-617a3800]{width:19px;height:15px}.icon--info[data-v-617a3800],.icon--info svg[data-v-617a3800]{width:21px;height:21px}.icon--location[data-v-617a3800],.icon--location svg[data-v-617a3800]{width:12px;height:16px}.icon--media-grid[data-v-617a3800],.icon--media-grid svg[data-v-617a3800]{width:12px;height:12px}.icon--media-list[data-v-617a3800],.icon--media-list svg[data-v-617a3800]{width:16px;height:10px}.icon--more-dots[data-v-617a3800],.icon--more-dots svg[data-v-617a3800]{width:14px;height:4px}.icon--pagination_left[data-v-617a3800],.icon--pagination_left svg[data-v-617a3800],.icon--pagination_right[data-v-617a3800],.icon--pagination_right svg[data-v-617a3800]{width:9px;height:15px}.icon--preferences[data-v-617a3800],.icon--preferences svg[data-v-617a3800]{width:26px;height:16px}.icon--preview-desktop[data-v-617a3800],.icon--preview-desktop svg[data-v-617a3800]{width:39px;height:30px}.icon--preview-mobile[data-v-617a3800],.icon--preview-mobile svg[data-v-617a3800]{width:12px;height:18px}.icon--preview-tablet-h[data-v-617a3800],.icon--preview-tablet-h svg[data-v-617a3800]{width:27px;height:20px}.icon--preview-tablet-v[data-v-617a3800],.icon--preview-tablet-v svg[data-v-617a3800]{width:20px;height:27px}.icon--preview[data-v-617a3800],.icon--preview svg[data-v-617a3800]{width:22px;height:14px}.icon--publish[data-v-617a3800],.icon--publish svg[data-v-617a3800]{width:22px;height:15px}.icon--quote[data-v-617a3800],.icon--quote svg[data-v-617a3800]{width:16px;height:13px}.icon--revision-compare[data-v-617a3800],.icon--revision-compare svg[data-v-617a3800],.icon--revision-single[data-v-617a3800],.icon--revision-single svg[data-v-617a3800]{width:23px;height:16px}.icon--search[data-v-617a3800],.icon--search svg[data-v-617a3800]{width:20px;height:20px}.icon--slideshow[data-v-617a3800],.icon--slideshow svg[data-v-617a3800]{width:20px;height:16px}.icon--star-feature[data-v-617a3800],.icon--star-feature_active[data-v-617a3800],.icon--star-feature_active svg[data-v-617a3800],.icon--star-feature svg[data-v-617a3800]{width:20px;height:19px}.icon--text-2col[data-v-617a3800],.icon--text-2col svg[data-v-617a3800]{width:26px;height:13px}.icon--text[data-v-617a3800],.icon--text svg[data-v-617a3800]{width:17px;height:13px}.icon--trash[data-v-617a3800],.icon--trash svg[data-v-617a3800]{width:15px;height:17px}.icon--video[data-v-617a3800],.icon--video svg[data-v-617a3800]{width:23px;height:23px}.icon--website[data-v-617a3800],.icon--website svg[data-v-617a3800]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-617a3800],.icon--wysiwyg_anchor svg[data-v-617a3800]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-617a3800],.icon--wysiwyg_bold svg[data-v-617a3800]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-617a3800],.icon--wysiwyg_header-2[data-v-617a3800],.icon--wysiwyg_header-3 svg[data-v-617a3800],.icon--wysiwyg_header-3[data-v-617a3800],.icon--wysiwyg_header-4 svg[data-v-617a3800],.icon--wysiwyg_header-4[data-v-617a3800],.icon--wysiwyg_header-5 svg[data-v-617a3800],.icon--wysiwyg_header-5[data-v-617a3800],.icon--wysiwyg_header-6 svg[data-v-617a3800],.icon--wysiwyg_header-6[data-v-617a3800],.icon--wysiwyg_header[data-v-617a3800],.icon--wysiwyg_header svg[data-v-617a3800]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-617a3800],.icon--wysiwyg_italic svg[data-v-617a3800]{width:10px;height:13px}.icon--wysiwyg_link[data-v-617a3800],.icon--wysiwyg_link svg[data-v-617a3800]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-617a3800],.icon--wysiwyg_underline svg[data-v-617a3800]{width:12px;height:13px}.icon--ae[data-v-617a3800],.icon--ae svg[data-v-617a3800],.icon--ai[data-v-617a3800],.icon--ai svg[data-v-617a3800],.icon--ase[data-v-617a3800],.icon--ase svg[data-v-617a3800]{width:20px;height:26px}.icon--cut[data-v-617a3800],.icon--cut svg[data-v-617a3800],.icon--dir[data-v-617a3800],.icon--dir_protected[data-v-617a3800],.icon--dir_protected svg[data-v-617a3800],.icon--dir_shared[data-v-617a3800],.icon--dir_shared svg[data-v-617a3800],.icon--dir svg[data-v-617a3800]{width:26px;height:21px}.icon--dmg[data-v-617a3800],.icon--dmg svg[data-v-617a3800],.icon--doc[data-v-617a3800],.icon--doc svg[data-v-617a3800],.icon--eps[data-v-617a3800],.icon--eps svg[data-v-617a3800],.icon--fla[data-v-617a3800],.icon--fla svg[data-v-617a3800],.icon--fnt[data-v-617a3800],.icon--fnt svg[data-v-617a3800],.icon--gen[data-v-617a3800],.icon--gen svg[data-v-617a3800],.icon--html[data-v-617a3800],.icon--html svg[data-v-617a3800],.icon--img[data-v-617a3800],.icon--img svg[data-v-617a3800],.icon--indd[data-v-617a3800],.icon--indd svg[data-v-617a3800],.icon--key[data-v-617a3800],.icon--key svg[data-v-617a3800],.icon--merlin[data-v-617a3800],.icon--merlin svg[data-v-617a3800]{width:20px;height:26px}.icon--net[data-v-617a3800],.icon--net svg[data-v-617a3800]{width:26px;height:21px}.icon--numbers[data-v-617a3800],.icon--numbers svg[data-v-617a3800],.icon--pages[data-v-617a3800],.icon--pages svg[data-v-617a3800],.icon--pdf[data-v-617a3800],.icon--pdf svg[data-v-617a3800],.icon--ppt[data-v-617a3800],.icon--ppt svg[data-v-617a3800],.icon--psd[data-v-617a3800],.icon--psd svg[data-v-617a3800]{width:20px;height:26px}.icon--site[data-v-617a3800],.icon--site svg[data-v-617a3800]{width:26px;height:21px}.icon--slide[data-v-617a3800],.icon--slide svg[data-v-617a3800],.icon--snd[data-v-617a3800],.icon--snd svg[data-v-617a3800],.icon--sql[data-v-617a3800],.icon--sql svg[data-v-617a3800],.icon--swf[data-v-617a3800],.icon--swf svg[data-v-617a3800],.icon--txt[data-v-617a3800],.icon--txt svg[data-v-617a3800],.icon--vid[data-v-617a3800],.icon--vid svg[data-v-617a3800],.icon--xls[data-v-617a3800],.icon--xls svg[data-v-617a3800],.icon--zip[data-v-617a3800],.icon--zip svg[data-v-617a3800]{width:20px;height:26px}.container[data-v-617a3800]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-617a3800]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-617a3800]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-617a3800]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-617a3800]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-617a3800]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-617a3800]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-617a3800]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-617a3800]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-617a3800]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-617a3800]{width:auto}}.previewer[data-v-617a3800]{display:block;width:100%;padding:0;position:relative;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;background-color:#333}.previewer__restore[data-v-617a3800]{position:fixed;right:20px;top:13px;z-index:401}.tag--revision[data-v-617a3800]{color:#262626;position:absolute;top:17px;left:0;margin:0;opacity:.5}.previewer__nav[data-v-617a3800]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;height:80px;opacity:1;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}.previewer__frame[data-v-617a3800]{position:absolute;top:0;left:0;right:0;bottom:0}.previewer__frame[data-v-617a3800],.previewer__inner[data-v-617a3800]{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}.previewer__inner[data-v-617a3800]{position:relative;width:100%;overflow:hidden;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.previewer__trigger[data-v-617a3800]{height:auto;line-height:inherit}.previewer__trigger .icon[data-v-617a3800]{margin-left:6px}.previewer__compare[data-v-617a3800],.previewer__trigger[data-v-617a3800]{color:#8c8c8c;padding-left:0;padding-right:0}.previewer__compare[data-v-617a3800]:focus,.previewer__compare[data-v-617a3800]:hover,.previewer__trigger[data-v-617a3800]:focus,.previewer__trigger[data-v-617a3800]:hover{color:#fff}.previewer__compare a[data-v-617a3800],.previewer__trigger a[data-v-617a3800]{white-space:nowrap;overflow:hidden;text-decoration:none}@media screen and (min-width:850px){.previewer__compare[data-v-617a3800]{margin-left:20px}}.previewer__compare .icon[data-v-617a3800]{position:relative;margin-left:9px;top:2px}.previewer__compareLabel[data-v-617a3800]{display:none}@media screen and (min-width:600px){.previewer__compareLabel[data-v-617a3800]{display:inline}}.previewer__compare[data-v-617a3800],.previewer__revisions[data-v-617a3800]{margin-right:20px;padding-top:40px}.previewer__revisions[data-v-617a3800]{margin-left:20px;padding-top:40px;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;position:relative}.previewer__breakpoints[data-v-617a3800]{display:none}@media screen and (min-width:850px){.previewer__breakpoints[data-v-617a3800]{display:block;margin:0 auto;position:absolute;top:0;left:50%;font-size:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);height:80px;line-height:80px}}.previewer__breakpoint[data-v-617a3800]{display:inline-block;color:#8c8c8c;padding:25px 15px;vertical-align:bottom}.previewer__breakpoint a[data-v-617a3800]{display:block}.previewer__breakpoint a[data-v-617a3800]:focus,.previewer__breakpoint a[data-v-617a3800]:hover{color:#a6a6a6}.previewer__breakpoint .icon[data-v-617a3800]{display:block}.previewer__breakpoint.s--active[data-v-617a3800],.previewer__breakpoint.s--active a[data-v-617a3800]:focus,.previewer__breakpoint.s--active a[data-v-617a3800]:hover{color:#fff}.previewer__content[data-v-617a3800]{height:100%;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row nowrap;flex-flow:row nowrap}.previewer__content[data-v-617a3800],.previewer__iframe[data-v-617a3800]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.previewer__iframe[data-v-617a3800]{opacity:1;-webkit-transition:opacity .3s ease,width .3s ease;transition:opacity .3s ease,width .3s ease;position:relative}.previewer--loading .previewer__iframe[data-v-617a3800],.previewer--loading .previewer__nav[data-v-617a3800]{opacity:0;pointer-events:none}.previewer--loading .previewer__content[data-v-617a3800]:after{content:"Loading preview...";position:absolute;top:25%;left:50%;width:200px;margin-left:-100px;text-align:center;color:#8c8c8c}.previewer__iframeInfos[data-v-617a3800]{height:80px;margin-top:-80px;position:absolute;color:#8c8c8c;top:0;left:10px;padding-top:40px}button.previewerRevision[data-v-617a3800]{display:-webkit-box;display:-ms-flexbox;display:flex;padding:0 15px}button.previewerRevision--active[data-v-617a3800]{color:#262626;background:#f2f2f2}.previewerRevision__author[data-v-617a3800]{padding-right:10px;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;white-space:nowrap}@media screen and (min-width:600px){.previewerRevision__author[data-v-617a3800]{padding-right:30px}}.previewerRevision__datetime[data-v-617a3800]{color:#3278b8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.icon--add[data-v-0f6c2e43],.icon--add svg[data-v-0f6c2e43]{width:10px;height:10px}.icon--arrow-external[data-v-0f6c2e43],.icon--arrow-external svg[data-v-0f6c2e43]{width:8px;height:8px}.icon--arrow-sort[data-v-0f6c2e43],.icon--arrow-sort svg[data-v-0f6c2e43]{width:9px;height:11px}.icon--check[data-v-0f6c2e43],.icon--check svg[data-v-0f6c2e43]{width:11px;height:11px}.icon--close_icon[data-v-0f6c2e43],.icon--close_icon svg[data-v-0f6c2e43]{width:10px;height:10px}.icon--close_modal[data-v-0f6c2e43],.icon--close_modal svg[data-v-0f6c2e43]{width:16px;height:16px}.icon--colors[data-v-0f6c2e43],.icon--colors svg[data-v-0f6c2e43]{width:17px;height:17px}.icon--content-editor[data-v-0f6c2e43],.icon--content-editor svg[data-v-0f6c2e43]{width:14px;height:13px}.icon--crop[data-v-0f6c2e43],.icon--crop svg[data-v-0f6c2e43]{width:16px;height:18px}.icon--download[data-v-0f6c2e43],.icon--download svg[data-v-0f6c2e43]{width:12px;height:16px}.icon--drag[data-v-0f6c2e43],.icon--drag svg[data-v-0f6c2e43]{width:8px;height:17px}.icon--dropdown_default[data-v-0f6c2e43],.icon--dropdown_default svg[data-v-0f6c2e43]{width:9px;height:5px}.icon--dropdown_module[data-v-0f6c2e43],.icon--dropdown_module svg[data-v-0f6c2e43]{width:10px;height:6px}.icon--edit[data-v-0f6c2e43],.icon--edit svg[data-v-0f6c2e43]{width:13px;height:13px}.icon--edit_large[data-v-0f6c2e43],.icon--edit_large svg[data-v-0f6c2e43]{width:14px;height:14px}.icon--editor[data-v-0f6c2e43],.icon--editor svg[data-v-0f6c2e43]{width:14px;height:13px}.icon--expand[data-v-0f6c2e43],.icon--expand svg[data-v-0f6c2e43]{width:10px;height:10px}.icon--fix-grid[data-v-0f6c2e43],.icon--fix-grid svg[data-v-0f6c2e43]{width:18px;height:14px}.icon--flex-grid[data-v-0f6c2e43],.icon--flex-grid svg[data-v-0f6c2e43]{width:18px;height:17px}.icon--google-sign-in[data-v-0f6c2e43],.icon--google-sign-in svg[data-v-0f6c2e43]{width:23px;height:24px}.icon--image-text[data-v-0f6c2e43],.icon--image-text svg[data-v-0f6c2e43]{width:30px;height:13px}.icon--image[data-v-0f6c2e43],.icon--image svg[data-v-0f6c2e43]{width:19px;height:15px}.icon--info[data-v-0f6c2e43],.icon--info svg[data-v-0f6c2e43]{width:21px;height:21px}.icon--location[data-v-0f6c2e43],.icon--location svg[data-v-0f6c2e43]{width:12px;height:16px}.icon--media-grid[data-v-0f6c2e43],.icon--media-grid svg[data-v-0f6c2e43]{width:12px;height:12px}.icon--media-list[data-v-0f6c2e43],.icon--media-list svg[data-v-0f6c2e43]{width:16px;height:10px}.icon--more-dots[data-v-0f6c2e43],.icon--more-dots svg[data-v-0f6c2e43]{width:14px;height:4px}.icon--pagination_left[data-v-0f6c2e43],.icon--pagination_left svg[data-v-0f6c2e43],.icon--pagination_right[data-v-0f6c2e43],.icon--pagination_right svg[data-v-0f6c2e43]{width:9px;height:15px}.icon--preferences[data-v-0f6c2e43],.icon--preferences svg[data-v-0f6c2e43]{width:26px;height:16px}.icon--preview-desktop[data-v-0f6c2e43],.icon--preview-desktop svg[data-v-0f6c2e43]{width:39px;height:30px}.icon--preview-mobile[data-v-0f6c2e43],.icon--preview-mobile svg[data-v-0f6c2e43]{width:12px;height:18px}.icon--preview-tablet-h[data-v-0f6c2e43],.icon--preview-tablet-h svg[data-v-0f6c2e43]{width:27px;height:20px}.icon--preview-tablet-v[data-v-0f6c2e43],.icon--preview-tablet-v svg[data-v-0f6c2e43]{width:20px;height:27px}.icon--preview[data-v-0f6c2e43],.icon--preview svg[data-v-0f6c2e43]{width:22px;height:14px}.icon--publish[data-v-0f6c2e43],.icon--publish svg[data-v-0f6c2e43]{width:22px;height:15px}.icon--quote[data-v-0f6c2e43],.icon--quote svg[data-v-0f6c2e43]{width:16px;height:13px}.icon--revision-compare[data-v-0f6c2e43],.icon--revision-compare svg[data-v-0f6c2e43],.icon--revision-single[data-v-0f6c2e43],.icon--revision-single svg[data-v-0f6c2e43]{width:23px;height:16px}.icon--search[data-v-0f6c2e43],.icon--search svg[data-v-0f6c2e43]{width:20px;height:20px}.icon--slideshow[data-v-0f6c2e43],.icon--slideshow svg[data-v-0f6c2e43]{width:20px;height:16px}.icon--star-feature[data-v-0f6c2e43],.icon--star-feature_active[data-v-0f6c2e43],.icon--star-feature_active svg[data-v-0f6c2e43],.icon--star-feature svg[data-v-0f6c2e43]{width:20px;height:19px}.icon--text-2col[data-v-0f6c2e43],.icon--text-2col svg[data-v-0f6c2e43]{width:26px;height:13px}.icon--text[data-v-0f6c2e43],.icon--text svg[data-v-0f6c2e43]{width:17px;height:13px}.icon--trash[data-v-0f6c2e43],.icon--trash svg[data-v-0f6c2e43]{width:15px;height:17px}.icon--video[data-v-0f6c2e43],.icon--video svg[data-v-0f6c2e43]{width:23px;height:23px}.icon--website[data-v-0f6c2e43],.icon--website svg[data-v-0f6c2e43]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-0f6c2e43],.icon--wysiwyg_anchor svg[data-v-0f6c2e43]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-0f6c2e43],.icon--wysiwyg_bold svg[data-v-0f6c2e43]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-0f6c2e43],.icon--wysiwyg_header-2[data-v-0f6c2e43],.icon--wysiwyg_header-3 svg[data-v-0f6c2e43],.icon--wysiwyg_header-3[data-v-0f6c2e43],.icon--wysiwyg_header-4 svg[data-v-0f6c2e43],.icon--wysiwyg_header-4[data-v-0f6c2e43],.icon--wysiwyg_header-5 svg[data-v-0f6c2e43],.icon--wysiwyg_header-5[data-v-0f6c2e43],.icon--wysiwyg_header-6 svg[data-v-0f6c2e43],.icon--wysiwyg_header-6[data-v-0f6c2e43],.icon--wysiwyg_header[data-v-0f6c2e43],.icon--wysiwyg_header svg[data-v-0f6c2e43]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-0f6c2e43],.icon--wysiwyg_italic svg[data-v-0f6c2e43]{width:10px;height:13px}.icon--wysiwyg_link[data-v-0f6c2e43],.icon--wysiwyg_link svg[data-v-0f6c2e43]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-0f6c2e43],.icon--wysiwyg_underline svg[data-v-0f6c2e43]{width:12px;height:13px}.icon--ae[data-v-0f6c2e43],.icon--ae svg[data-v-0f6c2e43],.icon--ai[data-v-0f6c2e43],.icon--ai svg[data-v-0f6c2e43],.icon--ase[data-v-0f6c2e43],.icon--ase svg[data-v-0f6c2e43]{width:20px;height:26px}.icon--cut[data-v-0f6c2e43],.icon--cut svg[data-v-0f6c2e43],.icon--dir[data-v-0f6c2e43],.icon--dir_protected[data-v-0f6c2e43],.icon--dir_protected svg[data-v-0f6c2e43],.icon--dir_shared[data-v-0f6c2e43],.icon--dir_shared svg[data-v-0f6c2e43],.icon--dir svg[data-v-0f6c2e43]{width:26px;height:21px}.icon--dmg[data-v-0f6c2e43],.icon--dmg svg[data-v-0f6c2e43],.icon--doc[data-v-0f6c2e43],.icon--doc svg[data-v-0f6c2e43],.icon--eps[data-v-0f6c2e43],.icon--eps svg[data-v-0f6c2e43],.icon--fla[data-v-0f6c2e43],.icon--fla svg[data-v-0f6c2e43],.icon--fnt[data-v-0f6c2e43],.icon--fnt svg[data-v-0f6c2e43],.icon--gen[data-v-0f6c2e43],.icon--gen svg[data-v-0f6c2e43],.icon--html[data-v-0f6c2e43],.icon--html svg[data-v-0f6c2e43],.icon--img[data-v-0f6c2e43],.icon--img svg[data-v-0f6c2e43],.icon--indd[data-v-0f6c2e43],.icon--indd svg[data-v-0f6c2e43],.icon--key[data-v-0f6c2e43],.icon--key svg[data-v-0f6c2e43],.icon--merlin[data-v-0f6c2e43],.icon--merlin svg[data-v-0f6c2e43]{width:20px;height:26px}.icon--net[data-v-0f6c2e43],.icon--net svg[data-v-0f6c2e43]{width:26px;height:21px}.icon--numbers[data-v-0f6c2e43],.icon--numbers svg[data-v-0f6c2e43],.icon--pages[data-v-0f6c2e43],.icon--pages svg[data-v-0f6c2e43],.icon--pdf[data-v-0f6c2e43],.icon--pdf svg[data-v-0f6c2e43],.icon--ppt[data-v-0f6c2e43],.icon--ppt svg[data-v-0f6c2e43],.icon--psd[data-v-0f6c2e43],.icon--psd svg[data-v-0f6c2e43]{width:20px;height:26px}.icon--site[data-v-0f6c2e43],.icon--site svg[data-v-0f6c2e43]{width:26px;height:21px}.icon--slide[data-v-0f6c2e43],.icon--slide svg[data-v-0f6c2e43],.icon--snd[data-v-0f6c2e43],.icon--snd svg[data-v-0f6c2e43],.icon--sql[data-v-0f6c2e43],.icon--sql svg[data-v-0f6c2e43],.icon--swf[data-v-0f6c2e43],.icon--swf svg[data-v-0f6c2e43],.icon--txt[data-v-0f6c2e43],.icon--txt svg[data-v-0f6c2e43],.icon--vid[data-v-0f6c2e43],.icon--vid svg[data-v-0f6c2e43],.icon--xls[data-v-0f6c2e43],.icon--xls svg[data-v-0f6c2e43],.icon--zip[data-v-0f6c2e43],.icon--zip svg[data-v-0f6c2e43]{width:20px;height:26px}.container[data-v-0f6c2e43]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-0f6c2e43]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-0f6c2e43]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-0f6c2e43]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-0f6c2e43]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-0f6c2e43]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-0f6c2e43]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-0f6c2e43]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-0f6c2e43]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-0f6c2e43]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-0f6c2e43]{width:auto}}.editorSidebar[data-v-0f6c2e43]{margin:20px 0 20px 0;position:relative;overflow:hidden;height:calc(100% - 40px)}.editorSidebar__item[data-v-0f6c2e43],.editorSidebar__list[data-v-0f6c2e43]{padding:0 10px 0 20px;overflow-y:scroll;position:absolute;top:0;bottom:60px;left:0;right:0}.editorSidebar__list[data-v-0f6c2e43]{height:calc(100% - 60px)}.editorSidebar__title[data-v-0f6c2e43]{padding:15px 0 10px 0;display:-webkit-box;display:-ms-flexbox;display:flex}.editorSidebar__body[data-v-0f6c2e43]{border:1px solid #e5e5e5;border-radius:2px;background:#fff;padding:15px}.editorSidebar__counter[data-v-0f6c2e43]{border:1px solid #e5e5e5;border-radius:50%;height:26px;width:26px;text-align:center;display:inline-block;line-height:25px;margin-right:10px;background:#fff;color:#8c8c8c;-webkit-font-feature-settings:"kern";font-feature-settings:"kern";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.dropdown .editorSidebar__counter[data-v-0f6c2e43]{cursor:pointer}.dropdown--active .editorSidebar__counter[data-v-0f6c2e43],.editorSidebar__counter[data-v-0f6c2e43]:hover{color:#262626;border-color:#262626}.editorSidebar__blockTitle[data-v-0f6c2e43],h4[data-v-0f6c2e43]{font-weight:600}.editorSidebar__blockTitle[data-v-0f6c2e43]{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.editorSidebar__blockTitle .dropdown[data-v-0f6c2e43]{display:inline-block}.editorSidebar__actions[data-v-0f6c2e43]{position:absolute;width:100%;left:0;bottom:0;padding:20px 10px 0 20px;background:#f2f2f2;display:-webkit-box;display:-ms-flexbox;display:flex}.editorSidebar__actions button[data-v-0f6c2e43]{width:calc(50% - 10px)}.editorSidebar__actions button+button[data-v-0f6c2e43]{margin-left:20px}.editorSidebar__actions button.button--validate[data-v-0f6c2e43]:last-child{width:100%;margin-left:0}.editorSidebar__button[data-v-0f6c2e43]{background-color:transparent;-webkit-appearance:none;cursor:pointer;font-size:1em;outline:none;margin:0;border:0 none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;letter-spacing:inherit;cursor:move;display:block;width:100%;text-align:left;background:#fff;border-radius:2px;margin-bottom:10px;height:60px;line-height:60px;padding:0 20px;border:1px solid #e5e5e5;color:#8c8c8c}.editorSidebar__button .icon[data-v-0f6c2e43]{margin-left:-20px;min-width:65px;text-align:center;color:#a6a6a6;height:58px}.editorSidebar__button[data-v-0f6c2e43]:focus,.editorSidebar__button[data-v-0f6c2e43]:hover{color:#262626;border-color:#ccc}.editorSidebar__button:focus .icon[data-v-0f6c2e43],.editorSidebar__button:hover .icon[data-v-0f6c2e43]{color:#262626}.icon--add,.icon--add svg{width:10px;height:10px}.icon--arrow-external,.icon--arrow-external svg{width:8px;height:8px}.icon--arrow-sort,.icon--arrow-sort svg{width:9px;height:11px}.icon--check,.icon--check svg{width:11px;height:11px}.icon--close_icon,.icon--close_icon svg{width:10px;height:10px}.icon--close_modal,.icon--close_modal svg{width:16px;height:16px}.icon--colors,.icon--colors svg{width:17px;height:17px}.icon--content-editor,.icon--content-editor svg{width:14px;height:13px}.icon--crop,.icon--crop svg{width:16px;height:18px}.icon--download,.icon--download svg{width:12px;height:16px}.icon--drag,.icon--drag svg{width:8px;height:17px}.icon--dropdown_default,.icon--dropdown_default svg{width:9px;height:5px}.icon--dropdown_module,.icon--dropdown_module svg{width:10px;height:6px}.icon--edit,.icon--edit svg{width:13px;height:13px}.icon--edit_large,.icon--edit_large svg{width:14px;height:14px}.icon--editor,.icon--editor svg{width:14px;height:13px}.icon--expand,.icon--expand svg{width:10px;height:10px}.icon--fix-grid,.icon--fix-grid svg{width:18px;height:14px}.icon--flex-grid,.icon--flex-grid svg{width:18px;height:17px}.icon--google-sign-in,.icon--google-sign-in svg{width:23px;height:24px}.icon--image-text,.icon--image-text svg{width:30px;height:13px}.icon--image,.icon--image svg{width:19px;height:15px}.icon--info,.icon--info svg{width:21px;height:21px}.icon--location,.icon--location svg{width:12px;height:16px}.icon--media-grid,.icon--media-grid svg{width:12px;height:12px}.icon--media-list,.icon--media-list svg{width:16px;height:10px}.icon--more-dots,.icon--more-dots svg{width:14px;height:4px}.icon--pagination_left,.icon--pagination_left svg,.icon--pagination_right,.icon--pagination_right svg{width:9px;height:15px}.icon--preferences,.icon--preferences svg{width:26px;height:16px}.icon--preview-desktop,.icon--preview-desktop svg{width:39px;height:30px}.icon--preview-mobile,.icon--preview-mobile svg{width:12px;height:18px}.icon--preview-tablet-h,.icon--preview-tablet-h svg{width:27px;height:20px}.icon--preview-tablet-v,.icon--preview-tablet-v svg{width:20px;height:27px}.icon--preview,.icon--preview svg{width:22px;height:14px}.icon--publish,.icon--publish svg{width:22px;height:15px}.icon--quote,.icon--quote svg{width:16px;height:13px}.icon--revision-compare,.icon--revision-compare svg,.icon--revision-single,.icon--revision-single svg{width:23px;height:16px}.icon--search,.icon--search svg{width:20px;height:20px}.icon--slideshow,.icon--slideshow svg{width:20px;height:16px}.icon--star-feature,.icon--star-feature_active,.icon--star-feature_active svg,.icon--star-feature svg{width:20px;height:19px}.icon--text-2col,.icon--text-2col svg{width:26px;height:13px}.icon--text,.icon--text svg{width:17px;height:13px}.icon--trash,.icon--trash svg{width:15px;height:17px}.icon--video,.icon--video svg{width:23px;height:23px}.icon--website,.icon--website svg{width:26px;height:21px}.icon--wysiwyg_anchor,.icon--wysiwyg_anchor svg{width:18px;height:18px}.icon--wysiwyg_bold,.icon--wysiwyg_bold svg{width:12px;height:13px}.icon--wysiwyg_header,.icon--wysiwyg_header-2,.icon--wysiwyg_header-2 svg,.icon--wysiwyg_header-3,.icon--wysiwyg_header-3 svg,.icon--wysiwyg_header-4,.icon--wysiwyg_header-4 svg,.icon--wysiwyg_header-5,.icon--wysiwyg_header-5 svg,.icon--wysiwyg_header-6,.icon--wysiwyg_header-6 svg,.icon--wysiwyg_header svg{width:18px;height:18px}.icon--wysiwyg_italic,.icon--wysiwyg_italic svg{width:10px;height:13px}.icon--wysiwyg_link,.icon--wysiwyg_link svg{width:21px;height:10px}.icon--wysiwyg_underline,.icon--wysiwyg_underline svg{width:12px;height:13px}.icon--ae,.icon--ae svg,.icon--ai,.icon--ai svg,.icon--ase,.icon--ase svg{width:20px;height:26px}.icon--cut,.icon--cut svg,.icon--dir,.icon--dir_protected,.icon--dir_protected svg,.icon--dir_shared,.icon--dir_shared svg,.icon--dir svg{width:26px;height:21px}.icon--dmg,.icon--dmg svg,.icon--doc,.icon--doc svg,.icon--eps,.icon--eps svg,.icon--fla,.icon--fla svg,.icon--fnt,.icon--fnt svg,.icon--gen,.icon--gen svg,.icon--html,.icon--html svg,.icon--img,.icon--img svg,.icon--indd,.icon--indd svg,.icon--key,.icon--key svg,.icon--merlin,.icon--merlin svg{width:20px;height:26px}.icon--net,.icon--net svg{width:26px;height:21px}.icon--numbers,.icon--numbers svg,.icon--pages,.icon--pages svg,.icon--pdf,.icon--pdf svg,.icon--ppt,.icon--ppt svg,.icon--psd,.icon--psd svg{width:20px;height:26px}.icon--site,.icon--site svg{width:26px;height:21px}.icon--slide,.icon--slide svg,.icon--snd,.icon--snd svg,.icon--sql,.icon--sql svg,.icon--swf,.icon--swf svg,.icon--txt,.icon--txt svg,.icon--vid,.icon--vid svg,.icon--xls,.icon--xls svg,.icon--zip,.icon--zip svg{width:20px;height:26px}.container{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full{width:auto}}@media screen and (min-width:1540px){.container--full{width:auto}}.editorSidebar__body .block__body>.browserField,.editorSidebar__body .block__body>.media,.editorSidebar__body .block__body>.slideshow{margin-left:-15px;margin-right:-15px;border:0 none}.editorSidebar__body .block__body>.browserField:last-child,.editorSidebar__body .block__body>.media:last-child,.editorSidebar__body .block__body>.slideshow:last-child{margin-bottom:-15px}.icon--add[data-v-2fa81c14],.icon--add svg[data-v-2fa81c14]{width:10px;height:10px}.icon--arrow-external[data-v-2fa81c14],.icon--arrow-external svg[data-v-2fa81c14]{width:8px;height:8px}.icon--arrow-sort[data-v-2fa81c14],.icon--arrow-sort svg[data-v-2fa81c14]{width:9px;height:11px}.icon--check[data-v-2fa81c14],.icon--check svg[data-v-2fa81c14]{width:11px;height:11px}.icon--close_icon[data-v-2fa81c14],.icon--close_icon svg[data-v-2fa81c14]{width:10px;height:10px}.icon--close_modal[data-v-2fa81c14],.icon--close_modal svg[data-v-2fa81c14]{width:16px;height:16px}.icon--colors[data-v-2fa81c14],.icon--colors svg[data-v-2fa81c14]{width:17px;height:17px}.icon--content-editor[data-v-2fa81c14],.icon--content-editor svg[data-v-2fa81c14]{width:14px;height:13px}.icon--crop[data-v-2fa81c14],.icon--crop svg[data-v-2fa81c14]{width:16px;height:18px}.icon--download[data-v-2fa81c14],.icon--download svg[data-v-2fa81c14]{width:12px;height:16px}.icon--drag[data-v-2fa81c14],.icon--drag svg[data-v-2fa81c14]{width:8px;height:17px}.icon--dropdown_default[data-v-2fa81c14],.icon--dropdown_default svg[data-v-2fa81c14]{width:9px;height:5px}.icon--dropdown_module[data-v-2fa81c14],.icon--dropdown_module svg[data-v-2fa81c14]{width:10px;height:6px}.icon--edit[data-v-2fa81c14],.icon--edit svg[data-v-2fa81c14]{width:13px;height:13px}.icon--edit_large[data-v-2fa81c14],.icon--edit_large svg[data-v-2fa81c14]{width:14px;height:14px}.icon--editor[data-v-2fa81c14],.icon--editor svg[data-v-2fa81c14]{width:14px;height:13px}.icon--expand[data-v-2fa81c14],.icon--expand svg[data-v-2fa81c14]{width:10px;height:10px}.icon--fix-grid[data-v-2fa81c14],.icon--fix-grid svg[data-v-2fa81c14]{width:18px;height:14px}.icon--flex-grid[data-v-2fa81c14],.icon--flex-grid svg[data-v-2fa81c14]{width:18px;height:17px}.icon--google-sign-in[data-v-2fa81c14],.icon--google-sign-in svg[data-v-2fa81c14]{width:23px;height:24px}.icon--image-text[data-v-2fa81c14],.icon--image-text svg[data-v-2fa81c14]{width:30px;height:13px}.icon--image[data-v-2fa81c14],.icon--image svg[data-v-2fa81c14]{width:19px;height:15px}.icon--info[data-v-2fa81c14],.icon--info svg[data-v-2fa81c14]{width:21px;height:21px}.icon--location[data-v-2fa81c14],.icon--location svg[data-v-2fa81c14]{width:12px;height:16px}.icon--media-grid[data-v-2fa81c14],.icon--media-grid svg[data-v-2fa81c14]{width:12px;height:12px}.icon--media-list[data-v-2fa81c14],.icon--media-list svg[data-v-2fa81c14]{width:16px;height:10px}.icon--more-dots[data-v-2fa81c14],.icon--more-dots svg[data-v-2fa81c14]{width:14px;height:4px}.icon--pagination_left[data-v-2fa81c14],.icon--pagination_left svg[data-v-2fa81c14],.icon--pagination_right[data-v-2fa81c14],.icon--pagination_right svg[data-v-2fa81c14]{width:9px;height:15px}.icon--preferences[data-v-2fa81c14],.icon--preferences svg[data-v-2fa81c14]{width:26px;height:16px}.icon--preview-desktop[data-v-2fa81c14],.icon--preview-desktop svg[data-v-2fa81c14]{width:39px;height:30px}.icon--preview-mobile[data-v-2fa81c14],.icon--preview-mobile svg[data-v-2fa81c14]{width:12px;height:18px}.icon--preview-tablet-h[data-v-2fa81c14],.icon--preview-tablet-h svg[data-v-2fa81c14]{width:27px;height:20px}.icon--preview-tablet-v[data-v-2fa81c14],.icon--preview-tablet-v svg[data-v-2fa81c14]{width:20px;height:27px}.icon--preview[data-v-2fa81c14],.icon--preview svg[data-v-2fa81c14]{width:22px;height:14px}.icon--publish[data-v-2fa81c14],.icon--publish svg[data-v-2fa81c14]{width:22px;height:15px}.icon--quote[data-v-2fa81c14],.icon--quote svg[data-v-2fa81c14]{width:16px;height:13px}.icon--revision-compare[data-v-2fa81c14],.icon--revision-compare svg[data-v-2fa81c14],.icon--revision-single[data-v-2fa81c14],.icon--revision-single svg[data-v-2fa81c14]{width:23px;height:16px}.icon--search[data-v-2fa81c14],.icon--search svg[data-v-2fa81c14]{width:20px;height:20px}.icon--slideshow[data-v-2fa81c14],.icon--slideshow svg[data-v-2fa81c14]{width:20px;height:16px}.icon--star-feature[data-v-2fa81c14],.icon--star-feature_active[data-v-2fa81c14],.icon--star-feature_active svg[data-v-2fa81c14],.icon--star-feature svg[data-v-2fa81c14]{width:20px;height:19px}.icon--text-2col[data-v-2fa81c14],.icon--text-2col svg[data-v-2fa81c14]{width:26px;height:13px}.icon--text[data-v-2fa81c14],.icon--text svg[data-v-2fa81c14]{width:17px;height:13px}.icon--trash[data-v-2fa81c14],.icon--trash svg[data-v-2fa81c14]{width:15px;height:17px}.icon--video[data-v-2fa81c14],.icon--video svg[data-v-2fa81c14]{width:23px;height:23px}.icon--website[data-v-2fa81c14],.icon--website svg[data-v-2fa81c14]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-2fa81c14],.icon--wysiwyg_anchor svg[data-v-2fa81c14]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-2fa81c14],.icon--wysiwyg_bold svg[data-v-2fa81c14]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-2fa81c14],.icon--wysiwyg_header-2[data-v-2fa81c14],.icon--wysiwyg_header-3 svg[data-v-2fa81c14],.icon--wysiwyg_header-3[data-v-2fa81c14],.icon--wysiwyg_header-4 svg[data-v-2fa81c14],.icon--wysiwyg_header-4[data-v-2fa81c14],.icon--wysiwyg_header-5 svg[data-v-2fa81c14],.icon--wysiwyg_header-5[data-v-2fa81c14],.icon--wysiwyg_header-6 svg[data-v-2fa81c14],.icon--wysiwyg_header-6[data-v-2fa81c14],.icon--wysiwyg_header[data-v-2fa81c14],.icon--wysiwyg_header svg[data-v-2fa81c14]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-2fa81c14],.icon--wysiwyg_italic svg[data-v-2fa81c14]{width:10px;height:13px}.icon--wysiwyg_link[data-v-2fa81c14],.icon--wysiwyg_link svg[data-v-2fa81c14]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-2fa81c14],.icon--wysiwyg_underline svg[data-v-2fa81c14]{width:12px;height:13px}.icon--ae[data-v-2fa81c14],.icon--ae svg[data-v-2fa81c14],.icon--ai[data-v-2fa81c14],.icon--ai svg[data-v-2fa81c14],.icon--ase[data-v-2fa81c14],.icon--ase svg[data-v-2fa81c14]{width:20px;height:26px}.icon--cut[data-v-2fa81c14],.icon--cut svg[data-v-2fa81c14],.icon--dir[data-v-2fa81c14],.icon--dir_protected[data-v-2fa81c14],.icon--dir_protected svg[data-v-2fa81c14],.icon--dir_shared[data-v-2fa81c14],.icon--dir_shared svg[data-v-2fa81c14],.icon--dir svg[data-v-2fa81c14]{width:26px;height:21px}.icon--dmg[data-v-2fa81c14],.icon--dmg svg[data-v-2fa81c14],.icon--doc[data-v-2fa81c14],.icon--doc svg[data-v-2fa81c14],.icon--eps[data-v-2fa81c14],.icon--eps svg[data-v-2fa81c14],.icon--fla[data-v-2fa81c14],.icon--fla svg[data-v-2fa81c14],.icon--fnt[data-v-2fa81c14],.icon--fnt svg[data-v-2fa81c14],.icon--gen[data-v-2fa81c14],.icon--gen svg[data-v-2fa81c14],.icon--html[data-v-2fa81c14],.icon--html svg[data-v-2fa81c14],.icon--img[data-v-2fa81c14],.icon--img svg[data-v-2fa81c14],.icon--indd[data-v-2fa81c14],.icon--indd svg[data-v-2fa81c14],.icon--key[data-v-2fa81c14],.icon--key svg[data-v-2fa81c14],.icon--merlin[data-v-2fa81c14],.icon--merlin svg[data-v-2fa81c14]{width:20px;height:26px}.icon--net[data-v-2fa81c14],.icon--net svg[data-v-2fa81c14]{width:26px;height:21px}.icon--numbers[data-v-2fa81c14],.icon--numbers svg[data-v-2fa81c14],.icon--pages[data-v-2fa81c14],.icon--pages svg[data-v-2fa81c14],.icon--pdf[data-v-2fa81c14],.icon--pdf svg[data-v-2fa81c14],.icon--ppt[data-v-2fa81c14],.icon--ppt svg[data-v-2fa81c14],.icon--psd[data-v-2fa81c14],.icon--psd svg[data-v-2fa81c14]{width:20px;height:26px}.icon--site[data-v-2fa81c14],.icon--site svg[data-v-2fa81c14]{width:26px;height:21px}.icon--slide[data-v-2fa81c14],.icon--slide svg[data-v-2fa81c14],.icon--snd[data-v-2fa81c14],.icon--snd svg[data-v-2fa81c14],.icon--sql[data-v-2fa81c14],.icon--sql svg[data-v-2fa81c14],.icon--swf[data-v-2fa81c14],.icon--swf svg[data-v-2fa81c14],.icon--txt[data-v-2fa81c14],.icon--txt svg[data-v-2fa81c14],.icon--vid[data-v-2fa81c14],.icon--vid svg[data-v-2fa81c14],.icon--xls[data-v-2fa81c14],.icon--xls svg[data-v-2fa81c14],.icon--zip[data-v-2fa81c14],.icon--zip svg[data-v-2fa81c14]{width:20px;height:26px}.container[data-v-2fa81c14]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-2fa81c14]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-2fa81c14]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-2fa81c14]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-2fa81c14]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-2fa81c14]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-2fa81c14]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-2fa81c14]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-2fa81c14]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-2fa81c14]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-2fa81c14]{width:auto}}.editorIframe[data-v-2fa81c14]{cursor:pointer}.editorIframe iframe[data-v-2fa81c14]{width:100%;overflow:hidden;display:block}.editorIframe__empty[data-v-2fa81c14]{position:absolute;left:0;right:0;top:0;bottom:0;text-align:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:no-wrap;flex-wrap:no-wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:rgba(38,38,38,.5);background-color:rgba(20,141,219,.05);border:1px solid rgba(20,141,219,.33)}.editor__preview--dark .editorIframe__empty[data-v-2fa81c14]{color:hsla(0,0%,100%,.75);background-color:rgba(20,141,219,.2);border:1px solid rgba(20,141,219,.5)}.icon--add[data-v-3082648e],.icon--add svg[data-v-3082648e]{width:10px;height:10px}.icon--arrow-external[data-v-3082648e],.icon--arrow-external svg[data-v-3082648e]{width:8px;height:8px}.icon--arrow-sort[data-v-3082648e],.icon--arrow-sort svg[data-v-3082648e]{width:9px;height:11px}.icon--check[data-v-3082648e],.icon--check svg[data-v-3082648e]{width:11px;height:11px}.icon--close_icon[data-v-3082648e],.icon--close_icon svg[data-v-3082648e]{width:10px;height:10px}.icon--close_modal[data-v-3082648e],.icon--close_modal svg[data-v-3082648e]{width:16px;height:16px}.icon--colors[data-v-3082648e],.icon--colors svg[data-v-3082648e]{width:17px;height:17px}.icon--content-editor[data-v-3082648e],.icon--content-editor svg[data-v-3082648e]{width:14px;height:13px}.icon--crop[data-v-3082648e],.icon--crop svg[data-v-3082648e]{width:16px;height:18px}.icon--download[data-v-3082648e],.icon--download svg[data-v-3082648e]{width:12px;height:16px}.icon--drag[data-v-3082648e],.icon--drag svg[data-v-3082648e]{width:8px;height:17px}.icon--dropdown_default[data-v-3082648e],.icon--dropdown_default svg[data-v-3082648e]{width:9px;height:5px}.icon--dropdown_module[data-v-3082648e],.icon--dropdown_module svg[data-v-3082648e]{width:10px;height:6px}.icon--edit[data-v-3082648e],.icon--edit svg[data-v-3082648e]{width:13px;height:13px}.icon--edit_large[data-v-3082648e],.icon--edit_large svg[data-v-3082648e]{width:14px;height:14px}.icon--editor[data-v-3082648e],.icon--editor svg[data-v-3082648e]{width:14px;height:13px}.icon--expand[data-v-3082648e],.icon--expand svg[data-v-3082648e]{width:10px;height:10px}.icon--fix-grid[data-v-3082648e],.icon--fix-grid svg[data-v-3082648e]{width:18px;height:14px}.icon--flex-grid[data-v-3082648e],.icon--flex-grid svg[data-v-3082648e]{width:18px;height:17px}.icon--google-sign-in[data-v-3082648e],.icon--google-sign-in svg[data-v-3082648e]{width:23px;height:24px}.icon--image-text[data-v-3082648e],.icon--image-text svg[data-v-3082648e]{width:30px;height:13px}.icon--image[data-v-3082648e],.icon--image svg[data-v-3082648e]{width:19px;height:15px}.icon--info[data-v-3082648e],.icon--info svg[data-v-3082648e]{width:21px;height:21px}.icon--location[data-v-3082648e],.icon--location svg[data-v-3082648e]{width:12px;height:16px}.icon--media-grid[data-v-3082648e],.icon--media-grid svg[data-v-3082648e]{width:12px;height:12px}.icon--media-list[data-v-3082648e],.icon--media-list svg[data-v-3082648e]{width:16px;height:10px}.icon--more-dots[data-v-3082648e],.icon--more-dots svg[data-v-3082648e]{width:14px;height:4px}.icon--pagination_left[data-v-3082648e],.icon--pagination_left svg[data-v-3082648e],.icon--pagination_right[data-v-3082648e],.icon--pagination_right svg[data-v-3082648e]{width:9px;height:15px}.icon--preferences[data-v-3082648e],.icon--preferences svg[data-v-3082648e]{width:26px;height:16px}.icon--preview-desktop[data-v-3082648e],.icon--preview-desktop svg[data-v-3082648e]{width:39px;height:30px}.icon--preview-mobile[data-v-3082648e],.icon--preview-mobile svg[data-v-3082648e]{width:12px;height:18px}.icon--preview-tablet-h[data-v-3082648e],.icon--preview-tablet-h svg[data-v-3082648e]{width:27px;height:20px}.icon--preview-tablet-v[data-v-3082648e],.icon--preview-tablet-v svg[data-v-3082648e]{width:20px;height:27px}.icon--preview[data-v-3082648e],.icon--preview svg[data-v-3082648e]{width:22px;height:14px}.icon--publish[data-v-3082648e],.icon--publish svg[data-v-3082648e]{width:22px;height:15px}.icon--quote[data-v-3082648e],.icon--quote svg[data-v-3082648e]{width:16px;height:13px}.icon--revision-compare[data-v-3082648e],.icon--revision-compare svg[data-v-3082648e],.icon--revision-single[data-v-3082648e],.icon--revision-single svg[data-v-3082648e]{width:23px;height:16px}.icon--search[data-v-3082648e],.icon--search svg[data-v-3082648e]{width:20px;height:20px}.icon--slideshow[data-v-3082648e],.icon--slideshow svg[data-v-3082648e]{width:20px;height:16px}.icon--star-feature[data-v-3082648e],.icon--star-feature_active[data-v-3082648e],.icon--star-feature_active svg[data-v-3082648e],.icon--star-feature svg[data-v-3082648e]{width:20px;height:19px}.icon--text-2col[data-v-3082648e],.icon--text-2col svg[data-v-3082648e]{width:26px;height:13px}.icon--text[data-v-3082648e],.icon--text svg[data-v-3082648e]{width:17px;height:13px}.icon--trash[data-v-3082648e],.icon--trash svg[data-v-3082648e]{width:15px;height:17px}.icon--video[data-v-3082648e],.icon--video svg[data-v-3082648e]{width:23px;height:23px}.icon--website[data-v-3082648e],.icon--website svg[data-v-3082648e]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-3082648e],.icon--wysiwyg_anchor svg[data-v-3082648e]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-3082648e],.icon--wysiwyg_bold svg[data-v-3082648e]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-3082648e],.icon--wysiwyg_header-2[data-v-3082648e],.icon--wysiwyg_header-3 svg[data-v-3082648e],.icon--wysiwyg_header-3[data-v-3082648e],.icon--wysiwyg_header-4 svg[data-v-3082648e],.icon--wysiwyg_header-4[data-v-3082648e],.icon--wysiwyg_header-5 svg[data-v-3082648e],.icon--wysiwyg_header-5[data-v-3082648e],.icon--wysiwyg_header-6 svg[data-v-3082648e],.icon--wysiwyg_header-6[data-v-3082648e],.icon--wysiwyg_header[data-v-3082648e],.icon--wysiwyg_header svg[data-v-3082648e]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-3082648e],.icon--wysiwyg_italic svg[data-v-3082648e]{width:10px;height:13px}.icon--wysiwyg_link[data-v-3082648e],.icon--wysiwyg_link svg[data-v-3082648e]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-3082648e],.icon--wysiwyg_underline svg[data-v-3082648e]{width:12px;height:13px}.icon--ae[data-v-3082648e],.icon--ae svg[data-v-3082648e],.icon--ai[data-v-3082648e],.icon--ai svg[data-v-3082648e],.icon--ase[data-v-3082648e],.icon--ase svg[data-v-3082648e]{width:20px;height:26px}.icon--cut[data-v-3082648e],.icon--cut svg[data-v-3082648e],.icon--dir[data-v-3082648e],.icon--dir_protected[data-v-3082648e],.icon--dir_protected svg[data-v-3082648e],.icon--dir_shared[data-v-3082648e],.icon--dir_shared svg[data-v-3082648e],.icon--dir svg[data-v-3082648e]{width:26px;height:21px}.icon--dmg[data-v-3082648e],.icon--dmg svg[data-v-3082648e],.icon--doc[data-v-3082648e],.icon--doc svg[data-v-3082648e],.icon--eps[data-v-3082648e],.icon--eps svg[data-v-3082648e],.icon--fla[data-v-3082648e],.icon--fla svg[data-v-3082648e],.icon--fnt[data-v-3082648e],.icon--fnt svg[data-v-3082648e],.icon--gen[data-v-3082648e],.icon--gen svg[data-v-3082648e],.icon--html[data-v-3082648e],.icon--html svg[data-v-3082648e],.icon--img[data-v-3082648e],.icon--img svg[data-v-3082648e],.icon--indd[data-v-3082648e],.icon--indd svg[data-v-3082648e],.icon--key[data-v-3082648e],.icon--key svg[data-v-3082648e],.icon--merlin[data-v-3082648e],.icon--merlin svg[data-v-3082648e]{width:20px;height:26px}.icon--net[data-v-3082648e],.icon--net svg[data-v-3082648e]{width:26px;height:21px}.icon--numbers[data-v-3082648e],.icon--numbers svg[data-v-3082648e],.icon--pages[data-v-3082648e],.icon--pages svg[data-v-3082648e],.icon--pdf[data-v-3082648e],.icon--pdf svg[data-v-3082648e],.icon--ppt[data-v-3082648e],.icon--ppt svg[data-v-3082648e],.icon--psd[data-v-3082648e],.icon--psd svg[data-v-3082648e]{width:20px;height:26px}.icon--site[data-v-3082648e],.icon--site svg[data-v-3082648e]{width:26px;height:21px}.icon--slide[data-v-3082648e],.icon--slide svg[data-v-3082648e],.icon--snd[data-v-3082648e],.icon--snd svg[data-v-3082648e],.icon--sql[data-v-3082648e],.icon--sql svg[data-v-3082648e],.icon--swf[data-v-3082648e],.icon--swf svg[data-v-3082648e],.icon--txt[data-v-3082648e],.icon--txt svg[data-v-3082648e],.icon--vid[data-v-3082648e],.icon--vid svg[data-v-3082648e],.icon--xls[data-v-3082648e],.icon--xls svg[data-v-3082648e],.icon--zip[data-v-3082648e],.icon--zip svg[data-v-3082648e]{width:20px;height:26px}.container[data-v-3082648e]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-3082648e]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-3082648e]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-3082648e]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-3082648e]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-3082648e]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-3082648e]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-3082648e]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-3082648e]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-3082648e]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-3082648e]{width:auto}}.editorPreview[data-v-3082648e]{background-color:inherit;color:inherit}.editorPreview.editorPreview--loading[data-v-3082648e]{opacity:0}.editorPreview__content[data-v-3082648e]{position:absolute;top:0;bottom:0;right:0;left:0;padding:20px;overflow-y:scroll;background-color:inherit}.editorPreview__empty[data-v-3082648e]{position:absolute;top:0;bottom:0;right:0;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:inherit;background-color:inherit}.editorPreview__empty[data-v-3082648e]:after{display:block;content:"";position:absolute;top:20px;bottom:20px;right:20px;left:20px;border:1px dashed #d9d9d9}.editorPreview__empty>[data-v-3082648e]{padding:0 40px;font-size:18px;line-height:1.35em;text-align:center;font-weight:400}.editorPreview__empty+.editorPreview__content[data-v-3082648e]{background-color:transparent}.editorPreview__item[data-v-3082648e]{min-height:80px;position:relative;margin-bottom:1px;z-index:1}.editorPreview__item[data-v-3082648e]:after{content:"";border-radius:2px;position:absolute;top:0;right:0;left:0;bottom:0;border:1px solid #e5e5e5;z-index:0;opacity:0}.editorPreview__item[data-v-3082648e]:hover:after{border-color:#e5e5e5;opacity:1}.editorPreview__item--hover[data-v-3082648e]{z-index:2}.editorPreview__item--active[data-v-3082648e]:after,.editorPreview__item--active[data-v-3082648e]:hover:after{border-color:#148ddb;opacity:1}.editorPreview__protector[data-v-3082648e]{position:absolute;left:0;right:0;top:0;bottom:0;cursor:move;z-index:1}.editorPreview__header[data-v-3082648e]{position:absolute;top:20px;right:20px;padding:0;display:none;background-clip:padding-box;z-index:2}.editorPreview__handle[data-v-3082648e]{position:absolute;height:10px;width:40px;left:50%;top:50%;margin-left:-20px;margin-top:-5px;cursor:move;background:repeating-linear-gradient(180deg,#bfbfbf,#bfbfbf 2px,transparent 0,transparent 4px)}.editorPreview__handle[data-v-3082648e]:before{position:absolute;display:block;content:"";background:repeating-linear-gradient(90deg,#f4f9fd,#f4f9fd 2px,transparent 0,transparent 4px);width:100%;height:100%}.editorPreview__item--active .editorPreview__header[data-v-3082648e],.editorPreview__item--hover .editorPreview__header[data-v-3082648e],.editorPreview__item:hover .editorPreview__header[data-v-3082648e]{display:-webkit-box;display:-ms-flexbox;display:flex}.editorPreview__item.sortable-chosen[data-v-3082648e]{opacity:1}.editorPreview__item.sortable-ghost[data-v-3082648e]{opacity:.25}.icon--add[data-v-cc4b6c2e],.icon--add svg[data-v-cc4b6c2e]{width:10px;height:10px}.icon--arrow-external[data-v-cc4b6c2e],.icon--arrow-external svg[data-v-cc4b6c2e]{width:8px;height:8px}.icon--arrow-sort[data-v-cc4b6c2e],.icon--arrow-sort svg[data-v-cc4b6c2e]{width:9px;height:11px}.icon--check[data-v-cc4b6c2e],.icon--check svg[data-v-cc4b6c2e]{width:11px;height:11px}.icon--close_icon[data-v-cc4b6c2e],.icon--close_icon svg[data-v-cc4b6c2e]{width:10px;height:10px}.icon--close_modal[data-v-cc4b6c2e],.icon--close_modal svg[data-v-cc4b6c2e]{width:16px;height:16px}.icon--colors[data-v-cc4b6c2e],.icon--colors svg[data-v-cc4b6c2e]{width:17px;height:17px}.icon--content-editor[data-v-cc4b6c2e],.icon--content-editor svg[data-v-cc4b6c2e]{width:14px;height:13px}.icon--crop[data-v-cc4b6c2e],.icon--crop svg[data-v-cc4b6c2e]{width:16px;height:18px}.icon--download[data-v-cc4b6c2e],.icon--download svg[data-v-cc4b6c2e]{width:12px;height:16px}.icon--drag[data-v-cc4b6c2e],.icon--drag svg[data-v-cc4b6c2e]{width:8px;height:17px}.icon--dropdown_default[data-v-cc4b6c2e],.icon--dropdown_default svg[data-v-cc4b6c2e]{width:9px;height:5px}.icon--dropdown_module[data-v-cc4b6c2e],.icon--dropdown_module svg[data-v-cc4b6c2e]{width:10px;height:6px}.icon--edit[data-v-cc4b6c2e],.icon--edit svg[data-v-cc4b6c2e]{width:13px;height:13px}.icon--edit_large[data-v-cc4b6c2e],.icon--edit_large svg[data-v-cc4b6c2e]{width:14px;height:14px}.icon--editor[data-v-cc4b6c2e],.icon--editor svg[data-v-cc4b6c2e]{width:14px;height:13px}.icon--expand[data-v-cc4b6c2e],.icon--expand svg[data-v-cc4b6c2e]{width:10px;height:10px}.icon--fix-grid[data-v-cc4b6c2e],.icon--fix-grid svg[data-v-cc4b6c2e]{width:18px;height:14px}.icon--flex-grid[data-v-cc4b6c2e],.icon--flex-grid svg[data-v-cc4b6c2e]{width:18px;height:17px}.icon--google-sign-in[data-v-cc4b6c2e],.icon--google-sign-in svg[data-v-cc4b6c2e]{width:23px;height:24px}.icon--image-text[data-v-cc4b6c2e],.icon--image-text svg[data-v-cc4b6c2e]{width:30px;height:13px}.icon--image[data-v-cc4b6c2e],.icon--image svg[data-v-cc4b6c2e]{width:19px;height:15px}.icon--info[data-v-cc4b6c2e],.icon--info svg[data-v-cc4b6c2e]{width:21px;height:21px}.icon--location[data-v-cc4b6c2e],.icon--location svg[data-v-cc4b6c2e]{width:12px;height:16px}.icon--media-grid[data-v-cc4b6c2e],.icon--media-grid svg[data-v-cc4b6c2e]{width:12px;height:12px}.icon--media-list[data-v-cc4b6c2e],.icon--media-list svg[data-v-cc4b6c2e]{width:16px;height:10px}.icon--more-dots[data-v-cc4b6c2e],.icon--more-dots svg[data-v-cc4b6c2e]{width:14px;height:4px}.icon--pagination_left[data-v-cc4b6c2e],.icon--pagination_left svg[data-v-cc4b6c2e],.icon--pagination_right[data-v-cc4b6c2e],.icon--pagination_right svg[data-v-cc4b6c2e]{width:9px;height:15px}.icon--preferences[data-v-cc4b6c2e],.icon--preferences svg[data-v-cc4b6c2e]{width:26px;height:16px}.icon--preview-desktop[data-v-cc4b6c2e],.icon--preview-desktop svg[data-v-cc4b6c2e]{width:39px;height:30px}.icon--preview-mobile[data-v-cc4b6c2e],.icon--preview-mobile svg[data-v-cc4b6c2e]{width:12px;height:18px}.icon--preview-tablet-h[data-v-cc4b6c2e],.icon--preview-tablet-h svg[data-v-cc4b6c2e]{width:27px;height:20px}.icon--preview-tablet-v[data-v-cc4b6c2e],.icon--preview-tablet-v svg[data-v-cc4b6c2e]{width:20px;height:27px}.icon--preview[data-v-cc4b6c2e],.icon--preview svg[data-v-cc4b6c2e]{width:22px;height:14px}.icon--publish[data-v-cc4b6c2e],.icon--publish svg[data-v-cc4b6c2e]{width:22px;height:15px}.icon--quote[data-v-cc4b6c2e],.icon--quote svg[data-v-cc4b6c2e]{width:16px;height:13px}.icon--revision-compare[data-v-cc4b6c2e],.icon--revision-compare svg[data-v-cc4b6c2e],.icon--revision-single[data-v-cc4b6c2e],.icon--revision-single svg[data-v-cc4b6c2e]{width:23px;height:16px}.icon--search[data-v-cc4b6c2e],.icon--search svg[data-v-cc4b6c2e]{width:20px;height:20px}.icon--slideshow[data-v-cc4b6c2e],.icon--slideshow svg[data-v-cc4b6c2e]{width:20px;height:16px}.icon--star-feature[data-v-cc4b6c2e],.icon--star-feature_active[data-v-cc4b6c2e],.icon--star-feature_active svg[data-v-cc4b6c2e],.icon--star-feature svg[data-v-cc4b6c2e]{width:20px;height:19px}.icon--text-2col[data-v-cc4b6c2e],.icon--text-2col svg[data-v-cc4b6c2e]{width:26px;height:13px}.icon--text[data-v-cc4b6c2e],.icon--text svg[data-v-cc4b6c2e]{width:17px;height:13px}.icon--trash[data-v-cc4b6c2e],.icon--trash svg[data-v-cc4b6c2e]{width:15px;height:17px}.icon--video[data-v-cc4b6c2e],.icon--video svg[data-v-cc4b6c2e]{width:23px;height:23px}.icon--website[data-v-cc4b6c2e],.icon--website svg[data-v-cc4b6c2e]{width:26px;height:21px}.icon--wysiwyg_anchor[data-v-cc4b6c2e],.icon--wysiwyg_anchor svg[data-v-cc4b6c2e]{width:18px;height:18px}.icon--wysiwyg_bold[data-v-cc4b6c2e],.icon--wysiwyg_bold svg[data-v-cc4b6c2e]{width:12px;height:13px}.icon--wysiwyg_header-2 svg[data-v-cc4b6c2e],.icon--wysiwyg_header-2[data-v-cc4b6c2e],.icon--wysiwyg_header-3 svg[data-v-cc4b6c2e],.icon--wysiwyg_header-3[data-v-cc4b6c2e],.icon--wysiwyg_header-4 svg[data-v-cc4b6c2e],.icon--wysiwyg_header-4[data-v-cc4b6c2e],.icon--wysiwyg_header-5 svg[data-v-cc4b6c2e],.icon--wysiwyg_header-5[data-v-cc4b6c2e],.icon--wysiwyg_header-6 svg[data-v-cc4b6c2e],.icon--wysiwyg_header-6[data-v-cc4b6c2e],.icon--wysiwyg_header[data-v-cc4b6c2e],.icon--wysiwyg_header svg[data-v-cc4b6c2e]{width:18px;height:18px}.icon--wysiwyg_italic[data-v-cc4b6c2e],.icon--wysiwyg_italic svg[data-v-cc4b6c2e]{width:10px;height:13px}.icon--wysiwyg_link[data-v-cc4b6c2e],.icon--wysiwyg_link svg[data-v-cc4b6c2e]{width:21px;height:10px}.icon--wysiwyg_underline[data-v-cc4b6c2e],.icon--wysiwyg_underline svg[data-v-cc4b6c2e]{width:12px;height:13px}.icon--ae[data-v-cc4b6c2e],.icon--ae svg[data-v-cc4b6c2e],.icon--ai[data-v-cc4b6c2e],.icon--ai svg[data-v-cc4b6c2e],.icon--ase[data-v-cc4b6c2e],.icon--ase svg[data-v-cc4b6c2e]{width:20px;height:26px}.icon--cut[data-v-cc4b6c2e],.icon--cut svg[data-v-cc4b6c2e],.icon--dir[data-v-cc4b6c2e],.icon--dir_protected[data-v-cc4b6c2e],.icon--dir_protected svg[data-v-cc4b6c2e],.icon--dir_shared[data-v-cc4b6c2e],.icon--dir_shared svg[data-v-cc4b6c2e],.icon--dir svg[data-v-cc4b6c2e]{width:26px;height:21px}.icon--dmg[data-v-cc4b6c2e],.icon--dmg svg[data-v-cc4b6c2e],.icon--doc[data-v-cc4b6c2e],.icon--doc svg[data-v-cc4b6c2e],.icon--eps[data-v-cc4b6c2e],.icon--eps svg[data-v-cc4b6c2e],.icon--fla[data-v-cc4b6c2e],.icon--fla svg[data-v-cc4b6c2e],.icon--fnt[data-v-cc4b6c2e],.icon--fnt svg[data-v-cc4b6c2e],.icon--gen[data-v-cc4b6c2e],.icon--gen svg[data-v-cc4b6c2e],.icon--html[data-v-cc4b6c2e],.icon--html svg[data-v-cc4b6c2e],.icon--img[data-v-cc4b6c2e],.icon--img svg[data-v-cc4b6c2e],.icon--indd[data-v-cc4b6c2e],.icon--indd svg[data-v-cc4b6c2e],.icon--key[data-v-cc4b6c2e],.icon--key svg[data-v-cc4b6c2e],.icon--merlin[data-v-cc4b6c2e],.icon--merlin svg[data-v-cc4b6c2e]{width:20px;height:26px}.icon--net[data-v-cc4b6c2e],.icon--net svg[data-v-cc4b6c2e]{width:26px;height:21px}.icon--numbers[data-v-cc4b6c2e],.icon--numbers svg[data-v-cc4b6c2e],.icon--pages[data-v-cc4b6c2e],.icon--pages svg[data-v-cc4b6c2e],.icon--pdf[data-v-cc4b6c2e],.icon--pdf svg[data-v-cc4b6c2e],.icon--ppt[data-v-cc4b6c2e],.icon--ppt svg[data-v-cc4b6c2e],.icon--psd[data-v-cc4b6c2e],.icon--psd svg[data-v-cc4b6c2e]{width:20px;height:26px}.icon--site[data-v-cc4b6c2e],.icon--site svg[data-v-cc4b6c2e]{width:26px;height:21px}.icon--slide[data-v-cc4b6c2e],.icon--slide svg[data-v-cc4b6c2e],.icon--snd[data-v-cc4b6c2e],.icon--snd svg[data-v-cc4b6c2e],.icon--sql[data-v-cc4b6c2e],.icon--sql svg[data-v-cc4b6c2e],.icon--swf[data-v-cc4b6c2e],.icon--swf svg[data-v-cc4b6c2e],.icon--txt[data-v-cc4b6c2e],.icon--txt svg[data-v-cc4b6c2e],.icon--vid[data-v-cc4b6c2e],.icon--vid svg[data-v-cc4b6c2e],.icon--xls[data-v-cc4b6c2e],.icon--xls svg[data-v-cc4b6c2e],.icon--zip[data-v-cc4b6c2e],.icon--zip svg[data-v-cc4b6c2e]{width:20px;height:26px}@font-face{font-family:Inter;font-style:normal;font-weight:400;src:url(../../../assets/admin/fonts/Inter-Regular.bffaed79.woff2) format("woff2"),url(../../../assets/admin/fonts/Inter-Regular.aebfbb3c.woff) format("woff");font-display:swap}@font-face{font-family:Inter;font-style:italic;font-weight:400;src:url(../../../assets/admin/fonts/Inter-Italic.381444ec.woff2) format("woff2"),url(../../../assets/admin/fonts/Inter-Italic.35cf8109.woff) format("woff");font-display:swap}@font-face{font-family:Inter;font-style:normal;font-weight:600;src:url(../../../assets/admin/fonts/Inter-Medium.2e5e0884.woff2) format("woff2"),url(../../../assets/admin/fonts/Inter-Medium.c09fb389.woff) format("woff");font-display:swap}@font-face{font-family:Inter;font-style:italic;font-weight:600;src:url(../../../assets/admin/fonts/Inter-MediumItalic.7a7fd735.woff2) format("woff2"),url(../../../assets/admin/fonts/Inter-MediumItalic.ad6e093c.woff) format("woff");font-display:swap}@font-face{font-family:Inter;font-style:normal;font-weight:700;src:url(../../../assets/admin/fonts/Inter-Bold.34356f6b.woff2) format("woff2"),url(../../../assets/admin/fonts/Inter-Bold.61c493e3.woff) format("woff");font-display:swap}@font-face{font-family:Inter;font-style:italic;font-weight:700;src:url(../../../assets/admin/fonts/Inter-BoldItalic.57acb479.woff2) format("woff2"),url(../../../assets/admin/fonts/Inter-BoldItalic.6fbcf86a.woff) format("woff");font-display:swap}.container[data-v-cc4b6c2e]{margin-right:auto;margin-left:auto}@media screen and (max-width:599px){.container[data-v-cc4b6c2e]{width:auto;padding-right:20px;padding-left:20px}}@media screen and (min-width:600px)and (max-width:849px){.container[data-v-cc4b6c2e]{width:auto;padding-right:30px;padding-left:30px}}@media screen and (min-width:850px)and (max-width:1039px){.container[data-v-cc4b6c2e]{width:auto;padding-right:40px;padding-left:40px}}@media screen and (min-width:1040px)and (max-width:1539px){.container[data-v-cc4b6c2e]{width:auto;padding-right:50px;padding-left:50px}}@media screen and (min-width:1540px){.container[data-v-cc4b6c2e]{width:1540px;padding-right:50px;padding-left:50px}}@media screen and (max-width:599px){.container--full[data-v-cc4b6c2e]{width:auto}}@media screen and (min-width:600px)and (max-width:849px){.container--full[data-v-cc4b6c2e]{width:auto}}@media screen and (min-width:850px)and (max-width:1039px){.container--full[data-v-cc4b6c2e]{width:auto}}@media screen and (min-width:1040px)and (max-width:1539px){.container--full[data-v-cc4b6c2e]{width:auto}}@media screen and (min-width:1540px){.container--full[data-v-cc4b6c2e]{width:auto}}.editor[data-v-cc4b6c2e]{display:block;width:100%;padding:0;position:relative;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;background-color:#fff}.editor__leave[data-v-cc4b6c2e]{position:fixed;right:20px;top:13px;z-index:401}.editor__frame[data-v-cc4b6c2e]{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-orient:vertical;-ms-flex-flow:column nowrap;flex-flow:column nowrap}.editor__frame[data-v-cc4b6c2e],.editor__inner[data-v-cc4b6c2e]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal}.editor__inner[data-v-cc4b6c2e]{position:relative;width:100%;overflow:hidden;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-orient:horizontal;-ms-flex-flow:row nowrap;flex-flow:row nowrap}.editor__sidebar[data-v-cc4b6c2e]{background:#f2f2f2;width:30vw;min-width:400px}@media screen and (max-width:849px){.editor__sidebar[data-v-cc4b6c2e]{display:none}}@media screen and (max-width:849px){.editor__sidebar--mobile[data-v-cc4b6c2e]{display:block}}.editor__resizer[data-v-cc4b6c2e]{width:10px;min-width:10px;cursor:col-resize;background:#f2f2f2;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.editor__resizer span[data-v-cc4b6c2e]{width:2px;height:20px;display:block;background:repeating-linear-gradient(180deg,#bfbfbf,#bfbfbf 2px,transparent 0,transparent 4px);overflow:hidden;margin-left:auto;margin-right:auto}.editor__preview[data-v-cc4b6c2e]{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;position:relative;min-width:300px;color:#8c8c8c}.editor__preview--dark[data-v-cc4b6c2e]{color:#fff} \ No newline at end of file diff --git a/public/assets/admin/js/main-form.40fc23b0.js b/public/assets/admin/js/main-form.40fc23b0.js new file mode 100644 index 0000000..8516ea1 --- /dev/null +++ b/public/assets/admin/js/main-form.40fc23b0.js @@ -0,0 +1,5 @@ +(function(e){function t(t){for(var i,a,s=t[0],l=t[1],c=t[2],d=0,h=[];d=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r,o=!0,a=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}function b(e,t){if(e){if("string"===typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),function(n,a){"object"==R(t)&&"object"==R(e)?e.exports=a():(r=[],i=a,o="function"===typeof i?i.apply(t,r):i,void 0===o||(e.exports=o))}(window,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==R(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=112)}([function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return r}));var i=function(e){C(n,e);var t=A(n);function n(e,i,o){var a;return w(this,n),e=r(e),o&&(e+=" "+JSON.stringify(o)),a=t.call(this,e),a.name="CKEditorError",a.context=i,a.data=o,a}return x(n,[{key:"is",value:function(e){return"CKEditorError"===e}}],[{key:"rethrowUnexpectedError",value:function(e,t){if(e.is&&e.is("CKEditorError"))throw e;var i=new n(e.message,t);throw i.stack=e.stack,i}}]),n}(E(Error));function r(e){var t=e.match(/^([^:]+):/);return t?e+" Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-".concat(t[1],"\n"):e}},function(e,t,n){"use strict";var i,r=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function s(e){for(var t=-1,n=0;n:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}"},function(e,t,n){var i=n(1),r=n(20);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}"},function(e,t,n){var i=n(1),r=n(22);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{z-index:var(--ck-z-modal);position:fixed;top:0}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{top:auto;position:absolute}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{box-shadow:var(--ck-drop-shadow),0 0;border-width:0 1px 1px;border-top-left-radius:0;border-top-right-radius:0}"},function(e,t,n){var i=n(1),r=n(24);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on .ck-tooltip{display:none}.ck.ck-dropdown .ck-dropdown__panel{-webkit-backface-visibility:hidden;display:none;z-index:var(--ck-z-modal);position:absolute}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{top:100%;bottom:auto}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(0.5*var(--ck-icon-size))}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{box-shadow:var(--ck-drop-shadow),0 0;background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}"},function(e,t,n){var i=n(1),r=n(26);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{width:var(--ck-icon-size);height:var(--ck-icon-size);font-size:.8333350694em;will-change:transform}.ck.ck-icon,.ck.ck-icon *{color:inherit;cursor:inherit}.ck.ck-icon :not([fill]){fill:currentColor}"},function(e,t,n){var i=n(1),r=n(28);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports='.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:var(--ck-z-modal)}.ck.ck-tooltip .ck-tooltip__text{display:inline-block}.ck.ck-tooltip .ck-tooltip__text:after{content:"";width:0;height:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%;top:0;transition:opacity .2s ease-in-out .2s}.ck.ck-tooltip .ck-tooltip__text{border-radius:0}.ck-rounded-corners .ck.ck-tooltip .ck-tooltip__text,.ck.ck-tooltip .ck-tooltip__text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-tooltip .ck-tooltip__text{font-size:.9em;line-height:1.5;color:var(--ck-color-tooltip-text);padding:var(--ck-spacing-small) var(--ck-spacing-medium);background:var(--ck-color-tooltip-background);position:relative;left:-50%}.ck.ck-tooltip .ck-tooltip__text:after{transition:opacity .2s ease-in-out .2s;border-style:solid;left:50%}.ck.ck-tooltip.ck-tooltip_s{bottom:calc(-1*var(--ck-tooltip-arrow-size));transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after{top:calc(-1*var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-left-color:transparent;border-bottom-color:var(--ck-color-tooltip-background);border-right-color:transparent;border-top-color:transparent;border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:var(--ck-tooltip-arrow-size);border-top-width:0}.ck.ck-tooltip.ck-tooltip_n{top:calc(-1*var(--ck-tooltip-arrow-size));transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:calc(-1*var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;border-top-color:var(--ck-color-tooltip-background);border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:0;border-right-width:var(--ck-tooltip-arrow-size);border-top-width:var(--ck-tooltip-arrow-size)}'},function(e,t,n){var i=n(1),r=n(30);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-button,a.ck.ck-button{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:block}@media (hover:none){.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:none}}.ck.ck-button,a.ck.ck-button{position:relative;display:inline-flex;align-items:center;justify-content:left}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button:hover .ck-tooltip,a.ck.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck.ck-button:focus:not(:hover) .ck-tooltip,a.ck.ck-button:focus:not(:hover) .ck-tooltip{display:none}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-default-active-shadow)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{white-space:nowrap;cursor:default;vertical-align:middle;padding:var(--ck-spacing-tiny);text-align:center;min-width:var(--ck-ui-component-min-height);min-height:var(--ck-ui-component-min-height);line-height:1;font-size:inherit;border:1px solid transparent;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;-webkit-appearance:none}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{font-size:inherit;font-weight:inherit;color:inherit;cursor:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__icon{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(-1*var(--ck-spacing-small));margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-right:calc(-1*var(--ck-spacing-small));margin-left:var(--ck-spacing-small)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-on-active-shadow)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-action-active-shadow)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}"},function(e,t,n){var i=n(1),r=n(32);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{list-style-type:none;background:var(--ck-color-list-background)}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{min-height:unset;width:100%;text-align:left;border-radius:0;padding:calc(0.2*var(--ck-line-height-base)*var(--ck-font-size-base)) calc(0.4*var(--ck-line-height-base)*var(--ck-font-size-base))}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(1.2*var(--ck-line-height-base)*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{height:1px;width:100%;background:var(--ck-color-base-border)}"},function(e,t,n){var i=n(1),r=n(34);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:1.0769230769em;--ck-switch-button-toggle-spacing:1px;--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2*var(--ck-switch-button-toggle-spacing))}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(2*var(--ck-spacing-large))}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(2*var(--ck-spacing-large))}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{transition:background .4s ease;width:var(--ck-switch-button-toggle-width);background:var(--ck-color-switch-button-off-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(0.5*var(--ck-border-radius))}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{margin:var(--ck-switch-button-toggle-spacing);width:var(--ck-switch-button-toggle-inner-size);height:var(--ck-switch-button-toggle-inner-size);background:var(--ck-color-switch-button-inner-background);transition:all .3s ease}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var(--ck-switch-button-translation))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(-1*var(--ck-switch-button-translation)))}"},function(e,t,n){var i=n(1),r=n(36);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-toolbar-dropdown .ck.ck-toolbar .ck.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar-dropdown .ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}"},function(e,t,n){var i=n(1),r=n(38);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}"},function(e,t,n){var i=n(1),r=n(40);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-toolbar{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-flow:row nowrap;align-items:center}.ck.ck-toolbar>.ck-toolbar__items{display:flex;flex-flow:row wrap;align-items:center;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);padding:0 var(--ck-spacing-small);border:1px solid var(--ck-color-toolbar-border)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;width:1px;min-width:1px;background:var(--ck-color-toolbar-border);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items>*{margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>*,.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{width:100%;margin:0;border-radius:0;border:0}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-right:var(--ck-spacing-small)}"},function(e,t,n){var i=n(1),r=n(42);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}"},function(e,t,n){var i=n(1),r=n(44);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{width:0;height:0;border-style:solid}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:var(--ck-balloon-arrow-height);border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:0}.ck.ck-balloon-panel[class*=arrow_n]:before{border-bottom-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-color:transparent;border-right-color:transparent;border-top-color:transparent}.ck.ck-balloon-panel[class*=arrow_n]:after{border-bottom-color:var(--ck-color-panel-background);margin-top:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:0;border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-top-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent}.ck.ck-balloon-panel[class*=arrow_s]:after{border-top-color:var(--ck-color-panel-background);margin-bottom:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(-1*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{left:50%;margin-left:calc(-1*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{right:25%;margin-right:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{left:25%;margin-left:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{right:25%;margin-right:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}'},function(e,t,n){var i=n(1),r=n(46);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{height:100%;border-right:1px solid var(--ck-color-base-text);margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}"},function(e,t,n){var i=n(1),r=n(48);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck-editor__editable .ck-horizontal-line{display:flow-root}.ck-content hr{margin:15px 0;height:4px;background:#dedede;border:0}"},function(e,t,n){var i=n(1),r=n(50);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#000}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{width:var(--ck-color-grid-tile-size);height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;border:0}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{display:none;color:var(--ck-color-color-grid-check-icon)}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}"},function(e,t,n){var i=n(1),r=n(52);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck .ck-button.ck-color-table__remove-color{display:flex;align-items:center;width:100%}label.ck.ck-color-grid__label{font-weight:unset}.ck .ck-button.ck-color-table__remove-color{padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck .ck-button.ck-color-table__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-base-border)}[dir=ltr] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard)}"},function(e,t,n){var i=n(1),r=n(54);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck-content .text-tiny{font-size:.7em}.ck-content .text-small{font-size:.85em}.ck-content .text-big{font-size:1.4em}.ck-content .text-huge{font-size:1.8em}"},function(e,t){e.exports=".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}"},function(e,t,n){var i=n(1),r=n(57);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports='.ck .ck-widget .ck-widget__type-around__button{display:block;position:absolute;overflow:hidden;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{position:absolute;top:50%;left:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{top:calc(-0.5*var(--ck-widget-outline-thickness));left:min(10%,30px);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(-0.5*var(--ck-widget-outline-thickness));right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;position:absolute;top:1px;left:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;position:absolute;left:0;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(-1*var(--ck-widget-outline-thickness));right:calc(-1*var(--ck-widget-outline-thickness))}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{top:calc(-1*var(--ck-widget-outline-thickness) - 1px);display:block}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(-1*var(--ck-widget-outline-thickness) - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{width:var(--ck-widget-type-around-button-size);height:var(--ck-widget-type-around-button-size);background:var(--ck-color-widget-type-around-button);border-radius:100px;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);opacity:0;pointer-events:none}.ck .ck-widget .ck-widget__type-around__button svg{width:10px;height:8px;transform:translate(-50%,-50%);transition:transform .5s ease;margin-top:1px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{width:calc(var(--ck-widget-type-around-button-size) - 2px);height:calc(var(--ck-widget-type-around-button-size) - 2px);border-radius:100px;background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3))}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{pointer-events:none;height:1px;animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;outline:1px solid hsla(0,0%,100%,.5);background:var(--ck-color-base-text)}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer{opacity:0}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}'},function(e,t,n){var i=n(1),r=n(59);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-resizer-size:10px;--ck-resizer-border-width:1px;--ck-resizer-border-radius:2px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-tooltip-offset:10px;--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover .ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);color:var(--ck-color-resizer-tooltip-text);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);font-size:var(--ck-font-size-tiny);display:block;padding:var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{top:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{top:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-width:var(--ck-widget-outline-thickness);outline-style:solid;outline-color:transparent;transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;background-color:var(--ck-color-widget-editable-focus-background)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{padding:4px;box-sizing:border-box;background-color:transparent;opacity:0;transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;transform:translateY(-100%);left:calc(0px - var(--ck-widget-outline-thickness))}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{width:var(--ck-widget-handler-icon-size);height:var(--ck-widget-handler-icon-size);color:var(--ck-color-widget-drag-handler-icon-color)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover .ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover .ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-focus-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle .ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}"},function(e,t,n){var i=n(1),r=n(61);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view>.ck.ck-label{width:100%;text-overflow:ellipsis;overflow:hidden}"},function(e,t,n){var i=n(1),r=n(63);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=":root{--ck-input-text-width:18em}.ck.ck-input-text{border-radius:0}.ck-rounded-corners .ck.ck-input-text,.ck.ck-input-text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-text{box-shadow:var(--ck-inner-shadow),0 0;background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);min-width:var(--ck-input-text-width);min-height:var(--ck-ui-component-min-height);transition:box-shadow .2s ease-in-out,border .2s ease-in-out}.ck.ck-input-text:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),var(--ck-inner-shadow)}.ck.ck-input-text[readonly]{border:1px solid var(--ck-color-input-disabled-border);background:var(--ck-color-input-disabled-background);color:var(--ck-color-input-disabled-text)}.ck.ck-input-text[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),var(--ck-inner-shadow)}.ck.ck-input-text.ck-error{border-color:var(--ck-color-input-error-border);animation:ck-text-input-shake .3s ease both}.ck.ck-input-text.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),var(--ck-inner-shadow)}@keyframes ck-text-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}"},function(e,t,n){var i=n(1),r=n(65);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-field-view{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}.ck.ck-text-alternative-form{padding:var(--ck-spacing-standard)}.ck.ck-text-alternative-form:focus{outline:none}[dir=ltr] .ck.ck-text-alternative-form>:not(:first-child),[dir=rtl] .ck.ck-text-alternative-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-text-alternative-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-text-alternative-form .ck-labeled-field-view{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-text-alternative-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-text-alternative-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-text-alternative-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-text-alternative-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-text-alternative-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-text-alternative-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(e,t,n){var i=n(1),r=n(67);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck .ck-balloon-rotator__navigation{display:flex;align-items:center;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}"},function(e,t,n){var i=n(1),r=n(69);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);width:100%;height:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}"},function(e,t,n){var i=n(1),r=n(71);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck-content .image{display:table;clear:both;text-align:center;margin:1em auto}.ck-content .image img{display:block;margin:0 auto;max-width:100%;min-width:50px}"},function(e,t,n){var i=n(1),r=n(73);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:#333;background-color:#f7f7f7;padding:.6em;font-size:.75em;outline-offset:-1px}"},function(e,t,n){var i=n(1),r=n(75);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;position:absolute;pointer-events:none;left:0;top:0;outline:1px solid var(--ck-color-resizer)}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{position:absolute;pointer-events:all;width:var(--ck-resizer-size);height:var(--ck-resizer-size);background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{top:var(--ck-resizer-offset);left:var(--ck-resizer-offset);cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{top:var(--ck-resizer-offset);right:var(--ck-resizer-offset);cursor:nesw-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset);cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset);cursor:nesw-resize}"},function(e,t,n){var i=n(1),r=n(77);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck-content .image.image_resized{max-width:100%;display:block;box-sizing:border-box}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}[dir=ltr] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-left:var(--ck-spacing-standard)}.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label{width:4em}"},function(e,t,n){var i=n(1),r=n(79);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=":root{--ck-image-style-spacing:1.5em}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing);max-width:50%}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}"},function(e,t,n){var i=n(1),r=n(81);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button .ck-tooltip{display:none}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__action{border-top-right-radius:unset;border-bottom-right-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__action{border-top-left-radius:unset;border-bottom-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-radius:0}.ck-rounded-corners [dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow,[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:unset;border-bottom-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-top-right-radius:unset;border-bottom-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled){border-left-color:var(--ck-color-split-button-hover-border)}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled){border-right-color:var(--ck-color-split-button-hover-border)}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}"},function(e,t,n){var i=n(1),r=n(83);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-image-upload-form__action-row{margin-top:var(--ck-spacing-standard)}.ck.ck-form__row.ck-image-upload-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-image-upload-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row.ck-image-upload-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}"},function(e,t,n){var i=n(1),r=n(85);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-image-upload__panel{padding:var(--ck-spacing-standard)}.ck.ck-image-upload__ck-finder-button{display:block;width:100%;margin:var(--ck-spacing-standard) auto;border:1px solid #ccc;border-radius:var(--ck-border-radius)}"},function(e,t,n){var i=n(1),r=n(87);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-editor__editable .image{position:relative}.ck.ck-editor__editable .image .ck-progress-bar{position:absolute;top:0;left:0}.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar{height:2px;width:0;background:var(--ck-color-upload-bar-background);transition:width .1s}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}"},function(e,t,n){var i=n(1),r=n(89);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports='.ck-image-upload-complete-icon{display:block;position:absolute;top:10px;right:10px;border-radius:50%}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20px;--ck-image-upload-icon-width:2px}.ck-image-upload-complete-icon{width:var(--ck-image-upload-icon-size);height:var(--ck-image-upload-icon-size);opacity:0;background:var(--ck-color-image-upload-icon-background);animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;animation-fill-mode:forwards,forwards;animation-duration:.5s,.5s;font-size:var(--ck-image-upload-icon-size);animation-delay:0ms,3s}.ck-image-upload-complete-icon:after{left:25%;top:50%;opacity:0;height:0;width:0;transform:scaleX(-1) rotate(135deg);transform-origin:left top;border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);animation-name:ck-upload-complete-icon-check;animation-duration:.5s;animation-delay:.5s;animation-fill-mode:forwards;box-sizing:border-box}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{opacity:1;width:0;height:0}33%{width:.3em;height:0}to{opacity:1;width:.3em;height:.45em}}'},function(e,t,n){var i=n(1),r=n(91);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports='.ck .ck-upload-placeholder-loader{position:absolute;display:flex;align-items:center;justify-content:center;top:0;left:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px}.ck .ck-image-upload-placeholder{width:100%;margin:0}.ck .ck-upload-placeholder-loader{width:100%;height:100%}.ck .ck-upload-placeholder-loader:before{width:var(--ck-upload-placeholder-loader-size);height:var(--ck-upload-placeholder-loader-size);border-radius:50%;border-top:3px solid var(--ck-color-upload-placeholder-loader);border-right:2px solid transparent;animation:ck-upload-placeholder-loader 1s linear infinite}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}'},function(e,t,n){var i=n(1),r=n(93);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form{padding:var(--ck-spacing-standard)}.ck.ck-link-form:focus{outline:none}[dir=ltr] .ck.ck-link-form>:not(:first-child),[dir=rtl] .ck.ck-link-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-link-form .ck-labeled-field-view{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-link-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}.ck.ck-link-form_layout-vertical{padding:0;min-width:var(--ck-input-text-width)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical .ck-button{padding:var(--ck-spacing-standard);margin:0;border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border);width:50%}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin-left:0}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{border:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}"},function(e,t,n){var i=n(1),r=n(95);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions{padding:var(--ck-spacing-standard)}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{padding:0 var(--ck-spacing-medium);color:var(--ck-color-link-default);text-overflow:ellipsis;cursor:pointer;max-width:var(--ck-input-text-width);min-width:3em;text-align:center}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}.ck.ck-link-actions:focus{outline:none}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{min-width:0;max-width:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview):first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview):last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(e,t,n){var i=n(1),r=n(97);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-link-image_icon{position:absolute;top:var(--ck-spacing-medium);right:var(--ck-spacing-medium);width:28px;height:28px;padding:4px;box-sizing:border-box;border-radius:var(--ck-border-radius)}.ck.ck-link-image_icon svg{fill:currentColor}.ck.ck-link-image_icon{color:#fff;background:rgba(0,0,0,.4)}"},function(e,t,n){var i=n(1),r=n(99);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports='.ck-media__wrapper .ck-media__placeholder{display:flex;flex-direction:column;align-items:center}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:block}@media (hover:none){.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:none}}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url{max-width:100%;position:relative}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url:hover .ck-tooltip{visibility:visible;opacity:1}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{overflow:hidden;display:block}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck-media__placeholder__icon *{display:none}.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper>:not(.ck-media__placeholder),.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder{pointer-events:none}:root{--ck-media-embed-placeholder-icon-size:3em;--ck-color-media-embed-placeholder-url-text:#757575;--ck-color-media-embed-placeholder-url-text-hover:var(--ck-color-base-text)}.ck-media__wrapper{margin:0 auto}.ck-media__wrapper .ck-media__placeholder{padding:calc(3*var(--ck-spacing-standard));background:var(--ck-color-base-foreground)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon{min-width:var(--ck-media-embed-placeholder-icon-size);height:var(--ck-media-embed-placeholder-icon-size);margin-bottom:var(--ck-spacing-large);background-position:50%;background-size:cover}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon .ck-icon{width:100%;height:100%}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text{color:var(--ck-color-media-embed-placeholder-url-text);white-space:nowrap;text-align:center;font-style:italic;text-overflow:ellipsis}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:var(--ck-color-media-embed-placeholder-url-text-hover);cursor:pointer;text-decoration:underline}.ck-media__wrapper[data-oembed-url*="open.spotify.com"]{max-width:300px;max-height:380px}.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0yMDYuNDc3IDI2MC45bC0yOC45ODcgMjguOTg3YTUuMjE4IDUuMjE4IDAgMDAzLjc4IDEuNjFoNDkuNjIxYzEuNjk0IDAgMy4xOS0uNzk4IDQuMTQ2LTIuMDM3eiIgZmlsbD0iIzVjODhjNSIvPjxwYXRoIGQ9Ik0yMjYuNzQyIDIyMi45ODhjLTkuMjY2IDAtMTYuNzc3IDcuMTctMTYuNzc3IDE2LjAxNC4wMDcgMi43NjIuNjYzIDUuNDc0IDIuMDkzIDcuODc1LjQzLjcwMy44MyAxLjQwOCAxLjE5IDIuMTA3LjMzMy41MDIuNjUgMS4wMDUuOTUgMS41MDguMzQzLjQ3Ny42NzMuOTU3Ljk4OCAxLjQ0IDEuMzEgMS43NjkgMi41IDMuNTAyIDMuNjM3IDUuMTY4Ljc5MyAxLjI3NSAxLjY4MyAyLjY0IDIuNDY2IDMuOTkgMi4zNjMgNC4wOTQgNC4wMDcgOC4wOTIgNC42IDEzLjkxNHYuMDEyYy4xODIuNDEyLjUxNi42NjYuODc5LjY2Ny40MDMtLjAwMS43NjgtLjMxNC45My0uNzk5LjYwMy01Ljc1NiAyLjIzOC05LjcyOSA0LjU4NS0xMy43OTQuNzgyLTEuMzUgMS42NzMtMi43MTUgMi40NjUtMy45OSAxLjEzNy0xLjY2NiAyLjMyOC0zLjQgMy42MzgtNS4xNjkuMzE1LS40ODIuNjQ1LS45NjIuOTg4LTEuNDM5LjMtLjUwMy42MTctMS4wMDYuOTUtMS41MDguMzU5LS43Ljc2LTEuNDA0IDEuMTktMi4xMDcgMS40MjYtMi40MDIgMi01LjExNCAyLjAwNC03Ljg3NSAwLTguODQ0LTcuNTExLTE2LjAxNC0xNi43NzYtMTYuMDE0eiIgZmlsbD0iI2RkNGIzZSIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48ZWxsaXBzZSByeT0iNS41NjQiIHJ4PSI1LjgyOCIgY3k9IjIzOS4wMDIiIGN4PSIyMjYuNzQyIiBmaWxsPSIjODAyZDI3IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0xOTAuMzAxIDIzNy4yODNjLTQuNjcgMC04LjQ1NyAzLjg1My04LjQ1NyA4LjYwNnMzLjc4NiA4LjYwNyA4LjQ1NyA4LjYwN2MzLjA0MyAwIDQuODA2LS45NTggNi4zMzctMi41MTYgMS41My0xLjU1NyAyLjA4Ny0zLjkxMyAyLjA4Ny02LjI5IDAtLjM2Mi0uMDIzLS43MjItLjA2NC0xLjA3OWgtOC4yNTd2My4wNDNoNC44NWMtLjE5Ny43NTktLjUzMSAxLjQ1LTEuMDU4IDEuOTg2LS45NDIuOTU4LTIuMDI4IDEuNTQ4LTMuOTAxIDEuNTQ4LTIuODc2IDAtNS4yMDgtMi4zNzItNS4yMDgtNS4yOTkgMC0yLjkyNiAyLjMzMi01LjI5OSA1LjIwOC01LjI5OSAxLjM5OSAwIDIuNjE4LjQwNyAzLjU4NCAxLjI5M2wyLjM4MS0yLjM4YzAtLjAwMi0uMDAzLS4wMDQtLjAwNC0uMDA1LTEuNTg4LTEuNTI0LTMuNjItMi4yMTUtNS45NTUtMi4yMTV6bTQuNDMgNS42NmwuMDAzLjAwNnYtLjAwM3oiIGZpbGw9IiNmZmYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxNS4xODQgMjUxLjkyOWwtNy45OCA3Ljk3OSAyOC40NzcgMjguNDc1YTUuMjMzIDUuMjMzIDAgMDAuNDQ5LTIuMTIzdi0zMS4xNjVjLS40NjkuNjc1LS45MzQgMS4zNDktMS4zODIgMi4wMDUtLjc5MiAxLjI3NS0xLjY4MiAyLjY0LTIuNDY1IDMuOTktMi4zNDcgNC4wNjUtMy45ODIgOC4wMzgtNC41ODUgMTMuNzk0LS4xNjIuNDg1LS41MjcuNzk4LS45My43OTktLjM2My0uMDAxLS42OTctLjI1NS0uODc5LS42Njd2LS4wMTJjLS41OTMtNS44MjItMi4yMzctOS44Mi00LjYtMTMuOTE0LS43ODMtMS4zNS0xLjY3My0yLjcxNS0yLjQ2Ni0zLjk5LTEuMTM3LTEuNjY2LTIuMzI3LTMuNC0zLjYzNy01LjE2OWwtLjAwMi0uMDAzeiIgZmlsbD0iI2MzYzNjMyIvPjxwYXRoIGQ9Ik0yMTIuOTgzIDI0OC40OTVsLTM2Ljk1MiAzNi45NTN2LjgxMmE1LjIyNyA1LjIyNyAwIDAwNS4yMzggNS4yMzhoMS4wMTVsMzUuNjY2LTM1LjY2NmExMzYuMjc1IDEzNi4yNzUgMCAwMC0yLjc2NC0zLjkgMzcuNTc1IDM3LjU3NSAwIDAwLS45ODktMS40NCAzNS4xMjcgMzUuMTI3IDAgMDAtLjk1LTEuNTA4Yy0uMDgzLS4xNjItLjE3Ni0uMzI2LS4yNjQtLjQ4OXoiIGZpbGw9IiNmZGRjNGYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxMS45OTggMjYxLjA4M2wtNi4xNTIgNi4xNTEgMjQuMjY0IDI0LjI2NGguNzgxYTUuMjI3IDUuMjI3IDAgMDA1LjIzOS01LjIzOHYtMS4wNDV6IiBmaWxsPSIjZmZmIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjwvZz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder{background:#4268b3}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik05NjcuNDg0IDBINTYuNTE3QzI1LjMwNCAwIDAgMjUuMzA0IDAgNTYuNTE3djkxMC45NjZDMCA5OTguNjk0IDI1LjI5NyAxMDI0IDU2LjUyMiAxMDI0SDU0N1Y2MjhINDE0VjQ3M2gxMzNWMzU5LjAyOWMwLTEzMi4yNjIgODAuNzczLTIwNC4yODIgMTk4Ljc1Ni0yMDQuMjgyIDU2LjUxMyAwIDEwNS4wODYgNC4yMDggMTE5LjI0NCA2LjA4OVYyOTlsLTgxLjYxNi4wMzdjLTYzLjk5MyAwLTc2LjM4NCAzMC40OTItNzYuMzg0IDc1LjIzNlY0NzNoMTUzLjQ4N2wtMTkuOTg2IDE1NUg3MDd2Mzk2aDI2MC40ODRjMzEuMjEzIDAgNTYuNTE2LTI1LjMwMyA1Ni41MTYtNTYuNTE2VjU2LjUxNUMxMDI0IDI1LjMwMyA5OTguNjk3IDAgOTY3LjQ4NCAwIiBmaWxsPSIjRkZGRkZFIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#cdf}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder{background:linear-gradient(-135deg,#1400c7,#b800b1,#f50000)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTA0IiBoZWlnaHQ9IjUwNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIC4xNTloNTAzLjg0MVY1MDMuOTRIMHoiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48cGF0aCBkPSJNMjUxLjkyMS4xNTljLTY4LjQxOCAwLTc2Ljk5Ny4yOS0xMDMuODY3IDEuNTE2LTI2LjgxNCAxLjIyMy00NS4xMjcgNS40ODItNjEuMTUxIDExLjcxLTE2LjU2NiA2LjQzNy0zMC42MTUgMTUuMDUxLTQ0LjYyMSAyOS4wNTYtMTQuMDA1IDE0LjAwNi0yMi42MTkgMjguMDU1LTI5LjA1NiA0NC42MjEtNi4yMjggMTYuMDI0LTEwLjQ4NyAzNC4zMzctMTEuNzEgNjEuMTUxQy4yOSAxNzUuMDgzIDAgMTgzLjY2MiAwIDI1Mi4wOGMwIDY4LjQxNy4yOSA3Ni45OTYgMS41MTYgMTAzLjg2NiAxLjIyMyAyNi44MTQgNS40ODIgNDUuMTI3IDExLjcxIDYxLjE1MSA2LjQzNyAxNi41NjYgMTUuMDUxIDMwLjYxNSAyOS4wNTYgNDQuNjIxIDE0LjAwNiAxNC4wMDUgMjguMDU1IDIyLjYxOSA0NC42MjEgMjkuMDU3IDE2LjAyNCA2LjIyNyAzNC4zMzcgMTAuNDg2IDYxLjE1MSAxMS43MDkgMjYuODcgMS4yMjYgMzUuNDQ5IDEuNTE2IDEwMy44NjcgMS41MTYgNjguNDE3IDAgNzYuOTk2LS4yOSAxMDMuODY2LTEuNTE2IDI2LjgxNC0xLjIyMyA0NS4xMjctNS40ODIgNjEuMTUxLTExLjcwOSAxNi41NjYtNi40MzggMzAuNjE1LTE1LjA1MiA0NC42MjEtMjkuMDU3IDE0LjAwNS0xNC4wMDYgMjIuNjE5LTI4LjA1NSAyOS4wNTctNDQuNjIxIDYuMjI3LTE2LjAyNCAxMC40ODYtMzQuMzM3IDExLjcwOS02MS4xNTEgMS4yMjYtMjYuODcgMS41MTYtMzUuNDQ5IDEuNTE2LTEwMy44NjYgMC02OC40MTgtLjI5LTc2Ljk5Ny0xLjUxNi0xMDMuODY3LTEuMjIzLTI2LjgxNC01LjQ4Mi00NS4xMjctMTEuNzA5LTYxLjE1MS02LjQzOC0xNi41NjYtMTUuMDUyLTMwLjYxNS0yOS4wNTctNDQuNjIxLTE0LjAwNi0xNC4wMDUtMjguMDU1LTIyLjYxOS00NC42MjEtMjkuMDU2LTE2LjAyNC02LjIyOC0zNC4zMzctMTAuNDg3LTYxLjE1MS0xMS43MUMzMjguOTE3LjQ0OSAzMjAuMzM4LjE1OSAyNTEuOTIxLjE1OXptMCA0NS4zOTFjNjcuMjY1IDAgNzUuMjMzLjI1NyAxMDEuNzk3IDEuNDY5IDI0LjU2MiAxLjEyIDM3LjkwMSA1LjIyNCA0Ni43NzggOC42NzQgMTEuNzU5IDQuNTcgMjAuMTUxIDEwLjAyOSAyOC45NjYgMTguODQ1IDguODE2IDguODE1IDE0LjI3NSAxNy4yMDcgMTguODQ1IDI4Ljk2NiAzLjQ1IDguODc3IDcuNTU0IDIyLjIxNiA4LjY3NCA0Ni43NzggMS4yMTIgMjYuNTY0IDEuNDY5IDM0LjUzMiAxLjQ2OSAxMDEuNzk4IDAgNjcuMjY1LS4yNTcgNzUuMjMzLTEuNDY5IDEwMS43OTctMS4xMiAyNC41NjItNS4yMjQgMzcuOTAxLTguNjc0IDQ2Ljc3OC00LjU3IDExLjc1OS0xMC4wMjkgMjAuMTUxLTE4Ljg0NSAyOC45NjYtOC44MTUgOC44MTYtMTcuMjA3IDE0LjI3NS0yOC45NjYgMTguODQ1LTguODc3IDMuNDUtMjIuMjE2IDcuNTU0LTQ2Ljc3OCA4LjY3NC0yNi41NiAxLjIxMi0zNC41MjcgMS40NjktMTAxLjc5NyAxLjQ2OS02Ny4yNzEgMC03NS4yMzctLjI1Ny0xMDEuNzk4LTEuNDY5LTI0LjU2Mi0xLjEyLTM3LjkwMS01LjIyNC00Ni43NzgtOC42NzQtMTEuNzU5LTQuNTctMjAuMTUxLTEwLjAyOS0yOC45NjYtMTguODQ1LTguODE1LTguODE1LTE0LjI3NS0xNy4yMDctMTguODQ1LTI4Ljk2Ni0zLjQ1LTguODc3LTcuNTU0LTIyLjIxNi04LjY3NC00Ni43NzgtMS4yMTItMjYuNTY0LTEuNDY5LTM0LjUzMi0xLjQ2OS0xMDEuNzk3IDAtNjcuMjY2LjI1Ny03NS4yMzQgMS40NjktMTAxLjc5OCAxLjEyLTI0LjU2MiA1LjIyNC0zNy45MDEgOC42NzQtNDYuNzc4IDQuNTctMTEuNzU5IDEwLjAyOS0yMC4xNTEgMTguODQ1LTI4Ljk2NiA4LjgxNS04LjgxNiAxNy4yMDctMTQuMjc1IDI4Ljk2Ni0xOC44NDUgOC44NzctMy40NSAyMi4yMTYtNy41NTQgNDYuNzc4LTguNjc0IDI2LjU2NC0xLjIxMiAzNC41MzItMS40NjkgMTAxLjc5OC0xLjQ2OXoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48cGF0aCBkPSJNMjUxLjkyMSAzMzYuMDUzYy00Ni4zNzggMC04My45NzQtMzcuNTk2LTgzLjk3NC04My45NzMgMC00Ni4zNzggMzcuNTk2LTgzLjk3NCA4My45NzQtODMuOTc0IDQ2LjM3NyAwIDgzLjk3MyAzNy41OTYgODMuOTczIDgzLjk3NCAwIDQ2LjM3Ny0zNy41OTYgODMuOTczLTgzLjk3MyA4My45NzN6bTAtMjEzLjMzOGMtNzEuNDQ3IDAtMTI5LjM2NSA1Ny45MTgtMTI5LjM2NSAxMjkuMzY1IDAgNzEuNDQ2IDU3LjkxOCAxMjkuMzY0IDEyOS4zNjUgMTI5LjM2NCA3MS40NDYgMCAxMjkuMzY0LTU3LjkxOCAxMjkuMzY0LTEyOS4zNjQgMC03MS40NDctNTcuOTE4LTEyOS4zNjUtMTI5LjM2NC0xMjkuMzY1ek00MTYuNjI3IDExNy42MDRjMCAxNi42OTYtMTMuNTM1IDMwLjIzLTMwLjIzMSAzMC4yMy0xNi42OTUgMC0zMC4yMy0xMy41MzQtMzAuMjMtMzAuMjMgMC0xNi42OTYgMTMuNTM1LTMwLjIzMSAzMC4yMy0zMC4yMzEgMTYuNjk2IDAgMzAuMjMxIDEzLjUzNSAzMC4yMzEgMzAuMjMxIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#ffe0fe}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder{background:linear-gradient(90deg,#71c6f4,#0d70a5)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgNDAwIj48cGF0aCBkPSJNNDAwIDIwMGMwIDExMC41LTg5LjUgMjAwLTIwMCAyMDBTMCAzMTAuNSAwIDIwMCA4OS41IDAgMjAwIDBzMjAwIDg5LjUgMjAwIDIwMHpNMTYzLjQgMzA1LjVjODguNyAwIDEzNy4yLTczLjUgMTM3LjItMTM3LjIgMC0yLjEgMC00LjItLjEtNi4yIDkuNC02LjggMTcuNi0xNS4zIDI0LjEtMjUtOC42IDMuOC0xNy45IDYuNC0yNy43IDcuNiAxMC02IDE3LjYtMTUuNCAyMS4yLTI2LjctOS4zIDUuNS0xOS42IDkuNS0zMC42IDExLjctOC44LTkuNC0yMS4zLTE1LjItMzUuMi0xNS4yLTI2LjYgMC00OC4yIDIxLjYtNDguMiA0OC4yIDAgMy44LjQgNy41IDEuMyAxMS00MC4xLTItNzUuNi0yMS4yLTk5LjQtNTAuNC00LjEgNy4xLTYuNSAxNS40LTYuNSAyNC4yIDAgMTYuNyA4LjUgMzEuNSAyMS41IDQwLjEtNy45LS4yLTE1LjMtMi40LTIxLjgtNnYuNmMwIDIzLjQgMTYuNiA0Mi44IDM4LjcgNDcuMy00IDEuMS04LjMgMS43LTEyLjcgMS43LTMuMSAwLTYuMS0uMy05LjEtLjkgNi4xIDE5LjIgMjMuOSAzMy4xIDQ1IDMzLjUtMTYuNSAxMi45LTM3LjMgMjAuNi01OS45IDIwLjYtMy45IDAtNy43LS4yLTExLjUtLjcgMjEuMSAxMy44IDQ2LjUgMjEuOCA3My43IDIxLjgiIGZpbGw9IiNmZmYiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text{color:#b8e6ff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}'},function(e,t,n){var i=n(1),r=n(101);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck.ck-media-form{display:flex;align-items:flex-start;flex-direction:row;flex-wrap:nowrap}.ck.ck-media-form .ck-labeled-field-view{display:inline-block}.ck.ck-media-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-media-form{flex-wrap:wrap}.ck.ck-media-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-media-form .ck-button{flex-basis:50%}}.ck.ck-media-form{padding:var(--ck-spacing-standard)}.ck.ck-media-form:focus{outline:none}[dir=ltr] .ck.ck-media-form>:not(:first-child),[dir=rtl] .ck.ck-media-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-media-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-media-form .ck-labeled-field-view{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-media-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-media-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-media-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-media-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-media-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-media-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-media-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(e,t,n){var i=n(1),r=n(103);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck-content .media{clear:both;margin:1em 0;display:block;min-width:15em}"},function(e,t,n){var i=n(1),r=n(105);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=":root{--ck-color-table-focused-cell-background:rgba(158,207,250,0.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}"},function(e,t,n){var i=n(1),r=n(107);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2);padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0}.ck .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{width:var(--ck-insert-table-dropdown-box-width);height:var(--ck-insert-table-dropdown-box-height);margin:var(--ck-insert-table-dropdown-box-margin);border:1px solid var(--ck-color-base-border);border-radius:1px}.ck .ck-insert-table-dropdown-grid-box.ck-on{border-color:var(--ck-color-focus-border);background:var(--ck-color-focus-outer-shadow)}"},function(e,t,n){var i=n(1),r=n(109);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=':root{--ck-table-selected-cell-background:rgba(158,207,250,0.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{position:relative;caret-color:transparent;outline:unset;box-shadow:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{content:"";pointer-events:none;background-color:var(--ck-table-selected-cell-background);position:absolute;top:0;left:0;right:0;bottom:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget_selected{outline:unset}'},function(e,t,n){var i=n(1),r=n(111);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(r,o),e.exports=r.locals||{}},function(e,t){e.exports=".ck-content .table{margin:1em auto;display:table}.ck-content .table table{border-collapse:collapse;border-spacing:0;width:100%;height:100%;border:1px double #b3b3b3}.ck-content .table table td,.ck-content .table table th{min-width:2em;padding:.4em;border:1px solid #bfbfbf}.ck-content .table table th{font-weight:700;background:hsla(0,0%,0%,5%)}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}"},function(e,t,n){"use strict";var i=a.mark(al),r=a.mark(sl),o=a.mark(lf);n.r(t);var c=n(3),d=c.a.Symbol,h=Object.prototype,f=h.hasOwnProperty,p=h.toString,m=d?d.toStringTag:void 0,g=function(e){var t=f.call(e,m),n=e[m];try{e[m]=void 0;var i=!0}catch(e){}var r=p.call(e);return i&&(t?e[m]=n:delete e[m]),r},b=Object.prototype.toString,y=function(e){return b.call(e)},_=d?d.toStringTag:void 0,E=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":_&&_ in Object(e)?g(e):y(e)},O=function(e,t){return function(n){return e(t(n))}},M=O(Object.getPrototypeOf,Object),I=function(e){return null!=e&&"object"==R(e)},D=Function.prototype,L=Object.prototype,z=D.toString,j=L.hasOwnProperty,V=z.call(Object),B=function(e){if(!I(e)||"[object Object]"!=E(e))return!1;var t=M(e);if(null===t)return!0;var n=j.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&z.call(n)==V},F=function(){this.__data__=[],this.size=0},U=function(e,t){return e===t||e!=e&&t!=t},H=function(e,t){for(var n=e.length;n--;)if(U(e[n][0],t))return n;return-1},$=Array.prototype.splice,W=function(e){var t=this.__data__,n=H(t,e);return!(n<0)&&(n==t.length-1?t.pop():$.call(t,n,1),--this.size,!0)},q=function(e){var t=this.__data__,n=H(t,e);return n<0?void 0:t[n][1]},Y=function(e){return H(this.__data__,e)>-1},G=function(e,t){var n=this.__data__,i=H(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},rt={};rt["[object Float32Array]"]=rt["[object Float64Array]"]=rt["[object Int8Array]"]=rt["[object Int16Array]"]=rt["[object Int32Array]"]=rt["[object Uint8Array]"]=rt["[object Uint8ClampedArray]"]=rt["[object Uint16Array]"]=rt["[object Uint32Array]"]=!0,rt["[object Arguments]"]=rt["[object Array]"]=rt["[object ArrayBuffer]"]=rt["[object Boolean]"]=rt["[object DataView]"]=rt["[object Date]"]=rt["[object Error]"]=rt["[object Function]"]=rt["[object Map]"]=rt["[object Number]"]=rt["[object Object]"]=rt["[object RegExp]"]=rt["[object Set]"]=rt["[object String]"]=rt["[object WeakMap]"]=!1;var ot=function(e){return I(e)&&it(e.length)&&!!rt[E(e)]},at=function(e){return function(t){return e(t)}},st=n(5),lt=st.a&&st.a.isTypedArray,ct=lt?at(lt):ot,ut=Object.prototype.hasOwnProperty,dt=function(e,t){var n=Xe(e),i=!n&&Ze(e),r=!n&&!i&&Object(et.a)(e),o=!n&&!i&&!r&&ct(e),a=n||i||r||o,s=a?Ye(e.length,String):[],l=s.length;for(var c in e)!t&&!ut.call(e,c)||a&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||nt(c,l))||s.push(c);return s},ht=Object.prototype,ft=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ht)},vt=O(Object.keys,Object),pt=Object.prototype.hasOwnProperty,mt=function(e){if(!ft(e))return vt(e);var t=[];for(var n in Object(e))pt.call(e,n)&&"constructor"!=n&&t.push(n);return t},gt=function(e){return null!=e&&it(e.length)&&!ie(e)},kt=function(e){return gt(e)?dt(e):mt(e)},bt=function(e,t){return e&&qe(t,kt(t),e)},yt=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},wt=Object.prototype.hasOwnProperty,_t=function(e){if(!ne(e))return yt(e);var t=ft(e),n=[];for(var i in e)("constructor"!=i||!t&&wt.call(e,i))&&n.push(i);return n},xt=function(e){return gt(e)?dt(e,!0):_t(e)},Ct=function(e,t){return e&&qe(t,xt(t),e)},At=n(8),Tt=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n3&&void 0!==arguments[3]&&arguments[3];if(B(t))this._setObjectToTarget(e,t,i);else{var r=t.split(".");t=r.pop();var o,a=k(r);try{for(a.s();!(o=a.n()).done;){var s=o.value;B(e[s])||(e[s]={}),e=e[s]}}catch(l){a.e(l)}finally{a.f()}if(B(n))return B(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,n,i);i&&void 0!==e[t]||(e[t]=n)}}},{key:"_getFromSource",value:function(e,t){var n=t.split(".");t=n.pop();var i,r=k(n);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(!B(e[o])){e=null;break}e=e[o]}}catch(a){r.e(a)}finally{r.f()}return e?Mn(e[t]):void 0}},{key:"_setObjectToTarget",value:function(e,t,n){var i=this;Object.keys(t).forEach((function(r){i._setToTarget(e,r,t[r],n)}))}}]),e}();function Mn(e){return En(e,In)}function In(e){return Sn(e)?e:void 0}var Nn=function(){return function e(){e.called=!0}},Rn=function e(t,n){w(this,e),this.source=t,this.name=n,this.path=[],this.stop=Nn(),this.off=Nn()},Dn=new Array(256).fill().map((function(e,t){return("0"+t.toString(16)).slice(-2)}));function Ln(){var e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0,i=4294967296*Math.random()>>>0;return"e"+Dn[e>>0&255]+Dn[e>>8&255]+Dn[e>>16&255]+Dn[e>>24&255]+Dn[t>>0&255]+Dn[t>>8&255]+Dn[t>>16&255]+Dn[t>>24&255]+Dn[n>>0&255]+Dn[n>>8&255]+Dn[n>>16&255]+Dn[n>>24&255]+Dn[i>>0&255]+Dn[i>>8&255]+Dn[i>>16&255]+Dn[i>>24&255]}var zn={get:function(e){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5},jn=(n(6),n(0)),Vn=Symbol("listeningTo"),Bn=Symbol("emitterId"),Fn={on:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.listenTo(this,e,t,n)},once:function(e,t,n){var i=!1;this.listenTo(this,e,(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o3&&void 0!==arguments[3]?arguments[3]:{};this[Vn]||(this[Vn]={});var a=this[Vn];Hn(e)||Un(e);var s=Hn(e);(i=a[s])||(i=a[s]={emitter:e,callbacks:{}}),(r=i.callbacks[t])||(r=i.callbacks[t]=[]),r.push(n),function(e,t){var n=$n(e);if(!n[t]){for(var i=t,r=null,o=[];""!==i&&!n[i];)n[i]={callbacks:[],childEvents:[]},o.push(n[i]),r&&n[i].childEvents.push(r),r=i,i=i.substr(0,i.lastIndexOf(":"));if(""!==i){var a,s=k(o);try{for(s.s();!(a=s.n()).done;){var l=a.value;l.callbacks=n[i].callbacks.slice()}}catch(c){s.e(c)}finally{s.f()}n[i].childEvents.push(r)}}}(e,t);var l,c=Wn(e,t),u=zn.get(o.priority),d={callback:n,priority:u},h=k(c);try{for(h.s();!(l=h.n()).done;){for(var f=l.value,v=!1,p=0;p-1?e(t,n.substr(0,n.lastIndexOf(":"))):null}(this,n),r=arguments.length,o=new Array(r>1?r-1:0),a=1;a1?t-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w(this,e);var i=Gn(t);if(i||(n=t),this._items=[],this._itemMap=new Map,this._idProperty=n.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],i){var r,o=k(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;this._items.push(a),this._itemMap.set(this._getItemIdBeforeAdding(a),a)}}catch(s){o.e(s)}finally{o.f()}}}return x(e,[{key:"add",value:function(e,t){return this.addMany([e],t)}},{key:"addMany",value:function(e,t){if(void 0===t)t=this._items.length;else if(t>this._items.length||t<0)throw new jn.b("collection-add-item-invalid-index: The index passed to Collection#addMany() is invalid.",this);for(var n=0;nh&&u--}}catch(g){d.e(g)}finally{d.f()}var f,v=k(i._skippedIndexesFromExternal);try{for(v.s();!(f=v.n()).done;){var p=f.value;u>=p&&u++}}catch(g){v.e(g)}finally{v.f()}n._bindToExternalToInternalMap.set(r,l),n._bindToInternalToExternalMap.set(l,r),n.add(l,u);for(var m=0;mt&&e.push(t),e}),[])}))}},{key:"_getItemIdBeforeAdding",value:function(e){var t,n=this._idProperty;if(n in e){if(t=e[n],"string"!=typeof t)throw new jn.b("collection-add-invalid-id: This item's id should be a string.",this);if(this.get(t))throw new jn.b("collection-add-item-already-exists: This item already exists in the collection.",this)}else e[n]=t=Ln();return t}},{key:"_remove",value:function(e){var t,n,i,r=!1,o=this._idProperty;if("string"==typeof e?(n=e,i=this._itemMap.get(n),r=!i,i&&(t=this._items.indexOf(i))):"number"==typeof e?(t=e,i=this._items[t],r=!i,i&&(n=i[o])):(i=e,n=i[o],t=this._items.indexOf(i),r=-1==t||!this._itemMap.get(n)),r)throw new jn.b("collection-remove-404: Item not found.",this);this._items.splice(t,1),this._itemMap.delete(n);var a=this._bindToInternalToExternalMap.get(i);return this._bindToInternalToExternalMap.delete(i),this._bindToExternalToInternalMap.delete(a),this.fire("remove",i,t),[i,t]}},{key:Symbol.iterator,value:function(){return this._items[Symbol.iterator]()}},{key:"length",get:function(){return this._items.length}},{key:"first",get:function(){return this._items[0]||null}},{key:"last",get:function(){return this._items[this.length-1]||null}}]),e}();Kn(Jn,Fn);var Qn=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];w(this,e),this._context=t,this._plugins=new Map,this._availablePlugins=new Map;var r,o=k(n);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.pluginName&&this._availablePlugins.set(a.pluginName,a)}}catch(h){o.e(h)}finally{o.f()}this._contextPlugins=new Map;var s,l=k(i);try{for(l.s();!(s=l.n()).done;){var c=v(s.value,2),u=c[0],d=c[1];this._contextPlugins.set(u,d),this._contextPlugins.set(d,u),u.pluginName&&this._availablePlugins.set(u.pluginName,u)}}catch(h){l.e(h)}finally{l.f()}}return x(e,[{key:Symbol.iterator,value:a.mark((function e(){var t,n,i;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=k(this._plugins),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=11;break}if(i=n.value,e.t0="function"==typeof i[0],!e.t0){e.next=9;break}return e.next=9,i;case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t1=e["catch"](1),t.e(e.t1);case 16:return e.prev=16,t.f(),e.finish(16);case 19:case"end":return e.stop()}}),e,this,[[1,13,16,19]])}))},{key:"get",value:function(e){var t=this._plugins.get(e);if(!t){var n="plugincollection-plugin-not-loaded: The requested plugin is not loaded.",i=e;throw"function"==typeof e&&(i=e.pluginName||e.name),new jn.b(n,this._context,{plugin:i})}return t}},{key:"has",value:function(e){return this._plugins.has(e)}},{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this,i=this._context,r=new Set,o=[],a=f(e),s=f(t),l=function(e){var t,n=[],i=k(e);try{for(i.s();!(t=i.n()).done;){var r=t.value;h(r)||n.push(r)}}catch(o){i.e(o)}finally{i.f()}return n.length?n:null}(e);if(l){var c="plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.";return console.error(Object(jn.a)(c),{plugins:l}),Promise.reject(new jn.b(c,i,{plugins:l}))}return Promise.all(a.map(u)).then((function(){return d(o,"init")})).then((function(){return d(o,"afterInit")})).then((function(){return o}));function u(e){if(!s.includes(e)&&!n._plugins.has(e)&&!r.has(e))return function(e){return new Promise((function(a){r.add(e),e.requires&&e.requires.forEach((function(n){var r=h(n);if(e.isContextPlugin&&!r.isContextPlugin)throw new jn.b("plugincollection-context-required: Context plugin can not require plugin which is not a context plugin",null,{plugin:r.name,requiredBy:e.name});if(t.includes(r))throw new jn.b("plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.",i,{plugin:r.name,requiredBy:e.name});u(r)}));var s=n._contextPlugins.get(e)||new e(i);n._add(e,s),o.push(s),a()}))}(e).catch((function(t){throw console.error(Object(jn.a)("plugincollection-load: It was not possible to load the plugin."),{plugin:e}),t}))}function d(e,t){return e.reduce((function(e,i){return i[t]?n._contextPlugins.has(i)?e:e.then(i[t].bind(i)):e}),Promise.resolve())}function h(e){return"function"==typeof e?e:n._availablePlugins.get(e)}function f(e){return e.map((function(e){return h(e)})).filter((function(e){return!!e}))}}},{key:"destroy",value:function(){var e,t=[],n=k(this);try{for(n.s();!(e=n.n()).done;){var i=v(e.value,2),r=i[1];"function"!=typeof r.destroy||this._contextPlugins.has(r)||t.push(r.destroy())}}catch(o){n.e(o)}finally{n.f()}return Promise.all(t)}},{key:"_add",value:function(e,t){this._plugins.set(e,t);var n=e.pluginName;if(n){if(this._plugins.has(n))throw new jn.b("plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.",null,{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:e});this._plugins.set(n,t)}}}]),e}();function Zn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if("number"!=typeof n)throw new jn.b("translation-service-quantity-not-a-number: Expecting `quantity` to be a number.",null,{quantity:n});var i=Object.keys(window.CKEDITOR_TRANSLATIONS).length;1===i&&(e=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]);var r=t.id||t.string;if(0===i||!function(e,t){return!!window.CKEDITOR_TRANSLATIONS[e]&&!!window.CKEDITOR_TRANSLATIONS[e].dictionary[t]}(e,r))return 1!==n?t.plural:t.string;var o=window.CKEDITOR_TRANSLATIONS[e].dictionary,a=window.CKEDITOR_TRANSLATIONS[e].getPluralForm||function(e){return 1===e?0:1};if("string"==typeof o[r])return o[r];var s=Number(a(n));return o[r][s]}Kn(Qn,Fn),window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});var Xn=["ar","fa","he","ku","ug"],ei=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w(this,e),this.uiLanguage=n.uiLanguage||"en",this.contentLanguage=n.contentLanguage||this.uiLanguage,this.uiLanguageDirection=ti(this.uiLanguage),this.contentLanguageDirection=ti(this.contentLanguage),this.t=function(e,n){return t._t(e,n)}}return x(e,[{key:"_t",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Array.isArray(t)||(t=[t]),"string"==typeof e&&(e={string:e});var n=e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,(function(e,n){return n0&&void 0!==arguments[0]?arguments[0]:{includeSelf:!1,parentFirst:!1},t=[],n=e.includeSelf?this:this.parent;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}},{key:"getCommonAncestor",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getAncestors(t),i=e.getAncestors(t),r=0;n[r]==i[r]&&n[r];)r++;return 0===r?null:n[r-1]}},{key:"isBefore",value:function(e){if(this==e)return!1;if(this.root!==e.root)return!1;var t=this.getPath(),n=e.getPath(),i=ii(t,n);switch(i){case"prefix":return!0;case"extension":return!1;default:return t[i]t.data.length)throw new jn.b("view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",this);if(i<0||n+i>t.data.length)throw new jn.b("view-textproxy-wrong-length: Given length value is incorrect.",this);this.data=t.data.substring(n,n+i),this.offsetInText=n}return x(e,[{key:"is",value:function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e}},{key:"getAncestors",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeSelf:!1,parentFirst:!1},t=[],n=e.includeSelf?this.textNode:this.parent;null!==n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}},{key:"offsetSize",get:function(){return this.data.length}},{key:"isPartial",get:function(){return this.data.length!==this.textNode.data.length}},{key:"parent",get:function(){return this.textNode.parent}},{key:"root",get:function(){return this.textNode.root}},{key:"document",get:function(){return this.textNode.document}}]),e}();function li(e){return Gn(e)?new Map(e):function(e){var t=new Map;for(var n in e)t.set(n,e[n]);return t}(e)}var ci=function(){function e(){w(this,e),this._patterns=[],this.add.apply(this,arguments)}return x(e,[{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n0?e:null}},{key:"getElementName",value:function(){if(1!==this._patterns.length)return null;var e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}]),e}();function ui(e,t){if("function"==typeof t)return t(e);var n={};return t.name&&(n.name=function(e,t){return e instanceof RegExp?e.test(t):e===t}(t.name,e.name),!n.name)||t.attributes&&(n.attributes=function(e,t){var n=[];for(var i in e){var r=e[i];if(!t.hasAttribute(i))return null;var o=t.getAttribute(i);if(!0===r)n.push(i);else if(r instanceof RegExp){if(!r.test(o))return null;n.push(i)}else{if(o!==r)return null;n.push(i)}}return n}(t.attributes,e),!n.attributes)?null:!(t.classes&&(n.classes=function(e,t){var n,i=[],r=k(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o instanceof RegExp){var a,s=t.getClassNames(),l=k(s);try{for(l.s();!(a=l.n()).done;){var c=a.value;o.test(c)&&i.push(c)}}catch(u){l.e(u)}finally{l.f()}if(0===i.length)return null}else{if(!t.hasClass(o))return null;i.push(o)}}}catch(u){r.e(u)}finally{r.f()}return i}(t.classes,e),!n.classes))&&!(t.styles&&(n.styles=function(e,t){var n=[];for(var i in e){var r=e[i];if(!t.hasStyle(i))return null;var o=t.getStyle(i);if(r instanceof RegExp){if(!r.test(o))return null;n.push(i)}else{if(o!==r)return null;n.push(i)}}return n}(t.styles,e),!n.styles))&&n}var di=function(e){return"symbol"==R(e)||I(e)&&"[object Symbol]"==E(e)},hi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fi=/^\w*$/,vi=function(e,t){if(Xe(e))return!1;var n=R(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!di(e))||fi.test(e)||!hi.test(e)||null!=t&&e in Object(t)};function pi(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var a=e.apply(this,i);return n.cache=o.set(r,a)||o,a};return n.cache=new(pi.Cache||ze),n}pi.Cache=ze;var mi=pi,gi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ki=/\\(\\)?/g,bi=function(e){var t=mi(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(gi,(function(e,n,i,r){t.push(i?r.replace(ki,"$1"):n||e)})),t})),yi=function(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++nr?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(r);++i0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(qi),Ki=function(e,t){return Gi($i(e,t,Fi),e+"")},Ji=function(e,t,n){if(!ne(n))return!1;var i=R(t);return!!("number"==i?gt(n)&&nt(t,n.length):"string"==i&&t in n)&&U(n[t],e)},Qi=function(e){return Ki((function(t,n){var i=-1,r=n.length,o=r>1?n[r-1]:void 0,a=r>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(r--,o):void 0,a&&Ji(n[0],n[1],a)&&(o=r<3?void 0:o,r=1),t=Object(t);++i1){var n=t.splice(0,t.length-1).join("."),i=Ni(this._styles,n);i&&!Array.from(Object.keys(i)).length&&this.remove(n)}}},{key:"isEmpty",get:function(){var e=Object.entries(this._styles);return!Array.from(e).length}},{key:"size",get:function(){return this.isEmpty?0:this.getStyleNames().length}}]),e}(),nr=function(){function e(){w(this,e),this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}return x(e,[{key:"toNormalizedForm",value:function(e,t,n){if(ne(t))rr(n,ir(e),t);else if(this._normalizers.has(e)){var i=this._normalizers.get(e),r=i(t),o=r.path,a=r.value;rr(n,o,a)}else rr(n,e,t)}},{key:"getNormalized",value:function(e,t){if(!e)return Zi({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){var n=this._extractors.get(e);if("string"==typeof n)return Ni(t,n);var i=n(e,t);if(i)return i}return Ni(t,ir(e))}},{key:"getReducedForm",value:function(e,t){var n=this.getNormalized(e,t);return void 0===n?[]:this._reducers.has(e)?this._reducers.get(e)(n):[[e,n]]}},{key:"getRelatedStyles",value:function(e){return this._consumables.get(e)||[]}},{key:"setNormalizer",value:function(e,t){this._normalizers.set(e,t)}},{key:"setExtractor",value:function(e,t){this._extractors.set(e,t)}},{key:"setReducer",value:function(e,t){this._reducers.set(e,t)}},{key:"setStyleRelation",value:function(e,t){this._mapStyleNames(e,t);var n,i=k(t);try{for(i.s();!(n=i.n()).done;){var r=n.value;this._mapStyleNames(r,[e])}}catch(o){i.e(o)}finally{i.f()}}},{key:"_mapStyleNames",value:function(e,t){var n;this._consumables.has(e)||this._consumables.set(e,[]),(n=this._consumables.get(e)).push.apply(n,u(t))}}]),e}();function ir(e){return e.replace("-",".")}function rr(e,t,n){var i=n;ne(n)&&(i=Zi({},Ni(e,t),n)),er(e,t,i)}var or=function(e){C(n,e);var t=A(n);function n(e,i,r,o){var a;if(w(this,n),a=t.call(this,e),a.name=i,a._attrs=function(e){e=li(e);var t,n=k(e);try{for(n.s();!(t=n.n()).done;){var i=v(t.value,2),r=i[0],o=i[1];null===o?e.delete(r):"string"!=typeof o&&e.set(r,String(o))}}catch(a){n.e(a)}finally{n.f()}return e}(r),a._children=[],o&&a._insertChild(0,o),a._classes=new Set,a._attrs.has("class")){var s=a._attrs.get("class");ar(a._classes,s),a._attrs.delete("class")}return a._styles=new tr(a.document.stylesProcessor),a._attrs.has("style")&&(a._styles.setTo(a._attrs.get("style")),a._attrs.delete("style")),a._customProperties=new Map,T(a)}return x(n,[{key:"is",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e}},{key:"getChild",value:function(e){return this._children[e]}},{key:"getChildIndex",value:function(e){return this._children.indexOf(e)}},{key:"getChildren",value:function(){return this._children[Symbol.iterator]()}},{key:"getAttributeKeys",value:a.mark((function e(){return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(e.t0=this._classes.size>0,!e.t0){e.next=4;break}return e.next=4,"class";case 4:if(e.t1=this._styles.isEmpty,e.t1){e.next=8;break}return e.next=8,"style";case 8:return e.delegateYield(this._attrs.keys(),"t2",9);case 9:case"end":return e.stop()}}),e,this)}))},{key:"getAttributes",value:a.mark((function e(){return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.delegateYield(this._attrs.entries(),"t0",1);case 1:if(e.t1=this._classes.size>0,!e.t1){e.next=5;break}return e.next=5,["class",this.getAttribute("class")];case 5:if(e.t2=this._styles.isEmpty,e.t2){e.next=9;break}return e.next=9,["style",this.getAttribute("style")];case 9:case"end":return e.stop()}}),e,this)}))},{key:"getAttribute",value:function(e){if("class"==e)return this._classes.size>0?u(this._classes).join(" "):void 0;if("style"==e){var t=this._styles.toString();return""==t?void 0:t}return this._attrs.get(e)}},{key:"hasAttribute",value:function(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}},{key:"isSimilar",value:function(e){if(!(e instanceof n))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;var t,i=k(this._attrs);try{for(i.s();!(t=i.n()).done;){var r=v(t.value,2),o=r[0],a=r[1];if(!e._attrs.has(o)||e._attrs.get(o)!==a)return!1}}catch(f){i.e(f)}finally{i.f()}var s,l=k(this._classes);try{for(l.s();!(s=l.n()).done;){var c=s.value;if(!e._classes.has(c))return!1}}catch(f){l.e(f)}finally{l.f()}var u,d=k(this._styles.getStyleNames());try{for(d.s();!(u=d.n()).done;){var h=u.value;if(!e._styles.has(h)||e._styles.getAsString(h)!==this._styles.getAsString(h))return!1}}catch(f){d.e(f)}finally{d.f()}return!0}},{key:"hasClass",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]&&arguments[0],t=[];if(e){var n,i=k(this.getChildren());try{for(i.s();!(n=i.n()).done;){var r=n.value;t.push(r._clone(e))}}catch(a){i.e(a)}finally{i.f()}}var o=new this.constructor(this.document,this.name,this._attrs,t);return o._classes=new Set(this._classes),o._styles.set(this._styles.getNormalized()),o._customProperties=new Map(this._customProperties),o.getFillerOffset=this.getFillerOffset,o}},{key:"_appendChild",value:function(e){return this._insertChild(this.childCount,e)}},{key:"_insertChild",value:function(e,t){this._fireChange("children",this);var n,i=0,r=function(e,t){return"string"==typeof t?[new ai(e,t)]:(Gn(t)||(t=[t]),Array.from(t).map((function(t){return"string"==typeof t?new ai(e,t):t instanceof si?new ai(e,t.data):t})))}(this.document,t),o=k(r);try{for(o.s();!(n=o.n()).done;){var a=n.value;null!==a.parent&&a._remove(),a.parent=this,a.document=this.document,this._children.splice(e,0,a),e++,i++}}catch(s){o.e(s)}finally{o.f()}return i}},{key:"_removeChildren",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._fireChange("children",this);for(var n=e;n0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}},{key:"_addClass",value:function(e){var t=this;this._fireChange("attributes",this),(e=Array.isArray(e)?e:[e]).forEach((function(e){return t._classes.add(e)}))}},{key:"_removeClass",value:function(e){var t=this;this._fireChange("attributes",this),(e=Array.isArray(e)?e:[e]).forEach((function(e){return t._classes.delete(e)}))}},{key:"_setStyle",value:function(e,t){this._fireChange("attributes",this),this._styles.set(e,t)}},{key:"_removeStyle",value:function(e){var t=this;this._fireChange("attributes",this),(e=Array.isArray(e)?e:[e]).forEach((function(e){return t._styles.remove(e)}))}},{key:"_setCustomProperty",value:function(e,t){this._customProperties.set(e,t)}},{key:"_removeCustomProperty",value:function(e){return this._customProperties.delete(e)}},{key:"childCount",get:function(){return this._children.length}},{key:"isEmpty",get:function(){return 0===this._children.length}}]),n}(oi);function ar(e,t){var n=t.split(/\s+/);e.clear(),n.forEach((function(t){return e.add(t)}))}var sr=function(e){C(n,e);var t=A(n);function n(e,i,r,o){var a;return w(this,n),a=t.call(this,e,i,r,o),a.getFillerOffset=lr,a}return x(n,[{key:"is",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}}]),n}(or);function lr(){var e=u(this.getChildren()),t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;var n,i=k(e);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(!r.is("uiElement"))return null}}catch(o){i.e(o)}finally{i.f()}return this.childCount}var cr=Qi((function(e,t){qe(t,xt(t),e)})),ur=Symbol("observableProperties"),dr=Symbol("boundObservables"),hr=Symbol("boundProperties"),fr={set:function(e,t){var n=this;if(ne(e))Object.keys(e).forEach((function(t){n.set(t,e[t])}),this);else{pr(this);var i=this[ur];if(e in this&&!i.has(e))throw new jn.b("observable-set-cannot-override: Cannot override an existing property.",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:function(){return i.get(e)},set:function(t){var n=i.get(e),r=this.fire("set:"+e,e,t,n);void 0===r&&(r=t),n===r&&i.has(e)||(i.set(e,r),this.fire("change:"+e,e,r,n))}}),this[e]=t}},bind:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i1)throw new jn.b("observable-bind-to-no-callback: Binding multiple observables only possible with callback.",this);if(r>1&&n.callback)throw new jn.b("observable-bind-to-extra-callback: Cannot bind multiple properties and use a callback in one binding.",this);n.to.forEach((function(e){if(e.properties.length&&e.properties.length!==r)throw new jn.b("observable-bind-to-properties-length: The number of properties must match.",t);e.properties.length||(e.properties=t._bindProperties)})),this._to=n.to,n.callback&&(this._bindings.get(i[0]).callback=n.callback),e=this._observable,this._to.forEach((function(t){var n,i=e[dr];i.get(t.observable)||e.listenTo(t.observable,"change",(function(r,o){n=i.get(t.observable)[o],n&&n.forEach((function(t){br(e,t.property)}))}))})),function(e){var t;e._bindings.forEach((function(n,i){e._to.forEach((function(r){t=r.properties[n.callback?0:e._bindProperties.indexOf(i)],n.to.push([r.observable,t]),function(e,t,n,i){var r=e[dr],o=r.get(n),a=o||{};a[i]||(a[i]=new Set),a[i].add(t),o||r.set(n,a)}(e._observable,n,r.observable,t)}))}))}(this),this._bindProperties.forEach((function(e){br(t._observable,e)}))}function gr(e,t,n){if(this._bindings.size>1)throw new jn.b("observable-bind-to-many-not-one-binding: Cannot bind multiple properties with toMany().",this);this.to.apply(this,u(function(e,t){var n=e.map((function(e){return[e,t]}));return Array.prototype.concat.apply([],n)}(e,t)).concat([n]))}function kr(e){return e.every((function(e){return"string"==typeof e}))}function br(e,t){var n,i=e[hr].get(t);i.callback?n=i.callback.apply(e,i.to.map((function(e){return e[0][e[1]]}))):(n=i.to[0],n=n[0][n[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=n:e.set(t,n)}var yr=function(e){C(n,e);var t=A(n);function n(e,i,r,o){var a;return w(this,n),a=t.call(this,e,i,r,o),a.set("isReadOnly",!1),a.set("isFocused",!1),a.bind("isReadOnly").to(e),a.bind("isFocused").to(e,"isFocused",(function(t){return t&&e.selection.editableElement==P(a)})),a.listenTo(e.selection,"change",(function(){a.isFocused=e.isFocused&&e.selection.editableElement==P(a)})),a}return x(n,[{key:"is",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},{key:"destroy",value:function(){this.stopListening()}}]),n}(sr);Kn(yr,vr);var wr=Symbol("rootName"),_r=function(e){C(n,e);var t=A(n);function n(e,i){var r;return w(this,n),r=t.call(this,e,i),r.rootName="main",r}return x(n,[{key:"is",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},{key:"rootName",get:function(){return this.getCustomProperty(wr)},set:function(e){this._setCustomProperty(wr,e)}},{key:"_name",set:function(e){this.name=e}}]),n}(yr),xr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(w(this,e),!t.boundaries&&!t.startPosition)throw new jn.b("view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",null);if(t.direction&&"forward"!=t.direction&&"backward"!=t.direction)throw new jn.b("view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",t.startPosition,{direction:t.direction});this.boundaries=t.boundaries||null,t.startPosition?this.position=Cr._createAt(t.startPosition):this.position=Cr._createAt(t.boundaries["backward"==t.direction?"end":"start"]),this.direction=t.direction||"forward",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}return x(e,[{key:Symbol.iterator,value:function(){return this}},{key:"skip",value:function(e){var t,n,i;do{var r;i=this.position,r=this.next(),t=r.done,n=r.value}while(!t&&e(n));t||(this.position=i)}},{key:"next",value:function(){return"forward"==this.direction?this._next():this._previous()}},{key:"_next",value:function(){var e,t=this.position.clone(),n=this.position,i=t.parent;if(null===i.parent&&t.offset===i.childCount)return{done:!0};if(i===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};if(i instanceof ai){if(t.isAtEnd)return this.position=Cr._createAfter(i),this._next();e=i.data[t.offset]}else e=i.getChild(t.offset);if(e instanceof or)return this.shallow?t.offset++:t=new Cr(e,0),this.position=t,this._formatReturnValue("elementStart",e,n,t,1);if(e instanceof ai){if(this.singleCharacters)return t=new Cr(e,0),this.position=t,this._next();var r,o=e.data.length;return e==this._boundaryEndParent?(o=this.boundaries.end.offset,r=new si(e,0,o),t=Cr._createAfter(r)):(r=new si(e,0,e.data.length),t.offset++),this.position=t,this._formatReturnValue("text",r,n,t,o)}if("string"==typeof e){var a;a=this.singleCharacters?1:(i===this._boundaryEndParent?this.boundaries.end.offset:i.data.length)-t.offset;var s=new si(i,t.offset,a);return t.offset+=a,this.position=t,this._formatReturnValue("text",s,n,t,a)}return t=Cr._createAfter(i),this.position=t,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",i,n,t)}},{key:"_previous",value:function(){var e,t=this.position.clone(),n=this.position,i=t.parent;if(null===i.parent&&0===t.offset)return{done:!0};if(i==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0};if(i instanceof ai){if(t.isAtStart)return this.position=Cr._createBefore(i),this._previous();e=i.data[t.offset-1]}else e=i.getChild(t.offset-1);if(e instanceof or)return this.shallow?(t.offset--,this.position=t,this._formatReturnValue("elementStart",e,n,t,1)):(t=new Cr(e,e.childCount),this.position=t,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",e,n,t));if(e instanceof ai){if(this.singleCharacters)return t=new Cr(e,e.data.length),this.position=t,this._previous();var r,o=e.data.length;if(e==this._boundaryStartParent){var a=this.boundaries.start.offset;r=new si(e,a,e.data.length-a),o=r.data.length,t=Cr._createBefore(r)}else r=new si(e,0,e.data.length),t.offset--;return this.position=t,this._formatReturnValue("text",r,n,t,o)}if("string"==typeof e){var s;if(this.singleCharacters)s=1;else{var l=i===this._boundaryStartParent?this.boundaries.start.offset:0;s=t.offset-l}t.offset-=s;var c=new si(i,t.offset,s);return this.position=t,this._formatReturnValue("text",c,n,t,s)}return t=Cr._createBefore(i),this.position=t,this._formatReturnValue("elementStart",i,n,t,1)}},{key:"_formatReturnValue",value:function(e,t,n,i,r){return t instanceof si&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=Cr._createAfter(t.textNode):(i=Cr._createAfter(t.textNode),this.position=i)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=Cr._createBefore(t.textNode):(i=Cr._createBefore(t.textNode),this.position=i))),{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:i,length:r}}}}]),e}(),Cr=function(){function e(t,n){w(this,e),this.parent=t,this.offset=n}return x(e,[{key:"getShiftedBy",value:function(t){var n=e._createAt(this),i=n.offset+t;return n.offset=i<0?0:i,n}},{key:"getLastMatchingPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.startPosition=this;var n=new xr(t);return n.skip(e),n.position}},{key:"getAncestors",value:function(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}},{key:"getCommonAncestor",value:function(e){for(var t=this.getAncestors(),n=e.getAncestors(),i=0;t[i]==n[i]&&t[i];)i++;return 0===i?null:t[i-1]}},{key:"is",value:function(e){return"position"===e||"view:position"===e}},{key:"isEqual",value:function(e){return this.parent==e.parent&&this.offset==e.offset}},{key:"isBefore",value:function(e){return"before"==this.compareWith(e)}},{key:"isAfter",value:function(e){return"after"==this.compareWith(e)}},{key:"compareWith",value:function(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";var t=this.parent.is("node")?this.parent.getPath():[],n=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),n.push(e.offset);var i=ii(t,n);switch(i){case"prefix":return"before";case"extension":return"after";default:return t[i]0&&void 0!==arguments[0]?arguments[0]:{};return e.startPosition=this,new xr(e)}},{key:"clone",value:function(){return new e(this.parent,this.offset)}},{key:"nodeAfter",get:function(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}},{key:"nodeBefore",get:function(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}},{key:"isAtStart",get:function(){return 0===this.offset}},{key:"isAtEnd",get:function(){var e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}},{key:"root",get:function(){return this.parent.root}},{key:"editableElement",get:function(){for(var e=this.parent;!(e instanceof yr);){if(!e.parent)return null;e=e.parent}return e}}],[{key:"_createAt",value:function(t,n){if(t instanceof e)return new this(t.parent,t.offset);var i=t;if("end"==n)n=i.is("$text")?i.data.length:i.childCount;else{if("before"==n)return this._createBefore(i);if("after"==n)return this._createAfter(i);if(0!==n&&!n)throw new jn.b("view-createPositionAt-offset-required: View#createPositionAt() requires the offset when the first parameter is a view item.",i)}return new e(i,n)}},{key:"_createAfter",value:function(t){if(t.is("$textProxy"))return new e(t.textNode,t.offsetInText+t.data.length);if(!t.parent)throw new jn.b("view-position-after-root: You can not make position after root.",t,{root:t});return new e(t.parent,t.index+1)}},{key:"_createBefore",value:function(t){if(t.is("$textProxy"))return new e(t.textNode,t.offsetInText);if(!t.parent)throw new jn.b("view-position-before-root: You can not make position before root.",t,{root:t});return new e(t.parent,t.index)}}]),e}(),Ar=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;w(this,e),this.start=t.clone(),this.end=n?n.clone():t.clone()}return x(e,[{key:Symbol.iterator,value:a.mark((function e(){return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.delegateYield(new xr({boundaries:this,ignoreElementEnd:!0}),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"getEnlarged",value:function(){var t=this.start.getLastMatchingPosition(Tr,{direction:"backward"}),n=this.end.getLastMatchingPosition(Tr);return t.parent.is("$text")&&t.isAtStart&&(t=Cr._createBefore(t.parent)),n.parent.is("$text")&&n.isAtEnd&&(n=Cr._createAfter(n.parent)),new e(t,n)}},{key:"getTrimmed",value:function(){var t=this.start.getLastMatchingPosition(Tr);if(t.isAfter(this.end)||t.isEqual(this.end))return new e(t,t);var n=this.end.getLastMatchingPosition(Tr,{direction:"backward"}),i=t.nodeAfter,r=n.nodeBefore;return i&&i.is("$text")&&(t=new Cr(i,0)),r&&r.is("$text")&&(n=new Cr(r,r.data.length)),new e(t,n)}},{key:"isEqual",value:function(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}},{key:"containsPosition",value:function(e){return e.isAfter(this.start)&&e.isBefore(this.end)}},{key:"containsRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.isCollapsed&&(t=!1);var n=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),i=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return n&&i}},{key:"getDifference",value:function(t){var n=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&n.push(new e(this.start,t.start)),this.containsPosition(t.end)&&n.push(new e(t.end,this.end))):n.push(this.clone()),n}},{key:"getIntersection",value:function(t){if(this.isIntersecting(t)){var n=this.start,i=this.end;return this.containsPosition(t.start)&&(n=t.start),this.containsPosition(t.end)&&(i=t.end),new e(n,i)}return null}},{key:"getWalker",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.boundaries=this,new xr(e)}},{key:"getCommonAncestor",value:function(){return this.start.getCommonAncestor(this.end)}},{key:"getContainedElement",value:function(){if(this.isCollapsed)return null;var e=this.start.nodeAfter,t=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(e=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(t=this.end.parent.previousSibling),e&&e.is("element")&&e===t?e:null}},{key:"clone",value:function(){return new e(this.start,this.end)}},{key:"getItems",value:a.mark((function e(){var t,n,i,r,o,s=arguments;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=s.length>0&&void 0!==s[0]?s[0]:{},t.boundaries=this,t.ignoreElementEnd=!0,n=new xr(t),i=k(n),e.prev=4,i.s();case 6:if((r=i.n()).done){e.next=12;break}return o=r.value,e.next=10,o.item;case 10:e.next=6;break;case 12:e.next=17;break;case 14:e.prev=14,e.t0=e["catch"](4),i.e(e.t0);case 17:return e.prev=17,i.f(),e.finish(17);case 20:case"end":return e.stop()}}),e,this,[[4,14,17,20]])}))},{key:"getPositions",value:a.mark((function e(){var t,n,i,r,o,s=arguments;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},t.boundaries=this,n=new xr(t),e.next=5,n.position;case 5:i=k(n),e.prev=6,i.s();case 8:if((r=i.n()).done){e.next=14;break}return o=r.value,e.next=12,o.nextPosition;case 12:e.next=8;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e["catch"](6),i.e(e.t0);case 19:return e.prev=19,i.f(),e.finish(19);case 22:case"end":return e.stop()}}),e,this,[[6,16,19,22]])}))},{key:"is",value:function(e){return"range"===e||"view:range"===e}},{key:"isIntersecting",value:function(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}},{key:"isCollapsed",get:function(){return this.start.isEqual(this.end)}},{key:"isFlat",get:function(){return this.start.parent===this.end.parent}},{key:"root",get:function(){return this.start.root}}],[{key:"_createFromParentsAndOffsets",value:function(e,t,n,i){return new this(new Cr(e,t),new Cr(n,i))}},{key:"_createFromPositionAndShift",value:function(e,t){var n=e,i=e.getShiftedBy(t);return t>0?new this(n,i):new this(i,n)}},{key:"_createIn",value:function(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}},{key:"_createOn",value:function(e){var t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(Cr._createBefore(e),t)}}]),e}();function Tr(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}function Pr(e){var t,n=0,i=k(e);try{for(i.s();!(t=i.n()).done;){t.value;n++}}catch(r){i.e(r)}finally{i.f()}return n}var Er=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;w(this,e),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",this.setTo(t,n,i)}return x(e,[{key:"getRanges",value:a.mark((function e(){var t,n,i;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=k(this._ranges),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return i=n.value,e.next=7,i.clone();case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"getFirstRange",value:function(){var e,t=null,n=k(this._ranges);try{for(n.s();!(e=n.n()).done;){var i=e.value;t&&!i.start.isBefore(t.start)||(t=i)}}catch(r){n.e(r)}finally{n.f()}return t?t.clone():null}},{key:"getLastRange",value:function(){var e,t=null,n=k(this._ranges);try{for(n.s();!(e=n.n()).done;){var i=e.value;t&&!i.end.isAfter(t.end)||(t=i)}}catch(r){n.e(r)}finally{n.f()}return t?t.clone():null}},{key:"getFirstPosition",value:function(){var e=this.getFirstRange();return e?e.start.clone():null}},{key:"getLastPosition",value:function(){var e=this.getLastRange();return e?e.end.clone():null}},{key:"isEqual",value:function(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;var t,n=k(this._ranges);try{for(n.s();!(t=n.n()).done;){var i,r=t.value,o=!1,a=k(e._ranges);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(r.isEqual(s)){o=!0;break}}}catch(l){a.e(l)}finally{a.f()}if(!o)return!1}}catch(l){n.e(l)}finally{n.f()}return!0}},{key:"isSimilar",value:function(e){if(this.isBackward!=e.isBackward)return!1;var t=Pr(this.getRanges());if(t!=Pr(e.getRanges()))return!1;if(0==t)return!0;var n,i=k(this.getRanges());try{for(i.s();!(n=i.n()).done;){var r=n.value;r=r.getTrimmed();var o,a=!1,s=k(e.getRanges());try{for(s.s();!(o=s.n()).done;){var l=o.value;if(l=l.getTrimmed(),r.start.isEqual(l.start)&&r.end.isEqual(l.end)){a=!0;break}}}catch(c){s.e(c)}finally{s.f()}if(!a)return!1}}catch(c){i.e(c)}finally{i.f()}return!0}},{key:"getSelectedElement",value:function(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}},{key:"setTo",value:function(t,n,i){if(null===t)this._setRanges([]),this._setFakeOptions(n);else if(t instanceof e||t instanceof Sr)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof Ar)this._setRanges([t],n&&n.backward),this._setFakeOptions(n);else if(t instanceof Cr)this._setRanges([new Ar(t)]),this._setFakeOptions(n);else if(t instanceof oi){var r,o=!!i&&!!i.backward;if(void 0===n)throw new jn.b("view-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.",this);r="in"==n?Ar._createIn(t):"on"==n?Ar._createOn(t):new Ar(Cr._createAt(t,n)),this._setRanges([r],o),this._setFakeOptions(i)}else{if(!Gn(t))throw new jn.b("view-selection-setTo-not-selectable: Cannot set selection to given place.",this);this._setRanges(t,n&&n.backward),this._setFakeOptions(n)}this.fire("change")}},{key:"setFocus",value:function(e,t){if(null===this.anchor)throw new jn.b("view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",this);var n=Cr._createAt(e,t);if("same"!=n.compareWith(this.focus)){var i=this.anchor;this._ranges.pop(),"before"==n.compareWith(i)?this._addRange(new Ar(n,i),!0):this._addRange(new Ar(i,n)),this.fire("change")}}},{key:"is",value:function(e){return"selection"===e||"view:selection"===e}},{key:"_setRanges",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=Array.from(e),this._ranges=[];var n,i=k(e);try{for(i.s();!(n=i.n()).done;){var r=n.value;this._addRange(r)}}catch(o){i.e(o)}finally{i.f()}this._lastRangeBackward=!!t}},{key:"_setFakeOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}},{key:"_addRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(e instanceof Ar))throw new jn.b("view-selection-add-range-not-range: Selection range set to an object that is not an instance of view.Range",this);this._pushRange(e),this._lastRangeBackward=!!t}},{key:"_pushRange",value:function(e){var t,n=k(this._ranges);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(e.isIntersecting(i))throw new jn.b("view-selection-range-intersects: Trying to add a range that intersects with another range from selection.",this,{addedRange:e,intersectingRange:i})}}catch(r){n.e(r)}finally{n.f()}this._ranges.push(new Ar(e.start,e.end))}},{key:"isFake",get:function(){return this._isFake}},{key:"fakeSelectionLabel",get:function(){return this._fakeSelectionLabel}},{key:"anchor",get:function(){if(!this._ranges.length)return null;var e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}},{key:"focus",get:function(){if(!this._ranges.length)return null;var e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}},{key:"isCollapsed",get:function(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}},{key:"rangeCount",get:function(){return this._ranges.length}},{key:"isBackward",get:function(){return!this.isCollapsed&&this._lastRangeBackward}},{key:"editableElement",get:function(){return this.anchor?this.anchor.editableElement:null}}]),e}();Kn(Er,Fn);var Sr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;w(this,e),this._selection=new Er,this._selection.delegate("change").to(this),this._selection.setTo(t,n,i)}return x(e,[{key:"getRanges",value:a.mark((function e(){return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.delegateYield(this._selection.getRanges(),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"getFirstRange",value:function(){return this._selection.getFirstRange()}},{key:"getLastRange",value:function(){return this._selection.getLastRange()}},{key:"getFirstPosition",value:function(){return this._selection.getFirstPosition()}},{key:"getLastPosition",value:function(){return this._selection.getLastPosition()}},{key:"getSelectedElement",value:function(){return this._selection.getSelectedElement()}},{key:"isEqual",value:function(e){return this._selection.isEqual(e)}},{key:"isSimilar",value:function(e){return this._selection.isSimilar(e)}},{key:"is",value:function(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e}},{key:"_setTo",value:function(e,t,n){this._selection.setTo(e,t,n)}},{key:"_setFocus",value:function(e,t){this._selection.setFocus(e,t)}},{key:"isFake",get:function(){return this._selection.isFake}},{key:"fakeSelectionLabel",get:function(){return this._selection.fakeSelectionLabel}},{key:"anchor",get:function(){return this._selection.anchor}},{key:"focus",get:function(){return this._selection.focus}},{key:"isCollapsed",get:function(){return this._selection.isCollapsed}},{key:"rangeCount",get:function(){return this._selection.rangeCount}},{key:"isBackward",get:function(){return this._selection.isBackward}},{key:"editableElement",get:function(){return this._selection.editableElement}},{key:"_ranges",get:function(){return this._selection._ranges}}]),e}();Kn(Sr,Fn);var Or=function(){function e(t){w(this,e),this.selection=new Sr,this.roots=new Jn({idProperty:"rootName"}),this.stylesProcessor=t,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isComposing",!1),this._postFixers=new Set}return x(e,[{key:"getRoot",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"main";return this.roots.get(e)}},{key:"registerPostFixer",value:function(e){this._postFixers.add(e)}},{key:"destroy",value:function(){this.roots.map((function(e){return e.destroy()})),this.stopListening()}},{key:"_callPostFixers",value:function(e){var t=!1;do{var n,i=k(this._postFixers);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(t=r(e),t)break}}catch(o){i.e(o)}finally{i.f()}}while(t)}}]),e}();Kn(Or,vr);var Mr=function(e){C(n,e);var t=A(n);function n(e,i,r,o){var a;return w(this,n),a=t.call(this,e,i,r,o),a.getFillerOffset=Ir,a._priority=10,a._id=null,a._clonesGroup=null,a}return x(n,[{key:"getElementsWithSameId",value:function(){if(null===this.id)throw new jn.b("attribute-element-get-elements-with-same-id-no-id: Cannot get elements with the same id for an attribute element without id.",this);return new Set(this._clonesGroup)}},{key:"is",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},{key:"isSimilar",value:function(e){return null!==this.id||null!==e.id?this.id===e.id:l(N(n.prototype),"isSimilar",this).call(this,e)&&this.priority==e.priority}},{key:"_clone",value:function(e){var t=l(N(n.prototype),"_clone",this).call(this,e);return t._priority=this._priority,t._id=this._id,t}},{key:"priority",get:function(){return this._priority}},{key:"id",get:function(){return this._id}}]),n}(or);function Ir(){if(Nr(this))return null;for(var e=this.parent;e&&e.is("attributeElement");){if(Nr(e)>1)return null;e=e.parent}return!e||Nr(e)>1?null:this.childCount}function Nr(e){return Array.from(e.getChildren()).filter((function(e){return!e.is("uiElement")})).length}Mr.DEFAULT_PRIORITY=10;var Rr=function(e){C(n,e);var t=A(n);function n(e,i,r,o){var a;return w(this,n),a=t.call(this,e,i,r,o),a.getFillerOffset=Dr,a}return x(n,[{key:"is",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},{key:"_insertChild",value:function(e,t){if(t&&(t instanceof oi||Array.from(t).length>0))throw new jn.b("view-emptyelement-cannot-add: Cannot add child nodes to EmptyElement instance.",[this,t])}}]),n}(or);function Dr(){return null}var Lr=navigator.userAgent.toLowerCase(),zr={isMac:function(e){return e.indexOf("macintosh")>-1}(Lr),isGecko:function(e){return!!e.match(/gecko\/\d+/)}(Lr),isSafari:function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(Lr),isAndroid:function(e){return e.indexOf("android")>-1}(Lr),features:{isRegExpUnicodePropertySupported:function(){var e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}()}},jr={"⌘":"ctrl","⇧":"shift","⌥":"alt"},Vr={ctrl:"⌘",shift:"⇧",alt:"⌥"},Br=function(){for(var e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,cmd:1114112,shift:2228224,alt:4456448},t=65;t<=90;t++){var n=String.fromCharCode(t);e[n.toLowerCase()]=t}for(var i=48;i<=57;i++)e[i-48]=i;for(var r=112;r<=123;r++)e["f"+(r-111)]=r;return e}();function Fr(e){var t;if("string"==typeof e){if(t=Br[e.toLowerCase()],!t)throw new jn.b("keyboard-unknown-key: Unknown key name.",null,{key:e})}else t=e.keyCode+(e.altKey?Br.alt:0)+(e.ctrlKey?Br.ctrl:0)+(e.shiftKey?Br.shift:0);return t}function Ur(e){return"string"==typeof e&&(e=Yr(e)),e.map((function(e){return"string"==typeof e?Fr(e):e})).reduce((function(e,t){return t+e}),0)}function Hr(e){return zr.isMac?Yr(e).map((function(e){return Vr[e.toLowerCase()]||e})).reduce((function(e,t){return e.slice(-1)in jr?e+t:e+"+"+t})):e}function $r(e){return e==Br.arrowright||e==Br.arrowleft||e==Br.arrowup||e==Br.arrowdown}function Wr(e,t){var n="ltr"===t;switch(e){case Br.arrowleft:return n?"left":"right";case Br.arrowright:return n?"right":"left";case Br.arrowup:return"up";case Br.arrowdown:return"down"}}function qr(e,t){var n=Wr(e,t);return"down"===n||"right"===n}function Yr(e){return e.split(/\s*\+\s*/)}var Gr=function(e){C(n,e);var t=A(n);function n(e,i,r,o){var a;return w(this,n),a=t.call(this,e,i,r,o),a.getFillerOffset=Jr,a}return x(n,[{key:"is",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},{key:"_insertChild",value:function(e,t){if(t&&(t instanceof oi||Array.from(t).length>0))throw new jn.b("view-uielement-cannot-add: Cannot add child nodes to UIElement instance.",this)}},{key:"render",value:function(e){return this.toDomElement(e)}},{key:"toDomElement",value:function(e){var t,n=e.createElement(this.name),i=k(this.getAttributeKeys());try{for(i.s();!(t=i.n()).done;){var r=t.value;n.setAttribute(r,this.getAttribute(r))}}catch(o){i.e(o)}finally{i.f()}return n}}]),n}(or);function Kr(e){e.document.on("keydown",(function(t,n){return function(e,t,n){if(t.keyCode==Br.arrowright){var i=t.domTarget.ownerDocument.defaultView.getSelection(),r=1==i.rangeCount&&i.getRangeAt(0).collapsed;if(r||t.shiftKey){var o=i.focusNode,a=i.focusOffset,s=n.domPositionToView(o,a);if(null===s)return;var l=!1,c=s.getLastMatchingPosition((function(e){return e.item.is("uiElement")&&(l=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement"))}));if(l){var u=n.viewPositionToDom(c);r?i.collapse(u.parent,u.offset):i.extend(u.parent,u.offset)}}}}(0,n,e.domConverter)}))}function Jr(){return null}var Qr=function(e){C(n,e);var t=A(n);function n(e,i,r,o){var a;return w(this,n),a=t.call(this,e,i,r,o),a.getFillerOffset=Zr,a}return x(n,[{key:"is",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},{key:"_insertChild",value:function(e,t){if(t&&(t instanceof oi||Array.from(t).length>0))throw new jn.b("view-rawelement-cannot-add: Cannot add child nodes to a RawElement instance.",[this,t])}}]),n}(or);function Zr(){return null}var Xr=function(){function e(t,n){w(this,e),this.document=t,this._children=[],n&&this._insertChild(0,n)}return x(e,[{key:Symbol.iterator,value:function(){return this._children[Symbol.iterator]()}},{key:"is",value:function(e){return"documentFragment"===e||"view:documentFragment"===e}},{key:"_appendChild",value:function(e){return this._insertChild(this.childCount,e)}},{key:"getChild",value:function(e){return this._children[e]}},{key:"getChildIndex",value:function(e){return this._children.indexOf(e)}},{key:"getChildren",value:function(){return this._children[Symbol.iterator]()}},{key:"_insertChild",value:function(e,t){this._fireChange("children",this);var n,i=0,r=function(e,t){return"string"==typeof t?[new ai(e,t)]:(Gn(t)||(t=[t]),Array.from(t).map((function(t){return"string"==typeof t?new ai(e,t):t instanceof si?new ai(e,t.data):t})))}(this.document,t),o=k(r);try{for(o.s();!(n=o.n()).done;){var a=n.value;null!==a.parent&&a._remove(),a.parent=this,this._children.splice(e,0,a),e++,i++}}catch(s){o.e(s)}finally{o.f()}return i}},{key:"_removeChildren",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._fireChange("children",this);for(var n=e;n2&&void 0!==arguments[2]?arguments[2]:{},i=new Mr(this.document,e,t);return n.priority&&(i._priority=n.priority),n.id&&(i._id=n.id),i}},{key:"createContainerElement",value:function(e,t){return new sr(this.document,e,t)}},{key:"createEditableElement",value:function(e,t){var n=new yr(this.document,e,t);return n._document=this.document,n}},{key:"createEmptyElement",value:function(e,t){return new Rr(this.document,e,t)}},{key:"createUIElement",value:function(e,t,n){var i=new Gr(this.document,e,t);return n&&(i.render=n),i}},{key:"createRawElement",value:function(e,t,n){var i=new Qr(this.document,e,t);return i.render=n||function(){},i}},{key:"setAttribute",value:function(e,t,n){n._setAttribute(e,t)}},{key:"removeAttribute",value:function(e,t){t._removeAttribute(e)}},{key:"addClass",value:function(e,t){t._addClass(e)}},{key:"removeClass",value:function(e,t){t._removeClass(e)}},{key:"setStyle",value:function(e,t,n){B(e)&&void 0===n&&(n=t),n._setStyle(e,t)}},{key:"removeStyle",value:function(e,t){t._removeStyle(e)}},{key:"setCustomProperty",value:function(e,t,n){n._setCustomProperty(e,t)}},{key:"removeCustomProperty",value:function(e,t){return t._removeCustomProperty(e)}},{key:"breakAttributes",value:function(e){return e instanceof Cr?this._breakAttributes(e):this._breakAttributesRange(e)}},{key:"breakContainer",value:function(e){var t=e.parent;if(!t.is("containerElement"))throw new jn.b("view-writer-break-non-container-element: Trying to break an element which is not a container element.",this.document);if(!t.parent)throw new jn.b("view-writer-break-root: Trying to break root element.",this.document);if(e.isAtStart)return Cr._createBefore(t);if(!e.isAtEnd){var n=t._clone(!1);this.insert(Cr._createAfter(t),n);var i=new Ar(e,Cr._createAt(t,"end")),r=new Cr(n,0);this.move(i,r)}return Cr._createAfter(t)}},{key:"mergeAttributes",value:function(e){var t=e.offset,n=e.parent;if(n.is("$text"))return e;if(n.is("attributeElement")&&0===n.childCount){var i=n.parent,r=n.index;return n._remove(),this._removeFromClonedElementsGroup(n),this.mergeAttributes(new Cr(i,r))}var o=n.getChild(t-1),a=n.getChild(t);if(!o||!a)return e;if(o.is("$text")&&a.is("$text"))return oo(o,a);if(o.is("attributeElement")&&a.is("attributeElement")&&o.isSimilar(a)){var s=o.childCount;return o._appendChild(a.getChildren()),a._remove(),this._removeFromClonedElementsGroup(a),this.mergeAttributes(new Cr(o,s))}return e}},{key:"mergeContainers",value:function(e){var t=e.nodeBefore,n=e.nodeAfter;if(!(t&&n&&t.is("containerElement")&&n.is("containerElement")))throw new jn.b("view-writer-merge-containers-invalid-position: Element before and after given position cannot be merged.",this.document);var i=t.getChild(t.childCount-1),r=i instanceof ai?Cr._createAt(i,"end"):Cr._createAt(t,"end");return this.move(Ar._createIn(n),Cr._createAt(t,"end")),this.remove(Ar._createOn(n)),r}},{key:"insert",value:function(e,t){(function e(t,n){var i,r=k(t);try{var o=function(){var t=i.value;if(!ao.some((function(e){return t instanceof e})))throw new jn.b("view-writer-insert-invalid-node-type: One of the nodes to be inserted is of invalid type.",n);t.is("$text")||e(t.getChildren(),n)};for(r.s();!(i=r.n()).done;)o()}catch(a){r.e(a)}finally{r.f()}})(t=Gn(t)?u(t):[t],this.document);var n=to(e);if(!n)throw new jn.b("view-writer-invalid-position-container: Position's parent container cannot be found.",this.document);var i,r=this._breakAttributes(e,!0),o=n._insertChild(r.offset,t),a=k(t);try{for(a.s();!(i=a.n()).done;){var s=i.value;this._addToClonedElementsGroup(s)}}catch(h){a.e(h)}finally{a.f()}var l=r.getShiftedBy(o),c=this.mergeAttributes(r);if(0===o)return new Ar(c,c);c.isEqual(r)||l.offset--;var d=this.mergeAttributes(l);return new Ar(c,d)}},{key:"remove",value:function(e){var t=e instanceof Ar?e:Ar._createOn(e);if(lo(t,this.document),t.isCollapsed)return new Xr(this.document);var n,i=this._breakAttributesRange(t,!0),r=i.start,o=i.end,a=r.parent,s=o.offset-r.offset,l=a._removeChildren(r.offset,s),c=k(l);try{for(c.s();!(n=c.n()).done;){var u=n.value;this._removeFromClonedElementsGroup(u)}}catch(h){c.e(h)}finally{c.f()}var d=this.mergeAttributes(r);return t.start=d,t.end=d.clone(),new Xr(this.document,l)}},{key:"clear",value:function(e,t){lo(e,this.document);var n,i=e.getWalker({direction:"backward",ignoreElementEnd:!0}),r=k(i);try{for(r.s();!(n=r.n()).done;){var o=n.value,a=o.item,s=void 0;if(a.is("element")&&t.isSimilar(a))s=Ar._createOn(a);else if(!o.nextPosition.isAfter(e.start)&&a.is("$textProxy")){var l=a.getAncestors().find((function(e){return e.is("element")&&t.isSimilar(e)}));l&&(s=Ar._createIn(l))}s&&(s.end.isAfter(e.end)&&(s.end=e.end),s.start.isBefore(e.start)&&(s.start=e.start),this.remove(s))}}catch(c){r.e(c)}finally{r.f()}}},{key:"move",value:function(e,t){var n;if(t.isAfter(e.end)){var i=(t=this._breakAttributes(t,!0)).parent,r=i.childCount;e=this._breakAttributesRange(e,!0),n=this.remove(e),t.offset+=i.childCount-r}else n=this.remove(e);return this.insert(t,n)}},{key:"wrap",value:function(e,t){if(!(t instanceof Mr))throw new jn.b("view-writer-wrap-invalid-attribute: DowncastWriter#wrap() must be called with an attribute element.",this.document);if(lo(e,this.document),e.isCollapsed){var n=e.start;n.parent.is("element")&&(r=n.parent,!Array.from(r.getChildren()).some((function(e){return!e.is("uiElement")})))&&(n=n.getLastMatchingPosition((function(e){return e.item.is("uiElement")}))),n=this._wrapPosition(n,t);var i=this.document.selection;return i.isCollapsed&&i.getFirstPosition().isEqual(e.start)&&this.setSelection(n),new Ar(n)}return this._wrapRange(e,t);var r}},{key:"unwrap",value:function(e,t){if(!(t instanceof Mr))throw new jn.b("view-writer-unwrap-invalid-attribute: DowncastWriter#unwrap() must be called with an attribute element.",this.document);if(lo(e,this.document),e.isCollapsed)return e;var n=this._breakAttributesRange(e,!0),i=n.start,r=n.end,o=i.parent,a=this._unwrapChildren(o,i.offset,r.offset,t),s=this.mergeAttributes(a.start);s.isEqual(a.start)||a.end.offset--;var l=this.mergeAttributes(a.end);return new Ar(s,l)}},{key:"rename",value:function(e,t){var n=new sr(this.document,e,t.getAttributes());return this.insert(Cr._createAfter(t),n),this.move(Ar._createIn(t),Cr._createAt(n,0)),this.remove(Ar._createOn(t)),n}},{key:"clearClonedElementsGroup",value:function(e){this._cloneGroups.delete(e)}},{key:"createPositionAt",value:function(e,t){return Cr._createAt(e,t)}},{key:"createPositionAfter",value:function(e){return Cr._createAfter(e)}},{key:"createPositionBefore",value:function(e){return Cr._createBefore(e)}},{key:"createRange",value:function(e,t){return new Ar(e,t)}},{key:"createRangeOn",value:function(e){return Ar._createOn(e)}},{key:"createRangeIn",value:function(e){return Ar._createIn(e)}},{key:"createSelection",value:function(e,t,n){return new Er(e,t,n)}},{key:"_wrapChildren",value:function(e,t,n,i){for(var r=t,o=[];r1&&void 0!==arguments[1]&&arguments[1],n=e.start,i=e.end;if(lo(e,this.document),e.isCollapsed){var r=this._breakAttributes(e.start,t);return new Ar(r,r)}var o=this._breakAttributes(i,t),a=o.parent.childCount,s=this._breakAttributes(n,t);return o.offset+=o.parent.childCount-a,new Ar(s,o)}},{key:"_breakAttributes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.offset,i=e.parent;if(e.parent.is("emptyElement"))throw new jn.b("view-writer-cannot-break-empty-element: Cannot break an EmptyElement instance.",this.document);if(e.parent.is("uiElement"))throw new jn.b("view-writer-cannot-break-ui-element: Cannot break a UIElement instance.",this.document);if(e.parent.is("rawElement"))throw new jn.b("view-writer-cannot-break-raw-element: Cannot break a RawElement instance.",this.document);if(!t&&i.is("$text")&&so(i.parent))return e.clone();if(so(i))return e.clone();if(i.is("$text"))return this._breakAttributes(ro(e),t);if(n==i.childCount){var r=new Cr(i.parent,i.index+1);return this._breakAttributes(r,t)}if(0===n){var o=new Cr(i.parent,i.index);return this._breakAttributes(o,t)}var a=i.index+1,s=i._clone();i.parent._insertChild(a,s),this._addToClonedElementsGroup(s);var l=i.childCount-n,c=i._removeChildren(n,l);s._appendChild(c);var u=new Cr(i.parent,a);return this._breakAttributes(u,t)}},{key:"_addToClonedElementsGroup",value:function(e){if(e.root.is("rootElement")){if(e.is("element")){var t,n=k(e.getChildren());try{for(n.s();!(t=n.n()).done;){var i=t.value;this._addToClonedElementsGroup(i)}}catch(a){n.e(a)}finally{n.f()}}var r=e.id;if(r){var o=this._cloneGroups.get(r);o||(o=new Set,this._cloneGroups.set(r,o)),o.add(e),e._clonesGroup=o}}}},{key:"_removeFromClonedElementsGroup",value:function(e){if(e.is("element")){var t,n=k(e.getChildren());try{for(n.s();!(t=n.n()).done;){var i=t.value;this._removeFromClonedElementsGroup(i)}}catch(a){n.e(a)}finally{n.f()}}var r=e.id;if(r){var o=this._cloneGroups.get(r);o&&o.delete(e)}}}]),e}();function to(e){for(var t=e.parent;!so(t);){if(!t)return;t=t.parent}return t}function no(e,t){return e.priorityt.priority)&&e.getIdentity()3&&void 0!==arguments[3]&&arguments[3];n=n||function(e,t){return e===t},Array.isArray(e)||(e=Array.prototype.slice.call(e)),Array.isArray(t)||(t=Array.prototype.slice.call(t));var r=function(e,t,n){var i=yo(e,t,n);if(-1===i)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};var r=wo(e,i),o=wo(t,i),a=yo(r,o,n),s=e.length-a,l=t.length-a;return{firstIndex:i,lastIndexOld:s,lastIndexNew:l}}(e,t,n);return i?function(e,t){var n=e.firstIndex,i=e.lastIndexOld,r=e.lastIndexNew;if(-1===n)return Array(t).fill("equal");var o=[];return n>0&&(o=o.concat(Array(n).fill("equal"))),r-n>0&&(o=o.concat(Array(r-n).fill("insert"))),i-n>0&&(o=o.concat(Array(i-n).fill("delete"))),r0&&n.push({index:i,type:"insert",values:e.slice(i,o)}),r-i>0&&n.push({index:i+(o-i),type:"delete",howMany:r-i}),n}(t,r)}function yo(e,t,n){for(var i=0;i200||a>200||o+a>300)return _o.fastDiff(e,t,n,!0);if(as?-1:1;d[o+u]&&(d[o]=d[o+u].slice(0)),d[o]||(d[o]=[]),d[o].push(a>s?i:r);for(var f=Math.max(a,s),v=f-o;vu;v--)h[v]=f(v);h[u]=f(u),p++}while(h[u]!==c);return d[u].slice(1)}function xo(e,t,n){e.insertBefore(n,e.childNodes[t]||null)}function Co(e){var t=e.parentNode;t&&t.removeChild(e)}function Ao(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}_o.fastDiff=bo;var To=function(){function e(t,n){w(this,e),this.domDocuments=new Set,this.domConverter=t,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=n,this.isFocused=!1,this._inlineFiller=null,this._fakeSelectionContainer=null}return x(e,[{key:"markToSync",value:function(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e)throw new jn.b("view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.",this);this.markedChildren.add(t)}}}},{key:"render",value:function(){var e,t,n=k(this.markedChildren);try{for(n.s();!(t=n.n()).done;){var i=t.value;this._updateChildrenMappings(i)}}catch(p){n.e(p)}finally{n.f()}this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent));var r,o=k(this.markedAttributes);try{for(o.s();!(r=o.n()).done;){var a=r.value;this._updateAttrs(a)}}catch(p){o.e(p)}finally{o.f()}var s,l=k(this.markedChildren);try{for(l.s();!(s=l.n()).done;){var c=s.value;this._updateChildren(c,{inlineFillerPosition:e})}}catch(p){l.e(p)}finally{l.f()}var u,d=k(this.markedTexts);try{for(d.s();!(u=d.n()).done;){var h=u.value;!this.markedChildren.has(h.parent)&&this.domConverter.mapViewToDom(h.parent)&&this._updateText(h,{inlineFillerPosition:e})}}catch(p){d.e(p)}finally{d.f()}if(e){var f=this.domConverter.viewPositionToDom(e),v=f.parent.ownerDocument;po(f.parent)?this._inlineFiller=f.parent:this._inlineFiller=Po(v,f.parent,f.offset)}else this._inlineFiller=null;this._updateSelection(),this._updateFocus(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}},{key:"_updateChildrenMappings",value:function(e){var t=this.domConverter.mapViewToDom(e);if(t){var n=this.domConverter.mapViewToDom(e).childNodes,i=Array.from(this.domConverter.viewChildrenToDom(e,t.ownerDocument,{withChildren:!1})),r=this._diffNodeLists(n,i),o=this._findReplaceActions(r,n,i);if(-1!==o.indexOf("replace")){var a,s={equal:0,insert:0,delete:0},l=k(o);try{for(l.s();!(a=l.n()).done;){var c=a.value;if("replace"===c){var u=s.equal+s.insert,d=s.equal+s.delete,h=e.getChild(u);!h||h.is("uiElement")||h.is("rawElement")||this._updateElementMappings(h,n[d]),Co(i[u]),s.equal++}else s[c]++}}catch(f){l.e(f)}finally{l.f()}}}}},{key:"_updateElementMappings",value:function(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}},{key:"_getInlineFillerPosition",value:function(){var e=this.selection.getFirstPosition();return e.parent.is("$text")?Cr._createBefore(this.selection.getFirstPosition().parent):e}},{key:"_isSelectionInInlineFiller",value:function(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;var e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&uo(t.parent)&&po(t.parent))}},{key:"_removeInlineFiller",value:function(){var e=this._inlineFiller;if(!po(e))throw new jn.b("view-renderer-filler-was-lost: The inline filler node was lost.",this);mo(e)?e.parentNode.removeChild(e):e.data=e.data.substr(7),this._inlineFiller=null}},{key:"_needsInlineFillerAtSelection",value:function(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;var e=this.selection.getFirstPosition(),t=e.parent,n=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;var t=e.findAncestor((function(e){return e.hasAttribute("contenteditable")}));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(n===t.getFillerOffset())return!1;var i=e.nodeBefore,r=e.nodeAfter;return!(i instanceof ai||r instanceof ai)}},{key:"_updateText",value:function(e,t){var n=this.domConverter.findCorrespondingDomText(e),i=this.domConverter.viewToDom(e,n.ownerDocument),r=n.data,o=i.data,a=t.inlineFillerPosition;if(a&&a.parent==e.parent&&a.offset==e.index&&(o=vo+o),r!=o){var s,l=bo(r,o),c=k(l);try{for(c.s();!(s=c.n()).done;){var u=s.value;"insert"===u.type?n.insertData(u.index,u.values.join("")):n.deleteData(u.index,u.howMany)}}catch(d){c.e(d)}finally{c.f()}}}},{key:"_updateAttrs",value:function(e){var t=this.domConverter.mapViewToDom(e);if(t){var n,i=Array.from(t.attributes).map((function(e){return e.name})),r=e.getAttributeKeys(),o=k(r);try{for(o.s();!(n=o.n()).done;){var a=n.value;t.setAttribute(a,e.getAttribute(a))}}catch(u){o.e(u)}finally{o.f()}var s,l=k(i);try{for(l.s();!(s=l.n()).done;){var c=s.value;e.hasAttribute(c)||t.removeAttribute(c)}}catch(u){l.e(u)}finally{l.f()}}}},{key:"_updateChildren",value:function(e,t){var n=this.domConverter.mapViewToDom(e);if(n){var i=t.inlineFillerPosition,r=this.domConverter.mapViewToDom(e).childNodes,o=Array.from(this.domConverter.viewChildrenToDom(e,n.ownerDocument,{bind:!0,inlineFillerPosition:i}));i&&i.parent===e&&Po(n.ownerDocument,o,i.offset);var a,s=this._diffNodeLists(r,o),l=0,c=new Set,u=k(s);try{for(u.s();!(a=u.n()).done;){var d=a.value;"delete"===d?(c.add(r[l]),Co(r[l])):"equal"===d&&l++}}catch(b){u.e(b)}finally{u.f()}l=0;var h,f=k(s);try{for(f.s();!(h=f.n()).done;){var v=h.value;"insert"===v?(xo(n,l,o[l]),l++):"equal"===v&&(this._markDescendantTextToSync(this.domConverter.domToView(o[l])),l++)}}catch(b){f.e(b)}finally{f.f()}var p,m=k(c);try{for(m.s();!(p=m.n()).done;){var g=p.value;g.parentNode||this.domConverter.unbindDomElement(g)}}catch(b){m.e(b)}finally{m.f()}}}},{key:"_diffNodeLists",value:function(e,t){return _o(e=function(e,t){var n=Array.from(e);return 0!=n.length&&t?(n[n.length-1]==t&&n.pop(),n):n}(e,this._fakeSelectionContainer),t,So.bind(null,this.domConverter))}},{key:"_findReplaceActions",value:function(e,t,n){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;var i,r=[],o=[],a=[],s={equal:0,insert:0,delete:0},l=k(e);try{for(l.s();!(i=l.n()).done;){var c=i.value;"insert"===c?a.push(n[s.equal+s.insert]):"delete"===c?o.push(t[s.equal+s.delete]):(r=r.concat(_o(o,a,Eo).map((function(e){return"equal"===e?"replace":e}))),r.push("equal"),o=[],a=[]),s[c]++}}catch(u){l.e(u)}finally{l.f()}return r.concat(_o(o,a,Eo).map((function(e){return"equal"===e?"replace":e})))}},{key:"_markDescendantTextToSync",value:function(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element")){var t,n=k(e.getChildren());try{for(n.s();!(t=n.n()).done;){var i=t.value;this._markDescendantTextToSync(i)}}catch(r){n.e(r)}finally{n.f()}}}},{key:"_updateSelection",value:function(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();var e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):(this._removeFakeSelection(),this._updateDomSelection(e)))}},{key:"_updateFakeSelection",value:function(e){var t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){var t=e.createElement("div");return Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));var n=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(n,this.selection),this._fakeSelectionNeedsUpdate(e)){n.parentElement&&n.parentElement==e||e.appendChild(n),n.textContent=this.selection.fakeSelectionLabel||" ";var i=t.getSelection(),r=t.createRange();i.removeAllRanges(),r.selectNodeContents(n),i.addRange(r)}}},{key:"_updateDomSelection",value:function(e){var t=e.ownerDocument.defaultView.getSelection();if(this._domSelectionNeedsUpdate(t)){var n=this.domConverter.viewPositionToDom(this.selection.anchor),i=this.domConverter.viewPositionToDom(this.selection.focus);e.focus(),t.collapse(n.parent,n.offset),t.extend(i.parent,i.offset),zr.isGecko&&function(e,t){var n=e.parent;if(n.nodeType==Node.ELEMENT_NODE&&e.offset==n.childNodes.length-1){var i=n.childNodes[e.offset];i&&"BR"==i.tagName&&t.addRange(t.getRangeAt(0))}}(i,t)}}},{key:"_domSelectionNeedsUpdate",value:function(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;var t=e&&this.domConverter.domSelectionToView(e);return(!t||!this.selection.isEqual(t))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(t))}},{key:"_fakeSelectionNeedsUpdate",value:function(e){var t=this._fakeSelectionContainer,n=e.ownerDocument.getSelection();return!t||t.parentElement!==e||n.anchorNode!==t&&!t.contains(n.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel}},{key:"_removeDomSelection",value:function(){var e,t=k(this.domDocuments);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(n.getSelection().rangeCount){var i=n.activeElement,r=this.domConverter.mapDomToView(i);i&&r&&n.getSelection().removeAllRanges()}}}catch(o){t.e(o)}finally{t.f()}}},{key:"_removeFakeSelection",value:function(){var e=this._fakeSelectionContainer;e&&e.remove()}},{key:"_updateFocus",value:function(){if(this.isFocused){var e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}]),e}();function Po(e,t,n){var i=t instanceof Array?t:t.childNodes,r=i[n];if(uo(r))return r.data=vo+r.data,r;var o=e.createTextNode(vo);return Array.isArray(t)?i.splice(n,0,o):xo(t,n,o),o}function Eo(e,t){return Ao(e)&&Ao(t)&&!uo(e)&&!uo(t)&&e.nodeType!==Node.COMMENT_NODE&&t.nodeType!==Node.COMMENT_NODE&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function So(e,t,n){return t===n||(uo(t)&&uo(n)?t.data===n.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(n)))}Kn(To,vr);var Oo={window:window,document:document};function Mo(e){for(var t=0;e.previousSibling;)e=e.previousSibling,t++;return t}function Io(e){for(var t=[];e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}var No=fo(document),Ro=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w(this,e),this.document=t,this.blockFillerMode=n.blockFillerMode||"br",this.preElements=["pre"],this.blockElements=["p","div","h1","h2","h3","h4","h5","h6","li","dd","dt","figcaption","td","th"],this._blockFiller="br"==this.blockFillerMode?fo:ho,this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap}return x(e,[{key:"bindFakeSelection",value:function(e,t){this._fakeSelectionMapping.set(e,new Er(t))}},{key:"fakeSelectionToView",value:function(e){return this._fakeSelectionMapping.get(e)}},{key:"bindElements",value:function(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}},{key:"unbindDomElement",value:function(e){var t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);var n,i=k(e.childNodes);try{for(i.s();!(n=i.n()).done;){var r=n.value;this.unbindDomElement(r)}}catch(o){i.e(o)}finally{i.f()}}}},{key:"bindDocumentFragments",value:function(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}},{key:"viewToDom",value:function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.is("$text")){var r=this._processDataFromViewText(e);return t.createTextNode(r)}if(this.mapViewToDom(e))return this.mapViewToDom(e);if(e.is("documentFragment"))n=t.createDocumentFragment(),i.bind&&this.bindDocumentFragments(n,e);else{if(e.is("uiElement"))return n=e.render(t),i.bind&&this.bindElements(n,e),n;n=e.hasAttribute("xmlns")?t.createElementNS(e.getAttribute("xmlns"),e.name):t.createElement(e.name),e.is("rawElement")&&e.render(n),i.bind&&this.bindElements(n,e);var o,a=k(e.getAttributeKeys());try{for(a.s();!(o=a.n()).done;){var s=o.value;n.setAttribute(s,e.getAttribute(s))}}catch(d){a.e(d)}finally{a.f()}}if(i.withChildren||void 0===i.withChildren){var l,c=k(this.viewChildrenToDom(e,t,i));try{for(c.s();!(l=c.n()).done;){var u=l.value;n.appendChild(u)}}catch(d){c.e(d)}finally{c.f()}}return n}},{key:"viewChildrenToDom",value:a.mark((function e(t,n){var i,r,o,s,l,c,u=arguments;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=u.length>2&&void 0!==u[2]?u[2]:{},r=t.getFillerOffset&&t.getFillerOffset(),o=0,s=k(t.getChildren()),e.prev=4,s.s();case 6:if((l=s.n()).done){e.next=17;break}if(c=l.value,e.t0=r===o,!e.t0){e.next=12;break}return e.next=12,this._blockFiller(n);case 12:return e.next=14,this.viewToDom(c,n,i);case 14:o++;case 15:e.next=6;break;case 17:e.next=22;break;case 19:e.prev=19,e.t1=e["catch"](4),s.e(e.t1);case 22:return e.prev=22,s.f(),e.finish(22);case 25:if(e.t2=r===o,!e.t2){e.next=29;break}return e.next=29,this._blockFiller(n);case 29:case"end":return e.stop()}}),e,this,[[4,19,22,25]])}))},{key:"viewRangeToDom",value:function(e){var t=this.viewPositionToDom(e.start),n=this.viewPositionToDom(e.end),i=document.createRange();return i.setStart(t.parent,t.offset),i.setEnd(n.parent,n.offset),i}},{key:"viewPositionToDom",value:function(e){var t,n,i,r=e.parent;if(r.is("$text")){var o=this.findCorrespondingDomText(r);if(!o)return null;var a=e.offset;return po(o)&&(a+=7),{parent:o,offset:a}}if(0===e.offset){if(t=this.mapViewToDom(r),!t)return null;i=t.childNodes[0]}else{var s=e.nodeBefore;if(n=s.is("$text")?this.findCorrespondingDomText(s):this.mapViewToDom(e.nodeBefore),!n)return null;t=n.parentNode,i=n.nextSibling}return uo(i)&&po(i)?{parent:i,offset:7}:{parent:t,offset:n?Mo(n)+1:0}}},{key:"domToView",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isBlockFiller(e,this.blockFillerMode))return null;var n,i=this.getHostViewElement(e,this._domToViewMapping);if(i)return i;if(uo(e)){if(mo(e))return null;var r=this._processDataFromDomText(e);return""===r?null:new ai(this.document,r)}if(this.isComment(e))return null;if(this.mapDomToView(e))return this.mapDomToView(e);if(this.isDocumentFragment(e))n=new Xr(this.document),t.bind&&this.bindDocumentFragments(e,n);else{var o=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();n=new or(this.document,o),t.bind&&this.bindElements(e,n);for(var a=e.attributes,s=a.length-1;s>=0;s--)n._setAttribute(a[s].name,a[s].value)}if(t.withChildren||void 0===t.withChildren){var l,c=k(this.domChildrenToView(e,t));try{for(c.s();!(l=c.n()).done;){var u=l.value;n._appendChild(u)}}catch(d){c.e(d)}finally{c.f()}}return n}},{key:"domChildrenToView",value:a.mark((function e(t){var n,i,r,o,s=arguments;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=s.length>1&&void 0!==s[1]?s[1]:{},i=0;case 2:if(!(i1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:{};if(!this._domListeners||!this._domListeners[e]){var i={capture:!!n.useCapture,passive:!!n.usePassive},r=this._createDomListener(e,i);this._domNode.addEventListener(e,r,i),this._domListeners||(this._domListeners={}),this._domListeners[e]=r}},detach:function(e){var t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()},_createDomListener:function(e,t){var n=this,i=function(t){n.fire(e,t)};return i.removeListener=function(){n._domNode.removeEventListener(e,i,t),delete n._domListeners[e]},i}});var Uo=function(){function e(t){w(this,e),this.view=t,this.document=t.document,this.isEnabled=!1}return x(e,[{key:"enable",value:function(){this.isEnabled=!0}},{key:"disable",value:function(){this.isEnabled=!1}},{key:"destroy",value:function(){this.disable(),this.stopListening()}}]),e}();Kn(Uo,Vo);var Ho=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},$o=function(e){return this.__data__.has(e)};function Wo(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ze;++ts))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,d=!0,h=2&n?new qo:void 0;for(o.set(e,t),o.set(t,e);++u=t||n<0||d&&e-c>=o}function m(){var e=va();if(p(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?_a(n,o-(e-c)):n}(e))}function g(e){return s=void 0,h&&i?f(e):(i=r=void 0,a)}function k(){var e=va(),n=p(e);if(i=arguments,r=this,l=e,n){if(void 0===s)return v(l);if(d)return clearTimeout(s),s=setTimeout(m,t),f(l)}return void 0===s&&(s=setTimeout(m,t)),a}return t=ya(t)||0,ne(n)&&(u=!!n.leading,o=(d="maxWait"in n)?wa(ya(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),k.cancel=function(){void 0!==s&&clearTimeout(s),c=0,i=l=r=s=void 0},k.flush=function(){return void 0===s?a:g(va())},k},Ca=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i._fireSelectionChangeDoneDebounced=xa((function(e){return i.document.fire("selectionChangeDone",e)}),200),i}return x(n,[{key:"observe",value:function(){var e=this,t=this.document;t.on("keydown",(function(n,i){var r;t.selection.isFake&&((r=i.keyCode)==Br.arrowright||r==Br.arrowleft||r==Br.arrowup||r==Br.arrowdown)&&e.isEnabled&&(i.preventDefault(),e._handleSelectionMove(i.keyCode))}),{priority:"lowest"})}},{key:"destroy",value:function(){l(N(n.prototype),"destroy",this).call(this),this._fireSelectionChangeDoneDebounced.cancel()}},{key:"_handleSelectionMove",value:function(e){var t=this.document.selection,n=new Er(t.getRanges(),{backward:t.isBackward,fake:!1});e!=Br.arrowleft&&e!=Br.arrowup||n.setTo(n.getFirstPosition()),e!=Br.arrowright&&e!=Br.arrowdown||n.setTo(n.getLastPosition());var i={oldSelection:t,newSelection:n,domSelection:null};this.document.fire("selectionChange",i),this._fireSelectionChangeDoneDebounced(i)}}]),n}(Uo),Aa=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.mutationObserver=e.getObserver(ua),i.selection=i.document.selection,i.domConverter=e.domConverter,i._documents=new WeakSet,i._fireSelectionChangeDoneDebounced=xa((function(e){return i.document.fire("selectionChangeDone",e)}),200),i._clearInfiniteLoopInterval=setInterval((function(){return i._clearInfiniteLoop()}),1e3),i._loopbackCounter=0,i}return x(n,[{key:"observe",value:function(e){var t=this,n=e.ownerDocument;this._documents.has(n)||(this.listenTo(n,"selectionchange",(function(){t._handleSelectionChange(n)})),this._documents.add(n))}},{key:"destroy",value:function(){l(N(n.prototype),"destroy",this).call(this),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}},{key:"_handleSelectionChange",value:function(e){if(this.isEnabled){this.mutationObserver.flush();var t=e.defaultView.getSelection(),n=this.domConverter.domSelectionToView(t);if(0!=n.rangeCount){if(this.view.hasDomSelection=!0,!(this.selection.isEqual(n)&&this.domConverter.isDomSelectionCorrect(t)||++this._loopbackCounter>60))if(this.selection.isSimilar(n))this.view.forceRender();else{var i={oldSelection:this.selection,newSelection:n,domSelection:t};this.document.fire("selectionChange",i),this._fireSelectionChangeDoneDebounced(i)}}else this.view.hasDomSelection=!1}}},{key:"_clearInfiniteLoop",value:function(){this._loopbackCounter=0}}]),n}(Uo),Ta=function(e){C(n,e);var t=A(n);function n(e){var i;w(this,n),i=t.call(this,e),i.domEventType=["focus","blur"],i.useCapture=!0;var r=i.document;return r.on("focus",(function(){r.isFocused=!0,i._renderTimeoutId=setTimeout((function(){return e.forceRender()}),50)})),r.on("blur",(function(t,n){var i=r.selection.editableElement;null!==i&&i!==n.target||(r.isFocused=!1,e.forceRender())})),i}return x(n,[{key:"onDomEvent",value:function(e){this.fire(e.type,e)}},{key:"destroy",value:function(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),l(N(n.prototype),"destroy",this).call(this)}}]),n}(ha),Pa=function(e){C(n,e);var t=A(n);function n(e){var i;w(this,n),i=t.call(this,e),i.domEventType=["compositionstart","compositionupdate","compositionend"];var r=i.document;return r.on("compositionstart",(function(){r.isComposing=!0})),r.on("compositionend",(function(){r.isComposing=!1})),i}return x(n,[{key:"onDomEvent",value:function(e){this.fire(e.type,e)}}]),n}(ha),Ea=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.domEventType=["beforeinput"],i}return x(n,[{key:"onDomEvent",value:function(e){this.fire(e.type,e)}}]),n}(ha);function Sa(e){return"[object Range]"==Object.prototype.toString.apply(e)}function Oa(e){var t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}var Ma=["top","right","bottom","left","width","height"],Ia=function(){function e(t){w(this,e);var n=Sa(t);if(Object.defineProperty(this,"_source",{value:t._source||t,writable:!0,enumerable:!1}),Sn(t)||n)if(n){var i=e.getDomRangeRects(t);Na(this,e.getBoundingRect(i))}else Na(this,t.getBoundingClientRect());else if(jo(t)){var r=t.innerWidth,o=t.innerHeight;Na(this,{top:0,right:r,bottom:o,left:0,width:r,height:o})}else Na(this,t)}return x(e,[{key:"clone",value:function(){return new e(this)}},{key:"moveTo",value:function(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}},{key:"moveBy",value:function(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}},{key:"getIntersection",value:function(t){var n={top:Math.max(this.top,t.top),right:Math.min(this.right,t.right),bottom:Math.min(this.bottom,t.bottom),left:Math.max(this.left,t.left)};return n.width=n.right-n.left,n.height=n.bottom-n.top,n.width<0||n.height<0?null:new e(n)}},{key:"getIntersectionArea",value:function(e){var t=this.getIntersection(e);return t?t.getArea():0}},{key:"getArea",value:function(){return this.width*this.height}},{key:"getVisible",value:function(){var t=this._source,n=this.clone();if(!Ra(t))for(var i=t.parentNode||t.commonAncestorContainer;i&&!Ra(i);){var r=new e(i),o=n.getIntersection(r);if(!o)return null;o.getArea()t.bottom}function Va(e,t){return e.topt.right}function Ua(e){return Sa(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function Ha(e){if(Sa(e)){var t=e.commonAncestorContainer;return uo(t)&&(t=t.parentNode),t}return e.parentNode}function $a(e,t){var n=Ua(e),i=new Ia(e);if(n===t)return i;for(var r=n;r!=t;){var o=r.frameElement,a=new Ia(o).excludeScrollbarsAndBorders();i.moveBy(a.left,a.top),r=r.parent}return i}Object.assign({},{scrollViewportToShowTarget:Da,scrollAncestorsToShowTarget:function(e){za(Ha(e),(function(){return new Ia(e)}))}});var Wa=function(){function e(t){var n=this;w(this,e),this.document=new Or(t),this.domConverter=new Ro(this.document),this.domRoots=new Map,this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new To(this.domConverter,this.document.selection),this._renderer.bind("isFocused").to(this.document),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new eo(this.document),this.addObserver(ua),this.addObserver(Aa),this.addObserver(Ta),this.addObserver(fa),this.addObserver(Ca),this.addObserver(Pa),zr.isAndroid&&this.addObserver(Ea),this.document.on("keydown",ko),Kr(this),this.on("render",(function(){n._render(),n.document.fire("layoutChanged"),n._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(function(){n._hasChangedSinceTheLastRendering=!0}))}return x(e,[{key:"attachDomRoot",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"main",i=this.document.getRoot(n);i._name=e.tagName.toLowerCase();for(var r={},o=0,a=Array.from(e.attributes);o0&&void 0!==arguments[0]?arguments[0]:"main";return this.domRoots.get(e)}},{key:"addObserver",value:function(e){var t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);var n,i=k(this.domRoots);try{for(i.s();!(n=i.n()).done;){var r=v(n.value,2),o=r[0],a=r[1];t.observe(a,o)}}catch(s){i.e(s)}finally{i.f()}return t.enable(),t}},{key:"getObserver",value:function(e){return this._observers.get(e)}},{key:"disableObservers",value:function(){var e,t=k(this._observers.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;n.disable()}}catch(i){t.e(i)}finally{t.f()}}},{key:"enableObservers",value:function(){var e,t=k(this._observers.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;n.enable()}}catch(i){t.e(i)}finally{t.f()}}},{key:"scrollToTheSelection",value:function(){var e=this.document.selection.getFirstRange();e&&Da({target:this.domConverter.viewRangeToDom(e),viewportOffset:20})}},{key:"focus",value:function(){if(!this.document.isFocused){var e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}},{key:"change",value:function(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new jn.b("cannot-change-view-tree: Attempting to make changes to the view when it is in an incorrect state: rendering or post-fixers are in progress. This may cause some unexpected behavior and inconsistency between the DOM and the view.",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;var t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){jn.b.rethrowUnexpectedError(e,this)}}},{key:"forceRender",value:function(){this._hasChangedSinceTheLastRendering=!0,this.change((function(){}))}},{key:"destroy",value:function(){var e,t=k(this._observers.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;n.destroy()}}catch(i){t.e(i)}finally{t.f()}this.document.destroy(),this.stopListening()}},{key:"createPositionAt",value:function(e,t){return Cr._createAt(e,t)}},{key:"createPositionAfter",value:function(e){return Cr._createAfter(e)}},{key:"createPositionBefore",value:function(e){return Cr._createBefore(e)}},{key:"createRange",value:function(e,t){return new Ar(e,t)}},{key:"createRangeOn",value:function(e){return Ar._createOn(e)}},{key:"createRangeIn",value:function(e){return Ar._createIn(e)}},{key:"createSelection",value:function(e,t,n){return new Er(e,t,n)}},{key:"_disableRendering",value:function(e){this._renderingDisabled=e,0==e&&this.change((function(){}))}},{key:"_render",value:function(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}]),e}();Kn(Wa,vr);var qa=function(){function e(t){w(this,e),this.parent=null,this._attrs=li(t)}return x(e,[{key:"isAttached",value:function(){return this.root.is("rootElement")}},{key:"getPath",value:function(){for(var e=[],t=this;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}},{key:"getAncestors",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeSelf:!1,parentFirst:!1},t=[],n=e.includeSelf?this:this.parent;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}},{key:"getCommonAncestor",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getAncestors(t),i=e.getAncestors(t),r=0;n[r]==i[r]&&n[r];)r++;return 0===r?null:n[r-1]}},{key:"isBefore",value:function(e){if(this==e)return!1;if(this.root!==e.root)return!1;var t=this.getPath(),n=e.getPath(),i=ii(t,n);switch(i){case"prefix":return!0;case"extension":return!1;default:return t[i]t.offsetSize)throw new jn.b("model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",this);if(i<0||n+i>t.offsetSize)throw new jn.b("model-textproxy-wrong-length: Given length value is incorrect.",this);this.data=t.data.substring(n,n+i),this.offsetInText=n}return x(e,[{key:"is",value:function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e}},{key:"getPath",value:function(){var e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}},{key:"getAncestors",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeSelf:!1,parentFirst:!1},t=[],n=e.includeSelf?this:this.parent;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}},{key:"hasAttribute",value:function(e){return this.textNode.hasAttribute(e)}},{key:"getAttribute",value:function(e){return this.textNode.getAttribute(e)}},{key:"getAttributes",value:function(){return this.textNode.getAttributes()}},{key:"getAttributeKeys",value:function(){return this.textNode.getAttributeKeys()}},{key:"startOffset",get:function(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}},{key:"offsetSize",get:function(){return this.data.length}},{key:"endOffset",get:function(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}},{key:"isPartial",get:function(){return this.offsetSize!==this.textNode.offsetSize}},{key:"parent",get:function(){return this.textNode.parent}},{key:"root",get:function(){return this.textNode.root}}]),e}(),Ka=function(){function e(t){w(this,e),this._nodes=[],t&&this._insertNodes(0,t)}return x(e,[{key:Symbol.iterator,value:function(){return this._nodes[Symbol.iterator]()}},{key:"getNode",value:function(e){return this._nodes[e]||null}},{key:"getNodeIndex",value:function(e){var t=this._nodes.indexOf(e);return-1==t?null:t}},{key:"getNodeStartOffset",value:function(e){var t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce((function(e,t){return e+t.offsetSize}),0)}},{key:"indexToOffset",value:function(e){if(e==this._nodes.length)return this.maxOffset;var t=this._nodes[e];if(!t)throw new jn.b("model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.",this);return this.getNodeStartOffset(t)}},{key:"offsetToIndex",value:function(e){var t,n=0,i=k(this._nodes);try{for(i.s();!(t=i.n()).done;){var r=t.value;if(e>=n&&e1&&void 0!==arguments[1]?arguments[1]:1;return this._nodes.splice(e,t)}},{key:"toJSON",value:function(){return this._nodes.map((function(e){return e.toJSON()}))}},{key:"length",get:function(){return this._nodes.length}},{key:"maxOffset",get:function(){return this._nodes.reduce((function(e,t){return e+t.offsetSize}),0)}}]),e}(),Ja=function(e){C(n,e);var t=A(n);function n(e,i,r){var o;return w(this,n),o=t.call(this,i),o.name=e,o._children=new Ka,r&&o._insertChild(0,r),o}return x(n,[{key:"is",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e}},{key:"getChild",value:function(e){return this._children.getNode(e)}},{key:"getChildren",value:function(){return this._children[Symbol.iterator]()}},{key:"getChildIndex",value:function(e){return this._children.getNodeIndex(e)}},{key:"getChildStartOffset",value:function(e){return this._children.getNodeStartOffset(e)}},{key:"offsetToIndex",value:function(e){return this._children.offsetToIndex(e)}},{key:"getNodeByPath",value:function(e){var t,n=this,i=k(e);try{for(i.s();!(t=i.n()).done;){var r=t.value;n=n.getChild(n.offsetToIndex(r))}}catch(o){i.e(o)}finally{i.f()}return n}},{key:"findAncestor",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{includeSelf:!1},n=t.includeSelf?this:this.parent;n;){if(n.name===e)return n;n=n.parent}return null}},{key:"toJSON",value:function(){var e=l(N(n.prototype),"toJSON",this).call(this);if(e.name=this.name,this._children.length>0){e.children=[];var t,i=k(this._children);try{for(i.s();!(t=i.n()).done;){var r=t.value;e.children.push(r.toJSON())}}catch(o){i.e(o)}finally{i.f()}}return e}},{key:"_clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=e?Array.from(this._children).map((function(e){return e._clone(!0)})):null;return new n(this.name,this.getAttributes(),t)}},{key:"_appendChild",value:function(e){this._insertChild(this.childCount,e)}},{key:"_insertChild",value:function(e,t){var n,i=function(e){return"string"==typeof e?[new Ya(e)]:(Gn(e)||(e=[e]),Array.from(e).map((function(e){return"string"==typeof e?new Ya(e):e instanceof Ga?new Ya(e.data,e.getAttributes()):e})))}(t),r=k(i);try{for(r.s();!(n=r.n()).done;){var o=n.value;null!==o.parent&&o._remove(),o.parent=this}}catch(a){r.e(a)}finally{r.f()}this._children._insertNodes(e,i)}},{key:"_removeChildren",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this._children._removeNodes(e,n),r=k(i);try{for(r.s();!(t=r.n()).done;){var o=t.value;o.parent=null}}catch(a){r.e(a)}finally{r.f()}return i}},{key:"childCount",get:function(){return this._children.length}},{key:"maxOffset",get:function(){return this._children.maxOffset}},{key:"isEmpty",get:function(){return 0===this.childCount}}],[{key:"fromJSON",value:function(e){var t=null;if(e.children){t=[];var i,r=k(e.children);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.name?t.push(n.fromJSON(o)):t.push(Ya.fromJSON(o))}}catch(a){r.e(a)}finally{r.f()}}return new n(e.name,e.attributes,t)}}]),n}(qa),Qa=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(w(this,e),!t.boundaries&&!t.startPosition)throw new jn.b("model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",null);var n=t.direction||"forward";if("forward"!=n&&"backward"!=n)throw new jn.b("model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",t,{direction:n});this.direction=n,this.boundaries=t.boundaries||null,t.startPosition?this.position=t.startPosition.clone():this.position=Xa._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}return x(e,[{key:Symbol.iterator,value:function(){return this}},{key:"skip",value:function(e){var t,n,i,r;do{var o;i=this.position,r=this._visitedParent,o=this.next(),t=o.done,n=o.value}while(!t&&e(n));t||(this.position=i,this._visitedParent=r)}},{key:"next",value:function(){return"forward"==this.direction?this._next():this._previous()}},{key:"_next",value:function(){var e=this.position,t=this.position.clone(),n=this._visitedParent;if(null===n.parent&&t.offset===n.maxOffset)return{done:!0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};var i=t.parent,r=es(t,i),o=r||ts(t,i,r);if(o instanceof Ja)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=o),this.position=t,Za("elementStart",o,e,t,1);if(o instanceof Ya){var a;if(this.singleCharacters)a=1;else{var s=o.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offsets&&(s=this.boundaries.start.offset),a=t.offset-s}var l=t.offset-o.startOffset,c=new Ga(o,l-a,a);return t.offset-=a,this.position=t,Za("text",c,e,t,a)}return t.path.pop(),this.position=t,this._visitedParent=n.parent,Za("elementStart",n,e,t,1)}}]),e}();function Za(e,t,n,i,r){return{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:i,length:r}}}var Xa=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"toNone";if(w(this,e),!t.is("element")&&!t.is("documentFragment"))throw new jn.b("model-position-root-invalid: Position root invalid.",t);if(!(n instanceof Array)||0===n.length)throw new jn.b("model-position-path-incorrect-format: Position path must be an array with at least one item.",t,{path:n});t.is("rootElement")?n=n.slice():(n=[].concat(u(t.getPath()),u(n)),t=t.root),this.root=t,this.path=n,this.stickiness=i}return x(e,[{key:"compareWith",value:function(e){if(this.root!=e.root)return"different";var t=ii(this.path,e.path);switch(t){case"same":return"same";case"prefix":return"before";case"extension":return"after";default:return this.path[t]1&&void 0!==arguments[1]?arguments[1]:{};t.startPosition=this;var n=new Qa(t);return n.skip(e),n.position}},{key:"getParentPath",value:function(){return this.path.slice(0,-1)}},{key:"getAncestors",value:function(){var e=this.parent;return e.is("documentFragment")?[e]:e.getAncestors({includeSelf:!0})}},{key:"findAncestor",value:function(e){var t=this.parent;return t.is("element")?t.findAncestor(e,{includeSelf:!0}):null}},{key:"getCommonPath",value:function(e){if(this.root!=e.root)return[];var t=ii(this.path,e.path),n="string"==typeof t?Math.min(this.path.length,e.path.length):t;return this.path.slice(0,n)}},{key:"getCommonAncestor",value:function(e){for(var t=this.getAncestors(),n=e.getAncestors(),i=0;t[i]==n[i]&&t[i];)i++;return 0===i?null:t[i-1]}},{key:"getShiftedBy",value:function(e){var t=this.clone(),n=t.offset+e;return t.offset=n<0?0:n,t}},{key:"isAfter",value:function(e){return"after"==this.compareWith(e)}},{key:"isBefore",value:function(e){return"before"==this.compareWith(e)}},{key:"isEqual",value:function(e){return"same"==this.compareWith(e)}},{key:"isTouching",value:function(t){var n=null,i=null;switch(this.compareWith(t)){case"same":return!0;case"before":n=e._createAt(this),i=e._createAt(t);break;case"after":n=e._createAt(t),i=e._createAt(this);break;default:return!1}for(var r=n.parent;n.path.length+i.path.length;){if(n.isEqual(i))return!0;if(n.path.length>i.path.length){if(n.offset!==r.maxOffset)return!1;n.path=n.path.slice(0,-1),r=r.parent,n.offset++}else{if(0!==i.offset)return!1;i.path=i.path.slice(0,-1)}}}},{key:"is",value:function(e){return"position"===e||"model:position"===e}},{key:"hasSameParentAs",value:function(e){return this.root===e.root&&"same"==ii(this.getParentPath(),e.getParentPath())}},{key:"getTransformedByOperation",value:function(t){var n;switch(t.type){case"insert":n=this._getTransformedByInsertOperation(t);break;case"move":case"remove":case"reinsert":n=this._getTransformedByMoveOperation(t);break;case"split":n=this._getTransformedBySplitOperation(t);break;case"merge":n=this._getTransformedByMergeOperation(t);break;default:n=e._createAt(this)}return n}},{key:"_getTransformedByInsertOperation",value:function(e){return this._getTransformedByInsertion(e.position,e.howMany)}},{key:"_getTransformedByMoveOperation",value:function(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}},{key:"_getTransformedBySplitOperation",value:function(e){var t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}},{key:"_getTransformedByMergeOperation",value:function(t){var n,i=t.movedRange;return i.containsPosition(this)||i.start.isEqual(this)?(n=this._getCombined(t.sourcePosition,t.targetPosition),t.sourcePosition.isBefore(t.targetPosition)&&(n=n._getTransformedByDeletion(t.deletionPosition,1))):n=this.isEqual(t.deletionPosition)?e._createAt(t.deletionPosition):this._getTransformedByMove(t.deletionPosition,t.graveyardPosition,1),n}},{key:"_getTransformedByDeletion",value:function(t,n){var i=e._createAt(this);if(this.root!=t.root)return i;if("same"==ii(t.getParentPath(),this.getParentPath())){if(t.offsetthis.offset)return null;i.offset-=n}}else if("prefix"==ii(t.getParentPath(),this.getParentPath())){var r=t.path.length-1;if(t.offset<=this.path[r]){if(t.offset+n>this.path[r])return null;i.path[r]-=n}}return i}},{key:"_getTransformedByInsertion",value:function(t,n){var i=e._createAt(this);if(this.root!=t.root)return i;if("same"==ii(t.getParentPath(),this.getParentPath()))(t.offset2&&void 0!==arguments[2]?arguments[2]:"toNone";if(t instanceof e)return new e(t.root,t.path,t.stickiness);var r=t;if("end"==n)n=r.maxOffset;else{if("before"==n)return this._createBefore(r,i);if("after"==n)return this._createAfter(r,i);if(0!==n&&!n)throw new jn.b("model-createPositionAt-offset-required: Model#createPositionAt() requires the offset when the first parameter is a model item.",[this,t])}if(!r.is("element")&&!r.is("documentFragment"))throw new jn.b("model-position-parent-incorrect: Position parent have to be a element or document fragment.",[this,t]);var o=r.getPath();return o.push(n),new this(r.root,o,i)}},{key:"_createAfter",value:function(e,t){if(!e.parent)throw new jn.b("model-position-after-root: You cannot make a position after root.",[this,e],{root:e});return this._createAt(e.parent,e.endOffset,t)}},{key:"_createBefore",value:function(e,t){if(!e.parent)throw new jn.b("model-position-before-root: You cannot make a position before root.",e,{root:e});return this._createAt(e.parent,e.startOffset,t)}},{key:"fromJSON",value:function(t,n){if("$graveyard"===t.root){var i=new e(n.graveyard,t.path);return i.stickiness=t.stickiness,i}if(!n.getRoot(t.root))throw new jn.b("model-position-fromjson-no-root: Cannot create position for document. Root with specified name does not exist.",n,{rootName:t.root});return new e(n.getRoot(t.root),t.path,t.stickiness)}}]),e}();function es(e,t){var n=t.getChild(t.offsetToIndex(e.offset));return n&&n.is("$text")&&n.startOffset1&&void 0!==arguments[1]?arguments[1]:null;w(this,e),this.start=Xa._createAt(t),this.end=n?Xa._createAt(n):Xa._createAt(t),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}return x(e,[{key:Symbol.iterator,value:a.mark((function e(){return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.delegateYield(new Qa({boundaries:this,ignoreElementEnd:!0}),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"containsPosition",value:function(e){return e.isAfter(this.start)&&e.isBefore(this.end)}},{key:"containsRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.isCollapsed&&(t=!1);var n=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),i=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return n&&i}},{key:"containsItem",value:function(e){var t=Xa._createBefore(e);return this.containsPosition(t)||this.start.isEqual(t)}},{key:"is",value:function(e){return"range"===e||"model:range"===e}},{key:"isEqual",value:function(e){return this.start.isEqual(e.start)&&this.end.isEqual(e.end)}},{key:"isIntersecting",value:function(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}},{key:"getDifference",value:function(t){var n=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&n.push(new e(this.start,t.start)),this.containsPosition(t.end)&&n.push(new e(t.end,this.end))):n.push(new e(this.start,this.end)),n}},{key:"getIntersection",value:function(t){if(this.isIntersecting(t)){var n=this.start,i=this.end;return this.containsPosition(t.start)&&(n=t.start),this.containsPosition(t.end)&&(i=t.end),new e(n,i)}return null}},{key:"getJoined",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.isIntersecting(t);if(i||(i=this.start.isBefore(t.start)?n?this.end.isTouching(t.start):this.end.isEqual(t.start):n?t.end.isTouching(this.start):t.end.isEqual(this.start)),!i)return null;var r=this.start,o=this.end;return t.start.isBefore(r)&&(r=t.start),t.end.isAfter(o)&&(o=t.end),new e(r,o)}},{key:"getMinimalFlatRanges",value:function(){for(var t=[],n=this.start.getCommonPath(this.end).length,i=Xa._createAt(this.start),r=i.parent;i.path.length>n+1;){var o=r.maxOffset-i.offset;0!==o&&t.push(new e(i,i.getShiftedBy(o))),i.path=i.path.slice(0,-1),i.offset++,r=r.parent}for(;i.path.length<=this.end.path.length;){var a=this.end.path[i.path.length-1],s=a-i.offset;0!==s&&t.push(new e(i,i.getShiftedBy(s))),i.offset=a,i.path.push(0)}return t}},{key:"getWalker",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.boundaries=this,new Qa(e)}},{key:"getItems",value:a.mark((function e(){var t,n,i,r,o,s=arguments;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=s.length>0&&void 0!==s[0]?s[0]:{},t.boundaries=this,t.ignoreElementEnd=!0,n=new Qa(t),i=k(n),e.prev=4,i.s();case 6:if((r=i.n()).done){e.next=12;break}return o=r.value,e.next=10,o.item;case 10:e.next=6;break;case 12:e.next=17;break;case 14:e.prev=14,e.t0=e["catch"](4),i.e(e.t0);case 17:return e.prev=17,i.f(),e.finish(17);case 20:case"end":return e.stop()}}),e,this,[[4,14,17,20]])}))},{key:"getPositions",value:a.mark((function e(){var t,n,i,r,o,s=arguments;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},t.boundaries=this,n=new Qa(t),e.next=5,n.position;case 5:i=k(n),e.prev=6,i.s();case 8:if((r=i.n()).done){e.next=14;break}return o=r.value,e.next=12,o.nextPosition;case 12:e.next=8;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e["catch"](6),i.e(e.t0);case 19:return e.prev=19,i.f(),e.finish(19);case 22:case"end":return e.stop()}}),e,this,[[6,16,19,22]])}))},{key:"getTransformedByOperation",value:function(t){switch(t.type){case"insert":return this._getTransformedByInsertOperation(t);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(t);case"split":return[this._getTransformedBySplitOperation(t)];case"merge":return[this._getTransformedByMergeOperation(t)]}return[new e(this.start,this.end)]}},{key:"getTransformedByOperations",value:function(t){var n,i=[new e(this.start,this.end)],r=k(t);try{for(r.s();!(n=r.n()).done;)for(var o=n.value,a=0;a1&&void 0!==arguments[1]&&arguments[1];return this._getTransformedByInsertion(e.position,e.howMany,t)}},{key:"_getTransformedByMoveOperation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.sourcePosition,i=e.howMany,r=e.targetPosition;return this._getTransformedByMove(n,r,i,t)}},{key:"_getTransformedBySplitOperation",value:function(t){var n=this.start._getTransformedBySplitOperation(t),i=this.end._getTransformedBySplitOperation(t);return this.end.isEqual(t.insertionPosition)&&(i=this.end.getShiftedBy(1)),n.root!=i.root&&(i=this.end.getShiftedBy(-1)),new e(n,i)}},{key:"_getTransformedByMergeOperation",value:function(t){if(this.start.isEqual(t.targetPosition)&&this.end.isEqual(t.deletionPosition))return new e(this.start);var n=this.start._getTransformedByMergeOperation(t),i=this.end._getTransformedByMergeOperation(t);return n.root!=i.root&&(i=this.end.getShiftedBy(-1)),n.isAfter(i)?(t.sourcePosition.isBefore(t.targetPosition)?(n=Xa._createAt(i),n.offset=0):(t.deletionPosition.isEqual(n)||(i=t.deletionPosition),n=t.targetPosition),new e(n,i)):new e(n,i)}},{key:"_getTransformedByInsertion",value:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(i&&this.containsPosition(t))return[new e(this.start,t),new e(t.getShiftedBy(n),this.end._getTransformedByInsertion(t,n))];var r=new e(this.start,this.end);return r.start=r.start._getTransformedByInsertion(t,n),r.end=r.end._getTransformedByInsertion(t,n),[r]}},{key:"_getTransformedByMove",value:function(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.isCollapsed){var o=this.start._getTransformedByMove(t,n,i);return[new e(o)]}var a,s=e._createFromPositionAndShift(t,i),l=n._getTransformedByDeletion(t,i);if(this.containsPosition(n)&&!r&&(s.containsPosition(this.start)||s.containsPosition(this.end))){var c=this.start._getTransformedByMove(t,n,i),u=this.end._getTransformedByMove(t,n,i);return[new e(c,u)]}var d=this.getDifference(s),h=null,f=this.getIntersection(s);if(1==d.length?h=new e(d[0].start._getTransformedByDeletion(t,i),d[0].end._getTransformedByDeletion(t,i)):2==d.length&&(h=new e(this.start,this.end._getTransformedByDeletion(t,i))),a=h?h._getTransformedByInsertion(l,i,null!==f||r):[],f){var v=new e(f.start._getCombined(s.start,l),f.end._getCombined(s.start,l));2==a.length?a.splice(1,0,v):a.push(v)}return a}},{key:"_getTransformedByDeletion",value:function(t,n){var i=this.start._getTransformedByDeletion(t,n),r=this.end._getTransformedByDeletion(t,n);return null==i&&null==r?null:(null==i&&(i=t),null==r&&(r=t),new e(i,r))}},{key:"isCollapsed",get:function(){return this.start.isEqual(this.end)}},{key:"isFlat",get:function(){return"same"==ii(this.start.getParentPath(),this.end.getParentPath())}},{key:"root",get:function(){return this.start.root}}],[{key:"_createFromPositionAndShift",value:function(e,t){var n=e,i=e.getShiftedBy(t);return t>0?new this(n,i):new this(i,n)}},{key:"_createIn",value:function(e){return new this(Xa._createAt(e,0),Xa._createAt(e,e.maxOffset))}},{key:"_createOn",value:function(e){return this._createFromPositionAndShift(Xa._createBefore(e),e.offsetSize)}},{key:"_createFromRanges",value:function(e){if(0===e.length)throw new jn.b("range-create-from-ranges-empty-array: At least one range has to be passed.",null);if(1==e.length)return e[0].clone();var t=e[0];e.sort((function(e,t){return e.start.isAfter(t.start)?1:-1}));var n=e.indexOf(t),i=new this(t.start,t.end);if(n>0)for(var r=n-1;e[r].end.isEqual(i.start);r++)i.start=Xa._createAt(e[r].start);for(var o=n+1;o1&&void 0!==arguments[1]?arguments[1]:{isPhantom:!1},n={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",n),n.viewPosition}},{key:"markerNameToElements",value:function(e){var t=this._markerNameToElements.get(e);if(!t)return null;var n,i=new Set,r=k(t);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.is("attributeElement")){var a,s=k(o.getElementsWithSameId());try{for(s.s();!(a=s.n()).done;){var l=a.value;i.add(l)}}catch(c){s.e(c)}finally{s.f()}}else i.add(o)}}catch(c){r.e(c)}finally{r.f()}return i}},{key:"registerViewToModelLength",value:function(e,t){this._viewToModelLengthCallbacks.set(e,t)}},{key:"findMappedViewAncestor",value:function(e){for(var t=e.parent;!this._viewToModelMapping.has(t);)t=t.parent;return t}},{key:"_toModelOffset",value:function(e,t,n){if(n!=e)return this._toModelOffset(e.parent,e.index,n)+this._toModelOffset(e,t,e);if(e.is("$text"))return t;for(var i=0,r=0;r1?t[0]+":"+t[1]:t[0]}var ss=function(){function e(t){w(this,e),this.conversionApi=Object.assign({dispatcher:this},t)}return x(e,[{key:"convertChanges",value:function(e,t,n){var i,r=k(e.getMarkersToRemove());try{for(r.s();!(i=r.n()).done;){var o=i.value;this.convertMarkerRemove(o.name,o.range,n)}}catch(m){r.e(m)}finally{r.f()}var a,s=k(e.getChanges());try{for(s.s();!(a=s.n()).done;){var l=a.value;"insert"==l.type?this.convertInsert(is._createFromPositionAndShift(l.position,l.length),n):"remove"==l.type?this.convertRemove(l.position,l.length,l.name,n):this.convertAttribute(l.range,l.attributeKey,l.attributeOldValue,l.attributeNewValue,n)}}catch(m){s.e(m)}finally{s.f()}var c,u=k(this.conversionApi.mapper.flushUnboundMarkerNames());try{for(u.s();!(c=u.n()).done;){var d=c.value,h=t.get(d).getRange();this.convertMarkerRemove(d,h,n),this.convertMarkerAdd(d,h,n)}}catch(m){u.e(m)}finally{u.f()}var f,v=k(e.getMarkersToAdd());try{for(v.s();!(f=v.n()).done;){var p=f.value;this.convertMarkerAdd(p.name,p.range,n)}}catch(m){v.e(m)}finally{v.f()}}},{key:"convertInsert",value:function(e,t){this.conversionApi.writer=t,this.conversionApi.consumable=this._createInsertConsumable(e);var n,i=k(e);try{for(i.s();!(n=i.n()).done;){var r=n.value,o=r.item,a={item:o,range:is._createFromPositionAndShift(r.previousPosition,r.length)};this._testAndFire("insert",a);var s,l=k(o.getAttributeKeys());try{for(l.s();!(s=l.n()).done;){var c=s.value;a.attributeKey=c,a.attributeOldValue=null,a.attributeNewValue=o.getAttribute(c),this._testAndFire("attribute:"+c,a)}}catch(u){l.e(u)}finally{l.f()}}}catch(u){i.e(u)}finally{i.f()}this._clearConversionApi()}},{key:"convertRemove",value:function(e,t,n,i){this.conversionApi.writer=i,this.fire("remove:"+n,{position:e,length:t},this.conversionApi),this._clearConversionApi()}},{key:"convertAttribute",value:function(e,t,n,i,r){this.conversionApi.writer=r,this.conversionApi.consumable=this._createConsumableForRange(e,"attribute:"+t);var o,a=k(e);try{for(a.s();!(o=a.n()).done;){var s=o.value,l={item:s.item,range:is._createFromPositionAndShift(s.previousPosition,s.length),attributeKey:t,attributeOldValue:n,attributeNewValue:i};this._testAndFire("attribute:"+t,l)}}catch(c){a.e(c)}finally{a.f()}this._clearConversionApi()}},{key:"convertSelection",value:function(e,t,n){var i=Array.from(t.getMarkersAtPosition(e.getFirstPosition()));if(this.conversionApi.writer=n,this.conversionApi.consumable=this._createSelectionConsumable(e,i),this.fire("selection",{selection:e},this.conversionApi),e.isCollapsed){var r,o=k(i);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=a.getRange();if(ls(e.getFirstPosition(),a,this.conversionApi.mapper)){var l={item:e,markerName:a.name,markerRange:s};this.conversionApi.consumable.test(e,"addMarker:"+a.name)&&this.fire("addMarker:"+a.name,l,this.conversionApi)}}}catch(f){o.e(f)}finally{o.f()}var c,u=k(e.getAttributeKeys());try{for(u.s();!(c=u.n()).done;){var d=c.value,h={item:e,range:e.getFirstRange(),attributeKey:d,attributeOldValue:null,attributeNewValue:e.getAttribute(d)};this.conversionApi.consumable.test(e,"attribute:"+h.attributeKey)&&this.fire("attribute:"+h.attributeKey+":$text",h,this.conversionApi)}}catch(f){u.e(f)}finally{u.f()}this._clearConversionApi()}}},{key:"convertMarkerAdd",value:function(e,t,n){if(t.root.document&&"$graveyard"!=t.root.rootName){this.conversionApi.writer=n;var i="addMarker:"+e,r=new os;if(r.add(t,i),this.conversionApi.consumable=r,this.fire(i,{markerName:e,markerRange:t},this.conversionApi),r.test(t,i)){this.conversionApi.consumable=this._createConsumableForRange(t,i);var o,a=k(t.getItems());try{for(a.s();!(o=a.n()).done;){var s=o.value;if(this.conversionApi.consumable.test(s,i)){var l={item:s,range:is._createOn(s),markerName:e,markerRange:t};this.fire(i,l,this.conversionApi)}}}catch(c){a.e(c)}finally{a.f()}this._clearConversionApi()}}}},{key:"convertMarkerRemove",value:function(e,t,n){t.root.document&&"$graveyard"!=t.root.rootName&&(this.conversionApi.writer=n,this.fire("removeMarker:"+e,{markerName:e,markerRange:t},this.conversionApi),this._clearConversionApi())}},{key:"_createInsertConsumable",value:function(e){var t,n=new os,i=k(e);try{for(i.s();!(t=i.n()).done;){var r=t.value,o=r.item;n.add(o,"insert");var a,s=k(o.getAttributeKeys());try{for(s.s();!(a=s.n()).done;){var l=a.value;n.add(o,"attribute:"+l)}}catch(c){s.e(c)}finally{s.f()}}}catch(c){i.e(c)}finally{i.f()}return n}},{key:"_createConsumableForRange",value:function(e,t){var n,i=new os,r=k(e.getItems());try{for(r.s();!(n=r.n()).done;){var o=n.value;i.add(o,t)}}catch(a){r.e(a)}finally{r.f()}return i}},{key:"_createSelectionConsumable",value:function(e,t){var n=new os;n.add(e,"selection");var i,r=k(t);try{for(r.s();!(i=r.n()).done;){var o=i.value;n.add(e,"addMarker:"+o.name)}}catch(c){r.e(c)}finally{r.f()}var a,s=k(e.getAttributeKeys());try{for(s.s();!(a=s.n()).done;){var l=a.value;n.add(e,"attribute:"+l)}}catch(c){s.e(c)}finally{s.f()}return n}},{key:"_testAndFire",value:function(e,t){if(this.conversionApi.consumable.test(t.item,e)){var n=t.item.name||"$text";this.fire(e+":"+n,t,this.conversionApi)}}},{key:"_clearConversionApi",value:function(){delete this.conversionApi.writer,delete this.conversionApi.consumable}}]),e}();function ls(e,t,n){var i=t.getRange(),r=Array.from(e.getAncestors());return r.shift(),r.reverse(),!r.some((function(e){if(i.containsItem(e))return!!n.toViewElement(e).getCustomProperty("addHighlight")}))}Kn(ss,Fn);var cs=function(){function e(t,n,i){w(this,e),this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,t&&this.setTo(t,n,i)}return x(e,[{key:"isEqual",value:function(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;var t,n=k(this._ranges);try{for(n.s();!(t=n.n()).done;){var i,r=t.value,o=!1,a=k(e._ranges);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(r.isEqual(s)){o=!0;break}}}catch(l){a.e(l)}finally{a.f()}if(!o)return!1}}catch(l){n.e(l)}finally{n.f()}return!0}},{key:"getRanges",value:a.mark((function e(){var t,n,i;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=k(this._ranges),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return i=n.value,e.next=7,new is(i.start,i.end);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"getFirstRange",value:function(){var e,t=null,n=k(this._ranges);try{for(n.s();!(e=n.n()).done;){var i=e.value;t&&!i.start.isBefore(t.start)||(t=i)}}catch(r){n.e(r)}finally{n.f()}return t?new is(t.start,t.end):null}},{key:"getLastRange",value:function(){var e,t=null,n=k(this._ranges);try{for(n.s();!(e=n.n()).done;){var i=e.value;t&&!i.end.isAfter(t.end)||(t=i)}}catch(r){n.e(r)}finally{n.f()}return t?new is(t.start,t.end):null}},{key:"getFirstPosition",value:function(){var e=this.getFirstRange();return e?e.start.clone():null}},{key:"getLastPosition",value:function(){var e=this.getLastRange();return e?e.end.clone():null}},{key:"setTo",value:function(t,n,i){if(null===t)this._setRanges([]);else if(t instanceof e)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof is)this._setRanges([t],!!n&&!!n.backward);else if(t instanceof Xa)this._setRanges([new is(t)]);else if(t instanceof qa){var r,o=!!i&&!!i.backward;if("in"==n)r=is._createIn(t);else if("on"==n)r=is._createOn(t);else{if(void 0===n)throw new jn.b("model-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.",[this,t]);r=new is(Xa._createAt(t,n))}this._setRanges([r],o)}else{if(!Gn(t))throw new jn.b("model-selection-setTo-not-selectable: Cannot set the selection to the given place.",[this,t]);this._setRanges(t,n&&!!n.backward)}}},{key:"_setRanges",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=(e=Array.from(e)).some((function(n){if(!(n instanceof is))throw new jn.b("model-selection-set-ranges-not-range: Selection range set to an object that is not an instance of model.Range.",[t,e]);return t._ranges.every((function(e){return!e.isEqual(n)}))}));if(e.length!==this._ranges.length||i){this._removeAllRanges();var r,o=k(e);try{for(o.s();!(r=o.n()).done;){var a=r.value;this._pushRange(a)}}catch(s){o.e(s)}finally{o.f()}this._lastRangeBackward=!!n,this.fire("change:range",{directChange:!0})}}},{key:"setFocus",value:function(e,t){if(null===this.anchor)throw new jn.b("model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",[this,e]);var n=Xa._createAt(e,t);if("same"!=n.compareWith(this.focus)){var i=this.anchor;this._ranges.length&&this._popRange(),"before"==n.compareWith(i)?(this._pushRange(new is(n,i)),this._lastRangeBackward=!0):(this._pushRange(new is(i,n)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}}},{key:"getAttribute",value:function(e){return this._attrs.get(e)}},{key:"getAttributes",value:function(){return this._attrs.entries()}},{key:"getAttributeKeys",value:function(){return this._attrs.keys()}},{key:"hasAttribute",value:function(e){return this._attrs.has(e)}},{key:"removeAttribute",value:function(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}},{key:"setAttribute",value:function(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}},{key:"getSelectedElement",value:function(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}},{key:"is",value:function(e){return"selection"===e||"model:selection"===e}},{key:"getSelectedBlocks",value:a.mark((function e(){var t,n,i,r,o,s,l,c,u,d;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=new WeakSet,n=k(this.getRanges()),e.prev=2,n.s();case 4:if((i=n.n()).done){e.next=38;break}if(r=i.value,o=hs(r.start,t),e.t0=o&&fs(o,r),!e.t0){e.next=11;break}return e.next=11,o;case 11:s=k(r.getWalker()),e.prev=12,s.s();case 14:if((l=s.n()).done){e.next=23;break}if(c=l.value,u=c.item,e.t1="elementEnd"==c.type&&ds(u,t,r),!e.t1){e.next=21;break}return e.next=21,u;case 21:e.next=14;break;case 23:e.next=28;break;case 25:e.prev=25,e.t2=e["catch"](12),s.e(e.t2);case 28:return e.prev=28,s.f(),e.finish(28);case 31:if(d=hs(r.end,t),e.t3=d&&!r.end.isTouching(Xa._createAt(d,0))&&fs(d,r),!e.t3){e.next=36;break}return e.next=36,d;case 36:e.next=4;break;case 38:e.next=43;break;case 40:e.prev=40,e.t4=e["catch"](2),n.e(e.t4);case 43:return e.prev=43,n.f(),e.finish(43);case 46:case"end":return e.stop()}}),e,this,[[2,40,43,46],[12,25,28,31]])}))},{key:"containsEntireContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.anchor.root,t=Xa._createAt(e,0),n=Xa._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}},{key:"_pushRange",value:function(e){this._checkRange(e),this._ranges.push(new is(e.start,e.end))}},{key:"_checkRange",value:function(e){for(var t=0;t0;)this._popRange()}},{key:"_popRange",value:function(){this._ranges.pop()}},{key:"anchor",get:function(){if(this._ranges.length>0){var e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}},{key:"focus",get:function(){if(this._ranges.length>0){var e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}},{key:"isCollapsed",get:function(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}},{key:"rangeCount",get:function(){return this._ranges.length}},{key:"isBackward",get:function(){return!this.isCollapsed&&this._lastRangeBackward}}]),e}();function us(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&e.parent)}function ds(e,t,n){return us(e,t)&&fs(e,n)}function hs(e,t){var n=e.parent.root.document.model.schema,i=e.parent.getAncestors({parentFirst:!0,includeSelf:!0}),r=!1,o=i.find((function(e){return!r&&(r=n.isLimit(e),!r&&us(e,t))}));return i.forEach((function(e){return t.add(e)})),o}function fs(e,t){var n=function(e){for(var t=e.root.document.model.schema,n=e.parent;n;){if(t.isBlock(n))return n;n=n.parent}}(e);return!n||!t.containsRange(is._createOn(n),!0)}Kn(cs,Fn);var vs=function(e){C(n,e);var t=A(n);function n(e,i){var r;return w(this,n),r=t.call(this,e,i),ps.call(P(r)),r}return x(n,[{key:"detach",value:function(){this.stopListening()}},{key:"is",value:function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e}},{key:"toRange",value:function(){return new is(this.start,this.end)}}],[{key:"fromRange",value:function(e){return new n(e.start,e.end)}}]),n}(is);function ps(){var e=this;this.listenTo(this.root.document.model,"applyOperation",(function(t,n){var i=n[0];i.isDocumentOperation&&ms.call(e,i)}),{priority:"low"})}function ms(e){var t=this.getTransformedByOperation(e),n=is._createFromRanges(t),i=!n.isEqual(this),r=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e),o=null;if(i){"$graveyard"==n.root.rootName&&(o="remove"==e.type?e.sourcePosition:e.deletionPosition);var a=this.toRange();this.start=n.start,this.end=n.end,this.fire("change:range",a,{deletionPosition:o})}else r&&this.fire("change:content",this.toRange(),{deletionPosition:o})}Kn(vs,Fn);var gs="selection:",ks=function(){function e(t){w(this,e),this._selection=new bs(t),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}return x(e,[{key:"getRanges",value:function(){return this._selection.getRanges()}},{key:"getFirstPosition",value:function(){return this._selection.getFirstPosition()}},{key:"getLastPosition",value:function(){return this._selection.getLastPosition()}},{key:"getFirstRange",value:function(){return this._selection.getFirstRange()}},{key:"getLastRange",value:function(){return this._selection.getLastRange()}},{key:"getSelectedBlocks",value:function(){return this._selection.getSelectedBlocks()}},{key:"getSelectedElement",value:function(){return this._selection.getSelectedElement()}},{key:"containsEntireContent",value:function(e){return this._selection.containsEntireContent(e)}},{key:"destroy",value:function(){this._selection.destroy()}},{key:"getAttributeKeys",value:function(){return this._selection.getAttributeKeys()}},{key:"getAttributes",value:function(){return this._selection.getAttributes()}},{key:"getAttribute",value:function(e){return this._selection.getAttribute(e)}},{key:"hasAttribute",value:function(e){return this._selection.hasAttribute(e)}},{key:"refresh",value:function(){this._selection._updateMarkers(),this._selection._updateAttributes(!1)}},{key:"is",value:function(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e}},{key:"_setFocus",value:function(e,t){this._selection.setFocus(e,t)}},{key:"_setTo",value:function(e,t,n){this._selection.setTo(e,t,n)}},{key:"_setAttribute",value:function(e,t){this._selection.setAttribute(e,t)}},{key:"_removeAttribute",value:function(e){this._selection.removeAttribute(e)}},{key:"_getStoredAttributes",value:function(){return this._selection._getStoredAttributes()}},{key:"_overrideGravity",value:function(){return this._selection.overrideGravity()}},{key:"_restoreGravity",value:function(e){this._selection.restoreGravity(e)}},{key:"isCollapsed",get:function(){return this._selection.isCollapsed}},{key:"anchor",get:function(){return this._selection.anchor}},{key:"focus",get:function(){return this._selection.focus}},{key:"rangeCount",get:function(){return this._selection.rangeCount}},{key:"hasOwnRange",get:function(){return this._selection.hasOwnRange}},{key:"isBackward",get:function(){return this._selection.isBackward}},{key:"isGravityOverridden",get:function(){return this._selection.isGravityOverridden}},{key:"markers",get:function(){return this._selection.markers}},{key:"_ranges",get:function(){return this._selection._ranges}}],[{key:"_getStoreAttributeKey",value:function(e){return gs+e}},{key:"_isStoreAttributeKey",value:function(e){return e.startsWith(gs)}}]),e}();Kn(ks,Fn);var bs=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this),i.markers=new Jn({idProperty:"name"}),i._model=e.model,i._document=e,i._attributePriority=new Map,i._selectionRestorePosition=null,i._hasChangedRange=!1,i._overriddenGravityRegister=new Set,i.listenTo(i._model,"applyOperation",(function(e,t){var n=t[0];n.isDocumentOperation&&"marker"!=n.type&&"rename"!=n.type&&"noop"!=n.type&&(0==i._ranges.length&&i._selectionRestorePosition&&i._fixGraveyardSelection(i._selectionRestorePosition),i._selectionRestorePosition=null,i._hasChangedRange&&(i._hasChangedRange=!1,i.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),i.on("change:range",(function(){var e,t=k(i.getRanges());try{for(t.s();!(e=t.n()).done;){var n=e.value;if(!i._document._validateSelectionRange(n))throw new jn.b("document-selection-wrong-position: Range from document selection starts or ends at incorrect position.",P(i),{range:n})}}catch(r){t.e(r)}finally{t.f()}})),i.listenTo(i._model.markers,"update",(function(){return i._updateMarkers()})),i.listenTo(i._document,"change",(function(e,t){!function(e,t){var n,i=e.document.differ,r=k(i.getChanges());try{var o=function(){var i=n.value;if("insert"!=i.type)return"continue";var r=i.position.parent;i.length===r.maxOffset&&e.enqueueChange(t,(function(e){var t,n=Array.from(r.getAttributeKeys()).filter((function(e){return e.startsWith(gs)})),i=k(n);try{for(i.s();!(t=i.n()).done;){var o=t.value;e.removeAttribute(o,r)}}catch(a){i.e(a)}finally{i.f()}}))};for(r.s();!(n=r.n()).done;)o()}catch(a){r.e(a)}finally{r.f()}}(i._model,t)})),i}return x(n,[{key:"destroy",value:function(){for(var e=0;e0&&this.fire("change:attribute",{attributeKeys:c,directChange:!1})}},{key:"_setAttribute",value:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=i?"normal":"low";return("low"!=r||"normal"!=this._attributePriority.get(e))&&(l(N(n.prototype),"getAttribute",this).call(this,e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,r),!0))}},{key:"_removeAttribute",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t?"normal":"low";return("low"!=i||"normal"!=this._attributePriority.get(e))&&(this._attributePriority.set(e,i),!!l(N(n.prototype),"hasAttribute",this).call(this,e)&&(this._attrs.delete(e),!0))}},{key:"_setAttributesTo",value:function(e){var t,n=new Set,i=k(this.getAttributes());try{for(i.s();!(t=i.n()).done;){var r=v(t.value,2),o=r[0],a=r[1];e.get(o)!==a&&this._removeAttribute(o,!1)}}catch(h){i.e(h)}finally{i.f()}var s,l=k(e);try{for(l.s();!(s=l.n()).done;){var c=v(s.value,2),u=c[0],d=c[1];this._setAttribute(u,d,!1)&&n.add(u)}}catch(h){l.e(h)}finally{l.f()}return n}},{key:"_getStoredAttributes",value:a.mark((function e(){var t,n,i,r,o;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this.getFirstPosition().parent,!this.isCollapsed||!t.isEmpty){e.next=21;break}n=k(t.getAttributeKeys()),e.prev=3,n.s();case 5:if((i=n.n()).done){e.next=13;break}if(r=i.value,!r.startsWith(gs)){e.next=11;break}return o=r.substr(gs.length),e.next=11,[o,t.getAttribute(r)];case 11:e.next=5;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e["catch"](3),n.e(e.t0);case 18:return e.prev=18,n.f(),e.finish(18);case 21:case"end":return e.stop()}}),e,this,[[3,15,18,21]])}))},{key:"_getSurroundingAttributes",value:function(){var e=this.getFirstPosition(),t=this._model.schema,n=null;if(this.isCollapsed){var i=e.textNode?e.textNode:e.nodeBefore,r=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(n=ys(i)),n||(n=ys(r)),!this.isGravityOverridden&&!n)for(var o=i;o&&!t.isInline(o)&&!n;)o=o.previousSibling,n=ys(o);if(!n)for(var a=r;a&&!t.isInline(a)&&!n;)a=a.nextSibling,n=ys(a);n||(n=this._getStoredAttributes())}else{var s,l=this.getFirstRange(),c=k(l);try{for(c.s();!(s=c.n()).done;){var u=s.value;if(u.item.is("element")&&t.isObject(u.item))break;if("text"==u.type){n=u.item.getAttributes();break}}}catch(d){c.e(d)}finally{c.f()}}return n}},{key:"_fixGraveyardSelection",value:function(e){var t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}},{key:"isCollapsed",get:function(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:l(N(n.prototype),"isCollapsed",this)}},{key:"anchor",get:function(){return l(N(n.prototype),"anchor",this)||this._document._getDefaultRange().start}},{key:"focus",get:function(){return l(N(n.prototype),"focus",this)||this._document._getDefaultRange().end}},{key:"rangeCount",get:function(){return this._ranges.length?this._ranges.length:1}},{key:"hasOwnRange",get:function(){return this._ranges.length>0}},{key:"isGravityOverridden",get:function(){return!!this._overriddenGravityRegister.size}}]),n}(cs);function ys(e){return e instanceof Ga||e instanceof Ya?e.getAttributes():null}var ws=function(){function e(t){w(this,e),this._dispatchers=t}return x(e,[{key:"add",value:function(e){var t,n=k(this._dispatchers);try{for(n.s();!(t=n.n()).done;){var i=t.value;e(i)}}catch(r){n.e(r)}finally{n.f()}return this}}]),e}(),_s=function(e){return Pn(e,5)},xs=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"elementToElement",value:function(e){return this.add(function(e){return(e=_s(e)).view=Ts(e.view,"container"),function(t){var n;t.on("insert:"+e.model,(n=e.view,function(e,t,i){var r=n(t.item,i);if(r&&i.consumable.consume(t.item,"insert")){var o=i.mapper.toViewPosition(t.range.start);i.mapper.bindElements(t.item,r),i.writer.insert(o,r)}}),{priority:e.converterPriority||"normal"})}}(e))}},{key:"attributeToElement",value:function(e){return this.add(function(e){e=_s(e);var t="attribute:"+(e.model.key?e.model.key:e.model);if(e.model.name&&(t+=":"+e.model.name),e.model.values){var n,i=k(e.model.values);try{for(i.s();!(n=i.n()).done;){var r=n.value;e.view[r]=Ts(e.view[r],"attribute")}}catch(a){i.e(a)}finally{i.f()}}else e.view=Ts(e.view,"attribute");var o=Ps(e);return function(n){n.on(t,function(e){return function(t,n,i){var r=e(n.attributeOldValue,i),o=e(n.attributeNewValue,i);if((r||o)&&i.consumable.consume(n.item,t.name)){var a=i.writer,s=a.document.selection;if(n.item instanceof cs||n.item instanceof ks)a.wrap(s.getFirstRange(),o);else{var l=i.mapper.toViewRange(n.range);null!==n.attributeOldValue&&r&&(l=a.unwrap(l,r)),null!==n.attributeNewValue&&o&&a.wrap(l,o)}}}}(o),{priority:e.converterPriority||"normal"})}}(e))}},{key:"attributeToAttribute",value:function(e){return this.add(function(e){e=_s(e);var t="attribute:"+(e.model.key?e.model.key:e.model);if(e.model.name&&(t+=":"+e.model.name),e.model.values){var n,i=k(e.model.values);try{for(i.s();!(n=i.n()).done;){var r=n.value;e.view[r]=Es(e.view[r])}}catch(a){i.e(a)}finally{i.f()}}else e.view=Es(e.view);var o=Ps(e);return function(n){var i;n.on(t,(i=o,function(e,t,n){var r=i(t.attributeOldValue,n),o=i(t.attributeNewValue,n);if((r||o)&&n.consumable.consume(t.item,e.name)){var s=n.mapper.toViewElement(t.item),l=n.writer;if(!s)throw new jn.b("conversion-attribute-to-attribute-on-text: Trying to convert text node's attribute with attribute-to-attribute converter.",[t,n]);if(null!==t.attributeOldValue&&r)if("class"==r.key){var c,u=Array.isArray(r.value)?r.value:[r.value],d=k(u);try{for(d.s();!(c=d.n()).done;){var h=c.value;l.removeClass(h,s)}}catch(a){d.e(a)}finally{d.f()}}else if("style"==r.key)for(var f=Object.keys(r.value),v=0,p=f;v1&&void 0!==arguments[1]?arguments[1]:null,n=null===t||function(e){return e.getAttribute(t)},i="object"!=R(e.model)?e.model:e.model.key,r="object"!=R(e.model)||void 0===e.model.value?n:e.model.value;e.model={key:i,value:r}}function js(e,t){var n=new ci(e.view);return function(i,r,o){var a=n.match(r.viewItem);if(a){var s=e.model.key,l="function"==typeof e.model.value?e.model.value(r.viewItem,o):e.model.value;null!==l&&(function(e,t){var n="function"==typeof e?e(t):e;return!("object"==R(n)&&!Ds(n))&&(!n.classes&&!n.attributes&&!n.styles)}(e.view,r.viewItem)?a.match.name=!0:delete a.match.name,o.consumable.test(r.viewItem,a.match)&&(r.modelRange||(r=Object.assign(r,o.convertChildren(r.viewItem,r.modelCursor))),function(e,t,n,i){for(var r=!1,o=0,a=Array.from(e.getItems({shallow:n}));o1?n-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:null;if(e instanceof Xa){var n=e.nodeBefore,i=e.nodeAfter;if(!(n instanceof Ja))throw new jn.b("schema-check-merge-no-element-before: The node before the merge position must be an element.",this);if(!(i instanceof Ja))throw new jn.b("schema-check-merge-no-element-after: The node after the merge position must be an element.",this);return this.checkMerge(n,i)}var r,o=k(t.getChildren());try{for(o.s();!(r=o.n()).done;){var a=r.value;if(!this.checkChild(e,a))return!1}}catch(s){o.e(s)}finally{o.f()}return!0}},{key:"addChildCheck",value:function(e){this.on("checkChild",(function(t,n){var i=v(n,2),r=i[0],o=i[1];if(o){var a=e(r,o);"boolean"==typeof a&&(t.stop(),t.return=a)}}),{priority:"high"})}},{key:"addAttributeCheck",value:function(e){this.on("checkAttribute",(function(t,n){var i=v(n,2),r=i[0],o=i[1],a=e(r,o);"boolean"==typeof a&&(t.stop(),t.return=a)}),{priority:"high"})}},{key:"setAttributeProperties",value:function(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}},{key:"getAttributeProperties",value:function(e){return this._attributeProperties[e]||{}}},{key:"getLimitElement",value:function(e){var t;for(t=e instanceof Xa?e.parent:(e instanceof is?[e]:Array.from(e.getRanges())).reduce((function(e,t){var n=t.getCommonAncestor();return e?e.getCommonAncestor(n,{includeSelf:!0}):n}),null);!this.isLimit(t)&&t.parent;)t=t.parent;return t}},{key:"checkAttributeInSelection",value:function(e,t){if(e.isCollapsed){var n=[].concat(u(e.getFirstPosition().getAncestors()),[new Ya("",e.getAttributes())]);return this.checkAttribute(n,t)}var i,r=e.getRanges(),o=k(r);try{for(o.s();!(i=o.n()).done;){var a,s=i.value,l=k(s);try{for(l.s();!(a=l.n()).done;){var c=a.value;if(this.checkAttribute(c.item,t))return!0}}catch(d){l.e(d)}finally{l.f()}}}catch(d){o.e(d)}finally{o.f()}return!1}},{key:"getValidRanges",value:a.mark((function e(t,n){var i,r,o;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=a.mark((function e(t){var n,i,r;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=k(t),e.prev=1,n.s();case 3:if((i=n.n()).done){e.next=8;break}return r=i.value,e.delegateYield(r.getMinimalFlatRanges(),"t0",6);case 6:e.next=3;break;case 8:e.next=13;break;case 10:e.prev=10,e.t1=e["catch"](1),n.e(e.t1);case 13:return e.prev=13,n.f(),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[1,10,13,16]])}))(t),i=k(t),e.prev=2,i.s();case 4:if((r=i.n()).done){e.next=9;break}return o=r.value,e.delegateYield(this._getValidRangesForRange(o,n),"t0",7);case 7:e.next=4;break;case 9:e.next=14;break;case 11:e.prev=11,e.t1=e["catch"](2),i.e(e.t1);case 14:return e.prev=14,i.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[2,11,14,17]])}))},{key:"getNearestSelectionRange",value:function(e){var t,n,i=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"both";if(this.checkChild(e,"$text"))return new is(e);var o=e.getAncestors().reverse().find((function(e){return i.isLimit(e)}))||e.root;"both"!=r&&"backward"!=r||(t=new Qa({boundaries:is._createIn(o),startPosition:e,direction:"backward"})),"both"!=r&&"forward"!=r||(n=new Qa({boundaries:is._createIn(o),startPosition:e}));var s,l=k(a.mark((function e(t,n){var i,r,o;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=!1;case 1:if(i){e.next=18;break}if(i=!0,!t){e.next=9;break}if(r=t.next(),e.t0=r.done,e.t0){e.next=9;break}return i=!1,e.next=9,{walker:t,value:r.value};case 9:if(!n){e.next=16;break}if(o=n.next(),e.t1=o.done,e.t1){e.next=16;break}return i=!1,e.next=16,{walker:n,value:o.value};case 16:e.next=1;break;case 18:case"end":return e.stop()}}),e)}))(t,n));try{for(l.s();!(s=l.n()).done;){var c=s.value,u=c.walker==t?"elementEnd":"elementStart",d=c.value;if(d.type==u&&this.isObject(d.item))return is._createOn(d.item);if(this.checkChild(d.nextPosition,"$text"))return new is(d.nextPosition)}}catch(h){l.e(h)}finally{l.f()}return null}},{key:"findAllowedParent",value:function(e,t){for(var n=e.parent;n;){if(this.checkChild(n,t))return n;if(this.isLimit(n))return null;n=n.parent}return null}},{key:"removeDisallowedAttributes",value:function(e,t){var n,i=k(e);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(r.is("$text"))nl(this,r,t);else{var o,a=is._createIn(r).getPositions(),s=k(a);try{for(s.s();!(o=s.n()).done;){var l=o.value;nl(this,l.nodeBefore||l.parent,t)}}catch(c){s.e(c)}finally{s.f()}}}}catch(c){i.e(c)}finally{i.f()}}},{key:"createContext",value:function(e){return new Ws(e)}},{key:"_clearCache",value:function(){this._compiledDefinitions=null}},{key:"_compile",value:function(){for(var e={},t=this._sourceDefinitions,n=Object.keys(t),i=0,r=n;i2&&void 0!==arguments[2]?arguments[2]:t.length-1,i=t.getItem(n);if(e.allowIn.includes(i.name)){if(0==n)return!0;var r=this.getDefinition(i);return this._checkContextMatch(r,t,n-1)}return!1}},{key:"_getValidRangesForRange",value:a.mark((function e(t,n){var i,r,o,s,l;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=t.start,r=t.start,o=k(t.getItems({shallow:!0})),e.prev=2,o.s();case 4:if((s=o.n()).done){e.next=19;break}if(l=s.value,e.t0=l.is("element"),!e.t0){e.next=9;break}return e.delegateYield(this._getValidRangesForRange(is._createIn(l),n),"t1",9);case 9:if(e.t2=this.checkAttribute(l,n),e.t2){e.next=16;break}if(e.t3=i.isEqual(r),e.t3){e.next=15;break}return e.next=15,new is(i,r);case 15:i=Xa._createAfter(l);case 16:r=Xa._createAfter(l);case 17:e.next=4;break;case 19:e.next=24;break;case 21:e.prev=21,e.t4=e["catch"](2),o.e(e.t4);case 24:return e.prev=24,o.f(),e.finish(24);case 27:if(e.t5=i.isEqual(r),e.t5){e.next=31;break}return e.next=31,new is(i,r);case 31:case"end":return e.stop()}}),e,this,[[2,21,24,27]])}))}]),e}();Kn($s,vr);var Ws=function(){function e(t){if(w(this,e),t instanceof e)return t;"string"==typeof t?t=[t]:Array.isArray(t)||(t=t.getAncestors({includeSelf:!0})),t[0]&&"string"!=typeof t[0]&&t[0].is("documentFragment")&&t.shift(),this._items=t.map(tl)}return x(e,[{key:Symbol.iterator,value:function(){return this._items[Symbol.iterator]()}},{key:"push",value:function(t){var n=new e([t]);return n._items=[].concat(u(this._items),u(n._items)),n}},{key:"getItem",value:function(e){return this._items[e]}},{key:"getNames",value:a.mark((function e(){return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.delegateYield(this._items.map((function(e){return e.name})),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"endsWith",value:function(e){return Array.from(this.getNames()).join(" ").endsWith(e)}},{key:"startsWith",value:function(e){return Array.from(this.getNames()).join(" ").startsWith(e)}},{key:"length",get:function(){return this._items.length}},{key:"last",get:function(){return this._items[this._items.length-1]}}]),e}();function qs(e,t){var n={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],inheritTypesFrom:[]};return function(e,t){var n,i=k(e);try{for(i.s();!(n=i.n()).done;){var r,o=n.value,a=Object.keys(o).filter((function(e){return e.startsWith("is")})),s=k(a);try{for(s.s();!(r=s.n()).done;){var l=r.value;t[l]=o[l]}}catch(c){s.e(c)}finally{s.f()}}}catch(c){i.e(c)}finally{i.f()}}(e,n),Xs(e,n,"allowIn"),Xs(e,n,"allowContentOf"),Xs(e,n,"allowWhere"),Xs(e,n,"allowAttributes"),Xs(e,n,"allowAttributesOf"),Xs(e,n,"inheritTypesFrom"),function(e,t){var n,i=k(e);try{for(i.s();!(n=i.n()).done;){var r=n.value,o=r.inheritAllFrom;o&&(t.allowContentOf.push(o),t.allowWhere.push(o),t.allowAttributesOf.push(o),t.inheritTypesFrom.push(o))}}catch(a){i.e(a)}finally{i.f()}}(e,n),n}function Ys(e,t){var n,i=k(e[t].allowContentOf);try{for(i.s();!(n=i.n()).done;){var r=n.value;e[r]&&el(e,r).forEach((function(e){e.allowIn.push(t)}))}}catch(o){i.e(o)}finally{i.f()}delete e[t].allowContentOf}function Gs(e,t){var n,i=k(e[t].allowWhere);try{for(i.s();!(n=i.n()).done;){var r=n.value,o=e[r];if(o){var a,s=o.allowIn;(a=e[t].allowIn).push.apply(a,u(s))}}}catch(l){i.e(l)}finally{i.f()}delete e[t].allowWhere}function Ks(e,t){var n,i=k(e[t].allowAttributesOf);try{for(i.s();!(n=i.n()).done;){var r=n.value,o=e[r];if(o){var a,s=o.allowAttributes;(a=e[t].allowAttributes).push.apply(a,u(s))}}}catch(l){i.e(l)}finally{i.f()}delete e[t].allowAttributesOf}function Js(e,t){var n,i=e[t],r=k(i.inheritTypesFrom);try{for(r.s();!(n=r.n()).done;){var o=n.value,a=e[o];if(a){var s,l=Object.keys(a).filter((function(e){return e.startsWith("is")})),c=k(l);try{for(c.s();!(s=c.n()).done;){var u=s.value;u in i||(i[u]=a[u])}}catch(d){c.e(d)}finally{c.f()}}}}catch(d){r.e(d)}finally{r.f()}delete i.inheritTypesFrom}function Qs(e,t){var n=e[t],i=n.allowIn.filter((function(t){return e[t]}));n.allowIn=Array.from(new Set(i))}function Zs(e,t){var n=e[t];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function Xs(e,t,n){var i,r=k(e);try{for(r.s();!(i=r.n()).done;){var o,a=i.value;"string"==typeof a[n]?t[n].push(a[n]):Array.isArray(a[n])&&(o=t[n]).push.apply(o,u(a[n]))}}catch(s){r.e(s)}finally{r.f()}}function el(e,t){var n,i=e[t];return(n=e,Object.keys(n).map((function(e){return n[e]}))).filter((function(e){return e.allowIn.includes(i.name)}))}function tl(e){return"string"==typeof e?{name:e,getAttributeKeys:a.mark((function e(){return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})),getAttribute:function(){}}:{name:e.is("element")?e.name:"$text",getAttributeKeys:a.mark((function t(){return a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.delegateYield(e.getAttributeKeys(),"t0",1);case 1:case"end":return t.stop()}}),t)})),getAttribute:function(t){return e.getAttribute(t)}}}function nl(e,t,n){var i,r=k(t.getAttributeKeys());try{for(r.s();!(i=r.n()).done;){var o=i.value;e.checkAttribute(t,o)||n.removeAttribute(o,t)}}catch(a){r.e(a)}finally{r.f()}}var il=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w(this,e),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this.conversionApi=Object.assign({},t),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this),this.conversionApi.safeInsert=this._safeInsert.bind(this),this.conversionApi.updateConversionResult=this._updateConversionResult.bind(this),this.conversionApi.splitToAllowedParent=this._splitToAllowedParent.bind(this),this.conversionApi.getSplitParts=this._getSplitParts.bind(this)}return x(e,[{key:"convert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["$root"];this.fire("viewCleanup",e),this._modelCursor=function(e,t){var n,i,r=k(new Ws(e));try{for(r.s();!(i=r.n()).done;){var o,a=i.value,s={},l=k(a.getAttributeKeys());try{for(l.s();!(o=l.n()).done;){var c=o.value;s[c]=a.getAttribute(c)}}catch(d){l.e(d)}finally{l.f()}var u=t.createElement(a.name,s);n&&t.append(u,n),n=Xa._createAt(u,0)}}catch(d){r.e(d)}finally{r.f()}return n}(n,t),this.conversionApi.writer=t,this.conversionApi.consumable=Us.createFrom(e),this.conversionApi.store={};var i=this._convertItem(e,this._modelCursor),r=i.modelRange,o=t.createDocumentFragment();if(r){this._removeEmptyElements();for(var a=0,s=Array.from(this._modelCursor.parent.getChildren());a0&&void 0!==arguments[0]?arguments[0]:{},t=e.rootName,n=void 0===t?"main":t,i=e.trim,r=void 0===i?"empty":i;if(!this._checkIfRootsExists([n]))throw new jn.b("datacontroller-get-non-existent-root: Attempting to get data from a non-existing root.",this);var o=this.model.document.getRoot(n);return"empty"!==r||this.model.hasContent(o,{ignoreWhitespaces:!0})?this.stringify(o,e):""}},{key:"stringify",value:function(e,t){var n=this.toView(e,t);return this.processor.toData(n)}},{key:"toView",value:function(e,t){var n=this.viewDocument,i=this._viewWriter;this.mapper.clearBindings();var r=is._createIn(e),o=new Xr(n);if(this.mapper.bindElements(e,o),this.downcastDispatcher.conversionApi.options=t,this.downcastDispatcher.convertInsert(r,i),!e.is("documentFragment")){var a,s=function(e){var t=[],n=e.root.document;if(!n)return[];var i,r=is._createIn(e),o=k(n.model.markers);try{for(o.s();!(i=o.n()).done;){var a=i.value,s=r.getIntersection(a.getRange());s&&t.push([a.name,s])}}catch(l){o.e(l)}finally{o.f()}return t}(e),l=k(s);try{for(l.s();!(a=l.n()).done;){var c=v(a.value,2),u=c[0],d=c[1];this.downcastDispatcher.convertMarkerAdd(u,d,i)}}catch(h){l.e(h)}finally{l.f()}}return delete this.downcastDispatcher.conversionApi.options,o}},{key:"init",value:function(e){var t=this;if(this.model.document.version)throw new jn.b("datacontroller-init-document-not-empty: Trying to set initial data to not empty document.",this);var n={};if("string"==typeof e?n.main=e:n=e,!this._checkIfRootsExists(Object.keys(n)))throw new jn.b("datacontroller-init-non-existent-root: Attempting to init data on a non-existing root.",this);return this.model.enqueueChange("transparent",(function(e){for(var i=0,r=Object.keys(n);i1&&void 0!==arguments[1]?arguments[1]:"$root",n=this.processor.toView(e);return this.toModel(n,t)}},{key:"toModel",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$root";return this.model.change((function(i){return t.upcastDispatcher.convert(e,i,n)}))}},{key:"addStyleProcessorRules",value:function(e){e(this.stylesProcessor)}},{key:"destroy",value:function(){this.stopListening()}},{key:"_checkIfRootsExists",value:function(e){var t,n=k(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(!this.model.document.getRootNames().includes(i))return!1}}catch(r){n.e(r)}finally{n.f()}return!0}}]),e}();Kn(rl,vr);var ol=function(){function e(t,n){w(this,e),this._helpers=new Map,this._downcast=Array.isArray(t)?t:[t],this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=Array.isArray(n)?n:[n],this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}return x(e,[{key:"addAlias",value:function(e,t){var n=this._downcast.includes(t);if(!this._upcast.includes(t)&&!n)throw new jn.b("conversion-add-alias-dispatcher-not-registered: Trying to register and alias for a dispatcher that nas not been registered.",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:n})}},{key:"for",value:function(e){if(!this._helpers.has(e))throw new jn.b("conversion-for-unknown-group: Trying to add a converter to an unknown dispatchers group.",this);return this._helpers.get(e)}},{key:"elementToElement",value:function(e){this.for("downcast").elementToElement(e);var t,n=k(al(e));try{for(n.s();!(t=n.n()).done;){var i=t.value,r=i.model,o=i.view;this.for("upcast").elementToElement({model:r,view:o,converterPriority:e.converterPriority})}}catch(a){n.e(a)}finally{n.f()}}},{key:"attributeToElement",value:function(e){this.for("downcast").attributeToElement(e);var t,n=k(al(e));try{for(n.s();!(t=n.n()).done;){var i=t.value,r=i.model,o=i.view;this.for("upcast").elementToAttribute({view:o,model:r,converterPriority:e.converterPriority})}}catch(a){n.e(a)}finally{n.f()}}},{key:"attributeToAttribute",value:function(e){this.for("downcast").attributeToAttribute(e);var t,n=k(al(e));try{for(n.s();!(t=n.n()).done;){var i=t.value,r=i.model,o=i.view;this.for("upcast").attributeToAttribute({view:o,model:r})}}catch(a){n.e(a)}finally{n.f()}}},{key:"_createConversionHelpers",value:function(e){var t=e.name,n=e.dispatchers,i=e.isDowncast;if(this._helpers.has(t))throw new jn.b("conversion-group-exists: Trying to register a group name that has already been registered.",this);var r=i?new xs(n):new Ns(n);this._helpers.set(t,r)}}]),e}();function al(e){var t,n,r,o,s,l;return a.wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(!e.model.values){i.next=20;break}t=k(e.model.values),i.prev=2,t.s();case 4:if((n=t.n()).done){i.next=10;break}return r=n.value,o={key:e.model.key,value:r},s=e.view[r],l=e.upcastAlso?e.upcastAlso[r]:void 0,i.delegateYield(sl(o,s,l),"t0",8);case 8:i.next=4;break;case 10:i.next=15;break;case 12:i.prev=12,i.t1=i["catch"](2),t.e(i.t1);case 15:return i.prev=15,t.f(),i.finish(15);case 18:i.next=21;break;case 20:return i.delegateYield(sl(e.model,e.view,e.upcastAlso),"t2",21);case 21:case"end":return i.stop()}}),i,null,[[2,12,15,18]])}function sl(e,t,n){var i,o,s;return a.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,{model:e,view:t};case 2:if(!n){r.next=21;break}n=Array.isArray(n)?n:[n],i=k(n),r.prev=5,i.s();case 7:if((o=i.n()).done){r.next=13;break}return s=o.value,r.next=11,{model:e,view:s};case 11:r.next=7;break;case 13:r.next=18;break;case 15:r.prev=15,r.t0=r["catch"](5),i.e(r.t0);case 18:return r.prev=18,i.f(),r.finish(18);case 21:case"end":return r.stop()}}),r,null,[[5,15,18,21]])}var ll=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";w(this,e),this.operations=[],this.type=t}return x(e,[{key:"addOperation",value:function(e){return e.batch=this,this.operations.push(e),e}},{key:"baseVersion",get:function(){var e,t=k(this.operations);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(null!==n.baseVersion)return n.baseVersion}}catch(i){t.e(i)}finally{t.f()}return null}}]),e}(),cl=function(){function e(t){w(this,e),this.baseVersion=t,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}return x(e,[{key:"_validate",value:function(){}},{key:"toJSON",value:function(){var e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}}],[{key:"fromJSON",value:function(e){return new this(e.baseVersion)}},{key:"className",get:function(){return"Operation"}}]),e}(),ul=function(){function e(t){w(this,e),this.markers=new Map,this._children=new Ka,t&&this._insertChild(0,t)}return x(e,[{key:Symbol.iterator,value:function(){return this.getChildren()}},{key:"is",value:function(e){return"documentFragment"===e||"model:documentFragment"===e}},{key:"getChild",value:function(e){return this._children.getNode(e)}},{key:"getChildren",value:function(){return this._children[Symbol.iterator]()}},{key:"getChildIndex",value:function(e){return this._children.getNodeIndex(e)}},{key:"getChildStartOffset",value:function(e){return this._children.getNodeStartOffset(e)}},{key:"getPath",value:function(){return[]}},{key:"getNodeByPath",value:function(e){var t,n=this,i=k(e);try{for(i.s();!(t=i.n()).done;){var r=t.value;n=n.getChild(n.offsetToIndex(r))}}catch(o){i.e(o)}finally{i.f()}return n}},{key:"offsetToIndex",value:function(e){return this._children.offsetToIndex(e)}},{key:"toJSON",value:function(){var e,t=[],n=k(this._children);try{for(n.s();!(e=n.n()).done;){var i=e.value;t.push(i.toJSON())}}catch(r){n.e(r)}finally{n.f()}return t}},{key:"_appendChild",value:function(e){this._insertChild(this.childCount,e)}},{key:"_insertChild",value:function(e,t){var n,i=function(e){return"string"==typeof e?[new Ya(e)]:(Gn(e)||(e=[e]),Array.from(e).map((function(e){return"string"==typeof e?new Ya(e):e instanceof Ga?new Ya(e.data,e.getAttributes()):e})))}(t),r=k(i);try{for(r.s();!(n=r.n()).done;){var o=n.value;null!==o.parent&&o._remove(),o.parent=this}}catch(a){r.e(a)}finally{r.f()}this._children._insertNodes(e,i)}},{key:"_removeChildren",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this._children._removeNodes(e,n),r=k(i);try{for(r.s();!(t=r.n()).done;){var o=t.value;o.parent=null}}catch(a){r.e(a)}finally{r.f()}return i}},{key:"childCount",get:function(){return this._children.length}},{key:"maxOffset",get:function(){return this._children.maxOffset}},{key:"isEmpty",get:function(){return 0===this.childCount}},{key:"root",get:function(){return this}},{key:"parent",get:function(){return null}}],[{key:"fromJSON",value:function(t){var n,i=[],r=k(t);try{for(r.s();!(n=r.n()).done;){var o=n.value;o.name?i.push(Ja.fromJSON(o)):i.push(Ya.fromJSON(o))}}catch(a){r.e(a)}finally{r.f()}return new e(i)}}]),e}();function dl(e,t){var n=(t=vl(t)).reduce((function(e,t){return e+t.offsetSize}),0),i=e.parent;ml(e);var r=e.index;return i._insertChild(r,t),pl(i,r+t.length),pl(i,r),new is(e,e.getShiftedBy(n))}function hl(e){if(!e.isFlat)throw new jn.b("operation-utils-remove-range-not-flat: Trying to remove a range which starts and ends in different element.",this);var t=e.start.parent;ml(e.start),ml(e.end);var n=t._removeChildren(e.start.index,e.end.index-e.start.index);return pl(t,e.start.index),n}function fl(e,t){if(!e.isFlat)throw new jn.b("operation-utils-move-range-not-flat: Trying to move a range which starts and ends in different element.",this);var n=hl(e);return dl(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),n)}function vl(e){var t=[];e instanceof Array||(e=[e]);for(var n=0;ne.maxOffset)throw new jn.b("move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.",this);if(e===t&&n=n&&this.targetPosition.path[r]2&&void 0!==arguments[2]?arguments[2]:"main";return w(this,n),r=t.call(this,i),r._document=e,r.rootName=o,r}return x(n,[{key:"is",value:function(e,t){return t?t===this.name&&("rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e):"rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e||"node"===e||"model:node"===e}},{key:"toJSON",value:function(){return this.rootName}},{key:"document",get:function(){return this._document}}]),n}(Ja),Sl=function(){function e(t,n){w(this,e),this.model=t,this.batch=n}return x(e,[{key:"createText",value:function(e,t){return new Ya(e,t)}},{key:"createElement",value:function(e,t){return new Ja(e,t)}},{key:"createDocumentFragment",value:function(){return new ul}},{key:"cloneElement",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e._clone(t)}},{key:"insert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this._assertWriterUsedCorrectly(),!(e instanceof Ya&&""==e.data)){var i=Xa._createAt(t,n);if(e.parent){if(Rl(e.root,i.root))return void this.move(is._createOn(e),i);if(e.root.document)throw new jn.b("model-writer-insert-forbidden-move: Cannot move a node from a document to a different tree. It is forbidden to move a node that was already in a document outside of it.",this);this.remove(e)}var r=i.root.document?i.root.document.version:null,o=new _l(i,e,r);if(e instanceof Ya&&(o.shouldReceiveAttributes=!0),this.batch.addOperation(o),this.model.applyOperation(o),e instanceof ul){var a,s=k(e.markers);try{for(s.s();!(a=s.n()).done;){var l=v(a.value,2),c=l[0],u=l[1],d=Xa._createAt(u.root,0),h={range:new is(u.start._getCombined(d,i),u.end._getCombined(d,i)),usingOperation:!0,affectsData:!0};this.model.markers.has(c)?this.updateMarker(c,h):this.addMarker(c,h)}}catch(f){s.e(f)}finally{s.f()}}}}},{key:"insertText",value:function(e,t,n,i){t instanceof ul||t instanceof Ja||t instanceof Xa?this.insert(this.createText(e),t,n):this.insert(this.createText(e,t),n,i)}},{key:"insertElement",value:function(e,t,n,i){t instanceof ul||t instanceof Ja||t instanceof Xa?this.insert(this.createElement(e),t,n):this.insert(this.createElement(e,t),n,i)}},{key:"append",value:function(e,t){this.insert(e,t,"end")}},{key:"appendText",value:function(e,t,n){t instanceof ul||t instanceof Ja?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),n,"end")}},{key:"appendElement",value:function(e,t,n){t instanceof ul||t instanceof Ja?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),n,"end")}},{key:"setAttribute",value:function(e,t,n){if(this._assertWriterUsedCorrectly(),n instanceof is){var i,r=n.getMinimalFlatRanges(),o=k(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;Ol(this,e,t,a)}}catch(s){o.e(s)}finally{o.f()}}else Ml(this,e,t,n)}},{key:"setAttributes",value:function(e,t){var n,i=k(li(e));try{for(i.s();!(n=i.n()).done;){var r=v(n.value,2),o=r[0],a=r[1];this.setAttribute(o,a,t)}}catch(s){i.e(s)}finally{i.f()}}},{key:"removeAttribute",value:function(e,t){if(this._assertWriterUsedCorrectly(),t instanceof is){var n,i=t.getMinimalFlatRanges(),r=k(i);try{for(r.s();!(n=r.n()).done;){var o=n.value;Ol(this,e,null,o)}}catch(a){r.e(a)}finally{r.f()}}else Ml(this,e,null,t)}},{key:"clearAttributes",value:function(e){var t=this;this._assertWriterUsedCorrectly();var n=function(e){var n,i=k(e.getAttributeKeys());try{for(i.s();!(n=i.n()).done;){var r=n.value;t.removeAttribute(r,e)}}catch(o){i.e(o)}finally{i.f()}};if(e instanceof is){var i,r=k(e.getItems());try{for(r.s();!(i=r.n()).done;){var o=i.value;n(o)}}catch(a){r.e(a)}finally{r.f()}}else n(e)}},{key:"move",value:function(e,t,n){if(this._assertWriterUsedCorrectly(),!(e instanceof is))throw new jn.b("writer-move-invalid-range: Invalid range to move.",this);if(!e.isFlat)throw new jn.b("writer-move-range-not-flat: Range to move is not flat.",this);var i=Xa._createAt(t,n);if(!i.isEqual(e.start)){if(this._addOperationForAffectedMarkers("move",e),!Rl(e.root,i.root))throw new jn.b("writer-move-different-document: Range is going to be moved between different documents.",this);var r=e.root.document?e.root.document.version:null,o=new wl(e.start,e.end.offset-e.start.offset,i,r);this.batch.addOperation(o),this.model.applyOperation(o)}}},{key:"remove",value:function(e){this._assertWriterUsedCorrectly();var t,n=(e instanceof is?e:is._createOn(e)).getMinimalFlatRanges().reverse(),i=k(n);try{for(i.s();!(t=i.n()).done;){var r=t.value;this._addOperationForAffectedMarkers("move",r),Nl(r.start,r.end.offset-r.start.offset,this.batch,this.model)}}catch(o){i.e(o)}finally{i.f()}}},{key:"merge",value:function(e){this._assertWriterUsedCorrectly();var t=e.nodeBefore,n=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof Ja))throw new jn.b("writer-merge-no-element-before: Node before merge position must be an element.",this);if(!(n instanceof Ja))throw new jn.b("writer-merge-no-element-after: Node after merge position must be an element.",this);e.root.document?this._merge(e):this._mergeDetached(e)}},{key:"createPositionFromPath",value:function(e,t,n){return this.model.createPositionFromPath(e,t,n)}},{key:"createPositionAt",value:function(e,t){return this.model.createPositionAt(e,t)}},{key:"createPositionAfter",value:function(e){return this.model.createPositionAfter(e)}},{key:"createPositionBefore",value:function(e){return this.model.createPositionBefore(e)}},{key:"createRange",value:function(e,t){return this.model.createRange(e,t)}},{key:"createRangeIn",value:function(e){return this.model.createRangeIn(e)}},{key:"createRangeOn",value:function(e){return this.model.createRangeOn(e)}},{key:"createSelection",value:function(e,t,n){return this.model.createSelection(e,t,n)}},{key:"_mergeDetached",value:function(e){var t=e.nodeBefore,n=e.nodeAfter;this.move(is._createIn(n),Xa._createAt(t,"end")),this.remove(n)}},{key:"_merge",value:function(e){var t=Xa._createAt(e.nodeBefore,"end"),n=Xa._createAt(e.nodeAfter,0),i=e.root.document.graveyard,r=new Xa(i,[0]),o=e.root.document.version,a=new Tl(n,e.nodeAfter.maxOffset,t,r,o);this.batch.addOperation(a),this.model.applyOperation(a)}},{key:"rename",value:function(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof Ja))throw new jn.b("writer-rename-not-element-instance: Trying to rename an object which is not an instance of Element.",this);var n=e.root.document?e.root.document.version:null,i=new Cl(Xa._createBefore(e),e.name,t,n);this.batch.addOperation(i),this.model.applyOperation(i)}},{key:"split",value:function(e,t){this._assertWriterUsedCorrectly();var n,i,r=e.parent;if(!r.parent)throw new jn.b("writer-split-element-no-parent: Element with no parent can not be split.",this);if(t||(t=r.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new jn.b("writer-split-invalid-limit-element: Limit element is not a position ancestor.",this);do{var o=r.root.document?r.root.document.version:null,a=r.maxOffset-e.offset,s=new Pl(e,a,null,o);this.batch.addOperation(s),this.model.applyOperation(s),n||i||(n=r,i=e.parent.nextSibling),r=(e=this.createPositionAfter(e.parent)).parent}while(r!==t);return{position:e,range:new is(Xa._createAt(n,"end"),Xa._createAt(i,0))}}},{key:"wrap",value:function(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new jn.b("writer-wrap-range-not-flat: Range to wrap is not flat.",this);var n=t instanceof Ja?t:new Ja(t);if(n.childCount>0)throw new jn.b("writer-wrap-element-not-empty: Element to wrap with is not empty.",this);if(null!==n.parent)throw new jn.b("writer-wrap-element-attached: Element to wrap with is already attached to tree model.",this);this.insert(n,e.start);var i=new is(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(i,Xa._createAt(n,0))}},{key:"unwrap",value:function(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new jn.b("writer-unwrap-element-no-parent: Trying to unwrap an element which has no parent.",this);this.move(is._createIn(e),this.createPositionAfter(e)),this.remove(e)}},{key:"addMarker",value:function(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new jn.b("writer-addMarker-no-usingOperation: The options.usingOperation parameter is required when adding a new marker.",this);var n=t.usingOperation,i=t.range,r=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new jn.b("writer-addMarker-marker-exists: Marker with provided name already exists.",this);if(!i)throw new jn.b("writer-addMarker-no-range: Range parameter is required when adding a new marker.",this);return n?(Il(this,e,null,i,r),this.model.markers.get(e)):this.model.markers._set(e,i,n,r)}},{key:"updateMarker",value:function(e,t){this._assertWriterUsedCorrectly();var n="string"==typeof e?e:e.name,i=this.model.markers.get(n);if(!i)throw new jn.b("writer-updateMarker-marker-not-exists: Marker with provided name does not exists.",this);if(t){var r="boolean"==typeof t.usingOperation,o="boolean"==typeof t.affectsData,a=o?t.affectsData:i.affectsData;if(!r&&!t.range&&!o)throw new jn.b("writer-updateMarker-wrong-options: One of the options is required - provide range, usingOperations or affectsData.",this);var s=i.getRange(),l=t.range?t.range:s;r&&t.usingOperation!==i.managedUsingOperations?t.usingOperation?Il(this,n,null,l,a):(Il(this,n,s,null,a),this.model.markers._set(n,l,void 0,a)):i.managedUsingOperations?Il(this,n,s,l,a):this.model.markers._set(n,l,void 0,a)}else this.model.markers._refresh(i)}},{key:"removeMarker",value:function(e){this._assertWriterUsedCorrectly();var t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new jn.b("writer-removeMarker-no-marker: Trying to remove marker which does not exist.",this);var n=this.model.markers.get(t);n.managedUsingOperations?Il(this,t,n.getRange(),null,n.affectsData):this.model.markers._remove(t)}},{key:"setSelection",value:function(e,t,n){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(e,t,n)}},{key:"setSelectionFocus",value:function(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}},{key:"setSelectionAttribute",value:function(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else{var n,i=k(li(e));try{for(i.s();!(n=i.n()).done;){var r=v(n.value,2),o=r[0],a=r[1];this._setSelectionAttribute(o,a)}}catch(s){i.e(s)}finally{i.f()}}}},{key:"removeSelectionAttribute",value:function(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else{var t,n=k(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;this._removeSelectionAttribute(i)}}catch(r){n.e(r)}finally{n.f()}}}},{key:"overrideSelectionGravity",value:function(){return this.model.document.selection._overrideGravity()}},{key:"restoreSelectionGravity",value:function(e){this.model.document.selection._restoreGravity(e)}},{key:"_setSelectionAttribute",value:function(e,t){var n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){var i=ks._getStoreAttributeKey(e);this.setAttribute(i,t,n.anchor.parent)}n._setAttribute(e,t)}},{key:"_removeSelectionAttribute",value:function(e){var t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){var n=ks._getStoreAttributeKey(e);this.removeAttribute(n,t.anchor.parent)}t._removeAttribute(e)}},{key:"_assertWriterUsedCorrectly",value:function(){if(this.model._currentWriter!==this)throw new jn.b("writer-incorrect-use: Trying to use a writer outside the change() block.",this)}},{key:"_addOperationForAffectedMarkers",value:function(e,t){var n,i=k(this.model.markers);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(r.managedUsingOperations){var o=r.getRange(),a=!1;if("move"===e)a=t.containsPosition(o.start)||t.start.isEqual(o.start)||t.containsPosition(o.end)||t.end.isEqual(o.end);else{var s=t.nodeBefore,l=t.nodeAfter,c=o.start.parent==s&&o.start.isAtEnd,u=o.end.parent==l&&0==o.end.offset,d=o.end.nodeAfter==l,h=o.start.nodeAfter==l;a=c||u||d||h}a&&this.updateMarker(r.name,{range:o})}}}catch(f){i.e(f)}finally{i.f()}}}]),e}();function Ol(e,t,n,i){var r,o,a,s,l=e.model,c=l.document,u=i.start,d=k(i.getWalker({shallow:!0}));try{for(d.s();!(s=d.n()).done;){var h=s.value;a=h.item.getAttribute(t),r&&o!=a&&(o!=n&&f(),u=r),r=h.nextPosition,o=a}}catch(v){d.e(v)}finally{d.f()}function f(){var i=new is(u,r),a=i.root.document?c.version:null,s=new bl(i,t,o,n,a);e.batch.addOperation(s),l.applyOperation(s)}r instanceof Xa&&r!=u&&o!=n&&f()}function Ml(e,t,n,i){var r,o,a=e.model,s=a.document,l=i.getAttribute(t);if(l!=n){if(i.root===i){var c=i.document?s.version:null;o=new Al(i,t,l,n,c)}else{r=new is(Xa._createBefore(i),e.createPositionAfter(i));var u=r.root.document?s.version:null;o=new bl(r,t,l,n,u)}e.batch.addOperation(o),a.applyOperation(o)}}function Il(e,t,n,i,r){var o=e.model,a=o.document,s=new xl(t,n,i,o.markers,r,a.version);e.batch.addOperation(s),o.applyOperation(s)}function Nl(e,t,n,i){var r;if(e.root.document){var o=i.document,a=new Xa(o.graveyard,[0]);r=new wl(e,t,a,o.version)}else r=new yl(e,t);n.addOperation(r),i.applyOperation(r)}function Rl(e,t){return e===t||e instanceof El&&t instanceof El}var Dl=function(){function e(t){w(this,e),this._markerCollection=t,this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null}return x(e,[{key:"refreshItem",value:function(e){if(!this._isInInsertedElement(e.parent)){this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize);var t,n=is._createOn(e),i=k(this._markerCollection.getMarkersIntersectingRange(n));try{for(i.s();!(t=i.n()).done;){var r=t.value,o=r.getRange();this.bufferMarkerChange(r.name,o,o,r.affectsData)}}catch(a){i.e(a)}finally{i.f()}this._cachedChanges=null}}},{key:"bufferOperation",value:function(e){switch(e.type){case"insert":if(this._isInInsertedElement(e.position.parent))return;this._markInsert(e.position.parent,e.position.offset,e.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":var t,n=k(e.range.getItems({shallow:!0}));try{for(n.s();!(t=n.n()).done;){var i=t.value;this._isInInsertedElement(i.parent)||this._markAttribute(i)}}catch(p){n.e(p)}finally{n.f()}break;case"remove":case"move":case"reinsert":if(e.sourcePosition.isEqual(e.targetPosition)||e.sourcePosition.getShiftedBy(e.howMany).isEqual(e.targetPosition))return;var r=this._isInInsertedElement(e.sourcePosition.parent),o=this._isInInsertedElement(e.targetPosition.parent);r||this._markRemove(e.sourcePosition.parent,e.sourcePosition.offset,e.howMany),o||this._markInsert(e.targetPosition.parent,e.getMovedRangeStart().offset,e.howMany);break;case"rename":if(this._isInInsertedElement(e.position.parent))return;this._markRemove(e.position.parent,e.position.offset,1),this._markInsert(e.position.parent,e.position.offset,1);var a,s=is._createFromPositionAndShift(e.position,1),l=k(this._markerCollection.getMarkersIntersectingRange(s));try{for(l.s();!(a=l.n()).done;){var c=a.value,u=c.getRange();this.bufferMarkerChange(c.name,u,u,c.affectsData)}}catch(p){l.e(p)}finally{l.f()}break;case"split":var d=e.splitPosition.parent;this._isInInsertedElement(d)||this._markRemove(d,e.splitPosition.offset,e.howMany),this._isInInsertedElement(e.insertionPosition.parent)||this._markInsert(e.insertionPosition.parent,e.insertionPosition.offset,1),e.graveyardPosition&&this._markRemove(e.graveyardPosition.parent,e.graveyardPosition.offset,1);break;case"merge":var h=e.sourcePosition.parent;this._isInInsertedElement(h.parent)||this._markRemove(h.parent,h.startOffset,1);var f=e.graveyardPosition.parent;this._markInsert(f,e.graveyardPosition.offset,1);var v=e.targetPosition.parent;this._isInInsertedElement(v)||this._markInsert(v,e.targetPosition.offset,h.maxOffset);break}this._cachedChanges=null}},{key:"bufferMarkerChange",value:function(e,t,n,i){var r=this._changedMarkers.get(e);r?(r.newRange=n,r.affectsData=i,null==r.oldRange&&null==r.newRange&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{oldRange:t,newRange:n,affectsData:i})}},{key:"getMarkersToRemove",value:function(){var e,t=[],n=k(this._changedMarkers);try{for(n.s();!(e=n.n()).done;){var i=v(e.value,2),r=i[0],o=i[1];null!=o.oldRange&&t.push({name:r,range:o.oldRange})}}catch(a){n.e(a)}finally{n.f()}return t}},{key:"getMarkersToAdd",value:function(){var e,t=[],n=k(this._changedMarkers);try{for(n.s();!(e=n.n()).done;){var i=v(e.value,2),r=i[0],o=i[1];null!=o.newRange&&t.push({name:r,range:o.newRange})}}catch(a){n.e(a)}finally{n.f()}return t}},{key:"getChangedMarkers",value:function(){return Array.from(this._changedMarkers).map((function(e){return{name:e[0],data:{oldRange:e[1].oldRange,newRange:e[1].newRange}}}))}},{key:"hasDataChanges",value:function(){var e,t=k(this._changedMarkers);try{for(t.s();!(e=t.n()).done;){var n=v(e.value,2),i=n[1];if(i.affectsData)return!0}}catch(r){t.e(r)}finally{t.f()}return this._changesInElement.size>0}},{key:"getChanges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeChangesInGraveyard:!1};if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();var t,n=[],i=k(this._changesInElement.keys());try{for(i.s();!(t=i.n()).done;){var r,o=t.value,a=this._changesInElement.get(o).sort((function(e,t){return e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offsetr.offset){if(o>a){var f={type:"attribute",offset:a,howMany:o-a,count:this._changeCount++};this._handleChange(f,t),t.push(f)}e.nodesToHandle=r.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=r.offset&&e.offseta?(e.nodesToHandle=o-a,e.offset=a):e.nodesToHandle=0);if("remove"==r.type&&e.offsetr.offset){var v={type:"attribute",offset:r.offset,howMany:o-r.offset,count:this._changeCount++};this._handleChange(v,t),t.push(v),e.nodesToHandle=r.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==r.type&&(e.offset>=r.offset&&o<=a?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=r.offset&&o>=a&&(r.howMany=0))}}}catch(p){i.e(p)}finally{i.f()}e.howMany=e.nodesToHandle,delete e.nodesToHandle}},{key:"_getInsertDiff",value:function(e,t,n){return{type:"insert",position:Xa._createAt(e,t),name:n,length:1,changeCount:this._changeCount++}}},{key:"_getRemoveDiff",value:function(e,t,n){return{type:"remove",position:Xa._createAt(e,t),name:n,length:1,changeCount:this._changeCount++}}},{key:"_getAttributesDiff",value:function(e,t,n){var i=[];n=new Map(n);var r,o=k(t);try{for(o.s();!(r=o.n()).done;){var a=v(r.value,2),s=a[0],l=a[1],c=n.has(s)?n.get(s):null;c!==l&&i.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:s,attributeOldValue:l,attributeNewValue:c,changeCount:this._changeCount++}),n.delete(s)}}catch(m){o.e(m)}finally{o.f()}var u,d=k(n);try{for(d.s();!(u=d.n()).done;){var h=v(u.value,2),f=h[0],p=h[1];i.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:f,attributeOldValue:null,attributeNewValue:p,changeCount:this._changeCount++})}}catch(m){d.e(m)}finally{d.f()}return i}},{key:"_isInInsertedElement",value:function(e){var t=e.parent;if(!t)return!1;var n=this._changesInElement.get(t),i=e.startOffset;if(n){var r,o=k(n);try{for(o.s();!(r=o.n()).done;){var a=r.value;if("insert"==a.type&&i>=a.offset&&ir){for(var l=0;l0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;return e<0?[]:this._operations.slice(e,t)}},{key:"getOperation",value:function(e){return this._operations[e]}},{key:"setOperationAsUndone",value:function(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}},{key:"isUndoingOperation",value:function(e){return this._undoPairs.has(e)}},{key:"isUndoneOperation",value:function(e){return this._undoneOperations.has(e)}},{key:"getUndoneOperation",value:function(e){return this._undoPairs.get(e)}}]),e}();function Bl(e,t){return!!(n=e.charAt(t-1))&&1==n.length&&/[\ud800-\udbff]/.test(n)&&function(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}(e.charAt(t));var n}function Fl(e,t){return!!(n=e.charAt(t))&&1==n.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(n);var n}var Ul="$graveyard",Hl=function(){function e(t){var n=this;w(this,e),this.model=t,this.version=0,this.history=new Vl(this),this.selection=new ks(this),this.roots=new Jn({idProperty:"rootName"}),this.differ=new Dl(t.markers),this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",Ul),this.listenTo(t,"applyOperation",(function(e,t){var i=t[0];if(i.isDocumentOperation&&i.baseVersion!==n.version)throw new jn.b("model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.",n,{operation:i})}),{priority:"highest"}),this.listenTo(t,"applyOperation",(function(e,t){var i=t[0];i.isDocumentOperation&&n.differ.bufferOperation(i)}),{priority:"high"}),this.listenTo(t,"applyOperation",(function(e,t){var i=t[0];i.isDocumentOperation&&(n.version++,n.history.addOperation(i))}),{priority:"low"}),this.listenTo(this.selection,"change",(function(){n._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(t.markers,"update",(function(e,t,i,r){n.differ.bufferMarkerChange(t.name,i,r,t.affectsData),null===i&&t.on("change",(function(e,i){n.differ.bufferMarkerChange(t.name,i,t.getRange(),t.affectsData)}))}))}return x(e,[{key:"createRoot",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"$root",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"main";if(this.roots.get(t))throw new jn.b("model-document-createRoot-name-exists: Root with specified name already exists.",this,{name:t});var n=new El(this,e,t);return this.roots.add(n),n}},{key:"destroy",value:function(){this.selection.destroy(),this.stopListening()}},{key:"getRoot",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"main";return this.roots.get(e)}},{key:"getRootNames",value:function(){return Array.from(this.roots,(function(e){return e.rootName})).filter((function(e){return e!=Ul}))}},{key:"registerPostFixer",value:function(e){this._postFixers.add(e)}},{key:"toJSON",value:function(){var e=ri(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}},{key:"_handleChangeBlock",value:function(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}},{key:"_hasDocumentChangedFromTheLastChangeBlock",value:function(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}},{key:"_getDefaultRoot",value:function(){var e,t=k(this.roots);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(n!==this.graveyard)return n}}catch(i){t.e(i)}finally{t.f()}return this.graveyard}},{key:"_getDefaultRange",value:function(){var e=this._getDefaultRoot(),t=this.model,n=t.schema,i=t.createPositionFromPath(e,[0]);return n.getNearestSelectionRange(i)||t.createRange(i)}},{key:"_validateSelectionRange",value:function(e){return $l(e.start)&&$l(e.end)}},{key:"_callPostFixers",value:function(e){var t=!1;do{var n,i=k(this._postFixers);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(this.selection.refresh(),t=r(e),t)break}}catch(o){i.e(o)}finally{i.f()}}while(t)}},{key:"graveyard",get:function(){return this.getRoot(Ul)}}]),e}();function $l(e){var t=e.textNode;if(t){var n=t.data,i=e.offset-t.startOffset;return!Bl(n,i)&&!Fl(n,i)}return!0}Kn(Hl,Fn);var Wl=function(){function e(){w(this,e),this._markers=new Map}return x(e,[{key:Symbol.iterator,value:function(){return this._markers.values()}},{key:"has",value:function(e){return this._markers.has(e)}},{key:"get",value:function(e){return this._markers.get(e)||null}},{key:"_set",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=e instanceof ql?e.name:e;if(r.includes(","))throw new jn.b('markercollection-incorrect-marker-name: Marker name cannot contain the "," character.',this);var o=this._markers.get(r);if(o){var a=o.getRange(),s=!1;return a.isEqual(t)||(o._attachLiveRange(vs.fromRange(t)),s=!0),n!=o.managedUsingOperations&&(o._managedUsingOperations=n,s=!0),"boolean"==typeof i&&i!=o.affectsData&&(o._affectsData=i,s=!0),s&&this.fire("update:"+r,o,a,t),o}var l=vs.fromRange(t),c=new ql(r,l,n,i);return this._markers.set(r,c),this.fire("update:"+r,c,null,t),c}},{key:"_remove",value:function(e){var t=e instanceof ql?e.name:e,n=this._markers.get(t);return!!n&&(this._markers.delete(t),this.fire("update:"+t,n,n.getRange(),null),this._destroyMarker(n),!0)}},{key:"_refresh",value:function(e){var t=e instanceof ql?e.name:e,n=this._markers.get(t);if(!n)throw new jn.b("markercollection-refresh-marker-not-exists: Marker with provided name does not exists.",this);var i=n.getRange();this.fire("update:"+t,n,i,i,n.managedUsingOperations,n.affectsData)}},{key:"getMarkersAtPosition",value:a.mark((function e(t){var n,i,r;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=k(this),e.prev=1,n.s();case 3:if((i=n.n()).done){e.next=11;break}if(r=i.value,e.t0=r.getRange().containsPosition(t),!e.t0){e.next=9;break}return e.next=9,r;case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t1=e["catch"](1),n.e(e.t1);case 16:return e.prev=16,n.f(),e.finish(16);case 19:case"end":return e.stop()}}),e,this,[[1,13,16,19]])}))},{key:"getMarkersIntersectingRange",value:a.mark((function e(t){var n,i,r;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=k(this),e.prev=1,n.s();case 3:if((i=n.n()).done){e.next=11;break}if(r=i.value,e.t0=null!==r.getRange().getIntersection(t),!e.t0){e.next=9;break}return e.next=9,r;case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t1=e["catch"](1),n.e(e.t1);case 16:return e.prev=16,n.f(),e.finish(16);case 19:case"end":return e.stop()}}),e,this,[[1,13,16,19]])}))},{key:"destroy",value:function(){var e,t=k(this._markers.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;this._destroyMarker(n)}}catch(i){t.e(i)}finally{t.f()}this._markers=null,this.stopListening()}},{key:"getMarkersGroup",value:a.mark((function e(t){var n,i,r;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=k(this._markers.values()),e.prev=1,n.s();case 3:if((i=n.n()).done){e.next=11;break}if(r=i.value,e.t0=r.name.startsWith(t+":"),!e.t0){e.next=9;break}return e.next=9,r;case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t1=e["catch"](1),n.e(e.t1);case 16:return e.prev=16,n.f(),e.finish(16);case 19:case"end":return e.stop()}}),e,this,[[1,13,16,19]])}))},{key:"_destroyMarker",value:function(e){e.stopListening(),e._detachLiveRange()}}]),e}();Kn(Wl,Fn);var ql=function(){function e(t,n,i,r){w(this,e),this.name=t,this._liveRange=this._attachLiveRange(n),this._managedUsingOperations=i,this._affectsData=r}return x(e,[{key:"getStart",value:function(){if(!this._liveRange)throw new jn.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.start.clone()}},{key:"getEnd",value:function(){if(!this._liveRange)throw new jn.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.end.clone()}},{key:"getRange",value:function(){if(!this._liveRange)throw new jn.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.toRange()}},{key:"is",value:function(e){return"marker"===e||"model:marker"===e}},{key:"_attachLiveRange",value:function(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}},{key:"_detachLiveRange",value:function(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}},{key:"managedUsingOperations",get:function(){if(!this._liveRange)throw new jn.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._managedUsingOperations}},{key:"affectsData",get:function(){if(!this._liveRange)throw new jn.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._affectsData}}]),e}();Kn(ql,Fn);var Yl=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"clone",value:function(){return new n(this.baseVersion)}},{key:"getReversed",value:function(){return new n(this.baseVersion+1)}},{key:"_execute",value:function(){}},{key:"type",get:function(){return"noop"}}],[{key:"className",get:function(){return"NoOperation"}}]),n}(cl),Gl={};Gl[bl.className]=bl,Gl[_l.className]=_l,Gl[xl.className]=xl,Gl[wl.className]=wl,Gl[Yl.className]=Yl,Gl[cl.className]=cl,Gl[Cl.className]=Cl,Gl[Al.className]=Al,Gl[Pl.className]=Pl,Gl[Tl.className]=Tl;var Kl=function(e){C(n,e);var t=A(n);function n(e,i){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"toNone";if(w(this,n),r=t.call(this,e,i,o),!r.root.is("rootElement"))throw new jn.b("model-liveposition-root-not-rootelement: LivePosition's root has to be an instance of RootElement.",e);return Jl.call(P(r)),T(r)}return x(n,[{key:"detach",value:function(){this.stopListening()}},{key:"is",value:function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e}},{key:"toPosition",value:function(){return new Xa(this.root,this.path.slice(),this.stickiness)}}],[{key:"fromPosition",value:function(e,t){return new this(e.root,e.path.slice(),t||e.stickiness)}}]),n}(Xa);function Jl(){var e=this;this.listenTo(this.root.document.model,"applyOperation",(function(t,n){var i=n[0];i.isDocumentOperation&&Ql.call(e,i)}),{priority:"low"})}function Ql(e){var t=this.getTransformedByOperation(e);if(!this.isEqual(t)){var n=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",n)}}Kn(Kl,Fn);var Zl=function(){function e(t,n,i){w(this,e),this.model=t,this.writer=n,this.position=i,this.canMergeWith=new Set([this.position.parent]),this.schema=t.schema,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}return x(e,[{key:"handleNodes",value:function(e,t){e=Array.from(e);for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};if(!t.isCollapsed){var i=t.getFirstRange();if("$graveyard"!=i.root.rootName){var r=e.schema;e.change((function(e){if(n.doNotResetEntireContent||!function(e,t){var n=e.getLimitElement(t);if(!t.containsEntireContent(n))return!1;var i=t.getFirstRange();return i.start.parent!=i.end.parent&&e.checkChild(n,"paragraph")}(r,t)){var o=function(e){var t=e.root.document.model,n=e.start,i=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){var r=function(e){var t,n=e.parent,i=n.root.document.model.schema,r=n.getAncestors({parentFirst:!0,includeSelf:!0}),o=k(r);try{for(o.s();!(t=o.n()).done;){var a=t.value;if(i.isLimit(a))return null;if(i.isBlock(a))return a}}catch(s){o.e(s)}finally{o.f()}}(i);if(r&&i.isTouching(t.createPositionAt(r,0))){var o=t.createSelection(e);t.modifySelection(o,{direction:"backward"}),i=o.getLastPosition()}}return[Kl.fromPosition(n,"toPrevious"),Kl.fromPosition(i,"toNext")]}(i),a=v(o,2),s=a[0],l=a[1];i.start.isTouching(i.end)||e.remove(i),n.leaveUnmerged||(function(e,t,n){var i=e.model;if(ec(e.model.schema,t,n)){var r=function(e,t){for(var n=e.getAncestors(),i=t.getAncestors(),r=0;n[r]&&n[r]==i[r];)r++;return[n[r],i[r]]}(t,n),o=v(r,2),a=o[0],s=o[1];!i.hasContent(a,{ignoreMarkers:!0})&&i.hasContent(s,{ignoreMarkers:!0})?function e(t,n,i,r){var o=n.parent,a=i.parent;if(o!=r&&a!=r){for(n=t.createPositionAfter(o),(i=t.createPositionBefore(a)).isEqual(n)||t.insert(o,i);n.parent.isEmpty;){var s=n.parent;n=t.createPositionBefore(s),t.remove(s)}i=t.createPositionBefore(a),function(e,t){var n=t.nodeBefore,i=t.nodeAfter;n.name!=i.name&&e.rename(n,i.name),e.clearAttributes(n),e.setAttributes(Object.fromEntries(i.getAttributes()),n),e.merge(t)}(t,i),ec(t.model.schema,n,i)&&e(t,n,i,r)}}(e,t,n,a.parent):function e(t,n,i,r){var o=n.parent,a=i.parent;if(o!=r&&a!=r){for(n=t.createPositionAfter(o),(i=t.createPositionBefore(a)).isEqual(n)||t.insert(a,n),t.merge(n);i.parent.isEmpty;){var s=i.parent;i=t.createPositionBefore(s),t.remove(s)}ec(t.model.schema,n,i)&&e(t,n,i,r)}}(e,t,n,a.parent)}}(e,s,l),r.removeDisallowedAttributes(s.parent.getChildren(),e)),nc(e,t,s),!n.doNotAutoparagraph&&function(e,t){var n=e.checkChild(t,"$text"),i=e.checkChild(t,"paragraph");return!n&&i}(r,s)&&tc(e,s,t),s.detach(),l.detach()}else(function(e,t){var n=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(n)),tc(e,e.createPositionAt(n,0),t)})(e,t)}))}}}function ec(e,t,n){var i=t.parent,r=n.parent;return i!=r&&!e.isLimit(i)&&!e.isLimit(r)&&function(e,t,n){var i,r=new is(e,t),o=k(r.getWalker());try{for(o.s();!(i=o.n()).done;){var a=i.value;if(n.isLimit(a.item))return!1}}catch(s){o.e(s)}finally{o.f()}return!0}(t,n,e)}function tc(e,t,n){var i=e.createElement("paragraph");e.insert(i,t),nc(e,n,e.createPositionAt(i,0))}function nc(e,t,n){t instanceof ks?e.setSelection(n):t.setTo(n)}var ic=' ,.?!:;"-()';function rc(e,t){var n=e.isForward,i=e.walker,r=e.unit,o=e.schema,a=t.type,s=t.item,l=t.nextPosition;if("text"==a)return"word"===e.unit?function(e,t){var n=e.position.textNode;if(n)for(var i=e.position.offset-n.startOffset;!ac(n.data,i,t)&&!sc(n,i,t);){e.next();var r=t?e.position.nodeAfter:e.position.nodeBefore;if(r&&r.is("$text")){var o=r.data.charAt(t?0:r.data.length-1);ic.includes(o)||(e.next(),n=e.position.textNode)}i=e.position.offset-n.startOffset}return e.position}(i,n):function(e,t){var n=e.position.textNode;if(n)for(var i=n.data,r=e.position.offset-n.startOffset;Bl(i,r)||"character"==t&&Fl(i,r);)e.next(),r=e.position.offset-n.startOffset;return e.position}(i,r);if(a==(n?"elementStart":"elementEnd")){if(o.isSelectable(s))return Xa._createAt(s,n?"after":"before");if(o.checkChild(l,"$text"))return l}else{if(o.isLimit(s))return void i.skip((function(){return!0}));if(o.checkChild(l,"$text"))return l}}function oc(e,t){var n=e.root,i=Xa._createAt(n,t?"end":0);return t?new is(e,i):new is(i,e)}function ac(e,t,n){var i=t+(n?0:-1);return ic.includes(e.charAt(i))}function sc(e,t,n){return t===(n?e.endOffset:0)}function lc(e,t){var n=[];Array.from(e.getItems({direction:"backward"})).map((function(e){return t.createRangeOn(e)})).filter((function(t){return(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end))})).forEach((function(e){n.push(e.start.parent),t.remove(e)})),n.forEach((function(e){for(var n=e;n.parent&&n.isEmpty;){var i=t.createRangeOn(n);n=n.parent,t.remove(i)}}))}function cc(e){e.document.registerPostFixer((function(t){return function(e,t){var n,i=t.document.selection,r=t.schema,o=[],a=!1,s=k(i.getRanges());try{for(s.s();!(n=s.n()).done;){var l=n.value,c=uc(l,r);c&&!c.isEqual(l)?(o.push(c),a=!0):o.push(l)}}catch(u){s.e(u)}finally{s.f()}a&&e.setSelection(function(e){var t=[];t.push(e.shift());var n,i=k(e);try{for(i.s();!(n=i.n()).done;){var r=n.value,o=t.pop();if(r.isIntersecting(o)){var a=o.start.isAfter(r.start)?r.start:o.start,s=o.end.isAfter(r.end)?o.end:r.end,l=new is(a,s);t.push(l)}else t.push(o),t.push(r)}}catch(u){i.e(u)}finally{i.f()}return t}(o),{backward:i.isBackward})}(t,e)}))}function uc(e,t){return e.isCollapsed?function(e,t){var n=e.start,i=t.getNearestSelectionRange(n);if(!i)return null;if(!i.isCollapsed)return i;var r=i.start;return n.isEqual(r)?null:new is(r)}(e,t):function(e,t){var n=e.start,i=e.end,r=t.checkChild(n,"$text"),o=t.checkChild(i,"$text"),a=t.getLimitElement(n),s=t.getLimitElement(i);if(a===s){if(r&&o)return null;if(function(e,t,n){var i=e.nodeAfter&&!n.isLimit(e.nodeAfter)||n.checkChild(e,"$text"),r=t.nodeBefore&&!n.isLimit(t.nodeBefore)||n.checkChild(t,"$text");return i||r}(n,i,t)){var l=n.nodeAfter&&t.isSelectable(n.nodeAfter)?null:t.getNearestSelectionRange(n,"forward"),c=i.nodeBefore&&t.isSelectable(i.nodeBefore)?null:t.getNearestSelectionRange(i,"backward"),u=l?l.start:n,d=c?c.start:i;return new is(u,d)}}var h=a&&!a.is("rootElement"),f=s&&!s.is("rootElement");if(h||f){var v=n.nodeAfter&&i.nodeBefore&&n.nodeAfter.parent===i.nodeBefore.parent,p=h&&(!v||!hc(n.nodeAfter,t)),m=f&&(!v||!hc(i.nodeBefore,t)),g=n,k=i;return p&&(g=Xa._createBefore(dc(a,t))),m&&(k=Xa._createAfter(dc(s,t))),new is(g,k)}return null}(e,t)}function dc(e,t){for(var n=e,i=n;t.isLimit(i)&&i.parent;)n=i,i=i.parent;return n}function hc(e,t){return e&&t.isSelectable(e)}var fc=function(){function e(){var t=this;w(this,e),this.markers=new Wl,this.document=new Hl(this),this.schema=new $s,this._pendingChanges=[],this._currentWriter=null,["insertContent","deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((function(e){return t.decorate(e)})),this.on("applyOperation",(function(e,t){t[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$block",{allowIn:"$root",isBlock:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",isLimit:!0}),this.schema.extend("$text",{allowIn:"$clipboardHolder"}),this.schema.register("$marker"),this.schema.addChildCheck((function(e,t){if("$marker"===t.name)return!0})),cc(this),this.document.registerPostFixer(Os)}return x(e,[{key:"change",value:function(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new ll,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){jn.b.rethrowUnexpectedError(e,this)}}},{key:"enqueueChange",value:function(e,t){try{"string"==typeof e?e=new ll(e):"function"==typeof e&&(t=e,e=new ll),this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){jn.b.rethrowUnexpectedError(e,this)}}},{key:"applyOperation",value:function(e){e._execute()}},{key:"insertContent",value:function(e,t,n){return function(e,t,n,i){return e.change((function(r){var o;o=n?n instanceof cs||n instanceof ks?n:r.createSelection(n,i):e.document.selection,o.isCollapsed||e.deleteContent(o,{doNotAutoparagraph:!0});var a,s=new Zl(e,r,o.anchor);a=t.is("documentFragment")?t.getChildren():[t],s.handleNodes(a,{isFirst:!0,isLast:!0});var l=s.getSelectionRange();l&&(o instanceof ks?r.setSelection(l):o.setTo(l));var c=s.getAffectedRange()||e.createRange(o.anchor);return s.destroy(),c}))}(this,e,t,n)}},{key:"deleteContent",value:function(e,t){Xl(this,e,t)}},{key:"modifySelection",value:function(e,t){!function(e,t){for(var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.schema,o="backward"!=i.direction,a=i.unit?i.unit:"character",s=t.focus,l=new Qa({boundaries:oc(s,o),singleCharacters:!0,direction:o?"forward":"backward"}),c={walker:l,schema:r,isForward:o,unit:a},u=function(){if(n.done)return{v:void 0};var i=rc(c,n.value);return i?{v:void(t instanceof ks?e.change((function(e){e.setSelectionFocus(i)})):t.setFocus(i))}:void 0};n=l.next();){var d=u();if("object"===R(d))return d.v}}(this,e,t)}},{key:"getSelectedContent",value:function(e){return function(e,t){return e.change((function(e){var n=e.createDocumentFragment(),i=t.getFirstRange();if(!i||i.isCollapsed)return n;var r,o=i.start.root,a=i.start.getCommonPath(i.end),s=o.getNodeByPath(a);r=i.start.parent==i.end.parent?i:e.createRange(e.createPositionAt(s,i.start.path[a.length]),e.createPositionAt(s,i.end.path[a.length]+1));var l,c=r.end.offset-r.start.offset,u=k(r.getItems({shallow:!0}));try{for(u.s();!(l=u.n()).done;){var d=l.value;d.is("$textProxy")?e.appendText(d.data,d.getAttributes(),n):e.append(e.cloneElement(d,!0),n)}}catch(v){u.e(v)}finally{u.f()}if(r!=i){var h=i._getTransformedByMove(r.start,e.createPositionAt(n,0),c)[0],f=e.createRange(e.createPositionAt(n,0),h.start);lc(e.createRange(h.end,e.createPositionAt(n,"end")),e),lc(f,e)}return n}))}(this,e)}},{key:"hasContent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e instanceof Ja?is._createIn(e):e;if(n.isCollapsed)return!1;var i=t.ignoreWhitespaces,r=void 0!==i&&i,o=t.ignoreMarkers,a=void 0!==o&&o;if(!a){var s,l=k(this.markers.getMarkersIntersectingRange(n));try{for(l.s();!(s=l.n()).done;){var c=s.value;if(c.affectsData)return!0}}catch(f){l.e(f)}finally{l.f()}}var u,d=k(n.getItems());try{for(d.s();!(u=d.n()).done;){var h=u.value;if(this.schema.isContent(h)){if(!h.is("$textProxy"))return!0;if(!r)return!0;if(-1!==h.data.search(/\S/))return!0}}}catch(f){d.e(f)}finally{d.f()}return!1}},{key:"createPositionFromPath",value:function(e,t,n){return new Xa(e,t,n)}},{key:"createPositionAt",value:function(e,t){return Xa._createAt(e,t)}},{key:"createPositionAfter",value:function(e){return Xa._createAfter(e)}},{key:"createPositionBefore",value:function(e){return Xa._createBefore(e)}},{key:"createRange",value:function(e,t){return new is(e,t)}},{key:"createRangeIn",value:function(e){return is._createIn(e)}},{key:"createRangeOn",value:function(e){return is._createOn(e)}},{key:"createSelection",value:function(e,t,n){return new cs(e,t,n)}},{key:"createBatch",value:function(e){return new ll(e)}},{key:"createOperationFromJSON",value:function(e){return function(){function e(){w(this,e)}return x(e,null,[{key:"fromJSON",value:function(e,t){return Gl[e.__className].fromJSON(e,t)}}]),e}().fromJSON(e,this.document)}},{key:"destroy",value:function(){this.document.destroy(),this.stopListening()}},{key:"_runPendingChanges",value:function(){var e=[];for(this.fire("_beforeChanges");this._pendingChanges.length;){var t=this._pendingChanges[0].batch;this._currentWriter=new Sl(this,t);var n=this._pendingChanges[0].callback(this._currentWriter);e.push(n),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return this.fire("_afterChanges"),e}}]),e}();Kn(fc,vr);var vc=function(){function e(){w(this,e),this._listener=Object.create(Vo)}return x(e,[{key:"listenTo",value:function(e){var t=this;this._listener.listenTo(e,"keydown",(function(e,n){t._listener.fire("_keydown:"+Fr(n),n)}))}},{key:"set",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=Ur(e),r=n.priority;this._listener.listenTo(this._listener,"_keydown:"+i,(function(e,n){t(n,(function(){n.preventDefault(),n.stopPropagation(),e.stop()})),e.return=!0}),{priority:r})}},{key:"press",value:function(e){return!!this._listener.fire("_keydown:"+Fr(e),e)}},{key:"destroy",value:function(){this._listener.stopListening()}}]),e}(),pc=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this),i.editor=e,i}return x(n,[{key:"set",value:function(e,t){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t){var o=t;t=function(e,t){i.editor.execute(o),t()}}l(N(n.prototype),"set",this).call(this,e,t,r)}}]),n}(vc),mc=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w(this,t),this._context=n.context||new ni({language:n.language}),this._context._addEditor(this,!n.context);var i=Array.from(this.constructor.builtinPlugins||[]);this.config=new On(n,this.constructor.defaultConfig),this.config.define("plugins",i),this.config.define(this._context._getEditorConfig()),this.plugins=new Qn(this,i,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this.commands=new Fs,this.set("state","initializing"),this.once("ready",(function(){return e.state="ready"}),{priority:"high"}),this.once("destroy",(function(){return e.state="destroyed"}),{priority:"high"}),this.set("isReadOnly",!1),this.model=new fc;var r=new nr;this.data=new rl(this.model,r),this.editing=new Bs(this.model,r),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new ol([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new pc(this),this.keystrokes.listenTo(this.editing.view.document)}return x(t,[{key:"initPlugins",value:function(){var e=this.config,t=e.get("plugins"),n=e.get("removePlugins")||[],i=e.get("extraPlugins")||[];return this.plugins.init(t.concat(i),n)}},{key:"destroy",value:function(){var e=this,t=Promise.resolve();return"initializing"==this.state&&(t=new Promise((function(t){return e.once("ready",t)}))),t.then((function(){e.fire("destroy"),e.stopListening(),e.commands.destroy()})).then((function(){return e.plugins.destroy()})).then((function(){e.model.destroy(),e.data.destroy(),e.editing.destroy(),e.keystrokes.destroy()})).then((function(){return e._context._removeEditor(e)}))}},{key:"execute",value:function(){try{var t;return(t=this.commands).execute.apply(t,arguments)}catch(e){jn.b.rethrowUnexpectedError(e,this)}}}]),t}();Kn(mc,vr);var gc={setData:function(e){this.data.set(e)},getData:function(e){return this.data.get(e)}},kc={updateSourceElement:function(){if(!this.sourceElement)throw new jn.b("editor-missing-sourceelement: Cannot update the source element of a detached editor.",this);var e,t;e=this.sourceElement,t=this.data.get(),e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}},bc=function(){function e(){w(this,e)}return x(e,[{key:"getHtml",value:function(e){var t=document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}]),e}(),yc=function(){function e(t){w(this,e),this._domParser=new DOMParser,this._domConverter=new Ro(t,{blockFillerMode:"nbsp"}),this._htmlWriter=new bc}return x(e,[{key:"toData",value:function(e){var t=this._domConverter.viewToDom(e,document);return this._htmlWriter.getHtml(t)}},{key:"toView",value:function(e){var t=this._toDom(e);return this._domConverter.domToView(t)}},{key:"_toDom",value:function(e){for(var t=this._domParser.parseFromString(e,"text/html"),n=t.createDocumentFragment(),i=t.body.childNodes;i.length>0;)n.appendChild(i[0]);return n}}]),e}(),wc=function(){function e(t){w(this,e),this.editor=t,this._components=new Map}return x(e,[{key:"names",value:a.mark((function e(){var t,n,i;return a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=k(this._components.values()),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return i=n.value,e.next=7,i.originalName;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"add",value:function(e,t){this._components.set(_c(e),{callback:t,originalName:e})}},{key:"create",value:function(e){if(!this.has(e))throw new jn.b("componentfactory-item-missing: The required component is not registered in the factory.",this,{name:e});return this._components.get(_c(e)).callback(this.editor.locale)}},{key:"has",value:function(e){return this._components.has(_c(e))}}]),e}();function _c(e){return String(e).toLowerCase()}var xc=function(){function e(){w(this,e),this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}return x(e,[{key:"add",value:function(e){var t=this;if(this._elements.has(e))throw new jn.b("focusTracker-add-element-already-exist: This element is already tracked by FocusTracker.",this);this.listenTo(e,"focus",(function(){return t._focus(e)}),{useCapture:!0}),this.listenTo(e,"blur",(function(){return t._blur()}),{useCapture:!0}),this._elements.add(e)}},{key:"remove",value:function(e){e===this.focusedElement&&this._blur(e),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}},{key:"destroy",value:function(){this.stopListening()}},{key:"_focus",value:function(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}},{key:"_blur",value:function(){var e=this;clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((function(){e.focusedElement=null,e.isFocused=!1}),0)}}]),e}();Kn(xc,Vo),Kn(xc,vr);var Cc=function(){function e(t){var n=this;w(this,e),this.editor=t,this.componentFactory=new wc(t),this.focusTracker=new xc,this._editableElementsMap=new Map,this.listenTo(t.editing.view.document,"layoutChanged",(function(){return n.update()}))}return x(e,[{key:"update",value:function(){this.fire("update")}},{key:"destroy",value:function(){this.stopListening(),this.focusTracker.destroy();var e,t=k(this._editableElementsMap.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;n.ckeditorInstance=null}}catch(i){t.e(i)}finally{t.f()}this._editableElementsMap=new Map}},{key:"setEditableElement",value:function(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor)}},{key:"getEditableElement",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"main";return this._editableElementsMap.get(e)}},{key:"getEditableElementsNames",value:function(){return this._editableElementsMap.keys()}},{key:"element",get:function(){return null}},{key:"_editableElements",get:function(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}}]),e}();Kn(Cc,Fn),n(13);var Ac=new WeakMap;function Tc(e){var t=e.view,n=e.element,i=e.text,r=e.isDirectHost,o=void 0===r||r,a=t.document;Ac.has(a)||(Ac.set(a,new Map),a.registerPostFixer((function(e){return Ec(a,e)}))),Ac.get(a).set(n,{text:i,isDirectHost:o}),t.change((function(e){return Ec(a,e)}))}function Pc(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function Ec(e,t){var n,i=Ac.get(e),r=!1,o=k(i);try{for(o.s();!(n=o.n()).done;){var a=v(n.value,2),s=a[0],l=a[1];Sc(t,s,l)&&(r=!0)}}catch(c){o.e(c)}finally{o.f()}return r}function Sc(e,t,n){var i=n.text,r=n.isDirectHost,o=r?t:function(e){if(1===e.childCount){var t=e.getChild(0);if(t.is("element")&&!t.is("uiElement"))return t}return null}(t),a=!1;return!!o&&(n.hostElement=o,o.getAttribute("data-placeholder")!==i&&(e.setAttribute("data-placeholder",i,o),a=!0),function(e){if(!e.isAttached())return!1;var t=!Array.from(e.getChildren()).some((function(e){return!e.is("uiElement")})),n=e.document;if(!n.isFocused&&t)return!0;var i=n.selection.anchor;return!(!t||!i||i.parent===e)}(o)?function(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}(e,o)&&(a=!0):Pc(e,o)&&(a=!0),a)}var Oc=function(){function e(){w(this,e),this._replacedElements=[]}return x(e,[{key:"replace",value:function(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}},{key:"restore",value:function(){this._replacedElements.forEach((function(e){var t=e.element,n=e.newElement;t.style.display="",n&&n.remove()})),this._replacedElements=[]}}]),e}(),Mc=function(e){C(n,e);var t=A(n);function n(e,i){var r,o;return w(this,n),r=t.call(this,e),r.view=i,r._toolbarConfig=(o=e.config.get("toolbar"),Array.isArray(o)?{items:o}:o?Object.assign({items:[]},o):{items:[]}),r._elementReplacer=new Oc,r}return x(n,[{key:"init",value:function(e){var t=this.editor,n=this.view,i=t.editing.view,r=n.editable,o=i.document.getRoot();r.name=o.rootName,n.render();var a=r.element;this.setEditableElement(r.name,a),this.focusTracker.add(a),n.editable.bind("isFocused").to(this.focusTracker),i.attachDomRoot(a),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}},{key:"destroy",value:function(){var e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.detachDomRoot(e.editable.name),e.destroy(),l(N(n.prototype),"destroy",this).call(this)}},{key:"_initToolbar",value:function(){var e=this.editor,t=this.view,n=e.editing.view;t.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),t.stickyPanel.limiterElement=t.element,this._toolbarConfig.viewportTopOffset&&(t.stickyPanel.viewportTopOffset=this._toolbarConfig.viewportTopOffset),t.toolbar.fillFromConfig(this._toolbarConfig.items,this.componentFactory),function(e){var t=e.origin,n=e.originKeystrokeHandler,i=e.originFocusTracker,r=e.toolbar,o=e.beforeFocus,a=e.afterBlur;i.add(r.element),n.set("Alt+F10",(function(e,t){i.isFocused&&!r.focusTracker.isFocused&&(o&&o(),r.focus(),t())})),r.keystrokes.set("Esc",(function(e,n){r.focusTracker.isFocused&&(t.focus(),a&&a(),n())}))}({origin:n,originFocusTracker:this.focusTracker,originKeystrokeHandler:e.keystrokes,toolbar:t.toolbar})}},{key:"_initPlaceholder",value:function(){var e=this.editor,t=e.editing.view,n=t.document.getRoot(),i=e.sourceElement,r=e.config.get("placeholder")||i&&"textarea"===i.tagName.toLowerCase()&&i.getAttribute("placeholder");r&&Tc({view:t,element:n,text:r,isDirectHost:!1})}},{key:"element",get:function(){return this.view.element}}]),n}(Cc),Ic=function(e){C(n,e);var t=A(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return w(this,n),e=t.call(this,i,{idProperty:"viewUid"}),e.on("add",(function(t,n,i){e._renderViewIntoCollectionParent(n,i)})),e.on("remove",(function(t,n){n.element&&e._parentElement&&n.element.remove()})),e._parentElement=null,e}return x(n,[{key:"destroy",value:function(){this.map((function(e){return e.destroy()}))}},{key:"setParent",value:function(e){this._parentElement=e;var t,n=k(this);try{for(n.s();!(t=n.n()).done;){var i=t.value;this._renderViewIntoCollectionParent(i)}}catch(r){n.e(r)}finally{n.f()}}},{key:"delegate",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i1&&void 0!==arguments[1]?arguments[1]:[];return w(this,n),i=t.call(this,r),i.locale=e,i}return x(n,[{key:"attachToDom",value:function(){this._bodyCollectionContainer=new Nc({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();var e=document.querySelector(".ck-body-wrapper");e||(e=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=n&&n.xmlns,o=r?e.createElementNS(r,t):e.createElement(t);for(var a in n)o.setAttribute(a,n[a]);!Xc(i)&&Gn(i)||(i=[i]);var s,l=k(i);try{for(l.s();!(s=l.n()).done;){var c=s.value;Xc(c)&&(c=e.createTextNode(c)),o.appendChild(c)}}catch(u){l.e(u)}finally{l.f()}return o}(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}},{key:"detachFromDom",value:function(){l(N(n.prototype),"destroy",this).call(this),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();var e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}]),n}(Ic);n(17);var tu=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.body=new eu(e),i}return x(n,[{key:"render",value:function(){l(N(n.prototype),"render",this).call(this),this.body.attachToDom()}},{key:"destroy",value:function(){return this.body.detachFromDom(),l(N(n.prototype),"destroy",this).call(this)}}]),n}(Zc);n(19);var nu=function(e){C(n,e);var t=A(n);function n(e){var i;w(this,n),i=t.call(this,e),i.set("text"),i.set("for"),i.id="ck-editor__label_"+Ln();var r=i.bindTemplate;return i.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:i.id,for:r.to("for")},children:[{text:r.to("text")}]}),i}return n}(Zc),iu=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.top=i.createCollection(),i.main=i.createCollection(),i._voiceLabelView=i._createVoiceLabel(),i.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":i._voiceLabelView.id},children:[i._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:i.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:i.main}]}),i}return x(n,[{key:"_createVoiceLabel",value:function(){var e=this.t,t=new nu;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}]),n}(tu),ru=function(e){C(n,e);var t=A(n);function n(e,i,r){var o;return w(this,n),o=t.call(this,e),o.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),o.name=null,o.set("isFocused",!1),o._editableElement=r,o._hasExternalElement=!!o._editableElement,o._editingView=i,o}return x(n,[{key:"render",value:function(){var e=this;l(N(n.prototype),"render",this).call(this),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",(function(){return e._updateIsFocusedClasses()})),this._updateIsFocusedClasses()}},{key:"destroy",value:function(){this._hasExternalElement&&this.template.revert(this._editableElement),l(N(n.prototype),"destroy",this).call(this)}},{key:"_updateIsFocusedClasses",value:function(){var e=this._editingView;function t(t){e.change((function(n){var i=e.document.getRoot(t.name);n.addClass(t.isFocused?"ck-focused":"ck-blurred",i),n.removeClass(t.isFocused?"ck-blurred":"ck-focused",i)}))}e.isRenderingInProgress?function n(i){e.once("change:isRenderingInProgress",(function(e,r,o){o?n(i):t(i)}))}(this):t(this)}}]),n}(Zc),ou=function(e){C(n,e);var t=A(n);function n(e,i,r){var o;return w(this,n),o=t.call(this,e,i,r),o.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),o}return x(n,[{key:"render",value:function(){var e=this;l(N(n.prototype),"render",this).call(this);var t=this._editingView,i=this.t;t.change((function(n){var r=t.document.getRoot(e.name);n.setAttribute("aria-label",i("Rich Text Editor, %0",[e.name]),r)}))}}]),n}(ru);function au(e){return function(t){return t+e}}n(21);var su=au("px"),lu=function(e){C(n,e);var t=A(n);function n(e){var i;w(this,n),i=t.call(this,e);var r=i.bindTemplate;return i.set("isActive",!1),i.set("isSticky",!1),i.set("limiterElement",null),i.set("limiterBottomOffset",50),i.set("viewportTopOffset",0),i.set("_marginLeft",null),i.set("_isStickyToTheLimiter",!1),i.set("_hasViewportTopOffset",!1),i.content=i.createCollection(),i._contentPanelPlaceholder=new Nc({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:r.to("isSticky",(function(e){return e?"block":"none"})),height:r.to("isSticky",(function(e){return e?su(i._panelRect.height):null}))}}}).render(),i._contentPanel=new Nc({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",r.if("isSticky","ck-sticky-panel__content_sticky"),r.if("_isStickyToTheLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:r.to("isSticky",(function(e){return e?su(i._contentPanelPlaceholder.getBoundingClientRect().width):null})),top:r.to("_hasViewportTopOffset",(function(e){return e?su(i.viewportTopOffset):null})),bottom:r.to("_isStickyToTheLimiter",(function(e){return e?su(i.limiterBottomOffset):null})),marginLeft:r.to("_marginLeft")}},children:i.content}).render(),i.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[i._contentPanelPlaceholder,i._contentPanel]}),i}return x(n,[{key:"render",value:function(){var e=this;l(N(n.prototype),"render",this).call(this),this._checkIfShouldBeSticky(),this.listenTo(Oo.window,"scroll",(function(){e._checkIfShouldBeSticky()})),this.listenTo(this,"change:isActive",(function(){e._checkIfShouldBeSticky()}))}},{key:"_checkIfShouldBeSticky",value:function(){var e,t=this._panelRect=this._contentPanel.getBoundingClientRect();this.limiterElement?(e=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&e.topo&&(o=h,n=c,i=l)}}catch(f){a.e(f)}finally{a.f()}return n?[i,n]:null}function ku(e){var t=e.left,n=e.top,i=Oo.window,r=i.scrollX,o=i.scrollY;return{left:t+r,top:n+o}}n(23);var bu=function(e){C(n,e);var t=A(n);function n(e,i,r){var o;w(this,n),o=t.call(this,e);var a=o.bindTemplate;return o.buttonView=i,o.panelView=r,o.set("isOpen",!1),o.set("isEnabled",!0),o.set("class"),o.set("id"),o.set("panelPosition","auto"),o.keystrokes=new vc,o.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",a.to("class"),a.if("isEnabled","ck-disabled",(function(e){return!e}))],id:a.to("id"),"aria-describedby":a.to("ariaDescribedById")},children:[i,r]}),i.extendTemplate({attributes:{class:["ck-dropdown__button"]}}),o}return x(n,[{key:"render",value:function(){var e=this;l(N(n.prototype),"render",this).call(this),this.listenTo(this.buttonView,"open",(function(){e.isOpen=!e.isOpen})),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",(function(){e.isOpen&&("auto"===e.panelPosition?e.panelView.position=n._getOptimalPosition({element:e.panelView.element,target:e.buttonView.element,fitInViewport:!0,positions:e._panelPositions}).name:e.panelView.position=e.panelPosition)})),this.keystrokes.listenTo(this.element);var t=function(t,n){e.isOpen&&(e.buttonView.focus(),e.isOpen=!1,n())};this.keystrokes.set("arrowdown",(function(t,n){e.buttonView.isEnabled&&!e.isOpen&&(e.isOpen=!0,n())})),this.keystrokes.set("arrowright",(function(t,n){e.isOpen&&n()})),this.keystrokes.set("arrowleft",t),this.keystrokes.set("esc",t)}},{key:"focus",value:function(){this.buttonView.focus()}},{key:"_panelPositions",get:function(){var e=n.defaultPanelPositions,t=e.southEast,i=e.southWest,r=e.northEast,o=e.northWest;return"ltr"===this.locale.uiLanguageDirection?[t,i,r,o]:[i,t,o,r]}}]),n}(Zc);bu.defaultPanelPositions={southEast:function(e){return{top:e.bottom,left:e.left,name:"se"}},southWest:function(e,t){return{top:e.bottom,left:e.left-t.width+e.width,name:"sw"}},northEast:function(e,t){return{top:e.top-t.height,left:e.left,name:"ne"}},northWest:function(e,t){return{top:e.bottom-t.height,left:e.left-t.width+e.width,name:"nw"}}},bu._getOptimalPosition=pu,n(25);var yu=function(e){C(n,e);var t=A(n);function n(){var e;w(this,n),e=t.call(this);var i=e.bindTemplate;return e.set("content",""),e.set("viewBox","0 0 20 20"),e.set("fillColor",""),e.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon"],viewBox:i.to("viewBox")}}),e}return x(n,[{key:"render",value:function(){var e=this;l(N(n.prototype),"render",this).call(this),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",(function(){e._updateXMLContent(),e._colorFillPaths()})),this.on("change:fillColor",(function(){e._colorFillPaths()}))}},{key:"_updateXMLContent",value:function(){if(this.content){var e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");for(t&&(this.viewBox=t),this.element.innerHTML="";e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}},{key:"_colorFillPaths",value:function(){var e=this;this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach((function(t){t.style.fill=e.fillColor}))}}]),n}(Zc);n(27);var wu=function(e){C(n,e);var t=A(n);function n(e){var i;w(this,n),i=t.call(this,e),i.set("text",""),i.set("position","s");var r=i.bindTemplate;return i.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip",r.to("position",(function(e){return"ck-tooltip_"+e})),r.if("text","ck-hidden",(function(e){return!e.trim()}))]},children:[{tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:r.to("text")}]}]}),i}return n}(Zc);n(29);var _u=function(e){C(n,e);var t=A(n);function n(e){var i;w(this,n),i=t.call(this,e);var r=i.bindTemplate,o=Ln();return i.set("class"),i.set("labelStyle"),i.set("icon"),i.set("isEnabled",!0),i.set("isOn",!1),i.set("isVisible",!0),i.set("isToggleable",!1),i.set("keystroke"),i.set("label"),i.set("tabindex",-1),i.set("tooltip"),i.set("tooltipPosition","s"),i.set("type","button"),i.set("withText",!1),i.set("withKeystroke",!1),i.children=i.createCollection(),i.tooltipView=i._createTooltipView(),i.labelView=i._createLabelView(o),i.iconView=new yu,i.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),i.keystrokeView=i._createKeystrokeView(),i.bind("_tooltipString").to(P(i),"tooltip",P(i),"label",P(i),"keystroke",i._getTooltipString.bind(P(i))),i.setTemplate({tag:"button",attributes:{class:["ck","ck-button",r.to("class"),r.if("isEnabled","ck-disabled",(function(e){return!e})),r.if("isVisible","ck-hidden",(function(e){return!e})),r.to("isOn",(function(e){return e?"ck-on":"ck-off"})),r.if("withText","ck-button_with-text"),r.if("withKeystroke","ck-button_with-keystroke")],type:r.to("type",(function(e){return e||"button"})),tabindex:r.to("tabindex"),"aria-labelledby":"ck-editor__aria-label_"+o,"aria-disabled":r.if("isEnabled",!0,(function(e){return!e})),"aria-pressed":r.to("isOn",(function(e){return!!i.isToggleable&&String(e)}))},children:i.children,on:{mousedown:r.to((function(e){e.preventDefault()})),click:r.to((function(e){i.isEnabled?i.fire("execute"):e.preventDefault()}))}}),i}return x(n,[{key:"render",value:function(){l(N(n.prototype),"render",this).call(this),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.tooltipView),this.children.add(this.labelView),this.withKeystroke&&this.children.add(this.keystrokeView)}},{key:"focus",value:function(){this.element.focus()}},{key:"_createTooltipView",value:function(){var e=new wu;return e.bind("text").to(this,"_tooltipString"),e.bind("position").to(this,"tooltipPosition"),e}},{key:"_createLabelView",value:function(e){var t=new Zc,n=this.bindTemplate;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:n.to("labelStyle"),id:"ck-editor__aria-label_"+e},children:[{text:this.bindTemplate.to("label")}]}),t}},{key:"_createKeystrokeView",value:function(){var e=new Zc;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(function(e){return Hr(e)}))}]}),e}},{key:"_getTooltipString",value:function(e,t,n){return e?"string"==typeof e?e:(n&&(n=Hr(n)),e instanceof Function?e(t,n):"".concat(t).concat(n?" (".concat(n,")"):"")):""}}]),n}(Zc),xu='',Cu=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.arrowView=i._createArrowView(),i.extendTemplate({attributes:{"aria-haspopup":!0}}),i.delegate("execute").to(P(i),"open"),i}return x(n,[{key:"render",value:function(){l(N(n.prototype),"render",this).call(this),this.children.add(this.arrowView)}},{key:"_createArrowView",value:function(){var e=new yu;return e.content=xu,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}]),n}(_u);n(31);var Au=function(e){C(n,e);var t=A(n);function n(){var e;return w(this,n),e=t.call(this),e.items=e.createCollection(),e.focusTracker=new xc,e.keystrokes=new vc,e._focusCycler=new cu({focusables:e.items,focusTracker:e.focusTracker,keystrokeHandler:e.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),e.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"]},children:e.items}),e}return x(n,[{key:"render",value:function(){var e=this;l(N(n.prototype),"render",this).call(this);var t,i=k(this.items);try{for(i.s();!(t=i.n()).done;){var r=t.value;this.focusTracker.add(r.element)}}catch(o){i.e(o)}finally{i.f()}this.items.on("add",(function(t,n){e.focusTracker.add(n.element)})),this.items.on("remove",(function(t,n){e.focusTracker.remove(n.element)})),this.keystrokes.listenTo(this.element)}},{key:"focus",value:function(){this._focusCycler.focusFirst()}},{key:"focusLast",value:function(){this._focusCycler.focusLast()}}]),n}(Zc),Tu=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.children=i.createCollection(),i.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item"]},children:i.children}),i}return x(n,[{key:"focus",value:function(){this.children.first.focus()}}]),n}(Zc),Pu=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}}),i}return n}(Zc);n(33);var Eu=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.isToggleable=!0,i.toggleSwitchView=i._createToggleView(),i.extendTemplate({attributes:{class:"ck-switchbutton"}}),i}return x(n,[{key:"render",value:function(){l(N(n.prototype),"render",this).call(this),this.children.add(this.toggleSwitchView)}},{key:"_createToggleView",value:function(){var e=new Zc;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}]),n}(_u);function Su(e){var t=e.emitter,n=e.activator,i=e.callback,r=e.contextElements;t.listenTo(document,"mousedown",(function(e,t){if(n()){var o,a="function"==typeof t.composedPath?t.composedPath():[],s=k(r);try{for(s.s();!(o=s.n()).done;){var l=o.value;if(l.contains(t.target)||a.includes(l))return}}catch(c){s.e(c)}finally{s.f()}i()}}))}function Ou(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Cu,n=new t(e),i=new vu(e),r=new bu(e,n,i);return n.bind("isEnabled").to(r),n instanceof Cu?n.bind("isOn").to(r,"isOpen"):n.arrowView.bind("isOn").to(r,"isOpen"),function(e){(function(e){e.on("render",(function(){Su({emitter:e,activator:function(){return e.isOpen},callback:function(){e.isOpen=!1},contextElements:[e.element]})}))})(e),function(e){e.on("execute",(function(t){t.source instanceof Eu||(e.isOpen=!1)}))}(e),function(e){e.keystrokes.set("arrowdown",(function(t,n){e.isOpen&&(e.panelView.focus(),n())})),e.keystrokes.set("arrowup",(function(t,n){e.isOpen&&(e.panelView.focusLast(),n())}))}(e)}(r),r}function Mu(e,t){var n=e.locale,i=n.t,r=e.toolbarView=new Nu(n);r.set("ariaLabel",i("Dropdown toolbar")),e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),t.map((function(e){return r.items.add(e)})),e.panelView.children.add(r),r.items.delegate("execute").to(e)}function Iu(e,t){var n=e.locale,i=e.listView=new Au(n);i.items.bindTo(t).using((function(e){var t=e.type,i=e.model;if("separator"===t)return new Pu(n);if("button"===t||"switchbutton"===t){var r,o,a=new Tu(n);return o="button"===t?new _u(n):new Eu(n),(r=o).bind.apply(r,u(Object.keys(i))).to(i),o.delegate("execute").to(a),a.children.add(o),a}})),e.panelView.children.add(i),i.items.delegate("execute").to(e)}n(35),n(37),n(39);var Nu=function(e){C(n,e);var t=A(n);function n(e,i){var r;w(this,n),r=t.call(this,e);var o,a=r.bindTemplate,s=r.t;return r.options=i||{},r.set("ariaLabel",s("Editor toolbar")),r.set("maxWidth","auto"),r.items=r.createCollection(),r.focusTracker=new xc,r.keystrokes=new vc,r.set("class"),r.set("isCompact",!1),r.itemsView=new Ru(e),r.children=r.createCollection(),r.children.add(r.itemsView),r.focusables=r.createCollection(),r._focusCycler=new cu({focusables:r.focusables,focusTracker:r.focusTracker,keystrokeHandler:r.keystrokes,actions:{focusPrevious:["arrowleft","arrowup"],focusNext:["arrowright","arrowdown"]}}),r.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar",a.to("class"),a.if("isCompact","ck-toolbar_compact")],role:"toolbar","aria-label":a.to("ariaLabel"),style:{maxWidth:a.to("maxWidth")}},children:r.children,on:{mousedown:(o=P(r),o.bindTemplate.to((function(e){e.target===o.element&&e.preventDefault()})))}}),r._behavior=r.options.shouldGroupWhenFull?new Lu(P(r)):new Du(P(r)),r}return x(n,[{key:"render",value:function(){var e=this;l(N(n.prototype),"render",this).call(this);var t,i=k(this.items);try{for(i.s();!(t=i.n()).done;){var r=t.value;this.focusTracker.add(r.element)}}catch(o){i.e(o)}finally{i.f()}this.items.on("add",(function(t,n){e.focusTracker.add(n.element)})),this.items.on("remove",(function(t,n){e.focusTracker.remove(n.element)})),this.keystrokes.listenTo(this.element),this._behavior.render(this)}},{key:"destroy",value:function(){return this._behavior.destroy(),l(N(n.prototype),"destroy",this).call(this)}},{key:"focus",value:function(){this._focusCycler.focusFirst()}},{key:"focusLast",value:function(){this._focusCycler.focusLast()}},{key:"fillFromConfig",value:function(e,t){this.items.addMany(e.map((function(e){return"|"==e?new du:t.has(e)?t.create(e):void console.warn(Object(jn.a)("toolbarview-item-unavailable: The requested toolbar item is unavailable."),{name:e})})).filter((function(e){return void 0!==e})))}}]),n}(Zc),Ru=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.children=i.createCollection(),i.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:i.children}),i}return n}(Zc),Du=function(){function e(t){w(this,e);var n=t.bindTemplate;t.set("isVertical",!1),t.itemsView.children.bindTo(t.items).using((function(e){return e})),t.focusables.bindTo(t.items).using((function(e){return e})),t.extendTemplate({attributes:{class:[n.if("isVertical","ck-toolbar_vertical")]}})}return x(e,[{key:"render",value:function(){}},{key:"destroy",value:function(){}}]),e}(),Lu=function(){function e(t){var n=this;w(this,e),this.view=t,this.viewChildren=t.children,this.viewFocusables=t.focusables,this.viewItemsView=t.itemsView,this.viewFocusTracker=t.focusTracker,this.viewLocale=t.locale,this.ungroupedItems=t.createCollection(),this.groupedItems=t.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,t.itemsView.children.bindTo(this.ungroupedItems).using((function(e){return e})),this.ungroupedItems.on("add",this._updateFocusCycleableItems.bind(this)),this.ungroupedItems.on("remove",this._updateFocusCycleableItems.bind(this)),t.children.on("add",this._updateFocusCycleableItems.bind(this)),t.children.on("remove",this._updateFocusCycleableItems.bind(this)),t.items.on("change",(function(e,t){var i,r=t.index,o=k(t.removed);try{for(o.s();!(i=o.n()).done;){var a=i.value;r>=n.ungroupedItems.length?n.groupedItems.remove(a):n.ungroupedItems.remove(a)}}catch(c){o.e(c)}finally{o.f()}for(var s=r;sn.ungroupedItems.length?n.groupedItems.add(l,s-n.ungroupedItems.length):n.ungroupedItems.add(l,s)}n._updateGrouping()})),t.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}return x(e,[{key:"render",value:function(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}},{key:"destroy",value:function(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}},{key:"_updateGrouping",value:function(){if(this.viewElement.ownerDocument.body.contains(this.viewElement))if(this.viewElement.offsetParent){for(var e,t=this.groupedItems.length;this._areItemsOverflowing;)this._groupLastItem(),e=!0;if(!e&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==t&&this.view.fire("groupedItemsUpdate")}else this.shouldUpdateGroupingOnNextResize=!0}},{key:"_enableGroupingOnResize",value:function(){var e,t=this;this.resizeObserver=new hu(this.viewElement,(function(n){e&&e===n.contentRect.width&&!t.shouldUpdateGroupingOnNextResize||(t.shouldUpdateGroupingOnNextResize=!1,t._updateGrouping(),e=n.contentRect.width)})),this._updateGrouping()}},{key:"_enableGroupingOnMaxWidthChange",value:function(e){var t=this;e.on("change:maxWidth",(function(){t._updateGrouping()}))}},{key:"_groupLastItem",value:function(){this.groupedItems.length||(this.viewChildren.add(new du),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}},{key:"_ungroupFirstItem",value:function(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}},{key:"_createGroupedItemsDropdown",value:function(){var e=this.viewLocale,t=e.t,n=Ou(e);return n.class="ck-toolbar__grouped-dropdown",n.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",Mu(n,[]),n.buttonView.set({label:t("Show more items"),tooltip:!0,icon:''}),n.toolbarView.items.bindTo(this.groupedItems).using((function(e){return e})),n}},{key:"_updateFocusCycleableItems",value:function(){var e=this;this.viewFocusables.clear(),this.ungroupedItems.map((function(t){e.viewFocusables.add(t)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}},{key:"_areItemsOverflowing",get:function(){if(!this.ungroupedItems.length)return!1;var e=this.viewElement,t=this.viewLocale.uiLanguageDirection,n=new Ia(e.lastChild),i=new Ia(e);if(!this.cachedPadding){var r=Oo.window.getComputedStyle(e),o="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(r[o])}return"ltr"===t?n.right>i.right-this.cachedPadding:n.left2&&void 0!==arguments[2]?arguments[2]:{};return w(this,n),r=t.call(this,e),r.stickyPanel=new lu(e),r.toolbar=new Nu(e,{shouldGroupWhenFull:o.shouldToolbarGroupWhenFull}),r.editable=new ou(e,i),r}return x(n,[{key:"render",value:function(){l(N(n.prototype),"render",this).call(this),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}]),n}(iu),ju=function(e){C(n,e);var t=A(n);function n(e,i){var r;w(this,n),r=t.call(this,i),Sn(e)&&(r.sourceElement=e),r.data.processor=new yc(r.data.viewDocument),r.model.document.createRoot();var o=!r.config.get("toolbar.shouldNotGroupWhenFull"),a=new zu(r.locale,r.editing.view,{shouldToolbarGroupWhenFull:o});return r.ui=new Mc(P(r),a),function(e){if(!ie(e.updateSourceElement))throw new jn.b("attachtoform-missing-elementapi-interface: Editor passed to attachToForm() must implement ElementApi.",e);var t=e.sourceElement;if(t&&"textarea"===t.tagName.toLowerCase()&&t.form){var n,i=t.form,r=function(){return e.updateSourceElement()};ie(i.submit)&&(n=i.submit,i.submit=function(){r(),n.apply(i)}),i.addEventListener("submit",r),e.on("destroy",(function(){i.removeEventListener("submit",r),n&&(i.submit=n)}))}}(P(r)),r}return x(n,[{key:"destroy",value:function(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),l(N(n.prototype),"destroy",this).call(this)}}],[{key:"create",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(i){var r=new t(e,n);i(r.initPlugins().then((function(){return r.ui.init(Sn(e)?e:null)})).then((function(){if(!Sn(e)&&n.initialData)throw new jn.b("editor-create-initial-data: The config.initialData option cannot be used together with initial data passed in Editor.create().",null);var t=n.initialData||function(e){return Sn(e)?(t=e,t instanceof HTMLTextAreaElement?t.value:t.innerHTML):e;var t}(e);return r.data.init(t)})).then((function(){return r.fire("ready")})).then((function(){return r})))}))}}]),n}(mc);Kn(ju,gc),Kn(ju,kc);var Vu=function(){function e(t){w(this,e),this.editor=t,this.set("isEnabled",!0),this._disableStack=new Set}return x(e,[{key:"forceDisabled",value:function(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",Bu,{priority:"highest"}),this.isEnabled=!1)}},{key:"clearForceDisabled",value:function(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",Bu),this.isEnabled=!0)}},{key:"destroy",value:function(){this.stopListening()}}],[{key:"isContextPlugin",get:function(){return!1}}]),e}();function Bu(e){e.return=!1,e.stop()}Kn(Vu,vr);var Fu=function(){function e(t){var n=this;w(this,e),this.editor=t,this.set("value",void 0),this.set("isEnabled",!1),this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",(function(){n.refresh()})),this.on("execute",(function(e){n.isEnabled||e.stop()}),{priority:"high"}),this.listenTo(t,"change:isReadOnly",(function(e,t,i){i?n.forceDisabled("readOnlyMode"):n.clearForceDisabled("readOnlyMode")}))}return x(e,[{key:"refresh",value:function(){this.isEnabled=!0}},{key:"forceDisabled",value:function(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",Uu,{priority:"highest"}),this.isEnabled=!1)}},{key:"clearForceDisabled",value:function(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",Uu),this.refresh())}},{key:"execute",value:function(){}},{key:"destroy",value:function(){this.stopListening()}}]),e}();function Uu(e){e.return=!1,e.stop()}function Hu(e){var t=e.next();return t.done?null:t.value}Kn(Fu,vr);var $u=["left","right","center","justify"];function Wu(e){return $u.includes(e)}function qu(e,t){return"rtl"==t.contentLanguageDirection?"right"===e:"left"===e}var Yu="alignment",Gu=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"refresh",value:function(){var e=this.editor.locale,t=Hu(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=!!t&&this._canBeAligned(t),this.isEnabled&&t.hasAttribute("alignment")?this.value=t.getAttribute("alignment"):this.value="rtl"===e.contentLanguageDirection?"right":"left"}},{key:"execute",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.editor,i=n.locale,r=n.model,o=r.document,a=t.value;r.change((function(t){var n=Array.from(o.selection.getSelectedBlocks()).filter((function(t){return e._canBeAligned(t)})),r=n[0].getAttribute("alignment");qu(a,i)||r===a||!a?function(e,t){var n,i=k(e);try{for(i.s();!(n=i.n()).done;){var r=n.value;t.removeAttribute(Yu,r)}}catch(o){i.e(o)}finally{i.f()}}(n,t):function(e,t,n){var i,r=k(e);try{for(r.s();!(i=r.n()).done;){var o=i.value;t.setAttribute(Yu,n,o)}}catch(a){r.e(a)}finally{r.f()}}(n,t,a)}))}},{key:"_canBeAligned",value:function(e){return this.editor.model.schema.checkAttribute(e,Yu)}}]),n}(Fu),Ku=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),e.config.define("alignment",{options:[].concat($u)}),i}return x(n,null,[{key:"pluginName",get:function(){return"AlignmentEditing"}}]),x(n,[{key:"init",value:function(){var e=this.editor,t=e.locale,n=e.model.schema,i=e.config.get("alignment.options").filter(Wu);n.extend("$block",{allowAttributes:"alignment"}),e.model.schema.setAttributeProperties("alignment",{isFormatting:!0});var r=function(e){var t,n={model:{key:"alignment",values:e.slice()},view:{}},i=k(e);try{for(i.s();!(t=i.n()).done;){var r=t.value;n.view[r]={key:"style",value:{"text-align":r}}}}catch(o){i.e(o)}finally{i.f()}return n}(i.filter((function(e){return!qu(e,t)})));e.conversion.attributeToAttribute(r),e.commands.add("alignment",new Gu(e))}}]),n}(Vu),Ju='',Qu='',Zu=new Map([["left",Ju],["right",Qu],["center",''],["justify",'']]),Xu=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this,t=this.editor,n=t.ui.componentFactory,i=t.t,r=t.config.get("alignment.options");r.filter(Wu).forEach((function(t){return e._addButton(t)})),n.add("alignment",(function(e){var t=Ou(e),o=r.map((function(e){return n.create("alignment:"+e)}));Mu(t,o),t.buttonView.set({label:i("Text alignment"),tooltip:!0}),t.toolbarView.isVertical=!0,t.toolbarView.ariaLabel=i("Text alignment toolbar"),t.extendTemplate({attributes:{class:"ck-alignment-dropdown"}});var a="rtl"===e.contentLanguageDirection?Qu:Ju;return t.buttonView.bind("icon").toMany(o,"isOn",(function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,i=n.document.selection,r=n.createRange(n.createPositionAt(i.focus.parent,0),i.focus),o=ed(r,n),a=o.text,s=o.range,l=this.testCallback(a);if(!l&&this.hasMatch&&this.fire("unmatched"),this.hasMatch=!!l,l){var c=Object.assign(t,{text:a,range:s});"object"==R(l)&&Object.assign(c,l),this.fire("matched:"+e,c)}}}]),e}();Kn(td,vr);var nd=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?![-_])(?:[-\\w\\u00a1-\\uffff]{0,63}[^-_]\\.)+(?:[a-z\\u00a1-\\uffff]{2,}))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-\\w\\u00a1-\\uffff]{0,63}[^-_]\\.))+(?:[a-z\\u00a1-\\uffff]{2,})))$","i"),id=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i;function rd(e){var t=nd.exec(e);return t?t[2]:null}var od=function(e){C(n,e);var t=A(n);function n(e,i){var r;return w(this,n),r=t.call(this,e),r.attributeKey=i,r}return x(n,[{key:"refresh",value:function(){var e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}},{key:"execute",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.editor.model,i=n.document.selection,r=void 0===t.forceValue?!this.value:t.forceValue;n.change((function(t){if(i.isCollapsed)r?t.setSelectionAttribute(e.attributeKey,!0):t.removeSelectionAttribute(e.attributeKey);else{var o,a=n.schema.getValidRanges(i.getRanges(),e.attributeKey),s=k(a);try{for(s.s();!(o=s.n()).done;){var l=o.value;r?t.setAttribute(e.attributeKey,r,l):t.removeAttribute(e.attributeKey,l)}}catch(c){s.e(c)}finally{s.f()}}}))}},{key:"_getValueFromFirstAllowedNode",value:function(){var e=this.editor.model,t=e.schema,n=e.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);var i,r=k(n.getRanges());try{for(r.s();!(i=r.n()).done;){var o,a=i.value,s=k(a.getItems());try{for(s.s();!(o=s.n()).done;){var l=o.value;if(t.checkAttribute(l,this.attributeKey))return l.hasAttribute(this.attributeKey)}}catch(c){s.e(c)}finally{s.f()}}}catch(c){r.e(c)}finally{r.f()}return!1}}]),n}(Fu),ad="bold",sd=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor;e.model.schema.extend("$text",{allowAttributes:ad}),e.model.schema.setAttributeProperties(ad,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:ad,view:"strong",upcastAlso:["b",function(e){var t=e.getStyle("font-weight");return t?"bold"==t||Number(t)>=600?{name:!0,styles:["font-weight"]}:void 0:null}]}),e.commands.add(ad,new od(e,ad)),e.keystrokes.set("CTRL+B",ad)}}],[{key:"pluginName",get:function(){return"BoldEditing"}}]),n}(Vu),ld="bold",cd=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this,t=this.editor,n=t.t;t.ui.componentFactory.add(ld,(function(i){var r=t.commands.get(ld),o=new _u(i);return o.set({label:n("Bold"),icon:'',keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(r,"value","isEnabled"),e.listenTo(o,"execute",(function(){t.execute(ld),t.editing.view.focus()})),o}))}}]),n}(Vu),ud=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor,t=e.ui.componentFactory,n=e.t;t.add("ckfinder",(function(t){var i=e.commands.get("ckfinder"),r=new _u(t);return r.set({label:n("Insert image or file"),icon:'',tooltip:!0}),r.bind("isEnabled").to(i),r.on("execute",(function(){e.execute("ckfinder"),e.editing.view.focus()})),r}))}}],[{key:"pluginName",get:function(){return"CKFinderUI"}}]),n}(Vu),dd=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"observe",value:function(e){var t=this;this.listenTo(e,"load",(function(e,n){"IMG"==n.target.tagName&&t._fireEvents(n)}),{useCapture:!0})}},{key:"_fireEvents",value:function(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}]),n}(Uo),hd=function(){function e(){w(this,e),this._stack=[]}return x(e,[{key:"add",value:function(e,t){var n=this._stack,i=n[0];this._insertDescriptor(e);var r=n[0];i===r||fd(i,r)||this.fire("change:top",{oldDescriptor:i,newDescriptor:r,writer:t})}},{key:"remove",value:function(e,t){var n=this._stack,i=n[0];this._removeDescriptor(e);var r=n[0];i===r||fd(i,r)||this.fire("change:top",{oldDescriptor:i,newDescriptor:r,writer:t})}},{key:"_insertDescriptor",value:function(e){var t=this._stack,n=t.findIndex((function(t){return t.id===e.id}));if(!fd(e,t[n])){n>-1&&t.splice(n,1);for(var i=0;t[i]&&vd(t[i],e);)i++;t.splice(i,0,e)}}},{key:"_removeDescriptor",value:function(e){var t=this._stack,n=t.findIndex((function(t){return t.id===e}));n>-1&&t.splice(n,1)}}]),e}();function fd(e,t){return e&&t&&e.priority==t.priority&&pd(e.classes)==pd(t.classes)}function vd(e,t){return e.priority>t.priority||!(e.prioritypd(t.classes)}function pd(e){return Array.isArray(e)?e.sort().join(","):e}Kn(hd,Fn),n(43);var md=au("px"),gd=Oo.document.body,kd=function(e){C(n,e);var t=A(n);function n(e){var i;w(this,n),i=t.call(this,e);var r=i.bindTemplate;return i.set("top",0),i.set("left",0),i.set("position","arrow_nw"),i.set("isVisible",!1),i.set("withArrow",!0),i.set("class"),i.content=i.createCollection(),i.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",r.to("position",(function(e){return"ck-balloon-panel_"+e})),r.if("isVisible","ck-balloon-panel_visible"),r.if("withArrow","ck-balloon-panel_with-arrow"),r.to("class")],style:{top:r.to("top",md),left:r.to("left",md)}},children:i.content}),i}return x(n,[{key:"show",value:function(){this.isVisible=!0}},{key:"hide",value:function(){this.isVisible=!1}},{key:"attachTo",value:function(e){this.show();var t=n.defaultPositions,i=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast],limiter:gd,fitInViewport:!0},e),r=n._getOptimalPosition(i),o=parseInt(r.left),a=parseInt(r.top),s=r.name;Object.assign(this,{top:a,left:o,position:s})}},{key:"pin",value:function(e){var t=this;this.unpin(),this._pinWhenIsVisibleCallback=function(){t.isVisible?t._startPinning(e):t._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}},{key:"unpin",value:function(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}},{key:"_startPinning",value:function(e){var t=this;this.attachTo(e);var n=bd(e.target),i=e.limiter?bd(e.limiter):gd;this.listenTo(Oo.document,"scroll",(function(r,o){var a=o.target,s=n&&a.contains(n),l=i&&a.contains(i);!s&&!l&&n&&i||t.attachTo(e)}),{useCapture:!0}),this.listenTo(Oo.window,"resize",(function(){t.attachTo(e)}))}},{key:"_stopPinning",value:function(){this.stopListening(Oo.document,"scroll"),this.stopListening(Oo.window,"resize")}}]),n}(Zc);function bd(e){return Sn(e)?e:Sa(e)?e.commonAncestorContainer:"function"==typeof e?bd(e()):null}function yd(e,t){return e.top-t.height-kd.arrowVerticalOffset}function wd(e){return e.bottom+kd.arrowVerticalOffset}kd.arrowHorizontalOffset=25,kd.arrowVerticalOffset=10,kd._getOptimalPosition=pu,kd.defaultPositions={northWestArrowSouthWest:function(e,t){return{top:yd(e,t),left:e.left-kd.arrowHorizontalOffset,name:"arrow_sw"}},northWestArrowSouthMiddleWest:function(e,t){return{top:yd(e,t),left:e.left-.25*t.width-kd.arrowHorizontalOffset,name:"arrow_smw"}},northWestArrowSouth:function(e,t){return{top:yd(e,t),left:e.left-t.width/2,name:"arrow_s"}},northWestArrowSouthMiddleEast:function(e,t){return{top:yd(e,t),left:e.left-.75*t.width+kd.arrowHorizontalOffset,name:"arrow_sme"}},northWestArrowSouthEast:function(e,t){return{top:yd(e,t),left:e.left-t.width+kd.arrowHorizontalOffset,name:"arrow_se"}},northArrowSouthWest:function(e,t){return{top:yd(e,t),left:e.left+e.width/2-kd.arrowHorizontalOffset,name:"arrow_sw"}},northArrowSouthMiddleWest:function(e,t){return{top:yd(e,t),left:e.left+e.width/2-.25*t.width-kd.arrowHorizontalOffset,name:"arrow_smw"}},northArrowSouth:function(e,t){return{top:yd(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s"}},northArrowSouthMiddleEast:function(e,t){return{top:yd(e,t),left:e.left+e.width/2-.75*t.width+kd.arrowHorizontalOffset,name:"arrow_sme"}},northArrowSouthEast:function(e,t){return{top:yd(e,t),left:e.left+e.width/2-t.width+kd.arrowHorizontalOffset,name:"arrow_se"}},northEastArrowSouthWest:function(e,t){return{top:yd(e,t),left:e.right-kd.arrowHorizontalOffset,name:"arrow_sw"}},northEastArrowSouthMiddleWest:function(e,t){return{top:yd(e,t),left:e.right-.25*t.width-kd.arrowHorizontalOffset,name:"arrow_smw"}},northEastArrowSouth:function(e,t){return{top:yd(e,t),left:e.right-t.width/2,name:"arrow_s"}},northEastArrowSouthMiddleEast:function(e,t){return{top:yd(e,t),left:e.right-.75*t.width+kd.arrowHorizontalOffset,name:"arrow_sme"}},northEastArrowSouthEast:function(e,t){return{top:yd(e,t),left:e.right-t.width+kd.arrowHorizontalOffset,name:"arrow_se"}},southWestArrowNorthWest:function(e,t){return{top:wd(e),left:e.left-kd.arrowHorizontalOffset,name:"arrow_nw"}},southWestArrowNorthMiddleWest:function(e,t){return{top:wd(e),left:e.left-.25*t.width-kd.arrowHorizontalOffset,name:"arrow_nmw"}},southWestArrowNorth:function(e,t){return{top:wd(e),left:e.left-t.width/2,name:"arrow_n"}},southWestArrowNorthMiddleEast:function(e,t){return{top:wd(e),left:e.left-.75*t.width+kd.arrowHorizontalOffset,name:"arrow_nme"}},southWestArrowNorthEast:function(e,t){return{top:wd(e),left:e.left-t.width+kd.arrowHorizontalOffset,name:"arrow_ne"}},southArrowNorthWest:function(e,t){return{top:wd(e),left:e.left+e.width/2-kd.arrowHorizontalOffset,name:"arrow_nw"}},southArrowNorthMiddleWest:function(e,t){return{top:wd(e),left:e.left+e.width/2-.25*t.width-kd.arrowHorizontalOffset,name:"arrow_nmw"}},southArrowNorth:function(e,t){return{top:wd(e),left:e.left+e.width/2-t.width/2,name:"arrow_n"}},southArrowNorthMiddleEast:function(e,t){return{top:wd(e),left:e.left+e.width/2-.75*t.width+kd.arrowHorizontalOffset,name:"arrow_nme"}},southArrowNorthEast:function(e,t){return{top:wd(e),left:e.left+e.width/2-t.width+kd.arrowHorizontalOffset,name:"arrow_ne"}},southEastArrowNorthWest:function(e,t){return{top:wd(e),left:e.right-kd.arrowHorizontalOffset,name:"arrow_nw"}},southEastArrowNorthMiddleWest:function(e,t){return{top:wd(e),left:e.right-.25*t.width-kd.arrowHorizontalOffset,name:"arrow_nmw"}},southEastArrowNorth:function(e,t){return{top:wd(e),left:e.right-t.width/2,name:"arrow_n"}},southEastArrowNorthMiddleEast:function(e,t){return{top:wd(e),left:e.right-.75*t.width+kd.arrowHorizontalOffset,name:"arrow_nme"}},southEastArrowNorthEast:function(e,t){return{top:wd(e),left:e.right-t.width+kd.arrowHorizontalOffset,name:"arrow_ne"}}};var _d='',xd="widget-type-around";function Cd(e,t,n){return e&&Pd(e)&&!n.isInline(t)}function Ad(e){return e.getAttribute(xd)}var Td="ck-widget_selected";function Pd(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function Ed(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e.is("containerElement"))throw new jn.b("widget-to-widget-wrong-element-type: The element passed to toWidget() must be a container element instance.",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass("ck-widget",e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=Rd,n.label&&function(e,t,n){n.setCustomProperty("widgetLabel",t,e)}(e,n.label,t),n.hasSelectionHandle&&function(e,t){var n=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(e){var t=this.toDomElement(e),n=new yu;return n.set("content",_d),n.render(),t.appendChild(n.element),t}));t.insert(t.createPositionAt(e,0),n),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),Sd(e,t,(function(e,t,n){return n.addClass(i(t.classes),e)}),(function(e,t,n){return n.removeClass(i(t.classes),e)})),e;function i(e){return Array.isArray(e)?e:[e]}}function Sd(e,t,n,i){var r=new hd;r.on("change:top",(function(t,r){r.oldDescriptor&&i(e,r.oldDescriptor,r.writer),r.newDescriptor&&n(e,r.newDescriptor,r.writer)})),t.setCustomProperty("addHighlight",(function(e,t,n){return r.add(t,n)}),e),t.setCustomProperty("removeHighlight",(function(e,t,n){return r.remove(t,n)}),e)}function Od(e){var t=e.getCustomProperty("widgetLabel");return t?"function"==typeof t?t():t:""}function Md(e,t){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",(function(n,i,r){t.setAttribute("contenteditable",r?"false":"true",e)})),e.on("change:isFocused",(function(n,i,r){r?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)})),e}function Id(e,t){var n=e.getSelectedElement();if(n){var i=Ad(e);if(i)return t.createPositionAt(n,i);if(t.schema.isBlock(n))return t.createPositionAfter(n)}var r=e.getSelectedBlocks().next().value;if(r){if(r.isEmpty)return t.createPositionAt(r,0);var o=t.createPositionAfter(r);return e.focus.isTouching(o)?o:t.createPositionBefore(r)}return e.focus}function Nd(e,t){var n=new Ia(Oo.window),i=n.getIntersection(e),r=t.height+kd.arrowVerticalOffset;if(e.top-r>n.top||e.bottom+r2&&void 0!==arguments[2]?arguments[2]:{},i=e.createElement("image",n),r=Id(t.document.selection,t);t.insertContent(i,r),i.parent&&e.setSelection(i,"on")}function Vd(e){var t=e.schema,n=e.document.selection;return function(e,t,n){var i=function(e,t){var n=Id(e,t).parent;return n.isEmpty&&!n.is("element","$root")?n.parent:n}(e,n);return t.checkChild(i,"image")}(n,t,e)&&!function(e,t){var n=e.getSelectedElement();return n&&t.isObject(n)}(n,t)&&function(e){return u(e.focus.getAncestors()).every((function(e){return!e.is("element","image")}))}(n)}function Bd(e){var t,n=[],i=k(e.getChildren());try{for(i.s();!(t=i.n()).done;){var r=t.value;n.push(r),r.is("element")&&n.push.apply(n,u(r.getChildren()))}}catch(o){i.e(o)}finally{i.f()}return n.find((function(e){return e.is("element","img")}))}function Fd(e){return function(n){n.on("attribute:".concat(e,":image"),t)};function t(e,t,n){if(n.consumable.consume(t.item,e.name)){var i=n.writer,r=Bd(n.mapper.toViewElement(t.item));i.setAttribute(t.attributeKey,t.attributeNewValue||"",r)}}}var Ud=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"refresh",value:function(){this.isEnabled=Vd(this.editor.model)}},{key:"execute",value:function(e){var t=this.editor.model;t.change((function(n){var i,r=Array.isArray(e.source)?e.source:[e.source],o=k(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;jd(n,t,{src:a})}}catch(s){o.e(s)}finally{o.f()}}))}}]),n}(Fu),Hd=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor,t=e.model.schema,n=e.t,i=e.conversion;e.editing.view.addObserver(dd),t.register("image",{isObject:!0,isBlock:!0,allowWhere:"$block",allowAttributes:["alt","src","srcset"]}),i.for("dataDowncast").elementToElement({model:"image",view:function(e,t){var n=t.writer;return $d(n)}}),i.for("editingDowncast").elementToElement({model:"image",view:function(e,t){var i=t.writer;return function(e,t,n){return t.setCustomProperty("image",!0,e),Ed(e,t,{label:function(){var t=Bd(e).getAttribute("alt");return t?"".concat(t," ").concat(n):n}})}($d(i),i,n("image widget"))}}),i.for("downcast").add(Fd("src")).add(Fd("alt")).add(function(){return function(t){t.on("attribute:srcset:image",e)};function e(e,t,n){if(n.consumable.consume(t.item,e.name)){var i=n.writer,r=Bd(n.mapper.toViewElement(t.item));if(null===t.attributeNewValue){var o=t.attributeOldValue;o.data&&(i.removeAttribute("srcset",r),i.removeAttribute("sizes",r),o.width&&i.removeAttribute("width",r))}else{var a=t.attributeNewValue;a.data&&(i.setAttribute("srcset",a.data,r),i.setAttribute("sizes","100vw",r),a.width&&i.setAttribute("width",a.width,r))}}}}()),i.for("upcast").elementToElement({view:{name:"img",attributes:{src:!0}},model:function(e,t){var n=t.writer;return n.createElement("image",{src:e.getAttribute("src")})}}).attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:function(e){var t={data:e.getAttribute("srcset")};return e.hasAttribute("width")&&(t.width=e.getAttribute("width")),t}}}).add(function(){return function(t){t.on("element:figure",e)};function e(e,t,n){if(n.consumable.test(t.viewItem,{name:!0,classes:"image"})){var i=Bd(t.viewItem);if(i&&i.hasAttribute("src")&&n.consumable.test(i,{name:!0})){var r=Hu(n.convertItem(i,t.modelCursor).modelRange.getItems());r&&(n.convertChildren(t.viewItem,r),n.updateConversionResult(r,t))}}}}()),e.commands.add("imageInsert",new Ud(e))}}],[{key:"pluginName",get:function(){return"ImageEditing"}}]),n}(Vu);function $d(e){var t=e.createEmptyElement("img"),n=e.createContainerElement("figure",{class:"image"});return e.insert(e.createPositionAt(n,0),t),n}var Wd=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.domEventType="mousedown",i}return x(n,[{key:"onDomEvent",value:function(e){this.fire(e.type,e)}}]),n}(ha),qd=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.attributes=new Set,i._overrideUid=null,i}return x(n,null,[{key:"pluginName",get:function(){return"TwoStepCaretMovement"}}]),x(n,[{key:"init",value:function(){var e=this,t=this.editor,n=t.model,i=t.editing.view,r=t.locale,o=n.document.selection;this.listenTo(i.document,"keydown",(function(t,n){if(o.isCollapsed&&!(n.shiftKey||n.altKey||n.ctrlKey)){var i=n.keyCode==Br.arrowright,a=n.keyCode==Br.arrowleft;if(i||a){var s=r.contentLanguageDirection,l=!1;l="ltr"===s&&i||"rtl"===s&&a?e._handleForwardMovement(n):e._handleBackwardMovement(n),!0===l&&t.stop()}}}),{priority:zn.get("high")+1}),this._isNextGravityRestorationSkipped=!1,this.listenTo(o,"change:range",(function(t,n){e._isNextGravityRestorationSkipped?e._isNextGravityRestorationSkipped=!1:e._isGravityOverridden&&(!n.directChange&&Jd(o.getFirstPosition(),e.attributes)||e._restoreGravity())}))}},{key:"registerAttribute",value:function(e){this.attributes.add(e)}},{key:"_handleForwardMovement",value:function(e){var t=this.attributes,n=this.editor.model.document.selection,i=n.getFirstPosition();return!this._isGravityOverridden&&(!i.isAtStart||!Yd(n,t))&&(Jd(i,t)?(Kd(e),this._overrideGravity(),!0):void 0)}},{key:"_handleBackwardMovement",value:function(e){var t=this.attributes,n=this.editor.model,i=n.document.selection,r=i.getFirstPosition();return this._isGravityOverridden?(Kd(e),this._restoreGravity(),Gd(n,t,r),!0):r.isAtStart?!!Yd(i,t)&&(Kd(e),Gd(n,t,r),!0):function(e,t){return Jd(e.getShiftedBy(-1),t)}(r,t)?r.isAtEnd&&!Yd(i,t)&&Jd(r,t)?(Kd(e),Gd(n,t,r),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):void 0}},{key:"_overrideGravity",value:function(){this._overrideUid=this.editor.model.change((function(e){return e.overrideSelectionGravity()}))}},{key:"_restoreGravity",value:function(){var e=this;this.editor.model.change((function(t){t.restoreSelectionGravity(e._overrideUid),e._overrideUid=null}))}},{key:"_isGravityOverridden",get:function(){return!!this._overrideUid}}]),n}(Vu);function Yd(e,t){var n,i=k(t);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(e.hasAttribute(r))return!0}}catch(o){i.e(o)}finally{i.f()}return!1}function Gd(e,t,n){var i=n.nodeBefore;e.change((function(e){i?e.setSelectionAttribute(i.getAttributes()):e.removeSelectionAttribute(t)}))}function Kd(e){e.preventDefault()}function Jd(e,t){var n,i=e.nodeBefore,r=e.nodeAfter,o=k(t);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=i?i.getAttribute(a):void 0;if((r?r.getAttribute(a):void 0)!==s)return!0}}catch(l){o.e(l)}finally{o.f()}return!1}function Qd(e,t,n,i){return i.createRange(Zd(e,t,n,!0,i),Zd(e,t,n,!1,i))}function Zd(e,t,n,i,r){for(var o=e.textNode||(i?e.nodeBefore:e.nodeAfter),a=null;o&&o.getAttribute(t)==n;)a=o,o=i?o.previousSibling:o.nextSibling;return a?r.createPositionAt(a,i?"before":"after"):e}for(var Xd=function(){function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;w(this,e),this.model=t,this.size=0,this.limit=i,this.isLocked=!1,this._changeCallback=function(e,t){"transparent"!=t.type&&t!==n._batch&&n._reset(!0)},this._selectionChangeCallback=function(){n._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}return x(e,[{key:"input",value:function(e){this.size+=e,this.size>=this.limit&&this._reset(!0)}},{key:"lock",value:function(){this.isLocked=!0}},{key:"unlock",value:function(){this.isLocked=!1}},{key:"destroy",value:function(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}},{key:"_reset",value:function(e){this.isLocked&&!e||(this._batch=null,this.size=0)}},{key:"batch",get:function(){return this._batch||(this._batch=this.model.createBatch()),this._batch}}]),e}(),eh=function(e){C(n,e);var t=A(n);function n(e,i){var r;return w(this,n),r=t.call(this,e),r._buffer=new Xd(e.model,i),r._batches=new WeakSet,r}return x(n,[{key:"destroy",value:function(){l(N(n.prototype),"destroy",this).call(this),this._buffer.destroy()}},{key:"execute",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.editor.model,i=n.document,r=t.text||"",o=r.length,a=t.range?n.createSelection(t.range):i.selection,s=t.resultRange;n.enqueueChange(this._buffer.batch,(function(t){e._buffer.lock(),e._batches.add(e._buffer.batch),n.deleteContent(a),r&&n.insertContent(t.createText(r,i.selection.getAttributes()),a),s?t.setSelection(s):a.is("documentSelection")||t.setSelection(a),e._buffer.unlock(),e._buffer.input(o)}))}},{key:"buffer",get:function(){return this._buffer}}]),n}(Fu),th=[Fr("arrowUp"),Fr("arrowRight"),Fr("arrowDown"),Fr("arrowLeft"),9,16,17,18,19,20,27,33,34,35,36,45,91,93,144,145,173,174,175,176,177,178,179,255],nh=112;nh<=135;nh++)th.push(nh);function ih(e){return!!e.ctrlKey||th.includes(e.keyCode)}function rh(e){if(e.newChildren.length-e.oldChildren.length==1){var t=function(e,t){var n,i=[],r=0;return e.forEach((function(e){"equal"==e?(o(),r++):"insert"==e?(a("insert")?n.values.push(t[r]):(o(),n={type:"insert",index:r,values:[t[r]]}),r++):a("delete")?n.howMany++:(o(),n={type:"delete",index:r,howMany:1})})),o(),i;function o(){n&&(i.push(n),n=null)}function a(e){return n&&n.type==e}}(_o(e.oldChildren,e.newChildren,oh),e.newChildren);if(!(t.length>1)){var n=t[0];return n.values[0]&&n.values[0].is("$text")?n:void 0}}}function oh(e,t){return e&&e.is("$text")&&t&&t.is("$text")?e.data===t.data:e===t}var ah=function(){function e(t){w(this,e),this.editor=t,this.editing=this.editor.editing}return x(e,[{key:"handle",value:function(e,t){if(function(e){if(0==e.length)return!1;var t,n=k(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;if("children"===i.type&&!rh(i))return!0}}catch(r){n.e(r)}finally{n.f()}return!1}(e))this._handleContainerChildrenMutations(e,t);else{var n,i=k(e);try{for(i.s();!(n=i.n()).done;){var r=n.value;this._handleTextMutation(r,t),this._handleTextNodeInsertion(r)}}catch(o){i.e(o)}finally{i.f()}}}},{key:"_handleContainerChildrenMutations",value:function(e,t){var n=function(e){var t=e.map((function(e){return e.node})).reduce((function(e,t){return e.getCommonAncestor(t,{includeSelf:!0})}));if(t)return t.getAncestors({includeSelf:!0,parentFirst:!0}).find((function(e){return e.is("containerElement")||e.is("rootElement")}))}(e);if(n){var i=this.editor.editing.view.domConverter.mapViewToDom(n),r=new Ro(this.editor.editing.view.document),o=this.editor.data.toModel(r.domToView(i)).getChild(0),a=this.editor.editing.mapper.toModelElement(n);if(a){var s=Array.from(o.getChildren()),l=Array.from(a.getChildren()),c=s[s.length-1],u=l[l.length-1],d=c&&c.is("element","softBreak"),h=u&&!u.is("element","softBreak");d&&h&&s.pop();var f=this.editor.model.schema;if(sh(s,f)&&sh(l,f)){var v=s.map((function(e){return e.is("$text")?e.data:"@"})).join("").replace(/\u00A0/g," "),p=l.map((function(e){return e.is("$text")?e.data:"@"})).join("").replace(/\u00A0/g," ");if(p!==v){var m=_o(p,v),g=lh(m),k=g.firstChangeAt,b=g.insertions,y=g.deletions,w=null;t&&(w=this.editing.mapper.toModelRange(t.getFirstRange()));var _=v.substr(k,b),x=this.editor.model.createRange(this.editor.model.createPositionAt(a,k),this.editor.model.createPositionAt(a,k+y));this.editor.execute("input",{text:_,range:x,resultRange:w})}}}}}},{key:"_handleTextMutation",value:function(e,t){if("text"==e.type){var n=e.newText.replace(/\u00A0/g," "),i=e.oldText.replace(/\u00A0/g," ");if(i!==n){var r=_o(i,n),o=lh(r),a=o.firstChangeAt,s=o.insertions,l=o.deletions,c=null;t&&(c=this.editing.mapper.toModelRange(t.getFirstRange()));var u=this.editing.view.createPositionAt(e.node,a),d=this.editing.mapper.toModelPosition(u),h=this.editor.model.createRange(d,d.getShiftedBy(l)),f=n.substr(a,s);this.editor.execute("input",{text:f,range:h,resultRange:c})}}}},{key:"_handleTextNodeInsertion",value:function(e){if("children"==e.type){var t=rh(e),n=this.editing.view.createPositionAt(e.node,t.index),i=this.editing.mapper.toModelPosition(n),r=t.values[0].data;this.editor.execute("input",{text:r.replace(/\u00A0/g," "),range:this.editor.model.createRange(i)})}}}]),e}();function sh(e,t){return e.every((function(e){return t.isInline(e)}))}function lh(e){for(var t=null,n=null,i=0;i(\s+)<\/span>/g,(function(e,t){return 1==t.length?" ":t}))}(o.getData("text/html")):o.getData("text/plain")&&((r=(r=o.getData("text/plain")).replace(//g,">").replace(/\n/g,"

").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  ")).indexOf("

")>-1&&(r="

".concat(r,"

")),a=r),a=e._htmlDataProcessor.toView(a);var s=new Rn(e,"inputTransformation");e.fire(s,{content:a,dataTransfer:o}),s.stop.called&&t.stop(),i.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",(function(t,i){if(!i.content.isEmpty){var r=e.editor.data,o=e.editor.model,a=r.toModel(i.content,"$clipboardHolder");if(0==a.childCount)return;if(function(e){return!(e.childCount>1)&&0==u(e.getChild(0).getAttributeKeys()).length}(a)){var s=a.getChild(0);o.change((function(e){e.setAttributes(n.selection.getAttributes(),s)}))}o.insertContent(a),t.stop()}}),{priority:"low"}),this.listenTo(r,"copy",o,{priority:"low"}),this.listenTo(r,"cut",(function(e,n){t.isReadOnly?n.preventDefault():o(e,n)}),{priority:"low"}),this.listenTo(r,"clipboardOutput",(function(i,r){r.content.isEmpty||(r.dataTransfer.setData("text/html",e._htmlDataProcessor.toData(r.content)),r.dataTransfer.setData("text/plain",function e(t){var n="";if(t.is("$text")||t.is("$textProxy"))n=t.data;else if(t.is("element","img")&&t.hasAttribute("alt"))n=t.getAttribute("alt");else{var i,r=null,o=k(t.getChildren());try{for(o.s();!(i=o.n()).done;){var a=i.value,s=e(a);r&&(r.is("containerElement")||a.is("containerElement"))&&(hh.includes(r.name)||hh.includes(a.name)?n+="\n":n+="\n\n"),n+=s,r=a}}catch(l){o.e(l)}finally{o.f()}}return n}(r.content))),"cut"==r.method&&t.model.deleteContent(n.selection)}),{priority:"low"})}}],[{key:"pluginName",get:function(){return"Clipboard"}}]),n}(Vu),vh=function(){function e(){w(this,e),this._definitions=new Set}return x(e,[{key:"add",value:function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._definitions.add(e)})):this._definitions.add(e)}},{key:"getDispatcher",value:function(){var e=this;return function(t){t.on("attribute:linkHref",(function(t,n,i){if(i.consumable.test(n.item,"attribute:linkHref")){var r,o=i.writer,a=o.document.selection,s=k(e._definitions);try{for(s.s();!(r=s.n()).done;){var l=r.value,c=o.createAttributeElement("a",l.attributes,{priority:5});o.setCustomProperty("link",!0,c),l.callback(n.attributeNewValue)?n.item.is("selection")?o.wrap(a.getFirstRange(),c):o.wrap(i.mapper.toViewRange(n.range),c):o.unwrap(i.mapper.toViewRange(n.range),c)}}catch(u){s.e(u)}finally{s.f()}}}),{priority:"high"})}}},{key:"getDispatcherForLinkedImage",value:function(){var e=this;return function(t){t.on("attribute:linkHref:image",(function(t,n,i){var r,o=i.mapper.toViewElement(n.item),a=Array.from(o.getChildren()).find((function(e){return"a"===e.name})),s=k(e._definitions);try{for(s.s();!(r=s.n()).done;){var l=r.value,c=li(l.attributes);if(l.callback(n.attributeNewValue)){var u,d=k(c);try{for(d.s();!(u=d.n()).done;){var h=v(u.value,2),f=h[0],p=h[1];"class"===f?i.writer.addClass(p,a):i.writer.setAttribute(f,p,a)}}catch(_){d.e(_)}finally{d.f()}}else{var m,g=k(c);try{for(g.s();!(m=g.n()).done;){var b=v(m.value,2),y=b[0],w=b[1];"class"===y?i.writer.removeClass(w,a):i.writer.removeAttribute(y,a)}}catch(_){g.e(_)}finally{g.f()}}}}catch(_){s.e(_)}finally{s.f()}}))}}},{key:"length",get:function(){return this._definitions.size}}]),e}(),ph=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:Si(e,t,n)},mh=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),gh=function(e){return mh.test(e)},kh=function(e){return e.split("")},bh="[\\ud800-\\udfff]",yh="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",wh="\\ud83c[\\udffb-\\udfff]",_h="[^\\ud800-\\udfff]",xh="(?:\\ud83c[\\udde6-\\uddff]){2}",Ch="[\\ud800-\\udbff][\\udc00-\\udfff]",Ah="(?:"+yh+"|"+wh+")?",Th="[\\ufe0e\\ufe0f]?",Ph=Th+Ah+"(?:\\u200d(?:"+[_h,xh,Ch].join("|")+")"+Th+Ah+")*",Eh="(?:"+[_h+yh+"?",yh,xh,Ch,bh].join("|")+")",Sh=RegExp(wh+"(?="+wh+")|"+Eh+Ph,"g"),Oh=function(e){return e.match(Sh)||[]},Mh=function(e){return gh(e)?Oh(e):kh(e)},Ih=function(e){return function(t){t=Ci(t);var n=gh(t)?Mh(t):void 0,i=n?n[0]:t.charAt(0),r=n?ph(n,1).join(""):t.slice(1);return i[e]()+r}}("toUpperCase"),Nh=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Rh=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,Dh="Ctrl+K";function Lh(e,t){var n=t.writer,i=n.createAttributeElement("a",{href:e},{priority:5});return n.setCustomProperty("link",!0,i),i}function zh(e){return function(e){return e.replace(Nh,"").match(Rh)}(e=String(e))?e:"#"}function jh(e,t){return!!e&&e.is("element","image")&&t.checkAttribute("image","linkHref")}var Vh=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.manualDecorators=new Jn,i.automaticDecorators=new vh,i}return x(n,[{key:"restoreManualDecoratorStates",value:function(){var e,t=k(this.manualDecorators);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.value=this._getDecoratorStateFromModel(n.id)}}catch(i){t.e(i)}finally{t.f()}}},{key:"refresh",value:function(){var e=this.editor.model,t=e.document,n=Hu(t.selection.getSelectedBlocks());jh(n,e.schema)?(this.value=n.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(n,"linkHref")):(this.value=t.selection.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"linkHref"));var i,r=k(this.manualDecorators);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.value=this._getDecoratorStateFromModel(o.id)}}catch(a){r.e(a)}finally{r.f()}}},{key:"execute",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.editor.model,r=i.document.selection,o=[],a=[];for(var s in n)n[s]?o.push(s):a.push(s);i.change((function(n){if(r.isCollapsed){var s=r.getFirstPosition();if(r.hasAttribute("linkHref")){var l=Qd(s,"linkHref",r.getAttribute("linkHref"),i);n.setAttribute("linkHref",e,l),o.forEach((function(e){n.setAttribute(e,!0,l)})),a.forEach((function(e){n.removeAttribute(e,l)})),n.setSelection(n.createPositionAfter(l.end.nodeBefore))}else if(""!==e){var c=li(r.getAttributes());c.set("linkHref",e),o.forEach((function(e){c.set(e,!0)}));var u=n.createText(e,c);i.insertContent(u,s),n.setSelection(n.createPositionAfter(u))}["linkHref"].concat(o,a).forEach((function(e){n.removeSelectionAttribute(e)}))}else{var d,h=i.schema.getValidRanges(r.getRanges(),"linkHref"),f=[],v=k(r.getSelectedBlocks());try{for(v.s();!(d=v.n()).done;){var p=d.value;i.schema.checkAttribute(p,"linkHref")&&f.push(n.createRangeOn(p))}}catch(C){v.e(C)}finally{v.f()}var m,g=f.slice(),b=k(h);try{for(b.s();!(m=b.n()).done;){var y=m.value;t._isRangeToUpdate(y,f)&&g.push(y)}}catch(C){b.e(C)}finally{b.f()}var w,_=k(g);try{var x=function(){var t=w.value;n.setAttribute("linkHref",e,t),o.forEach((function(e){n.setAttribute(e,!0,t)})),a.forEach((function(e){n.removeAttribute(e,t)}))};for(_.s();!(w=_.n()).done;)x()}catch(C){_.e(C)}finally{_.f()}}}))}},{key:"_getDecoratorStateFromModel",value:function(e){var t=this.editor.model,n=t.document,i=Hu(n.selection.getSelectedBlocks());return jh(i,t.schema)?i.getAttribute(e):n.selection.getAttribute(e)}},{key:"_isRangeToUpdate",value:function(e,t){var n,i=k(t);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(r.containsRange(e))return!1}}catch(o){i.e(o)}finally{i.f()}return!0}}]),n}(Fu),Bh=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"refresh",value:function(){var e=this.editor.model,t=e.document,n=Hu(t.selection.getSelectedBlocks());jh(n,e.schema)?this.isEnabled=e.schema.checkAttribute(n,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"linkHref")}},{key:"execute",value:function(){var e=this.editor,t=this.editor.model,n=t.document.selection,i=e.commands.get("link");t.change((function(e){var r,o=n.isCollapsed?[Qd(n.getFirstPosition(),"linkHref",n.getAttribute("linkHref"),t)]:n.getRanges(),a=k(o);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(e.removeAttribute("linkHref",s),i){var l,c=k(i.manualDecorators);try{for(c.s();!(l=c.n()).done;){var u=l.value;e.removeAttribute(u.id,s)}}catch(d){c.e(d)}finally{c.f()}}}}catch(d){a.e(d)}finally{a.f()}}))}}]),n}(Fu),Fh=function e(t){var n=t.id,i=t.label,r=t.attributes,o=t.defaultValue;w(this,e),this.id=n,this.set("value"),this.defaultValue=o,this.label=i,this.attributes=r};Kn(Fh,vr),n(45);var Uh="automatic",Hh=/^(https?:)?\/\//,$h=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),e.config.define("link",{addTargetToExternalLinks:!1}),i}return x(n,null,[{key:"pluginName",get:function(){return"LinkEditing"}},{key:"requires",get:function(){return[qd,ch,fh]}}]),x(n,[{key:"init",value:function(){var e=this.editor;e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:Lh}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:function(e,t){return Lh(zh(e),t)}}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:function(e){return e.getAttribute("href")}}}),e.commands.add("link",new Vh(e)),e.commands.add("unlink",new Bh(e));var t=function(e,t){var n={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach((function(e){return e.label&&n[e.label]&&(e.label=n[e.label]),e})),t}(e.t,function(e){var t=[];if(e)for(var n=0,i=Object.entries(e);n1&&void 0!==arguments[1]?arguments[1]:{};this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}},{key:"showInfo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}},{key:"showWarning",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}},{key:"_showNotification",value:function(e){var t="show:"+e.type+(e.namespace?":"+e.namespace:"");this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}],[{key:"pluginName",get:function(){return"Notification"}}]),n}(Yh),Kh=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.stopListening(i.editor.model.document,"change"),i.listenTo(i.editor.model.document,"change",(function(){return i.refresh()}),{priority:"low"}),i}return x(n,[{key:"refresh",value:function(){var e=this.editor.commands.get("imageInsert"),t=this.editor.commands.get("link");this.isEnabled=e.isEnabled||t.isEnabled}},{key:"execute",value:function(){var e=this.editor,t=this.editor.config.get("ckfinder.openerMethod")||"modal";if("popup"!=t&&"modal"!=t)throw new jn.b('ckfinder-unknown-openerMethod: The openerMethod config option must by "popup" or "modal".',e);var n=this.editor.config.get("ckfinder.options")||{};n.chooseFiles=!0;var i=n.onInit;n.language||(n.language=e.locale.uiLanguage),n.onInit=function(t){i&&i(t),t.on("files:choose",(function(n){var i,r=n.data.files.toArray(),o=r.filter((function(e){return!e.isImage()})),a=r.filter((function(e){return e.isImage()})),s=k(o);try{for(s.s();!(i=s.n()).done;){var l=i.value;e.execute("link",l.getUrl())}}catch(v){s.e(v)}finally{s.f()}var c,u=[],d=k(a);try{for(d.s();!(c=d.n()).done;){var h=c.value,f=h.getUrl();u.push(f||t.request("file:getProxyUrl",{file:h}))}}catch(v){d.e(v)}finally{d.f()}u.length&&Jh(e,u)})),t.on("file:choose:resizedImage",(function(t){var n=t.data.resizedUrl;if(n)Jh(e,[n]);else{var i=e.plugins.get("Notification"),r=e.locale.t;i.showWarning(r("Could not obtain resized image URL."),{title:r("Selecting resized image failed"),namespace:"ckfinder"})}}))},window.CKFinder[t](n)}}]),n}(Fu);function Jh(e,t){if(e.commands.get("imageInsert").isEnabled)e.execute("imageInsert",{source:t});else{var n=e.plugins.get("Notification"),i=e.locale.t;n.showWarning(i("Could not insert image at the current position."),{title:i("Inserting image failed"),namespace:"ckfinder"})}}var Qh=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor;e.commands.add("ckfinder",new Kh(e))}}],[{key:"pluginName",get:function(){return"CKFinderEditing"}},{key:"requires",get:function(){return[Gh,Hd,$h]}}]),n}(Vu),Zh=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){this.set("hasAny",!1),this._actions=new Jn({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}},{key:"add",value:function(e){if("string"!=typeof e)throw new jn.b("pendingactions-add-invalid-message: The message must be a string.",this);var t=Object.create(vr);return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}},{key:"remove",value:function(e){this._actions.remove(e),this.hasAny=!!this._actions.length}},{key:Symbol.iterator,value:function(){return this._actions[Symbol.iterator]()}},{key:"first",get:function(){return this._actions.get(0)}}],[{key:"pluginName",get:function(){return"PendingActions"}}]),n}(Yh),Xh=function(){function e(){var t=this;w(this,e);var n=new window.FileReader;this._reader=n,this._data=void 0,this.set("loaded",0),n.onprogress=function(e){t.loaded=e.loaded}}return x(e,[{key:"read",value:function(e){var t=this,n=this._reader;return this.total=e.size,new Promise((function(i,r){n.onload=function(){var e=n.result;t._data=e,i(e)},n.onerror=function(){r("error")},n.onabort=function(){r("aborted")},t._reader.readAsDataURL(e)}))}},{key:"abort",value:function(){this._reader.abort()}},{key:"error",get:function(){return this._reader.error}},{key:"data",get:function(){return this._data}}]),e}();Kn(Xh,vr);var ef=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this;this.loaders=new Jn,this.loaders.on("add",(function(){return e._updatePendingAction()})),this.loaders.on("remove",(function(){return e._updatePendingAction()})),this._loadersMap=new Map,this._pendingAction=null,this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(function(e,t){return t?e/t*100:0}))}},{key:"getLoader",value:function(e){return this._loadersMap.get(e)||null}},{key:"createLoader",value:function(e){var t=this;if(!this.createUploadAdapter)return console.warn(Object(jn.a)("filerepository-no-upload-adapter: Upload adapter is not defined.")),null;var n=new tf(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(n),this._loadersMap.set(e,n),e instanceof Promise&&n.file.then((function(e){t._loadersMap.set(e,n)})).catch((function(){})),n.on("change:uploaded",(function(){var e,n=0,i=k(t.loaders);try{for(i.s();!(e=i.n()).done;){var r=e.value;n+=r.uploaded}}catch(o){i.e(o)}finally{i.f()}t.uploaded=n})),n.on("change:uploadTotal",(function(){var e,n=0,i=k(t.loaders);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.uploadTotal&&(n+=r.uploadTotal)}}catch(o){i.e(o)}finally{i.f()}t.uploadTotal=n})),n}},{key:"destroyLoader",value:function(e){var t=this,n=e instanceof tf?e:this.getLoader(e);n._destroy(),this.loaders.remove(n),this._loadersMap.forEach((function(e,i){e===n&&t._loadersMap.delete(i)}))}},{key:"_updatePendingAction",value:function(){var e=this.editor.plugins.get(Zh);if(this.loaders.length){if(!this._pendingAction){var t=this.editor.t,n=function(e){return"".concat(t("Upload in progress")," ").concat(parseInt(e),"%.")};this._pendingAction=e.add(n(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",n)}}else e.remove(this._pendingAction),this._pendingAction=null}}],[{key:"pluginName",get:function(){return"FileRepository"}},{key:"requires",get:function(){return[Zh]}}]),n}(Vu);Kn(ef,vr);var tf=function(){function e(t,n){w(this,e),this.id=Ln(),this._filePromiseWrapper=this._createFilePromiseWrapper(t),this._adapter=n(this),this._reader=new Xh,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(function(e,t){return t?e/t*100:0})),this.set("uploadResponse",null)}return x(e,[{key:"read",value:function(){var e=this;if("idle"!=this.status)throw new jn.b("filerepository-read-wrong-status: You cannot call read if the status is different than idle.",this);return this.status="reading",this.file.then((function(t){return e._reader.read(t)})).then((function(t){if("reading"!==e.status)throw e.status;return e.status="idle",t})).catch((function(t){if("aborted"===t)throw e.status="aborted","aborted";throw e.status="error",e._reader.error?e._reader.error:t}))}},{key:"upload",value:function(){var e=this;if("idle"!=this.status)throw new jn.b("filerepository-upload-wrong-status: You cannot call upload if the status is different than idle.",this);return this.status="uploading",this.file.then((function(){return e._adapter.upload()})).then((function(t){return e.uploadResponse=t,e.status="idle",t})).catch((function(t){if("aborted"===e.status)throw"aborted";throw e.status="error",t}))}},{key:"abort",value:function(){var e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch((function(){})),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}},{key:"_destroy",value:function(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}},{key:"_createFilePromiseWrapper",value:function(e){var t={};return t.promise=new Promise((function(n,i){t.rejecter=i,t.isFulfilled=!1,e.then((function(e){t.isFulfilled=!0,n(e)})).catch((function(e){t.isFulfilled=!0,i(e)}))})),t}},{key:"file",get:function(){var e=this;return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((function(t){return e._filePromiseWrapper?t:null})):Promise.resolve(null)}},{key:"data",get:function(){return this._reader.data}}]),e}();Kn(tf,vr);var nf="ckCsrfToken",rf="abcdefghijklmnopqrstuvwxyz0123456789";function of(){var e,t,n=function(e){e=e.toLowerCase();var t,n=document.cookie.split(";"),i=k(n);try{for(i.s();!(t=i.n()).done;){var r=t.value,o=r.split("=");if(decodeURIComponent(o[0].trim().toLowerCase())===e)return decodeURIComponent(o[1])}}catch(a){i.e(a)}finally{i.f()}return null}(nf);return n&&40==n.length||(n=function(e){var t="",n=new Uint8Array(e);window.crypto.getRandomValues(n);for(var i=0;i.5?r.toUpperCase():r}return t}(40),e=nf,t=n,document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+";path=/"),n}var af=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this,t=this.editor.config.get("ckfinder.uploadUrl");t&&(this.editor.plugins.get(ef).createUploadAdapter=function(n){return new sf(n,t,e.editor.t)})}}],[{key:"requires",get:function(){return[ef]}},{key:"pluginName",get:function(){return"CKFinderUploadAdapter"}}]),n}(Vu),sf=function(){function e(t,n,i){w(this,e),this.loader=t,this.url=n,this.t=i}return x(e,[{key:"upload",value:function(){var e=this;return this.loader.file.then((function(t){return new Promise((function(n,i){e._initRequest(),e._initListeners(n,i,t),e._sendRequest(t)}))}))}},{key:"abort",value:function(){this.xhr&&this.xhr.abort()}},{key:"_initRequest",value:function(){var e=this.xhr=new XMLHttpRequest;e.open("POST",this.url,!0),e.responseType="json"}},{key:"_initListeners",value:function(e,t,n){var i=this.xhr,r=this.loader,o=(0,this.t)("Cannot upload file:")+" ".concat(n.name,".");i.addEventListener("error",(function(){return t(o)})),i.addEventListener("abort",(function(){return t()})),i.addEventListener("load",(function(){var n=i.response;if(!n||!n.uploaded)return t(n&&n.error&&n.error.message?n.error.message:o);e({default:n.url})})),i.upload&&i.upload.addEventListener("progress",(function(e){e.lengthComputable&&(r.uploadTotal=e.total,r.uploaded=e.loaded)}))}},{key:"_sendRequest",value:function(e){var t=new FormData;t.append("upload",e),t.append("ckCsrfToken",of()),this.xhr.send(t)}}]),e}();function lf(e,t){var n,i,r;return a.wrap((function(o){while(1)switch(o.prev=o.next){case 0:n=k(t),o.prev=1,n.s();case 3:if((i=n.n()).done){o.next=11;break}if(r=i.value,o.t0=r&&e.getAttributeProperties(r[0]).copyOnEnter,!o.t0){o.next=9;break}return o.next=9,r;case 9:o.next=3;break;case 11:o.next=16;break;case 13:o.prev=13,o.t1=o["catch"](1),n.e(o.t1);case 16:return o.prev=16,n.f(),o.finish(16);case 19:case"end":return o.stop()}}),o,null,[[1,13,16,19]])}var cf=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"execute",value:function(){var e=this,t=this.editor.model,n=t.document;t.change((function(i){!function(e,t,n,i){var r=n.isCollapsed,o=n.getFirstRange(),a=o.start.parent,s=o.end.parent;if(i.isLimit(a)||i.isLimit(s))r||a!=s||e.deleteContent(n);else if(r){var l=lf(t.model.schema,n.getAttributes());uf(t,o.start),t.setSelectionAttribute(l)}else{var c=!(o.start.isAtStart&&o.end.isAtEnd),u=a==s;e.deleteContent(n,{leaveUnmerged:c}),c&&(u?uf(t,n.focus):t.setSelection(s,0))}}(e.editor.model,i,n.selection,t.schema),e.fire("afterExecute",{writer:i})}))}}]),n}(Fu);function uf(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}var df=function(e){C(n,e);var t=A(n);function n(e){var i;w(this,n),i=t.call(this,e);var r=i.document;return r.on("keydown",(function(e,t){var n;i.isEnabled&&t.keyCode==Br.enter&&(r.once("enter",(function(e){return n=e}),{priority:"highest"}),r.fire("enter",new da(r,t.domEvent,{isSoft:t.shiftKey})),n&&n.stop.called&&e.stop())})),i}return x(n,[{key:"observe",value:function(){}}]),n}(Uo),hf=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor,t=e.editing.view,n=t.document;t.addObserver(df),e.commands.add("enter",new cf(e)),this.listenTo(n,"enter",(function(n,i){i.preventDefault(),i.isSoft||(e.execute("enter"),t.scrollToTheSelection())}),{priority:"low"})}}],[{key:"pluginName",get:function(){return"Enter"}}]),n}(Vu),ff=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"execute",value:function(){var e=this,t=this.editor.model,n=t.document;t.change((function(i){!function(e,t,n){var i=n.isCollapsed,r=n.getFirstRange(),o=r.start.parent,a=r.end.parent,s=o==a;if(i){var l=lf(e.schema,n.getAttributes());vf(e,t,r.end),t.removeSelectionAttribute(n.getAttributeKeys()),t.setSelectionAttribute(l)}else{var c=!(r.start.isAtStart&&r.end.isAtEnd);e.deleteContent(n,{leaveUnmerged:c}),s?vf(e,t,n.focus):c&&t.setSelection(a,0)}}(t,i,n.selection),e.fire("afterExecute",{writer:i})}))}},{key:"refresh",value:function(){var e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;var n=t.anchor;if(!n||!e.checkChild(n,"softBreak"))return!1;var i=t.getFirstRange(),r=i.start.parent,o=i.end.parent;return!pf(r,e)&&!pf(o,e)||r===o}(e.schema,t.selection)}}]),n}(Fu);function vf(e,t,n){var i=t.createElement("softBreak");e.insertContent(i,n),t.setSelection(i,"after")}function pf(e,t){return!e.is("rootElement")&&(t.isLimit(e)||pf(e.parent,t))}var mf=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor,t=e.model.schema,n=e.conversion,i=e.editing.view,r=i.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),n.for("upcast").elementToElement({model:"softBreak",view:"br"}),n.for("downcast").elementToElement({model:"softBreak",view:function(e,t){var n=t.writer;return n.createEmptyElement("br")}}),i.addObserver(df),e.commands.add("shiftEnter",new ff(e)),this.listenTo(r,"enter",(function(t,n){n.preventDefault(),n.isSoft&&(e.execute("shiftEnter"),i.scrollToTheSelection())}),{priority:"low"})}}],[{key:"pluginName",get:function(){return"ShiftEnter"}}]),n}(Vu),gf=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"execute",value:function(){var e=this.editor.model,t=e.document.selection,n=e.schema.getLimitElement(t);if(t.containsEntireContent(n)||!kf(e.schema,n))do{if(n=n.parent,!n)return}while(!kf(e.schema,n));e.change((function(e){e.setSelection(n,"in")}))}}]),n}(Fu);function kf(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}var bf=Ur("Ctrl+A"),yf=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new gf(e)),this.listenTo(t,"keydown",(function(t,n){Fr(n)===bf&&(e.execute("selectAll"),n.preventDefault())}))}}],[{key:"pluginName",get:function(){return"SelectAllEditing"}}]),n}(Vu),wf=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this,t=this.editor;t.ui.componentFactory.add("selectAll",(function(n){var i=t.commands.get("selectAll"),r=new _u(n),o=n.t;return r.set({label:o("Select all"),icon:'',keystroke:"Ctrl+A",tooltip:!0}),r.bind("isOn","isEnabled").to(i,"value","isEnabled"),e.listenTo(r,"execute",(function(){t.execute("selectAll"),t.editing.view.focus()})),r}))}}],[{key:"pluginName",get:function(){return"SelectAllUI"}}]),n}(Vu),_f=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[yf,wf]}},{key:"pluginName",get:function(){return"SelectAll"}}]),n}(Vu),xf=function(e){C(n,e);var t=A(n);function n(e,i){var r;return w(this,n),r=t.call(this,e),r.direction=i,r._buffer=new Xd(e.model,e.config.get("typing.undoStep")),r}return x(n,[{key:"execute",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.editor.model,i=n.document;n.enqueueChange(this._buffer.batch,(function(r){e._buffer.lock();var o=r.createSelection(t.selection||i.selection),a=o.isCollapsed;if(o.isCollapsed&&n.modifySelection(o,{direction:e.direction,unit:t.unit}),e._shouldEntireContentBeReplacedWithParagraph(t.sequence||1))e._replaceEntireContentWithParagraph(r);else if(!o.isCollapsed){var s=0;o.getFirstRange().getMinimalFlatRanges().forEach((function(e){s+=Pr(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),n.deleteContent(o,{doNotResetEntireContent:a,direction:e.direction}),e._buffer.input(s),r.setSelection(o),e._buffer.unlock()}}))}},{key:"_shouldEntireContentBeReplacedWithParagraph",value:function(e){if(e>1)return!1;var t=this.editor.model,n=t.document.selection,i=t.schema.getLimitElement(n);if(!n.isCollapsed||!n.containsEntireContent(i))return!1;if(!t.schema.checkChild(i,"paragraph"))return!1;var r=i.getChild(0);return!r||"paragraph"!==r.name}},{key:"_replaceEntireContentWithParagraph",value:function(e){var t=this.editor.model,n=t.document.selection,i=t.schema.getLimitElement(n),r=e.createElement("paragraph");e.remove(e.createRangeIn(i)),e.insert(r,i),e.setSelection(r,0)}},{key:"buffer",get:function(){return this._buffer}}]),n}(Fu),Cf=function(e){C(n,e);var t=A(n);function n(e){var i;w(this,n),i=t.call(this,e);var r=e.document,o=0;function a(e,t,n){var i;r.once("delete",(function(e){return i=e}),{priority:Number.POSITIVE_INFINITY}),r.fire("delete",new da(r,t,n)),i&&i.stop.called&&e.stop()}return r.on("keyup",(function(e,t){t.keyCode!=Br.delete&&t.keyCode!=Br.backspace||(o=0)})),r.on("keydown",(function(e,t){var n={};if(t.keyCode==Br.delete)n.direction="forward",n.unit="character";else{if(t.keyCode!=Br.backspace)return;n.direction="backward",n.unit="codePoint"}var i=zr.isMac?t.altKey:t.ctrlKey;n.unit=i?"word":n.unit,n.sequence=++o,a(e,t.domEvent,n)})),zr.isAndroid&&r.on("beforeinput",(function(t,n){if("deleteContentBackward"==n.domEvent.inputType){var i={unit:"codepoint",direction:"backward",sequence:1},r=n.domTarget.ownerDocument.defaultView.getSelection();r.anchorNode==r.focusNode&&r.anchorOffset+1!=r.focusOffset&&(i.selectionToRemove=e.domConverter.domSelectionToView(r)),a(t,n.domEvent,i)}})),i}return x(n,[{key:"observe",value:function(){}}]),n}(Uo),Af=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor,t=e.editing.view,n=t.document;if(t.addObserver(Cf),e.commands.add("forwardDelete",new xf(e,"forward")),e.commands.add("delete",new xf(e,"backward")),this.listenTo(n,"delete",(function(n,i){var r={unit:i.unit,sequence:i.sequence};if(i.selectionToRemove){var o,a=e.model.createSelection(),s=[],l=k(i.selectionToRemove.getRanges());try{for(l.s();!(o=l.n()).done;){var c=o.value;s.push(e.editing.mapper.toModelRange(c))}}catch(u){l.e(u)}finally{l.f()}a.setTo(s),r.selection=a}e.execute("forward"==i.direction?"forwardDelete":"delete",r),i.preventDefault(),t.scrollToTheSelection()})),zr.isAndroid){var i=null;this.listenTo(n,"delete",(function(e,t){var n=t.domTarget.ownerDocument.defaultView.getSelection();i={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}}),{priority:"lowest"}),this.listenTo(n,"keyup",(function(e,t){if(i){var n=t.domTarget.ownerDocument.defaultView.getSelection();n.collapse(i.anchorNode,i.anchorOffset),n.extend(i.focusNode,i.focusOffset),i=null}}))}}}],[{key:"pluginName",get:function(){return"Delete"}}]),n}(Vu),Tf=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[ch,Af]}},{key:"pluginName",get:function(){return"Typing"}}]),n}(Vu),Pf=new Map;function Ef(e,t,n){var i=Pf.get(e);i||(i=new Map,Pf.set(e,i)),i.set(t,n)}function Sf(e){return[e]}function Of(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=function(e,t){var n=Pf.get(e);return n&&n.has(t)?n.get(t):Sf}(e.constructor,t.constructor);try{return i(e=e.clone(),t,n)}catch(e){throw e}}function Mf(e,t,n){e=e.slice(),t=t.slice();var i=new If(n.document,n.useRelations,n.forceWeakRemove);i.setOriginalOperations(e),i.setOriginalOperations(t);var r=i.originalOperations;if(0==e.length||0==t.length)return{operationsA:e,operationsB:t,originalOperations:r};var o,a=new WeakMap,s=k(e);try{for(s.s();!(o=s.n()).done;){var l=o.value;a.set(l,0)}}catch(A){s.e(A)}finally{s.f()}for(var c={nextBaseVersionA:e[e.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:e.length,originalOperationsBCount:t.length},d=0;d2&&void 0!==arguments[2]&&arguments[2];w(this,e),this.originalOperations=new Map,this._history=t.history,this._useRelations=n,this._forceWeakRemove=!!i,this._relations=new Map}return x(e,[{key:"setOriginalOperations",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=n?this.originalOperations.get(n):null,r=k(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;this.originalOperations.set(o,i||o)}}catch(a){r.e(a)}finally{r.f()}}},{key:"updateRelation",value:function(e,t){switch(e.constructor){case wl:switch(t.constructor){case Tl:e.targetPosition.isEqual(t.sourcePosition)||t.movedRange.containsPosition(e.targetPosition)?this._setRelation(e,t,"insertAtSource"):e.targetPosition.isEqual(t.deletionPosition)?this._setRelation(e,t,"insertBetween"):e.targetPosition.isAfter(t.sourcePosition)&&this._setRelation(e,t,"moveTargetAfter");break;case wl:e.targetPosition.isEqual(t.sourcePosition)||e.targetPosition.isBefore(t.sourcePosition)?this._setRelation(e,t,"insertBefore"):this._setRelation(e,t,"insertAfter")}break;case Pl:switch(t.constructor){case Tl:e.splitPosition.isBefore(t.sourcePosition)&&this._setRelation(e,t,"splitBefore");break;case wl:(e.splitPosition.isEqual(t.sourcePosition)||e.splitPosition.isBefore(t.sourcePosition))&&this._setRelation(e,t,"splitBefore")}break;case Tl:switch(t.constructor){case Tl:e.targetPosition.isEqual(t.sourcePosition)||this._setRelation(e,t,"mergeTargetNotMoved"),e.sourcePosition.isEqual(t.targetPosition)&&this._setRelation(e,t,"mergeSourceNotMoved"),e.sourcePosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeSameElement");break;case Pl:e.sourcePosition.isEqual(t.splitPosition)&&this._setRelation(e,t,"splitAtSource")}break;case xl:var n=e.newRange;if(!n)return;switch(t.constructor){case wl:var i=is._createFromPositionAndShift(t.sourcePosition,t.howMany),r=i.containsPosition(n.start)||i.start.isEqual(n.start),o=i.containsPosition(n.end)||i.end.isEqual(n.end);!r&&!o||i.containsRange(n)||this._setRelation(e,t,{side:r?"left":"right",path:r?n.start.path.slice():n.end.path.slice()});break;case Tl:var a=n.start.isEqual(t.targetPosition),s=n.start.isEqual(t.deletionPosition),l=n.end.isEqual(t.deletionPosition),c=n.end.isEqual(t.sourcePosition);(a||s||l||c)&&this._setRelation(e,t,{wasInLeftElement:a,wasStartBeforeMergedElement:s,wasEndBeforeMergedElement:l,wasInRightElement:c});break}break}}},{key:"getContext",value:function(e,t,n){return{aIsStrong:n,aWasUndone:this._wasUndone(e),bWasUndone:this._wasUndone(t),abRelation:this._useRelations?this._getRelation(e,t):null,baRelation:this._useRelations?this._getRelation(t,e):null,forceWeakRemove:this._forceWeakRemove}}},{key:"_wasUndone",value:function(e){var t=this.originalOperations.get(e);return t.wasUndone||this._history.isUndoneOperation(t)}},{key:"_getRelation",value:function(e,t){var n=this.originalOperations.get(t),i=this._history.getUndoneOperation(n);if(!i)return null;var r=this.originalOperations.get(e),o=this._relations.get(r);return o&&o.get(i)||null}},{key:"_setRelation",value:function(e,t,n){var i=this.originalOperations.get(e),r=this.originalOperations.get(t),o=this._relations.get(i);o||(o=new Map,this._relations.set(i,o)),o.set(r,n)}}]),e}();function Nf(e,t){var n,i=k(e);try{for(i.s();!(n=i.n()).done;){var r=n.value;r.baseVersion=t++}}catch(o){i.e(o)}finally{i.f()}}function Rf(e,t){for(var n=0;n0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]})),Ef(wl,_l,(function(e,t){var n=is._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=n.start,e.howMany=n.end.offset-n.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]})),Ef(wl,wl,(function(e,t,n){var i,r=is._createFromPositionAndShift(e.sourcePosition,e.howMany),o=is._createFromPositionAndShift(t.sourcePosition,t.howMany),a=n.aIsStrong,s=!n.aIsStrong;if("insertBefore"==n.abRelation||"insertAfter"==n.baRelation?s=!0:"insertAfter"!=n.abRelation&&"insertBefore"!=n.baRelation||(s=!1),i=e.targetPosition.isEqual(t.targetPosition)&&s?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Lf(e,t)&&Lf(t,e))return[t.getReversed()];if(r.containsPosition(t.targetPosition)&&r.containsRange(o,!0))return r.start=r.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),r.end=r.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),zf([r],i);if(o.containsPosition(e.targetPosition)&&o.containsRange(r,!0))return r.start=r.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),r.end=r.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),zf([r],i);var l=ii(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return r.start=r.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),r.end=r.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),zf([r],i);"remove"!=e.type||"remove"==t.type||n.aWasUndone||n.forceWeakRemove?"remove"==e.type||"remove"!=t.type||n.bWasUndone||n.forceWeakRemove||(a=!1):a=!0;var c,d=[],h=r.getDifference(o),f=k(h);try{for(f.s();!(c=f.n()).done;){var v=c.value;v.start=v.start._getTransformedByDeletion(t.sourcePosition,t.howMany),v.end=v.end._getTransformedByDeletion(t.sourcePosition,t.howMany);var p="same"==ii(v.start.getParentPath(),t.getMovedRangeStart().getParentPath()),m=v._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,p);d.push.apply(d,u(m))}}catch(b){f.e(b)}finally{f.f()}var g=r.getIntersection(o);return null!==g&&a&&(g.start=g.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),g.end=g.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===d.length?d.push(g):1==d.length?o.start.isBefore(r.start)||o.start.isEqual(r.start)?d.unshift(g):d.push(g):d.splice(1,0,g)),0===d.length?[new Yl(e.baseVersion)]:zf(d,i)})),Ef(wl,Pl,(function(e,t,n){var i=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=n.abRelation||(i=e.targetPosition._getTransformedBySplitOperation(t));var r=is._createFromPositionAndShift(e.sourcePosition,e.howMany);if(r.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=i,[e];if(r.start.hasSameParentAs(t.splitPosition)&&r.containsPosition(t.splitPosition)){var o=new is(t.splitPosition,r.end);return o=o._getTransformedBySplitOperation(t),zf([new is(r.start,t.splitPosition),o],i)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==n.abRelation&&(i=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==n.abRelation&&(i=e.targetPosition);var a=[r._getTransformedBySplitOperation(t)];if(t.graveyardPosition){var s=r.start.isEqual(t.graveyardPosition)||r.containsPosition(t.graveyardPosition);e.howMany>1&&s&&!n.aWasUndone&&a.push(is._createFromPositionAndShift(t.insertionPosition,1))}return zf(a,i)})),Ef(wl,Tl,(function(e,t,n){var i=is._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.sourcePosition))if("remove"!=e.type||n.forceWeakRemove){if(1==e.howMany)return n.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new Yl(0)]}else if(!n.aWasUndone){var r=[],o=t.graveyardPosition.clone(),a=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(r.push(new wl(e.sourcePosition,e.howMany-1,e.targetPosition,0)),o=o._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),a=a._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));var s=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),l=new wl(o,1,s,0),c=l.getMovedRangeStart().path.slice();c.push(0);var u=new Xa(l.targetPosition.root,c);a=a._getTransformedByMove(o,s,1);var d=new wl(a,t.howMany,u,0);return r.push(l),r.push(d),r}var h=is._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=h.start,e.howMany=h.end.offset-h.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]})),Ef(Cl,_l,(function(e,t){return e.position=e.position._getTransformedByInsertOperation(t),[e]})),Ef(Cl,Tl,(function(e,t){return e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e])})),Ef(Cl,wl,(function(e,t){return e.position=e.position._getTransformedByMoveOperation(t),[e]})),Ef(Cl,Cl,(function(e,t,n){if(e.position.isEqual(t.position)){if(!n.aIsStrong)return[new Yl(0)];e.oldName=t.newName}return[e]})),Ef(Cl,Pl,(function(e,t){if("same"==ii(e.position.path,t.splitPosition.getParentPath())&&!t.graveyardPosition){var n=new Cl(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,n]}return e.position=e.position._getTransformedBySplitOperation(t),[e]})),Ef(Al,Al,(function(e,t,n){if(e.root===t.root&&e.key===t.key){if(!n.aIsStrong||e.newValue===t.newValue)return[new Yl(0)];e.oldValue=t.newValue}return[e]})),Ef(Pl,_l,(function(e,t){return e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset0}},{key:"addBatch",value:function(e){var t=this.editor.model.document.selection,n={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:n}),this.refresh()}},{key:"clearStack",value:function(){this._stack=[],this.refresh()}},{key:"_restoreSelection",value:function(e,t,n){var i,r=this.editor.model,o=r.document,a=[],s=e.map((function(e){return e.getTransformedByOperations(n)})),l=s.flat(),c=k(s);try{for(c.s();!(i=c.n()).done;){var u=i.value,d=u.filter((function(e){return!Bf(e,l)}));Vf(d);var h=d.find((function(e){return e.root!=o.graveyard}));h&&a.push(h)}}catch(f){c.e(f)}finally{c.f()}a.length&&r.change((function(e){e.setSelection(a,{backward:t})}))}},{key:"_undo",value:function(e,t){var n=this.editor.model,i=n.document;this._createdBatches.add(t);var r=e.operations.slice().filter((function(e){return e.isDocumentOperation}));r.reverse();var o,a=k(r);try{for(a.s();!(o=a.n()).done;){var s,l=o.value,c=l.baseVersion+1,u=Array.from(i.history.getOperations(c)),d=Mf([l.getReversed()],u,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA,h=k(d);try{for(h.s();!(s=h.n()).done;){var f=s.value;t.addOperation(f),n.applyOperation(f),i.history.setOperationAsUndone(l,f)}}catch(v){h.e(v)}finally{h.f()}}}catch(v){a.e(v)}finally{a.f()}}}]),n}(Fu);function Vf(e){e.sort((function(e,t){return e.start.isBefore(t.start)?-1:1}));for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null,n=t?this._stack.findIndex((function(e){return e.batch==t})):this._stack.length-1,i=this._stack.splice(n,1)[0],r=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(r,(function(){e._undo(i.batch,r);var t=e.editor.model.document.history.getOperations(i.batch.baseVersion);e._restoreSelection(i.selection.ranges,i.selection.isBackward,t),e.fire("revert",i.batch,r)})),this.refresh()}}]),n}(jf),Uf=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"execute",value:function(){var e=this,t=this._stack.pop(),n=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(n,(function(){var i=t.batch.operations[t.batch.operations.length-1].baseVersion+1,r=e.editor.model.document.history.getOperations(i);e._restoreSelection(t.selection.ranges,t.selection.isBackward,r),e._undo(t.batch,n)})),this.refresh()}}]),n}(jf),Hf=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i._batchRegistry=new WeakSet,i}return x(n,null,[{key:"pluginName",get:function(){return"UndoEditing"}}]),x(n,[{key:"init",value:function(){var e=this,t=this.editor;this._undoCommand=new Ff(t),this._redoCommand=new Uf(t),t.commands.add("undo",this._undoCommand),t.commands.add("redo",this._redoCommand),this.listenTo(t.model,"applyOperation",(function(t,n){var i=n[0];if(i.isDocumentOperation){var r=i.batch,o=e._redoCommand._createdBatches.has(r),a=e._undoCommand._createdBatches.has(r);e._batchRegistry.has(r)||"transparent"==r.type&&!o&&!a||(o?e._undoCommand.addBatch(r):a||(e._undoCommand.addBatch(r),e._redoCommand.clearStack()),e._batchRegistry.add(r))}}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(function(t,n,i){e._redoCommand.addBatch(i)})),t.keystrokes.set("CTRL+Z","undo"),t.keystrokes.set("CTRL+Y","redo"),t.keystrokes.set("CTRL+SHIFT+Z","redo")}}]),n}(Vu),$f='',Wf='',qf=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor,t=e.locale,n=e.t,i="ltr"==t.uiLanguageDirection?$f:Wf,r="ltr"==t.uiLanguageDirection?Wf:$f;this._addButton("undo",n("Undo"),"CTRL+Z",i),this._addButton("redo",n("Redo"),"CTRL+Y",r)}},{key:"_addButton",value:function(e,t,n,i){var r=this,o=this.editor;o.ui.componentFactory.add(e,(function(a){var s=o.commands.get(e),l=new _u(a);return l.set({label:t,icon:i,keystroke:n,tooltip:!0}),l.bind("isEnabled").to(s,"isEnabled"),r.listenTo(l,"execute",(function(){o.execute(e),o.editing.view.focus()})),l}))}}]),n}(Vu),Yf=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[Hf,qf]}},{key:"pluginName",get:function(){return"Undo"}}]),n}(Vu),Gf=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"refresh",value:function(){this.isEnabled=function(e){var t=e.schema,n=e.document.selection;return function(e,t,n){var i=function(e,t){var n=Id(e,t).parent;return n.isEmpty&&!n.is("element","$root")?n.parent:n}(e,n);return t.checkChild(i,"horizontalLine")}(n,t,e)&&!function(e,t){var n=e.getSelectedElement();return n&&t.isObject(n)}(n,t)}(this.editor.model)}},{key:"execute",value:function(){var e=this.editor.model;e.change((function(t){var n=t.createElement("horizontalLine");e.insertContent(n);var i=n.nextSibling;!(i&&e.schema.checkChild(i,"$text"))&&e.schema.checkChild(n.parent,"paragraph")&&(i=t.createElement("paragraph"),e.insertContent(i,t.createPositionAfter(n))),i&&t.setSelection(i,0)}))}}]),n}(Fu);n(47);var Kf=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor,t=e.model.schema,n=e.t,i=e.conversion;t.register("horizontalLine",{isObject:!0,allowWhere:"$block"}),i.for("dataDowncast").elementToElement({model:"horizontalLine",view:function(e,t){var n=t.writer;return n.createEmptyElement("hr")}}),i.for("editingDowncast").elementToElement({model:"horizontalLine",view:function(e,t){var i=t.writer,r=n("Horizontal line"),o=i.createContainerElement("div"),a=i.createEmptyElement("hr");return i.addClass("ck-horizontal-line",o),i.setCustomProperty("hr",!0,o),i.insert(i.createPositionAt(o,0),a),function(e,t,n){return t.setCustomProperty("horizontalLine",!0,e),Ed(e,t,{label:n})}(o,i,r)}}),i.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),e.commands.add("horizontalLine",new Gf(e))}}],[{key:"pluginName",get:function(){return"HorizontalLineEditing"}}]),n}(Vu),Jf=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this,t=this.editor,n=t.t;t.ui.componentFactory.add("horizontalLine",(function(i){var r=t.commands.get("horizontalLine"),o=new _u(i);return o.set({label:n("Horizontal line"),icon:'',tooltip:!0}),o.bind("isEnabled").to(r,"isEnabled"),e.listenTo(o,"execute",(function(){t.execute("horizontalLine"),t.editing.view.focus()})),o}))}}]),n}(Vu),Qf=function(e){C(n,e);var t=A(n);function n(e,i){var r;return w(this,n),r=t.call(this,e),r.attributeKey=i,r}return x(n,[{key:"refresh",value:function(){var e=this.editor.model,t=e.document;this.value=t.selection.getAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}},{key:"execute",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.editor.model,i=n.document.selection,r=t.value;n.change((function(t){if(i.isCollapsed)r?t.setSelectionAttribute(e.attributeKey,r):t.removeSelectionAttribute(e.attributeKey);else{var o,a=n.schema.getValidRanges(i.getRanges(),e.attributeKey),s=k(a);try{for(s.s();!(o=s.n()).done;){var l=o.value;r?t.setAttribute(e.attributeKey,r,l):t.removeAttribute(e.attributeKey,l)}}catch(c){s.e(c)}finally{s.f()}}}))}}]),n}(Fu),Zf=function(e){C(n,e);var t=A(n);function n(e){var i;w(this,n),i=t.call(this,e);var r=i.bindTemplate;return i.set("color"),i.set("hasBorder"),i.icon='',i.extendTemplate({attributes:{style:{backgroundColor:r.to("color")},class:["ck","ck-color-grid__tile",r.if("hasBorder","ck-color-table__color-tile_bordered")]}}),i}return x(n,[{key:"render",value:function(){l(N(n.prototype),"render",this).call(this),this.iconView.fillColor="hsl(0, 0%, 100%)"}}]),n}(_u);n(49);var Xf=function(e){C(n,e);var t=A(n);function n(e,i){var r;w(this,n),r=t.call(this,e);var o=i&&i.colorDefinitions||[],a={};return i&&i.columns&&(a.gridTemplateColumns="repeat( ".concat(i.columns,", 1fr)")),r.set("selectedColor"),r.items=r.createCollection(),r.focusTracker=new xc,r.keystrokes=new vc,r._focusCycler=new cu({focusables:r.items,focusTracker:r.focusTracker,keystrokeHandler:r.keystrokes,actions:{focusPrevious:"arrowleft",focusNext:"arrowright"}}),r.items.on("add",(function(e,t){t.isOn=t.color===r.selectedColor})),o.forEach((function(e){var t=new Zf;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",(function(){r.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})})),r.items.add(t)})),r.setTemplate({tag:"div",children:r.items,attributes:{class:["ck","ck-color-grid"],style:a}}),r.on("change:selectedColor",(function(e,t,n){var i,o=k(r.items);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.isOn=a.color===n}}catch(s){o.e(s)}finally{o.f()}})),r}return x(n,[{key:"focus",value:function(){this.items.length&&this.items.first.focus()}},{key:"focusLast",value:function(){this.items.length&&this.items.last.focus()}},{key:"render",value:function(){var e=this;l(N(n.prototype),"render",this).call(this);var t,i=k(this.items);try{for(i.s();!(t=i.n()).done;){var r=t.value;this.focusTracker.add(r.element)}}catch(o){i.e(o)}finally{i.f()}this.items.on("add",(function(t,n){e.focusTracker.add(n.element)})),this.items.on("remove",(function(t,n){e.focusTracker.remove(n.element)})),this.keystrokes.listenTo(this.element)}}]),n}(Zc),ev=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.set("isEmpty",!0),i.on("change",(function(){i.set("isEmpty",0===i.length)})),i}return x(n,[{key:"add",value:function(e,t){this.find((function(t){return t.color===e.color}))||l(N(n.prototype),"add",this).call(this,e,t)}},{key:"hasColor",value:function(e){return!!this.find((function(t){return t.color===e}))}}]),n}(Jn);Kn(ev,vr),n(51);var tv=function(e){C(n,e);var t=A(n);function n(e,i){var r,o=i.colors,a=i.columns,s=i.removeButtonLabel,l=i.documentColorsLabel,c=i.documentColorsCount;return w(this,n),r=t.call(this,e),r.items=r.createCollection(),r.colorDefinitions=o,r.focusTracker=new xc,r.keystrokes=new vc,r.set("selectedColor"),r.removeButtonLabel=s,r.columns=a,r.documentColors=new ev,r.documentColorsCount=c,r._focusCycler=new cu({focusables:r.items,focusTracker:r.focusTracker,keystrokeHandler:r.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),r._documentColorsLabel=l,r.setTemplate({tag:"div",attributes:{class:["ck","ck-color-table"]},children:r.items}),r.items.add(r._removeColorButton()),r}return x(n,[{key:"updateDocumentColors",value:function(e,t){var n=e.document,i=this.documentColorsCount;this.documentColors.clear();var r,o=k(n.getRootNames());try{for(o.s();!(r=o.n()).done;){var a,s=r.value,l=n.getRoot(s),c=e.createRangeIn(l),u=k(c.getItems());try{for(u.s();!(a=u.n()).done;){var d=a.value;if(d.is("$textProxy")&&d.hasAttribute(t)&&(this._addColorToDocumentColors(d.getAttribute(t)),this.documentColors.length>=i))return}}catch(h){u.e(h)}finally{u.f()}}}catch(h){o.e(h)}finally{o.f()}}},{key:"updateSelectedColors",value:function(){var e=this.documentColorsGrid,t=this.staticColorsGrid,n=this.selectedColor;t.selectedColor=n,e&&(e.selectedColor=n)}},{key:"render",value:function(){l(N(n.prototype),"render",this).call(this);var e,t=k(this.items);try{for(t.s();!(e=t.n()).done;){var i=e.value;this.focusTracker.add(i.element)}}catch(r){t.e(r)}finally{t.f()}this.keystrokes.listenTo(this.element)}},{key:"appendGrids",value:function(){if(!this.staticColorsGrid&&(this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount)){var e=Nc.bind(this.documentColors,this.documentColors),t=new nu(this.locale);t.text=this._documentColorsLabel,t.extendTemplate({attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]}}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}}},{key:"focus",value:function(){this._focusCycler.focusFirst()}},{key:"focusLast",value:function(){this._focusCycler.focusLast()}},{key:"_removeColorButton",value:function(){var e=this,t=new _u;return t.set({withText:!0,icon:'',tooltip:!0,label:this.removeButtonLabel}),t.class="ck-color-table__remove-color",t.on("execute",(function(){e.fire("execute",{value:null})})),t}},{key:"_createStaticColorsGrid",value:function(){var e=new Xf(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.delegate("execute").to(this),e}},{key:"_createDocumentColorsGrid",value:function(){var e=this,t=Nc.bind(this.documentColors,this.documentColors),n=new Xf(this.locale,{columns:this.columns});return n.delegate("execute").to(this),n.extendTemplate({attributes:{class:t.if("isEmpty","ck-hidden")}}),n.items.bindTo(this.documentColors).using((function(t){var n=new Zf;return n.set({color:t.color,hasBorder:t.options&&t.options.hasBorder}),t.label&&n.set({label:t.label,tooltip:!0}),n.on("execute",(function(){e.fire("execute",{value:t.color})})),n})),this.documentColors.on("change:isEmpty",(function(e,t,i){i&&(n.selectedColor=null)})),n}},{key:"_addColorToDocumentColors",value:function(e){var t=this.colorDefinitions.find((function(t){return t.color===e}));t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}]),n}(Zc),nv="fontSize",iv="fontColor";function rv(e){return function(t,n){var i=n.writer;return i.createAttributeElement("span",{style:"".concat(e,":").concat(t)},{priority:7})}}var ov=function(e){C(n,e);var t=A(n);function n(e){return w(this,n),t.call(this,e,iv)}return n}(Qf),av=function(e){C(n,e);var t=A(n);function n(e){var i,r;return w(this,n),i=t.call(this,e),e.config.define(iv,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:iv,value:(r="color",function(e){return e.getStyle(r).replace(/\s/g,"")})}}),e.conversion.for("downcast").attributeToElement({model:iv,view:rv("color")}),e.commands.add(iv,new ov(e)),e.model.schema.extend("$text",{allowAttributes:iv}),e.model.schema.setAttributeProperties(iv,{isFormatting:!0,copyOnEnter:!0}),i}return x(n,null,[{key:"pluginName",get:function(){return"FontColorEditing"}}]),n}(Vu);function sv(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:""+e.color}}}}var lv=function(e){C(n,e);var t=A(n);function n(e,i){var r,o=i.commandName,a=i.icon,s=i.componentName,l=i.dropdownLabel;return w(this,n),r=t.call(this,e),r.commandName=o,r.componentName=s,r.icon=a,r.dropdownLabel=l,r.columns=e.config.get(r.componentName+".columns"),r.colorTableView,r}return x(n,[{key:"init",value:function(){var e=this,t=this.editor,n=t.locale,i=n.t,r=t.commands.get(this.commandName),o=function(e,t){var n=e.t,i={Black:n("Black"),"Dim grey":n("Dim grey"),Grey:n("Grey"),"Light grey":n("Light grey"),White:n("White"),Red:n("Red"),Orange:n("Orange"),Yellow:n("Yellow"),"Light green":n("Light green"),Green:n("Green"),Aquamarine:n("Aquamarine"),Turquoise:n("Turquoise"),"Light blue":n("Light blue"),Blue:n("Blue"),Purple:n("Purple")};return t.map((function(e){var t=i[e.label];return t&&t!=e.label&&(e.label=t),e}))}(n,t.config.get(this.componentName).colors.map(sv).filter((function(e){return!!e}))),a=t.config.get(this.componentName+".documentColors");t.ui.componentFactory.add(this.componentName,(function(n){var s=Ou(n);return e.colorTableView=function(e){var t=e.dropdownView,n=e.colors,i=e.columns,r=e.removeButtonLabel,o=e.documentColorsLabel,a=e.documentColorsCount,s=t.locale,l=new tv(s,{colors:n,columns:i,removeButtonLabel:r,documentColorsLabel:o,documentColorsCount:a});return t.colorTableView=l,t.panelView.children.add(l),l.delegate("execute").to(t,"execute"),l}({dropdownView:s,colors:o.map((function(e){return{label:e.label,color:e.model,options:{hasBorder:e.hasBorder}}})),columns:e.columns,removeButtonLabel:i("Remove color"),documentColorsLabel:0!==a?i("Document colors"):void 0,documentColorsCount:void 0===a?e.columns:a}),e.colorTableView.bind("selectedColor").to(r,"value"),s.buttonView.set({label:e.dropdownLabel,icon:e.icon,tooltip:!0}),s.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),s.bind("isEnabled").to(r),s.on("execute",(function(n,i){t.execute(e.commandName,i),t.editing.view.focus()})),s.on("change:isOpen",(function(n,i,r){s.colorTableView.appendGrids(),r&&(0!==a&&e.colorTableView.updateDocumentColors(t.model,e.componentName),e.colorTableView.updateSelectedColors())})),s}))}}]),n}(Vu),cv=function(e){C(n,e);var t=A(n);function n(e){w(this,n);var i=e.locale.t;return t.call(this,e,{commandName:iv,componentName:iv,icon:'',dropdownLabel:i("Font Color")})}return x(n,null,[{key:"pluginName",get:function(){return"FontColorUI"}}]),n}(lv),uv=function(e){C(n,e);var t=A(n);function n(e){return w(this,n),t.call(this,e,nv)}return n}(Qf);function dv(e){return e.map((function(e){return function(e){if(t=e,"object"==R(t)&&t.title&&t.model&&t.view)return fv(e);var t,n=function(e){return hv[e]||hv[e.model]}(e);return n?fv(n):"default"===e?{model:void 0,title:"Default"}:function(e){var t;if("object"==R(e)){if(!e.model)throw new jn.b("font-size-invalid-definition: Provided font size definition is invalid.",null,e);t=parseFloat(e.model)}else t=parseFloat(e);return isNaN(t)}(e)?void 0:function(e){return"number"!=typeof e&&"string"!=typeof e||(e={title:String(e),model:parseFloat(e)+"px"}),e.view={name:"span",styles:{"font-size":e.model}},fv(e)}(e)}(e)})).filter((function(e){return!!e}))}var hv={get tiny(){return{title:"Tiny",model:"tiny",view:{name:"span",classes:"text-tiny",priority:7}}},get small(){return{title:"Small",model:"small",view:{name:"span",classes:"text-small",priority:7}}},get big(){return{title:"Big",model:"big",view:{name:"span",classes:"text-big",priority:7}}},get huge(){return{title:"Huge",model:"huge",view:{name:"span",classes:"text-huge",priority:7}}}};function fv(e){return e.view.priority||(e.view.priority=7),e}var vv=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),e.config.define(nv,{options:["tiny","small","default","big","huge"],supportAllValues:!1}),i}return x(n,null,[{key:"pluginName",get:function(){return"FontSizeEditing"}}]),x(n,[{key:"init",value:function(){var e=this.editor;e.model.schema.extend("$text",{allowAttributes:nv}),e.model.schema.setAttributeProperties(nv,{isFormatting:!0,copyOnEnter:!0});var t=e.config.get("fontSize.supportAllValues"),n=dv(this.editor.config.get("fontSize.options")).filter((function(e){return e.model})),i=function(e,t){var n,i={model:{key:e,values:[]},view:{},upcastAlso:{}},r=k(t);try{for(r.s();!(n=r.n()).done;){var o=n.value;i.model.values.push(o.model),i.view[o.model]=o.view,o.upcastAlso&&(i.upcastAlso[o.model]=o.upcastAlso)}}catch(a){r.e(a)}finally{r.f()}return i}(nv,n);t?this._prepareAnyValueConverters(i):e.conversion.attributeToElement(i),e.commands.add(nv,new uv(e))}},{key:"_prepareAnyValueConverters",value:function(e){var t=this.editor,n=e.model.values.filter((function(e){return!String(e).match(/[\d.]+[\w%]+/)}));if(n.length)throw new jn.b("font-size-invalid-use-of-named-presets: If config.fontSize.supportAllValues is set to true, you need to use numerical values as font size options.",null,{presets:n});t.conversion.for("downcast").attributeToElement({model:nv,view:function(e,t){var n=t.writer;if(e)return n.createAttributeElement("span",{style:"font-size:"+e},{priority:7})}}),t.conversion.for("upcast").attributeToAttribute({model:{key:nv,value:function(e){return e.getStyle("font-size")}},view:{name:"span"}})}}]),n}(Vu),pv=function e(t,n){w(this,e),n&&cr(this,n),t&&this.set(t)};Kn(pv,vr),n(53);var mv=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this,t=this.editor,n=t.t,i=this._getLocalizedOptions(),r=t.commands.get(nv);t.ui.componentFactory.add(nv,(function(o){var a=Ou(o);return Iu(a,function(e,t){var n,i=new Jn,r=k(e);try{var o=function(){var e=n.value,r={type:"button",model:new pv({commandName:nv,commandParam:e.model,label:e.title,class:"ck-fontsize-option",withText:!0})};e.view&&e.view.styles&&r.model.set("labelStyle","font-size:"+e.view.styles["font-size"]),e.view&&e.view.classes&&r.model.set("class","".concat(r.model.class," ").concat(e.view.classes)),r.model.bind("isOn").to(t,"value",(function(t){return t===e.model})),i.add(r)};for(r.s();!(n=r.n()).done;)o()}catch(a){r.e(a)}finally{r.f()}return i}(i,r)),a.buttonView.set({label:n("Font Size"),icon:'',tooltip:!0}),a.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),a.bind("isEnabled").to(r),e.listenTo(a,"execute",(function(e){t.execute(e.source.commandName,{value:e.source.commandParam}),t.editing.view.focus()})),a}))}},{key:"_getLocalizedOptions",value:function(){var e=this.editor,t=e.t,n={Default:t("Default"),Tiny:t("Tiny"),Small:t("Small"),Big:t("Big"),Huge:t("Huge")};return dv(e.config.get(nv).options).map((function(e){var t=n[e.title];return t&&t!=e.title&&(e=Object.assign({},e,{title:t})),e}))}}]),n}(Vu),gv=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"refresh",value:function(){var e=this.editor.model,t=Hu(e.document.selection.getSelectedBlocks());this.value=!!t&&t.is("element","paragraph"),this.isEnabled=!!t&&kv(t,e.schema)}},{key:"execute",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.editor.model,n=t.document;t.change((function(i){var r,o=(e.selection||n.selection).getSelectedBlocks(),a=k(o);try{for(a.s();!(r=a.n()).done;){var s=r.value;!s.is("element","paragraph")&&kv(s,t.schema)&&i.rename(s,"paragraph")}}catch(l){a.e(l)}finally{a.f()}}))}}]),n}(Fu);function kv(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}var bv=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"execute",value:function(e){var t=this.editor.model,n=e.position;t.change((function(e){var i=e.createElement("paragraph");if(!t.schema.checkChild(n.parent,i)){var r=t.schema.findAllowedParent(n,i);if(!r)return;n=e.split(n,r).position}t.insertContent(i,n),e.setSelection(i,"in")}))}}]),n}(Fu),yv=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor,t=e.model;e.commands.add("paragraph",new gv(e)),e.commands.add("insertParagraph",new bv(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:function(e,t){var i=t.writer;return n.paragraphLikeElements.has(e.name)?e.isEmpty?null:i.createElement("paragraph"):null},view:/.+/,converterPriority:"low"})}}],[{key:"pluginName",get:function(){return"Paragraph"}}]),n}(Vu);yv.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);var wv=function(e){C(n,e);var t=A(n);function n(e,i){var r;return w(this,n),r=t.call(this,e),r.modelElements=i,r}return x(n,[{key:"refresh",value:function(){var e=this,t=Hu(this.editor.model.document.selection.getSelectedBlocks());this.value=!!t&&this.modelElements.includes(t.name)&&t.name,this.isEnabled=!!t&&this.modelElements.some((function(n){return _v(t,n,e.editor.model.schema)}))}},{key:"execute",value:function(e){var t=this.editor.model,n=t.document,i=e.value;t.change((function(e){var r,o=Array.from(n.selection.getSelectedBlocks()).filter((function(e){return _v(e,i,t.schema)})),a=k(o);try{for(a.s();!(r=a.n()).done;){var s=r.value;s.is("element",i)||e.rename(s,i)}}catch(l){a.e(l)}finally{a.f()}}))}}]),n}(Fu);function _v(e,t,n){return n.checkChild(e.parent,t)&&!n.isObject(e)}var xv="paragraph",Cv=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]}),i}return x(n,null,[{key:"pluginName",get:function(){return"HeadingEditing"}}]),x(n,[{key:"init",value:function(){var e,t=this.editor,n=t.config.get("heading.options"),i=[],r=k(n);try{for(r.s();!(e=r.n()).done;){var o=e.value;o.model!==xv&&(t.model.schema.register(o.model,{inheritAllFrom:"$block"}),t.conversion.elementToElement(o),i.push(o.model))}}catch(a){r.e(a)}finally{r.f()}this._addDefaultH1Conversion(t),t.commands.add("heading",new wv(t,i))}},{key:"afterInit",value:function(){var e=this.editor,t=e.commands.get("enter"),n=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",(function(t,i){var r=e.model.document.selection.getFirstPosition().parent;n.some((function(e){return r.is("element",e.model)}))&&!r.is("element",xv)&&0===r.childCount&&i.writer.rename(r,xv)}))}},{key:"_addDefaultH1Conversion",value:function(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:zn.get("low")+1})}}],[{key:"requires",get:function(){return[yv]}}]),n}(Vu);n(11);var Av=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this,t=this.editor,n=t.t,i=function(e){var t=e.t,n={Paragraph:t("Paragraph"),"Heading 1":t("Heading 1"),"Heading 2":t("Heading 2"),"Heading 3":t("Heading 3"),"Heading 4":t("Heading 4"),"Heading 5":t("Heading 5"),"Heading 6":t("Heading 6")};return e.config.get("heading.options").map((function(e){var t=n[e.title];return t&&t!=e.title&&(e.title=t),e}))}(t),r=n("Choose heading"),o=n("Heading");t.ui.componentFactory.add("heading",(function(n){var a,s={},l=new Jn,c=t.commands.get("heading"),u=t.commands.get("paragraph"),d=[c],h=k(i);try{var f=function(){var e=a.value,t={type:"button",model:new pv({label:e.title,class:e.class,withText:!0})};"paragraph"===e.model?(t.model.bind("isOn").to(u,"value"),t.model.set("commandName","paragraph"),d.push(u)):(t.model.bind("isOn").to(c,"value",(function(t){return t===e.model})),t.model.set({commandName:"heading",commandValue:e.model})),l.add(t),s[e.model]=e.title};for(h.s();!(a=h.n()).done;)f()}catch(p){h.e(p)}finally{h.f()}var v=Ou(n);return Iu(v,l),v.buttonView.set({isOn:!1,withText:!0,tooltip:o}),v.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),v.bind("isEnabled").toMany(d,"isEnabled",(function(){for(var e=arguments.length,t=new Array(e),n=0;n\n',"image/svg+xml").firstChild,Ev="ck-widget__type-around_disabled",Sv=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i._currentFakeCaretModelElement=null,i}return x(n,null,[{key:"pluginName",get:function(){return"WidgetTypeAround"}}]),x(n,[{key:"init",value:function(){var e=this.editor,t=e.editing.view;this.on("change:isEnabled",(function(n,i,r){t.change((function(e){var n,i=k(t.document.roots);try{for(i.s();!(n=i.n()).done;){var o=n.value;r?e.removeClass(Ev,o):e.addClass(Ev,o)}}catch(a){i.e(a)}finally{i.f()}})),r||e.model.change((function(e){e.removeSelectionAttribute(xd)}))})),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration()}},{key:"destroy",value:function(){this._currentFakeCaretModelElement=null}},{key:"_insertParagraph",value:function(e,t){var n=this.editor,i=n.editing.view;n.execute("insertParagraph",{position:n.model.createPositionAt(e,t)}),i.focus(),i.scrollToTheSelection()}},{key:"_listenToIfEnabled",value:function(e,t,n,i){var r=this;this.listenTo(e,t,(function(){r.isEnabled&&n.apply(void 0,arguments)}),i)}},{key:"_insertParagraphAccordingToFakeCaretPosition",value:function(){var e=this.editor.model.document.selection,t=Ad(e);if(!t)return!1;var n=e.getSelectedElement();return this._insertParagraph(n,t),!0}},{key:"_enableTypeAroundUIInjection",value:function(){var e=this.editor,t=e.model.schema,n=e.locale.t,i={before:n("Insert paragraph before block"),after:n("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",(function(e,n,r){var o=r.mapper.toViewElement(n.item);Cd(o,n.item,t)&&function(e,t,n){var i=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(e){var n=this.toDomElement(e);return function(e,t){var n,i=k(Tv);try{for(i.s();!(n=i.n()).done;){var r=n.value,o=new Nc({tag:"div",attributes:{class:["ck","ck-widget__type-around__button","ck-widget__type-around__button_"+r],title:t[r]},children:[e.ownerDocument.importNode(Pv,!0)]});e.appendChild(o.render())}}catch(a){i.e(a)}finally{i.f()}}(n,t),function(e){var t=new Nc({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(n),n}));e.insert(e.createPositionAt(n,"end"),i)}(r.writer,i,o)}),{priority:"low"})}},{key:"_enableTypeAroundFakeCaretActivationUsingKeyboardArrows",value:function(){var e=this,t=this.editor,n=t.model,i=n.document.selection,r=n.schema,o=t.editing.view;function a(e){return"ck-widget_type-around_show-fake-caret_"+e}this._listenToIfEnabled(o.document,"keydown",(function(t,n){$r(n.keyCode)&&e._handleArrowKeyPress(t,n)}),{priority:zn.get("high")+10}),this._listenToIfEnabled(i,"change:range",(function(e,n){n.directChange&&t.model.change((function(e){e.removeSelectionAttribute(xd)}))})),this._listenToIfEnabled(n.document,"change:data",(function(){var e=i.getSelectedElement();e&&Cd(t.editing.mapper.toViewElement(e),e,r)||t.model.change((function(e){e.removeSelectionAttribute(xd)}))})),this._listenToIfEnabled(t.editing.downcastDispatcher,"selection",(function(t,n,i){var o=i.writer;if(e._currentFakeCaretModelElement){var s=i.mapper.toViewElement(e._currentFakeCaretModelElement);s&&(o.removeClass(Tv.map(a),s),e._currentFakeCaretModelElement=null)}var l=n.selection.getSelectedElement();if(l){var c=i.mapper.toViewElement(l);if(Cd(c,l,r)){var u=Ad(n.selection);u&&(o.addClass(a(u),c),e._currentFakeCaretModelElement=l)}}})),this._listenToIfEnabled(t.ui.focusTracker,"change:isFocused",(function(e,n,i){i||t.model.change((function(e){e.removeSelectionAttribute(xd)}))}))}},{key:"_handleArrowKeyPress",value:function(e,t){var n,i=this.editor,r=i.model,o=r.document.selection,a=r.schema,s=i.editing.view,l=qr(t.keyCode,i.locale.contentLanguageDirection),c=s.document.selection.getSelectedElement();Cd(c,i.editing.mapper.toModelElement(c),a)?n=this._handleArrowKeyPressOnSelectedWidget(l):o.isCollapsed&&(n=this._handleArrowKeyPressWhenSelectionNextToAWidget(l)),n&&(t.preventDefault(),e.stop())}},{key:"_handleArrowKeyPressOnSelectedWidget",value:function(e){var t=this.editor.model,n=Ad(t.document.selection);return t.change((function(t){return n?n!==(e?"after":"before")&&(t.removeSelectionAttribute(xd),!0):(t.setSelectionAttribute(xd,e?"after":"before"),!0)}))}},{key:"_handleArrowKeyPressWhenSelectionNextToAWidget",value:function(e){var t=this.editor,n=t.model,i=n.schema,r=t.plugins.get("Widget"),o=r._getObjectElementNextToSelection(e);return!!Cd(t.editing.mapper.toViewElement(o),o,i)&&(n.change((function(t){r._setSelectionOverElement(o),t.setSelectionAttribute(xd,e?"before":"after")})),!0)}},{key:"_enableInsertingParagraphsOnButtonClick",value:function(){var e=this,t=this.editor,n=t.editing.view;this._listenToIfEnabled(n.document,"mousedown",(function(i,r){var o=r.domTarget.closest(".ck-widget__type-around__button");if(o){var a=function(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(o),s=function(e,t){var n=e.closest(".ck-widget");return t.mapDomToView(n)}(o,n.domConverter),l=t.editing.mapper.toModelElement(s);e._insertParagraph(l,a),r.preventDefault(),i.stop()}}))}},{key:"_enableInsertingParagraphsOnEnterKeypress",value:function(){var e=this,t=this.editor,n=t.editing.view;this._listenToIfEnabled(n.document,"enter",(function(i,r){var o,a=n.document.selection.getSelectedElement(),s=t.editing.mapper.toModelElement(a),l=t.model.schema;e._insertParagraphAccordingToFakeCaretPosition()?o=!0:Cd(a,s,l)&&(e._insertParagraph(s,r.isSoft?"before":"after"),o=!0),o&&(r.preventDefault(),i.stop())}))}},{key:"_enableInsertingParagraphsOnTypingKeystroke",value:function(){var e=this,t=this.editor.editing.view,n=[Br.enter,Br.delete,Br.backspace];this._listenToIfEnabled(t.document,"keydown",(function(t,i){n.includes(i.keyCode)||ih(i)||e._insertParagraphAccordingToFakeCaretPosition()}),{priority:zn.get("high")+1})}},{key:"_enableDeleteIntegration",value:function(){var e=this.editor,t=e.editing.view,n=e.model,i=n.schema;this._listenToIfEnabled(t.document,"delete",(function(t,r){var o=Ad(n.document.selection);if(o){var a=r.direction,s=n.document.selection.getSelectedElement(),l="forward"==a;if("before"===o===l)e.execute("delete",{selection:n.createSelection(s,"on")});else{var c=i.getNearestSelectionRange(n.createPositionAt(s,o),a);if(c)if(c.isCollapsed){var u=n.createSelection(c.start);if(n.modifySelection(u,{direction:a}),u.focus.isEqual(c.start)){var d=function(e,t){var n,i=t,r=k(t.getAncestors({parentFirst:!0}));try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.childCount>1||e.isLimit(o))break;i=o}}catch(a){r.e(a)}finally{r.f()}return i}(i,c.start.parent);n.deleteContent(n.createSelection(d,"on"),{doNotAutoparagraph:!0})}else n.change((function(t){t.setSelection(c),e.execute(l?"forwardDelete":"delete")}))}else n.change((function(t){t.setSelection(c),e.execute(l?"forwardDelete":"delete")}))}r.preventDefault(),t.stop()}}),{priority:zn.get("high")+1})}},{key:"_enableInsertContentIntegration",value:function(){var e=this.editor,t=this.editor.model,n=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",(function(e,i){var r=v(i,2),o=r[0],a=r[1];if(!a||a.is("documentSelection")){var s=Ad(n);return s?(e.stop(),t.change((function(e){var i=n.getSelectedElement(),r=t.createPositionAt(i,s),a=e.createSelection(r),l=t.insertContent(o,a);return e.setSelection(a),l}))):void 0}}),{priority:"high"})}}]),n}(Vu);function Ov(e){var t=e.model;return function(n,i){var r=i.keyCode==Br.arrowup,o=i.keyCode==Br.arrowdown,a=i.shiftKey,s=t.document.selection;if(r||o){var l=o;if(!a||!function(e,t){return!e.isCollapsed&&e.isBackward==t}(s,l)){var c=function(e,t,n){var i=e.model;if(n){var r=t.isCollapsed?t.focus:t.getLastPosition(),o=Mv(i,r,"forward");if(!o)return null;var a=i.createRange(r,o),s=Iv(i.schema,a,"backward");return s&&r.isBefore(s)?i.createRange(r,s):null}var l=t.isCollapsed?t.focus:t.getFirstPosition(),c=Mv(i,l,"backward");if(!c)return null;var u=i.createRange(c,l),d=Iv(i.schema,u,"forward");return d&&l.isAfter(d)?i.createRange(d,l):null}(e,s,l);c&&!c.isCollapsed&&function(e,t,n){var i=e.model,r=e.view.domConverter;if(n){var o=i.createSelection(t.start);i.modifySelection(o),o.focus.isAtEnd||t.start.isEqual(o.focus)||(t=i.createRange(o.focus,t.end))}var a,s,l=e.mapper.toViewRange(t),c=r.viewRangeToDom(l),u=Ia.getDomRangeRects(c),d=k(u);try{for(d.s();!(s=d.n()).done;){var h=s.value;if(void 0!==a){if(Math.round(h.top)>=a)return!1;a=Math.max(a,Math.round(h.bottom))}else a=Math.round(h.bottom)}}catch(f){d.e(f)}finally{d.f()}return!0}(e,c,l)&&(t.change((function(e){var n=l?c.end:c.start;if(a){var i=t.createSelection(s.anchor);i.setFocus(n),e.setSelection(i)}else e.setSelection(n)})),n.stop(),i.preventDefault(),i.stopPropagation())}}}}function Mv(e,t,n){var i,r=e.schema,o=e.createRangeIn(t.root),a="forward"==n?"elementStart":"elementEnd",s=k(o.getWalker({startPosition:t,direction:n}));try{for(s.s();!(i=s.n()).done;){var l=i.value,c=l.previousPosition,u=l.item,d=l.type;if(r.isLimit(u)&&!r.isInline(u))return c;if(d==a&&r.isBlock(u))return null}}catch(h){s.e(h)}finally{s.f()}return null}function Iv(e,t,n){var i="backward"==n?t.end:t.start;if(e.checkChild(i,"$text"))return i;var r,o=k(t.getWalker({direction:n}));try{for(o.s();!(r=o.n()).done;){var a=r.value.nextPosition;if(e.checkChild(a,"$text"))return a}}catch(s){o.e(s)}finally{o.f()}}n(58);var Nv=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this,t=this.editor.editing.view,n=t.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",(function(t,n,i){e._clearPreviouslySelectedWidgets(i.writer);var r,o=i.writer,a=o.document.selection,s=a.getSelectedElement(),l=null,c=k(a.getRanges());try{for(c.s();!(r=c.n()).done;){var u,d=r.value,h=k(d);try{for(h.s();!(u=h.n()).done;){var f=u.value,v=f.item;Pd(v)&&!Rv(v,l)&&(o.addClass(Td,v),e._previouslySelected.add(v),l=v,v==s&&o.setSelection(a.getRanges(),{fake:!0,label:Od(s)}))}}catch(p){h.e(p)}finally{h.f()}}}catch(p){c.e(p)}finally{c.f()}}),{priority:"low"}),t.addObserver(Wd),this.listenTo(n,"mousedown",(function(){return e._onMousedown.apply(e,arguments)})),this.listenTo(n,"keydown",(function(){e._handleSelectionChangeOnArrowKeyPress.apply(e,arguments)}),{priority:"high"}),this.listenTo(n,"keydown",(function(){e._preventDefaultOnArrowKeyPress.apply(e,arguments)}),{priority:zn.get("high")-20}),this.listenTo(n,"keydown",Ov(this.editor.editing)),this.listenTo(n,"delete",(function(t,n){e._handleDelete("forward"==n.direction)&&(n.preventDefault(),t.stop())}),{priority:"high"})}},{key:"_onMousedown",value:function(e,t){var n=this.editor,i=n.editing.view,r=i.document,o=t.target;if(function(e){for(;e;){if(e.is("editableElement")&&!e.is("rootElement"))return!0;if(Pd(e))return!1;e=e.parent}return!1}(o)){if((zr.isSafari||zr.isGecko)&&t.domEvent.detail>=3){var a=n.editing.mapper,s=o.is("attributeElement")?o.findAncestor((function(e){return!e.is("attributeElement")})):o,l=a.toModelElement(s);t.preventDefault(),this.editor.model.change((function(e){e.setSelection(l,"in")}))}}else if(Pd(o)||(o=o.findAncestor(Pd),o)){t.preventDefault(),r.isFocused||i.focus();var c=n.editing.mapper.toModelElement(o);this._setSelectionOverElement(c)}}},{key:"_handleSelectionChangeOnArrowKeyPress",value:function(e,t){var n=t.keyCode;if($r(n)){var i=this.editor.model,r=i.schema,o=i.document.selection,a=o.getSelectedElement(),s=qr(n,this.editor.locale.contentLanguageDirection);if(a&&r.isObject(a)){var l=s?o.getLastPosition():o.getFirstPosition(),c=r.getNearestSelectionRange(l,s?"forward":"backward");c&&(i.change((function(e){e.setSelection(c)})),t.preventDefault(),e.stop())}else if(o.isCollapsed){var u=this._getObjectElementNextToSelection(s);u&&r.isObject(u)&&(this._setSelectionOverElement(u),t.preventDefault(),e.stop())}}}},{key:"_preventDefaultOnArrowKeyPress",value:function(e,t){if($r(t.keyCode)){var n=this.editor.model,i=n.schema,r=n.document.selection.getSelectedElement();r&&i.isObject(r)&&(t.preventDefault(),e.stop())}}},{key:"_handleDelete",value:function(e){var t=this;if(!this.editor.isReadOnly){var n=this.editor.model.document.selection;if(n.isCollapsed){var i=this._getObjectElementNextToSelection(e);return i?(this.editor.model.change((function(e){for(var r=n.anchor.parent;r.isEmpty;){var o=r;r=o.parent,e.remove(o)}t._setSelectionOverElement(i)})),!0):void 0}}}},{key:"_setSelectionOverElement",value:function(e){this.editor.model.change((function(t){t.setSelection(t.createRangeOn(e))}))}},{key:"_getObjectElementNextToSelection",value:function(e){var t=this.editor.model,n=t.schema,i=t.document.selection,r=t.createSelection(i);t.modifySelection(r,{direction:e?"forward":"backward"});var o=e?r.focus.nodeBefore:r.focus.nodeAfter;return o&&n.isObject(o)?o:null}},{key:"_clearPreviouslySelectedWidgets",value:function(e){var t,n=k(this._previouslySelected);try{for(n.s();!(t=n.n()).done;){var i=t.value;e.removeClass(Td,i)}}catch(r){n.e(r)}finally{n.f()}this._previouslySelected.clear()}}],[{key:"pluginName",get:function(){return"Widget"}},{key:"requires",get:function(){return[Sv]}}]),n}(Vu);function Rv(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}var Dv=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"refresh",value:function(){var e=this.editor.model.document.selection.getSelectedElement();this.isEnabled=zd(e),zd(e)&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}},{key:"execute",value:function(e){var t=this.editor.model,n=t.document.selection.getSelectedElement();t.change((function(t){t.setAttribute("alt",e.newValue,n)}))}}]),n}(Fu),Lv=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){this.editor.commands.add("imageTextAlternative",new Dv(this.editor))}}],[{key:"pluginName",get:function(){return"ImageTextAlternativeEditing"}}]),n}(Vu);n(60);var zv=function(e){C(n,e);var t=A(n);function n(e,i){var r;w(this,n),r=t.call(this,e);var o="ck-labeled-field-view-"+Ln(),a="ck-labeled-field-view-status-"+Ln();r.fieldView=i(P(r),o,a),r.set("label"),r.set("isEnabled",!0),r.set("errorText",null),r.set("infoText",null),r.set("class"),r.labelView=r._createLabelView(o),r.statusView=r._createStatusView(a),r.bind("_statusText").to(P(r),"errorText",P(r),"infoText",(function(e,t){return e||t}));var s=r.bindTemplate;return r.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",s.to("class"),s.if("isEnabled","ck-disabled",(function(e){return!e}))]},children:[r.labelView,r.fieldView,r.statusView]}),r}return x(n,[{key:"_createLabelView",value:function(e){var t=new nu(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}},{key:"_createStatusView",value:function(e){var t=new Zc(this.locale),n=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",n.if("errorText","ck-labeled-field-view__status_error"),n.if("_statusText","ck-hidden",(function(e){return!e}))],id:e,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),t}},{key:"focus",value:function(){this.fieldView.focus()}}]),n}(Zc);n(62);var jv=function(e){C(n,e);var t=A(n);function n(e){var i;w(this,n),i=t.call(this,e),i.set("value"),i.set("id"),i.set("placeholder"),i.set("isReadOnly",!1),i.set("hasError",!1),i.set("ariaDescribedById");var r=i.bindTemplate;return i.setTemplate({tag:"input",attributes:{type:"text",class:["ck","ck-input","ck-input-text",r.if("hasError","ck-error")],id:r.to("id"),placeholder:r.to("placeholder"),readonly:r.to("isReadOnly"),"aria-invalid":r.if("hasError",!0),"aria-describedby":r.to("ariaDescribedById")},on:{input:r.to("input")}}),i}return x(n,[{key:"render",value:function(){var e=this;l(N(n.prototype),"render",this).call(this);var t=function(t){e.element.value=t||0===t?t:""};t(this.value),this.on("change:value",(function(e,n,i){t(i)}))}},{key:"select",value:function(){this.element.select()}},{key:"focus",value:function(){this.element.focus()}}]),n}(Zc);function Vv(e,t,n){var i=new jv(e.locale);return i.set({id:t,ariaDescribedById:n}),i.bind("isReadOnly").to(e,"isEnabled",(function(e){return!e})),i.bind("hasError").to(e,"errorText",(function(e){return!!e})),i.on("input",(function(){e.errorText=null})),i}function Bv(e){var t=e.view;t.listenTo(t.element,"submit",(function(e,n){n.preventDefault(),t.fire("submit")}),{useCapture:!0})}var Fv='',Uv='';n(64);var Hv=function(e){C(n,e);var t=A(n);function n(e){var i;w(this,n),i=t.call(this,e);var r=i.locale.t;return i.focusTracker=new xc,i.keystrokes=new vc,i.labeledInput=i._createLabeledInputView(),i.saveButtonView=i._createButton(r("Save"),Fv,"ck-button-save"),i.saveButtonView.type="submit",i.cancelButtonView=i._createButton(r("Cancel"),Uv,"ck-button-cancel","cancel"),i._focusables=new Ic,i._focusCycler=new cu({focusables:i._focusables,focusTracker:i.focusTracker,keystrokeHandler:i.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),i.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form"],tabindex:"-1"},children:[i.labeledInput,i.saveButtonView,i.cancelButtonView]}),i}return x(n,[{key:"render",value:function(){var e=this;l(N(n.prototype),"render",this).call(this),this.keystrokes.listenTo(this.element),Bv({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((function(t){e._focusables.add(t),e.focusTracker.add(t.element)}))}},{key:"_createButton",value:function(e,t,n,i){var r=new _u(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.extendTemplate({attributes:{class:n}}),i&&r.delegate("execute").to(this,i),r}},{key:"_createLabeledInputView",value:function(){var e=this.locale.t,t=new zv(this.locale,Vv);return t.label=e("Text alternative"),t.fieldView.placeholder=e("Text alternative"),t}}]),n}(Zc);n(66),n(68);var $v=au("px"),Wv=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.positionLimiter=function(){var e=i.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},i.set("visibleView",null),i.view=new kd(e.locale),e.ui.view.body.add(i.view),e.ui.focusTracker.add(i.view.element),i._viewToStack=new Map,i._idToStack=new Map,i.set("_numberOfStacks",0),i.set("_singleViewMode",!1),i._rotatorView=i._createRotatorView(),i._fakePanelsView=i._createFakePanelsView(),i}return x(n,null,[{key:"pluginName",get:function(){return"ContextualBalloon"}}]),x(n,[{key:"hasView",value:function(e){return Array.from(this._viewToStack.keys()).includes(e)}},{key:"add",value:function(e){if(this.hasView(e.view))throw new jn.b("contextualballoon-add-view-exist: Cannot add configuration of the same view twice.",[this,e]);var t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));var n=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),n.set(e.view,e),this._viewToStack.set(e.view,n),n===this._visibleStack&&this._showView(e)}},{key:"remove",value:function(e){if(!this.hasView(e))throw new jn.b("contextualballoon-remove-view-not-exist: Cannot remove the configuration of a non-existent view.",[this,e]);var t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}},{key:"updatePosition",value:function(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}},{key:"showStack",value:function(e){this.visibleStack=e;var t=this._idToStack.get(e);if(!t)throw new jn.b("contextualballoon-showstack-stack-not-exist: Cannot show a stack that does not exist.",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}},{key:"_getStackId",value:function(e){return Array.from(this._idToStack.entries()).find((function(t){return t[1]===e}))[0]}},{key:"_showNextStack",value:function(){var e=Array.from(this._idToStack.values()),t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}},{key:"_showPrevStack",value:function(){var e=Array.from(this._idToStack.values()),t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}},{key:"_createRotatorView",value:function(){var e=this,t=new qv(this.editor.locale),n=this.editor.locale.t;return this.view.content.add(t),t.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(function(e,t){return!t&&e>1})),t.on("change:isNavigationVisible",(function(){return e.updatePosition()}),{priority:"low"}),t.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(function(t,i){if(i<2)return"";var r=Array.from(e._idToStack.values()).indexOf(e._visibleStack)+1;return n("%0 of %1",[r,i])})),t.buttonNextView.on("execute",(function(){t.focusTracker.isFocused&&e.editor.editing.view.focus(),e._showNextStack()})),t.buttonPrevView.on("execute",(function(){t.focusTracker.isFocused&&e.editor.editing.view.focus(),e._showPrevStack()})),t}},{key:"_createFakePanelsView",value:function(){var e=new Yv(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(function(e,t){return!t&&e>=2?Math.min(e-1,2):0})),e.listenTo(this.view,"change:top",(function(){return e.updatePosition()})),e.listenTo(this.view,"change:left",(function(){return e.updatePosition()})),this.editor.ui.view.body.add(e),e}},{key:"_showView",value:function(e){var t=e.view,n=e.balloonClassName,i=void 0===n?"":n,r=e.withArrow,o=void 0===r||r,a=e.singleViewMode,s=void 0!==a&&a;this.view.class=i,this.view.withArrow=o,this._rotatorView.showView(t),this.visibleView=t,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),s&&(this._singleViewMode=!0)}},{key:"_getBalloonPosition",value:function(){var e=Array.from(this._visibleStack.values()).pop().position;return e&&!e.limiter&&(e=Object.assign({},e,{limiter:this.positionLimiter})),e}},{key:"_visibleStack",get:function(){return this._viewToStack.get(this.visibleView)}}]),n}(Vu),qv=function(e){C(n,e);var t=A(n);function n(e){var i;w(this,n),i=t.call(this,e);var r=e.t,o=i.bindTemplate;return i.set("isNavigationVisible",!0),i.focusTracker=new xc,i.buttonPrevView=i._createButtonView(r("Previous"),''),i.buttonNextView=i._createButtonView(r("Next"),''),i.content=i.createCollection(),i.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",o.to("isNavigationVisible",(function(e){return e?"":"ck-hidden"}))]},children:[i.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:o.to("counter")}]},i.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:i.content}]}),i}return x(n,[{key:"render",value:function(){l(N(n.prototype),"render",this).call(this),this.focusTracker.add(this.element)}},{key:"showView",value:function(e){this.hideView(),this.content.add(e)}},{key:"hideView",value:function(){this.content.clear()}},{key:"_createButtonView",value:function(e,t){var n=new _u(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n}}]),n}(Zc),Yv=function(e){C(n,e);var t=A(n);function n(e,i){var r;w(this,n),r=t.call(this,e);var o=r.bindTemplate;return r.set("top",0),r.set("left",0),r.set("height",0),r.set("width",0),r.set("numberOfPanels",0),r.content=r.createCollection(),r._balloonPanelView=i,r.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",o.to("numberOfPanels",(function(e){return e?"":"ck-hidden"}))],style:{top:o.to("top",$v),left:o.to("left",$v),width:o.to("width",$v),height:o.to("height",$v)}},children:r.content}),r.on("change:numberOfPanels",(function(e,t,n,i){n>i?r._addPanels(n-i):r._removePanels(i-n),r.updatePosition()})),r}return x(n,[{key:"_addPanels",value:function(e){for(;e--;){var t=new Zc;t.setTemplate({tag:"div"}),this.content.add(t),this.registerChild(t)}}},{key:"_removePanels",value:function(e){for(;e--;){var t=this.content.last;this.content.remove(t),this.deregisterChild(t),t.destroy()}}},{key:"updatePosition",value:function(){if(this.numberOfPanels){var e=this._balloonPanelView,t=e.top,n=e.left,i=new Ia(this._balloonPanelView.element),r=i.width,o=i.height;Object.assign(this,{top:t,left:n,width:r,height:o})}}}]),n}(Zc);function Gv(e){var t=e.editing.view,n=kd.defaultPositions;return{target:t.domConverter.viewToDom(t.document.selection.getSelectedElement()),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast]}}var Kv=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){this._createButton(),this._createForm()}},{key:"destroy",value:function(){l(N(n.prototype),"destroy",this).call(this),this._form.destroy()}},{key:"_createButton",value:function(){var e=this,t=this.editor,n=t.t;t.ui.componentFactory.add("imageTextAlternative",(function(i){var r=t.commands.get("imageTextAlternative"),o=new _u(i);return o.set({label:n("Change image text alternative"),icon:'',tooltip:!0}),o.bind("isEnabled").to(r,"isEnabled"),e.listenTo(o,"execute",(function(){e._showForm()})),o}))}},{key:"_createForm",value:function(){var e=this,t=this.editor,n=t.editing.view.document;this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new Hv(t.locale),this._form.render(),this.listenTo(this._form,"submit",(function(){t.execute("imageTextAlternative",{newValue:e._form.labeledInput.fieldView.element.value}),e._hideForm(!0)})),this.listenTo(this._form,"cancel",(function(){e._hideForm(!0)})),this._form.keystrokes.set("Esc",(function(t,n){e._hideForm(!0),n()})),this.listenTo(t.ui,"update",(function(){Ld(n.selection)?e._isVisible&&function(e){var t=e.plugins.get("ContextualBalloon");if(Ld(e.editing.view.document.selection)){var n=Gv(e);t.updatePosition(n)}}(t):e._hideForm(!0)})),Su({emitter:this._form,activator:function(){return e._isVisible},contextElements:[this._balloon.view.element],callback:function(){return e._hideForm()}})}},{key:"_showForm",value:function(){if(!this._isVisible){var e=this.editor,t=e.commands.get("imageTextAlternative"),n=this._form.labeledInput;this._isInBalloon||this._balloon.add({view:this._form,position:Gv(e)}),n.fieldView.value=n.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select()}}},{key:"_hideForm",value:function(e){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}},{key:"_isVisible",get:function(){return this._balloon.visibleView===this._form}},{key:"_isInBalloon",get:function(){return this._balloon.hasView(this._form)}}],[{key:"requires",get:function(){return[Wv]}},{key:"pluginName",get:function(){return"ImageTextAlternativeUI"}}]),n}(Vu),Jv=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[Lv,Kv]}},{key:"pluginName",get:function(){return"ImageTextAlternative"}}]),n}(Vu);n(70);var Qv=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[Hd,Nv,Jv]}},{key:"pluginName",get:function(){return"Image"}}]),n}(Vu);function Zv(e){var t,n=k(e.getChildren());try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i&&i.is("element","caption"))return i}}catch(r){n.e(r)}finally{n.f()}return null}function Xv(e){var t=e.parent;return"figcaption"==e.name&&t&&"figure"==t.name&&t.hasClass("image")?{name:!0}:null}var ep=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this,t=this.editor,n=t.editing.view,i=t.model.schema,r=t.data,o=t.editing,a=t.t;i.register("caption",{allowIn:"image",allowContentOf:"$block",isLimit:!0}),t.model.document.registerPostFixer((function(t){return e._insertMissingModelCaptionElement(t)})),t.conversion.for("upcast").elementToElement({view:Xv,model:"caption"}),r.downcastDispatcher.on("insert:caption",tp((function(e){return e.createContainerElement("figcaption")}),!1));var s=function(e,t){return function(n){var i=n.createEditableElement("figcaption");return n.setCustomProperty("imageCaption",!0,i),Tc({view:e,element:i,text:t}),Md(i,n)}}(n,a("Enter image caption"));o.downcastDispatcher.on("insert:caption",tp(s)),o.downcastDispatcher.on("insert",this._fixCaptionVisibility((function(e){return e.item})),{priority:"high"}),o.downcastDispatcher.on("remove",this._fixCaptionVisibility((function(e){return e.position.parent})),{priority:"high"}),n.document.registerPostFixer((function(t){return e._updateCaptionVisibility(t)}))}},{key:"_updateCaptionVisibility",value:function(e){var t,n=this.editor.editing.mapper,i=this._lastSelectedCaption,r=this.editor.model.document.selection,o=r.getSelectedElement();if(o&&o.is("element","image")){var a=Zv(o);t=n.toViewElement(a)}var s=np(r.getFirstPosition().parent);if(s&&(t=n.toViewElement(s)),t)return i?(i===t||(ip(i,e),this._lastSelectedCaption=t),rp(t,e)):(this._lastSelectedCaption=t,rp(t,e));if(i){var l=ip(i,e);return this._lastSelectedCaption=null,l}return!1}},{key:"_fixCaptionVisibility",value:function(e){var t=this;return function(n,i,r){var o=np(e(i)),a=t.editor.editing.mapper,s=r.writer;if(o){var l=a.toViewElement(o);l&&(o.childCount?s.removeClass("ck-hidden",l):s.addClass("ck-hidden",l))}}}},{key:"_insertMissingModelCaptionElement",value:function(e){var t,n=this.editor.model,i=n.document.differ.getChanges(),r=[],o=k(i);try{for(o.s();!(t=o.n()).done;){var a=t.value;if("insert"==a.type&&"$text"!=a.name){var s=a.position.nodeAfter;if(s.is("element","image")&&!Zv(s)&&r.push(s),!s.is("element","image")&&s.childCount){var l,c=k(n.createRangeIn(s).getItems());try{for(c.s();!(l=c.n()).done;){var u=l.value;u.is("element","image")&&!Zv(u)&&r.push(u)}}catch(v){c.e(v)}finally{c.f()}}}}}catch(v){o.e(v)}finally{o.f()}for(var d=0,h=r;d1&&void 0!==arguments[1])||arguments[1];return function(n,i,r){var o=i.item;if((o.childCount||t)&&zd(o.parent)){if(!r.consumable.consume(i.item,"insert"))return;var a=r.mapper.toViewElement(i.range.start.parent),s=e(r.writer),l=r.writer;o.childCount||l.addClass("ck-hidden",s),function(e,t,n,i){var r=i.writer.createPositionAt(n,"end");i.writer.insert(r,e),i.mapper.bindElements(t,e)}(s,i.item,a,r)}}}function np(e){var t=e.getAncestors({includeSelf:!0}).find((function(e){return"caption"==e.name}));return t&&t.parent&&"image"==t.parent.name?t:null}function ip(e,t){return!e.childCount&&!e.hasClass("ck-hidden")&&(t.addClass("ck-hidden",e),!0)}function rp(e,t){return!!e.hasClass("ck-hidden")&&(t.removeClass("ck-hidden",e),!0)}n(72);var op=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"refresh",value:function(){var e=this.editor.model.document.selection.getSelectedElement();this.isEnabled=zd(e),e&&e.hasAttribute("width")?this.value={width:e.getAttribute("width"),height:null}:this.value=null}},{key:"execute",value:function(e){var t=this.editor.model,n=t.document.selection.getSelectedElement();this.value={width:e.width,height:null},n&&t.change((function(t){t.setAttribute("width",e.width,n)}))}}]),n}(Fu),ap=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"imageResize:original",value:null,icon:"original"},{name:"imageResize:25",value:"25",icon:"small"},{name:"imageResize:50",value:"50",icon:"medium"},{name:"imageResize:75",value:"75",icon:"large"}]}),i}return x(n,null,[{key:"pluginName",get:function(){return"ImageResizeEditing"}}]),x(n,[{key:"init",value:function(){var e=this.editor,t=new op(e);this._registerSchema(),this._registerConverters(),e.commands.add("imageResize",t)}},{key:"_registerSchema",value:function(){this.editor.model.schema.extend("image",{allowAttributes:"width"}),this.editor.model.schema.setAttributeProperties("width",{isFormatting:!0})}},{key:"_registerConverters",value:function(){var e=this.editor;e.conversion.for("downcast").add((function(e){return e.on("attribute:width:image",(function(e,t,n){if(n.consumable.consume(t.item,e.name)){var i=n.writer,r=n.mapper.toViewElement(t.item);null!==t.attributeNewValue?(i.setStyle("width",t.attributeNewValue,r),i.addClass("image_resized",r)):(i.removeStyle("width",r),i.removeClass("image_resized",r))}}))})),e.conversion.for("upcast").attributeToAttribute({view:{name:"figure",styles:{width:/.+/}},model:{key:"width",value:function(e){return e.getStyle("width")}}})}}]),n}(Vu),sp='',lp={small:'',medium:sp,large:'',original:''},cp=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i._resizeUnit=e.config.get("image.resizeUnit"),i}return x(n,null,[{key:"requires",get:function(){return[ap]}},{key:"pluginName",get:function(){return"ImageResizeButtons"}}]),x(n,[{key:"init",value:function(){var e=this.editor,t=e.config.get("image.resizeOptions"),n=e.commands.get("imageResize");this.bind("isEnabled").to(n);var i,r=k(t);try{for(r.s();!(i=r.n()).done;){var o=i.value;this._registerImageResizeButton(o)}}catch(a){r.e(a)}finally{r.f()}this._registerImageResizeDropdown(t)}},{key:"_registerImageResizeButton",value:function(e){var t=this,n=this.editor,i=e.name,r=e.value,o=e.icon,a=r?r+this._resizeUnit:null;n.ui.componentFactory.add(i,(function(r){var s=new _u(r),l=n.commands.get("imageResize"),c=t._getOptionLabelValue(e,!0);if(!lp[o])throw new jn.b('imageresizebuttons-missing-icon: The resize option "'+i+'" misses the "icon" property or the property value doesn\'t match any of the available icons.',n,e);return s.set({label:c,icon:lp[o],tooltip:c,isToggleable:!0}),s.bind("isEnabled").to(t),s.bind("isOn").to(l,"value",up(a)),t.listenTo(s,"execute",(function(){n.execute("imageResize",{width:a})})),s}))}},{key:"_registerImageResizeDropdown",value:function(e){var t=this,n=this.editor,i=n.t,r=e.find((function(e){return!e.value}));n.ui.componentFactory.add("imageResize",(function(o){var a=n.commands.get("imageResize"),s=Ou(o,Cu),l=s.buttonView;return l.set({tooltip:i("Resize image"),commandValue:r.value,icon:sp,isToggleable:!0,label:t._getOptionLabelValue(r),withText:!0,class:"ck-resize-image-button"}),l.bind("label").to(a,"value",(function(e){return e&&e.width?e.width:t._getOptionLabelValue(r)})),s.bind("isOn").to(a),s.bind("isEnabled").to(t),Iu(s,t._getResizeDropdownListItemDefinitions(e,a)),s.listView.ariaLabel=i("Image resize list"),t.listenTo(s,"execute",(function(e){n.execute(e.source.commandName,{width:e.source.commandValue}),n.editing.view.focus()})),s}))}},{key:"_getOptionLabelValue",value:function(e,t){var n=this.editor.t;return e.label?e.label:t?e.value?n("Resize image to %0",e.value+this._resizeUnit):n("Resize image to the original size"):e.value?e.value+this._resizeUnit:n("Original")}},{key:"_getResizeDropdownListItemDefinitions",value:function(e,t){var n=this,i=new Jn;return e.map((function(e){var r=e.value?e.value+n._resizeUnit:null,o={type:"button",model:new pv({commandName:"imageResize",commandValue:r,label:n._getOptionLabelValue(e),withText:!0,icon:null})};o.model.bind("isOn").to(t,"value",up(r)),i.add(o)})),i}}]),n}(Vu);function up(e){return function(t){return null===e&&t===e||t&&t.width===e}}var dp=function(){function e(t){w(this,e),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=t,this._referenceCoordinates=null}return x(e,[{key:"begin",value:function(e,t,n){var i=new Ia(t);this.activeHandlePosition=function(e){for(var t=["top-left","top-right","bottom-right","bottom-left"],n=0,i=t;na.height?"width":"height",a.max=a[a.dominant];var s={width:a.width,height:a.height};return"width"==a.dominant?s.height=s.width/n.aspectRatio:s.width=s.height*n.aspectRatio,{width:Math.round(s.width),height:Math.round(s.height),widthPercents:Math.min(Math.round(n.originalWidthPercents/n.originalWidth*s.width*100)/100,100)}}},{key:"_getResizeHost",value:function(){var e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}},{key:"_getHandleHost",value:function(){var e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}},{key:"_appendHandles",value:function(e){for(var t,n=["top-left","top-right","bottom-right","bottom-left"],i=0,r=n;i0&&void 0!==arguments[0]?arguments[0]:[];return e.map(Pp)}function Pp(e){if("string"==typeof e){var t=e;Cp[t]?e=Object.assign({},Cp[t]):(console.warn(Object(jn.a)("image-style-not-found: There is no such image style of given name."),{name:t}),e={name:t})}else if(Cp[e.name]){var n=Cp[e.name],i=Object.assign({},e);for(var r in n)Object.prototype.hasOwnProperty.call(e,r)||(i[r]=n[r]);e=i}return"string"==typeof e.icon&&Ap[e.icon]&&(e.icon=Ap[e.icon]),e}var Ep=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor,t=e.model.schema,n=e.data,i=e.editing;e.config.define("image.styles",["full","side"]);var r=Tp(e.config.get("image.styles"));t.extend("image",{allowAttributes:"imageStyle"});var o=function(e){return function(t,n,i){if(i.consumable.consume(n.item,t.name)){var r=bp(n.attributeNewValue,e),o=bp(n.attributeOldValue,e),a=i.mapper.toViewElement(n.item),s=i.writer;o&&s.removeClass(o.className,a),r&&s.addClass(r.className,a)}}}(r);i.downcastDispatcher.on("attribute:imageStyle:image",o),n.downcastDispatcher.on("attribute:imageStyle:image",o),n.upcastDispatcher.on("element:figure",function(e){var t=e.filter((function(e){return!e.isDefault}));return function(e,n,i){if(n.modelRange){var r=n.viewItem,o=Hu(n.modelRange.getItems());if(i.schema.checkAttribute(o,"imageStyle")){var a,s=k(t);try{for(s.s();!(a=s.n()).done;){var l=a.value;i.consumable.consume(r,{classes:l.className})&&i.writer.setAttribute("imageStyle",l.name,o)}}catch(c){s.e(c)}finally{s.f()}}}}}(r),{priority:"low"}),e.commands.add("imageStyle",new kp(e,r))}}],[{key:"pluginName",get:function(){return"ImageStyleEditing"}}]),n}(Vu);n(78);var Sp=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e,t=function(e,t){var n,i=k(e);try{for(i.s();!(n=i.n()).done;){var r=n.value;t[r.title]&&(r.title=t[r.title])}}catch(o){i.e(o)}finally{i.f()}return e}(Tp(this.editor.config.get("image.styles")),this.localizedDefaultStylesTitles),n=k(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;this._createButton(i)}}catch(r){n.e(r)}finally{n.f()}}},{key:"_createButton",value:function(e){var t=this,n=this.editor,i="imageStyle:"+e.name;n.ui.componentFactory.add(i,(function(i){var r=n.commands.get("imageStyle"),o=new _u(i);return o.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(r,"isEnabled"),o.bind("isOn").to(r,"value",(function(t){return t===e.name})),t.listenTo(o,"execute",(function(){n.execute("imageStyle",{value:e.name}),n.editing.view.focus()})),o}))}},{key:"localizedDefaultStylesTitles",get:function(){var e=this.editor.t;return{"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}}],[{key:"pluginName",get:function(){return"ImageStyleUI"}}]),n}(Vu),Op=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this,t=this.editor;if(t.plugins.has("BalloonToolbar")){var n=t.plugins.get("BalloonToolbar");this.listenTo(n,"show",(function(e){(function(e){var t=e.getSelectedElement();return!(!t||!Pd(t))})(t.editing.view.document.selection)&&e.stop()}),{priority:"high"})}this._toolbarDefinitions=new Map,this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(function(){e._updateToolbarsVisibility()})),this.listenTo(t.ui,"update",(function(){e._updateToolbarsVisibility()})),this.listenTo(t.ui.focusTracker,"change:isFocused",(function(){e._updateToolbarsVisibility()}),{priority:"low"})}},{key:"destroy",value:function(){l(N(n.prototype),"destroy",this).call(this);var e,t=k(this._toolbarDefinitions.values());try{for(t.s();!(e=t.n()).done;){var i=e.value;i.view.destroy()}}catch(r){t.e(r)}finally{t.f()}}},{key:"register",value:function(e,t){var n=t.ariaLabel,i=t.items,r=t.getRelatedElement,o=t.balloonClassName,a=void 0===o?"ck-toolbar-container":o;if(i.length){var s=this.editor,l=s.t,c=new Nu(s.locale);if(c.ariaLabel=n||l("Widget toolbar"),this._toolbarDefinitions.has(e))throw new jn.b("widget-toolbar-duplicated: Toolbar with the given id was already added.",this,{toolbarId:e});c.fillFromConfig(i,s.ui.componentFactory),this._toolbarDefinitions.set(e,{view:c,getRelatedElement:r,balloonClassName:a})}else console.warn(Object(jn.a)("widget-toolbar-no-items: Trying to register a toolbar without items."),{toolbarId:e})}},{key:"_updateToolbarsVisibility",value:function(){var e,t=0,n=null,i=null,r=k(this._toolbarDefinitions.values());try{for(r.s();!(e=r.n()).done;){var o=e.value,a=o.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&a)if(this.editor.ui.focusTracker.isFocused){var s=a.getAncestors().length;s>t&&(t=s,n=a,i=o)}else this._isToolbarVisible(o)&&this._hideToolbar(o);else this._isToolbarInBalloon(o)&&this._hideToolbar(o)}}catch(l){r.e(l)}finally{r.f()}i&&this._showToolbar(i,n)}},{key:"_hideToolbar",value:function(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}},{key:"_showToolbar",value:function(e,t){var n=this;this._isToolbarVisible(e)?Mp(this.editor,t):this._isToolbarInBalloon(e)||(this._balloon.add({view:e.view,position:Ip(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(function(){var e,t=k(n._toolbarDefinitions.values());try{for(t.s();!(e=t.n()).done;){var i=e.value;if(n._isToolbarVisible(i)){var r=i.getRelatedElement(n.editor.editing.view.document.selection);Mp(n.editor,r)}}}catch(o){t.e(o)}finally{t.f()}})))}},{key:"_isToolbarVisible",value:function(e){return this._balloon.visibleView===e.view}},{key:"_isToolbarInBalloon",value:function(e){return this._balloon.hasView(e.view)}}],[{key:"requires",get:function(){return[Wv]}},{key:"pluginName",get:function(){return"WidgetToolbarRepository"}}]),n}(Vu);function Mp(e,t){var n=e.plugins.get("ContextualBalloon"),i=Ip(e,t);n.updatePosition(i)}function Ip(e,t){var n=e.editing.view,i=kd.defaultPositions;return{target:n.domConverter.mapViewToDom(t),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast,Nd]}}n(80);var Np=function(e){C(n,e);var t=A(n);function n(e){var i;w(this,n),i=t.call(this,e);var r=i.bindTemplate;return i.set("icon"),i.set("isEnabled",!0),i.set("isOn",!1),i.set("isToggleable",!1),i.set("isVisible",!0),i.set("keystroke"),i.set("label"),i.set("tabindex",-1),i.set("tooltip"),i.set("tooltipPosition","s"),i.set("type","button"),i.set("withText",!1),i.children=i.createCollection(),i.actionView=i._createActionView(),i.arrowView=i._createArrowView(),i.keystrokes=new vc,i.focusTracker=new xc,i.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",r.if("isVisible","ck-hidden",(function(e){return!e})),i.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:i.children}),i}return x(n,[{key:"render",value:function(){var e=this;l(N(n.prototype),"render",this).call(this),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",(function(t,n){e.focusTracker.focusedElement===e.actionView.element&&(e.arrowView.focus(),n())})),this.keystrokes.set("arrowleft",(function(t,n){e.focusTracker.focusedElement===e.arrowView.element&&(e.actionView.focus(),n())}))}},{key:"focus",value:function(){this.actionView.focus()}},{key:"_createActionView",value:function(){var e=new _u;return e.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),e.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),e.delegate("execute").to(this),e}},{key:"_createArrowView",value:function(){var e=new _u,t=e.bindTemplate;return e.icon=xu,e.extendTemplate({attributes:{class:"ck-splitbutton__arrow","aria-haspopup":!0,"aria-expanded":t.to("isOn",(function(e){return String(e)}))}}),e.bind("isEnabled").to(this),e.delegate("execute").to(this,"open"),e}}]),n}(Zc);n(82);var Rp=function(e){C(n,e);var t=A(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w(this,n),i=t.call(this,e);var o=i.bindTemplate;return i.set("class",r.class||null),i.children=i.createCollection(),r.children&&r.children.forEach((function(e){return i.children.add(e)})),i.set("_role",null),i.set("_ariaLabelledBy",null),r.labelView&&i.set({_role:"group",_ariaLabelledBy:r.labelView.id}),i.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",o.to("class")],role:o.to("_role"),"aria-labelledby":o.to("_ariaLabelledBy")},children:i.children}),i}return n}(Zc),Dp='';n(84);var Lp=function(e){C(n,e);var t=A(n);function n(e,i){var r;w(this,n),r=t.call(this,e);var o=r._createActionButtons(e),a=o.insertButtonView,s=o.cancelButtonView;if(r.insertButtonView=a,r.cancelButtonView=s,r.dropdownView=r._createDropdownView(e),r.set("imageURLInputValue",""),r.focusTracker=new xc,r.keystrokes=new vc,r._focusables=new Ic,r._focusCycler=new cu({focusables:r._focusables,focusTracker:r.focusTracker,keystrokeHandler:r.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),r.set("_integrations",new Jn),i)for(var l=function(){var e=v(d[c],2),t=e[0],n=e[1];"insertImageViaUrl"===t&&(n.fieldView.bind("value").to(P(r),"imageURLInputValue",(function(e){return e||""})),n.fieldView.on("input",(function(){r.imageURLInputValue=n.fieldView.element.value}))),r._integrations.add(n)},c=0,d=Object.entries(i);c'),i}return x(n,[{key:"init",value:function(){var e=this;this.editor.editing.downcastDispatcher.on("attribute:uploadStatus:image",(function(){return e.uploadStatusChange.apply(e,arguments)}))}},{key:"uploadStatusChange",value:function(e,t,n){var i=this.editor,r=t.item,o=r.getAttribute("uploadId");if(n.consumable.consume(t.item,e.name)){var a=i.plugins.get(ef),s=o?t.attributeNewValue:null,l=this.placeholder,c=i.editing.mapper.toViewElement(r),u=n.writer;if("reading"==s)return Hp(c,u),void $p(l,c,u);if("uploading"==s){var d=a.loaders.get(o);return Hp(c,u),void(d?(Wp(c,u),function(e,t,n,i){var r=function(e){var t=e.createUIElement("div",{class:"ck-progress-bar"});return e.setCustomProperty("progressBar",!0,t),t}(t);t.insert(t.createPositionAt(e,"end"),r),n.on("change:uploadedPercent",(function(e,t,n){i.change((function(e){e.setStyle("width",n+"%",r)}))}))}(c,u,d,i.editing.view),function(e,t,n){if(n.data){var i=Bd(e);t.setAttribute("src",n.data,i)}}(c,u,d)):$p(l,c,u))}"complete"==s&&a.loaders.get(o)&&function(e,t,n){var i=t.createUIElement("div",{class:"ck-image-upload-complete-icon"});t.insert(t.createPositionAt(e,"end"),i),setTimeout((function(){n.change((function(e){return e.remove(e.createRangeOn(i))}))}),3e3)}(c,u,i.editing.view),function(e,t){Yp(e,t,"progressBar")}(c,u),Wp(c,u),function(e,t){t.removeClass("ck-appear",e)}(c,u)}}}]),n}(Vu);function Hp(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function $p(e,t,n){t.hasClass("ck-image-upload-placeholder")||n.addClass("ck-image-upload-placeholder",t);var i=Bd(t);i.getAttribute("src")!==e&&n.setAttribute("src",e,i),qp(t,"placeholder")||n.insert(n.createPositionAfter(i),function(e){var t=e.createUIElement("div",{class:"ck-upload-placeholder-loader"});return e.setCustomProperty("placeholder",!0,t),t}(n))}function Wp(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),Yp(e,t,"placeholder")}function qp(e,t){var n,i=k(e.getChildren());try{for(i.s();!(n=i.n()).done;){var r=n.value;if(r.getCustomProperty(t))return r}}catch(o){i.e(o)}finally{i.f()}}function Yp(e,t,n){var i=qp(e,n);i&&t.remove(t.createRangeOn(i))}var Gp=function(){function e(t){w(this,e),this.document=t}return x(e,[{key:"createDocumentFragment",value:function(e){return new Xr(this.document,e)}},{key:"createElement",value:function(e,t,n){return new or(this.document,e,t,n)}},{key:"createText",value:function(e){return new ai(this.document,e)}},{key:"clone",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e._clone(t)}},{key:"appendChild",value:function(e,t){return t._appendChild(e)}},{key:"insertChild",value:function(e,t,n){return n._insertChild(e,t)}},{key:"removeChildren",value:function(e,t,n){return n._removeChildren(e,t)}},{key:"remove",value:function(e){var t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}},{key:"replace",value:function(e,t){var n=e.parent;if(n){var i=n.getChildIndex(e);return this.removeChildren(i,1,n),this.insertChild(i,t,n),!0}return!1}},{key:"unwrapElement",value:function(e){var t=e.parent;if(t){var n=t.getChildIndex(e);this.remove(e),this.insertChild(n,e.getChildren(),t)}}},{key:"rename",value:function(e,t){var n=new or(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,n)?n:null}},{key:"setAttribute",value:function(e,t,n){n._setAttribute(e,t)}},{key:"removeAttribute",value:function(e,t){t._removeAttribute(e)}},{key:"addClass",value:function(e,t){t._addClass(e)}},{key:"removeClass",value:function(e,t){t._removeClass(e)}},{key:"setStyle",value:function(e,t,n){B(e)&&void 0===n&&(n=t),n._setStyle(e,t)}},{key:"removeStyle",value:function(e,t){t._removeStyle(e)}},{key:"setCustomProperty",value:function(e,t,n){n._setCustomProperty(e,t)}},{key:"removeCustomProperty",value:function(e,t){return t._removeCustomProperty(e)}},{key:"createPositionAt",value:function(e,t){return Cr._createAt(e,t)}},{key:"createPositionAfter",value:function(e){return Cr._createAfter(e)}},{key:"createPositionBefore",value:function(e){return Cr._createBefore(e)}},{key:"createRange",value:function(e,t){return new Ar(e,t)}},{key:"createRangeOn",value:function(e){return Ar._createOn(e)}},{key:"createRangeIn",value:function(e){return Ar._createIn(e)}},{key:"createSelection",value:function(e,t,n){return new Er(e,t,n)}}]),e}(),Kp=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"refresh",value:function(){var e=this.editor.model.document.selection.getSelectedElement(),t=e&&"image"===e.name||!1;this.isEnabled=Vd(this.editor.model)||t}},{key:"execute",value:function(e){var t=this.editor,n=t.model,i=t.plugins.get(ef);n.change((function(t){var r,o=Array.isArray(e.file)?e.file:[e.file],a=k(o);try{for(a.s();!(r=a.n()).done;){var s=r.value;Jp(t,n,i,s)}}catch(l){a.e(l)}finally{a.f()}}))}}]),n}(Fu);function Jp(e,t,n,i){var r=n.createLoader(i);r&&jd(e,t,{uploadId:r.id})}var Qp=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),i}return x(n,null,[{key:"requires",get:function(){return[ef,Gh,fh]}},{key:"pluginName",get:function(){return"ImageUploadEditing"}}]),x(n,[{key:"init",value:function(){var e=this,t=this.editor,n=t.model.document,i=t.model.schema,r=t.conversion,o=t.plugins.get(ef),a=Vp(t.config.get("image.upload.types"));i.extend("image",{allowAttributes:["uploadId","uploadStatus"]}),t.commands.add("imageUpload",new Kp(t)),r.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(t.editing.view.document,"clipboardInput",(function(e,n){if(i=n.dataTransfer,!Array.from(i.types).includes("text/html")||""===i.getData("text/html")){var i,r=Array.from(n.dataTransfer.files).filter((function(e){return!!e&&a.test(e.type)})),o=n.targetRanges.map((function(e){return t.editing.mapper.toModelRange(e)}));t.model.change((function(n){n.setSelection(o),r.length&&(e.stop(),t.model.enqueueChange("default",(function(){t.execute("imageUpload",{file:r})})))}))}})),this.listenTo(t.plugins.get(fh),"inputTransformation",(function(e,n){var i=Array.from(t.editing.view.createRangeIn(n.content)).filter((function(e){return!(!(t=e.item).is("element","img")||!t.getAttribute("src"))&&(t.getAttribute("src").match(/^data:image\/\w+;base64,/g)||t.getAttribute("src").match(/^blob:/g))&&!e.item.getAttribute("uploadProcessed");var t})).map((function(e){return{promise:(t=e.item,new Promise((function(e,n){var i=t.getAttribute("src");fetch(i).then((function(e){return e.blob()})).then((function(t){var n=function(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}(t,i),r=n.replace("image/",""),o=new File([t],"image."+r,{type:n});e(o)})).catch(n)}))),imageElement:e.item};var t}));if(i.length){var r,a=new Gp(t.editing.view.document),s=k(i);try{for(s.s();!(r=s.n()).done;){var l=r.value;a.setAttribute("uploadProcessed",!0,l.imageElement);var c=o.createLoader(l.promise);c&&(a.setAttribute("src","",l.imageElement),a.setAttribute("uploadId",c.id,l.imageElement))}}catch(u){s.e(u)}finally{s.f()}}})),t.editing.view.document.on("dragover",(function(e,t){t.preventDefault()})),n.on("change",(function(){var i,r=n.differ.getChanges({includeChangesInGraveyard:!0}),a=k(r);try{for(a.s();!(i=a.n()).done;){var s=i.value;if("insert"==s.type&&"$text"!=s.name){var l,c=s.position.nodeAfter,u="$graveyard"==s.position.root.rootName,d=k(Zp(t,c));try{for(d.s();!(l=d.n()).done;){var h=l.value,f=h.getAttribute("uploadId");if(f){var v=o.loaders.get(f);v&&(u?v.abort():"idle"==v.status&&e._readAndUpload(v,h))}}}catch(p){d.e(p)}finally{d.f()}}}}catch(p){a.e(p)}finally{a.f()}}))}},{key:"_readAndUpload",value:function(e,t){var n=this,i=this.editor,r=i.model,o=i.locale.t,a=i.plugins.get(ef),s=i.plugins.get(Gh);return r.enqueueChange("transparent",(function(e){e.setAttribute("uploadStatus","reading",t)})),e.read().then((function(){var n=e.upload();if(zr.isSafari){var o=Bd(i.editing.mapper.toViewElement(t));i.editing.view.once("render",(function(){if(o.parent){var e=i.editing.view.domConverter.mapViewToDom(o.parent);if(e){var t=e.style.display;e.style.display="none",e._ckHack=e.offsetHeight,e.style.display=t}}}))}return r.enqueueChange("transparent",(function(e){e.setAttribute("uploadStatus","uploading",t)})),n})).then((function(e){r.enqueueChange("transparent",(function(i){i.setAttributes({uploadStatus:"complete",src:e.default},t),n._parseAndSetSrcsetAttributeOnImage(e,t,i)})),l()})).catch((function(n){if("error"!==e.status&&"aborted"!==e.status)throw n;"error"==e.status&&n&&s.showWarning(n,{title:o("Upload failed"),namespace:"upload"}),l(),r.enqueueChange("transparent",(function(e){e.remove(t)}))}));function l(){r.enqueueChange("transparent",(function(e){e.removeAttribute("uploadId",t),e.removeAttribute("uploadStatus",t)})),a.destroyLoader(e)}}},{key:"_parseAndSetSrcsetAttributeOnImage",value:function(e,t,n){var i=0,r=Object.keys(e).filter((function(e){var t=parseInt(e,10);if(!isNaN(t))return i=Math.max(i,t),!0})).map((function(t){return"".concat(e[t]," ").concat(t,"w")})).join(", ");""!=r&&n.setAttribute("srcset",{data:r,width:i},t)}}]),n}(Vu);function Zp(e,t){return Array.from(e.model.createRangeOn(t)).filter((function(e){return e.item.is("element","image")})).map((function(e){return e.item}))}var Xp=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i._childCommands=[],i}return x(n,[{key:"refresh",value:function(){}},{key:"execute",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(r,"value","isEnabled"),e.listenTo(o,"execute",(function(){t.execute(am),t.editing.view.focus()})),o}))}}]),n}(Vu),lm=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.domEventType="click",i}return x(n,[{key:"onDomEvent",value:function(e){this.fire(e.type,e)}}]),n}(ha);n(92);var cm=function(e){C(n,e);var t=A(n);function n(e,i,r){var o;w(this,n),o=t.call(this,e);var a=e.t;o.focusTracker=new xc,o.keystrokes=new vc,o.urlInputView=o._createUrlInput(r),o.saveButtonView=o._createButton(a("Save"),Fv,"ck-button-save"),o.saveButtonView.type="submit",o.cancelButtonView=o._createButton(a("Cancel"),Uv,"ck-button-cancel","cancel"),o._manualDecoratorSwitches=o._createManualDecoratorSwitches(i),o.children=o._createFormChildren(i.manualDecorators),o._focusables=new Ic,o._focusCycler=new cu({focusables:o._focusables,focusTracker:o.focusTracker,keystrokeHandler:o.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});var s=["ck","ck-link-form"];return i.manualDecorators.length&&s.push("ck-link-form_layout-vertical"),o.setTemplate({tag:"form",attributes:{class:s,tabindex:"-1"},children:o.children}),o}return x(n,[{key:"getDecoratorSwitchesState",value:function(){return Array.from(this._manualDecoratorSwitches).reduce((function(e,t){return e[t.name]=t.isOn,e}),{})}},{key:"render",value:function(){var e=this;l(N(n.prototype),"render",this).call(this),Bv({view:this}),[this.urlInputView].concat(u(this._manualDecoratorSwitches),[this.saveButtonView,this.cancelButtonView]).forEach((function(t){e._focusables.add(t),e.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}},{key:"focus",value:function(){this._focusCycler.focusFirst()}},{key:"_createUrlInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"https://",t=this.locale.t,n=new zv(this.locale,Vv);return n.label=t("Link URL"),n.fieldView.placeholder=e+"example.com",n}},{key:"_createButton",value:function(e,t,n,i){var r=new _u(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.extendTemplate({attributes:{class:n}}),i&&r.delegate("execute").to(this,i),r}},{key:"_createManualDecoratorSwitches",value:function(e){var t,n=this,i=this.createCollection(),r=k(e.manualDecorators);try{var o=function(){var r=t.value,o=new Eu(n.locale);o.set({name:r.id,label:r.label,withText:!0}),o.bind("isOn").toMany([r,e],"value",(function(e,t){return void 0===t&&void 0===e?r.defaultValue:e})),o.on("execute",(function(){r.set("value",!o.isOn)})),i.add(o)};for(r.s();!(t=r.n()).done;)o()}catch(a){r.e(a)}finally{r.f()}return i}},{key:"_createFormChildren",value:function(e){var t=this.createCollection();if(t.add(this.urlInputView),e.length){var n=new Zc;n.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map((function(e){return{tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}}})),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(n)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}}]),n}(Zc);n(94);var um=function(e){C(n,e);var t=A(n);function n(e){var i;w(this,n),i=t.call(this,e);var r=e.t;return i.focusTracker=new xc,i.keystrokes=new vc,i.previewButtonView=i._createPreviewButton(),i.unlinkButtonView=i._createButton(r("Unlink"),'',"unlink"),i.editButtonView=i._createButton(r("Edit link"),'',"edit"),i.set("href"),i._focusables=new Ic,i._focusCycler=new cu({focusables:i._focusables,focusTracker:i.focusTracker,keystrokeHandler:i.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),i.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions"],tabindex:"-1"},children:[i.previewButtonView,i.editButtonView,i.unlinkButtonView]}),i}return x(n,[{key:"render",value:function(){var e=this;l(N(n.prototype),"render",this).call(this),[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach((function(t){e._focusables.add(t),e.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}},{key:"focus",value:function(){this._focusCycler.focusFirst()}},{key:"_createButton",value:function(e,t,n){var i=new _u(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i.delegate("execute").to(this,n),i}},{key:"_createPreviewButton",value:function(){var e=new _u(this.locale),t=this.bindTemplate,n=this.t;return e.set({withText:!0,tooltip:n("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",(function(e){return e&&zh(e)})),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",(function(e){return e||n("This link has no URL")})),e.bind("isEnabled").to(this,"href",(function(e){return!!e})),e.template.tag="a",e.template.eventListeners={},e}}]),n}(Zc),dm='',hm=/^((\w+:(\/{2,})?)|(\W))/i,fm=/[\w-]+@[\w-]+\.+[\w-]+/i,vm="link-ui",pm=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor;e.editing.view.addObserver(lm),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=e.plugins.get(Wv),this._createToolbarLinkButton(),this._enableUserBalloonInteractions(),e.conversion.for("editingDowncast").markerToHighlight({model:vm,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:vm,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}},{key:"destroy",value:function(){l(N(n.prototype),"destroy",this).call(this),this.formView.destroy()}},{key:"_createActionsView",value:function(){var e=this,t=this.editor,n=new um(t.locale),i=t.commands.get("link"),r=t.commands.get("unlink");return n.bind("href").to(i,"value"),n.editButtonView.bind("isEnabled").to(i),n.unlinkButtonView.bind("isEnabled").to(r),this.listenTo(n,"edit",(function(){e._addFormView()})),this.listenTo(n,"unlink",(function(){t.execute("unlink"),e._hideUI()})),n.keystrokes.set("Esc",(function(t,n){e._hideUI(),n()})),n.keystrokes.set(Dh,(function(t,n){e._addFormView(),n()})),n}},{key:"_createFormView",value:function(){var e=this,t=this.editor,n=t.commands.get("link"),i=t.config.get("link.defaultProtocol"),r=new cm(t.locale,n,i);return r.urlInputView.fieldView.bind("value").to(n,"value"),r.urlInputView.bind("isReadOnly").to(n,"isEnabled",(function(e){return!e})),r.saveButtonView.bind("isEnabled").to(n),this.listenTo(r,"submit",(function(){var n=r.urlInputView.fieldView.element.value,o=!!i&&!hm.test(n),a=fm.test(n),s=n&&o?(a?"mailto:":i)+n:n;t.execute("link",s,r.getDecoratorSwitchesState()),e._closeFormView()})),this.listenTo(r,"cancel",(function(){e._closeFormView()})),r.keystrokes.set("Esc",(function(t,n){e._closeFormView(),n()})),r}},{key:"_createToolbarLinkButton",value:function(){var e=this,t=this.editor,n=t.commands.get("link"),i=t.t;t.keystrokes.set(Dh,(function(t,n){n(),e._showUI(!0)})),t.ui.componentFactory.add("link",(function(t){var r=new _u(t);return r.isEnabled=!0,r.label=i("Link"),r.icon=dm,r.keystroke=Dh,r.tooltip=!0,r.isToggleable=!0,r.bind("isEnabled").to(n,"isEnabled"),r.bind("isOn").to(n,"value",(function(e){return!!e})),e.listenTo(r,"execute",(function(){return e._showUI(!0)})),r}))}},{key:"_enableUserBalloonInteractions",value:function(){var e=this,t=this.editor.editing.view.document;this.listenTo(t,"click",(function(){e._getSelectedLinkElement()&&e._showUI()})),this.editor.keystrokes.set("Tab",(function(t,n){e._areActionsVisible&&!e.actionsView.focusTracker.isFocused&&(e.actionsView.focus(),n())}),{priority:"high"}),this.editor.keystrokes.set("Esc",(function(t,n){e._isUIVisible&&(e._hideUI(),n())})),Su({emitter:this.formView,activator:function(){return e._isUIInPanel},contextElements:[this._balloon.view.element],callback:function(){return e._hideUI()}})}},{key:"_addActionsView",value:function(){this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}},{key:"_addFormView",value:function(){if(!this._isFormInPanel){var e=this.editor.commands.get("link");this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.urlInputView.fieldView.element.value=e.value||""}}},{key:"_closeFormView",value:function(){var e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}},{key:"_removeFormView",value:function(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}},{key:"_showUI",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}},{key:"_hideUI",value:function(){if(this._isUIInPanel){var e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}}},{key:"_startUpdatingUI",value:function(){var e=this,t=this.editor,n=t.editing.view.document,i=this._getSelectedLinkElement(),r=a(),o=function(){var t=e._getSelectedLinkElement(),n=a();i&&!t||!i&&n!==r?e._hideUI():e._isUIVisible&&e._balloon.updatePosition(e._getBalloonPositionData()),i=t,r=n};function a(){return n.selection.focus.getAncestors().reverse().find((function(e){return e.is("element")}))}this.listenTo(t.ui,"update",o),this.listenTo(this._balloon,"change:visibleView",o)}},{key:"_getBalloonPositionData",value:function(){var e=this.editor.editing.view,t=this.editor.model,n=e.document,i=this._getSelectedLinkElement(),r=t.markers.has(vm)?this.editor.editing.mapper.toViewRange(t.markers.get(vm).getRange()):n.selection.getFirstRange();return{target:i?e.domConverter.mapViewToDom(i):e.domConverter.viewRangeToDom(r)}}},{key:"_getSelectedLinkElement",value:function(){var e=this.editor.editing.view,t=e.document.selection;if(t.isCollapsed)return mm(t.getFirstPosition());var n=t.getFirstRange().getTrimmed(),i=mm(n.start),r=mm(n.end);return i&&i==r&&e.createRangeIn(i).getTrimmed().isEqual(n)?i:null}},{key:"_showFakeVisualSelection",value:function(){var e=this.editor.model;e.change((function(t){e.markers.has(vm)?t.updateMarker(vm,{range:e.document.selection.getFirstRange()}):t.addMarker(vm,{usingOperation:!1,affectsData:!1,range:e.document.selection.getFirstRange()})}))}},{key:"_hideFakeVisualSelection",value:function(){var e=this.editor.model;e.markers.has(vm)&&e.change((function(e){e.removeMarker(vm)}))}},{key:"_isFormInPanel",get:function(){return this._balloon.hasView(this.formView)}},{key:"_areActionsInPanel",get:function(){return this._balloon.hasView(this.actionsView)}},{key:"_areActionsVisible",get:function(){return this._balloon.visibleView===this.actionsView}},{key:"_isUIInPanel",get:function(){return this._isFormInPanel||this._areActionsInPanel}},{key:"_isUIVisible",get:function(){return this._balloon.visibleView==this.formView||this._areActionsVisible}}],[{key:"requires",get:function(){return[Wv]}},{key:"pluginName",get:function(){return"LinkUI"}}]),n}(Vu);function mm(e){return e.getAncestors().find((function(e){return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t}))}var gm=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor;e.model.schema.extend("image",{allowAttributes:["linkHref"]}),e.conversion.for("upcast").add((function(e){e.on("element:a",(function(e,t,n){var i=t.viewItem,r=Array.from(i.getChildren()).find((function(e){return"img"===e.name}));if(r){var o={attributes:["href"]};if(n.consumable.consume(i,o)){var a=i.getAttribute("href");if(a){var s=t.modelCursor.parent;if(!s.is("element","image")){var l=n.convertItem(r,t.modelCursor);t.modelRange=l.modelRange,t.modelCursor=l.modelCursor,s=t.modelCursor.nodeBefore}s&&s.is("element","image")&&n.writer.setAttribute("linkHref",a,s)}}}}),{priority:"high"})})),e.conversion.for("editingDowncast").add(km({attachIconIndicator:!0})),e.conversion.for("dataDowncast").add(km({attachIconIndicator:!1})),this._enableAutomaticDecorators(),this._enableManualDecorators()}},{key:"_enableAutomaticDecorators",value:function(){var e=this.editor,t=e.commands.get("link").automaticDecorators;t.length&&e.conversion.for("downcast").add(t.getDispatcherForLinkedImage())}},{key:"_enableManualDecorators",value:function(){var e,t=this.editor,n=t.commands.get("link"),i=n.manualDecorators,r=k(n.manualDecorators);try{for(r.s();!(e=r.n()).done;){var o=e.value;t.model.schema.extend("image",{allowAttributes:o.id}),t.conversion.for("downcast").add(bm(i,o)),t.conversion.for("upcast").add(ym(i,o))}}catch(a){r.e(a)}finally{r.f()}}}],[{key:"requires",get:function(){return[Hd,$h]}},{key:"pluginName",get:function(){return"LinkImageEditing"}}]),n}(Vu);function km(e){return function(t){t.on("attribute:linkHref:image",(function(t,n,i){var r,o=i.mapper.toViewElement(n.item),a=i.writer,s=Array.from(o.getChildren()).find((function(e){return"a"===e.name}));if(e.attachIconIndicator&&(r=a.createUIElement("span",{class:"ck ck-link-image_icon"},(function(e){var t=this.toDomElement(e);return t.innerHTML=dm,t}))),s)if(n.attributeNewValue)a.setAttribute("href",n.attributeNewValue,s);else{var l=Array.from(s.getChildren()).find((function(e){return"img"===e.name}));a.move(a.createRangeOn(l),a.createPositionAt(o,0)),a.remove(s)}else{var c=a.createContainerElement("a",{href:n.attributeNewValue});a.insert(a.createPositionAt(o,0),c),a.move(a.createRangeOn(o.getChild(1)),a.createPositionAt(c,0)),r&&a.insert(a.createPositionAt(c,"end"),r)}}))}}function bm(e,t){return function(n){n.on("attribute:".concat(t.id,":image"),(function(n,i,r){var o,a=e.get(t.id).attributes,s=r.mapper.toViewElement(i.item),l=Array.from(s.getChildren()).find((function(e){return"a"===e.name})),c=k(li(a));try{for(c.s();!(o=c.n()).done;){var u=v(o.value,2),d=u[0],h=u[1];r.writer.setAttribute(d,h,l)}}catch(f){c.e(f)}finally{c.f()}}))}}function ym(e,t){return function(n){n.on("element:a",(function(n,i,r){var o=i.viewItem,a={attributes:e.get(t.id).attributes},s=new ci(a).match(o);if(s&&r.consumable.consume(o,s.match)){var l=i.modelCursor.parent;r.writer.setAttribute(t.id,!0,l)}}),{priority:"high"})}}var wm=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor.editing.view.document;this.listenTo(e,"click",(function(t,n){_m(e.selection.getSelectedElement())&&n.preventDefault()})),this._createToolbarLinkImageButton()}},{key:"_createToolbarLinkImageButton",value:function(){var e=this,t=this.editor,n=t.t;t.ui.componentFactory.add("linkImage",(function(i){var r=new _u(i),o=t.plugins.get("LinkUI"),a=t.commands.get("link");return r.set({isEnabled:!0,label:n("Link image"),icon:dm,keystroke:Dh,tooltip:!0,isToggleable:!0}),r.bind("isEnabled").to(a,"isEnabled"),r.bind("isOn").to(a,"value",(function(e){return!!e})),e.listenTo(r,"execute",(function(){_m(t.editing.view.document.selection.getSelectedElement())?o._addActionsView():o._showUI(!0)})),r}))}}],[{key:"requires",get:function(){return[Qv,$h,pm]}},{key:"pluginName",get:function(){return"LinkImageUI"}}]),n}(Vu);function _m(e){return!(!e||!Dd(e))&&e.getChild(0).is("element","a")}n(96);var xm=function(e){C(n,e);var t=A(n);function n(e,i){var r;return w(this,n),r=t.call(this,e),r.type=i,r}return x(n,[{key:"refresh",value:function(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}},{key:"execute",value:function(){var e=this,t=this.editor.model,n=t.document,i=Array.from(n.selection.getSelectedBlocks()).filter((function(e){return Am(e,t.schema)})),r=!0===this.value;t.change((function(t){if(r){for(var n=i[i.length-1].nextSibling,o=Number.POSITIVE_INFINITY,a=[];n&&"listItem"==n.name&&0!==n.getAttribute("listIndent");){var s=n.getAttribute("listIndent");s=n;)o>r.getAttribute("listIndent")&&(o=r.getAttribute("listIndent")),r.getAttribute("listIndent")==o&&e[t?"unshift":"push"](r),r=r[t?"previousSibling":"nextSibling"]}function Am(e,t){return t.checkChild(e.parent,"listItem")&&!t.isObject(e)}var Tm=function(e){C(n,e);var t=A(n);function n(e,i){var r;return w(this,n),r=t.call(this,e),r._indentBy="forward"==i?1:-1,r}return x(n,[{key:"refresh",value:function(){this.isEnabled=this._checkEnabled()}},{key:"execute",value:function(){var e=this,t=this.editor.model,n=t.document,i=Array.from(n.selection.getSelectedBlocks());t.change((function(t){for(var n=i[i.length-1],r=n.nextSibling;r&&"listItem"==r.name&&r.getAttribute("listIndent")>n.getAttribute("listIndent");)i.push(r),r=r.nextSibling;e._indentBy<0&&(i=i.reverse());var o,a=k(i);try{for(a.s();!(o=a.n()).done;){var s=o.value,l=s.getAttribute("listIndent")+e._indentBy;l<0?t.rename(s,"paragraph"):t.setAttribute("listIndent",l,s)}}catch(c){a.e(c)}finally{a.f()}e.fire("_executeCleanup",i)}))}},{key:"_checkEnabled",value:function(){var e=Hu(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is("element","listItem"))return!1;if(this._indentBy>0){for(var t=e.getAttribute("listIndent"),n=e.getAttribute("listType"),i=e.previousSibling;i&&i.is("element","listItem")&&i.getAttribute("listIndent")>=t;){if(i.getAttribute("listIndent")==t)return i.getAttribute("listType")==n;i=i.previousSibling}return!1}return!0}}]),n}(Fu);function Pm(e,t){var n=t.mapper,i=t.writer,r="numbered"==e.getAttribute("listType")?"ol":"ul",o=function(e){var t=e.createContainerElement("li");return t.getFillerOffset=Nm,t}(i),a=i.createContainerElement(r,null);return i.insert(i.createPositionAt(a,0),o),n.bindElements(e,o),o}function Em(e,t,n,i){var r=t.parent,o=n.mapper,a=n.writer,s=o.toViewPosition(i.createPositionBefore(e)),l=Mm(e.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:e.getAttribute("listIndent")}),c=e.previousSibling;if(l&&l.getAttribute("listIndent")==e.getAttribute("listIndent")){var u=o.toViewElement(l);s=a.breakContainer(a.createPositionAfter(u))}else if(c&&"listItem"==c.name){s=o.toViewPosition(i.createPositionAt(c,"end"));var d=o.findMappedViewAncestor(s),h=function(e){var t,n=k(e.getChildren());try{for(n.s();!(t=n.n()).done;){var i=t.value;if("ul"==i.name||"ol"==i.name)return i}}catch(r){n.e(r)}finally{n.f()}return null}(d);s=h?a.createPositionBefore(h):a.createPositionAt(d,"end")}else s=o.toViewPosition(i.createPositionBefore(e));if(s=Om(s),a.insert(s,r),c&&"listItem"==c.name){var f,v=o.toViewElement(c),p=a.createRange(a.createPositionAt(v,0),s).getWalker({ignoreElementEnd:!0}),m=k(p);try{for(m.s();!(f=m.n()).done;){var g=f.value;if(g.item.is("element","li")){var b=a.breakContainer(a.createPositionBefore(g.item)),y=g.item.parent,w=a.createPositionAt(t,"end");Sm(a,w.nodeBefore,w.nodeAfter),a.move(a.createRangeOn(y),w),p.position=b}}}catch(E){m.e(E)}finally{m.f()}}else{var _=r.nextSibling;if(_&&(_.is("element","ul")||_.is("element","ol"))){var x,C=null,A=k(_.getChildren());try{for(A.s();!(x=A.n()).done;){var T=x.value,P=o.toModelElement(T);if(!(P&&P.getAttribute("listIndent")>e.getAttribute("listIndent")))break;C=T}}catch(E){A.e(E)}finally{A.f()}C&&(a.breakContainer(a.createPositionAfter(C)),a.move(a.createRangeOn(C.parent),a.createPositionAt(t,"end")))}}Sm(a,r,r.nextSibling),Sm(a,r.previousSibling,r)}function Sm(e,t,n){return!t||!n||"ul"!=t.name&&"ol"!=t.name||t.name!=n.name||t.getAttribute("class")!==n.getAttribute("class")?null:e.mergeContainers(e.createPositionAfter(t))}function Om(e){return e.getLastMatchingPosition((function(e){return e.item.is("uiElement")}))}function Mm(e,t){for(var n=!!t.sameIndent,i=!!t.smallerIndent,r=t.listIndent,o=e;o&&"listItem"==o.name;){var a=o.getAttribute("listIndent");if(n&&r==a||i&&r>a)return o;o=o.previousSibling}return null}function Im(e,t,n,i){e.ui.componentFactory.add(t,(function(r){var o=e.commands.get(t),a=new _u(r);return a.set({label:n,icon:i,tooltip:!0,isToggleable:!0}),a.bind("isOn","isEnabled").to(o,"value","isEnabled"),a.on("execute",(function(){e.execute(t),e.editing.view.focus()})),a}))}function Nm(){var e=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||e?0:lr.call(this)}function Rm(e){return function(t,n,i){var r=i.consumable;if(r.test(n.item,"insert")&&r.test(n.item,"attribute:listType")&&r.test(n.item,"attribute:listIndent")){r.consume(n.item,"insert"),r.consume(n.item,"attribute:listType"),r.consume(n.item,"attribute:listIndent");var o=n.item;Em(o,Pm(o,i),i,e)}}}function Dm(e,t,n){if(n.consumable.consume(t.item,"attribute:listType")){var i=n.mapper.toViewElement(t.item),r=n.writer;r.breakContainer(r.createPositionBefore(i)),r.breakContainer(r.createPositionAfter(i));var o=i.parent,a="numbered"==t.attributeNewValue?"ol":"ul";r.rename(a,o)}}function Lm(e,t,n){var i=n.mapper.toViewElement(t.item).parent,r=n.writer;Sm(r,i,i.nextSibling),Sm(r,i.previousSibling,i);var o,a=k(t.item.getChildren());try{for(a.s();!(o=a.n()).done;){var s=o.value;n.consumable.consume(s,"insert")}}catch(l){a.e(l)}finally{a.f()}}function zm(e,t,n){if("listItem"!=t.item.name){for(var i=n.mapper.toViewPosition(t.range.start),r=n.writer,o=[];("ul"==i.parent.name||"ol"==i.parent.name)&&(i=r.breakContainer(i),"li"==i.parent.name);){var a=i,s=r.createPositionAt(i.parent,"end");if(!a.isEqual(s)){var l=r.remove(r.createRange(a,s));o.push(l)}i=r.createPositionAfter(i.parent)}if(o.length>0){for(var c=0;c0){var d=Sm(r,u,u.nextSibling);d&&d.parent==u&&i.offset--}}Sm(r,i.nodeBefore,i.nodeAfter)}}}function jm(e,t,n){var i=n.mapper.toViewPosition(t.position),r=i.nodeBefore,o=i.nodeAfter;Sm(n.writer,r,o)}function Vm(e,t,n){if(n.consumable.consume(t.viewItem,{name:!0})){var i=n.writer,r=i.createElement("listItem"),o=function(e){for(var t=0,n=e.parent;n;){if(n.is("element","li"))t++;else{var i=n.previousSibling;i&&i.is("element","li")&&t++}n=n.parent}return t}(t.viewItem);i.setAttribute("listIndent",o,r);var a=t.viewItem.parent&&"ol"==t.viewItem.parent.name?"numbered":"bulleted";if(i.setAttribute("listType",a,r),!n.safeInsert(r,t.modelCursor))return;var s=function(e,t,n){var i,r=n.writer,o=n.schema,a=r.createPositionAfter(e),s=k(t);try{for(s.s();!(i=s.n()).done;){var l=i.value;if("ul"==l.name||"ol"==l.name)a=n.convertItem(l,a).modelCursor;else{var c=n.convertItem(l,r.createPositionAt(e,"end")),u=c.modelRange.start.nodeAfter;u&&u.is("element")&&!o.checkChild(e,u.name)&&(e=c.modelCursor.parent.is("element","listItem")?c.modelCursor.parent:$m(c.modelCursor),a=r.createPositionAfter(e))}}}catch(d){s.e(d)}finally{s.f()}return a}(r,t.viewItem.getChildren(),n);t.modelRange=i.createRange(t.modelCursor,s),n.updateConversionResult(r,t)}}function Bm(e,t,n){if(n.consumable.test(t.viewItem,{name:!0}))for(var i=Array.from(t.viewItem.getChildren()),r=0,o=i;r0)for(;a&&a.is("element","listItem");)a._setAttribute("listIndent",a.getAttribute("listIndent")+c),a=a.nextSibling}}}function $m(e){var t,n=new Qa({startPosition:e});do{t=n.next()}while(!t.value.item.is("element","listItem"));return t.value.item}function Wm(e,t,n,i,r,o){var a,s=Mm(t.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:e,foo:"b"}),l=r.mapper,c=r.writer,d=s?s.getAttribute("listIndent"):null;if(s)if(d==e){var h=l.toViewElement(s).parent;a=c.createPositionAfter(h)}else{var f=o.createPositionAt(s,"end");a=l.toViewPosition(f)}else a=n;a=Om(a);for(var v=0,p=u(i.getChildren());vn){var a=void 0;null===i?(i=r-n,a=n):(i>r&&(i=r),a=r-i),t.setAttribute("listIndent",a,e),o=!0}else i=null,n=e.getAttribute("listIndent")+1;e=e.nextSibling}}function g(e){for(var n=[],i=null;e&&e.is("element","listItem");){var r=e.getAttribute("listIndent");if(i&&i.getAttribute("listIndent")>r&&(n=n.slice(0,r+1)),0!=r)if(n[r]){var a=n[r];e.getAttribute("listType")!=a&&(t.setAttribute("listType",a,e),o=!0)}else n[r]=e.getAttribute("listType");i=e,e=e.nextSibling}}}(t.model,e)})),r.mapper.registerViewToModelLength("li",Gm),i.mapper.registerViewToModelLength("li",Gm),r.mapper.on("modelToViewPosition",Um(r.view)),r.mapper.on("viewToModelPosition",(n=t.model,function(e,t){var i=t.viewPosition,r=i.parent,o=t.mapper;if("ul"==r.name||"ol"==r.name){if(i.isAtEnd){var a=o.toModelElement(i.nodeBefore),s=o.getModelLength(i.nodeBefore);t.modelPosition=n.createPositionBefore(a).getShiftedBy(s)}else{var l=o.toModelElement(i.nodeAfter);t.modelPosition=n.createPositionBefore(l)}e.stop()}else if("li"==r.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){for(var c=o.toModelElement(r),u=1,d=i.nodeBefore;d&&qm(d);)u+=o.getModelLength(d),d=d.previousSibling;t.modelPosition=n.createPositionBefore(c).getShiftedBy(u),e.stop()}})),i.mapper.on("modelToViewPosition",Um(r.view)),t.conversion.for("editingDowncast").add((function(e){e.on("insert",zm,{priority:"high"}),e.on("insert:listItem",Rm(t.model)),e.on("attribute:listType:listItem",Dm,{priority:"high"}),e.on("attribute:listType:listItem",Lm,{priority:"low"}),e.on("attribute:listIndent:listItem",function(e){return function(t,n,i){if(i.consumable.consume(n.item,"attribute:listIndent")){var r=i.mapper.toViewElement(n.item),o=i.writer;o.breakContainer(o.createPositionBefore(r)),o.breakContainer(o.createPositionAfter(r));var a=r.parent,s=a.previousSibling,l=o.createRangeOn(a);o.remove(l),s&&s.nextSibling&&Sm(o,s,s.nextSibling),Wm(n.attributeOldValue+1,n.range.start,l.start,r,i,e),Em(n.item,r,i,e);var c,u=k(n.item.getChildren());try{for(u.s();!(c=u.n()).done;){var d=c.value;i.consumable.consume(d,"insert")}}catch(h){u.e(h)}finally{u.f()}}}}(t.model)),e.on("remove:listItem",function(e){return function(t,n,i){var r=i.mapper.toViewPosition(n.position).getLastMatchingPosition((function(e){return!e.item.is("element","li")})).nodeAfter,o=i.writer;o.breakContainer(o.createPositionBefore(r)),o.breakContainer(o.createPositionAfter(r));var a=r.parent,s=a.previousSibling,l=o.createRangeOn(a),c=o.remove(l);s&&s.nextSibling&&Sm(o,s,s.nextSibling),Wm(i.mapper.toModelElement(r).getAttribute("listIndent")+1,n.position,l.start,r,i,e);var u,d=k(o.createRangeIn(c).getItems());try{for(d.s();!(u=d.n()).done;){var h=u.value;i.mapper.unbindViewElement(h)}}catch(f){d.e(f)}finally{d.f()}t.stop()}}(t.model)),e.on("remove",jm,{priority:"low"})})),t.conversion.for("dataDowncast").add((function(e){e.on("insert",zm,{priority:"high"}),e.on("insert:listItem",Rm(t.model))})),t.conversion.for("upcast").add((function(e){e.on("element:ul",Bm,{priority:"high"}),e.on("element:ol",Bm,{priority:"high"}),e.on("element:li",Fm,{priority:"high"}),e.on("element:li",Vm)})),t.model.on("insertContent",Hm,{priority:"high"}),t.commands.add("numberedList",new xm(t,"numbered")),t.commands.add("bulletedList",new xm(t,"bulleted")),t.commands.add("indentList",new Tm(t,"forward")),t.commands.add("outdentList",new Tm(t,"backward"));var o=r.view.document;this.listenTo(o,"enter",(function(t,n){var i=e.editor.model.document,r=i.selection.getLastPosition().parent;i.selection.isCollapsed&&"listItem"==r.name&&r.isEmpty&&(e.editor.execute("outdentList"),n.preventDefault(),t.stop())})),this.listenTo(o,"delete",(function(t,n){if("backward"===n.direction){var i=e.editor.model.document.selection;if(i.isCollapsed){var r=i.getFirstPosition();if(r.isAtStart){var o=r.parent;"listItem"===o.name&&(o.previousSibling&&"listItem"===o.previousSibling.name||(e.editor.execute("outdentList"),n.preventDefault(),t.stop()))}}}}),{priority:"high"});var a=function(t){return function(n,i){e.editor.commands.get(t).isEnabled&&(e.editor.execute(t),i())}};t.keystrokes.set("Tab",a("indentList")),t.keystrokes.set("Shift+Tab",a("outdentList"))}},{key:"afterInit",value:function(){var e=this.editor.commands,t=e.get("indent"),n=e.get("outdent");t&&t.registerChildCommand(e.get("indentList")),n&&n.registerChildCommand(e.get("outdentList"))}}],[{key:"pluginName",get:function(){return"ListEditing"}},{key:"requires",get:function(){return[yv]}}]),n}(Vu);function Gm(e){var t,n=1,i=k(e.getChildren());try{for(i.s();!(t=i.n()).done;){var r=t.value;if("ul"==r.name||"ol"==r.name){var o,a=k(r.getChildren());try{for(a.s();!(o=a.n()).done;){var s=o.value;n+=Gm(s)}}catch(l){a.e(l)}finally{a.f()}}}}catch(l){i.e(l)}finally{i.f()}return n}var Km=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor.t;Im(this.editor,"numberedList",e("Numbered List"),''),Im(this.editor,"bulletedList",e("Bulleted List"),'')}}]),n}(Vu);function Jm(e,t){return function(e){e.on("attribute:url:media",n)};function n(n,i,r){if(r.consumable.consume(i.item,n.name)){var o=i.attributeNewValue,a=r.writer,s=r.mapper.toViewElement(i.item),l=u(s.getChildren()).find((function(e){return e.getCustomProperty("media-content")}));a.remove(l);var c=e.getMediaViewElement(a,o,t);a.insert(a.createPositionAt(s,0),c)}}}function Qm(e,t,n,i){var r=e.createContainerElement("figure",{class:"media"});return e.insert(e.createPositionAt(r,0),t.getMediaViewElement(e,n,i)),r}function Zm(e){var t=e.getSelectedElement();return t&&t.is("element","media")?t:null}function Xm(e,t,n){e.change((function(i){var r=i.createElement("media",{url:t});e.insertContent(r,n),i.setSelection(r,"on")}))}var eg=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"refresh",value:function(){var e=this.editor.model,t=e.document.selection,n=e.schema,i=t.getFirstPosition(),r=Zm(t),o=i.parent;o!=o.root&&(o=o.parent),this.value=r?r.getAttribute("url"):null,this.isEnabled=n.checkChild(o,"media")}},{key:"execute",value:function(e){var t=this.editor.model,n=t.document.selection,i=Zm(n);if(i)t.change((function(t){t.setAttribute("url",e,i)}));else{var r=Id(n,t);Xm(t,e,r)}}}]),n}(Fu),tg=function(){function e(t,n){w(this,e);var i=n.providers,r=n.extraProviders||[],o=new Set(n.removeProviders),a=i.concat(r).filter((function(e){var t=e.name;return t?!o.has(t):(console.warn(Object(jn.a)("media-embed-no-provider-name: The configured media provider has no name and cannot be used."),{provider:e}),!1)}));this.locale=t,this.providerDefinitions=a}return x(e,[{key:"hasMedia",value:function(e){return!!this._getMedia(e)}},{key:"getMediaViewElement",value:function(e,t,n){return this._getMedia(t).getViewElement(e,n)}},{key:"_getMedia",value:function(e){if(!e)return new ng(this.locale);e=e.trim();var t,n=k(this.providerDefinitions);try{for(n.s();!(t=n.n()).done;){var i=t.value,r=i.html,o=i.url;Array.isArray(o)||(o=[o]);var a,s=k(o);try{for(s.s();!(a=s.n()).done;){var l=a.value,c=this._getUrlMatches(e,l);if(c)return new ng(this.locale,e,c,r)}}catch(u){s.e(u)}finally{s.f()}}}catch(u){n.e(u)}finally{n.f()}return null}},{key:"_getUrlMatches",value:function(e,t){var n=e.match(t);if(n)return n;var i=e.replace(/^https?:\/\//,"");return n=i.match(t),n||(i=i.replace(/^www\./,""),n=i.match(t),n||null)}}]),e}(),ng=function(){function e(t,n,i,r){w(this,e),this.url=this._getValidUrl(n),this._t=t.t,this._match=i,this._previewRenderer=r}return x(e,[{key:"getViewElement",value:function(e,t){var n,i={};if(t.renderForEditingView||t.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(i["data-oembed-url"]=this.url),t.renderForEditingView&&(i.class="ck-media__wrapper");var r=this._getPreviewHtml(t);n=e.createRawElement("div",i,(function(e){e.innerHTML=r}))}else this.url&&(i.url=this.url),n=e.createEmptyElement("oembed",i);return e.setCustomProperty("media-content",!0,n),n}},{key:"_getPreviewHtml",value:function(e){return this._previewRenderer?this._previewRenderer(this._match):this.url&&e.renderForEditingView?this._getPlaceholderHtml():""}},{key:"_getPlaceholderHtml",value:function(){var e=new wu,t=new yu;return e.text=this._t("Open media in new tab"),t.content='',t.viewBox="0 0 64 42",new Nc({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[t]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]},e]}]}).render().outerHTML}},{key:"_getValidUrl",value:function(e){return e?e.match(/^https?/)?e:"https://"+e:null}}]),e}();n(98);var ig=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),e.config.define("mediaEmbed",{providers:[{name:"dailymotion",url:/^dailymotion\.com\/video\/(\w+)/,html:function(e){return'
')}},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:function(e){return'
')}},{name:"youtube",url:[/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)/,/^(?:m\.)?youtube\.com\/v\/([\w-]+)/,/^youtube\.com\/embed\/([\w-]+)/,/^youtu\.be\/([\w-]+)/],html:function(e){return'
')}},{name:"vimeo",url:[/^vimeo\.com\/(\d+)/,/^vimeo\.com\/[^/]+\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/album\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/channels\/[^/]+\/(\d+)/,/^vimeo\.com\/groups\/[^/]+\/videos\/(\d+)/,/^vimeo\.com\/ondemand\/[^/]+\/(\d+)/,/^player\.vimeo\.com\/video\/(\d+)/],html:function(e){return'
')}},{name:"instagram",url:/^instagram\.com\/p\/(\w+)/},{name:"twitter",url:/^twitter\.com/},{name:"googleMaps",url:/^google\.com\/maps/},{name:"flickr",url:/^flickr\.com/},{name:"facebook",url:/^facebook\.com/}]}),i.registry=new tg(e.locale,e.config.get("mediaEmbed")),i}return x(n,null,[{key:"pluginName",get:function(){return"MediaEmbedEditing"}}]),x(n,[{key:"init",value:function(){var e=this.editor,t=e.model.schema,n=e.t,i=e.conversion,r=e.config.get("mediaEmbed.previewsInData"),o=this.registry;e.commands.add("mediaEmbed",new eg(e)),t.register("media",{isObject:!0,isBlock:!0,allowWhere:"$block",allowAttributes:["url"]}),i.for("dataDowncast").elementToElement({model:"media",view:function(e,t){var n=t.writer,i=e.getAttribute("url");return Qm(n,o,i,{renderMediaPreview:i&&r})}}),i.for("dataDowncast").add(Jm(o,{renderMediaPreview:r})),i.for("editingDowncast").elementToElement({model:"media",view:function(e,t){var i=t.writer,r=e.getAttribute("url");return function(e,t,n){return t.setCustomProperty("media",!0,e),Ed(e,t,{label:n})}(Qm(i,o,r,{renderForEditingView:!0}),i,n("media widget"))}}),i.for("editingDowncast").add(Jm(o,{renderForEditingView:!0})),i.for("upcast").elementToElement({view:{name:"oembed",attributes:{url:!0}},model:function(e,t){var n=t.writer,i=e.getAttribute("url");if(o.hasMedia(i))return n.createElement("media",{url:i})}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:function(e,t){var n=t.writer,i=e.getAttribute("data-oembed-url");if(o.hasMedia(i))return n.createElement("media",{url:i})}})}}]),n}(Vu),rg=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=]+$/,og=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i._timeoutId=null,i._positionToInsert=null,i}return x(n,null,[{key:"requires",get:function(){return[fh,Yf]}},{key:"pluginName",get:function(){return"AutoMediaEmbed"}}]),x(n,[{key:"init",value:function(){var e=this,t=this.editor,n=t.model.document;this.listenTo(t.plugins.get(fh),"inputTransformation",(function(){var t=n.selection.getFirstRange(),i=Kl.fromPosition(t.start);i.stickiness="toPrevious";var r=Kl.fromPosition(t.end);r.stickiness="toNext",n.once("change:data",(function(){e._embedMediaBetweenPositions(i,r),i.detach(),r.detach()}),{priority:"high"})})),t.commands.get("undo").on("execute",(function(){e._timeoutId&&(Oo.window.clearTimeout(e._timeoutId),e._positionToInsert.detach(),e._timeoutId=null,e._positionToInsert=null)}),{priority:"high"})}},{key:"_embedMediaBetweenPositions",value:function(e,t){var n,i=this,r=this.editor,o=r.plugins.get(ig).registry,a=new vs(e,t),s=a.getWalker({ignoreElementEnd:!0}),l="",c=k(s);try{for(c.s();!(n=c.n()).done;){var u=n.value;u.item.is("$textProxy")&&(l+=u.item.data)}}catch(d){c.e(d)}finally{c.f()}l=l.trim(),l.match(rg)&&o.hasMedia(l)&&r.commands.get("mediaEmbed").isEnabled?(this._positionToInsert=Kl.fromPosition(e),this._timeoutId=Oo.window.setTimeout((function(){r.model.change((function(e){var t;i._timeoutId=null,e.remove(a),a.detach(),"$graveyard"!==i._positionToInsert.root.rootName&&(t=i._positionToInsert),Xm(r.model,l,t),i._positionToInsert.detach(),i._positionToInsert=null}))}),100)):a.detach()}}]),n}(Vu);n(100);var ag=function(e){C(n,e);var t=A(n);function n(e,i){var r;w(this,n),r=t.call(this,i);var o=i.t;return r.focusTracker=new xc,r.keystrokes=new vc,r.urlInputView=r._createUrlInput(),r.saveButtonView=r._createButton(o("Save"),Fv,"ck-button-save"),r.saveButtonView.type="submit",r.cancelButtonView=r._createButton(o("Cancel"),Uv,"ck-button-cancel","cancel"),r._focusables=new Ic,r._focusCycler=new cu({focusables:r._focusables,focusTracker:r.focusTracker,keystrokeHandler:r.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),r._validators=e,r.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form"],tabindex:"-1"},children:[r.urlInputView,r.saveButtonView,r.cancelButtonView]}),r}return x(n,[{key:"render",value:function(){var e=this;l(N(n.prototype),"render",this).call(this),Bv({view:this}),[this.urlInputView,this.saveButtonView,this.cancelButtonView].forEach((function(t){e._focusables.add(t),e.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element);var t=function(e){return e.stopPropagation()};this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t),this.listenTo(this.urlInputView.element,"selectstart",(function(e,t){t.stopPropagation()}),{priority:"high"})}},{key:"focus",value:function(){this._focusCycler.focusFirst()}},{key:"isValid",value:function(){this.resetFormStatus();var e,t=k(this._validators);try{for(t.s();!(e=t.n()).done;){var n=e.value,i=n(this);if(i)return this.urlInputView.errorText=i,!1}}catch(r){t.e(r)}finally{t.f()}return!0}},{key:"resetFormStatus",value:function(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}},{key:"_createUrlInput",value:function(){var e=this,t=this.locale.t,n=new zv(this.locale,Vv),i=n.fieldView;return this._urlInputViewInfoDefault=t("Paste the media URL in the input."),this._urlInputViewInfoTip=t("Tip: Paste the URL into the content to embed faster."),n.label=t("Media URL"),n.infoText=this._urlInputViewInfoDefault,i.placeholder="https://example.com",i.on("input",(function(){n.infoText=i.element.value?e._urlInputViewInfoTip:e._urlInputViewInfoDefault})),n}},{key:"_createButton",value:function(e,t,n,i){var r=new _u(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.extendTemplate({attributes:{class:n}}),i&&r.delegate("execute").to(this,i),r}},{key:"url",get:function(){return this.urlInputView.fieldView.element.value.trim()},set:function(e){this.urlInputView.fieldView.element.value=e.trim()}}]),n}(Zc),sg=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this,t=this.editor,n=t.commands.get("mediaEmbed"),i=t.plugins.get(ig).registry;t.ui.componentFactory.add("mediaEmbed",(function(r){var o=Ou(r),a=new ag(function(e,t){return[function(t){if(!t.url.length)return e("The URL must not be empty.")},function(n){if(!t.hasMedia(n.url))return e("This media URL is not supported.")}]}(t.t,i),t.locale);return e._setUpDropdown(o,a,n,t),e._setUpForm(o,a,n),o}))}},{key:"_setUpDropdown",value:function(e,t,n){var i=this.editor,r=i.t,o=e.buttonView;function a(){i.editing.view.focus(),e.isOpen=!1}e.bind("isEnabled").to(n),e.panelView.children.add(t),o.set({label:r("Insert media"),icon:'',tooltip:!0}),o.on("open",(function(){t.url=n.value||"",t.urlInputView.fieldView.select(),t.focus()}),{priority:"low"}),e.on("submit",(function(){t.isValid()&&(i.execute("mediaEmbed",t.url),a())})),e.on("change:isOpen",(function(){return t.resetFormStatus()})),e.on("cancel",(function(){return a()}))}},{key:"_setUpForm",value:function(e,t,n){t.delegate("submit","cancel").to(e),t.urlInputView.bind("value").to(n,"value"),t.urlInputView.bind("isReadOnly").to(n,"isEnabled",(function(e){return!e})),t.saveButtonView.bind("isEnabled").to(n)}}],[{key:"requires",get:function(){return[ig]}},{key:"pluginName",get:function(){return"MediaEmbedUI"}}]),n}(Vu);function lg(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;t>r?i.setAttribute(e,t,n):i.removeAttribute(e,n)}function cg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e.createElement("tableCell",n);return e.insertElement("paragraph",i),e.insert(i,t),i}function ug(e,t){var n=t.parent.parent,i=parseInt(n.getAttribute("headingColumns")||0),r=e.getCellLocation(t),o=r.column;return!!i&&on.headingColumns&&(n.headingColumns=h)}}}catch(f){u.e(f)}finally{u.f()}}}return n.rows=[].concat(i,r),n}(i),o=r.rows,a=r.headingRows,s=r.headingColumns,l={};s&&(l.headingColumns=s),a&&(l.headingRows=a);var c=n.writer.createElement("table",l);if(n.safeInsert(c,t.modelCursor)){if(n.consumable.consume(i,{name:!0}),o.forEach((function(e){return n.convertItem(e,n.writer.createPositionAt(c,"end"))})),c.isEmpty){var u=n.writer.createElement("tableRow");n.writer.insert(u,n.writer.createPositionAt(c,"end")),cg(n.writer,n.writer.createPositionAt(u,"end"))}n.updateConversionResult(c,t)}}}))}}function hg(e){return function(t){t.on("element:"+e,(function(e,t,n){if(t.modelRange){var i=t.modelRange.start.nodeAfter;if(!i.childCount){var r=n.writer.createPositionAt(i,0);n.writer.insertElement("paragraph",r)}}}),{priority:"low"})}}function fg(e){for(var t=0,n=0,i=Array.from(e.getChildren()).filter((function(e){return"th"===e.name||"td"===e.name}));n1&&void 0!==arguments[1]?arguments[1]:{};w(this,e),this._table=t,this._startRow=void 0!==n.row?n.row:n.startRow||0,this._endRow=void 0!==n.row?n.row:n.endRow,this._startColumn=void 0!==n.column?n.column:n.startColumn||0,this._endColumn=void 0!==n.column?n.column:n.endColumn,this._includeAllSlots=!!n.includeAllSlots,this._skipRows=new Set,this._row=0,this._column=0,this._cellIndex=0,this._spannedCells=new Map,this._nextCellAtColumn=-1}return x(e,[{key:Symbol.iterator,value:function(){return this}},{key:"next",value:function(){var e=this._table.getChild(this._row);if(!e||this._isOverEndRow())return{done:!0};if(this._isOverEndColumn())return this._advanceToNextRow();var t=null,n=this._getSpanned();if(n)this._includeAllSlots&&!this._shouldSkipSlot()&&(t=this._formatOutValue(n.cell,n.row,n.column));else{var i=e.getChild(this._cellIndex);if(!i)return this._advanceToNextRow();var r=parseInt(i.getAttribute("colspan")||1),o=parseInt(i.getAttribute("rowspan")||1);(r>1||o>1)&&this._recordSpans(i,o,r),this._shouldSkipSlot()||(t=this._formatOutValue(i)),this._nextCellAtColumn=this._column+r}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}},{key:"skipRow",value:function(e){this._skipRows.add(e)}},{key:"_advanceToNextRow",value:function(){return this._row++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}},{key:"_isOverEndRow",value:function(){return void 0!==this._endRow&&this._row>this._endRow}},{key:"_isOverEndColumn",value:function(){return void 0!==this._endColumn&&this._column>this._endColumn}},{key:"_formatOutValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._row,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._column;return{done:!1,value:new pg(this,e,t,n)}}},{key:"_shouldSkipSlot",value:function(){var e=this._skipRows.has(this._row),t=this._rowthis._endColumn;return e||t||n||i}},{key:"_getSpanned",value:function(){var e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}},{key:"_recordSpans",value:function(e,t,n){for(var i={cell:e,row:this._row,column:this._column},r=this._row;r0&&void 0!==arguments[0]?arguments[0]:{};return function(t){return t.on("insert:table",(function(t,n,i){var r=n.item;if(i.consumable.consume(r,"insert")){i.consumable.consume(r,"attribute:headingRows:table"),i.consumable.consume(r,"attribute:headingColumns:table");var o,a,s,l=e&&e.asWidget,c=i.writer.createContainerElement("figure",{class:"table"}),u=i.writer.createContainerElement("table");i.writer.insert(i.writer.createPositionAt(c,0),u),l&&(a=c,(s=i.writer).setCustomProperty("table",!0,a),o=Ed(a,s,{hasSelectionHandle:!0}));var d,h=new vg(r),f={headingRows:r.getAttribute("headingRows")||0,headingColumns:r.getAttribute("headingColumns")||0},v=new Map,p=k(h);try{for(p.s();!(d=p.n()).done;){var m=d.value,g=m.row,b=m.cell,y=r.getChild(g),w=v.get(g)||bg(u,y,g,f,i);v.set(g,w),i.consumable.consume(b,"insert"),kg(m,f,i.writer.createPositionAt(w,"end"),i,e)}}catch(P){p.e(P)}finally{p.f()}var _,x=k(r.getChildren());try{for(x.s();!(_=x.n()).done;){var C=_.value,A=C.index;v.has(A)||v.set(A,bg(u,C,A,f,i))}}catch(P){x.e(P)}finally{x.f()}var T=i.mapper.toViewPosition(n.range.start);i.mapper.bindElements(r,l?o:c),i.writer.insert(T,l?o:c)}}))}}function gg(e,t,n){var i=e.cell,r=yg(e,t),o=n.mapper.toViewElement(i);o&&o.name!==r&&function(e,t,n){var i=n.writer,r=n.mapper.toViewElement(e),o=Md(i.createEditableElement(t,r.getAttributes()),i);Sd(o,i,(function(e,t,n){return n.addClass(xg(t.classes),e)}),(function(e,t,n){return n.removeClass(xg(t.classes),e)})),i.insert(i.createPositionAfter(r),o),i.move(i.createRangeIn(r),i.createPositionAt(o,0)),i.remove(i.createRangeOn(r)),n.mapper.unbindViewElement(r),n.mapper.bindElements(e,o)}(i,r,n)}function kg(e,t,n,i,r){var o=r&&r.asWidget,a=yg(e,t),s=o?Md(i.writer.createEditableElement(a),i.writer):i.writer.createContainerElement(a);o&&Sd(s,i.writer,(function(e,t,n){return n.addClass(xg(t.classes),e)}),(function(e,t,n){return n.removeClass(xg(t.classes),e)}));var l=e.cell,c=l.getChild(0),d=1===l.childCount&&"paragraph"===c.name;if(i.writer.insert(n,s),d&&!u(c.getAttributeKeys()).length){var h=l.getChild(0),f=i.writer.createPositionAt(s,"end");if(i.consumable.consume(h,"insert"),o){var v=i.writer.createContainerElement("span",{style:"display:inline-block"});i.mapper.bindElements(h,v),i.writer.insert(f,v),i.mapper.bindElements(l,s)}else i.mapper.bindElements(l,s),i.mapper.bindElements(h,s)}else i.mapper.bindElements(l,s)}function bg(e,t,n,i,r){r.consumable.consume(t,"insert");var o=t.isEmpty?r.writer.createEmptyElement("tr"):r.writer.createContainerElement("tr");r.mapper.bindElements(t,o);var a=i.headingRows,s=function(e,t,n){var i=wg(e,t);return i||function(e,t,n){var i=n.writer.createContainerElement(e),r=n.writer.createPositionAt(t,"tbody"==e?"end":0);return n.writer.insert(r,i),i}(e,t,n)}(function(e,t){return e0&&n>=a?n-a:n,c=r.writer.createPositionAt(s,l);return r.writer.insert(c,o),o}function yg(e,t){var n=e.row,i=e.column,r=t.headingColumns,o=t.headingRows;return o&&o>n||r&&r>i?"th":"td"}function wg(e,t){var n,i=k(t.getChildren());try{for(i.s();!(n=i.n()).done;){var r=n.value;if(r.name==e)return r}}catch(o){i.e(o)}finally{i.f()}}function _g(e,t,n){var i=wg(e,t);i&&0===i.childCount&&n.writer.remove(n.writer.createRangeOn(i))}function xg(e){return Array.isArray(e)?e:[e]}var Cg=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"refresh",value:function(){var e=this.editor.model,t=e.document.selection,n=e.schema,i=function(e){var t=e.parent;return t===t.root?t:t.parent}(t.getFirstPosition());this.isEnabled=n.checkChild(i,"table")}},{key:"execute",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.editor.model,n=t.document.selection,i=this.editor.plugins.get("TableUtils"),r=Id(n,t);t.change((function(n){var o=i.createTable(n,e);t.insertContent(o,r),n.setSelection(n.createPositionAt(o.getNodeByPath([0,0,0]),0))}))}}]),n}(Fu);function Ag(e){var t,n=[],i=k(Mg(e.getRanges()));try{for(i.s();!(t=i.n()).done;){var r=t.value,o=r.getContainedElement();o&&o.is("element","tableCell")&&n.push(o)}}catch(a){i.e(a)}finally{i.f()}return n}function Tg(e){var t,n=[],i=k(e.getRanges());try{for(i.s();!(t=i.n()).done;){var r=t.value,o=r.start.findAncestor("tableCell");o&&n.push(o)}}catch(a){i.e(a)}finally{i.f()}return n}function Pg(e){var t=Ag(e);return t.length?t:Tg(e)}function Eg(e){return Ig(e.map((function(e){return e.parent.index})))}function Sg(e){var t=e[0].findAncestor("table");return Ig(u(new vg(t)).filter((function(t){return e.includes(t.cell)})).map((function(e){return e.column})))}function Og(e,t){if(e.length<2||!function(e){var t=e[0].findAncestor("table"),n=Eg(e),i=parseInt(t.getAttribute("headingRows")||0);if(!Rg(n,i))return!1;var r=parseInt(t.getAttribute("headingColumns")||0);return Rg(Sg(e),r)}(e))return!1;var n,i=new Set,r=new Set,o=0,a=k(e);try{for(a.s();!(n=a.n()).done;){var s=n.value,l=t.getCellLocation(s),c=l.row,d=l.column,h=parseInt(s.getAttribute("rowspan")||1),f=parseInt(s.getAttribute("colspan")||1);i.add(c),r.add(d),h>1&&i.add(c+h-1),f>1&&r.add(d+f-1),o+=h*f}}catch(v){a.e(v)}finally{a.f()}return function(e,t){var n=Array.from(e.values()),i=Array.from(t.values()),r=Math.max.apply(Math,u(n)),o=Math.min.apply(Math,u(n)),a=Math.max.apply(Math,u(i)),s=Math.min.apply(Math,u(i));return(r-o+1)*(a-s+1)}(i,r)==o}function Mg(e){return Array.from(e).sort(Ng)}function Ig(e){var t=e.sort((function(e,t){return e-t}));return{first:t[0],last:t[t.length-1]}}function Ng(e,t){var n=e.start,i=t.start;return n.isBefore(i)?-1:1}function Rg(e,t){var n=e.first,i=e.last;return n1&&void 0!==arguments[1]?arguments[1]:{};return w(this,n),i=t.call(this,e),i.order=r.order||"below",i}return x(n,[{key:"refresh",value:function(){var e=this.editor.model.document.selection.getFirstPosition().findAncestor("table");this.isEnabled=!!e}},{key:"execute",value:function(){var e=this.editor,t=e.model.document.selection,n=e.plugins.get("TableUtils"),i="above"===this.order,r=Pg(t),o=Eg(r),a=i?o.first:o.last,s=r[0].findAncestor("table");n.insertRows(s,{at:i?a:a+1,copyStructureFromAbove:!i})}}]),n}(Fu),Lg=function(e){C(n,e);var t=A(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return w(this,n),i=t.call(this,e),i.order=r.order||"right",i}return x(n,[{key:"refresh",value:function(){var e=this.editor.model.document.selection.getFirstPosition().findAncestor("table");this.isEnabled=!!e}},{key:"execute",value:function(){var e=this.editor,t=e.model.document.selection,n=e.plugins.get("TableUtils"),i="left"===this.order,r=Pg(t),o=Sg(r),a=i?o.first:o.last,s=r[0].findAncestor("table");n.insertColumns(s,{columns:1,at:i?a:a+1})}}]),n}(Fu),zg=function(e){C(n,e);var t=A(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return w(this,n),i=t.call(this,e),i.direction=r.direction||"horizontally",i}return x(n,[{key:"refresh",value:function(){var e=Pg(this.editor.model.document.selection);this.isEnabled=1===e.length}},{key:"execute",value:function(){var e=Pg(this.editor.model.document.selection)[0],t="horizontally"===this.direction,n=this.editor.plugins.get("TableUtils");t?n.splitCellHorizontally(e,2):n.splitCellVertically(e,2)}}]),n}(Fu);function jg(e,t,n){for(var i=t.startRow,r=t.startColumn,o=t.endRow,a=t.endColumn,s=n.createElement("table"),l=o-i+1,c=0;c0&&lg("headingRows",o-n,e,r,0);var a=parseInt(t.getAttribute("headingColumns")||0);a>0&&lg("headingColumns",a-i,e,r,0)}(s,e,i,r,n),s}function Vg(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[],o=new vg(e,{startRow:i,endRow:t-1}),a=k(o);try{for(a.s();!(n=a.n()).done;){var s=n.value,l=s.row,c=s.cellHeight,u=l+c-1;l1&&(s.rowspan=l);var c=parseInt(e.getAttribute("colspan")||1);c>1&&(s.colspan=c);var d,h,f=o+a,v=u(new vg(r,{startRow:o,endRow:f,includeAllSlots:!0})),p=null,m=k(v);try{for(m.s();!(h=m.n()).done;){var g=h.value,b=g.row,y=g.column,w=g.cell;w===e&&void 0===d&&(d=y),void 0!==d&&d===y&&b===f&&(p=cg(n,g.getPositionBefore(),s))}}catch(_){m.e(_)}finally{m.f()}return lg("rowspan",a,e,n),p}function Fg(e,t){var n,i=[],r=new vg(e),o=k(r);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a.column,l=a.cellWidth,c=s+l-1;s1&&(o.colspan=a);var s=parseInt(e.getAttribute("rowspan")||1);s>1&&(o.rowspan=s);var l=cg(i,i.createPositionAfter(e),o);return lg("colspan",r,e,i),l}function Hg(e,t,n,i,r,o){var a=parseInt(e.getAttribute("colspan")||1),s=parseInt(e.getAttribute("rowspan")||1);n+a-1>r&&lg("colspan",r-n+1,e,o,1),t+s-1>i&&lg("rowspan",i-t+1,e,o,1)}function $g(e,t){var n,i=t.getColumns(e),r=new Array(i).fill(0),o=k(new vg(e));try{for(o.s();!(n=o.n()).done;){var a=n.value.column;r[a]++}}catch(c){o.e(c)}finally{o.f()}var s=r.reduce((function(e,t,n){return t?e:[].concat(u(e),[n])}),[]);if(s.length>0){var l=s[s.length-1];return t.removeColumns(e,{at:l}),!0}return!1}function Wg(e,t){for(var n=[],i=0;i0){var r=n[n.length-1];return t.removeRows(e,{at:r}),!0}return!1}function qg(e,t){$g(e,t)||Wg(e,t)}function Yg(e,t){var n=Array.from(new vg(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(n.every((function(e){var t=e.cellHeight;return 1===t})))return t.lastRow;var i=n[0].cellHeight-1;return t.lastRow+i}function Gg(e,t){var n=Array.from(new vg(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(n.every((function(e){var t=e.cellWidth;return 1===t})))return t.lastColumn;var i=n[0].cellWidth-1;return t.lastColumn+i}var Kg=function(e){C(n,e);var t=A(n);function n(e,i){var r;return w(this,n),r=t.call(this,e),r.direction=i.direction,r.isHorizontal="right"==r.direction||"left"==r.direction,r}return x(n,[{key:"refresh",value:function(){var e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}},{key:"execute",value:function(){var e=this,t=this.editor.model,n=Tg(t.document.selection)[0],i=this.value,r=this.direction;t.change((function(t){var o="right"==r||"down"==r,a=o?n:i,s=o?i:n,l=s.parent;!function(e,t,n){Jg(e)||(Jg(t)&&n.remove(n.createRangeIn(t)),n.move(n.createRangeIn(e),n.createPositionAt(t,"end"))),n.remove(e)}(s,a,t);var c=e.isHorizontal?"colspan":"rowspan",u=parseInt(n.getAttribute(c)||1),d=parseInt(i.getAttribute(c)||1);t.setAttribute(c,u+d,a),t.setSelection(t.createRangeIn(a));var h=e.editor.plugins.get("TableUtils");qg(l.findAncestor("table"),h)}))}},{key:"_getMergeableCell",value:function(){var e=Tg(this.editor.model.document.selection)[0];if(e){var t=this.editor.plugins.get("TableUtils"),n=this.isHorizontal?function(e,t,n){var i=e.parent.parent,r="right"==t?e.nextSibling:e.previousSibling,o=(i.getAttribute("headingColumns")||0)>0;if(r){var a="right"==t?e:r,s="right"==t?r:e,l=n.getCellLocation(a),c=l.column,u=n.getCellLocation(s),d=u.column,h=parseInt(a.getAttribute("colspan")||1),f=ug(n,a),v=ug(n,s);if(!o||f==v)return c+h===d?r:void 0}}(e,this.direction,t):function(e,t){var n=e.parent,i=n.parent,r=i.getChildIndex(n);if(!("down"==t&&r===i.childCount-1||"up"==t&&0===r)){var o=parseInt(e.getAttribute("rowspan")||1),a=i.getAttribute("headingRows")||0,s="down"==t&&r+o===a,l="up"==t&&r===a;if(!a||!s&&!l){var c=parseInt(e.getAttribute("rowspan")||1),d="down"==t?r+c:r,h=u(new vg(i,{endRow:d})),f=h.find((function(t){return t.cell===e})).column,v=h.find((function(e){var n=e.row,i=e.cellHeight,r=e.column;return r===f&&("down"==t?n===d:d===n+i)}));return v&&v.cell}}}(e,this.direction);if(n){var i=this.isHorizontal?"rowspan":"colspan",r=parseInt(e.getAttribute(i)||1);return parseInt(n.getAttribute(i)||1)===r?n:void 0}}}}]),n}(Fu);function Jg(e){return 1==e.childCount&&e.getChild(0).is("element","paragraph")&&e.getChild(0).isEmpty}var Qg=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"refresh",value:function(){var e=Pg(this.editor.model.document.selection),t=e[0];if(t){var n=t.findAncestor("table"),i=this.editor.plugins.get("TableUtils").getRows(n)-1,r=Eg(e),o=0===r.first&&r.last===i;this.isEnabled=!o}else this.isEnabled=!1}},{key:"execute",value:function(){var e=this,t=this.editor.model,n=Pg(t.document.selection),i=Eg(n),r=n[0],o=r.findAncestor("table"),a=this.editor.plugins.get("TableUtils").getCellLocation(r).column;t.change((function(t){var n=i.last-i.first+1;e.editor.plugins.get("TableUtils").removeRows(o,{at:i.first,rows:n});var r=function(e,t,n){var i,r=e.getChild(t)||e.getChild(e.childCount-1),o=r.getChild(0),a=0,s=k(r.getChildren());try{for(s.s();!(i=s.n()).done;){var l=i.value;if(a>n)return o;o=l,a+=parseInt(l.getAttribute("colspan")||1)}}catch(c){s.e(c)}finally{s.f()}return o}(o,i.first,a);t.setSelection(t.createPositionAt(r,0))}))}}]),n}(Fu),Zg=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"refresh",value:function(){var e=Pg(this.editor.model.document.selection),t=e[0];if(t){var n=t.findAncestor("table"),i=this.editor.plugins.get("TableUtils").getColumns(n),r=Sg(e),o=r.first,a=r.last;this.isEnabled=a-o1?n:t.previousSibling||n.nextSibling?n.nextSibling||t.previousSibling:i.first?e.reverse().find((function(e){var t=e.column;return ti.last})).cell}(a,i,r,s);this.editor.model.change((function(t){var n=s.last-s.first+1;e.editor.plugins.get("TableUtils").removeColumns(o,{at:s.first,columns:n}),t.setSelection(t.createPositionAt(l,0))}))}}]),n}(Fu),Xg=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"refresh",value:function(){var e=this,t=Pg(this.editor.model.document.selection),n=t.length>0;this.isEnabled=n,this.value=n&&t.every((function(t){return e._isInHeading(t,t.parent.parent)}))}},{key:"execute",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.forceValue!==this.value){var t=this.editor.model,n=Pg(t.document.selection),i=n[0].findAncestor("table"),r=Eg(n),o=r.first,a=r.last,s=this.value?o:a+1,l=i.getAttribute("headingRows")||0;t.change((function(e){if(s){var t,n=Vg(i,s,s>l?l:0),r=k(n);try{for(r.s();!(t=r.n()).done;){var o=t.value.cell;Bg(o,s,e)}}catch(a){r.e(a)}finally{r.f()}}lg("headingRows",s,i,e,0)}))}}},{key:"_isInHeading",value:function(e,t){var n=parseInt(t.getAttribute("headingRows")||0);return!!n&&e.parent.index0;this.isEnabled=n,this.value=n&&e.every((function(e){return ug(t,e)}))}},{key:"execute",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.forceValue!==this.value){var t=this.editor.model,n=Pg(t.document.selection),i=n[0].findAncestor("table"),r=Sg(n),o=r.first,a=r.last,s=this.value?o:a+1;t.change((function(e){if(s){var t,n=Fg(i,s),r=k(n);try{for(r.s();!(t=r.n()).done;){var o=t.value,a=o.cell,l=o.column;Ug(a,l,s,e)}}catch(c){r.e(c)}finally{r.f()}}lg("headingColumns",s,i,e,0)}))}}}]),n}(Fu),tk=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"getCellLocation",value:function(e){var t,n=e.parent,i=n.parent,r=i.getChildIndex(n),o=new vg(i,{row:r}),a=k(o);try{for(a.s();!(t=a.n()).done;){var s=t.value,l=s.cell,c=s.row,u=s.column;if(l===e)return{row:c,column:u}}}catch(d){a.e(d)}finally{a.f()}}},{key:"createTable",value:function(e,t){var n=e.createElement("table");return nk(e,n,0,parseInt(t.rows)||2,parseInt(t.columns)||2),t.headingRows&&lg("headingRows",t.headingRows,n,e,0),t.headingColumns&&lg("headingColumns",t.headingColumns,n,e,0),n}},{key:"insertRows",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.editor.model,i=t.at||0,r=t.rows||1,o=void 0!==t.copyStructureFromAbove,a=t.copyStructureFromAbove?i-1:i,s=this.getRows(e),l=this.getColumns(e);n.change((function(t){var n=e.getAttribute("headingRows")||0;if(n>i&&lg("headingRows",n+r,e,t,0),o||0!==i&&i!==s){var c,u=o?Math.max(i,a):i,d=new vg(e,{endRow:u}),h=new Array(l).fill(1),f=k(d);try{for(f.s();!(c=f.n()).done;){var v=c.value,p=v.row,m=v.column,g=v.cellHeight,b=v.cellWidth,y=v.cell,w=p+g-1,_=p<=a&&a<=w;p0&&cg(t,P,T>1?{colspan:T}:null),A+=Math.abs(T)-1}}}else nk(t,e,i,r,l)}))}},{key:"insertColumns",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.editor.model,r=n.at||0,o=n.columns||1;i.change((function(n){var i=e.getAttribute("headingColumns");r=t&&l<=n&&h>n){var f=u-(n-l+1);r.set(c,{cell:d,rowspan:f})}if(l=t){var v=void 0;v=h>=n?n-t+1:h-t+1,o.push({cell:d,rowspan:u-v})}}}catch(p){a.e(p)}finally{a.f()}return{cellsToMove:r,cellsToTrim:o}}(e,o,a),r=i.cellsToMove,s=i.cellsToTrim;r.size&&function(e,t,n,i){var r,o,a=u(new vg(e,{includeAllSlots:!0,row:t})),s=e.getChild(t),l=k(a);try{for(l.s();!(o=l.n()).done;){var c=o.value,d=c.column,h=c.cell,f=c.isAnchor;if(n.has(d)){var v=n.get(d),p=v.cell,m=v.rowspan,g=r?i.createPositionAfter(r):i.createPositionAt(s,0);i.move(i.createRangeOn(p),g),lg("rowspan",m,p,i),r=p}else f&&(r=h)}}catch(b){l.e(b)}finally{l.f()}}(e,a+1,r,t);for(var l=a;l>=o;l--)t.remove(e.getChild(l));var c,d=k(s);try{for(d.s();!(c=d.n()).done;){var h=c.value,f=h.rowspan,v=h.cell;lg("rowspan",f,v,t)}}catch(p){d.e(p)}finally{d.f()}!function(e,t,n,i){var r=e.getAttribute("headingRows")||0;t=r;i--)for(var o=0,s=u(new vg(e));o1&&d+h>i?lg("colspan",h-1,c,t):d===i&&t.remove(c)}Wg(e,n)||$g(e,n)}))}},{key:"splitCellVertically",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=this.editor.model,i=e.parent.parent,r=parseInt(e.getAttribute("rowspan")||1),o=parseInt(e.getAttribute("colspan")||1);n.change((function(n){if(o>1){var a=rk(o,t),s=a.newCellsSpan,l=a.updatedSpan;lg("colspan",l,e,n);var c={};s>1&&(c.colspan=s),r>1&&(c.rowspan=r),ik(o>t?t-1:o-1,n,n.createPositionAfter(e),c)}if(op})),g=k(m);try{for(g.s();!(d=g.n()).done;){var b=d.value,y=b.cell,w=b.cellWidth;n.setAttribute("colspan",w+h,y)}}catch(C){g.e(C)}finally{g.f()}var _={};r>1&&(_.rowspan=r),ik(h,n,n.createPositionAfter(e),_);var x=i.getAttribute("headingColumns")||0;x>p&&lg("headingColumns",x+h,i,n)}}))}},{key:"splitCellHorizontally",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=this.editor.model,i=e.parent,r=i.parent,o=r.getChildIndex(i),a=parseInt(e.getAttribute("rowspan")||1),s=parseInt(e.getAttribute("colspan")||1);n.change((function(n){if(a>1){var i=u(new vg(r,{startRow:o,endRow:o+a-1,includeAllSlots:!0})),l=rk(a,t),c=l.newCellsSpan,d=l.updatedSpan;lg("rowspan",d,e,n);var h=i.find((function(t){var n=t.cell;return n===e})),f=h.column,v={};c>1&&(v.rowspan=c),s>1&&(v.colspan=s);for(var p=0,m=i;p=o+d&&w&&_&&ik(1,n,g.getPositionBefore(),v)}}if(ao){var M=S+C;n.setAttribute("rowspan",M,E)}}}catch(R){T.e(R)}finally{T.f()}var I={};s>1&&(I.colspan=s),nk(n,r,o+1,C,1,I);var N=r.getAttribute("headingRows")||0;N>o&&lg("headingRows",N+C,r,n)}}))}},{key:"getColumns",value:function(e){return u(e.getChild(0).getChildren()).reduce((function(e,t){return e+parseInt(t.getAttribute("colspan")||1)}),0)}},{key:"getRows",value:function(e){return e.childCount}}],[{key:"pluginName",get:function(){return"TableUtils"}}]),n}(Vu);function nk(e,t,n,i,r){for(var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=0;a3&&void 0!==arguments[3]?arguments[3]:{},r=0;r0}},{key:"execute",value:function(){for(var e=this.editor.model,t=Pg(e.document.selection),n=Eg(t),i=t[0].findAncestor("table"),r=[],o=n.first;o<=n.last;o++){var a,s=k(i.getChild(o).getChildren());try{for(s.s();!(a=s.n()).done;){var l=a.value;r.push(e.createRangeOn(l))}}catch(c){s.e(c)}finally{s.f()}}e.change((function(e){e.setSelection(r)}))}}]),n}(Fu),uk=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"refresh",value:function(){var e=Pg(this.editor.model.document.selection);this.isEnabled=e.length>0}},{key:"execute",value:function(){var e,t=this.editor.model,n=Pg(t.document.selection),i=n[0],r=n.pop(),o=i.findAncestor("table"),a=this.editor.plugins.get("TableUtils"),s=a.getCellLocation(i),l=a.getCellLocation(r),c=Math.min(s.column,l.column),u=Math.max(s.column,l.column),d=[],h=k(new vg(o,{startColumn:c,endColumn:u}));try{for(h.s();!(e=h.n()).done;){var f=e.value;d.push(t.createRangeOn(f.cell))}}catch(v){h.e(v)}finally{h.f()}t.change((function(e){e.setSelection(d)}))}}]),n}(Fu);function dk(e){e.document.registerPostFixer((function(t){return function(e,t){var n,i=t.document.differ.getChanges(),r=!1,o=new Set,a=k(i);try{for(a.s();!(n=a.n()).done;){var s=n.value,l=void 0;"table"==s.name&&"insert"==s.type&&(l=s.position.nodeAfter),"tableRow"!=s.name&&"tableCell"!=s.name||(l=s.position.findAncestor("table")),vk(s)&&(l=s.range.start.findAncestor("table")),l&&!o.has(l)&&(r=hk(l,e)||r,r=fk(l,e)||r,o.add(l))}}catch(c){a.e(c)}finally{a.f()}return r}(t,e)}))}function hk(e,t){var n=!1,i=function(e){var t,n=parseInt(e.getAttribute("headingRows")||0),i=e.childCount,r=[],o=k(new vg(e));try{for(o.s();!(t=o.n()).done;){var a=t.value,s=a.row,l=a.cell,c=a.cellHeight;if(!(c<2)){var u=su){var d=u-s;r.push({cell:l,rowspan:d})}}}}catch(h){o.e(h)}finally{o.f()}return r}(e);if(i.length){n=!0;var r,o=k(i);try{for(o.s();!(r=o.n()).done;){var a=r.value;lg("rowspan",a.rowspan,a.cell,t,1)}}catch(s){o.e(s)}finally{o.f()}}return n}function fk(e,t){var n,i=!1,r=function(e){var t,n=new Array(e.childCount).fill(0),i=k(new vg(e,{includeAllSlots:!0}));try{for(i.s();!(t=i.n()).done;){var r=t.value.row;n[r]++}}catch(o){i.e(o)}finally{i.f()}return n}(e),o=[],a=k(r.entries());try{for(a.s();!(n=a.n()).done;){var s=v(n.value,2),l=s[0],c=s[1];c||o.push(l)}}catch(C){a.e(C)}finally{a.f()}if(o.length){i=!0;var u,d=k(o.reverse());try{for(d.s();!(u=d.n()).done;){var h=u.value;t.remove(e.getChild(h)),r.splice(h,1)}}catch(C){d.e(C)}finally{d.f()}}var f=r[0];if(!r.every((function(e){return e===f}))){var p,m=r.reduce((function(e,t){return t>e?t:e}),0),g=k(r.entries());try{for(g.s();!(p=g.n()).done;){var b=v(p.value,2),y=b[0],w=b[1],_=m-w;if(_){for(var x=0;x<_;x++)cg(t,t.createPositionAt(e.getChild(y),"end"));i=!0}}}catch(C){g.e(C)}finally{g.f()}}return i}function vk(e){var t="attribute"===e.type,n=e.attributeKey;return t&&("headingRows"===n||"colspan"===n||"rowspan"===n)}function pk(e){e.document.registerPostFixer((function(t){return function(e,t){var n,i=t.document.differ.getChanges(),r=!1,o=k(i);try{for(o.s();!(n=o.n()).done;){var a=n.value;"insert"==a.type&&"table"==a.name&&(r=mk(a.position.nodeAfter,e)||r),"insert"==a.type&&"tableRow"==a.name&&(r=gk(a.position.nodeAfter,e)||r),"insert"==a.type&&"tableCell"==a.name&&(r=kk(a.position.nodeAfter,e)||r),bk(a)&&(r=kk(a.position.parent,e)||r)}}catch(s){o.e(s)}finally{o.f()}return r}(t,e)}))}function mk(e,t){var n,i=!1,r=k(e.getChildren());try{for(r.s();!(n=r.n()).done;){var o=n.value;i=gk(o,t)||i}}catch(a){r.e(a)}finally{r.f()}return i}function gk(e,t){var n,i=!1,r=k(e.getChildren());try{for(r.s();!(n=r.n()).done;){var o=n.value;i=kk(o,t)||i}}catch(a){r.e(a)}finally{r.f()}return i}function kk(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;var n,i=Array.from(e.getChildren()).filter((function(e){return e.is("$text")})),r=k(i);try{for(r.s();!(n=r.n()).done;){var o=n.value;t.wrap(t.createRangeOn(o),"paragraph")}}catch(a){r.e(a)}finally{r.f()}return!!i.length}function bk(e){return!(!e.position||!e.position.parent.is("element","tableCell"))&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}function yk(e){e.document.registerPostFixer((function(){return function(e){var t,n=e.document.differ,i=new Set,r=0,o=k(n.getChanges());try{for(o.s();!(t=o.n()).done;){var a=t.value,s="insert"==a.type||"remove"==a.type?a.position.parent:a.range.start.parent;s.is("element","tableCell")&&("insert"==a.type&&r++,wk(s,a.type,r)&&i.add(s))}}catch(d){o.e(d)}finally{o.f()}if(i.size){var l,c=k(i.values());try{for(c.s();!(l=c.n()).done;){var u=l.value;n.refreshItem(u)}}catch(d){c.e(d)}finally{c.f()}return!0}return!1}(e)}))}function wk(e,t,n){if(!Array.from(e.getChildren()).some((function(e){return e.is("element","paragraph")})))return!1;if("attribute"==t){var i=Array.from(e.getChild(0).getAttributeKeys()).length;return 1===e.childCount&&i<2}return e.childCount<=("insert"==t?n+1:1)}function _k(e){e.document.registerPostFixer((function(){return function(e){var t,n=e.document.differ,i=new Set,r=k(n.getChanges());try{for(r.s();!(t=r.n()).done;){var o=t.value;if("attribute"==o.type){var a=o.range.start.nodeAfter;a&&a.is("element","table")&&"headingRows"==o.attributeKey&&i.add(a)}}}catch(u){r.e(u)}finally{r.f()}if(i.size){var s,l=k(i.values());try{for(l.s();!(s=l.n()).done;){var c=s.value;n.refreshItem(c)}}catch(u){l.e(u)}finally{l.f()}return!0}return!1}(e)}))}n(104);var xk=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor,t=e.model,n=t.schema,i=e.conversion;n.register("table",{allowWhere:"$block",allowAttributes:["headingRows","headingColumns"],isObject:!0,isBlock:!0}),n.register("tableRow",{allowIn:"table",isLimit:!0}),n.register("tableCell",{allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),n.extend("$block",{allowIn:"tableCell"}),n.addChildCheck((function(e,t){if("table"==t.name&&Array.from(e.getNames()).includes("table"))return!1})),i.for("upcast").add(dg()),i.for("editingDowncast").add(mg({asWidget:!0})),i.for("dataDowncast").add(mg()),i.for("upcast").elementToElement({model:"tableRow",view:"tr"}),i.for("upcast").add((function(e){e.on("element:tr",(function(e,t){t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()}),{priority:"high"})})),i.for("editingDowncast").add((function(e){return e.on("insert:tableRow",(function(e,t,n){var i=t.item;if(n.consumable.consume(i,"insert")){var r,o=i.parent,a=function(e){var t,n=k(e.getChildren());try{for(n.s();!(t=n.n()).done;){var i=t.value;if("table"===i.name)return i}}catch(r){n.e(r)}finally{n.f()}}(n.mapper.toViewElement(o)),s=o.getChildIndex(i),l=new vg(o,{row:s}),c={headingRows:o.getAttribute("headingRows")||0,headingColumns:o.getAttribute("headingColumns")||0},u=new Map,d=k(l);try{for(d.s();!(r=d.n()).done;){var h=r.value,f=u.get(s)||bg(a,i,s,c,n);u.set(s,f),n.consumable.consume(h.cell,"insert"),kg(h,c,n.writer.createPositionAt(f,"end"),n,{asWidget:!0})}}catch(v){d.e(v)}finally{d.f()}}}))})),i.for("editingDowncast").add((function(e){return e.on("remove:tableRow",(function(e,t,n){e.stop();var i,r=n.writer,o=n.mapper,a=o.toViewPosition(t.position).getLastMatchingPosition((function(e){return!e.item.is("element","tr")})).nodeAfter,s=a.parent.parent,l=r.createRangeOn(a),c=r.remove(l),u=k(r.createRangeIn(c).getItems());try{for(u.s();!(i=u.n()).done;){var d=i.value;o.unbindViewElement(d)}}catch(h){u.e(h)}finally{u.f()}_g("thead",s,n),_g("tbody",s,n)}),{priority:"higher"})})),i.for("upcast").elementToElement({model:"tableCell",view:"td"}),i.for("upcast").elementToElement({model:"tableCell",view:"th"}),i.for("upcast").add(hg("td")),i.for("upcast").add(hg("th")),i.for("editingDowncast").add((function(e){return e.on("insert:tableCell",(function(e,t,n){var i=t.item;if(n.consumable.consume(i,"insert")){var r,o=i.parent,a=o.parent,s=a.getChildIndex(o),l=new vg(a,{row:s}),c={headingRows:a.getAttribute("headingRows")||0,headingColumns:a.getAttribute("headingColumns")||0},u=k(l);try{for(u.s();!(r=u.n()).done;){var d=r.value;if(d.cell===i){var h=n.mapper.toViewElement(o);return void kg(d,c,n.writer.createPositionAt(h,o.getChildIndex(i)),n,{asWidget:!0})}}}catch(f){u.e(f)}finally{u.f()}}}))})),i.attributeToAttribute({model:"colspan",view:"colspan"}),i.attributeToAttribute({model:"rowspan",view:"rowspan"}),i.for("editingDowncast").add((function(e){return e.on("attribute:headingColumns:table",(function(e,t,n){var i=t.item;if(n.consumable.consume(t.item,e.name)){var r,o={headingRows:i.getAttribute("headingRows")||0,headingColumns:i.getAttribute("headingColumns")||0},a=t.attributeOldValue,s=t.attributeNewValue,l=(a>s?a:s)-1,c=k(new vg(i,{endColumn:l}));try{for(c.s();!(r=c.n()).done;){var u=r.value;gg(u,o,n)}}catch(d){c.e(d)}finally{c.f()}}}))})),e.commands.add("insertTable",new Cg(e)),e.commands.add("insertTableRowAbove",new Dg(e,{order:"above"})),e.commands.add("insertTableRowBelow",new Dg(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new Lg(e,{order:"left"})),e.commands.add("insertTableColumnRight",new Lg(e,{order:"right"})),e.commands.add("removeTableRow",new Qg(e)),e.commands.add("removeTableColumn",new Zg(e)),e.commands.add("splitTableCellVertically",new zg(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new zg(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new ok(e)),e.commands.add("mergeTableCellRight",new Kg(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new Kg(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new Kg(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new Kg(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new ek(e)),e.commands.add("setTableRowHeader",new Xg(e)),e.commands.add("selectTableRow",new ck(e)),e.commands.add("selectTableColumn",new uk(e)),_k(t),dk(t),yk(t),pk(t)}}],[{key:"pluginName",get:function(){return"TableEditing"}},{key:"requires",get:function(){return[tk]}}]),n}(Vu);n(106);var Ck=function(e){C(n,e);var t=A(n);function n(e){var i;w(this,n),i=t.call(this,e);var r=i.bindTemplate;return i.items=i._createGridCollection(),i.set("rows",0),i.set("columns",0),i.bind("label").to(P(i),"columns",P(i),"rows",(function(e,t){return"".concat(t," × ").concat(e)})),i.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"mouseover@.ck-insert-table-dropdown-grid-box":r.to("boxover")},children:i.items},{tag:"div",attributes:{class:["ck-insert-table-dropdown__label"]},children:[{text:r.to("label")}]}],on:{mousedown:r.to((function(e){e.preventDefault()})),click:r.to((function(){i.fire("execute")}))}}),i.on("boxover",(function(e,t){var n=t.target.dataset,r=n.row,o=n.column;i.set({rows:parseInt(r),columns:parseInt(o)})})),i.on("change:columns",(function(){i._highlightGridBoxes()})),i.on("change:rows",(function(){i._highlightGridBoxes()})),i}return x(n,[{key:"focus",value:function(){}},{key:"focusLast",value:function(){}},{key:"_highlightGridBoxes",value:function(){var e=this.rows,t=this.columns;this.items.map((function(n,i){var r=Math.floor(i/10)',label:n("Insert table"),tooltip:!0}),o.on("change:isOpen",(function(){i||(i=new Ck(e),o.panelView.children.add(i),i.delegate("execute").to(o),o.buttonView.on("open",(function(){i.rows=0,i.columns=0})),o.on("execute",(function(){t.execute("insertTable",{rows:i.rows,columns:i.columns}),t.editing.view.focus()})))})),o})),t.ui.componentFactory.add("tableColumn",(function(t){var r=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:n("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:i?"insertTableColumnLeft":"insertTableColumnRight",label:n("Insert column left")}},{type:"button",model:{commandName:i?"insertTableColumnRight":"insertTableColumnLeft",label:n("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:n("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:n("Select column")}}];return e._prepareDropdown(n("Column"),'',r,t)})),t.ui.componentFactory.add("tableRow",(function(t){var i=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:n("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:n("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:n("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:n("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:n("Select row")}}];return e._prepareDropdown(n("Row"),'',i,t)})),t.ui.componentFactory.add("mergeTableCells",(function(t){var r=[{type:"button",model:{commandName:"mergeTableCellUp",label:n("Merge cell up")}},{type:"button",model:{commandName:i?"mergeTableCellRight":"mergeTableCellLeft",label:n("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:n("Merge cell down")}},{type:"button",model:{commandName:i?"mergeTableCellLeft":"mergeTableCellRight",label:n("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:n("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:n("Split cell horizontally")}}];return e._prepareMergeSplitButtonDropdown(n("Merge cells"),'',r,t)}))}},{key:"_prepareDropdown",value:function(e,t,n,i){var r=this.editor,o=Ou(i),a=this._fillDropdownWithListOptions(o,n);return o.buttonView.set({label:e,icon:t,tooltip:!0}),o.bind("isEnabled").toMany(a,"isEnabled",(function(){for(var e=arguments.length,t=new Array(e),n=0;nr&&i.insertColumns(e,{at:r,columns:n-r}),t>o&&i.insertRows(e,{at:o,rows:t-o})}(r,s.lastRow+1,s.lastColumn+1,i)),l||!Og(e,i)?function(e,t,n){var i=t.firstRow,r=t.lastRow,o=t.firstColumn,a=t.lastColumn,s={first:i,last:r},l={first:o,last:a};Mk(e,o,s,n),Mk(e,a+1,s,n),Ok(e,i,l,n),Ok(e,r+1,l,n,i)}(r,s,n):(s.lastRow=Yg(r,s),s.lastColumn=Gg(r,s)),s}(s,t,e,o),r=n.lastRow-n.firstRow+1,l=n.lastColumn-n.firstColumn+1,c={startRow:0,startColumn:0,endRow:Math.min(r,t.height)-1,endColumn:Math.min(l,t.width)-1};a=jg(a,c,e);var d=s[0].findAncestor("table"),h=function(e,t,n,i,r){for(var o,a=t.width,s=t.height,l=function(e,t,n){var i,r=new Array(n).fill(null).map((function(){return new Array(t).fill(null)})),o=k(new vg(e));try{for(o.s();!(i=o.n()).done;){var a=i.value,s=a.column,l=a.row,c=a.cell;r[l][s]=c}}catch(u){o.e(u)}finally{o.f()}return r}(e,a,s),c=u(new vg(n,{startRow:i.firstRow,endRow:i.lastRow,startColumn:i.firstColumn,endColumn:i.lastColumn,includeAllSlots:!0})),d=[],h=0,f=c;h4&&void 0!==arguments[4]?arguments[4]:0;if(!(t<1))return Vg(e,t,r).filter((function(e){var t=e.column,i=e.cellWidth;return Ik(t,i,n)})).map((function(e){var n=e.cell;return Bg(n,t,i)}))}function Mk(e,t,n,i){if(!(t<1))return Fg(e,t).filter((function(e){var t=e.row,i=e.cellHeight;return Ik(t,i,n)})).map((function(e){var n=e.cell,r=e.column;return Ug(n,r,t,i)}))}function Ik(e,t,n){var i=e+t-1,r=n.first,o=n.last;return e>=r&&e<=o||e=r}var Nk=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this,t=this.editor.editing.view.document;this.editor.keystrokes.set("Tab",(function(){return e._handleTabOnSelectedTable.apply(e,arguments)}),{priority:"low"}),this.editor.keystrokes.set("Tab",this._getTabHandler(!0),{priority:"low"}),this.editor.keystrokes.set("Shift+Tab",this._getTabHandler(!1),{priority:"low"}),this.listenTo(t,"keydown",(function(){return e._onKeydown.apply(e,arguments)}),{priority:zn.get("high")-10})}},{key:"_handleTabOnSelectedTable",value:function(e,t){var n=this.editor,i=n.model.document.selection.getSelectedElement();i&&i.is("element","table")&&(t(),n.model.change((function(e){e.setSelection(e.createRangeIn(i.getChild(0).getChild(0)))})))}},{key:"_getTabHandler",value:function(e){var t=this,n=this.editor;return function(i,r){var o=Tg(n.model.document.selection)[0];if(o||(o=t.editor.plugins.get("TableSelection").getFocusCell()),o){r();var a=o.parent,s=a.parent,l=s.getChildIndex(a),c=a.getChildIndex(o),u=0===c;if(e||!u||0!==l){var d=c===a.childCount-1,h=l===s.childCount-1;if(e&&h&&d&&(n.execute("insertTableRowBelow"),l===s.childCount-1))n.model.change((function(e){e.setSelection(e.createRangeOn(s))}));else{var f;if(e&&d){var v=s.getChild(l+1);f=v.getChild(0)}else if(!e&&u){var p=s.getChild(l-1);f=p.getChild(p.childCount-1)}else f=a.getChild(c+(e?1:-1));n.model.change((function(e){e.setSelection(e.createRangeIn(f))}))}}else n.model.change((function(e){e.setSelection(e.createRangeOn(s))}))}}}},{key:"_onKeydown",value:function(e,t){var n=this.editor,i=t.keyCode;if($r(i)){var r=Wr(i,n.locale.contentLanguageDirection);this._handleArrowKeys(r,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}}},{key:"_handleArrowKeys",value:function(e,t){var n,i=this.editor.model.document.selection,r=["right","down"].includes(e),o=Ag(i);if(o.length)return n=t?this.editor.plugins.get("TableSelection").getFocusCell():r?o[o.length-1]:o[0],this._navigateFromCellInDirection(n,e,t),!0;var a=i.focus.findAncestor("tableCell");return!!a&&!(t&&!i.isCollapsed&&i.isBackward==r)&&!!this._isSelectionAtCellEdge(i,a,r)&&(this._navigateFromCellInDirection(a,e,t),!0)}},{key:"_isSelectionAtCellEdge",value:function(e,t,n){var i=this.editor.model,r=this.editor.model.schema,o=n?e.getLastPosition():e.getFirstPosition();if(!r.getLimitElement(o).is("element","tableCell"))return i.createPositionAt(t,n?"end":0).isTouching(o);var a=i.createSelection(o);return i.modifySelection(a,{direction:n?"forward":"backward"}),o.isEqual(a.focus)}},{key:"_navigateFromCellInDirection",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this.editor.model,r=e.findAncestor("table"),o=u(new vg(r,{includeAllSlots:!0})),a=o[o.length-1],s=a.row,l=a.column,c=o.find((function(t){var n=t.cell;return n==e})),d=c.row,h=c.column;switch(t){case"left":h--;break;case"up":d--;break;case"right":h+=c.cellWidth;break;case"down":d+=c.cellHeight}if(d<0||d>s||h<0&&d<=0||h>l&&d>=s)i.change((function(e){e.setSelection(e.createRangeOn(r))}));else{h<0?(h=n?0:l,d--):h>l&&(h=n?l:0,d++);var f=o.find((function(e){return e.row==d&&e.column==h})).cell,v=["right","down"].includes(t),p=this.editor.plugins.get("TableSelection");if(n&&p.isEnabled){var m=p.getAnchorCell()||e;p.setCellSelection(m,f)}else{var g=i.createPositionAt(f,v?0:"end");i.change((function(e){e.setSelection(g)}))}}}}],[{key:"pluginName",get:function(){return"TableKeyboard"}},{key:"requires",get:function(){return[Ek]}}]),n}(Vu),Rk=function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),i.domEventType=["mousemove","mouseup","mouseleave"],i}return x(n,[{key:"onDomEvent",value:function(e){this.fire(e.type,e)}}]),n}(ha),Dk=function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){this.editor.editing.view.addObserver(Rk),this._enableShiftClickSelection(),this._enableMouseDragSelection()}},{key:"_enableShiftClickSelection",value:function(){var e=this,t=this.editor,n=!1,i=t.plugins.get(Ek);this.listenTo(t.editing.view.document,"mousedown",(function(r,o){if(e.isEnabled&&i.isEnabled&&o.domEvent.shiftKey){var a=i.getAnchorCell()||Tg(t.model.document.selection)[0];if(a){var s=e._getModelTableCellFromDomEvent(o);s&&Lk(a,s)&&(n=!0,i.setCellSelection(a,s),o.preventDefault())}}})),this.listenTo(t.editing.view.document,"mouseup",(function(){n=!1})),this.listenTo(t.editing.view.document,"selectionChange",(function(e){n&&e.stop()}),{priority:"highest"})}},{key:"_enableMouseDragSelection",value:function(){var e,t,n=this,i=this.editor,r=!1,o=!1,a=i.plugins.get(Ek);this.listenTo(i.editing.view.document,"mousedown",(function(t,i){n.isEnabled&&a.isEnabled&&(i.domEvent.shiftKey||i.domEvent.ctrlKey||i.domEvent.altKey||(e=n._getModelTableCellFromDomEvent(i)))})),this.listenTo(i.editing.view.document,"mousemove",(function(i,s){if(s.domEvent.buttons&&e){var l=n._getModelTableCellFromDomEvent(s);l&&Lk(e,l)&&(t=l,r||t==e||(r=!0)),r&&(o=!0,a.setCellSelection(e,t),s.preventDefault())}})),this.listenTo(i.editing.view.document,"mouseup",(function(){r=!1,o=!1,e=null,t=null})),this.listenTo(i.editing.view.document,"selectionChange",(function(e){o&&e.stop()}),{priority:"highest"})}},{key:"_getModelTableCellFromDomEvent",value:function(e){var t=e.target,n=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(n).parent.findAncestor("tableCell",{includeSelf:!0})}}],[{key:"pluginName",get:function(){return"TableMouse"}},{key:"requires",get:function(){return[Ek]}}]),n}(Vu);function Lk(e,t){return e.parent.parent==t.parent.parent}function zk(e){var t=e.getSelectedElement();return t&&Vk(t)?t:null}function jk(e){var t=function(e,t){for(var n=t.parent;n;){if(n.name===e)return n;n=n.parent}}("table",e.getFirstPosition());return t&&Vk(t.parent)?t.parent:null}function Vk(e){return!!e.getCustomProperty("table")&&Pd(e)}n(110);var Bk=/[\\^$.*+?()[\]{}|]/g,Fk=RegExp(Bk.source),Uk=function(e){return(e=Ci(e))&&Fk.test(e)?e.replace(Bk,"\\$&"):e},Hk={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:"1/2",to:"½"},oneThird:{from:"1/3",to:"⅓"},twoThirds:{from:"2/3",to:"⅔"},oneForth:{from:"1/4",to:"¼"},threeQuarters:{from:"3/4",to:"¾"},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:Kk('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:Kk("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:Kk("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:Kk('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:Kk('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:Kk("'"),to:[null,"‚",null,"’"]}},$k={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},Wk=["symbols","mathematical","typography","quotes"];function qk(e){return"string"==typeof e?new RegExp("(".concat(Uk(e),")$")):e}function Yk(e){return"string"==typeof e?function(){return[e]}:e instanceof Array?function(){return e}:e}function Gk(e){return(e.textNode?e.textNode:e.nodeAfter).getAttributes()}function Kk(e){return new RegExp("(^|\\s)(".concat(e,")([^").concat(e,"]*)(").concat(e,")$"))}function Jk(e){if(e.is("$text")||e.is("$textProxy"))return e.data;var t,n="",i=null,r=k(e.getChildren());try{for(r.s();!(t=r.n()).done;){var o=t.value,a=Jk(o);i&&i.is("element")&&(n+="\n"),n+=a,i=o}}catch(s){r.e(s)}finally{r.f()}return n}var Qk=function(){function e(t,n){w(this,e),this.loader=t,this.options=n}return x(e,[{key:"upload",value:function(){var e=this;return this.loader.file.then((function(t){return new Promise((function(n,i){e._initRequest(),e._initListeners(n,i,t),e._sendRequest(t)}))}))}},{key:"abort",value:function(){this.xhr&&this.xhr.abort()}},{key:"_initRequest",value:function(){var e=this.xhr=new XMLHttpRequest;e.open("POST",this.options.uploadUrl,!0),e.responseType="json"}},{key:"_initListeners",value:function(e,t,n){var i=this.xhr,r=this.loader,o="Couldn't upload file: ".concat(n.name,".");i.addEventListener("error",(function(){return t(o)})),i.addEventListener("abort",(function(){return t()})),i.addEventListener("load",(function(){var n=i.response;if(!n||n.error)return t(n&&n.error&&n.error.message?n.error.message:o);e(n.url?{default:n.url}:n.urls)})),i.upload&&i.upload.addEventListener("progress",(function(e){e.lengthComputable&&(r.uploadTotal=e.total,r.uploaded=e.loaded)}))}},{key:"_sendRequest",value:function(e){for(var t=this.options.headers||{},n=this.options.withCredentials||!1,i=0,r=Object.keys(t);i4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e)){var t=rd(e.substr(0,e.length-1));return t?{url:t}:void 0}})),i=t.plugins.get("Input");n.on("matched:data",(function(n,r){var o=r.batch,a=r.range,s=r.url;if(i.isInput(o)){var l=a.end.getShiftedBy(-1),c=l.getShiftedBy(-s.length),u=t.model.createRange(c,l);e._applyAutoLink(s,u)}})),n.bind("isEnabled").to(this)}},{key:"_enableEnterHandling",value:function(){var e=this,t=this.editor,n=t.model,i=t.commands.get("enter");i&&i.on("execute",(function(){var t=n.document.selection.getFirstPosition(),i=n.createRange(n.createPositionAt(t.parent.previousSibling,0),n.createPositionAt(t.parent.previousSibling,"end"));e._checkAndApplyAutoLinkOnRange(i)}))}},{key:"_enableShiftEnterHandling",value:function(){var e=this,t=this.editor,n=t.model,i=t.commands.get("shiftEnter");i&&i.on("execute",(function(){var t=n.document.selection.getFirstPosition(),i=n.createRange(n.createPositionAt(t.parent,0),t.getShiftedBy(-1));e._checkAndApplyAutoLinkOnRange(i)}))}},{key:"_checkAndApplyAutoLinkOnRange",value:function(e){var t=this.editor.model,n=ed(e,t),i=n.text,r=n.range,o=rd(i);if(o){var a=t.createRange(r.end.getShiftedBy(-o.length),r.end);this._applyAutoLink(o,a)}}},{key:"_applyAutoLink",value:function(e,t){var n=this.editor.model;this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,n)&&n.enqueueChange((function(n){var i,r=(i=e,id.exec(i)?"mailto:"+e:e);n.setAttribute("linkHref",r,t)}))}}],[{key:"pluginName",get:function(){return"AutoLink"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[sd,cd]}},{key:"pluginName",get:function(){return"Bold"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"pluginName",get:function(){return"CKFinder"}},{key:"requires",get:function(){return[Qh,ud,af]}}]),n}(Vu),af,function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[fh,hf,_f,mf,Tf,Yf]}},{key:"pluginName",get:function(){return"Essentials"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[av,cv]}},{key:"pluginName",get:function(){return"FontColor"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[vv,mv]}},{key:"pluginName",get:function(){return"FontSize"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[Cv,Av]}},{key:"pluginName",get:function(){return"Heading"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[Kf,Jf]}},{key:"pluginName",get:function(){return"HorizontalLine"}}]),n}(Vu),Qv,function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[ep]}},{key:"pluginName",get:function(){return"ImageCaption"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[ap,gp,cp]}},{key:"pluginName",get:function(){return"ImageResize"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[Ep,Sp]}},{key:"pluginName",get:function(){return"ImageStyle"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"afterInit",value:function(){var e=this.editor,t=e.t;e.plugins.get(Op).register("image",{ariaLabel:t("Image toolbar"),items:e.config.get("image.toolbar")||[],getRelatedElement:Ld})}}],[{key:"requires",get:function(){return[Op]}},{key:"pluginName",get:function(){return"ImageToolbar"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"pluginName",get:function(){return"ImageUpload"}},{key:"requires",get:function(){return[Qp,Fp,Up]}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"pluginName",get:function(){return"Indent"}},{key:"requires",get:function(){return[em,im]}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[om,sm]}},{key:"pluginName",get:function(){return"Italic"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[$h,pm]}},{key:"pluginName",get:function(){return"Link"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[gm,wm]}},{key:"pluginName",get:function(){return"LinkImage"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[Ym,Km]}},{key:"pluginName",get:function(){return"List"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[ig,sg,og,Nv]}},{key:"pluginName",get:function(){return"MediaEmbed"}}]),n}(Vu),yv,function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"init",value:function(){var e=this.editor.config.get("simpleUpload");e&&(e.uploadUrl?this.editor.plugins.get(ef).createUploadAdapter=function(t){return new Qk(t,e)}:console.warn(Object(jn.a)('simple-upload-adapter-missing-uploadUrl: Missing the "uploadUrl" property in the "simpleUpload" editor configuration.')))}}],[{key:"requires",get:function(){return[ef]}},{key:"pluginName",get:function(){return"SimpleUploadAdapter"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,null,[{key:"requires",get:function(){return[xk,Tk,Ek,Dk,Nk,Sk,Nv]}},{key:"pluginName",get:function(){return"Table"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(){return w(this,n),t.apply(this,arguments)}return x(n,[{key:"afterInit",value:function(){var e=this.editor,t=e.t,n=e.plugins.get(Op),i=e.config.get("table.contentToolbar"),r=e.config.get("table.tableToolbar");i&&n.register("tableContent",{ariaLabel:t("Table toolbar"),items:i,getRelatedElement:jk}),r&&n.register("table",{ariaLabel:t("Table toolbar"),items:r,getRelatedElement:zk})}}],[{key:"requires",get:function(){return[Op]}},{key:"pluginName",get:function(){return"TableToolbar"}}]),n}(Vu),function(e){C(n,e);var t=A(n);function n(e){var i;return w(this,n),i=t.call(this,e),e.config.define("typing",{transformations:{include:Wk}}),i}return x(n,null,[{key:"pluginName",get:function(){return"TextTransformation"}}]),x(n,[{key:"init",value:function(){var e=this,t=this.editor.model.document.selection;t.on("change:range",(function(){e.isEnabled=!t.anchor.parent.is("element","codeBlock")})),this._enableTransformationWatchers()}},{key:"_enableTransformationWatchers",value:function(){var e=this.editor,t=e.model,n=e.plugins.get("Input"),i=function(e){var t=e.extra||[],n=e.remove||[],i=function(e){return!n.includes(e)};return function(e){var t,n=new Set,i=k(e);try{for(i.s();!(t=i.n()).done;){var r=t.value;if($k[r]){var o,a=k($k[r]);try{for(a.s();!(o=a.n()).done;){var s=o.value;n.add(s)}}catch(l){a.e(l)}finally{a.f()}}else n.add(r)}}catch(l){i.e(l)}finally{i.f()}return Array.from(n)}(e.include.concat(t).filter(i)).filter(i).map((function(e){return Hk[e]||e})).map((function(e){return{from:qk(e.from),to:Yk(e.to)}}))}(e.config.get("typing.transformations")),r=new td(e.model,(function(e){var t,n=k(i);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.from.test(e))return{normalizedTransformation:r}}}catch(o){n.e(o)}finally{n.f()}}));r.on("matched:data",(function(e,i){if(n.isInput(i.batch)){var r=i.normalizedTransformation,o=r.from,a=r.to,s=o.exec(i.text),l=a(s.slice(1)),c=i.range,u=s.index;t.enqueueChange((function(e){for(var n=1;n1?n("div",{staticClass:"stickyNav__links"},e._l(e.navItems,(function(t,i){return n("a",{key:t.fieldset,class:{"s--on":t.active},attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.scrollToFieldset(i)}}},[e._v(e._s(t.label))])})),0):e._e(),e._t("title")],2),n("div",{staticClass:"stickyNav__actions"},[e._t("actions")],2)])])},h=[],f=n("b047"),v=n.n(f),p=n("2c83"),m={name:"A17StickyNav",props:{items:{type:Array,default:function(){return[]}}},data:function(){return{lastScrollPos:0,topOffset:70,ticking:!1,navItems:this.items,clickedFieldset:-1,fieldset:[]}},methods:{getFieldsetPosition:function(){var e=this;this.lastScrollPos=window.pageYOffset,this.navItems.forEach((function(t,n){var r=e.fieldset[n],o=r?r.getBoundingClientRect().top+e.lastScrollPos:0;i["a"].set(t,"position",o)}))},setActiveItems:function(){var e=this,t=0;this.navItems.forEach((function(n,r){var o=n.position-e.topOffset0&&(t=r)})),this.clickedFieldset>=0?i["a"].set(e.navItems[e.clickedFieldset],"active",!0):i["a"].set(e.navItems[t],"active",!0)},refresh:function(){var e=this;e.clickedFieldset=-1,this.getFieldsetPosition(),this.setActiveItems(),e.ticking=!1},_resize:v()((function(){this.lastScrollPos=window.pageYOffset,this.refresh()}),200),_scroll:function(){var e=this;this.lastScrollPos=window.pageYOffset,e.ticking||window.requestAnimationFrame((function(){e.refresh(),e.ticking=!1})),e.ticking=!0},scrollToFieldset:function(e){var t=this,n=this.navItems[e].position-this.topOffset+1;this.dispose(),this.clickedFieldset=e,this.getFieldsetPosition(),this.setActiveItems(),Object(p["a"])({offset:n,easing:"easeOut",onComplete:function(){t.init()}})},init:function(){window.addEventListener("scroll",this._scroll),window.addEventListener("resize",this._resize)},dispose:function(){window.removeEventListener("scroll",this._scroll),window.removeEventListener("resize",this._resize)}},mounted:function(){var e=this;this.navItems.forEach((function(t,n){var i=document.querySelector("#"+t.fieldset);i?e.fieldset.push(i):e.fieldset.push(null)})),this.refresh(),this.init()},beforeDestroy:function(){this.dispose()}},g=m,k=(n("7ebf"),n("2877")),b=Object(k["a"])(g,d,h,!1,null,"1a811cfe",null),y=b.exports,w=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"titleEditor",class:e.titleEditorClasses},[n("div",{staticClass:"titleEditor__preview"},[n("h2",{staticClass:"titleEditor__title",class:{"titleEditor__title-only":!e.permalink}},[e.editableTitle?n("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.$refs.editModal.open()}}},[n("span",{staticClass:"f--underlined--o"},[e._v(e._s(e.title))]),e._v(" "),n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"edit"}})]):n("span",[e._v(e._s(e.customTitle?e.customTitle:e.title))])]),!e.permalink&&!e.customPermalink||e.showModal?e._e():n("a",{staticClass:"titleEditor__permalink f--small",attrs:{href:e.fullUrl,target:"_blank"}},[n("span",{staticClass:"f--note f--external f--underlined--o"},[e._v(e._s(e._f("prettierUrl")(e.visibleUrl)))])]),e.showModal?n("span",{staticClass:"titleEditor__permalink f--small f--note f--external f--underlined--o"},[e._v(e._s(e._f("prettierUrl")(e.visibleUrl)))]):e._e(),n("a17-modal",{ref:"editModal",staticClass:"modal--form",attrs:{title:e.modalTitle,forceLock:e.disabled}},[n("a17-langmanager"),n("form",{ref:"modalForm",attrs:{action:"#"},on:{submit:function(t){return t.preventDefault(),e.update(t)}}},[e._t("modal-form"),n("a17-modal-validation",{attrs:{mode:e.mode},on:{disable:e.lockModal}})],2)],1)],1),e._t("default")],2)},_=[],x=n("4e53"),C=n("3b37"),A=n("6d94"),T=n("f03e"),P=n("7d9f");function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function S(e){for(var t=1;t0?"update":"create"},fullUrl:function(){return this.customPermalink||this.baseUrl.replace("{language}",this.currentLocale.value).replace("{preview}/",this.published?"":"admin-preview/")+this.permalink},visibleUrl:function(){return this.customPermalink||this.baseUrl.replace("{language}",this.currentLocale.value).replace("{preview}/","")+this.permalink},title:function(){var e=this.fieldValueByName(this.name)?this.fieldValueByName(this.name):"",t="string"===typeof e?e:e[this.currentLocale.value];return t||this.warningMessage},permalink:function(){return this.fieldValueByName("slug")[this.currentLocale.value]}},Object(r["c"])({baseUrl:function(e){return e.form.baseUrl},currentLocale:function(e){return e.language.active},languages:function(e){return e.language.all},fields:function(e){return e.form.fields},published:function(e){return e.publication.published}})),Object(r["b"])(["fieldValueByName"])),filters:x["a"],methods:{update:function(){this.$refs.editModal.hide()},lockModal:function(e){this.disabled=e}}},I=M,N=(n("33d8"),Object(k["a"])(I,w,_,!1,null,"4e050f8e",null)),R=N.exports,D=n("4168"),L=n("75fb"),z=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"publisher__wrapper"},[e.withPublicationToggle?n("a17-switcher",{attrs:{title:e.$trans("publisher.switcher-title","Status"),name:"publish_state",textEnabled:e.textEnabled,textDisabled:e.textDisabled}}):e._e(),e._t("default"),e.reviewProcess&&e.reviewProcess.length?n("a17-reviewaccordion",{attrs:{options:e.reviewProcess,name:"review_process",value:e.reviewProcessCompleteValues,open:e.openStates["A17Reviewaccordion"]},on:{open:e.openCloseAccordion}},[e._v(e._s(e.$trans("publisher.review-status")))]):e._e(),e.visibility&&e.visibilityOptions&&e.visibilityOptions.length?n("a17-radioaccordion",{attrs:{radios:e.visibilityOptions,name:"visibility",value:e.visibility,open:e.openStates["A17Radioaccordion"]},on:{open:e.openCloseAccordion,change:e.updateVisibility}},[e._v(e._s(e.$trans("publisher.visibility")))]):e._e(),e.languages&&e.showLanguages&&e.languages.length>1?n("a17-checkboxaccordion",{attrs:{options:e.languages,name:"active_languages",value:e.publishedLanguagesValues,open:e.openStates["A17Checkboxaccordion"]},on:{open:e.openCloseAccordion}},[e._v(e._s(e.$trans("publisher.languages")))]):e._e(),e.withPublicationTimeframe?n("a17-pubaccordion",{attrs:{"date-display-format":e.dateDisplayFormat,"date-format":e.dateFormat,date_24h:e.date_24h,open:e.openStates["A17Pubaccordion"]},on:{open:e.openCloseAccordion}},[e._v(e._s(e.$trans("publisher.published-on")))]):e._e(),e.revisions.length?n("a17-revaccordion",{attrs:{open:e.openStates["A17Revisions"],revisions:e.revisions},on:{open:e.openCloseAccordion}},[e._v(e._s(e.$trans("publisher.revisions")))]):e._e(),e.parents.length?n("a17-parentaccordion",{attrs:{open:e.openStates["A17Parents"],parents:e.parents,value:e.parentId},on:{open:e.openCloseAccordion}},[e._v(e._s(e.$trans("publisher.parent-page")))]):e._e(),e.revisions.length?n("div",{staticClass:"publisher__item"},[n("a",{staticClass:"publisher__link",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.openPreview(t)}}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"preview"}}),n("span",{staticClass:"f--link-underlined--o"},[e._v(e._s(e.$trans("publisher.preview")))])])]):e._e(),n("div",{staticClass:"publisher__item publisher__item--btns"},[n("a17-multibutton",{attrs:{options:e.submitOptions,type:"submit",message:e.submitDisableMessage},on:{"button-clicked":e.buttonClicked}})],1)],2)},j=[],V=n("2569"),B=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"switcher",class:e.switcherClasses},[n("h4",{staticClass:"switcher__title"},[e._v(e._s(e.title))]),n("label",{staticClass:"switcher__button",attrs:{for:e.name+"_live"}},[e.isChecked?n("span",{staticClass:"switcher__label"},[e._v(e._s(e.formatTextEnabled))]):e._e(),e.isChecked?e._e():n("span",{staticClass:"switcher__label"},[e._v(e._s(e.formatTextDisabled))]),n("input",{directives:[{name:"model",rawName:"v-model",value:e.checkedValue,expression:"checkedValue"}],attrs:{type:"checkbox",disabled:e.disabled,name:e.name,id:e.name+"_live",value:"live"},domProps:{checked:Array.isArray(e.checkedValue)?e._i(e.checkedValue,"live")>-1:e.checkedValue},on:{change:function(t){var n=e.checkedValue,i=t.target,r=!!i.checked;if(Array.isArray(n)){var o="live",a=e._i(n,o);i.checked?a<0&&(e.checkedValue=n.concat([o])):a>-1&&(e.checkedValue=n.slice(0,a).concat(n.slice(a+1)))}else e.checkedValue=r}}}),n("span",{staticClass:"switcher__switcher"})])])},F=[],U=n("0d3e"),H=n.n(U);function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function W(e){for(var t=1;t0?this.textScheduled:this.textEnabled},formatTextDisabled:function(){return this.textDisabled},checkedValue:{get:function(){return this.published},set:function(e){this.$store.commit(a["m"].UPDATE_PUBLISH_STATE,e),this.$emit("change",e)}}},Object(r["c"])({startDate:function(e){return e.publication.startDate},endDate:function(e){return e.publication.endDate},published:function(e){return e.publication.published}}))},G=Y,K=(n("9922"),Object(k["a"])(G,B,F,!1,null,"2e81738b",null)),J=K.exports,Q=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-accordion",{attrs:{open:e.open},on:{toggleVisibility:e.notifyOpen}},[n("span",{attrs:{slot:"accordion__title"},slot:"accordion__title"},[e._t("default")],2),n("div",{attrs:{slot:"accordion__value"},slot:"accordion__value"},[e._v(e._s(e.currentLabel))]),n("a17-radiogroup",{attrs:{name:e.name,radios:e.radios,initialValue:e.currentValue},on:{change:e.changeValue}})],1)},Z=[],X=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"accordion",class:e.visibilityClasses},[n("button",{staticClass:"accordion__trigger",attrs:{type:"button","aria-expanded":e.visible?"true":"false"},on:{click:e.onClickVisibility}},[e._t("accordion__title"),n("span",{staticClass:"accordion__value"},[e._t("accordion__value")],2),n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"dropdown_module"}})],2),n("transition",{attrs:{css:!1,duration:275},on:{"before-enter":e.beforeEnter,"before-leave":e.beforeLeave,enter:e.enter,leave:e.leave}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"accordion__dropdown",attrs:{"aria-hidden":!e.visible}},[n("div",{staticClass:"accordion__list"},[e._t("default")],2)])])],1)},ee=[],te=n("5a57"),ne={name:"A17Accordion",mixins:[te["a"]],watch:{open:function(){this.visible!==this.open&&(this.visible=this.open)}},methods:{getMaxHeight:function(){return Math.min(250,this.$el.querySelector(".accordion__list").clientHeight+1)},beforeEnter:function(e){e.style.maxHeight="0px"},enter:function(e,t){e.style.maxHeight=this.getMaxHeight()+"px"},beforeLeave:function(e,t){e.style.maxHeight=this.getMaxHeight()+"px"},leave:function(e,t){e.style.maxHeight="0px"}}},ie=ne,re=(n("e005"),n("62c8"),Object(k["a"])(ie,X,ee,!1,null,"0dd10376",null)),oe=re.exports,ae={name:"A17Radioaccordion",components:{"a17-accordion":oe},mixins:[te["a"]],props:{value:{default:""},title:{default:""},name:{default:""},radios:{default:function(){return[]}}},data:function(){return{currentValue:this.value}},computed:{currentLabel:function(){var e=this.radios.filter(this.isSameValue);return e.length?e[0].label:""}},methods:{isSameValue:function(e){return e.value===this.currentValue},changeValue:function(e){this.currentValue=e,this.$emit("change",e)},notifyOpen:function(e){this.$emit("open",e,this.$options.name)}}},se=ae,le=Object(k["a"])(se,Q,Z,!1,null,null,null),ce=le.exports,ue=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-accordion",{attrs:{open:e.open},on:{toggleVisibility:e.notifyOpen}},[n("span",{attrs:{slot:"accordion__title"},slot:"accordion__title"},[e._t("default")],2),n("div",{attrs:{slot:"accordion__value"},slot:"accordion__value"},[e._v(e._s(e.currentLabel))]),n("a17-checkboxgroup",{attrs:{name:e.name,options:e.currentOptions,selected:e.currentValue},on:{change:e.changeValue}})],1)},de=[],he={name:"A17Reviewaccordion",components:{"a17-accordion":oe},mixins:[te["a"]],props:{value:{default:function(){return[]}},title:{type:String,default:""},name:{type:String,default:""},options:{default:function(){return[]}}},data:function(){return{currentOptions:this.options,currentValue:this.value}},computed:{currentLabel:function(){var e="Pending approval",t=this.currentValue[this.currentValue.length-1];return this.currentValue.length&&this.options.forEach((function(n){n.value===t&&(e=n.display)})),e}},methods:{changeValue:function(e){this.currentValue=e,this.$store.commit(a["m"].UPDATE_REVIEW_PROCESS,e)},notifyOpen:function(e){this.$emit("open",e,this.$options.name)}}},fe=he,ve=Object(k["a"])(fe,ue,de,!1,null,null,null),pe=ve.exports,me=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-accordion",{attrs:{open:e.open},on:{toggleVisibility:e.notifyOpen}},[n("span",{attrs:{slot:"accordion__title"},slot:"accordion__title"},[e._t("default")],2),n("div",{attrs:{slot:"accordion__value"},slot:"accordion__value"},[e._v(e._s(e.currentLabel))]),n("a17-checkboxgroup",{attrs:{name:e.name,options:e.options,selected:e.currentValue,min:1},on:{change:e.changeValue}})],1)},ge=[],ke={name:"A17Checkboxaccordion",components:{"a17-accordion":oe},mixins:[te["a"]],props:{value:{default:function(){return[]}},title:{type:String,default:""},name:{type:String,default:""},options:{default:function(){return[]}}},data:function(){return{currentValue:this.value}},watch:{value:function(e){this.currentValue=e}},computed:{currentLabel:function(){return this.currentValue.length+" "+this.$trans("publisher.languages-published")}},methods:{changeValue:function(e){this.currentValue=e,this.$store.commit(a["g"].PUBLISH_LANG,e)},notifyOpen:function(e){this.$emit("open",e,this.$options.name)}}},be=ke,ye=Object(k["a"])(be,me,ge,!1,null,null,null),we=ye.exports,_e=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-accordion",{attrs:{open:e.open},on:{toggleVisibility:e.notifyOpen}},[n("span",{attrs:{slot:"accordion__title"},slot:"accordion__title"},[e._t("default"),e._v(" "),n("span",{staticClass:"f--small f--note"},[e._v("("+e._s(e.revisions.length)+")")])],2),n("div",{attrs:{slot:"accordion__value"},slot:"accordion__value"},[e._v(e._s(e.$trans("publisher.last-edit"))+" "),n("timeago",{attrs:{"auto-update":1,datetime:new Date(e.revisions[0].datetime)}})],1),n("div",{staticClass:"revaccordion__scroller"},[n("ul",{staticClass:"revaccordion__list"},e._l(e.revisions,(function(t,i){return n("li",{key:t.id,staticClass:"revaccordion__item"},[n("a",{attrs:{href:"#"},on:{click:function(n){return n.preventDefault(),e.openPreview(t.id)}}},[n("span",{staticClass:"revaccordion__author"},[e._v(e._s(t.author))]),n("span",{staticClass:"revaccordion__datetime"},[0===i?n("span",{staticClass:"tag"},[e._v(e._s(e.$trans("publisher.current")))]):e._e(),e._v(" "+e._s(e._f("formatDate")(t.datetime)))])])])})),0)])])},xe=[],Ce={name:"A17Revisions",components:{"a17-accordion":oe},mixins:[te["a"]],props:{revisions:{default:function(){return[]}}},filters:x["a"],methods:{notifyOpen:function(e){this.$emit("open",e,this.$options.name)},openPreview:function(e){this.$root.$refs.preview&&this.$root.$refs.preview.open(parseInt(e))}}},Ae=Ce,Te=(n("6b9b"),Object(k["a"])(Ae,_e,xe,!1,null,"042fcdcb",null)),Pe=Te.exports,Ee=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-accordion",{attrs:{open:e.open},on:{toggleVisibility:e.notifyOpen}},[n("span",{attrs:{slot:"accordion__title"},slot:"accordion__title"},[e._t("default")],2),n("div",{attrs:{slot:"accordion__value"},slot:"accordion__value"},[e.startDate?[e._v(" "+e._s(e._f("formatDateWithFormat")(e.startDate,e.dateDisplayFormat))+" ")]:[e._v(" "+e._s(e.defaultStartDate)+" ")]],2),n("div",{staticClass:"accordion__fields"},[n("a17-datepicker",{attrs:{name:"publish_date","place-holder":e.$trans("publisher.start-date"),time_24hr:e.date_24h,altFormat:e.dateFormat,initialValue:e.startDate,maxDate:e.endDate,enableTime:!0,allowInput:!0,staticMode:!0,clear:!0},on:{open:e.openStartCalendar,close:e.closeCalendar,input:e.updateStartDate}}),n("a17-datepicker",{attrs:{name:"end_date","place-holder":e.$trans("publisher.end-date"),time_24hr:e.date_24h,altFormat:e.dateFormat,initialValue:e.endDate,minDate:e.startDate,enableTime:!0,allowInput:!0,staticMode:!0,clear:!0},on:{open:e.openEndCalendar,close:e.closeCalendar,input:e.updateEndDate}})],1)])},Se=[];function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Me(e){for(var t=1;t0);return!t&&this.message&&this.$store.commit(a["j"].SET_NOTIF,{message:this.message,variant:"success"}),t}},methods:{isDisabled:function(e){return!!e.hasOwnProperty("disabled")&&!0===e.disabled},buttonClicked:function(e){this.$emit("button-clicked",e)}}},Je=Ke,Qe=(n("b0c8"),Object(k["a"])(Je,Ye,Ge,!1,null,"40868c5c",null)),Ze=Qe.exports;function Xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function et(e){for(var t=1;t3&&e.collapseAllBlocks()}))}},Tt=At,Pt=(n("b62f"),Object(k["a"])(Tt,pt,mt,!1,null,"4165f148",null)),Et=Pt.exports,St=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"content"},[n("draggable",{staticClass:"content__content",attrs:{options:e.dragOptions},model:{value:e.blocks,callback:function(t){e.blocks=t},expression:"blocks"}},[n("transition-group",{attrs:{name:"draggable_list",tag:"div"}},e._l(e.blocks,(function(t,i){return n("div",{key:t.id,staticClass:"content__item"},[n("a17-block",{attrs:{block:t,index:i,size:e.blockSize,opened:e.opened},on:{open:e.setOpened}},[e.hasRemainingBlocks?n("a17-button",{attrs:{slot:"block-actions",variant:"icon","data-action":""},on:{click:function(t){return e.duplicateBlock(i)}},slot:"block-actions"},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"add"}})]):e._e(),n("div",{attrs:{slot:"dropdown-action"},slot:"dropdown-action"},[n("button",{attrs:{type:"button"},on:{click:function(t){return e.collapseAllBlocks()}}},[e._v("Collapse All")]),n("button",{attrs:{type:"button"},on:{click:function(t){return e.deleteBlock(i)}}},[e._v("Delete")]),e.hasRemainingBlocks?n("button",{attrs:{type:"button"},on:{click:function(t){return e.duplicateBlock(i)}}},[e._v("Duplicate")]):e._e()])],1)],1)})),0)],1),n("div",{staticClass:"content__trigger"},[e.hasRemainingBlocks&&e.blockType.trigger?n("a17-button",{class:e.triggerClass,attrs:{variant:e.triggerVariant,size:e.triggerSize},on:{click:function(t){return e.addBlock()}}},[e._v(e._s(e.blockType.trigger))]):e._e(),n("div",{staticClass:"content__note f--note f--small"},[e._t("default")],2)],1)],1)},Ot=[];function Mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function It(e){for(var t=1;tthis.blocks.length},blockType:function(){return this.availableBlocks[this.type]?this.availableBlocks[this.type]:{}},blocks:{get:function(){return this.savedBlocks.hasOwnProperty(this.name)&&this.savedBlocks[this.name]||[]},set:function(e){this.$store.commit(a["f"].REORDER_FORM_BLOCKS,{type:this.type,name:this.name,blocks:e})}}},Object(r["c"])({savedBlocks:function(e){return e.repeaters.repeaters},availableBlocks:function(e){return e.repeaters.availableRepeaters}})),methods:{setOpened:function(e){this.opened=e},addBlock:function(){this.opened=!0,this.$store.commit(a["f"].ADD_FORM_BLOCK,{type:this.type,name:this.name})},duplicateBlock:function(e){this.opened=!0,this.$store.commit(a["f"].DUPLICATE_FORM_BLOCK,{type:this.type,name:this.name,index:e})},deleteBlock:function(e){this.$store.commit(a["f"].DELETE_FORM_BLOCK,{type:this.type,name:this.name,index:e})},collapseAllBlocks:function(){this.opened=!1}},mounted:function(){var e=this;this.$nextTick((function(){e.savedBlocks.length>0&&e.collapseAllBlocks()}))}},Dt=Rt,Lt=(n("af57"),Object(k["a"])(Dt,St,Ot,!1,null,"f570ad32",null)),zt=Lt.exports,jt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-inputframe",{attrs:{error:e.error,note:e.note,locale:e.locale,label:e.label,name:e.name,required:e.required},on:{localize:e.updateLocale}},[n("div",{staticClass:"form__field",class:e.textfieldClasses},[n("input",{attrs:{type:"search",placeholder:e.placeholder,name:e.name,id:e.name,disabled:e.disabled,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete},domProps:{value:e.address},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}),e.showMap?n("div",{staticClass:"form__field--showMap"},[n("a",{attrs:{href:"#",type:"button"},on:{click:function(t){return t.preventDefault(),e.toggleMap(t)}}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"location"}}),n("span",{domProps:{innerHTML:e._s(e.mapMessage)}})])]):e._e(),n("input",{attrs:{type:"hidden",name:e.name+"__lat"},domProps:{value:e.lat}}),n("input",{attrs:{type:"hidden",name:e.name+"__lng"},domProps:{value:e.lng}})]),e.showMap?n("div",{directives:[{name:"show",rawName:"v-show",value:e.isMapOpen,expression:"isMapOpen"}],staticClass:"form__mapContainer"}):e._e()])},Vt=[],Bt=n("63ea"),Ft=n.n(Bt),Ut=n("da6f"),Ht=n("67ff"),$t=n("7a77"),Wt={show:window.$trans("fields.map.show"),hide:window.$trans("fields.map.hide")},qt="https://maps.googleapis.com/maps/api/js?libraries=places&key=",Yt=window["TWILL"].hasOwnProperty("APIKEYS")&&window["TWILL"].APIKEYS.hasOwnProperty("googleMapApi")?window["TWILL"].APIKEYS.googleMapApi:null,Gt={name:"A17Locationfield",mixins:[Ut["a"],T["a"],P["a"],Ht["a"]],props:{type:{type:String,default:"text"},zoom:{type:Number,default:15},showMap:{type:Boolean,default:!0},openMap:{type:Boolean,default:!1},initialLat:{type:Number,default:null},initialLng:{type:Number,default:null}},data:function(){return{map:null,autocompletePlace:null,markers:[],address:"",beforeFocusAddress:"",lat:this.initialLat,lng:this.initialLng,focused:!1,isMapOpen:this.openMap,mapMessage:this.openMap?Wt.hide:Wt.show}},computed:{value:{get:function(){return{latlng:this.lat+"|"+this.lng,address:this.address}},set:function(e){var t=e.latlng.split("|");this.lat=parseFloat(t[0]),this.lng=parseFloat(t[t.length-1]),this.address=e.address}},textfieldClasses:function(){return{"s--focus":this.focused,"s--disabled":this.disabled}}},methods:{updateFromStore:function(e){if(!Ft()(e,this.value)&&(this.value=e,this.clearMarkers(),""===this.address&&(this.lat=this.initialLat,this.lng=this.initialLng),this.lat&&this.lng&&this.map)){var t={lat:this.lat,lng:this.lng};this.addMarker(t),this.map.panTo(t)}},onFocus:function(e){this.focused=!0,this.beforeFocusAddress=this.address,this.$emit("focus")},onBlur:function(e){this.focused=!1,""===this.address&&(this.clearMarkers(),this.lat=this.initialLat,this.lng=this.initialLng),this.beforeFocusAddress!==this.address&&this.saveIntoStore(),this.$emit("blur")},onInput:function(e){var t=e.target.value;this.address=t,this.$emit("change",t)},onPlaceChanged:function(){var e=this.autocompletePlace.getPlace();if(this.clearMarkers(),this.clearLatLng(),e.geometry){var t=e.geometry.location;this.address=e.formatted_address,this.setLatLng(t),this.map&&(this.addMarker(t),this.map.panTo(t),this.map.setZoom(this.zoom))}this.beforeFocusAddress=this.address,this.saveIntoStore()},clearMarkers:function(){for(var e=0;e0?e.size+"px":""},attrs:{srcdoc:e.content,frameborder:"0"},on:{load:e.loadPreview}})},Pn=[],En={name:"A17previewerFrame",props:{size:{type:Number,default:0},content:{type:String,default:""},scrollPosition:{type:Number,default:0}},data:function(){return{currentScroll:this.scrollPosition}},watch:{scrollPosition:function(e){this.$el.contentWindow.scrollTo(0,e)}},methods:{loadPreview:function(e){for(var t=this,n=e.target,i=n.contentDocument.querySelectorAll("a:not(.sf-dump-toggle),button"),r=0;r0&&void 0!==arguments[0]?arguments[0]:0,t=this;function n(){t.$refs.overlay&&t.$refs.overlay.open(),t.singleView()}this.loadedCurrent=!1,this.activeBreakpoint=1280,this.lastActiveBreakpoint=1280,e?this.previewRevision(e,(function(){n()})):this.previewCurrent((function(){n()}))},close:function(){this.$refs.overlay.close()},openEditor:function(){var e=this.$root.$refs;e.preview&&e.preview.close(),e.editor&&e.editor.open()},restoreRevision:function(){window.location.href=this.restoreRevisionUrl+"?revisionId="+this.currentRevision.id},resizePreview:function(e){this.activeBreakpoint=parseInt(e),this.lastActiveBreakpoint=parseInt(e)},previewCurrent:function(e){this.$store.commit(a["n"].UPDATE_REV,0),this.loadCurrent(e)},loadCurrent:function(e){var t=this;this.loadedCurrent?e&&"function"===typeof e&&e():(this.loadedCurrent=!0,this.$store.dispatch(s["a"].GET_CURRENT).then((function(){e&&"function"===typeof e&&e()}),(function(e){t.$store.commit(a["f"].SET_FORM_ERRORS,e.response.data),t.$store.commit(a["j"].SET_NOTIF,{message:"Your submission could not be validated, please fix and retry",variant:"error"})})))},toggleRevision:function(e){if(this.activeRevision&&this.currentRevision.id===e)return this.singleView(),void this.previewCurrent();this.previewRevision(e)},previewRevision:function(e,t){var n=this;this.$store.commit(a["n"].UPDATE_REV,e),this.$store.dispatch(s["a"].GET_REVISION).then((function(){t&&"function"===typeof t&&t()}),(function(e){n.$store.commit(a["j"].SET_NOTIF,{message:"Invalid revision.",variant:"error"})}))},compareView:function(){this.activeBreakpoint=0,this.slipScreen=!0,this.activeRevision&&this.loadCurrent()},singleView:function(){this.activeBreakpoint=this.lastActiveBreakpoint,this.slipScreen=!1},setIframeScroll:function(e){this.scrollPosition=e}}},Ln=Dn,zn=(n("0bd3"),Object(k["a"])(Ln,Cn,An,!1,null,"617a3800",null)),jn=zn.exports,Vn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-overlay",{ref:"overlay",attrs:{title:e.$trans("editor.title")},on:{close:e.closeEditor,open:e.openEditor}},[n("div",{staticClass:"editor"},[e.revisions.length?n("a17-button",{staticClass:"editor__leave",attrs:{variant:"editor",size:"small"},on:{click:e.openPreview}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],staticClass:"hide--xsmall",attrs:{symbol:"preview"}}),e._v(e._s(e.$trans("fields.block-editor.preview","Preview")))]):e._e(),n("div",{staticClass:"editor__frame"},[n("div",{staticClass:"editor__inner"},[n("div",{ref:"sidebar",staticClass:"editor__sidebar",class:e.sidebarClass},[n("a17-editorsidebar",{on:{delete:e.deleteBlock,save:e.saveBlock,cancel:e.cancelBlock}},[e._v(e._s(e.$trans("fields.block-editor.add-content","Add content")))])],1),n("div",{staticClass:"editor__resizer",on:{mousedown:e.resize}},[n("span")]),n("div",{staticClass:"editor__preview",class:e.previewClass,style:e.previewStyle},[n("a17-editorpreview",{ref:"previews",on:{select:e.selectBlock,delete:e.deleteBlock,unselect:e.unselectBlock,add:e.addBlock}}),e.loading?n("a17-spinner",{attrs:{visible:!0}},[e._v(e._s(e.$trans("fields.block-editor.loading","Loading"))+"…")]):e._e()],1)])])],1)])},Bn=[],Fn=n("66cb"),Un=n.n(Fn),Hn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"editorSidebar"},[e._l(e.blocks,(function(t,i){return n("div",{directives:[{name:"show",rawName:"v-show",value:e.isBlockActive(t.id),expression:"isBlockActive(block.id)"}],key:t.id,staticClass:"editorSidebar__item"},[n("div",{staticClass:"editorSidebar__title"},[n("div",{staticClass:"editorSidebar__blockTitle"},[n("a17-dropdown",{ref:e.moveDropdown(i),refInFor:!0,staticClass:"f--small",attrs:{position:"bottom-left",maxHeight:270}},[n("span",{staticClass:"editorSidebar__counter f--tiny",on:{click:function(t){return e.toggleDropdown(i)}}},[e._v(e._s(i+1))]),n("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},e._l(e.blocks.length,(function(t){return n("button",{key:t,attrs:{type:"button"},on:{click:function(n){return e.moveBlock(i,t-1)}}},[e._v(e._s(t))])})),0)]),e._v(e._s(e.activeBlock.title)+" ")],1),n("span",[n("a",{staticClass:"f--small f--note f--underlined",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.deleteBlock(i)}}},[e._v(e._s(e.$trans("editor.delete")))])])]),n("div",{staticClass:"editorSidebar__body"},[n("a17-inputframe",{attrs:{label:"",name:"block."+t.id}}),n(""+t.type,e._b({key:"`editor_${block.type}_${block.id}`",tag:"component",attrs:{name:e.componentName(t.id)}},"component",t.attributes,!1))],1)])})),e.hasBlockActive?[n("div",{staticClass:"editorSidebar__actions"},[n("a17-button",{attrs:{variant:"action"},on:{click:function(t){return e.saveBlock()}}},[e._v(e._s(e.$trans("editor.done")))]),n("a17-button",{attrs:{variant:"secondary"},on:{click:function(t){return e.cancelBlock()}}},[e._v(e._s(e.$trans("editor.cancel")))])],1)]:[n("div",{staticClass:"editorSidebar__list"},[n("h4",{staticClass:"editorSidebar__title"},[e._t("default")],2),e.availableBlocks.length?n("draggable",{attrs:{options:{group:{name:"editorBlocks",pull:"clone",put:!1},handle:".editorSidebar__button"}},model:{value:e.availableBlocks,callback:function(t){e.availableBlocks=t},expression:"availableBlocks"}},e._l(e.availableBlocks,(function(t){return n("div",{key:t.component,staticClass:"editorSidebar__button",attrs:{"data-title":t.title,"data-icon":t.icon,"data-component":t.component}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:t.icon}}),e._v(e._s(t.title)+" ")])})),0):e._e()],1),n("div",{staticClass:"editorSidebar__actions"},[e.isSubmitDisabled(e.submitOptions[0])?n("a17-button",{attrs:{variant:"validate",disabled:!0}},[e._v(e._s(e.submitOptions[0].text))]):n("a17-button",{attrs:{name:e.submitOptions[0].name,variant:"validate"},on:{click:function(t){return e.saveForm(e.submitOptions[0].name)}}},[e._v(e._s(e.submitOptions[0].text))])],1)]],2)},$n=[];function Wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function qn(e){for(var t=1;t0},submitOptions:function(){return this.$store.getters.getSubmitOptions}},Object(r["c"])({activeBlock:function(e){return e.content.active},availableBlocks:function(e){return e.content.available},blocks:function(e){return e.content.blocks}})),methods:{isSubmitDisabled:function(e){return!!e.hasOwnProperty("disabled")&&!0===e.disabled},toggleDropdown:function(e){if(this.blocks.length>1){var t=this.moveDropdown(e);this.$refs[t].length&&this.$refs[t][0].toggle()}},moveDropdown:function(e){return"move".concat(e,"Dropdown")},isBlockActive:function(e){return!!this.hasBlockActive&&e===this.activeBlock.id},componentName:function(e){return"blocks["+e+"]"},moveBlock:function(e,t){e!==t&&this.$store.commit(a["d"].MOVE_BLOCK,{oldIndex:e,newIndex:t})},saveBlock:function(){this.$emit("save")},cancelBlock:function(){this.$emit("cancel")},deleteBlock:function(e){this.$emit("delete",e)},saveForm:function(e){this.$store.commit(a["m"].UPDATE_SAVE_TYPE,e),this.$root.submitForm&&this.$root.submitForm()}},mounted:function(){}},Kn=Gn,Jn=(n("611f"),n("e431"),Object(k["a"])(Kn,Hn,$n,!1,null,"0f6c2e43",null)),Qn=Jn.exports,Zn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"editorPreview",attrs:{editorPreviewClass:e.editorPreviewClass},on:{mousedown:e.unselectBlock}},[e.blocks.length?e._e():n("div",{staticClass:"editorPreview__empty"},[n("b",[e._v("Drag and drop content from the left navigation")])]),n("draggable",{staticClass:"editorPreview__content",attrs:{options:{group:"editorBlocks",handle:e.handle}},on:{add:e.onAdd,update:e.onUpdate},model:{value:e.blocks,callback:function(t){e.blocks=t},expression:"blocks"}},e._l(e.blocks,(function(t,i){return n("div",{key:t.id,ref:t.id,refInFor:!0,staticClass:"editorPreview__item",class:{"editorPreview__item--active":e.isBlockActive(t.id),"editorPreview__item--hover":e.activeItem===i},on:{mousedown:function(e){e.stopPropagation()}}},[n("div",{staticClass:"editorPreview__frame"},[n("a17-editor-iframe",{attrs:{block:t},on:{loaded:e.resizeIframe}})],1),n("div",{staticClass:"editorPreview__protector editorPreview__dragger",on:{click:function(t){return t.preventDefault(),e.selectBlock(i)}}}),n("div",{staticClass:"editorPreview__header"},[n("a17-buttonbar",{attrs:{variant:"visible"}},[e.blocks.length>1?n("a17-dropdown",{ref:e.moveDropdown(i),refInFor:!0,staticClass:"f--small",attrs:{position:"bottom-left",maxHeight:270},on:{open:function(t){e.activeItem=i},close:function(t){e.activeItem=-1}}},[n("button",{attrs:{type:"button"},on:{click:function(t){return e.toggleDropdown(i)}}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"drag"}})]),n("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},e._l(e.blocks.length,(function(t){return n("button",{key:t,attrs:{type:"button"},on:{click:function(n){return e.moveBlock(i,t-1)}}},[e._v(e._s(t))])})),0)]):e._e(),n("button",{attrs:{type:"button"},on:{click:function(t){return e.deleteBlock(i)}}},[n("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"trash"}})])],1)],1)])})),0)],1)},Xn=[],ei=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"editorIframe"},[""===e.preview?n("div",{staticClass:"editorIframe__empty"},[e._v(" "+e._s(e.title)+" ")]):e._e(),n("iframe",{ref:"frame",attrs:{srcdoc:e.preview},on:{load:e.loadedPreview}})])},ti=[];function ni(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ii(e){for(var t=1;t1){var t=this.moveDropdown(e);this.$refs[t].length&&this.$refs[t][0].toggle()}},moveDropdown:function(e){return"movePreview".concat(e,"Dropdown")},moveBlock:function(e,t){e!==t&&this.$store.commit(a["d"].MOVE_BLOCK,{oldIndex:e,newIndex:t})},onAdd:function(e){var t=e.item,n={};n.title=t.getAttribute("data-title"),n.component=t.getAttribute("data-component"),n.icon=t.getAttribute("data-icon"),this.addBlock(n,Math.max(0,e.newIndex))},onUpdate:function(e){this.$store.commit(a["d"].MOVE_BLOCK,{oldIndex:e.oldIndex,newIndex:e.newIndex})},isBlockActive:function(e){return!!this.hasBlockActive&&e===this.activeBlock.id},addBlock:function(e,t){var n={title:e.title,type:e.component,icon:e.icon,attributes:e.attributes};this.$store.commit(a["d"].ADD_BLOCK,{block:n,index:t}),this.$emit("add",t)},deleteBlock:function(e){this.$emit("delete",e)},selectBlock:function(e){this.$emit("select",e)},unselectBlock:function(){this.$emit("unselect")},resizeIframe:function(e){var t=e.contentWindow.document.body;t.style.overflow="hidden";var n=window.getComputedStyle(t),i=n.getPropertyValue("margin-top"),r=n.getPropertyValue("margin-bottom"),o=t.scrollHeight+parseInt(i)+parseInt(r);e.height=o+"px"},resizeAllIframes:function(){var e=this,t=this.$el.querySelectorAll("iframe");t.forEach((function(t){e.resizeIframe(t)}))},_resize:v()((function(){this.resizeAllIframes()}),200),init:function(){window.addEventListener("resize",this._resize)},dispose:function(){window.removeEventListener("resize",this._resize)}},mounted:function(){this.init()},beforeDestroy:function(){this.dispose()}},fi=hi,vi=(n("2f7f"),Object(k["a"])(fi,Zn,Xn,!1,null,"3082648e",null)),pi=vi.exports,mi=n("64e5"),gi=n("0644"),ki=n.n(gi);function bi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function yi(e){for(var t=1;t0},previewClass:function(){var e=Un()(this.bgColor);return{"editor__preview--dark":e.getBrightness()<180,"editor__preview--loading":this.loading}},sidebarClass:function(){return{"editor__sidebar--mobile":this.hasBlockActive}},previewStyle:function(){return{"background-color":this.bgColor}}},Object(r["c"])({loading:function(e){return e.content.loading},activeBlock:function(e){return e.content.active},savedBlocks:function(e){return e.content.blocks},availableBlocks:function(e){return e.content.available},revisions:function(e){return e.revision.all}})),watch:{loading:function(e){var t=this;e||t.$nextTick((function(){setTimeout((function(){t.scrollToActive()}),250)}))}},methods:{open:function(e){this.getAllPreviews(),e>=0&&(this.selectBlock(e),this.scrollToActive()),this.$refs.overlay.open()},close:function(e){this.$refs.overlay.close()},openEditor:function(){xi.classList.add(Ci)},closeEditor:function(){this.unselectBlock(),xi.classList.remove(Ci)},scrollToActive:function(){if(this.hasBlockActive){var e=this.$refs.previews.$refs[this.activeBlock.id];if(e){var t=e[0].offsetTop,n=this.$el.querySelector(".editorPreview__content");n.scrollTop=Math.max(0,t-20)}}},isBlockActive:function(e){return!!this.hasBlockActive&&e===this.activeBlock.id},openPreview:function(){this.$root.$refs.preview&&this.$root.$refs.preview.open()},resize:function(){var e=this;window.addEventListener("mousemove",e.resizeSidebar,!1),window.addEventListener("mouseup",e.stopResizeSidebar,!1)},resizeSidebar:function(e){var t=this.$refs.sidebar,n=window.innerWidth;t&&(t.style.width=(e.clientX-t.offsetLeft)/n*100+"%")},stopResizeSidebar:function(){var e=this;window.removeEventListener("mousemove",e.resizeSidebar,!1),window.removeEventListener("mouseup",e.stopResizeSidebar,!1),this.$refs.previews.resizeAllIframes()},saveBlock:function(){this.hasBlockActive&&this.getPreview(),this.unselectBlock()},addBlock:function(e){this.selectBlock(e),this.getPreview(e)},deleteBlock:function(e){var t=this;this.$root.$refs.warningContentEditor?this.$root.$refs.warningContentEditor.open((function(){t.unselectBlock(),t.$store.commit(a["d"].DELETE_BLOCK,e)})):(this.unselectBlock(),this.$store.commit(a["d"].DELETE_BLOCK,e))},cancelBlock:function(){this.hasBlockActive&&(window["TWILL"].hasOwnProperty("PREVSTATE")&&this.$store.replaceState(window["TWILL"].PREVSTATE),this.getPreview()),this.unselectBlock()},getBlockId:function(e){return"undefined"===typeof this.blocks[e]?0:this.blocks[e].id},getAllPreviews:function(){this.$store.dispatch(s["a"].GET_ALL_PREVIEWS)},getPreview:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;this.$store.dispatch(s["a"].GET_PREVIEW,e)},selectBlock:function(e){var t=this,n=this.getBlockId(e);n&&(this.isBlockActive(n)?this.unselectBlock():(window["TWILL"].PREVSTATE=ki()(this.$store.state),this.$store.commit(a["d"].ACTIVATE_BLOCK,e),this.isWatching||(this.isWatching=!0,this.unSubscribe=this.$store.subscribe((function(e,n){a["l"].REFRESH_BLOCK_PREVIEW.includes(e.type)&&(a["l"].REFRESH_BLOCK_PREVIEW_ALL.includes(e.type)?t.getAllPreviews():t.getPreview())})))))},unselectBlock:function(){this.unSubscribe(),this.isWatching=!1,window["TWILL"].hasOwnProperty("PREVSTATE")&&delete window["TWILL"].PREVSTATE,this.hasBlockActive&&this.$store.commit(a["d"].ACTIVATE_BLOCK,-1)}},mounted:function(){}},Ti=Ai,Pi=(n("9881"),Object(k["a"])(Ti,Vn,Bn,!1,null,"cc4b6c2e",null)),Ei=Pi.exports,Si=n("2e01"),Oi=n("54d3"),Mi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a17-modal",{ref:"modal",staticClass:"modal--form",attrs:{title:e.modalTitle,forceClose:!0}},[n("form",{attrs:{action:e.formCreate},on:{submit:function(t){return t.preventDefault(),e.submit(t)}}},[e._t("default"),n("a17-modal-validation",{attrs:{"is-disable":!0}})],2)])},Ii=[],Ni={name:"A17ModalAdd",props:{name:{type:String,default:""},modalTitle:{type:String,default:"Add new"},formCreate:{type:String,default:"#"}},components:{"a17-modal-validation":A["a"]},methods:{open:function(){this.$refs.modal&&this.$refs.modal.open()},submit:function(e){var t=this;this.$store.commit(a["f"].UPDATE_FORM_LOADING,!0);var n=document.activeElement.name;this.$nextTick((function(){this.$store.dispatch(s["a"].CREATE_FORM_IN_MODAL,{name:this.name,endpoint:this.formCreate,method:"post"}).then((function(){t.$refs.modal&&t.$refs.modal.close(),t.$nextTick((function(){t.$store.commit(a["j"].SET_NOTIF,{message:"Your content has been added",variant:"success"}),"create-another"===n&&t.$refs.modal&&t.$refs.modal.open()}))}),(function(e){t.$store.commit(a["j"].SET_NOTIF,{message:"Your content can not be added, please retry",variant:"error"})}))}))}}},Ri=Ni,Di=Object(k["a"])(Ri,Mi,Ii,!1,null,null,null),Li=Di.exports,zi=n("ce72");function ji(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vi,Bi,Fi={withPublicationToggle:window["TWILL"].STORE.publication.withPublicationToggle||!1,published:window["TWILL"].STORE.publication.published||!1,publishSubmit:window["TWILL"].STORE.publication.published||!window["TWILL"].STORE.publication.withPublicationToggle?"update":"live",publishedLabel:window["TWILL"].STORE.publication.publishedLabel||"Live",draftLabel:window["TWILL"].STORE.publication.draftLabel||"Draft",withPublicationTimeframe:window["TWILL"].STORE.publication.withPublicationTimeframe||!1,startDate:window["TWILL"].STORE.publication.startDate||null,endDate:window["TWILL"].STORE.publication.endDate||null,visibility:window["TWILL"].STORE.publication.visibility||!1,reviewProcess:window["TWILL"].STORE.publication.reviewProcess||[],createWithoutModal:window["TWILL"].STORE.publication.createWithoutModal||!1,saveType:void 0,visibilityOptions:[{value:"public",label:"Public"},{value:"private",label:"Private"}],submitDisableMessage:window["TWILL"].STORE.publication.submitDisableMessage||"",submitOptions:window["TWILL"].STORE.publication.submitOptions||{draft:[{name:"save",text:window.$trans("publisher.save","Save as draft"),disabled:!1},{name:"save-close",text:window.$trans("publisher.save-close","Save as draft and close"),disabled:!1},{name:"save-new",text:window.$trans("publisher.save-new","Save as draft and create new"),disabled:!1},{name:"cancel",text:window.$trans("publisher.cancel","Cancel"),disabled:!1}],live:[{name:"publish",text:window.$trans("publisher.publish","Publish"),disabled:!1},{name:"publish-close",text:window.$trans("publisher.publish-close","Publish and close"),disabled:!1},{name:"publish-new",text:window.$trans("publisher.publish-new","Publish and create new"),disabled:!1},{name:"cancel",text:window.$trans("publisher.cancel","Cancel"),disabled:!1}],update:[{name:"update",text:window.$trans("publisher.update","Update"),disabled:!1},{name:"update-close",text:window.$trans("publisher.update-close","Update and close"),disabled:!1},{name:"update-new",text:window.$trans("publisher.update-new","Update and create new"),disabled:!1},{name:"cancel",text:window.$trans("publisher.cancel","Cancel"),disabled:!1}]}},Ui={reviewProcessComplete:function(e){return e.reviewProcess.filter((function(e){return e.checked}))},getSubmitOptions:function(e){return e.createWithoutModal?e.submitOptions.draft:e.published||!e.withPublicationToggle?e.submitOptions[e.publishSubmit]:e.submitOptions.draft},isEnabledSubmitOption:function(e,t){return function(e){var n=!0,i={},r=t.getSubmitOptions.filter((function(t){return t.name===e}));return r.length&&(i=r[0]),i.hasOwnProperty("disabled")&&(n=!i.disabled),n}},getSaveType:function(e,t){return e.saveType||t.getSubmitOptions[0].name}},Hi=(_i={},ji(_i,a["m"].UPDATE_PUBLISH_START_DATE,(function(e,t){e.startDate=t})),ji(_i,a["m"].UPDATE_PUBLISH_END_DATE,(function(e,t){e.endDate=t})),ji(_i,a["m"].UPDATE_PUBLISH_STATE,(function(e,t){e.published=t})),ji(_i,a["m"].UPDATE_PUBLISH_SUBMIT,(function(e){e.publishSubmit=e.published||!e.withPublicationToggle?"update":"live"})),ji(_i,a["m"].UPDATE_PUBLISH_VISIBILITY,(function(e,t){e.visibility=t})),ji(_i,a["m"].UPDATE_REVIEW_PROCESS,(function(e,t){var n="",i=-1;t.length&&(n=t[t.length-1],e.reviewProcess.forEach((function(e,t){e.value===n&&(i=t)}))),e.reviewProcess.forEach((function(e,t){e.checked=t<=i,e.disabled=!(t===i||t===i+1)}))})),ji(_i,a["m"].UPDATE_SAVE_TYPE,(function(e,t){e.saveType=t})),_i),$i={state:Fi,getters:Ui,mutations:Hi},Wi=n("bc3a"),qi=n.n(Wi),Yi=n("727d"),Gi={getBlockPreview:function(e,t,n,i){qi.a.post(e,t).then((function(e){n&&"function"===typeof n&&n(e.data)}),(function(e){var t={message:"Block preview request error.",value:e};Object(Yi["a"])("CONTENT",t),i&&"function"===typeof i&&i(e)}))}},Ki=n("9170");function Ji(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qi={loading:!1,editor:window["TWILL"].STORE.form.editor||!1,available:window["TWILL"].STORE.form.content||{},blocks:window["TWILL"].STORE.form.blocks||[],previews:window["TWILL"].STORE.form.previews||{},active:{}},Zi={previewsById:function(e){return function(t){return e.previews[t]?e.previews[t]:""}}};function Xi(){return Date.now()}var er=(Vi={},Ji(Vi,a["d"].ADD_BLOCK,(function(e,t){var n=t.block;n.id=Xi(),t.index>-1?e.blocks.splice(t.index,0,n):e.blocks.push(n)})),Ji(Vi,a["d"].MOVE_BLOCK,(function(e,t){if(t.newIndex>=e.blocks.length){var n=t.newIndex-e.blocks.length;while(1+n--)e.blocks.push(void 0)}e.blocks.splice(t.newIndex,0,e.blocks.splice(t.oldIndex,1)[0])})),Ji(Vi,a["d"].DELETE_BLOCK,(function(e,t){var n=e.blocks[t].id;n&&i["a"].delete(e.previews,n),e.blocks.splice(t,1)})),Ji(Vi,a["d"].DUPLICATE_BLOCK,(function(e,t){var n=Object.assign({},e.blocks[t]);n.id=Xi(),e.blocks.splice(t+1,0,n)})),Ji(Vi,a["d"].REORDER_BLOCKS,(function(e,t){e.blocks=t})),Ji(Vi,a["d"].ACTIVATE_BLOCK,(function(e,t){e.blocks[t]?e.active=e.blocks[t]:e.active={}})),Ji(Vi,a["d"].ADD_BLOCK_PREVIEW,(function(e,t){i["a"].set(e.previews,t.id,t.html)})),Ji(Vi,a["d"].UPDATE_PREVIEW_LOADING,(function(e,t){e.loading=!e.loading})),Vi);function tr(e,t,n,i){if(e.hasOwnProperty("id")){var r=Object(Ki["a"])(e,n);n.language.all.length>1&&(r.activeLanguage=n.language.active.value),Object(Ki["e"])(r)?(t(a["d"].ADD_BLOCK_PREVIEW,{id:e.id,html:""}),i&&"function"===typeof i&&i()):Gi.getBlockPreview(n.form.blockPreviewUrl,r,(function(n){t(a["d"].ADD_BLOCK_PREVIEW,{id:e.id,html:n}),i&&"function"===typeof i&&i()}),(function(e){}))}}var nr,ir,rr=(Bi={},Ji(Bi,s["a"].GET_PREVIEW,(function(e){var t=e.commit,n=e.state,i=e.rootState,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,o=r>=0?n.blocks[r]:{};n.active.hasOwnProperty("id")&&-1===r&&(o=n.active),tr(o,t,i)})),Ji(Bi,s["a"].GET_ALL_PREVIEWS,(function(e){var t=e.commit,n=e.state,i=e.rootState;if(n.blocks.length&&!n.loading){t(a["d"].UPDATE_PREVIEW_LOADING,!0);var r=0;n.blocks.forEach((function(e){tr(e,t,i,(function(){r++,r===n.blocks.length&&t(a["d"].UPDATE_PREVIEW_LOADING,!0)}))}))}})),Bi),or={state:Qi,getters:Zi,mutations:er,actions:rr},ar=n("c5ec"),sr={getRevisionContent:function(e,t,n,i){qi.a.put(e,t).then((function(e){n&&"function"===typeof n&&n(e.data)}),(function(e){var t={message:"Preview request error.",value:e};Object(Yi["a"])("REVISION",t),i&&"function"===typeof i&&i(e)}))}};function lr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var cr,ur={loading:!1,active:{},activeContent:"",currentContent:"",all:window["TWILL"].STORE.revisions||[]},dr={},hr=(nr={},lr(nr,a["n"].LOADING_REV,(function(e){e.loading=!0})),lr(nr,a["n"].UPDATE_REV,(function(e,t){function n(e){return e.id===t}var i=e.all.findIndex(n);e.active=-1!==i?e.all[i]:{}})),lr(nr,a["n"].UPDATE_REV_CONTENT,(function(e,t){e.loading=!1,e.activeContent=t})),lr(nr,a["n"].UPDATE_REV_CURRENT_CONTENT,(function(e,t){e.loading=!1,e.currentContent=t})),lr(nr,a["n"].UPDATE_REV_ALL,(function(e,t){e.all=t})),nr),fr=(ir={},lr(ir,s["a"].GET_CURRENT,(function(e){var t=e.commit,n=e.rootState;return new Promise((function(e,i){t(a["n"].LOADING_REV);var r=Object(Ki["b"])(n);n.language.all.length>1&&(r.activeLanguage=n.language.active.value),sr.getRevisionContent(n.form.previewUrl,r,(function(n){t(a["n"].UPDATE_REV_CURRENT_CONTENT,n),e()}),(function(e){i(e)}))}))})),lr(ir,s["a"].GET_REVISION,(function(e){var t=e.commit,n=e.state,i=e.rootState;return new Promise((function(e,r){t(a["n"].LOADING_REV);var o=0;o=0===Object.keys(n.active).length?n.all[0].id:n.active.id;var s={revisionId:o};i.language.all.length>1&&(s.activeLanguage=i.language.active.value),sr.getRevisionContent(i.form.previewUrl,s,(function(n){t(a["n"].UPDATE_REV_CONTENT,n),e()}),(function(e){r(e)}))}))})),ir),vr={state:ur,getters:dr,actions:fr,mutations:hr},pr=n("38c2");function mr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gr={repeaters:window["TWILL"].STORE.form.repeaters||{},availableRepeaters:window["TWILL"].STORE.form.availableRepeaters||{}},kr={};function br(){return Date.now()}var yr=(cr={},mr(cr,a["f"].ADD_FORM_BLOCK,(function(e,t){var n=t.name,i=t.type,r={},o=e.availableRepeaters[i],a=!e.repeaters[n];if(o)if(r.id=br(),r.type=o.component,r.title=o.title,a){var s={};s[n]=[],s[n].push(r),e.repeaters=Object.assign({},e.repeaters,s)}else e.repeaters[n].push(r)})),mr(cr,a["f"].DELETE_FORM_BLOCK,(function(e,t){e.repeaters[t.name].splice(t.index,1)})),mr(cr,a["f"].DUPLICATE_FORM_BLOCK,(function(e,t){var n=Object.assign({},e.repeaters[t.name][t.index]);n.id=br(),e.repeaters[t.name].splice(t.index+1,0,n)})),mr(cr,a["f"].REORDER_FORM_BLOCKS,(function(e,t){var n={};n[t.name]=t.blocks,e.repeaters=Object.assign({},e.repeaters,n)})),cr),wr={state:gr,getters:kr,mutations:yr};function _r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xr={active:window["TWILL"].STORE.parentId||0,all:window["TWILL"].STORE.parents||[]},Cr={},Ar=_r({},a["k"].UPDATE_PARENT,(function(e,t){e.active=t||0})),Tr={state:xr,getters:Cr,mutations:Ar},Pr=n("f451"),Er=n("4868"),Sr=n("f0f8");function Or(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Mr(e){for(var t=1;t1}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ClassicEditor=t():e.ClassicEditor=t()}(window,(function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=110)}([function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return o}));class n extends Error{constructor(e,t,i){e=o(e),i&&(e+=" "+JSON.stringify(i)),super(e),this.name="CKEditorError",this.context=t,this.data=i}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const i=new n(e.message,t);throw i.stack=e.stack,i}}function o(e){const t=e.match(/^([^:]+):/);return t?e+` Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-${t[1]}\n`:e}},function(e,t,i){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),s=[];function a(e){for(var t=-1,i=0;i:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}"},function(e,t,i){var n=i(1),o=i(20);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}"},function(e,t,i){var n=i(1),o=i(22);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{z-index:var(--ck-z-modal);position:fixed;top:0}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{top:auto;position:absolute}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{box-shadow:var(--ck-drop-shadow),0 0;border-width:0 1px 1px;border-top-left-radius:0;border-top-right-radius:0}"},function(e,t,i){var n=i(1),o=i(24);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on .ck-tooltip{display:none}.ck.ck-dropdown .ck-dropdown__panel{-webkit-backface-visibility:hidden;display:none;z-index:var(--ck-z-modal);position:absolute}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{top:100%;bottom:auto}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(0.5*var(--ck-icon-size))}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{box-shadow:var(--ck-drop-shadow),0 0;background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}"},function(e,t,i){var n=i(1),o=i(26);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{width:var(--ck-icon-size);height:var(--ck-icon-size);font-size:.8333350694em;will-change:transform}.ck.ck-icon,.ck.ck-icon *{color:inherit;cursor:inherit}.ck.ck-icon :not([fill]){fill:currentColor}"},function(e,t,i){var n=i(1),o=i(28);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports='.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:var(--ck-z-modal)}.ck.ck-tooltip .ck-tooltip__text{display:inline-block}.ck.ck-tooltip .ck-tooltip__text:after{content:"";width:0;height:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%;top:0;transition:opacity .2s ease-in-out .2s}.ck.ck-tooltip .ck-tooltip__text{border-radius:0}.ck-rounded-corners .ck.ck-tooltip .ck-tooltip__text,.ck.ck-tooltip .ck-tooltip__text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-tooltip .ck-tooltip__text{font-size:.9em;line-height:1.5;color:var(--ck-color-tooltip-text);padding:var(--ck-spacing-small) var(--ck-spacing-medium);background:var(--ck-color-tooltip-background);position:relative;left:-50%}.ck.ck-tooltip .ck-tooltip__text:after{transition:opacity .2s ease-in-out .2s;border-style:solid;left:50%}.ck.ck-tooltip.ck-tooltip_s{bottom:calc(-1*var(--ck-tooltip-arrow-size));transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after{top:calc(-1*var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-left-color:transparent;border-bottom-color:var(--ck-color-tooltip-background);border-right-color:transparent;border-top-color:transparent;border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:var(--ck-tooltip-arrow-size);border-top-width:0}.ck.ck-tooltip.ck-tooltip_n{top:calc(-1*var(--ck-tooltip-arrow-size));transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:calc(-1*var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;border-top-color:var(--ck-color-tooltip-background);border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:0;border-right-width:var(--ck-tooltip-arrow-size);border-top-width:var(--ck-tooltip-arrow-size)}'},function(e,t,i){var n=i(1),o=i(30);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-button,a.ck.ck-button{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:block}@media (hover:none){.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:none}}.ck.ck-button,a.ck.ck-button{position:relative;display:inline-flex;align-items:center;justify-content:left}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button:hover .ck-tooltip,a.ck.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck.ck-button:focus:not(:hover) .ck-tooltip,a.ck.ck-button:focus:not(:hover) .ck-tooltip{display:none}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-default-active-shadow)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{white-space:nowrap;cursor:default;vertical-align:middle;padding:var(--ck-spacing-tiny);text-align:center;min-width:var(--ck-ui-component-min-height);min-height:var(--ck-ui-component-min-height);line-height:1;font-size:inherit;border:1px solid transparent;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;-webkit-appearance:none}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{font-size:inherit;font-weight:inherit;color:inherit;cursor:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__icon{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(-1*var(--ck-spacing-small));margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-right:calc(-1*var(--ck-spacing-small));margin-left:var(--ck-spacing-small)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-on-active-shadow)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-action-active-shadow)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}"},function(e,t,i){var n=i(1),o=i(32);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{list-style-type:none;background:var(--ck-color-list-background)}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{min-height:unset;width:100%;text-align:left;border-radius:0;padding:calc(0.2*var(--ck-line-height-base)*var(--ck-font-size-base)) calc(0.4*var(--ck-line-height-base)*var(--ck-font-size-base))}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(1.2*var(--ck-line-height-base)*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{height:1px;width:100%;background:var(--ck-color-base-border)}"},function(e,t,i){var n=i(1),o=i(34);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:1.0769230769em;--ck-switch-button-toggle-spacing:1px;--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2*var(--ck-switch-button-toggle-spacing))}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(2*var(--ck-spacing-large))}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(2*var(--ck-spacing-large))}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{transition:background .4s ease;width:var(--ck-switch-button-toggle-width);background:var(--ck-color-switch-button-off-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(0.5*var(--ck-border-radius))}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{margin:var(--ck-switch-button-toggle-spacing);width:var(--ck-switch-button-toggle-inner-size);height:var(--ck-switch-button-toggle-inner-size);background:var(--ck-color-switch-button-inner-background);transition:all .3s ease}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var(--ck-switch-button-translation))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(-1*var(--ck-switch-button-translation)))}"},function(e,t,i){var n=i(1),o=i(36);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-toolbar-dropdown .ck.ck-toolbar .ck.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar-dropdown .ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}"},function(e,t,i){var n=i(1),o=i(38);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}"},function(e,t,i){var n=i(1),o=i(40);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-toolbar{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-flow:row nowrap;align-items:center}.ck.ck-toolbar>.ck-toolbar__items{display:flex;flex-flow:row wrap;align-items:center;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);padding:0 var(--ck-spacing-small);border:1px solid var(--ck-color-toolbar-border)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;width:1px;min-width:1px;background:var(--ck-color-toolbar-border);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items>*{margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>*,.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{width:100%;margin:0;border-radius:0;border:0}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-right:var(--ck-spacing-small)}"},function(e,t,i){var n=i(1),o=i(42);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}"},function(e,t,i){var n=i(1),o=i(44);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{width:0;height:0;border-style:solid}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:var(--ck-balloon-arrow-height);border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:0}.ck.ck-balloon-panel[class*=arrow_n]:before{border-bottom-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-color:transparent;border-right-color:transparent;border-top-color:transparent}.ck.ck-balloon-panel[class*=arrow_n]:after{border-bottom-color:var(--ck-color-panel-background);margin-top:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:0;border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-top-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent}.ck.ck-balloon-panel[class*=arrow_s]:after{border-top-color:var(--ck-color-panel-background);margin-bottom:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(-1*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{left:50%;margin-left:calc(-1*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{right:25%;margin-right:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{left:25%;margin-left:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{right:25%;margin-right:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}'},function(e,t,i){var n=i(1),o=i(46);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{height:100%;border-right:1px solid var(--ck-color-base-text);margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}"},function(e,t,i){var n=i(1),o=i(48);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck-editor__editable .ck-horizontal-line{display:flow-root}.ck-content hr{margin:15px 0;height:4px;background:#dedede;border:0}"},function(e,t,i){var n=i(1),o=i(50);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#000}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{width:var(--ck-color-grid-tile-size);height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;border:0}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{display:none;color:var(--ck-color-color-grid-check-icon)}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}"},function(e,t,i){var n=i(1),o=i(52);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck .ck-button.ck-color-table__remove-color{display:flex;align-items:center;width:100%}label.ck.ck-color-grid__label{font-weight:unset}.ck .ck-button.ck-color-table__remove-color{padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck .ck-button.ck-color-table__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-base-border)}[dir=ltr] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard)}"},function(e,t,i){var n=i(1),o=i(54);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck-content .text-tiny{font-size:.7em}.ck-content .text-small{font-size:.85em}.ck-content .text-big{font-size:1.4em}.ck-content .text-huge{font-size:1.8em}"},function(e,t){e.exports=".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}"},function(e,t,i){var n=i(1),o=i(57);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports='.ck .ck-widget .ck-widget__type-around__button{display:block;position:absolute;overflow:hidden;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{position:absolute;top:50%;left:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{top:calc(-0.5*var(--ck-widget-outline-thickness));left:min(10%,30px);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(-0.5*var(--ck-widget-outline-thickness));right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;position:absolute;top:1px;left:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;position:absolute;left:0;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(-1*var(--ck-widget-outline-thickness));right:calc(-1*var(--ck-widget-outline-thickness))}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{top:calc(-1*var(--ck-widget-outline-thickness) - 1px);display:block}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(-1*var(--ck-widget-outline-thickness) - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{width:var(--ck-widget-type-around-button-size);height:var(--ck-widget-type-around-button-size);background:var(--ck-color-widget-type-around-button);border-radius:100px;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);opacity:0;pointer-events:none}.ck .ck-widget .ck-widget__type-around__button svg{width:10px;height:8px;transform:translate(-50%,-50%);transition:transform .5s ease;margin-top:1px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{width:calc(var(--ck-widget-type-around-button-size) - 2px);height:calc(var(--ck-widget-type-around-button-size) - 2px);border-radius:100px;background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3))}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{pointer-events:none;height:1px;animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;outline:1px solid hsla(0,0%,100%,.5);background:var(--ck-color-base-text)}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer{opacity:0}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}'},function(e,t,i){var n=i(1),o=i(59);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-resizer-size:10px;--ck-resizer-border-width:1px;--ck-resizer-border-radius:2px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-tooltip-offset:10px;--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover .ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);color:var(--ck-color-resizer-tooltip-text);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);font-size:var(--ck-font-size-tiny);display:block;padding:var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{top:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{top:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-width:var(--ck-widget-outline-thickness);outline-style:solid;outline-color:transparent;transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;background-color:var(--ck-color-widget-editable-focus-background)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{padding:4px;box-sizing:border-box;background-color:transparent;opacity:0;transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;transform:translateY(-100%);left:calc(0px - var(--ck-widget-outline-thickness))}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{width:var(--ck-widget-handler-icon-size);height:var(--ck-widget-handler-icon-size);color:var(--ck-color-widget-drag-handler-icon-color)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover .ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover .ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-focus-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle .ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}"},function(e,t,i){var n=i(1),o=i(61);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view>.ck.ck-label{width:100%;text-overflow:ellipsis;overflow:hidden}"},function(e,t,i){var n=i(1),o=i(63);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=":root{--ck-input-text-width:18em}.ck.ck-input-text{border-radius:0}.ck-rounded-corners .ck.ck-input-text,.ck.ck-input-text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-text{box-shadow:var(--ck-inner-shadow),0 0;background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);min-width:var(--ck-input-text-width);min-height:var(--ck-ui-component-min-height);transition:box-shadow .2s ease-in-out,border .2s ease-in-out}.ck.ck-input-text:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),var(--ck-inner-shadow)}.ck.ck-input-text[readonly]{border:1px solid var(--ck-color-input-disabled-border);background:var(--ck-color-input-disabled-background);color:var(--ck-color-input-disabled-text)}.ck.ck-input-text[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),var(--ck-inner-shadow)}.ck.ck-input-text.ck-error{border-color:var(--ck-color-input-error-border);animation:ck-text-input-shake .3s ease both}.ck.ck-input-text.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),var(--ck-inner-shadow)}@keyframes ck-text-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}"},function(e,t,i){var n=i(1),o=i(65);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-field-view{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}.ck.ck-text-alternative-form{padding:var(--ck-spacing-standard)}.ck.ck-text-alternative-form:focus{outline:none}[dir=ltr] .ck.ck-text-alternative-form>:not(:first-child),[dir=rtl] .ck.ck-text-alternative-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-text-alternative-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-text-alternative-form .ck-labeled-field-view{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-text-alternative-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-text-alternative-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-text-alternative-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-text-alternative-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-text-alternative-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-text-alternative-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(e,t,i){var n=i(1),o=i(67);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck .ck-balloon-rotator__navigation{display:flex;align-items:center;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}"},function(e,t,i){var n=i(1),o=i(69);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);width:100%;height:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}"},function(e,t,i){var n=i(1),o=i(71);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck-content .image{display:table;clear:both;text-align:center;margin:1em auto}.ck-content .image img{display:block;margin:0 auto;max-width:100%;min-width:50px}"},function(e,t,i){var n=i(1),o=i(73);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:#333;background-color:#f7f7f7;padding:.6em;font-size:.75em;outline-offset:-1px}"},function(e,t,i){var n=i(1),o=i(75);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;position:absolute;pointer-events:none;left:0;top:0;outline:1px solid var(--ck-color-resizer)}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{position:absolute;pointer-events:all;width:var(--ck-resizer-size);height:var(--ck-resizer-size);background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{top:var(--ck-resizer-offset);left:var(--ck-resizer-offset);cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{top:var(--ck-resizer-offset);right:var(--ck-resizer-offset);cursor:nesw-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset);cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset);cursor:nesw-resize}"},function(e,t,i){var n=i(1),o=i(77);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck-content .image.image_resized{max-width:100%;display:block;box-sizing:border-box}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}[dir=ltr] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-left:var(--ck-spacing-standard)}.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label{width:4em}"},function(e,t,i){var n=i(1),o=i(79);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=":root{--ck-image-style-spacing:1.5em}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing);max-width:50%}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}"},function(e,t,i){var n=i(1),o=i(81);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button .ck-tooltip{display:none}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__action{border-top-right-radius:unset;border-bottom-right-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__action{border-top-left-radius:unset;border-bottom-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-radius:0}.ck-rounded-corners [dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow,[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:unset;border-bottom-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-top-right-radius:unset;border-bottom-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled){border-left-color:var(--ck-color-split-button-hover-border)}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled){border-right-color:var(--ck-color-split-button-hover-border)}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}"},function(e,t,i){var n=i(1),o=i(83);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-image-upload-form__action-row{margin-top:var(--ck-spacing-standard)}.ck.ck-form__row.ck-image-upload-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-image-upload-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row.ck-image-upload-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}"},function(e,t,i){var n=i(1),o=i(85);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-image-upload__panel{padding:var(--ck-spacing-standard)}.ck.ck-image-upload__ck-finder-button{display:block;width:100%;margin:var(--ck-spacing-standard) auto;border:1px solid #ccc;border-radius:var(--ck-border-radius)}"},function(e,t,i){var n=i(1),o=i(87);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-editor__editable .image{position:relative}.ck.ck-editor__editable .image .ck-progress-bar{position:absolute;top:0;left:0}.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar{height:2px;width:0;background:var(--ck-color-upload-bar-background);transition:width .1s}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}"},function(e,t,i){var n=i(1),o=i(89);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports='.ck-image-upload-complete-icon{display:block;position:absolute;top:10px;right:10px;border-radius:50%}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20px;--ck-image-upload-icon-width:2px}.ck-image-upload-complete-icon{width:var(--ck-image-upload-icon-size);height:var(--ck-image-upload-icon-size);opacity:0;background:var(--ck-color-image-upload-icon-background);animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;animation-fill-mode:forwards,forwards;animation-duration:.5s,.5s;font-size:var(--ck-image-upload-icon-size);animation-delay:0ms,3s}.ck-image-upload-complete-icon:after{left:25%;top:50%;opacity:0;height:0;width:0;transform:scaleX(-1) rotate(135deg);transform-origin:left top;border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);animation-name:ck-upload-complete-icon-check;animation-duration:.5s;animation-delay:.5s;animation-fill-mode:forwards;box-sizing:border-box}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{opacity:1;width:0;height:0}33%{width:.3em;height:0}to{opacity:1;width:.3em;height:.45em}}'},function(e,t,i){var n=i(1),o=i(91);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports='.ck .ck-upload-placeholder-loader{position:absolute;display:flex;align-items:center;justify-content:center;top:0;left:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px}.ck .ck-image-upload-placeholder{width:100%;margin:0}.ck .ck-upload-placeholder-loader{width:100%;height:100%}.ck .ck-upload-placeholder-loader:before{width:var(--ck-upload-placeholder-loader-size);height:var(--ck-upload-placeholder-loader-size);border-radius:50%;border-top:3px solid var(--ck-color-upload-placeholder-loader);border-right:2px solid transparent;animation:ck-upload-placeholder-loader 1s linear infinite}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}'},function(e,t,i){var n=i(1),o=i(93);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form{padding:var(--ck-spacing-standard)}.ck.ck-link-form:focus{outline:none}[dir=ltr] .ck.ck-link-form>:not(:first-child),[dir=rtl] .ck.ck-link-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-link-form .ck-labeled-field-view{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-link-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}.ck.ck-link-form_layout-vertical{padding:0;min-width:var(--ck-input-text-width)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical .ck-button{padding:var(--ck-spacing-standard);margin:0;border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border);width:50%}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin-left:0}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{border:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}"},function(e,t,i){var n=i(1),o=i(95);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions{padding:var(--ck-spacing-standard)}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{padding:0 var(--ck-spacing-medium);color:var(--ck-color-link-default);text-overflow:ellipsis;cursor:pointer;max-width:var(--ck-input-text-width);min-width:3em;text-align:center}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}.ck.ck-link-actions:focus{outline:none}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{min-width:0;max-width:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview):first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview):last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(e,t,i){var n=i(1),o=i(97);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports='.ck-media__wrapper .ck-media__placeholder{display:flex;flex-direction:column;align-items:center}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:block}@media (hover:none){.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:none}}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url{max-width:100%;position:relative}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url:hover .ck-tooltip{visibility:visible;opacity:1}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{overflow:hidden;display:block}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck-media__placeholder__icon *{display:none}.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper>:not(.ck-media__placeholder),.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder{pointer-events:none}:root{--ck-media-embed-placeholder-icon-size:3em;--ck-color-media-embed-placeholder-url-text:#757575;--ck-color-media-embed-placeholder-url-text-hover:var(--ck-color-base-text)}.ck-media__wrapper{margin:0 auto}.ck-media__wrapper .ck-media__placeholder{padding:calc(3*var(--ck-spacing-standard));background:var(--ck-color-base-foreground)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon{min-width:var(--ck-media-embed-placeholder-icon-size);height:var(--ck-media-embed-placeholder-icon-size);margin-bottom:var(--ck-spacing-large);background-position:50%;background-size:cover}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon .ck-icon{width:100%;height:100%}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text{color:var(--ck-color-media-embed-placeholder-url-text);white-space:nowrap;text-align:center;font-style:italic;text-overflow:ellipsis}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:var(--ck-color-media-embed-placeholder-url-text-hover);cursor:pointer;text-decoration:underline}.ck-media__wrapper[data-oembed-url*="open.spotify.com"]{max-width:300px;max-height:380px}.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0yMDYuNDc3IDI2MC45bC0yOC45ODcgMjguOTg3YTUuMjE4IDUuMjE4IDAgMDAzLjc4IDEuNjFoNDkuNjIxYzEuNjk0IDAgMy4xOS0uNzk4IDQuMTQ2LTIuMDM3eiIgZmlsbD0iIzVjODhjNSIvPjxwYXRoIGQ9Ik0yMjYuNzQyIDIyMi45ODhjLTkuMjY2IDAtMTYuNzc3IDcuMTctMTYuNzc3IDE2LjAxNC4wMDcgMi43NjIuNjYzIDUuNDc0IDIuMDkzIDcuODc1LjQzLjcwMy44MyAxLjQwOCAxLjE5IDIuMTA3LjMzMy41MDIuNjUgMS4wMDUuOTUgMS41MDguMzQzLjQ3Ny42NzMuOTU3Ljk4OCAxLjQ0IDEuMzEgMS43NjkgMi41IDMuNTAyIDMuNjM3IDUuMTY4Ljc5MyAxLjI3NSAxLjY4MyAyLjY0IDIuNDY2IDMuOTkgMi4zNjMgNC4wOTQgNC4wMDcgOC4wOTIgNC42IDEzLjkxNHYuMDEyYy4xODIuNDEyLjUxNi42NjYuODc5LjY2Ny40MDMtLjAwMS43NjgtLjMxNC45My0uNzk5LjYwMy01Ljc1NiAyLjIzOC05LjcyOSA0LjU4NS0xMy43OTQuNzgyLTEuMzUgMS42NzMtMi43MTUgMi40NjUtMy45OSAxLjEzNy0xLjY2NiAyLjMyOC0zLjQgMy42MzgtNS4xNjkuMzE1LS40ODIuNjQ1LS45NjIuOTg4LTEuNDM5LjMtLjUwMy42MTctMS4wMDYuOTUtMS41MDguMzU5LS43Ljc2LTEuNDA0IDEuMTktMi4xMDcgMS40MjYtMi40MDIgMi01LjExNCAyLjAwNC03Ljg3NSAwLTguODQ0LTcuNTExLTE2LjAxNC0xNi43NzYtMTYuMDE0eiIgZmlsbD0iI2RkNGIzZSIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48ZWxsaXBzZSByeT0iNS41NjQiIHJ4PSI1LjgyOCIgY3k9IjIzOS4wMDIiIGN4PSIyMjYuNzQyIiBmaWxsPSIjODAyZDI3IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0xOTAuMzAxIDIzNy4yODNjLTQuNjcgMC04LjQ1NyAzLjg1My04LjQ1NyA4LjYwNnMzLjc4NiA4LjYwNyA4LjQ1NyA4LjYwN2MzLjA0MyAwIDQuODA2LS45NTggNi4zMzctMi41MTYgMS41My0xLjU1NyAyLjA4Ny0zLjkxMyAyLjA4Ny02LjI5IDAtLjM2Mi0uMDIzLS43MjItLjA2NC0xLjA3OWgtOC4yNTd2My4wNDNoNC44NWMtLjE5Ny43NTktLjUzMSAxLjQ1LTEuMDU4IDEuOTg2LS45NDIuOTU4LTIuMDI4IDEuNTQ4LTMuOTAxIDEuNTQ4LTIuODc2IDAtNS4yMDgtMi4zNzItNS4yMDgtNS4yOTkgMC0yLjkyNiAyLjMzMi01LjI5OSA1LjIwOC01LjI5OSAxLjM5OSAwIDIuNjE4LjQwNyAzLjU4NCAxLjI5M2wyLjM4MS0yLjM4YzAtLjAwMi0uMDAzLS4wMDQtLjAwNC0uMDA1LTEuNTg4LTEuNTI0LTMuNjItMi4yMTUtNS45NTUtMi4yMTV6bTQuNDMgNS42NmwuMDAzLjAwNnYtLjAwM3oiIGZpbGw9IiNmZmYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxNS4xODQgMjUxLjkyOWwtNy45OCA3Ljk3OSAyOC40NzcgMjguNDc1YTUuMjMzIDUuMjMzIDAgMDAuNDQ5LTIuMTIzdi0zMS4xNjVjLS40NjkuNjc1LS45MzQgMS4zNDktMS4zODIgMi4wMDUtLjc5MiAxLjI3NS0xLjY4MiAyLjY0LTIuNDY1IDMuOTktMi4zNDcgNC4wNjUtMy45ODIgOC4wMzgtNC41ODUgMTMuNzk0LS4xNjIuNDg1LS41MjcuNzk4LS45My43OTktLjM2My0uMDAxLS42OTctLjI1NS0uODc5LS42Njd2LS4wMTJjLS41OTMtNS44MjItMi4yMzctOS44Mi00LjYtMTMuOTE0LS43ODMtMS4zNS0xLjY3My0yLjcxNS0yLjQ2Ni0zLjk5LTEuMTM3LTEuNjY2LTIuMzI3LTMuNC0zLjYzNy01LjE2OWwtLjAwMi0uMDAzeiIgZmlsbD0iI2MzYzNjMyIvPjxwYXRoIGQ9Ik0yMTIuOTgzIDI0OC40OTVsLTM2Ljk1MiAzNi45NTN2LjgxMmE1LjIyNyA1LjIyNyAwIDAwNS4yMzggNS4yMzhoMS4wMTVsMzUuNjY2LTM1LjY2NmExMzYuMjc1IDEzNi4yNzUgMCAwMC0yLjc2NC0zLjkgMzcuNTc1IDM3LjU3NSAwIDAwLS45ODktMS40NCAzNS4xMjcgMzUuMTI3IDAgMDAtLjk1LTEuNTA4Yy0uMDgzLS4xNjItLjE3Ni0uMzI2LS4yNjQtLjQ4OXoiIGZpbGw9IiNmZGRjNGYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxMS45OTggMjYxLjA4M2wtNi4xNTIgNi4xNTEgMjQuMjY0IDI0LjI2NGguNzgxYTUuMjI3IDUuMjI3IDAgMDA1LjIzOS01LjIzOHYtMS4wNDV6IiBmaWxsPSIjZmZmIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjwvZz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder{background:#4268b3}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik05NjcuNDg0IDBINTYuNTE3QzI1LjMwNCAwIDAgMjUuMzA0IDAgNTYuNTE3djkxMC45NjZDMCA5OTguNjk0IDI1LjI5NyAxMDI0IDU2LjUyMiAxMDI0SDU0N1Y2MjhINDE0VjQ3M2gxMzNWMzU5LjAyOWMwLTEzMi4yNjIgODAuNzczLTIwNC4yODIgMTk4Ljc1Ni0yMDQuMjgyIDU2LjUxMyAwIDEwNS4wODYgNC4yMDggMTE5LjI0NCA2LjA4OVYyOTlsLTgxLjYxNi4wMzdjLTYzLjk5MyAwLTc2LjM4NCAzMC40OTItNzYuMzg0IDc1LjIzNlY0NzNoMTUzLjQ4N2wtMTkuOTg2IDE1NUg3MDd2Mzk2aDI2MC40ODRjMzEuMjEzIDAgNTYuNTE2LTI1LjMwMyA1Ni41MTYtNTYuNTE2VjU2LjUxNUMxMDI0IDI1LjMwMyA5OTguNjk3IDAgOTY3LjQ4NCAwIiBmaWxsPSIjRkZGRkZFIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#cdf}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder{background:linear-gradient(-135deg,#1400c7,#b800b1,#f50000)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTA0IiBoZWlnaHQ9IjUwNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIC4xNTloNTAzLjg0MVY1MDMuOTRIMHoiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48cGF0aCBkPSJNMjUxLjkyMS4xNTljLTY4LjQxOCAwLTc2Ljk5Ny4yOS0xMDMuODY3IDEuNTE2LTI2LjgxNCAxLjIyMy00NS4xMjcgNS40ODItNjEuMTUxIDExLjcxLTE2LjU2NiA2LjQzNy0zMC42MTUgMTUuMDUxLTQ0LjYyMSAyOS4wNTYtMTQuMDA1IDE0LjAwNi0yMi42MTkgMjguMDU1LTI5LjA1NiA0NC42MjEtNi4yMjggMTYuMDI0LTEwLjQ4NyAzNC4zMzctMTEuNzEgNjEuMTUxQy4yOSAxNzUuMDgzIDAgMTgzLjY2MiAwIDI1Mi4wOGMwIDY4LjQxNy4yOSA3Ni45OTYgMS41MTYgMTAzLjg2NiAxLjIyMyAyNi44MTQgNS40ODIgNDUuMTI3IDExLjcxIDYxLjE1MSA2LjQzNyAxNi41NjYgMTUuMDUxIDMwLjYxNSAyOS4wNTYgNDQuNjIxIDE0LjAwNiAxNC4wMDUgMjguMDU1IDIyLjYxOSA0NC42MjEgMjkuMDU3IDE2LjAyNCA2LjIyNyAzNC4zMzcgMTAuNDg2IDYxLjE1MSAxMS43MDkgMjYuODcgMS4yMjYgMzUuNDQ5IDEuNTE2IDEwMy44NjcgMS41MTYgNjguNDE3IDAgNzYuOTk2LS4yOSAxMDMuODY2LTEuNTE2IDI2LjgxNC0xLjIyMyA0NS4xMjctNS40ODIgNjEuMTUxLTExLjcwOSAxNi41NjYtNi40MzggMzAuNjE1LTE1LjA1MiA0NC42MjEtMjkuMDU3IDE0LjAwNS0xNC4wMDYgMjIuNjE5LTI4LjA1NSAyOS4wNTctNDQuNjIxIDYuMjI3LTE2LjAyNCAxMC40ODYtMzQuMzM3IDExLjcwOS02MS4xNTEgMS4yMjYtMjYuODcgMS41MTYtMzUuNDQ5IDEuNTE2LTEwMy44NjYgMC02OC40MTgtLjI5LTc2Ljk5Ny0xLjUxNi0xMDMuODY3LTEuMjIzLTI2LjgxNC01LjQ4Mi00NS4xMjctMTEuNzA5LTYxLjE1MS02LjQzOC0xNi41NjYtMTUuMDUyLTMwLjYxNS0yOS4wNTctNDQuNjIxLTE0LjAwNi0xNC4wMDUtMjguMDU1LTIyLjYxOS00NC42MjEtMjkuMDU2LTE2LjAyNC02LjIyOC0zNC4zMzctMTAuNDg3LTYxLjE1MS0xMS43MUMzMjguOTE3LjQ0OSAzMjAuMzM4LjE1OSAyNTEuOTIxLjE1OXptMCA0NS4zOTFjNjcuMjY1IDAgNzUuMjMzLjI1NyAxMDEuNzk3IDEuNDY5IDI0LjU2MiAxLjEyIDM3LjkwMSA1LjIyNCA0Ni43NzggOC42NzQgMTEuNzU5IDQuNTcgMjAuMTUxIDEwLjAyOSAyOC45NjYgMTguODQ1IDguODE2IDguODE1IDE0LjI3NSAxNy4yMDcgMTguODQ1IDI4Ljk2NiAzLjQ1IDguODc3IDcuNTU0IDIyLjIxNiA4LjY3NCA0Ni43NzggMS4yMTIgMjYuNTY0IDEuNDY5IDM0LjUzMiAxLjQ2OSAxMDEuNzk4IDAgNjcuMjY1LS4yNTcgNzUuMjMzLTEuNDY5IDEwMS43OTctMS4xMiAyNC41NjItNS4yMjQgMzcuOTAxLTguNjc0IDQ2Ljc3OC00LjU3IDExLjc1OS0xMC4wMjkgMjAuMTUxLTE4Ljg0NSAyOC45NjYtOC44MTUgOC44MTYtMTcuMjA3IDE0LjI3NS0yOC45NjYgMTguODQ1LTguODc3IDMuNDUtMjIuMjE2IDcuNTU0LTQ2Ljc3OCA4LjY3NC0yNi41NiAxLjIxMi0zNC41MjcgMS40NjktMTAxLjc5NyAxLjQ2OS02Ny4yNzEgMC03NS4yMzctLjI1Ny0xMDEuNzk4LTEuNDY5LTI0LjU2Mi0xLjEyLTM3LjkwMS01LjIyNC00Ni43NzgtOC42NzQtMTEuNzU5LTQuNTctMjAuMTUxLTEwLjAyOS0yOC45NjYtMTguODQ1LTguODE1LTguODE1LTE0LjI3NS0xNy4yMDctMTguODQ1LTI4Ljk2Ni0zLjQ1LTguODc3LTcuNTU0LTIyLjIxNi04LjY3NC00Ni43NzgtMS4yMTItMjYuNTY0LTEuNDY5LTM0LjUzMi0xLjQ2OS0xMDEuNzk3IDAtNjcuMjY2LjI1Ny03NS4yMzQgMS40NjktMTAxLjc5OCAxLjEyLTI0LjU2MiA1LjIyNC0zNy45MDEgOC42NzQtNDYuNzc4IDQuNTctMTEuNzU5IDEwLjAyOS0yMC4xNTEgMTguODQ1LTI4Ljk2NiA4LjgxNS04LjgxNiAxNy4yMDctMTQuMjc1IDI4Ljk2Ni0xOC44NDUgOC44NzctMy40NSAyMi4yMTYtNy41NTQgNDYuNzc4LTguNjc0IDI2LjU2NC0xLjIxMiAzNC41MzItMS40NjkgMTAxLjc5OC0xLjQ2OXoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48cGF0aCBkPSJNMjUxLjkyMSAzMzYuMDUzYy00Ni4zNzggMC04My45NzQtMzcuNTk2LTgzLjk3NC04My45NzMgMC00Ni4zNzggMzcuNTk2LTgzLjk3NCA4My45NzQtODMuOTc0IDQ2LjM3NyAwIDgzLjk3MyAzNy41OTYgODMuOTczIDgzLjk3NCAwIDQ2LjM3Ny0zNy41OTYgODMuOTczLTgzLjk3MyA4My45NzN6bTAtMjEzLjMzOGMtNzEuNDQ3IDAtMTI5LjM2NSA1Ny45MTgtMTI5LjM2NSAxMjkuMzY1IDAgNzEuNDQ2IDU3LjkxOCAxMjkuMzY0IDEyOS4zNjUgMTI5LjM2NCA3MS40NDYgMCAxMjkuMzY0LTU3LjkxOCAxMjkuMzY0LTEyOS4zNjQgMC03MS40NDctNTcuOTE4LTEyOS4zNjUtMTI5LjM2NC0xMjkuMzY1ek00MTYuNjI3IDExNy42MDRjMCAxNi42OTYtMTMuNTM1IDMwLjIzLTMwLjIzMSAzMC4yMy0xNi42OTUgMC0zMC4yMy0xMy41MzQtMzAuMjMtMzAuMjMgMC0xNi42OTYgMTMuNTM1LTMwLjIzMSAzMC4yMy0zMC4yMzEgMTYuNjk2IDAgMzAuMjMxIDEzLjUzNSAzMC4yMzEgMzAuMjMxIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#ffe0fe}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder{background:linear-gradient(90deg,#71c6f4,#0d70a5)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgNDAwIj48cGF0aCBkPSJNNDAwIDIwMGMwIDExMC41LTg5LjUgMjAwLTIwMCAyMDBTMCAzMTAuNSAwIDIwMCA4OS41IDAgMjAwIDBzMjAwIDg5LjUgMjAwIDIwMHpNMTYzLjQgMzA1LjVjODguNyAwIDEzNy4yLTczLjUgMTM3LjItMTM3LjIgMC0yLjEgMC00LjItLjEtNi4yIDkuNC02LjggMTcuNi0xNS4zIDI0LjEtMjUtOC42IDMuOC0xNy45IDYuNC0yNy43IDcuNiAxMC02IDE3LjYtMTUuNCAyMS4yLTI2LjctOS4zIDUuNS0xOS42IDkuNS0zMC42IDExLjctOC44LTkuNC0yMS4zLTE1LjItMzUuMi0xNS4yLTI2LjYgMC00OC4yIDIxLjYtNDguMiA0OC4yIDAgMy44LjQgNy41IDEuMyAxMS00MC4xLTItNzUuNi0yMS4yLTk5LjQtNTAuNC00LjEgNy4xLTYuNSAxNS40LTYuNSAyNC4yIDAgMTYuNyA4LjUgMzEuNSAyMS41IDQwLjEtNy45LS4yLTE1LjMtMi40LTIxLjgtNnYuNmMwIDIzLjQgMTYuNiA0Mi44IDM4LjcgNDcuMy00IDEuMS04LjMgMS43LTEyLjcgMS43LTMuMSAwLTYuMS0uMy05LjEtLjkgNi4xIDE5LjIgMjMuOSAzMy4xIDQ1IDMzLjUtMTYuNSAxMi45LTM3LjMgMjAuNi01OS45IDIwLjYtMy45IDAtNy43LS4yLTExLjUtLjcgMjEuMSAxMy44IDQ2LjUgMjEuOCA3My43IDIxLjgiIGZpbGw9IiNmZmYiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text{color:#b8e6ff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}'},function(e,t,i){var n=i(1),o=i(99);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-media-form{display:flex;align-items:flex-start;flex-direction:row;flex-wrap:nowrap}.ck.ck-media-form .ck-labeled-field-view{display:inline-block}.ck.ck-media-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-media-form{flex-wrap:wrap}.ck.ck-media-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-media-form .ck-button{flex-basis:50%}}.ck.ck-media-form{padding:var(--ck-spacing-standard)}.ck.ck-media-form:focus{outline:none}[dir=ltr] .ck.ck-media-form>:not(:first-child),[dir=rtl] .ck.ck-media-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-media-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-media-form .ck-labeled-field-view{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-media-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-media-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-media-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-media-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-media-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-media-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-media-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(e,t,i){var n=i(1),o=i(101);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck-content .media{clear:both;margin:1em 0;display:block;min-width:15em}"},function(e,t,i){var n=i(1),o=i(103);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=":root{--ck-color-table-focused-cell-background:rgba(158,207,250,0.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}"},function(e,t,i){var n=i(1),o=i(105);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2);padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0}.ck .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{width:var(--ck-insert-table-dropdown-box-width);height:var(--ck-insert-table-dropdown-box-height);margin:var(--ck-insert-table-dropdown-box-margin);border:1px solid var(--ck-color-base-border);border-radius:1px}.ck .ck-insert-table-dropdown-grid-box.ck-on{border-color:var(--ck-color-focus-border);background:var(--ck-color-focus-outer-shadow)}"},function(e,t,i){var n=i(1),o=i(107);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=':root{--ck-table-selected-cell-background:rgba(158,207,250,0.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{position:relative;caret-color:transparent;outline:unset;box-shadow:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{content:"";pointer-events:none;background-color:var(--ck-table-selected-cell-background);position:absolute;top:0;left:0;right:0;bottom:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget_selected{outline:unset}'},function(e,t,i){var n=i(1),o=i(109);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck-content .table{margin:1em auto;display:table}.ck-content .table table{border-collapse:collapse;border-spacing:0;width:100%;height:100%;border:1px double #b3b3b3}.ck-content .table table td,.ck-content .table table th{min-width:2em;padding:.4em;border:1px solid #bfbfbf}.ck-content .table table th{font-weight:700;background:hsla(0,0%,0%,5%)}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}"},function(e,t,i){"use strict";i.r(t);var n=i(3),o=n.a.Symbol,r=Object.prototype,s=r.hasOwnProperty,a=r.toString,c=o?o.toStringTag:void 0;var l=function(e){var t=s.call(e,c),i=e[c];try{e[c]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[c]=i:delete e[c]),o},d=Object.prototype.toString;var h=function(e){return d.call(e)},u=o?o.toStringTag:void 0;var m=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?l(e):h(e)};var f=function(e,t){return function(i){return e(t(i))}},g=f(Object.getPrototypeOf,Object);var p=function(e){return null!=e&&"object"==typeof e},b=Function.prototype,w=Object.prototype,k=b.toString,_=w.hasOwnProperty,v=k.call(Object);var y=function(e){if(!p(e)||"[object Object]"!=m(e))return!1;var t=g(e);if(null===t)return!0;var i=_.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&k.call(i)==v};var x=function(){this.__data__=[],this.size=0};var A=function(e,t){return e===t||e!=e&&t!=t};var C=function(e,t){for(var i=e.length;i--;)if(A(e[i][0],t))return i;return-1},T=Array.prototype.splice;var P=function(e){var t=this.__data__,i=C(t,e);return!(i<0)&&(i==t.length-1?t.pop():T.call(t,i,1),--this.size,!0)};var S=function(e){var t=this.__data__,i=C(t,e);return i<0?void 0:t[i][1]};var E=function(e){return C(this.__data__,e)>-1};var M=function(e,t){var i=this.__data__,n=C(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function I(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},Be={};Be["[object Float32Array]"]=Be["[object Float64Array]"]=Be["[object Int8Array]"]=Be["[object Int16Array]"]=Be["[object Int32Array]"]=Be["[object Uint8Array]"]=Be["[object Uint8ClampedArray]"]=Be["[object Uint16Array]"]=Be["[object Uint32Array]"]=!0,Be["[object Arguments]"]=Be["[object Array]"]=Be["[object ArrayBuffer]"]=Be["[object Boolean]"]=Be["[object DataView]"]=Be["[object Date]"]=Be["[object Error]"]=Be["[object Function]"]=Be["[object Map]"]=Be["[object Number]"]=Be["[object Object]"]=Be["[object RegExp]"]=Be["[object Set]"]=Be["[object String]"]=Be["[object WeakMap]"]=!1;var Fe=function(e){return p(e)&&je(e.length)&&!!Be[m(e)]};var He=function(e){return function(t){return e(t)}},Ue=i(5),We=Ue.a&&Ue.a.isTypedArray,qe=We?He(We):Fe,$e=Object.prototype.hasOwnProperty;var Ye=function(e,t){var i=ze(e),n=!i&&Oe(e),o=!i&&!n&&Object(De.a)(e),r=!i&&!n&&!o&&qe(e),s=i||n||o||r,a=s?Ee(e.length,String):[],c=a.length;for(var l in e)!t&&!$e.call(e,l)||s&&("length"==l||o&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ve(l,c))||a.push(l);return a},Ge=Object.prototype;var Ke=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ge)},Je=f(Object.keys,Object),Qe=Object.prototype.hasOwnProperty;var Ze=function(e){if(!Ke(e))return Je(e);var t=[];for(var i in Object(e))Qe.call(e,i)&&"constructor"!=i&&t.push(i);return t};var Xe=function(e){return null!=e&&je(e.length)&&!j(e)};var et=function(e){return Xe(e)?Ye(e):Ze(e)};var tt=function(e,t){return e&&Se(t,et(t),e)};var it=function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t},nt=Object.prototype.hasOwnProperty;var ot=function(e){if(!L(e))return it(e);var t=Ke(e),i=[];for(var n in e)("constructor"!=n||!t&&nt.call(e,n))&&i.push(n);return i};var rt=function(e){return Xe(e)?Ye(e,!0):ot(e)};var st=function(e,t){return e&&Se(t,rt(t),e)},at=i(8);var ct=function(e,t){var i=-1,n=e.length;for(t||(t=Array(n));++i{this._setToTarget(e,n,t[n],i)})}}function ui(e){return li(e,mi)}function mi(e){return di(e)?e:void 0}var fi=function(){return function e(){e.called=!0}};class gi{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=fi(),this.off=fi()}}const pi=new Array(256).fill().map((e,t)=>("0"+t.toString(16)).slice(-2));function bi(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,i=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0;return"e"+pi[e>>0&255]+pi[e>>8&255]+pi[e>>16&255]+pi[e>>24&255]+pi[t>>0&255]+pi[t>>8&255]+pi[t>>16&255]+pi[t>>24&255]+pi[i>>0&255]+pi[i>>8&255]+pi[i>>16&255]+pi[i>>24&255]+pi[n>>0&255]+pi[n>>8&255]+pi[n>>16&255]+pi[n>>24&255]}var wi={get(e){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5},ki=(i(6),i(0));const _i=Symbol("listeningTo"),vi=Symbol("emitterId");var yi={on(e,t,i={}){this.listenTo(this,e,t,i)},once(e,t,i){let n=!1;this.listenTo(this,e,(function(e,...i){n||(n=!0,e.off(),t.call(this,e,...i))}),i)},off(e,t){this.stopListening(this,e,t)},listenTo(e,t,i,n={}){let o,r;this[_i]||(this[_i]={});const s=this[_i];Ai(e)||xi(e);const a=Ai(e);(o=s[a])||(o=s[a]={emitter:e,callbacks:{}}),(r=o.callbacks[t])||(r=o.callbacks[t]=[]),r.push(i),function(e,t){const i=Ci(e);if(i[t])return;let n=t,o=null;const r=[];for(;""!==n&&!i[n];)i[n]={callbacks:[],childEvents:[]},r.push(i[n]),o&&i[n].childEvents.push(o),o=n,n=n.substr(0,n.lastIndexOf(":"));if(""!==n){for(const e of r)e.callbacks=i[n].callbacks.slice();i[n].childEvents.push(o)}}(e,t);const c=Ti(e,t),l=wi.get(n.priority),d={callback:i,priority:l};for(const e of c){let t=!1;for(let i=0;i-1?e(t,i.substr(0,i.lastIndexOf(":"))):null;return n.callbacks}(this,n);if(i.path.push(this),o){const e=[i,...t];o=Array.from(o);for(let t=0;t{this._delegations||(this._delegations=new Map),e.forEach(e=>{const n=this._delegations.get(e);n?n.set(t,i):this._delegations.set(e,new Map([[t,i]]))})}}},stopDelegating(e,t){if(this._delegations)if(e)if(t){const i=this._delegations.get(e);i&&i.delete(t)}else this._delegations.delete(e);else this._delegations.clear()}};function xi(e,t){e[vi]||(e[vi]=t||bi())}function Ai(e){return e[vi]}function Ci(e){return e._events||Object.defineProperty(e,"_events",{value:{}}),e._events}function Ti(e,t){const i=Ci(e)[t];if(!i)return[];let n=[i.callbacks];for(let t=0;t{Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach(i=>{if(i in e.prototype)return;const n=Object.getOwnPropertyDescriptor(t,i);n.enumerable=!1,Object.defineProperty(e.prototype,i,n)})})}class Ii{constructor(e={},t={}){const i=Ei(e);if(i||(t=e),this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],i)for(const t of e)this._items.push(t),this._itemMap.set(this._getItemIdBeforeAdding(t),t)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){return this.addMany([e],t)}addMany(e,t){if(void 0===t)t=this._items.length;else if(t>this._items.length||t<0)throw new ki.b("collection-add-item-invalid-index: The index passed to Collection#addMany() is invalid.",this);for(let i=0;i{this._setUpBindToBinding(t=>new e(t))},using:e=>{"function"==typeof e?this._setUpBindToBinding(t=>e(t)):this._setUpBindToBinding(t=>t[e])}}}_setUpBindToBinding(e){const t=this._bindToCollection,i=(i,n,o)=>{const r=t._bindToCollection==this,s=t._bindToInternalToExternalMap.get(n);if(r&&s)this._bindToExternalToInternalMap.set(n,s),this._bindToInternalToExternalMap.set(s,n);else{const i=e(n);if(!i)return void this._skippedIndexesFromExternal.push(o);let r=o;for(const e of this._skippedIndexesFromExternal)o>e&&r--;for(const e of t._skippedIndexesFromExternal)r>=e&&r++;this._bindToExternalToInternalMap.set(n,i),this._bindToInternalToExternalMap.set(i,n),this.add(i,r);for(let e=0;e{const n=this._bindToExternalToInternalMap.get(t);n&&this.remove(n),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((e,t)=>(it&&e.push(t),e),[])})}_getItemIdBeforeAdding(e){const t=this._idProperty;let i;if(t in e){if(i=e[t],"string"!=typeof i)throw new ki.b("collection-add-invalid-id: This item's id should be a string.",this);if(this.get(i))throw new ki.b("collection-add-item-already-exists: This item already exists in the collection.",this)}else e[t]=i=bi();return i}_remove(e){let t,i,n,o=!1;const r=this._idProperty;if("string"==typeof e?(i=e,n=this._itemMap.get(i),o=!n,n&&(t=this._items.indexOf(n))):"number"==typeof e?(t=e,n=this._items[t],o=!n,n&&(i=n[r])):(n=e,i=n[r],t=this._items.indexOf(n),o=-1==t||!this._itemMap.get(i)),o)throw new ki.b("collection-remove-404: Item not found.",this);this._items.splice(t,1),this._itemMap.delete(i);const s=this._bindToInternalToExternalMap.get(n);return this._bindToInternalToExternalMap.delete(n),this._bindToExternalToInternalMap.delete(s),this.fire("remove",n,t),[n,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}Mi(Ii,yi);class Ni{constructor(e,t=[],i=[]){this._context=e,this._plugins=new Map,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of i)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){const t="plugincollection-plugin-not-loaded: The requested plugin is not loaded.";let i=e;throw"function"==typeof e&&(i=e.pluginName||e.name),new ki.b(t,this._context,{plugin:i})}return t}has(e){return this._plugins.has(e)}init(e,t=[]){const i=this,n=this._context,o=new Set,r=[],s=u(e),a=u(t),c=function(e){const t=[];for(const i of e)h(i)||t.push(i);return t.length?t:null}(e);if(c){const e="plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.";return console.error(Object(ki.a)(e),{plugins:c}),Promise.reject(new ki.b(e,n,{plugins:c}))}return Promise.all(s.map(l)).then(()=>d(r,"init")).then(()=>d(r,"afterInit")).then(()=>r);function l(e){if(!a.includes(e)&&!i._plugins.has(e)&&!o.has(e))return function(e){return new Promise(s=>{o.add(e),e.requires&&e.requires.forEach(i=>{const o=h(i);if(e.isContextPlugin&&!o.isContextPlugin)throw new ki.b("plugincollection-context-required: Context plugin can not require plugin which is not a context plugin",null,{plugin:o.name,requiredBy:e.name});if(t.includes(o))throw new ki.b("plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.",n,{plugin:o.name,requiredBy:e.name});l(o)});const a=i._contextPlugins.get(e)||new e(n);i._add(e,a),r.push(a),s()})}(e).catch(t=>{throw console.error(Object(ki.a)("plugincollection-load: It was not possible to load the plugin."),{plugin:e}),t})}function d(e,t){return e.reduce((e,n)=>n[t]?i._contextPlugins.has(n)?e:e.then(n[t].bind(n)):e,Promise.resolve())}function h(e){return"function"==typeof e?e:i._availablePlugins.get(e)}function u(e){return e.map(e=>h(e)).filter(e=>!!e)}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const i=e.pluginName;if(i){if(this._plugins.has(i))throw new ki.b("plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.",null,{pluginName:i,plugin1:this._plugins.get(i).constructor,plugin2:e});this._plugins.set(i,t)}}}function Ri(e,t,i=1){if("number"!=typeof i)throw new ki.b("translation-service-quantity-not-a-number: Expecting `quantity` to be a number.",null,{quantity:i});const n=Object.keys(window.CKEDITOR_TRANSLATIONS).length;1===n&&(e=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]);const o=t.id||t.string;if(0===n||!function(e,t){return!!window.CKEDITOR_TRANSLATIONS[e]&&!!window.CKEDITOR_TRANSLATIONS[e].dictionary[t]}(e,o))return 1!==i?t.plural:t.string;const r=window.CKEDITOR_TRANSLATIONS[e].dictionary,s=window.CKEDITOR_TRANSLATIONS[e].getPluralForm||(e=>1===e?0:1);if("string"==typeof r[o])return r[o];const a=Number(s(i));return r[o][a]}Mi(Ni,yi),window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});const Oi=["ar","fa","he","ku","ug"];class zi{constructor(e={}){this.uiLanguage=e.uiLanguage||"en",this.contentLanguage=e.contentLanguage||this.uiLanguage,this.uiLanguageDirection=Di(this.uiLanguage),this.contentLanguageDirection=Di(this.contentLanguage),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){Array.isArray(t)||(t=[t]),"string"==typeof e&&(e={string:e});const i=!!e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,(e,i)=>ie.destroy())).then(()=>this.plugins.destroy())}_addEditor(e,t){if(this._contextOwner)throw new ki.b("context-addEditor-private-context: Cannot add multiple editors to the context which is created by the editor.");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise(t=>{const i=new this(e);t(i.initPlugins().then(()=>i))})}}function Vi(e,t){const i=Math.min(e.length,t.length);for(let n=0;ne.data.length)throw new ki.b("view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",this);if(i<0||t+i>e.data.length)throw new ki.b("view-textproxy-wrong-length: Given length value is incorrect.",this);this.data=e.data.substring(t,t+i),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let i=e.includeSelf?this.textNode:this.parent;for(;null!==i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}}function Ui(e){return Ei(e)?new Map(e):function(e){const t=new Map;for(const i in e)t.set(i,e[i]);return t}(e)}class Wi{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),t.classes&&("string"==typeof t.classes||t.classes instanceof RegExp)&&(t.classes=[t.classes]),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const i=qi(t,e);if(i)return{element:t,pattern:e,match:i}}return null}matchAll(...e){const t=[];for(const i of e)for(const e of this._patterns){const n=qi(i,e);n&&t.push({element:i,pattern:e,match:n})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function qi(e,t){if("function"==typeof t)return t(e);const i={};return t.name&&(i.name=function(e,t){if(e instanceof RegExp)return e.test(t);return e===t}(t.name,e.name),!i.name)||t.attributes&&(i.attributes=function(e,t){const i=[];for(const n in e){const o=e[n];if(!t.hasAttribute(n))return null;{const e=t.getAttribute(n);if(!0===o)i.push(n);else if(o instanceof RegExp){if(!o.test(e))return null;i.push(n)}else{if(e!==o)return null;i.push(n)}}}return i}(t.attributes,e),!i.attributes)?null:!(t.classes&&(i.classes=function(e,t){const i=[];for(const n of e)if(n instanceof RegExp){const e=t.getClassNames();for(const t of e)n.test(t)&&i.push(t);if(0===i.length)return null}else{if(!t.hasClass(n))return null;i.push(n)}return i}(t.classes,e),!i.classes))&&(!(t.styles&&(i.styles=function(e,t){const i=[];for(const n in e){const o=e[n];if(!t.hasStyle(n))return null;{const e=t.getStyle(n);if(o instanceof RegExp){if(!o.test(e))return null;i.push(n)}else{if(e!==o)return null;i.push(n)}}}return i}(t.styles,e),!i.styles))&&i)}var $i=function(e){return"symbol"==typeof e||p(e)&&"[object Symbol]"==m(e)},Yi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gi=/^\w*$/;var Ki=function(e,t){if(ze(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!$i(e))||(Gi.test(e)||!Yi.test(e)||null!=t&&e in Object(t))};function Ji(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var n=arguments,o=t?t.apply(this,n):n[0],r=i.cache;if(r.has(o))return r.get(o);var s=e.apply(this,n);return i.cache=r.set(o,s)||r,s};return i.cache=new(Ji.Cache||ke),i}Ji.Cache=ke;var Qi=Ji;var Zi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xi=/\\(\\)?/g,en=function(e){var t=Qi(e,(function(e){return 500===i.size&&i.clear(),e})),i=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Zi,(function(e,i,n,o){t.push(n?o.replace(Xi,"$1"):i||e)})),t}));var tn=function(e,t){for(var i=-1,n=null==e?0:e.length,o=Array(n);++io?0:o+t),(i=i>o?o:i)<0&&(i+=o),o=t>i?0:i-t>>>0,t>>>=0;for(var r=Array(o);++n0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Sn);var In=function(e,t){return Mn(Tn(e,t,xn),e+"")};var Nn=function(e,t,i){if(!L(i))return!1;var n=typeof t;return!!("number"==n?Xe(i)&&Ve(t,i.length):"string"==n&&t in i)&&A(i[t],e)};var Rn=function(e){return In((function(t,i){var n=-1,o=i.length,r=o>1?i[o-1]:void 0,s=o>2?i[2]:void 0;for(r=e.length>3&&"function"==typeof r?(o--,r):void 0,s&&Nn(i[0],i[1],s)&&(r=o<3?void 0:r,o=1),t=Object(t);++nt===e);return Array.isArray(t)}set(e,t){if(L(e))for(const[t,i]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,i,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=jn(e);fn(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map(e=>e.join(":")).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!L(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find(([t])=>t===e);return Array.isArray(t)?t[1]:void 0}getStyleNames(){if(this.isEmpty)return[];return this._getStylesEntries().map(([e])=>e)}clear(){this._styles={}}_getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const i of t)e.push(...this._styleProcessor.getReducedForm(i,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const i=t.splice(0,t.length-1).join("."),n=gn(this._styles,i);if(!n)return;!Array.from(Object.keys(n)).length&&this.remove(i)}}class Vn{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,i){if(L(t))Bn(i,jn(e),t);else if(this._normalizers.has(e)){const n=this._normalizers.get(e),{path:o,value:r}=n(t);Bn(i,o,r)}else Bn(i,e,t)}getNormalized(e,t){if(!e)return On({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const i=this._extractors.get(e);if("string"==typeof i)return gn(t,i);const n=i(e,t);if(n)return n}return gn(t,jn(e))}getReducedForm(e,t){const i=this.getNormalized(e,t);if(void 0===i)return[];if(this._reducers.has(e)){return this._reducers.get(e)(i)}return[[e,i]]}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const i of t)this._mapStyleNames(i,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function jn(e){return e.replace("-",".")}function Bn(e,t,i){let n=i;L(i)&&(n=On({},gn(e,t),i)),Dn(e,t,n)}class Fn extends Bi{constructor(e,t,i,n){if(super(e),this.name=t,this._attrs=function(e){e=Ui(e);for(const[t,i]of e)null===i?e.delete(t):"string"!=typeof i&&e.set(t,String(i));return e}(i),this._children=[],n&&this._insertChild(0,n),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");Hn(this._classes,e),this._attrs.delete("class")}this._styles=new Ln(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}is(e,t=null){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof Fn))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,i]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==i)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(){return this._styles.getStyleNames()}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new Wi(...e);let i=this.parent;for(;i;){if(t.match(i))return i;i=i.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),i=Array.from(this._attrs).map(e=>`${e[0]}="${e[1]}"`).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==i?"":" "+i)}_clone(e=!1){const t=[];if(e)for(const i of this.getChildren())t.push(i._clone(e));const i=new this.constructor(this.document,this.name,this._attrs,t);return i._classes=new Set(this._classes),i._styles.set(this._styles.getNormalized()),i._customProperties=new Map(this._customProperties),i.getFillerOffset=this.getFillerOffset,i}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let i=0;const n=function(e,t){if("string"==typeof t)return[new Fi(e,t)];Ei(t)||(t=[t]);return Array.from(t).map(t=>"string"==typeof t?new Fi(e,t):t instanceof Hi?new Fi(e,t.data):t)}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,i++;return i}_removeChildren(e,t=1){this._fireChange("children",this);for(let i=e;i0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this),(e=Array.isArray(e)?e:[e]).forEach(e=>this._classes.add(e))}_removeClass(e){this._fireChange("attributes",this),(e=Array.isArray(e)?e:[e]).forEach(e=>this._classes.delete(e))}_setStyle(e,t){this._fireChange("attributes",this),this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this),(e=Array.isArray(e)?e:[e]).forEach(e=>this._styles.remove(e))}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function Hn(e,t){const i=t.split(/\s+/);e.clear(),i.forEach(t=>e.add(t))}class Un extends Fn{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=Wn}is(e,t=null){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}}function Wn(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}var qn=Rn((function(e,t){Se(t,rt(t),e)}));const $n=Symbol("observableProperties"),Yn=Symbol("boundObservables"),Gn=Symbol("boundProperties"),Kn={set(e,t){if(L(e))return void Object.keys(e).forEach(t=>{this.set(t,e[t])},this);Qn(this);const i=this[$n];if(e in this&&!i.has(e))throw new ki.b("observable-set-cannot-override: Cannot override an existing property.",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>i.get(e),set(t){const n=i.get(e);let o=this.fire("set:"+e,e,t,n);void 0===o&&(o=t),n===o&&i.has(e)||(i.set(e,o),this.fire("change:"+e,e,o,n))}}),this[e]=t},bind(...e){if(!e.length||!eo(e))throw new ki.b("observable-bind-wrong-properties: All properties must be strings.",this);if(new Set(e).size!==e.length)throw new ki.b("observable-bind-duplicate-properties: Properties must be unique.",this);Qn(this);const t=this[Gn];e.forEach(e=>{if(t.has(e))throw new ki.b("observable-bind-rebind: Cannot bind the same property more than once.",this)});const i=new Map;return e.forEach(e=>{const n={property:e,to:[]};t.set(e,n),i.set(e,n)}),{to:Zn,toMany:Xn,_observable:this,_bindProperties:e,_to:[],_bindings:i}},unbind(...e){if(!this[$n])return;const t=this[Gn],i=this[Yn];if(e.length){if(!eo(e))throw new ki.b("observable-unbind-wrong-properties: Properties must be strings.",this);e.forEach(e=>{const n=t.get(e);if(!n)return;let o,r,s,a;n.to.forEach(e=>{o=e[0],r=e[1],s=i.get(o),a=s[r],a.delete(n),a.size||delete s[r],Object.keys(s).length||(i.delete(o),this.stopListening(o,"change"))}),t.delete(e)})}else i.forEach((e,t)=>{this.stopListening(t,"change")}),i.clear(),t.clear()},decorate(e){const t=this[e];if(!t)throw new ki.b("observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.",this,{object:this,methodName:e});this.on(e,(e,i)=>{e.return=t.apply(this,i)}),this[e]=function(...t){return this.fire(e,t)}}};qn(Kn,yi);var Jn=Kn;function Qn(e){e[$n]||(Object.defineProperty(e,$n,{value:new Map}),Object.defineProperty(e,Yn,{value:new Map}),Object.defineProperty(e,Gn,{value:new Map}))}function Zn(...e){const t=function(...e){if(!e.length)throw new ki.b("observable-bind-to-parse-error: Invalid argument syntax in `to()`.",null);const t={to:[]};let i;"function"==typeof e[e.length-1]&&(t.callback=e.pop());return e.forEach(e=>{if("string"==typeof e)i.properties.push(e);else{if("object"!=typeof e)throw new ki.b("observable-bind-to-parse-error: Invalid argument syntax in `to()`.",null);i={observable:e,properties:[]},t.to.push(i)}}),t}(...e),i=Array.from(this._bindings.keys()),n=i.length;if(!t.callback&&t.to.length>1)throw new ki.b("observable-bind-to-no-callback: Binding multiple observables only possible with callback.",this);if(n>1&&t.callback)throw new ki.b("observable-bind-to-extra-callback: Cannot bind multiple properties and use a callback in one binding.",this);var o;t.to.forEach(e=>{if(e.properties.length&&e.properties.length!==n)throw new ki.b("observable-bind-to-properties-length: The number of properties must match.",this);e.properties.length||(e.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(i[0]).callback=t.callback),o=this._observable,this._to.forEach(e=>{const t=o[Yn];let i;t.get(e.observable)||o.listenTo(e.observable,"change",(n,r)=>{i=t.get(e.observable)[r],i&&i.forEach(e=>{to(o,e.property)})})}),function(e){let t;e._bindings.forEach((i,n)=>{e._to.forEach(o=>{t=o.properties[i.callback?0:e._bindProperties.indexOf(n)],i.to.push([o.observable,t]),function(e,t,i,n){const o=e[Yn],r=o.get(i),s=r||{};s[n]||(s[n]=new Set);s[n].add(t),r||o.set(i,s)}(e._observable,i,o.observable,t)})})}(this),this._bindProperties.forEach(e=>{to(this._observable,e)})}function Xn(e,t,i){if(this._bindings.size>1)throw new ki.b("observable-bind-to-many-not-one-binding: Cannot bind multiple properties with toMany().",this);this.to(...function(e,t){const i=e.map(e=>[e,t]);return Array.prototype.concat.apply([],i)}(e,t),i)}function eo(e){return e.every(e=>"string"==typeof e)}function to(e,t){const i=e[Gn].get(t);let n;i.callback?n=i.callback.apply(e,i.to.map(e=>e[0][e[1]])):(n=i.to[0],n=n[0][n[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=n:e.set(t,n)}class io extends Un{constructor(e,t,i,n){super(e,t,i,n),this.set("isReadOnly",!1),this.set("isFocused",!1),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",t=>t&&e.selection.editableElement==this),this.listenTo(e.selection,"change",()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this})}is(e,t=null){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}destroy(){this.stopListening()}}Mi(io,Jn);const no=Symbol("rootName");class oo extends io{constructor(e,t){super(e,t),this.rootName="main"}is(e,t=null){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}get rootName(){return this.getCustomProperty(no)}set rootName(e){this._setCustomProperty(no,e)}set _name(e){this.name=e}}class ro{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new ki.b("view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new ki.b("view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this.position=so._createAt(e.startPosition):this.position=so._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(e){let t,i,n;do{n=this.position,({done:t,value:i}=this.next())}while(!t&&e(i));t||(this.position=n)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,i=e.parent;if(null===i.parent&&e.offset===i.childCount)return{done:!0};if(i===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};let n;if(i instanceof Fi){if(e.isAtEnd)return this.position=so._createAfter(i),this._next();n=i.data[e.offset]}else n=i.getChild(e.offset);if(n instanceof Fn)return this.shallow?e.offset++:e=new so(n,0),this.position=e,this._formatReturnValue("elementStart",n,t,e,1);if(n instanceof Fi){if(this.singleCharacters)return e=new so(n,0),this.position=e,this._next();{let i,o=n.data.length;return n==this._boundaryEndParent?(o=this.boundaries.end.offset,i=new Hi(n,0,o),e=so._createAfter(i)):(i=new Hi(n,0,n.data.length),e.offset++),this.position=e,this._formatReturnValue("text",i,t,e,o)}}if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{n=(i===this._boundaryEndParent?this.boundaries.end.offset:i.data.length)-e.offset}const o=new Hi(i,e.offset,n);return e.offset+=n,this.position=e,this._formatReturnValue("text",o,t,e,n)}return e=so._createAfter(i),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",i,t,e)}_previous(){let e=this.position.clone();const t=this.position,i=e.parent;if(null===i.parent&&0===e.offset)return{done:!0};if(i==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};let n;if(i instanceof Fi){if(e.isAtStart)return this.position=so._createBefore(i),this._previous();n=i.data[e.offset-1]}else n=i.getChild(e.offset-1);if(n instanceof Fn)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue("elementStart",n,t,e,1)):(e=new so(n,n.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",n,t,e));if(n instanceof Fi){if(this.singleCharacters)return e=new so(n,n.data.length),this.position=e,this._previous();{let i,o=n.data.length;if(n==this._boundaryStartParent){const t=this.boundaries.start.offset;i=new Hi(n,t,n.data.length-t),o=i.data.length,e=so._createBefore(i)}else i=new Hi(n,0,n.data.length),e.offset--;return this.position=e,this._formatReturnValue("text",i,t,e,o)}}if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{const t=i===this._boundaryStartParent?this.boundaries.start.offset:0;n=e.offset-t}e.offset-=n;const o=new Hi(i,e.offset,n);return this.position=e,this._formatReturnValue("text",o,t,e,n)}return e=so._createBefore(i),this.position=e,this._formatReturnValue("elementStart",i,t,e,1)}_formatReturnValue(e,t,i,n,o){return t instanceof Hi&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?i=so._createAfter(t.textNode):(n=so._createAfter(t.textNode),this.position=n)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?i=so._createBefore(t.textNode):(n=so._createBefore(t.textNode),this.position=n))),{done:!1,value:{type:e,item:t,previousPosition:i,nextPosition:n,length:o}}}}class so{constructor(e,t){this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof io);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=so._createAt(this),i=t.offset+e;return t.offset=i<0?0:i,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const i=new ro(t);return i.skip(e),i.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),i=e.getAncestors();let n=0;for(;t[n]==i[n]&&t[n];)n++;return 0===n?null:t[n-1]}is(e){return"position"===e||"view:position"===e}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],i=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),i.push(e.offset);const n=Vi(t,i);switch(n){case"prefix":return"before";case"extension":return"after";default:return t[n]0?new this(i,n):new this(n,i)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(so._createBefore(e),t)}}function co(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}function lo(e){let t=0;for(const i of e)t++;return t}class ho{constructor(e=null,t,i){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",this.setTo(e,t,i)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let i=!1;for(const n of e._ranges)if(t.isEqual(n)){i=!0;break}if(!i)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=lo(this.getRanges());if(t!=lo(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let i=!1;for(let n of e.getRanges())if(n=n.getTrimmed(),t.start.isEqual(n.start)&&t.end.isEqual(n.end)){i=!0;break}if(!i)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(e,t,i){if(null===e)this._setRanges([]),this._setFakeOptions(t);else if(e instanceof ho||e instanceof uo)this._setRanges(e.getRanges(),e.isBackward),this._setFakeOptions({fake:e.isFake,label:e.fakeSelectionLabel});else if(e instanceof ao)this._setRanges([e],t&&t.backward),this._setFakeOptions(t);else if(e instanceof so)this._setRanges([new ao(e)]),this._setFakeOptions(t);else if(e instanceof Bi){const n=!!i&&!!i.backward;let o;if(void 0===t)throw new ki.b("view-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.",this);o="in"==t?ao._createIn(e):"on"==t?ao._createOn(e):new ao(so._createAt(e,t)),this._setRanges([o],n),this._setFakeOptions(i)}else{if(!Ei(e))throw new ki.b("view-selection-setTo-not-selectable: Cannot set selection to given place.",this);this._setRanges(e,t&&t.backward),this._setFakeOptions(t)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new ki.b("view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",this);const i=so._createAt(e,t);if("same"==i.compareWith(this.focus))return;const n=this.anchor;this._ranges.pop(),"before"==i.compareWith(n)?this._addRange(new ao(i,n),!0):this._addRange(new ao(n,i)),this.fire("change")}is(e){return"selection"===e||"view:selection"===e}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof ao))throw new ki.b("view-selection-add-range-not-range: Selection range set to an object that is not an instance of view.Range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new ki.b("view-selection-range-intersects: Trying to add a range that intersects with another range from selection.",this,{addedRange:e,intersectingRange:t});this._ranges.push(new ao(e.start,e.end))}}Mi(ho,yi);class uo{constructor(e=null,t,i){this._selection=new ho,this._selection.delegate("change").to(this),this._selection.setTo(e,t,i)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}is(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e}_setTo(e,t,i){this._selection.setTo(e,t,i)}_setFocus(e,t){this._selection.setFocus(e,t)}}Mi(uo,yi);class mo{constructor(e){this.selection=new uo,this.roots=new Ii({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isComposing",!1),this._postFixers=new Set}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.map(e=>e.destroy()),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const i of this._postFixers)if(t=i(e),t)break}while(t)}}Mi(mo,Jn);class fo extends Fn{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=go,this._priority=10,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new ki.b("attribute-element-get-elements-with-same-id-no-id: Cannot get elements with the same id for an attribute element without id.",this);return new Set(this._clonesGroup)}is(e,t=null){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function go(){if(po(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(po(e)>1)return null;e=e.parent}return!e||po(e)>1?null:this.childCount}function po(e){return Array.from(e.getChildren()).filter(e=>!e.is("uiElement")).length}fo.DEFAULT_PRIORITY=10;class bo extends Fn{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=wo}is(e,t=null){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}_insertChild(e,t){if(t&&(t instanceof Bi||Array.from(t).length>0))throw new ki.b("view-emptyelement-cannot-add: Cannot add child nodes to EmptyElement instance.",[this,t])}}function wo(){return null}const ko=navigator.userAgent.toLowerCase();var _o={isMac:function(e){return e.indexOf("macintosh")>-1}(ko),isGecko:function(e){return!!e.match(/gecko\/\d+/)}(ko),isSafari:function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(ko),isAndroid:function(e){return e.indexOf("android")>-1}(ko),features:{isRegExpUnicodePropertySupported:function(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}()}};const vo={"⌘":"ctrl","⇧":"shift","⌥":"alt"},yo={ctrl:"⌘",shift:"⇧",alt:"⌥"},xo=function(){const e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,cmd:1114112,shift:2228224,alt:4456448};for(let t=65;t<=90;t++){const i=String.fromCharCode(t);e[i.toLowerCase()]=t}for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;return e}();function Ao(e){let t;if("string"==typeof e){if(t=xo[e.toLowerCase()],!t)throw new ki.b("keyboard-unknown-key: Unknown key name.",null,{key:e})}else t=e.keyCode+(e.altKey?xo.alt:0)+(e.ctrlKey?xo.ctrl:0)+(e.shiftKey?xo.shift:0);return t}function Co(e){return"string"==typeof e&&(e=Mo(e)),e.map(e=>"string"==typeof e?Ao(e):e).reduce((e,t)=>t+e,0)}function To(e){return _o.isMac?Mo(e).map(e=>yo[e.toLowerCase()]||e).reduce((e,t)=>e.slice(-1)in vo?e+t:e+"+"+t):e}function Po(e){return e==xo.arrowright||e==xo.arrowleft||e==xo.arrowup||e==xo.arrowdown}function So(e,t){const i="ltr"===t;switch(e){case xo.arrowleft:return i?"left":"right";case xo.arrowright:return i?"right":"left";case xo.arrowup:return"up";case xo.arrowdown:return"down"}}function Eo(e,t){const i=So(e,t);return"down"===i||"right"===i}function Mo(e){return e.split(/\s*\+\s*/)}class Io extends Fn{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=Ro}is(e,t=null){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}_insertChild(e,t){if(t&&(t instanceof Bi||Array.from(t).length>0))throw new ki.b("view-uielement-cannot-add: Cannot add child nodes to UIElement instance.",this)}render(e){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function No(e){e.document.on("keydown",(t,i)=>function(e,t,i){if(t.keyCode==xo.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),n=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(n||t.shiftKey){const t=e.focusNode,o=e.focusOffset,r=i.domPositionToView(t,o);if(null===r)return;let s=!1;const a=r.getLastMatchingPosition(e=>(e.item.is("uiElement")&&(s=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement"))));if(s){const t=i.viewPositionToDom(a);n?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,i,e.domConverter))}function Ro(){return null}class Oo extends Fn{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=zo}is(e,t=null){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e}_insertChild(e,t){if(t&&(t instanceof Bi||Array.from(t).length>0))throw new ki.b("view-rawelement-cannot-add: Cannot add child nodes to a RawElement instance.",[this,t])}}function zo(){return null}class Do{constructor(e,t){this.document=e,this._children=[],t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(e){return"documentFragment"===e||"view:documentFragment"===e}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let i=0;const n=function(e,t){if("string"==typeof t)return[new Fi(e,t)];Ei(t)||(t=[t]);return Array.from(t).map(t=>"string"==typeof t?new Fi(e,t):t instanceof Hi?new Fi(e,t.data):t)}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,i++;return i}_removeChildren(e,t=1){this._fireChange("children",this);for(let i=e;i{}),n}setAttribute(e,t,i){i._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,i){y(e)&&void 0===i&&(i=t),i._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,i){i._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof so?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const t=e.parent;if(!t.is("containerElement"))throw new ki.b("view-writer-break-non-container-element: Trying to break an element which is not a container element.",this.document);if(!t.parent)throw new ki.b("view-writer-break-root: Trying to break root element.",this.document);if(e.isAtStart)return so._createBefore(t);if(!e.isAtEnd){const i=t._clone(!1);this.insert(so._createAfter(t),i);const n=new ao(e,so._createAt(t,"end")),o=new so(i,0);this.move(n,o)}return so._createAfter(t)}mergeAttributes(e){const t=e.offset,i=e.parent;if(i.is("$text"))return e;if(i.is("attributeElement")&&0===i.childCount){const e=i.parent,t=i.index;return i._remove(),this._removeFromClonedElementsGroup(i),this.mergeAttributes(new so(e,t))}const n=i.getChild(t-1),o=i.getChild(t);if(!n||!o)return e;if(n.is("$text")&&o.is("$text"))return Ho(n,o);if(n.is("attributeElement")&&o.is("attributeElement")&&n.isSimilar(o)){const e=n.childCount;return n._appendChild(o.getChildren()),o._remove(),this._removeFromClonedElementsGroup(o),this.mergeAttributes(new so(n,e))}return e}mergeContainers(e){const t=e.nodeBefore,i=e.nodeAfter;if(!(t&&i&&t.is("containerElement")&&i.is("containerElement")))throw new ki.b("view-writer-merge-containers-invalid-position: Element before and after given position cannot be merged.",this.document);const n=t.getChild(t.childCount-1),o=n instanceof Fi?so._createAt(n,"end"):so._createAt(t,"end");return this.move(ao._createIn(i),so._createAt(t,"end")),this.remove(ao._createOn(i)),o}insert(e,t){(function e(t,i){for(const n of t){if(!Uo.some(e=>n instanceof e))throw new ki.b("view-writer-insert-invalid-node-type: One of the nodes to be inserted is of invalid type.",i);n.is("$text")||e(n.getChildren(),i)}})(t=Ei(t)?[...t]:[t],this.document);const i=Vo(e);if(!i)throw new ki.b("view-writer-invalid-position-container: Position's parent container cannot be found.",this.document);const n=this._breakAttributes(e,!0),o=i._insertChild(n.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const r=n.getShiftedBy(o),s=this.mergeAttributes(n);if(0===o)return new ao(s,s);{s.isEqual(n)||r.offset--;const e=this.mergeAttributes(r);return new ao(s,e)}}remove(e){const t=e instanceof ao?e:ao._createOn(e);if(qo(t,this.document),t.isCollapsed)return new Do(this.document);const{start:i,end:n}=this._breakAttributesRange(t,!0),o=i.parent,r=n.offset-i.offset,s=o._removeChildren(i.offset,r);for(const e of s)this._removeFromClonedElementsGroup(e);const a=this.mergeAttributes(i);return t.start=a,t.end=a.clone(),new Do(this.document,s)}clear(e,t){qo(e,this.document);const i=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const n of i){const i=n.item;let o;if(i.is("element")&&t.isSimilar(i))o=ao._createOn(i);else if(!n.nextPosition.isAfter(e.start)&&i.is("$textProxy")){const e=i.getAncestors().find(e=>e.is("element")&&t.isSimilar(e));e&&(o=ao._createIn(e))}o&&(o.end.isAfter(e.end)&&(o.end=e.end),o.start.isBefore(e.start)&&(o.start=e.start),this.remove(o))}}move(e,t){let i;if(t.isAfter(e.end)){const n=(t=this._breakAttributes(t,!0)).parent,o=n.childCount;e=this._breakAttributesRange(e,!0),i=this.remove(e),t.offset+=n.childCount-o}else i=this.remove(e);return this.insert(t,i)}wrap(e,t){if(!(t instanceof fo))throw new ki.b("view-writer-wrap-invalid-attribute: DowncastWriter#wrap() must be called with an attribute element.",this.document);if(qo(e,this.document),e.isCollapsed){let n=e.start;n.parent.is("element")&&(i=n.parent,!Array.from(i.getChildren()).some(e=>!e.is("uiElement")))&&(n=n.getLastMatchingPosition(e=>e.item.is("uiElement"))),n=this._wrapPosition(n,t);const o=this.document.selection;return o.isCollapsed&&o.getFirstPosition().isEqual(e.start)&&this.setSelection(n),new ao(n)}return this._wrapRange(e,t);var i}unwrap(e,t){if(!(t instanceof fo))throw new ki.b("view-writer-unwrap-invalid-attribute: DowncastWriter#unwrap() must be called with an attribute element.",this.document);if(qo(e,this.document),e.isCollapsed)return e;const{start:i,end:n}=this._breakAttributesRange(e,!0),o=i.parent,r=this._unwrapChildren(o,i.offset,n.offset,t),s=this.mergeAttributes(r.start);s.isEqual(r.start)||r.end.offset--;const a=this.mergeAttributes(r.end);return new ao(s,a)}rename(e,t){const i=new Un(this.document,e,t.getAttributes());return this.insert(so._createAfter(t),i),this.move(ao._createIn(t),so._createAt(i,0)),this.remove(ao._createOn(t)),i}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return so._createAt(e,t)}createPositionAfter(e){return so._createAfter(e)}createPositionBefore(e){return so._createBefore(e)}createRange(e,t){return new ao(e,t)}createRangeOn(e){return ao._createOn(e)}createRangeIn(e){return ao._createIn(e)}createSelection(e,t,i){return new ho(e,t,i)}_wrapChildren(e,t,i,n){let o=t;const r=[];for(;o!1,e.parent._insertChild(e.offset,i);const n=new ao(e,e.getShiftedBy(1));this.wrap(n,t);const o=new so(i.parent,i.index);i._remove();const r=o.nodeBefore,s=o.nodeAfter;return r instanceof Fi&&s instanceof Fi?Ho(r,s):Bo(o)}_wrapAttributeElement(e,t){if(!$o(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const i of e.getAttributeKeys())if("class"!==i&&"style"!==i&&t.hasAttribute(i)&&t.getAttribute(i)!==e.getAttribute(i))return!1;for(const i of e.getStyleNames())if(t.hasStyle(i)&&t.getStyle(i)!==e.getStyle(i))return!1;for(const i of e.getAttributeKeys())"class"!==i&&"style"!==i&&(t.hasAttribute(i)||this.setAttribute(i,e.getAttribute(i),t));for(const i of e.getStyleNames())t.hasStyle(i)||this.setStyle(i,e.getStyle(i),t);for(const i of e.getClassNames())t.hasClass(i)||this.addClass(i,t);return!0}_unwrapAttributeElement(e,t){if(!$o(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const i of e.getAttributeKeys())if("class"!==i&&"style"!==i&&(!t.hasAttribute(i)||t.getAttribute(i)!==e.getAttribute(i)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const i of e.getStyleNames())if(!t.hasStyle(i)||t.getStyle(i)!==e.getStyle(i))return!1;for(const i of e.getAttributeKeys())"class"!==i&&"style"!==i&&this.removeAttribute(i,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const i=e.start,n=e.end;if(qo(e,this.document),e.isCollapsed){const i=this._breakAttributes(e.start,t);return new ao(i,i)}const o=this._breakAttributes(n,t),r=o.parent.childCount,s=this._breakAttributes(i,t);return o.offset+=o.parent.childCount-r,new ao(s,o)}_breakAttributes(e,t=!1){const i=e.offset,n=e.parent;if(e.parent.is("emptyElement"))throw new ki.b("view-writer-cannot-break-empty-element: Cannot break an EmptyElement instance.",this.document);if(e.parent.is("uiElement"))throw new ki.b("view-writer-cannot-break-ui-element: Cannot break a UIElement instance.",this.document);if(e.parent.is("rawElement"))throw new ki.b("view-writer-cannot-break-raw-element: Cannot break a RawElement instance.",this.document);if(!t&&n.is("$text")&&Wo(n.parent))return e.clone();if(Wo(n))return e.clone();if(n.is("$text"))return this._breakAttributes(Fo(e),t);if(i==n.childCount){const e=new so(n.parent,n.index+1);return this._breakAttributes(e,t)}if(0===i){const e=new so(n.parent,n.index);return this._breakAttributes(e,t)}{const e=n.index+1,o=n._clone();n.parent._insertChild(e,o),this._addToClonedElementsGroup(o);const r=n.childCount-i,s=n._removeChildren(i,r);o._appendChild(s);const a=new so(n.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let i=this._cloneGroups.get(t);i||(i=new Set,this._cloneGroups.set(t,i)),i.add(e),e._clonesGroup=i}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const i=this._cloneGroups.get(t);i&&i.delete(e)}}function Vo(e){let t=e.parent;for(;!Wo(t);){if(!t)return;t=t.parent}return t}function jo(e,t){return e.priorityt.priority)&&e.getIdentity()e.createTextNode(" "),Ko=e=>{const t=e.createElement("br");return t.dataset.ckeFiller=!0,t},Jo=(()=>{let e="";for(let t=0;t<7;t++)e+="​";return e})();function Qo(e){return Yo(e)&&e.data.substr(0,7)===Jo}function Zo(e){return 7==e.data.length&&Qo(e)}function Xo(e){return Qo(e)?e.data.slice(7):e.data}function er(e,t){if(t.keyCode==xo.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,i=e.getRangeAt(0).startOffset;Qo(t)&&i<=7&&e.collapse(t,0)}}}function tr(e,t,i,n=!1){i=i||function(e,t){return e===t},Array.isArray(e)||(e=Array.prototype.slice.call(e)),Array.isArray(t)||(t=Array.prototype.slice.call(t));const o=function(e,t,i){const n=ir(e,t,i);if(-1===n)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const o=nr(e,n),r=nr(t,n),s=ir(o,r,i),a=e.length-s,c=t.length-s;return{firstIndex:n,lastIndexOld:a,lastIndexNew:c}}(e,t,i);return n?function(e,t){const{firstIndex:i,lastIndexOld:n,lastIndexNew:o}=e;if(-1===i)return Array(t).fill("equal");let r=[];i>0&&(r=r.concat(Array(i).fill("equal")));o-i>0&&(r=r.concat(Array(o-i).fill("insert")));n-i>0&&(r=r.concat(Array(n-i).fill("delete")));o0&&i.push({index:n,type:"insert",values:e.slice(n,r)});o-n>0&&i.push({index:n+(r-n),type:"delete",howMany:o-n});return i}(t,o)}function ir(e,t,i){for(let n=0;n200||o>200||n+o>300)return or.fastDiff(e,t,i,!0);let r,s;if(ol?-1:1;d[n+u]&&(d[n]=d[n+u].slice(0)),d[n]||(d[n]=[]),d[n].push(o>l?r:s);let m=Math.max(o,l),f=m-n;for(;fl;m--)h[m]=u(m);h[l]=u(l),f++}while(h[l]!==c);return d[l].slice(1)}function rr(e,t,i){e.insertBefore(i,e.childNodes[t]||null)}function sr(e){const t=e.parentNode;t&&t.removeChild(e)}function ar(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}or.fastDiff=tr;class cr{constructor(e,t){this.domDocuments=new Set,this.domConverter=e,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=t,this.isFocused=!1,this._inlineFiller=null,this._fakeSelectionContainer=null}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e)throw new ki.b("view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.",this);this.markedChildren.add(t)}}}render(){let e;for(const e of this.markedChildren)this._updateChildrenMappings(e);this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(e){const t=this.domConverter.viewPositionToDom(e),i=t.parent.ownerDocument;Qo(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=lr(i,t.parent,t.offset)}else this._inlineFiller=null;this._updateSelection(),this._updateFocus(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const i=this.domConverter.mapViewToDom(e).childNodes,n=Array.from(this.domConverter.viewChildrenToDom(e,t.ownerDocument,{withChildren:!1})),o=this._diffNodeLists(i,n),r=this._findReplaceActions(o,i,n);if(-1!==r.indexOf("replace")){const t={equal:0,insert:0,delete:0};for(const o of r)if("replace"===o){const o=t.equal+t.insert,r=t.equal+t.delete,s=e.getChild(o);!s||s.is("uiElement")||s.is("rawElement")||this._updateElementMappings(s,i[r]),sr(n[o]),t.equal++}else t[o]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?so._createBefore(this.selection.getFirstPosition().parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&Yo(t.parent)&&Qo(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!Qo(e))throw new ki.b("view-renderer-filler-was-lost: The inline filler node was lost.",this);Zo(e)?e.parentNode.removeChild(e):e.data=e.data.substr(7),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,i=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor(e=>e.hasAttribute("contenteditable"));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(i===t.getFillerOffset())return!1;const n=e.nodeBefore,o=e.nodeAfter;return!(n instanceof Fi||o instanceof Fi)}_updateText(e,t){const i=this.domConverter.findCorrespondingDomText(e),n=this.domConverter.viewToDom(e,i.ownerDocument),o=i.data;let r=n.data;const s=t.inlineFillerPosition;if(s&&s.parent==e.parent&&s.offset==e.index&&(r=Jo+r),o!=r){const e=tr(o,r);for(const t of e)"insert"===t.type?i.insertData(t.index,t.values.join("")):i.deleteData(t.index,t.howMany)}}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const i=Array.from(t.attributes).map(e=>e.name),n=e.getAttributeKeys();for(const i of n)t.setAttribute(i,e.getAttribute(i));for(const n of i)e.hasAttribute(n)||t.removeAttribute(n)}_updateChildren(e,t){const i=this.domConverter.mapViewToDom(e);if(!i)return;const n=t.inlineFillerPosition,o=this.domConverter.mapViewToDom(e).childNodes,r=Array.from(this.domConverter.viewChildrenToDom(e,i.ownerDocument,{bind:!0,inlineFillerPosition:n}));n&&n.parent===e&&lr(i.ownerDocument,r,n.offset);const s=this._diffNodeLists(o,r);let a=0;const c=new Set;for(const e of s)"delete"===e?(c.add(o[a]),sr(o[a])):"equal"===e&&a++;a=0;for(const e of s)"insert"===e?(rr(i,a,r[a]),a++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(r[a])),a++);for(const e of c)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return or(e=function(e,t){const i=Array.from(e);if(0==i.length||!t)return i;i[i.length-1]==t&&i.pop();return i}(e,this._fakeSelectionContainer),t,hr.bind(null,this.domConverter))}_findReplaceActions(e,t,i){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let n=[],o=[],r=[];const s={equal:0,insert:0,delete:0};for(const a of e)"insert"===a?r.push(i[s.equal+s.insert]):"delete"===a?o.push(t[s.equal+s.delete]):(n=n.concat(or(o,r,dr).map(e=>"equal"===e?"replace":e)),n.push("equal"),o=[],r=[]),s[a]++;return n.concat(or(o,r,dr).map(e=>"equal"===e?"replace":e))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):(this._removeFakeSelection(),this._updateDomSelection(e)))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const i=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(i,this.selection),!this._fakeSelectionNeedsUpdate(e))return;i.parentElement&&i.parentElement==e||e.appendChild(i),i.textContent=this.selection.fakeSelectionLabel||" ";const n=t.getSelection(),o=t.createRange();n.removeAllRanges(),o.selectNodeContents(i),n.addRange(o)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const i=this.domConverter.viewPositionToDom(this.selection.anchor),n=this.domConverter.viewPositionToDom(this.selection.focus);e.focus(),t.collapse(i.parent,i.offset),t.extend(n.parent,n.offset),_o.isGecko&&function(e,t){const i=e.parent;if(i.nodeType!=Node.ELEMENT_NODE||e.offset!=i.childNodes.length-1)return;const n=i.childNodes[e.offset];n&&"BR"==n.tagName&&t.addRange(t.getRangeAt(0))}(n,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return(!t||!this.selection.isEqual(t))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,i=e.ownerDocument.getSelection();return!t||t.parentElement!==e||(i.anchorNode!==t&&!t.contains(i.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const e of this.domDocuments){if(e.getSelection().rangeCount){const t=e.activeElement,i=this.domConverter.mapDomToView(t);t&&i&&e.getSelection().removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function lr(e,t,i){const n=t instanceof Array?t:t.childNodes,o=n[i];if(Yo(o))return o.data=Jo+o.data,o;{const o=e.createTextNode(Jo);return Array.isArray(t)?n.splice(i,0,o):rr(t,i,o),o}}function dr(e,t){return ar(e)&&ar(t)&&!Yo(e)&&!Yo(t)&&e.nodeType!==Node.COMMENT_NODE&&t.nodeType!==Node.COMMENT_NODE&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function hr(e,t,i){return t===i||(Yo(t)&&Yo(i)?t.data===i.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(i)))}Mi(cr,Jn);var ur={window:window,document:document};function mr(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function fr(e){const t=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}const gr=Ko(document);class pr{constructor(e,t={}){this.document=e,this.blockFillerMode=t.blockFillerMode||"br",this.preElements=["pre"],this.blockElements=["p","div","h1","h2","h3","h4","h5","h6","li","dd","dt","figcaption","td","th"],this._blockFiller="br"==this.blockFillerMode?Ko:Go,this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new ho(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of e.childNodes)this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}viewToDom(e,t,i={}){if(e.is("$text")){const i=this._processDataFromViewText(e);return t.createTextNode(i)}{if(this.mapViewToDom(e))return this.mapViewToDom(e);let n;if(e.is("documentFragment"))n=t.createDocumentFragment(),i.bind&&this.bindDocumentFragments(n,e);else{if(e.is("uiElement"))return n=e.render(t),i.bind&&this.bindElements(n,e),n;n=e.hasAttribute("xmlns")?t.createElementNS(e.getAttribute("xmlns"),e.name):t.createElement(e.name),e.is("rawElement")&&e.render(n),i.bind&&this.bindElements(n,e);for(const t of e.getAttributeKeys())n.setAttribute(t,e.getAttribute(t))}if(i.withChildren||void 0===i.withChildren)for(const o of this.viewChildrenToDom(e,t,i))n.appendChild(o);return n}}*viewChildrenToDom(e,t,i={}){const n=e.getFillerOffset&&e.getFillerOffset();let o=0;for(const r of e.getChildren())n===o&&(yield this._blockFiller(t)),yield this.viewToDom(r,t,i),o++;n===o&&(yield this._blockFiller(t))}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),i=this.viewPositionToDom(e.end),n=document.createRange();return n.setStart(t.parent,t.offset),n.setEnd(i.parent,i.offset),n}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const i=this.findCorrespondingDomText(t);if(!i)return null;let n=e.offset;return Qo(i)&&(n+=7),{parent:i,offset:n}}{let i,n,o;if(0===e.offset){if(i=this.mapViewToDom(t),!i)return null;o=i.childNodes[0]}else{const t=e.nodeBefore;if(n=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(e.nodeBefore),!n)return null;i=n.parentNode,o=n.nextSibling}if(Yo(o)&&Qo(o))return{parent:o,offset:7};return{parent:i,offset:n?mr(n)+1:0}}}domToView(e,t={}){if(this.isBlockFiller(e,this.blockFillerMode))return null;const i=this.getHostViewElement(e,this._domToViewMapping);if(i)return i;if(Yo(e)){if(Zo(e))return null;{const t=this._processDataFromDomText(e);return""===t?null:new Fi(this.document,t)}}if(this.isComment(e))return null;{if(this.mapDomToView(e))return this.mapDomToView(e);let i;if(this.isDocumentFragment(e))i=new Do(this.document),t.bind&&this.bindDocumentFragments(e,i);else{const n=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();i=new Fn(this.document,n),t.bind&&this.bindElements(e,i);const o=e.attributes;for(let e=o.length-1;e>=0;e--)i._setAttribute(o[e].name,o[e].value)}if(t.withChildren||void 0===t.withChildren)for(const n of this.domChildrenToView(e,t))i._appendChild(n);return i}}*domChildrenToView(e,t={}){for(let i=0;i{const{scrollLeft:t,scrollTop:i}=e;n.push([t,i])}),t.focus(),wr(t,e=>{const[t,i]=n.shift();e.scrollLeft=t,e.scrollTop=i}),ur.window.scrollTo(e,i)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(e){return e&&e.nodeType==Node.COMMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(gr):!("BR"!==e.tagName||!kr(e,this.blockElements)||1!==e.parentNode.childNodes.length)||function(e,t){return Yo(e)&&" "==e.data&&kr(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements)}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=document.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);const i=t.collapsed;return t.detach(),i}getHostViewElement(e){const t=fr(e);for(t.pop();t.length;){const e=t.pop(),i=this._domToViewMapping.get(e);if(i&&(i.is("uiElement")||i.is("rawElement")))return i}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}_isDomSelectionPositionCorrect(e,t){if(Yo(e)&&Qo(e)&&t<7)return!1;if(this.isElement(e)&&Qo(e.childNodes[t]))return!1;const i=this.mapDomToView(e);return!i||!i.is("uiElement")&&!i.is("rawElement")}_processDataFromViewText(e){let t=e.data;if(e.getAncestors().some(e=>this.preElements.includes(e.name)))return t;if(" "==t.charAt(0)){const i=this._getTouchingViewTextNode(e,!1);!(i&&this._nodeEndsWithSpace(i))&&i||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const i=this._getTouchingViewTextNode(e,!0);" "!=t.charAt(t.length-2)&&i&&" "!=i.data.charAt(0)||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(e.getAncestors().some(e=>this.preElements.includes(e.name)))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(br(e,this.preElements))return Xo(e);t=t.replace(/[ \n\t\r]{1,}/g," ");const i=this._getTouchingInlineDomNode(e,!1),n=this._getTouchingInlineDomNode(e,!0),o=this._checkShouldLeftTrimDomText(i),r=this._checkShouldRightTrimDomText(e,n);return o&&(t=t.replace(/^ /,"")),r&&(t=t.replace(/ $/,"")),t=Xo(new Text(t)),t=t.replace(/ \u00A0/g," "),(/( |\u00A0)\u00A0$/.test(t)||!n||n.data&&" "==n.data.charAt(0))&&(t=t.replace(/\u00A0$/," ")),o&&(t=t.replace(/^\u00A0/," ")),t}_checkShouldLeftTrimDomText(e){return!e||(!!di(e)||/[^\S\u00A0]/.test(e.data.charAt(e.data.length-1)))}_checkShouldRightTrimDomText(e,t){return!t&&!Qo(e)}_getTouchingViewTextNode(e,t){const i=new ro({startPosition:t?so._createAfter(e):so._createBefore(e),direction:t?"forward":"backward"});for(const e of i){if(e.item.is("containerElement"))return null;if(e.item.is("element","br"))return null;if(e.item.is("$textProxy"))return e.item}return null}_getTouchingInlineDomNode(e,t){if(!e.parentNode)return null;const i=t?"nextNode":"previousNode",n=e.ownerDocument,o=fr(e)[0],r=n.createTreeWalker(o,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:e=>Yo(e)||"BR"==e.tagName?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});r.currentNode=e;const s=r[i]();if(null!==s){const t=function(e,t){const i=fr(e),n=fr(t);let o=0;for(;i[o]==n[o]&&i[o];)o++;return 0===o?null:i[o-1]}(e,s);if(t&&!br(e,this.blockElements,t)&&!br(s,this.blockElements,t))return s}return null}}function br(e,t,i){let n=fr(e);return i&&(n=n.slice(n.indexOf(i)+1)),n.some(e=>e.tagName&&t.includes(e.tagName.toLowerCase()))}function wr(e,t){for(;e&&e!=ur.document;)t(e),e=e.parentNode}function kr(e,t){const i=e.parentNode;return i&&i.tagName&&t.includes(i.tagName.toLowerCase())}function _r(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}var vr=qn({},yi,{listenTo(e,...t){if(ar(e)||_r(e)){const i=this._getProxyEmitter(e)||new yr(e);i.attach(...t),e=i}yi.listenTo.call(this,e,...t)},stopListening(e,t,i){if(ar(e)||_r(e)){const t=this._getProxyEmitter(e);if(!t)return;e=t}yi.stopListening.call(this,e,t,i),e instanceof yr&&e.detach(t)},_getProxyEmitter(e){return t=this,i=xr(e),t[_i]&&t[_i][i]?t[_i][i].emitter:null;var t,i}});class yr{constructor(e){xi(this,xr(e)),this._domNode=e}}function xr(e){return e["data-ck-expando"]||(e["data-ck-expando"]=bi())}qn(yr.prototype,yi,{attach(e,t,i={}){if(this._domListeners&&this._domListeners[e])return;const n={capture:!!i.useCapture,passive:!!i.usePassive},o=this._createDomListener(e,n);this._domNode.addEventListener(e,o,n),this._domListeners||(this._domListeners={}),this._domListeners[e]=o},detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()},_createDomListener(e,t){const i=t=>{this.fire(e,t)};return i.removeListener=()=>{this._domNode.removeEventListener(e,i,t),delete this._domListeners[e]},i}});class Ar{constructor(e){this.view=e,this.document=e.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}}Mi(Ar,vr);var Cr=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var Tr=function(e){return this.__data__.has(e)};function Pr(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new ke;++ta))return!1;var l=r.get(e);if(l&&r.get(t))return l==t;var d=-1,h=!0,u=2&i?new Sr:void 0;for(r.set(e,t),r.set(t,e);++d{this.listenTo(e,t,(e,t)=>{this.isEnabled&&this.onDomEvent(t)},{useCapture:this.useCapture})})}fire(e,t,i){this.isEnabled&&this.document.fire(e,new Yr(this.view,t,i))}}class Kr extends Gr{constructor(e){super(e),this.domEventType=["keydown","keyup"]}onDomEvent(e){this.fire(e.type,e,{keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey||e.metaKey,shiftKey:e.shiftKey,get keystroke(){return Ao(this)}})}}var Jr=function(){return n.a.Date.now()},Qr=/^\s+|\s+$/g,Zr=/^[-+]0x[0-9a-f]+$/i,Xr=/^0b[01]+$/i,es=/^0o[0-7]+$/i,ts=parseInt;var is=function(e){if("number"==typeof e)return e;if($i(e))return NaN;if(L(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=L(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Qr,"");var i=Xr.test(e);return i||es.test(e)?ts(e.slice(2),i?2:8):Zr.test(e)?NaN:+e},ns=Math.max,os=Math.min;var rs=function(e,t,i){var n,o,r,s,a,c,l=0,d=!1,h=!1,u=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var i=n,r=o;return n=o=void 0,l=t,s=e.apply(r,i)}function f(e){return l=e,a=setTimeout(p,t),d?m(e):s}function g(e){var i=e-c;return void 0===c||i>=t||i<0||h&&e-l>=r}function p(){var e=Jr();if(g(e))return b(e);a=setTimeout(p,function(e){var i=t-(e-c);return h?os(i,r-(e-l)):i}(e))}function b(e){return a=void 0,u&&n?m(e):(n=o=void 0,s)}function w(){var e=Jr(),i=g(e);if(n=arguments,o=this,c=e,i){if(void 0===a)return f(c);if(h)return clearTimeout(a),a=setTimeout(p,t),m(c)}return void 0===a&&(a=setTimeout(p,t)),s}return t=is(t)||0,L(i)&&(d=!!i.leading,r=(h="maxWait"in i)?ns(is(i.maxWait)||0,t):r,u="trailing"in i?!!i.trailing:u),w.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=c=o=a=void 0},w.flush=function(){return void 0===a?s:b(Jr())},w};class ss extends Ar{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=rs(e=>this.document.fire("selectionChangeDone",e),200)}observe(){const e=this.document;e.on("keydown",(t,i)=>{var n;e.selection.isFake&&((n=i.keyCode)==xo.arrowright||n==xo.arrowleft||n==xo.arrowup||n==xo.arrowdown)&&this.isEnabled&&(i.preventDefault(),this._handleSelectionMove(i.keyCode))},{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,i=new ho(t.getRanges(),{backward:t.isBackward,fake:!1});e!=xo.arrowleft&&e!=xo.arrowup||i.setTo(i.getFirstPosition()),e!=xo.arrowright&&e!=xo.arrowdown||i.setTo(i.getLastPosition());const n={oldSelection:t,newSelection:i,domSelection:null};this.document.fire("selectionChange",n),this._fireSelectionChangeDoneDebounced(n)}}class as extends Ar{constructor(e){super(e),this.mutationObserver=e.getObserver($r),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=rs(e=>this.document.fire("selectionChangeDone",e),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument;this._documents.has(t)||(this.listenTo(t,"selectionchange",()=>{this._handleSelectionChange(t)}),this._documents.add(t))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(e){if(!this.isEnabled)return;this.mutationObserver.flush();const t=e.defaultView.getSelection(),i=this.domConverter.domSelectionToView(t);if(0!=i.rangeCount){if(this.view.hasDomSelection=!0,!(this.selection.isEqual(i)&&this.domConverter.isDomSelectionCorrect(t)||++this._loopbackCounter>60))if(this.selection.isSimilar(i))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:i,domSelection:t};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class cs extends Gr{constructor(e){super(e),this.domEventType=["focus","blur"],this.useCapture=!0;const t=this.document;t.on("focus",()=>{t.isFocused=!0,this._renderTimeoutId=setTimeout(()=>e.forceRender(),50)}),t.on("blur",(i,n)=>{const o=t.selection.editableElement;null!==o&&o!==n.target||(t.isFocused=!1,e.forceRender())})}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class ls extends Gr{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",()=>{t.isComposing=!0}),t.on("compositionend",()=>{t.isComposing=!1})}onDomEvent(e){this.fire(e.type,e)}}class ds extends Gr{constructor(e){super(e),this.domEventType=["beforeinput"]}onDomEvent(e){this.fire(e.type,e)}}function hs(e){return"[object Range]"==Object.prototype.toString.apply(e)}function us(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}const ms=["top","right","bottom","left","width","height"];class fs{constructor(e){const t=hs(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),di(e)||t)if(t){const t=fs.getDomRangeRects(e);gs(this,fs.getBoundingRect(t))}else gs(this,e.getBoundingClientRect());else if(_r(e)){const{innerWidth:t,innerHeight:i}=e;gs(this,{top:0,right:t,bottom:i,left:0,width:t,height:i})}else gs(this,e)}clone(){return new fs(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left)};return t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0?null:new fs(t)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!ps(e)){let i=e.parentNode||e.commonAncestorContainer;for(;i&&!ps(i);){const e=new fs(i),n=t.getIntersection(e);if(!n)return null;n.getArea()Ts(e,n));const s=Ts(e,n);if(ws(n,s,t),n.parent!=n){if(o=n.frameElement,n=n.parent,!o)return}else n=null}}function ws(e,t,i){const n=t.clone().moveBy(0,i),o=t.clone().moveBy(0,-i),r=new fs(e).excludeScrollbarsAndBorders();if(![o,n].every(e=>r.contains(e))){let{scrollX:s,scrollY:a}=e;vs(o,r)?a-=r.top-t.top+i:_s(n,r)&&(a+=t.bottom-r.bottom+i),ys(t,r)?s-=r.left-t.left+i:xs(t,r)&&(s+=t.right-r.right+i),e.scrollTo(s,a)}}function ks(e,t){const i=As(e);let n,o;for(;e!=i.document.body;)o=t(),n=new fs(e).excludeScrollbarsAndBorders(),n.contains(o)||(vs(o,n)?e.scrollTop-=n.top-o.top:_s(o,n)&&(e.scrollTop+=o.bottom-n.bottom),ys(o,n)?e.scrollLeft-=n.left-o.left:xs(o,n)&&(e.scrollLeft+=o.right-n.right)),e=e.parentNode}function _s(e,t){return e.bottom>t.bottom}function vs(e,t){return e.topt.right}function As(e){return hs(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function Cs(e){if(hs(e)){let t=e.commonAncestorContainer;return Yo(t)&&(t=t.parentNode),t}return e.parentNode}function Ts(e,t){const i=As(e),n=new fs(e);if(i===t)return n;{let e=i;for(;e!=t;){const t=e.frameElement,i=new fs(t).excludeScrollbarsAndBorders();n.moveBy(i.left,i.top),e=e.parent}}return n}Object.assign({},{scrollViewportToShowTarget:bs,scrollAncestorsToShowTarget:function(e){ks(Cs(e),()=>new fs(e))}});class Ps{constructor(e){this.document=new mo(e),this.domConverter=new pr(this.document),this.domRoots=new Map,this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new cr(this.domConverter,this.document.selection),this._renderer.bind("isFocused").to(this.document),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new Lo(this.document),this.addObserver($r),this.addObserver(as),this.addObserver(cs),this.addObserver(Kr),this.addObserver(ss),this.addObserver(ls),_o.isAndroid&&this.addObserver(ds),this.document.on("keydown",er),No(this),this.on("render",()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1}),this.listenTo(this.document.selection,"change",()=>{this._hasChangedSinceTheLastRendering=!0})}attachDomRoot(e,t="main"){const i=this.document.getRoot(t);i._name=e.tagName.toLowerCase();const n={};for(const{name:t,value:o}of Array.from(e.attributes))n[t]=o,"class"===t?this._writer.addClass(o.split(" "),i):this._writer.setAttribute(t,o,i);this._initialDomRootAttributes.set(e,n);const o=()=>{this._writer.setAttribute("contenteditable",!i.isReadOnly,i),i.isReadOnly?this._writer.addClass("ck-read-only",i):this._writer.removeClass("ck-read-only",i)};o(),this.domRoots.set(t,e),this.domConverter.bindElements(e,i),this._renderer.markToSync("children",i),this._renderer.markToSync("attributes",i),this._renderer.domDocuments.add(e.ownerDocument),i.on("change:children",(e,t)=>this._renderer.markToSync("children",t)),i.on("change:attributes",(e,t)=>this._renderer.markToSync("attributes",t)),i.on("change:text",(e,t)=>this._renderer.markToSync("text",t)),i.on("change:isReadOnly",()=>this.change(o)),i.on("change",()=>{this._hasChangedSinceTheLastRendering=!0});for(const i of this._observers.values())i.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach(({name:e})=>t.removeAttribute(e));const i=this._initialDomRootAttributes.get(t);for(const e in i)t.setAttribute(e,i[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,i]of this.domRoots)t.observe(i,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection(){const e=this.document.selection.getFirstRange();e&&bs({target:this.domConverter.viewRangeToDom(e),viewportOffset:20})}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new ki.b("cannot-change-view-tree: Attempting to make changes to the view when it is in an incorrect state: rendering or post-fixers are in progress. This may cause some unexpected behavior and inconsistency between the DOM and the view.",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){ki.b.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.change(()=>{})}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return so._createAt(e,t)}createPositionAfter(e){return so._createAfter(e)}createPositionBefore(e){return so._createBefore(e)}createRange(e,t){return new ao(e,t)}createRangeOn(e){return ao._createOn(e)}createRangeIn(e){return ao._createIn(e)}createSelection(e,t,i){return new ho(e,t,i)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change(()=>{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}Mi(Ps,Jn);class Ss{constructor(e){this.parent=null,this._attrs=Ui(e)}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new ki.b("model-node-not-found-in-parent: The node's parent does not contain this node.",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new ki.b("model-node-not-found-in-parent: The node's parent does not contain this node.",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}getCommonAncestor(e,t={}){const i=this.getAncestors(t),n=e.getAncestors(t);let o=0;for(;i[o]==n[o]&&i[o];)o++;return 0===o?null:i[o-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),i=e.getPath(),n=Vi(t,i);switch(n){case"prefix":return!0;case"extension":return!1;default:return t[n](e[t[0]]=t[1],e),{})),e}is(e){return"node"===e||"model:node"===e}_clone(){return new Ss(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=Ui(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}class Es extends Ss{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}is(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new Es(this.data,this.getAttributes())}static fromJSON(e){return new Es(e.data,e.attributes)}}class Ms{constructor(e,t,i){if(this.textNode=e,t<0||t>e.offsetSize)throw new ki.b("model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",this);if(i<0||t+i>e.offsetSize)throw new ki.b("model-textproxy-wrong-length: Given length value is incorrect.",this);this.data=e.data.substring(t,t+i),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}is(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}class Is{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((e,t)=>e+t.offsetSize,0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce((e,t)=>e+t.offsetSize,0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new ki.b("model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const i of this._nodes){if(e>=t&&ee.toJSON())}}class Ns extends Ss{constructor(e,t,i){super(t),this.name=e,this._children=new Is,i&&this._insertChild(0,i)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(e,t=null){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const i of e)t=t.getChild(t.offsetToIndex(i));return t}findAncestor(e,t={includeSelf:!1}){let i=t.includeSelf?this:this.parent;for(;i;){if(i.name===e)return i;i=i.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map(e=>e._clone(!0)):null;return new Ns(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const i=function(e){if("string"==typeof e)return[new Es(e)];Ei(e)||(e=[e]);return Array.from(e).map(e=>"string"==typeof e?new Es(e):e instanceof Ms?new Es(e.data,e.getAttributes()):e)}(t);for(const e of i)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,i)}_removeChildren(e,t=1){const i=this._children._removeNodes(e,t);for(const e of i)e.parent=null;return i}static fromJSON(e){let t=null;if(e.children){t=[];for(const i of e.children)i.name?t.push(Ns.fromJSON(i)):t.push(Es.fromJSON(i))}return new Ns(e.name,e.attributes,t)}}class Rs{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new ki.b("model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new ki.b("model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this.position=e.startPosition.clone():this.position=zs._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}skip(e){let t,i,n,o;do{n=this.position,o=this._visitedParent,({done:t,value:i}=this.next())}while(!t&&e(i));t||(this.position=n,this._visitedParent=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),i=this._visitedParent;if(null===i.parent&&t.offset===i.maxOffset)return{done:!0};if(i===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};const n=t.parent,o=Ds(t,n),r=o||Ls(t,n,o);if(r instanceof Ns)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=r),this.position=t,Os("elementStart",r,e,t,1);if(r instanceof Es){let n;if(this.singleCharacters)n=1;else{let e=r.endOffset;this._boundaryEndParent==i&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),n=t.offset-e}const o=t.offset-r.startOffset,s=new Ms(r,o-n,n);return t.offset-=n,this.position=t,Os("text",s,e,t,n)}return t.path.pop(),this.position=t,this._visitedParent=i.parent,Os("elementStart",i,e,t,1)}}function Os(e,t,i,n,o){return{done:!1,value:{type:e,item:t,previousPosition:i,nextPosition:n,length:o}}}class zs{constructor(e,t,i="toNone"){if(!e.is("element")&&!e.is("documentFragment"))throw new ki.b("model-position-root-invalid: Position root invalid.",e);if(!(t instanceof Array)||0===t.length)throw new ki.b("model-position-path-incorrect-format: Position path must be an array with at least one item.",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=i}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;ti.path.length){if(t.offset!==n.maxOffset)return!1;t.path=t.path.slice(0,-1),n=n.parent,t.offset++}else{if(0!==i.offset)return!1;i.path=i.path.slice(0,-1)}}}is(e){return"position"===e||"model:position"===e}hasSameParentAs(e){if(this.root!==e.root)return!1;return"same"==Vi(this.getParentPath(),e.getParentPath())}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=zs._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let i;return t.containsPosition(this)||t.start.isEqual(this)?(i=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(i=i._getTransformedByDeletion(e.deletionPosition,1))):i=this.isEqual(e.deletionPosition)?zs._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),i}_getTransformedByDeletion(e,t){const i=zs._createAt(this);if(this.root!=e.root)return i;if("same"==Vi(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;i.offset-=t}}else if("prefix"==Vi(e.getParentPath(),this.getParentPath())){const n=e.path.length-1;if(e.offset<=this.path[n]){if(e.offset+t>this.path[n])return null;i.path[n]-=t}}return i}_getTransformedByInsertion(e,t){const i=zs._createAt(this);if(this.root!=e.root)return i;if("same"==Vi(e.getParentPath(),this.getParentPath()))(e.offsett+1;){const t=n.maxOffset-i.offset;0!==t&&e.push(new js(i,i.getShiftedBy(t))),i.path=i.path.slice(0,-1),i.offset++,n=n.parent}for(;i.path.length<=this.end.path.length;){const t=this.end.path[i.path.length-1],n=t-i.offset;0!==n&&e.push(new js(i,i.getShiftedBy(n))),i.offset=t,i.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new Rs(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new Rs(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new Rs(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new js(this.start,this.end)]}getTransformedByOperations(e){const t=[new js(this.start,this.end)];for(const i of e)for(let e=0;e0?new this(i,n):new this(n,i)}static _createIn(e){return new this(zs._createAt(e,0),zs._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(zs._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new ki.b("range-create-from-ranges-empty-array: At least one range has to be passed.",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort((e,t)=>e.start.isAfter(t.start)?1:-1);const i=e.indexOf(t),n=new this(t.start,t.end);if(i>0)for(let t=i-1;e[t].end.isEqual(n.start);t++)n.start=zs._createAt(e[t].start);for(let t=i+1;t{if(t.viewPosition)return;const i=this._modelToViewMapping.get(t.modelPosition.parent);t.viewPosition=this.findPositionIn(i,t.modelPosition.offset)},{priority:"low"}),this.on("viewToModelPosition",(e,t)=>{if(t.modelPosition)return;const i=this.findMappedViewAncestor(t.viewPosition),n=this._viewToModelMapping.get(i),o=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,i);t.modelPosition=zs._createAt(n,o)},{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e){const t=this.toModelElement(e);if(this._viewToModelMapping.delete(e),this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);this._modelToViewMapping.get(t)==e&&this._modelToViewMapping.delete(t)}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const i=this._markerNameToElements.get(t)||new Set;i.add(e);const n=this._elementToMarkerNames.get(e)||new Set;n.add(t),this._markerNameToElements.set(t,i),this._elementToMarkerNames.set(e,n)}unbindElementFromMarkerName(e,t){const i=this._markerNameToElements.get(t);i&&(i.delete(e),0==i.size&&this._markerNameToElements.delete(t));const n=this._elementToMarkerNames.get(e);n&&(n.delete(t),0==n.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new js(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new ao(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={isPhantom:!1}){const i={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",i),i.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const i=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())i.add(t);else i.add(e);return i}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,i){if(i!=e){return this._toModelOffset(e.parent,e.index,i)+this._toModelOffset(e,t,e)}if(e.is("$text"))return t;let n=0;for(let i=0;i1?t[0]+":"+t[1]:t[0]}class Us{constructor(e){this.conversionApi=Object.assign({dispatcher:this},e)}convertChanges(e,t,i){for(const t of e.getMarkersToRemove())this.convertMarkerRemove(t.name,t.range,i);for(const t of e.getChanges())"insert"==t.type?this.convertInsert(js._createFromPositionAndShift(t.position,t.length),i):"remove"==t.type?this.convertRemove(t.position,t.length,t.name,i):this.convertAttribute(t.range,t.attributeKey,t.attributeOldValue,t.attributeNewValue,i);for(const e of this.conversionApi.mapper.flushUnboundMarkerNames()){const n=t.get(e).getRange();this.convertMarkerRemove(e,n,i),this.convertMarkerAdd(e,n,i)}for(const t of e.getMarkersToAdd())this.convertMarkerAdd(t.name,t.range,i)}convertInsert(e,t){this.conversionApi.writer=t,this.conversionApi.consumable=this._createInsertConsumable(e);for(const t of e){const e=t.item,i={item:e,range:js._createFromPositionAndShift(t.previousPosition,t.length)};this._testAndFire("insert",i);for(const t of e.getAttributeKeys())i.attributeKey=t,i.attributeOldValue=null,i.attributeNewValue=e.getAttribute(t),this._testAndFire("attribute:"+t,i)}this._clearConversionApi()}convertRemove(e,t,i,n){this.conversionApi.writer=n,this.fire("remove:"+i,{position:e,length:t},this.conversionApi),this._clearConversionApi()}convertAttribute(e,t,i,n,o){this.conversionApi.writer=o,this.conversionApi.consumable=this._createConsumableForRange(e,"attribute:"+t);for(const o of e){const e={item:o.item,range:js._createFromPositionAndShift(o.previousPosition,o.length),attributeKey:t,attributeOldValue:i,attributeNewValue:n};this._testAndFire("attribute:"+t,e)}this._clearConversionApi()}convertSelection(e,t,i){const n=Array.from(t.getMarkersAtPosition(e.getFirstPosition()));if(this.conversionApi.writer=i,this.conversionApi.consumable=this._createSelectionConsumable(e,n),this.fire("selection",{selection:e},this.conversionApi),e.isCollapsed){for(const t of n){const i=t.getRange();if(!Ws(e.getFirstPosition(),t,this.conversionApi.mapper))continue;const n={item:e,markerName:t.name,markerRange:i};this.conversionApi.consumable.test(e,"addMarker:"+t.name)&&this.fire("addMarker:"+t.name,n,this.conversionApi)}for(const t of e.getAttributeKeys()){const i={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};this.conversionApi.consumable.test(e,"attribute:"+i.attributeKey)&&this.fire("attribute:"+i.attributeKey+":$text",i,this.conversionApi)}this._clearConversionApi()}}convertMarkerAdd(e,t,i){if(!t.root.document||"$graveyard"==t.root.rootName)return;this.conversionApi.writer=i;const n="addMarker:"+e,o=new Fs;if(o.add(t,n),this.conversionApi.consumable=o,this.fire(n,{markerName:e,markerRange:t},this.conversionApi),o.test(t,n)){this.conversionApi.consumable=this._createConsumableForRange(t,n);for(const i of t.getItems()){if(!this.conversionApi.consumable.test(i,n))continue;const o={item:i,range:js._createOn(i),markerName:e,markerRange:t};this.fire(n,o,this.conversionApi)}this._clearConversionApi()}}convertMarkerRemove(e,t,i){t.root.document&&"$graveyard"!=t.root.rootName&&(this.conversionApi.writer=i,this.fire("removeMarker:"+e,{markerName:e,markerRange:t},this.conversionApi),this._clearConversionApi())}_createInsertConsumable(e){const t=new Fs;for(const i of e){const e=i.item;t.add(e,"insert");for(const i of e.getAttributeKeys())t.add(e,"attribute:"+i)}return t}_createConsumableForRange(e,t){const i=new Fs;for(const n of e.getItems())i.add(n,t);return i}_createSelectionConsumable(e,t){const i=new Fs;i.add(e,"selection");for(const n of t)i.add(e,"addMarker:"+n.name);for(const t of e.getAttributeKeys())i.add(e,"attribute:"+t);return i}_testAndFire(e,t){if(!this.conversionApi.consumable.test(t.item,e))return;const i=t.item.name||"$text";this.fire(e+":"+i,t,this.conversionApi)}_clearConversionApi(){delete this.conversionApi.writer,delete this.conversionApi.consumable}}function Ws(e,t,i){const n=t.getRange(),o=Array.from(e.getAncestors());o.shift(),o.reverse();return!o.some(e=>{if(n.containsItem(e)){return!!i.toViewElement(e).getCustomProperty("addHighlight")}})}Mi(Us,yi);class qs{constructor(e,t,i){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,e&&this.setTo(e,t,i)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let i=!1;for(const n of e._ranges)if(t.isEqual(n)){i=!0;break}if(!i)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new js(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new js(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new js(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(e,t,i){if(null===e)this._setRanges([]);else if(e instanceof qs)this._setRanges(e.getRanges(),e.isBackward);else if(e&&"function"==typeof e.getRanges)this._setRanges(e.getRanges(),e.isBackward);else if(e instanceof js)this._setRanges([e],!!t&&!!t.backward);else if(e instanceof zs)this._setRanges([new js(e)]);else if(e instanceof Ss){const n=!!i&&!!i.backward;let o;if("in"==t)o=js._createIn(e);else if("on"==t)o=js._createOn(e);else{if(void 0===t)throw new ki.b("model-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.",[this,e]);o=new js(zs._createAt(e,t))}this._setRanges([o],n)}else{if(!Ei(e))throw new ki.b("model-selection-setTo-not-selectable: Cannot set the selection to the given place.",[this,e]);this._setRanges(e,t&&!!t.backward)}}_setRanges(e,t=!1){const i=(e=Array.from(e)).some(t=>{if(!(t instanceof js))throw new ki.b("model-selection-set-ranges-not-range: Selection range set to an object that is not an instance of model.Range.",[this,e]);return this._ranges.every(e=>!e.isEqual(t))});if(e.length!==this._ranges.length||i){this._removeAllRanges();for(const t of e)this._pushRange(t);this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0})}}setFocus(e,t){if(null===this.anchor)throw new ki.b("model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",[this,e]);const i=zs._createAt(e,t);if("same"==i.compareWith(this.focus))return;const n=this.anchor;this._ranges.length&&this._popRange(),"before"==i.compareWith(n)?(this._pushRange(new js(i,n)),this._lastRangeBackward=!0):(this._pushRange(new js(n,i)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}is(e){return"selection"===e||"model:selection"===e}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const i=Gs(t.start,e);i&&Ks(i,t)&&(yield i);for(const i of t.getWalker()){const n=i.item;"elementEnd"==i.type&&Ys(n,e,t)&&(yield n)}const n=Gs(t.end,e);n&&!t.end.isTouching(zs._createAt(n,0))&&Ks(n,t)&&(yield n)}}containsEntireContent(e=this.anchor.root){const t=zs._createAt(e,0),i=zs._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&i.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new js(e.start,e.end))}_checkRange(e){for(let t=0;t0;)this._popRange()}_popRange(){this._ranges.pop()}}function $s(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&e.parent)}function Ys(e,t,i){return $s(e,t)&&Ks(e,i)}function Gs(e,t){const i=e.parent.root.document.model.schema,n=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let o=!1;const r=n.find(e=>!o&&(o=i.isLimit(e),!o&&$s(e,t)));return n.forEach(e=>t.add(e)),r}function Ks(e,t){const i=function(e){const t=e.root.document.model.schema;let i=e.parent;for(;i;){if(t.isBlock(i))return i;i=i.parent}}(e);if(!i)return!0;return!t.containsRange(js._createOn(i),!0)}Mi(qs,yi);class Js extends js{constructor(e,t){super(e,t),Qs.call(this)}detach(){this.stopListening()}is(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e}toRange(){return new js(this.start,this.end)}static fromRange(e){return new Js(e.start,e.end)}}function Qs(){this.listenTo(this.root.document.model,"applyOperation",(e,t)=>{const i=t[0];i.isDocumentOperation&&Zs.call(this,i)},{priority:"low"})}function Zs(e){const t=this.getTransformedByOperation(e),i=js._createFromRanges(t),n=!i.isEqual(this),o=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let r=null;if(n){"$graveyard"==i.root.rootName&&(r="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=i.start,this.end=i.end,this.fire("change:range",t,{deletionPosition:r})}else o&&this.fire("change:content",this.toRange(),{deletionPosition:r})}Mi(Js,yi);const Xs="selection:";class ea{constructor(e){this._selection=new ta(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection._updateMarkers(),this._selection._updateAttributes(!1)}is(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(e,t,i){this._selection.setTo(e,t,i)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection._getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return Xs+e}static _isStoreAttributeKey(e){return e.startsWith(Xs)}}Mi(ea,yi);class ta extends qs{constructor(e){super(),this.markers=new Ii({idProperty:"name"}),this._model=e.model,this._document=e,this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this.listenTo(this._model,"applyOperation",(e,t)=>{const i=t[0];i.isDocumentOperation&&"marker"!=i.type&&"rename"!=i.type&&"noop"!=i.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))},{priority:"lowest"}),this.on("change:range",()=>{for(const e of this.getRanges())if(!this._document._validateSelectionRange(e))throw new ki.b("document-selection-wrong-position: Range from document selection starts or ends at incorrect position.",this,{range:e})}),this.listenTo(this._model.markers,"update",()=>this._updateMarkers()),this.listenTo(this._document,"change",(e,t)=>{!function(e,t){const i=e.document.differ;for(const n of i.getChanges()){if("insert"!=n.type)continue;const i=n.position.parent;n.length===i.maxOffset&&e.enqueueChange(t,e=>{const t=Array.from(i.getAttributeKeys()).filter(e=>e.startsWith(Xs));for(const n of t)e.removeAttribute(n,i)})}}(this._model,t)})}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=n.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}}),t}_updateMarkers(){const e=[];let t=!1;for(const t of this._model.markers){const i=t.getRange();for(const n of this.getRanges())i.containsRange(n,!n.isCollapsed)&&e.push(t)}const i=Array.from(this.markers);for(const i of e)this.markers.has(i)||(this.markers.add(i),t=!0);for(const i of Array.from(this.markers))e.includes(i)||(this.markers.remove(i),t=!0);t&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateAttributes(e){const t=Ui(this._getSurroundingAttributes()),i=Ui(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const n=[];for(const[e,t]of this.getAttributes())i.has(e)&&i.get(e)===t||n.push(e);for(const[e]of i)this.hasAttribute(e)||n.push(e);n.length>0&&this.fire("change:attribute",{attributeKeys:n,directChange:!1})}_setAttribute(e,t,i=!0){const n=i?"normal":"low";if("low"==n&&"normal"==this._attributePriority.get(e))return!1;return super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,n),!0)}_removeAttribute(e,t=!0){const i=t?"normal":"low";return("low"!=i||"normal"!=this._attributePriority.get(e))&&(this._attributePriority.set(e,i),!!super.hasAttribute(e)&&(this._attrs.delete(e),!0))}_setAttributesTo(e){const t=new Set;for(const[t,i]of this.getAttributes())e.get(t)!==i&&this._removeAttribute(t,!1);for(const[i,n]of e){this._setAttribute(i,n,!1)&&t.add(i)}return t}*_getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(Xs)){const i=t.substr(Xs.length);yield[i,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;let i=null;if(this.isCollapsed){const n=e.textNode?e.textNode:e.nodeBefore,o=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(i=ia(n)),i||(i=ia(o)),!this.isGravityOverridden&&!i){let e=n;for(;e&&!t.isInline(e)&&!i;)e=e.previousSibling,i=ia(e)}if(!i){let e=o;for(;e&&!t.isInline(e)&&!i;)e=e.nextSibling,i=ia(e)}i||(i=this._getStoredAttributes())}else{const e=this.getFirstRange();for(const n of e){if(n.item.is("element")&&t.isObject(n.item))break;if("text"==n.type){i=n.item.getAttributes();break}}}return i}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function ia(e){return e instanceof Ms||e instanceof Es?e.getAttributes():null}class na{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}var oa=function(e){return ci(e,5)};class ra extends na{elementToElement(e){return this.add(function(e){return(e=oa(e)).view=ca(e.view,"container"),t=>{var i;t.on("insert:"+e.model,(i=e.view,(e,t,n)=>{const o=i(t.item,n);if(!o)return;if(!n.consumable.consume(t.item,"insert"))return;const r=n.mapper.toViewPosition(t.range.start);n.mapper.bindElements(t.item,o),n.writer.insert(r,o)}),{priority:e.converterPriority||"normal"})}}(e))}attributeToElement(e){return this.add(function(e){e=oa(e);let t="attribute:"+(e.model.key?e.model.key:e.model);e.model.name&&(t+=":"+e.model.name);if(e.model.values)for(const t of e.model.values)e.view[t]=ca(e.view[t],"attribute");else e.view=ca(e.view,"attribute");const i=la(e);return n=>{n.on(t,function(e){return(t,i,n)=>{const o=e(i.attributeOldValue,n),r=e(i.attributeNewValue,n);if(!o&&!r)return;if(!n.consumable.consume(i.item,t.name))return;const s=n.writer,a=s.document.selection;if(i.item instanceof qs||i.item instanceof ea)s.wrap(a.getFirstRange(),r);else{let e=n.mapper.toViewRange(i.range);null!==i.attributeOldValue&&o&&(e=s.unwrap(e,o)),null!==i.attributeNewValue&&r&&s.wrap(e,r)}}}(i),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=oa(e);let t="attribute:"+(e.model.key?e.model.key:e.model);e.model.name&&(t+=":"+e.model.name);if(e.model.values)for(const t of e.model.values)e.view[t]=da(e.view[t]);else e.view=da(e.view);const i=la(e);return n=>{var o;n.on(t,(o=i,(e,t,i)=>{const n=o(t.attributeOldValue,i),r=o(t.attributeNewValue,i);if(!n&&!r)return;if(!i.consumable.consume(t.item,e.name))return;const s=i.mapper.toViewElement(t.item),a=i.writer;if(!s)throw new ki.b("conversion-attribute-to-attribute-on-text: Trying to convert text node's attribute with attribute-to-attribute converter.",[t,i]);if(null!==t.attributeOldValue&&n)if("class"==n.key){const e=Array.isArray(n.value)?n.value:[n.value];for(const t of e)a.removeClass(t,s)}else if("style"==n.key){const e=Object.keys(n.value);for(const t of e)a.removeStyle(t,s)}else a.removeAttribute(n.key,s);if(null!==t.attributeNewValue&&r)if("class"==r.key){const e=Array.isArray(r.value)?r.value:[r.value];for(const t of e)a.addClass(t,s)}else if("style"==r.key){const e=Object.keys(r.value);for(const t of e)a.setStyle(t,r.value[t],s)}else a.setAttribute(r.key,r.value,s)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){return(e=oa(e)).view=ca(e.view,"ui"),t=>{var i;t.on("addMarker:"+e.model,(i=e.view,(e,t,n)=>{t.isOpening=!0;const o=i(t,n);t.isOpening=!1;const r=i(t,n);if(!o||!r)return;const s=t.markerRange;if(s.isCollapsed&&!n.consumable.consume(s,e.name))return;for(const t of s)if(!n.consumable.consume(t.item,e.name))return;const a=n.mapper,c=n.writer;c.insert(a.toViewPosition(s.start),o),n.mapper.bindElementToMarker(o,t.markerName),s.isCollapsed||(c.insert(a.toViewPosition(s.end),r),n.mapper.bindElementToMarker(r,t.markerName)),e.stop()}),{priority:e.converterPriority||"normal"}),t.on("removeMarker:"+e.model,(e.view,(e,t,i)=>{const n=i.mapper.markerNameToElements(t.markerName);if(n){for(const e of n)i.mapper.unbindElementFromMarkerName(e,t.markerName),i.writer.clear(i.writer.createRangeOn(e),e);i.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var i;t.on("addMarker:"+e.model,(i=e.view,(e,t,n)=>{if(!t.item)return;if(!(t.item instanceof qs||t.item instanceof ea||t.item.is("$textProxy")))return;const o=ha(i,t,n);if(!o)return;if(!n.consumable.consume(t.item,e.name))return;const r=n.writer,s=sa(r,o),a=r.document.selection;if(t.item instanceof qs||t.item instanceof ea)r.wrap(a.getFirstRange(),s,a);else{const e=n.mapper.toViewRange(t.range),i=r.wrap(e,s);for(const e of i.getItems())if(e.is("attributeElement")&&e.isSimilar(s)){n.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on("addMarker:"+e.model,function(e){return(t,i,n)=>{if(!i.item)return;if(!(i.item instanceof Ns))return;const o=ha(e,i,n);if(!o)return;if(!n.consumable.test(i.item,t.name))return;const r=n.mapper.toViewElement(i.item);if(r&&r.getCustomProperty("addHighlight")){n.consumable.consume(i.item,t.name);for(const e of js._createIn(i.item))n.consumable.consume(e.item,t.name);r.getCustomProperty("addHighlight")(r,o,n.writer),n.mapper.bindElementToMarker(r,i.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on("removeMarker:"+e.model,function(e){return(t,i,n)=>{if(i.markerRange.isCollapsed)return;const o=ha(e,i,n);if(!o)return;const r=sa(n.writer,o),s=n.mapper.markerNameToElements(i.markerName);if(s){for(const e of s)n.mapper.unbindElementFromMarkerName(e,i.markerName),e.is("attributeElement")?n.writer.unwrap(n.writer.createRangeOn(e),r):e.getCustomProperty("removeHighlight")(e,o.id,n.writer);n.writer.clearClonedElementsGroup(i.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){const t=(e=oa(e)).model;e.view||(e.view=i=>({group:t,name:i.substr(e.model.length+1)}));return i=>{var n;i.on("addMarker:"+t,(n=e.view,(e,t,i)=>{const o=n(t.markerName,i);if(!o)return;const r=t.markerRange;i.consumable.consume(r,e.name)&&(aa(r,!1,i,t,o),aa(r,!0,i,t,o),e.stop())}),{priority:e.converterPriority||"normal"}),i.on("removeMarker:"+t,function(e){return(t,i,n)=>{const o=e(i.markerName,n);if(!o)return;const r=n.mapper.markerNameToElements(i.markerName);if(r){for(const e of r)n.mapper.unbindElementFromMarkerName(e,i.markerName),e.is("containerElement")?(s(`data-${o.group}-start-before`,e),s(`data-${o.group}-start-after`,e),s(`data-${o.group}-end-before`,e),s(`data-${o.group}-end-after`,e)):n.writer.clear(n.writer.createRangeOn(e),e);n.writer.clearClonedElementsGroup(i.markerName),t.stop()}function s(e,t){if(t.hasAttribute(e)){const i=new Set(t.getAttribute(e).split(","));i.delete(o.name),0==i.size?n.writer.removeAttribute(e,t):n.writer.setAttribute(e,Array.from(i).join(","),t)}}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}}function sa(e,t){const i=e.createAttributeElement("span",t.attributes);return t.classes&&i._addClass(t.classes),t.priority&&(i._priority=t.priority),i._id=t.id,i}function aa(e,t,i,n,o){const r=t?e.start:e.end;if(i.schema.checkChild(r,"$text")){!function(e,t,i,n,o){const r=`${o.group}-${t?"start":"end"}`,s=o.name?{name:o.name}:null,a=i.writer.createUIElement(r,s);i.writer.insert(e,a),i.mapper.bindElementToMarker(a,n.markerName)}(i.mapper.toViewPosition(r),t,i,n,o)}else{let e,s;t&&r.nodeAfter||!t&&!r.nodeBefore?(e=r.nodeAfter,s=!0):(e=r.nodeBefore,s=!1);!function(e,t,i,n,o,r){const s=`data-${r.group}-${t?"start":"end"}-${i?"before":"after"}`,a=e.hasAttribute(s)?e.getAttribute(s).split(","):[];a.unshift(r.name),n.writer.setAttribute(s,a.join(","),e),n.mapper.bindElementToMarker(e,o.markerName)}(i.mapper.toViewElement(e),t,s,i,n,o)}}function ca(e,t){return"function"==typeof e?e:(i,n)=>function(e,t,i){"string"==typeof e&&(e={name:e});let n;const o=t.writer,r=Object.assign({},e.attributes);if("container"==i)n=o.createContainerElement(e.name,r);else if("attribute"==i){const t={priority:e.priority||fo.DEFAULT_PRIORITY};n=o.createAttributeElement(e.name,r,t)}else n=o.createUIElement(e.name,r);if(e.styles){const t=Object.keys(e.styles);for(const i of t)o.setStyle(i,e.styles[i],n)}if(e.classes){const t=e.classes;if("string"==typeof t)o.addClass(t,n);else for(const e of t)o.addClass(e,n)}return n}(e,n,t)}function la(e){return e.model.values?(t,i)=>{const n=e.view[t];return n?n(t,i):null}:e.view}function da(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function ha(e,t,i){const n="function"==typeof e?e(t,i):e;return n?(n.priority||(n.priority=10),n.id||(n.id=t.markerName),n):null}function ua(e){const{schema:t,document:i}=e.model;for(const n of i.getRootNames()){const o=i.getRoot(n);if(o.isEmpty&&!t.checkChild(o,"$text")&&t.checkChild(o,"paragraph"))return e.insertElement("paragraph",o),!0}return!1}function ma(e,t,i){const n=i.createContext(e);return!!i.checkChild(n,"paragraph")&&!!i.checkChild(n.push("paragraph"),t)}function fa(e,t){const i=t.createElement("paragraph");return t.insert(i,e),t.createPositionAt(i,0)}class ga extends na{elementToElement(e){return this.add(pa(e))}elementToAttribute(e){return this.add(function(e){ka(e=oa(e));const t=_a(e,!1),i=ba(e.view),n=i?"element:"+i:"element";return i=>{i.on(n,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=oa(e);let t=null;("string"==typeof e.view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let i;if("class"==t||"style"==t){i={["class"==t?"classes":"styles"]:e.view.value}}else{i={attributes:{[t]:void 0===e.view.value?/[\s\S]*/:e.view.value}}}e.view.name&&(i.name=e.view.name);return e.view=i,t}(e));ka(e,t);const i=_a(e,!0);return t=>{t.on("element",i,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return console.warn(Object(ki.a)("upcast-helpers-element-to-marker-deprecated: The UpcastHelpers#elementToMarker() method was deprecated and will be removed in the near future. Please use UpcastHelpers#dataToMarker() instead.")),this.add(function(e){return function(e){const t=e.model;e.model=(e,i)=>{const n="string"==typeof t?t:t(e,i);return i.writer.createElement("$marker",{"data-name":n})}}(e=oa(e)),pa(e)}(e))}dataToMarker(e){return this.add(function(e){(e=oa(e)).model||(e.model=t=>t?e.view+":"+t:e.view);const t=wa(va(e,"start")),i=wa(va(e,"end"));return n=>{n.on("element:"+e.view+"-start",t,{priority:e.converterPriority||"normal"}),n.on("element:"+e.view+"-end",i,{priority:e.converterPriority||"normal"});const o=wi.get("low"),r=wi.get("highest"),s=wi.get(e.converterPriority)/r;n.on("element",function(e){return(t,i,n)=>{const o="data-"+e.view;function r(t,o){for(const r of o){const o=e.model(r,n),s=n.writer.createElement("$marker",{"data-name":o});n.writer.insert(s,t),i.modelCursor.isEqual(t)?i.modelCursor=i.modelCursor.getShiftedBy(1):i.modelCursor=i.modelCursor._getTransformedByInsertion(t,1),i.modelRange=i.modelRange._getTransformedByInsertion(t,1)[0]}}i.modelRange||(i=Object.assign(i,n.convertChildren(i.viewItem,i.modelCursor))),n.consumable.consume(i.viewItem,{attributes:o+"-end-after"})&&r(i.modelRange.end,i.viewItem.getAttribute(o+"-end-after").split(",")),n.consumable.consume(i.viewItem,{attributes:o+"-start-after"})&&r(i.modelRange.end,i.viewItem.getAttribute(o+"-start-after").split(",")),n.consumable.consume(i.viewItem,{attributes:o+"-end-before"})&&r(i.modelRange.start,i.viewItem.getAttribute(o+"-end-before").split(",")),n.consumable.consume(i.viewItem,{attributes:o+"-start-before"})&&r(i.modelRange.start,i.viewItem.getAttribute(o+"-start-before").split(","))}}(e),{priority:o+s})}}(e))}}function pa(e){const t=wa(e=oa(e)),i=ba(e.view),n=i?"element:"+i:"element";return i=>{i.on(n,t,{priority:e.converterPriority||"normal"})}}function ba(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function wa(e){const t=new Wi(e.view);return(i,n,o)=>{const r=t.match(n.viewItem);if(!r)return;const s=r.match;if(s.name=!0,!o.consumable.test(n.viewItem,s))return;const a=function(e,t,i){return e instanceof Function?e(t,i):i.writer.createElement(e)}(e.model,n.viewItem,o);a&&o.safeInsert(a,n.modelCursor)&&(o.consumable.consume(n.viewItem,s),o.convertChildren(n.viewItem,a),o.updateConversionResult(a,n))}}function ka(e,t=null){const i=null===t||(e=>e.getAttribute(t)),n="object"!=typeof e.model?e.model:e.model.key,o="object"!=typeof e.model||void 0===e.model.value?i:e.model.value;e.model={key:n,value:o}}function _a(e,t){const i=new Wi(e.view);return(n,o,r)=>{const s=i.match(o.viewItem);if(!s)return;const a=e.model.key,c="function"==typeof e.model.value?e.model.value(o.viewItem,r):e.model.value;if(null===c)return;if(!function(e,t){const i="function"==typeof e?e(t):e;if("object"==typeof i&&!ba(i))return!1;return!i.classes&&!i.attributes&&!i.styles}(e.view,o.viewItem)?delete s.match.name:s.match.name=!0,!r.consumable.test(o.viewItem,s.match))return;o.modelRange||(o=Object.assign(o,r.convertChildren(o.viewItem,o.modelCursor)));(function(e,t,i,n){let o=!1;for(const r of Array.from(e.getItems({shallow:i})))n.schema.checkAttribute(r,t.key)&&(n.writer.setAttribute(t.key,t.value,r),o=!0);return o})(o.modelRange,{key:a,value:c},t,r)&&r.consumable.consume(o.viewItem,s.match)}}function va(e,t){const i={};return i.view=e.view+"-"+t,i.model=(t,i)=>{const n=t.getAttribute("name"),o=e.model(n,i);return i.writer.createElement("$marker",{"data-name":o})},i}class ya{constructor(e,t){this.model=e,this.view=new Ps(t),this.mapper=new Bs,this.downcastDispatcher=new Us({mapper:this.mapper,schema:e.schema});const i=this.model.document,n=i.selection,o=this.model.markers;this.listenTo(this.model,"_beforeChanges",()=>{this.view._disableRendering(!0)},{priority:"highest"}),this.listenTo(this.model,"_afterChanges",()=>{this.view._disableRendering(!1)},{priority:"lowest"}),this.listenTo(i,"change",()=>{this.view.change(e=>{this.downcastDispatcher.convertChanges(i.differ,o,e),this.downcastDispatcher.convertSelection(n,o,e)})},{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(i,n)=>{const o=n.newSelection,r=[];for(const e of o.getRanges())r.push(t.toModelRange(e));const s=e.createSelection(r,{backward:o.isBackward});s.isEqual(e.document.selection)||e.change(e=>{e.setSelection(s)})}}(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",(e,t,i)=>{if(!i.consumable.consume(t.item,"insert"))return;const n=i.writer,o=i.mapper.toViewPosition(t.range.start),r=n.createText(t.item.data);n.insert(o,r)},{priority:"lowest"}),this.downcastDispatcher.on("remove",(e,t,i)=>{const n=i.mapper.toViewPosition(t.position),o=t.position.getShiftedBy(t.length),r=i.mapper.toViewPosition(o,{isPhantom:!0}),s=i.writer.createRange(n,r),a=i.writer.remove(s.getTrimmed());for(const e of i.writer.createRangeIn(a).getItems())i.mapper.unbindViewElement(e)},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,i)=>{const n=i.writer,o=n.document.selection;for(const e of o.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&i.writer.mergeAttributes(e.start);n.setSelection(null)},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,i)=>{const n=t.selection;if(n.isCollapsed)return;if(!i.consumable.consume(n,"selection"))return;const o=[];for(const e of n.getRanges()){const t=i.mapper.toViewRange(e);o.push(t)}i.writer.setSelection(o,{backward:n.isBackward})},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,i)=>{const n=t.selection;if(!n.isCollapsed)return;if(!i.consumable.consume(n,"selection"))return;const o=i.writer,r=n.getFirstPosition(),s=i.mapper.toViewPosition(r),a=o.breakAttributes(s);o.setSelection(a)},{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using(e=>{if("$graveyard"==e.rootName)return null;const t=new oo(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t})}destroy(){this.view.destroy(),this.stopListening()}}Mi(ya,Jn);class xa{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const i=this.get(e);if(!i)throw new ki.b("commandcollection-command-not-found: Command does not exist.",this,{commandName:e});return i.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class Aa{constructor(){this._consumables=new Map}add(e,t){let i;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?i=this._consumables.get(e):(i=new Ca(e),this._consumables.set(e,i)),i.add(t))}test(e,t){const i=this._consumables.get(e);return void 0===i?null:e.is("$text")||e.is("documentFragment")?i:i.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const i=this._consumables.get(e);void 0!==i&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):i.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},i=e.getAttributeKeys();for(const e of i)"style"!=e&&"class"!=e&&t.attributes.push(e);const n=e.getClassNames();for(const e of n)t.classes.push(e);const o=e.getStyleNames();for(const e of o)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new Aa(e)),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,Aa.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const i of e.getChildren())t=Aa.createFrom(i,t);return t}}class Ca{constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t in this._consumables)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t in this._consumables)if(t in e){const i=this._test(t,e[t]);if(!0!==i)return i}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t in this._consumables)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t in this._consumables)t in e&&this._revert(t,e[t])}_add(e,t){const i=ze(t)?t:[t],n=this._consumables[e];for(const t of i){if("attributes"===e&&("class"===t||"style"===t))throw new ki.b("viewconsumable-invalid-attribute: Classes and styles should be handled separately.",this);if(n.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))n.set(e,!0)}}_test(e,t){const i=ze(t)?t:[t],n=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){const e=n.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",i=this._test(e,[...this._consumables[e].keys()]);if(!0!==i)return i}return!0}_consume(e,t){const i=ze(t)?t:[t],n=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){if(n.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))n.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const i=ze(t)?t:[t],n=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){!1===n.get(t)&&n.set(t,!0)}else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class Ta{constructor(){this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",(e,t)=>{t[0]=new Pa(t[0])},{priority:"highest"}),this.on("checkChild",(e,t)=>{t[0]=new Pa(t[0]),t[1]=this.getDefinition(t[1])},{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new ki.b("schema-cannot-register-item-twice: A single item cannot be registered twice in the schema.",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new ki.b("schema-cannot-extend-missing-item: Cannot extend an item which was not registered yet.",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:e.is&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!t&&!(!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!!t&&!(!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!!t&&!(!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const i=this.getDefinition(e.last);return!!i&&i.allowAttributes.includes(t)}checkMerge(e,t=null){if(e instanceof zs){const t=e.nodeBefore,i=e.nodeAfter;if(!(t instanceof Ns))throw new ki.b("schema-check-merge-no-element-before: The node before the merge position must be an element.",this);if(!(i instanceof Ns))throw new ki.b("schema-check-merge-no-element-after: The node after the merge position must be an element.",this);return this.checkMerge(t,i)}for(const i of t.getChildren())if(!this.checkChild(e,i))return!1;return!0}addChildCheck(e){this.on("checkChild",(t,[i,n])=>{if(!n)return;const o=e(i,n);"boolean"==typeof o&&(t.stop(),t.return=o)},{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",(t,[i,n])=>{const o=e(i,n);"boolean"==typeof o&&(t.stop(),t.return=o)},{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;if(e instanceof zs)t=e.parent;else{t=(e instanceof js?[e]:Array.from(e.getRanges())).reduce((e,t)=>{const i=t.getCommonAncestor();return e?e.getCommonAncestor(i,{includeSelf:!0}):i},null)}for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const i=[...e.getFirstPosition().getAncestors(),new Es("",e.getAttributes())];return this.checkAttribute(i,t)}{const i=e.getRanges();for(const e of i)for(const i of e)if(this.checkAttribute(i.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const i of e)yield*this._getValidRangesForRange(i,t)}getNearestSelectionRange(e,t="both"){if(this.checkChild(e,"$text"))return new js(e);let i,n;const o=e.getAncestors().reverse().find(e=>this.isLimit(e))||e.root;"both"!=t&&"backward"!=t||(i=new Rs({boundaries:js._createIn(o),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(n=new Rs({boundaries:js._createIn(o),startPosition:e}));for(const e of function*(e,t){let i=!1;for(;!i;){if(i=!0,e){const t=e.next();t.done||(i=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(i=!1,yield{walker:t,value:e.value})}}}(i,n)){const t=e.walker==i?"elementEnd":"elementStart",n=e.value;if(n.type==t&&this.isObject(n.item))return js._createOn(n.item);if(this.checkChild(n.nextPosition,"$text"))return new js(n.nextPosition)}return null}findAllowedParent(e,t){let i=e.parent;for(;i;){if(this.checkChild(i,t))return i;if(this.isLimit(i))return null;i=i.parent}return null}removeDisallowedAttributes(e,t){for(const i of e)if(i.is("$text"))Va(this,i,t);else{const e=js._createIn(i).getPositions();for(const i of e){Va(this,i.nodeBefore||i.parent,t)}}}createContext(e){return new Pa(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,i=Object.keys(t);for(const n of i)e[n]=Sa(t[n],n);for(const t of i)Ea(e,t);for(const t of i)Ma(e,t);for(const t of i)Ia(e,t),Na(e,t);for(const t of i)Ra(e,t),Oa(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,i=t.length-1){const n=t.getItem(i);if(e.allowIn.includes(n.name)){if(0==i)return!0;{const e=this.getDefinition(n);return this._checkContextMatch(e,t,i-1)}}return!1}*_getValidRangesForRange(e,t){let i=e.start,n=e.start;for(const o of e.getItems({shallow:!0}))o.is("element")&&(yield*this._getValidRangesForRange(js._createIn(o),t)),this.checkAttribute(o,t)||(i.isEqual(n)||(yield new js(i,n)),i=zs._createAfter(o)),n=zs._createAfter(o);i.isEqual(n)||(yield new js(i,n))}}Mi(Ta,Jn);class Pa{constructor(e){if(e instanceof Pa)return e;"string"==typeof e?e=[e]:Array.isArray(e)||(e=e.getAncestors({includeSelf:!0})),e[0]&&"string"!=typeof e[0]&&e[0].is("documentFragment")&&e.shift(),this._items=e.map(La)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new Pa([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map(e=>e.name)}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function Sa(e,t){const i={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],inheritTypesFrom:[]};return function(e,t){for(const i of e){const e=Object.keys(i).filter(e=>e.startsWith("is"));for(const n of e)t[n]=i[n]}}(e,i),za(e,i,"allowIn"),za(e,i,"allowContentOf"),za(e,i,"allowWhere"),za(e,i,"allowAttributes"),za(e,i,"allowAttributesOf"),za(e,i,"inheritTypesFrom"),function(e,t){for(const i of e){const e=i.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,i),i}function Ea(e,t){for(const i of e[t].allowContentOf)if(e[i]){Da(e,i).forEach(e=>{e.allowIn.push(t)})}delete e[t].allowContentOf}function Ma(e,t){for(const i of e[t].allowWhere){const n=e[i];if(n){const i=n.allowIn;e[t].allowIn.push(...i)}}delete e[t].allowWhere}function Ia(e,t){for(const i of e[t].allowAttributesOf){const n=e[i];if(n){const i=n.allowAttributes;e[t].allowAttributes.push(...i)}}delete e[t].allowAttributesOf}function Na(e,t){const i=e[t];for(const t of i.inheritTypesFrom){const n=e[t];if(n){const e=Object.keys(n).filter(e=>e.startsWith("is"));for(const t of e)t in i||(i[t]=n[t])}}delete i.inheritTypesFrom}function Ra(e,t){const i=e[t],n=i.allowIn.filter(t=>e[t]);i.allowIn=Array.from(new Set(n))}function Oa(e,t){const i=e[t];i.allowAttributes=Array.from(new Set(i.allowAttributes))}function za(e,t,i){for(const n of e)"string"==typeof n[i]?t[i].push(n[i]):Array.isArray(n[i])&&t[i].push(...n[i])}function Da(e,t){const i=e[t];return(n=e,Object.keys(n).map(e=>n[e])).filter(e=>e.allowIn.includes(i.name));var n}function La(e){return"string"==typeof e?{name:e,*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function Va(e,t,i){for(const n of t.getAttributeKeys())e.checkAttribute(t,n)||i.removeAttribute(n,t)}class ja{constructor(e={}){this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this.conversionApi=Object.assign({},e),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this),this.conversionApi.safeInsert=this._safeInsert.bind(this),this.conversionApi.updateConversionResult=this._updateConversionResult.bind(this),this.conversionApi.splitToAllowedParent=this._splitToAllowedParent.bind(this),this.conversionApi.getSplitParts=this._getSplitParts.bind(this)}convert(e,t,i=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let i;for(const n of new Pa(e)){const e={};for(const t of n.getAttributeKeys())e[t]=n.getAttribute(t);const o=t.createElement(n.name,e);i&&t.append(o,i),i=zs._createAt(o,0)}return i}(i,t),this.conversionApi.writer=t,this.conversionApi.consumable=Aa.createFrom(e),this.conversionApi.store={};const{modelRange:n}=this._convertItem(e,this._modelCursor),o=t.createDocumentFragment();if(n){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,o);o.markers=function(e,t){const i=new Set,n=new Map,o=js._createIn(e).getItems();for(const e of o)"$marker"==e.name&&i.add(e);for(const e of i){const i=e.getAttribute("data-name"),o=t.createPositionBefore(e);n.has(i)?n.get(i).end=o.clone():n.set(i,new js(o.clone())),t.remove(e)}return n}(o,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,o}_convertItem(e,t){const i=Object.assign({viewItem:e,modelCursor:t,modelRange:null});if(e.is("element")?this.fire("element:"+e.name,i,this.conversionApi):e.is("$text")?this.fire("text",i,this.conversionApi):this.fire("documentFragment",i,this.conversionApi),i.modelRange&&!(i.modelRange instanceof js))throw new ki.b("view-conversion-dispatcher-incorrect-result: Incorrect conversion result was dropped.",this);return{modelRange:i.modelRange,modelCursor:i.modelCursor}}_convertChildren(e,t){let i=t.is("position")?t:zs._createAt(t,0);const n=new js(i);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,i);e.modelRange instanceof js&&(n.end=e.modelRange.end,i=e.modelCursor)}return{modelRange:n,modelCursor:i}}_safeInsert(e,t){const i=this._splitToAllowedParent(e,t);return!!i&&(this.conversionApi.writer.insert(e,i.position),!0)}_updateConversionResult(e,t){const i=this._getSplitParts(e),n=this.conversionApi.writer;t.modelRange||(t.modelRange=n.createRange(n.createPositionBefore(e),n.createPositionAfter(i[i.length-1])));const o=this._cursorParents.get(e);t.modelCursor=o?n.createPositionAt(o,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:i,writer:n}=this.conversionApi;let o=i.findAllowedParent(t,e);if(o){if(o===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(o)&&(o=null)}if(!o)return ma(t,e,i)?{position:fa(t,n)}:null;const r=this.conversionApi.writer.split(t,o),s=[];for(const e of r.range.getWalker())if("elementEnd"==e.type)s.push(e.item);else{const t=s.pop(),i=e.item;this._registerSplitPair(t,i)}const a=r.range.end.parent;return this._cursorParents.set(e,a),{position:r.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const i=this._splitParts.get(e);this._splitParts.set(t,i),i.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}Mi(ja,yi);class Ba{constructor(e,t){this.model=e,this.stylesProcessor=t,this.processor,this.mapper=new Bs,this.downcastDispatcher=new Us({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",(e,t,i)=>{if(!i.consumable.consume(t.item,"insert"))return;const n=i.writer,o=i.mapper.toViewPosition(t.range.start),r=n.createText(t.item.data);n.insert(o,r)},{priority:"lowest"}),this.upcastDispatcher=new ja({schema:e.schema}),this.viewDocument=new mo(t),this._viewWriter=new Lo(this.viewDocument),this.upcastDispatcher.on("text",(e,t,{schema:i,consumable:n,writer:o})=>{let r=t.modelCursor;if(!n.test(t.viewItem))return;if(!i.checkChild(r,"$text")){if(!ma(r,"$text",i))return;r=fa(r,o)}n.consume(t.viewItem);const s=o.createText(t.viewItem.data);o.insert(s,r),t.modelRange=o.createRange(r,r.getShiftedBy(s.offsetSize)),t.modelCursor=t.modelRange.end},{priority:"lowest"}),this.upcastDispatcher.on("element",(e,t,i)=>{if(!t.modelRange&&i.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:n}=i.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=n}},{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",(e,t,i)=>{if(!t.modelRange&&i.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:n}=i.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=n}},{priority:"lowest"}),this.decorate("init"),this.decorate("set"),this.on("init",()=>{this.fire("ready")},{priority:"lowest"}),this.on("ready",()=>{this.model.enqueueChange("transparent",ua)},{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:i="empty"}=e;if(!this._checkIfRootsExists([t]))throw new ki.b("datacontroller-get-non-existent-root: Attempting to get data from a non-existing root.",this);const n=this.model.document.getRoot(t);return"empty"!==i||this.model.hasContent(n,{ignoreWhitespaces:!0})?this.stringify(n,e):""}stringify(e,t){const i=this.toView(e,t);return this.processor.toData(i)}toView(e,t){const i=this.viewDocument,n=this._viewWriter;this.mapper.clearBindings();const o=js._createIn(e),r=new Do(i);if(this.mapper.bindElements(e,r),this.downcastDispatcher.conversionApi.options=t,this.downcastDispatcher.convertInsert(o,n),!e.is("documentFragment")){const t=function(e){const t=[],i=e.root.document;if(!i)return[];const n=js._createIn(e);for(const e of i.model.markers){const i=n.getIntersection(e.getRange());i&&t.push([e.name,i])}return t}(e);for(const[e,i]of t)this.downcastDispatcher.convertMarkerAdd(e,i,n)}return delete this.downcastDispatcher.conversionApi.options,r}init(e){if(this.model.document.version)throw new ki.b("datacontroller-init-document-not-empty: Trying to set initial data to not empty document.",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new ki.b("datacontroller-init-non-existent-root: Attempting to init data on a non-existing root.",this);return this.model.enqueueChange("transparent",e=>{for(const i of Object.keys(t)){const n=this.model.document.getRoot(i);e.insert(this.parse(t[i],n),n,0)}}),Promise.resolve()}set(e){let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new ki.b("datacontroller-set-non-existent-root: Attempting to set data on a non-existing root.",this);this.model.enqueueChange("transparent",e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const i of Object.keys(t)){const n=this.model.document.getRoot(i);e.remove(e.createRangeIn(n)),e.insert(this.parse(t[i],n),n,0)}})}parse(e,t="$root"){const i=this.processor.toView(e);return this.toModel(i,t)}toModel(e,t="$root"){return this.model.change(i=>this.upcastDispatcher.convert(e,i,t))}addStyleProcessorRules(e){e(this.stylesProcessor)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRootNames().includes(t))return!1;return!0}}Mi(Ba,Jn);class Fa{constructor(e,t){this._helpers=new Map,this._downcast=Array.isArray(e)?e:[e],this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=Array.isArray(t)?t:[t],this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const i=this._downcast.includes(t);if(!this._upcast.includes(t)&&!i)throw new ki.b("conversion-add-alias-dispatcher-not-registered: Trying to register and alias for a dispatcher that nas not been registered.",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:i})}for(e){if(!this._helpers.has(e))throw new ki.b("conversion-for-unknown-group: Trying to add a converter to an unknown dispatchers group.",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:i}of Ha(e))this.for("upcast").elementToElement({model:t,view:i,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:i}of Ha(e))this.for("upcast").elementToAttribute({view:i,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:i}of Ha(e))this.for("upcast").attributeToAttribute({view:i,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:i}){if(this._helpers.has(e))throw new ki.b("conversion-group-exists: Trying to register a group name that has already been registered.",this);const n=i?new ra(t):new ga(t);this._helpers.set(e,n)}}function*Ha(e){if(e.model.values)for(const t of e.model.values){const i={key:e.model.key,value:t},n=e.view[t],o=e.upcastAlso?e.upcastAlso[t]:void 0;yield*Ua(i,n,o)}else yield*Ua(e.model,e.view,e.upcastAlso)}function*Ua(e,t,i){if(yield{model:e,view:t},i){i=Array.isArray(i)?i:[i];for(const t of i)yield{model:e,view:t}}}class Wa{constructor(e="default"){this.operations=[],this.type=e}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}class qa{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e){return new this(e.baseVersion)}}class $a{constructor(e){this.markers=new Map,this._children=new Is,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(e){return"documentFragment"===e||"model:documentFragment"===e}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const i of e)t=t.getChild(t.offsetToIndex(i));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const i of e)i.name?t.push(Ns.fromJSON(i)):t.push(Es.fromJSON(i));return new $a(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const i=function(e){if("string"==typeof e)return[new Es(e)];Ei(e)||(e=[e]);return Array.from(e).map(e=>"string"==typeof e?new Es(e):e instanceof Ms?new Es(e.data,e.getAttributes()):e)}(t);for(const e of i)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,i)}_removeChildren(e,t=1){const i=this._children._removeNodes(e,t);for(const e of i)e.parent=null;return i}}function Ya(e,t){const i=(t=Ja(t)).reduce((e,t)=>e+t.offsetSize,0),n=e.parent;Za(e);const o=e.index;return n._insertChild(o,t),Qa(n,o+t.length),Qa(n,o),new js(e,e.getShiftedBy(i))}function Ga(e){if(!e.isFlat)throw new ki.b("operation-utils-remove-range-not-flat: Trying to remove a range which starts and ends in different element.",this);const t=e.start.parent;Za(e.start),Za(e.end);const i=t._removeChildren(e.start.index,e.end.index-e.start.index);return Qa(t,e.start.index),i}function Ka(e,t){if(!e.isFlat)throw new ki.b("operation-utils-move-range-not-flat: Trying to move a range which starts and ends in different element.",this);const i=Ga(e);return Ya(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),i)}function Ja(e){const t=[];e instanceof Array||(e=[e]);for(let i=0;ie.maxOffset)throw new ki.b("move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.",this);if(e===t&&i=i&&this.targetPosition.path[e]e._clone(!0))),t=new oc(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new zs(e,[0]);return new nc(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffsete._clone(!0))),Ya(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const i=[];for(const t of e.nodes)t.name?i.push(Ns.fromJSON(t)):i.push(Es.fromJSON(t));const n=new oc(zs.fromJSON(e.position,t),i,e.baseVersion);return n.shouldReceiveAttributes=e.shouldReceiveAttributes,n}}class rc extends qa{constructor(e,t,i,n,o,r){super(r),this.name=e,this.oldRange=t?t.clone():null,this.newRange=i?i.clone():null,this.affectsData=o,this._markers=n}get type(){return"marker"}clone(){return new rc(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new rc(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){const e=this.newRange?"_set":"_remove";this._markers[e](this.name,this.newRange,!0,this.affectsData)}toJSON(){const e=super.toJSON();return this.oldRange&&(e.oldRange=this.oldRange.toJSON()),this.newRange&&(e.newRange=this.newRange.toJSON()),delete e._markers,e}static get className(){return"MarkerOperation"}static fromJSON(e,t){return new rc(e.name,e.oldRange?js.fromJSON(e.oldRange,t):null,e.newRange?js.fromJSON(e.newRange,t):null,t.model.markers,e.affectsData,e.baseVersion)}}class sc extends qa{constructor(e,t,i,n){super(n),this.position=e,this.position.stickiness="toNext",this.oldName=t,this.newName=i}get type(){return"rename"}clone(){return new sc(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new sc(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof Ns))throw new ki.b("rename-operation-wrong-position: Given position is invalid or node after it is not an instance of Element.",this);if(e.name!==this.oldName)throw new ki.b("rename-operation-wrong-name: Element to change has different name than operation's old name.",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e}static get className(){return"RenameOperation"}static fromJSON(e,t){return new sc(zs.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}class ac extends qa{constructor(e,t,i,n,o){super(o),this.root=e,this.key=t,this.oldValue=i,this.newValue=n}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new ac(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new ac(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new ki.b("rootattribute-operation-not-a-root: The element to change is not a root element.",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new ki.b("rootattribute-operation-wrong-old-value: Changed node has different attribute value than operation's old attribute value.",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new ki.b("rootattribute-operation-attribute-exists: The attribute with given key already exists.",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const e=super.toJSON();return e.root=this.root.toJSON(),e}static get className(){return"RootAttributeOperation"}static fromJSON(e,t){if(!t.getRoot(e.root))throw new ki.b("rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.",this,{rootName:e.root});return new ac(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}class cc extends qa{constructor(e,t,i,n,o){super(o),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=t,this.targetPosition=i.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=n.clone()}get type(){return"merge"}get deletionPosition(){return new zs(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new js(this.sourcePosition,e)}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),t=this.sourcePosition.path.slice(0,-1),i=new zs(this.sourcePosition.root,t)._getTransformedByMergeOperation(this),n=new lc(e,this.howMany,this.graveyardPosition,this.baseVersion+1);return n.insertionPosition=i,n}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent;if(!e.parent)throw new ki.b("merge-operation-source-position-invalid: Merge source position is invalid.",this);if(!t.parent)throw new ki.b("merge-operation-target-position-invalid: Merge target position is invalid.",this);if(this.howMany!=e.maxOffset)throw new ki.b("merge-operation-how-many-invalid: Merge operation specifies wrong number of nodes to move.",this)}_execute(){const e=this.sourcePosition.parent;Ka(js._createIn(e),this.targetPosition),Ka(js._createOn(e),this.graveyardPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=e.sourcePosition.toJSON(),e.targetPosition=e.targetPosition.toJSON(),e.graveyardPosition=e.graveyardPosition.toJSON(),e}static get className(){return"MergeOperation"}static fromJSON(e,t){const i=zs.fromJSON(e.sourcePosition,t),n=zs.fromJSON(e.targetPosition,t),o=zs.fromJSON(e.graveyardPosition,t);return new this(i,e.howMany,n,o,e.baseVersion)}}class lc extends qa{constructor(e,t,i,n){super(n),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=lc.getInsertionPosition(e),this.insertionPosition.stickiness="toNone",this.graveyardPosition=i?i.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new zs(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new js(this.splitPosition,e)}clone(){const e=new this.constructor(this.splitPosition,this.howMany,this.graveyardPosition,this.baseVersion);return e.insertionPosition=this.insertionPosition,e}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new zs(e,[0]);return new cc(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof js)for(const i of e.getItems())t(i);else t(e)}move(e,t,i){if(this._assertWriterUsedCorrectly(),!(e instanceof js))throw new ki.b("writer-move-invalid-range: Invalid range to move.",this);if(!e.isFlat)throw new ki.b("writer-move-range-not-flat: Range to move is not flat.",this);const n=zs._createAt(t,i);if(n.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!pc(e.root,n.root))throw new ki.b("writer-move-different-document: Range is going to be moved between different documents.",this);const o=e.root.document?e.root.document.version:null,r=new nc(e.start,e.end.offset-e.start.offset,n,o);this.batch.addOperation(r),this.model.applyOperation(r)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof js?e:js._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),gc(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,i=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof Ns))throw new ki.b("writer-merge-no-element-before: Node before merge position must be an element.",this);if(!(i instanceof Ns))throw new ki.b("writer-merge-no-element-after: Node after merge position must be an element.",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,i){return this.model.createPositionFromPath(e,t,i)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(e,t,i){return this.model.createSelection(e,t,i)}_mergeDetached(e){const t=e.nodeBefore,i=e.nodeAfter;this.move(js._createIn(i),zs._createAt(t,"end")),this.remove(i)}_merge(e){const t=zs._createAt(e.nodeBefore,"end"),i=zs._createAt(e.nodeAfter,0),n=e.root.document.graveyard,o=new zs(n,[0]),r=e.root.document.version,s=new cc(i,e.nodeAfter.maxOffset,t,o,r);this.batch.addOperation(s),this.model.applyOperation(s)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof Ns))throw new ki.b("writer-rename-not-element-instance: Trying to rename an object which is not an instance of Element.",this);const i=e.root.document?e.root.document.version:null,n=new sc(zs._createBefore(e),e.name,t,i);this.batch.addOperation(n),this.model.applyOperation(n)}split(e,t){this._assertWriterUsedCorrectly();let i,n,o=e.parent;if(!o.parent)throw new ki.b("writer-split-element-no-parent: Element with no parent can not be split.",this);if(t||(t=o.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new ki.b("writer-split-invalid-limit-element: Limit element is not a position ancestor.",this);do{const t=o.root.document?o.root.document.version:null,r=o.maxOffset-e.offset,s=new lc(e,r,null,t);this.batch.addOperation(s),this.model.applyOperation(s),i||n||(i=o,n=e.parent.nextSibling),o=(e=this.createPositionAfter(e.parent)).parent}while(o!==t);return{position:e,range:new js(zs._createAt(i,"end"),zs._createAt(n,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new ki.b("writer-wrap-range-not-flat: Range to wrap is not flat.",this);const i=t instanceof Ns?t:new Ns(t);if(i.childCount>0)throw new ki.b("writer-wrap-element-not-empty: Element to wrap with is not empty.",this);if(null!==i.parent)throw new ki.b("writer-wrap-element-attached: Element to wrap with is already attached to tree model.",this);this.insert(i,e.start);const n=new js(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(n,zs._createAt(i,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new ki.b("writer-unwrap-element-no-parent: Trying to unwrap an element which has no parent.",this);this.move(js._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new ki.b("writer-addMarker-no-usingOperation: The options.usingOperation parameter is required when adding a new marker.",this);const i=t.usingOperation,n=t.range,o=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new ki.b("writer-addMarker-marker-exists: Marker with provided name already exists.",this);if(!n)throw new ki.b("writer-addMarker-no-range: Range parameter is required when adding a new marker.",this);return i?(fc(this,e,null,n,o),this.model.markers.get(e)):this.model.markers._set(e,n,i,o)}updateMarker(e,t){this._assertWriterUsedCorrectly();const i="string"==typeof e?e:e.name,n=this.model.markers.get(i);if(!n)throw new ki.b("writer-updateMarker-marker-not-exists: Marker with provided name does not exists.",this);if(!t)return void this.model.markers._refresh(n);const o="boolean"==typeof t.usingOperation,r="boolean"==typeof t.affectsData,s=r?t.affectsData:n.affectsData;if(!o&&!t.range&&!r)throw new ki.b("writer-updateMarker-wrong-options: One of the options is required - provide range, usingOperations or affectsData.",this);const a=n.getRange(),c=t.range?t.range:a;o&&t.usingOperation!==n.managedUsingOperations?t.usingOperation?fc(this,i,null,c,s):(fc(this,i,a,null,s),this.model.markers._set(i,c,void 0,s)):n.managedUsingOperations?fc(this,i,a,c,s):this.model.markers._set(i,c,void 0,s)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new ki.b("writer-removeMarker-no-marker: Trying to remove marker which does not exist.",this);const i=this.model.markers.get(t);if(!i.managedUsingOperations)return void this.model.markers._remove(t);fc(this,t,i.getRange(),null,i.affectsData)}setSelection(e,t,i){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(e,t,i)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,i]of Ui(e))this._setSelectionAttribute(t,i)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const i=this.model.document.selection;if(i.isCollapsed&&i.anchor.parent.isEmpty){const n=ea._getStoreAttributeKey(e);this.setAttribute(n,t,i.anchor.parent)}i._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const i=ea._getStoreAttributeKey(e);this.removeAttribute(i,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new ki.b("writer-incorrect-use: Trying to use a writer outside the change() block.",this)}_addOperationForAffectedMarkers(e,t){for(const i of this.model.markers){if(!i.managedUsingOperations)continue;const n=i.getRange();let o=!1;if("move"===e)o=t.containsPosition(n.start)||t.start.isEqual(n.start)||t.containsPosition(n.end)||t.end.isEqual(n.end);else{const e=t.nodeBefore,i=t.nodeAfter,r=n.start.parent==e&&n.start.isAtEnd,s=n.end.parent==i&&0==n.end.offset,a=n.end.nodeAfter==i,c=n.start.nodeAfter==i;o=r||s||a||c}o&&this.updateMarker(i.name,{range:n})}}}function uc(e,t,i,n){const o=e.model,r=o.document;let s,a,c,l=n.start;for(const e of n.getWalker({shallow:!0}))c=e.item.getAttribute(t),s&&a!=c&&(a!=i&&d(),l=s),s=e.nextPosition,a=c;function d(){const n=new js(l,s),c=n.root.document?r.version:null,d=new tc(n,t,a,i,c);e.batch.addOperation(d),o.applyOperation(d)}s instanceof zs&&s!=l&&a!=i&&d()}function mc(e,t,i,n){const o=e.model,r=o.document,s=n.getAttribute(t);let a,c;if(s!=i){if(n.root===n){const e=n.document?r.version:null;c=new ac(n,t,s,i,e)}else{a=new js(zs._createBefore(n),e.createPositionAfter(n));const o=a.root.document?r.version:null;c=new tc(a,t,s,i,o)}e.batch.addOperation(c),o.applyOperation(c)}}function fc(e,t,i,n,o){const r=e.model,s=r.document,a=new rc(t,i,n,r.markers,o,s.version);e.batch.addOperation(a),r.applyOperation(a)}function gc(e,t,i,n){let o;if(e.root.document){const i=n.document,r=new zs(i.graveyard,[0]);o=new nc(e,t,r,i.version)}else o=new ic(e,t);i.addOperation(o),n.applyOperation(o)}function pc(e,t){return e===t||e instanceof dc&&t instanceof dc}class bc{constructor(e){this._markerCollection=e,this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize);const t=js._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getRange();this.bufferMarkerChange(e.name,t,t,e.affectsData)}this._cachedChanges=null}bufferOperation(e){switch(e.type){case"insert":if(this._isInInsertedElement(e.position.parent))return;this._markInsert(e.position.parent,e.position.offset,e.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const t of e.range.getItems({shallow:!0}))this._isInInsertedElement(t.parent)||this._markAttribute(t);break;case"remove":case"move":case"reinsert":{if(e.sourcePosition.isEqual(e.targetPosition)||e.sourcePosition.getShiftedBy(e.howMany).isEqual(e.targetPosition))return;const t=this._isInInsertedElement(e.sourcePosition.parent),i=this._isInInsertedElement(e.targetPosition.parent);t||this._markRemove(e.sourcePosition.parent,e.sourcePosition.offset,e.howMany),i||this._markInsert(e.targetPosition.parent,e.getMovedRangeStart().offset,e.howMany);break}case"rename":{if(this._isInInsertedElement(e.position.parent))return;this._markRemove(e.position.parent,e.position.offset,1),this._markInsert(e.position.parent,e.position.offset,1);const t=js._createFromPositionAndShift(e.position,1);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getRange();this.bufferMarkerChange(e.name,t,t,e.affectsData)}break}case"split":{const t=e.splitPosition.parent;this._isInInsertedElement(t)||this._markRemove(t,e.splitPosition.offset,e.howMany),this._isInInsertedElement(e.insertionPosition.parent)||this._markInsert(e.insertionPosition.parent,e.insertionPosition.offset,1),e.graveyardPosition&&this._markRemove(e.graveyardPosition.parent,e.graveyardPosition.offset,1);break}case"merge":{const t=e.sourcePosition.parent;this._isInInsertedElement(t.parent)||this._markRemove(t.parent,t.startOffset,1);const i=e.graveyardPosition.parent;this._markInsert(i,e.graveyardPosition.offset,1);const n=e.targetPosition.parent;this._isInInsertedElement(n)||this._markInsert(n,e.targetPosition.offset,t.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(e,t,i,n){const o=this._changedMarkers.get(e);o?(o.newRange=i,o.affectsData=n,null==o.oldRange&&null==o.newRange&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{oldRange:t,newRange:i,affectsData:n})}getMarkersToRemove(){const e=[];for(const[t,i]of this._changedMarkers)null!=i.oldRange&&e.push({name:t,range:i.oldRange});return e}getMarkersToAdd(){const e=[];for(const[t,i]of this._changedMarkers)null!=i.newRange&&e.push({name:t,range:i.newRange});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map(e=>({name:e[0],data:{oldRange:e[1].oldRange,newRange:e[1].newRange}}))}hasDataChanges(){for(const[,e]of this._changedMarkers)if(e.affectsData)return!0;return this._changesInElement.size>0}getChanges(e={includeChangesInGraveyard:!1}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();const t=[];for(const e of this._changesInElement.keys()){const i=this._changesInElement.get(e).sort((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offsete.position.root!=t.position.root?e.position.root.rootNamei.offset){if(n>o){const e={type:"attribute",offset:o,howMany:n-o,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=i.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=i.offset&&e.offseto?(e.nodesToHandle=n-o,e.offset=o):e.nodesToHandle=0);if("remove"==i.type&&e.offseti.offset){const o={type:"attribute",offset:i.offset,howMany:n-i.offset,count:this._changeCount++};this._handleChange(o,t),t.push(o),e.nodesToHandle=i.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==i.type&&(e.offset>=i.offset&&n<=o?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=i.offset&&n>=o&&(i.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,i){return{type:"insert",position:zs._createAt(e,t),name:i,length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,i){return{type:"remove",position:zs._createAt(e,t),name:i,length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,i){const n=[];i=new Map(i);for(const[o,r]of t){const t=i.has(o)?i.get(o):null;t!==r&&n.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:o,attributeOldValue:r,attributeNewValue:t,changeCount:this._changeCount++}),i.delete(o)}for(const[t,o]of i)n.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:o,changeCount:this._changeCount++});return n}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const i=this._changesInElement.get(t),n=e.startOffset;if(i)for(const e of i)if("insert"==e.type&&n>=e.offset&&nn){for(let t=0;t{const i=t[0];if(i.isDocumentOperation&&i.baseVersion!==this.version)throw new ki.b("model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.",this,{operation:i})},{priority:"highest"}),this.listenTo(e,"applyOperation",(e,t)=>{const i=t[0];i.isDocumentOperation&&this.differ.bufferOperation(i)},{priority:"high"}),this.listenTo(e,"applyOperation",(e,t)=>{const i=t[0];i.isDocumentOperation&&(this.version++,this.history.addOperation(i))},{priority:"low"}),this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(e.markers,"update",(e,t,i,n)=>{this.differ.bufferMarkerChange(t.name,i,n,t.affectsData),null===i&&t.on("change",(e,i)=>{this.differ.bufferMarkerChange(t.name,i,t.getRange(),t.affectsData)})})}get graveyard(){return this.getRoot(Ac)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new ki.b("model-document-createRoot-name-exists: Root with specified name already exists.",this,{name:t});const i=new dc(this,e,t);return this.roots.add(i),i}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(){return Array.from(this.roots,e=>e.rootName).filter(e=>e!=Ac)}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=ji(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,i=t.schema,n=t.createPositionFromPath(e,[0]);return i.getNearestSelectionRange(n)||t.createRange(n)}_validateSelectionRange(e){return Tc(e.start)&&Tc(e.end)}_callPostFixers(e){let t=!1;do{for(const i of this._postFixers)if(this.selection.refresh(),t=i(e),t)break}while(t)}}function Tc(e){const t=e.textNode;if(t){const i=t.data,n=e.offset-t.startOffset;return!yc(i,n)&&!xc(i,n)}return!0}Mi(Cc,yi);class Pc{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){return this._markers.has(e)}get(e){return this._markers.get(e)||null}_set(e,t,i=!1,n=!1){const o=e instanceof Sc?e.name:e;if(o.includes(","))throw new ki.b('markercollection-incorrect-marker-name: Marker name cannot contain the "," character.',this);const r=this._markers.get(o);if(r){const e=r.getRange();let s=!1;return e.isEqual(t)||(r._attachLiveRange(Js.fromRange(t)),s=!0),i!=r.managedUsingOperations&&(r._managedUsingOperations=i,s=!0),"boolean"==typeof n&&n!=r.affectsData&&(r._affectsData=n,s=!0),s&&this.fire("update:"+o,r,e,t),r}const s=Js.fromRange(t),a=new Sc(o,s,i,n);return this._markers.set(o,a),this.fire("update:"+o,a,null,t),a}_remove(e){const t=e instanceof Sc?e.name:e,i=this._markers.get(t);return!!i&&(this._markers.delete(t),this.fire("update:"+t,i,i.getRange(),null),this._destroyMarker(i),!0)}_refresh(e){const t=e instanceof Sc?e.name:e,i=this._markers.get(t);if(!i)throw new ki.b("markercollection-refresh-marker-not-exists: Marker with provided name does not exists.",this);const n=i.getRange();this.fire("update:"+t,i,n,n,i.managedUsingOperations,i.affectsData)}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}Mi(Pc,yi);class Sc{constructor(e,t,i,n){this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=i,this._affectsData=n}get managedUsingOperations(){if(!this._liveRange)throw new ki.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new ki.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._affectsData}getStart(){if(!this._liveRange)throw new ki.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new ki.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new ki.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.toRange()}is(e){return"marker"===e||"model:marker"===e}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}Mi(Sc,yi);class Ec extends qa{get type(){return"noop"}clone(){return new Ec(this.baseVersion)}getReversed(){return new Ec(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}const Mc={};Mc[tc.className]=tc,Mc[oc.className]=oc,Mc[rc.className]=rc,Mc[nc.className]=nc,Mc[Ec.className]=Ec,Mc[qa.className]=qa,Mc[sc.className]=sc,Mc[ac.className]=ac,Mc[lc.className]=lc,Mc[cc.className]=cc;class Ic extends zs{constructor(e,t,i="toNone"){if(super(e,t,i),!this.root.is("rootElement"))throw new ki.b("model-liveposition-root-not-rootelement: LivePosition's root has to be an instance of RootElement.",e);Nc.call(this)}detach(){this.stopListening()}is(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e}toPosition(){return new zs(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,t){return new this(e.root,e.path.slice(),t||e.stickiness)}}function Nc(){this.listenTo(this.root.document.model,"applyOperation",(e,t)=>{const i=t[0];i.isDocumentOperation&&Rc.call(this,i)},{priority:"low"})}function Rc(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}Mi(Ic,yi);class Oc{constructor(e,t,i){this.model=e,this.writer=t,this.position=i,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}handleNodes(e,t){e=Array.from(e);for(let i=0;i{if(!i.doNotResetEntireContent&&function(e,t){const i=e.getLimitElement(t);if(!t.containsEntireContent(i))return!1;const n=t.getFirstRange();if(n.start.parent==n.end.parent)return!1;return e.checkChild(i,"paragraph")}(o,t))return void function(e,t){const i=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(i)),Lc(e,e.createPositionAt(i,0),t)}(e,t);const[r,s]=function(e){const t=e.root.document.model,i=e.start;let n=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const i=function(e){const t=e.parent,i=t.root.document.model.schema,n=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of n){if(i.isLimit(e))return null;if(i.isBlock(e))return e}}(n);if(i&&n.isTouching(t.createPositionAt(i,0))){const i=t.createSelection(e);t.modifySelection(i,{direction:"backward"}),n=i.getLastPosition()}}return[Ic.fromPosition(i,"toPrevious"),Ic.fromPosition(n,"toNext")]}(n);n.start.isTouching(n.end)||e.remove(n),i.leaveUnmerged||(!function(e,t,i){const n=e.model;if(!Dc(e.model.schema,t,i))return;const[o,r]=function(e,t){const i=e.getAncestors(),n=t.getAncestors();let o=0;for(;i[o]&&i[o]==n[o];)o++;return[i[o],n[o]]}(t,i);!n.hasContent(o,{ignoreMarkers:!0})&&n.hasContent(r,{ignoreMarkers:!0})?function e(t,i,n,o){const r=i.parent,s=n.parent;if(r==o||s==o)return;i=t.createPositionAfter(r),(n=t.createPositionBefore(s)).isEqual(i)||t.insert(r,n);for(;i.parent.isEmpty;){const e=i.parent;i=t.createPositionBefore(e),t.remove(e)}if(n=t.createPositionBefore(s),function(e,t){const i=t.nodeBefore,n=t.nodeAfter;i.name!=n.name&&e.rename(i,n.name);e.clearAttributes(i),e.setAttributes(Object.fromEntries(n.getAttributes()),i),e.merge(t)}(t,n),!Dc(t.model.schema,i,n))return;e(t,i,n,o)}(e,t,i,o.parent):function e(t,i,n,o){const r=i.parent,s=n.parent;if(r==o||s==o)return;i=t.createPositionAfter(r),(n=t.createPositionBefore(s)).isEqual(i)||t.insert(s,i);t.merge(i);for(;n.parent.isEmpty;){const e=n.parent;n=t.createPositionBefore(e),t.remove(e)}if(!Dc(t.model.schema,i,n))return;e(t,i,n,o)}(e,t,i,o.parent)}(e,r,s),o.removeDisallowedAttributes(r.parent.getChildren(),e)),Vc(e,t,r),!i.doNotAutoparagraph&&function(e,t){const i=e.checkChild(t,"$text"),n=e.checkChild(t,"paragraph");return!i&&n}(o,r)&&Lc(e,r,t),r.detach(),s.detach()})}function Dc(e,t,i){const n=t.parent,o=i.parent;return n!=o&&(!e.isLimit(n)&&!e.isLimit(o)&&function(e,t,i){const n=new js(e,t);for(const e of n.getWalker())if(i.isLimit(e.item))return!1;return!0}(t,i,e))}function Lc(e,t,i){const n=e.createElement("paragraph");e.insert(n,t),Vc(e,i,e.createPositionAt(n,0))}function Vc(e,t,i){t instanceof ea?e.setSelection(i):t.setTo(i)}const jc=' ,.?!:;"-()';function Bc(e,t){const{isForward:i,walker:n,unit:o,schema:r}=e,{type:s,item:a,nextPosition:c}=t;if("text"==s)return"word"===e.unit?function(e,t){let i=e.position.textNode;if(i){let n=e.position.offset-i.startOffset;for(;!Hc(i.data,n,t)&&!Uc(i,n,t);){e.next();const o=t?e.position.nodeAfter:e.position.nodeBefore;if(o&&o.is("$text")){const n=o.data.charAt(t?0:o.data.length-1);jc.includes(n)||(e.next(),i=e.position.textNode)}n=e.position.offset-i.startOffset}}return e.position}(n,i):function(e,t){const i=e.position.textNode;if(i){const n=i.data;let o=e.position.offset-i.startOffset;for(;yc(n,o)||"character"==t&&xc(n,o);)e.next(),o=e.position.offset-i.startOffset}return e.position}(n,o);if(s==(i?"elementStart":"elementEnd")){if(r.isSelectable(a))return zs._createAt(a,i?"after":"before");if(r.checkChild(c,"$text"))return c}else{if(r.isLimit(a))return void n.skip(()=>!0);if(r.checkChild(c,"$text"))return c}}function Fc(e,t){const i=e.root,n=zs._createAt(i,t?"end":0);return t?new js(e,n):new js(n,e)}function Hc(e,t,i){const n=t+(i?0:-1);return jc.includes(e.charAt(n))}function Uc(e,t,i){return t===(i?e.endOffset:0)}function Wc(e,t){const i=[];Array.from(e.getItems({direction:"backward"})).map(e=>t.createRangeOn(e)).filter(t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end))).forEach(e=>{i.push(e.start.parent),t.remove(e)}),i.forEach(e=>{let i=e;for(;i.parent&&i.isEmpty;){const e=t.createRangeOn(i);i=i.parent,t.remove(e)}})}function qc(e){e.document.registerPostFixer(t=>function(e,t){const i=t.document.selection,n=t.schema,o=[];let r=!1;for(const e of i.getRanges()){const t=$c(e,n);t&&!t.isEqual(e)?(o.push(t),r=!0):o.push(e)}r&&e.setSelection(function(e){const t=[];t.push(e.shift());for(const i of e){const e=t.pop();if(i.isIntersecting(e)){const n=e.start.isAfter(i.start)?i.start:e.start,o=e.end.isAfter(i.end)?e.end:i.end,r=new js(n,o);t.push(r)}else t.push(e),t.push(i)}return t}(o),{backward:i.isBackward})}(t,e))}function $c(e,t){return e.isCollapsed?function(e,t){const i=e.start,n=t.getNearestSelectionRange(i);if(!n)return null;if(!n.isCollapsed)return n;const o=n.start;if(i.isEqual(o))return null;return new js(o)}(e,t):function(e,t){const{start:i,end:n}=e,o=t.checkChild(i,"$text"),r=t.checkChild(n,"$text"),s=t.getLimitElement(i),a=t.getLimitElement(n);if(s===a){if(o&&r)return null;if(function(e,t,i){const n=e.nodeAfter&&!i.isLimit(e.nodeAfter)||i.checkChild(e,"$text"),o=t.nodeBefore&&!i.isLimit(t.nodeBefore)||i.checkChild(t,"$text");return n||o}(i,n,t)){const e=i.nodeAfter&&t.isSelectable(i.nodeAfter)?null:t.getNearestSelectionRange(i,"forward"),o=n.nodeBefore&&t.isSelectable(n.nodeBefore)?null:t.getNearestSelectionRange(n,"backward"),r=e?e.start:i,s=o?o.start:n;return new js(r,s)}}const c=s&&!s.is("rootElement"),l=a&&!a.is("rootElement");if(c||l){const e=i.nodeAfter&&n.nodeBefore&&i.nodeAfter.parent===n.nodeBefore.parent,o=c&&(!e||!Gc(i.nodeAfter,t)),r=l&&(!e||!Gc(n.nodeBefore,t));let d=i,h=n;return o&&(d=zs._createBefore(Yc(s,t))),r&&(h=zs._createAfter(Yc(a,t))),new js(d,h)}return null}(e,t)}function Yc(e,t){let i=e,n=i;for(;t.isLimit(n)&&n.parent;)i=n,n=n.parent;return i}function Gc(e,t){return e&&t.isSelectable(e)}class Kc{constructor(){this.markers=new Pc,this.document=new Cc(this),this.schema=new Ta,this._pendingChanges=[],this._currentWriter=null,["insertContent","deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach(e=>this.decorate(e)),this.on("applyOperation",(e,t)=>{t[0]._validate()},{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$block",{allowIn:"$root",isBlock:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",isLimit:!0}),this.schema.extend("$text",{allowIn:"$clipboardHolder"}),this.schema.register("$marker"),this.schema.addChildCheck((e,t)=>{if("$marker"===t.name)return!0}),qc(this),this.document.registerPostFixer(ua)}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new Wa,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){ki.b.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{"string"==typeof e?e=new Wa(e):"function"==typeof e&&(t=e,e=new Wa),this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){ki.b.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,i){return function(e,t,i,n){return e.change(o=>{let r;r=i?i instanceof qs||i instanceof ea?i:o.createSelection(i,n):e.document.selection,r.isCollapsed||e.deleteContent(r,{doNotAutoparagraph:!0});const s=new Oc(e,o,r.anchor);let a;a=t.is("documentFragment")?t.getChildren():[t],s.handleNodes(a,{isFirst:!0,isLast:!0});const c=s.getSelectionRange();c&&(r instanceof ea?o.setSelection(c):r.setTo(c));const l=s.getAffectedRange()||e.createRange(r.anchor);return s.destroy(),l})}(this,e,t,i)}deleteContent(e,t){zc(this,e,t)}modifySelection(e,t){!function(e,t,i={}){const n=e.schema,o="backward"!=i.direction,r=i.unit?i.unit:"character",s=t.focus,a=new Rs({boundaries:Fc(s,o),singleCharacters:!0,direction:o?"forward":"backward"}),c={walker:a,schema:n,isForward:o,unit:r};let l;for(;l=a.next();){if(l.done)return;const i=Bc(c,l.value);if(i)return void(t instanceof ea?e.change(e=>{e.setSelectionFocus(i)}):t.setFocus(i))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change(e=>{const i=e.createDocumentFragment(),n=t.getFirstRange();if(!n||n.isCollapsed)return i;const o=n.start.root,r=n.start.getCommonPath(n.end),s=o.getNodeByPath(r);let a;a=n.start.parent==n.end.parent?n:e.createRange(e.createPositionAt(s,n.start.path[r.length]),e.createPositionAt(s,n.end.path[r.length]+1));const c=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),i):e.append(e.cloneElement(t,!0),i);if(a!=n){const t=n._getTransformedByMove(a.start,e.createPositionAt(i,0),c)[0],o=e.createRange(e.createPositionAt(i,0),t.start);Wc(e.createRange(t.end,e.createPositionAt(i,"end")),e),Wc(o,e)}return i})}(this,e)}hasContent(e,t={}){const i=e instanceof Ns?js._createIn(e):e;if(i.isCollapsed)return!1;const{ignoreWhitespaces:n=!1,ignoreMarkers:o=!1}=t;if(!o)for(const e of this.markers.getMarkersIntersectingRange(i))if(e.affectsData)return!0;for(const e of i.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!n)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}createPositionFromPath(e,t,i){return new zs(e,t,i)}createPositionAt(e,t){return zs._createAt(e,t)}createPositionAfter(e){return zs._createAfter(e)}createPositionBefore(e){return zs._createBefore(e)}createRange(e,t){return new js(e,t)}createRangeIn(e){return js._createIn(e)}createRangeOn(e){return js._createOn(e)}createSelection(e,t,i){return new qs(e,t,i)}createBatch(e){return new Wa(e)}createOperationFromJSON(e){return class{static fromJSON(e,t){return Mc[e.__className].fromJSON(e,t)}}.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];for(this.fire("_beforeChanges");this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new hc(this,t);const i=this._pendingChanges[0].callback(this._currentWriter);e.push(i),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return this.fire("_afterChanges"),e}}Mi(Kc,Jn);class Jc{constructor(){this._listener=Object.create(vr)}listenTo(e){this._listener.listenTo(e,"keydown",(e,t)=>{this._listener.fire("_keydown:"+Ao(t),t)})}set(e,t,i={}){const n=Co(e),o=i.priority;this._listener.listenTo(this._listener,"_keydown:"+n,(e,i)=>{t(i,()=>{i.preventDefault(),i.stopPropagation(),e.stop()}),e.return=!0},{priority:o})}press(e){return!!this._listener.fire("_keydown:"+Ao(e),e)}destroy(){this._listener.stopListening()}}class Qc extends Jc{constructor(e){super(),this.editor=e}set(e,t,i={}){if("string"==typeof t){const e=t;t=(t,i)=>{this.editor.execute(e),i()}}super.set(e,t,i)}}class Zc{constructor(e={}){this._context=e.context||new Li({language:e.language}),this._context._addEditor(this,!e.context);const t=Array.from(this.constructor.builtinPlugins||[]);this.config=new hi(e,this.constructor.defaultConfig),this.config.define("plugins",t),this.config.define(this._context._getEditorConfig()),this.plugins=new Ni(this,t,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this.commands=new xa,this.set("state","initializing"),this.once("ready",()=>this.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.set("isReadOnly",!1),this.model=new Kc;const i=new Vn;this.data=new Ba(this.model,i),this.editing=new ya(this.model,i),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new Fa([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new Qc(this),this.keystrokes.listenTo(this.editing.view.document)}initPlugins(){const e=this.config,t=e.get("plugins"),i=e.get("removePlugins")||[],n=e.get("extraPlugins")||[];return this.plugins.init(t.concat(n),i)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise(e=>this.once("ready",e))),e.then(()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()}).then(()=>this.plugins.destroy()).then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()}).then(()=>this._context._removeEditor(this))}execute(...e){try{return this.commands.execute(...e)}catch(e){ki.b.rethrowUnexpectedError(e,this)}}}Mi(Zc,Jn);var Xc={setData(e){this.data.set(e)},getData(e){return this.data.get(e)}};var el={updateSourceElement(){if(!this.sourceElement)throw new ki.b("editor-missing-sourceelement: Cannot update the source element of a detached editor.",this);var e,t;e=this.sourceElement,t=this.data.get(),e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}};class tl{getHtml(e){const t=document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class il{constructor(e){this._domParser=new DOMParser,this._domConverter=new pr(e,{blockFillerMode:"nbsp"}),this._htmlWriter=new tl}toData(e){const t=this._domConverter.viewToDom(e,document);return this._htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this._domConverter.domToView(t)}_toDom(e){const t=this._domParser.parseFromString(e,"text/html"),i=t.createDocumentFragment(),n=t.body.childNodes;for(;n.length>0;)i.appendChild(n[0]);return i}}class nl{constructor(e){this.editor=e,this._components=new Map}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(ol(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new ki.b("componentfactory-item-missing: The required component is not registered in the factory.",this,{name:e});return this._components.get(ol(e)).callback(this.editor.locale)}has(e){return this._components.has(ol(e))}}function ol(e){return String(e).toLowerCase()}class rl{constructor(){this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}add(e){if(this._elements.has(e))throw new ki.b("focusTracker-add-element-already-exist: This element is already tracked by FocusTracker.",this);this.listenTo(e,"focus",()=>this._focus(e),{useCapture:!0}),this.listenTo(e,"blur",()=>this._blur(),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(e),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}Mi(rl,vr),Mi(rl,Jn);class sl{constructor(e){this.editor=e,this.componentFactory=new nl(e),this.focusTracker=new rl,this._editableElementsMap=new Map,this.listenTo(e.editing.view.document,"layoutChanged",()=>this.update())}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null;this._editableElementsMap=new Map}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}}Mi(sl,yi);i(13);const al=new WeakMap;function cl(e){const{view:t,element:i,text:n,isDirectHost:o=!0}=e,r=t.document;al.has(r)||(al.set(r,new Map),r.registerPostFixer(e=>dl(r,e))),al.get(r).set(i,{text:n,isDirectHost:o}),t.change(e=>dl(r,e))}function ll(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function dl(e,t){const i=al.get(e);let n=!1;for(const[e,o]of i)hl(t,e,o)&&(n=!0);return n}function hl(e,t,i){const{text:n,isDirectHost:o}=i,r=o?t:function(e){if(1===e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement"))return t}return null}(t);let s=!1;return!!r&&(i.hostElement=r,r.getAttribute("data-placeholder")!==n&&(e.setAttribute("data-placeholder",n,r),s=!0),!function(e){if(!e.isAttached())return!1;const t=!Array.from(e.getChildren()).some(e=>!e.is("uiElement")),i=e.document;if(!i.isFocused&&t)return!0;const n=i.selection.anchor;return!(!t||!n||n.parent===e)}(r)?ll(e,r)&&(s=!0):function(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}(e,r)&&(s=!0),s)}class ul{constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach(({element:e,newElement:t})=>{e.style.display="",t&&t.remove()}),this._replacedElements=[]}}class ml extends sl{constructor(e,t){var i;super(e),this.view=t,this._toolbarConfig=(i=e.config.get("toolbar"),Array.isArray(i)?{items:i}:i?Object.assign({items:[]},i):{items:[]}),this._elementReplacer=new ul}get element(){return this.view.element}init(e){const t=this.editor,i=this.view,n=t.editing.view,o=i.editable,r=n.document.getRoot();o.name=r.rootName,i.render();const s=o.element;this.setEditableElement(o.name,s),this.focusTracker.add(s),i.editable.bind("isFocused").to(this.focusTracker),n.attachDomRoot(s),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.detachDomRoot(e.editable.name),e.destroy(),super.destroy()}_initToolbar(){const e=this.editor,t=this.view,i=e.editing.view;t.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),t.stickyPanel.limiterElement=t.element,this._toolbarConfig.viewportTopOffset&&(t.stickyPanel.viewportTopOffset=this._toolbarConfig.viewportTopOffset),t.toolbar.fillFromConfig(this._toolbarConfig.items,this.componentFactory),function({origin:e,originKeystrokeHandler:t,originFocusTracker:i,toolbar:n,beforeFocus:o,afterBlur:r}){i.add(n.element),t.set("Alt+F10",(e,t)=>{i.isFocused&&!n.focusTracker.isFocused&&(o&&o(),n.focus(),t())}),n.keystrokes.set("Esc",(t,i)=>{n.focusTracker.isFocused&&(e.focus(),r&&r(),i())})}({origin:i,originFocusTracker:this.focusTracker,originKeystrokeHandler:e.keystrokes,toolbar:t.toolbar})}_initPlaceholder(){const e=this.editor,t=e.editing.view,i=t.document.getRoot(),n=e.sourceElement,o=e.config.get("placeholder")||n&&"textarea"===n.tagName.toLowerCase()&&n.getAttribute("placeholder");o&&cl({view:t,element:i,text:o,isDirectHost:!1})}}class fl extends Ii{constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",(e,t,i)=>{this._renderViewIntoCollectionParent(t,i)}),this.on("remove",(e,t)=>{t.element&&this._parentElement&&t.element.remove()}),this._parentElement=null}destroy(){this.map(e=>e.destroy())}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(...e){if(!e.length||!e.every(e=>"string"==typeof e))throw new ki.b("ui-viewcollection-delegate-wrong-events: All event names must be strings.",this);return{to:t=>{for(const i of this)for(const n of e)i.delegate(n).to(t);this.on("add",(i,n)=>{for(const i of e)n.delegate(i).to(t)}),this.on("remove",(i,n)=>{for(const i of e)n.stopDelegating(i,t)})}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}}class gl{constructor(e){Object.assign(this,Cl(Al(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new ki.b("ui-template-revert-not-applied: Attempting to revert a template which has not been applied yet.",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const i of t.children)Ml(i)?yield i:Il(i)&&(yield*e(i))}(this)}static bind(e,t){return{to:(i,n)=>new bl({eventNameOrFunction:i,attribute:i,observable:e,emitter:t,callback:n}),if:(i,n,o)=>new wl({observable:e,emitter:t,attribute:i,valueIfTrue:n,callback:o})}}static extend(e,t){if(e._isRendered)throw new ki.b("template-extend-render: Attempting to extend a template which has already been rendered.",[this,e]);!function e(t,i){i.attributes&&(t.attributes||(t.attributes={}),Sl(t.attributes,i.attributes));i.eventListeners&&(t.eventListeners||(t.eventListeners={}),Sl(t.eventListeners,i.eventListeners));i.text&&t.text.push(...i.text);if(i.children&&i.children.length){if(t.children.length!=i.children.length)throw new ki.b("ui-template-extend-children-mismatch: The number of children in extended definition does not match.",t);let n=0;for(const o of i.children)e(t.children[n++],o)}}(e,Cl(Al(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new ki.b('ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering a new Node.',this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),kl(this.text)?this._bindToObservable({schema:this.text,updater:vl(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){let t,i,n,o;if(!this.attributes)return;const r=e.node,s=e.revertData;for(t in this.attributes)if(n=r.getAttribute(t),i=this.attributes[t],s&&(s.attributes[t]=n),o=L(i[0])&&i[0].ns?i[0].ns:null,kl(i)){const a=o?i[0].value:i;s&&Rl(t)&&a.unshift(n),this._bindToObservable({schema:a,updater:yl(r,t,o),data:e})}else"style"==t&&"string"!=typeof i[0]?this._renderStyleAttribute(i[0],e):(s&&n&&Rl(t)&&i.unshift(n),i=i.map(e=>e&&e.value||e).reduce((e,t)=>e.concat(t),[]).reduce(Pl,""),El(i)||r.setAttributeNS(o,t,i))}_renderStyleAttribute(e,t){const i=t.node;for(const n in e){const o=e[n];kl(o)?this._bindToObservable({schema:[o],updater:xl(i,n),data:t}):i.style[n]=o}}_renderElementChildren(e){const t=e.node,i=e.intoFragment?document.createDocumentFragment():t,n=e.isApplying;let o=0;for(const r of this.children)if(Nl(r)){if(!n){r.setParent(t);for(const e of r)i.appendChild(e.element)}}else if(Ml(r))n||(r.isRendered||r.render(),i.appendChild(r.element));else if(ar(r))i.appendChild(r);else if(n){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),r._renderNode({node:i.childNodes[o++],isApplying:!0,revertData:t})}else i.appendChild(r.render());e.intoFragment&&t.appendChild(i)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const i=this.eventListeners[t].map(i=>{const[n,o]=t.split("@");return i.activateDomEventListener(n,o,e)});e.revertData&&e.revertData.bindings.push(i)}}_bindToObservable({schema:e,updater:t,data:i}){const n=i.revertData;_l(e,t,i);const o=e.filter(e=>!El(e)).filter(e=>e.observable).map(n=>n.activateAttributeListener(e,t,i));n&&n.bindings.push(o)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)e.textContent=t.text;else{for(const i in t.attributes){const n=t.attributes[i];null===n?e.removeAttribute(i):e.setAttribute(i,n)}for(let i=0;i_l(e,t,i);return this.emitter.listenTo(this.observable,"change:"+this.attribute,n),()=>{this.emitter.stopListening(this.observable,"change:"+this.attribute,n)}}}class bl extends pl{activateDomEventListener(e,t,i){const n=(e,i)=>{t&&!i.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(i):this.observable.fire(this.eventNameOrFunction,i))};return this.emitter.listenTo(i.node,e,n),()=>{this.emitter.stopListening(i.node,e,n)}}}class wl extends pl{getValue(e){return!El(super.getValue(e))&&(this.valueIfTrue||!0)}}function kl(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(kl):e instanceof pl)}function _l(e,t,{node:i}){let n=function(e,t){return e.map(e=>e instanceof pl?e.getValue(t):e)}(e,i);n=1==e.length&&e[0]instanceof wl?n[0]:n.reduce(Pl,""),El(n)?t.remove():t.set(n)}function vl(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function yl(e,t,i){return{set(n){e.setAttributeNS(i,t,n)},remove(){e.removeAttributeNS(i,t)}}}function xl(e,t){return{set(i){e.style[t]=i},remove(){e.style[t]=null}}}function Al(e){return li(e,e=>{if(e&&(e instanceof pl||Il(e)||Ml(e)||Nl(e)))return e})}function Cl(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){Array.isArray(e.text)||(e.text=[e.text])}(e),e.on&&(e.eventListeners=function(e){for(const t in e)Tl(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=[].concat(e[t].value)),Tl(e,t)}(e.attributes);const t=[];if(e.children)if(Nl(e.children))t.push(e.children);else for(const i of e.children)Il(i)||Ml(i)||ar(i)?t.push(i):t.push(new gl(i));e.children=t}return e}function Tl(e,t){Array.isArray(e[t])||(e[t]=[e[t]])}function Pl(e,t){return El(t)?e:El(e)?t:`${e} ${t}`}function Sl(e,t){for(const i in t)e[i]?e[i].push(...t[i]):e[i]=t[i]}function El(e){return!e&&0!==e}function Ml(e){return e instanceof Ol}function Il(e){return e instanceof gl}function Nl(e){return e instanceof fl}function Rl(e){return"class"==e||"style"==e}i(15);class Ol{constructor(e){this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new Ii,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(t,i)=>{i.locale=e}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=gl.bind(this,this)}createCollection(e){const t=new fl(e);return this._viewCollections.add(t),t}registerChild(e){Ei(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){Ei(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new gl(e)}extendTemplate(e){gl.extend(this.template,e)}render(){if(this.isRendered)throw new ki.b("ui-view-render-already-rendered: This View has already been rendered.",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map(e=>e.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}Mi(Ol,vr),Mi(Ol,Jn);var zl=function(e){return"string"==typeof e||!ze(e)&&p(e)&&"[object String]"==m(e)};class Dl extends fl{constructor(e,t=[]){super(t),this.locale=e}attachToDom(){this._bodyCollectionContainer=new gl({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=function(e,t,i={},n=[]){const o=i&&i.xmlns,r=o?e.createElementNS(o,t):e.createElement(t);for(const e in i)r.setAttribute(e,i[e]);!zl(n)&&Ei(n)||(n=[n]);for(let t of n)zl(t)&&(t=e.createTextNode(t)),r.appendChild(t);return r}(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}i(17);class Ll extends Ol{constructor(e){super(e),this.body=new Dl(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}i(19);class Vl extends Ol{constructor(e){super(e),this.set("text"),this.set("for"),this.id="ck-editor__label_"+bi();const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}class jl extends Ll{constructor(e){super(e),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new Vl;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}class Bl extends Ol{constructor(e,t,i){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.name=null,this.set("isFocused",!1),this._editableElement=i,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",()=>this._updateIsFocusedClasses()),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change(i=>{const n=e.document.getRoot(t.name);i.addClass(t.isFocused?"ck-focused":"ck-blurred",n),i.removeClass(t.isFocused?"ck-blurred":"ck-focused",n)})}e.isRenderingInProgress?function i(n){e.once("change:isRenderingInProgress",(e,o,r)=>{r?i(n):t(n)})}(this):t(this)}}class Fl extends Bl{constructor(e,t,i){super(e,t,i),this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const e=this._editingView,t=this.t;e.change(i=>{const n=e.document.getRoot(this.name);i.setAttribute("aria-label",t("Rich Text Editor, %0",[this.name]),n)})}}function Hl(e){return t=>t+e}i(21);const Ul=Hl("px");class Wl extends Ol{constructor(e){super(e);const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheLimiter",!1),this.set("_hasViewportTopOffset",!1),this.content=this.createCollection(),this._contentPanelPlaceholder=new gl({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",e=>e?"block":"none"),height:t.to("isSticky",e=>e?Ul(this._panelRect.height):null)}}}).render(),this._contentPanel=new gl({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",e=>e?Ul(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:t.to("_hasViewportTopOffset",e=>e?Ul(this.viewportTopOffset):null),bottom:t.to("_isStickyToTheLimiter",e=>e?Ul(this.limiterBottomOffset):null),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this._checkIfShouldBeSticky(),this.listenTo(ur.window,"scroll",()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,"change:isActive",()=>{this._checkIfShouldBeSticky()})}_checkIfShouldBeSticky(){const e=this._panelRect=this._contentPanel.getBoundingClientRect();let t;this.limiterElement?(t=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&t.top{this[t](),i()})}}get first(){return this.focusables.find($l)||null}get last(){return this.focusables.filter($l).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((t,i)=>{const n=t.element===this.focusTracker.focusedElement;return n&&(e=i),n}),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,i=this.focusables.length;if(!i)return null;if(null===t)return this[1===e?"first":"last"];let n=(t+i+e)%i;do{const t=this.focusables.get(n);if($l(t))return t;n=(n+i+e)%i}while(n!==t);return null}}function $l(e){return!(!e.focus||"none"==ur.window.getComputedStyle(e.element).display)}class Yl extends Ol{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class Gl{constructor(e,t){Gl._observerInstance||Gl._createObserver(),this._element=e,this._callback=t,Gl._addElementCallback(e,t),Gl._observerInstance.observe(e)}destroy(){Gl._deleteElementCallback(this._element,this._callback)}static _addElementCallback(e,t){Gl._elementCallbacks||(Gl._elementCallbacks=new Map);let i=Gl._elementCallbacks.get(e);i||(i=new Set,Gl._elementCallbacks.set(e,i)),i.add(t)}static _deleteElementCallback(e,t){const i=Gl._getElementCallbacks(e);i&&(i.delete(t),i.size||(Gl._elementCallbacks.delete(e),Gl._observerInstance.unobserve(e))),Gl._elementCallbacks&&!Gl._elementCallbacks.size&&(Gl._observerInstance=null,Gl._elementCallbacks=null)}static _getElementCallbacks(e){return Gl._elementCallbacks?Gl._elementCallbacks.get(e):null}static _createObserver(){let e;e="function"==typeof ur.window.ResizeObserver?ur.window.ResizeObserver:Kl,Gl._observerInstance=new e(e=>{for(const t of e){const e=Gl._getElementCallbacks(t.target);if(e)for(const i of e)i(t)}})}}Gl._observerInstance=null,Gl._elementCallbacks=null;class Kl{constructor(e){this._callback=e,this._elements=new Set,this._previousRects=new Map,this._periodicCheckTimeout=null}observe(e){this._elements.add(e),this._checkElementRectsAndExecuteCallback(),1===this._elements.size&&this._startPeriodicCheck()}unobserve(e){this._elements.delete(e),this._previousRects.delete(e),this._elements.size||this._stopPeriodicCheck()}_startPeriodicCheck(){const e=()=>{this._checkElementRectsAndExecuteCallback(),this._periodicCheckTimeout=setTimeout(e,100)};this.listenTo(ur.window,"resize",()=>{this._checkElementRectsAndExecuteCallback()}),this._periodicCheckTimeout=setTimeout(e,100)}_stopPeriodicCheck(){clearTimeout(this._periodicCheckTimeout),this.stopListening(),this._previousRects.clear()}_checkElementRectsAndExecuteCallback(){const e=[];for(const t of this._elements)this._hasRectChanged(t)&&e.push({target:t,contentRect:this._previousRects.get(t)});e.length&&this._callback(e)}_hasRectChanged(e){if(!e.ownerDocument.body.contains(e))return!1;const t=new fs(e),i=this._previousRects.get(e),n=!i||!i.isEqual(t);return this._previousRects.set(e,t),n}}Mi(Kl,vr);class Jl extends Ol{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",e=>"ck-dropdown__panel_"+e),t.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:t.to(e=>e.preventDefault())}})}focus(){this.children.length&&this.children.first.focus()}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}i(23);function Ql({element:e,target:t,positions:i,limiter:n,fitInViewport:o}){j(t)&&(t=t()),j(n)&&(n=n());const r=function(e){return e&&e.parentNode?e.offsetParent===ur.document.body?null:e.offsetParent:null}(e),s=new fs(e),a=new fs(t);let c,l;if(n||o){const e=function(e,t){const{elementRect:i,viewportRect:n}=t,o=i.getArea(),r=function(e,{targetRect:t,elementRect:i,limiterRect:n,viewportRect:o}){const r=[],s=i.getArea();for(const a of e){const e=Zl(a,t,i);if(!e)continue;const[c,l]=e;let d=0,h=0;if(n)if(o){const e=n.getIntersection(o);e&&(d=e.getIntersectionArea(l))}else d=n.getIntersectionArea(l);o&&(h=o.getIntersectionArea(l));const u={positionName:c,positionRect:l,limiterIntersectArea:d,viewportIntersectArea:h};if(d===s)return[u];r.push(u)}return r}(e,t);if(n){const e=Xl(r.filter(({viewportIntersectArea:e})=>e===o),o);if(e)return e}return Xl(r,o)}(i,{targetRect:a,elementRect:s,limiterRect:n&&new fs(n).getVisible(),viewportRect:o&&new fs(ur.window)});[l,c]=e||Zl(i[0],a,s)}else[l,c]=Zl(i[0],a,s);let d=ed(c);return r&&(d=function({left:e,top:t},i){const n=ed(new fs(i)),o=us(i);return e-=n.left,t-=n.top,e+=i.scrollLeft,t+=i.scrollTop,e-=o.left,t-=o.top,{left:e,top:t}}(d,r)),{left:d.left,top:d.top,name:l}}function Zl(e,t,i){const n=e(t,i);if(!n)return null;const{left:o,top:r,name:s}=n;return[s,i.clone().moveTo(o,r)]}function Xl(e,t){let i,n,o=0;for(const{positionName:r,positionRect:s,limiterIntersectArea:a,viewportIntersectArea:c}of e){if(a===t)return[r,s];const e=c**2+a**2;e>o&&(o=e,i=s,n=r)}return i?[n,i]:null}function ed({left:e,top:t}){const{scrollX:i,scrollY:n}=ur.window;return{left:e+i,top:t+n}}class td extends Ol{constructor(e,t,i){super(e);const n=this.bindTemplate;this.buttonView=t,this.panelView=i,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class"),this.set("id"),this.set("panelPosition","auto"),this.keystrokes=new Jc,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",n.to("class"),n.if("isEnabled","ck-disabled",e=>!e)],id:n.to("id"),"aria-describedby":n.to("ariaDescribedById")},children:[t,i]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"]}})}render(){super.render(),this.listenTo(this.buttonView,"open",()=>{this.isOpen=!this.isOpen}),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",()=>{this.isOpen&&("auto"===this.panelPosition?this.panelView.position=td._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition)}),this.keystrokes.listenTo(this.element);const e=(e,t)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,t())};this.keystrokes.set("arrowdown",(e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())}),this.keystrokes.set("arrowright",(e,t)=>{this.isOpen&&t()}),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:e,southWest:t,northEast:i,northWest:n}=td.defaultPanelPositions;return"ltr"===this.locale.uiLanguageDirection?[e,t,i,n]:[t,e,n,i]}}td.defaultPanelPositions={southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.bottom-t.height,left:e.left-t.width+e.width,name:"nw"})},td._getOptimalPosition=Ql;i(25);class id extends Ol{constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon"],viewBox:e.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",()=>{this._updateXMLContent(),this._colorFillPaths()}),this.on("change:fillColor",()=>{this._colorFillPaths()})}_updateXMLContent(){if(this.content){const e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");for(t&&(this.viewBox=t),this.element.innerHTML="";e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach(e=>{e.style.fill=this.fillColor})}}i(27);class nd extends Ol{constructor(e){super(e),this.set("text",""),this.set("position","s");const t=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip",t.to("position",e=>"ck-tooltip_"+e),t.if("text","ck-hidden",e=>!e.trim())]},children:[{tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:t.to("text")}]}]})}}i(29);class od extends Ol{constructor(e){super(e);const t=this.bindTemplate,i=bi();this.set("class"),this.set("labelStyle"),this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.tooltipView=this._createTooltipView(),this.labelView=this._createLabelView(i),this.iconView=new id,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this)),this.setTemplate({tag:"button",attributes:{class:["ck","ck-button",t.to("class"),t.if("isEnabled","ck-disabled",e=>!e),t.if("isVisible","ck-hidden",e=>!e),t.to("isOn",e=>e?"ck-on":"ck-off"),t.if("withText","ck-button_with-text"),t.if("withKeystroke","ck-button_with-keystroke")],type:t.to("type",e=>e||"button"),tabindex:t.to("tabindex"),"aria-labelledby":"ck-editor__aria-label_"+i,"aria-disabled":t.if("isEnabled",!0,e=>!e),"aria-pressed":t.to("isOn",e=>!!this.isToggleable&&String(e))},children:this.children,on:{mousedown:t.to(e=>{e.preventDefault()}),click:t.to(e=>{this.isEnabled?this.fire("execute"):e.preventDefault()})}})}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.tooltipView),this.children.add(this.labelView),this.withKeystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}_createTooltipView(){const e=new nd;return e.bind("text").to(this,"_tooltipString"),e.bind("position").to(this,"tooltipPosition"),e}_createLabelView(e){const t=new Ol,i=this.bindTemplate;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:i.to("labelStyle"),id:"ck-editor__aria-label_"+e},children:[{text:this.bindTemplate.to("label")}]}),t}_createKeystrokeView(){const e=new Ol;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",e=>To(e))}]}),e}_getTooltipString(e,t,i){return e?"string"==typeof e?e:(i&&(i=To(i)),e instanceof Function?e(t,i):`${t}${i?` (${i})`:""}`):""}}var rd='';class sd extends od{constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new id;return e.content=rd,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}i(31);class ad extends Ol{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new rl,this.keystrokes=new Jc,this._focusCycler=new ql({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"]},children:this.items})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class cd extends Ol{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item"]},children:this.children})}focus(){this.children.first.focus()}}class ld extends Ol{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}i(33);class dd extends od{constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new Ol;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}function hd({emitter:e,activator:t,callback:i,contextElements:n}){e.listenTo(document,"mousedown",(e,o)=>{if(!t())return;const r="function"==typeof o.composedPath?o.composedPath():[];for(const e of n)if(e.contains(o.target)||r.includes(e))return;i()})}i(35),i(37);function ud(e,t=sd){const i=new t(e),n=new Jl(e),o=new td(e,i,n);return i.bind("isEnabled").to(o),i instanceof sd?i.bind("isOn").to(o,"isOpen"):i.arrowView.bind("isOn").to(o,"isOpen"),function(e){(function(e){e.on("render",()=>{hd({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:[e.element]})})})(e),function(e){e.on("execute",t=>{t.source instanceof dd||(e.isOpen=!1)})}(e),function(e){e.keystrokes.set("arrowdown",(t,i)=>{e.isOpen&&(e.panelView.focus(),i())}),e.keystrokes.set("arrowup",(t,i)=>{e.isOpen&&(e.panelView.focusLast(),i())})}(e)}(o),o}function md(e,t){const i=e.locale,n=i.t,o=e.toolbarView=new gd(i);o.set("ariaLabel",n("Dropdown toolbar")),e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),t.map(e=>o.items.add(e)),e.panelView.children.add(o),o.items.delegate("execute").to(e)}function fd(e,t){const i=e.locale,n=e.listView=new ad(i);n.items.bindTo(t).using(({type:e,model:t})=>{if("separator"===e)return new ld(i);if("button"===e||"switchbutton"===e){const n=new cd(i);let o;return o="button"===e?new od(i):new dd(i),o.bind(...Object.keys(t)).to(t),o.delegate("execute").to(n),n.children.add(o),n}}),e.panelView.children.add(n),n.items.delegate("execute").to(e)}i(39);class gd extends Ol{constructor(e,t){super(e);const i=this.bindTemplate,n=this.t;var o;this.options=t||{},this.set("ariaLabel",n("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new rl,this.keystrokes=new Jc,this.set("class"),this.set("isCompact",!1),this.itemsView=new pd(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection(),this._focusCycler=new ql({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:["arrowleft","arrowup"],focusNext:["arrowright","arrowdown"]}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar",i.to("class"),i.if("isCompact","ck-toolbar_compact")],role:"toolbar","aria-label":i.to("ariaLabel"),style:{maxWidth:i.to("maxWidth")}},children:this.children,on:{mousedown:(o=this,o.bindTemplate.to(e=>{e.target===o.element&&e.preventDefault()}))}}),this._behavior=this.options.shouldGroupWhenFull?new wd(this):new bd(this)}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t){this.items.addMany(e.map(e=>"|"==e?new Yl:t.has(e)?t.create(e):void console.warn(Object(ki.a)("toolbarview-item-unavailable: The requested toolbar item is unavailable."),{name:e})).filter(e=>void 0!==e))}}class pd extends Ol{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class bd{constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using(e=>e),e.focusables.bindTo(e.items).using(e=>e),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class wd{constructor(e){this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,e.itemsView.children.bindTo(this.ungroupedItems).using(e=>e),this.ungroupedItems.on("add",this._updateFocusCycleableItems.bind(this)),this.ungroupedItems.on("remove",this._updateFocusCycleableItems.bind(this)),e.children.on("add",this._updateFocusCycleableItems.bind(this)),e.children.on("remove",this._updateFocusCycleableItems.bind(this)),e.items.on("change",(e,t)=>{const i=t.index;for(const e of t.removed)i>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=i;ethis.ungroupedItems.length?this.groupedItems.add(n,e-this.ungroupedItems.length):this.ungroupedItems.add(n,e)}this._updateGrouping()}),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!this.viewElement.offsetParent)return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,i=new fs(e.lastChild),n=new fs(e);if(!this.cachedPadding){const i=ur.window.getComputedStyle(e),n="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(i[n])}return"ltr"===t?i.right>n.right-this.cachedPadding:i.left{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)}),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",()=>{this._updateGrouping()})}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new Yl),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,i=ud(e);return i.class="ck-toolbar__grouped-dropdown",i.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",md(i,[]),i.buttonView.set({label:t("Show more items"),tooltip:!0,icon:''}),i.toolbarView.items.bindTo(this.groupedItems).using(e=>e),i}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(e=>{this.viewFocusables.add(e)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}i(41);class kd extends jl{constructor(e,t,i={}){super(e),this.stickyPanel=new Wl(e),this.toolbar=new gd(e,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),this.editable=new Fl(e,t)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class _d extends Zc{constructor(e,t){super(t),di(e)&&(this.sourceElement=e),this.data.processor=new il(this.data.viewDocument),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=new kd(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i});this.ui=new ml(this,n),function(e){if(!j(e.updateSourceElement))throw new ki.b("attachtoform-missing-elementapi-interface: Editor passed to attachToForm() must implement ElementApi.",e);const t=e.sourceElement;if(t&&"textarea"===t.tagName.toLowerCase()&&t.form){let i;const n=t.form,o=()=>e.updateSourceElement();j(n.submit)&&(i=n.submit,n.submit=()=>{o(),i.apply(n)}),n.addEventListener("submit",o),e.on("destroy",()=>{n.removeEventListener("submit",o),i&&(n.submit=i)})}}(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise(i=>{const n=new this(e,t);i(n.initPlugins().then(()=>n.ui.init(di(e)?e:null)).then(()=>{if(!di(e)&&t.initialData)throw new ki.b("editor-create-initial-data: The config.initialData option cannot be used together with initial data passed in Editor.create().",null);const i=t.initialData||function(e){return di(e)?(t=e,t instanceof HTMLTextAreaElement?t.value:t.innerHTML):e;var t}(e);return n.data.init(i)}).then(()=>n.fire("ready")).then(()=>n))})}}Mi(_d,Xc),Mi(_d,el);class vd{constructor(e){this.editor=e,this.set("isEnabled",!0),this._disableStack=new Set}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",yd,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",yd),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function yd(e){e.return=!1,e.stop()}Mi(vd,Jn);class xd{constructor(e){this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",()=>{this.refresh()}),this.on("execute",e=>{this.isEnabled||e.stop()},{priority:"high"}),this.listenTo(e,"change:isReadOnly",(e,t,i)=>{i?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",Ad,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",Ad),this.refresh())}execute(){}destroy(){this.stopListening()}}function Ad(e){e.return=!1,e.stop()}function Cd(e){const t=e.next();return t.done?null:t.value}Mi(xd,Jn);const Td=["left","right","center","justify"];function Pd(e){return Td.includes(e)}function Sd(e,t){return"rtl"==t.contentLanguageDirection?"right"===e:"left"===e}const Ed="alignment";class Md extends xd{refresh(){const e=this.editor.locale,t=Cd(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=!!t&&this._canBeAligned(t),this.isEnabled&&t.hasAttribute("alignment")?this.value=t.getAttribute("alignment"):this.value="rtl"===e.contentLanguageDirection?"right":"left"}execute(e={}){const t=this.editor,i=t.locale,n=t.model,o=n.document,r=e.value;n.change(e=>{const t=Array.from(o.selection.getSelectedBlocks()).filter(e=>this._canBeAligned(e)),n=t[0].getAttribute("alignment");Sd(r,i)||n===r||!r?function(e,t){for(const i of e)t.removeAttribute(Ed,i)}(t,e):function(e,t,i){for(const n of e)t.setAttribute(Ed,i,n)}(t,e,r)})}_canBeAligned(e){return this.editor.model.schema.checkAttribute(e,Ed)}}class Id extends vd{static get pluginName(){return"AlignmentEditing"}constructor(e){super(e),e.config.define("alignment",{options:[...Td]})}init(){const e=this.editor,t=e.locale,i=e.model.schema,n=e.config.get("alignment.options").filter(Pd);i.extend("$block",{allowAttributes:"alignment"}),e.model.schema.setAttributeProperties("alignment",{isFormatting:!0});const o=function(e){const t={model:{key:"alignment",values:e.slice()},view:{}};for(const i of e)t.view[i]={key:"style",value:{"text-align":i}};return t}(n.filter(e=>!Sd(e,t)));e.conversion.attributeToAttribute(o),e.commands.add("alignment",new Md(e))}}var Nd='',Rd='';const Od=new Map([["left",Nd],["right",Rd],["center",''],["justify",'']]);class zd extends vd{get localizedOptionTitles(){const e=this.editor.t;return{left:e("Align left"),right:e("Align right"),center:e("Align center"),justify:e("Justify")}}static get pluginName(){return"AlignmentUI"}init(){const e=this.editor,t=e.ui.componentFactory,i=e.t,n=e.config.get("alignment.options");n.filter(Pd).forEach(e=>this._addButton(e)),t.add("alignment",e=>{const o=ud(e),r=n.map(e=>t.create("alignment:"+e));md(o,r),o.buttonView.set({label:i("Text alignment"),tooltip:!0}),o.toolbarView.isVertical=!0,o.toolbarView.ariaLabel=i("Text alignment toolbar"),o.extendTemplate({attributes:{class:"ck-alignment-dropdown"}});const s="rtl"===e.contentLanguageDirection?Rd:Nd;return o.buttonView.bind("icon").toMany(r,"isOn",(...e)=>{const t=e.findIndex(e=>e);return t<0?s:r[t].icon}),o.bind("isEnabled").toMany(r,"isEnabled",(...e)=>e.some(e=>e)),o})}_addButton(e){const t=this.editor;t.ui.componentFactory.add("alignment:"+e,i=>{const n=t.commands.get("alignment"),o=new od(i);return o.set({label:this.localizedOptionTitles[e],icon:Od.get(e),tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(n),o.bind("isOn").to(n,"value",t=>t===e),this.listenTo(o,"execute",()=>{t.execute("alignment",{value:e}),t.editing.view.focus()}),o})}}function Dd(e,t){let i=e.start;return{text:Array.from(e.getItems()).reduce((e,n)=>n.is("$text")||n.is("$textProxy")?e+n.data:(i=t.createPositionAfter(n),""),""),range:t.createRange(i,e.end)}}class Ld{constructor(e,t){this.model=e,this.testCallback=t,this.hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))}),this._startListening()}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",(t,{directChange:i})=>{i&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this.hasMatch=!1))}),this.listenTo(e,"change:data",(e,t)=>{"transparent"!=t.type&&this._evaluateTextBeforeSelection("data",{batch:t})})}_evaluateTextBeforeSelection(e,t={}){const i=this.model,n=i.document.selection,o=i.createRange(i.createPositionAt(n.focus.parent,0),n.focus),{text:r,range:s}=Dd(o,i),a=this.testCallback(r);if(!a&&this.hasMatch&&this.fire("unmatched"),this.hasMatch=!!a,a){const i=Object.assign(t,{text:r,range:s});"object"==typeof a&&Object.assign(i,a),this.fire("matched:"+e,i)}}}Mi(Ld,Jn);const Vd=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?![-_])(?:[-\\w\\u00a1-\\uffff]{0,63}[^-_]\\.)+(?:[a-z\\u00a1-\\uffff]{2,}))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-\\w\\u00a1-\\uffff]{0,63}[^-_]\\.))+(?:[a-z\\u00a1-\\uffff]{2,})))$","i"),jd=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i;function Bd(e){const t=Vd.exec(e);return t?t[2]:null}class Fd extends xd{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,i=t.document.selection,n=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{if(i.isCollapsed)n?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const o=t.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const t of o)n?e.setAttribute(this.attributeKey,n,t):e.removeAttribute(this.attributeKey,t)}})}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,i=e.document.selection;if(i.isCollapsed)return i.hasAttribute(this.attributeKey);for(const e of i.getRanges())for(const i of e.getItems())if(t.checkAttribute(i,this.attributeKey))return i.hasAttribute(this.attributeKey);return!1}}const Hd="bold";class Ud extends vd{static get pluginName(){return"BoldEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Hd}),e.model.schema.setAttributeProperties(Hd,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Hd,view:"strong",upcastAlso:["b",e=>{const t=e.getStyle("font-weight");return t?"bold"==t||Number(t)>=600?{name:!0,styles:["font-weight"]}:void 0:null}]}),e.commands.add(Hd,new Fd(e,Hd)),e.keystrokes.set("CTRL+B",Hd)}}const Wd="bold";class qd extends vd{init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Wd,i=>{const n=e.commands.get(Wd),o=new od(i);return o.set({label:t("Bold"),icon:'',keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(o,"execute",()=>{e.execute(Wd),e.editing.view.focus()}),o})}}class $d extends vd{static get pluginName(){return"CKFinderUI"}init(){const e=this.editor,t=e.ui.componentFactory,i=e.t;t.add("ckfinder",t=>{const n=e.commands.get("ckfinder"),o=new od(t);return o.set({label:i("Insert image or file"),icon:'',tooltip:!0}),o.bind("isEnabled").to(n),o.on("execute",()=>{e.execute("ckfinder"),e.editing.view.focus()}),o})}}class Yd extends Ar{observe(e){this.listenTo(e,"load",(e,t)=>{"IMG"==t.target.tagName&&this._fireEvents(t)},{useCapture:!0})}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class Gd{constructor(){this._stack=[]}add(e,t){const i=this._stack,n=i[0];this._insertDescriptor(e);const o=i[0];n===o||Kd(n,o)||this.fire("change:top",{oldDescriptor:n,newDescriptor:o,writer:t})}remove(e,t){const i=this._stack,n=i[0];this._removeDescriptor(e);const o=i[0];n===o||Kd(n,o)||this.fire("change:top",{oldDescriptor:n,newDescriptor:o,writer:t})}_insertDescriptor(e){const t=this._stack,i=t.findIndex(t=>t.id===e.id);if(Kd(e,t[i]))return;i>-1&&t.splice(i,1);let n=0;for(;t[n]&&Jd(t[n],e);)n++;t.splice(n,0,e)}_removeDescriptor(e){const t=this._stack,i=t.findIndex(t=>t.id===e);i>-1&&t.splice(i,1)}}function Kd(e,t){return e&&t&&e.priority==t.priority&&Qd(e.classes)==Qd(t.classes)}function Jd(e,t){return e.priority>t.priority||!(e.priorityQd(t.classes)}function Qd(e){return Array.isArray(e)?e.sort().join(","):e}Mi(Gd,yi);i(43);const Zd=Hl("px"),Xd=ur.document.body;class eh extends Ol{constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class"),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",e=>"ck-balloon-panel_"+e),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",Zd),left:t.to("left",Zd)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=eh.defaultPositions,i=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast],limiter:Xd,fitInViewport:!0},e),n=eh._getOptimalPosition(i),o=parseInt(n.left),r=parseInt(n.top),s=n.name;Object.assign(this,{top:r,left:o,position:s})}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=th(e.target),i=e.limiter?th(e.limiter):Xd;this.listenTo(ur.document,"scroll",(n,o)=>{const r=o.target,s=t&&r.contains(t),a=i&&r.contains(i);!s&&!a&&t&&i||this.attachTo(e)},{useCapture:!0}),this.listenTo(ur.window,"resize",()=>{this.attachTo(e)})}_stopPinning(){this.stopListening(ur.document,"scroll"),this.stopListening(ur.window,"resize")}}function th(e){return di(e)?e:hs(e)?e.commonAncestorContainer:"function"==typeof e?th(e()):null}function ih(e,t){return e.top-t.height-eh.arrowVerticalOffset}function nh(e){return e.bottom+eh.arrowVerticalOffset}eh.arrowHorizontalOffset=25,eh.arrowVerticalOffset=10,eh._getOptimalPosition=Ql,eh.defaultPositions={northWestArrowSouthWest:(e,t)=>({top:ih(e,t),left:e.left-eh.arrowHorizontalOffset,name:"arrow_sw"}),northWestArrowSouthMiddleWest:(e,t)=>({top:ih(e,t),left:e.left-.25*t.width-eh.arrowHorizontalOffset,name:"arrow_smw"}),northWestArrowSouth:(e,t)=>({top:ih(e,t),left:e.left-t.width/2,name:"arrow_s"}),northWestArrowSouthMiddleEast:(e,t)=>({top:ih(e,t),left:e.left-.75*t.width+eh.arrowHorizontalOffset,name:"arrow_sme"}),northWestArrowSouthEast:(e,t)=>({top:ih(e,t),left:e.left-t.width+eh.arrowHorizontalOffset,name:"arrow_se"}),northArrowSouthWest:(e,t)=>({top:ih(e,t),left:e.left+e.width/2-eh.arrowHorizontalOffset,name:"arrow_sw"}),northArrowSouthMiddleWest:(e,t)=>({top:ih(e,t),left:e.left+e.width/2-.25*t.width-eh.arrowHorizontalOffset,name:"arrow_smw"}),northArrowSouth:(e,t)=>({top:ih(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s"}),northArrowSouthMiddleEast:(e,t)=>({top:ih(e,t),left:e.left+e.width/2-.75*t.width+eh.arrowHorizontalOffset,name:"arrow_sme"}),northArrowSouthEast:(e,t)=>({top:ih(e,t),left:e.left+e.width/2-t.width+eh.arrowHorizontalOffset,name:"arrow_se"}),northEastArrowSouthWest:(e,t)=>({top:ih(e,t),left:e.right-eh.arrowHorizontalOffset,name:"arrow_sw"}),northEastArrowSouthMiddleWest:(e,t)=>({top:ih(e,t),left:e.right-.25*t.width-eh.arrowHorizontalOffset,name:"arrow_smw"}),northEastArrowSouth:(e,t)=>({top:ih(e,t),left:e.right-t.width/2,name:"arrow_s"}),northEastArrowSouthMiddleEast:(e,t)=>({top:ih(e,t),left:e.right-.75*t.width+eh.arrowHorizontalOffset,name:"arrow_sme"}),northEastArrowSouthEast:(e,t)=>({top:ih(e,t),left:e.right-t.width+eh.arrowHorizontalOffset,name:"arrow_se"}),southWestArrowNorthWest:(e,t)=>({top:nh(e),left:e.left-eh.arrowHorizontalOffset,name:"arrow_nw"}),southWestArrowNorthMiddleWest:(e,t)=>({top:nh(e),left:e.left-.25*t.width-eh.arrowHorizontalOffset,name:"arrow_nmw"}),southWestArrowNorth:(e,t)=>({top:nh(e),left:e.left-t.width/2,name:"arrow_n"}),southWestArrowNorthMiddleEast:(e,t)=>({top:nh(e),left:e.left-.75*t.width+eh.arrowHorizontalOffset,name:"arrow_nme"}),southWestArrowNorthEast:(e,t)=>({top:nh(e),left:e.left-t.width+eh.arrowHorizontalOffset,name:"arrow_ne"}),southArrowNorthWest:(e,t)=>({top:nh(e),left:e.left+e.width/2-eh.arrowHorizontalOffset,name:"arrow_nw"}),southArrowNorthMiddleWest:(e,t)=>({top:nh(e),left:e.left+e.width/2-.25*t.width-eh.arrowHorizontalOffset,name:"arrow_nmw"}),southArrowNorth:(e,t)=>({top:nh(e),left:e.left+e.width/2-t.width/2,name:"arrow_n"}),southArrowNorthMiddleEast:(e,t)=>({top:nh(e),left:e.left+e.width/2-.75*t.width+eh.arrowHorizontalOffset,name:"arrow_nme"}),southArrowNorthEast:(e,t)=>({top:nh(e),left:e.left+e.width/2-t.width+eh.arrowHorizontalOffset,name:"arrow_ne"}),southEastArrowNorthWest:(e,t)=>({top:nh(e),left:e.right-eh.arrowHorizontalOffset,name:"arrow_nw"}),southEastArrowNorthMiddleWest:(e,t)=>({top:nh(e),left:e.right-.25*t.width-eh.arrowHorizontalOffset,name:"arrow_nmw"}),southEastArrowNorth:(e,t)=>({top:nh(e),left:e.right-t.width/2,name:"arrow_n"}),southEastArrowNorthMiddleEast:(e,t)=>({top:nh(e),left:e.right-.75*t.width+eh.arrowHorizontalOffset,name:"arrow_nme"}),southEastArrowNorthEast:(e,t)=>({top:nh(e),left:e.right-t.width+eh.arrowHorizontalOffset,name:"arrow_ne"})};var oh='';const rh="widget-type-around";function sh(e,t,i){return e&&lh(e)&&!i.isInline(t)}function ah(e){return e.getAttribute(rh)}const ch="ck-widget_selected";function lh(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function dh(e,t,i={}){if(!e.is("containerElement"))throw new ki.b("widget-to-widget-wrong-element-type: The element passed to toWidget() must be a container element instance.",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass("ck-widget",e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=ph,i.label&&function(e,t,i){i.setCustomProperty("widgetLabel",t,e)}(e,i.label,t),i.hasSelectionHandle&&function(e,t){const i=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(e){const t=this.toDomElement(e),i=new id;return i.set("content",oh),i.render(),t.appendChild(i.element),t}));t.insert(t.createPositionAt(e,0),i),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),hh(e,t,(e,t,i)=>i.addClass(n(t.classes),e),(e,t,i)=>i.removeClass(n(t.classes),e)),e;function n(e){return Array.isArray(e)?e:[e]}}function hh(e,t,i,n){const o=new Gd;o.on("change:top",(t,o)=>{o.oldDescriptor&&n(e,o.oldDescriptor,o.writer),o.newDescriptor&&i(e,o.newDescriptor,o.writer)}),t.setCustomProperty("addHighlight",(e,t,i)=>o.add(t,i),e),t.setCustomProperty("removeHighlight",(e,t,i)=>o.remove(t,i),e)}function uh(e){const t=e.getCustomProperty("widgetLabel");return t?"function"==typeof t?t():t:""}function mh(e,t){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",(i,n,o)=>{t.setAttribute("contenteditable",o?"false":"true",e)}),e.on("change:isFocused",(i,n,o)=>{o?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)}),e}function fh(e,t){const i=e.getSelectedElement();if(i){const n=ah(e);if(n)return t.createPositionAt(i,n);if(t.schema.isBlock(i))return t.createPositionAfter(i)}const n=e.getSelectedBlocks().next().value;if(n){if(n.isEmpty)return t.createPositionAt(n,0);const i=t.createPositionAfter(n);return e.focus.isTouching(i)?i:t.createPositionBefore(n)}return e.focus}function gh(e,t){const i=new fs(ur.window),n=i.getIntersection(e),o=t.height+eh.arrowVerticalOffset;if(e.top-o>i.top||e.bottom+o!e.is("element","image"))}(i)}function vh(e){const t=[];for(const i of e.getChildren())t.push(i),i.is("element")&&t.push(...i.getChildren());return t.find(e=>e.is("element","img"))}function yh(e){return i=>{i.on(`attribute:${e}:image`,t)};function t(e,t,i){if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,o=vh(i.mapper.toViewElement(t.item));n.setAttribute(t.attributeKey,t.attributeNewValue||"",o)}}class xh extends xd{refresh(){this.isEnabled=_h(this.editor.model)}execute(e){const t=this.editor.model;t.change(i=>{const n=Array.isArray(e.source)?e.source:[e.source];for(const e of n)kh(i,t,{src:e})})}}class Ah extends vd{static get pluginName(){return"ImageEditing"}init(){const e=this.editor,t=e.model.schema,i=e.t,n=e.conversion;e.editing.view.addObserver(Yd),t.register("image",{isObject:!0,isBlock:!0,allowWhere:"$block",allowAttributes:["alt","src","srcset"]}),n.for("dataDowncast").elementToElement({model:"image",view:(e,{writer:t})=>Ch(t)}),n.for("editingDowncast").elementToElement({model:"image",view:(e,{writer:t})=>function(e,t,i){return t.setCustomProperty("image",!0,e),dh(e,t,{label:function(){const t=vh(e).getAttribute("alt");return t?`${t} ${i}`:i}})}(Ch(t),t,i("image widget"))}),n.for("downcast").add(yh("src")).add(yh("alt")).add(function(){return t=>{t.on("attribute:srcset:image",e)};function e(e,t,i){if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,o=vh(i.mapper.toViewElement(t.item));if(null===t.attributeNewValue){const e=t.attributeOldValue;e.data&&(n.removeAttribute("srcset",o),n.removeAttribute("sizes",o),e.width&&n.removeAttribute("width",o))}else{const e=t.attributeNewValue;e.data&&(n.setAttribute("srcset",e.data,o),n.setAttribute("sizes","100vw",o),e.width&&n.setAttribute("width",e.width,o))}}}()),n.for("upcast").elementToElement({view:{name:"img",attributes:{src:!0}},model:(e,{writer:t})=>t.createElement("image",{src:e.getAttribute("src")})}).attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:e=>{const t={data:e.getAttribute("srcset")};return e.hasAttribute("width")&&(t.width=e.getAttribute("width")),t}}}).add(function(){return t=>{t.on("element:figure",e)};function e(e,t,i){if(!i.consumable.test(t.viewItem,{name:!0,classes:"image"}))return;const n=vh(t.viewItem);if(!n||!n.hasAttribute("src")||!i.consumable.test(n,{name:!0}))return;const o=Cd(i.convertItem(n,t.modelCursor).modelRange.getItems());o&&(i.convertChildren(t.viewItem,o),i.updateConversionResult(o,t))}}()),e.commands.add("imageInsert",new xh(e))}}function Ch(e){const t=e.createEmptyElement("img"),i=e.createContainerElement("figure",{class:"image"});return e.insert(e.createPositionAt(i,0),t),i}class Th extends Gr{constructor(e){super(e),this.domEventType="mousedown"}onDomEvent(e){this.fire(e.type,e)}}class Ph extends vd{static get pluginName(){return"TwoStepCaretMovement"}constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,i=e.editing.view,n=e.locale,o=t.document.selection;this.listenTo(i.document,"keydown",(e,t)=>{if(!o.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const i=t.keyCode==xo.arrowright,r=t.keyCode==xo.arrowleft;if(!i&&!r)return;const s=n.contentLanguageDirection;let a=!1;a="ltr"===s&&i||"rtl"===s&&r?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===a&&e.stop()},{priority:wi.get("high")+1}),this._isNextGravityRestorationSkipped=!1,this.listenTo(o,"change:range",(e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&Ih(o.getFirstPosition(),this.attributes)||this._restoreGravity())})}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,i=this.editor.model.document.selection,n=i.getFirstPosition();return!this._isGravityOverridden&&((!n.isAtStart||!Sh(i,t))&&(Ih(n,t)?(Mh(e),this._overrideGravity(),!0):void 0))}_handleBackwardMovement(e){const t=this.attributes,i=this.editor.model,n=i.document.selection,o=n.getFirstPosition();return this._isGravityOverridden?(Mh(e),this._restoreGravity(),Eh(i,t,o),!0):o.isAtStart?!!Sh(n,t)&&(Mh(e),Eh(i,t,o),!0):function(e,t){return Ih(e.getShiftedBy(-1),t)}(o,t)?o.isAtEnd&&!Sh(n,t)&&Ih(o,t)?(Mh(e),Eh(i,t,o),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):void 0}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change(e=>e.overrideSelectionGravity())}_restoreGravity(){this.editor.model.change(e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}}function Sh(e,t){for(const i of t)if(e.hasAttribute(i))return!0;return!1}function Eh(e,t,i){const n=i.nodeBefore;e.change(e=>{n?e.setSelectionAttribute(n.getAttributes()):e.removeSelectionAttribute(t)})}function Mh(e){e.preventDefault()}function Ih(e,t){const{nodeBefore:i,nodeAfter:n}=e;for(const e of t){const t=i?i.getAttribute(e):void 0;if((n?n.getAttribute(e):void 0)!==t)return!0}return!1}function Nh(e,t,i,n){return n.createRange(Rh(e,t,i,!0,n),Rh(e,t,i,!1,n))}function Rh(e,t,i,n,o){let r=e.textNode||(n?e.nodeBefore:e.nodeAfter),s=null;for(;r&&r.getAttribute(t)==i;)s=r,r=n?r.previousSibling:r.nextSibling;return s?o.createPositionAt(s,n?"before":"after"):e}class Oh{constructor(e,t=20){this.model=e,this.size=0,this.limit=t,this.isLocked=!1,this._changeCallback=(e,t)=>{"transparent"!=t.type&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch()),this._batch}input(e){this.size+=e,this.size>=this.limit&&this._reset(!0)}lock(){this.isLocked=!0}unlock(){this.isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e){this.isLocked&&!e||(this._batch=null,this.size=0)}}class zh extends xd{constructor(e,t){super(e),this._buffer=new Oh(e.model,t),this._batches=new WeakSet}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,i=t.document,n=e.text||"",o=n.length,r=e.range?t.createSelection(e.range):i.selection,s=e.resultRange;t.enqueueChange(this._buffer.batch,e=>{this._buffer.lock(),this._batches.add(this._buffer.batch),t.deleteContent(r),n&&t.insertContent(e.createText(n,i.selection.getAttributes()),r),s?e.setSelection(s):r.is("documentSelection")||e.setSelection(r),this._buffer.unlock(),this._buffer.input(o)})}}const Dh=[Ao("arrowUp"),Ao("arrowRight"),Ao("arrowDown"),Ao("arrowLeft"),9,16,17,18,19,20,27,33,34,35,36,45,91,93,144,145,173,174,175,176,177,178,179,255];for(let e=112;e<=135;e++)Dh.push(e);function Lh(e){return!!e.ctrlKey||Dh.includes(e.keyCode)}function Vh(e){if(e.newChildren.length-e.oldChildren.length!=1)return;const t=function(e,t){const i=[];let n,o=0;return e.forEach(e=>{"equal"==e?(r(),o++):"insert"==e?(s("insert")?n.values.push(t[o]):(r(),n={type:"insert",index:o,values:[t[o]]}),o++):s("delete")?n.howMany++:(r(),n={type:"delete",index:o,howMany:1})}),r(),i;function r(){n&&(i.push(n),n=null)}function s(e){return n&&n.type==e}}(or(e.oldChildren,e.newChildren,jh),e.newChildren);if(t.length>1)return;const i=t[0];return i.values[0]&&i.values[0].is("$text")?i:void 0}function jh(e,t){return e&&e.is("$text")&&t&&t.is("$text")?e.data===t.data:e===t}class Bh{constructor(e){this.editor=e,this.editing=this.editor.editing}handle(e,t){if(function(e){if(0==e.length)return!1;for(const t of e)if("children"===t.type&&!Vh(t))return!0;return!1}(e))this._handleContainerChildrenMutations(e,t);else for(const i of e)this._handleTextMutation(i,t),this._handleTextNodeInsertion(i)}_handleContainerChildrenMutations(e,t){const i=function(e){const t=e.map(e=>e.node).reduce((e,t)=>e.getCommonAncestor(t,{includeSelf:!0}));if(!t)return;return t.getAncestors({includeSelf:!0,parentFirst:!0}).find(e=>e.is("containerElement")||e.is("rootElement"))}(e);if(!i)return;const n=this.editor.editing.view.domConverter.mapViewToDom(i),o=new pr(this.editor.editing.view.document),r=this.editor.data.toModel(o.domToView(n)).getChild(0),s=this.editor.editing.mapper.toModelElement(i);if(!s)return;const a=Array.from(r.getChildren()),c=Array.from(s.getChildren()),l=a[a.length-1],d=c[c.length-1],h=l&&l.is("element","softBreak"),u=d&&!d.is("element","softBreak");h&&u&&a.pop();const m=this.editor.model.schema;if(!Fh(a,m)||!Fh(c,m))return;const f=a.map(e=>e.is("$text")?e.data:"@").join("").replace(/\u00A0/g," "),g=c.map(e=>e.is("$text")?e.data:"@").join("").replace(/\u00A0/g," ");if(g===f)return;const p=or(g,f),{firstChangeAt:b,insertions:w,deletions:k}=Hh(p);let _=null;t&&(_=this.editing.mapper.toModelRange(t.getFirstRange()));const v=f.substr(b,w),y=this.editor.model.createRange(this.editor.model.createPositionAt(s,b),this.editor.model.createPositionAt(s,b+k));this.editor.execute("input",{text:v,range:y,resultRange:_})}_handleTextMutation(e,t){if("text"!=e.type)return;const i=e.newText.replace(/\u00A0/g," "),n=e.oldText.replace(/\u00A0/g," ");if(n===i)return;const o=or(n,i),{firstChangeAt:r,insertions:s,deletions:a}=Hh(o);let c=null;t&&(c=this.editing.mapper.toModelRange(t.getFirstRange()));const l=this.editing.view.createPositionAt(e.node,r),d=this.editing.mapper.toModelPosition(l),h=this.editor.model.createRange(d,d.getShiftedBy(a)),u=i.substr(r,s);this.editor.execute("input",{text:u,range:h,resultRange:c})}_handleTextNodeInsertion(e){if("children"!=e.type)return;const t=Vh(e),i=this.editing.view.createPositionAt(e.node,t.index),n=this.editing.mapper.toModelPosition(i),o=t.values[0].data;this.editor.execute("input",{text:o.replace(/\u00A0/g," "),range:this.editor.model.createRange(n)})}}function Fh(e,t){return e.every(e=>t.isInline(e))}function Hh(e){let t=null,i=null;for(let n=0;n{i.deleteContent(i.document.selection)}),e.unlock()}_o.isAndroid?n.document.on("beforeinput",(e,t)=>r(t),{priority:"lowest"}):n.document.on("keydown",(e,t)=>r(t),{priority:"lowest"}),n.document.on("compositionstart",(function(){const e=i.document,t=1!==e.selection.rangeCount||e.selection.getFirstRange().isFlat;e.selection.isCollapsed||t||s()}),{priority:"lowest"}),n.document.on("compositionend",()=>{t=i.createSelection(i.document.selection)},{priority:"lowest"})}(e),function(e){e.editing.view.document.on("mutations",(t,i,n)=>{new Bh(e).handle(i,n)})}(e)}isInput(e){return this.editor.commands.get("input")._batches.has(e)}}class Wh{constructor(e){this.files=function(e){const t=e.files?Array.from(e.files):[],i=e.items?Array.from(e.items):[];if(t.length)return t;return i.filter(e=>"file"===e.kind).map(e=>e.getAsFile())}(e),this._native=e}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}}class qh extends Gr{constructor(e){super(e);const t=this.document;function i(e,i){i.preventDefault();const n=i.dropRange?[i.dropRange]:Array.from(t.selection.getRanges()),o=new gi(t,"clipboardInput");t.fire(o,{dataTransfer:i.dataTransfer,targetRanges:n}),o.stop.called&&i.stopPropagation()}this.domEventType=["paste","copy","cut","drop","dragover"],this.listenTo(t,"paste",i,{priority:"low"}),this.listenTo(t,"drop",i,{priority:"low"})}onDomEvent(e){const t={dataTransfer:new Wh(e.clipboardData?e.clipboardData:e.dataTransfer)};"drop"==e.type&&(t.dropRange=function(e,t){const i=t.target.ownerDocument,n=t.clientX,o=t.clientY;let r;i.caretRangeFromPoint&&i.caretRangeFromPoint(n,o)?r=i.caretRangeFromPoint(n,o):t.rangeParent&&(r=i.createRange(),r.setStart(t.rangeParent,t.rangeOffset),r.collapse(!0));return r?e.domConverter.domRangeToView(r):e.document.selection.getFirstRange()}(this.view,e)),this.fire(e.type,e,t)}}const $h=["figcaption","li"];class Yh extends vd{static get pluginName(){return"Clipboard"}init(){const e=this.editor,t=e.model.document,i=e.editing.view,n=i.document;function o(i,o){const r=o.dataTransfer;o.preventDefault();const s=e.data.toView(e.model.getSelectedContent(t.selection));n.fire("clipboardOutput",{dataTransfer:r,content:s,method:i.name})}this._htmlDataProcessor=new il(n),i.addObserver(qh),this.listenTo(n,"clipboardInput",t=>{e.isReadOnly&&t.stop()},{priority:"highest"}),this.listenTo(n,"clipboardInput",(e,t)=>{const n=t.dataTransfer;let o="";var r;n.getData("text/html")?o=function(e){return e.replace(/(\s+)<\/span>/g,(e,t)=>1==t.length?" ":t)}(n.getData("text/html")):n.getData("text/plain")&&((r=(r=n.getData("text/plain")).replace(//g,">").replace(/\n/g,"

").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  ")).indexOf("

")>-1&&(r=`

${r}

`),o=r),o=this._htmlDataProcessor.toView(o);const s=new gi(this,"inputTransformation");this.fire(s,{content:o,dataTransfer:n}),s.stop.called&&e.stop(),i.scrollToTheSelection()},{priority:"low"}),this.listenTo(this,"inputTransformation",(e,i)=>{if(!i.content.isEmpty){const n=this.editor.data,o=this.editor.model,r=n.toModel(i.content,"$clipboardHolder");if(0==r.childCount)return;if(function(e){if(e.childCount>1)return!1;return 0==[...e.getChild(0).getAttributeKeys()].length}(r)){const e=r.getChild(0);o.change(i=>{i.setAttributes(t.selection.getAttributes(),e)})}o.insertContent(r),e.stop()}},{priority:"low"}),this.listenTo(n,"copy",o,{priority:"low"}),this.listenTo(n,"cut",(t,i)=>{e.isReadOnly?i.preventDefault():o(t,i)},{priority:"low"}),this.listenTo(n,"clipboardOutput",(i,n)=>{n.content.isEmpty||(n.dataTransfer.setData("text/html",this._htmlDataProcessor.toData(n.content)),n.dataTransfer.setData("text/plain",function e(t){let i="";if(t.is("$text")||t.is("$textProxy"))i=t.data;else if(t.is("element","img")&&t.hasAttribute("alt"))i=t.getAttribute("alt");else{let n=null;for(const o of t.getChildren()){const t=e(o);n&&(n.is("containerElement")||o.is("containerElement"))&&($h.includes(n.name)||$h.includes(o.name)?i+="\n":i+="\n\n"),i+=t,n=o}}return i}(n.content))),"cut"==n.method&&e.model.deleteContent(t.selection)},{priority:"low"})}}class Gh{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach(e=>this._definitions.add(e)):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",(e,t,i)=>{if(!i.consumable.test(t.item,"attribute:linkHref"))return;const n=i.writer,o=n.document.selection;for(const e of this._definitions){const r=n.createAttributeElement("a",e.attributes,{priority:5});n.setCustomProperty("link",!0,r),e.callback(t.attributeNewValue)?t.item.is("selection")?n.wrap(o.getFirstRange(),r):n.wrap(i.mapper.toViewRange(t.range),r):n.unwrap(i.mapper.toViewRange(t.range),r)}},{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:image",(e,t,i)=>{const n=i.mapper.toViewElement(t.item),o=Array.from(n.getChildren()).find(e=>"a"===e.name);for(const e of this._definitions){const n=Ui(e.attributes);if(e.callback(t.attributeNewValue))for(const[e,t]of n)"class"===e?i.writer.addClass(t,o):i.writer.setAttribute(e,t,o);else for(const[e,t]of n)"class"===e?i.writer.removeClass(t,o):i.writer.removeAttribute(e,o)}})}}}var Kh=function(e,t,i){var n=e.length;return i=void 0===i?n:i,!t&&i>=n?e:hn(e,t,i)},Jh=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Qh=function(e){return Jh.test(e)};var Zh=function(e){return e.split("")},Xh="[\\ud800-\\udfff]",eu="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",tu="\\ud83c[\\udffb-\\udfff]",iu="[^\\ud800-\\udfff]",nu="(?:\\ud83c[\\udde6-\\uddff]){2}",ou="[\\ud800-\\udbff][\\udc00-\\udfff]",ru="(?:"+eu+"|"+tu+")"+"?",su="[\\ufe0e\\ufe0f]?",au=su+ru+("(?:\\u200d(?:"+[iu,nu,ou].join("|")+")"+su+ru+")*"),cu="(?:"+[iu+eu+"?",eu,nu,ou,Xh].join("|")+")",lu=RegExp(tu+"(?="+tu+")|"+cu+au,"g");var du=function(e){return e.match(lu)||[]};var hu=function(e){return Qh(e)?du(e):Zh(e)};var uu=function(e){return function(t){t=sn(t);var i=Qh(t)?hu(t):void 0,n=i?i[0]:t.charAt(0),o=i?Kh(i,1).join(""):t.slice(1);return n[e]()+o}}("toUpperCase");const mu=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,fu=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,gu="Ctrl+K";function pu(e,{writer:t}){const i=t.createAttributeElement("a",{href:e},{priority:5});return t.setCustomProperty("link",!0,i),i}function bu(e){return function(e){return e.replace(mu,"").match(fu)}(e=String(e))?e:"#"}function wu(e,t){return!!e&&(e.is("element","image")&&t.checkAttribute("image","linkHref"))}class ku extends xd{constructor(e){super(e),this.manualDecorators=new Ii,this.automaticDecorators=new Gh}restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,t=e.document,i=Cd(t.selection.getSelectedBlocks());wu(i,e.schema)?(this.value=i.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(i,"linkHref")):(this.value=t.selection.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"linkHref"));for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}execute(e,t={}){const i=this.editor.model,n=i.document.selection,o=[],r=[];for(const e in t)t[e]?o.push(e):r.push(e);i.change(t=>{if(n.isCollapsed){const s=n.getFirstPosition();if(n.hasAttribute("linkHref")){const a=Nh(s,"linkHref",n.getAttribute("linkHref"),i);t.setAttribute("linkHref",e,a),o.forEach(e=>{t.setAttribute(e,!0,a)}),r.forEach(e=>{t.removeAttribute(e,a)}),t.setSelection(t.createPositionAfter(a.end.nodeBefore))}else if(""!==e){const r=Ui(n.getAttributes());r.set("linkHref",e),o.forEach(e=>{r.set(e,!0)});const a=t.createText(e,r);i.insertContent(a,s),t.setSelection(t.createPositionAfter(a))}["linkHref",...o,...r].forEach(e=>{t.removeSelectionAttribute(e)})}else{const s=i.schema.getValidRanges(n.getRanges(),"linkHref"),a=[];for(const e of n.getSelectedBlocks())i.schema.checkAttribute(e,"linkHref")&&a.push(t.createRangeOn(e));const c=a.slice();for(const e of s)this._isRangeToUpdate(e,a)&&c.push(e);for(const i of c)t.setAttribute("linkHref",e,i),o.forEach(e=>{t.setAttribute(e,!0,i)}),r.forEach(e=>{t.removeAttribute(e,i)})}})}_getDecoratorStateFromModel(e){const t=this.editor.model,i=t.document,n=Cd(i.selection.getSelectedBlocks());return wu(n,t.schema)?n.getAttribute(e):i.selection.getAttribute(e)}_isRangeToUpdate(e,t){for(const i of t)if(i.containsRange(e))return!1;return!0}}class _u extends xd{refresh(){const e=this.editor.model,t=e.document,i=Cd(t.selection.getSelectedBlocks());wu(i,e.schema)?this.isEnabled=e.schema.checkAttribute(i,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"linkHref")}execute(){const e=this.editor,t=this.editor.model,i=t.document.selection,n=e.commands.get("link");t.change(e=>{const o=i.isCollapsed?[Nh(i.getFirstPosition(),"linkHref",i.getAttribute("linkHref"),t)]:i.getRanges();for(const t of o)if(e.removeAttribute("linkHref",t),n)for(const i of n.manualDecorators)e.removeAttribute(i.id,t)})}}class vu{constructor({id:e,label:t,attributes:i,defaultValue:n}){this.id=e,this.set("value"),this.defaultValue=n,this.label=t,this.attributes=i}}Mi(vu,Jn);i(45);const yu="automatic",xu=/^(https?:)?\/\//;class Au extends vd{static get pluginName(){return"LinkEditing"}static get requires(){return[Ph,Uh,Yh]}constructor(e){super(e),e.config.define("link",{addTargetToExternalLinks:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:pu}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>pu(bu(e),t)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),e.commands.add("link",new ku(e)),e.commands.add("unlink",new _u(e));const t=function(e,t){const i={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach(e=>(e.label&&i[e.label]&&(e.label=i[e.label]),e)),t}(e.t,function(e){const t=[];if(e)for(const[i,n]of Object.entries(e)){const e=Object.assign({},n,{id:"link"+uu(i)});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(t.filter(e=>e.mode===yu)),this._enableManualDecorators(t.filter(e=>"manual"===e.mode));e.plugins.get(Ph).registerAttribute("linkHref"),function(e,t,i,n){const o=e.editing.view,r=new Set;o.document.registerPostFixer(o=>{const s=e.model.document.selection;let a=!1;if(s.hasAttribute(t)){const c=Nh(s.getFirstPosition(),t,s.getAttribute(t),e.model),l=e.editing.mapper.toViewRange(c);for(const e of l.getItems())e.is("element",i)&&!e.hasClass(n)&&(o.addClass(n,e),r.add(e),a=!0)}return a}),e.conversion.for("editingDowncast").add(e=>{function t(){o.change(e=>{for(const t of r.values())e.removeClass(n,t),r.delete(t)})}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})})}(e,"linkHref","a","ck-link_selected"),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink()}_enableAutomaticDecorators(e){const t=this.editor,i=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&i.add({id:"linkIsExternal",mode:yu,callback:e=>xu.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),i.add(e),i.length&&t.conversion.for("downcast").add(i.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,i=t.commands.get("link").manualDecorators;e.forEach(e=>{t.model.schema.extend("$text",{allowAttributes:e.id}),i.add(new vu(e)),t.conversion.for("downcast").attributeToElement({model:e.id,view:(t,{writer:n})=>{if(t){const t=i.get(e.id).attributes,o=n.createAttributeElement("a",t,{priority:5});return n.setCustomProperty("link",!0,o),o}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:i.get(e.id).attributes},model:{key:e.id}})})}_enableInsertContentSelectionAttributesFixer(){const e=this.editor,t=e.model,i=t.document.selection,n=e.commands.get("link");this.listenTo(t,"insertContent",()=>{const e=i.anchor.nodeBefore,o=i.anchor.nodeAfter;i.hasAttribute("linkHref")&&e&&e.hasAttribute("linkHref")&&(o&&o.hasAttribute("linkHref")||t.change(e=>{Cu(e,n.manualDecorators)}))},{priority:"low"})}_enableClickingAfterLink(){const e=this.editor,t=e.commands.get("link");e.editing.view.addObserver(Th);let i=!1;this.listenTo(e.editing.view.document,"mousedown",()=>{i=!0}),this.listenTo(e.editing.view.document,"selectionChange",()=>{if(!i)return;i=!1;const n=e.model.document.selection;if(!n.isCollapsed)return;if(!n.hasAttribute("linkHref"))return;const o=n.getFirstPosition(),r=Nh(o,"linkHref",n.getAttribute("linkHref"),e.model);(o.isTouching(r.start)||o.isTouching(r.end))&&e.model.change(e=>{Cu(e,t.manualDecorators)})})}_enableTypingOverLink(){const e=this.editor,t=e.editing.view;let i,n;this.listenTo(t.document,"delete",()=>{n=!0},{priority:"high"}),this.listenTo(e.model,"deleteContent",()=>{const t=e.model.document.selection;t.isCollapsed||(n?n=!1:Tu(e)&&function(e){const t=e.document.selection,i=t.getFirstPosition(),n=t.getLastPosition(),o=i.nodeAfter;if(!o)return!1;if(!o.is("$text"))return!1;if(!o.hasAttribute("linkHref"))return!1;const r=n.textNode||n.nodeBefore;if(o===r)return!0;return Nh(i,"linkHref",o.getAttribute("linkHref"),e).containsRange(e.createRange(i,n),!0)}(e.model)&&(i=t.getAttributes()))},{priority:"high"}),this.listenTo(e.model,"insertContent",(t,[o])=>{n=!1,Tu(e)&&i&&(e.model.change(e=>{for(const[t,n]of i)e.setAttribute(t,n,o)}),i=null)},{priority:"high"})}_handleDeleteContentAfterLink(){const e=this.editor,t=e.model,i=t.document.selection,n=e.editing.view,o=e.commands.get("link");let r=!1,s=!1;this.listenTo(n.document,"delete",(e,t)=>{s=t.domEvent.keyCode===xo.backspace},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{r=!1;const e=i.getFirstPosition(),n=i.getAttribute("linkHref");if(!n)return;const o=Nh(e,"linkHref",n,t);r=o.containsPosition(e)||o.end.isEqual(e)},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{s&&(s=!1,r||e.model.enqueueChange(e=>{Cu(e,o.manualDecorators)}))},{priority:"low"})}}function Cu(e,t){e.removeSelectionAttribute("linkHref");for(const i of t)e.removeSelectionAttribute(i.id)}function Tu(e){return e.plugins.get("Input").isInput(e.model.change(e=>e.batch))}class Pu{constructor(e){this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}Mi(Pu,Jn);class Su extends Pu{static get pluginName(){return"Notification"}init(){this.on("show:warning",(e,t)=>{window.alert(t.message)},{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t="show:"+e.type+(e.namespace?":"+e.namespace:"");this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}class Eu extends xd{constructor(e){super(e),this.stopListening(this.editor.model.document,"change"),this.listenTo(this.editor.model.document,"change",()=>this.refresh(),{priority:"low"})}refresh(){const e=this.editor.commands.get("imageInsert"),t=this.editor.commands.get("link");this.isEnabled=e.isEnabled||t.isEnabled}execute(){const e=this.editor,t=this.editor.config.get("ckfinder.openerMethod")||"modal";if("popup"!=t&&"modal"!=t)throw new ki.b('ckfinder-unknown-openerMethod: The openerMethod config option must by "popup" or "modal".',e);const i=this.editor.config.get("ckfinder.options")||{};i.chooseFiles=!0;const n=i.onInit;i.language||(i.language=e.locale.uiLanguage),i.onInit=t=>{n&&n(t),t.on("files:choose",i=>{const n=i.data.files.toArray(),o=n.filter(e=>!e.isImage()),r=n.filter(e=>e.isImage());for(const t of o)e.execute("link",t.getUrl());const s=[];for(const e of r){const i=e.getUrl();s.push(i||t.request("file:getProxyUrl",{file:e}))}s.length&&Mu(e,s)}),t.on("file:choose:resizedImage",t=>{const i=t.data.resizedUrl;if(i)Mu(e,[i]);else{const t=e.plugins.get("Notification"),i=e.locale.t;t.showWarning(i("Could not obtain resized image URL."),{title:i("Selecting resized image failed"),namespace:"ckfinder"})}})},window.CKFinder[t](i)}}function Mu(e,t){if(e.commands.get("imageInsert").isEnabled)e.execute("imageInsert",{source:t});else{const t=e.plugins.get("Notification"),i=e.locale.t;t.showWarning(i("Could not insert image at the current position."),{title:i("Inserting image failed"),namespace:"ckfinder"})}}class Iu extends vd{static get pluginName(){return"CKFinderEditing"}static get requires(){return[Su,Ah,Au]}init(){const e=this.editor;e.commands.add("ckfinder",new Eu(e))}}class Nu extends Pu{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new Ii({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new ki.b("pendingactions-add-invalid-message: The message must be a string.",this);const t=Object.create(Jn);return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}class Ru{constructor(){const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise((i,n)=>{t.onload=()=>{const e=t.result;this._data=e,i(e)},t.onerror=()=>{n("error")},t.onabort=()=>{n("aborted")},this._reader.readAsDataURL(e)})}abort(){this._reader.abort()}}Mi(Ru,Jn);class Ou extends vd{static get pluginName(){return"FileRepository"}static get requires(){return[Nu]}init(){this.loaders=new Ii,this.loaders.on("add",()=>this._updatePendingAction()),this.loaders.on("remove",()=>this._updatePendingAction()),this._loadersMap=new Map,this._pendingAction=null,this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(e,t)=>t?e/t*100:0)}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return console.warn(Object(ki.a)("filerepository-no-upload-adapter: Upload adapter is not defined.")),null;const t=new zu(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then(e=>{this._loadersMap.set(e,t)}).catch(()=>{}),t.on("change:uploaded",()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e}),t.on("change:uploadTotal",()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e}),t}destroyLoader(e){const t=e instanceof zu?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach((e,i)=>{e===t&&this._loadersMap.delete(i)})}_updatePendingAction(){const e=this.editor.plugins.get(Nu);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,i=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(i(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",i)}}else e.remove(this._pendingAction),this._pendingAction=null}}Mi(Ou,Jn);class zu{constructor(e,t){this.id=bi(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new Ru,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(e,t)=>t?e/t*100:0),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then(e=>this._filePromiseWrapper?e:null):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new ki.b("filerepository-read-wrong-status: You cannot call read if the status is different than idle.",this);return this.status="reading",this.file.then(e=>this._reader.read(e)).then(e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e}).catch(e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e})}upload(){if("idle"!=this.status)throw new ki.b("filerepository-upload-wrong-status: You cannot call upload if the status is different than idle.",this);return this.status="uploading",this.file.then(()=>this._adapter.upload()).then(e=>(this.uploadResponse=e,this.status="idle",e)).catch(e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e})}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch(()=>{}),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise((i,n)=>{t.rejecter=n,t.isFulfilled=!1,e.then(e=>{t.isFulfilled=!0,i(e)}).catch(e=>{t.isFulfilled=!0,n(e)})}),t}}Mi(zu,Jn);const Du="ckCsrfToken",Lu="abcdefghijklmnopqrstuvwxyz0123456789";function Vu(){let e=function(e){e=e.toLowerCase();const t=document.cookie.split(";");for(const i of t){const t=i.split("=");if(decodeURIComponent(t[0].trim().toLowerCase())===e)return decodeURIComponent(t[1])}return null}(Du);var t,i;return e&&40==e.length||(e=function(e){let t="";const i=new Uint8Array(e);window.crypto.getRandomValues(i);for(let e=0;e.5?n.toUpperCase():n}return t}(40),t=Du,i=e,document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(i)+";path=/"),e}class ju extends vd{static get requires(){return[Ou]}static get pluginName(){return"CKFinderUploadAdapter"}init(){const e=this.editor.config.get("ckfinder.uploadUrl");e&&(this.editor.plugins.get(Ou).createUploadAdapter=t=>new Bu(t,e,this.editor.t))}}class Bu{constructor(e,t,i){this.loader=e,this.url=t,this.t=i}upload(){return this.loader.file.then(e=>new Promise((t,i)=>{this._initRequest(),this._initListeners(t,i,e),this._sendRequest(e)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.url,!0),e.responseType="json"}_initListeners(e,t,i){const n=this.xhr,o=this.loader,r=(0,this.t)("Cannot upload file:")+` ${i.name}.`;n.addEventListener("error",()=>t(r)),n.addEventListener("abort",()=>t()),n.addEventListener("load",()=>{const i=n.response;if(!i||!i.uploaded)return t(i&&i.error&&i.error.message?i.error.message:r);e({default:i.url})}),n.upload&&n.upload.addEventListener("progress",e=>{e.lengthComputable&&(o.uploadTotal=e.total,o.uploaded=e.loaded)})}_sendRequest(e){const t=new FormData;t.append("upload",e),t.append("ckCsrfToken",Vu()),this.xhr.send(t)}}function*Fu(e,t){for(const i of t)i&&e.getAttributeProperties(i[0]).copyOnEnter&&(yield i)}class Hu extends xd{execute(){const e=this.editor.model,t=e.document;e.change(i=>{!function(e,t,i,n){const o=i.isCollapsed,r=i.getFirstRange(),s=r.start.parent,a=r.end.parent;if(n.isLimit(s)||n.isLimit(a))return void(o||s!=a||e.deleteContent(i));if(o){const e=Fu(t.model.schema,i.getAttributes());Uu(t,r.start),t.setSelectionAttribute(e)}else{const n=!(r.start.isAtStart&&r.end.isAtEnd),o=s==a;e.deleteContent(i,{leaveUnmerged:n}),n&&(o?Uu(t,i.focus):t.setSelection(a,0))}}(this.editor.model,i,t.selection,e.schema),this.fire("afterExecute",{writer:i})})}}function Uu(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}class Wu extends Ar{constructor(e){super(e);const t=this.document;t.on("keydown",(e,i)=>{if(this.isEnabled&&i.keyCode==xo.enter){let n;t.once("enter",e=>n=e,{priority:"highest"}),t.fire("enter",new Yr(t,i.domEvent,{isSoft:i.shiftKey})),n&&n.stop.called&&e.stop()}})}observe(){}}class qu extends vd{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,i=t.document;t.addObserver(Wu),e.commands.add("enter",new Hu(e)),this.listenTo(i,"enter",(i,n)=>{n.preventDefault(),n.isSoft||(e.execute("enter"),t.scrollToTheSelection())},{priority:"low"})}}class $u extends xd{execute(){const e=this.editor.model,t=e.document;e.change(i=>{!function(e,t,i){const n=i.isCollapsed,o=i.getFirstRange(),r=o.start.parent,s=o.end.parent,a=r==s;if(n){const n=Fu(e.schema,i.getAttributes());Yu(e,t,o.end),t.removeSelectionAttribute(i.getAttributeKeys()),t.setSelectionAttribute(n)}else{const n=!(o.start.isAtStart&&o.end.isAtEnd);e.deleteContent(i,{leaveUnmerged:n}),a?Yu(e,t,i.focus):n&&t.setSelection(s,0)}}(e,i,t.selection),this.fire("afterExecute",{writer:i})})}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const i=t.anchor;if(!i||!e.checkChild(i,"softBreak"))return!1;const n=t.getFirstRange(),o=n.start.parent,r=n.end.parent;if((Gu(o,e)||Gu(r,e))&&o!==r)return!1;return!0}(e.schema,t.selection)}}function Yu(e,t,i){const n=t.createElement("softBreak");e.insertContent(n,i),t.setSelection(n,"after")}function Gu(e,t){return!e.is("rootElement")&&(t.isLimit(e)||Gu(e.parent,t))}class Ku extends vd{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,i=e.conversion,n=e.editing.view,o=n.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),i.for("upcast").elementToElement({model:"softBreak",view:"br"}),i.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),n.addObserver(Wu),e.commands.add("shiftEnter",new $u(e)),this.listenTo(o,"enter",(t,i)=>{i.preventDefault(),i.isSoft&&(e.execute("shiftEnter"),n.scrollToTheSelection())},{priority:"low"})}}class Ju extends xd{execute(){const e=this.editor.model,t=e.document.selection;let i=e.schema.getLimitElement(t);if(t.containsEntireContent(i)||!Qu(e.schema,i))do{if(i=i.parent,!i)return}while(!Qu(e.schema,i));e.change(e=>{e.setSelection(i,"in")})}}function Qu(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const Zu=Co("Ctrl+A");class Xu extends vd{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new Ju(e)),this.listenTo(t,"keydown",(t,i)=>{Ao(i)===Zu&&(e.execute("selectAll"),i.preventDefault())})}}class em extends vd{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",t=>{const i=e.commands.get("selectAll"),n=new od(t),o=t.t;return n.set({label:o("Select all"),icon:'',keystroke:"Ctrl+A",tooltip:!0}),n.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(n,"execute",()=>{e.execute("selectAll"),e.editing.view.focus()}),n})}}class tm extends vd{static get requires(){return[Xu,em]}static get pluginName(){return"SelectAll"}}class im extends xd{constructor(e,t){super(e),this.direction=t,this._buffer=new Oh(e.model,e.config.get("typing.undoStep"))}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,i=t.document;t.enqueueChange(this._buffer.batch,n=>{this._buffer.lock();const o=n.createSelection(e.selection||i.selection),r=o.isCollapsed;if(o.isCollapsed&&t.modifySelection(o,{direction:this.direction,unit:e.unit}),this._shouldEntireContentBeReplacedWithParagraph(e.sequence||1))return void this._replaceEntireContentWithParagraph(n);if(o.isCollapsed)return;let s=0;o.getFirstRange().getMinimalFlatRanges().forEach(e=>{s+=lo(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),t.deleteContent(o,{doNotResetEntireContent:r,direction:this.direction}),this._buffer.input(s),n.setSelection(o),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,i=t.document.selection,n=t.schema.getLimitElement(i);if(!(i.isCollapsed&&i.containsEntireContent(n)))return!1;if(!t.schema.checkChild(n,"paragraph"))return!1;const o=n.getChild(0);return!o||"paragraph"!==o.name}_replaceEntireContentWithParagraph(e){const t=this.editor.model,i=t.document.selection,n=t.schema.getLimitElement(i),o=e.createElement("paragraph");e.remove(e.createRangeIn(n)),e.insert(o,n),e.setSelection(o,0)}}class nm extends Ar{constructor(e){super(e);const t=e.document;let i=0;function n(e,i,n){let o;t.once("delete",e=>o=e,{priority:Number.POSITIVE_INFINITY}),t.fire("delete",new Yr(t,i,n)),o&&o.stop.called&&e.stop()}t.on("keyup",(e,t)=>{t.keyCode!=xo.delete&&t.keyCode!=xo.backspace||(i=0)}),t.on("keydown",(e,t)=>{const o={};if(t.keyCode==xo.delete)o.direction="forward",o.unit="character";else{if(t.keyCode!=xo.backspace)return;o.direction="backward",o.unit="codePoint"}const r=_o.isMac?t.altKey:t.ctrlKey;o.unit=r?"word":o.unit,o.sequence=++i,n(e,t.domEvent,o)}),_o.isAndroid&&t.on("beforeinput",(t,i)=>{if("deleteContentBackward"!=i.domEvent.inputType)return;const o={unit:"codepoint",direction:"backward",sequence:1},r=i.domTarget.ownerDocument.defaultView.getSelection();r.anchorNode==r.focusNode&&r.anchorOffset+1!=r.focusOffset&&(o.selectionToRemove=e.domConverter.domSelectionToView(r)),n(t,i.domEvent,o)})}observe(){}}class om extends vd{static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,i=t.document;if(t.addObserver(nm),e.commands.add("forwardDelete",new im(e,"forward")),e.commands.add("delete",new im(e,"backward")),this.listenTo(i,"delete",(i,n)=>{const o={unit:n.unit,sequence:n.sequence};if(n.selectionToRemove){const t=e.model.createSelection(),i=[];for(const t of n.selectionToRemove.getRanges())i.push(e.editing.mapper.toModelRange(t));t.setTo(i),o.selection=t}e.execute("forward"==n.direction?"forwardDelete":"delete",o),n.preventDefault(),t.scrollToTheSelection()}),_o.isAndroid){let e=null;this.listenTo(i,"delete",(t,i)=>{const n=i.domTarget.ownerDocument.defaultView.getSelection();e={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}},{priority:"lowest"}),this.listenTo(i,"keyup",(t,i)=>{if(e){const t=i.domTarget.ownerDocument.defaultView.getSelection();t.collapse(e.anchorNode,e.anchorOffset),t.extend(e.focusNode,e.focusOffset),e=null}})}}}class rm extends vd{static get requires(){return[Uh,om]}static get pluginName(){return"Typing"}}const sm=new Map;function am(e,t,i){let n=sm.get(e);n||(n=new Map,sm.set(e,n)),n.set(t,i)}function cm(e){return[e]}function lm(e,t,i={}){const n=function(e,t){const i=sm.get(e);return i&&i.has(t)?i.get(t):cm}(e.constructor,t.constructor);try{return n(e=e.clone(),t,i)}catch(e){throw e}}function dm(e,t,i){e=e.slice(),t=t.slice();const n=new hm(i.document,i.useRelations,i.forceWeakRemove);n.setOriginalOperations(e),n.setOriginalOperations(t);const o=n.originalOperations;if(0==e.length||0==t.length)return{operationsA:e,operationsB:t,originalOperations:o};const r=new WeakMap;for(const t of e)r.set(t,0);const s={nextBaseVersionA:e[e.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:e.length,originalOperationsBCount:t.length};let a=0;for(;a{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const n=e.range.getDifference(t.range).map(t=>new tc(t,e.key,e.oldValue,e.newValue,0)),o=e.range.getIntersection(t.range);return o&&i.aIsStrong&&n.push(new tc(o,t.key,t.newValue,e.newValue,0)),0==n.length?[new Ec(0)]:n}return[e]}),am(tc,oc,(e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const i=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map(t=>new tc(t,e.key,e.oldValue,e.newValue,e.baseVersion));if(t.shouldReceiveAttributes){const n=fm(t,e.key,e.oldValue);n&&i.unshift(n)}return i}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]}),am(tc,cc,(e,t)=>{const i=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&i.push(js._createFromPositionAndShift(t.graveyardPosition,1));const n=e.range._getTransformedByMergeOperation(t);return n.isCollapsed||i.push(n),i.map(t=>new tc(t,e.key,e.oldValue,e.newValue,e.baseVersion))}),am(tc,nc,(e,t)=>function(e,t){const i=js._createFromPositionAndShift(t.sourcePosition,t.howMany);let n=null,o=[];i.containsRange(e,!0)?n=e:e.start.hasSameParentAs(i.start)?(o=e.getDifference(i),n=e.getIntersection(i)):o=[e];const r=[];for(let e of o){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const i=t.getMovedRangeStart(),n=e.start.hasSameParentAs(i);e=e._getTransformedByInsertion(i,t.howMany,n),r.push(...e)}n&&r.push(n._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]);return r}(e.range,t).map(t=>new tc(t,e.key,e.oldValue,e.newValue,e.baseVersion))),am(tc,lc,(e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const i=e.clone();return i.range=new js(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,i]}return e.range=e.range._getTransformedBySplitOperation(t),[e]}),am(oc,tc,(e,t)=>{const i=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const n=fm(e,t.key,t.newValue);n&&i.push(n)}return i}),am(oc,oc,(e,t,i)=>(e.position.isEqual(t.position)&&i.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e])),am(oc,nc,(e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e])),am(oc,lc,(e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e])),am(oc,cc,(e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e])),am(rc,oc,(e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e])),am(rc,rc,(e,t,i)=>{if(e.name==t.name){if(!i.aIsStrong)return[new Ec(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]}),am(rc,cc,(e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e])),am(rc,nc,(e,t,i)=>{if(e.oldRange&&(e.oldRange=js._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(i.abRelation){const n=js._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==i.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.start.path=i.abRelation.path,e.newRange.end=n.end,[e];if("right"==i.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=n.start,e.newRange.end.path=i.abRelation.path,[e]}e.newRange=js._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]}),am(rc,lc,(e,t,i)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(i.abRelation){const n=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&i.abRelation.wasStartBeforeMergedElement?e.newRange.start=zs._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!i.abRelation.wasInLeftElement&&(e.newRange.start=zs._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&i.abRelation.wasInRightElement?e.newRange.end=zs._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&i.abRelation.wasEndBeforeMergedElement?e.newRange.end=zs._createAt(t.insertionPosition):e.newRange.end=n.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]}),am(cc,oc,(e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e])),am(cc,cc,(e,t,i)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(i.bWasUndone){const i=t.graveyardPosition.path.slice();return i.push(0),e.sourcePosition=new zs(t.graveyardPosition.root,i),e.howMany=0,[e]}return[new Ec(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!i.bWasUndone&&"splitAtSource"!=i.abRelation){const n="$graveyard"==e.targetPosition.root.rootName,o="$graveyard"==t.targetPosition.root.rootName,r=n&&!o;if(o&&!n||!r&&i.aIsStrong){const i=t.targetPosition._getTransformedByMergeOperation(t),n=e.targetPosition._getTransformedByMergeOperation(t);return[new nc(i,e.howMany,n,0)]}return[new Ec(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&i.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]}),am(cc,nc,(e,t,i)=>{const n=js._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!i.bWasUndone&&!i.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.sourcePosition)?[new Ec(0)]:(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])}),am(cc,lc,(e,t,i)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const n=0!=t.howMany,o=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(n||o||"mergeTargetNotMoved"==i.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==i.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==i.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}),am(nc,oc,(e,t)=>{const i=js._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=i.start,e.howMany=i.end.offset-i.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]}),am(nc,nc,(e,t,i)=>{const n=js._createFromPositionAndShift(e.sourcePosition,e.howMany),o=js._createFromPositionAndShift(t.sourcePosition,t.howMany);let r,s=i.aIsStrong,a=!i.aIsStrong;if("insertBefore"==i.abRelation||"insertAfter"==i.baRelation?a=!0:"insertAfter"!=i.abRelation&&"insertBefore"!=i.baRelation||(a=!1),r=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),gm(e,t)&&gm(t,e))return[t.getReversed()];if(n.containsPosition(t.targetPosition)&&n.containsRange(o,!0))return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),pm([n],r);if(o.containsPosition(e.targetPosition)&&o.containsRange(n,!0))return n.start=n.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),n.end=n.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),pm([n],r);const c=Vi(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==c||"extension"==c)return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),pm([n],r);"remove"!=e.type||"remove"==t.type||i.aWasUndone||i.forceWeakRemove?"remove"==e.type||"remove"!=t.type||i.bWasUndone||i.forceWeakRemove||(s=!1):s=!0;const l=[],d=n.getDifference(o);for(const e of d){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const i="same"==Vi(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),n=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,i);l.push(...n)}const h=n.getIntersection(o);return null!==h&&s&&(h.start=h.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),h.end=h.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===l.length?l.push(h):1==l.length?o.start.isBefore(n.start)||o.start.isEqual(n.start)?l.unshift(h):l.push(h):l.splice(1,0,h)),0===l.length?[new Ec(e.baseVersion)]:pm(l,r)}),am(nc,lc,(e,t,i)=>{let n=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=i.abRelation||(n=e.targetPosition._getTransformedBySplitOperation(t));const o=js._createFromPositionAndShift(e.sourcePosition,e.howMany);if(o.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=n,[e];if(o.start.hasSameParentAs(t.splitPosition)&&o.containsPosition(t.splitPosition)){let e=new js(t.splitPosition,o.end);e=e._getTransformedBySplitOperation(t);return pm([new js(o.start,t.splitPosition),e],n)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==i.abRelation&&(n=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==i.abRelation&&(n=e.targetPosition);const r=[o._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const n=o.start.isEqual(t.graveyardPosition)||o.containsPosition(t.graveyardPosition);e.howMany>1&&n&&!i.aWasUndone&&r.push(js._createFromPositionAndShift(t.insertionPosition,1))}return pm(r,n)}),am(nc,cc,(e,t,i)=>{const n=js._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.sourcePosition))if("remove"!=e.type||i.forceWeakRemove){if(1==e.howMany)return i.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new Ec(0)]}else if(!i.aWasUndone){const i=[];let n=t.graveyardPosition.clone(),o=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(i.push(new nc(e.sourcePosition,e.howMany-1,e.targetPosition,0)),n=n._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),o=o._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const r=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),s=new nc(n,1,r,0),a=s.getMovedRangeStart().path.slice();a.push(0);const c=new zs(s.targetPosition.root,a);o=o._getTransformedByMove(n,r,1);const l=new nc(o,t.howMany,c,0);return i.push(s),i.push(l),i}const o=js._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=o.start,e.howMany=o.end.offset-o.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]}),am(sc,oc,(e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e])),am(sc,cc,(e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e])),am(sc,nc,(e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e])),am(sc,sc,(e,t,i)=>{if(e.position.isEqual(t.position)){if(!i.aIsStrong)return[new Ec(0)];e.oldName=t.newName}return[e]}),am(sc,lc,(e,t)=>{if("same"==Vi(e.position.path,t.splitPosition.getParentPath())&&!t.graveyardPosition){const t=new sc(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]}),am(ac,ac,(e,t,i)=>{if(e.root===t.root&&e.key===t.key){if(!i.aIsStrong||e.newValue===t.newValue)return[new Ec(0)];e.oldValue=t.newValue}return[e]}),am(lc,oc,(e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset{if(!e.graveyardPosition&&!i.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const i=t.graveyardPosition.path.slice();i.push(0);const n=new zs(t.graveyardPosition.root,i),o=lc.getInsertionPosition(new zs(t.graveyardPosition.root,i)),r=new lc(n,0,null,0);return r.insertionPosition=o,e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=lc.getInsertionPosition(e.splitPosition),e.graveyardPosition=r.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[r,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=lc.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]}),am(lc,nc,(e,t,i)=>{const n=js._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const o=n.start.isEqual(e.graveyardPosition)||n.containsPosition(e.graveyardPosition);if(!i.bWasUndone&&o){const i=e.splitPosition._getTransformedByMoveOperation(t),n=e.graveyardPosition._getTransformedByMoveOperation(t),o=n.path.slice();o.push(0);const r=new zs(n.root,o);return[new nc(i,e.howMany,r,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.splitPosition)){const i=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=i,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new Ec(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new Ec(0)];if("splitBefore"==i.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const n="$graveyard"==e.splitPosition.root.rootName,o="$graveyard"==t.splitPosition.root.rootName,r=n&&!o;if(o&&!n||!r&&i.aIsStrong){const i=[];return t.howMany&&i.push(new nc(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&i.push(new nc(e.splitPosition,e.howMany,e.moveTargetPosition,0)),i}return[new Ec(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==i.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==i.baRelation){const i=t.insertionPosition.path.slice();i.push(0);const n=new zs(t.insertionPosition.root,i);return[e,new nc(e.insertionPosition,1,n,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offsetthis.clearStack())}refresh(){this.isEnabled=this._stack.length>0}addBatch(e){const t=this.editor.model.document.selection,i={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:i}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,i){const n=this.editor.model,o=n.document,r=[],s=e.map(e=>e.getTransformedByOperations(i)),a=s.flat();for(const e of s){const t=e.filter(e=>!km(e,a));wm(t);const i=t.find(e=>e.root!=o.graveyard);i&&r.push(i)}r.length&&n.change(e=>{e.setSelection(r,{backward:t})})}_undo(e,t){const i=this.editor.model,n=i.document;this._createdBatches.add(t);const o=e.operations.slice().filter(e=>e.isDocumentOperation);o.reverse();for(const e of o){const o=e.baseVersion+1,r=Array.from(n.history.getOperations(o)),s=dm([e.getReversed()],r,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(const o of s)t.addOperation(o),i.applyOperation(o),n.history.setOperationAsUndone(e,o)}}}function wm(e){e.sort((e,t)=>e.start.isBefore(t.start)?-1:1);for(let t=1;tt!==e&&t.containsRange(e,!0))}class _m extends bm{execute(e=null){const t=e?this._stack.findIndex(t=>t.batch==e):this._stack.length-1,i=this._stack.splice(t,1)[0],n=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(n,()=>{this._undo(i.batch,n);const e=this.editor.model.document.history.getOperations(i.batch.baseVersion);this._restoreSelection(i.selection.ranges,i.selection.isBackward,e),this.fire("revert",i.batch,n)}),this.refresh()}}class vm extends bm{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(t,()=>{const i=e.batch.operations[e.batch.operations.length-1].baseVersion+1,n=this.editor.model.document.history.getOperations(i);this._restoreSelection(e.selection.ranges,e.selection.isBackward,n),this._undo(e.batch,t)}),this.refresh()}}class ym extends vd{static get pluginName(){return"UndoEditing"}constructor(e){super(e),this._batchRegistry=new WeakSet}init(){const e=this.editor;this._undoCommand=new _m(e),this._redoCommand=new vm(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",(e,t)=>{const i=t[0];if(!i.isDocumentOperation)return;const n=i.batch,o=this._redoCommand._createdBatches.has(n),r=this._undoCommand._createdBatches.has(n);this._batchRegistry.has(n)||"transparent"==n.type&&!o&&!r||(o?this._undoCommand.addBatch(n):r||(this._undoCommand.addBatch(n),this._redoCommand.clearStack()),this._batchRegistry.add(n))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(e,t,i)=>{this._redoCommand.addBatch(i)}),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo")}}var xm='',Am='';class Cm extends vd{init(){const e=this.editor,t=e.locale,i=e.t,n="ltr"==t.uiLanguageDirection?xm:Am,o="ltr"==t.uiLanguageDirection?Am:xm;this._addButton("undo",i("Undo"),"CTRL+Z",n),this._addButton("redo",i("Redo"),"CTRL+Y",o)}_addButton(e,t,i,n){const o=this.editor;o.ui.componentFactory.add(e,r=>{const s=o.commands.get(e),a=new od(r);return a.set({label:t,icon:n,keystroke:i,tooltip:!0}),a.bind("isEnabled").to(s,"isEnabled"),this.listenTo(a,"execute",()=>{o.execute(e),o.editing.view.focus()}),a})}}class Tm extends vd{static get requires(){return[ym,Cm]}static get pluginName(){return"Undo"}}class Pm extends xd{refresh(){this.isEnabled=function(e){const t=e.schema,i=e.document.selection;return function(e,t,i){const n=function(e,t){const i=fh(e,t).parent;if(i.isEmpty&&!i.is("element","$root"))return i.parent;return i}(e,i);return t.checkChild(n,"horizontalLine")}(i,t,e)&&!function(e,t){const i=e.getSelectedElement();return i&&t.isObject(i)}(i,t)}(this.editor.model)}execute(){const e=this.editor.model;e.change(t=>{const i=t.createElement("horizontalLine");e.insertContent(i);let n=i.nextSibling;!(n&&e.schema.checkChild(n,"$text"))&&e.schema.checkChild(i.parent,"paragraph")&&(n=t.createElement("paragraph"),e.insertContent(n,t.createPositionAfter(i))),n&&t.setSelection(n,0)})}}i(47);class Sm extends vd{static get pluginName(){return"HorizontalLineEditing"}init(){const e=this.editor,t=e.model.schema,i=e.t,n=e.conversion;t.register("horizontalLine",{isObject:!0,allowWhere:"$block"}),n.for("dataDowncast").elementToElement({model:"horizontalLine",view:(e,{writer:t})=>t.createEmptyElement("hr")}),n.for("editingDowncast").elementToElement({model:"horizontalLine",view:(e,{writer:t})=>{const n=i("Horizontal line"),o=t.createContainerElement("div"),r=t.createEmptyElement("hr");return t.addClass("ck-horizontal-line",o),t.setCustomProperty("hr",!0,o),t.insert(t.createPositionAt(o,0),r),function(e,t,i){return t.setCustomProperty("horizontalLine",!0,e),dh(e,t,{label:i})}(o,t,n)}}),n.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),e.commands.add("horizontalLine",new Pm(e))}}class Em extends vd{init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("horizontalLine",i=>{const n=e.commands.get("horizontalLine"),o=new od(i);return o.set({label:t("Horizontal line"),icon:'',tooltip:!0}),o.bind("isEnabled").to(n,"isEnabled"),this.listenTo(o,"execute",()=>{e.execute("horizontalLine"),e.editing.view.focus()}),o})}}class Mm extends xd{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,i=t.document.selection,n=e.value;t.change(e=>{if(i.isCollapsed)n?e.setSelectionAttribute(this.attributeKey,n):e.removeSelectionAttribute(this.attributeKey);else{const o=t.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const t of o)n?e.setAttribute(this.attributeKey,n,t):e.removeAttribute(this.attributeKey,t)}})}}class Im extends od{constructor(e){super(e);const t=this.bindTemplate;this.set("color"),this.set("hasBorder"),this.icon='',this.extendTemplate({attributes:{style:{backgroundColor:t.to("color")},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-table__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}i(49);class Nm extends Ol{constructor(e,t){super(e);const i=t&&t.colorDefinitions||[],n={};t&&t.columns&&(n.gridTemplateColumns=`repeat( ${t.columns}, 1fr)`),this.set("selectedColor"),this.items=this.createCollection(),this.focusTracker=new rl,this.keystrokes=new Jc,this._focusCycler=new ql({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowleft",focusNext:"arrowright"}}),this.items.on("add",(e,t)=>{t.isOn=t.color===this.selectedColor}),i.forEach(e=>{const t=new Im;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",()=>{this.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})}),this.items.add(t)}),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:n}}),this.on("change:selectedColor",(e,t,i)=>{for(const e of this.items)e.isOn=e.color===i})}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}}class Rm extends Ii{constructor(e){super(e),this.set("isEmpty",!0),this.on("change",()=>{this.set("isEmpty",0===this.length)})}add(e,t){this.find(t=>t.color===e.color)||super.add(e,t)}hasColor(e){return!!this.find(t=>t.color===e)}}Mi(Rm,Jn);i(51);class Om extends Ol{constructor(e,{colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:o,documentColorsCount:r}){super(e),this.items=this.createCollection(),this.colorDefinitions=t,this.focusTracker=new rl,this.keystrokes=new Jc,this.set("selectedColor"),this.removeButtonLabel=n,this.columns=i,this.documentColors=new Rm,this.documentColorsCount=r,this._focusCycler=new ql({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this._documentColorsLabel=o,this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-table"]},children:this.items}),this.items.add(this._removeColorButton())}updateDocumentColors(e,t){const i=e.document,n=this.documentColorsCount;this.documentColors.clear();for(const o of i.getRootNames()){const r=i.getRoot(o),s=e.createRangeIn(r);for(const e of s.getItems())if(e.is("$textProxy")&&e.hasAttribute(t)&&(this._addColorToDocumentColors(e.getAttribute(t)),this.documentColors.length>=n))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,i=this.selectedColor;t.selectedColor=i,e&&(e.selectedColor=i)}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}appendGrids(){if(!this.staticColorsGrid&&(this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount)){const e=gl.bind(this.documentColors,this.documentColors),t=new Vl(this.locale);t.text=this._documentColorsLabel,t.extendTemplate({attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]}}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_removeColorButton(){const e=new od;return e.set({withText:!0,icon:'',tooltip:!0,label:this.removeButtonLabel}),e.class="ck-color-table__remove-color",e.on("execute",()=>{this.fire("execute",{value:null})}),e}_createStaticColorsGrid(){const e=new Nm(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.delegate("execute").to(this),e}_createDocumentColorsGrid(){const e=gl.bind(this.documentColors,this.documentColors),t=new Nm(this.locale,{columns:this.columns});return t.delegate("execute").to(this),t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using(e=>{const t=new Im;return t.set({color:e.color,hasBorder:e.options&&e.options.hasBorder}),e.label&&t.set({label:e.label,tooltip:!0}),t.on("execute",()=>{this.fire("execute",{value:e.color})}),t}),this.documentColors.on("change:isEmpty",(e,i,n)=>{n&&(t.selectedColor=null)}),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find(t=>t.color===e);t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}const zm="fontSize",Dm="fontColor";function Lm(e){return(t,{writer:i})=>i.createAttributeElement("span",{style:`${e}:${t}`},{priority:7})}class Vm extends Mm{constructor(e){super(e,Dm)}}class jm extends vd{static get pluginName(){return"FontColorEditing"}constructor(e){var t;super(e),e.config.define(Dm,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:Dm,value:(t="color",e=>e.getStyle(t).replace(/\s/g,""))}}),e.conversion.for("downcast").attributeToElement({model:Dm,view:Lm("color")}),e.commands.add(Dm,new Vm(e)),e.model.schema.extend("$text",{allowAttributes:Dm}),e.model.schema.setAttributeProperties(Dm,{isFormatting:!0,copyOnEnter:!0})}}function Bm(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:""+e.color}}}}class Fm extends vd{constructor(e,{commandName:t,icon:i,componentName:n,dropdownLabel:o}){super(e),this.commandName=t,this.componentName=n,this.icon=i,this.dropdownLabel=o,this.columns=e.config.get(this.componentName+".columns"),this.colorTableView}init(){const e=this.editor,t=e.locale,i=t.t,n=e.commands.get(this.commandName);const o=function(e,t){const i=e.t,n={Black:i("Black"),"Dim grey":i("Dim grey"),Grey:i("Grey"),"Light grey":i("Light grey"),White:i("White"),Red:i("Red"),Orange:i("Orange"),Yellow:i("Yellow"),"Light green":i("Light green"),Green:i("Green"),Aquamarine:i("Aquamarine"),Turquoise:i("Turquoise"),"Light blue":i("Light blue"),Blue:i("Blue"),Purple:i("Purple")};return t.map(e=>{const t=n[e.label];return t&&t!=e.label&&(e.label=t),e})}(t,e.config.get(this.componentName).colors.map(Bm).filter(e=>!!e)),r=e.config.get(this.componentName+".documentColors");e.ui.componentFactory.add(this.componentName,t=>{const s=ud(t);return this.colorTableView=function({dropdownView:e,colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:o,documentColorsCount:r}){const s=e.locale,a=new Om(s,{colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:o,documentColorsCount:r});return e.colorTableView=a,e.panelView.children.add(a),a.delegate("execute").to(e,"execute"),a}({dropdownView:s,colors:o.map(e=>({label:e.label,color:e.model,options:{hasBorder:e.hasBorder}})),columns:this.columns,removeButtonLabel:i("Remove color"),documentColorsLabel:0!==r?i("Document colors"):void 0,documentColorsCount:void 0===r?this.columns:r}),this.colorTableView.bind("selectedColor").to(n,"value"),s.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),s.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),s.bind("isEnabled").to(n),s.on("execute",(t,i)=>{e.execute(this.commandName,i),e.editing.view.focus()}),s.on("change:isOpen",(t,i,n)=>{s.colorTableView.appendGrids(),n&&(0!==r&&this.colorTableView.updateDocumentColors(e.model,this.componentName),this.colorTableView.updateSelectedColors())}),s})}}class Hm extends Fm{constructor(e){const t=e.locale.t;super(e,{commandName:Dm,componentName:Dm,icon:'',dropdownLabel:t("Font Color")})}static get pluginName(){return"FontColorUI"}}class Um extends Mm{constructor(e){super(e,zm)}}function Wm(e){return e.map(e=>function(e){if(t=e,"object"==typeof t&&t.title&&t.model&&t.view)return $m(e);var t;const i=function(e){return qm[e]||qm[e.model]}(e);if(i)return $m(i);if("default"===e)return{model:void 0,title:"Default"};if(function(e){let t;if("object"==typeof e){if(!e.model)throw new ki.b("font-size-invalid-definition: Provided font size definition is invalid.",null,e);t=parseFloat(e.model)}else t=parseFloat(e);return isNaN(t)}(e))return;return function(e){"number"!=typeof e&&"string"!=typeof e||(e={title:String(e),model:parseFloat(e)+"px"});return e.view={name:"span",styles:{"font-size":e.model}},$m(e)}(e)}(e)).filter(e=>!!e)}const qm={get tiny(){return{title:"Tiny",model:"tiny",view:{name:"span",classes:"text-tiny",priority:7}}},get small(){return{title:"Small",model:"small",view:{name:"span",classes:"text-small",priority:7}}},get big(){return{title:"Big",model:"big",view:{name:"span",classes:"text-big",priority:7}}},get huge(){return{title:"Huge",model:"huge",view:{name:"span",classes:"text-huge",priority:7}}}};function $m(e){return e.view.priority||(e.view.priority=7),e}class Ym extends vd{static get pluginName(){return"FontSizeEditing"}constructor(e){super(e),e.config.define(zm,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:zm}),e.model.schema.setAttributeProperties(zm,{isFormatting:!0,copyOnEnter:!0});const t=e.config.get("fontSize.supportAllValues"),i=Wm(this.editor.config.get("fontSize.options")).filter(e=>e.model),n=function(e,t){const i={model:{key:e,values:[]},view:{},upcastAlso:{}};for(const e of t)i.model.values.push(e.model),i.view[e.model]=e.view,e.upcastAlso&&(i.upcastAlso[e.model]=e.upcastAlso);return i}(zm,i);t?this._prepareAnyValueConverters(n):e.conversion.attributeToElement(n),e.commands.add(zm,new Um(e))}_prepareAnyValueConverters(e){const t=this.editor,i=e.model.values.filter(e=>!String(e).match(/[\d.]+[\w%]+/));if(i.length)throw new ki.b("font-size-invalid-use-of-named-presets: If config.fontSize.supportAllValues is set to true, you need to use numerical values as font size options.",null,{presets:i});t.conversion.for("downcast").attributeToElement({model:zm,view:(e,{writer:t})=>{if(e)return t.createAttributeElement("span",{style:"font-size:"+e},{priority:7})}}),t.conversion.for("upcast").attributeToAttribute({model:{key:zm,value:e=>e.getStyle("font-size")},view:{name:"span"}})}}class Gm{constructor(e,t){t&&qn(this,t),e&&this.set(e)}}Mi(Gm,Jn);i(53);class Km extends vd{init(){const e=this.editor,t=e.t,i=this._getLocalizedOptions(),n=e.commands.get(zm);e.ui.componentFactory.add(zm,o=>{const r=ud(o);return fd(r,function(e,t){const i=new Ii;for(const n of e){const e={type:"button",model:new Gm({commandName:zm,commandParam:n.model,label:n.title,class:"ck-fontsize-option",withText:!0})};n.view&&n.view.styles&&e.model.set("labelStyle","font-size:"+n.view.styles["font-size"]),n.view&&n.view.classes&&e.model.set("class",`${e.model.class} ${n.view.classes}`),e.model.bind("isOn").to(t,"value",e=>e===n.model),i.add(e)}return i}(i,n)),r.buttonView.set({label:t("Font Size"),icon:'',tooltip:!0}),r.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),r.bind("isEnabled").to(n),this.listenTo(r,"execute",t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()}),r})}_getLocalizedOptions(){const e=this.editor,t=e.t,i={Default:t("Default"),Tiny:t("Tiny"),Small:t("Small"),Big:t("Big"),Huge:t("Huge")};return Wm(e.config.get(zm).options).map(e=>{const t=i[e.title];return t&&t!=e.title&&(e=Object.assign({},e,{title:t})),e})}}class Jm extends xd{refresh(){const e=this.editor.model,t=Cd(e.document.selection.getSelectedBlocks());this.value=!!t&&t.is("element","paragraph"),this.isEnabled=!!t&&Qm(t,e.schema)}execute(e={}){const t=this.editor.model,i=t.document;t.change(n=>{const o=(e.selection||i.selection).getSelectedBlocks();for(const e of o)!e.is("element","paragraph")&&Qm(e,t.schema)&&n.rename(e,"paragraph")})}}function Qm(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class Zm extends xd{execute(e){const t=this.editor.model;let i=e.position;t.change(e=>{const n=e.createElement("paragraph");if(!t.schema.checkChild(i.parent,n)){const o=t.schema.findAllowedParent(i,n);if(!o)return;i=e.split(i,o).position}t.insertContent(n,i),e.setSelection(n,"in")})}}class Xm extends vd{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new Jm(e)),e.commands.add("insertParagraph",new Zm(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>Xm.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}Xm.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);class ef extends xd{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=Cd(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some(t=>tf(e,t,this.editor.model.schema))}execute(e){const t=this.editor.model,i=t.document,n=e.value;t.change(e=>{const o=Array.from(i.selection.getSelectedBlocks()).filter(e=>tf(e,n,t.schema));for(const t of o)t.is("element",n)||e.rename(t,n)})}}function tf(e,t,i){return i.checkChild(e.parent,t)&&!i.isObject(e)}const nf="paragraph";class of extends vd{static get pluginName(){return"HeadingEditing"}constructor(e){super(e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[Xm]}init(){const e=this.editor,t=e.config.get("heading.options"),i=[];for(const n of t)n.model!==nf&&(e.model.schema.register(n.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(n),i.push(n.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new ef(e,i))}afterInit(){const e=this.editor,t=e.commands.get("enter"),i=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",(t,n)=>{const o=e.model.document.selection.getFirstPosition().parent;i.some(e=>o.is("element",e.model))&&!o.is("element",nf)&&0===o.childCount&&n.writer.rename(o,nf)})}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:wi.get("low")+1})}}i(11);class rf extends vd{init(){const e=this.editor,t=e.t,i=function(e){const t=e.t,i={Paragraph:t("Paragraph"),"Heading 1":t("Heading 1"),"Heading 2":t("Heading 2"),"Heading 3":t("Heading 3"),"Heading 4":t("Heading 4"),"Heading 5":t("Heading 5"),"Heading 6":t("Heading 6")};return e.config.get("heading.options").map(e=>{const t=i[e.title];return t&&t!=e.title&&(e.title=t),e})}(e),n=t("Choose heading"),o=t("Heading");e.ui.componentFactory.add("heading",t=>{const r={},s=new Ii,a=e.commands.get("heading"),c=e.commands.get("paragraph"),l=[a];for(const e of i){const t={type:"button",model:new Gm({label:e.title,class:e.class,withText:!0})};"paragraph"===e.model?(t.model.bind("isOn").to(c,"value"),t.model.set("commandName","paragraph"),l.push(c)):(t.model.bind("isOn").to(a,"value",t=>t===e.model),t.model.set({commandName:"heading",commandValue:e.model})),s.add(t),r[e.model]=e.title}const d=ud(t);return fd(d,s),d.buttonView.set({isOn:!1,withText:!0,tooltip:o}),d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),d.bind("isEnabled").toMany(l,"isEnabled",(...e)=>e.some(e=>e)),d.buttonView.bind("label").to(a,"value",c,"value",(e,t)=>{const i=e||t&&"paragraph";return r[i]?r[i]:n}),this.listenTo(d,"execute",t=>{e.execute(t.source.commandName,t.source.commandValue?{value:t.source.commandValue}:void 0),e.editing.view.focus()}),d})}}i(56);const sf=["before","after"],af=(new DOMParser).parseFromString('\n',"image/svg+xml").firstChild,cf="ck-widget__type-around_disabled";class lf extends vd{static get pluginName(){return"WidgetTypeAround"}constructor(e){super(e),this._currentFakeCaretModelElement=null}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",(i,n,o)=>{t.change(e=>{for(const i of t.document.roots)o?e.removeClass(cf,i):e.addClass(cf,i)}),o||e.model.change(e=>{e.removeSelectionAttribute(rh)})}),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration()}destroy(){this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const i=this.editor,n=i.editing.view;i.execute("insertParagraph",{position:i.model.createPositionAt(e,t)}),n.focus(),n.scrollToTheSelection()}_listenToIfEnabled(e,t,i,n){this.listenTo(e,t,(...e)=>{this.isEnabled&&i(...e)},n)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=ah(e);if(!t)return!1;const i=e.getSelectedElement();return this._insertParagraph(i,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,i=e.locale.t,n={before:i("Insert paragraph before block"),after:i("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",(e,i,o)=>{const r=o.mapper.toViewElement(i.item);sh(r,i.item,t)&&function(e,t,i){const n=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(e){const i=this.toDomElement(e);return function(e,t){for(const i of sf){const n=new gl({tag:"div",attributes:{class:["ck","ck-widget__type-around__button","ck-widget__type-around__button_"+i],title:t[i]},children:[e.ownerDocument.importNode(af,!0)]});e.appendChild(n.render())}}(i,t),function(e){const t=new gl({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(i),i}));e.insert(e.createPositionAt(i,"end"),n)}(o.writer,n,r)},{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,i=t.document.selection,n=t.schema,o=e.editing.view;function r(e){return"ck-widget_type-around_show-fake-caret_"+e}this._listenToIfEnabled(o.document,"keydown",(e,t)=>{Po(t.keyCode)&&this._handleArrowKeyPress(e,t)},{priority:wi.get("high")+10}),this._listenToIfEnabled(i,"change:range",(t,i)=>{i.directChange&&e.model.change(e=>{e.removeSelectionAttribute(rh)})}),this._listenToIfEnabled(t.document,"change:data",()=>{const t=i.getSelectedElement();if(t){if(sh(e.editing.mapper.toViewElement(t),t,n))return}e.model.change(e=>{e.removeSelectionAttribute(rh)})}),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",(e,t,i)=>{const o=i.writer;if(this._currentFakeCaretModelElement){const e=i.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(o.removeClass(sf.map(r),e),this._currentFakeCaretModelElement=null)}const s=t.selection.getSelectedElement();if(!s)return;const a=i.mapper.toViewElement(s);if(!sh(a,s,n))return;const c=ah(t.selection);c&&(o.addClass(r(c),a),this._currentFakeCaretModelElement=s)}),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",(t,i,n)=>{n||e.model.change(e=>{e.removeSelectionAttribute(rh)})})}_handleArrowKeyPress(e,t){const i=this.editor,n=i.model,o=n.document.selection,r=n.schema,s=i.editing.view,a=Eo(t.keyCode,i.locale.contentLanguageDirection),c=s.document.selection.getSelectedElement();let l;sh(c,i.editing.mapper.toModelElement(c),r)?l=this._handleArrowKeyPressOnSelectedWidget(a):o.isCollapsed&&(l=this._handleArrowKeyPressWhenSelectionNextToAWidget(a)),l&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,i=ah(t.document.selection);return t.change(t=>{if(!i)return t.setSelectionAttribute(rh,e?"after":"before"),!0;if(!(i===(e?"after":"before")))return t.removeSelectionAttribute(rh),!0;return!1})}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,i=t.model,n=i.schema,o=t.plugins.get("Widget"),r=o._getObjectElementNextToSelection(e);return!!sh(t.editing.mapper.toViewElement(r),r,n)&&(i.change(t=>{o._setSelectionOverElement(r),t.setSelectionAttribute(rh,e?"before":"after")}),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",(i,n)=>{const o=n.domTarget.closest(".ck-widget__type-around__button");if(!o)return;const r=function(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(o),s=function(e,t){const i=e.closest(".ck-widget");return t.mapDomToView(i)}(o,t.domConverter),a=e.editing.mapper.toModelElement(s);this._insertParagraph(a,r),n.preventDefault(),i.stop()})}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"enter",(i,n)=>{const o=t.document.selection.getSelectedElement(),r=e.editing.mapper.toModelElement(o),s=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:sh(o,r,s)&&(this._insertParagraph(r,n.isSoft?"before":"after"),a=!0),a&&(n.preventDefault(),i.stop())})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view,t=[xo.enter,xo.delete,xo.backspace];this._listenToIfEnabled(e.document,"keydown",(e,i)=>{t.includes(i.keyCode)||Lh(i)||this._insertParagraphAccordingToFakeCaretPosition()},{priority:wi.get("high")+1})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,i=e.model,n=i.schema;this._listenToIfEnabled(t.document,"delete",(t,o)=>{const r=ah(i.document.selection);if(!r)return;const s=o.direction,a=i.document.selection.getSelectedElement(),c="forward"==s;if("before"===r===c)e.execute("delete",{selection:i.createSelection(a,"on")});else{const t=n.getNearestSelectionRange(i.createPositionAt(a,r),s);if(t)if(t.isCollapsed){const o=i.createSelection(t.start);if(i.modifySelection(o,{direction:s}),o.focus.isEqual(t.start)){const e=function(e,t){let i=t;for(const n of t.getAncestors({parentFirst:!0})){if(n.childCount>1||e.isLimit(n))break;i=n}return i}(n,t.start.parent);i.deleteContent(i.createSelection(e,"on"),{doNotAutoparagraph:!0})}else i.change(i=>{i.setSelection(t),e.execute(c?"forwardDelete":"delete")})}else i.change(i=>{i.setSelection(t),e.execute(c?"forwardDelete":"delete")})}o.preventDefault(),t.stop()},{priority:wi.get("high")+1})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,i=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",(e,[n,o])=>{if(o&&!o.is("documentSelection"))return;const r=ah(i);return r?(e.stop(),t.change(e=>{const o=i.getSelectedElement(),s=t.createPositionAt(o,r),a=e.createSelection(s),c=t.insertContent(n,a);return e.setSelection(a),c})):void 0},{priority:"high"})}}i(58);function df(e){const t=e.model;return(i,n)=>{const o=n.keyCode==xo.arrowup,r=n.keyCode==xo.arrowdown,s=n.shiftKey,a=t.document.selection;if(!o&&!r)return;const c=r;if(s&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(a,c))return;const l=function(e,t,i){const n=e.model;if(i){const e=t.isCollapsed?t.focus:t.getLastPosition(),i=hf(n,e,"forward");if(!i)return null;const o=n.createRange(e,i),r=uf(n.schema,o,"backward");return r&&e.isBefore(r)?n.createRange(e,r):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),i=hf(n,e,"backward");if(!i)return null;const o=n.createRange(i,e),r=uf(n.schema,o,"forward");return r&&e.isAfter(r)?n.createRange(r,e):null}}(e,a,c);l&&!l.isCollapsed&&function(e,t,i){const n=e.model,o=e.view.domConverter;if(i){const e=n.createSelection(t.start);n.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=n.createRange(e.focus,t.end))}const r=e.mapper.toViewRange(t),s=o.viewRangeToDom(r),a=fs.getDomRangeRects(s);let c;for(const e of a)if(void 0!==c){if(Math.round(e.top)>=c)return!1;c=Math.max(c,Math.round(e.bottom))}else c=Math.round(e.bottom);return!0}(e,l,c)&&(t.change(e=>{const i=c?l.end:l.start;if(s){const n=t.createSelection(a.anchor);n.setFocus(i),e.setSelection(n)}else e.setSelection(i)}),i.stop(),n.preventDefault(),n.stopPropagation())}}function hf(e,t,i){const n=e.schema,o=e.createRangeIn(t.root),r="forward"==i?"elementStart":"elementEnd";for(const{previousPosition:e,item:s,type:a}of o.getWalker({startPosition:t,direction:i})){if(n.isLimit(s)&&!n.isInline(s))return e;if(a==r&&n.isBlock(s))return null}return null}function uf(e,t,i){const n="backward"==i?t.end:t.start;if(e.checkChild(n,"$text"))return n;for(const{nextPosition:n}of t.getWalker({direction:i}))if(e.checkChild(n,"$text"))return n}class mf extends vd{static get pluginName(){return"Widget"}static get requires(){return[lf]}init(){const e=this.editor.editing.view,t=e.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",(e,t,i)=>{this._clearPreviouslySelectedWidgets(i.writer);const n=i.writer,o=n.document.selection,r=o.getSelectedElement();let s=null;for(const e of o.getRanges())for(const t of e){const e=t.item;lh(e)&&!ff(e,s)&&(n.addClass(ch,e),this._previouslySelected.add(e),s=e,e==r&&n.setSelection(o.getRanges(),{fake:!0,label:uh(r)}))}},{priority:"low"}),e.addObserver(Th),this.listenTo(t,"mousedown",(...e)=>this._onMousedown(...e)),this.listenTo(t,"keydown",(...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)},{priority:"high"}),this.listenTo(t,"keydown",(...e)=>{this._preventDefaultOnArrowKeyPress(...e)},{priority:wi.get("high")-20}),this.listenTo(t,"keydown",df(this.editor.editing)),this.listenTo(t,"delete",(e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())},{priority:"high"})}_onMousedown(e,t){const i=this.editor,n=i.editing.view,o=n.document;let r=t.target;if(function(e){for(;e;){if(e.is("editableElement")&&!e.is("rootElement"))return!0;if(lh(e))return!1;e=e.parent}return!1}(r)){if((_o.isSafari||_o.isGecko)&&t.domEvent.detail>=3){const e=i.editing.mapper,n=r.is("attributeElement")?r.findAncestor(e=>!e.is("attributeElement")):r,o=e.toModelElement(n);t.preventDefault(),this.editor.model.change(e=>{e.setSelection(o,"in")})}return}if(!lh(r)&&(r=r.findAncestor(lh),!r))return;t.preventDefault(),o.isFocused||n.focus();const s=i.editing.mapper.toModelElement(r);this._setSelectionOverElement(s)}_handleSelectionChangeOnArrowKeyPress(e,t){const i=t.keyCode;if(!Po(i))return;const n=this.editor.model,o=n.schema,r=n.document.selection,s=r.getSelectedElement(),a=Eo(i,this.editor.locale.contentLanguageDirection);if(s&&o.isObject(s)){const i=a?r.getLastPosition():r.getFirstPosition(),s=o.getNearestSelectionRange(i,a?"forward":"backward");return void(s&&(n.change(e=>{e.setSelection(s)}),t.preventDefault(),e.stop()))}if(!r.isCollapsed)return;const c=this._getObjectElementNextToSelection(a);c&&o.isObject(c)&&(this._setSelectionOverElement(c),t.preventDefault(),e.stop())}_preventDefaultOnArrowKeyPress(e,t){if(!Po(t.keyCode))return;const i=this.editor.model,n=i.schema,o=i.document.selection.getSelectedElement();o&&n.isObject(o)&&(t.preventDefault(),e.stop())}_handleDelete(e){if(this.editor.isReadOnly)return;const t=this.editor.model.document.selection;if(!t.isCollapsed)return;const i=this._getObjectElementNextToSelection(e);return i?(this.editor.model.change(e=>{let n=t.anchor.parent;for(;n.isEmpty;){const t=n;n=t.parent,e.remove(t)}this._setSelectionOverElement(i)}),!0):void 0}_setSelectionOverElement(e){this.editor.model.change(t=>{t.setSelection(t.createRangeOn(e))})}_getObjectElementNextToSelection(e){const t=this.editor.model,i=t.schema,n=t.document.selection,o=t.createSelection(n);t.modifySelection(o,{direction:e?"forward":"backward"});const r=e?o.focus.nodeBefore:o.focus.nodeAfter;return r&&i.isObject(r)?r:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(ch,t);this._previouslySelected.clear()}}function ff(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}class gf extends xd{refresh(){const e=this.editor.model.document.selection.getSelectedElement();this.isEnabled=wh(e),wh(e)&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor.model,i=t.document.selection.getSelectedElement();t.change(t=>{t.setAttribute("alt",e.newValue,i)})}}class pf extends vd{static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new gf(this.editor))}}i(60);class bf extends Ol{constructor(e,t){super(e);const i="ck-labeled-field-view-"+bi(),n="ck-labeled-field-view-status-"+bi();this.fieldView=t(this,i,n),this.set("label"),this.set("isEnabled",!0),this.set("errorText",null),this.set("infoText",null),this.set("class"),this.labelView=this._createLabelView(i),this.statusView=this._createStatusView(n),this.bind("_statusText").to(this,"errorText",this,"infoText",(e,t)=>e||t);const o=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",o.to("class"),o.if("isEnabled","ck-disabled",e=>!e)]},children:[this.labelView,this.fieldView,this.statusView]})}_createLabelView(e){const t=new Vl(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new Ol(this.locale),i=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",i.if("errorText","ck-labeled-field-view__status_error"),i.if("_statusText","ck-hidden",e=>!e)],id:e,role:i.if("errorText","alert")},children:[{text:i.to("_statusText")}]}),t}focus(){this.fieldView.focus()}}i(62);class wf extends Ol{constructor(e){super(e),this.set("value"),this.set("id"),this.set("placeholder"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById");const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{type:"text",class:["ck","ck-input","ck-input-text",t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),readonly:t.to("isReadOnly"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById")},on:{input:t.to("input")}})}render(){super.render();const e=e=>{this.element.value=e||0===e?e:""};e(this.value),this.on("change:value",(t,i,n)=>{e(n)})}select(){this.element.select()}focus(){this.element.focus()}}function kf(e,t,i){const n=new wf(e.locale);return n.set({id:t,ariaDescribedById:i}),n.bind("isReadOnly").to(e,"isEnabled",e=>!e),n.bind("hasError").to(e,"errorText",e=>!!e),n.on("input",()=>{e.errorText=null}),n}function _f({view:e}){e.listenTo(e.element,"submit",(t,i)=>{i.preventDefault(),e.fire("submit")},{useCapture:!0})}var vf='',yf='';i(64);class xf extends Ol{constructor(e){super(e);const t=this.locale.t;this.focusTracker=new rl,this.keystrokes=new Jc,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(t("Save"),vf,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(t("Cancel"),yf,"ck-button-cancel","cancel"),this._focusables=new fl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),_f({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)})}_createButton(e,t,i,n){const o=new od(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:i}}),n&&o.delegate("execute").to(this,n),o}_createLabeledInputView(){const e=this.locale.t,t=new bf(this.locale,kf);return t.label=e("Text alternative"),t.fieldView.placeholder=e("Text alternative"),t}}i(66),i(68);const Af=Hl("px");class Cf extends vd{static get pluginName(){return"ContextualBalloon"}constructor(e){super(e),this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.view=new eh(e.locale),e.ui.view.body.add(this.view),e.ui.focusTracker.add(this.view.element),this._viewToStack=new Map,this._idToStack=new Map,this.set("_numberOfStacks",0),this.set("_singleViewMode",!1),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this.hasView(e.view))throw new ki.b("contextualballoon-add-view-exist: Cannot add configuration of the same view twice.",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const i=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),i.set(e.view,e),this._viewToStack.set(e.view,i),i===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new ki.b("contextualballoon-remove-view-not-exist: Cannot remove the configuration of a non-existent view.",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new ki.b("contextualballoon-showstack-stack-not-exist: Cannot show a stack that does not exist.",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find(t=>t[1]===e)[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new Tf(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(e,t)=>!t&&e>1),e.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(e,i)=>{if(i<2)return"";const n=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[n,i])}),e.buttonNextView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),e.buttonPrevView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),e}_createFakePanelsView(){const e=new Pf(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(e,t)=>!t&&e>=2?Math.min(e-1,2):0),e.listenTo(this.view,"change:top",()=>e.updatePosition()),e.listenTo(this.view,"change:left",()=>e.updatePosition()),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:i=!0,singleViewMode:n=!1}){this.view.class=t,this.view.withArrow=i,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),n&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&!e.limiter&&(e=Object.assign({},e,{limiter:this.positionLimiter})),e}}class Tf extends Ol{constructor(e){super(e);const t=e.t,i=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new rl,this.buttonPrevView=this._createButtonView(t("Previous"),''),this.buttonNextView=this._createButtonView(t("Next"),''),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",i.to("isNavigationVisible",e=>e?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:i.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const i=new od(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i}}class Pf extends Ol{constructor(e,t){super(e);const i=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",i.to("numberOfPanels",e=>e?"":"ck-hidden")],style:{top:i.to("top",Af),left:i.to("left",Af),width:i.to("width",Af),height:i.to("height",Af)}},children:this.content}),this.on("change:numberOfPanels",(e,t,i,n)=>{i>n?this._addPanels(i-n):this._removePanels(n-i),this.updatePosition()})}_addPanels(e){for(;e--;){const e=new Ol;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:i,height:n}=new fs(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:i,height:n})}}}function Sf(e){const t=e.editing.view,i=eh.defaultPositions;return{target:t.domConverter.viewToDom(t.document.selection.getSelectedElement()),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast]}}class Ef extends vd{static get requires(){return[Cf]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton(),this._createForm()}destroy(){super.destroy(),this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",i=>{const n=e.commands.get("imageTextAlternative"),o=new od(i);return o.set({label:t("Change image text alternative"),icon:'',tooltip:!0}),o.bind("isEnabled").to(n,"isEnabled"),this.listenTo(o,"execute",()=>{this._showForm()}),o})}_createForm(){const e=this.editor,t=e.editing.view.document;this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new xf(e.locale),this._form.render(),this.listenTo(this._form,"submit",()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),this._form.keystrokes.set("Esc",(e,t)=>{this._hideForm(!0),t()}),this.listenTo(e.ui,"update",()=>{bh(t.selection)?this._isVisible&&function(e){const t=e.plugins.get("ContextualBalloon");if(bh(e.editing.view.document.selection)){const i=Sf(e);t.updatePosition(i)}}(e):this._hideForm(!0)}),hd({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;const e=this.editor,t=e.commands.get("imageTextAlternative"),i=this._form.labeledInput;this._isInBalloon||this._balloon.add({view:this._form,position:Sf(e)}),i.fieldView.value=i.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select()}_hideForm(e){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView===this._form}get _isInBalloon(){return this._balloon.hasView(this._form)}}class Mf extends vd{static get requires(){return[pf,Ef]}static get pluginName(){return"ImageTextAlternative"}}i(70);function If(e){for(const t of e.getChildren())if(t&&t.is("element","caption"))return t;return null}function Nf(e){const t=e.parent;return"figcaption"==e.name&&t&&"figure"==t.name&&t.hasClass("image")?{name:!0}:null}class Rf extends vd{static get pluginName(){return"ImageCaptionEditing"}init(){const e=this.editor,t=e.editing.view,i=e.model.schema,n=e.data,o=e.editing,r=e.t;i.register("caption",{allowIn:"image",allowContentOf:"$block",isLimit:!0}),e.model.document.registerPostFixer(e=>this._insertMissingModelCaptionElement(e)),e.conversion.for("upcast").elementToElement({view:Nf,model:"caption"});n.downcastDispatcher.on("insert:caption",Of(e=>e.createContainerElement("figcaption"),!1));const s=function(e,t){return i=>{const n=i.createEditableElement("figcaption");return i.setCustomProperty("imageCaption",!0,n),cl({view:e,element:n,text:t}),mh(n,i)}}(t,r("Enter image caption"));o.downcastDispatcher.on("insert:caption",Of(s)),o.downcastDispatcher.on("insert",this._fixCaptionVisibility(e=>e.item),{priority:"high"}),o.downcastDispatcher.on("remove",this._fixCaptionVisibility(e=>e.position.parent),{priority:"high"}),t.document.registerPostFixer(e=>this._updateCaptionVisibility(e))}_updateCaptionVisibility(e){const t=this.editor.editing.mapper,i=this._lastSelectedCaption;let n;const o=this.editor.model.document.selection,r=o.getSelectedElement();if(r&&r.is("element","image")){const e=If(r);n=t.toViewElement(e)}const s=zf(o.getFirstPosition().parent);if(s&&(n=t.toViewElement(s)),n)return i?(i===n||(Df(i,e),this._lastSelectedCaption=n),Lf(n,e)):(this._lastSelectedCaption=n,Lf(n,e));if(i){const t=Df(i,e);return this._lastSelectedCaption=null,t}return!1}_fixCaptionVisibility(e){return(t,i,n)=>{const o=zf(e(i)),r=this.editor.editing.mapper,s=n.writer;if(o){const e=r.toViewElement(o);e&&(o.childCount?s.removeClass("ck-hidden",e):s.addClass("ck-hidden",e))}}}_insertMissingModelCaptionElement(e){const t=this.editor.model,i=t.document.differ.getChanges(),n=[];for(const e of i)if("insert"==e.type&&"$text"!=e.name){const i=e.position.nodeAfter;if(i.is("element","image")&&!If(i)&&n.push(i),!i.is("element","image")&&i.childCount)for(const e of t.createRangeIn(i).getItems())e.is("element","image")&&!If(e)&&n.push(e)}for(const t of n)e.appendElement("caption",t);return!!n.length}}function Of(e,t=!0){return(i,n,o)=>{const r=n.item;if((r.childCount||t)&&wh(r.parent)){if(!o.consumable.consume(n.item,"insert"))return;const t=o.mapper.toViewElement(n.range.start.parent),i=e(o.writer),s=o.writer;r.childCount||s.addClass("ck-hidden",i),function(e,t,i,n){const o=n.writer.createPositionAt(i,"end");n.writer.insert(o,e),n.mapper.bindElements(t,e)}(i,n.item,t,o)}}}function zf(e){const t=e.getAncestors({includeSelf:!0}).find(e=>"caption"==e.name);return t&&t.parent&&"image"==t.parent.name?t:null}function Df(e,t){return!e.childCount&&!e.hasClass("ck-hidden")&&(t.addClass("ck-hidden",e),!0)}function Lf(e,t){return!!e.hasClass("ck-hidden")&&(t.removeClass("ck-hidden",e),!0)}i(72);class Vf extends xd{refresh(){const e=this.editor.model.document.selection.getSelectedElement();this.isEnabled=wh(e),e&&e.hasAttribute("width")?this.value={width:e.getAttribute("width"),height:null}:this.value=null}execute(e){const t=this.editor.model,i=t.document.selection.getSelectedElement();this.value={width:e.width,height:null},i&&t.change(t=>{t.setAttribute("width",e.width,i)})}}class jf extends vd{static get pluginName(){return"ImageResizeEditing"}constructor(e){super(e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"imageResize:original",value:null,icon:"original"},{name:"imageResize:25",value:"25",icon:"small"},{name:"imageResize:50",value:"50",icon:"medium"},{name:"imageResize:75",value:"75",icon:"large"}]})}init(){const e=this.editor,t=new Vf(e);this._registerSchema(),this._registerConverters(),e.commands.add("imageResize",t)}_registerSchema(){this.editor.model.schema.extend("image",{allowAttributes:"width"}),this.editor.model.schema.setAttributeProperties("width",{isFormatting:!0})}_registerConverters(){const e=this.editor;e.conversion.for("downcast").add(e=>e.on("attribute:width:image",(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,o=i.mapper.toViewElement(t.item);null!==t.attributeNewValue?(n.setStyle("width",t.attributeNewValue,o),n.addClass("image_resized",o)):(n.removeStyle("width",o),n.removeClass("image_resized",o))})),e.conversion.for("upcast").attributeToAttribute({view:{name:"figure",styles:{width:/.+/}},model:{key:"width",value:e=>e.getStyle("width")}})}}var Bf='';const Ff={small:'',medium:Bf,large:'',original:''};class Hf extends vd{static get requires(){return[jf]}static get pluginName(){return"ImageResizeButtons"}constructor(e){super(e),this._resizeUnit=e.config.get("image.resizeUnit")}init(){const e=this.editor,t=e.config.get("image.resizeOptions"),i=e.commands.get("imageResize");this.bind("isEnabled").to(i);for(const e of t)this._registerImageResizeButton(e);this._registerImageResizeDropdown(t)}_registerImageResizeButton(e){const t=this.editor,{name:i,value:n,icon:o}=e,r=n?n+this._resizeUnit:null;t.ui.componentFactory.add(i,n=>{const s=new od(n),a=t.commands.get("imageResize"),c=this._getOptionLabelValue(e,!0);if(!Ff[o])throw new ki.b('imageresizebuttons-missing-icon: The resize option "'+i+'" misses the "icon" property or the property value doesn\'t match any of the available icons.',t,e);return s.set({label:c,icon:Ff[o],tooltip:c,isToggleable:!0}),s.bind("isEnabled").to(this),s.bind("isOn").to(a,"value",Uf(r)),this.listenTo(s,"execute",()=>{t.execute("imageResize",{width:r})}),s})}_registerImageResizeDropdown(e){const t=this.editor,i=t.t,n=e.find(e=>!e.value);t.ui.componentFactory.add("imageResize",o=>{const r=t.commands.get("imageResize"),s=ud(o,sd),a=s.buttonView;return a.set({tooltip:i("Resize image"),commandValue:n.value,icon:Bf,isToggleable:!0,label:this._getOptionLabelValue(n),withText:!0,class:"ck-resize-image-button"}),a.bind("label").to(r,"value",e=>e&&e.width?e.width:this._getOptionLabelValue(n)),s.bind("isOn").to(r),s.bind("isEnabled").to(this),fd(s,this._getResizeDropdownListItemDefinitions(e,r)),s.listView.ariaLabel=i("Image resize list"),this.listenTo(s,"execute",e=>{t.execute(e.source.commandName,{width:e.source.commandValue}),t.editing.view.focus()}),s})}_getOptionLabelValue(e,t){const i=this.editor.t;return e.label?e.label:t?e.value?i("Resize image to %0",e.value+this._resizeUnit):i("Resize image to the original size"):e.value?e.value+this._resizeUnit:i("Original")}_getResizeDropdownListItemDefinitions(e,t){const i=new Ii;return e.map(e=>{const n=e.value?e.value+this._resizeUnit:null,o={type:"button",model:new Gm({commandName:"imageResize",commandValue:n,label:this._getOptionLabelValue(e),withText:!0,icon:null})};o.model.bind("isOn").to(t,"value",Uf(n)),i.add(o)}),i}}function Uf(e){return t=>null===e&&t===e||t&&t.width===e}class Wf{constructor(e){this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}begin(e,t,i){const n=new fs(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const i of t)if(e.classList.contains(qf(i)))return i}(e),this._referenceCoordinates=function(e,t){const i=new fs(e),n=t.split("-"),o={x:"right"==n[1]?i.right:i.left,y:"bottom"==n[0]?i.bottom:i.top};return o.x+=e.ownerDocument.defaultView.scrollX,o.y+=e.ownerDocument.defaultView.scrollY,o}(t,function(e){const t=e.split("-"),i={top:"bottom",bottom:"top",left:"right",right:"left"};return`${i[t[0]]}-${i[t[1]]}`}(this.activeHandlePosition)),this.originalWidth=n.width,this.originalHeight=n.height,this.aspectRatio=n.width/n.height;const o=i.style.width;o&&o.match(/^\d+\.?\d*%$/)?this.originalWidthPercents=parseFloat(o):this.originalWidthPercents=function(e,t){const i=e.parentElement,n=parseFloat(i.ownerDocument.defaultView.getComputedStyle(i).width);return t.width/n*100}(i,n)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function qf(e){return"ck-widget__resizer__handle-"+e}Mi(Wf,Jn);class $f{constructor(e){this._options=e,this._domResizerWrapper=null,this._viewResizerWrapper=null,this.set("isEnabled",!0),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())},{priority:"high"}),this.on("change:isEnabled",()=>{this.isEnabled&&this.redraw()})}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change(i=>{const n=i.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(t){const i=this.toDomElement(t);return e._appendHandles(i),e._appendSizeUI(i),e._domResizerWrapper=i,e.on("change:isEnabled",(e,t,n)=>{i.style.display=n?"":"none"}),i.style.display=e.isEnabled?"":"none",i}));i.insert(i.createPositionAt(t,"end"),n),i.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=n})}begin(e){this.state=new Wf(this._options),this._sizeUI.bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change(e=>{const i=this._options.unit||"%",n=("%"===i?t.widthPercents:t.width)+i;e.setStyle("width",n,this._options.viewElement)});const i=this._getHandleHost(),n=new fs(i);t.handleHostWidth=Math.round(n.width),t.handleHostHeight=Math.round(n.height);const o=new fs(i);t.width=Math.round(o.width),t.height=Math.round(o.height),this.redraw(n),this.state.update(t)}commit(){const e=this._options.unit||"%",t=("%"===e?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change(()=>{this._cleanup(),this._options.onCommit(t)})}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!((i=t)&&i.ownerDocument&&i.ownerDocument.contains(i)))return;var i;const n=t.parentElement,o=this._getHandleHost(),r=this._viewResizerWrapper,s=[r.getStyle("width"),r.getStyle("height"),r.getStyle("left"),r.getStyle("top")];let a;if(n.isSameNode(o)){const t=e||new fs(o);a=[t.width+"px",t.height+"px",void 0,void 0]}else a=[o.offsetWidth+"px",o.offsetHeight+"px",o.offsetLeft+"px",o.offsetTop+"px"];"same"!==Vi(s,a)&&this._options.editor.editing.view.change(e=>{e.setStyle({width:a[0],height:a[1],left:a[2],top:a[3]},r)})}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeUI.dismiss(),this._sizeUI.isVisible=!1;this._options.editor.editing.view.change(e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)})}_proposeNewSize(e){const t=this.state,i={x:(n=e).pageX,y:n.pageY};var n;const o=!this._options.isCentered||this._options.isCentered(this),r={x:t._referenceCoordinates.x-(i.x+t.originalWidth),y:i.y-t.originalHeight-t._referenceCoordinates.y};o&&t.activeHandlePosition.endsWith("-right")&&(r.x=i.x-(t._referenceCoordinates.x+t.originalWidth)),o&&(r.x*=2);const s={width:Math.abs(t.originalWidth+r.x),height:Math.abs(t.originalHeight+r.y)};s.dominant=s.width/t.aspectRatio>s.height?"width":"height",s.max=s[s.dominant];const a={width:s.width,height:s.height};return"width"==s.dominant?a.height=a.width/t.aspectRatio:a.width=a.height*t.aspectRatio,{width:Math.round(a.width),height:Math.round(a.height),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*a.width*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const n of t)e.appendChild(new gl({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(i=n,"ck-widget__resizer__handle-"+i)}}).render());var i}_appendSizeUI(e){const t=new Yf;t.render(),this._sizeUI=t,e.appendChild(t.element)}}Mi($f,Jn);class Yf extends Ol{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("activeHandlePosition",e=>e?"ck-orientation-"+e:"")],style:{display:e.if("isVisible","none",e=>!e)}},children:[{text:e.to("label")}]})}bindToState(e,t){this.bind("isVisible").to(t,"proposedWidth",t,"proposedHeight",(e,t)=>null!==e&&null!==t),this.bind("label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",(t,i,n)=>"px"===e.unit?`${t}×${i}`:n+"%"),this.bind("activeHandlePosition").to(t)}dismiss(){this.unbind(),this.isVisible=!1}}var Gf=function(e,t,i){var n=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return L(i)&&(n="leading"in i?!!i.leading:n,o="trailing"in i?!!i.trailing:o),rs(e,t,{leading:n,maxWait:t,trailing:o})};i(74);class Kf extends vd{static get pluginName(){return"WidgetResize"}init(){this.set("_visibleResizer",null),this.set("_activeResizer",null),this._resizers=new Map;const e=ur.window.document;this.editor.model.schema.setAttributeProperties("width",{isFormatting:!0}),this.editor.editing.view.addObserver(Th),this._observer=Object.create(vr),this.listenTo(this.editor.editing.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(e,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(e,"mouseup",this._mouseUpListener.bind(this));const t=()=>{this._visibleResizer&&this._visibleResizer.redraw()},i=Gf(t,200);this.on("change:_visibleResizer",t),this.editor.ui.on("update",i),this._observer.listenTo(ur.window,"resize",i);const n=this.editor.editing.view.document.selection;n.on("change",()=>{const e=n.getSelectedElement();this._visibleResizer=this._getResizerByViewElement(e)||null})}destroy(){this._observer.stopListening();for(const e of this._resizers.values())e.destroy()}attachTo(e){const t=new $f(e),i=this.editor.plugins;if(t.attach(),i.has("WidgetToolbarRepository")){const e=i.get("WidgetToolbarRepository");t.on("begin",()=>{e.forceDisabled("resize")},{priority:"lowest"}),t.on("cancel",()=>{e.clearForceDisabled("resize")},{priority:"highest"}),t.on("commit",()=>{e.clearForceDisabled("resize")},{priority:"highest"})}return this._resizers.set(e.viewElement,t),t}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_getResizerByViewElement(e){return this._resizers.get(e)}_mouseDownListener(e,t){const i=t.domTarget;$f.isResizeHandle(i)&&(this._activeResizer=this._getResizerByHandle(i),this._activeResizer&&(this._activeResizer.begin(i),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}Mi(Kf,Jn);class Jf extends vd{static get requires(){return[Kf]}static get pluginName(){return"ImageResizeHandles"}init(){const e=this.editor,t=e.commands.get("imageResize");this.bind("isEnabled").to(t),e.editing.downcastDispatcher.on("insert:image",(t,i,n)=>{const o=n.mapper.toViewElement(i.item),r=e.plugins.get(Kf).attachTo({unit:e.config.get("image.resizeUnit"),modelElement:i.item,viewElement:o,editor:e,getHandleHost:e=>e.querySelector("img"),getResizeHost:e=>e,isCentered(){const e=i.item.getAttribute("imageStyle");return!e||"full"==e||"alignCenter"==e},onCommit(t){e.execute("imageResize",{width:t})}});r.on("updateSize",()=>{o.hasClass("image_resized")||e.editing.view.change(e=>{e.addClass("image_resized",o)})}),r.bind("isEnabled").to(this)},{priority:"low"})}}i(76);class Qf extends xd{constructor(e,t){super(e),this.defaultStyle=!1,this.styles=t.reduce((e,t)=>(e[t.name]=t,t.isDefault&&(this.defaultStyle=t.name),e),{})}refresh(){const e=this.editor.model.document.selection.getSelectedElement();if(this.isEnabled=wh(e),e)if(e.hasAttribute("imageStyle")){const t=e.getAttribute("imageStyle");this.value=!!this.styles[t]&&t}else this.value=this.defaultStyle;else this.value=!1}execute(e){const t=e.value,i=this.editor.model,n=i.document.selection.getSelectedElement();i.change(e=>{this.styles[t].isDefault?e.removeAttribute("imageStyle",n):e.setAttribute("imageStyle",t,n)})}}function Zf(e,t){for(const i of t)if(i.name===e)return i}var Xf='',eg='',tg='',ig='';const ng={full:{name:"full",title:"Full size image",icon:Xf,isDefault:!0},side:{name:"side",title:"Side image",icon:ig,className:"image-style-side"},alignLeft:{name:"alignLeft",title:"Left aligned image",icon:eg,className:"image-style-align-left"},alignCenter:{name:"alignCenter",title:"Centered image",icon:tg,className:"image-style-align-center"},alignRight:{name:"alignRight",title:"Right aligned image",icon:ig,className:"image-style-align-right"}},og={full:Xf,left:eg,right:ig,center:tg};function rg(e=[]){return e.map(sg)}function sg(e){if("string"==typeof e){const t=e;ng[t]?e=Object.assign({},ng[t]):(console.warn(Object(ki.a)("image-style-not-found: There is no such image style of given name."),{name:t}),e={name:t})}else if(ng[e.name]){const t=ng[e.name],i=Object.assign({},e);for(const n in t)Object.prototype.hasOwnProperty.call(e,n)||(i[n]=t[n]);e=i}return"string"==typeof e.icon&&og[e.icon]&&(e.icon=og[e.icon]),e}class ag extends vd{static get pluginName(){return"ImageStyleEditing"}init(){const e=this.editor,t=e.model.schema,i=e.data,n=e.editing;e.config.define("image.styles",["full","side"]);const o=rg(e.config.get("image.styles"));t.extend("image",{allowAttributes:"imageStyle"});const r=function(e){return(t,i,n)=>{if(!n.consumable.consume(i.item,t.name))return;const o=Zf(i.attributeNewValue,e),r=Zf(i.attributeOldValue,e),s=n.mapper.toViewElement(i.item),a=n.writer;r&&a.removeClass(r.className,s),o&&a.addClass(o.className,s)}}(o);n.downcastDispatcher.on("attribute:imageStyle:image",r),i.downcastDispatcher.on("attribute:imageStyle:image",r),i.upcastDispatcher.on("element:figure",function(e){const t=e.filter(e=>!e.isDefault);return(e,i,n)=>{if(!i.modelRange)return;const o=i.viewItem,r=Cd(i.modelRange.getItems());if(n.schema.checkAttribute(r,"imageStyle"))for(const e of t)n.consumable.consume(o,{classes:e.className})&&n.writer.setAttribute("imageStyle",e.name,r)}}(o),{priority:"low"}),e.commands.add("imageStyle",new Qf(e,o))}}i(78);class cg extends vd{static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){const e=function(e,t){for(const i of e)t[i.title]&&(i.title=t[i.title]);return e}(rg(this.editor.config.get("image.styles")),this.localizedDefaultStylesTitles);for(const t of e)this._createButton(t)}_createButton(e){const t=this.editor,i="imageStyle:"+e.name;t.ui.componentFactory.add(i,i=>{const n=t.commands.get("imageStyle"),o=new od(i);return o.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(n,"isEnabled"),o.bind("isOn").to(n,"value",t=>t===e.name),this.listenTo(o,"execute",()=>{t.execute("imageStyle",{value:e.name}),t.editing.view.focus()}),o})}}class lg extends vd{static get requires(){return[Cf]}static get pluginName(){return"WidgetToolbarRepository"}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",t=>{(function(e){const t=e.getSelectedElement();return!(!t||!lh(t))})(e.editing.view.document.selection)&&t.stop()},{priority:"high"})}this._toolbarDefinitions=new Map,this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui,"update",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui.focusTracker,"change:isFocused",()=>{this._updateToolbarsVisibility()},{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:i,getRelatedElement:n,balloonClassName:o="ck-toolbar-container"}){if(!i.length)return void console.warn(Object(ki.a)("widget-toolbar-no-items: Trying to register a toolbar without items."),{toolbarId:e});const r=this.editor,s=r.t,a=new gd(r.locale);if(a.ariaLabel=t||s("Widget toolbar"),this._toolbarDefinitions.has(e))throw new ki.b("widget-toolbar-duplicated: Toolbar with the given id was already added.",this,{toolbarId:e});a.fillFromConfig(i,r.ui.componentFactory),this._toolbarDefinitions.set(e,{view:a,getRelatedElement:n,balloonClassName:o})}_updateToolbarsVisibility(){let e=0,t=null,i=null;for(const n of this._toolbarDefinitions.values()){const o=n.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&o)if(this.editor.ui.focusTracker.isFocused){const r=o.getAncestors().length;r>e&&(e=r,t=o,i=n)}else this._isToolbarVisible(n)&&this._hideToolbar(n);else this._isToolbarInBalloon(n)&&this._hideToolbar(n)}i&&this._showToolbar(i,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?dg(this.editor,t):this._isToolbarInBalloon(e)||(this._balloon.add({view:e.view,position:hg(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);dg(this.editor,t)}}))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function dg(e,t){const i=e.plugins.get("ContextualBalloon"),n=hg(e,t);i.updatePosition(n)}function hg(e,t){const i=e.editing.view,n=eh.defaultPositions;return{target:i.domConverter.mapViewToDom(t),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,gh]}}i(80);class ug extends Ol{constructor(e){super(e);const t=this.bindTemplate;this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(),this.arrowView=this._createArrowView(),this.keystrokes=new Jc,this.focusTracker=new rl,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",t.if("isVisible","ck-hidden",e=>!e),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",(e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())}),this.keystrokes.set("arrowleft",(e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())})}focus(){this.actionView.focus()}_createActionView(){const e=new od;return e.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),e.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),e.delegate("execute").to(this),e}_createArrowView(){const e=new od,t=e.bindTemplate;return e.icon=rd,e.extendTemplate({attributes:{class:"ck-splitbutton__arrow","aria-haspopup":!0,"aria-expanded":t.to("isOn",e=>String(e))}}),e.bind("isEnabled").to(this),e.delegate("execute").to(this,"open"),e}}i(82);class mg extends Ol{constructor(e,t={}){super(e);const i=this.bindTemplate;this.set("class",t.class||null),this.children=this.createCollection(),t.children&&t.children.forEach(e=>this.children.add(e)),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",i.to("class")],role:i.to("_role"),"aria-labelledby":i.to("_ariaLabelledBy")},children:this.children})}}var fg='';i(84);class gg extends Ol{constructor(e,t){super(e);const{insertButtonView:i,cancelButtonView:n}=this._createActionButtons(e);if(this.insertButtonView=i,this.cancelButtonView=n,this.dropdownView=this._createDropdownView(e),this.set("imageURLInputValue",""),this.focusTracker=new rl,this.keystrokes=new Jc,this._focusables=new fl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.set("_integrations",new Ii),t)for(const[e,i]of Object.entries(t))"insertImageViaUrl"===e&&(i.fieldView.bind("value").to(this,"imageURLInputValue",e=>e||""),i.fieldView.on("input",()=>{this.imageURLInputValue=i.fieldView.element.value})),this._integrations.add(i);this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-upload-form"],tabindex:"-1"},children:[...this._integrations,new mg(e,{children:[this.insertButtonView,this.cancelButtonView],class:"ck-image-upload-form__action-row"})]})}render(){super.render(),_f({view:this});const e=[...this._integrations,this.insertButtonView,this.cancelButtonView];e.forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element);const t=e=>e.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t),this.listenTo(e[0].element,"selectstart",(e,t)=>{t.stopPropagation()},{priority:"high"})}_createDropdownView(e){const t=e.t,i=ud(e,ug),n=i.buttonView,o=i.panelView;return n.set({label:t("Insert image"),icon:fg,tooltip:!0}),o.extendTemplate({attributes:{class:"ck-image-upload__panel"}}),i}_createActionButtons(e){const t=e.t,i=new od(e),n=new od(e);return i.set({label:t("Insert"),icon:vf,class:"ck-button-save",type:"submit",withText:!0,isEnabled:this.imageURLInputValue}),n.set({label:t("Cancel"),icon:yf,class:"ck-button-cancel",withText:!0}),i.bind("isEnabled").to(this,"imageURLInputValue"),i.delegate("execute").to(this,"submit"),n.delegate("execute").to(this,"cancel"),{insertButtonView:i,cancelButtonView:n}}focus(){this._focusCycler.focusFirst()}}class pg extends Ol{constructor(e){super(e),this.buttonView=new od(e),this._fileInputView=new bg(e),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.setTemplate({tag:"span",attributes:{class:"ck-file-dialog-button"},children:[this.buttonView,this._fileInputView]}),this.buttonView.on("execute",()=>{this._fileInputView.open()})}focus(){this.buttonView.focus()}}class bg extends Ol{constructor(e){super(e),this.set("acceptedType"),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""})}})}open(){this.element.click()}}function wg(e){const t=e.map(e=>e.replace("+","\\+"));return new RegExp(`^image\\/(${t.join("|")})$`)}function kg(e){const t=e.t,i=new bf(e,kf);return i.set({label:t("Insert image via URL")}),i.fieldView.placeholder="https://example.com/src/image.png",i.infoText=t("Paste the image source URL."),i}class _g extends vd{static get pluginName(){return"ImageUploadUI"}init(){const e=this.editor,t=!!e.config.get("image.upload.panel.items");e.ui.componentFactory.add("imageUpload",e=>t?this._createDropdownView(e):this._createFileDialogButtonView(e))}_setUpDropdown(e,t,i){const n=this.editor,o=n.t,r=t.insertButtonView;function s(){n.editing.view.focus(),e.isOpen=!1}return e.bind("isEnabled").to(i),e.on("change:isOpen",()=>{const i=n.model.document.selection.getSelectedElement();e.isOpen&&(t.focus(),wh(i)?(t.imageURLInputValue=i.getAttribute("src"),r.label=o("Update")):(t.imageURLInputValue="",r.label=o("Insert")))}),t.delegate("submit","cancel").to(e),this.delegate("cancel").to(e),e.on("submit",()=>{s(),function(){const e=n.model.document.selection.getSelectedElement();wh(e)?n.model.change(i=>{i.setAttribute("src",t.imageURLInputValue,e),i.removeAttribute("srcset",e),i.removeAttribute("sizes",e)}):n.execute("imageInsert",{source:t.imageURLInputValue})}()}),e.on("cancel",()=>{s()}),e}_createDropdownView(e){const t=this.editor,i=new gg(e,function(e){const t=e.config.get("image.upload.panel.items"),i=e.plugins.get("ImageUploadUI"),n={insertImageViaUrl:kg(e.locale)};if(!t)return n;if(t.find(e=>"openCKFinder"===e)&&e.ui.componentFactory.has("ckfinder")){const t=e.ui.componentFactory.create("ckfinder");t.set({withText:!0,class:"ck-image-upload__ck-finder-button"}),t.delegate("execute").to(i,"cancel"),n.openCKFinder=t}return t.reduce((t,i)=>(n[i]?t[i]=n[i]:e.ui.componentFactory.has(i)&&(t[i]=e.ui.componentFactory.create(i)),t),{})}(t)),n=t.commands.get("imageUpload"),o=i.dropdownView,r=o.panelView;return o.buttonView.actionView=this._createFileDialogButtonView(e),r.children.add(i),this._setUpDropdown(o,i,n)}_createFileDialogButtonView(e){const t=this.editor,i=e.t,n=t.config.get("image.upload.types"),o=new pg(e),r=wg(n),s=t.commands.get("imageUpload");return o.set({acceptedType:n.map(e=>"image/"+e).join(","),allowMultipleFiles:!0}),o.buttonView.set({label:i("Insert image"),icon:fg,tooltip:!0}),o.buttonView.bind("isEnabled").to(s),o.on("done",(e,i)=>{const n=Array.from(i).filter(e=>r.test(e.type));n.length&&t.execute("imageUpload",{file:n})}),o}}i(86),i(88),i(90);class vg extends vd{constructor(e){super(e),this.placeholder="data:image/svg+xml;utf8,"+encodeURIComponent('')}init(){this.editor.editing.downcastDispatcher.on("attribute:uploadStatus:image",(...e)=>this.uploadStatusChange(...e))}uploadStatusChange(e,t,i){const n=this.editor,o=t.item,r=o.getAttribute("uploadId");if(!i.consumable.consume(t.item,e.name))return;const s=n.plugins.get(Ou),a=r?t.attributeNewValue:null,c=this.placeholder,l=n.editing.mapper.toViewElement(o),d=i.writer;if("reading"==a)return yg(l,d),void xg(c,l,d);if("uploading"==a){const e=s.loaders.get(r);return yg(l,d),void(e?(Ag(l,d),function(e,t,i,n){const o=function(e){const t=e.createUIElement("div",{class:"ck-progress-bar"});return e.setCustomProperty("progressBar",!0,t),t}(t);t.insert(t.createPositionAt(e,"end"),o),i.on("change:uploadedPercent",(e,t,i)=>{n.change(e=>{e.setStyle("width",i+"%",o)})})}(l,d,e,n.editing.view),function(e,t,i){if(i.data){const n=vh(e);t.setAttribute("src",i.data,n)}}(l,d,e)):xg(c,l,d))}"complete"==a&&s.loaders.get(r)&&function(e,t,i){const n=t.createUIElement("div",{class:"ck-image-upload-complete-icon"});t.insert(t.createPositionAt(e,"end"),n),setTimeout(()=>{i.change(e=>e.remove(e.createRangeOn(n)))},3e3)}(l,d,n.editing.view),function(e,t){Tg(e,t,"progressBar")}(l,d),Ag(l,d),function(e,t){t.removeClass("ck-appear",e)}(l,d)}}function yg(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function xg(e,t,i){t.hasClass("ck-image-upload-placeholder")||i.addClass("ck-image-upload-placeholder",t);const n=vh(t);n.getAttribute("src")!==e&&i.setAttribute("src",e,n),Cg(t,"placeholder")||i.insert(i.createPositionAfter(n),function(e){const t=e.createUIElement("div",{class:"ck-upload-placeholder-loader"});return e.setCustomProperty("placeholder",!0,t),t}(i))}function Ag(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),Tg(e,t,"placeholder")}function Cg(e,t){for(const i of e.getChildren())if(i.getCustomProperty(t))return i}function Tg(e,t,i){const n=Cg(e,i);n&&t.remove(t.createRangeOn(n))}class Pg{constructor(e){this.document=e}createDocumentFragment(e){return new Do(this.document,e)}createElement(e,t,i){return new Fn(this.document,e,t,i)}createText(e){return new Fi(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,i){return i._insertChild(e,t)}removeChildren(e,t,i){return i._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const i=e.parent;if(i){const n=i.getChildIndex(e);return this.removeChildren(n,1,i),this.insertChild(n,t,i),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const i=t.getChildIndex(e);this.remove(e),this.insertChild(i,e.getChildren(),t)}}rename(e,t){const i=new Fn(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,i)?i:null}setAttribute(e,t,i){i._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,i){y(e)&&void 0===i&&(i=t),i._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,i){i._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return so._createAt(e,t)}createPositionAfter(e){return so._createAfter(e)}createPositionBefore(e){return so._createBefore(e)}createRange(e,t){return new ao(e,t)}createRangeOn(e){return ao._createOn(e)}createRangeIn(e){return ao._createIn(e)}createSelection(e,t,i){return new ho(e,t,i)}}class Sg extends xd{refresh(){const e=this.editor.model.document.selection.getSelectedElement(),t=e&&"image"===e.name||!1;this.isEnabled=_h(this.editor.model)||t}execute(e){const t=this.editor,i=t.model,n=t.plugins.get(Ou);i.change(t=>{const o=Array.isArray(e.file)?e.file:[e.file];for(const e of o)Eg(t,i,n,e)})}}function Eg(e,t,i,n){const o=i.createLoader(n);o&&kh(e,t,{uploadId:o.id})}class Mg extends vd{static get requires(){return[Ou,Su,Yh]}static get pluginName(){return"ImageUploadEditing"}constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}})}init(){const e=this.editor,t=e.model.document,i=e.model.schema,n=e.conversion,o=e.plugins.get(Ou),r=wg(e.config.get("image.upload.types"));i.extend("image",{allowAttributes:["uploadId","uploadStatus"]}),e.commands.add("imageUpload",new Sg(e)),n.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(e.editing.view.document,"clipboardInput",(t,i)=>{if(n=i.dataTransfer,Array.from(n.types).includes("text/html")&&""!==n.getData("text/html"))return;var n;const o=Array.from(i.dataTransfer.files).filter(e=>!!e&&r.test(e.type)),s=i.targetRanges.map(t=>e.editing.mapper.toModelRange(t));e.model.change(i=>{i.setSelection(s),o.length&&(t.stop(),e.model.enqueueChange("default",()=>{e.execute("imageUpload",{file:o})}))})}),this.listenTo(e.plugins.get(Yh),"inputTransformation",(t,i)=>{const n=Array.from(e.editing.view.createRangeIn(i.content)).filter(e=>{return!(!(t=e.item).is("element","img")||!t.getAttribute("src"))&&(t.getAttribute("src").match(/^data:image\/\w+;base64,/g)||t.getAttribute("src").match(/^blob:/g))&&!e.item.getAttribute("uploadProcessed");var t}).map(e=>{return{promise:(t=e.item,new Promise((e,i)=>{const n=t.getAttribute("src");fetch(n).then(e=>e.blob()).then(t=>{const i=function(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}(t,n),o=i.replace("image/",""),r=new File([t],"image."+o,{type:i});e(r)}).catch(i)})),imageElement:e.item};var t});if(!n.length)return;const r=new Pg(e.editing.view.document);for(const e of n){r.setAttribute("uploadProcessed",!0,e.imageElement);const t=o.createLoader(e.promise);t&&(r.setAttribute("src","",e.imageElement),r.setAttribute("uploadId",t.id,e.imageElement))}}),e.editing.view.document.on("dragover",(e,t)=>{t.preventDefault()}),t.on("change",()=>{const i=t.differ.getChanges({includeChangesInGraveyard:!0});for(const t of i)if("insert"==t.type&&"$text"!=t.name){const i=t.position.nodeAfter,n="$graveyard"==t.position.root.rootName;for(const t of Ig(e,i)){const e=t.getAttribute("uploadId");if(!e)continue;const i=o.loaders.get(e);i&&(n?i.abort():"idle"==i.status&&this._readAndUpload(i,t))}}})}_readAndUpload(e,t){const i=this.editor,n=i.model,o=i.locale.t,r=i.plugins.get(Ou),s=i.plugins.get(Su);return n.enqueueChange("transparent",e=>{e.setAttribute("uploadStatus","reading",t)}),e.read().then(()=>{const o=e.upload();if(_o.isSafari){const e=vh(i.editing.mapper.toViewElement(t));i.editing.view.once("render",()=>{if(!e.parent)return;const t=i.editing.view.domConverter.mapViewToDom(e.parent);if(!t)return;const n=t.style.display;t.style.display="none",t._ckHack=t.offsetHeight,t.style.display=n})}return n.enqueueChange("transparent",e=>{e.setAttribute("uploadStatus","uploading",t)}),o}).then(e=>{n.enqueueChange("transparent",i=>{i.setAttributes({uploadStatus:"complete",src:e.default},t),this._parseAndSetSrcsetAttributeOnImage(e,t,i)}),a()}).catch(i=>{if("error"!==e.status&&"aborted"!==e.status)throw i;"error"==e.status&&i&&s.showWarning(i,{title:o("Upload failed"),namespace:"upload"}),a(),n.enqueueChange("transparent",e=>{e.remove(t)})});function a(){n.enqueueChange("transparent",e=>{e.removeAttribute("uploadId",t),e.removeAttribute("uploadStatus",t)}),r.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,i){let n=0;const o=Object.keys(e).filter(e=>{const t=parseInt(e,10);if(!isNaN(t))return n=Math.max(n,t),!0}).map(t=>`${e[t]} ${t}w`).join(", ");""!=o&&i.setAttribute("srcset",{data:o,width:n},t)}}function Ig(e,t){return Array.from(e.model.createRangeOn(t)).filter(e=>e.item.is("element","image")).map(e=>e.item)}class Ng extends xd{constructor(e){super(e),this._childCommands=[]}refresh(){}execute(...e){return this._getFirstEnabledCommand().execute(e)}registerChildCommand(e){this._childCommands.push(e),e.on("change:isEnabled",()=>this._checkEnabled()),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){return this._childCommands.find(e=>e.isEnabled)}}class Rg extends vd{static get pluginName(){return"IndentEditing"}init(){const e=this.editor;e.commands.add("indent",new Ng(e)),e.commands.add("outdent",new Ng(e))}}var Og='',zg='';class Dg extends vd{static get pluginName(){return"IndentUI"}init(){const e=this.editor,t=e.locale,i=e.t,n="ltr"==t.uiLanguageDirection?Og:zg,o="ltr"==t.uiLanguageDirection?zg:Og;this._defineButton("indent",i("Increase indent"),n),this._defineButton("outdent",i("Decrease indent"),o)}_defineButton(e,t,i){const n=this.editor;n.ui.componentFactory.add(e,o=>{const r=n.commands.get(e),s=new od(o);return s.set({label:t,icon:i,tooltip:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(s,"execute",()=>{n.execute(e),n.editing.view.focus()}),s})}}const Lg="italic";class Vg extends vd{static get pluginName(){return"ItalicEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Lg}),e.model.schema.setAttributeProperties(Lg,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Lg,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(Lg,new Fd(e,Lg)),e.keystrokes.set("CTRL+I",Lg)}}const jg="italic";class Bg extends vd{init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(jg,i=>{const n=e.commands.get(jg),o=new od(i);return o.set({label:t("Italic"),icon:'',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(o,"execute",()=>{e.execute(jg),e.editing.view.focus()}),o})}}class Fg extends Gr{constructor(e){super(e),this.domEventType="click"}onDomEvent(e){this.fire(e.type,e)}}i(92);class Hg extends Ol{constructor(e,t,i){super(e);const n=e.t;this.focusTracker=new rl,this.keystrokes=new Jc,this.urlInputView=this._createUrlInput(i),this.saveButtonView=this._createButton(n("Save"),vf,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),yf,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t),this.children=this._createFormChildren(t.manualDecorators),this._focusables=new fl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const o=["ck","ck-link-form"];t.manualDecorators.length&&o.push("ck-link-form_layout-vertical"),this.setTemplate({tag:"form",attributes:{class:o,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((e,t)=>(e[t.name]=t.isOn,e),{})}render(){super.render(),_f({view:this});[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createUrlInput(e="https://"){const t=this.locale.t,i=new bf(this.locale,kf);return i.label=t("Link URL"),i.fieldView.placeholder=e+"example.com",i}_createButton(e,t,i,n){const o=new od(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:i}}),n&&o.delegate("execute").to(this,n),o}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const i of e.manualDecorators){const n=new dd(this.locale);n.set({name:i.id,label:i.label,withText:!0}),n.bind("isOn").toMany([i,e],"value",(e,t)=>void 0===t&&void 0===e?i.defaultValue:e),n.on("execute",()=>{i.set("value",!n.isOn)}),t.add(n)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new Ol;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map(e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}})),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}}i(94);class Ug extends Ol{constructor(e){super(e);const t=e.t;this.focusTracker=new rl,this.keystrokes=new Jc,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(t("Unlink"),'',"unlink"),this.editButtonView=this._createButton(t("Edit link"),'',"edit"),this.set("href"),this._focusables=new fl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createButton(e,t,i){const n=new od(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n.delegate("execute").to(this,i),n}_createPreviewButton(){const e=new od(this.locale),t=this.bindTemplate,i=this.t;return e.set({withText:!0,tooltip:i("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",e=>e&&bu(e)),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",e=>e||i("This link has no URL")),e.bind("isEnabled").to(this,"href",e=>!!e),e.template.tag="a",e.template.eventListeners={},e}}const Wg=/^((\w+:(\/{2,})?)|(\W))/i,qg=/[\w-]+@[\w-]+\.+[\w-]+/i,$g="link-ui";class Yg extends vd{static get requires(){return[Cf]}static get pluginName(){return"LinkUI"}init(){const e=this.editor;e.editing.view.addObserver(Fg),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=e.plugins.get(Cf),this._createToolbarLinkButton(),this._enableUserBalloonInteractions(),e.conversion.for("editingDowncast").markerToHighlight({model:$g,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:$g,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView.destroy()}_createActionsView(){const e=this.editor,t=new Ug(e.locale),i=e.commands.get("link"),n=e.commands.get("unlink");return t.bind("href").to(i,"value"),t.editButtonView.bind("isEnabled").to(i),t.unlinkButtonView.bind("isEnabled").to(n),this.listenTo(t,"edit",()=>{this._addFormView()}),this.listenTo(t,"unlink",()=>{e.execute("unlink"),this._hideUI()}),t.keystrokes.set("Esc",(e,t)=>{this._hideUI(),t()}),t.keystrokes.set(gu,(e,t)=>{this._addFormView(),t()}),t}_createFormView(){const e=this.editor,t=e.commands.get("link"),i=e.config.get("link.defaultProtocol"),n=new Hg(e.locale,t,i);return n.urlInputView.fieldView.bind("value").to(t,"value"),n.urlInputView.bind("isReadOnly").to(t,"isEnabled",e=>!e),n.saveButtonView.bind("isEnabled").to(t),this.listenTo(n,"submit",()=>{const{value:t}=n.urlInputView.fieldView.element,o=!!i&&!Wg.test(t),r=qg.test(t),s=t&&o?(r?"mailto:":i)+t:t;e.execute("link",s,n.getDecoratorSwitchesState()),this._closeFormView()}),this.listenTo(n,"cancel",()=>{this._closeFormView()}),n.keystrokes.set("Esc",(e,t)=>{this._closeFormView(),t()}),n}_createToolbarLinkButton(){const e=this.editor,t=e.commands.get("link"),i=e.t;e.keystrokes.set(gu,(e,t)=>{t(),this._showUI(!0)}),e.ui.componentFactory.add("link",e=>{const n=new od(e);return n.isEnabled=!0,n.label=i("Link"),n.icon='',n.keystroke=gu,n.tooltip=!0,n.isToggleable=!0,n.bind("isEnabled").to(t,"isEnabled"),n.bind("isOn").to(t,"value",e=>!!e),this.listenTo(n,"execute",()=>this._showUI(!0)),n})}_enableUserBalloonInteractions(){const e=this.editor.editing.view.document;this.listenTo(e,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),this.editor.keystrokes.set("Tab",(e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())},{priority:"high"}),this.editor.keystrokes.set("Esc",(e,t)=>{this._isUIVisible&&(this._hideUI(),t())}),hd({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this._isFormInPanel)return;const e=this.editor.commands.get("link");this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.urlInputView.fieldView.element.value=e.value||""}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let i=this._getSelectedLinkElement(),n=r();const o=()=>{const e=this._getSelectedLinkElement(),t=r();i&&!e||!i&&t!==n?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),i=e,n=t};function r(){return t.selection.focus.getAncestors().reverse().find(e=>e.is("element"))}this.listenTo(e.ui,"update",o),this.listenTo(this._balloon,"change:visibleView",o)}get _isFormInPanel(){return this._balloon.hasView(this.formView)}get _areActionsInPanel(){return this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){return this._balloon.visibleView==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model,i=e.document,n=this._getSelectedLinkElement(),o=t.markers.has($g)?this.editor.editing.mapper.toViewRange(t.markers.get($g).getRange()):i.selection.getFirstRange();return{target:n?e.domConverter.mapViewToDom(n):e.domConverter.viewRangeToDom(o)}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection;if(t.isCollapsed)return Gg(t.getFirstPosition());{const i=t.getFirstRange().getTrimmed(),n=Gg(i.start),o=Gg(i.end);return n&&n==o&&e.createRangeIn(n).getTrimmed().isEqual(i)?n:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change(t=>{e.markers.has($g)?t.updateMarker($g,{range:e.document.selection.getFirstRange()}):t.addMarker($g,{usingOperation:!1,affectsData:!1,range:e.document.selection.getFirstRange()})})}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has($g)&&e.change(e=>{e.removeMarker($g)})}}function Gg(e){return e.getAncestors().find(e=>{return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t})}class Kg extends xd{constructor(e,t){super(e),this.type=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document,i=Array.from(t.selection.getSelectedBlocks()).filter(t=>Qg(t,e.schema)),n=!0===this.value;e.change(e=>{if(n){let t=i[i.length-1].nextSibling,n=Number.POSITIVE_INFINITY,o=[];for(;t&&"listItem"==t.name&&0!==t.getAttribute("listIndent");){const e=t.getAttribute("listIndent");e=i;)r>o.getAttribute("listIndent")&&(r=o.getAttribute("listIndent")),o.getAttribute("listIndent")==r&&e[t?"unshift":"push"](o),o=o[t?"previousSibling":"nextSibling"]}}function Qg(e,t){return t.checkChild(e.parent,"listItem")&&!t.isObject(e)}class Zg extends xd{constructor(e,t){super(e),this._indentBy="forward"==t?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document;let i=Array.from(t.selection.getSelectedBlocks());e.change(e=>{const t=i[i.length-1];let n=t.nextSibling;for(;n&&"listItem"==n.name&&n.getAttribute("listIndent")>t.getAttribute("listIndent");)i.push(n),n=n.nextSibling;this._indentBy<0&&(i=i.reverse());for(const t of i){const i=t.getAttribute("listIndent")+this._indentBy;i<0?e.rename(t,"paragraph"):e.setAttribute("listIndent",i,t)}this.fire("_executeCleanup",i)})}_checkEnabled(){const e=Cd(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is("element","listItem"))return!1;if(this._indentBy>0){const t=e.getAttribute("listIndent"),i=e.getAttribute("listType");let n=e.previousSibling;for(;n&&n.is("element","listItem")&&n.getAttribute("listIndent")>=t;){if(n.getAttribute("listIndent")==t)return n.getAttribute("listType")==i;n=n.previousSibling}return!1}return!0}}function Xg(e,t){const i=t.mapper,n=t.writer,o="numbered"==e.getAttribute("listType")?"ol":"ul",r=function(e){const t=e.createContainerElement("li");return t.getFillerOffset=rp,t}(n),s=n.createContainerElement(o,null);return n.insert(n.createPositionAt(s,0),r),i.bindElements(e,r),r}function ep(e,t,i,n){const o=t.parent,r=i.mapper,s=i.writer;let a=r.toViewPosition(n.createPositionBefore(e));const c=np(e.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:e.getAttribute("listIndent")}),l=e.previousSibling;if(c&&c.getAttribute("listIndent")==e.getAttribute("listIndent")){const e=r.toViewElement(c);a=s.breakContainer(s.createPositionAfter(e))}else if(l&&"listItem"==l.name){a=r.toViewPosition(n.createPositionAt(l,"end"));const e=r.findMappedViewAncestor(a),t=function(e){for(const t of e.getChildren())if("ul"==t.name||"ol"==t.name)return t;return null}(e);a=t?s.createPositionBefore(t):s.createPositionAt(e,"end")}else a=r.toViewPosition(n.createPositionBefore(e));if(a=ip(a),s.insert(a,o),l&&"listItem"==l.name){const e=r.toViewElement(l),i=s.createRange(s.createPositionAt(e,0),a).getWalker({ignoreElementEnd:!0});for(const e of i)if(e.item.is("element","li")){const n=s.breakContainer(s.createPositionBefore(e.item)),o=e.item.parent,r=s.createPositionAt(t,"end");tp(s,r.nodeBefore,r.nodeAfter),s.move(s.createRangeOn(o),r),i.position=n}}else{const i=o.nextSibling;if(i&&(i.is("element","ul")||i.is("element","ol"))){let n=null;for(const t of i.getChildren()){const i=r.toModelElement(t);if(!(i&&i.getAttribute("listIndent")>e.getAttribute("listIndent")))break;n=t}n&&(s.breakContainer(s.createPositionAfter(n)),s.move(s.createRangeOn(n.parent),s.createPositionAt(t,"end")))}}tp(s,o,o.nextSibling),tp(s,o.previousSibling,o)}function tp(e,t,i){return!t||!i||"ul"!=t.name&&"ol"!=t.name||t.name!=i.name||t.getAttribute("class")!==i.getAttribute("class")?null:e.mergeContainers(e.createPositionAfter(t))}function ip(e){return e.getLastMatchingPosition(e=>e.item.is("uiElement"))}function np(e,t){const i=!!t.sameIndent,n=!!t.smallerIndent,o=t.listIndent;let r=e;for(;r&&"listItem"==r.name;){const e=r.getAttribute("listIndent");if(i&&o==e||n&&o>e)return r;r=r.previousSibling}return null}function op(e,t,i,n){e.ui.componentFactory.add(t,o=>{const r=e.commands.get(t),s=new od(o);return s.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.on("execute",()=>{e.execute(t),e.editing.view.focus()}),s})}function rp(){const e=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||e?0:Wn.call(this)}function sp(e){return(t,i,n)=>{const o=n.consumable;if(!o.test(i.item,"insert")||!o.test(i.item,"attribute:listType")||!o.test(i.item,"attribute:listIndent"))return;o.consume(i.item,"insert"),o.consume(i.item,"attribute:listType"),o.consume(i.item,"attribute:listIndent");const r=i.item;ep(r,Xg(r,n),n,e)}}function ap(e,t,i){if(!i.consumable.consume(t.item,"attribute:listType"))return;const n=i.mapper.toViewElement(t.item),o=i.writer;o.breakContainer(o.createPositionBefore(n)),o.breakContainer(o.createPositionAfter(n));const r=n.parent,s="numbered"==t.attributeNewValue?"ol":"ul";o.rename(s,r)}function cp(e,t,i){const n=i.mapper.toViewElement(t.item).parent,o=i.writer;tp(o,n,n.nextSibling),tp(o,n.previousSibling,n);for(const e of t.item.getChildren())i.consumable.consume(e,"insert")}function lp(e,t,i){if("listItem"!=t.item.name){let e=i.mapper.toViewPosition(t.range.start);const n=i.writer,o=[];for(;("ul"==e.parent.name||"ol"==e.parent.name)&&(e=n.breakContainer(e),"li"==e.parent.name);){const t=e,i=n.createPositionAt(e.parent,"end");if(!t.isEqual(i)){const e=n.remove(n.createRange(t,i));o.push(e)}e=n.createPositionAfter(e.parent)}if(o.length>0){for(let t=0;t0){const t=tp(n,i,i.nextSibling);t&&t.parent==i&&e.offset--}}tp(n,e.nodeBefore,e.nodeAfter)}}}function dp(e,t,i){const n=i.mapper.toViewPosition(t.position),o=n.nodeBefore,r=n.nodeAfter;tp(i.writer,o,r)}function hp(e,t,i){if(i.consumable.consume(t.viewItem,{name:!0})){const e=i.writer,n=e.createElement("listItem"),o=function(e){let t=0,i=e.parent;for(;i;){if(i.is("element","li"))t++;else{const e=i.previousSibling;e&&e.is("element","li")&&t++}i=i.parent}return t}(t.viewItem);e.setAttribute("listIndent",o,n);const r=t.viewItem.parent&&"ol"==t.viewItem.parent.name?"numbered":"bulleted";if(e.setAttribute("listType",r,n),!i.safeInsert(n,t.modelCursor))return;const s=function(e,t,i){const{writer:n,schema:o}=i;let r=n.createPositionAfter(e);for(const s of t)if("ul"==s.name||"ol"==s.name)r=i.convertItem(s,r).modelCursor;else{const t=i.convertItem(s,n.createPositionAt(e,"end")),a=t.modelRange.start.nodeAfter;a&&a.is("element")&&!o.checkChild(e,a.name)&&(e=t.modelCursor.parent.is("element","listItem")?t.modelCursor.parent:pp(t.modelCursor),r=n.createPositionAfter(e))}return r}(n,t.viewItem.getChildren(),i);t.modelRange=e.createRange(t.modelCursor,s),i.updateConversionResult(n,t)}}function up(e,t,i){if(i.consumable.test(t.viewItem,{name:!0})){const e=Array.from(t.viewItem.getChildren());for(const t of e){!(t.is("element","li")||wp(t))&&t._remove()}}}function mp(e,t,i){if(i.consumable.test(t.viewItem,{name:!0})){if(0===t.viewItem.childCount)return;const e=[...t.viewItem.getChildren()];let i=!1,n=!0;for(const t of e)i&&!wp(t)&&t._remove(),t.is("$text")?(n&&(t._data=t.data.replace(/^\s+/,"")),t.nextSibling&&!wp(t.nextSibling)||(t._data=t.data.replace(/\s+$/,""))):wp(t)&&(i=!0),n=!1}}function fp(e){return(t,i)=>{if(i.isPhantom)return;const n=i.modelPosition.nodeBefore;if(n&&n.is("element","listItem")){const t=i.mapper.toViewElement(n),o=t.getAncestors().find(wp),r=e.createPositionAt(t,0).getWalker();for(const e of r){if("elementStart"==e.type&&e.item.is("element","li")){i.viewPosition=e.previousPosition;break}if("elementEnd"==e.type&&e.item==o){i.viewPosition=e.nextPosition;break}}}}}function gp(e,[t,i]){let n,o=t.is("documentFragment")?t.getChild(0):t;if(n=i?this.createSelection(i):this.document.selection,o&&o.is("element","listItem")){const e=n.getFirstPosition();let t=null;if(e.parent.is("element","listItem")?t=e.parent:e.nodeBefore&&e.nodeBefore.is("element","listItem")&&(t=e.nodeBefore),t){const e=t.getAttribute("listIndent");if(e>0)for(;o&&o.is("element","listItem");)o._setAttribute("listIndent",o.getAttribute("listIndent")+e),o=o.nextSibling}}}function pp(e){const t=new Rs({startPosition:e});let i;do{i=t.next()}while(!i.value.item.is("element","listItem"));return i.value.item}function bp(e,t,i,n,o,r){const s=np(t.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:e,foo:"b"}),a=o.mapper,c=o.writer,l=s?s.getAttribute("listIndent"):null;let d;if(s)if(l==e){const e=a.toViewElement(s).parent;d=c.createPositionAfter(e)}else{const e=r.createPositionAt(s,"end");d=a.toViewPosition(e)}else d=i;d=ip(d);for(const e of[...n.getChildren()])wp(e)&&(d=c.move(c.createRangeOn(e),d).end,tp(c,e,e.nextSibling),tp(c,e.previousSibling,e))}function wp(e){return e.is("element","ol")||e.is("element","ul")}class kp extends vd{static get pluginName(){return"ListEditing"}static get requires(){return[Xm]}init(){const e=this.editor;e.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const t=e.data,i=e.editing;var n;e.model.document.registerPostFixer(t=>function(e,t){const i=e.document.differ.getChanges(),n=new Map;let o=!1;for(const n of i)if("insert"==n.type&&"listItem"==n.name)r(n.position);else if("insert"==n.type&&"listItem"!=n.name){if("$text"!=n.name){const i=n.position.nodeAfter;i.hasAttribute("listIndent")&&(t.removeAttribute("listIndent",i),o=!0),i.hasAttribute("listType")&&(t.removeAttribute("listType",i),o=!0),i.hasAttribute("listStyle")&&(t.removeAttribute("listStyle",i),o=!0);for(const t of Array.from(e.createRangeIn(i)).filter(e=>e.item.is("element","listItem")))r(t.previousPosition)}r(n.position.getShiftedBy(n.length))}else"remove"==n.type&&"listItem"==n.name?r(n.position):("attribute"==n.type&&"listIndent"==n.attributeKey||"attribute"==n.type&&"listType"==n.attributeKey)&&r(n.range.start);for(const e of n.values())s(e),a(e);return o;function r(e){const t=e.nodeBefore;if(t&&t.is("element","listItem")){let e=t;if(n.has(e))return;for(let t=e.previousSibling;t&&t.is("element","listItem");t=e.previousSibling)if(e=t,n.has(e))return;n.set(t,e)}else{const t=e.nodeAfter;t&&t.is("element","listItem")&&n.set(t,t)}}function s(e){let i=0,n=null;for(;e&&e.is("element","listItem");){const r=e.getAttribute("listIndent");if(r>i){let s;null===n?(n=r-i,s=i):(n>r&&(n=r),s=r-n),t.setAttribute("listIndent",s,e),o=!0}else n=null,i=e.getAttribute("listIndent")+1;e=e.nextSibling}}function a(e){let i=[],n=null;for(;e&&e.is("element","listItem");){const r=e.getAttribute("listIndent");if(n&&n.getAttribute("listIndent")>r&&(i=i.slice(0,r+1)),0!=r)if(i[r]){const n=i[r];e.getAttribute("listType")!=n&&(t.setAttribute("listType",n,e),o=!0)}else i[r]=e.getAttribute("listType");n=e,e=e.nextSibling}}}(e.model,t)),i.mapper.registerViewToModelLength("li",_p),t.mapper.registerViewToModelLength("li",_p),i.mapper.on("modelToViewPosition",fp(i.view)),i.mapper.on("viewToModelPosition",(n=e.model,(e,t)=>{const i=t.viewPosition,o=i.parent,r=t.mapper;if("ul"==o.name||"ol"==o.name){if(i.isAtEnd){const e=r.toModelElement(i.nodeBefore),o=r.getModelLength(i.nodeBefore);t.modelPosition=n.createPositionBefore(e).getShiftedBy(o)}else{const e=r.toModelElement(i.nodeAfter);t.modelPosition=n.createPositionBefore(e)}e.stop()}else if("li"==o.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){const s=r.toModelElement(o);let a=1,c=i.nodeBefore;for(;c&&wp(c);)a+=r.getModelLength(c),c=c.previousSibling;t.modelPosition=n.createPositionBefore(s).getShiftedBy(a),e.stop()}})),t.mapper.on("modelToViewPosition",fp(i.view)),e.conversion.for("editingDowncast").add(t=>{t.on("insert",lp,{priority:"high"}),t.on("insert:listItem",sp(e.model)),t.on("attribute:listType:listItem",ap,{priority:"high"}),t.on("attribute:listType:listItem",cp,{priority:"low"}),t.on("attribute:listIndent:listItem",function(e){return(t,i,n)=>{if(!n.consumable.consume(i.item,"attribute:listIndent"))return;const o=n.mapper.toViewElement(i.item),r=n.writer;r.breakContainer(r.createPositionBefore(o)),r.breakContainer(r.createPositionAfter(o));const s=o.parent,a=s.previousSibling,c=r.createRangeOn(s);r.remove(c),a&&a.nextSibling&&tp(r,a,a.nextSibling),bp(i.attributeOldValue+1,i.range.start,c.start,o,n,e),ep(i.item,o,n,e);for(const e of i.item.getChildren())n.consumable.consume(e,"insert")}}(e.model)),t.on("remove:listItem",function(e){return(t,i,n)=>{const o=n.mapper.toViewPosition(i.position).getLastMatchingPosition(e=>!e.item.is("element","li")).nodeAfter,r=n.writer;r.breakContainer(r.createPositionBefore(o)),r.breakContainer(r.createPositionAfter(o));const s=o.parent,a=s.previousSibling,c=r.createRangeOn(s),l=r.remove(c);a&&a.nextSibling&&tp(r,a,a.nextSibling),bp(n.mapper.toModelElement(o).getAttribute("listIndent")+1,i.position,c.start,o,n,e);for(const e of r.createRangeIn(l).getItems())n.mapper.unbindViewElement(e);t.stop()}}(e.model)),t.on("remove",dp,{priority:"low"})}),e.conversion.for("dataDowncast").add(t=>{t.on("insert",lp,{priority:"high"}),t.on("insert:listItem",sp(e.model))}),e.conversion.for("upcast").add(e=>{e.on("element:ul",up,{priority:"high"}),e.on("element:ol",up,{priority:"high"}),e.on("element:li",mp,{priority:"high"}),e.on("element:li",hp)}),e.model.on("insertContent",gp,{priority:"high"}),e.commands.add("numberedList",new Kg(e,"numbered")),e.commands.add("bulletedList",new Kg(e,"bulleted")),e.commands.add("indentList",new Zg(e,"forward")),e.commands.add("outdentList",new Zg(e,"backward"));const o=i.view.document;this.listenTo(o,"enter",(e,t)=>{const i=this.editor.model.document,n=i.selection.getLastPosition().parent;i.selection.isCollapsed&&"listItem"==n.name&&n.isEmpty&&(this.editor.execute("outdentList"),t.preventDefault(),e.stop())}),this.listenTo(o,"delete",(e,t)=>{if("backward"!==t.direction)return;const i=this.editor.model.document.selection;if(!i.isCollapsed)return;const n=i.getFirstPosition();if(!n.isAtStart)return;const o=n.parent;if("listItem"!==o.name)return;o.previousSibling&&"listItem"===o.previousSibling.name||(this.editor.execute("outdentList"),t.preventDefault(),e.stop())},{priority:"high"});const r=e=>(t,i)=>{this.editor.commands.get(e).isEnabled&&(this.editor.execute(e),i())};e.keystrokes.set("Tab",r("indentList")),e.keystrokes.set("Shift+Tab",r("outdentList"))}afterInit(){const e=this.editor.commands,t=e.get("indent"),i=e.get("outdent");t&&t.registerChildCommand(e.get("indentList")),i&&i.registerChildCommand(e.get("outdentList"))}}function _p(e){let t=1;for(const i of e.getChildren())if("ul"==i.name||"ol"==i.name)for(const e of i.getChildren())t+=_p(e);return t}class vp extends vd{init(){const e=this.editor.t;op(this.editor,"numberedList",e("Numbered List"),''),op(this.editor,"bulletedList",e("Bulleted List"),'')}}function yp(e,t){return e=>{e.on("attribute:url:media",i)};function i(i,n,o){if(!o.consumable.consume(n.item,i.name))return;const r=n.attributeNewValue,s=o.writer,a=o.mapper.toViewElement(n.item),c=[...a.getChildren()].find(e=>e.getCustomProperty("media-content"));s.remove(c);const l=e.getMediaViewElement(s,r,t);s.insert(s.createPositionAt(a,0),l)}}function xp(e,t,i,n){const o=e.createContainerElement("figure",{class:"media"});return e.insert(e.createPositionAt(o,0),t.getMediaViewElement(e,i,n)),o}function Ap(e){const t=e.getSelectedElement();return t&&t.is("element","media")?t:null}function Cp(e,t,i){e.change(n=>{const o=n.createElement("media",{url:t});e.insertContent(o,i),n.setSelection(o,"on")})}class Tp extends xd{refresh(){const e=this.editor.model,t=e.document.selection,i=e.schema,n=t.getFirstPosition(),o=Ap(t);let r=n.parent;r!=r.root&&(r=r.parent),this.value=o?o.getAttribute("url"):null,this.isEnabled=i.checkChild(r,"media")}execute(e){const t=this.editor.model,i=t.document.selection,n=Ap(i);if(n)t.change(t=>{t.setAttribute("url",e,n)});else{const n=fh(i,t);Cp(t,e,n)}}}class Pp{constructor(e,t){const i=t.providers,n=t.extraProviders||[],o=new Set(t.removeProviders),r=i.concat(n).filter(e=>{const t=e.name;return t?!o.has(t):(console.warn(Object(ki.a)("media-embed-no-provider-name: The configured media provider has no name and cannot be used."),{provider:e}),!1)});this.locale=e,this.providerDefinitions=r}hasMedia(e){return!!this._getMedia(e)}getMediaViewElement(e,t,i){return this._getMedia(t).getViewElement(e,i)}_getMedia(e){if(!e)return new Sp(this.locale);e=e.trim();for(const t of this.providerDefinitions){const i=t.html;let n=t.url;Array.isArray(n)||(n=[n]);for(const t of n){const n=this._getUrlMatches(e,t);if(n)return new Sp(this.locale,e,n,i)}}return null}_getUrlMatches(e,t){let i=e.match(t);if(i)return i;let n=e.replace(/^https?:\/\//,"");return i=n.match(t),i||(n=n.replace(/^www\./,""),i=n.match(t),i||null)}}class Sp{constructor(e,t,i,n){this.url=this._getValidUrl(t),this._t=e.t,this._match=i,this._previewRenderer=n}getViewElement(e,t){const i={};let n;if(t.renderForEditingView||t.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(i["data-oembed-url"]=this.url),t.renderForEditingView&&(i.class="ck-media__wrapper");const o=this._getPreviewHtml(t);n=e.createRawElement("div",i,(function(e){e.innerHTML=o}))}else this.url&&(i.url=this.url),n=e.createEmptyElement("oembed",i);return e.setCustomProperty("media-content",!0,n),n}_getPreviewHtml(e){return this._previewRenderer?this._previewRenderer(this._match):this.url&&e.renderForEditingView?this._getPlaceholderHtml():""}_getPlaceholderHtml(){const e=new nd,t=new id;e.text=this._t("Open media in new tab"),t.content='',t.viewBox="0 0 64 42";return new gl({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[t]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]},e]}]}).render().outerHTML}_getValidUrl(e){return e?e.match(/^https?/)?e:"https://"+e:null}}i(96);class Ep extends vd{static get pluginName(){return"MediaEmbedEditing"}constructor(e){super(e),e.config.define("mediaEmbed",{providers:[{name:"dailymotion",url:/^dailymotion\.com\/video\/(\w+)/,html:e=>`
`},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:e=>`
`},{name:"youtube",url:[/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)/,/^(?:m\.)?youtube\.com\/v\/([\w-]+)/,/^youtube\.com\/embed\/([\w-]+)/,/^youtu\.be\/([\w-]+)/],html:e=>`
`},{name:"vimeo",url:[/^vimeo\.com\/(\d+)/,/^vimeo\.com\/[^/]+\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/album\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/channels\/[^/]+\/(\d+)/,/^vimeo\.com\/groups\/[^/]+\/videos\/(\d+)/,/^vimeo\.com\/ondemand\/[^/]+\/(\d+)/,/^player\.vimeo\.com\/video\/(\d+)/],html:e=>`
`},{name:"instagram",url:/^instagram\.com\/p\/(\w+)/},{name:"twitter",url:/^twitter\.com/},{name:"googleMaps",url:/^google\.com\/maps/},{name:"flickr",url:/^flickr\.com/},{name:"facebook",url:/^facebook\.com/}]}),this.registry=new Pp(e.locale,e.config.get("mediaEmbed"))}init(){const e=this.editor,t=e.model.schema,i=e.t,n=e.conversion,o=e.config.get("mediaEmbed.previewsInData"),r=this.registry;e.commands.add("mediaEmbed",new Tp(e)),t.register("media",{isObject:!0,isBlock:!0,allowWhere:"$block",allowAttributes:["url"]}),n.for("dataDowncast").elementToElement({model:"media",view:(e,{writer:t})=>{const i=e.getAttribute("url");return xp(t,r,i,{renderMediaPreview:i&&o})}}),n.for("dataDowncast").add(yp(r,{renderMediaPreview:o})),n.for("editingDowncast").elementToElement({model:"media",view:(e,{writer:t})=>{const n=e.getAttribute("url");return function(e,t,i){return t.setCustomProperty("media",!0,e),dh(e,t,{label:i})}(xp(t,r,n,{renderForEditingView:!0}),t,i("media widget"))}}),n.for("editingDowncast").add(yp(r,{renderForEditingView:!0})),n.for("upcast").elementToElement({view:{name:"oembed",attributes:{url:!0}},model:(e,{writer:t})=>{const i=e.getAttribute("url");if(r.hasMedia(i))return t.createElement("media",{url:i})}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:(e,{writer:t})=>{const i=e.getAttribute("data-oembed-url");if(r.hasMedia(i))return t.createElement("media",{url:i})}})}}const Mp=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=]+$/;class Ip extends vd{static get requires(){return[Yh,Tm]}static get pluginName(){return"AutoMediaEmbed"}constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,t=e.model.document;this.listenTo(e.plugins.get(Yh),"inputTransformation",()=>{const e=t.selection.getFirstRange(),i=Ic.fromPosition(e.start);i.stickiness="toPrevious";const n=Ic.fromPosition(e.end);n.stickiness="toNext",t.once("change:data",()=>{this._embedMediaBetweenPositions(i,n),i.detach(),n.detach()},{priority:"high"})}),e.commands.get("undo").on("execute",()=>{this._timeoutId&&(ur.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)},{priority:"high"})}_embedMediaBetweenPositions(e,t){const i=this.editor,n=i.plugins.get(Ep).registry,o=new Js(e,t),r=o.getWalker({ignoreElementEnd:!0});let s="";for(const e of r)e.item.is("$textProxy")&&(s+=e.item.data);if(s=s.trim(),!s.match(Mp))return void o.detach();if(!n.hasMedia(s))return void o.detach();i.commands.get("mediaEmbed").isEnabled?(this._positionToInsert=Ic.fromPosition(e),this._timeoutId=ur.window.setTimeout(()=>{i.model.change(e=>{let t;this._timeoutId=null,e.remove(o),o.detach(),"$graveyard"!==this._positionToInsert.root.rootName&&(t=this._positionToInsert),Cp(i.model,s,t),this._positionToInsert.detach(),this._positionToInsert=null})},100)):o.detach()}}i(98);class Np extends Ol{constructor(e,t){super(t);const i=t.t;this.focusTracker=new rl,this.keystrokes=new Jc,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(i("Save"),vf,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(i("Cancel"),yf,"ck-button-cancel","cancel"),this._focusables=new fl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._validators=e,this.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form"],tabindex:"-1"},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),_f({view:this});[this.urlInputView,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element);const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e),this.listenTo(this.urlInputView.element,"selectstart",(e,t)=>{t.stopPropagation()},{priority:"high"})}focus(){this._focusCycler.focusFirst()}get url(){return this.urlInputView.fieldView.element.value.trim()}set url(e){this.urlInputView.fieldView.element.value=e.trim()}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.urlInputView.errorText=t,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const e=this.locale.t,t=new bf(this.locale,kf),i=t.fieldView;return this._urlInputViewInfoDefault=e("Paste the media URL in the input."),this._urlInputViewInfoTip=e("Tip: Paste the URL into the content to embed faster."),t.label=e("Media URL"),t.infoText=this._urlInputViewInfoDefault,i.placeholder="https://example.com",i.on("input",()=>{t.infoText=i.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault}),t}_createButton(e,t,i,n){const o=new od(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:i}}),n&&o.delegate("execute").to(this,n),o}}class Rp extends vd{static get requires(){return[Ep]}static get pluginName(){return"MediaEmbedUI"}init(){const e=this.editor,t=e.commands.get("mediaEmbed"),i=e.plugins.get(Ep).registry;e.ui.componentFactory.add("mediaEmbed",n=>{const o=ud(n),r=new Np(function(e,t){return[t=>{if(!t.url.length)return e("The URL must not be empty.")},i=>{if(!t.hasMedia(i.url))return e("This media URL is not supported.")}]}(e.t,i),e.locale);return this._setUpDropdown(o,r,t,e),this._setUpForm(o,r,t),o})}_setUpDropdown(e,t,i){const n=this.editor,o=n.t,r=e.buttonView;function s(){n.editing.view.focus(),e.isOpen=!1}e.bind("isEnabled").to(i),e.panelView.children.add(t),r.set({label:o("Insert media"),icon:'',tooltip:!0}),r.on("open",()=>{t.url=i.value||"",t.urlInputView.fieldView.select(),t.focus()},{priority:"low"}),e.on("submit",()=>{t.isValid()&&(n.execute("mediaEmbed",t.url),s())}),e.on("change:isOpen",()=>t.resetFormStatus()),e.on("cancel",()=>s())}_setUpForm(e,t,i){t.delegate("submit","cancel").to(e),t.urlInputView.bind("value").to(i,"value"),t.urlInputView.bind("isReadOnly").to(i,"isEnabled",e=>!e),t.saveButtonView.bind("isEnabled").to(i)}}i(100);function Op(e,t,i,n,o=1){t>o?n.setAttribute(e,t,i):n.removeAttribute(e,i)}function zp(e,t,i={}){const n=e.createElement("tableCell",i);return e.insertElement("paragraph",n),e.insert(n,t),n}function Dp(e,t){const i=t.parent.parent,n=parseInt(i.getAttribute("headingColumns")||0),{column:o}=e.getCellLocation(t);return!!n&&o{e.on("element:table",(e,t,i)=>{const n=t.viewItem;if(!i.consumable.test(n,{name:!0}))return;const{rows:o,headingRows:r,headingColumns:s}=function(e){const t={headingRows:0,headingColumns:0},i=[],n=[];let o;for(const r of Array.from(e.getChildren()))if("tbody"===r.name||"thead"===r.name||"tfoot"===r.name){"thead"!==r.name||o||(o=r);const e=Array.from(r.getChildren()).filter(e=>e.is("element","tr"));for(const r of e)if("thead"===r.parent.name&&r.parent===o)t.headingRows++,i.push(r);else{n.push(r);const e=jp(r);e>t.headingColumns&&(t.headingColumns=e)}}return t.rows=[...i,...n],t}(n),a={};s&&(a.headingColumns=s),r&&(a.headingRows=r);const c=i.writer.createElement("table",a);if(i.safeInsert(c,t.modelCursor)){if(i.consumable.consume(n,{name:!0}),o.forEach(e=>i.convertItem(e,i.writer.createPositionAt(c,"end"))),c.isEmpty){const e=i.writer.createElement("tableRow");i.writer.insert(e,i.writer.createPositionAt(c,"end")),zp(i.writer,i.writer.createPositionAt(e,"end"))}i.updateConversionResult(c,t)}})}}function Vp(e){return t=>{t.on("element:"+e,(e,t,i)=>{if(!t.modelRange)return;const n=t.modelRange.start.nodeAfter;if(!n.childCount){const e=i.writer.createPositionAt(n,0);i.writer.insertElement("paragraph",e)}},{priority:"low"})}}function jp(e){let t=0,i=0;const n=Array.from(e.getChildren()).filter(e=>"th"===e.name||"td"===e.name);for(;i1||o>1)&&this._recordSpans(i,o,n),this._shouldSkipSlot()||(t=this._formatOutValue(i)),this._nextCellAtColumn=this._column+n}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return void 0!==this._endRow&&this._row>this._endRow}_isOverEndColumn(){return void 0!==this._endColumn&&this._column>this._endColumn}_formatOutValue(e,t=this._row,i=this._column){return{done:!1,value:new Fp(this,e,t,i)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._rowthis._endColumn;return e||t||i||n}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,i){const n={cell:e,row:this._row,column:this._column};for(let e=this._row;et.on("insert:table",(t,i,n)=>{const o=i.item;if(!n.consumable.consume(o,"insert"))return;n.consumable.consume(o,"attribute:headingRows:table"),n.consumable.consume(o,"attribute:headingColumns:table");const r=e&&e.asWidget,s=n.writer.createContainerElement("figure",{class:"table"}),a=n.writer.createContainerElement("table");let c;var l,d;n.writer.insert(n.writer.createPositionAt(s,0),a),r&&(l=s,(d=n.writer).setCustomProperty("table",!0,l),c=dh(l,d,{hasSelectionHandle:!0}));const h=new Bp(o),u={headingRows:o.getAttribute("headingRows")||0,headingColumns:o.getAttribute("headingColumns")||0},m=new Map;for(const t of h){const{row:i,cell:r}=t,s=o.getChild(i),c=m.get(i)||qp(a,s,i,u,n);m.set(i,c),n.consumable.consume(r,"insert");Wp(t,u,n.writer.createPositionAt(c,"end"),n,e)}for(const e of o.getChildren()){const t=e.index;m.has(t)||m.set(t,qp(a,e,t,u,n))}const f=n.mapper.toViewPosition(i.range.start);n.mapper.bindElements(o,r?c:s),n.writer.insert(f,r?c:s)})}function Up(e,t,i){const{cell:n}=e,o=$p(e,t),r=i.mapper.toViewElement(n);r&&r.name!==o&&function(e,t,i){const n=i.writer,o=i.mapper.toViewElement(e),r=mh(n.createEditableElement(t,o.getAttributes()),n);hh(r,n,(e,t,i)=>i.addClass(Kp(t.classes),e),(e,t,i)=>i.removeClass(Kp(t.classes),e)),n.insert(n.createPositionAfter(o),r),n.move(n.createRangeIn(o),n.createPositionAt(r,0)),n.remove(n.createRangeOn(o)),i.mapper.unbindViewElement(o),i.mapper.bindElements(e,r)}(n,o,i)}function Wp(e,t,i,n,o){const r=o&&o.asWidget,s=$p(e,t),a=r?mh(n.writer.createEditableElement(s),n.writer):n.writer.createContainerElement(s);r&&hh(a,n.writer,(e,t,i)=>i.addClass(Kp(t.classes),e),(e,t,i)=>i.removeClass(Kp(t.classes),e));const c=e.cell,l=c.getChild(0),d=1===c.childCount&&"paragraph"===l.name;if(n.writer.insert(i,a),d&&![...l.getAttributeKeys()].length){const e=c.getChild(0),t=n.writer.createPositionAt(a,"end");if(n.consumable.consume(e,"insert"),r){const i=n.writer.createContainerElement("span",{style:"display:inline-block"});n.mapper.bindElements(e,i),n.writer.insert(t,i),n.mapper.bindElements(c,a)}else n.mapper.bindElements(c,a),n.mapper.bindElements(e,a)}else n.mapper.bindElements(c,a)}function qp(e,t,i,n,o){o.consumable.consume(t,"insert");const r=t.isEmpty?o.writer.createEmptyElement("tr"):o.writer.createContainerElement("tr");o.mapper.bindElements(t,r);const s=n.headingRows,a=function(e,t,i){const n=Yp(e,t);return n||function(e,t,i){const n=i.writer.createContainerElement(e),o=i.writer.createPositionAt(t,"tbody"==e?"end":0);return i.writer.insert(o,n),n}(e,t,i)}(function(e,t){return e0&&i>=s?i-s:i,l=o.writer.createPositionAt(a,c);return o.writer.insert(l,r),r}function $p(e,t){const{row:i,column:n}=e,{headingColumns:o,headingRows:r}=t;if(r&&r>i)return"th";return o&&o>n?"th":"td"}function Yp(e,t){for(const i of t.getChildren())if(i.name==e)return i}function Gp(e,t,i){const n=Yp(e,t);n&&0===n.childCount&&i.writer.remove(i.writer.createRangeOn(n))}function Kp(e){return Array.isArray(e)?e:[e]}class Jp extends xd{refresh(){const e=this.editor.model,t=e.document.selection,i=e.schema,n=function(e){const t=e.parent;return t===t.root?t:t.parent}(t.getFirstPosition());this.isEnabled=i.checkChild(n,"table")}execute(e={}){const t=this.editor.model,i=t.document.selection,n=this.editor.plugins.get("TableUtils"),o=fh(i,t);t.change(i=>{const r=n.createTable(i,e);t.insertContent(r,o),i.setSelection(i.createPositionAt(r.getNodeByPath([0,0,0]),0))})}}function Qp(e){const t=[];for(const i of nb(e.getRanges())){const e=i.getContainedElement();e&&e.is("element","tableCell")&&t.push(e)}return t}function Zp(e){const t=[];for(const i of e.getRanges()){const e=i.start.findAncestor("tableCell");e&&t.push(e)}return t}function Xp(e){const t=Qp(e);return t.length?t:Zp(e)}function eb(e){return ob(e.map(e=>e.parent.index))}function tb(e){const t=e[0].findAncestor("table");return ob([...new Bp(t)].filter(t=>e.includes(t.cell)).map(e=>e.column))}function ib(e,t){if(e.length<2||!function(e){const t=e[0].findAncestor("table"),i=eb(e),n=parseInt(t.getAttribute("headingRows")||0);if(!sb(i,n))return!1;const o=parseInt(t.getAttribute("headingColumns")||0);return sb(tb(e),o)}(e))return!1;const i=new Set,n=new Set;let o=0;for(const r of e){const{row:e,column:s}=t.getCellLocation(r),a=parseInt(r.getAttribute("rowspan")||1),c=parseInt(r.getAttribute("colspan")||1);i.add(e),n.add(s),a>1&&i.add(e+a-1),c>1&&n.add(s+c-1),o+=a*c}return function(e,t){const i=Array.from(e.values()),n=Array.from(t.values()),o=Math.max(...i),r=Math.min(...i),s=Math.max(...n),a=Math.min(...n);return(o-r+1)*(s-a+1)}(i,n)==o}function nb(e){return Array.from(e).sort(rb)}function ob(e){const t=e.sort((e,t)=>e-t);return{first:t[0],last:t[t.length-1]}}function rb(e,t){const i=e.start,n=t.start;return i.isBefore(n)?-1:1}function sb({first:e,last:t},i){return e0){Op("headingRows",r-i,e,o,0)}const s=parseInt(t.getAttribute("headingColumns")||0);if(s>0){Op("headingColumns",s-n,e,o,0)}}(a,e,n,o,i),a}function hb(e,t,i=0){const n=[],o=new Bp(e,{startRow:i,endRow:t-1});for(const e of o){const{row:i,cellHeight:o}=e,r=i+o-1;i1&&(a.rowspan=c);const l=parseInt(e.getAttribute("colspan")||1);l>1&&(a.colspan=l);const d=r+s,h=[...new Bp(o,{startRow:r,endRow:d,includeAllSlots:!0})];let u,m=null;for(const t of h){const{row:n,column:o,cell:r}=t;r===e&&void 0===u&&(u=o),void 0!==u&&u===o&&n===d&&(m=zp(i,t.getPositionBefore(),a))}return Op("rowspan",s,e,i),m}function mb(e,t){const i=[],n=new Bp(e);for(const e of n){const{column:n,cellWidth:o}=e,r=n+o-1;n1&&(r.colspan=s);const a=parseInt(e.getAttribute("rowspan")||1);a>1&&(r.rowspan=a);const c=zp(n,n.createPositionAfter(e),r);return Op("colspan",o,e,n),c}function gb(e,t,i,n,o,r){const s=parseInt(e.getAttribute("colspan")||1),a=parseInt(e.getAttribute("rowspan")||1);if(i+s-1>o){Op("colspan",o-i+1,e,r,1)}if(t+a-1>n){Op("rowspan",n-t+1,e,r,1)}}function pb(e,t){const i=t.getColumns(e),n=new Array(i).fill(0);for(const{column:t}of new Bp(e))n[t]++;const o=n.reduce((e,t,i)=>t?e:[...e,i],[]);if(o.length>0){const i=o[o.length-1];return t.removeColumns(e,{at:i}),!0}return!1}function bb(e,t){const i=[];for(let t=0;t0){const n=i[i.length-1];return t.removeRows(e,{at:n}),!0}return!1}function wb(e,t){pb(e,t)||bb(e,t)}function kb(e,t){const i=Array.from(new Bp(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(i.every(({cellHeight:e})=>1===e))return t.lastRow;const n=i[0].cellHeight-1;return t.lastRow+n}function _b(e,t){const i=Array.from(new Bp(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(i.every(({cellWidth:e})=>1===e))return t.lastColumn;const n=i[0].cellWidth-1;return t.lastColumn+n}class vb extends xd{constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}refresh(){const e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){const e=this.editor.model,t=Zp(e.document.selection)[0],i=this.value,n=this.direction;e.change(e=>{const o="right"==n||"down"==n,r=o?t:i,s=o?i:t,a=s.parent;!function(e,t,i){yb(e)||(yb(t)&&i.remove(i.createRangeIn(t)),i.move(i.createRangeIn(e),i.createPositionAt(t,"end")));i.remove(e)}(s,r,e);const c=this.isHorizontal?"colspan":"rowspan",l=parseInt(t.getAttribute(c)||1),d=parseInt(i.getAttribute(c)||1);e.setAttribute(c,l+d,r),e.setSelection(e.createRangeIn(r));const h=this.editor.plugins.get("TableUtils");wb(a.findAncestor("table"),h)})}_getMergeableCell(){const e=Zp(this.editor.model.document.selection)[0];if(!e)return;const t=this.editor.plugins.get("TableUtils"),i=this.isHorizontal?function(e,t,i){const n=e.parent.parent,o="right"==t?e.nextSibling:e.previousSibling,r=(n.getAttribute("headingColumns")||0)>0;if(!o)return;const s="right"==t?e:o,a="right"==t?o:e,{column:c}=i.getCellLocation(s),{column:l}=i.getCellLocation(a),d=parseInt(s.getAttribute("colspan")||1),h=Dp(i,s),u=Dp(i,a);if(r&&h!=u)return;return c+d===l?o:void 0}(e,this.direction,t):function(e,t){const i=e.parent,n=i.parent,o=n.getChildIndex(i);if("down"==t&&o===n.childCount-1||"up"==t&&0===o)return;const r=parseInt(e.getAttribute("rowspan")||1),s=n.getAttribute("headingRows")||0,a="down"==t&&o+r===s,c="up"==t&&o===s;if(s&&(a||c))return;const l=parseInt(e.getAttribute("rowspan")||1),d="down"==t?o+l:o,h=[...new Bp(n,{endRow:d})],u=h.find(t=>t.cell===e).column,m=h.find(({row:e,cellHeight:i,column:n})=>n===u&&("down"==t?e===d:d===e+i));return m&&m.cell}(e,this.direction);if(!i)return;const n=this.isHorizontal?"rowspan":"colspan",o=parseInt(e.getAttribute(n)||1);return parseInt(i.getAttribute(n)||1)===o?i:void 0}}function yb(e){return 1==e.childCount&&e.getChild(0).is("element","paragraph")&&e.getChild(0).isEmpty}class xb extends xd{refresh(){const e=Xp(this.editor.model.document.selection),t=e[0];if(t){const i=t.findAncestor("table"),n=this.editor.plugins.get("TableUtils").getRows(i)-1,o=eb(e),r=0===o.first&&o.last===n;this.isEnabled=!r}else this.isEnabled=!1}execute(){const e=this.editor.model,t=Xp(e.document.selection),i=eb(t),n=t[0],o=n.findAncestor("table"),r=this.editor.plugins.get("TableUtils").getCellLocation(n).column;e.change(e=>{const t=i.last-i.first+1;this.editor.plugins.get("TableUtils").removeRows(o,{at:i.first,rows:t});const n=function(e,t,i){const n=e.getChild(t)||e.getChild(e.childCount-1);let o=n.getChild(0),r=0;for(const e of n.getChildren()){if(r>i)return o;o=e,r+=parseInt(e.getAttribute("colspan")||1)}return o}(o,i.first,r);e.setSelection(e.createPositionAt(n,0))})}}class Ab extends xd{refresh(){const e=Xp(this.editor.model.document.selection),t=e[0];if(t){const i=t.findAncestor("table"),n=this.editor.plugins.get("TableUtils").getColumns(i),{first:o,last:r}=tb(e);this.isEnabled=r-ot.cell===e).column,last:n.find(e=>e.cell===t).column},r=function(e,t,i,n){return parseInt(i.getAttribute("colspan")||1)>1?i:t.previousSibling||i.nextSibling?i.nextSibling||t.previousSibling:n.first?e.reverse().find(({column:e})=>ee>n.last).cell}(n,e,t,o);this.editor.model.change(e=>{const t=o.last-o.first+1;this.editor.plugins.get("TableUtils").removeColumns(i,{at:o.first,columns:t}),e.setSelection(e.createPositionAt(r,0))})}}class Cb extends xd{refresh(){const e=Xp(this.editor.model.document.selection),t=e.length>0;this.isEnabled=t,this.value=t&&e.every(e=>this._isInHeading(e,e.parent.parent))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.model,i=Xp(t.document.selection),n=i[0].findAncestor("table"),{first:o,last:r}=eb(i),s=this.value?o:r+1,a=n.getAttribute("headingRows")||0;t.change(e=>{if(s){const t=hb(n,s,s>a?a:0);for(const{cell:i}of t)ub(i,s,e)}Op("headingRows",s,n,e,0)})}_isInHeading(e,t){const i=parseInt(t.getAttribute("headingRows")||0);return!!i&&e.parent.index0;this.isEnabled=i,this.value=i&&e.every(e=>Dp(t,e))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.model,i=Xp(t.document.selection),n=i[0].findAncestor("table"),{first:o,last:r}=tb(i),s=this.value?o:r+1;t.change(e=>{if(s){const t=mb(n,s);for(const{cell:i,column:n}of t)fb(i,n,s,e)}Op("headingColumns",s,n,e,0)})}}class Pb extends vd{static get pluginName(){return"TableUtils"}getCellLocation(e){const t=e.parent,i=t.parent,n=i.getChildIndex(t),o=new Bp(i,{row:n});for(const{cell:t,row:i,column:n}of o)if(t===e)return{row:i,column:n}}createTable(e,t){const i=e.createElement("table");return Sb(e,i,0,parseInt(t.rows)||2,parseInt(t.columns)||2),t.headingRows&&Op("headingRows",t.headingRows,i,e,0),t.headingColumns&&Op("headingColumns",t.headingColumns,i,e,0),i}insertRows(e,t={}){const i=this.editor.model,n=t.at||0,o=t.rows||1,r=void 0!==t.copyStructureFromAbove,s=t.copyStructureFromAbove?n-1:n,a=this.getRows(e),c=this.getColumns(e);i.change(t=>{const i=e.getAttribute("headingRows")||0;if(i>n&&Op("headingRows",i+o,e,t,0),!r&&(0===n||n===a))return void Sb(t,e,n,o,c);const l=r?Math.max(n,s):n,d=new Bp(e,{endRow:l}),h=new Array(c).fill(1);for(const{row:e,column:i,cellHeight:a,cellWidth:c,cell:l}of d){const d=e+a-1,u=e<=s&&s<=d;e0&&zp(t,o,n>1?{colspan:n}:null),e+=Math.abs(n)-1}}})}insertColumns(e,t={}){const i=this.editor.model,n=t.at||0,o=t.columns||1;i.change(t=>{const i=e.getAttribute("headingColumns");n{const{cellsToMove:i,cellsToTrim:n}=function(e,t,i){const n=new Map,o=[];for(const{row:r,column:s,cellHeight:a,cell:c}of new Bp(e,{endRow:i})){const e=r+a-1;if(r>=t&&r<=i&&e>i){const e=a-(i-r+1);n.set(s,{cell:c,rowspan:e})}if(r=t){let n;n=e>=i?i-t+1:e-t+1,o.push({cell:c,rowspan:a-n})}}return{cellsToMove:n,cellsToTrim:o}}(e,o,r);if(i.size){!function(e,t,i,n){const o=[...new Bp(e,{includeAllSlots:!0,row:t})],r=e.getChild(t);let s;for(const{column:e,cell:t,isAnchor:a}of o)if(i.has(e)){const{cell:t,rowspan:o}=i.get(e),a=s?n.createPositionAfter(s):n.createPositionAt(r,0);n.move(n.createRangeOn(t),a),Op("rowspan",o,t,n),s=t}else a&&(s=t)}(e,r+1,i,t)}for(let i=r;i>=o;i--)t.remove(e.getChild(i));for(const{rowspan:e,cell:i}of n)Op("rowspan",e,i,t);!function(e,t,i,n){const o=e.getAttribute("headingRows")||0;if(t{!function(e,t,i){const n=e.getAttribute("headingColumns")||0;if(n&&t.first=n;i--)for(const{cell:n,column:o,cellWidth:r}of[...new Bp(e)])o<=i&&r>1&&o+r>i?Op("colspan",r-1,n,t):o===i&&t.remove(n);bb(e,this)||pb(e,this)})}splitCellVertically(e,t=2){const i=this.editor.model,n=e.parent.parent,o=parseInt(e.getAttribute("rowspan")||1),r=parseInt(e.getAttribute("colspan")||1);i.change(i=>{if(r>1){const{newCellsSpan:n,updatedSpan:s}=Mb(r,t);Op("colspan",s,e,i);const a={};n>1&&(a.colspan=n),o>1&&(a.rowspan=o);Eb(r>t?t-1:r-1,i,i.createPositionAfter(e),a)}if(rt===e),l=a.filter(({cell:t,cellWidth:i,column:n})=>t!==e&&n===c||nc);for(const{cell:e,cellWidth:t}of l)i.setAttribute("colspan",t+s,e);const d={};o>1&&(d.rowspan=o),Eb(s,i,i.createPositionAfter(e),d);const h=n.getAttribute("headingColumns")||0;h>c&&Op("headingColumns",h+s,n,i)}})}splitCellHorizontally(e,t=2){const i=this.editor.model,n=e.parent,o=n.parent,r=o.getChildIndex(n),s=parseInt(e.getAttribute("rowspan")||1),a=parseInt(e.getAttribute("colspan")||1);i.change(i=>{if(s>1){const n=[...new Bp(o,{startRow:r,endRow:r+s-1,includeAllSlots:!0})],{newCellsSpan:c,updatedSpan:l}=Mb(s,t);Op("rowspan",l,e,i);const{column:d}=n.find(({cell:t})=>t===e),h={};c>1&&(h.rowspan=c),a>1&&(h.colspan=a);for(const e of n){const{column:t,row:n}=e,o=t===d,s=(n+r+l)%c==0;n>=r+l&&o&&s&&Eb(1,i,e.getPositionBefore(),h)}}if(sr){const e=o+n;i.setAttribute("rowspan",e,t)}const l={};a>1&&(l.colspan=a),Sb(i,o,r+1,n,1,l);const d=o.getAttribute("headingRows")||0;d>r&&Op("headingRows",d+n,o,i)}})}getColumns(e){return[...e.getChild(0).getChildren()].reduce((e,t)=>e+parseInt(t.getAttribute("colspan")||1),0)}getRows(e){return e.childCount}}function Sb(e,t,i,n,o,r={}){for(let s=0;s{const n=Qp(e.document.selection),o=n.shift(),{mergeWidth:r,mergeHeight:s}=function(e,t,i){let n=0,o=0;for(const e of t){const{row:t,column:r}=i.getCellLocation(e);n=Ob(e,r,n,"colspan"),o=Ob(e,t,o,"rowspan")}const{row:r,column:s}=i.getCellLocation(e);return{mergeWidth:n-s,mergeHeight:o-r}}(o,n,t);Op("colspan",r,o,i),Op("rowspan",s,o,i);for(const e of n)Nb(e,o,i);wb(o.findAncestor("table"),t),i.setSelection(o,"in")})}}function Nb(e,t,i){Rb(e)||(Rb(t)&&i.remove(i.createRangeIn(t)),i.move(i.createRangeIn(e),i.createPositionAt(t,"end"))),i.remove(e)}function Rb(e){return 1==e.childCount&&e.getChild(0).is("element","paragraph")&&e.getChild(0).isEmpty}function Ob(e,t,i,n){const o=parseInt(e.getAttribute(n)||1);return Math.max(i,t+o)}class zb extends xd{refresh(){const e=Xp(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.model,t=Xp(e.document.selection),i=eb(t),n=t[0].findAncestor("table"),o=[];for(let t=i.first;t<=i.last;t++)for(const i of n.getChild(t).getChildren())o.push(e.createRangeOn(i));e.change(e=>{e.setSelection(o)})}}class Db extends xd{refresh(){const e=Xp(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.model,t=Xp(e.document.selection),i=t[0],n=t.pop(),o=i.findAncestor("table"),r=this.editor.plugins.get("TableUtils"),s=r.getCellLocation(i),a=r.getCellLocation(n),c=Math.min(s.column,a.column),l=Math.max(s.column,a.column),d=[];for(const t of new Bp(o,{startColumn:c,endColumn:l}))d.push(e.createRangeOn(t.cell));e.change(e=>{e.setSelection(d)})}}function Lb(e){e.document.registerPostFixer(t=>function(e,t){const i=t.document.differ.getChanges();let n=!1;const o=new Set;for(const t of i){let i;"table"==t.name&&"insert"==t.type&&(i=t.position.nodeAfter),"tableRow"!=t.name&&"tableCell"!=t.name||(i=t.position.findAncestor("table")),Bb(t)&&(i=t.range.start.findAncestor("table")),i&&!o.has(i)&&(n=Vb(i,e)||n,n=jb(i,e)||n,o.add(i))}return n}(t,e))}function Vb(e,t){let i=!1;const n=function(e){const t=parseInt(e.getAttribute("headingRows")||0),i=e.childCount,n=[];for(const{row:o,cell:r,cellHeight:s}of new Bp(e)){if(s<2)continue;const e=oe){const t=e-o;n.push({cell:r,rowspan:t})}}return n}(e);if(n.length){i=!0;for(const e of n)Op("rowspan",e.rowspan,e.cell,t,1)}return i}function jb(e,t){let i=!1;const n=function(e){const t=new Array(e.childCount).fill(0);for(const{row:i}of new Bp(e,{includeAllSlots:!0}))t[i]++;return t}(e),o=[];for(const[e,t]of n.entries())t||o.push(e);if(o.length){i=!0;for(const i of o.reverse())t.remove(e.getChild(i)),n.splice(i,1)}const r=n[0];if(!n.every(e=>e===r)){const o=n.reduce((e,t)=>t>e?t:e,0);for(const[r,s]of n.entries()){const n=o-s;if(n){for(let i=0;ifunction(e,t){const i=t.document.differ.getChanges();let n=!1;for(const t of i)"insert"==t.type&&"table"==t.name&&(n=Hb(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableRow"==t.name&&(n=Ub(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableCell"==t.name&&(n=Wb(t.position.nodeAfter,e)||n),qb(t)&&(n=Wb(t.position.parent,e)||n);return n}(t,e))}function Hb(e,t){let i=!1;for(const n of e.getChildren())i=Ub(n,t)||i;return i}function Ub(e,t){let i=!1;for(const n of e.getChildren())i=Wb(n,t)||i;return i}function Wb(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;const i=Array.from(e.getChildren()).filter(e=>e.is("$text"));for(const e of i)t.wrap(t.createRangeOn(e),"paragraph");return!!i.length}function qb(e){return!(!e.position||!e.position.parent.is("element","tableCell"))&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}function $b(e){e.document.registerPostFixer(()=>function(e){const t=e.document.differ,i=new Set;let n=0;for(const e of t.getChanges()){const t="insert"==e.type||"remove"==e.type?e.position.parent:e.range.start.parent;t.is("element","tableCell")&&("insert"==e.type&&n++,Yb(t,e.type,n)&&i.add(t))}if(i.size){for(const e of i.values())t.refreshItem(e);return!0}return!1}(e))}function Yb(e,t,i){if(!Array.from(e.getChildren()).some(e=>e.is("element","paragraph")))return!1;if("attribute"==t){const t=Array.from(e.getChild(0).getAttributeKeys()).length;return 1===e.childCount&&t<2}return e.childCount<=("insert"==t?i+1:1)}function Gb(e){e.document.registerPostFixer(()=>function(e){const t=e.document.differ,i=new Set;for(const e of t.getChanges()){if("attribute"!=e.type)continue;const t=e.range.start.nodeAfter;t&&t.is("element","table")&&"headingRows"==e.attributeKey&&i.add(t)}if(i.size){for(const e of i.values())t.refreshItem(e);return!0}return!1}(e))}i(102);class Kb extends vd{static get pluginName(){return"TableEditing"}init(){const e=this.editor,t=e.model,i=t.schema,n=e.conversion;i.register("table",{allowWhere:"$block",allowAttributes:["headingRows","headingColumns"],isObject:!0,isBlock:!0}),i.register("tableRow",{allowIn:"table",isLimit:!0}),i.register("tableCell",{allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),i.extend("$block",{allowIn:"tableCell"}),i.addChildCheck((e,t)=>{if("table"==t.name&&Array.from(e.getNames()).includes("table"))return!1}),n.for("upcast").add(Lp()),n.for("editingDowncast").add(Hp({asWidget:!0})),n.for("dataDowncast").add(Hp()),n.for("upcast").elementToElement({model:"tableRow",view:"tr"}),n.for("upcast").add(e=>{e.on("element:tr",(e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()},{priority:"high"})}),n.for("editingDowncast").add(e=>e.on("insert:tableRow",(e,t,i)=>{const n=t.item;if(!i.consumable.consume(n,"insert"))return;const o=n.parent,r=function(e){for(const t of e.getChildren())if("table"===t.name)return t}(i.mapper.toViewElement(o)),s=o.getChildIndex(n),a=new Bp(o,{row:s}),c={headingRows:o.getAttribute("headingRows")||0,headingColumns:o.getAttribute("headingColumns")||0},l=new Map;for(const e of a){const t=l.get(s)||qp(r,n,s,c,i);l.set(s,t),i.consumable.consume(e.cell,"insert"),Wp(e,c,i.writer.createPositionAt(t,"end"),i,{asWidget:!0})}})),n.for("editingDowncast").add(e=>e.on("remove:tableRow",(e,t,i)=>{e.stop();const n=i.writer,o=i.mapper,r=o.toViewPosition(t.position).getLastMatchingPosition(e=>!e.item.is("element","tr")).nodeAfter,s=r.parent.parent,a=n.createRangeOn(r),c=n.remove(a);for(const e of n.createRangeIn(c).getItems())o.unbindViewElement(e);Gp("thead",s,i),Gp("tbody",s,i)},{priority:"higher"})),n.for("upcast").elementToElement({model:"tableCell",view:"td"}),n.for("upcast").elementToElement({model:"tableCell",view:"th"}),n.for("upcast").add(Vp("td")),n.for("upcast").add(Vp("th")),n.for("editingDowncast").add(e=>e.on("insert:tableCell",(e,t,i)=>{const n=t.item;if(!i.consumable.consume(n,"insert"))return;const o=n.parent,r=o.parent,s=r.getChildIndex(o),a=new Bp(r,{row:s}),c={headingRows:r.getAttribute("headingRows")||0,headingColumns:r.getAttribute("headingColumns")||0};for(const e of a)if(e.cell===n){const t=i.mapper.toViewElement(o);return void Wp(e,c,i.writer.createPositionAt(t,o.getChildIndex(n)),i,{asWidget:!0})}})),n.attributeToAttribute({model:"colspan",view:"colspan"}),n.attributeToAttribute({model:"rowspan",view:"rowspan"}),n.for("editingDowncast").add(e=>e.on("attribute:headingColumns:table",(e,t,i)=>{const n=t.item;if(!i.consumable.consume(t.item,e.name))return;const o={headingRows:n.getAttribute("headingRows")||0,headingColumns:n.getAttribute("headingColumns")||0},r=t.attributeOldValue,s=t.attributeNewValue,a=(r>s?r:s)-1;for(const e of new Bp(n,{endColumn:a}))Up(e,o,i)})),e.commands.add("insertTable",new Jp(e)),e.commands.add("insertTableRowAbove",new ab(e,{order:"above"})),e.commands.add("insertTableRowBelow",new ab(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new cb(e,{order:"left"})),e.commands.add("insertTableColumnRight",new cb(e,{order:"right"})),e.commands.add("removeTableRow",new xb(e)),e.commands.add("removeTableColumn",new Ab(e)),e.commands.add("splitTableCellVertically",new lb(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new lb(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new Ib(e)),e.commands.add("mergeTableCellRight",new vb(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new vb(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new vb(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new vb(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new Tb(e)),e.commands.add("setTableRowHeader",new Cb(e)),e.commands.add("selectTableRow",new zb(e)),e.commands.add("selectTableColumn",new Db(e)),Gb(t),Lb(t),$b(t),Fb(t)}static get requires(){return[Pb]}}i(104);class Jb extends Ol{constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",(e,t)=>`${t} × ${e}`),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"mouseover@.ck-insert-table-dropdown-grid-box":t.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck-insert-table-dropdown__label"]},children:[{text:t.to("label")}]}],on:{mousedown:t.to(e=>{e.preventDefault()}),click:t.to(()=>{this.fire("execute")})}}),this.on("boxover",(e,t)=>{const{row:i,column:n}=t.target.dataset;this.set({rows:parseInt(i),columns:parseInt(n)})}),this.on("change:columns",()=>{this._highlightGridBoxes()}),this.on("change:rows",()=>{this._highlightGridBoxes()})}focus(){}focusLast(){}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map((i,n)=>{const o=Math.floor(n/10){const n=e.commands.get("insertTable"),o=ud(i);let r;return o.bind("isEnabled").to(n),o.buttonView.set({icon:'',label:t("Insert table"),tooltip:!0}),o.on("change:isOpen",()=>{r||(r=new Jb(i),o.panelView.children.add(r),r.delegate("execute").to(o),o.buttonView.on("open",()=>{r.rows=0,r.columns=0}),o.on("execute",()=>{e.execute("insertTable",{rows:r.rows,columns:r.columns}),e.editing.view.focus()}))}),o}),e.ui.componentFactory.add("tableColumn",e=>{const n=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:t("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:i?"insertTableColumnLeft":"insertTableColumnRight",label:t("Insert column left")}},{type:"button",model:{commandName:i?"insertTableColumnRight":"insertTableColumnLeft",label:t("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:t("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:t("Select column")}}];return this._prepareDropdown(t("Column"),'',n,e)}),e.ui.componentFactory.add("tableRow",e=>{const i=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:t("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:t("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:t("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:t("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:t("Select row")}}];return this._prepareDropdown(t("Row"),'',i,e)}),e.ui.componentFactory.add("mergeTableCells",e=>{const n=[{type:"button",model:{commandName:"mergeTableCellUp",label:t("Merge cell up")}},{type:"button",model:{commandName:i?"mergeTableCellRight":"mergeTableCellLeft",label:t("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:t("Merge cell down")}},{type:"button",model:{commandName:i?"mergeTableCellLeft":"mergeTableCellRight",label:t("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:t("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:t("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(t("Merge cells"),'',n,e)})}_prepareDropdown(e,t,i,n){const o=this.editor,r=ud(n),s=this._fillDropdownWithListOptions(r,i);return r.buttonView.set({label:e,icon:t,tooltip:!0}),r.bind("isEnabled").toMany(s,"isEnabled",(...e)=>e.some(e=>e)),this.listenTo(r,"execute",e=>{o.execute(e.source.commandName),o.editing.view.focus()}),r}_prepareMergeSplitButtonDropdown(e,t,i,n){const o=this.editor,r=ud(n,ug);return this._fillDropdownWithListOptions(r,i),r.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),this.listenTo(r.buttonView,"execute",()=>{o.execute("mergeTableCells"),o.editing.view.focus()}),this.listenTo(r,"execute",e=>{o.execute(e.source.commandName),o.editing.view.focus()}),r}_fillDropdownWithListOptions(e,t){const i=this.editor,n=[],o=new Ii;for(const e of t)Xb(e,i,n,o);return fd(e,o,i.ui.componentFactory),n}}function Xb(e,t,i,n){const o=e.model=new Gm(e.model),{commandName:r,bindIsOn:s}=e.model;if("button"===e.type||"switchbutton"===e.type){const e=t.commands.get(r);i.push(e),o.set({commandName:r}),o.bind("isEnabled").to(e),s&&o.bind("isOn").to(e,"value")}o.set({withText:!0}),n.add(e)}i(106);class ew extends vd{static get pluginName(){return"TableSelection"}static get requires(){return[Pb]}init(){const e=this.editor.model;this.listenTo(e,"deleteContent",(e,t)=>this._handleDeleteContent(e,t),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=Qp(this.editor.model.document.selection);return 0==e.length?null:e}getSelectionAsFragment(){const e=this.getSelectedTableCells();return e?this.editor.model.change(t=>{const i=t.createDocumentFragment(),n=this.editor.plugins.get("TableUtils"),{first:o,last:r}=tb(e),{first:s,last:a}=eb(e),c=e[0].findAncestor("table");let l=a,d=r;if(ib(e,n)){const e={firstColumn:o,lastColumn:r,firstRow:s,lastRow:a};l=kb(c,e),d=_b(c,e)}const h=db(c,{startRow:s,startColumn:o,endRow:l,endColumn:d},t);return t.insert(h,i,0),i}):null}setCellSelection(e,t){const i=this._getCellsToSelect(e,t);this.editor.model.change(e=>{e.setSelection(i.cells.map(t=>e.createRangeOn(t)),{backward:i.backward})})}getFocusCell(){const e=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return e&&e.is("element","tableCell")?e:null}getAnchorCell(){const e=Cd(this.editor.model.document.selection.getRanges()).getContainedElement();return e&&e.is("element","tableCell")?e:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add(e=>e.on("selection",(e,i,n)=>{const o=n.writer;!function(e){for(const i of t)e.removeClass("ck-editor__editable_selected",i);t.clear()}(o);const r=this.getSelectedTableCells();if(!r)return;for(const e of r){const i=n.mapper.toViewElement(e);o.addClass("ck-editor__editable_selected",i),t.add(i)}const s=n.mapper.toViewElement(r[r.length-1]);o.setSelection(s,0)},{priority:"lowest"}))}_enablePluginDisabling(){const e=this.editor;this.on("change:isEnabled",()=>{if(!this.isEnabled){const t=this.getSelectedTableCells();if(!t)return;e.model.change(i=>{const n=i.createPositionAt(t[0],0),o=e.model.schema.getNearestSelectionRange(n);i.setSelection(o)})}})}_handleDeleteContent(e,t){const[i,n]=t,o=this.editor.model,r=!n||"backward"==n.direction,s=Qp(i);s.length&&(e.stop(),o.change(e=>{const t=s[r?s.length-1:0];o.change(e=>{for(const t of s)o.deleteContent(e.createSelection(t,"in"))});const n=o.schema.getNearestSelectionRange(e.createPositionAt(t,0));i.is("documentSelection")?e.setSelection(n):i.setTo(n)}))}_getCellsToSelect(e,t){const i=this.editor.plugins.get("TableUtils"),n=i.getCellLocation(e),o=i.getCellLocation(t),r=Math.min(n.row,o.row),s=Math.max(n.row,o.row),a=Math.min(n.column,o.column),c=Math.max(n.column,o.column),l=new Array(s-r+1).fill(null).map(()=>[]),d={startRow:r,endRow:s,startColumn:a,endColumn:c};for(const{row:t,cell:i}of new Bp(e.findAncestor("table"),d))l[t-r].push(i);const h=o.rowe.reverse()),{cells:l.flat(),backward:h||u}}}class tw extends vd{static get pluginName(){return"TableClipboard"}static get requires(){return[ew,Pb]}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"copy",(e,t)=>this._onCopyCut(e,t)),this.listenTo(t,"cut",(e,t)=>this._onCopyCut(e,t)),this.listenTo(e.model,"insertContent",(e,t)=>this._onInsertContent(e,...t),{priority:"high"})}_onCopyCut(e,t){const i=this.editor.plugins.get(ew);if(!i.getSelectedTableCells())return;if("cut"==e.name&&this.editor.isReadOnly)return;t.preventDefault(),e.stop();const n=this.editor.data,o=this.editor.editing.view.document,r=n.toView(i.getSelectionAsFragment());o.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:r,method:e.name})}_onInsertContent(e,t,i){if(i&&!i.is("documentSelection"))return;const n=this.editor.model,o=this.editor.plugins.get(Pb);let r=function(e,t){if(!e.is("documentFragment")&&!e.is("element"))return null;if(e.is("element","table"))return e;if(1==e.childCount&&e.getChild(0).is("element","table"))return e.getChild(0);const i=t.createRangeIn(e);for(const e of i.getItems())if(e.is("element","table")){const n=t.createRange(i.start,t.createPositionBefore(e));if(t.hasContent(n,{ignoreWhitespaces:!0}))return null;const o=t.createRange(t.createPositionAfter(e),i.end);return t.hasContent(o,{ignoreWhitespaces:!0})?null:e}return null}(t,n);if(!r)return;const s=Xp(n.document.selection);s.length?(e.stop(),n.change(e=>{const t={width:o.getColumns(r),height:o.getRows(r)},i=function(e,t,i,n){const o=e[0].findAncestor("table"),r=tb(e),s=eb(e),a={firstColumn:r.first,lastColumn:r.last,firstRow:s.first,lastRow:s.last},c=1===e.length;c&&(a.lastRow+=t.height-1,a.lastColumn+=t.width-1,function(e,t,i,n){const o=n.getColumns(e),r=n.getRows(e);i>o&&n.insertColumns(e,{at:o,columns:i-o});t>r&&n.insertRows(e,{at:r,rows:t-r})}(o,a.lastRow+1,a.lastColumn+1,n));c||!ib(e,n)?function(e,t,i){const{firstRow:n,lastRow:o,firstColumn:r,lastColumn:s}=t,a={first:n,last:o},c={first:r,last:s};nw(e,r,a,i),nw(e,s+1,a,i),iw(e,n,c,i),iw(e,o+1,c,i,n)}(o,a,i):(a.lastRow=kb(o,a),a.lastColumn=_b(o,a));return a}(s,t,e,o),n=i.lastRow-i.firstRow+1,a=i.lastColumn-i.firstColumn+1,c={startRow:0,startColumn:0,endRow:Math.min(n,t.height)-1,endColumn:Math.min(a,t.width)-1};r=db(r,c,e);const l=s[0].findAncestor("table"),d=function(e,t,i,n,o){const{width:r,height:s}=t,a=function(e,t,i){const n=new Array(i).fill(null).map(()=>new Array(t).fill(null));for(const{column:t,row:i,cell:o}of new Bp(e))n[i][t]=o;return n}(e,r,s),c=[...new Bp(i,{startRow:n.firstRow,endRow:n.lastRow,startColumn:n.firstColumn,endColumn:n.lastColumn,includeAllSlots:!0})],l=[];let d;for(const e of c){const{row:t,column:i,cell:c,isAnchor:h}=e;i===n.firstColumn&&(d=e.getPositionBefore()),h&&o.remove(c);const u=t-n.firstRow,m=i-n.firstColumn,f=a[u%s][m%r];if(!f)continue;const g=o.cloneElement(f);gb(g,t,i,n.lastRow,n.lastColumn,o),o.insert(g,d),l.push(g),d=o.createPositionAfter(g)}const h=parseInt(i.getAttribute("headingRows")||0),u=parseInt(i.getAttribute("headingColumns")||0),m=n.firstRowe.createRangeOn(t)));e.setSelection(t)}else e.setSelection(d[0],0)})):wb(r,o)}}function iw(e,t,i,n,o=0){if(t<1)return;return hb(e,t,o).filter(({column:e,cellWidth:t})=>ow(e,t,i)).map(({cell:e})=>ub(e,t,n))}function nw(e,t,i,n){if(t<1)return;return mb(e,t).filter(({row:e,cellHeight:t})=>ow(e,t,i)).map(({cell:e,column:i})=>fb(e,i,t,n))}function ow(e,t,i){const n=e+t-1,{first:o,last:r}=i;return e>=o&&e<=r||e=o}class rw extends vd{static get pluginName(){return"TableKeyboard"}static get requires(){return[ew]}init(){const e=this.editor.editing.view.document;this.editor.keystrokes.set("Tab",(...e)=>this._handleTabOnSelectedTable(...e),{priority:"low"}),this.editor.keystrokes.set("Tab",this._getTabHandler(!0),{priority:"low"}),this.editor.keystrokes.set("Shift+Tab",this._getTabHandler(!1),{priority:"low"}),this.listenTo(e,"keydown",(...e)=>this._onKeydown(...e),{priority:wi.get("high")-10})}_handleTabOnSelectedTable(e,t){const i=this.editor,n=i.model.document.selection.getSelectedElement();n&&n.is("element","table")&&(t(),i.model.change(e=>{e.setSelection(e.createRangeIn(n.getChild(0).getChild(0)))}))}_getTabHandler(e){const t=this.editor;return(i,n)=>{let o=Zp(t.model.document.selection)[0];if(o||(o=this.editor.plugins.get("TableSelection").getFocusCell()),!o)return;n();const r=o.parent,s=r.parent,a=s.getChildIndex(r),c=r.getChildIndex(o),l=0===c;if(!e&&l&&0===a)return void t.model.change(e=>{e.setSelection(e.createRangeOn(s))});const d=c===r.childCount-1,h=a===s.childCount-1;if(e&&h&&d&&(t.execute("insertTableRowBelow"),a===s.childCount-1))return void t.model.change(e=>{e.setSelection(e.createRangeOn(s))});let u;if(e&&d){const e=s.getChild(a+1);u=e.getChild(0)}else if(!e&&l){const e=s.getChild(a-1);u=e.getChild(e.childCount-1)}else u=r.getChild(c+(e?1:-1));t.model.change(e=>{e.setSelection(e.createRangeIn(u))})}}_onKeydown(e,t){const i=this.editor,n=t.keyCode;if(!Po(n))return;const o=So(n,i.locale.contentLanguageDirection);this._handleArrowKeys(o,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const i=this.editor.model.document.selection,n=["right","down"].includes(e),o=Qp(i);if(o.length){let i;return i=t?this.editor.plugins.get("TableSelection").getFocusCell():n?o[o.length-1]:o[0],this._navigateFromCellInDirection(i,e,t),!0}const r=i.focus.findAncestor("tableCell");return!!r&&(!(t&&!i.isCollapsed&&i.isBackward==n)&&(!!this._isSelectionAtCellEdge(i,r,n)&&(this._navigateFromCellInDirection(r,e,t),!0)))}_isSelectionAtCellEdge(e,t,i){const n=this.editor.model,o=this.editor.model.schema,r=i?e.getLastPosition():e.getFirstPosition();if(!o.getLimitElement(r).is("element","tableCell")){return n.createPositionAt(t,i?"end":0).isTouching(r)}const s=n.createSelection(r);return n.modifySelection(s,{direction:i?"forward":"backward"}),r.isEqual(s.focus)}_navigateFromCellInDirection(e,t,i=!1){const n=this.editor.model,o=e.findAncestor("table"),r=[...new Bp(o,{includeAllSlots:!0})],{row:s,column:a}=r[r.length-1],c=r.find(({cell:t})=>t==e);let{row:l,column:d}=c;switch(t){case"left":d--;break;case"up":l--;break;case"right":d+=c.cellWidth;break;case"down":l+=c.cellHeight}if(l<0||l>s||d<0&&l<=0||d>a&&l>=s)return void n.change(e=>{e.setSelection(e.createRangeOn(o))});d<0?(d=i?0:a,l--):d>a&&(d=i?a:0,l++);const h=r.find(e=>e.row==l&&e.column==d).cell,u=["right","down"].includes(t),m=this.editor.plugins.get("TableSelection");if(i&&m.isEnabled){const t=m.getAnchorCell()||e;m.setCellSelection(t,h)}else{const e=n.createPositionAt(h,u?0:"end");n.change(t=>{t.setSelection(e)})}}}class sw extends Gr{constructor(e){super(e),this.domEventType=["mousemove","mouseup","mouseleave"]}onDomEvent(e){this.fire(e.type,e)}}class aw extends vd{static get pluginName(){return"TableMouse"}static get requires(){return[ew]}init(){this.editor.editing.view.addObserver(sw),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor;let t=!1;const i=e.plugins.get(ew);this.listenTo(e.editing.view.document,"mousedown",(n,o)=>{if(!this.isEnabled||!i.isEnabled)return;if(!o.domEvent.shiftKey)return;const r=i.getAnchorCell()||Zp(e.model.document.selection)[0];if(!r)return;const s=this._getModelTableCellFromDomEvent(o);s&&cw(r,s)&&(t=!0,i.setCellSelection(r,s),o.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{t=!1}),this.listenTo(e.editing.view.document,"selectionChange",e=>{t&&e.stop()},{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,i,n=!1,o=!1;const r=e.plugins.get(ew);this.listenTo(e.editing.view.document,"mousedown",(e,i)=>{this.isEnabled&&r.isEnabled&&(i.domEvent.shiftKey||i.domEvent.ctrlKey||i.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(i)))}),this.listenTo(e.editing.view.document,"mousemove",(e,s)=>{if(!s.domEvent.buttons)return;if(!t)return;const a=this._getModelTableCellFromDomEvent(s);a&&cw(t,a)&&(i=a,n||i==t||(n=!0)),n&&(o=!0,r.setCellSelection(t,i),s.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{n=!1,o=!1,t=null,i=null}),this.listenTo(e.editing.view.document,"selectionChange",e=>{o&&e.stop()},{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,i=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(i).parent.findAncestor("tableCell",{includeSelf:!0})}}function cw(e,t){return e.parent.parent==t.parent.parent}i(108);function lw(e){const t=e.getSelectedElement();return t&&hw(t)?t:null}function dw(e){const t=function(e,t){let i=t.parent;for(;i;){if(i.name===e)return i;i=i.parent}}("table",e.getFirstPosition());return t&&hw(t.parent)?t.parent:null}function hw(e){return!!e.getCustomProperty("table")&&lh(e)}var uw=/[\\^$.*+?()[\]{}|]/g,mw=RegExp(uw.source);var fw=function(e){return(e=sn(e))&&mw.test(e)?e.replace(uw,"\\$&"):e};const gw={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:"1/2",to:"½"},oneThird:{from:"1/3",to:"⅓"},twoThirds:{from:"2/3",to:"⅔"},oneForth:{from:"1/4",to:"¼"},threeQuarters:{from:"3/4",to:"¾"},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:vw('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:vw("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:vw("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:vw('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:vw('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:vw("'"),to:[null,"‚",null,"’"]}},pw={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},bw=["symbols","mathematical","typography","quotes"];function ww(e){return"string"==typeof e?new RegExp(`(${fw(e)})$`):e}function kw(e){return"string"==typeof e?()=>[e]:e instanceof Array?()=>e:e}function _w(e){return(e.textNode?e.textNode:e.nodeAfter).getAttributes()}function vw(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function yw(e){if(e.is("$text")||e.is("$textProxy"))return e.data;let t="",i=null;for(const n of e.getChildren()){const e=yw(n);i&&i.is("element")&&(t+="\n"),t+=e,i=n}return t}class xw{constructor(e,t){this.loader=e,this.options=t}upload(){return this.loader.file.then(e=>new Promise((t,i)=>{this._initRequest(),this._initListeners(t,i,e),this._sendRequest(e)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.options.uploadUrl,!0),e.responseType="json"}_initListeners(e,t,i){const n=this.xhr,o=this.loader,r=`Couldn't upload file: ${i.name}.`;n.addEventListener("error",()=>t(r)),n.addEventListener("abort",()=>t()),n.addEventListener("load",()=>{const i=n.response;if(!i||i.error)return t(i&&i.error&&i.error.message?i.error.message:r);e(i.url?{default:i.url}:i.urls)}),n.upload&&n.upload.addEventListener("progress",e=>{e.lengthComputable&&(o.uploadTotal=e.total,o.uploaded=e.loaded)})}_sendRequest(e){const t=this.options.headers||{},i=this.options.withCredentials||!1;for(const e of Object.keys(t))this.xhr.setRequestHeader(e,t[e]);this.xhr.withCredentials=i;const n=new FormData;n.append("upload",e),this.xhr.send(n)}}class Aw extends _d{}Aw.builtinPlugins=[class extends vd{static get requires(){return[Id,zd]}static get pluginName(){return"Alignment"}},class extends vd{static get pluginName(){return"AutoLink"}init(){const e=this.editor.model.document.selection;e.on("change:range",()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")}),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){const e=this.editor,t=new Ld(e.model,e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=Bd(e.substr(0,e.length-1));return t?{url:t}:void 0}),i=e.plugins.get("Input");t.on("matched:data",(t,n)=>{const{batch:o,range:r,url:s}=n;if(!i.isInput(o))return;const a=r.end.getShiftedBy(-1),c=a.getShiftedBy(-s.length),l=e.model.createRange(c,a);this._applyAutoLink(s,l)}),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("enter");i&&i.on("execute",()=>{const e=t.document.selection.getFirstPosition(),i=t.createRange(t.createPositionAt(e.parent.previousSibling,0),t.createPositionAt(e.parent.previousSibling,"end"));this._checkAndApplyAutoLinkOnRange(i)})}_enableShiftEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("shiftEnter");i&&i.on("execute",()=>{const e=t.document.selection.getFirstPosition(),i=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(i)})}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:i,range:n}=Dd(e,t),o=Bd(i);if(o){const e=t.createRange(n.end.getShiftedBy(-o.length),n.end);this._applyAutoLink(o,e)}}_applyAutoLink(e,t){const i=this.editor.model;this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,i)&&i.enqueueChange(i=>{const n=(o=e,jd.exec(o)?"mailto:"+e:e);var o;i.setAttribute("linkHref",n,t)})}},class extends vd{static get requires(){return[Ud,qd]}static get pluginName(){return"Bold"}},class extends vd{static get pluginName(){return"CKFinder"}static get requires(){return[Iu,$d,ju]}},ju,class extends vd{static get requires(){return[Yh,qu,tm,Ku,rm,Tm]}static get pluginName(){return"Essentials"}},class extends vd{static get requires(){return[jm,Hm]}static get pluginName(){return"FontColor"}},class extends vd{static get requires(){return[Ym,Km]}static get pluginName(){return"FontSize"}},class extends vd{static get requires(){return[of,rf]}static get pluginName(){return"Heading"}},class extends vd{static get requires(){return[Sm,Em]}static get pluginName(){return"HorizontalLine"}},class extends vd{static get requires(){return[Ah,mf,Mf]}static get pluginName(){return"Image"}},class extends vd{static get requires(){return[Rf]}static get pluginName(){return"ImageCaption"}},class extends vd{static get requires(){return[jf,Jf,Hf]}static get pluginName(){return"ImageResize"}},class extends vd{static get requires(){return[ag,cg]}static get pluginName(){return"ImageStyle"}},class extends vd{static get requires(){return[lg]}static get pluginName(){return"ImageToolbar"}afterInit(){const e=this.editor,t=e.t;e.plugins.get(lg).register("image",{ariaLabel:t("Image toolbar"),items:e.config.get("image.toolbar")||[],getRelatedElement:bh})}},class extends vd{static get pluginName(){return"ImageUpload"}static get requires(){return[Mg,_g,vg]}},class extends vd{static get pluginName(){return"Indent"}static get requires(){return[Rg,Dg]}},class extends vd{static get requires(){return[Vg,Bg]}static get pluginName(){return"Italic"}},class extends vd{static get requires(){return[Au,Yg]}static get pluginName(){return"Link"}},class extends vd{static get requires(){return[kp,vp]}static get pluginName(){return"List"}},class extends vd{static get requires(){return[Ep,Rp,Ip,mf]}static get pluginName(){return"MediaEmbed"}},Xm,class extends vd{static get requires(){return[Ou]}static get pluginName(){return"SimpleUploadAdapter"}init(){const e=this.editor.config.get("simpleUpload");e&&(e.uploadUrl?this.editor.plugins.get(Ou).createUploadAdapter=t=>new xw(t,e):console.warn(Object(ki.a)('simple-upload-adapter-missing-uploadUrl: Missing the "uploadUrl" property in the "simpleUpload" editor configuration.')))}},class extends vd{static get requires(){return[Kb,Zb,ew,aw,rw,tw,mf]}static get pluginName(){return"Table"}},class extends vd{static get requires(){return[lg]}static get pluginName(){return"TableToolbar"}afterInit(){const e=this.editor,t=e.t,i=e.plugins.get(lg),n=e.config.get("table.contentToolbar"),o=e.config.get("table.tableToolbar");n&&i.register("tableContent",{ariaLabel:t("Table toolbar"),items:n,getRelatedElement:dw}),o&&i.register("table",{ariaLabel:t("Table toolbar"),items:o,getRelatedElement:lw})}},class extends vd{static get pluginName(){return"TextTransformation"}constructor(e){super(e),e.config.define("typing",{transformations:{include:bw}})}init(){const e=this.editor.model.document.selection;e.on("change:range",()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")}),this._enableTransformationWatchers()}_enableTransformationWatchers(){const e=this.editor,t=e.model,i=e.plugins.get("Input"),n=function(e){const t=e.extra||[],i=e.remove||[],n=e=>!i.includes(e);return function(e){const t=new Set;for(const i of e)if(pw[i])for(const e of pw[i])t.add(e);else t.add(i);return Array.from(t)}(e.include.concat(t).filter(n)).filter(n).map(e=>gw[e]||e).map(e=>({from:ww(e.from),to:kw(e.to)}))}(e.config.get("typing.transformations")),o=new Ld(e.model,e=>{for(const t of n){if(t.from.test(e))return{normalizedTransformation:t}}});o.on("matched:data",(e,n)=>{if(!i.isInput(n.batch))return;const{from:o,to:r}=n.normalizedTransformation,s=o.exec(n.text),a=r(s.slice(1)),c=n.range;let l=s.index;t.enqueueChange(e=>{for(let i=1;i{this._config.onUpdate(t)}),di(this._config.container)&&this._config.container.appendChild(this.wordCountContainer)}destroy(){this._outputView&&(this._outputView.element.remove(),this._outputView.destroy()),super.destroy()}get wordCountContainer(){const e=this.editor,t=e.t,i=e.config.get("wordCount.displayWords"),n=e.config.get("wordCount.displayCharacters"),o=gl.bind(this,this),r=[];return this._outputView||(this._outputView=new Ol,(i||void 0===i)&&(this.bind("_wordsLabel").to(this,"words",e=>t("Words: %0",[e])),r.push({tag:"div",children:[{text:[o.to("_wordsLabel")]}],attributes:{class:"ck-word-count__words"}})),(n||void 0===n)&&(this.bind("_charactersLabel").to(this,"characters",e=>t("Characters: %0",[e])),r.push({tag:"div",children:[{text:[o.to("_charactersLabel")]}],attributes:{class:"ck-word-count__characters"}})),this._outputView.setTemplate({tag:"div",attributes:{class:["ck","ck-word-count"]},children:r}),this._outputView.render()),this._outputView.element}_getCharacters(){return yw(this.editor.model.document.getRoot()).replace(/\n/g,"").length}_getWords(){return(yw(this.editor.model.document.getRoot()).match(this._wordsMatchRegExp)||[]).length}_refreshStats(){const e=this.words=this._getWords(),t=this.characters=this._getCharacters();this.fire("update",{words:e,characters:t})}}];t.default=Aw}]).default})); +!function(e){const t=e.fr=e.fr||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 sur %1","Align center":"Centrer","Align left":"Aligner à gauche","Align right":"Aligner à droite",Aquamarine:"Bleu vert",Big:"Grand",Black:"Noir",Blue:"Bleu",Bold:"Gras","Bulleted List":"Liste à puces",Cancel:"Annuler","Cannot upload file:":"Envoi du fichier échoué :","Centered image":"Image centrée","Change image text alternative":"Changer le texte alternatif à l’image","Characters: %0":"Caractères : %0","Choose heading":"Choisir l'en-tête",Column:"Colonne","Could not insert image at the current position.":"Impossible d'insérer l'image à la position courante.","Could not obtain resized image URL.":"Impossible d'obtenir l'image redimensionnée","Decrease indent":"Diminuer le retrait",Default:"Par défaut","Delete column":"Supprimer la colonne","Delete row":"Supprimer la ligne","Dim grey":"Gris pâle","Document colors":"Couleurs du document",Downloadable:"Fichier téléchargeable","Dropdown toolbar":"Barre d'outils dans un menu déroulant","Edit link":"Modifier le lien","Editor toolbar":"Barre d'outils de l'éditeur","Enter image caption":"Saisir la légende de l’image","Font Color":"Couleur de police","Font Size":"Taille de police","Full size image":"Image taille réelle",Green:"Vert",Grey:"Gris","Header column":"Colonne d'entête","Header row":"Ligne d'entête",Heading:"En-tête","Heading 1":"Titre 1","Heading 2":"Titre 2","Heading 3":"Titre 3","Heading 4":"Titre 4","Heading 5":"Titre 5","Heading 6":"Titre 6","Horizontal line":"Ligne horizontale",Huge:"Enorme","Image resize list":"","Image toolbar":"Barre d'outils des images","image widget":"Objet image","Increase indent":"Augmenter le retrait",Insert:"","Insert column left":"Insérer une colonne à gauche","Insert column right":"Insérer une colonne à droite","Insert image":"Insérer une image","Insert image or file":"Insérer une image ou un fichier","Insert image via URL":"","Insert media":"Insérer un média","Insert paragraph after block":"","Insert paragraph before block":"","Insert row above":"Insérer une ligne au-dessus","Insert row below":"Insérer une ligne en-dessous","Insert table":"Insérer un tableau","Inserting image failed":"L'insertion d'image a échoué.",Italic:"Italique",Justify:"Justifier","Left aligned image":"Image alignée à gauche","Light blue":"Bleu clair","Light green":"Vert clair","Light grey":"Gris clair",Link:"Lien","Link image":"","Link URL":"URL du lien","Media URL":"URL de média","media widget":"widget média","Merge cell down":"Fusionner la cellule en-dessous","Merge cell left":"Fusionner la cellule à gauche","Merge cell right":"Fusionner la cellule à droite","Merge cell up":"Fusionner la cellule au-dessus","Merge cells":"Fusionner les cellules",Next:"Suivant","Numbered List":"Liste numérotée","Open in a new tab":"Ouvrir dans un nouvel onglet","Open link in new tab":"Ouvrir le lien dans un nouvel onglet",Orange:"Orange",Original:"",Paragraph:"Paragraphe","Paste the image source URL.":"","Paste the media URL in the input.":"Coller l'URL du média",Previous:"Précedent",Purple:"Violet",Red:"Rouge",Redo:"Restaurer","Remove color":"Enlever la couleur","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Rich Text Editor":"Éditeur de texte enrichi","Rich Text Editor, %0":"Éditeur de texte enrichi, %0","Right aligned image":"Image alignée à droite",Row:"Ligne",Save:"Enregistrer","Select column":"","Select row":"","Selecting resized image failed":"La sélection de l'image redimensionnée a échoué.","Show more items":"Montrer plus d'éléments","Side image":"Image latérale",Small:"Petit","Split cell horizontally":"Scinder la cellule horizontalement","Split cell vertically":"Scinder la cellule verticalement","Table toolbar":"Barre d'outils des tableaux","Text alignment":"Alignement du texte","Text alignment toolbar":"Barre d'outils d'alignement du texte","Text alternative":"Texte alternatif","The URL must not be empty.":"L'URL ne doit pas être vide.","This link has no URL":"Ce lien n'a pas d'URL","This media URL is not supported.":"Cette URL de média n'est pas supportée.",Tiny:"Minuscule","Tip: Paste the URL into the content to embed faster.":"Astuce : Copier l'URL du média dans le contenu pour l'insérer plus rapidement",Turquoise:"Turquoise",Undo:"Annuler",Unlink:"Supprimer le lien",Update:"","Upload failed":"Échec de l'envoi","Upload in progress":"Téléchargement en cours",White:"Blanc","Widget toolbar":"Barre d'outils du widget","Words: %0":"Mots : %0",Yellow:"Jaune"}),t.getPluralForm=function(e){return e>1}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ClassicEditor=t():e.ClassicEditor=t()}(window,(function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=112)}([function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return o}));class n extends Error{constructor(e,t,i){e=o(e),i&&(e+=" "+JSON.stringify(i)),super(e),this.name="CKEditorError",this.context=t,this.data=i}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const i=new n(e.message,t);throw i.stack=e.stack,i}}function o(e){const t=e.match(/^([^:]+):/);return t?e+` Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-${t[1]}\n`:e}},function(e,t,i){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),s=[];function a(e){for(var t=-1,i=0;i:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}"},function(e,t,i){var n=i(1),o=i(20);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}"},function(e,t,i){var n=i(1),o=i(22);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{z-index:var(--ck-z-modal);position:fixed;top:0}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{top:auto;position:absolute}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{box-shadow:var(--ck-drop-shadow),0 0;border-width:0 1px 1px;border-top-left-radius:0;border-top-right-radius:0}"},function(e,t,i){var n=i(1),o=i(24);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on .ck-tooltip{display:none}.ck.ck-dropdown .ck-dropdown__panel{-webkit-backface-visibility:hidden;display:none;z-index:var(--ck-z-modal);position:absolute}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{top:100%;bottom:auto}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(0.5*var(--ck-icon-size))}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{box-shadow:var(--ck-drop-shadow),0 0;background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}"},function(e,t,i){var n=i(1),o=i(26);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{width:var(--ck-icon-size);height:var(--ck-icon-size);font-size:.8333350694em;will-change:transform}.ck.ck-icon,.ck.ck-icon *{color:inherit;cursor:inherit}.ck.ck-icon :not([fill]){fill:currentColor}"},function(e,t,i){var n=i(1),o=i(28);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports='.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:var(--ck-z-modal)}.ck.ck-tooltip .ck-tooltip__text{display:inline-block}.ck.ck-tooltip .ck-tooltip__text:after{content:"";width:0;height:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%;top:0;transition:opacity .2s ease-in-out .2s}.ck.ck-tooltip .ck-tooltip__text{border-radius:0}.ck-rounded-corners .ck.ck-tooltip .ck-tooltip__text,.ck.ck-tooltip .ck-tooltip__text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-tooltip .ck-tooltip__text{font-size:.9em;line-height:1.5;color:var(--ck-color-tooltip-text);padding:var(--ck-spacing-small) var(--ck-spacing-medium);background:var(--ck-color-tooltip-background);position:relative;left:-50%}.ck.ck-tooltip .ck-tooltip__text:after{transition:opacity .2s ease-in-out .2s;border-style:solid;left:50%}.ck.ck-tooltip.ck-tooltip_s{bottom:calc(-1*var(--ck-tooltip-arrow-size));transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after{top:calc(-1*var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-left-color:transparent;border-bottom-color:var(--ck-color-tooltip-background);border-right-color:transparent;border-top-color:transparent;border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:var(--ck-tooltip-arrow-size);border-top-width:0}.ck.ck-tooltip.ck-tooltip_n{top:calc(-1*var(--ck-tooltip-arrow-size));transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:calc(-1*var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;border-top-color:var(--ck-color-tooltip-background);border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:0;border-right-width:var(--ck-tooltip-arrow-size);border-top-width:var(--ck-tooltip-arrow-size)}'},function(e,t,i){var n=i(1),o=i(30);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-button,a.ck.ck-button{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:block}@media (hover:none){.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:none}}.ck.ck-button,a.ck.ck-button{position:relative;display:inline-flex;align-items:center;justify-content:left}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button:hover .ck-tooltip,a.ck.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck.ck-button:focus:not(:hover) .ck-tooltip,a.ck.ck-button:focus:not(:hover) .ck-tooltip{display:none}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-default-active-shadow)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{white-space:nowrap;cursor:default;vertical-align:middle;padding:var(--ck-spacing-tiny);text-align:center;min-width:var(--ck-ui-component-min-height);min-height:var(--ck-ui-component-min-height);line-height:1;font-size:inherit;border:1px solid transparent;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;-webkit-appearance:none}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{font-size:inherit;font-weight:inherit;color:inherit;cursor:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__icon{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(-1*var(--ck-spacing-small));margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-right:calc(-1*var(--ck-spacing-small));margin-left:var(--ck-spacing-small)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-on-active-shadow)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-action-active-shadow)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}"},function(e,t,i){var n=i(1),o=i(32);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{list-style-type:none;background:var(--ck-color-list-background)}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{min-height:unset;width:100%;text-align:left;border-radius:0;padding:calc(0.2*var(--ck-line-height-base)*var(--ck-font-size-base)) calc(0.4*var(--ck-line-height-base)*var(--ck-font-size-base))}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(1.2*var(--ck-line-height-base)*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{height:1px;width:100%;background:var(--ck-color-base-border)}"},function(e,t,i){var n=i(1),o=i(34);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:1.0769230769em;--ck-switch-button-toggle-spacing:1px;--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2*var(--ck-switch-button-toggle-spacing))}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(2*var(--ck-spacing-large))}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(2*var(--ck-spacing-large))}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{transition:background .4s ease;width:var(--ck-switch-button-toggle-width);background:var(--ck-color-switch-button-off-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(0.5*var(--ck-border-radius))}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{margin:var(--ck-switch-button-toggle-spacing);width:var(--ck-switch-button-toggle-inner-size);height:var(--ck-switch-button-toggle-inner-size);background:var(--ck-color-switch-button-inner-background);transition:all .3s ease}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var(--ck-switch-button-translation))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(-1*var(--ck-switch-button-translation)))}"},function(e,t,i){var n=i(1),o=i(36);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-toolbar-dropdown .ck.ck-toolbar .ck.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar-dropdown .ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}"},function(e,t,i){var n=i(1),o=i(38);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}"},function(e,t,i){var n=i(1),o=i(40);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-toolbar{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-flow:row nowrap;align-items:center}.ck.ck-toolbar>.ck-toolbar__items{display:flex;flex-flow:row wrap;align-items:center;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);padding:0 var(--ck-spacing-small);border:1px solid var(--ck-color-toolbar-border)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;width:1px;min-width:1px;background:var(--ck-color-toolbar-border);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items>*{margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>*,.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{width:100%;margin:0;border-radius:0;border:0}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-right:var(--ck-spacing-small)}"},function(e,t,i){var n=i(1),o=i(42);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}"},function(e,t,i){var n=i(1),o=i(44);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{width:0;height:0;border-style:solid}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:var(--ck-balloon-arrow-height);border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:0}.ck.ck-balloon-panel[class*=arrow_n]:before{border-bottom-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-color:transparent;border-right-color:transparent;border-top-color:transparent}.ck.ck-balloon-panel[class*=arrow_n]:after{border-bottom-color:var(--ck-color-panel-background);margin-top:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:0;border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-top-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent}.ck.ck-balloon-panel[class*=arrow_s]:after{border-top-color:var(--ck-color-panel-background);margin-bottom:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(-1*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{left:50%;margin-left:calc(-1*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{right:25%;margin-right:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{left:25%;margin-left:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{right:25%;margin-right:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}'},function(e,t,i){var n=i(1),o=i(46);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{height:100%;border-right:1px solid var(--ck-color-base-text);margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}"},function(e,t,i){var n=i(1),o=i(48);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck-editor__editable .ck-horizontal-line{display:flow-root}.ck-content hr{margin:15px 0;height:4px;background:#dedede;border:0}"},function(e,t,i){var n=i(1),o=i(50);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#000}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{width:var(--ck-color-grid-tile-size);height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;border:0}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{display:none;color:var(--ck-color-color-grid-check-icon)}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}"},function(e,t,i){var n=i(1),o=i(52);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck .ck-button.ck-color-table__remove-color{display:flex;align-items:center;width:100%}label.ck.ck-color-grid__label{font-weight:unset}.ck .ck-button.ck-color-table__remove-color{padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck .ck-button.ck-color-table__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-base-border)}[dir=ltr] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard)}"},function(e,t,i){var n=i(1),o=i(54);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck-content .text-tiny{font-size:.7em}.ck-content .text-small{font-size:.85em}.ck-content .text-big{font-size:1.4em}.ck-content .text-huge{font-size:1.8em}"},function(e,t){e.exports=".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}"},function(e,t,i){var n=i(1),o=i(57);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports='.ck .ck-widget .ck-widget__type-around__button{display:block;position:absolute;overflow:hidden;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{position:absolute;top:50%;left:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{top:calc(-0.5*var(--ck-widget-outline-thickness));left:min(10%,30px);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(-0.5*var(--ck-widget-outline-thickness));right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;position:absolute;top:1px;left:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;position:absolute;left:0;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(-1*var(--ck-widget-outline-thickness));right:calc(-1*var(--ck-widget-outline-thickness))}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{top:calc(-1*var(--ck-widget-outline-thickness) - 1px);display:block}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(-1*var(--ck-widget-outline-thickness) - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{width:var(--ck-widget-type-around-button-size);height:var(--ck-widget-type-around-button-size);background:var(--ck-color-widget-type-around-button);border-radius:100px;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);opacity:0;pointer-events:none}.ck .ck-widget .ck-widget__type-around__button svg{width:10px;height:8px;transform:translate(-50%,-50%);transition:transform .5s ease;margin-top:1px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{width:calc(var(--ck-widget-type-around-button-size) - 2px);height:calc(var(--ck-widget-type-around-button-size) - 2px);border-radius:100px;background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3))}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{pointer-events:none;height:1px;animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;outline:1px solid hsla(0,0%,100%,.5);background:var(--ck-color-base-text)}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer{opacity:0}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}'},function(e,t,i){var n=i(1),o=i(59);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-resizer-size:10px;--ck-resizer-border-width:1px;--ck-resizer-border-radius:2px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-tooltip-offset:10px;--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover .ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);color:var(--ck-color-resizer-tooltip-text);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);font-size:var(--ck-font-size-tiny);display:block;padding:var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{top:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{top:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-width:var(--ck-widget-outline-thickness);outline-style:solid;outline-color:transparent;transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;background-color:var(--ck-color-widget-editable-focus-background)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{padding:4px;box-sizing:border-box;background-color:transparent;opacity:0;transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;transform:translateY(-100%);left:calc(0px - var(--ck-widget-outline-thickness))}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{width:var(--ck-widget-handler-icon-size);height:var(--ck-widget-handler-icon-size);color:var(--ck-color-widget-drag-handler-icon-color)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover .ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover .ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-focus-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle .ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}"},function(e,t,i){var n=i(1),o=i(61);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view>.ck.ck-label{width:100%;text-overflow:ellipsis;overflow:hidden}"},function(e,t,i){var n=i(1),o=i(63);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=":root{--ck-input-text-width:18em}.ck.ck-input-text{border-radius:0}.ck-rounded-corners .ck.ck-input-text,.ck.ck-input-text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-text{box-shadow:var(--ck-inner-shadow),0 0;background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);min-width:var(--ck-input-text-width);min-height:var(--ck-ui-component-min-height);transition:box-shadow .2s ease-in-out,border .2s ease-in-out}.ck.ck-input-text:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),var(--ck-inner-shadow)}.ck.ck-input-text[readonly]{border:1px solid var(--ck-color-input-disabled-border);background:var(--ck-color-input-disabled-background);color:var(--ck-color-input-disabled-text)}.ck.ck-input-text[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),var(--ck-inner-shadow)}.ck.ck-input-text.ck-error{border-color:var(--ck-color-input-error-border);animation:ck-text-input-shake .3s ease both}.ck.ck-input-text.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),var(--ck-inner-shadow)}@keyframes ck-text-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}"},function(e,t,i){var n=i(1),o=i(65);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-field-view{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}.ck.ck-text-alternative-form{padding:var(--ck-spacing-standard)}.ck.ck-text-alternative-form:focus{outline:none}[dir=ltr] .ck.ck-text-alternative-form>:not(:first-child),[dir=rtl] .ck.ck-text-alternative-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-text-alternative-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-text-alternative-form .ck-labeled-field-view{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-text-alternative-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-text-alternative-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-text-alternative-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-text-alternative-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-text-alternative-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-text-alternative-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(e,t,i){var n=i(1),o=i(67);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck .ck-balloon-rotator__navigation{display:flex;align-items:center;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}"},function(e,t,i){var n=i(1),o=i(69);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);width:100%;height:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}"},function(e,t,i){var n=i(1),o=i(71);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck-content .image{display:table;clear:both;text-align:center;margin:1em auto}.ck-content .image img{display:block;margin:0 auto;max-width:100%;min-width:50px}"},function(e,t,i){var n=i(1),o=i(73);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:#333;background-color:#f7f7f7;padding:.6em;font-size:.75em;outline-offset:-1px}"},function(e,t,i){var n=i(1),o=i(75);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;position:absolute;pointer-events:none;left:0;top:0;outline:1px solid var(--ck-color-resizer)}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{position:absolute;pointer-events:all;width:var(--ck-resizer-size);height:var(--ck-resizer-size);background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{top:var(--ck-resizer-offset);left:var(--ck-resizer-offset);cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{top:var(--ck-resizer-offset);right:var(--ck-resizer-offset);cursor:nesw-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset);cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset);cursor:nesw-resize}"},function(e,t,i){var n=i(1),o=i(77);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck-content .image.image_resized{max-width:100%;display:block;box-sizing:border-box}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}[dir=ltr] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-left:var(--ck-spacing-standard)}.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label{width:4em}"},function(e,t,i){var n=i(1),o=i(79);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=":root{--ck-image-style-spacing:1.5em}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing);max-width:50%}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}"},function(e,t,i){var n=i(1),o=i(81);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button .ck-tooltip{display:none}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__action{border-top-right-radius:unset;border-bottom-right-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__action{border-top-left-radius:unset;border-bottom-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-radius:0}.ck-rounded-corners [dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow,[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:unset;border-bottom-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-top-right-radius:unset;border-bottom-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled){border-left-color:var(--ck-color-split-button-hover-border)}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled){border-right-color:var(--ck-color-split-button-hover-border)}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}"},function(e,t,i){var n=i(1),o=i(83);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-image-upload-form__action-row{margin-top:var(--ck-spacing-standard)}.ck.ck-form__row.ck-image-upload-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-image-upload-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row.ck-image-upload-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}"},function(e,t,i){var n=i(1),o=i(85);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-image-upload__panel{padding:var(--ck-spacing-standard)}.ck.ck-image-upload__ck-finder-button{display:block;width:100%;margin:var(--ck-spacing-standard) auto;border:1px solid #ccc;border-radius:var(--ck-border-radius)}"},function(e,t,i){var n=i(1),o=i(87);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-editor__editable .image{position:relative}.ck.ck-editor__editable .image .ck-progress-bar{position:absolute;top:0;left:0}.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar{height:2px;width:0;background:var(--ck-color-upload-bar-background);transition:width .1s}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}"},function(e,t,i){var n=i(1),o=i(89);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports='.ck-image-upload-complete-icon{display:block;position:absolute;top:10px;right:10px;border-radius:50%}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20px;--ck-image-upload-icon-width:2px}.ck-image-upload-complete-icon{width:var(--ck-image-upload-icon-size);height:var(--ck-image-upload-icon-size);opacity:0;background:var(--ck-color-image-upload-icon-background);animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;animation-fill-mode:forwards,forwards;animation-duration:.5s,.5s;font-size:var(--ck-image-upload-icon-size);animation-delay:0ms,3s}.ck-image-upload-complete-icon:after{left:25%;top:50%;opacity:0;height:0;width:0;transform:scaleX(-1) rotate(135deg);transform-origin:left top;border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);animation-name:ck-upload-complete-icon-check;animation-duration:.5s;animation-delay:.5s;animation-fill-mode:forwards;box-sizing:border-box}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{opacity:1;width:0;height:0}33%{width:.3em;height:0}to{opacity:1;width:.3em;height:.45em}}'},function(e,t,i){var n=i(1),o=i(91);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports='.ck .ck-upload-placeholder-loader{position:absolute;display:flex;align-items:center;justify-content:center;top:0;left:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px}.ck .ck-image-upload-placeholder{width:100%;margin:0}.ck .ck-upload-placeholder-loader{width:100%;height:100%}.ck .ck-upload-placeholder-loader:before{width:var(--ck-upload-placeholder-loader-size);height:var(--ck-upload-placeholder-loader-size);border-radius:50%;border-top:3px solid var(--ck-color-upload-placeholder-loader);border-right:2px solid transparent;animation:ck-upload-placeholder-loader 1s linear infinite}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}'},function(e,t,i){var n=i(1),o=i(93);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form{padding:var(--ck-spacing-standard)}.ck.ck-link-form:focus{outline:none}[dir=ltr] .ck.ck-link-form>:not(:first-child),[dir=rtl] .ck.ck-link-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-link-form .ck-labeled-field-view{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-link-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}.ck.ck-link-form_layout-vertical{padding:0;min-width:var(--ck-input-text-width)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical .ck-button{padding:var(--ck-spacing-standard);margin:0;border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border);width:50%}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin-left:0}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{border:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}"},function(e,t,i){var n=i(1),o=i(95);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions{padding:var(--ck-spacing-standard)}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{padding:0 var(--ck-spacing-medium);color:var(--ck-color-link-default);text-overflow:ellipsis;cursor:pointer;max-width:var(--ck-input-text-width);min-width:3em;text-align:center}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}.ck.ck-link-actions:focus{outline:none}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{min-width:0;max-width:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview):first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview):last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(e,t,i){var n=i(1),o=i(97);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-link-image_icon{position:absolute;top:var(--ck-spacing-medium);right:var(--ck-spacing-medium);width:28px;height:28px;padding:4px;box-sizing:border-box;border-radius:var(--ck-border-radius)}.ck.ck-link-image_icon svg{fill:currentColor}.ck.ck-link-image_icon{color:#fff;background:rgba(0,0,0,.4)}"},function(e,t,i){var n=i(1),o=i(99);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports='.ck-media__wrapper .ck-media__placeholder{display:flex;flex-direction:column;align-items:center}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:block}@media (hover:none){.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:none}}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url{max-width:100%;position:relative}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url:hover .ck-tooltip{visibility:visible;opacity:1}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{overflow:hidden;display:block}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck-media__placeholder__icon *{display:none}.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper>:not(.ck-media__placeholder),.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder{pointer-events:none}:root{--ck-media-embed-placeholder-icon-size:3em;--ck-color-media-embed-placeholder-url-text:#757575;--ck-color-media-embed-placeholder-url-text-hover:var(--ck-color-base-text)}.ck-media__wrapper{margin:0 auto}.ck-media__wrapper .ck-media__placeholder{padding:calc(3*var(--ck-spacing-standard));background:var(--ck-color-base-foreground)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon{min-width:var(--ck-media-embed-placeholder-icon-size);height:var(--ck-media-embed-placeholder-icon-size);margin-bottom:var(--ck-spacing-large);background-position:50%;background-size:cover}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon .ck-icon{width:100%;height:100%}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text{color:var(--ck-color-media-embed-placeholder-url-text);white-space:nowrap;text-align:center;font-style:italic;text-overflow:ellipsis}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:var(--ck-color-media-embed-placeholder-url-text-hover);cursor:pointer;text-decoration:underline}.ck-media__wrapper[data-oembed-url*="open.spotify.com"]{max-width:300px;max-height:380px}.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0yMDYuNDc3IDI2MC45bC0yOC45ODcgMjguOTg3YTUuMjE4IDUuMjE4IDAgMDAzLjc4IDEuNjFoNDkuNjIxYzEuNjk0IDAgMy4xOS0uNzk4IDQuMTQ2LTIuMDM3eiIgZmlsbD0iIzVjODhjNSIvPjxwYXRoIGQ9Ik0yMjYuNzQyIDIyMi45ODhjLTkuMjY2IDAtMTYuNzc3IDcuMTctMTYuNzc3IDE2LjAxNC4wMDcgMi43NjIuNjYzIDUuNDc0IDIuMDkzIDcuODc1LjQzLjcwMy44MyAxLjQwOCAxLjE5IDIuMTA3LjMzMy41MDIuNjUgMS4wMDUuOTUgMS41MDguMzQzLjQ3Ny42NzMuOTU3Ljk4OCAxLjQ0IDEuMzEgMS43NjkgMi41IDMuNTAyIDMuNjM3IDUuMTY4Ljc5MyAxLjI3NSAxLjY4MyAyLjY0IDIuNDY2IDMuOTkgMi4zNjMgNC4wOTQgNC4wMDcgOC4wOTIgNC42IDEzLjkxNHYuMDEyYy4xODIuNDEyLjUxNi42NjYuODc5LjY2Ny40MDMtLjAwMS43NjgtLjMxNC45My0uNzk5LjYwMy01Ljc1NiAyLjIzOC05LjcyOSA0LjU4NS0xMy43OTQuNzgyLTEuMzUgMS42NzMtMi43MTUgMi40NjUtMy45OSAxLjEzNy0xLjY2NiAyLjMyOC0zLjQgMy42MzgtNS4xNjkuMzE1LS40ODIuNjQ1LS45NjIuOTg4LTEuNDM5LjMtLjUwMy42MTctMS4wMDYuOTUtMS41MDguMzU5LS43Ljc2LTEuNDA0IDEuMTktMi4xMDcgMS40MjYtMi40MDIgMi01LjExNCAyLjAwNC03Ljg3NSAwLTguODQ0LTcuNTExLTE2LjAxNC0xNi43NzYtMTYuMDE0eiIgZmlsbD0iI2RkNGIzZSIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48ZWxsaXBzZSByeT0iNS41NjQiIHJ4PSI1LjgyOCIgY3k9IjIzOS4wMDIiIGN4PSIyMjYuNzQyIiBmaWxsPSIjODAyZDI3IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0xOTAuMzAxIDIzNy4yODNjLTQuNjcgMC04LjQ1NyAzLjg1My04LjQ1NyA4LjYwNnMzLjc4NiA4LjYwNyA4LjQ1NyA4LjYwN2MzLjA0MyAwIDQuODA2LS45NTggNi4zMzctMi41MTYgMS41My0xLjU1NyAyLjA4Ny0zLjkxMyAyLjA4Ny02LjI5IDAtLjM2Mi0uMDIzLS43MjItLjA2NC0xLjA3OWgtOC4yNTd2My4wNDNoNC44NWMtLjE5Ny43NTktLjUzMSAxLjQ1LTEuMDU4IDEuOTg2LS45NDIuOTU4LTIuMDI4IDEuNTQ4LTMuOTAxIDEuNTQ4LTIuODc2IDAtNS4yMDgtMi4zNzItNS4yMDgtNS4yOTkgMC0yLjkyNiAyLjMzMi01LjI5OSA1LjIwOC01LjI5OSAxLjM5OSAwIDIuNjE4LjQwNyAzLjU4NCAxLjI5M2wyLjM4MS0yLjM4YzAtLjAwMi0uMDAzLS4wMDQtLjAwNC0uMDA1LTEuNTg4LTEuNTI0LTMuNjItMi4yMTUtNS45NTUtMi4yMTV6bTQuNDMgNS42NmwuMDAzLjAwNnYtLjAwM3oiIGZpbGw9IiNmZmYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxNS4xODQgMjUxLjkyOWwtNy45OCA3Ljk3OSAyOC40NzcgMjguNDc1YTUuMjMzIDUuMjMzIDAgMDAuNDQ5LTIuMTIzdi0zMS4xNjVjLS40NjkuNjc1LS45MzQgMS4zNDktMS4zODIgMi4wMDUtLjc5MiAxLjI3NS0xLjY4MiAyLjY0LTIuNDY1IDMuOTktMi4zNDcgNC4wNjUtMy45ODIgOC4wMzgtNC41ODUgMTMuNzk0LS4xNjIuNDg1LS41MjcuNzk4LS45My43OTktLjM2My0uMDAxLS42OTctLjI1NS0uODc5LS42Njd2LS4wMTJjLS41OTMtNS44MjItMi4yMzctOS44Mi00LjYtMTMuOTE0LS43ODMtMS4zNS0xLjY3My0yLjcxNS0yLjQ2Ni0zLjk5LTEuMTM3LTEuNjY2LTIuMzI3LTMuNC0zLjYzNy01LjE2OWwtLjAwMi0uMDAzeiIgZmlsbD0iI2MzYzNjMyIvPjxwYXRoIGQ9Ik0yMTIuOTgzIDI0OC40OTVsLTM2Ljk1MiAzNi45NTN2LjgxMmE1LjIyNyA1LjIyNyAwIDAwNS4yMzggNS4yMzhoMS4wMTVsMzUuNjY2LTM1LjY2NmExMzYuMjc1IDEzNi4yNzUgMCAwMC0yLjc2NC0zLjkgMzcuNTc1IDM3LjU3NSAwIDAwLS45ODktMS40NCAzNS4xMjcgMzUuMTI3IDAgMDAtLjk1LTEuNTA4Yy0uMDgzLS4xNjItLjE3Ni0uMzI2LS4yNjQtLjQ4OXoiIGZpbGw9IiNmZGRjNGYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxMS45OTggMjYxLjA4M2wtNi4xNTIgNi4xNTEgMjQuMjY0IDI0LjI2NGguNzgxYTUuMjI3IDUuMjI3IDAgMDA1LjIzOS01LjIzOHYtMS4wNDV6IiBmaWxsPSIjZmZmIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjwvZz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder{background:#4268b3}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik05NjcuNDg0IDBINTYuNTE3QzI1LjMwNCAwIDAgMjUuMzA0IDAgNTYuNTE3djkxMC45NjZDMCA5OTguNjk0IDI1LjI5NyAxMDI0IDU2LjUyMiAxMDI0SDU0N1Y2MjhINDE0VjQ3M2gxMzNWMzU5LjAyOWMwLTEzMi4yNjIgODAuNzczLTIwNC4yODIgMTk4Ljc1Ni0yMDQuMjgyIDU2LjUxMyAwIDEwNS4wODYgNC4yMDggMTE5LjI0NCA2LjA4OVYyOTlsLTgxLjYxNi4wMzdjLTYzLjk5MyAwLTc2LjM4NCAzMC40OTItNzYuMzg0IDc1LjIzNlY0NzNoMTUzLjQ4N2wtMTkuOTg2IDE1NUg3MDd2Mzk2aDI2MC40ODRjMzEuMjEzIDAgNTYuNTE2LTI1LjMwMyA1Ni41MTYtNTYuNTE2VjU2LjUxNUMxMDI0IDI1LjMwMyA5OTguNjk3IDAgOTY3LjQ4NCAwIiBmaWxsPSIjRkZGRkZFIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#cdf}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder{background:linear-gradient(-135deg,#1400c7,#b800b1,#f50000)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTA0IiBoZWlnaHQ9IjUwNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIC4xNTloNTAzLjg0MVY1MDMuOTRIMHoiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48cGF0aCBkPSJNMjUxLjkyMS4xNTljLTY4LjQxOCAwLTc2Ljk5Ny4yOS0xMDMuODY3IDEuNTE2LTI2LjgxNCAxLjIyMy00NS4xMjcgNS40ODItNjEuMTUxIDExLjcxLTE2LjU2NiA2LjQzNy0zMC42MTUgMTUuMDUxLTQ0LjYyMSAyOS4wNTYtMTQuMDA1IDE0LjAwNi0yMi42MTkgMjguMDU1LTI5LjA1NiA0NC42MjEtNi4yMjggMTYuMDI0LTEwLjQ4NyAzNC4zMzctMTEuNzEgNjEuMTUxQy4yOSAxNzUuMDgzIDAgMTgzLjY2MiAwIDI1Mi4wOGMwIDY4LjQxNy4yOSA3Ni45OTYgMS41MTYgMTAzLjg2NiAxLjIyMyAyNi44MTQgNS40ODIgNDUuMTI3IDExLjcxIDYxLjE1MSA2LjQzNyAxNi41NjYgMTUuMDUxIDMwLjYxNSAyOS4wNTYgNDQuNjIxIDE0LjAwNiAxNC4wMDUgMjguMDU1IDIyLjYxOSA0NC42MjEgMjkuMDU3IDE2LjAyNCA2LjIyNyAzNC4zMzcgMTAuNDg2IDYxLjE1MSAxMS43MDkgMjYuODcgMS4yMjYgMzUuNDQ5IDEuNTE2IDEwMy44NjcgMS41MTYgNjguNDE3IDAgNzYuOTk2LS4yOSAxMDMuODY2LTEuNTE2IDI2LjgxNC0xLjIyMyA0NS4xMjctNS40ODIgNjEuMTUxLTExLjcwOSAxNi41NjYtNi40MzggMzAuNjE1LTE1LjA1MiA0NC42MjEtMjkuMDU3IDE0LjAwNS0xNC4wMDYgMjIuNjE5LTI4LjA1NSAyOS4wNTctNDQuNjIxIDYuMjI3LTE2LjAyNCAxMC40ODYtMzQuMzM3IDExLjcwOS02MS4xNTEgMS4yMjYtMjYuODcgMS41MTYtMzUuNDQ5IDEuNTE2LTEwMy44NjYgMC02OC40MTgtLjI5LTc2Ljk5Ny0xLjUxNi0xMDMuODY3LTEuMjIzLTI2LjgxNC01LjQ4Mi00NS4xMjctMTEuNzA5LTYxLjE1MS02LjQzOC0xNi41NjYtMTUuMDUyLTMwLjYxNS0yOS4wNTctNDQuNjIxLTE0LjAwNi0xNC4wMDUtMjguMDU1LTIyLjYxOS00NC42MjEtMjkuMDU2LTE2LjAyNC02LjIyOC0zNC4zMzctMTAuNDg3LTYxLjE1MS0xMS43MUMzMjguOTE3LjQ0OSAzMjAuMzM4LjE1OSAyNTEuOTIxLjE1OXptMCA0NS4zOTFjNjcuMjY1IDAgNzUuMjMzLjI1NyAxMDEuNzk3IDEuNDY5IDI0LjU2MiAxLjEyIDM3LjkwMSA1LjIyNCA0Ni43NzggOC42NzQgMTEuNzU5IDQuNTcgMjAuMTUxIDEwLjAyOSAyOC45NjYgMTguODQ1IDguODE2IDguODE1IDE0LjI3NSAxNy4yMDcgMTguODQ1IDI4Ljk2NiAzLjQ1IDguODc3IDcuNTU0IDIyLjIxNiA4LjY3NCA0Ni43NzggMS4yMTIgMjYuNTY0IDEuNDY5IDM0LjUzMiAxLjQ2OSAxMDEuNzk4IDAgNjcuMjY1LS4yNTcgNzUuMjMzLTEuNDY5IDEwMS43OTctMS4xMiAyNC41NjItNS4yMjQgMzcuOTAxLTguNjc0IDQ2Ljc3OC00LjU3IDExLjc1OS0xMC4wMjkgMjAuMTUxLTE4Ljg0NSAyOC45NjYtOC44MTUgOC44MTYtMTcuMjA3IDE0LjI3NS0yOC45NjYgMTguODQ1LTguODc3IDMuNDUtMjIuMjE2IDcuNTU0LTQ2Ljc3OCA4LjY3NC0yNi41NiAxLjIxMi0zNC41MjcgMS40NjktMTAxLjc5NyAxLjQ2OS02Ny4yNzEgMC03NS4yMzctLjI1Ny0xMDEuNzk4LTEuNDY5LTI0LjU2Mi0xLjEyLTM3LjkwMS01LjIyNC00Ni43NzgtOC42NzQtMTEuNzU5LTQuNTctMjAuMTUxLTEwLjAyOS0yOC45NjYtMTguODQ1LTguODE1LTguODE1LTE0LjI3NS0xNy4yMDctMTguODQ1LTI4Ljk2Ni0zLjQ1LTguODc3LTcuNTU0LTIyLjIxNi04LjY3NC00Ni43NzgtMS4yMTItMjYuNTY0LTEuNDY5LTM0LjUzMi0xLjQ2OS0xMDEuNzk3IDAtNjcuMjY2LjI1Ny03NS4yMzQgMS40NjktMTAxLjc5OCAxLjEyLTI0LjU2MiA1LjIyNC0zNy45MDEgOC42NzQtNDYuNzc4IDQuNTctMTEuNzU5IDEwLjAyOS0yMC4xNTEgMTguODQ1LTI4Ljk2NiA4LjgxNS04LjgxNiAxNy4yMDctMTQuMjc1IDI4Ljk2Ni0xOC44NDUgOC44NzctMy40NSAyMi4yMTYtNy41NTQgNDYuNzc4LTguNjc0IDI2LjU2NC0xLjIxMiAzNC41MzItMS40NjkgMTAxLjc5OC0xLjQ2OXoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48cGF0aCBkPSJNMjUxLjkyMSAzMzYuMDUzYy00Ni4zNzggMC04My45NzQtMzcuNTk2LTgzLjk3NC04My45NzMgMC00Ni4zNzggMzcuNTk2LTgzLjk3NCA4My45NzQtODMuOTc0IDQ2LjM3NyAwIDgzLjk3MyAzNy41OTYgODMuOTczIDgzLjk3NCAwIDQ2LjM3Ny0zNy41OTYgODMuOTczLTgzLjk3MyA4My45NzN6bTAtMjEzLjMzOGMtNzEuNDQ3IDAtMTI5LjM2NSA1Ny45MTgtMTI5LjM2NSAxMjkuMzY1IDAgNzEuNDQ2IDU3LjkxOCAxMjkuMzY0IDEyOS4zNjUgMTI5LjM2NCA3MS40NDYgMCAxMjkuMzY0LTU3LjkxOCAxMjkuMzY0LTEyOS4zNjQgMC03MS40NDctNTcuOTE4LTEyOS4zNjUtMTI5LjM2NC0xMjkuMzY1ek00MTYuNjI3IDExNy42MDRjMCAxNi42OTYtMTMuNTM1IDMwLjIzLTMwLjIzMSAzMC4yMy0xNi42OTUgMC0zMC4yMy0xMy41MzQtMzAuMjMtMzAuMjMgMC0xNi42OTYgMTMuNTM1LTMwLjIzMSAzMC4yMy0zMC4yMzEgMTYuNjk2IDAgMzAuMjMxIDEzLjUzNSAzMC4yMzEgMzAuMjMxIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#ffe0fe}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder{background:linear-gradient(90deg,#71c6f4,#0d70a5)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgNDAwIj48cGF0aCBkPSJNNDAwIDIwMGMwIDExMC41LTg5LjUgMjAwLTIwMCAyMDBTMCAzMTAuNSAwIDIwMCA4OS41IDAgMjAwIDBzMjAwIDg5LjUgMjAwIDIwMHpNMTYzLjQgMzA1LjVjODguNyAwIDEzNy4yLTczLjUgMTM3LjItMTM3LjIgMC0yLjEgMC00LjItLjEtNi4yIDkuNC02LjggMTcuNi0xNS4zIDI0LjEtMjUtOC42IDMuOC0xNy45IDYuNC0yNy43IDcuNiAxMC02IDE3LjYtMTUuNCAyMS4yLTI2LjctOS4zIDUuNS0xOS42IDkuNS0zMC42IDExLjctOC44LTkuNC0yMS4zLTE1LjItMzUuMi0xNS4yLTI2LjYgMC00OC4yIDIxLjYtNDguMiA0OC4yIDAgMy44LjQgNy41IDEuMyAxMS00MC4xLTItNzUuNi0yMS4yLTk5LjQtNTAuNC00LjEgNy4xLTYuNSAxNS40LTYuNSAyNC4yIDAgMTYuNyA4LjUgMzEuNSAyMS41IDQwLjEtNy45LS4yLTE1LjMtMi40LTIxLjgtNnYuNmMwIDIzLjQgMTYuNiA0Mi44IDM4LjcgNDcuMy00IDEuMS04LjMgMS43LTEyLjcgMS43LTMuMSAwLTYuMS0uMy05LjEtLjkgNi4xIDE5LjIgMjMuOSAzMy4xIDQ1IDMzLjUtMTYuNSAxMi45LTM3LjMgMjAuNi01OS45IDIwLjYtMy45IDAtNy43LS4yLTExLjUtLjcgMjEuMSAxMy44IDQ2LjUgMjEuOCA3My43IDIxLjgiIGZpbGw9IiNmZmYiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text{color:#b8e6ff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}'},function(e,t,i){var n=i(1),o=i(101);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-media-form{display:flex;align-items:flex-start;flex-direction:row;flex-wrap:nowrap}.ck.ck-media-form .ck-labeled-field-view{display:inline-block}.ck.ck-media-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-media-form{flex-wrap:wrap}.ck.ck-media-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-media-form .ck-button{flex-basis:50%}}.ck.ck-media-form{padding:var(--ck-spacing-standard)}.ck.ck-media-form:focus{outline:none}[dir=ltr] .ck.ck-media-form>:not(:first-child),[dir=rtl] .ck.ck-media-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-media-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-media-form .ck-labeled-field-view{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-media-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-media-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-media-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-media-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-media-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-media-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-media-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(e,t,i){var n=i(1),o=i(103);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck-content .media{clear:both;margin:1em 0;display:block;min-width:15em}"},function(e,t,i){var n=i(1),o=i(105);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=":root{--ck-color-table-focused-cell-background:rgba(158,207,250,0.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}"},function(e,t,i){var n=i(1),o=i(107);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2);padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0}.ck .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{width:var(--ck-insert-table-dropdown-box-width);height:var(--ck-insert-table-dropdown-box-height);margin:var(--ck-insert-table-dropdown-box-margin);border:1px solid var(--ck-color-base-border);border-radius:1px}.ck .ck-insert-table-dropdown-grid-box.ck-on{border-color:var(--ck-color-focus-border);background:var(--ck-color-focus-outer-shadow)}"},function(e,t,i){var n=i(1),o=i(109);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=':root{--ck-table-selected-cell-background:rgba(158,207,250,0.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{position:relative;caret-color:transparent;outline:unset;box-shadow:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{content:"";pointer-events:none;background-color:var(--ck-table-selected-cell-background);position:absolute;top:0;left:0;right:0;bottom:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget_selected{outline:unset}'},function(e,t,i){var n=i(1),o=i(111);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,r);e.exports=o.locals||{}},function(e,t){e.exports=".ck-content .table{margin:1em auto;display:table}.ck-content .table table{border-collapse:collapse;border-spacing:0;width:100%;height:100%;border:1px double #b3b3b3}.ck-content .table table td,.ck-content .table table th{min-width:2em;padding:.4em;border:1px solid #bfbfbf}.ck-content .table table th{font-weight:700;background:hsla(0,0%,0%,5%)}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}"},function(e,t,i){"use strict";i.r(t);var n=i(3),o=n.a.Symbol,r=Object.prototype,s=r.hasOwnProperty,a=r.toString,c=o?o.toStringTag:void 0;var l=function(e){var t=s.call(e,c),i=e[c];try{e[c]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[c]=i:delete e[c]),o},d=Object.prototype.toString;var u=function(e){return d.call(e)},h=o?o.toStringTag:void 0;var m=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?l(e):u(e)};var f=function(e,t){return function(i){return e(t(i))}},g=f(Object.getPrototypeOf,Object);var p=function(e){return null!=e&&"object"==typeof e},b=Function.prototype,w=Object.prototype,k=b.toString,_=w.hasOwnProperty,v=k.call(Object);var y=function(e){if(!p(e)||"[object Object]"!=m(e))return!1;var t=g(e);if(null===t)return!0;var i=_.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&k.call(i)==v};var x=function(){this.__data__=[],this.size=0};var A=function(e,t){return e===t||e!=e&&t!=t};var C=function(e,t){for(var i=e.length;i--;)if(A(e[i][0],t))return i;return-1},T=Array.prototype.splice;var P=function(e){var t=this.__data__,i=C(t,e);return!(i<0)&&(i==t.length-1?t.pop():T.call(t,i,1),--this.size,!0)};var S=function(e){var t=this.__data__,i=C(t,e);return i<0?void 0:t[i][1]};var E=function(e){return C(this.__data__,e)>-1};var M=function(e,t){var i=this.__data__,n=C(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function I(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},Be={};Be["[object Float32Array]"]=Be["[object Float64Array]"]=Be["[object Int8Array]"]=Be["[object Int16Array]"]=Be["[object Int32Array]"]=Be["[object Uint8Array]"]=Be["[object Uint8ClampedArray]"]=Be["[object Uint16Array]"]=Be["[object Uint32Array]"]=!0,Be["[object Arguments]"]=Be["[object Array]"]=Be["[object ArrayBuffer]"]=Be["[object Boolean]"]=Be["[object DataView]"]=Be["[object Date]"]=Be["[object Error]"]=Be["[object Function]"]=Be["[object Map]"]=Be["[object Number]"]=Be["[object Object]"]=Be["[object RegExp]"]=Be["[object Set]"]=Be["[object String]"]=Be["[object WeakMap]"]=!1;var Fe=function(e){return p(e)&&je(e.length)&&!!Be[m(e)]};var He=function(e){return function(t){return e(t)}},Ue=i(5),We=Ue.a&&Ue.a.isTypedArray,qe=We?He(We):Fe,$e=Object.prototype.hasOwnProperty;var Ye=function(e,t){var i=ze(e),n=!i&&Oe(e),o=!i&&!n&&Object(De.a)(e),r=!i&&!n&&!o&&qe(e),s=i||n||o||r,a=s?Ee(e.length,String):[],c=a.length;for(var l in e)!t&&!$e.call(e,l)||s&&("length"==l||o&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ve(l,c))||a.push(l);return a},Ge=Object.prototype;var Ke=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ge)},Je=f(Object.keys,Object),Qe=Object.prototype.hasOwnProperty;var Ze=function(e){if(!Ke(e))return Je(e);var t=[];for(var i in Object(e))Qe.call(e,i)&&"constructor"!=i&&t.push(i);return t};var Xe=function(e){return null!=e&&je(e.length)&&!j(e)};var et=function(e){return Xe(e)?Ye(e):Ze(e)};var tt=function(e,t){return e&&Se(t,et(t),e)};var it=function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t},nt=Object.prototype.hasOwnProperty;var ot=function(e){if(!L(e))return it(e);var t=Ke(e),i=[];for(var n in e)("constructor"!=n||!t&&nt.call(e,n))&&i.push(n);return i};var rt=function(e){return Xe(e)?Ye(e,!0):ot(e)};var st=function(e,t){return e&&Se(t,rt(t),e)},at=i(8);var ct=function(e,t){var i=-1,n=e.length;for(t||(t=Array(n));++i{this._setToTarget(e,n,t[n],i)})}}function hi(e){return li(e,mi)}function mi(e){return di(e)?e:void 0}var fi=function(){return function e(){e.called=!0}};class gi{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=fi(),this.off=fi()}}const pi=new Array(256).fill().map((e,t)=>("0"+t.toString(16)).slice(-2));function bi(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,i=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0;return"e"+pi[e>>0&255]+pi[e>>8&255]+pi[e>>16&255]+pi[e>>24&255]+pi[t>>0&255]+pi[t>>8&255]+pi[t>>16&255]+pi[t>>24&255]+pi[i>>0&255]+pi[i>>8&255]+pi[i>>16&255]+pi[i>>24&255]+pi[n>>0&255]+pi[n>>8&255]+pi[n>>16&255]+pi[n>>24&255]}var wi={get(e){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5},ki=(i(6),i(0));const _i=Symbol("listeningTo"),vi=Symbol("emitterId");var yi={on(e,t,i={}){this.listenTo(this,e,t,i)},once(e,t,i){let n=!1;this.listenTo(this,e,(function(e,...i){n||(n=!0,e.off(),t.call(this,e,...i))}),i)},off(e,t){this.stopListening(this,e,t)},listenTo(e,t,i,n={}){let o,r;this[_i]||(this[_i]={});const s=this[_i];Ai(e)||xi(e);const a=Ai(e);(o=s[a])||(o=s[a]={emitter:e,callbacks:{}}),(r=o.callbacks[t])||(r=o.callbacks[t]=[]),r.push(i),function(e,t){const i=Ci(e);if(i[t])return;let n=t,o=null;const r=[];for(;""!==n&&!i[n];)i[n]={callbacks:[],childEvents:[]},r.push(i[n]),o&&i[n].childEvents.push(o),o=n,n=n.substr(0,n.lastIndexOf(":"));if(""!==n){for(const e of r)e.callbacks=i[n].callbacks.slice();i[n].childEvents.push(o)}}(e,t);const c=Ti(e,t),l=wi.get(n.priority),d={callback:i,priority:l};for(const e of c){let t=!1;for(let i=0;i-1?e(t,i.substr(0,i.lastIndexOf(":"))):null;return n.callbacks}(this,n);if(i.path.push(this),o){const e=[i,...t];o=Array.from(o);for(let t=0;t{this._delegations||(this._delegations=new Map),e.forEach(e=>{const n=this._delegations.get(e);n?n.set(t,i):this._delegations.set(e,new Map([[t,i]]))})}}},stopDelegating(e,t){if(this._delegations)if(e)if(t){const i=this._delegations.get(e);i&&i.delete(t)}else this._delegations.delete(e);else this._delegations.clear()}};function xi(e,t){e[vi]||(e[vi]=t||bi())}function Ai(e){return e[vi]}function Ci(e){return e._events||Object.defineProperty(e,"_events",{value:{}}),e._events}function Ti(e,t){const i=Ci(e)[t];if(!i)return[];let n=[i.callbacks];for(let t=0;t{Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach(i=>{if(i in e.prototype)return;const n=Object.getOwnPropertyDescriptor(t,i);n.enumerable=!1,Object.defineProperty(e.prototype,i,n)})})}class Ii{constructor(e={},t={}){const i=Ei(e);if(i||(t=e),this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],i)for(const t of e)this._items.push(t),this._itemMap.set(this._getItemIdBeforeAdding(t),t)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){return this.addMany([e],t)}addMany(e,t){if(void 0===t)t=this._items.length;else if(t>this._items.length||t<0)throw new ki.b("collection-add-item-invalid-index: The index passed to Collection#addMany() is invalid.",this);for(let i=0;i{this._setUpBindToBinding(t=>new e(t))},using:e=>{"function"==typeof e?this._setUpBindToBinding(t=>e(t)):this._setUpBindToBinding(t=>t[e])}}}_setUpBindToBinding(e){const t=this._bindToCollection,i=(i,n,o)=>{const r=t._bindToCollection==this,s=t._bindToInternalToExternalMap.get(n);if(r&&s)this._bindToExternalToInternalMap.set(n,s),this._bindToInternalToExternalMap.set(s,n);else{const i=e(n);if(!i)return void this._skippedIndexesFromExternal.push(o);let r=o;for(const e of this._skippedIndexesFromExternal)o>e&&r--;for(const e of t._skippedIndexesFromExternal)r>=e&&r++;this._bindToExternalToInternalMap.set(n,i),this._bindToInternalToExternalMap.set(i,n),this.add(i,r);for(let e=0;e{const n=this._bindToExternalToInternalMap.get(t);n&&this.remove(n),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((e,t)=>(it&&e.push(t),e),[])})}_getItemIdBeforeAdding(e){const t=this._idProperty;let i;if(t in e){if(i=e[t],"string"!=typeof i)throw new ki.b("collection-add-invalid-id: This item's id should be a string.",this);if(this.get(i))throw new ki.b("collection-add-item-already-exists: This item already exists in the collection.",this)}else e[t]=i=bi();return i}_remove(e){let t,i,n,o=!1;const r=this._idProperty;if("string"==typeof e?(i=e,n=this._itemMap.get(i),o=!n,n&&(t=this._items.indexOf(n))):"number"==typeof e?(t=e,n=this._items[t],o=!n,n&&(i=n[r])):(n=e,i=n[r],t=this._items.indexOf(n),o=-1==t||!this._itemMap.get(i)),o)throw new ki.b("collection-remove-404: Item not found.",this);this._items.splice(t,1),this._itemMap.delete(i);const s=this._bindToInternalToExternalMap.get(n);return this._bindToInternalToExternalMap.delete(n),this._bindToExternalToInternalMap.delete(s),this.fire("remove",n,t),[n,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}Mi(Ii,yi);class Ni{constructor(e,t=[],i=[]){this._context=e,this._plugins=new Map,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of i)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){const t="plugincollection-plugin-not-loaded: The requested plugin is not loaded.";let i=e;throw"function"==typeof e&&(i=e.pluginName||e.name),new ki.b(t,this._context,{plugin:i})}return t}has(e){return this._plugins.has(e)}init(e,t=[]){const i=this,n=this._context,o=new Set,r=[],s=h(e),a=h(t),c=function(e){const t=[];for(const i of e)u(i)||t.push(i);return t.length?t:null}(e);if(c){const e="plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.";return console.error(Object(ki.a)(e),{plugins:c}),Promise.reject(new ki.b(e,n,{plugins:c}))}return Promise.all(s.map(l)).then(()=>d(r,"init")).then(()=>d(r,"afterInit")).then(()=>r);function l(e){if(!a.includes(e)&&!i._plugins.has(e)&&!o.has(e))return function(e){return new Promise(s=>{o.add(e),e.requires&&e.requires.forEach(i=>{const o=u(i);if(e.isContextPlugin&&!o.isContextPlugin)throw new ki.b("plugincollection-context-required: Context plugin can not require plugin which is not a context plugin",null,{plugin:o.name,requiredBy:e.name});if(t.includes(o))throw new ki.b("plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.",n,{plugin:o.name,requiredBy:e.name});l(o)});const a=i._contextPlugins.get(e)||new e(n);i._add(e,a),r.push(a),s()})}(e).catch(t=>{throw console.error(Object(ki.a)("plugincollection-load: It was not possible to load the plugin."),{plugin:e}),t})}function d(e,t){return e.reduce((e,n)=>n[t]?i._contextPlugins.has(n)?e:e.then(n[t].bind(n)):e,Promise.resolve())}function u(e){return"function"==typeof e?e:i._availablePlugins.get(e)}function h(e){return e.map(e=>u(e)).filter(e=>!!e)}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const i=e.pluginName;if(i){if(this._plugins.has(i))throw new ki.b("plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.",null,{pluginName:i,plugin1:this._plugins.get(i).constructor,plugin2:e});this._plugins.set(i,t)}}}function Ri(e,t,i=1){if("number"!=typeof i)throw new ki.b("translation-service-quantity-not-a-number: Expecting `quantity` to be a number.",null,{quantity:i});const n=Object.keys(window.CKEDITOR_TRANSLATIONS).length;1===n&&(e=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]);const o=t.id||t.string;if(0===n||!function(e,t){return!!window.CKEDITOR_TRANSLATIONS[e]&&!!window.CKEDITOR_TRANSLATIONS[e].dictionary[t]}(e,o))return 1!==i?t.plural:t.string;const r=window.CKEDITOR_TRANSLATIONS[e].dictionary,s=window.CKEDITOR_TRANSLATIONS[e].getPluralForm||(e=>1===e?0:1);if("string"==typeof r[o])return r[o];const a=Number(s(i));return r[o][a]}Mi(Ni,yi),window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});const Oi=["ar","fa","he","ku","ug"];class zi{constructor(e={}){this.uiLanguage=e.uiLanguage||"en",this.contentLanguage=e.contentLanguage||this.uiLanguage,this.uiLanguageDirection=Di(this.uiLanguage),this.contentLanguageDirection=Di(this.contentLanguage),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){Array.isArray(t)||(t=[t]),"string"==typeof e&&(e={string:e});const i=!!e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,(e,i)=>ie.destroy())).then(()=>this.plugins.destroy())}_addEditor(e,t){if(this._contextOwner)throw new ki.b("context-addEditor-private-context: Cannot add multiple editors to the context which is created by the editor.");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise(t=>{const i=new this(e);t(i.initPlugins().then(()=>i))})}}function Vi(e,t){const i=Math.min(e.length,t.length);for(let n=0;ne.data.length)throw new ki.b("view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",this);if(i<0||t+i>e.data.length)throw new ki.b("view-textproxy-wrong-length: Given length value is incorrect.",this);this.data=e.data.substring(t,t+i),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let i=e.includeSelf?this.textNode:this.parent;for(;null!==i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}}function Ui(e){return Ei(e)?new Map(e):function(e){const t=new Map;for(const i in e)t.set(i,e[i]);return t}(e)}class Wi{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),t.classes&&("string"==typeof t.classes||t.classes instanceof RegExp)&&(t.classes=[t.classes]),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const i=qi(t,e);if(i)return{element:t,pattern:e,match:i}}return null}matchAll(...e){const t=[];for(const i of e)for(const e of this._patterns){const n=qi(i,e);n&&t.push({element:i,pattern:e,match:n})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function qi(e,t){if("function"==typeof t)return t(e);const i={};return t.name&&(i.name=function(e,t){if(e instanceof RegExp)return e.test(t);return e===t}(t.name,e.name),!i.name)||t.attributes&&(i.attributes=function(e,t){const i=[];for(const n in e){const o=e[n];if(!t.hasAttribute(n))return null;{const e=t.getAttribute(n);if(!0===o)i.push(n);else if(o instanceof RegExp){if(!o.test(e))return null;i.push(n)}else{if(e!==o)return null;i.push(n)}}}return i}(t.attributes,e),!i.attributes)?null:!(t.classes&&(i.classes=function(e,t){const i=[];for(const n of e)if(n instanceof RegExp){const e=t.getClassNames();for(const t of e)n.test(t)&&i.push(t);if(0===i.length)return null}else{if(!t.hasClass(n))return null;i.push(n)}return i}(t.classes,e),!i.classes))&&(!(t.styles&&(i.styles=function(e,t){const i=[];for(const n in e){const o=e[n];if(!t.hasStyle(n))return null;{const e=t.getStyle(n);if(o instanceof RegExp){if(!o.test(e))return null;i.push(n)}else{if(e!==o)return null;i.push(n)}}}return i}(t.styles,e),!i.styles))&&i)}var $i=function(e){return"symbol"==typeof e||p(e)&&"[object Symbol]"==m(e)},Yi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gi=/^\w*$/;var Ki=function(e,t){if(ze(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!$i(e))||(Gi.test(e)||!Yi.test(e)||null!=t&&e in Object(t))};function Ji(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var n=arguments,o=t?t.apply(this,n):n[0],r=i.cache;if(r.has(o))return r.get(o);var s=e.apply(this,n);return i.cache=r.set(o,s)||r,s};return i.cache=new(Ji.Cache||ke),i}Ji.Cache=ke;var Qi=Ji;var Zi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xi=/\\(\\)?/g,en=function(e){var t=Qi(e,(function(e){return 500===i.size&&i.clear(),e})),i=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Zi,(function(e,i,n,o){t.push(n?o.replace(Xi,"$1"):i||e)})),t}));var tn=function(e,t){for(var i=-1,n=null==e?0:e.length,o=Array(n);++io?0:o+t),(i=i>o?o:i)<0&&(i+=o),o=t>i?0:i-t>>>0,t>>>=0;for(var r=Array(o);++n0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Sn);var In=function(e,t){return Mn(Tn(e,t,xn),e+"")};var Nn=function(e,t,i){if(!L(i))return!1;var n=typeof t;return!!("number"==n?Xe(i)&&Ve(t,i.length):"string"==n&&t in i)&&A(i[t],e)};var Rn=function(e){return In((function(t,i){var n=-1,o=i.length,r=o>1?i[o-1]:void 0,s=o>2?i[2]:void 0;for(r=e.length>3&&"function"==typeof r?(o--,r):void 0,s&&Nn(i[0],i[1],s)&&(r=o<3?void 0:r,o=1),t=Object(t);++nt===e);return Array.isArray(t)}set(e,t){if(L(e))for(const[t,i]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,i,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=jn(e);fn(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map(e=>e.join(":")).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!L(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find(([t])=>t===e);return Array.isArray(t)?t[1]:void 0}getStyleNames(){if(this.isEmpty)return[];return this._getStylesEntries().map(([e])=>e)}clear(){this._styles={}}_getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const i of t)e.push(...this._styleProcessor.getReducedForm(i,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const i=t.splice(0,t.length-1).join("."),n=gn(this._styles,i);if(!n)return;!Array.from(Object.keys(n)).length&&this.remove(i)}}class Vn{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,i){if(L(t))Bn(i,jn(e),t);else if(this._normalizers.has(e)){const n=this._normalizers.get(e),{path:o,value:r}=n(t);Bn(i,o,r)}else Bn(i,e,t)}getNormalized(e,t){if(!e)return On({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const i=this._extractors.get(e);if("string"==typeof i)return gn(t,i);const n=i(e,t);if(n)return n}return gn(t,jn(e))}getReducedForm(e,t){const i=this.getNormalized(e,t);if(void 0===i)return[];if(this._reducers.has(e)){return this._reducers.get(e)(i)}return[[e,i]]}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const i of t)this._mapStyleNames(i,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function jn(e){return e.replace("-",".")}function Bn(e,t,i){let n=i;L(i)&&(n=On({},gn(e,t),i)),Dn(e,t,n)}class Fn extends Bi{constructor(e,t,i,n){if(super(e),this.name=t,this._attrs=function(e){e=Ui(e);for(const[t,i]of e)null===i?e.delete(t):"string"!=typeof i&&e.set(t,String(i));return e}(i),this._children=[],n&&this._insertChild(0,n),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");Hn(this._classes,e),this._attrs.delete("class")}this._styles=new Ln(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}is(e,t=null){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof Fn))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,i]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==i)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(){return this._styles.getStyleNames()}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new Wi(...e);let i=this.parent;for(;i;){if(t.match(i))return i;i=i.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),i=Array.from(this._attrs).map(e=>`${e[0]}="${e[1]}"`).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==i?"":" "+i)}_clone(e=!1){const t=[];if(e)for(const i of this.getChildren())t.push(i._clone(e));const i=new this.constructor(this.document,this.name,this._attrs,t);return i._classes=new Set(this._classes),i._styles.set(this._styles.getNormalized()),i._customProperties=new Map(this._customProperties),i.getFillerOffset=this.getFillerOffset,i}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let i=0;const n=function(e,t){if("string"==typeof t)return[new Fi(e,t)];Ei(t)||(t=[t]);return Array.from(t).map(t=>"string"==typeof t?new Fi(e,t):t instanceof Hi?new Fi(e,t.data):t)}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,i++;return i}_removeChildren(e,t=1){this._fireChange("children",this);for(let i=e;i0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this),(e=Array.isArray(e)?e:[e]).forEach(e=>this._classes.add(e))}_removeClass(e){this._fireChange("attributes",this),(e=Array.isArray(e)?e:[e]).forEach(e=>this._classes.delete(e))}_setStyle(e,t){this._fireChange("attributes",this),this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this),(e=Array.isArray(e)?e:[e]).forEach(e=>this._styles.remove(e))}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function Hn(e,t){const i=t.split(/\s+/);e.clear(),i.forEach(t=>e.add(t))}class Un extends Fn{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=Wn}is(e,t=null){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}}function Wn(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}var qn=Rn((function(e,t){Se(t,rt(t),e)}));const $n=Symbol("observableProperties"),Yn=Symbol("boundObservables"),Gn=Symbol("boundProperties"),Kn={set(e,t){if(L(e))return void Object.keys(e).forEach(t=>{this.set(t,e[t])},this);Qn(this);const i=this[$n];if(e in this&&!i.has(e))throw new ki.b("observable-set-cannot-override: Cannot override an existing property.",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>i.get(e),set(t){const n=i.get(e);let o=this.fire("set:"+e,e,t,n);void 0===o&&(o=t),n===o&&i.has(e)||(i.set(e,o),this.fire("change:"+e,e,o,n))}}),this[e]=t},bind(...e){if(!e.length||!eo(e))throw new ki.b("observable-bind-wrong-properties: All properties must be strings.",this);if(new Set(e).size!==e.length)throw new ki.b("observable-bind-duplicate-properties: Properties must be unique.",this);Qn(this);const t=this[Gn];e.forEach(e=>{if(t.has(e))throw new ki.b("observable-bind-rebind: Cannot bind the same property more than once.",this)});const i=new Map;return e.forEach(e=>{const n={property:e,to:[]};t.set(e,n),i.set(e,n)}),{to:Zn,toMany:Xn,_observable:this,_bindProperties:e,_to:[],_bindings:i}},unbind(...e){if(!this[$n])return;const t=this[Gn],i=this[Yn];if(e.length){if(!eo(e))throw new ki.b("observable-unbind-wrong-properties: Properties must be strings.",this);e.forEach(e=>{const n=t.get(e);if(!n)return;let o,r,s,a;n.to.forEach(e=>{o=e[0],r=e[1],s=i.get(o),a=s[r],a.delete(n),a.size||delete s[r],Object.keys(s).length||(i.delete(o),this.stopListening(o,"change"))}),t.delete(e)})}else i.forEach((e,t)=>{this.stopListening(t,"change")}),i.clear(),t.clear()},decorate(e){const t=this[e];if(!t)throw new ki.b("observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.",this,{object:this,methodName:e});this.on(e,(e,i)=>{e.return=t.apply(this,i)}),this[e]=function(...t){return this.fire(e,t)}}};qn(Kn,yi);var Jn=Kn;function Qn(e){e[$n]||(Object.defineProperty(e,$n,{value:new Map}),Object.defineProperty(e,Yn,{value:new Map}),Object.defineProperty(e,Gn,{value:new Map}))}function Zn(...e){const t=function(...e){if(!e.length)throw new ki.b("observable-bind-to-parse-error: Invalid argument syntax in `to()`.",null);const t={to:[]};let i;"function"==typeof e[e.length-1]&&(t.callback=e.pop());return e.forEach(e=>{if("string"==typeof e)i.properties.push(e);else{if("object"!=typeof e)throw new ki.b("observable-bind-to-parse-error: Invalid argument syntax in `to()`.",null);i={observable:e,properties:[]},t.to.push(i)}}),t}(...e),i=Array.from(this._bindings.keys()),n=i.length;if(!t.callback&&t.to.length>1)throw new ki.b("observable-bind-to-no-callback: Binding multiple observables only possible with callback.",this);if(n>1&&t.callback)throw new ki.b("observable-bind-to-extra-callback: Cannot bind multiple properties and use a callback in one binding.",this);var o;t.to.forEach(e=>{if(e.properties.length&&e.properties.length!==n)throw new ki.b("observable-bind-to-properties-length: The number of properties must match.",this);e.properties.length||(e.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(i[0]).callback=t.callback),o=this._observable,this._to.forEach(e=>{const t=o[Yn];let i;t.get(e.observable)||o.listenTo(e.observable,"change",(n,r)=>{i=t.get(e.observable)[r],i&&i.forEach(e=>{to(o,e.property)})})}),function(e){let t;e._bindings.forEach((i,n)=>{e._to.forEach(o=>{t=o.properties[i.callback?0:e._bindProperties.indexOf(n)],i.to.push([o.observable,t]),function(e,t,i,n){const o=e[Yn],r=o.get(i),s=r||{};s[n]||(s[n]=new Set);s[n].add(t),r||o.set(i,s)}(e._observable,i,o.observable,t)})})}(this),this._bindProperties.forEach(e=>{to(this._observable,e)})}function Xn(e,t,i){if(this._bindings.size>1)throw new ki.b("observable-bind-to-many-not-one-binding: Cannot bind multiple properties with toMany().",this);this.to(...function(e,t){const i=e.map(e=>[e,t]);return Array.prototype.concat.apply([],i)}(e,t),i)}function eo(e){return e.every(e=>"string"==typeof e)}function to(e,t){const i=e[Gn].get(t);let n;i.callback?n=i.callback.apply(e,i.to.map(e=>e[0][e[1]])):(n=i.to[0],n=n[0][n[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=n:e.set(t,n)}class io extends Un{constructor(e,t,i,n){super(e,t,i,n),this.set("isReadOnly",!1),this.set("isFocused",!1),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",t=>t&&e.selection.editableElement==this),this.listenTo(e.selection,"change",()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this})}is(e,t=null){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}destroy(){this.stopListening()}}Mi(io,Jn);const no=Symbol("rootName");class oo extends io{constructor(e,t){super(e,t),this.rootName="main"}is(e,t=null){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}get rootName(){return this.getCustomProperty(no)}set rootName(e){this._setCustomProperty(no,e)}set _name(e){this.name=e}}class ro{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new ki.b("view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new ki.b("view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this.position=so._createAt(e.startPosition):this.position=so._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(e){let t,i,n;do{n=this.position,({done:t,value:i}=this.next())}while(!t&&e(i));t||(this.position=n)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,i=e.parent;if(null===i.parent&&e.offset===i.childCount)return{done:!0};if(i===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};let n;if(i instanceof Fi){if(e.isAtEnd)return this.position=so._createAfter(i),this._next();n=i.data[e.offset]}else n=i.getChild(e.offset);if(n instanceof Fn)return this.shallow?e.offset++:e=new so(n,0),this.position=e,this._formatReturnValue("elementStart",n,t,e,1);if(n instanceof Fi){if(this.singleCharacters)return e=new so(n,0),this.position=e,this._next();{let i,o=n.data.length;return n==this._boundaryEndParent?(o=this.boundaries.end.offset,i=new Hi(n,0,o),e=so._createAfter(i)):(i=new Hi(n,0,n.data.length),e.offset++),this.position=e,this._formatReturnValue("text",i,t,e,o)}}if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{n=(i===this._boundaryEndParent?this.boundaries.end.offset:i.data.length)-e.offset}const o=new Hi(i,e.offset,n);return e.offset+=n,this.position=e,this._formatReturnValue("text",o,t,e,n)}return e=so._createAfter(i),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",i,t,e)}_previous(){let e=this.position.clone();const t=this.position,i=e.parent;if(null===i.parent&&0===e.offset)return{done:!0};if(i==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};let n;if(i instanceof Fi){if(e.isAtStart)return this.position=so._createBefore(i),this._previous();n=i.data[e.offset-1]}else n=i.getChild(e.offset-1);if(n instanceof Fn)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue("elementStart",n,t,e,1)):(e=new so(n,n.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",n,t,e));if(n instanceof Fi){if(this.singleCharacters)return e=new so(n,n.data.length),this.position=e,this._previous();{let i,o=n.data.length;if(n==this._boundaryStartParent){const t=this.boundaries.start.offset;i=new Hi(n,t,n.data.length-t),o=i.data.length,e=so._createBefore(i)}else i=new Hi(n,0,n.data.length),e.offset--;return this.position=e,this._formatReturnValue("text",i,t,e,o)}}if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{const t=i===this._boundaryStartParent?this.boundaries.start.offset:0;n=e.offset-t}e.offset-=n;const o=new Hi(i,e.offset,n);return this.position=e,this._formatReturnValue("text",o,t,e,n)}return e=so._createBefore(i),this.position=e,this._formatReturnValue("elementStart",i,t,e,1)}_formatReturnValue(e,t,i,n,o){return t instanceof Hi&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?i=so._createAfter(t.textNode):(n=so._createAfter(t.textNode),this.position=n)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?i=so._createBefore(t.textNode):(n=so._createBefore(t.textNode),this.position=n))),{done:!1,value:{type:e,item:t,previousPosition:i,nextPosition:n,length:o}}}}class so{constructor(e,t){this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof io);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=so._createAt(this),i=t.offset+e;return t.offset=i<0?0:i,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const i=new ro(t);return i.skip(e),i.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),i=e.getAncestors();let n=0;for(;t[n]==i[n]&&t[n];)n++;return 0===n?null:t[n-1]}is(e){return"position"===e||"view:position"===e}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],i=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),i.push(e.offset);const n=Vi(t,i);switch(n){case"prefix":return"before";case"extension":return"after";default:return t[n]0?new this(i,n):new this(n,i)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(so._createBefore(e),t)}}function co(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}function lo(e){let t=0;for(const i of e)t++;return t}class uo{constructor(e=null,t,i){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",this.setTo(e,t,i)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let i=!1;for(const n of e._ranges)if(t.isEqual(n)){i=!0;break}if(!i)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=lo(this.getRanges());if(t!=lo(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let i=!1;for(let n of e.getRanges())if(n=n.getTrimmed(),t.start.isEqual(n.start)&&t.end.isEqual(n.end)){i=!0;break}if(!i)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(e,t,i){if(null===e)this._setRanges([]),this._setFakeOptions(t);else if(e instanceof uo||e instanceof ho)this._setRanges(e.getRanges(),e.isBackward),this._setFakeOptions({fake:e.isFake,label:e.fakeSelectionLabel});else if(e instanceof ao)this._setRanges([e],t&&t.backward),this._setFakeOptions(t);else if(e instanceof so)this._setRanges([new ao(e)]),this._setFakeOptions(t);else if(e instanceof Bi){const n=!!i&&!!i.backward;let o;if(void 0===t)throw new ki.b("view-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.",this);o="in"==t?ao._createIn(e):"on"==t?ao._createOn(e):new ao(so._createAt(e,t)),this._setRanges([o],n),this._setFakeOptions(i)}else{if(!Ei(e))throw new ki.b("view-selection-setTo-not-selectable: Cannot set selection to given place.",this);this._setRanges(e,t&&t.backward),this._setFakeOptions(t)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new ki.b("view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",this);const i=so._createAt(e,t);if("same"==i.compareWith(this.focus))return;const n=this.anchor;this._ranges.pop(),"before"==i.compareWith(n)?this._addRange(new ao(i,n),!0):this._addRange(new ao(n,i)),this.fire("change")}is(e){return"selection"===e||"view:selection"===e}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof ao))throw new ki.b("view-selection-add-range-not-range: Selection range set to an object that is not an instance of view.Range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new ki.b("view-selection-range-intersects: Trying to add a range that intersects with another range from selection.",this,{addedRange:e,intersectingRange:t});this._ranges.push(new ao(e.start,e.end))}}Mi(uo,yi);class ho{constructor(e=null,t,i){this._selection=new uo,this._selection.delegate("change").to(this),this._selection.setTo(e,t,i)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}is(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e}_setTo(e,t,i){this._selection.setTo(e,t,i)}_setFocus(e,t){this._selection.setFocus(e,t)}}Mi(ho,yi);class mo{constructor(e){this.selection=new ho,this.roots=new Ii({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isComposing",!1),this._postFixers=new Set}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.map(e=>e.destroy()),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const i of this._postFixers)if(t=i(e),t)break}while(t)}}Mi(mo,Jn);class fo extends Fn{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=go,this._priority=10,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new ki.b("attribute-element-get-elements-with-same-id-no-id: Cannot get elements with the same id for an attribute element without id.",this);return new Set(this._clonesGroup)}is(e,t=null){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function go(){if(po(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(po(e)>1)return null;e=e.parent}return!e||po(e)>1?null:this.childCount}function po(e){return Array.from(e.getChildren()).filter(e=>!e.is("uiElement")).length}fo.DEFAULT_PRIORITY=10;class bo extends Fn{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=wo}is(e,t=null){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}_insertChild(e,t){if(t&&(t instanceof Bi||Array.from(t).length>0))throw new ki.b("view-emptyelement-cannot-add: Cannot add child nodes to EmptyElement instance.",[this,t])}}function wo(){return null}const ko=navigator.userAgent.toLowerCase();var _o={isMac:function(e){return e.indexOf("macintosh")>-1}(ko),isGecko:function(e){return!!e.match(/gecko\/\d+/)}(ko),isSafari:function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(ko),isAndroid:function(e){return e.indexOf("android")>-1}(ko),features:{isRegExpUnicodePropertySupported:function(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}()}};const vo={"⌘":"ctrl","⇧":"shift","⌥":"alt"},yo={ctrl:"⌘",shift:"⇧",alt:"⌥"},xo=function(){const e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,cmd:1114112,shift:2228224,alt:4456448};for(let t=65;t<=90;t++){const i=String.fromCharCode(t);e[i.toLowerCase()]=t}for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;return e}();function Ao(e){let t;if("string"==typeof e){if(t=xo[e.toLowerCase()],!t)throw new ki.b("keyboard-unknown-key: Unknown key name.",null,{key:e})}else t=e.keyCode+(e.altKey?xo.alt:0)+(e.ctrlKey?xo.ctrl:0)+(e.shiftKey?xo.shift:0);return t}function Co(e){return"string"==typeof e&&(e=Mo(e)),e.map(e=>"string"==typeof e?Ao(e):e).reduce((e,t)=>t+e,0)}function To(e){return _o.isMac?Mo(e).map(e=>yo[e.toLowerCase()]||e).reduce((e,t)=>e.slice(-1)in vo?e+t:e+"+"+t):e}function Po(e){return e==xo.arrowright||e==xo.arrowleft||e==xo.arrowup||e==xo.arrowdown}function So(e,t){const i="ltr"===t;switch(e){case xo.arrowleft:return i?"left":"right";case xo.arrowright:return i?"right":"left";case xo.arrowup:return"up";case xo.arrowdown:return"down"}}function Eo(e,t){const i=So(e,t);return"down"===i||"right"===i}function Mo(e){return e.split(/\s*\+\s*/)}class Io extends Fn{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=Ro}is(e,t=null){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}_insertChild(e,t){if(t&&(t instanceof Bi||Array.from(t).length>0))throw new ki.b("view-uielement-cannot-add: Cannot add child nodes to UIElement instance.",this)}render(e){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function No(e){e.document.on("keydown",(t,i)=>function(e,t,i){if(t.keyCode==xo.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),n=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(n||t.shiftKey){const t=e.focusNode,o=e.focusOffset,r=i.domPositionToView(t,o);if(null===r)return;let s=!1;const a=r.getLastMatchingPosition(e=>(e.item.is("uiElement")&&(s=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement"))));if(s){const t=i.viewPositionToDom(a);n?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,i,e.domConverter))}function Ro(){return null}class Oo extends Fn{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=zo}is(e,t=null){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e}_insertChild(e,t){if(t&&(t instanceof Bi||Array.from(t).length>0))throw new ki.b("view-rawelement-cannot-add: Cannot add child nodes to a RawElement instance.",[this,t])}}function zo(){return null}class Do{constructor(e,t){this.document=e,this._children=[],t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(e){return"documentFragment"===e||"view:documentFragment"===e}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let i=0;const n=function(e,t){if("string"==typeof t)return[new Fi(e,t)];Ei(t)||(t=[t]);return Array.from(t).map(t=>"string"==typeof t?new Fi(e,t):t instanceof Hi?new Fi(e,t.data):t)}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,i++;return i}_removeChildren(e,t=1){this._fireChange("children",this);for(let i=e;i{}),n}setAttribute(e,t,i){i._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,i){y(e)&&void 0===i&&(i=t),i._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,i){i._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof so?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const t=e.parent;if(!t.is("containerElement"))throw new ki.b("view-writer-break-non-container-element: Trying to break an element which is not a container element.",this.document);if(!t.parent)throw new ki.b("view-writer-break-root: Trying to break root element.",this.document);if(e.isAtStart)return so._createBefore(t);if(!e.isAtEnd){const i=t._clone(!1);this.insert(so._createAfter(t),i);const n=new ao(e,so._createAt(t,"end")),o=new so(i,0);this.move(n,o)}return so._createAfter(t)}mergeAttributes(e){const t=e.offset,i=e.parent;if(i.is("$text"))return e;if(i.is("attributeElement")&&0===i.childCount){const e=i.parent,t=i.index;return i._remove(),this._removeFromClonedElementsGroup(i),this.mergeAttributes(new so(e,t))}const n=i.getChild(t-1),o=i.getChild(t);if(!n||!o)return e;if(n.is("$text")&&o.is("$text"))return Ho(n,o);if(n.is("attributeElement")&&o.is("attributeElement")&&n.isSimilar(o)){const e=n.childCount;return n._appendChild(o.getChildren()),o._remove(),this._removeFromClonedElementsGroup(o),this.mergeAttributes(new so(n,e))}return e}mergeContainers(e){const t=e.nodeBefore,i=e.nodeAfter;if(!(t&&i&&t.is("containerElement")&&i.is("containerElement")))throw new ki.b("view-writer-merge-containers-invalid-position: Element before and after given position cannot be merged.",this.document);const n=t.getChild(t.childCount-1),o=n instanceof Fi?so._createAt(n,"end"):so._createAt(t,"end");return this.move(ao._createIn(i),so._createAt(t,"end")),this.remove(ao._createOn(i)),o}insert(e,t){(function e(t,i){for(const n of t){if(!Uo.some(e=>n instanceof e))throw new ki.b("view-writer-insert-invalid-node-type: One of the nodes to be inserted is of invalid type.",i);n.is("$text")||e(n.getChildren(),i)}})(t=Ei(t)?[...t]:[t],this.document);const i=Vo(e);if(!i)throw new ki.b("view-writer-invalid-position-container: Position's parent container cannot be found.",this.document);const n=this._breakAttributes(e,!0),o=i._insertChild(n.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const r=n.getShiftedBy(o),s=this.mergeAttributes(n);if(0===o)return new ao(s,s);{s.isEqual(n)||r.offset--;const e=this.mergeAttributes(r);return new ao(s,e)}}remove(e){const t=e instanceof ao?e:ao._createOn(e);if(qo(t,this.document),t.isCollapsed)return new Do(this.document);const{start:i,end:n}=this._breakAttributesRange(t,!0),o=i.parent,r=n.offset-i.offset,s=o._removeChildren(i.offset,r);for(const e of s)this._removeFromClonedElementsGroup(e);const a=this.mergeAttributes(i);return t.start=a,t.end=a.clone(),new Do(this.document,s)}clear(e,t){qo(e,this.document);const i=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const n of i){const i=n.item;let o;if(i.is("element")&&t.isSimilar(i))o=ao._createOn(i);else if(!n.nextPosition.isAfter(e.start)&&i.is("$textProxy")){const e=i.getAncestors().find(e=>e.is("element")&&t.isSimilar(e));e&&(o=ao._createIn(e))}o&&(o.end.isAfter(e.end)&&(o.end=e.end),o.start.isBefore(e.start)&&(o.start=e.start),this.remove(o))}}move(e,t){let i;if(t.isAfter(e.end)){const n=(t=this._breakAttributes(t,!0)).parent,o=n.childCount;e=this._breakAttributesRange(e,!0),i=this.remove(e),t.offset+=n.childCount-o}else i=this.remove(e);return this.insert(t,i)}wrap(e,t){if(!(t instanceof fo))throw new ki.b("view-writer-wrap-invalid-attribute: DowncastWriter#wrap() must be called with an attribute element.",this.document);if(qo(e,this.document),e.isCollapsed){let n=e.start;n.parent.is("element")&&(i=n.parent,!Array.from(i.getChildren()).some(e=>!e.is("uiElement")))&&(n=n.getLastMatchingPosition(e=>e.item.is("uiElement"))),n=this._wrapPosition(n,t);const o=this.document.selection;return o.isCollapsed&&o.getFirstPosition().isEqual(e.start)&&this.setSelection(n),new ao(n)}return this._wrapRange(e,t);var i}unwrap(e,t){if(!(t instanceof fo))throw new ki.b("view-writer-unwrap-invalid-attribute: DowncastWriter#unwrap() must be called with an attribute element.",this.document);if(qo(e,this.document),e.isCollapsed)return e;const{start:i,end:n}=this._breakAttributesRange(e,!0),o=i.parent,r=this._unwrapChildren(o,i.offset,n.offset,t),s=this.mergeAttributes(r.start);s.isEqual(r.start)||r.end.offset--;const a=this.mergeAttributes(r.end);return new ao(s,a)}rename(e,t){const i=new Un(this.document,e,t.getAttributes());return this.insert(so._createAfter(t),i),this.move(ao._createIn(t),so._createAt(i,0)),this.remove(ao._createOn(t)),i}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return so._createAt(e,t)}createPositionAfter(e){return so._createAfter(e)}createPositionBefore(e){return so._createBefore(e)}createRange(e,t){return new ao(e,t)}createRangeOn(e){return ao._createOn(e)}createRangeIn(e){return ao._createIn(e)}createSelection(e,t,i){return new uo(e,t,i)}_wrapChildren(e,t,i,n){let o=t;const r=[];for(;o!1,e.parent._insertChild(e.offset,i);const n=new ao(e,e.getShiftedBy(1));this.wrap(n,t);const o=new so(i.parent,i.index);i._remove();const r=o.nodeBefore,s=o.nodeAfter;return r instanceof Fi&&s instanceof Fi?Ho(r,s):Bo(o)}_wrapAttributeElement(e,t){if(!$o(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const i of e.getAttributeKeys())if("class"!==i&&"style"!==i&&t.hasAttribute(i)&&t.getAttribute(i)!==e.getAttribute(i))return!1;for(const i of e.getStyleNames())if(t.hasStyle(i)&&t.getStyle(i)!==e.getStyle(i))return!1;for(const i of e.getAttributeKeys())"class"!==i&&"style"!==i&&(t.hasAttribute(i)||this.setAttribute(i,e.getAttribute(i),t));for(const i of e.getStyleNames())t.hasStyle(i)||this.setStyle(i,e.getStyle(i),t);for(const i of e.getClassNames())t.hasClass(i)||this.addClass(i,t);return!0}_unwrapAttributeElement(e,t){if(!$o(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const i of e.getAttributeKeys())if("class"!==i&&"style"!==i&&(!t.hasAttribute(i)||t.getAttribute(i)!==e.getAttribute(i)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const i of e.getStyleNames())if(!t.hasStyle(i)||t.getStyle(i)!==e.getStyle(i))return!1;for(const i of e.getAttributeKeys())"class"!==i&&"style"!==i&&this.removeAttribute(i,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const i=e.start,n=e.end;if(qo(e,this.document),e.isCollapsed){const i=this._breakAttributes(e.start,t);return new ao(i,i)}const o=this._breakAttributes(n,t),r=o.parent.childCount,s=this._breakAttributes(i,t);return o.offset+=o.parent.childCount-r,new ao(s,o)}_breakAttributes(e,t=!1){const i=e.offset,n=e.parent;if(e.parent.is("emptyElement"))throw new ki.b("view-writer-cannot-break-empty-element: Cannot break an EmptyElement instance.",this.document);if(e.parent.is("uiElement"))throw new ki.b("view-writer-cannot-break-ui-element: Cannot break a UIElement instance.",this.document);if(e.parent.is("rawElement"))throw new ki.b("view-writer-cannot-break-raw-element: Cannot break a RawElement instance.",this.document);if(!t&&n.is("$text")&&Wo(n.parent))return e.clone();if(Wo(n))return e.clone();if(n.is("$text"))return this._breakAttributes(Fo(e),t);if(i==n.childCount){const e=new so(n.parent,n.index+1);return this._breakAttributes(e,t)}if(0===i){const e=new so(n.parent,n.index);return this._breakAttributes(e,t)}{const e=n.index+1,o=n._clone();n.parent._insertChild(e,o),this._addToClonedElementsGroup(o);const r=n.childCount-i,s=n._removeChildren(i,r);o._appendChild(s);const a=new so(n.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let i=this._cloneGroups.get(t);i||(i=new Set,this._cloneGroups.set(t,i)),i.add(e),e._clonesGroup=i}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const i=this._cloneGroups.get(t);i&&i.delete(e)}}function Vo(e){let t=e.parent;for(;!Wo(t);){if(!t)return;t=t.parent}return t}function jo(e,t){return e.priorityt.priority)&&e.getIdentity()e.createTextNode(" "),Ko=e=>{const t=e.createElement("br");return t.dataset.ckeFiller=!0,t},Jo=(()=>{let e="";for(let t=0;t<7;t++)e+="​";return e})();function Qo(e){return Yo(e)&&e.data.substr(0,7)===Jo}function Zo(e){return 7==e.data.length&&Qo(e)}function Xo(e){return Qo(e)?e.data.slice(7):e.data}function er(e,t){if(t.keyCode==xo.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,i=e.getRangeAt(0).startOffset;Qo(t)&&i<=7&&e.collapse(t,0)}}}function tr(e,t,i,n=!1){i=i||function(e,t){return e===t},Array.isArray(e)||(e=Array.prototype.slice.call(e)),Array.isArray(t)||(t=Array.prototype.slice.call(t));const o=function(e,t,i){const n=ir(e,t,i);if(-1===n)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const o=nr(e,n),r=nr(t,n),s=ir(o,r,i),a=e.length-s,c=t.length-s;return{firstIndex:n,lastIndexOld:a,lastIndexNew:c}}(e,t,i);return n?function(e,t){const{firstIndex:i,lastIndexOld:n,lastIndexNew:o}=e;if(-1===i)return Array(t).fill("equal");let r=[];i>0&&(r=r.concat(Array(i).fill("equal")));o-i>0&&(r=r.concat(Array(o-i).fill("insert")));n-i>0&&(r=r.concat(Array(n-i).fill("delete")));o0&&i.push({index:n,type:"insert",values:e.slice(n,r)});o-n>0&&i.push({index:n+(r-n),type:"delete",howMany:o-n});return i}(t,o)}function ir(e,t,i){for(let n=0;n200||o>200||n+o>300)return or.fastDiff(e,t,i,!0);let r,s;if(ol?-1:1;d[n+h]&&(d[n]=d[n+h].slice(0)),d[n]||(d[n]=[]),d[n].push(o>l?r:s);let m=Math.max(o,l),f=m-n;for(;fl;m--)u[m]=h(m);u[l]=h(l),f++}while(u[l]!==c);return d[l].slice(1)}function rr(e,t,i){e.insertBefore(i,e.childNodes[t]||null)}function sr(e){const t=e.parentNode;t&&t.removeChild(e)}function ar(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}or.fastDiff=tr;class cr{constructor(e,t){this.domDocuments=new Set,this.domConverter=e,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=t,this.isFocused=!1,this._inlineFiller=null,this._fakeSelectionContainer=null}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e)throw new ki.b("view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.",this);this.markedChildren.add(t)}}}render(){let e;for(const e of this.markedChildren)this._updateChildrenMappings(e);this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(e){const t=this.domConverter.viewPositionToDom(e),i=t.parent.ownerDocument;Qo(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=lr(i,t.parent,t.offset)}else this._inlineFiller=null;this._updateSelection(),this._updateFocus(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const i=this.domConverter.mapViewToDom(e).childNodes,n=Array.from(this.domConverter.viewChildrenToDom(e,t.ownerDocument,{withChildren:!1})),o=this._diffNodeLists(i,n),r=this._findReplaceActions(o,i,n);if(-1!==r.indexOf("replace")){const t={equal:0,insert:0,delete:0};for(const o of r)if("replace"===o){const o=t.equal+t.insert,r=t.equal+t.delete,s=e.getChild(o);!s||s.is("uiElement")||s.is("rawElement")||this._updateElementMappings(s,i[r]),sr(n[o]),t.equal++}else t[o]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?so._createBefore(this.selection.getFirstPosition().parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&Yo(t.parent)&&Qo(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!Qo(e))throw new ki.b("view-renderer-filler-was-lost: The inline filler node was lost.",this);Zo(e)?e.parentNode.removeChild(e):e.data=e.data.substr(7),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,i=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor(e=>e.hasAttribute("contenteditable"));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(i===t.getFillerOffset())return!1;const n=e.nodeBefore,o=e.nodeAfter;return!(n instanceof Fi||o instanceof Fi)}_updateText(e,t){const i=this.domConverter.findCorrespondingDomText(e),n=this.domConverter.viewToDom(e,i.ownerDocument),o=i.data;let r=n.data;const s=t.inlineFillerPosition;if(s&&s.parent==e.parent&&s.offset==e.index&&(r=Jo+r),o!=r){const e=tr(o,r);for(const t of e)"insert"===t.type?i.insertData(t.index,t.values.join("")):i.deleteData(t.index,t.howMany)}}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const i=Array.from(t.attributes).map(e=>e.name),n=e.getAttributeKeys();for(const i of n)t.setAttribute(i,e.getAttribute(i));for(const n of i)e.hasAttribute(n)||t.removeAttribute(n)}_updateChildren(e,t){const i=this.domConverter.mapViewToDom(e);if(!i)return;const n=t.inlineFillerPosition,o=this.domConverter.mapViewToDom(e).childNodes,r=Array.from(this.domConverter.viewChildrenToDom(e,i.ownerDocument,{bind:!0,inlineFillerPosition:n}));n&&n.parent===e&&lr(i.ownerDocument,r,n.offset);const s=this._diffNodeLists(o,r);let a=0;const c=new Set;for(const e of s)"delete"===e?(c.add(o[a]),sr(o[a])):"equal"===e&&a++;a=0;for(const e of s)"insert"===e?(rr(i,a,r[a]),a++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(r[a])),a++);for(const e of c)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return or(e=function(e,t){const i=Array.from(e);if(0==i.length||!t)return i;i[i.length-1]==t&&i.pop();return i}(e,this._fakeSelectionContainer),t,ur.bind(null,this.domConverter))}_findReplaceActions(e,t,i){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let n=[],o=[],r=[];const s={equal:0,insert:0,delete:0};for(const a of e)"insert"===a?r.push(i[s.equal+s.insert]):"delete"===a?o.push(t[s.equal+s.delete]):(n=n.concat(or(o,r,dr).map(e=>"equal"===e?"replace":e)),n.push("equal"),o=[],r=[]),s[a]++;return n.concat(or(o,r,dr).map(e=>"equal"===e?"replace":e))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):(this._removeFakeSelection(),this._updateDomSelection(e)))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const i=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(i,this.selection),!this._fakeSelectionNeedsUpdate(e))return;i.parentElement&&i.parentElement==e||e.appendChild(i),i.textContent=this.selection.fakeSelectionLabel||" ";const n=t.getSelection(),o=t.createRange();n.removeAllRanges(),o.selectNodeContents(i),n.addRange(o)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const i=this.domConverter.viewPositionToDom(this.selection.anchor),n=this.domConverter.viewPositionToDom(this.selection.focus);e.focus(),t.collapse(i.parent,i.offset),t.extend(n.parent,n.offset),_o.isGecko&&function(e,t){const i=e.parent;if(i.nodeType!=Node.ELEMENT_NODE||e.offset!=i.childNodes.length-1)return;const n=i.childNodes[e.offset];n&&"BR"==n.tagName&&t.addRange(t.getRangeAt(0))}(n,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return(!t||!this.selection.isEqual(t))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,i=e.ownerDocument.getSelection();return!t||t.parentElement!==e||(i.anchorNode!==t&&!t.contains(i.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const e of this.domDocuments){if(e.getSelection().rangeCount){const t=e.activeElement,i=this.domConverter.mapDomToView(t);t&&i&&e.getSelection().removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function lr(e,t,i){const n=t instanceof Array?t:t.childNodes,o=n[i];if(Yo(o))return o.data=Jo+o.data,o;{const o=e.createTextNode(Jo);return Array.isArray(t)?n.splice(i,0,o):rr(t,i,o),o}}function dr(e,t){return ar(e)&&ar(t)&&!Yo(e)&&!Yo(t)&&e.nodeType!==Node.COMMENT_NODE&&t.nodeType!==Node.COMMENT_NODE&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function ur(e,t,i){return t===i||(Yo(t)&&Yo(i)?t.data===i.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(i)))}Mi(cr,Jn);var hr={window:window,document:document};function mr(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function fr(e){const t=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}const gr=Ko(document);class pr{constructor(e,t={}){this.document=e,this.blockFillerMode=t.blockFillerMode||"br",this.preElements=["pre"],this.blockElements=["p","div","h1","h2","h3","h4","h5","h6","li","dd","dt","figcaption","td","th"],this._blockFiller="br"==this.blockFillerMode?Ko:Go,this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new uo(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of e.childNodes)this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}viewToDom(e,t,i={}){if(e.is("$text")){const i=this._processDataFromViewText(e);return t.createTextNode(i)}{if(this.mapViewToDom(e))return this.mapViewToDom(e);let n;if(e.is("documentFragment"))n=t.createDocumentFragment(),i.bind&&this.bindDocumentFragments(n,e);else{if(e.is("uiElement"))return n=e.render(t),i.bind&&this.bindElements(n,e),n;n=e.hasAttribute("xmlns")?t.createElementNS(e.getAttribute("xmlns"),e.name):t.createElement(e.name),e.is("rawElement")&&e.render(n),i.bind&&this.bindElements(n,e);for(const t of e.getAttributeKeys())n.setAttribute(t,e.getAttribute(t))}if(i.withChildren||void 0===i.withChildren)for(const o of this.viewChildrenToDom(e,t,i))n.appendChild(o);return n}}*viewChildrenToDom(e,t,i={}){const n=e.getFillerOffset&&e.getFillerOffset();let o=0;for(const r of e.getChildren())n===o&&(yield this._blockFiller(t)),yield this.viewToDom(r,t,i),o++;n===o&&(yield this._blockFiller(t))}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),i=this.viewPositionToDom(e.end),n=document.createRange();return n.setStart(t.parent,t.offset),n.setEnd(i.parent,i.offset),n}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const i=this.findCorrespondingDomText(t);if(!i)return null;let n=e.offset;return Qo(i)&&(n+=7),{parent:i,offset:n}}{let i,n,o;if(0===e.offset){if(i=this.mapViewToDom(t),!i)return null;o=i.childNodes[0]}else{const t=e.nodeBefore;if(n=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(e.nodeBefore),!n)return null;i=n.parentNode,o=n.nextSibling}if(Yo(o)&&Qo(o))return{parent:o,offset:7};return{parent:i,offset:n?mr(n)+1:0}}}domToView(e,t={}){if(this.isBlockFiller(e,this.blockFillerMode))return null;const i=this.getHostViewElement(e,this._domToViewMapping);if(i)return i;if(Yo(e)){if(Zo(e))return null;{const t=this._processDataFromDomText(e);return""===t?null:new Fi(this.document,t)}}if(this.isComment(e))return null;{if(this.mapDomToView(e))return this.mapDomToView(e);let i;if(this.isDocumentFragment(e))i=new Do(this.document),t.bind&&this.bindDocumentFragments(e,i);else{const n=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();i=new Fn(this.document,n),t.bind&&this.bindElements(e,i);const o=e.attributes;for(let e=o.length-1;e>=0;e--)i._setAttribute(o[e].name,o[e].value)}if(t.withChildren||void 0===t.withChildren)for(const n of this.domChildrenToView(e,t))i._appendChild(n);return i}}*domChildrenToView(e,t={}){for(let i=0;i{const{scrollLeft:t,scrollTop:i}=e;n.push([t,i])}),t.focus(),wr(t,e=>{const[t,i]=n.shift();e.scrollLeft=t,e.scrollTop=i}),hr.window.scrollTo(e,i)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(e){return e&&e.nodeType==Node.COMMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(gr):!("BR"!==e.tagName||!kr(e,this.blockElements)||1!==e.parentNode.childNodes.length)||function(e,t){return Yo(e)&&" "==e.data&&kr(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements)}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=document.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);const i=t.collapsed;return t.detach(),i}getHostViewElement(e){const t=fr(e);for(t.pop();t.length;){const e=t.pop(),i=this._domToViewMapping.get(e);if(i&&(i.is("uiElement")||i.is("rawElement")))return i}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}_isDomSelectionPositionCorrect(e,t){if(Yo(e)&&Qo(e)&&t<7)return!1;if(this.isElement(e)&&Qo(e.childNodes[t]))return!1;const i=this.mapDomToView(e);return!i||!i.is("uiElement")&&!i.is("rawElement")}_processDataFromViewText(e){let t=e.data;if(e.getAncestors().some(e=>this.preElements.includes(e.name)))return t;if(" "==t.charAt(0)){const i=this._getTouchingViewTextNode(e,!1);!(i&&this._nodeEndsWithSpace(i))&&i||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const i=this._getTouchingViewTextNode(e,!0);" "!=t.charAt(t.length-2)&&i&&" "!=i.data.charAt(0)||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(e.getAncestors().some(e=>this.preElements.includes(e.name)))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(br(e,this.preElements))return Xo(e);t=t.replace(/[ \n\t\r]{1,}/g," ");const i=this._getTouchingInlineDomNode(e,!1),n=this._getTouchingInlineDomNode(e,!0),o=this._checkShouldLeftTrimDomText(i),r=this._checkShouldRightTrimDomText(e,n);return o&&(t=t.replace(/^ /,"")),r&&(t=t.replace(/ $/,"")),t=Xo(new Text(t)),t=t.replace(/ \u00A0/g," "),(/( |\u00A0)\u00A0$/.test(t)||!n||n.data&&" "==n.data.charAt(0))&&(t=t.replace(/\u00A0$/," ")),o&&(t=t.replace(/^\u00A0/," ")),t}_checkShouldLeftTrimDomText(e){return!e||(!!di(e)||/[^\S\u00A0]/.test(e.data.charAt(e.data.length-1)))}_checkShouldRightTrimDomText(e,t){return!t&&!Qo(e)}_getTouchingViewTextNode(e,t){const i=new ro({startPosition:t?so._createAfter(e):so._createBefore(e),direction:t?"forward":"backward"});for(const e of i){if(e.item.is("containerElement"))return null;if(e.item.is("element","br"))return null;if(e.item.is("$textProxy"))return e.item}return null}_getTouchingInlineDomNode(e,t){if(!e.parentNode)return null;const i=t?"nextNode":"previousNode",n=e.ownerDocument,o=fr(e)[0],r=n.createTreeWalker(o,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:e=>Yo(e)||"BR"==e.tagName?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});r.currentNode=e;const s=r[i]();if(null!==s){const t=function(e,t){const i=fr(e),n=fr(t);let o=0;for(;i[o]==n[o]&&i[o];)o++;return 0===o?null:i[o-1]}(e,s);if(t&&!br(e,this.blockElements,t)&&!br(s,this.blockElements,t))return s}return null}}function br(e,t,i){let n=fr(e);return i&&(n=n.slice(n.indexOf(i)+1)),n.some(e=>e.tagName&&t.includes(e.tagName.toLowerCase()))}function wr(e,t){for(;e&&e!=hr.document;)t(e),e=e.parentNode}function kr(e,t){const i=e.parentNode;return i&&i.tagName&&t.includes(i.tagName.toLowerCase())}function _r(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}var vr=qn({},yi,{listenTo(e,...t){if(ar(e)||_r(e)){const i=this._getProxyEmitter(e)||new yr(e);i.attach(...t),e=i}yi.listenTo.call(this,e,...t)},stopListening(e,t,i){if(ar(e)||_r(e)){const t=this._getProxyEmitter(e);if(!t)return;e=t}yi.stopListening.call(this,e,t,i),e instanceof yr&&e.detach(t)},_getProxyEmitter(e){return t=this,i=xr(e),t[_i]&&t[_i][i]?t[_i][i].emitter:null;var t,i}});class yr{constructor(e){xi(this,xr(e)),this._domNode=e}}function xr(e){return e["data-ck-expando"]||(e["data-ck-expando"]=bi())}qn(yr.prototype,yi,{attach(e,t,i={}){if(this._domListeners&&this._domListeners[e])return;const n={capture:!!i.useCapture,passive:!!i.usePassive},o=this._createDomListener(e,n);this._domNode.addEventListener(e,o,n),this._domListeners||(this._domListeners={}),this._domListeners[e]=o},detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()},_createDomListener(e,t){const i=t=>{this.fire(e,t)};return i.removeListener=()=>{this._domNode.removeEventListener(e,i,t),delete this._domListeners[e]},i}});class Ar{constructor(e){this.view=e,this.document=e.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}}Mi(Ar,vr);var Cr=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var Tr=function(e){return this.__data__.has(e)};function Pr(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new ke;++ta))return!1;var l=r.get(e);if(l&&r.get(t))return l==t;var d=-1,u=!0,h=2&i?new Sr:void 0;for(r.set(e,t),r.set(t,e);++d{this.listenTo(e,t,(e,t)=>{this.isEnabled&&this.onDomEvent(t)},{useCapture:this.useCapture})})}fire(e,t,i){this.isEnabled&&this.document.fire(e,new Yr(this.view,t,i))}}class Kr extends Gr{constructor(e){super(e),this.domEventType=["keydown","keyup"]}onDomEvent(e){this.fire(e.type,e,{keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey||e.metaKey,shiftKey:e.shiftKey,get keystroke(){return Ao(this)}})}}var Jr=function(){return n.a.Date.now()},Qr=/^\s+|\s+$/g,Zr=/^[-+]0x[0-9a-f]+$/i,Xr=/^0b[01]+$/i,es=/^0o[0-7]+$/i,ts=parseInt;var is=function(e){if("number"==typeof e)return e;if($i(e))return NaN;if(L(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=L(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Qr,"");var i=Xr.test(e);return i||es.test(e)?ts(e.slice(2),i?2:8):Zr.test(e)?NaN:+e},ns=Math.max,os=Math.min;var rs=function(e,t,i){var n,o,r,s,a,c,l=0,d=!1,u=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var i=n,r=o;return n=o=void 0,l=t,s=e.apply(r,i)}function f(e){return l=e,a=setTimeout(p,t),d?m(e):s}function g(e){var i=e-c;return void 0===c||i>=t||i<0||u&&e-l>=r}function p(){var e=Jr();if(g(e))return b(e);a=setTimeout(p,function(e){var i=t-(e-c);return u?os(i,r-(e-l)):i}(e))}function b(e){return a=void 0,h&&n?m(e):(n=o=void 0,s)}function w(){var e=Jr(),i=g(e);if(n=arguments,o=this,c=e,i){if(void 0===a)return f(c);if(u)return clearTimeout(a),a=setTimeout(p,t),m(c)}return void 0===a&&(a=setTimeout(p,t)),s}return t=is(t)||0,L(i)&&(d=!!i.leading,r=(u="maxWait"in i)?ns(is(i.maxWait)||0,t):r,h="trailing"in i?!!i.trailing:h),w.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=c=o=a=void 0},w.flush=function(){return void 0===a?s:b(Jr())},w};class ss extends Ar{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=rs(e=>this.document.fire("selectionChangeDone",e),200)}observe(){const e=this.document;e.on("keydown",(t,i)=>{var n;e.selection.isFake&&((n=i.keyCode)==xo.arrowright||n==xo.arrowleft||n==xo.arrowup||n==xo.arrowdown)&&this.isEnabled&&(i.preventDefault(),this._handleSelectionMove(i.keyCode))},{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,i=new uo(t.getRanges(),{backward:t.isBackward,fake:!1});e!=xo.arrowleft&&e!=xo.arrowup||i.setTo(i.getFirstPosition()),e!=xo.arrowright&&e!=xo.arrowdown||i.setTo(i.getLastPosition());const n={oldSelection:t,newSelection:i,domSelection:null};this.document.fire("selectionChange",n),this._fireSelectionChangeDoneDebounced(n)}}class as extends Ar{constructor(e){super(e),this.mutationObserver=e.getObserver($r),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=rs(e=>this.document.fire("selectionChangeDone",e),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument;this._documents.has(t)||(this.listenTo(t,"selectionchange",()=>{this._handleSelectionChange(t)}),this._documents.add(t))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(e){if(!this.isEnabled)return;this.mutationObserver.flush();const t=e.defaultView.getSelection(),i=this.domConverter.domSelectionToView(t);if(0!=i.rangeCount){if(this.view.hasDomSelection=!0,!(this.selection.isEqual(i)&&this.domConverter.isDomSelectionCorrect(t)||++this._loopbackCounter>60))if(this.selection.isSimilar(i))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:i,domSelection:t};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class cs extends Gr{constructor(e){super(e),this.domEventType=["focus","blur"],this.useCapture=!0;const t=this.document;t.on("focus",()=>{t.isFocused=!0,this._renderTimeoutId=setTimeout(()=>e.forceRender(),50)}),t.on("blur",(i,n)=>{const o=t.selection.editableElement;null!==o&&o!==n.target||(t.isFocused=!1,e.forceRender())})}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class ls extends Gr{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",()=>{t.isComposing=!0}),t.on("compositionend",()=>{t.isComposing=!1})}onDomEvent(e){this.fire(e.type,e)}}class ds extends Gr{constructor(e){super(e),this.domEventType=["beforeinput"]}onDomEvent(e){this.fire(e.type,e)}}function us(e){return"[object Range]"==Object.prototype.toString.apply(e)}function hs(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}const ms=["top","right","bottom","left","width","height"];class fs{constructor(e){const t=us(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),di(e)||t)if(t){const t=fs.getDomRangeRects(e);gs(this,fs.getBoundingRect(t))}else gs(this,e.getBoundingClientRect());else if(_r(e)){const{innerWidth:t,innerHeight:i}=e;gs(this,{top:0,right:t,bottom:i,left:0,width:t,height:i})}else gs(this,e)}clone(){return new fs(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left)};return t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0?null:new fs(t)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!ps(e)){let i=e.parentNode||e.commonAncestorContainer;for(;i&&!ps(i);){const e=new fs(i),n=t.getIntersection(e);if(!n)return null;n.getArea()Ts(e,n));const s=Ts(e,n);if(ws(n,s,t),n.parent!=n){if(o=n.frameElement,n=n.parent,!o)return}else n=null}}function ws(e,t,i){const n=t.clone().moveBy(0,i),o=t.clone().moveBy(0,-i),r=new fs(e).excludeScrollbarsAndBorders();if(![o,n].every(e=>r.contains(e))){let{scrollX:s,scrollY:a}=e;vs(o,r)?a-=r.top-t.top+i:_s(n,r)&&(a+=t.bottom-r.bottom+i),ys(t,r)?s-=r.left-t.left+i:xs(t,r)&&(s+=t.right-r.right+i),e.scrollTo(s,a)}}function ks(e,t){const i=As(e);let n,o;for(;e!=i.document.body;)o=t(),n=new fs(e).excludeScrollbarsAndBorders(),n.contains(o)||(vs(o,n)?e.scrollTop-=n.top-o.top:_s(o,n)&&(e.scrollTop+=o.bottom-n.bottom),ys(o,n)?e.scrollLeft-=n.left-o.left:xs(o,n)&&(e.scrollLeft+=o.right-n.right)),e=e.parentNode}function _s(e,t){return e.bottom>t.bottom}function vs(e,t){return e.topt.right}function As(e){return us(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function Cs(e){if(us(e)){let t=e.commonAncestorContainer;return Yo(t)&&(t=t.parentNode),t}return e.parentNode}function Ts(e,t){const i=As(e),n=new fs(e);if(i===t)return n;{let e=i;for(;e!=t;){const t=e.frameElement,i=new fs(t).excludeScrollbarsAndBorders();n.moveBy(i.left,i.top),e=e.parent}}return n}Object.assign({},{scrollViewportToShowTarget:bs,scrollAncestorsToShowTarget:function(e){ks(Cs(e),()=>new fs(e))}});class Ps{constructor(e){this.document=new mo(e),this.domConverter=new pr(this.document),this.domRoots=new Map,this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new cr(this.domConverter,this.document.selection),this._renderer.bind("isFocused").to(this.document),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new Lo(this.document),this.addObserver($r),this.addObserver(as),this.addObserver(cs),this.addObserver(Kr),this.addObserver(ss),this.addObserver(ls),_o.isAndroid&&this.addObserver(ds),this.document.on("keydown",er),No(this),this.on("render",()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1}),this.listenTo(this.document.selection,"change",()=>{this._hasChangedSinceTheLastRendering=!0})}attachDomRoot(e,t="main"){const i=this.document.getRoot(t);i._name=e.tagName.toLowerCase();const n={};for(const{name:t,value:o}of Array.from(e.attributes))n[t]=o,"class"===t?this._writer.addClass(o.split(" "),i):this._writer.setAttribute(t,o,i);this._initialDomRootAttributes.set(e,n);const o=()=>{this._writer.setAttribute("contenteditable",!i.isReadOnly,i),i.isReadOnly?this._writer.addClass("ck-read-only",i):this._writer.removeClass("ck-read-only",i)};o(),this.domRoots.set(t,e),this.domConverter.bindElements(e,i),this._renderer.markToSync("children",i),this._renderer.markToSync("attributes",i),this._renderer.domDocuments.add(e.ownerDocument),i.on("change:children",(e,t)=>this._renderer.markToSync("children",t)),i.on("change:attributes",(e,t)=>this._renderer.markToSync("attributes",t)),i.on("change:text",(e,t)=>this._renderer.markToSync("text",t)),i.on("change:isReadOnly",()=>this.change(o)),i.on("change",()=>{this._hasChangedSinceTheLastRendering=!0});for(const i of this._observers.values())i.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach(({name:e})=>t.removeAttribute(e));const i=this._initialDomRootAttributes.get(t);for(const e in i)t.setAttribute(e,i[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,i]of this.domRoots)t.observe(i,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection(){const e=this.document.selection.getFirstRange();e&&bs({target:this.domConverter.viewRangeToDom(e),viewportOffset:20})}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new ki.b("cannot-change-view-tree: Attempting to make changes to the view when it is in an incorrect state: rendering or post-fixers are in progress. This may cause some unexpected behavior and inconsistency between the DOM and the view.",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){ki.b.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.change(()=>{})}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return so._createAt(e,t)}createPositionAfter(e){return so._createAfter(e)}createPositionBefore(e){return so._createBefore(e)}createRange(e,t){return new ao(e,t)}createRangeOn(e){return ao._createOn(e)}createRangeIn(e){return ao._createIn(e)}createSelection(e,t,i){return new uo(e,t,i)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change(()=>{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}Mi(Ps,Jn);class Ss{constructor(e){this.parent=null,this._attrs=Ui(e)}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new ki.b("model-node-not-found-in-parent: The node's parent does not contain this node.",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new ki.b("model-node-not-found-in-parent: The node's parent does not contain this node.",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}getCommonAncestor(e,t={}){const i=this.getAncestors(t),n=e.getAncestors(t);let o=0;for(;i[o]==n[o]&&i[o];)o++;return 0===o?null:i[o-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),i=e.getPath(),n=Vi(t,i);switch(n){case"prefix":return!0;case"extension":return!1;default:return t[n](e[t[0]]=t[1],e),{})),e}is(e){return"node"===e||"model:node"===e}_clone(){return new Ss(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=Ui(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}class Es extends Ss{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}is(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new Es(this.data,this.getAttributes())}static fromJSON(e){return new Es(e.data,e.attributes)}}class Ms{constructor(e,t,i){if(this.textNode=e,t<0||t>e.offsetSize)throw new ki.b("model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",this);if(i<0||t+i>e.offsetSize)throw new ki.b("model-textproxy-wrong-length: Given length value is incorrect.",this);this.data=e.data.substring(t,t+i),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}is(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}class Is{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((e,t)=>e+t.offsetSize,0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce((e,t)=>e+t.offsetSize,0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new ki.b("model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const i of this._nodes){if(e>=t&&ee.toJSON())}}class Ns extends Ss{constructor(e,t,i){super(t),this.name=e,this._children=new Is,i&&this._insertChild(0,i)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(e,t=null){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const i of e)t=t.getChild(t.offsetToIndex(i));return t}findAncestor(e,t={includeSelf:!1}){let i=t.includeSelf?this:this.parent;for(;i;){if(i.name===e)return i;i=i.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map(e=>e._clone(!0)):null;return new Ns(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const i=function(e){if("string"==typeof e)return[new Es(e)];Ei(e)||(e=[e]);return Array.from(e).map(e=>"string"==typeof e?new Es(e):e instanceof Ms?new Es(e.data,e.getAttributes()):e)}(t);for(const e of i)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,i)}_removeChildren(e,t=1){const i=this._children._removeNodes(e,t);for(const e of i)e.parent=null;return i}static fromJSON(e){let t=null;if(e.children){t=[];for(const i of e.children)i.name?t.push(Ns.fromJSON(i)):t.push(Es.fromJSON(i))}return new Ns(e.name,e.attributes,t)}}class Rs{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new ki.b("model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new ki.b("model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this.position=e.startPosition.clone():this.position=zs._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}skip(e){let t,i,n,o;do{n=this.position,o=this._visitedParent,({done:t,value:i}=this.next())}while(!t&&e(i));t||(this.position=n,this._visitedParent=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),i=this._visitedParent;if(null===i.parent&&t.offset===i.maxOffset)return{done:!0};if(i===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};const n=t.parent,o=Ds(t,n),r=o||Ls(t,n,o);if(r instanceof Ns)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=r),this.position=t,Os("elementStart",r,e,t,1);if(r instanceof Es){let n;if(this.singleCharacters)n=1;else{let e=r.endOffset;this._boundaryEndParent==i&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),n=t.offset-e}const o=t.offset-r.startOffset,s=new Ms(r,o-n,n);return t.offset-=n,this.position=t,Os("text",s,e,t,n)}return t.path.pop(),this.position=t,this._visitedParent=i.parent,Os("elementStart",i,e,t,1)}}function Os(e,t,i,n,o){return{done:!1,value:{type:e,item:t,previousPosition:i,nextPosition:n,length:o}}}class zs{constructor(e,t,i="toNone"){if(!e.is("element")&&!e.is("documentFragment"))throw new ki.b("model-position-root-invalid: Position root invalid.",e);if(!(t instanceof Array)||0===t.length)throw new ki.b("model-position-path-incorrect-format: Position path must be an array with at least one item.",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=i}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;ti.path.length){if(t.offset!==n.maxOffset)return!1;t.path=t.path.slice(0,-1),n=n.parent,t.offset++}else{if(0!==i.offset)return!1;i.path=i.path.slice(0,-1)}}}is(e){return"position"===e||"model:position"===e}hasSameParentAs(e){if(this.root!==e.root)return!1;return"same"==Vi(this.getParentPath(),e.getParentPath())}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=zs._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let i;return t.containsPosition(this)||t.start.isEqual(this)?(i=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(i=i._getTransformedByDeletion(e.deletionPosition,1))):i=this.isEqual(e.deletionPosition)?zs._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),i}_getTransformedByDeletion(e,t){const i=zs._createAt(this);if(this.root!=e.root)return i;if("same"==Vi(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;i.offset-=t}}else if("prefix"==Vi(e.getParentPath(),this.getParentPath())){const n=e.path.length-1;if(e.offset<=this.path[n]){if(e.offset+t>this.path[n])return null;i.path[n]-=t}}return i}_getTransformedByInsertion(e,t){const i=zs._createAt(this);if(this.root!=e.root)return i;if("same"==Vi(e.getParentPath(),this.getParentPath()))(e.offsett+1;){const t=n.maxOffset-i.offset;0!==t&&e.push(new js(i,i.getShiftedBy(t))),i.path=i.path.slice(0,-1),i.offset++,n=n.parent}for(;i.path.length<=this.end.path.length;){const t=this.end.path[i.path.length-1],n=t-i.offset;0!==n&&e.push(new js(i,i.getShiftedBy(n))),i.offset=t,i.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new Rs(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new Rs(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new Rs(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new js(this.start,this.end)]}getTransformedByOperations(e){const t=[new js(this.start,this.end)];for(const i of e)for(let e=0;e0?new this(i,n):new this(n,i)}static _createIn(e){return new this(zs._createAt(e,0),zs._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(zs._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new ki.b("range-create-from-ranges-empty-array: At least one range has to be passed.",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort((e,t)=>e.start.isAfter(t.start)?1:-1);const i=e.indexOf(t),n=new this(t.start,t.end);if(i>0)for(let t=i-1;e[t].end.isEqual(n.start);t++)n.start=zs._createAt(e[t].start);for(let t=i+1;t{if(t.viewPosition)return;const i=this._modelToViewMapping.get(t.modelPosition.parent);t.viewPosition=this.findPositionIn(i,t.modelPosition.offset)},{priority:"low"}),this.on("viewToModelPosition",(e,t)=>{if(t.modelPosition)return;const i=this.findMappedViewAncestor(t.viewPosition),n=this._viewToModelMapping.get(i),o=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,i);t.modelPosition=zs._createAt(n,o)},{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e){const t=this.toModelElement(e);if(this._viewToModelMapping.delete(e),this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);this._modelToViewMapping.get(t)==e&&this._modelToViewMapping.delete(t)}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const i=this._markerNameToElements.get(t)||new Set;i.add(e);const n=this._elementToMarkerNames.get(e)||new Set;n.add(t),this._markerNameToElements.set(t,i),this._elementToMarkerNames.set(e,n)}unbindElementFromMarkerName(e,t){const i=this._markerNameToElements.get(t);i&&(i.delete(e),0==i.size&&this._markerNameToElements.delete(t));const n=this._elementToMarkerNames.get(e);n&&(n.delete(t),0==n.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new js(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new ao(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={isPhantom:!1}){const i={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",i),i.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const i=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())i.add(t);else i.add(e);return i}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,i){if(i!=e){return this._toModelOffset(e.parent,e.index,i)+this._toModelOffset(e,t,e)}if(e.is("$text"))return t;let n=0;for(let i=0;i1?t[0]+":"+t[1]:t[0]}class Us{constructor(e){this.conversionApi=Object.assign({dispatcher:this},e)}convertChanges(e,t,i){for(const t of e.getMarkersToRemove())this.convertMarkerRemove(t.name,t.range,i);for(const t of e.getChanges())"insert"==t.type?this.convertInsert(js._createFromPositionAndShift(t.position,t.length),i):"remove"==t.type?this.convertRemove(t.position,t.length,t.name,i):this.convertAttribute(t.range,t.attributeKey,t.attributeOldValue,t.attributeNewValue,i);for(const e of this.conversionApi.mapper.flushUnboundMarkerNames()){const n=t.get(e).getRange();this.convertMarkerRemove(e,n,i),this.convertMarkerAdd(e,n,i)}for(const t of e.getMarkersToAdd())this.convertMarkerAdd(t.name,t.range,i)}convertInsert(e,t){this.conversionApi.writer=t,this.conversionApi.consumable=this._createInsertConsumable(e);for(const t of e){const e=t.item,i={item:e,range:js._createFromPositionAndShift(t.previousPosition,t.length)};this._testAndFire("insert",i);for(const t of e.getAttributeKeys())i.attributeKey=t,i.attributeOldValue=null,i.attributeNewValue=e.getAttribute(t),this._testAndFire("attribute:"+t,i)}this._clearConversionApi()}convertRemove(e,t,i,n){this.conversionApi.writer=n,this.fire("remove:"+i,{position:e,length:t},this.conversionApi),this._clearConversionApi()}convertAttribute(e,t,i,n,o){this.conversionApi.writer=o,this.conversionApi.consumable=this._createConsumableForRange(e,"attribute:"+t);for(const o of e){const e={item:o.item,range:js._createFromPositionAndShift(o.previousPosition,o.length),attributeKey:t,attributeOldValue:i,attributeNewValue:n};this._testAndFire("attribute:"+t,e)}this._clearConversionApi()}convertSelection(e,t,i){const n=Array.from(t.getMarkersAtPosition(e.getFirstPosition()));if(this.conversionApi.writer=i,this.conversionApi.consumable=this._createSelectionConsumable(e,n),this.fire("selection",{selection:e},this.conversionApi),e.isCollapsed){for(const t of n){const i=t.getRange();if(!Ws(e.getFirstPosition(),t,this.conversionApi.mapper))continue;const n={item:e,markerName:t.name,markerRange:i};this.conversionApi.consumable.test(e,"addMarker:"+t.name)&&this.fire("addMarker:"+t.name,n,this.conversionApi)}for(const t of e.getAttributeKeys()){const i={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};this.conversionApi.consumable.test(e,"attribute:"+i.attributeKey)&&this.fire("attribute:"+i.attributeKey+":$text",i,this.conversionApi)}this._clearConversionApi()}}convertMarkerAdd(e,t,i){if(!t.root.document||"$graveyard"==t.root.rootName)return;this.conversionApi.writer=i;const n="addMarker:"+e,o=new Fs;if(o.add(t,n),this.conversionApi.consumable=o,this.fire(n,{markerName:e,markerRange:t},this.conversionApi),o.test(t,n)){this.conversionApi.consumable=this._createConsumableForRange(t,n);for(const i of t.getItems()){if(!this.conversionApi.consumable.test(i,n))continue;const o={item:i,range:js._createOn(i),markerName:e,markerRange:t};this.fire(n,o,this.conversionApi)}this._clearConversionApi()}}convertMarkerRemove(e,t,i){t.root.document&&"$graveyard"!=t.root.rootName&&(this.conversionApi.writer=i,this.fire("removeMarker:"+e,{markerName:e,markerRange:t},this.conversionApi),this._clearConversionApi())}_createInsertConsumable(e){const t=new Fs;for(const i of e){const e=i.item;t.add(e,"insert");for(const i of e.getAttributeKeys())t.add(e,"attribute:"+i)}return t}_createConsumableForRange(e,t){const i=new Fs;for(const n of e.getItems())i.add(n,t);return i}_createSelectionConsumable(e,t){const i=new Fs;i.add(e,"selection");for(const n of t)i.add(e,"addMarker:"+n.name);for(const t of e.getAttributeKeys())i.add(e,"attribute:"+t);return i}_testAndFire(e,t){if(!this.conversionApi.consumable.test(t.item,e))return;const i=t.item.name||"$text";this.fire(e+":"+i,t,this.conversionApi)}_clearConversionApi(){delete this.conversionApi.writer,delete this.conversionApi.consumable}}function Ws(e,t,i){const n=t.getRange(),o=Array.from(e.getAncestors());o.shift(),o.reverse();return!o.some(e=>{if(n.containsItem(e)){return!!i.toViewElement(e).getCustomProperty("addHighlight")}})}Mi(Us,yi);class qs{constructor(e,t,i){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,e&&this.setTo(e,t,i)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let i=!1;for(const n of e._ranges)if(t.isEqual(n)){i=!0;break}if(!i)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new js(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new js(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new js(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(e,t,i){if(null===e)this._setRanges([]);else if(e instanceof qs)this._setRanges(e.getRanges(),e.isBackward);else if(e&&"function"==typeof e.getRanges)this._setRanges(e.getRanges(),e.isBackward);else if(e instanceof js)this._setRanges([e],!!t&&!!t.backward);else if(e instanceof zs)this._setRanges([new js(e)]);else if(e instanceof Ss){const n=!!i&&!!i.backward;let o;if("in"==t)o=js._createIn(e);else if("on"==t)o=js._createOn(e);else{if(void 0===t)throw new ki.b("model-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.",[this,e]);o=new js(zs._createAt(e,t))}this._setRanges([o],n)}else{if(!Ei(e))throw new ki.b("model-selection-setTo-not-selectable: Cannot set the selection to the given place.",[this,e]);this._setRanges(e,t&&!!t.backward)}}_setRanges(e,t=!1){const i=(e=Array.from(e)).some(t=>{if(!(t instanceof js))throw new ki.b("model-selection-set-ranges-not-range: Selection range set to an object that is not an instance of model.Range.",[this,e]);return this._ranges.every(e=>!e.isEqual(t))});if(e.length!==this._ranges.length||i){this._removeAllRanges();for(const t of e)this._pushRange(t);this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0})}}setFocus(e,t){if(null===this.anchor)throw new ki.b("model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",[this,e]);const i=zs._createAt(e,t);if("same"==i.compareWith(this.focus))return;const n=this.anchor;this._ranges.length&&this._popRange(),"before"==i.compareWith(n)?(this._pushRange(new js(i,n)),this._lastRangeBackward=!0):(this._pushRange(new js(n,i)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}is(e){return"selection"===e||"model:selection"===e}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const i=Gs(t.start,e);i&&Ks(i,t)&&(yield i);for(const i of t.getWalker()){const n=i.item;"elementEnd"==i.type&&Ys(n,e,t)&&(yield n)}const n=Gs(t.end,e);n&&!t.end.isTouching(zs._createAt(n,0))&&Ks(n,t)&&(yield n)}}containsEntireContent(e=this.anchor.root){const t=zs._createAt(e,0),i=zs._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&i.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new js(e.start,e.end))}_checkRange(e){for(let t=0;t0;)this._popRange()}_popRange(){this._ranges.pop()}}function $s(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&e.parent)}function Ys(e,t,i){return $s(e,t)&&Ks(e,i)}function Gs(e,t){const i=e.parent.root.document.model.schema,n=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let o=!1;const r=n.find(e=>!o&&(o=i.isLimit(e),!o&&$s(e,t)));return n.forEach(e=>t.add(e)),r}function Ks(e,t){const i=function(e){const t=e.root.document.model.schema;let i=e.parent;for(;i;){if(t.isBlock(i))return i;i=i.parent}}(e);if(!i)return!0;return!t.containsRange(js._createOn(i),!0)}Mi(qs,yi);class Js extends js{constructor(e,t){super(e,t),Qs.call(this)}detach(){this.stopListening()}is(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e}toRange(){return new js(this.start,this.end)}static fromRange(e){return new Js(e.start,e.end)}}function Qs(){this.listenTo(this.root.document.model,"applyOperation",(e,t)=>{const i=t[0];i.isDocumentOperation&&Zs.call(this,i)},{priority:"low"})}function Zs(e){const t=this.getTransformedByOperation(e),i=js._createFromRanges(t),n=!i.isEqual(this),o=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let r=null;if(n){"$graveyard"==i.root.rootName&&(r="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=i.start,this.end=i.end,this.fire("change:range",t,{deletionPosition:r})}else o&&this.fire("change:content",this.toRange(),{deletionPosition:r})}Mi(Js,yi);const Xs="selection:";class ea{constructor(e){this._selection=new ta(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection._updateMarkers(),this._selection._updateAttributes(!1)}is(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(e,t,i){this._selection.setTo(e,t,i)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection._getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return Xs+e}static _isStoreAttributeKey(e){return e.startsWith(Xs)}}Mi(ea,yi);class ta extends qs{constructor(e){super(),this.markers=new Ii({idProperty:"name"}),this._model=e.model,this._document=e,this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this.listenTo(this._model,"applyOperation",(e,t)=>{const i=t[0];i.isDocumentOperation&&"marker"!=i.type&&"rename"!=i.type&&"noop"!=i.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))},{priority:"lowest"}),this.on("change:range",()=>{for(const e of this.getRanges())if(!this._document._validateSelectionRange(e))throw new ki.b("document-selection-wrong-position: Range from document selection starts or ends at incorrect position.",this,{range:e})}),this.listenTo(this._model.markers,"update",()=>this._updateMarkers()),this.listenTo(this._document,"change",(e,t)=>{!function(e,t){const i=e.document.differ;for(const n of i.getChanges()){if("insert"!=n.type)continue;const i=n.position.parent;n.length===i.maxOffset&&e.enqueueChange(t,e=>{const t=Array.from(i.getAttributeKeys()).filter(e=>e.startsWith(Xs));for(const n of t)e.removeAttribute(n,i)})}}(this._model,t)})}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=n.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}}),t}_updateMarkers(){const e=[];let t=!1;for(const t of this._model.markers){const i=t.getRange();for(const n of this.getRanges())i.containsRange(n,!n.isCollapsed)&&e.push(t)}const i=Array.from(this.markers);for(const i of e)this.markers.has(i)||(this.markers.add(i),t=!0);for(const i of Array.from(this.markers))e.includes(i)||(this.markers.remove(i),t=!0);t&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateAttributes(e){const t=Ui(this._getSurroundingAttributes()),i=Ui(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const n=[];for(const[e,t]of this.getAttributes())i.has(e)&&i.get(e)===t||n.push(e);for(const[e]of i)this.hasAttribute(e)||n.push(e);n.length>0&&this.fire("change:attribute",{attributeKeys:n,directChange:!1})}_setAttribute(e,t,i=!0){const n=i?"normal":"low";if("low"==n&&"normal"==this._attributePriority.get(e))return!1;return super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,n),!0)}_removeAttribute(e,t=!0){const i=t?"normal":"low";return("low"!=i||"normal"!=this._attributePriority.get(e))&&(this._attributePriority.set(e,i),!!super.hasAttribute(e)&&(this._attrs.delete(e),!0))}_setAttributesTo(e){const t=new Set;for(const[t,i]of this.getAttributes())e.get(t)!==i&&this._removeAttribute(t,!1);for(const[i,n]of e){this._setAttribute(i,n,!1)&&t.add(i)}return t}*_getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(Xs)){const i=t.substr(Xs.length);yield[i,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;let i=null;if(this.isCollapsed){const n=e.textNode?e.textNode:e.nodeBefore,o=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(i=ia(n)),i||(i=ia(o)),!this.isGravityOverridden&&!i){let e=n;for(;e&&!t.isInline(e)&&!i;)e=e.previousSibling,i=ia(e)}if(!i){let e=o;for(;e&&!t.isInline(e)&&!i;)e=e.nextSibling,i=ia(e)}i||(i=this._getStoredAttributes())}else{const e=this.getFirstRange();for(const n of e){if(n.item.is("element")&&t.isObject(n.item))break;if("text"==n.type){i=n.item.getAttributes();break}}}return i}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function ia(e){return e instanceof Ms||e instanceof Es?e.getAttributes():null}class na{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}var oa=function(e){return ci(e,5)};class ra extends na{elementToElement(e){return this.add(function(e){return(e=oa(e)).view=ca(e.view,"container"),t=>{var i;t.on("insert:"+e.model,(i=e.view,(e,t,n)=>{const o=i(t.item,n);if(!o)return;if(!n.consumable.consume(t.item,"insert"))return;const r=n.mapper.toViewPosition(t.range.start);n.mapper.bindElements(t.item,o),n.writer.insert(r,o)}),{priority:e.converterPriority||"normal"})}}(e))}attributeToElement(e){return this.add(function(e){e=oa(e);let t="attribute:"+(e.model.key?e.model.key:e.model);e.model.name&&(t+=":"+e.model.name);if(e.model.values)for(const t of e.model.values)e.view[t]=ca(e.view[t],"attribute");else e.view=ca(e.view,"attribute");const i=la(e);return n=>{n.on(t,function(e){return(t,i,n)=>{const o=e(i.attributeOldValue,n),r=e(i.attributeNewValue,n);if(!o&&!r)return;if(!n.consumable.consume(i.item,t.name))return;const s=n.writer,a=s.document.selection;if(i.item instanceof qs||i.item instanceof ea)s.wrap(a.getFirstRange(),r);else{let e=n.mapper.toViewRange(i.range);null!==i.attributeOldValue&&o&&(e=s.unwrap(e,o)),null!==i.attributeNewValue&&r&&s.wrap(e,r)}}}(i),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=oa(e);let t="attribute:"+(e.model.key?e.model.key:e.model);e.model.name&&(t+=":"+e.model.name);if(e.model.values)for(const t of e.model.values)e.view[t]=da(e.view[t]);else e.view=da(e.view);const i=la(e);return n=>{var o;n.on(t,(o=i,(e,t,i)=>{const n=o(t.attributeOldValue,i),r=o(t.attributeNewValue,i);if(!n&&!r)return;if(!i.consumable.consume(t.item,e.name))return;const s=i.mapper.toViewElement(t.item),a=i.writer;if(!s)throw new ki.b("conversion-attribute-to-attribute-on-text: Trying to convert text node's attribute with attribute-to-attribute converter.",[t,i]);if(null!==t.attributeOldValue&&n)if("class"==n.key){const e=Array.isArray(n.value)?n.value:[n.value];for(const t of e)a.removeClass(t,s)}else if("style"==n.key){const e=Object.keys(n.value);for(const t of e)a.removeStyle(t,s)}else a.removeAttribute(n.key,s);if(null!==t.attributeNewValue&&r)if("class"==r.key){const e=Array.isArray(r.value)?r.value:[r.value];for(const t of e)a.addClass(t,s)}else if("style"==r.key){const e=Object.keys(r.value);for(const t of e)a.setStyle(t,r.value[t],s)}else a.setAttribute(r.key,r.value,s)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){return(e=oa(e)).view=ca(e.view,"ui"),t=>{var i;t.on("addMarker:"+e.model,(i=e.view,(e,t,n)=>{t.isOpening=!0;const o=i(t,n);t.isOpening=!1;const r=i(t,n);if(!o||!r)return;const s=t.markerRange;if(s.isCollapsed&&!n.consumable.consume(s,e.name))return;for(const t of s)if(!n.consumable.consume(t.item,e.name))return;const a=n.mapper,c=n.writer;c.insert(a.toViewPosition(s.start),o),n.mapper.bindElementToMarker(o,t.markerName),s.isCollapsed||(c.insert(a.toViewPosition(s.end),r),n.mapper.bindElementToMarker(r,t.markerName)),e.stop()}),{priority:e.converterPriority||"normal"}),t.on("removeMarker:"+e.model,(e.view,(e,t,i)=>{const n=i.mapper.markerNameToElements(t.markerName);if(n){for(const e of n)i.mapper.unbindElementFromMarkerName(e,t.markerName),i.writer.clear(i.writer.createRangeOn(e),e);i.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var i;t.on("addMarker:"+e.model,(i=e.view,(e,t,n)=>{if(!t.item)return;if(!(t.item instanceof qs||t.item instanceof ea||t.item.is("$textProxy")))return;const o=ua(i,t,n);if(!o)return;if(!n.consumable.consume(t.item,e.name))return;const r=n.writer,s=sa(r,o),a=r.document.selection;if(t.item instanceof qs||t.item instanceof ea)r.wrap(a.getFirstRange(),s,a);else{const e=n.mapper.toViewRange(t.range),i=r.wrap(e,s);for(const e of i.getItems())if(e.is("attributeElement")&&e.isSimilar(s)){n.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on("addMarker:"+e.model,function(e){return(t,i,n)=>{if(!i.item)return;if(!(i.item instanceof Ns))return;const o=ua(e,i,n);if(!o)return;if(!n.consumable.test(i.item,t.name))return;const r=n.mapper.toViewElement(i.item);if(r&&r.getCustomProperty("addHighlight")){n.consumable.consume(i.item,t.name);for(const e of js._createIn(i.item))n.consumable.consume(e.item,t.name);r.getCustomProperty("addHighlight")(r,o,n.writer),n.mapper.bindElementToMarker(r,i.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on("removeMarker:"+e.model,function(e){return(t,i,n)=>{if(i.markerRange.isCollapsed)return;const o=ua(e,i,n);if(!o)return;const r=sa(n.writer,o),s=n.mapper.markerNameToElements(i.markerName);if(s){for(const e of s)n.mapper.unbindElementFromMarkerName(e,i.markerName),e.is("attributeElement")?n.writer.unwrap(n.writer.createRangeOn(e),r):e.getCustomProperty("removeHighlight")(e,o.id,n.writer);n.writer.clearClonedElementsGroup(i.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){const t=(e=oa(e)).model;e.view||(e.view=i=>({group:t,name:i.substr(e.model.length+1)}));return i=>{var n;i.on("addMarker:"+t,(n=e.view,(e,t,i)=>{const o=n(t.markerName,i);if(!o)return;const r=t.markerRange;i.consumable.consume(r,e.name)&&(aa(r,!1,i,t,o),aa(r,!0,i,t,o),e.stop())}),{priority:e.converterPriority||"normal"}),i.on("removeMarker:"+t,function(e){return(t,i,n)=>{const o=e(i.markerName,n);if(!o)return;const r=n.mapper.markerNameToElements(i.markerName);if(r){for(const e of r)n.mapper.unbindElementFromMarkerName(e,i.markerName),e.is("containerElement")?(s(`data-${o.group}-start-before`,e),s(`data-${o.group}-start-after`,e),s(`data-${o.group}-end-before`,e),s(`data-${o.group}-end-after`,e)):n.writer.clear(n.writer.createRangeOn(e),e);n.writer.clearClonedElementsGroup(i.markerName),t.stop()}function s(e,t){if(t.hasAttribute(e)){const i=new Set(t.getAttribute(e).split(","));i.delete(o.name),0==i.size?n.writer.removeAttribute(e,t):n.writer.setAttribute(e,Array.from(i).join(","),t)}}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}}function sa(e,t){const i=e.createAttributeElement("span",t.attributes);return t.classes&&i._addClass(t.classes),t.priority&&(i._priority=t.priority),i._id=t.id,i}function aa(e,t,i,n,o){const r=t?e.start:e.end;if(i.schema.checkChild(r,"$text")){!function(e,t,i,n,o){const r=`${o.group}-${t?"start":"end"}`,s=o.name?{name:o.name}:null,a=i.writer.createUIElement(r,s);i.writer.insert(e,a),i.mapper.bindElementToMarker(a,n.markerName)}(i.mapper.toViewPosition(r),t,i,n,o)}else{let e,s;t&&r.nodeAfter||!t&&!r.nodeBefore?(e=r.nodeAfter,s=!0):(e=r.nodeBefore,s=!1);!function(e,t,i,n,o,r){const s=`data-${r.group}-${t?"start":"end"}-${i?"before":"after"}`,a=e.hasAttribute(s)?e.getAttribute(s).split(","):[];a.unshift(r.name),n.writer.setAttribute(s,a.join(","),e),n.mapper.bindElementToMarker(e,o.markerName)}(i.mapper.toViewElement(e),t,s,i,n,o)}}function ca(e,t){return"function"==typeof e?e:(i,n)=>function(e,t,i){"string"==typeof e&&(e={name:e});let n;const o=t.writer,r=Object.assign({},e.attributes);if("container"==i)n=o.createContainerElement(e.name,r);else if("attribute"==i){const t={priority:e.priority||fo.DEFAULT_PRIORITY};n=o.createAttributeElement(e.name,r,t)}else n=o.createUIElement(e.name,r);if(e.styles){const t=Object.keys(e.styles);for(const i of t)o.setStyle(i,e.styles[i],n)}if(e.classes){const t=e.classes;if("string"==typeof t)o.addClass(t,n);else for(const e of t)o.addClass(e,n)}return n}(e,n,t)}function la(e){return e.model.values?(t,i)=>{const n=e.view[t];return n?n(t,i):null}:e.view}function da(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function ua(e,t,i){const n="function"==typeof e?e(t,i):e;return n?(n.priority||(n.priority=10),n.id||(n.id=t.markerName),n):null}function ha(e){const{schema:t,document:i}=e.model;for(const n of i.getRootNames()){const o=i.getRoot(n);if(o.isEmpty&&!t.checkChild(o,"$text")&&t.checkChild(o,"paragraph"))return e.insertElement("paragraph",o),!0}return!1}function ma(e,t,i){const n=i.createContext(e);return!!i.checkChild(n,"paragraph")&&!!i.checkChild(n.push("paragraph"),t)}function fa(e,t){const i=t.createElement("paragraph");return t.insert(i,e),t.createPositionAt(i,0)}class ga extends na{elementToElement(e){return this.add(pa(e))}elementToAttribute(e){return this.add(function(e){ka(e=oa(e));const t=_a(e,!1),i=ba(e.view),n=i?"element:"+i:"element";return i=>{i.on(n,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=oa(e);let t=null;("string"==typeof e.view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let i;if("class"==t||"style"==t){i={["class"==t?"classes":"styles"]:e.view.value}}else{i={attributes:{[t]:void 0===e.view.value?/[\s\S]*/:e.view.value}}}e.view.name&&(i.name=e.view.name);return e.view=i,t}(e));ka(e,t);const i=_a(e,!0);return t=>{t.on("element",i,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return console.warn(Object(ki.a)("upcast-helpers-element-to-marker-deprecated: The UpcastHelpers#elementToMarker() method was deprecated and will be removed in the near future. Please use UpcastHelpers#dataToMarker() instead.")),this.add(function(e){return function(e){const t=e.model;e.model=(e,i)=>{const n="string"==typeof t?t:t(e,i);return i.writer.createElement("$marker",{"data-name":n})}}(e=oa(e)),pa(e)}(e))}dataToMarker(e){return this.add(function(e){(e=oa(e)).model||(e.model=t=>t?e.view+":"+t:e.view);const t=wa(va(e,"start")),i=wa(va(e,"end"));return n=>{n.on("element:"+e.view+"-start",t,{priority:e.converterPriority||"normal"}),n.on("element:"+e.view+"-end",i,{priority:e.converterPriority||"normal"});const o=wi.get("low"),r=wi.get("highest"),s=wi.get(e.converterPriority)/r;n.on("element",function(e){return(t,i,n)=>{const o="data-"+e.view;function r(t,o){for(const r of o){const o=e.model(r,n),s=n.writer.createElement("$marker",{"data-name":o});n.writer.insert(s,t),i.modelCursor.isEqual(t)?i.modelCursor=i.modelCursor.getShiftedBy(1):i.modelCursor=i.modelCursor._getTransformedByInsertion(t,1),i.modelRange=i.modelRange._getTransformedByInsertion(t,1)[0]}}i.modelRange||(i=Object.assign(i,n.convertChildren(i.viewItem,i.modelCursor))),n.consumable.consume(i.viewItem,{attributes:o+"-end-after"})&&r(i.modelRange.end,i.viewItem.getAttribute(o+"-end-after").split(",")),n.consumable.consume(i.viewItem,{attributes:o+"-start-after"})&&r(i.modelRange.end,i.viewItem.getAttribute(o+"-start-after").split(",")),n.consumable.consume(i.viewItem,{attributes:o+"-end-before"})&&r(i.modelRange.start,i.viewItem.getAttribute(o+"-end-before").split(",")),n.consumable.consume(i.viewItem,{attributes:o+"-start-before"})&&r(i.modelRange.start,i.viewItem.getAttribute(o+"-start-before").split(","))}}(e),{priority:o+s})}}(e))}}function pa(e){const t=wa(e=oa(e)),i=ba(e.view),n=i?"element:"+i:"element";return i=>{i.on(n,t,{priority:e.converterPriority||"normal"})}}function ba(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function wa(e){const t=new Wi(e.view);return(i,n,o)=>{const r=t.match(n.viewItem);if(!r)return;const s=r.match;if(s.name=!0,!o.consumable.test(n.viewItem,s))return;const a=function(e,t,i){return e instanceof Function?e(t,i):i.writer.createElement(e)}(e.model,n.viewItem,o);a&&o.safeInsert(a,n.modelCursor)&&(o.consumable.consume(n.viewItem,s),o.convertChildren(n.viewItem,a),o.updateConversionResult(a,n))}}function ka(e,t=null){const i=null===t||(e=>e.getAttribute(t)),n="object"!=typeof e.model?e.model:e.model.key,o="object"!=typeof e.model||void 0===e.model.value?i:e.model.value;e.model={key:n,value:o}}function _a(e,t){const i=new Wi(e.view);return(n,o,r)=>{const s=i.match(o.viewItem);if(!s)return;const a=e.model.key,c="function"==typeof e.model.value?e.model.value(o.viewItem,r):e.model.value;if(null===c)return;if(!function(e,t){const i="function"==typeof e?e(t):e;if("object"==typeof i&&!ba(i))return!1;return!i.classes&&!i.attributes&&!i.styles}(e.view,o.viewItem)?delete s.match.name:s.match.name=!0,!r.consumable.test(o.viewItem,s.match))return;o.modelRange||(o=Object.assign(o,r.convertChildren(o.viewItem,o.modelCursor)));(function(e,t,i,n){let o=!1;for(const r of Array.from(e.getItems({shallow:i})))n.schema.checkAttribute(r,t.key)&&(n.writer.setAttribute(t.key,t.value,r),o=!0);return o})(o.modelRange,{key:a,value:c},t,r)&&r.consumable.consume(o.viewItem,s.match)}}function va(e,t){const i={};return i.view=e.view+"-"+t,i.model=(t,i)=>{const n=t.getAttribute("name"),o=e.model(n,i);return i.writer.createElement("$marker",{"data-name":o})},i}class ya{constructor(e,t){this.model=e,this.view=new Ps(t),this.mapper=new Bs,this.downcastDispatcher=new Us({mapper:this.mapper,schema:e.schema});const i=this.model.document,n=i.selection,o=this.model.markers;this.listenTo(this.model,"_beforeChanges",()=>{this.view._disableRendering(!0)},{priority:"highest"}),this.listenTo(this.model,"_afterChanges",()=>{this.view._disableRendering(!1)},{priority:"lowest"}),this.listenTo(i,"change",()=>{this.view.change(e=>{this.downcastDispatcher.convertChanges(i.differ,o,e),this.downcastDispatcher.convertSelection(n,o,e)})},{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(i,n)=>{const o=n.newSelection,r=[];for(const e of o.getRanges())r.push(t.toModelRange(e));const s=e.createSelection(r,{backward:o.isBackward});s.isEqual(e.document.selection)||e.change(e=>{e.setSelection(s)})}}(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",(e,t,i)=>{if(!i.consumable.consume(t.item,"insert"))return;const n=i.writer,o=i.mapper.toViewPosition(t.range.start),r=n.createText(t.item.data);n.insert(o,r)},{priority:"lowest"}),this.downcastDispatcher.on("remove",(e,t,i)=>{const n=i.mapper.toViewPosition(t.position),o=t.position.getShiftedBy(t.length),r=i.mapper.toViewPosition(o,{isPhantom:!0}),s=i.writer.createRange(n,r),a=i.writer.remove(s.getTrimmed());for(const e of i.writer.createRangeIn(a).getItems())i.mapper.unbindViewElement(e)},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,i)=>{const n=i.writer,o=n.document.selection;for(const e of o.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&i.writer.mergeAttributes(e.start);n.setSelection(null)},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,i)=>{const n=t.selection;if(n.isCollapsed)return;if(!i.consumable.consume(n,"selection"))return;const o=[];for(const e of n.getRanges()){const t=i.mapper.toViewRange(e);o.push(t)}i.writer.setSelection(o,{backward:n.isBackward})},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,i)=>{const n=t.selection;if(!n.isCollapsed)return;if(!i.consumable.consume(n,"selection"))return;const o=i.writer,r=n.getFirstPosition(),s=i.mapper.toViewPosition(r),a=o.breakAttributes(s);o.setSelection(a)},{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using(e=>{if("$graveyard"==e.rootName)return null;const t=new oo(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t})}destroy(){this.view.destroy(),this.stopListening()}}Mi(ya,Jn);class xa{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const i=this.get(e);if(!i)throw new ki.b("commandcollection-command-not-found: Command does not exist.",this,{commandName:e});return i.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class Aa{constructor(){this._consumables=new Map}add(e,t){let i;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?i=this._consumables.get(e):(i=new Ca(e),this._consumables.set(e,i)),i.add(t))}test(e,t){const i=this._consumables.get(e);return void 0===i?null:e.is("$text")||e.is("documentFragment")?i:i.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const i=this._consumables.get(e);void 0!==i&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):i.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},i=e.getAttributeKeys();for(const e of i)"style"!=e&&"class"!=e&&t.attributes.push(e);const n=e.getClassNames();for(const e of n)t.classes.push(e);const o=e.getStyleNames();for(const e of o)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new Aa(e)),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,Aa.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const i of e.getChildren())t=Aa.createFrom(i,t);return t}}class Ca{constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t in this._consumables)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t in this._consumables)if(t in e){const i=this._test(t,e[t]);if(!0!==i)return i}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t in this._consumables)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t in this._consumables)t in e&&this._revert(t,e[t])}_add(e,t){const i=ze(t)?t:[t],n=this._consumables[e];for(const t of i){if("attributes"===e&&("class"===t||"style"===t))throw new ki.b("viewconsumable-invalid-attribute: Classes and styles should be handled separately.",this);if(n.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))n.set(e,!0)}}_test(e,t){const i=ze(t)?t:[t],n=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){const e=n.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",i=this._test(e,[...this._consumables[e].keys()]);if(!0!==i)return i}return!0}_consume(e,t){const i=ze(t)?t:[t],n=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){if(n.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))n.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const i=ze(t)?t:[t],n=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){!1===n.get(t)&&n.set(t,!0)}else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class Ta{constructor(){this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",(e,t)=>{t[0]=new Pa(t[0])},{priority:"highest"}),this.on("checkChild",(e,t)=>{t[0]=new Pa(t[0]),t[1]=this.getDefinition(t[1])},{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new ki.b("schema-cannot-register-item-twice: A single item cannot be registered twice in the schema.",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new ki.b("schema-cannot-extend-missing-item: Cannot extend an item which was not registered yet.",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:e.is&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!t&&!(!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!!t&&!(!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!!t&&!(!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const i=this.getDefinition(e.last);return!!i&&i.allowAttributes.includes(t)}checkMerge(e,t=null){if(e instanceof zs){const t=e.nodeBefore,i=e.nodeAfter;if(!(t instanceof Ns))throw new ki.b("schema-check-merge-no-element-before: The node before the merge position must be an element.",this);if(!(i instanceof Ns))throw new ki.b("schema-check-merge-no-element-after: The node after the merge position must be an element.",this);return this.checkMerge(t,i)}for(const i of t.getChildren())if(!this.checkChild(e,i))return!1;return!0}addChildCheck(e){this.on("checkChild",(t,[i,n])=>{if(!n)return;const o=e(i,n);"boolean"==typeof o&&(t.stop(),t.return=o)},{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",(t,[i,n])=>{const o=e(i,n);"boolean"==typeof o&&(t.stop(),t.return=o)},{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;if(e instanceof zs)t=e.parent;else{t=(e instanceof js?[e]:Array.from(e.getRanges())).reduce((e,t)=>{const i=t.getCommonAncestor();return e?e.getCommonAncestor(i,{includeSelf:!0}):i},null)}for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const i=[...e.getFirstPosition().getAncestors(),new Es("",e.getAttributes())];return this.checkAttribute(i,t)}{const i=e.getRanges();for(const e of i)for(const i of e)if(this.checkAttribute(i.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const i of e)yield*this._getValidRangesForRange(i,t)}getNearestSelectionRange(e,t="both"){if(this.checkChild(e,"$text"))return new js(e);let i,n;const o=e.getAncestors().reverse().find(e=>this.isLimit(e))||e.root;"both"!=t&&"backward"!=t||(i=new Rs({boundaries:js._createIn(o),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(n=new Rs({boundaries:js._createIn(o),startPosition:e}));for(const e of function*(e,t){let i=!1;for(;!i;){if(i=!0,e){const t=e.next();t.done||(i=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(i=!1,yield{walker:t,value:e.value})}}}(i,n)){const t=e.walker==i?"elementEnd":"elementStart",n=e.value;if(n.type==t&&this.isObject(n.item))return js._createOn(n.item);if(this.checkChild(n.nextPosition,"$text"))return new js(n.nextPosition)}return null}findAllowedParent(e,t){let i=e.parent;for(;i;){if(this.checkChild(i,t))return i;if(this.isLimit(i))return null;i=i.parent}return null}removeDisallowedAttributes(e,t){for(const i of e)if(i.is("$text"))Va(this,i,t);else{const e=js._createIn(i).getPositions();for(const i of e){Va(this,i.nodeBefore||i.parent,t)}}}createContext(e){return new Pa(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,i=Object.keys(t);for(const n of i)e[n]=Sa(t[n],n);for(const t of i)Ea(e,t);for(const t of i)Ma(e,t);for(const t of i)Ia(e,t),Na(e,t);for(const t of i)Ra(e,t),Oa(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,i=t.length-1){const n=t.getItem(i);if(e.allowIn.includes(n.name)){if(0==i)return!0;{const e=this.getDefinition(n);return this._checkContextMatch(e,t,i-1)}}return!1}*_getValidRangesForRange(e,t){let i=e.start,n=e.start;for(const o of e.getItems({shallow:!0}))o.is("element")&&(yield*this._getValidRangesForRange(js._createIn(o),t)),this.checkAttribute(o,t)||(i.isEqual(n)||(yield new js(i,n)),i=zs._createAfter(o)),n=zs._createAfter(o);i.isEqual(n)||(yield new js(i,n))}}Mi(Ta,Jn);class Pa{constructor(e){if(e instanceof Pa)return e;"string"==typeof e?e=[e]:Array.isArray(e)||(e=e.getAncestors({includeSelf:!0})),e[0]&&"string"!=typeof e[0]&&e[0].is("documentFragment")&&e.shift(),this._items=e.map(La)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new Pa([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map(e=>e.name)}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function Sa(e,t){const i={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],inheritTypesFrom:[]};return function(e,t){for(const i of e){const e=Object.keys(i).filter(e=>e.startsWith("is"));for(const n of e)t[n]=i[n]}}(e,i),za(e,i,"allowIn"),za(e,i,"allowContentOf"),za(e,i,"allowWhere"),za(e,i,"allowAttributes"),za(e,i,"allowAttributesOf"),za(e,i,"inheritTypesFrom"),function(e,t){for(const i of e){const e=i.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,i),i}function Ea(e,t){for(const i of e[t].allowContentOf)if(e[i]){Da(e,i).forEach(e=>{e.allowIn.push(t)})}delete e[t].allowContentOf}function Ma(e,t){for(const i of e[t].allowWhere){const n=e[i];if(n){const i=n.allowIn;e[t].allowIn.push(...i)}}delete e[t].allowWhere}function Ia(e,t){for(const i of e[t].allowAttributesOf){const n=e[i];if(n){const i=n.allowAttributes;e[t].allowAttributes.push(...i)}}delete e[t].allowAttributesOf}function Na(e,t){const i=e[t];for(const t of i.inheritTypesFrom){const n=e[t];if(n){const e=Object.keys(n).filter(e=>e.startsWith("is"));for(const t of e)t in i||(i[t]=n[t])}}delete i.inheritTypesFrom}function Ra(e,t){const i=e[t],n=i.allowIn.filter(t=>e[t]);i.allowIn=Array.from(new Set(n))}function Oa(e,t){const i=e[t];i.allowAttributes=Array.from(new Set(i.allowAttributes))}function za(e,t,i){for(const n of e)"string"==typeof n[i]?t[i].push(n[i]):Array.isArray(n[i])&&t[i].push(...n[i])}function Da(e,t){const i=e[t];return(n=e,Object.keys(n).map(e=>n[e])).filter(e=>e.allowIn.includes(i.name));var n}function La(e){return"string"==typeof e?{name:e,*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function Va(e,t,i){for(const n of t.getAttributeKeys())e.checkAttribute(t,n)||i.removeAttribute(n,t)}class ja{constructor(e={}){this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this.conversionApi=Object.assign({},e),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this),this.conversionApi.safeInsert=this._safeInsert.bind(this),this.conversionApi.updateConversionResult=this._updateConversionResult.bind(this),this.conversionApi.splitToAllowedParent=this._splitToAllowedParent.bind(this),this.conversionApi.getSplitParts=this._getSplitParts.bind(this)}convert(e,t,i=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let i;for(const n of new Pa(e)){const e={};for(const t of n.getAttributeKeys())e[t]=n.getAttribute(t);const o=t.createElement(n.name,e);i&&t.append(o,i),i=zs._createAt(o,0)}return i}(i,t),this.conversionApi.writer=t,this.conversionApi.consumable=Aa.createFrom(e),this.conversionApi.store={};const{modelRange:n}=this._convertItem(e,this._modelCursor),o=t.createDocumentFragment();if(n){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,o);o.markers=function(e,t){const i=new Set,n=new Map,o=js._createIn(e).getItems();for(const e of o)"$marker"==e.name&&i.add(e);for(const e of i){const i=e.getAttribute("data-name"),o=t.createPositionBefore(e);n.has(i)?n.get(i).end=o.clone():n.set(i,new js(o.clone())),t.remove(e)}return n}(o,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,o}_convertItem(e,t){const i=Object.assign({viewItem:e,modelCursor:t,modelRange:null});if(e.is("element")?this.fire("element:"+e.name,i,this.conversionApi):e.is("$text")?this.fire("text",i,this.conversionApi):this.fire("documentFragment",i,this.conversionApi),i.modelRange&&!(i.modelRange instanceof js))throw new ki.b("view-conversion-dispatcher-incorrect-result: Incorrect conversion result was dropped.",this);return{modelRange:i.modelRange,modelCursor:i.modelCursor}}_convertChildren(e,t){let i=t.is("position")?t:zs._createAt(t,0);const n=new js(i);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,i);e.modelRange instanceof js&&(n.end=e.modelRange.end,i=e.modelCursor)}return{modelRange:n,modelCursor:i}}_safeInsert(e,t){const i=this._splitToAllowedParent(e,t);return!!i&&(this.conversionApi.writer.insert(e,i.position),!0)}_updateConversionResult(e,t){const i=this._getSplitParts(e),n=this.conversionApi.writer;t.modelRange||(t.modelRange=n.createRange(n.createPositionBefore(e),n.createPositionAfter(i[i.length-1])));const o=this._cursorParents.get(e);t.modelCursor=o?n.createPositionAt(o,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:i,writer:n}=this.conversionApi;let o=i.findAllowedParent(t,e);if(o){if(o===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(o)&&(o=null)}if(!o)return ma(t,e,i)?{position:fa(t,n)}:null;const r=this.conversionApi.writer.split(t,o),s=[];for(const e of r.range.getWalker())if("elementEnd"==e.type)s.push(e.item);else{const t=s.pop(),i=e.item;this._registerSplitPair(t,i)}const a=r.range.end.parent;return this._cursorParents.set(e,a),{position:r.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const i=this._splitParts.get(e);this._splitParts.set(t,i),i.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}Mi(ja,yi);class Ba{constructor(e,t){this.model=e,this.stylesProcessor=t,this.processor,this.mapper=new Bs,this.downcastDispatcher=new Us({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",(e,t,i)=>{if(!i.consumable.consume(t.item,"insert"))return;const n=i.writer,o=i.mapper.toViewPosition(t.range.start),r=n.createText(t.item.data);n.insert(o,r)},{priority:"lowest"}),this.upcastDispatcher=new ja({schema:e.schema}),this.viewDocument=new mo(t),this._viewWriter=new Lo(this.viewDocument),this.upcastDispatcher.on("text",(e,t,{schema:i,consumable:n,writer:o})=>{let r=t.modelCursor;if(!n.test(t.viewItem))return;if(!i.checkChild(r,"$text")){if(!ma(r,"$text",i))return;r=fa(r,o)}n.consume(t.viewItem);const s=o.createText(t.viewItem.data);o.insert(s,r),t.modelRange=o.createRange(r,r.getShiftedBy(s.offsetSize)),t.modelCursor=t.modelRange.end},{priority:"lowest"}),this.upcastDispatcher.on("element",(e,t,i)=>{if(!t.modelRange&&i.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:n}=i.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=n}},{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",(e,t,i)=>{if(!t.modelRange&&i.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:n}=i.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=n}},{priority:"lowest"}),this.decorate("init"),this.decorate("set"),this.on("init",()=>{this.fire("ready")},{priority:"lowest"}),this.on("ready",()=>{this.model.enqueueChange("transparent",ha)},{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:i="empty"}=e;if(!this._checkIfRootsExists([t]))throw new ki.b("datacontroller-get-non-existent-root: Attempting to get data from a non-existing root.",this);const n=this.model.document.getRoot(t);return"empty"!==i||this.model.hasContent(n,{ignoreWhitespaces:!0})?this.stringify(n,e):""}stringify(e,t){const i=this.toView(e,t);return this.processor.toData(i)}toView(e,t){const i=this.viewDocument,n=this._viewWriter;this.mapper.clearBindings();const o=js._createIn(e),r=new Do(i);if(this.mapper.bindElements(e,r),this.downcastDispatcher.conversionApi.options=t,this.downcastDispatcher.convertInsert(o,n),!e.is("documentFragment")){const t=function(e){const t=[],i=e.root.document;if(!i)return[];const n=js._createIn(e);for(const e of i.model.markers){const i=n.getIntersection(e.getRange());i&&t.push([e.name,i])}return t}(e);for(const[e,i]of t)this.downcastDispatcher.convertMarkerAdd(e,i,n)}return delete this.downcastDispatcher.conversionApi.options,r}init(e){if(this.model.document.version)throw new ki.b("datacontroller-init-document-not-empty: Trying to set initial data to not empty document.",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new ki.b("datacontroller-init-non-existent-root: Attempting to init data on a non-existing root.",this);return this.model.enqueueChange("transparent",e=>{for(const i of Object.keys(t)){const n=this.model.document.getRoot(i);e.insert(this.parse(t[i],n),n,0)}}),Promise.resolve()}set(e){let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new ki.b("datacontroller-set-non-existent-root: Attempting to set data on a non-existing root.",this);this.model.enqueueChange("transparent",e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const i of Object.keys(t)){const n=this.model.document.getRoot(i);e.remove(e.createRangeIn(n)),e.insert(this.parse(t[i],n),n,0)}})}parse(e,t="$root"){const i=this.processor.toView(e);return this.toModel(i,t)}toModel(e,t="$root"){return this.model.change(i=>this.upcastDispatcher.convert(e,i,t))}addStyleProcessorRules(e){e(this.stylesProcessor)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRootNames().includes(t))return!1;return!0}}Mi(Ba,Jn);class Fa{constructor(e,t){this._helpers=new Map,this._downcast=Array.isArray(e)?e:[e],this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=Array.isArray(t)?t:[t],this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const i=this._downcast.includes(t);if(!this._upcast.includes(t)&&!i)throw new ki.b("conversion-add-alias-dispatcher-not-registered: Trying to register and alias for a dispatcher that nas not been registered.",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:i})}for(e){if(!this._helpers.has(e))throw new ki.b("conversion-for-unknown-group: Trying to add a converter to an unknown dispatchers group.",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:i}of Ha(e))this.for("upcast").elementToElement({model:t,view:i,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:i}of Ha(e))this.for("upcast").elementToAttribute({view:i,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:i}of Ha(e))this.for("upcast").attributeToAttribute({view:i,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:i}){if(this._helpers.has(e))throw new ki.b("conversion-group-exists: Trying to register a group name that has already been registered.",this);const n=i?new ra(t):new ga(t);this._helpers.set(e,n)}}function*Ha(e){if(e.model.values)for(const t of e.model.values){const i={key:e.model.key,value:t},n=e.view[t],o=e.upcastAlso?e.upcastAlso[t]:void 0;yield*Ua(i,n,o)}else yield*Ua(e.model,e.view,e.upcastAlso)}function*Ua(e,t,i){if(yield{model:e,view:t},i){i=Array.isArray(i)?i:[i];for(const t of i)yield{model:e,view:t}}}class Wa{constructor(e="default"){this.operations=[],this.type=e}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}class qa{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e){return new this(e.baseVersion)}}class $a{constructor(e){this.markers=new Map,this._children=new Is,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(e){return"documentFragment"===e||"model:documentFragment"===e}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const i of e)t=t.getChild(t.offsetToIndex(i));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const i of e)i.name?t.push(Ns.fromJSON(i)):t.push(Es.fromJSON(i));return new $a(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const i=function(e){if("string"==typeof e)return[new Es(e)];Ei(e)||(e=[e]);return Array.from(e).map(e=>"string"==typeof e?new Es(e):e instanceof Ms?new Es(e.data,e.getAttributes()):e)}(t);for(const e of i)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,i)}_removeChildren(e,t=1){const i=this._children._removeNodes(e,t);for(const e of i)e.parent=null;return i}}function Ya(e,t){const i=(t=Ja(t)).reduce((e,t)=>e+t.offsetSize,0),n=e.parent;Za(e);const o=e.index;return n._insertChild(o,t),Qa(n,o+t.length),Qa(n,o),new js(e,e.getShiftedBy(i))}function Ga(e){if(!e.isFlat)throw new ki.b("operation-utils-remove-range-not-flat: Trying to remove a range which starts and ends in different element.",this);const t=e.start.parent;Za(e.start),Za(e.end);const i=t._removeChildren(e.start.index,e.end.index-e.start.index);return Qa(t,e.start.index),i}function Ka(e,t){if(!e.isFlat)throw new ki.b("operation-utils-move-range-not-flat: Trying to move a range which starts and ends in different element.",this);const i=Ga(e);return Ya(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),i)}function Ja(e){const t=[];e instanceof Array||(e=[e]);for(let i=0;ie.maxOffset)throw new ki.b("move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.",this);if(e===t&&i=i&&this.targetPosition.path[e]e._clone(!0))),t=new oc(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new zs(e,[0]);return new nc(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffsete._clone(!0))),Ya(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const i=[];for(const t of e.nodes)t.name?i.push(Ns.fromJSON(t)):i.push(Es.fromJSON(t));const n=new oc(zs.fromJSON(e.position,t),i,e.baseVersion);return n.shouldReceiveAttributes=e.shouldReceiveAttributes,n}}class rc extends qa{constructor(e,t,i,n,o,r){super(r),this.name=e,this.oldRange=t?t.clone():null,this.newRange=i?i.clone():null,this.affectsData=o,this._markers=n}get type(){return"marker"}clone(){return new rc(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new rc(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){const e=this.newRange?"_set":"_remove";this._markers[e](this.name,this.newRange,!0,this.affectsData)}toJSON(){const e=super.toJSON();return this.oldRange&&(e.oldRange=this.oldRange.toJSON()),this.newRange&&(e.newRange=this.newRange.toJSON()),delete e._markers,e}static get className(){return"MarkerOperation"}static fromJSON(e,t){return new rc(e.name,e.oldRange?js.fromJSON(e.oldRange,t):null,e.newRange?js.fromJSON(e.newRange,t):null,t.model.markers,e.affectsData,e.baseVersion)}}class sc extends qa{constructor(e,t,i,n){super(n),this.position=e,this.position.stickiness="toNext",this.oldName=t,this.newName=i}get type(){return"rename"}clone(){return new sc(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new sc(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof Ns))throw new ki.b("rename-operation-wrong-position: Given position is invalid or node after it is not an instance of Element.",this);if(e.name!==this.oldName)throw new ki.b("rename-operation-wrong-name: Element to change has different name than operation's old name.",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e}static get className(){return"RenameOperation"}static fromJSON(e,t){return new sc(zs.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}class ac extends qa{constructor(e,t,i,n,o){super(o),this.root=e,this.key=t,this.oldValue=i,this.newValue=n}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new ac(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new ac(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new ki.b("rootattribute-operation-not-a-root: The element to change is not a root element.",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new ki.b("rootattribute-operation-wrong-old-value: Changed node has different attribute value than operation's old attribute value.",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new ki.b("rootattribute-operation-attribute-exists: The attribute with given key already exists.",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const e=super.toJSON();return e.root=this.root.toJSON(),e}static get className(){return"RootAttributeOperation"}static fromJSON(e,t){if(!t.getRoot(e.root))throw new ki.b("rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.",this,{rootName:e.root});return new ac(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}class cc extends qa{constructor(e,t,i,n,o){super(o),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=t,this.targetPosition=i.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=n.clone()}get type(){return"merge"}get deletionPosition(){return new zs(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new js(this.sourcePosition,e)}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),t=this.sourcePosition.path.slice(0,-1),i=new zs(this.sourcePosition.root,t)._getTransformedByMergeOperation(this),n=new lc(e,this.howMany,this.graveyardPosition,this.baseVersion+1);return n.insertionPosition=i,n}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent;if(!e.parent)throw new ki.b("merge-operation-source-position-invalid: Merge source position is invalid.",this);if(!t.parent)throw new ki.b("merge-operation-target-position-invalid: Merge target position is invalid.",this);if(this.howMany!=e.maxOffset)throw new ki.b("merge-operation-how-many-invalid: Merge operation specifies wrong number of nodes to move.",this)}_execute(){const e=this.sourcePosition.parent;Ka(js._createIn(e),this.targetPosition),Ka(js._createOn(e),this.graveyardPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=e.sourcePosition.toJSON(),e.targetPosition=e.targetPosition.toJSON(),e.graveyardPosition=e.graveyardPosition.toJSON(),e}static get className(){return"MergeOperation"}static fromJSON(e,t){const i=zs.fromJSON(e.sourcePosition,t),n=zs.fromJSON(e.targetPosition,t),o=zs.fromJSON(e.graveyardPosition,t);return new this(i,e.howMany,n,o,e.baseVersion)}}class lc extends qa{constructor(e,t,i,n){super(n),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=lc.getInsertionPosition(e),this.insertionPosition.stickiness="toNone",this.graveyardPosition=i?i.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new zs(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new js(this.splitPosition,e)}clone(){const e=new this.constructor(this.splitPosition,this.howMany,this.graveyardPosition,this.baseVersion);return e.insertionPosition=this.insertionPosition,e}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new zs(e,[0]);return new cc(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof js)for(const i of e.getItems())t(i);else t(e)}move(e,t,i){if(this._assertWriterUsedCorrectly(),!(e instanceof js))throw new ki.b("writer-move-invalid-range: Invalid range to move.",this);if(!e.isFlat)throw new ki.b("writer-move-range-not-flat: Range to move is not flat.",this);const n=zs._createAt(t,i);if(n.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!pc(e.root,n.root))throw new ki.b("writer-move-different-document: Range is going to be moved between different documents.",this);const o=e.root.document?e.root.document.version:null,r=new nc(e.start,e.end.offset-e.start.offset,n,o);this.batch.addOperation(r),this.model.applyOperation(r)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof js?e:js._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),gc(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,i=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof Ns))throw new ki.b("writer-merge-no-element-before: Node before merge position must be an element.",this);if(!(i instanceof Ns))throw new ki.b("writer-merge-no-element-after: Node after merge position must be an element.",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,i){return this.model.createPositionFromPath(e,t,i)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(e,t,i){return this.model.createSelection(e,t,i)}_mergeDetached(e){const t=e.nodeBefore,i=e.nodeAfter;this.move(js._createIn(i),zs._createAt(t,"end")),this.remove(i)}_merge(e){const t=zs._createAt(e.nodeBefore,"end"),i=zs._createAt(e.nodeAfter,0),n=e.root.document.graveyard,o=new zs(n,[0]),r=e.root.document.version,s=new cc(i,e.nodeAfter.maxOffset,t,o,r);this.batch.addOperation(s),this.model.applyOperation(s)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof Ns))throw new ki.b("writer-rename-not-element-instance: Trying to rename an object which is not an instance of Element.",this);const i=e.root.document?e.root.document.version:null,n=new sc(zs._createBefore(e),e.name,t,i);this.batch.addOperation(n),this.model.applyOperation(n)}split(e,t){this._assertWriterUsedCorrectly();let i,n,o=e.parent;if(!o.parent)throw new ki.b("writer-split-element-no-parent: Element with no parent can not be split.",this);if(t||(t=o.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new ki.b("writer-split-invalid-limit-element: Limit element is not a position ancestor.",this);do{const t=o.root.document?o.root.document.version:null,r=o.maxOffset-e.offset,s=new lc(e,r,null,t);this.batch.addOperation(s),this.model.applyOperation(s),i||n||(i=o,n=e.parent.nextSibling),o=(e=this.createPositionAfter(e.parent)).parent}while(o!==t);return{position:e,range:new js(zs._createAt(i,"end"),zs._createAt(n,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new ki.b("writer-wrap-range-not-flat: Range to wrap is not flat.",this);const i=t instanceof Ns?t:new Ns(t);if(i.childCount>0)throw new ki.b("writer-wrap-element-not-empty: Element to wrap with is not empty.",this);if(null!==i.parent)throw new ki.b("writer-wrap-element-attached: Element to wrap with is already attached to tree model.",this);this.insert(i,e.start);const n=new js(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(n,zs._createAt(i,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new ki.b("writer-unwrap-element-no-parent: Trying to unwrap an element which has no parent.",this);this.move(js._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new ki.b("writer-addMarker-no-usingOperation: The options.usingOperation parameter is required when adding a new marker.",this);const i=t.usingOperation,n=t.range,o=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new ki.b("writer-addMarker-marker-exists: Marker with provided name already exists.",this);if(!n)throw new ki.b("writer-addMarker-no-range: Range parameter is required when adding a new marker.",this);return i?(fc(this,e,null,n,o),this.model.markers.get(e)):this.model.markers._set(e,n,i,o)}updateMarker(e,t){this._assertWriterUsedCorrectly();const i="string"==typeof e?e:e.name,n=this.model.markers.get(i);if(!n)throw new ki.b("writer-updateMarker-marker-not-exists: Marker with provided name does not exists.",this);if(!t)return void this.model.markers._refresh(n);const o="boolean"==typeof t.usingOperation,r="boolean"==typeof t.affectsData,s=r?t.affectsData:n.affectsData;if(!o&&!t.range&&!r)throw new ki.b("writer-updateMarker-wrong-options: One of the options is required - provide range, usingOperations or affectsData.",this);const a=n.getRange(),c=t.range?t.range:a;o&&t.usingOperation!==n.managedUsingOperations?t.usingOperation?fc(this,i,null,c,s):(fc(this,i,a,null,s),this.model.markers._set(i,c,void 0,s)):n.managedUsingOperations?fc(this,i,a,c,s):this.model.markers._set(i,c,void 0,s)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new ki.b("writer-removeMarker-no-marker: Trying to remove marker which does not exist.",this);const i=this.model.markers.get(t);if(!i.managedUsingOperations)return void this.model.markers._remove(t);fc(this,t,i.getRange(),null,i.affectsData)}setSelection(e,t,i){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(e,t,i)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,i]of Ui(e))this._setSelectionAttribute(t,i)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const i=this.model.document.selection;if(i.isCollapsed&&i.anchor.parent.isEmpty){const n=ea._getStoreAttributeKey(e);this.setAttribute(n,t,i.anchor.parent)}i._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const i=ea._getStoreAttributeKey(e);this.removeAttribute(i,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new ki.b("writer-incorrect-use: Trying to use a writer outside the change() block.",this)}_addOperationForAffectedMarkers(e,t){for(const i of this.model.markers){if(!i.managedUsingOperations)continue;const n=i.getRange();let o=!1;if("move"===e)o=t.containsPosition(n.start)||t.start.isEqual(n.start)||t.containsPosition(n.end)||t.end.isEqual(n.end);else{const e=t.nodeBefore,i=t.nodeAfter,r=n.start.parent==e&&n.start.isAtEnd,s=n.end.parent==i&&0==n.end.offset,a=n.end.nodeAfter==i,c=n.start.nodeAfter==i;o=r||s||a||c}o&&this.updateMarker(i.name,{range:n})}}}function hc(e,t,i,n){const o=e.model,r=o.document;let s,a,c,l=n.start;for(const e of n.getWalker({shallow:!0}))c=e.item.getAttribute(t),s&&a!=c&&(a!=i&&d(),l=s),s=e.nextPosition,a=c;function d(){const n=new js(l,s),c=n.root.document?r.version:null,d=new tc(n,t,a,i,c);e.batch.addOperation(d),o.applyOperation(d)}s instanceof zs&&s!=l&&a!=i&&d()}function mc(e,t,i,n){const o=e.model,r=o.document,s=n.getAttribute(t);let a,c;if(s!=i){if(n.root===n){const e=n.document?r.version:null;c=new ac(n,t,s,i,e)}else{a=new js(zs._createBefore(n),e.createPositionAfter(n));const o=a.root.document?r.version:null;c=new tc(a,t,s,i,o)}e.batch.addOperation(c),o.applyOperation(c)}}function fc(e,t,i,n,o){const r=e.model,s=r.document,a=new rc(t,i,n,r.markers,o,s.version);e.batch.addOperation(a),r.applyOperation(a)}function gc(e,t,i,n){let o;if(e.root.document){const i=n.document,r=new zs(i.graveyard,[0]);o=new nc(e,t,r,i.version)}else o=new ic(e,t);i.addOperation(o),n.applyOperation(o)}function pc(e,t){return e===t||e instanceof dc&&t instanceof dc}class bc{constructor(e){this._markerCollection=e,this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize);const t=js._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getRange();this.bufferMarkerChange(e.name,t,t,e.affectsData)}this._cachedChanges=null}bufferOperation(e){switch(e.type){case"insert":if(this._isInInsertedElement(e.position.parent))return;this._markInsert(e.position.parent,e.position.offset,e.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const t of e.range.getItems({shallow:!0}))this._isInInsertedElement(t.parent)||this._markAttribute(t);break;case"remove":case"move":case"reinsert":{if(e.sourcePosition.isEqual(e.targetPosition)||e.sourcePosition.getShiftedBy(e.howMany).isEqual(e.targetPosition))return;const t=this._isInInsertedElement(e.sourcePosition.parent),i=this._isInInsertedElement(e.targetPosition.parent);t||this._markRemove(e.sourcePosition.parent,e.sourcePosition.offset,e.howMany),i||this._markInsert(e.targetPosition.parent,e.getMovedRangeStart().offset,e.howMany);break}case"rename":{if(this._isInInsertedElement(e.position.parent))return;this._markRemove(e.position.parent,e.position.offset,1),this._markInsert(e.position.parent,e.position.offset,1);const t=js._createFromPositionAndShift(e.position,1);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getRange();this.bufferMarkerChange(e.name,t,t,e.affectsData)}break}case"split":{const t=e.splitPosition.parent;this._isInInsertedElement(t)||this._markRemove(t,e.splitPosition.offset,e.howMany),this._isInInsertedElement(e.insertionPosition.parent)||this._markInsert(e.insertionPosition.parent,e.insertionPosition.offset,1),e.graveyardPosition&&this._markRemove(e.graveyardPosition.parent,e.graveyardPosition.offset,1);break}case"merge":{const t=e.sourcePosition.parent;this._isInInsertedElement(t.parent)||this._markRemove(t.parent,t.startOffset,1);const i=e.graveyardPosition.parent;this._markInsert(i,e.graveyardPosition.offset,1);const n=e.targetPosition.parent;this._isInInsertedElement(n)||this._markInsert(n,e.targetPosition.offset,t.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(e,t,i,n){const o=this._changedMarkers.get(e);o?(o.newRange=i,o.affectsData=n,null==o.oldRange&&null==o.newRange&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{oldRange:t,newRange:i,affectsData:n})}getMarkersToRemove(){const e=[];for(const[t,i]of this._changedMarkers)null!=i.oldRange&&e.push({name:t,range:i.oldRange});return e}getMarkersToAdd(){const e=[];for(const[t,i]of this._changedMarkers)null!=i.newRange&&e.push({name:t,range:i.newRange});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map(e=>({name:e[0],data:{oldRange:e[1].oldRange,newRange:e[1].newRange}}))}hasDataChanges(){for(const[,e]of this._changedMarkers)if(e.affectsData)return!0;return this._changesInElement.size>0}getChanges(e={includeChangesInGraveyard:!1}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();const t=[];for(const e of this._changesInElement.keys()){const i=this._changesInElement.get(e).sort((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offsete.position.root!=t.position.root?e.position.root.rootNamei.offset){if(n>o){const e={type:"attribute",offset:o,howMany:n-o,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=i.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=i.offset&&e.offseto?(e.nodesToHandle=n-o,e.offset=o):e.nodesToHandle=0);if("remove"==i.type&&e.offseti.offset){const o={type:"attribute",offset:i.offset,howMany:n-i.offset,count:this._changeCount++};this._handleChange(o,t),t.push(o),e.nodesToHandle=i.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==i.type&&(e.offset>=i.offset&&n<=o?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=i.offset&&n>=o&&(i.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,i){return{type:"insert",position:zs._createAt(e,t),name:i,length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,i){return{type:"remove",position:zs._createAt(e,t),name:i,length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,i){const n=[];i=new Map(i);for(const[o,r]of t){const t=i.has(o)?i.get(o):null;t!==r&&n.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:o,attributeOldValue:r,attributeNewValue:t,changeCount:this._changeCount++}),i.delete(o)}for(const[t,o]of i)n.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:o,changeCount:this._changeCount++});return n}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const i=this._changesInElement.get(t),n=e.startOffset;if(i)for(const e of i)if("insert"==e.type&&n>=e.offset&&nn){for(let t=0;t{const i=t[0];if(i.isDocumentOperation&&i.baseVersion!==this.version)throw new ki.b("model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.",this,{operation:i})},{priority:"highest"}),this.listenTo(e,"applyOperation",(e,t)=>{const i=t[0];i.isDocumentOperation&&this.differ.bufferOperation(i)},{priority:"high"}),this.listenTo(e,"applyOperation",(e,t)=>{const i=t[0];i.isDocumentOperation&&(this.version++,this.history.addOperation(i))},{priority:"low"}),this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(e.markers,"update",(e,t,i,n)=>{this.differ.bufferMarkerChange(t.name,i,n,t.affectsData),null===i&&t.on("change",(e,i)=>{this.differ.bufferMarkerChange(t.name,i,t.getRange(),t.affectsData)})})}get graveyard(){return this.getRoot(Ac)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new ki.b("model-document-createRoot-name-exists: Root with specified name already exists.",this,{name:t});const i=new dc(this,e,t);return this.roots.add(i),i}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(){return Array.from(this.roots,e=>e.rootName).filter(e=>e!=Ac)}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=ji(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,i=t.schema,n=t.createPositionFromPath(e,[0]);return i.getNearestSelectionRange(n)||t.createRange(n)}_validateSelectionRange(e){return Tc(e.start)&&Tc(e.end)}_callPostFixers(e){let t=!1;do{for(const i of this._postFixers)if(this.selection.refresh(),t=i(e),t)break}while(t)}}function Tc(e){const t=e.textNode;if(t){const i=t.data,n=e.offset-t.startOffset;return!yc(i,n)&&!xc(i,n)}return!0}Mi(Cc,yi);class Pc{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){return this._markers.has(e)}get(e){return this._markers.get(e)||null}_set(e,t,i=!1,n=!1){const o=e instanceof Sc?e.name:e;if(o.includes(","))throw new ki.b('markercollection-incorrect-marker-name: Marker name cannot contain the "," character.',this);const r=this._markers.get(o);if(r){const e=r.getRange();let s=!1;return e.isEqual(t)||(r._attachLiveRange(Js.fromRange(t)),s=!0),i!=r.managedUsingOperations&&(r._managedUsingOperations=i,s=!0),"boolean"==typeof n&&n!=r.affectsData&&(r._affectsData=n,s=!0),s&&this.fire("update:"+o,r,e,t),r}const s=Js.fromRange(t),a=new Sc(o,s,i,n);return this._markers.set(o,a),this.fire("update:"+o,a,null,t),a}_remove(e){const t=e instanceof Sc?e.name:e,i=this._markers.get(t);return!!i&&(this._markers.delete(t),this.fire("update:"+t,i,i.getRange(),null),this._destroyMarker(i),!0)}_refresh(e){const t=e instanceof Sc?e.name:e,i=this._markers.get(t);if(!i)throw new ki.b("markercollection-refresh-marker-not-exists: Marker with provided name does not exists.",this);const n=i.getRange();this.fire("update:"+t,i,n,n,i.managedUsingOperations,i.affectsData)}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}Mi(Pc,yi);class Sc{constructor(e,t,i,n){this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=i,this._affectsData=n}get managedUsingOperations(){if(!this._liveRange)throw new ki.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new ki.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._affectsData}getStart(){if(!this._liveRange)throw new ki.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new ki.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new ki.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.toRange()}is(e){return"marker"===e||"model:marker"===e}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}Mi(Sc,yi);class Ec extends qa{get type(){return"noop"}clone(){return new Ec(this.baseVersion)}getReversed(){return new Ec(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}const Mc={};Mc[tc.className]=tc,Mc[oc.className]=oc,Mc[rc.className]=rc,Mc[nc.className]=nc,Mc[Ec.className]=Ec,Mc[qa.className]=qa,Mc[sc.className]=sc,Mc[ac.className]=ac,Mc[lc.className]=lc,Mc[cc.className]=cc;class Ic extends zs{constructor(e,t,i="toNone"){if(super(e,t,i),!this.root.is("rootElement"))throw new ki.b("model-liveposition-root-not-rootelement: LivePosition's root has to be an instance of RootElement.",e);Nc.call(this)}detach(){this.stopListening()}is(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e}toPosition(){return new zs(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,t){return new this(e.root,e.path.slice(),t||e.stickiness)}}function Nc(){this.listenTo(this.root.document.model,"applyOperation",(e,t)=>{const i=t[0];i.isDocumentOperation&&Rc.call(this,i)},{priority:"low"})}function Rc(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}Mi(Ic,yi);class Oc{constructor(e,t,i){this.model=e,this.writer=t,this.position=i,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}handleNodes(e,t){e=Array.from(e);for(let i=0;i{if(!i.doNotResetEntireContent&&function(e,t){const i=e.getLimitElement(t);if(!t.containsEntireContent(i))return!1;const n=t.getFirstRange();if(n.start.parent==n.end.parent)return!1;return e.checkChild(i,"paragraph")}(o,t))return void function(e,t){const i=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(i)),Lc(e,e.createPositionAt(i,0),t)}(e,t);const[r,s]=function(e){const t=e.root.document.model,i=e.start;let n=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const i=function(e){const t=e.parent,i=t.root.document.model.schema,n=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of n){if(i.isLimit(e))return null;if(i.isBlock(e))return e}}(n);if(i&&n.isTouching(t.createPositionAt(i,0))){const i=t.createSelection(e);t.modifySelection(i,{direction:"backward"}),n=i.getLastPosition()}}return[Ic.fromPosition(i,"toPrevious"),Ic.fromPosition(n,"toNext")]}(n);n.start.isTouching(n.end)||e.remove(n),i.leaveUnmerged||(!function(e,t,i){const n=e.model;if(!Dc(e.model.schema,t,i))return;const[o,r]=function(e,t){const i=e.getAncestors(),n=t.getAncestors();let o=0;for(;i[o]&&i[o]==n[o];)o++;return[i[o],n[o]]}(t,i);!n.hasContent(o,{ignoreMarkers:!0})&&n.hasContent(r,{ignoreMarkers:!0})?function e(t,i,n,o){const r=i.parent,s=n.parent;if(r==o||s==o)return;i=t.createPositionAfter(r),(n=t.createPositionBefore(s)).isEqual(i)||t.insert(r,n);for(;i.parent.isEmpty;){const e=i.parent;i=t.createPositionBefore(e),t.remove(e)}if(n=t.createPositionBefore(s),function(e,t){const i=t.nodeBefore,n=t.nodeAfter;i.name!=n.name&&e.rename(i,n.name);e.clearAttributes(i),e.setAttributes(Object.fromEntries(n.getAttributes()),i),e.merge(t)}(t,n),!Dc(t.model.schema,i,n))return;e(t,i,n,o)}(e,t,i,o.parent):function e(t,i,n,o){const r=i.parent,s=n.parent;if(r==o||s==o)return;i=t.createPositionAfter(r),(n=t.createPositionBefore(s)).isEqual(i)||t.insert(s,i);t.merge(i);for(;n.parent.isEmpty;){const e=n.parent;n=t.createPositionBefore(e),t.remove(e)}if(!Dc(t.model.schema,i,n))return;e(t,i,n,o)}(e,t,i,o.parent)}(e,r,s),o.removeDisallowedAttributes(r.parent.getChildren(),e)),Vc(e,t,r),!i.doNotAutoparagraph&&function(e,t){const i=e.checkChild(t,"$text"),n=e.checkChild(t,"paragraph");return!i&&n}(o,r)&&Lc(e,r,t),r.detach(),s.detach()})}function Dc(e,t,i){const n=t.parent,o=i.parent;return n!=o&&(!e.isLimit(n)&&!e.isLimit(o)&&function(e,t,i){const n=new js(e,t);for(const e of n.getWalker())if(i.isLimit(e.item))return!1;return!0}(t,i,e))}function Lc(e,t,i){const n=e.createElement("paragraph");e.insert(n,t),Vc(e,i,e.createPositionAt(n,0))}function Vc(e,t,i){t instanceof ea?e.setSelection(i):t.setTo(i)}const jc=' ,.?!:;"-()';function Bc(e,t){const{isForward:i,walker:n,unit:o,schema:r}=e,{type:s,item:a,nextPosition:c}=t;if("text"==s)return"word"===e.unit?function(e,t){let i=e.position.textNode;if(i){let n=e.position.offset-i.startOffset;for(;!Hc(i.data,n,t)&&!Uc(i,n,t);){e.next();const o=t?e.position.nodeAfter:e.position.nodeBefore;if(o&&o.is("$text")){const n=o.data.charAt(t?0:o.data.length-1);jc.includes(n)||(e.next(),i=e.position.textNode)}n=e.position.offset-i.startOffset}}return e.position}(n,i):function(e,t){const i=e.position.textNode;if(i){const n=i.data;let o=e.position.offset-i.startOffset;for(;yc(n,o)||"character"==t&&xc(n,o);)e.next(),o=e.position.offset-i.startOffset}return e.position}(n,o);if(s==(i?"elementStart":"elementEnd")){if(r.isSelectable(a))return zs._createAt(a,i?"after":"before");if(r.checkChild(c,"$text"))return c}else{if(r.isLimit(a))return void n.skip(()=>!0);if(r.checkChild(c,"$text"))return c}}function Fc(e,t){const i=e.root,n=zs._createAt(i,t?"end":0);return t?new js(e,n):new js(n,e)}function Hc(e,t,i){const n=t+(i?0:-1);return jc.includes(e.charAt(n))}function Uc(e,t,i){return t===(i?e.endOffset:0)}function Wc(e,t){const i=[];Array.from(e.getItems({direction:"backward"})).map(e=>t.createRangeOn(e)).filter(t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end))).forEach(e=>{i.push(e.start.parent),t.remove(e)}),i.forEach(e=>{let i=e;for(;i.parent&&i.isEmpty;){const e=t.createRangeOn(i);i=i.parent,t.remove(e)}})}function qc(e){e.document.registerPostFixer(t=>function(e,t){const i=t.document.selection,n=t.schema,o=[];let r=!1;for(const e of i.getRanges()){const t=$c(e,n);t&&!t.isEqual(e)?(o.push(t),r=!0):o.push(e)}r&&e.setSelection(function(e){const t=[];t.push(e.shift());for(const i of e){const e=t.pop();if(i.isIntersecting(e)){const n=e.start.isAfter(i.start)?i.start:e.start,o=e.end.isAfter(i.end)?e.end:i.end,r=new js(n,o);t.push(r)}else t.push(e),t.push(i)}return t}(o),{backward:i.isBackward})}(t,e))}function $c(e,t){return e.isCollapsed?function(e,t){const i=e.start,n=t.getNearestSelectionRange(i);if(!n)return null;if(!n.isCollapsed)return n;const o=n.start;if(i.isEqual(o))return null;return new js(o)}(e,t):function(e,t){const{start:i,end:n}=e,o=t.checkChild(i,"$text"),r=t.checkChild(n,"$text"),s=t.getLimitElement(i),a=t.getLimitElement(n);if(s===a){if(o&&r)return null;if(function(e,t,i){const n=e.nodeAfter&&!i.isLimit(e.nodeAfter)||i.checkChild(e,"$text"),o=t.nodeBefore&&!i.isLimit(t.nodeBefore)||i.checkChild(t,"$text");return n||o}(i,n,t)){const e=i.nodeAfter&&t.isSelectable(i.nodeAfter)?null:t.getNearestSelectionRange(i,"forward"),o=n.nodeBefore&&t.isSelectable(n.nodeBefore)?null:t.getNearestSelectionRange(n,"backward"),r=e?e.start:i,s=o?o.start:n;return new js(r,s)}}const c=s&&!s.is("rootElement"),l=a&&!a.is("rootElement");if(c||l){const e=i.nodeAfter&&n.nodeBefore&&i.nodeAfter.parent===n.nodeBefore.parent,o=c&&(!e||!Gc(i.nodeAfter,t)),r=l&&(!e||!Gc(n.nodeBefore,t));let d=i,u=n;return o&&(d=zs._createBefore(Yc(s,t))),r&&(u=zs._createAfter(Yc(a,t))),new js(d,u)}return null}(e,t)}function Yc(e,t){let i=e,n=i;for(;t.isLimit(n)&&n.parent;)i=n,n=n.parent;return i}function Gc(e,t){return e&&t.isSelectable(e)}class Kc{constructor(){this.markers=new Pc,this.document=new Cc(this),this.schema=new Ta,this._pendingChanges=[],this._currentWriter=null,["insertContent","deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach(e=>this.decorate(e)),this.on("applyOperation",(e,t)=>{t[0]._validate()},{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$block",{allowIn:"$root",isBlock:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",isLimit:!0}),this.schema.extend("$text",{allowIn:"$clipboardHolder"}),this.schema.register("$marker"),this.schema.addChildCheck((e,t)=>{if("$marker"===t.name)return!0}),qc(this),this.document.registerPostFixer(ha)}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new Wa,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){ki.b.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{"string"==typeof e?e=new Wa(e):"function"==typeof e&&(t=e,e=new Wa),this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){ki.b.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,i){return function(e,t,i,n){return e.change(o=>{let r;r=i?i instanceof qs||i instanceof ea?i:o.createSelection(i,n):e.document.selection,r.isCollapsed||e.deleteContent(r,{doNotAutoparagraph:!0});const s=new Oc(e,o,r.anchor);let a;a=t.is("documentFragment")?t.getChildren():[t],s.handleNodes(a,{isFirst:!0,isLast:!0});const c=s.getSelectionRange();c&&(r instanceof ea?o.setSelection(c):r.setTo(c));const l=s.getAffectedRange()||e.createRange(r.anchor);return s.destroy(),l})}(this,e,t,i)}deleteContent(e,t){zc(this,e,t)}modifySelection(e,t){!function(e,t,i={}){const n=e.schema,o="backward"!=i.direction,r=i.unit?i.unit:"character",s=t.focus,a=new Rs({boundaries:Fc(s,o),singleCharacters:!0,direction:o?"forward":"backward"}),c={walker:a,schema:n,isForward:o,unit:r};let l;for(;l=a.next();){if(l.done)return;const i=Bc(c,l.value);if(i)return void(t instanceof ea?e.change(e=>{e.setSelectionFocus(i)}):t.setFocus(i))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change(e=>{const i=e.createDocumentFragment(),n=t.getFirstRange();if(!n||n.isCollapsed)return i;const o=n.start.root,r=n.start.getCommonPath(n.end),s=o.getNodeByPath(r);let a;a=n.start.parent==n.end.parent?n:e.createRange(e.createPositionAt(s,n.start.path[r.length]),e.createPositionAt(s,n.end.path[r.length]+1));const c=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),i):e.append(e.cloneElement(t,!0),i);if(a!=n){const t=n._getTransformedByMove(a.start,e.createPositionAt(i,0),c)[0],o=e.createRange(e.createPositionAt(i,0),t.start);Wc(e.createRange(t.end,e.createPositionAt(i,"end")),e),Wc(o,e)}return i})}(this,e)}hasContent(e,t={}){const i=e instanceof Ns?js._createIn(e):e;if(i.isCollapsed)return!1;const{ignoreWhitespaces:n=!1,ignoreMarkers:o=!1}=t;if(!o)for(const e of this.markers.getMarkersIntersectingRange(i))if(e.affectsData)return!0;for(const e of i.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!n)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}createPositionFromPath(e,t,i){return new zs(e,t,i)}createPositionAt(e,t){return zs._createAt(e,t)}createPositionAfter(e){return zs._createAfter(e)}createPositionBefore(e){return zs._createBefore(e)}createRange(e,t){return new js(e,t)}createRangeIn(e){return js._createIn(e)}createRangeOn(e){return js._createOn(e)}createSelection(e,t,i){return new qs(e,t,i)}createBatch(e){return new Wa(e)}createOperationFromJSON(e){return class{static fromJSON(e,t){return Mc[e.__className].fromJSON(e,t)}}.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];for(this.fire("_beforeChanges");this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new uc(this,t);const i=this._pendingChanges[0].callback(this._currentWriter);e.push(i),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return this.fire("_afterChanges"),e}}Mi(Kc,Jn);class Jc{constructor(){this._listener=Object.create(vr)}listenTo(e){this._listener.listenTo(e,"keydown",(e,t)=>{this._listener.fire("_keydown:"+Ao(t),t)})}set(e,t,i={}){const n=Co(e),o=i.priority;this._listener.listenTo(this._listener,"_keydown:"+n,(e,i)=>{t(i,()=>{i.preventDefault(),i.stopPropagation(),e.stop()}),e.return=!0},{priority:o})}press(e){return!!this._listener.fire("_keydown:"+Ao(e),e)}destroy(){this._listener.stopListening()}}class Qc extends Jc{constructor(e){super(),this.editor=e}set(e,t,i={}){if("string"==typeof t){const e=t;t=(t,i)=>{this.editor.execute(e),i()}}super.set(e,t,i)}}class Zc{constructor(e={}){this._context=e.context||new Li({language:e.language}),this._context._addEditor(this,!e.context);const t=Array.from(this.constructor.builtinPlugins||[]);this.config=new ui(e,this.constructor.defaultConfig),this.config.define("plugins",t),this.config.define(this._context._getEditorConfig()),this.plugins=new Ni(this,t,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this.commands=new xa,this.set("state","initializing"),this.once("ready",()=>this.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.set("isReadOnly",!1),this.model=new Kc;const i=new Vn;this.data=new Ba(this.model,i),this.editing=new ya(this.model,i),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new Fa([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new Qc(this),this.keystrokes.listenTo(this.editing.view.document)}initPlugins(){const e=this.config,t=e.get("plugins"),i=e.get("removePlugins")||[],n=e.get("extraPlugins")||[];return this.plugins.init(t.concat(n),i)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise(e=>this.once("ready",e))),e.then(()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()}).then(()=>this.plugins.destroy()).then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()}).then(()=>this._context._removeEditor(this))}execute(...e){try{return this.commands.execute(...e)}catch(e){ki.b.rethrowUnexpectedError(e,this)}}}Mi(Zc,Jn);var Xc={setData(e){this.data.set(e)},getData(e){return this.data.get(e)}};var el={updateSourceElement(){if(!this.sourceElement)throw new ki.b("editor-missing-sourceelement: Cannot update the source element of a detached editor.",this);var e,t;e=this.sourceElement,t=this.data.get(),e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}};class tl{getHtml(e){const t=document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class il{constructor(e){this._domParser=new DOMParser,this._domConverter=new pr(e,{blockFillerMode:"nbsp"}),this._htmlWriter=new tl}toData(e){const t=this._domConverter.viewToDom(e,document);return this._htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this._domConverter.domToView(t)}_toDom(e){const t=this._domParser.parseFromString(e,"text/html"),i=t.createDocumentFragment(),n=t.body.childNodes;for(;n.length>0;)i.appendChild(n[0]);return i}}class nl{constructor(e){this.editor=e,this._components=new Map}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(ol(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new ki.b("componentfactory-item-missing: The required component is not registered in the factory.",this,{name:e});return this._components.get(ol(e)).callback(this.editor.locale)}has(e){return this._components.has(ol(e))}}function ol(e){return String(e).toLowerCase()}class rl{constructor(){this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}add(e){if(this._elements.has(e))throw new ki.b("focusTracker-add-element-already-exist: This element is already tracked by FocusTracker.",this);this.listenTo(e,"focus",()=>this._focus(e),{useCapture:!0}),this.listenTo(e,"blur",()=>this._blur(),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(e),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}Mi(rl,vr),Mi(rl,Jn);class sl{constructor(e){this.editor=e,this.componentFactory=new nl(e),this.focusTracker=new rl,this._editableElementsMap=new Map,this.listenTo(e.editing.view.document,"layoutChanged",()=>this.update())}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null;this._editableElementsMap=new Map}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}}Mi(sl,yi);i(13);const al=new WeakMap;function cl(e){const{view:t,element:i,text:n,isDirectHost:o=!0}=e,r=t.document;al.has(r)||(al.set(r,new Map),r.registerPostFixer(e=>dl(r,e))),al.get(r).set(i,{text:n,isDirectHost:o}),t.change(e=>dl(r,e))}function ll(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function dl(e,t){const i=al.get(e);let n=!1;for(const[e,o]of i)ul(t,e,o)&&(n=!0);return n}function ul(e,t,i){const{text:n,isDirectHost:o}=i,r=o?t:function(e){if(1===e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement"))return t}return null}(t);let s=!1;return!!r&&(i.hostElement=r,r.getAttribute("data-placeholder")!==n&&(e.setAttribute("data-placeholder",n,r),s=!0),!function(e){if(!e.isAttached())return!1;const t=!Array.from(e.getChildren()).some(e=>!e.is("uiElement")),i=e.document;if(!i.isFocused&&t)return!0;const n=i.selection.anchor;return!(!t||!n||n.parent===e)}(r)?ll(e,r)&&(s=!0):function(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}(e,r)&&(s=!0),s)}class hl{constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach(({element:e,newElement:t})=>{e.style.display="",t&&t.remove()}),this._replacedElements=[]}}class ml extends sl{constructor(e,t){var i;super(e),this.view=t,this._toolbarConfig=(i=e.config.get("toolbar"),Array.isArray(i)?{items:i}:i?Object.assign({items:[]},i):{items:[]}),this._elementReplacer=new hl}get element(){return this.view.element}init(e){const t=this.editor,i=this.view,n=t.editing.view,o=i.editable,r=n.document.getRoot();o.name=r.rootName,i.render();const s=o.element;this.setEditableElement(o.name,s),this.focusTracker.add(s),i.editable.bind("isFocused").to(this.focusTracker),n.attachDomRoot(s),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.detachDomRoot(e.editable.name),e.destroy(),super.destroy()}_initToolbar(){const e=this.editor,t=this.view,i=e.editing.view;t.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),t.stickyPanel.limiterElement=t.element,this._toolbarConfig.viewportTopOffset&&(t.stickyPanel.viewportTopOffset=this._toolbarConfig.viewportTopOffset),t.toolbar.fillFromConfig(this._toolbarConfig.items,this.componentFactory),function({origin:e,originKeystrokeHandler:t,originFocusTracker:i,toolbar:n,beforeFocus:o,afterBlur:r}){i.add(n.element),t.set("Alt+F10",(e,t)=>{i.isFocused&&!n.focusTracker.isFocused&&(o&&o(),n.focus(),t())}),n.keystrokes.set("Esc",(t,i)=>{n.focusTracker.isFocused&&(e.focus(),r&&r(),i())})}({origin:i,originFocusTracker:this.focusTracker,originKeystrokeHandler:e.keystrokes,toolbar:t.toolbar})}_initPlaceholder(){const e=this.editor,t=e.editing.view,i=t.document.getRoot(),n=e.sourceElement,o=e.config.get("placeholder")||n&&"textarea"===n.tagName.toLowerCase()&&n.getAttribute("placeholder");o&&cl({view:t,element:i,text:o,isDirectHost:!1})}}class fl extends Ii{constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",(e,t,i)=>{this._renderViewIntoCollectionParent(t,i)}),this.on("remove",(e,t)=>{t.element&&this._parentElement&&t.element.remove()}),this._parentElement=null}destroy(){this.map(e=>e.destroy())}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(...e){if(!e.length||!e.every(e=>"string"==typeof e))throw new ki.b("ui-viewcollection-delegate-wrong-events: All event names must be strings.",this);return{to:t=>{for(const i of this)for(const n of e)i.delegate(n).to(t);this.on("add",(i,n)=>{for(const i of e)n.delegate(i).to(t)}),this.on("remove",(i,n)=>{for(const i of e)n.stopDelegating(i,t)})}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}}class gl{constructor(e){Object.assign(this,Cl(Al(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new ki.b("ui-template-revert-not-applied: Attempting to revert a template which has not been applied yet.",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const i of t.children)Ml(i)?yield i:Il(i)&&(yield*e(i))}(this)}static bind(e,t){return{to:(i,n)=>new bl({eventNameOrFunction:i,attribute:i,observable:e,emitter:t,callback:n}),if:(i,n,o)=>new wl({observable:e,emitter:t,attribute:i,valueIfTrue:n,callback:o})}}static extend(e,t){if(e._isRendered)throw new ki.b("template-extend-render: Attempting to extend a template which has already been rendered.",[this,e]);!function e(t,i){i.attributes&&(t.attributes||(t.attributes={}),Sl(t.attributes,i.attributes));i.eventListeners&&(t.eventListeners||(t.eventListeners={}),Sl(t.eventListeners,i.eventListeners));i.text&&t.text.push(...i.text);if(i.children&&i.children.length){if(t.children.length!=i.children.length)throw new ki.b("ui-template-extend-children-mismatch: The number of children in extended definition does not match.",t);let n=0;for(const o of i.children)e(t.children[n++],o)}}(e,Cl(Al(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new ki.b('ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering a new Node.',this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),kl(this.text)?this._bindToObservable({schema:this.text,updater:vl(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){let t,i,n,o;if(!this.attributes)return;const r=e.node,s=e.revertData;for(t in this.attributes)if(n=r.getAttribute(t),i=this.attributes[t],s&&(s.attributes[t]=n),o=L(i[0])&&i[0].ns?i[0].ns:null,kl(i)){const a=o?i[0].value:i;s&&Rl(t)&&a.unshift(n),this._bindToObservable({schema:a,updater:yl(r,t,o),data:e})}else"style"==t&&"string"!=typeof i[0]?this._renderStyleAttribute(i[0],e):(s&&n&&Rl(t)&&i.unshift(n),i=i.map(e=>e&&e.value||e).reduce((e,t)=>e.concat(t),[]).reduce(Pl,""),El(i)||r.setAttributeNS(o,t,i))}_renderStyleAttribute(e,t){const i=t.node;for(const n in e){const o=e[n];kl(o)?this._bindToObservable({schema:[o],updater:xl(i,n),data:t}):i.style[n]=o}}_renderElementChildren(e){const t=e.node,i=e.intoFragment?document.createDocumentFragment():t,n=e.isApplying;let o=0;for(const r of this.children)if(Nl(r)){if(!n){r.setParent(t);for(const e of r)i.appendChild(e.element)}}else if(Ml(r))n||(r.isRendered||r.render(),i.appendChild(r.element));else if(ar(r))i.appendChild(r);else if(n){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),r._renderNode({node:i.childNodes[o++],isApplying:!0,revertData:t})}else i.appendChild(r.render());e.intoFragment&&t.appendChild(i)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const i=this.eventListeners[t].map(i=>{const[n,o]=t.split("@");return i.activateDomEventListener(n,o,e)});e.revertData&&e.revertData.bindings.push(i)}}_bindToObservable({schema:e,updater:t,data:i}){const n=i.revertData;_l(e,t,i);const o=e.filter(e=>!El(e)).filter(e=>e.observable).map(n=>n.activateAttributeListener(e,t,i));n&&n.bindings.push(o)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)e.textContent=t.text;else{for(const i in t.attributes){const n=t.attributes[i];null===n?e.removeAttribute(i):e.setAttribute(i,n)}for(let i=0;i_l(e,t,i);return this.emitter.listenTo(this.observable,"change:"+this.attribute,n),()=>{this.emitter.stopListening(this.observable,"change:"+this.attribute,n)}}}class bl extends pl{activateDomEventListener(e,t,i){const n=(e,i)=>{t&&!i.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(i):this.observable.fire(this.eventNameOrFunction,i))};return this.emitter.listenTo(i.node,e,n),()=>{this.emitter.stopListening(i.node,e,n)}}}class wl extends pl{getValue(e){return!El(super.getValue(e))&&(this.valueIfTrue||!0)}}function kl(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(kl):e instanceof pl)}function _l(e,t,{node:i}){let n=function(e,t){return e.map(e=>e instanceof pl?e.getValue(t):e)}(e,i);n=1==e.length&&e[0]instanceof wl?n[0]:n.reduce(Pl,""),El(n)?t.remove():t.set(n)}function vl(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function yl(e,t,i){return{set(n){e.setAttributeNS(i,t,n)},remove(){e.removeAttributeNS(i,t)}}}function xl(e,t){return{set(i){e.style[t]=i},remove(){e.style[t]=null}}}function Al(e){return li(e,e=>{if(e&&(e instanceof pl||Il(e)||Ml(e)||Nl(e)))return e})}function Cl(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){Array.isArray(e.text)||(e.text=[e.text])}(e),e.on&&(e.eventListeners=function(e){for(const t in e)Tl(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=[].concat(e[t].value)),Tl(e,t)}(e.attributes);const t=[];if(e.children)if(Nl(e.children))t.push(e.children);else for(const i of e.children)Il(i)||Ml(i)||ar(i)?t.push(i):t.push(new gl(i));e.children=t}return e}function Tl(e,t){Array.isArray(e[t])||(e[t]=[e[t]])}function Pl(e,t){return El(t)?e:El(e)?t:`${e} ${t}`}function Sl(e,t){for(const i in t)e[i]?e[i].push(...t[i]):e[i]=t[i]}function El(e){return!e&&0!==e}function Ml(e){return e instanceof Ol}function Il(e){return e instanceof gl}function Nl(e){return e instanceof fl}function Rl(e){return"class"==e||"style"==e}i(15);class Ol{constructor(e){this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new Ii,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(t,i)=>{i.locale=e}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=gl.bind(this,this)}createCollection(e){const t=new fl(e);return this._viewCollections.add(t),t}registerChild(e){Ei(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){Ei(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new gl(e)}extendTemplate(e){gl.extend(this.template,e)}render(){if(this.isRendered)throw new ki.b("ui-view-render-already-rendered: This View has already been rendered.",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map(e=>e.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}Mi(Ol,vr),Mi(Ol,Jn);var zl=function(e){return"string"==typeof e||!ze(e)&&p(e)&&"[object String]"==m(e)};class Dl extends fl{constructor(e,t=[]){super(t),this.locale=e}attachToDom(){this._bodyCollectionContainer=new gl({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=function(e,t,i={},n=[]){const o=i&&i.xmlns,r=o?e.createElementNS(o,t):e.createElement(t);for(const e in i)r.setAttribute(e,i[e]);!zl(n)&&Ei(n)||(n=[n]);for(let t of n)zl(t)&&(t=e.createTextNode(t)),r.appendChild(t);return r}(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}i(17);class Ll extends Ol{constructor(e){super(e),this.body=new Dl(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}i(19);class Vl extends Ol{constructor(e){super(e),this.set("text"),this.set("for"),this.id="ck-editor__label_"+bi();const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}class jl extends Ll{constructor(e){super(e),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new Vl;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}class Bl extends Ol{constructor(e,t,i){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.name=null,this.set("isFocused",!1),this._editableElement=i,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",()=>this._updateIsFocusedClasses()),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change(i=>{const n=e.document.getRoot(t.name);i.addClass(t.isFocused?"ck-focused":"ck-blurred",n),i.removeClass(t.isFocused?"ck-blurred":"ck-focused",n)})}e.isRenderingInProgress?function i(n){e.once("change:isRenderingInProgress",(e,o,r)=>{r?i(n):t(n)})}(this):t(this)}}class Fl extends Bl{constructor(e,t,i){super(e,t,i),this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const e=this._editingView,t=this.t;e.change(i=>{const n=e.document.getRoot(this.name);i.setAttribute("aria-label",t("Rich Text Editor, %0",[this.name]),n)})}}function Hl(e){return t=>t+e}i(21);const Ul=Hl("px");class Wl extends Ol{constructor(e){super(e);const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheLimiter",!1),this.set("_hasViewportTopOffset",!1),this.content=this.createCollection(),this._contentPanelPlaceholder=new gl({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",e=>e?"block":"none"),height:t.to("isSticky",e=>e?Ul(this._panelRect.height):null)}}}).render(),this._contentPanel=new gl({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",e=>e?Ul(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:t.to("_hasViewportTopOffset",e=>e?Ul(this.viewportTopOffset):null),bottom:t.to("_isStickyToTheLimiter",e=>e?Ul(this.limiterBottomOffset):null),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this._checkIfShouldBeSticky(),this.listenTo(hr.window,"scroll",()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,"change:isActive",()=>{this._checkIfShouldBeSticky()})}_checkIfShouldBeSticky(){const e=this._panelRect=this._contentPanel.getBoundingClientRect();let t;this.limiterElement?(t=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&t.top{this[t](),i()})}}get first(){return this.focusables.find($l)||null}get last(){return this.focusables.filter($l).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((t,i)=>{const n=t.element===this.focusTracker.focusedElement;return n&&(e=i),n}),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,i=this.focusables.length;if(!i)return null;if(null===t)return this[1===e?"first":"last"];let n=(t+i+e)%i;do{const t=this.focusables.get(n);if($l(t))return t;n=(n+i+e)%i}while(n!==t);return null}}function $l(e){return!(!e.focus||"none"==hr.window.getComputedStyle(e.element).display)}class Yl extends Ol{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class Gl{constructor(e,t){Gl._observerInstance||Gl._createObserver(),this._element=e,this._callback=t,Gl._addElementCallback(e,t),Gl._observerInstance.observe(e)}destroy(){Gl._deleteElementCallback(this._element,this._callback)}static _addElementCallback(e,t){Gl._elementCallbacks||(Gl._elementCallbacks=new Map);let i=Gl._elementCallbacks.get(e);i||(i=new Set,Gl._elementCallbacks.set(e,i)),i.add(t)}static _deleteElementCallback(e,t){const i=Gl._getElementCallbacks(e);i&&(i.delete(t),i.size||(Gl._elementCallbacks.delete(e),Gl._observerInstance.unobserve(e))),Gl._elementCallbacks&&!Gl._elementCallbacks.size&&(Gl._observerInstance=null,Gl._elementCallbacks=null)}static _getElementCallbacks(e){return Gl._elementCallbacks?Gl._elementCallbacks.get(e):null}static _createObserver(){let e;e="function"==typeof hr.window.ResizeObserver?hr.window.ResizeObserver:Kl,Gl._observerInstance=new e(e=>{for(const t of e){const e=Gl._getElementCallbacks(t.target);if(e)for(const i of e)i(t)}})}}Gl._observerInstance=null,Gl._elementCallbacks=null;class Kl{constructor(e){this._callback=e,this._elements=new Set,this._previousRects=new Map,this._periodicCheckTimeout=null}observe(e){this._elements.add(e),this._checkElementRectsAndExecuteCallback(),1===this._elements.size&&this._startPeriodicCheck()}unobserve(e){this._elements.delete(e),this._previousRects.delete(e),this._elements.size||this._stopPeriodicCheck()}_startPeriodicCheck(){const e=()=>{this._checkElementRectsAndExecuteCallback(),this._periodicCheckTimeout=setTimeout(e,100)};this.listenTo(hr.window,"resize",()=>{this._checkElementRectsAndExecuteCallback()}),this._periodicCheckTimeout=setTimeout(e,100)}_stopPeriodicCheck(){clearTimeout(this._periodicCheckTimeout),this.stopListening(),this._previousRects.clear()}_checkElementRectsAndExecuteCallback(){const e=[];for(const t of this._elements)this._hasRectChanged(t)&&e.push({target:t,contentRect:this._previousRects.get(t)});e.length&&this._callback(e)}_hasRectChanged(e){if(!e.ownerDocument.body.contains(e))return!1;const t=new fs(e),i=this._previousRects.get(e),n=!i||!i.isEqual(t);return this._previousRects.set(e,t),n}}Mi(Kl,vr);class Jl extends Ol{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",e=>"ck-dropdown__panel_"+e),t.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:t.to(e=>e.preventDefault())}})}focus(){this.children.length&&this.children.first.focus()}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}i(23);function Ql({element:e,target:t,positions:i,limiter:n,fitInViewport:o}){j(t)&&(t=t()),j(n)&&(n=n());const r=function(e){return e&&e.parentNode?e.offsetParent===hr.document.body?null:e.offsetParent:null}(e),s=new fs(e),a=new fs(t);let c,l;if(n||o){const e=function(e,t){const{elementRect:i,viewportRect:n}=t,o=i.getArea(),r=function(e,{targetRect:t,elementRect:i,limiterRect:n,viewportRect:o}){const r=[],s=i.getArea();for(const a of e){const e=Zl(a,t,i);if(!e)continue;const[c,l]=e;let d=0,u=0;if(n)if(o){const e=n.getIntersection(o);e&&(d=e.getIntersectionArea(l))}else d=n.getIntersectionArea(l);o&&(u=o.getIntersectionArea(l));const h={positionName:c,positionRect:l,limiterIntersectArea:d,viewportIntersectArea:u};if(d===s)return[h];r.push(h)}return r}(e,t);if(n){const e=Xl(r.filter(({viewportIntersectArea:e})=>e===o),o);if(e)return e}return Xl(r,o)}(i,{targetRect:a,elementRect:s,limiterRect:n&&new fs(n).getVisible(),viewportRect:o&&new fs(hr.window)});[l,c]=e||Zl(i[0],a,s)}else[l,c]=Zl(i[0],a,s);let d=ed(c);return r&&(d=function({left:e,top:t},i){const n=ed(new fs(i)),o=hs(i);return e-=n.left,t-=n.top,e+=i.scrollLeft,t+=i.scrollTop,e-=o.left,t-=o.top,{left:e,top:t}}(d,r)),{left:d.left,top:d.top,name:l}}function Zl(e,t,i){const n=e(t,i);if(!n)return null;const{left:o,top:r,name:s}=n;return[s,i.clone().moveTo(o,r)]}function Xl(e,t){let i,n,o=0;for(const{positionName:r,positionRect:s,limiterIntersectArea:a,viewportIntersectArea:c}of e){if(a===t)return[r,s];const e=c**2+a**2;e>o&&(o=e,i=s,n=r)}return i?[n,i]:null}function ed({left:e,top:t}){const{scrollX:i,scrollY:n}=hr.window;return{left:e+i,top:t+n}}class td extends Ol{constructor(e,t,i){super(e);const n=this.bindTemplate;this.buttonView=t,this.panelView=i,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class"),this.set("id"),this.set("panelPosition","auto"),this.keystrokes=new Jc,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",n.to("class"),n.if("isEnabled","ck-disabled",e=>!e)],id:n.to("id"),"aria-describedby":n.to("ariaDescribedById")},children:[t,i]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"]}})}render(){super.render(),this.listenTo(this.buttonView,"open",()=>{this.isOpen=!this.isOpen}),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",()=>{this.isOpen&&("auto"===this.panelPosition?this.panelView.position=td._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition)}),this.keystrokes.listenTo(this.element);const e=(e,t)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,t())};this.keystrokes.set("arrowdown",(e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())}),this.keystrokes.set("arrowright",(e,t)=>{this.isOpen&&t()}),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:e,southWest:t,northEast:i,northWest:n}=td.defaultPanelPositions;return"ltr"===this.locale.uiLanguageDirection?[e,t,i,n]:[t,e,n,i]}}td.defaultPanelPositions={southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.bottom-t.height,left:e.left-t.width+e.width,name:"nw"})},td._getOptimalPosition=Ql;i(25);class id extends Ol{constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon"],viewBox:e.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",()=>{this._updateXMLContent(),this._colorFillPaths()}),this.on("change:fillColor",()=>{this._colorFillPaths()})}_updateXMLContent(){if(this.content){const e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");for(t&&(this.viewBox=t),this.element.innerHTML="";e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach(e=>{e.style.fill=this.fillColor})}}i(27);class nd extends Ol{constructor(e){super(e),this.set("text",""),this.set("position","s");const t=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip",t.to("position",e=>"ck-tooltip_"+e),t.if("text","ck-hidden",e=>!e.trim())]},children:[{tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:t.to("text")}]}]})}}i(29);class od extends Ol{constructor(e){super(e);const t=this.bindTemplate,i=bi();this.set("class"),this.set("labelStyle"),this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.tooltipView=this._createTooltipView(),this.labelView=this._createLabelView(i),this.iconView=new id,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this)),this.setTemplate({tag:"button",attributes:{class:["ck","ck-button",t.to("class"),t.if("isEnabled","ck-disabled",e=>!e),t.if("isVisible","ck-hidden",e=>!e),t.to("isOn",e=>e?"ck-on":"ck-off"),t.if("withText","ck-button_with-text"),t.if("withKeystroke","ck-button_with-keystroke")],type:t.to("type",e=>e||"button"),tabindex:t.to("tabindex"),"aria-labelledby":"ck-editor__aria-label_"+i,"aria-disabled":t.if("isEnabled",!0,e=>!e),"aria-pressed":t.to("isOn",e=>!!this.isToggleable&&String(e))},children:this.children,on:{mousedown:t.to(e=>{e.preventDefault()}),click:t.to(e=>{this.isEnabled?this.fire("execute"):e.preventDefault()})}})}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.tooltipView),this.children.add(this.labelView),this.withKeystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}_createTooltipView(){const e=new nd;return e.bind("text").to(this,"_tooltipString"),e.bind("position").to(this,"tooltipPosition"),e}_createLabelView(e){const t=new Ol,i=this.bindTemplate;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:i.to("labelStyle"),id:"ck-editor__aria-label_"+e},children:[{text:this.bindTemplate.to("label")}]}),t}_createKeystrokeView(){const e=new Ol;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",e=>To(e))}]}),e}_getTooltipString(e,t,i){return e?"string"==typeof e?e:(i&&(i=To(i)),e instanceof Function?e(t,i):`${t}${i?` (${i})`:""}`):""}}var rd='';class sd extends od{constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new id;return e.content=rd,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}i(31);class ad extends Ol{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new rl,this.keystrokes=new Jc,this._focusCycler=new ql({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"]},children:this.items})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class cd extends Ol{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item"]},children:this.children})}focus(){this.children.first.focus()}}class ld extends Ol{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}i(33);class dd extends od{constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new Ol;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}function ud({emitter:e,activator:t,callback:i,contextElements:n}){e.listenTo(document,"mousedown",(e,o)=>{if(!t())return;const r="function"==typeof o.composedPath?o.composedPath():[];for(const e of n)if(e.contains(o.target)||r.includes(e))return;i()})}i(35),i(37);function hd(e,t=sd){const i=new t(e),n=new Jl(e),o=new td(e,i,n);return i.bind("isEnabled").to(o),i instanceof sd?i.bind("isOn").to(o,"isOpen"):i.arrowView.bind("isOn").to(o,"isOpen"),function(e){(function(e){e.on("render",()=>{ud({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:[e.element]})})})(e),function(e){e.on("execute",t=>{t.source instanceof dd||(e.isOpen=!1)})}(e),function(e){e.keystrokes.set("arrowdown",(t,i)=>{e.isOpen&&(e.panelView.focus(),i())}),e.keystrokes.set("arrowup",(t,i)=>{e.isOpen&&(e.panelView.focusLast(),i())})}(e)}(o),o}function md(e,t){const i=e.locale,n=i.t,o=e.toolbarView=new gd(i);o.set("ariaLabel",n("Dropdown toolbar")),e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),t.map(e=>o.items.add(e)),e.panelView.children.add(o),o.items.delegate("execute").to(e)}function fd(e,t){const i=e.locale,n=e.listView=new ad(i);n.items.bindTo(t).using(({type:e,model:t})=>{if("separator"===e)return new ld(i);if("button"===e||"switchbutton"===e){const n=new cd(i);let o;return o="button"===e?new od(i):new dd(i),o.bind(...Object.keys(t)).to(t),o.delegate("execute").to(n),n.children.add(o),n}}),e.panelView.children.add(n),n.items.delegate("execute").to(e)}i(39);class gd extends Ol{constructor(e,t){super(e);const i=this.bindTemplate,n=this.t;var o;this.options=t||{},this.set("ariaLabel",n("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new rl,this.keystrokes=new Jc,this.set("class"),this.set("isCompact",!1),this.itemsView=new pd(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection(),this._focusCycler=new ql({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:["arrowleft","arrowup"],focusNext:["arrowright","arrowdown"]}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar",i.to("class"),i.if("isCompact","ck-toolbar_compact")],role:"toolbar","aria-label":i.to("ariaLabel"),style:{maxWidth:i.to("maxWidth")}},children:this.children,on:{mousedown:(o=this,o.bindTemplate.to(e=>{e.target===o.element&&e.preventDefault()}))}}),this._behavior=this.options.shouldGroupWhenFull?new wd(this):new bd(this)}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t){this.items.addMany(e.map(e=>"|"==e?new Yl:t.has(e)?t.create(e):void console.warn(Object(ki.a)("toolbarview-item-unavailable: The requested toolbar item is unavailable."),{name:e})).filter(e=>void 0!==e))}}class pd extends Ol{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class bd{constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using(e=>e),e.focusables.bindTo(e.items).using(e=>e),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class wd{constructor(e){this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,e.itemsView.children.bindTo(this.ungroupedItems).using(e=>e),this.ungroupedItems.on("add",this._updateFocusCycleableItems.bind(this)),this.ungroupedItems.on("remove",this._updateFocusCycleableItems.bind(this)),e.children.on("add",this._updateFocusCycleableItems.bind(this)),e.children.on("remove",this._updateFocusCycleableItems.bind(this)),e.items.on("change",(e,t)=>{const i=t.index;for(const e of t.removed)i>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=i;ethis.ungroupedItems.length?this.groupedItems.add(n,e-this.ungroupedItems.length):this.ungroupedItems.add(n,e)}this._updateGrouping()}),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!this.viewElement.offsetParent)return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,i=new fs(e.lastChild),n=new fs(e);if(!this.cachedPadding){const i=hr.window.getComputedStyle(e),n="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(i[n])}return"ltr"===t?i.right>n.right-this.cachedPadding:i.left{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)}),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",()=>{this._updateGrouping()})}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new Yl),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,i=hd(e);return i.class="ck-toolbar__grouped-dropdown",i.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",md(i,[]),i.buttonView.set({label:t("Show more items"),tooltip:!0,icon:''}),i.toolbarView.items.bindTo(this.groupedItems).using(e=>e),i}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(e=>{this.viewFocusables.add(e)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}i(41);class kd extends jl{constructor(e,t,i={}){super(e),this.stickyPanel=new Wl(e),this.toolbar=new gd(e,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),this.editable=new Fl(e,t)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class _d extends Zc{constructor(e,t){super(t),di(e)&&(this.sourceElement=e),this.data.processor=new il(this.data.viewDocument),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=new kd(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i});this.ui=new ml(this,n),function(e){if(!j(e.updateSourceElement))throw new ki.b("attachtoform-missing-elementapi-interface: Editor passed to attachToForm() must implement ElementApi.",e);const t=e.sourceElement;if(t&&"textarea"===t.tagName.toLowerCase()&&t.form){let i;const n=t.form,o=()=>e.updateSourceElement();j(n.submit)&&(i=n.submit,n.submit=()=>{o(),i.apply(n)}),n.addEventListener("submit",o),e.on("destroy",()=>{n.removeEventListener("submit",o),i&&(n.submit=i)})}}(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise(i=>{const n=new this(e,t);i(n.initPlugins().then(()=>n.ui.init(di(e)?e:null)).then(()=>{if(!di(e)&&t.initialData)throw new ki.b("editor-create-initial-data: The config.initialData option cannot be used together with initial data passed in Editor.create().",null);const i=t.initialData||function(e){return di(e)?(t=e,t instanceof HTMLTextAreaElement?t.value:t.innerHTML):e;var t}(e);return n.data.init(i)}).then(()=>n.fire("ready")).then(()=>n))})}}Mi(_d,Xc),Mi(_d,el);class vd{constructor(e){this.editor=e,this.set("isEnabled",!0),this._disableStack=new Set}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",yd,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",yd),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function yd(e){e.return=!1,e.stop()}Mi(vd,Jn);class xd{constructor(e){this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",()=>{this.refresh()}),this.on("execute",e=>{this.isEnabled||e.stop()},{priority:"high"}),this.listenTo(e,"change:isReadOnly",(e,t,i)=>{i?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",Ad,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",Ad),this.refresh())}execute(){}destroy(){this.stopListening()}}function Ad(e){e.return=!1,e.stop()}function Cd(e){const t=e.next();return t.done?null:t.value}Mi(xd,Jn);const Td=["left","right","center","justify"];function Pd(e){return Td.includes(e)}function Sd(e,t){return"rtl"==t.contentLanguageDirection?"right"===e:"left"===e}const Ed="alignment";class Md extends xd{refresh(){const e=this.editor.locale,t=Cd(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=!!t&&this._canBeAligned(t),this.isEnabled&&t.hasAttribute("alignment")?this.value=t.getAttribute("alignment"):this.value="rtl"===e.contentLanguageDirection?"right":"left"}execute(e={}){const t=this.editor,i=t.locale,n=t.model,o=n.document,r=e.value;n.change(e=>{const t=Array.from(o.selection.getSelectedBlocks()).filter(e=>this._canBeAligned(e)),n=t[0].getAttribute("alignment");Sd(r,i)||n===r||!r?function(e,t){for(const i of e)t.removeAttribute(Ed,i)}(t,e):function(e,t,i){for(const n of e)t.setAttribute(Ed,i,n)}(t,e,r)})}_canBeAligned(e){return this.editor.model.schema.checkAttribute(e,Ed)}}class Id extends vd{static get pluginName(){return"AlignmentEditing"}constructor(e){super(e),e.config.define("alignment",{options:[...Td]})}init(){const e=this.editor,t=e.locale,i=e.model.schema,n=e.config.get("alignment.options").filter(Pd);i.extend("$block",{allowAttributes:"alignment"}),e.model.schema.setAttributeProperties("alignment",{isFormatting:!0});const o=function(e){const t={model:{key:"alignment",values:e.slice()},view:{}};for(const i of e)t.view[i]={key:"style",value:{"text-align":i}};return t}(n.filter(e=>!Sd(e,t)));e.conversion.attributeToAttribute(o),e.commands.add("alignment",new Md(e))}}var Nd='',Rd='';const Od=new Map([["left",Nd],["right",Rd],["center",''],["justify",'']]);class zd extends vd{get localizedOptionTitles(){const e=this.editor.t;return{left:e("Align left"),right:e("Align right"),center:e("Align center"),justify:e("Justify")}}static get pluginName(){return"AlignmentUI"}init(){const e=this.editor,t=e.ui.componentFactory,i=e.t,n=e.config.get("alignment.options");n.filter(Pd).forEach(e=>this._addButton(e)),t.add("alignment",e=>{const o=hd(e),r=n.map(e=>t.create("alignment:"+e));md(o,r),o.buttonView.set({label:i("Text alignment"),tooltip:!0}),o.toolbarView.isVertical=!0,o.toolbarView.ariaLabel=i("Text alignment toolbar"),o.extendTemplate({attributes:{class:"ck-alignment-dropdown"}});const s="rtl"===e.contentLanguageDirection?Rd:Nd;return o.buttonView.bind("icon").toMany(r,"isOn",(...e)=>{const t=e.findIndex(e=>e);return t<0?s:r[t].icon}),o.bind("isEnabled").toMany(r,"isEnabled",(...e)=>e.some(e=>e)),o})}_addButton(e){const t=this.editor;t.ui.componentFactory.add("alignment:"+e,i=>{const n=t.commands.get("alignment"),o=new od(i);return o.set({label:this.localizedOptionTitles[e],icon:Od.get(e),tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(n),o.bind("isOn").to(n,"value",t=>t===e),this.listenTo(o,"execute",()=>{t.execute("alignment",{value:e}),t.editing.view.focus()}),o})}}function Dd(e,t){let i=e.start;return{text:Array.from(e.getItems()).reduce((e,n)=>n.is("$text")||n.is("$textProxy")?e+n.data:(i=t.createPositionAfter(n),""),""),range:t.createRange(i,e.end)}}class Ld{constructor(e,t){this.model=e,this.testCallback=t,this.hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))}),this._startListening()}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",(t,{directChange:i})=>{i&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this.hasMatch=!1))}),this.listenTo(e,"change:data",(e,t)=>{"transparent"!=t.type&&this._evaluateTextBeforeSelection("data",{batch:t})})}_evaluateTextBeforeSelection(e,t={}){const i=this.model,n=i.document.selection,o=i.createRange(i.createPositionAt(n.focus.parent,0),n.focus),{text:r,range:s}=Dd(o,i),a=this.testCallback(r);if(!a&&this.hasMatch&&this.fire("unmatched"),this.hasMatch=!!a,a){const i=Object.assign(t,{text:r,range:s});"object"==typeof a&&Object.assign(i,a),this.fire("matched:"+e,i)}}}Mi(Ld,Jn);const Vd=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?![-_])(?:[-\\w\\u00a1-\\uffff]{0,63}[^-_]\\.)+(?:[a-z\\u00a1-\\uffff]{2,}))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-\\w\\u00a1-\\uffff]{0,63}[^-_]\\.))+(?:[a-z\\u00a1-\\uffff]{2,})))$","i"),jd=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i;function Bd(e){const t=Vd.exec(e);return t?t[2]:null}class Fd extends xd{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,i=t.document.selection,n=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{if(i.isCollapsed)n?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const o=t.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const t of o)n?e.setAttribute(this.attributeKey,n,t):e.removeAttribute(this.attributeKey,t)}})}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,i=e.document.selection;if(i.isCollapsed)return i.hasAttribute(this.attributeKey);for(const e of i.getRanges())for(const i of e.getItems())if(t.checkAttribute(i,this.attributeKey))return i.hasAttribute(this.attributeKey);return!1}}const Hd="bold";class Ud extends vd{static get pluginName(){return"BoldEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Hd}),e.model.schema.setAttributeProperties(Hd,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Hd,view:"strong",upcastAlso:["b",e=>{const t=e.getStyle("font-weight");return t?"bold"==t||Number(t)>=600?{name:!0,styles:["font-weight"]}:void 0:null}]}),e.commands.add(Hd,new Fd(e,Hd)),e.keystrokes.set("CTRL+B",Hd)}}const Wd="bold";class qd extends vd{init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Wd,i=>{const n=e.commands.get(Wd),o=new od(i);return o.set({label:t("Bold"),icon:'',keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(o,"execute",()=>{e.execute(Wd),e.editing.view.focus()}),o})}}class $d extends vd{static get pluginName(){return"CKFinderUI"}init(){const e=this.editor,t=e.ui.componentFactory,i=e.t;t.add("ckfinder",t=>{const n=e.commands.get("ckfinder"),o=new od(t);return o.set({label:i("Insert image or file"),icon:'',tooltip:!0}),o.bind("isEnabled").to(n),o.on("execute",()=>{e.execute("ckfinder"),e.editing.view.focus()}),o})}}class Yd extends Ar{observe(e){this.listenTo(e,"load",(e,t)=>{"IMG"==t.target.tagName&&this._fireEvents(t)},{useCapture:!0})}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class Gd{constructor(){this._stack=[]}add(e,t){const i=this._stack,n=i[0];this._insertDescriptor(e);const o=i[0];n===o||Kd(n,o)||this.fire("change:top",{oldDescriptor:n,newDescriptor:o,writer:t})}remove(e,t){const i=this._stack,n=i[0];this._removeDescriptor(e);const o=i[0];n===o||Kd(n,o)||this.fire("change:top",{oldDescriptor:n,newDescriptor:o,writer:t})}_insertDescriptor(e){const t=this._stack,i=t.findIndex(t=>t.id===e.id);if(Kd(e,t[i]))return;i>-1&&t.splice(i,1);let n=0;for(;t[n]&&Jd(t[n],e);)n++;t.splice(n,0,e)}_removeDescriptor(e){const t=this._stack,i=t.findIndex(t=>t.id===e);i>-1&&t.splice(i,1)}}function Kd(e,t){return e&&t&&e.priority==t.priority&&Qd(e.classes)==Qd(t.classes)}function Jd(e,t){return e.priority>t.priority||!(e.priorityQd(t.classes)}function Qd(e){return Array.isArray(e)?e.sort().join(","):e}Mi(Gd,yi);i(43);const Zd=Hl("px"),Xd=hr.document.body;class eu extends Ol{constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class"),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",e=>"ck-balloon-panel_"+e),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",Zd),left:t.to("left",Zd)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=eu.defaultPositions,i=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast],limiter:Xd,fitInViewport:!0},e),n=eu._getOptimalPosition(i),o=parseInt(n.left),r=parseInt(n.top),s=n.name;Object.assign(this,{top:r,left:o,position:s})}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=tu(e.target),i=e.limiter?tu(e.limiter):Xd;this.listenTo(hr.document,"scroll",(n,o)=>{const r=o.target,s=t&&r.contains(t),a=i&&r.contains(i);!s&&!a&&t&&i||this.attachTo(e)},{useCapture:!0}),this.listenTo(hr.window,"resize",()=>{this.attachTo(e)})}_stopPinning(){this.stopListening(hr.document,"scroll"),this.stopListening(hr.window,"resize")}}function tu(e){return di(e)?e:us(e)?e.commonAncestorContainer:"function"==typeof e?tu(e()):null}function iu(e,t){return e.top-t.height-eu.arrowVerticalOffset}function nu(e){return e.bottom+eu.arrowVerticalOffset}eu.arrowHorizontalOffset=25,eu.arrowVerticalOffset=10,eu._getOptimalPosition=Ql,eu.defaultPositions={northWestArrowSouthWest:(e,t)=>({top:iu(e,t),left:e.left-eu.arrowHorizontalOffset,name:"arrow_sw"}),northWestArrowSouthMiddleWest:(e,t)=>({top:iu(e,t),left:e.left-.25*t.width-eu.arrowHorizontalOffset,name:"arrow_smw"}),northWestArrowSouth:(e,t)=>({top:iu(e,t),left:e.left-t.width/2,name:"arrow_s"}),northWestArrowSouthMiddleEast:(e,t)=>({top:iu(e,t),left:e.left-.75*t.width+eu.arrowHorizontalOffset,name:"arrow_sme"}),northWestArrowSouthEast:(e,t)=>({top:iu(e,t),left:e.left-t.width+eu.arrowHorizontalOffset,name:"arrow_se"}),northArrowSouthWest:(e,t)=>({top:iu(e,t),left:e.left+e.width/2-eu.arrowHorizontalOffset,name:"arrow_sw"}),northArrowSouthMiddleWest:(e,t)=>({top:iu(e,t),left:e.left+e.width/2-.25*t.width-eu.arrowHorizontalOffset,name:"arrow_smw"}),northArrowSouth:(e,t)=>({top:iu(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s"}),northArrowSouthMiddleEast:(e,t)=>({top:iu(e,t),left:e.left+e.width/2-.75*t.width+eu.arrowHorizontalOffset,name:"arrow_sme"}),northArrowSouthEast:(e,t)=>({top:iu(e,t),left:e.left+e.width/2-t.width+eu.arrowHorizontalOffset,name:"arrow_se"}),northEastArrowSouthWest:(e,t)=>({top:iu(e,t),left:e.right-eu.arrowHorizontalOffset,name:"arrow_sw"}),northEastArrowSouthMiddleWest:(e,t)=>({top:iu(e,t),left:e.right-.25*t.width-eu.arrowHorizontalOffset,name:"arrow_smw"}),northEastArrowSouth:(e,t)=>({top:iu(e,t),left:e.right-t.width/2,name:"arrow_s"}),northEastArrowSouthMiddleEast:(e,t)=>({top:iu(e,t),left:e.right-.75*t.width+eu.arrowHorizontalOffset,name:"arrow_sme"}),northEastArrowSouthEast:(e,t)=>({top:iu(e,t),left:e.right-t.width+eu.arrowHorizontalOffset,name:"arrow_se"}),southWestArrowNorthWest:(e,t)=>({top:nu(e),left:e.left-eu.arrowHorizontalOffset,name:"arrow_nw"}),southWestArrowNorthMiddleWest:(e,t)=>({top:nu(e),left:e.left-.25*t.width-eu.arrowHorizontalOffset,name:"arrow_nmw"}),southWestArrowNorth:(e,t)=>({top:nu(e),left:e.left-t.width/2,name:"arrow_n"}),southWestArrowNorthMiddleEast:(e,t)=>({top:nu(e),left:e.left-.75*t.width+eu.arrowHorizontalOffset,name:"arrow_nme"}),southWestArrowNorthEast:(e,t)=>({top:nu(e),left:e.left-t.width+eu.arrowHorizontalOffset,name:"arrow_ne"}),southArrowNorthWest:(e,t)=>({top:nu(e),left:e.left+e.width/2-eu.arrowHorizontalOffset,name:"arrow_nw"}),southArrowNorthMiddleWest:(e,t)=>({top:nu(e),left:e.left+e.width/2-.25*t.width-eu.arrowHorizontalOffset,name:"arrow_nmw"}),southArrowNorth:(e,t)=>({top:nu(e),left:e.left+e.width/2-t.width/2,name:"arrow_n"}),southArrowNorthMiddleEast:(e,t)=>({top:nu(e),left:e.left+e.width/2-.75*t.width+eu.arrowHorizontalOffset,name:"arrow_nme"}),southArrowNorthEast:(e,t)=>({top:nu(e),left:e.left+e.width/2-t.width+eu.arrowHorizontalOffset,name:"arrow_ne"}),southEastArrowNorthWest:(e,t)=>({top:nu(e),left:e.right-eu.arrowHorizontalOffset,name:"arrow_nw"}),southEastArrowNorthMiddleWest:(e,t)=>({top:nu(e),left:e.right-.25*t.width-eu.arrowHorizontalOffset,name:"arrow_nmw"}),southEastArrowNorth:(e,t)=>({top:nu(e),left:e.right-t.width/2,name:"arrow_n"}),southEastArrowNorthMiddleEast:(e,t)=>({top:nu(e),left:e.right-.75*t.width+eu.arrowHorizontalOffset,name:"arrow_nme"}),southEastArrowNorthEast:(e,t)=>({top:nu(e),left:e.right-t.width+eu.arrowHorizontalOffset,name:"arrow_ne"})};var ou='';const ru="widget-type-around";function su(e,t,i){return e&&lu(e)&&!i.isInline(t)}function au(e){return e.getAttribute(ru)}const cu="ck-widget_selected";function lu(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function du(e,t,i={}){if(!e.is("containerElement"))throw new ki.b("widget-to-widget-wrong-element-type: The element passed to toWidget() must be a container element instance.",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass("ck-widget",e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=pu,i.label&&function(e,t,i){i.setCustomProperty("widgetLabel",t,e)}(e,i.label,t),i.hasSelectionHandle&&function(e,t){const i=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(e){const t=this.toDomElement(e),i=new id;return i.set("content",ou),i.render(),t.appendChild(i.element),t}));t.insert(t.createPositionAt(e,0),i),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),uu(e,t,(e,t,i)=>i.addClass(n(t.classes),e),(e,t,i)=>i.removeClass(n(t.classes),e)),e;function n(e){return Array.isArray(e)?e:[e]}}function uu(e,t,i,n){const o=new Gd;o.on("change:top",(t,o)=>{o.oldDescriptor&&n(e,o.oldDescriptor,o.writer),o.newDescriptor&&i(e,o.newDescriptor,o.writer)}),t.setCustomProperty("addHighlight",(e,t,i)=>o.add(t,i),e),t.setCustomProperty("removeHighlight",(e,t,i)=>o.remove(t,i),e)}function hu(e){const t=e.getCustomProperty("widgetLabel");return t?"function"==typeof t?t():t:""}function mu(e,t){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",(i,n,o)=>{t.setAttribute("contenteditable",o?"false":"true",e)}),e.on("change:isFocused",(i,n,o)=>{o?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)}),e}function fu(e,t){const i=e.getSelectedElement();if(i){const n=au(e);if(n)return t.createPositionAt(i,n);if(t.schema.isBlock(i))return t.createPositionAfter(i)}const n=e.getSelectedBlocks().next().value;if(n){if(n.isEmpty)return t.createPositionAt(n,0);const i=t.createPositionAfter(n);return e.focus.isTouching(i)?i:t.createPositionBefore(n)}return e.focus}function gu(e,t){const i=new fs(hr.window),n=i.getIntersection(e),o=t.height+eu.arrowVerticalOffset;if(e.top-o>i.top||e.bottom+o!e.is("element","image"))}(i)}function yu(e){const t=[];for(const i of e.getChildren())t.push(i),i.is("element")&&t.push(...i.getChildren());return t.find(e=>e.is("element","img"))}function xu(e){return i=>{i.on(`attribute:${e}:image`,t)};function t(e,t,i){if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,o=yu(i.mapper.toViewElement(t.item));n.setAttribute(t.attributeKey,t.attributeNewValue||"",o)}}class Au extends xd{refresh(){this.isEnabled=vu(this.editor.model)}execute(e){const t=this.editor.model;t.change(i=>{const n=Array.isArray(e.source)?e.source:[e.source];for(const e of n)_u(i,t,{src:e})})}}class Cu extends vd{static get pluginName(){return"ImageEditing"}init(){const e=this.editor,t=e.model.schema,i=e.t,n=e.conversion;e.editing.view.addObserver(Yd),t.register("image",{isObject:!0,isBlock:!0,allowWhere:"$block",allowAttributes:["alt","src","srcset"]}),n.for("dataDowncast").elementToElement({model:"image",view:(e,{writer:t})=>Tu(t)}),n.for("editingDowncast").elementToElement({model:"image",view:(e,{writer:t})=>function(e,t,i){return t.setCustomProperty("image",!0,e),du(e,t,{label:function(){const t=yu(e).getAttribute("alt");return t?`${t} ${i}`:i}})}(Tu(t),t,i("image widget"))}),n.for("downcast").add(xu("src")).add(xu("alt")).add(function(){return t=>{t.on("attribute:srcset:image",e)};function e(e,t,i){if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,o=yu(i.mapper.toViewElement(t.item));if(null===t.attributeNewValue){const e=t.attributeOldValue;e.data&&(n.removeAttribute("srcset",o),n.removeAttribute("sizes",o),e.width&&n.removeAttribute("width",o))}else{const e=t.attributeNewValue;e.data&&(n.setAttribute("srcset",e.data,o),n.setAttribute("sizes","100vw",o),e.width&&n.setAttribute("width",e.width,o))}}}()),n.for("upcast").elementToElement({view:{name:"img",attributes:{src:!0}},model:(e,{writer:t})=>t.createElement("image",{src:e.getAttribute("src")})}).attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:e=>{const t={data:e.getAttribute("srcset")};return e.hasAttribute("width")&&(t.width=e.getAttribute("width")),t}}}).add(function(){return t=>{t.on("element:figure",e)};function e(e,t,i){if(!i.consumable.test(t.viewItem,{name:!0,classes:"image"}))return;const n=yu(t.viewItem);if(!n||!n.hasAttribute("src")||!i.consumable.test(n,{name:!0}))return;const o=Cd(i.convertItem(n,t.modelCursor).modelRange.getItems());o&&(i.convertChildren(t.viewItem,o),i.updateConversionResult(o,t))}}()),e.commands.add("imageInsert",new Au(e))}}function Tu(e){const t=e.createEmptyElement("img"),i=e.createContainerElement("figure",{class:"image"});return e.insert(e.createPositionAt(i,0),t),i}class Pu extends Gr{constructor(e){super(e),this.domEventType="mousedown"}onDomEvent(e){this.fire(e.type,e)}}class Su extends vd{static get pluginName(){return"TwoStepCaretMovement"}constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,i=e.editing.view,n=e.locale,o=t.document.selection;this.listenTo(i.document,"keydown",(e,t)=>{if(!o.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const i=t.keyCode==xo.arrowright,r=t.keyCode==xo.arrowleft;if(!i&&!r)return;const s=n.contentLanguageDirection;let a=!1;a="ltr"===s&&i||"rtl"===s&&r?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===a&&e.stop()},{priority:wi.get("high")+1}),this._isNextGravityRestorationSkipped=!1,this.listenTo(o,"change:range",(e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&Nu(o.getFirstPosition(),this.attributes)||this._restoreGravity())})}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,i=this.editor.model.document.selection,n=i.getFirstPosition();return!this._isGravityOverridden&&((!n.isAtStart||!Eu(i,t))&&(Nu(n,t)?(Iu(e),this._overrideGravity(),!0):void 0))}_handleBackwardMovement(e){const t=this.attributes,i=this.editor.model,n=i.document.selection,o=n.getFirstPosition();return this._isGravityOverridden?(Iu(e),this._restoreGravity(),Mu(i,t,o),!0):o.isAtStart?!!Eu(n,t)&&(Iu(e),Mu(i,t,o),!0):function(e,t){return Nu(e.getShiftedBy(-1),t)}(o,t)?o.isAtEnd&&!Eu(n,t)&&Nu(o,t)?(Iu(e),Mu(i,t,o),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):void 0}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change(e=>e.overrideSelectionGravity())}_restoreGravity(){this.editor.model.change(e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}}function Eu(e,t){for(const i of t)if(e.hasAttribute(i))return!0;return!1}function Mu(e,t,i){const n=i.nodeBefore;e.change(e=>{n?e.setSelectionAttribute(n.getAttributes()):e.removeSelectionAttribute(t)})}function Iu(e){e.preventDefault()}function Nu(e,t){const{nodeBefore:i,nodeAfter:n}=e;for(const e of t){const t=i?i.getAttribute(e):void 0;if((n?n.getAttribute(e):void 0)!==t)return!0}return!1}function Ru(e,t,i,n){return n.createRange(Ou(e,t,i,!0,n),Ou(e,t,i,!1,n))}function Ou(e,t,i,n,o){let r=e.textNode||(n?e.nodeBefore:e.nodeAfter),s=null;for(;r&&r.getAttribute(t)==i;)s=r,r=n?r.previousSibling:r.nextSibling;return s?o.createPositionAt(s,n?"before":"after"):e}class zu{constructor(e,t=20){this.model=e,this.size=0,this.limit=t,this.isLocked=!1,this._changeCallback=(e,t)=>{"transparent"!=t.type&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch()),this._batch}input(e){this.size+=e,this.size>=this.limit&&this._reset(!0)}lock(){this.isLocked=!0}unlock(){this.isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e){this.isLocked&&!e||(this._batch=null,this.size=0)}}class Du extends xd{constructor(e,t){super(e),this._buffer=new zu(e.model,t),this._batches=new WeakSet}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,i=t.document,n=e.text||"",o=n.length,r=e.range?t.createSelection(e.range):i.selection,s=e.resultRange;t.enqueueChange(this._buffer.batch,e=>{this._buffer.lock(),this._batches.add(this._buffer.batch),t.deleteContent(r),n&&t.insertContent(e.createText(n,i.selection.getAttributes()),r),s?e.setSelection(s):r.is("documentSelection")||e.setSelection(r),this._buffer.unlock(),this._buffer.input(o)})}}const Lu=[Ao("arrowUp"),Ao("arrowRight"),Ao("arrowDown"),Ao("arrowLeft"),9,16,17,18,19,20,27,33,34,35,36,45,91,93,144,145,173,174,175,176,177,178,179,255];for(let e=112;e<=135;e++)Lu.push(e);function Vu(e){return!!e.ctrlKey||Lu.includes(e.keyCode)}function ju(e){if(e.newChildren.length-e.oldChildren.length!=1)return;const t=function(e,t){const i=[];let n,o=0;return e.forEach(e=>{"equal"==e?(r(),o++):"insert"==e?(s("insert")?n.values.push(t[o]):(r(),n={type:"insert",index:o,values:[t[o]]}),o++):s("delete")?n.howMany++:(r(),n={type:"delete",index:o,howMany:1})}),r(),i;function r(){n&&(i.push(n),n=null)}function s(e){return n&&n.type==e}}(or(e.oldChildren,e.newChildren,Bu),e.newChildren);if(t.length>1)return;const i=t[0];return i.values[0]&&i.values[0].is("$text")?i:void 0}function Bu(e,t){return e&&e.is("$text")&&t&&t.is("$text")?e.data===t.data:e===t}class Fu{constructor(e){this.editor=e,this.editing=this.editor.editing}handle(e,t){if(function(e){if(0==e.length)return!1;for(const t of e)if("children"===t.type&&!ju(t))return!0;return!1}(e))this._handleContainerChildrenMutations(e,t);else for(const i of e)this._handleTextMutation(i,t),this._handleTextNodeInsertion(i)}_handleContainerChildrenMutations(e,t){const i=function(e){const t=e.map(e=>e.node).reduce((e,t)=>e.getCommonAncestor(t,{includeSelf:!0}));if(!t)return;return t.getAncestors({includeSelf:!0,parentFirst:!0}).find(e=>e.is("containerElement")||e.is("rootElement"))}(e);if(!i)return;const n=this.editor.editing.view.domConverter.mapViewToDom(i),o=new pr(this.editor.editing.view.document),r=this.editor.data.toModel(o.domToView(n)).getChild(0),s=this.editor.editing.mapper.toModelElement(i);if(!s)return;const a=Array.from(r.getChildren()),c=Array.from(s.getChildren()),l=a[a.length-1],d=c[c.length-1],u=l&&l.is("element","softBreak"),h=d&&!d.is("element","softBreak");u&&h&&a.pop();const m=this.editor.model.schema;if(!Hu(a,m)||!Hu(c,m))return;const f=a.map(e=>e.is("$text")?e.data:"@").join("").replace(/\u00A0/g," "),g=c.map(e=>e.is("$text")?e.data:"@").join("").replace(/\u00A0/g," ");if(g===f)return;const p=or(g,f),{firstChangeAt:b,insertions:w,deletions:k}=Uu(p);let _=null;t&&(_=this.editing.mapper.toModelRange(t.getFirstRange()));const v=f.substr(b,w),y=this.editor.model.createRange(this.editor.model.createPositionAt(s,b),this.editor.model.createPositionAt(s,b+k));this.editor.execute("input",{text:v,range:y,resultRange:_})}_handleTextMutation(e,t){if("text"!=e.type)return;const i=e.newText.replace(/\u00A0/g," "),n=e.oldText.replace(/\u00A0/g," ");if(n===i)return;const o=or(n,i),{firstChangeAt:r,insertions:s,deletions:a}=Uu(o);let c=null;t&&(c=this.editing.mapper.toModelRange(t.getFirstRange()));const l=this.editing.view.createPositionAt(e.node,r),d=this.editing.mapper.toModelPosition(l),u=this.editor.model.createRange(d,d.getShiftedBy(a)),h=i.substr(r,s);this.editor.execute("input",{text:h,range:u,resultRange:c})}_handleTextNodeInsertion(e){if("children"!=e.type)return;const t=ju(e),i=this.editing.view.createPositionAt(e.node,t.index),n=this.editing.mapper.toModelPosition(i),o=t.values[0].data;this.editor.execute("input",{text:o.replace(/\u00A0/g," "),range:this.editor.model.createRange(n)})}}function Hu(e,t){return e.every(e=>t.isInline(e))}function Uu(e){let t=null,i=null;for(let n=0;n{i.deleteContent(i.document.selection)}),e.unlock()}_o.isAndroid?n.document.on("beforeinput",(e,t)=>r(t),{priority:"lowest"}):n.document.on("keydown",(e,t)=>r(t),{priority:"lowest"}),n.document.on("compositionstart",(function(){const e=i.document,t=1!==e.selection.rangeCount||e.selection.getFirstRange().isFlat;e.selection.isCollapsed||t||s()}),{priority:"lowest"}),n.document.on("compositionend",()=>{t=i.createSelection(i.document.selection)},{priority:"lowest"})}(e),function(e){e.editing.view.document.on("mutations",(t,i,n)=>{new Fu(e).handle(i,n)})}(e)}isInput(e){return this.editor.commands.get("input")._batches.has(e)}}class qu{constructor(e){this.files=function(e){const t=e.files?Array.from(e.files):[],i=e.items?Array.from(e.items):[];if(t.length)return t;return i.filter(e=>"file"===e.kind).map(e=>e.getAsFile())}(e),this._native=e}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}}class $u extends Gr{constructor(e){super(e);const t=this.document;function i(e,i){i.preventDefault();const n=i.dropRange?[i.dropRange]:Array.from(t.selection.getRanges()),o=new gi(t,"clipboardInput");t.fire(o,{dataTransfer:i.dataTransfer,targetRanges:n}),o.stop.called&&i.stopPropagation()}this.domEventType=["paste","copy","cut","drop","dragover"],this.listenTo(t,"paste",i,{priority:"low"}),this.listenTo(t,"drop",i,{priority:"low"})}onDomEvent(e){const t={dataTransfer:new qu(e.clipboardData?e.clipboardData:e.dataTransfer)};"drop"==e.type&&(t.dropRange=function(e,t){const i=t.target.ownerDocument,n=t.clientX,o=t.clientY;let r;i.caretRangeFromPoint&&i.caretRangeFromPoint(n,o)?r=i.caretRangeFromPoint(n,o):t.rangeParent&&(r=i.createRange(),r.setStart(t.rangeParent,t.rangeOffset),r.collapse(!0));return r?e.domConverter.domRangeToView(r):e.document.selection.getFirstRange()}(this.view,e)),this.fire(e.type,e,t)}}const Yu=["figcaption","li"];class Gu extends vd{static get pluginName(){return"Clipboard"}init(){const e=this.editor,t=e.model.document,i=e.editing.view,n=i.document;function o(i,o){const r=o.dataTransfer;o.preventDefault();const s=e.data.toView(e.model.getSelectedContent(t.selection));n.fire("clipboardOutput",{dataTransfer:r,content:s,method:i.name})}this._htmlDataProcessor=new il(n),i.addObserver($u),this.listenTo(n,"clipboardInput",t=>{e.isReadOnly&&t.stop()},{priority:"highest"}),this.listenTo(n,"clipboardInput",(e,t)=>{const n=t.dataTransfer;let o="";var r;n.getData("text/html")?o=function(e){return e.replace(/(\s+)<\/span>/g,(e,t)=>1==t.length?" ":t)}(n.getData("text/html")):n.getData("text/plain")&&((r=(r=n.getData("text/plain")).replace(//g,">").replace(/\n/g,"

").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  ")).indexOf("

")>-1&&(r=`

${r}

`),o=r),o=this._htmlDataProcessor.toView(o);const s=new gi(this,"inputTransformation");this.fire(s,{content:o,dataTransfer:n}),s.stop.called&&e.stop(),i.scrollToTheSelection()},{priority:"low"}),this.listenTo(this,"inputTransformation",(e,i)=>{if(!i.content.isEmpty){const n=this.editor.data,o=this.editor.model,r=n.toModel(i.content,"$clipboardHolder");if(0==r.childCount)return;if(function(e){if(e.childCount>1)return!1;return 0==[...e.getChild(0).getAttributeKeys()].length}(r)){const e=r.getChild(0);o.change(i=>{i.setAttributes(t.selection.getAttributes(),e)})}o.insertContent(r),e.stop()}},{priority:"low"}),this.listenTo(n,"copy",o,{priority:"low"}),this.listenTo(n,"cut",(t,i)=>{e.isReadOnly?i.preventDefault():o(t,i)},{priority:"low"}),this.listenTo(n,"clipboardOutput",(i,n)=>{n.content.isEmpty||(n.dataTransfer.setData("text/html",this._htmlDataProcessor.toData(n.content)),n.dataTransfer.setData("text/plain",function e(t){let i="";if(t.is("$text")||t.is("$textProxy"))i=t.data;else if(t.is("element","img")&&t.hasAttribute("alt"))i=t.getAttribute("alt");else{let n=null;for(const o of t.getChildren()){const t=e(o);n&&(n.is("containerElement")||o.is("containerElement"))&&(Yu.includes(n.name)||Yu.includes(o.name)?i+="\n":i+="\n\n"),i+=t,n=o}}return i}(n.content))),"cut"==n.method&&e.model.deleteContent(t.selection)},{priority:"low"})}}class Ku{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach(e=>this._definitions.add(e)):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",(e,t,i)=>{if(!i.consumable.test(t.item,"attribute:linkHref"))return;const n=i.writer,o=n.document.selection;for(const e of this._definitions){const r=n.createAttributeElement("a",e.attributes,{priority:5});n.setCustomProperty("link",!0,r),e.callback(t.attributeNewValue)?t.item.is("selection")?n.wrap(o.getFirstRange(),r):n.wrap(i.mapper.toViewRange(t.range),r):n.unwrap(i.mapper.toViewRange(t.range),r)}},{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:image",(e,t,i)=>{const n=i.mapper.toViewElement(t.item),o=Array.from(n.getChildren()).find(e=>"a"===e.name);for(const e of this._definitions){const n=Ui(e.attributes);if(e.callback(t.attributeNewValue))for(const[e,t]of n)"class"===e?i.writer.addClass(t,o):i.writer.setAttribute(e,t,o);else for(const[e,t]of n)"class"===e?i.writer.removeClass(t,o):i.writer.removeAttribute(e,o)}})}}}var Ju=function(e,t,i){var n=e.length;return i=void 0===i?n:i,!t&&i>=n?e:un(e,t,i)},Qu=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Zu=function(e){return Qu.test(e)};var Xu=function(e){return e.split("")},eh="[\\ud800-\\udfff]",th="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ih="\\ud83c[\\udffb-\\udfff]",nh="[^\\ud800-\\udfff]",oh="(?:\\ud83c[\\udde6-\\uddff]){2}",rh="[\\ud800-\\udbff][\\udc00-\\udfff]",sh="(?:"+th+"|"+ih+")"+"?",ah="[\\ufe0e\\ufe0f]?",ch=ah+sh+("(?:\\u200d(?:"+[nh,oh,rh].join("|")+")"+ah+sh+")*"),lh="(?:"+[nh+th+"?",th,oh,rh,eh].join("|")+")",dh=RegExp(ih+"(?="+ih+")|"+lh+ch,"g");var uh=function(e){return e.match(dh)||[]};var hh=function(e){return Zu(e)?uh(e):Xu(e)};var mh=function(e){return function(t){t=sn(t);var i=Zu(t)?hh(t):void 0,n=i?i[0]:t.charAt(0),o=i?Ju(i,1).join(""):t.slice(1);return n[e]()+o}}("toUpperCase");const fh=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,gh=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,ph="Ctrl+K";function bh(e,{writer:t}){const i=t.createAttributeElement("a",{href:e},{priority:5});return t.setCustomProperty("link",!0,i),i}function wh(e){return function(e){return e.replace(fh,"").match(gh)}(e=String(e))?e:"#"}function kh(e,t){return!!e&&(e.is("element","image")&&t.checkAttribute("image","linkHref"))}class _h extends xd{constructor(e){super(e),this.manualDecorators=new Ii,this.automaticDecorators=new Ku}restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,t=e.document,i=Cd(t.selection.getSelectedBlocks());kh(i,e.schema)?(this.value=i.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(i,"linkHref")):(this.value=t.selection.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"linkHref"));for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}execute(e,t={}){const i=this.editor.model,n=i.document.selection,o=[],r=[];for(const e in t)t[e]?o.push(e):r.push(e);i.change(t=>{if(n.isCollapsed){const s=n.getFirstPosition();if(n.hasAttribute("linkHref")){const a=Ru(s,"linkHref",n.getAttribute("linkHref"),i);t.setAttribute("linkHref",e,a),o.forEach(e=>{t.setAttribute(e,!0,a)}),r.forEach(e=>{t.removeAttribute(e,a)}),t.setSelection(t.createPositionAfter(a.end.nodeBefore))}else if(""!==e){const r=Ui(n.getAttributes());r.set("linkHref",e),o.forEach(e=>{r.set(e,!0)});const a=t.createText(e,r);i.insertContent(a,s),t.setSelection(t.createPositionAfter(a))}["linkHref",...o,...r].forEach(e=>{t.removeSelectionAttribute(e)})}else{const s=i.schema.getValidRanges(n.getRanges(),"linkHref"),a=[];for(const e of n.getSelectedBlocks())i.schema.checkAttribute(e,"linkHref")&&a.push(t.createRangeOn(e));const c=a.slice();for(const e of s)this._isRangeToUpdate(e,a)&&c.push(e);for(const i of c)t.setAttribute("linkHref",e,i),o.forEach(e=>{t.setAttribute(e,!0,i)}),r.forEach(e=>{t.removeAttribute(e,i)})}})}_getDecoratorStateFromModel(e){const t=this.editor.model,i=t.document,n=Cd(i.selection.getSelectedBlocks());return kh(n,t.schema)?n.getAttribute(e):i.selection.getAttribute(e)}_isRangeToUpdate(e,t){for(const i of t)if(i.containsRange(e))return!1;return!0}}class vh extends xd{refresh(){const e=this.editor.model,t=e.document,i=Cd(t.selection.getSelectedBlocks());kh(i,e.schema)?this.isEnabled=e.schema.checkAttribute(i,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"linkHref")}execute(){const e=this.editor,t=this.editor.model,i=t.document.selection,n=e.commands.get("link");t.change(e=>{const o=i.isCollapsed?[Ru(i.getFirstPosition(),"linkHref",i.getAttribute("linkHref"),t)]:i.getRanges();for(const t of o)if(e.removeAttribute("linkHref",t),n)for(const i of n.manualDecorators)e.removeAttribute(i.id,t)})}}class yh{constructor({id:e,label:t,attributes:i,defaultValue:n}){this.id=e,this.set("value"),this.defaultValue=n,this.label=t,this.attributes=i}}Mi(yh,Jn);i(45);const xh="automatic",Ah=/^(https?:)?\/\//;class Ch extends vd{static get pluginName(){return"LinkEditing"}static get requires(){return[Su,Wu,Gu]}constructor(e){super(e),e.config.define("link",{addTargetToExternalLinks:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:bh}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>bh(wh(e),t)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),e.commands.add("link",new _h(e)),e.commands.add("unlink",new vh(e));const t=function(e,t){const i={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach(e=>(e.label&&i[e.label]&&(e.label=i[e.label]),e)),t}(e.t,function(e){const t=[];if(e)for(const[i,n]of Object.entries(e)){const e=Object.assign({},n,{id:"link"+mh(i)});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(t.filter(e=>e.mode===xh)),this._enableManualDecorators(t.filter(e=>"manual"===e.mode));e.plugins.get(Su).registerAttribute("linkHref"),function(e,t,i,n){const o=e.editing.view,r=new Set;o.document.registerPostFixer(o=>{const s=e.model.document.selection;let a=!1;if(s.hasAttribute(t)){const c=Ru(s.getFirstPosition(),t,s.getAttribute(t),e.model),l=e.editing.mapper.toViewRange(c);for(const e of l.getItems())e.is("element",i)&&!e.hasClass(n)&&(o.addClass(n,e),r.add(e),a=!0)}return a}),e.conversion.for("editingDowncast").add(e=>{function t(){o.change(e=>{for(const t of r.values())e.removeClass(n,t),r.delete(t)})}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})})}(e,"linkHref","a","ck-link_selected"),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink()}_enableAutomaticDecorators(e){const t=this.editor,i=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&i.add({id:"linkIsExternal",mode:xh,callback:e=>Ah.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),i.add(e),i.length&&t.conversion.for("downcast").add(i.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,i=t.commands.get("link").manualDecorators;e.forEach(e=>{t.model.schema.extend("$text",{allowAttributes:e.id}),i.add(new yh(e)),t.conversion.for("downcast").attributeToElement({model:e.id,view:(t,{writer:n})=>{if(t){const t=i.get(e.id).attributes,o=n.createAttributeElement("a",t,{priority:5});return n.setCustomProperty("link",!0,o),o}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:i.get(e.id).attributes},model:{key:e.id}})})}_enableInsertContentSelectionAttributesFixer(){const e=this.editor,t=e.model,i=t.document.selection,n=e.commands.get("link");this.listenTo(t,"insertContent",()=>{const e=i.anchor.nodeBefore,o=i.anchor.nodeAfter;i.hasAttribute("linkHref")&&e&&e.hasAttribute("linkHref")&&(o&&o.hasAttribute("linkHref")||t.change(e=>{Th(e,n.manualDecorators)}))},{priority:"low"})}_enableClickingAfterLink(){const e=this.editor,t=e.commands.get("link");e.editing.view.addObserver(Pu);let i=!1;this.listenTo(e.editing.view.document,"mousedown",()=>{i=!0}),this.listenTo(e.editing.view.document,"selectionChange",()=>{if(!i)return;i=!1;const n=e.model.document.selection;if(!n.isCollapsed)return;if(!n.hasAttribute("linkHref"))return;const o=n.getFirstPosition(),r=Ru(o,"linkHref",n.getAttribute("linkHref"),e.model);(o.isTouching(r.start)||o.isTouching(r.end))&&e.model.change(e=>{Th(e,t.manualDecorators)})})}_enableTypingOverLink(){const e=this.editor,t=e.editing.view;let i,n;this.listenTo(t.document,"delete",()=>{n=!0},{priority:"high"}),this.listenTo(e.model,"deleteContent",()=>{const t=e.model.document.selection;t.isCollapsed||(n?n=!1:Ph(e)&&function(e){const t=e.document.selection,i=t.getFirstPosition(),n=t.getLastPosition(),o=i.nodeAfter;if(!o)return!1;if(!o.is("$text"))return!1;if(!o.hasAttribute("linkHref"))return!1;const r=n.textNode||n.nodeBefore;if(o===r)return!0;return Ru(i,"linkHref",o.getAttribute("linkHref"),e).containsRange(e.createRange(i,n),!0)}(e.model)&&(i=t.getAttributes()))},{priority:"high"}),this.listenTo(e.model,"insertContent",(t,[o])=>{n=!1,Ph(e)&&i&&(e.model.change(e=>{for(const[t,n]of i)e.setAttribute(t,n,o)}),i=null)},{priority:"high"})}_handleDeleteContentAfterLink(){const e=this.editor,t=e.model,i=t.document.selection,n=e.editing.view,o=e.commands.get("link");let r=!1,s=!1;this.listenTo(n.document,"delete",(e,t)=>{s=t.domEvent.keyCode===xo.backspace},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{r=!1;const e=i.getFirstPosition(),n=i.getAttribute("linkHref");if(!n)return;const o=Ru(e,"linkHref",n,t);r=o.containsPosition(e)||o.end.isEqual(e)},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{s&&(s=!1,r||e.model.enqueueChange(e=>{Th(e,o.manualDecorators)}))},{priority:"low"})}}function Th(e,t){e.removeSelectionAttribute("linkHref");for(const i of t)e.removeSelectionAttribute(i.id)}function Ph(e){return e.plugins.get("Input").isInput(e.model.change(e=>e.batch))}class Sh{constructor(e){this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}Mi(Sh,Jn);class Eh extends Sh{static get pluginName(){return"Notification"}init(){this.on("show:warning",(e,t)=>{window.alert(t.message)},{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t="show:"+e.type+(e.namespace?":"+e.namespace:"");this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}class Mh extends xd{constructor(e){super(e),this.stopListening(this.editor.model.document,"change"),this.listenTo(this.editor.model.document,"change",()=>this.refresh(),{priority:"low"})}refresh(){const e=this.editor.commands.get("imageInsert"),t=this.editor.commands.get("link");this.isEnabled=e.isEnabled||t.isEnabled}execute(){const e=this.editor,t=this.editor.config.get("ckfinder.openerMethod")||"modal";if("popup"!=t&&"modal"!=t)throw new ki.b('ckfinder-unknown-openerMethod: The openerMethod config option must by "popup" or "modal".',e);const i=this.editor.config.get("ckfinder.options")||{};i.chooseFiles=!0;const n=i.onInit;i.language||(i.language=e.locale.uiLanguage),i.onInit=t=>{n&&n(t),t.on("files:choose",i=>{const n=i.data.files.toArray(),o=n.filter(e=>!e.isImage()),r=n.filter(e=>e.isImage());for(const t of o)e.execute("link",t.getUrl());const s=[];for(const e of r){const i=e.getUrl();s.push(i||t.request("file:getProxyUrl",{file:e}))}s.length&&Ih(e,s)}),t.on("file:choose:resizedImage",t=>{const i=t.data.resizedUrl;if(i)Ih(e,[i]);else{const t=e.plugins.get("Notification"),i=e.locale.t;t.showWarning(i("Could not obtain resized image URL."),{title:i("Selecting resized image failed"),namespace:"ckfinder"})}})},window.CKFinder[t](i)}}function Ih(e,t){if(e.commands.get("imageInsert").isEnabled)e.execute("imageInsert",{source:t});else{const t=e.plugins.get("Notification"),i=e.locale.t;t.showWarning(i("Could not insert image at the current position."),{title:i("Inserting image failed"),namespace:"ckfinder"})}}class Nh extends vd{static get pluginName(){return"CKFinderEditing"}static get requires(){return[Eh,Cu,Ch]}init(){const e=this.editor;e.commands.add("ckfinder",new Mh(e))}}class Rh extends Sh{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new Ii({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new ki.b("pendingactions-add-invalid-message: The message must be a string.",this);const t=Object.create(Jn);return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}class Oh{constructor(){const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise((i,n)=>{t.onload=()=>{const e=t.result;this._data=e,i(e)},t.onerror=()=>{n("error")},t.onabort=()=>{n("aborted")},this._reader.readAsDataURL(e)})}abort(){this._reader.abort()}}Mi(Oh,Jn);class zh extends vd{static get pluginName(){return"FileRepository"}static get requires(){return[Rh]}init(){this.loaders=new Ii,this.loaders.on("add",()=>this._updatePendingAction()),this.loaders.on("remove",()=>this._updatePendingAction()),this._loadersMap=new Map,this._pendingAction=null,this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(e,t)=>t?e/t*100:0)}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return console.warn(Object(ki.a)("filerepository-no-upload-adapter: Upload adapter is not defined.")),null;const t=new Dh(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then(e=>{this._loadersMap.set(e,t)}).catch(()=>{}),t.on("change:uploaded",()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e}),t.on("change:uploadTotal",()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e}),t}destroyLoader(e){const t=e instanceof Dh?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach((e,i)=>{e===t&&this._loadersMap.delete(i)})}_updatePendingAction(){const e=this.editor.plugins.get(Rh);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,i=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(i(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",i)}}else e.remove(this._pendingAction),this._pendingAction=null}}Mi(zh,Jn);class Dh{constructor(e,t){this.id=bi(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new Oh,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(e,t)=>t?e/t*100:0),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then(e=>this._filePromiseWrapper?e:null):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new ki.b("filerepository-read-wrong-status: You cannot call read if the status is different than idle.",this);return this.status="reading",this.file.then(e=>this._reader.read(e)).then(e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e}).catch(e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e})}upload(){if("idle"!=this.status)throw new ki.b("filerepository-upload-wrong-status: You cannot call upload if the status is different than idle.",this);return this.status="uploading",this.file.then(()=>this._adapter.upload()).then(e=>(this.uploadResponse=e,this.status="idle",e)).catch(e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e})}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch(()=>{}),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise((i,n)=>{t.rejecter=n,t.isFulfilled=!1,e.then(e=>{t.isFulfilled=!0,i(e)}).catch(e=>{t.isFulfilled=!0,n(e)})}),t}}Mi(Dh,Jn);const Lh="ckCsrfToken",Vh="abcdefghijklmnopqrstuvwxyz0123456789";function jh(){let e=function(e){e=e.toLowerCase();const t=document.cookie.split(";");for(const i of t){const t=i.split("=");if(decodeURIComponent(t[0].trim().toLowerCase())===e)return decodeURIComponent(t[1])}return null}(Lh);var t,i;return e&&40==e.length||(e=function(e){let t="";const i=new Uint8Array(e);window.crypto.getRandomValues(i);for(let e=0;e.5?n.toUpperCase():n}return t}(40),t=Lh,i=e,document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(i)+";path=/"),e}class Bh extends vd{static get requires(){return[zh]}static get pluginName(){return"CKFinderUploadAdapter"}init(){const e=this.editor.config.get("ckfinder.uploadUrl");e&&(this.editor.plugins.get(zh).createUploadAdapter=t=>new Fh(t,e,this.editor.t))}}class Fh{constructor(e,t,i){this.loader=e,this.url=t,this.t=i}upload(){return this.loader.file.then(e=>new Promise((t,i)=>{this._initRequest(),this._initListeners(t,i,e),this._sendRequest(e)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.url,!0),e.responseType="json"}_initListeners(e,t,i){const n=this.xhr,o=this.loader,r=(0,this.t)("Cannot upload file:")+` ${i.name}.`;n.addEventListener("error",()=>t(r)),n.addEventListener("abort",()=>t()),n.addEventListener("load",()=>{const i=n.response;if(!i||!i.uploaded)return t(i&&i.error&&i.error.message?i.error.message:r);e({default:i.url})}),n.upload&&n.upload.addEventListener("progress",e=>{e.lengthComputable&&(o.uploadTotal=e.total,o.uploaded=e.loaded)})}_sendRequest(e){const t=new FormData;t.append("upload",e),t.append("ckCsrfToken",jh()),this.xhr.send(t)}}function*Hh(e,t){for(const i of t)i&&e.getAttributeProperties(i[0]).copyOnEnter&&(yield i)}class Uh extends xd{execute(){const e=this.editor.model,t=e.document;e.change(i=>{!function(e,t,i,n){const o=i.isCollapsed,r=i.getFirstRange(),s=r.start.parent,a=r.end.parent;if(n.isLimit(s)||n.isLimit(a))return void(o||s!=a||e.deleteContent(i));if(o){const e=Hh(t.model.schema,i.getAttributes());Wh(t,r.start),t.setSelectionAttribute(e)}else{const n=!(r.start.isAtStart&&r.end.isAtEnd),o=s==a;e.deleteContent(i,{leaveUnmerged:n}),n&&(o?Wh(t,i.focus):t.setSelection(a,0))}}(this.editor.model,i,t.selection,e.schema),this.fire("afterExecute",{writer:i})})}}function Wh(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}class qh extends Ar{constructor(e){super(e);const t=this.document;t.on("keydown",(e,i)=>{if(this.isEnabled&&i.keyCode==xo.enter){let n;t.once("enter",e=>n=e,{priority:"highest"}),t.fire("enter",new Yr(t,i.domEvent,{isSoft:i.shiftKey})),n&&n.stop.called&&e.stop()}})}observe(){}}class $h extends vd{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,i=t.document;t.addObserver(qh),e.commands.add("enter",new Uh(e)),this.listenTo(i,"enter",(i,n)=>{n.preventDefault(),n.isSoft||(e.execute("enter"),t.scrollToTheSelection())},{priority:"low"})}}class Yh extends xd{execute(){const e=this.editor.model,t=e.document;e.change(i=>{!function(e,t,i){const n=i.isCollapsed,o=i.getFirstRange(),r=o.start.parent,s=o.end.parent,a=r==s;if(n){const n=Hh(e.schema,i.getAttributes());Gh(e,t,o.end),t.removeSelectionAttribute(i.getAttributeKeys()),t.setSelectionAttribute(n)}else{const n=!(o.start.isAtStart&&o.end.isAtEnd);e.deleteContent(i,{leaveUnmerged:n}),a?Gh(e,t,i.focus):n&&t.setSelection(s,0)}}(e,i,t.selection),this.fire("afterExecute",{writer:i})})}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const i=t.anchor;if(!i||!e.checkChild(i,"softBreak"))return!1;const n=t.getFirstRange(),o=n.start.parent,r=n.end.parent;if((Kh(o,e)||Kh(r,e))&&o!==r)return!1;return!0}(e.schema,t.selection)}}function Gh(e,t,i){const n=t.createElement("softBreak");e.insertContent(n,i),t.setSelection(n,"after")}function Kh(e,t){return!e.is("rootElement")&&(t.isLimit(e)||Kh(e.parent,t))}class Jh extends vd{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,i=e.conversion,n=e.editing.view,o=n.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),i.for("upcast").elementToElement({model:"softBreak",view:"br"}),i.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),n.addObserver(qh),e.commands.add("shiftEnter",new Yh(e)),this.listenTo(o,"enter",(t,i)=>{i.preventDefault(),i.isSoft&&(e.execute("shiftEnter"),n.scrollToTheSelection())},{priority:"low"})}}class Qh extends xd{execute(){const e=this.editor.model,t=e.document.selection;let i=e.schema.getLimitElement(t);if(t.containsEntireContent(i)||!Zh(e.schema,i))do{if(i=i.parent,!i)return}while(!Zh(e.schema,i));e.change(e=>{e.setSelection(i,"in")})}}function Zh(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const Xh=Co("Ctrl+A");class em extends vd{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new Qh(e)),this.listenTo(t,"keydown",(t,i)=>{Ao(i)===Xh&&(e.execute("selectAll"),i.preventDefault())})}}class tm extends vd{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",t=>{const i=e.commands.get("selectAll"),n=new od(t),o=t.t;return n.set({label:o("Select all"),icon:'',keystroke:"Ctrl+A",tooltip:!0}),n.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(n,"execute",()=>{e.execute("selectAll"),e.editing.view.focus()}),n})}}class im extends vd{static get requires(){return[em,tm]}static get pluginName(){return"SelectAll"}}class nm extends xd{constructor(e,t){super(e),this.direction=t,this._buffer=new zu(e.model,e.config.get("typing.undoStep"))}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,i=t.document;t.enqueueChange(this._buffer.batch,n=>{this._buffer.lock();const o=n.createSelection(e.selection||i.selection),r=o.isCollapsed;if(o.isCollapsed&&t.modifySelection(o,{direction:this.direction,unit:e.unit}),this._shouldEntireContentBeReplacedWithParagraph(e.sequence||1))return void this._replaceEntireContentWithParagraph(n);if(o.isCollapsed)return;let s=0;o.getFirstRange().getMinimalFlatRanges().forEach(e=>{s+=lo(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),t.deleteContent(o,{doNotResetEntireContent:r,direction:this.direction}),this._buffer.input(s),n.setSelection(o),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,i=t.document.selection,n=t.schema.getLimitElement(i);if(!(i.isCollapsed&&i.containsEntireContent(n)))return!1;if(!t.schema.checkChild(n,"paragraph"))return!1;const o=n.getChild(0);return!o||"paragraph"!==o.name}_replaceEntireContentWithParagraph(e){const t=this.editor.model,i=t.document.selection,n=t.schema.getLimitElement(i),o=e.createElement("paragraph");e.remove(e.createRangeIn(n)),e.insert(o,n),e.setSelection(o,0)}}class om extends Ar{constructor(e){super(e);const t=e.document;let i=0;function n(e,i,n){let o;t.once("delete",e=>o=e,{priority:Number.POSITIVE_INFINITY}),t.fire("delete",new Yr(t,i,n)),o&&o.stop.called&&e.stop()}t.on("keyup",(e,t)=>{t.keyCode!=xo.delete&&t.keyCode!=xo.backspace||(i=0)}),t.on("keydown",(e,t)=>{const o={};if(t.keyCode==xo.delete)o.direction="forward",o.unit="character";else{if(t.keyCode!=xo.backspace)return;o.direction="backward",o.unit="codePoint"}const r=_o.isMac?t.altKey:t.ctrlKey;o.unit=r?"word":o.unit,o.sequence=++i,n(e,t.domEvent,o)}),_o.isAndroid&&t.on("beforeinput",(t,i)=>{if("deleteContentBackward"!=i.domEvent.inputType)return;const o={unit:"codepoint",direction:"backward",sequence:1},r=i.domTarget.ownerDocument.defaultView.getSelection();r.anchorNode==r.focusNode&&r.anchorOffset+1!=r.focusOffset&&(o.selectionToRemove=e.domConverter.domSelectionToView(r)),n(t,i.domEvent,o)})}observe(){}}class rm extends vd{static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,i=t.document;if(t.addObserver(om),e.commands.add("forwardDelete",new nm(e,"forward")),e.commands.add("delete",new nm(e,"backward")),this.listenTo(i,"delete",(i,n)=>{const o={unit:n.unit,sequence:n.sequence};if(n.selectionToRemove){const t=e.model.createSelection(),i=[];for(const t of n.selectionToRemove.getRanges())i.push(e.editing.mapper.toModelRange(t));t.setTo(i),o.selection=t}e.execute("forward"==n.direction?"forwardDelete":"delete",o),n.preventDefault(),t.scrollToTheSelection()}),_o.isAndroid){let e=null;this.listenTo(i,"delete",(t,i)=>{const n=i.domTarget.ownerDocument.defaultView.getSelection();e={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}},{priority:"lowest"}),this.listenTo(i,"keyup",(t,i)=>{if(e){const t=i.domTarget.ownerDocument.defaultView.getSelection();t.collapse(e.anchorNode,e.anchorOffset),t.extend(e.focusNode,e.focusOffset),e=null}})}}}class sm extends vd{static get requires(){return[Wu,rm]}static get pluginName(){return"Typing"}}const am=new Map;function cm(e,t,i){let n=am.get(e);n||(n=new Map,am.set(e,n)),n.set(t,i)}function lm(e){return[e]}function dm(e,t,i={}){const n=function(e,t){const i=am.get(e);return i&&i.has(t)?i.get(t):lm}(e.constructor,t.constructor);try{return n(e=e.clone(),t,i)}catch(e){throw e}}function um(e,t,i){e=e.slice(),t=t.slice();const n=new hm(i.document,i.useRelations,i.forceWeakRemove);n.setOriginalOperations(e),n.setOriginalOperations(t);const o=n.originalOperations;if(0==e.length||0==t.length)return{operationsA:e,operationsB:t,originalOperations:o};const r=new WeakMap;for(const t of e)r.set(t,0);const s={nextBaseVersionA:e[e.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:e.length,originalOperationsBCount:t.length};let a=0;for(;a{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const n=e.range.getDifference(t.range).map(t=>new tc(t,e.key,e.oldValue,e.newValue,0)),o=e.range.getIntersection(t.range);return o&&i.aIsStrong&&n.push(new tc(o,t.key,t.newValue,e.newValue,0)),0==n.length?[new Ec(0)]:n}return[e]}),cm(tc,oc,(e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const i=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map(t=>new tc(t,e.key,e.oldValue,e.newValue,e.baseVersion));if(t.shouldReceiveAttributes){const n=gm(t,e.key,e.oldValue);n&&i.unshift(n)}return i}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]}),cm(tc,cc,(e,t)=>{const i=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&i.push(js._createFromPositionAndShift(t.graveyardPosition,1));const n=e.range._getTransformedByMergeOperation(t);return n.isCollapsed||i.push(n),i.map(t=>new tc(t,e.key,e.oldValue,e.newValue,e.baseVersion))}),cm(tc,nc,(e,t)=>function(e,t){const i=js._createFromPositionAndShift(t.sourcePosition,t.howMany);let n=null,o=[];i.containsRange(e,!0)?n=e:e.start.hasSameParentAs(i.start)?(o=e.getDifference(i),n=e.getIntersection(i)):o=[e];const r=[];for(let e of o){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const i=t.getMovedRangeStart(),n=e.start.hasSameParentAs(i);e=e._getTransformedByInsertion(i,t.howMany,n),r.push(...e)}n&&r.push(n._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]);return r}(e.range,t).map(t=>new tc(t,e.key,e.oldValue,e.newValue,e.baseVersion))),cm(tc,lc,(e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const i=e.clone();return i.range=new js(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,i]}return e.range=e.range._getTransformedBySplitOperation(t),[e]}),cm(oc,tc,(e,t)=>{const i=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const n=gm(e,t.key,t.newValue);n&&i.push(n)}return i}),cm(oc,oc,(e,t,i)=>(e.position.isEqual(t.position)&&i.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e])),cm(oc,nc,(e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e])),cm(oc,lc,(e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e])),cm(oc,cc,(e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e])),cm(rc,oc,(e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e])),cm(rc,rc,(e,t,i)=>{if(e.name==t.name){if(!i.aIsStrong)return[new Ec(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]}),cm(rc,cc,(e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e])),cm(rc,nc,(e,t,i)=>{if(e.oldRange&&(e.oldRange=js._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(i.abRelation){const n=js._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==i.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.start.path=i.abRelation.path,e.newRange.end=n.end,[e];if("right"==i.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=n.start,e.newRange.end.path=i.abRelation.path,[e]}e.newRange=js._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]}),cm(rc,lc,(e,t,i)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(i.abRelation){const n=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&i.abRelation.wasStartBeforeMergedElement?e.newRange.start=zs._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!i.abRelation.wasInLeftElement&&(e.newRange.start=zs._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&i.abRelation.wasInRightElement?e.newRange.end=zs._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&i.abRelation.wasEndBeforeMergedElement?e.newRange.end=zs._createAt(t.insertionPosition):e.newRange.end=n.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]}),cm(cc,oc,(e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e])),cm(cc,cc,(e,t,i)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(i.bWasUndone){const i=t.graveyardPosition.path.slice();return i.push(0),e.sourcePosition=new zs(t.graveyardPosition.root,i),e.howMany=0,[e]}return[new Ec(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!i.bWasUndone&&"splitAtSource"!=i.abRelation){const n="$graveyard"==e.targetPosition.root.rootName,o="$graveyard"==t.targetPosition.root.rootName,r=n&&!o;if(o&&!n||!r&&i.aIsStrong){const i=t.targetPosition._getTransformedByMergeOperation(t),n=e.targetPosition._getTransformedByMergeOperation(t);return[new nc(i,e.howMany,n,0)]}return[new Ec(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&i.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]}),cm(cc,nc,(e,t,i)=>{const n=js._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!i.bWasUndone&&!i.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.sourcePosition)?[new Ec(0)]:(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])}),cm(cc,lc,(e,t,i)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const n=0!=t.howMany,o=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(n||o||"mergeTargetNotMoved"==i.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==i.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==i.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}),cm(nc,oc,(e,t)=>{const i=js._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=i.start,e.howMany=i.end.offset-i.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]}),cm(nc,nc,(e,t,i)=>{const n=js._createFromPositionAndShift(e.sourcePosition,e.howMany),o=js._createFromPositionAndShift(t.sourcePosition,t.howMany);let r,s=i.aIsStrong,a=!i.aIsStrong;if("insertBefore"==i.abRelation||"insertAfter"==i.baRelation?a=!0:"insertAfter"!=i.abRelation&&"insertBefore"!=i.baRelation||(a=!1),r=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),pm(e,t)&&pm(t,e))return[t.getReversed()];if(n.containsPosition(t.targetPosition)&&n.containsRange(o,!0))return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),bm([n],r);if(o.containsPosition(e.targetPosition)&&o.containsRange(n,!0))return n.start=n.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),n.end=n.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),bm([n],r);const c=Vi(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==c||"extension"==c)return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),bm([n],r);"remove"!=e.type||"remove"==t.type||i.aWasUndone||i.forceWeakRemove?"remove"==e.type||"remove"!=t.type||i.bWasUndone||i.forceWeakRemove||(s=!1):s=!0;const l=[],d=n.getDifference(o);for(const e of d){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const i="same"==Vi(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),n=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,i);l.push(...n)}const u=n.getIntersection(o);return null!==u&&s&&(u.start=u.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),u.end=u.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===l.length?l.push(u):1==l.length?o.start.isBefore(n.start)||o.start.isEqual(n.start)?l.unshift(u):l.push(u):l.splice(1,0,u)),0===l.length?[new Ec(e.baseVersion)]:bm(l,r)}),cm(nc,lc,(e,t,i)=>{let n=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=i.abRelation||(n=e.targetPosition._getTransformedBySplitOperation(t));const o=js._createFromPositionAndShift(e.sourcePosition,e.howMany);if(o.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=n,[e];if(o.start.hasSameParentAs(t.splitPosition)&&o.containsPosition(t.splitPosition)){let e=new js(t.splitPosition,o.end);e=e._getTransformedBySplitOperation(t);return bm([new js(o.start,t.splitPosition),e],n)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==i.abRelation&&(n=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==i.abRelation&&(n=e.targetPosition);const r=[o._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const n=o.start.isEqual(t.graveyardPosition)||o.containsPosition(t.graveyardPosition);e.howMany>1&&n&&!i.aWasUndone&&r.push(js._createFromPositionAndShift(t.insertionPosition,1))}return bm(r,n)}),cm(nc,cc,(e,t,i)=>{const n=js._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.sourcePosition))if("remove"!=e.type||i.forceWeakRemove){if(1==e.howMany)return i.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new Ec(0)]}else if(!i.aWasUndone){const i=[];let n=t.graveyardPosition.clone(),o=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(i.push(new nc(e.sourcePosition,e.howMany-1,e.targetPosition,0)),n=n._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),o=o._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const r=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),s=new nc(n,1,r,0),a=s.getMovedRangeStart().path.slice();a.push(0);const c=new zs(s.targetPosition.root,a);o=o._getTransformedByMove(n,r,1);const l=new nc(o,t.howMany,c,0);return i.push(s),i.push(l),i}const o=js._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=o.start,e.howMany=o.end.offset-o.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]}),cm(sc,oc,(e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e])),cm(sc,cc,(e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e])),cm(sc,nc,(e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e])),cm(sc,sc,(e,t,i)=>{if(e.position.isEqual(t.position)){if(!i.aIsStrong)return[new Ec(0)];e.oldName=t.newName}return[e]}),cm(sc,lc,(e,t)=>{if("same"==Vi(e.position.path,t.splitPosition.getParentPath())&&!t.graveyardPosition){const t=new sc(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]}),cm(ac,ac,(e,t,i)=>{if(e.root===t.root&&e.key===t.key){if(!i.aIsStrong||e.newValue===t.newValue)return[new Ec(0)];e.oldValue=t.newValue}return[e]}),cm(lc,oc,(e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset{if(!e.graveyardPosition&&!i.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const i=t.graveyardPosition.path.slice();i.push(0);const n=new zs(t.graveyardPosition.root,i),o=lc.getInsertionPosition(new zs(t.graveyardPosition.root,i)),r=new lc(n,0,null,0);return r.insertionPosition=o,e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=lc.getInsertionPosition(e.splitPosition),e.graveyardPosition=r.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[r,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=lc.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]}),cm(lc,nc,(e,t,i)=>{const n=js._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const o=n.start.isEqual(e.graveyardPosition)||n.containsPosition(e.graveyardPosition);if(!i.bWasUndone&&o){const i=e.splitPosition._getTransformedByMoveOperation(t),n=e.graveyardPosition._getTransformedByMoveOperation(t),o=n.path.slice();o.push(0);const r=new zs(n.root,o);return[new nc(i,e.howMany,r,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.splitPosition)){const i=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=i,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new Ec(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new Ec(0)];if("splitBefore"==i.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const n="$graveyard"==e.splitPosition.root.rootName,o="$graveyard"==t.splitPosition.root.rootName,r=n&&!o;if(o&&!n||!r&&i.aIsStrong){const i=[];return t.howMany&&i.push(new nc(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&i.push(new nc(e.splitPosition,e.howMany,e.moveTargetPosition,0)),i}return[new Ec(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==i.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==i.baRelation){const i=t.insertionPosition.path.slice();i.push(0);const n=new zs(t.insertionPosition.root,i);return[e,new nc(e.insertionPosition,1,n,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offsetthis.clearStack())}refresh(){this.isEnabled=this._stack.length>0}addBatch(e){const t=this.editor.model.document.selection,i={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:i}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,i){const n=this.editor.model,o=n.document,r=[],s=e.map(e=>e.getTransformedByOperations(i)),a=s.flat();for(const e of s){const t=e.filter(e=>!_m(e,a));km(t);const i=t.find(e=>e.root!=o.graveyard);i&&r.push(i)}r.length&&n.change(e=>{e.setSelection(r,{backward:t})})}_undo(e,t){const i=this.editor.model,n=i.document;this._createdBatches.add(t);const o=e.operations.slice().filter(e=>e.isDocumentOperation);o.reverse();for(const e of o){const o=e.baseVersion+1,r=Array.from(n.history.getOperations(o)),s=um([e.getReversed()],r,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(const o of s)t.addOperation(o),i.applyOperation(o),n.history.setOperationAsUndone(e,o)}}}function km(e){e.sort((e,t)=>e.start.isBefore(t.start)?-1:1);for(let t=1;tt!==e&&t.containsRange(e,!0))}class vm extends wm{execute(e=null){const t=e?this._stack.findIndex(t=>t.batch==e):this._stack.length-1,i=this._stack.splice(t,1)[0],n=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(n,()=>{this._undo(i.batch,n);const e=this.editor.model.document.history.getOperations(i.batch.baseVersion);this._restoreSelection(i.selection.ranges,i.selection.isBackward,e),this.fire("revert",i.batch,n)}),this.refresh()}}class ym extends wm{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(t,()=>{const i=e.batch.operations[e.batch.operations.length-1].baseVersion+1,n=this.editor.model.document.history.getOperations(i);this._restoreSelection(e.selection.ranges,e.selection.isBackward,n),this._undo(e.batch,t)}),this.refresh()}}class xm extends vd{static get pluginName(){return"UndoEditing"}constructor(e){super(e),this._batchRegistry=new WeakSet}init(){const e=this.editor;this._undoCommand=new vm(e),this._redoCommand=new ym(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",(e,t)=>{const i=t[0];if(!i.isDocumentOperation)return;const n=i.batch,o=this._redoCommand._createdBatches.has(n),r=this._undoCommand._createdBatches.has(n);this._batchRegistry.has(n)||"transparent"==n.type&&!o&&!r||(o?this._undoCommand.addBatch(n):r||(this._undoCommand.addBatch(n),this._redoCommand.clearStack()),this._batchRegistry.add(n))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(e,t,i)=>{this._redoCommand.addBatch(i)}),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo")}}var Am='',Cm='';class Tm extends vd{init(){const e=this.editor,t=e.locale,i=e.t,n="ltr"==t.uiLanguageDirection?Am:Cm,o="ltr"==t.uiLanguageDirection?Cm:Am;this._addButton("undo",i("Undo"),"CTRL+Z",n),this._addButton("redo",i("Redo"),"CTRL+Y",o)}_addButton(e,t,i,n){const o=this.editor;o.ui.componentFactory.add(e,r=>{const s=o.commands.get(e),a=new od(r);return a.set({label:t,icon:n,keystroke:i,tooltip:!0}),a.bind("isEnabled").to(s,"isEnabled"),this.listenTo(a,"execute",()=>{o.execute(e),o.editing.view.focus()}),a})}}class Pm extends vd{static get requires(){return[xm,Tm]}static get pluginName(){return"Undo"}}class Sm extends xd{refresh(){this.isEnabled=function(e){const t=e.schema,i=e.document.selection;return function(e,t,i){const n=function(e,t){const i=fu(e,t).parent;if(i.isEmpty&&!i.is("element","$root"))return i.parent;return i}(e,i);return t.checkChild(n,"horizontalLine")}(i,t,e)&&!function(e,t){const i=e.getSelectedElement();return i&&t.isObject(i)}(i,t)}(this.editor.model)}execute(){const e=this.editor.model;e.change(t=>{const i=t.createElement("horizontalLine");e.insertContent(i);let n=i.nextSibling;!(n&&e.schema.checkChild(n,"$text"))&&e.schema.checkChild(i.parent,"paragraph")&&(n=t.createElement("paragraph"),e.insertContent(n,t.createPositionAfter(i))),n&&t.setSelection(n,0)})}}i(47);class Em extends vd{static get pluginName(){return"HorizontalLineEditing"}init(){const e=this.editor,t=e.model.schema,i=e.t,n=e.conversion;t.register("horizontalLine",{isObject:!0,allowWhere:"$block"}),n.for("dataDowncast").elementToElement({model:"horizontalLine",view:(e,{writer:t})=>t.createEmptyElement("hr")}),n.for("editingDowncast").elementToElement({model:"horizontalLine",view:(e,{writer:t})=>{const n=i("Horizontal line"),o=t.createContainerElement("div"),r=t.createEmptyElement("hr");return t.addClass("ck-horizontal-line",o),t.setCustomProperty("hr",!0,o),t.insert(t.createPositionAt(o,0),r),function(e,t,i){return t.setCustomProperty("horizontalLine",!0,e),du(e,t,{label:i})}(o,t,n)}}),n.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),e.commands.add("horizontalLine",new Sm(e))}}class Mm extends vd{init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("horizontalLine",i=>{const n=e.commands.get("horizontalLine"),o=new od(i);return o.set({label:t("Horizontal line"),icon:'',tooltip:!0}),o.bind("isEnabled").to(n,"isEnabled"),this.listenTo(o,"execute",()=>{e.execute("horizontalLine"),e.editing.view.focus()}),o})}}class Im extends xd{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,i=t.document.selection,n=e.value;t.change(e=>{if(i.isCollapsed)n?e.setSelectionAttribute(this.attributeKey,n):e.removeSelectionAttribute(this.attributeKey);else{const o=t.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const t of o)n?e.setAttribute(this.attributeKey,n,t):e.removeAttribute(this.attributeKey,t)}})}}class Nm extends od{constructor(e){super(e);const t=this.bindTemplate;this.set("color"),this.set("hasBorder"),this.icon='',this.extendTemplate({attributes:{style:{backgroundColor:t.to("color")},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-table__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}i(49);class Rm extends Ol{constructor(e,t){super(e);const i=t&&t.colorDefinitions||[],n={};t&&t.columns&&(n.gridTemplateColumns=`repeat( ${t.columns}, 1fr)`),this.set("selectedColor"),this.items=this.createCollection(),this.focusTracker=new rl,this.keystrokes=new Jc,this._focusCycler=new ql({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowleft",focusNext:"arrowright"}}),this.items.on("add",(e,t)=>{t.isOn=t.color===this.selectedColor}),i.forEach(e=>{const t=new Nm;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",()=>{this.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})}),this.items.add(t)}),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:n}}),this.on("change:selectedColor",(e,t,i)=>{for(const e of this.items)e.isOn=e.color===i})}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}}class Om extends Ii{constructor(e){super(e),this.set("isEmpty",!0),this.on("change",()=>{this.set("isEmpty",0===this.length)})}add(e,t){this.find(t=>t.color===e.color)||super.add(e,t)}hasColor(e){return!!this.find(t=>t.color===e)}}Mi(Om,Jn);i(51);class zm extends Ol{constructor(e,{colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:o,documentColorsCount:r}){super(e),this.items=this.createCollection(),this.colorDefinitions=t,this.focusTracker=new rl,this.keystrokes=new Jc,this.set("selectedColor"),this.removeButtonLabel=n,this.columns=i,this.documentColors=new Om,this.documentColorsCount=r,this._focusCycler=new ql({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this._documentColorsLabel=o,this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-table"]},children:this.items}),this.items.add(this._removeColorButton())}updateDocumentColors(e,t){const i=e.document,n=this.documentColorsCount;this.documentColors.clear();for(const o of i.getRootNames()){const r=i.getRoot(o),s=e.createRangeIn(r);for(const e of s.getItems())if(e.is("$textProxy")&&e.hasAttribute(t)&&(this._addColorToDocumentColors(e.getAttribute(t)),this.documentColors.length>=n))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,i=this.selectedColor;t.selectedColor=i,e&&(e.selectedColor=i)}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}appendGrids(){if(!this.staticColorsGrid&&(this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount)){const e=gl.bind(this.documentColors,this.documentColors),t=new Vl(this.locale);t.text=this._documentColorsLabel,t.extendTemplate({attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]}}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_removeColorButton(){const e=new od;return e.set({withText:!0,icon:'',tooltip:!0,label:this.removeButtonLabel}),e.class="ck-color-table__remove-color",e.on("execute",()=>{this.fire("execute",{value:null})}),e}_createStaticColorsGrid(){const e=new Rm(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.delegate("execute").to(this),e}_createDocumentColorsGrid(){const e=gl.bind(this.documentColors,this.documentColors),t=new Rm(this.locale,{columns:this.columns});return t.delegate("execute").to(this),t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using(e=>{const t=new Nm;return t.set({color:e.color,hasBorder:e.options&&e.options.hasBorder}),e.label&&t.set({label:e.label,tooltip:!0}),t.on("execute",()=>{this.fire("execute",{value:e.color})}),t}),this.documentColors.on("change:isEmpty",(e,i,n)=>{n&&(t.selectedColor=null)}),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find(t=>t.color===e);t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}const Dm="fontSize",Lm="fontColor";function Vm(e){return(t,{writer:i})=>i.createAttributeElement("span",{style:`${e}:${t}`},{priority:7})}class jm extends Im{constructor(e){super(e,Lm)}}class Bm extends vd{static get pluginName(){return"FontColorEditing"}constructor(e){var t;super(e),e.config.define(Lm,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:Lm,value:(t="color",e=>e.getStyle(t).replace(/\s/g,""))}}),e.conversion.for("downcast").attributeToElement({model:Lm,view:Vm("color")}),e.commands.add(Lm,new jm(e)),e.model.schema.extend("$text",{allowAttributes:Lm}),e.model.schema.setAttributeProperties(Lm,{isFormatting:!0,copyOnEnter:!0})}}function Fm(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:""+e.color}}}}class Hm extends vd{constructor(e,{commandName:t,icon:i,componentName:n,dropdownLabel:o}){super(e),this.commandName=t,this.componentName=n,this.icon=i,this.dropdownLabel=o,this.columns=e.config.get(this.componentName+".columns"),this.colorTableView}init(){const e=this.editor,t=e.locale,i=t.t,n=e.commands.get(this.commandName);const o=function(e,t){const i=e.t,n={Black:i("Black"),"Dim grey":i("Dim grey"),Grey:i("Grey"),"Light grey":i("Light grey"),White:i("White"),Red:i("Red"),Orange:i("Orange"),Yellow:i("Yellow"),"Light green":i("Light green"),Green:i("Green"),Aquamarine:i("Aquamarine"),Turquoise:i("Turquoise"),"Light blue":i("Light blue"),Blue:i("Blue"),Purple:i("Purple")};return t.map(e=>{const t=n[e.label];return t&&t!=e.label&&(e.label=t),e})}(t,e.config.get(this.componentName).colors.map(Fm).filter(e=>!!e)),r=e.config.get(this.componentName+".documentColors");e.ui.componentFactory.add(this.componentName,t=>{const s=hd(t);return this.colorTableView=function({dropdownView:e,colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:o,documentColorsCount:r}){const s=e.locale,a=new zm(s,{colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:o,documentColorsCount:r});return e.colorTableView=a,e.panelView.children.add(a),a.delegate("execute").to(e,"execute"),a}({dropdownView:s,colors:o.map(e=>({label:e.label,color:e.model,options:{hasBorder:e.hasBorder}})),columns:this.columns,removeButtonLabel:i("Remove color"),documentColorsLabel:0!==r?i("Document colors"):void 0,documentColorsCount:void 0===r?this.columns:r}),this.colorTableView.bind("selectedColor").to(n,"value"),s.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),s.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),s.bind("isEnabled").to(n),s.on("execute",(t,i)=>{e.execute(this.commandName,i),e.editing.view.focus()}),s.on("change:isOpen",(t,i,n)=>{s.colorTableView.appendGrids(),n&&(0!==r&&this.colorTableView.updateDocumentColors(e.model,this.componentName),this.colorTableView.updateSelectedColors())}),s})}}class Um extends Hm{constructor(e){const t=e.locale.t;super(e,{commandName:Lm,componentName:Lm,icon:'',dropdownLabel:t("Font Color")})}static get pluginName(){return"FontColorUI"}}class Wm extends Im{constructor(e){super(e,Dm)}}function qm(e){return e.map(e=>function(e){if(t=e,"object"==typeof t&&t.title&&t.model&&t.view)return Ym(e);var t;const i=function(e){return $m[e]||$m[e.model]}(e);if(i)return Ym(i);if("default"===e)return{model:void 0,title:"Default"};if(function(e){let t;if("object"==typeof e){if(!e.model)throw new ki.b("font-size-invalid-definition: Provided font size definition is invalid.",null,e);t=parseFloat(e.model)}else t=parseFloat(e);return isNaN(t)}(e))return;return function(e){"number"!=typeof e&&"string"!=typeof e||(e={title:String(e),model:parseFloat(e)+"px"});return e.view={name:"span",styles:{"font-size":e.model}},Ym(e)}(e)}(e)).filter(e=>!!e)}const $m={get tiny(){return{title:"Tiny",model:"tiny",view:{name:"span",classes:"text-tiny",priority:7}}},get small(){return{title:"Small",model:"small",view:{name:"span",classes:"text-small",priority:7}}},get big(){return{title:"Big",model:"big",view:{name:"span",classes:"text-big",priority:7}}},get huge(){return{title:"Huge",model:"huge",view:{name:"span",classes:"text-huge",priority:7}}}};function Ym(e){return e.view.priority||(e.view.priority=7),e}class Gm extends vd{static get pluginName(){return"FontSizeEditing"}constructor(e){super(e),e.config.define(Dm,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Dm}),e.model.schema.setAttributeProperties(Dm,{isFormatting:!0,copyOnEnter:!0});const t=e.config.get("fontSize.supportAllValues"),i=qm(this.editor.config.get("fontSize.options")).filter(e=>e.model),n=function(e,t){const i={model:{key:e,values:[]},view:{},upcastAlso:{}};for(const e of t)i.model.values.push(e.model),i.view[e.model]=e.view,e.upcastAlso&&(i.upcastAlso[e.model]=e.upcastAlso);return i}(Dm,i);t?this._prepareAnyValueConverters(n):e.conversion.attributeToElement(n),e.commands.add(Dm,new Wm(e))}_prepareAnyValueConverters(e){const t=this.editor,i=e.model.values.filter(e=>!String(e).match(/[\d.]+[\w%]+/));if(i.length)throw new ki.b("font-size-invalid-use-of-named-presets: If config.fontSize.supportAllValues is set to true, you need to use numerical values as font size options.",null,{presets:i});t.conversion.for("downcast").attributeToElement({model:Dm,view:(e,{writer:t})=>{if(e)return t.createAttributeElement("span",{style:"font-size:"+e},{priority:7})}}),t.conversion.for("upcast").attributeToAttribute({model:{key:Dm,value:e=>e.getStyle("font-size")},view:{name:"span"}})}}class Km{constructor(e,t){t&&qn(this,t),e&&this.set(e)}}Mi(Km,Jn);i(53);class Jm extends vd{init(){const e=this.editor,t=e.t,i=this._getLocalizedOptions(),n=e.commands.get(Dm);e.ui.componentFactory.add(Dm,o=>{const r=hd(o);return fd(r,function(e,t){const i=new Ii;for(const n of e){const e={type:"button",model:new Km({commandName:Dm,commandParam:n.model,label:n.title,class:"ck-fontsize-option",withText:!0})};n.view&&n.view.styles&&e.model.set("labelStyle","font-size:"+n.view.styles["font-size"]),n.view&&n.view.classes&&e.model.set("class",`${e.model.class} ${n.view.classes}`),e.model.bind("isOn").to(t,"value",e=>e===n.model),i.add(e)}return i}(i,n)),r.buttonView.set({label:t("Font Size"),icon:'',tooltip:!0}),r.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),r.bind("isEnabled").to(n),this.listenTo(r,"execute",t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()}),r})}_getLocalizedOptions(){const e=this.editor,t=e.t,i={Default:t("Default"),Tiny:t("Tiny"),Small:t("Small"),Big:t("Big"),Huge:t("Huge")};return qm(e.config.get(Dm).options).map(e=>{const t=i[e.title];return t&&t!=e.title&&(e=Object.assign({},e,{title:t})),e})}}class Qm extends xd{refresh(){const e=this.editor.model,t=Cd(e.document.selection.getSelectedBlocks());this.value=!!t&&t.is("element","paragraph"),this.isEnabled=!!t&&Zm(t,e.schema)}execute(e={}){const t=this.editor.model,i=t.document;t.change(n=>{const o=(e.selection||i.selection).getSelectedBlocks();for(const e of o)!e.is("element","paragraph")&&Zm(e,t.schema)&&n.rename(e,"paragraph")})}}function Zm(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class Xm extends xd{execute(e){const t=this.editor.model;let i=e.position;t.change(e=>{const n=e.createElement("paragraph");if(!t.schema.checkChild(i.parent,n)){const o=t.schema.findAllowedParent(i,n);if(!o)return;i=e.split(i,o).position}t.insertContent(n,i),e.setSelection(n,"in")})}}class ef extends vd{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new Qm(e)),e.commands.add("insertParagraph",new Xm(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>ef.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}ef.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);class tf extends xd{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=Cd(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some(t=>nf(e,t,this.editor.model.schema))}execute(e){const t=this.editor.model,i=t.document,n=e.value;t.change(e=>{const o=Array.from(i.selection.getSelectedBlocks()).filter(e=>nf(e,n,t.schema));for(const t of o)t.is("element",n)||e.rename(t,n)})}}function nf(e,t,i){return i.checkChild(e.parent,t)&&!i.isObject(e)}const of="paragraph";class rf extends vd{static get pluginName(){return"HeadingEditing"}constructor(e){super(e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[ef]}init(){const e=this.editor,t=e.config.get("heading.options"),i=[];for(const n of t)n.model!==of&&(e.model.schema.register(n.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(n),i.push(n.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new tf(e,i))}afterInit(){const e=this.editor,t=e.commands.get("enter"),i=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",(t,n)=>{const o=e.model.document.selection.getFirstPosition().parent;i.some(e=>o.is("element",e.model))&&!o.is("element",of)&&0===o.childCount&&n.writer.rename(o,of)})}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:wi.get("low")+1})}}i(11);class sf extends vd{init(){const e=this.editor,t=e.t,i=function(e){const t=e.t,i={Paragraph:t("Paragraph"),"Heading 1":t("Heading 1"),"Heading 2":t("Heading 2"),"Heading 3":t("Heading 3"),"Heading 4":t("Heading 4"),"Heading 5":t("Heading 5"),"Heading 6":t("Heading 6")};return e.config.get("heading.options").map(e=>{const t=i[e.title];return t&&t!=e.title&&(e.title=t),e})}(e),n=t("Choose heading"),o=t("Heading");e.ui.componentFactory.add("heading",t=>{const r={},s=new Ii,a=e.commands.get("heading"),c=e.commands.get("paragraph"),l=[a];for(const e of i){const t={type:"button",model:new Km({label:e.title,class:e.class,withText:!0})};"paragraph"===e.model?(t.model.bind("isOn").to(c,"value"),t.model.set("commandName","paragraph"),l.push(c)):(t.model.bind("isOn").to(a,"value",t=>t===e.model),t.model.set({commandName:"heading",commandValue:e.model})),s.add(t),r[e.model]=e.title}const d=hd(t);return fd(d,s),d.buttonView.set({isOn:!1,withText:!0,tooltip:o}),d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),d.bind("isEnabled").toMany(l,"isEnabled",(...e)=>e.some(e=>e)),d.buttonView.bind("label").to(a,"value",c,"value",(e,t)=>{const i=e||t&&"paragraph";return r[i]?r[i]:n}),this.listenTo(d,"execute",t=>{e.execute(t.source.commandName,t.source.commandValue?{value:t.source.commandValue}:void 0),e.editing.view.focus()}),d})}}i(56);const af=["before","after"],cf=(new DOMParser).parseFromString('\n',"image/svg+xml").firstChild,lf="ck-widget__type-around_disabled";class df extends vd{static get pluginName(){return"WidgetTypeAround"}constructor(e){super(e),this._currentFakeCaretModelElement=null}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",(i,n,o)=>{t.change(e=>{for(const i of t.document.roots)o?e.removeClass(lf,i):e.addClass(lf,i)}),o||e.model.change(e=>{e.removeSelectionAttribute(ru)})}),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration()}destroy(){this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const i=this.editor,n=i.editing.view;i.execute("insertParagraph",{position:i.model.createPositionAt(e,t)}),n.focus(),n.scrollToTheSelection()}_listenToIfEnabled(e,t,i,n){this.listenTo(e,t,(...e)=>{this.isEnabled&&i(...e)},n)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=au(e);if(!t)return!1;const i=e.getSelectedElement();return this._insertParagraph(i,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,i=e.locale.t,n={before:i("Insert paragraph before block"),after:i("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",(e,i,o)=>{const r=o.mapper.toViewElement(i.item);su(r,i.item,t)&&function(e,t,i){const n=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(e){const i=this.toDomElement(e);return function(e,t){for(const i of af){const n=new gl({tag:"div",attributes:{class:["ck","ck-widget__type-around__button","ck-widget__type-around__button_"+i],title:t[i]},children:[e.ownerDocument.importNode(cf,!0)]});e.appendChild(n.render())}}(i,t),function(e){const t=new gl({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(i),i}));e.insert(e.createPositionAt(i,"end"),n)}(o.writer,n,r)},{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,i=t.document.selection,n=t.schema,o=e.editing.view;function r(e){return"ck-widget_type-around_show-fake-caret_"+e}this._listenToIfEnabled(o.document,"keydown",(e,t)=>{Po(t.keyCode)&&this._handleArrowKeyPress(e,t)},{priority:wi.get("high")+10}),this._listenToIfEnabled(i,"change:range",(t,i)=>{i.directChange&&e.model.change(e=>{e.removeSelectionAttribute(ru)})}),this._listenToIfEnabled(t.document,"change:data",()=>{const t=i.getSelectedElement();if(t){if(su(e.editing.mapper.toViewElement(t),t,n))return}e.model.change(e=>{e.removeSelectionAttribute(ru)})}),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",(e,t,i)=>{const o=i.writer;if(this._currentFakeCaretModelElement){const e=i.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(o.removeClass(af.map(r),e),this._currentFakeCaretModelElement=null)}const s=t.selection.getSelectedElement();if(!s)return;const a=i.mapper.toViewElement(s);if(!su(a,s,n))return;const c=au(t.selection);c&&(o.addClass(r(c),a),this._currentFakeCaretModelElement=s)}),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",(t,i,n)=>{n||e.model.change(e=>{e.removeSelectionAttribute(ru)})})}_handleArrowKeyPress(e,t){const i=this.editor,n=i.model,o=n.document.selection,r=n.schema,s=i.editing.view,a=Eo(t.keyCode,i.locale.contentLanguageDirection),c=s.document.selection.getSelectedElement();let l;su(c,i.editing.mapper.toModelElement(c),r)?l=this._handleArrowKeyPressOnSelectedWidget(a):o.isCollapsed&&(l=this._handleArrowKeyPressWhenSelectionNextToAWidget(a)),l&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,i=au(t.document.selection);return t.change(t=>{if(!i)return t.setSelectionAttribute(ru,e?"after":"before"),!0;if(!(i===(e?"after":"before")))return t.removeSelectionAttribute(ru),!0;return!1})}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,i=t.model,n=i.schema,o=t.plugins.get("Widget"),r=o._getObjectElementNextToSelection(e);return!!su(t.editing.mapper.toViewElement(r),r,n)&&(i.change(t=>{o._setSelectionOverElement(r),t.setSelectionAttribute(ru,e?"before":"after")}),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",(i,n)=>{const o=n.domTarget.closest(".ck-widget__type-around__button");if(!o)return;const r=function(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(o),s=function(e,t){const i=e.closest(".ck-widget");return t.mapDomToView(i)}(o,t.domConverter),a=e.editing.mapper.toModelElement(s);this._insertParagraph(a,r),n.preventDefault(),i.stop()})}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"enter",(i,n)=>{const o=t.document.selection.getSelectedElement(),r=e.editing.mapper.toModelElement(o),s=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:su(o,r,s)&&(this._insertParagraph(r,n.isSoft?"before":"after"),a=!0),a&&(n.preventDefault(),i.stop())})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view,t=[xo.enter,xo.delete,xo.backspace];this._listenToIfEnabled(e.document,"keydown",(e,i)=>{t.includes(i.keyCode)||Vu(i)||this._insertParagraphAccordingToFakeCaretPosition()},{priority:wi.get("high")+1})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,i=e.model,n=i.schema;this._listenToIfEnabled(t.document,"delete",(t,o)=>{const r=au(i.document.selection);if(!r)return;const s=o.direction,a=i.document.selection.getSelectedElement(),c="forward"==s;if("before"===r===c)e.execute("delete",{selection:i.createSelection(a,"on")});else{const t=n.getNearestSelectionRange(i.createPositionAt(a,r),s);if(t)if(t.isCollapsed){const o=i.createSelection(t.start);if(i.modifySelection(o,{direction:s}),o.focus.isEqual(t.start)){const e=function(e,t){let i=t;for(const n of t.getAncestors({parentFirst:!0})){if(n.childCount>1||e.isLimit(n))break;i=n}return i}(n,t.start.parent);i.deleteContent(i.createSelection(e,"on"),{doNotAutoparagraph:!0})}else i.change(i=>{i.setSelection(t),e.execute(c?"forwardDelete":"delete")})}else i.change(i=>{i.setSelection(t),e.execute(c?"forwardDelete":"delete")})}o.preventDefault(),t.stop()},{priority:wi.get("high")+1})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,i=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",(e,[n,o])=>{if(o&&!o.is("documentSelection"))return;const r=au(i);return r?(e.stop(),t.change(e=>{const o=i.getSelectedElement(),s=t.createPositionAt(o,r),a=e.createSelection(s),c=t.insertContent(n,a);return e.setSelection(a),c})):void 0},{priority:"high"})}}i(58);function uf(e){const t=e.model;return(i,n)=>{const o=n.keyCode==xo.arrowup,r=n.keyCode==xo.arrowdown,s=n.shiftKey,a=t.document.selection;if(!o&&!r)return;const c=r;if(s&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(a,c))return;const l=function(e,t,i){const n=e.model;if(i){const e=t.isCollapsed?t.focus:t.getLastPosition(),i=hf(n,e,"forward");if(!i)return null;const o=n.createRange(e,i),r=mf(n.schema,o,"backward");return r&&e.isBefore(r)?n.createRange(e,r):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),i=hf(n,e,"backward");if(!i)return null;const o=n.createRange(i,e),r=mf(n.schema,o,"forward");return r&&e.isAfter(r)?n.createRange(r,e):null}}(e,a,c);l&&!l.isCollapsed&&function(e,t,i){const n=e.model,o=e.view.domConverter;if(i){const e=n.createSelection(t.start);n.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=n.createRange(e.focus,t.end))}const r=e.mapper.toViewRange(t),s=o.viewRangeToDom(r),a=fs.getDomRangeRects(s);let c;for(const e of a)if(void 0!==c){if(Math.round(e.top)>=c)return!1;c=Math.max(c,Math.round(e.bottom))}else c=Math.round(e.bottom);return!0}(e,l,c)&&(t.change(e=>{const i=c?l.end:l.start;if(s){const n=t.createSelection(a.anchor);n.setFocus(i),e.setSelection(n)}else e.setSelection(i)}),i.stop(),n.preventDefault(),n.stopPropagation())}}function hf(e,t,i){const n=e.schema,o=e.createRangeIn(t.root),r="forward"==i?"elementStart":"elementEnd";for(const{previousPosition:e,item:s,type:a}of o.getWalker({startPosition:t,direction:i})){if(n.isLimit(s)&&!n.isInline(s))return e;if(a==r&&n.isBlock(s))return null}return null}function mf(e,t,i){const n="backward"==i?t.end:t.start;if(e.checkChild(n,"$text"))return n;for(const{nextPosition:n}of t.getWalker({direction:i}))if(e.checkChild(n,"$text"))return n}class ff extends vd{static get pluginName(){return"Widget"}static get requires(){return[df]}init(){const e=this.editor.editing.view,t=e.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",(e,t,i)=>{this._clearPreviouslySelectedWidgets(i.writer);const n=i.writer,o=n.document.selection,r=o.getSelectedElement();let s=null;for(const e of o.getRanges())for(const t of e){const e=t.item;lu(e)&&!gf(e,s)&&(n.addClass(cu,e),this._previouslySelected.add(e),s=e,e==r&&n.setSelection(o.getRanges(),{fake:!0,label:hu(r)}))}},{priority:"low"}),e.addObserver(Pu),this.listenTo(t,"mousedown",(...e)=>this._onMousedown(...e)),this.listenTo(t,"keydown",(...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)},{priority:"high"}),this.listenTo(t,"keydown",(...e)=>{this._preventDefaultOnArrowKeyPress(...e)},{priority:wi.get("high")-20}),this.listenTo(t,"keydown",uf(this.editor.editing)),this.listenTo(t,"delete",(e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())},{priority:"high"})}_onMousedown(e,t){const i=this.editor,n=i.editing.view,o=n.document;let r=t.target;if(function(e){for(;e;){if(e.is("editableElement")&&!e.is("rootElement"))return!0;if(lu(e))return!1;e=e.parent}return!1}(r)){if((_o.isSafari||_o.isGecko)&&t.domEvent.detail>=3){const e=i.editing.mapper,n=r.is("attributeElement")?r.findAncestor(e=>!e.is("attributeElement")):r,o=e.toModelElement(n);t.preventDefault(),this.editor.model.change(e=>{e.setSelection(o,"in")})}return}if(!lu(r)&&(r=r.findAncestor(lu),!r))return;t.preventDefault(),o.isFocused||n.focus();const s=i.editing.mapper.toModelElement(r);this._setSelectionOverElement(s)}_handleSelectionChangeOnArrowKeyPress(e,t){const i=t.keyCode;if(!Po(i))return;const n=this.editor.model,o=n.schema,r=n.document.selection,s=r.getSelectedElement(),a=Eo(i,this.editor.locale.contentLanguageDirection);if(s&&o.isObject(s)){const i=a?r.getLastPosition():r.getFirstPosition(),s=o.getNearestSelectionRange(i,a?"forward":"backward");return void(s&&(n.change(e=>{e.setSelection(s)}),t.preventDefault(),e.stop()))}if(!r.isCollapsed)return;const c=this._getObjectElementNextToSelection(a);c&&o.isObject(c)&&(this._setSelectionOverElement(c),t.preventDefault(),e.stop())}_preventDefaultOnArrowKeyPress(e,t){if(!Po(t.keyCode))return;const i=this.editor.model,n=i.schema,o=i.document.selection.getSelectedElement();o&&n.isObject(o)&&(t.preventDefault(),e.stop())}_handleDelete(e){if(this.editor.isReadOnly)return;const t=this.editor.model.document.selection;if(!t.isCollapsed)return;const i=this._getObjectElementNextToSelection(e);return i?(this.editor.model.change(e=>{let n=t.anchor.parent;for(;n.isEmpty;){const t=n;n=t.parent,e.remove(t)}this._setSelectionOverElement(i)}),!0):void 0}_setSelectionOverElement(e){this.editor.model.change(t=>{t.setSelection(t.createRangeOn(e))})}_getObjectElementNextToSelection(e){const t=this.editor.model,i=t.schema,n=t.document.selection,o=t.createSelection(n);t.modifySelection(o,{direction:e?"forward":"backward"});const r=e?o.focus.nodeBefore:o.focus.nodeAfter;return r&&i.isObject(r)?r:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(cu,t);this._previouslySelected.clear()}}function gf(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}class pf extends xd{refresh(){const e=this.editor.model.document.selection.getSelectedElement();this.isEnabled=ku(e),ku(e)&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor.model,i=t.document.selection.getSelectedElement();t.change(t=>{t.setAttribute("alt",e.newValue,i)})}}class bf extends vd{static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new pf(this.editor))}}i(60);class wf extends Ol{constructor(e,t){super(e);const i="ck-labeled-field-view-"+bi(),n="ck-labeled-field-view-status-"+bi();this.fieldView=t(this,i,n),this.set("label"),this.set("isEnabled",!0),this.set("errorText",null),this.set("infoText",null),this.set("class"),this.labelView=this._createLabelView(i),this.statusView=this._createStatusView(n),this.bind("_statusText").to(this,"errorText",this,"infoText",(e,t)=>e||t);const o=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",o.to("class"),o.if("isEnabled","ck-disabled",e=>!e)]},children:[this.labelView,this.fieldView,this.statusView]})}_createLabelView(e){const t=new Vl(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new Ol(this.locale),i=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",i.if("errorText","ck-labeled-field-view__status_error"),i.if("_statusText","ck-hidden",e=>!e)],id:e,role:i.if("errorText","alert")},children:[{text:i.to("_statusText")}]}),t}focus(){this.fieldView.focus()}}i(62);class kf extends Ol{constructor(e){super(e),this.set("value"),this.set("id"),this.set("placeholder"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById");const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{type:"text",class:["ck","ck-input","ck-input-text",t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),readonly:t.to("isReadOnly"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById")},on:{input:t.to("input")}})}render(){super.render();const e=e=>{this.element.value=e||0===e?e:""};e(this.value),this.on("change:value",(t,i,n)=>{e(n)})}select(){this.element.select()}focus(){this.element.focus()}}function _f(e,t,i){const n=new kf(e.locale);return n.set({id:t,ariaDescribedById:i}),n.bind("isReadOnly").to(e,"isEnabled",e=>!e),n.bind("hasError").to(e,"errorText",e=>!!e),n.on("input",()=>{e.errorText=null}),n}function vf({view:e}){e.listenTo(e.element,"submit",(t,i)=>{i.preventDefault(),e.fire("submit")},{useCapture:!0})}var yf='',xf='';i(64);class Af extends Ol{constructor(e){super(e);const t=this.locale.t;this.focusTracker=new rl,this.keystrokes=new Jc,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(t("Save"),yf,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(t("Cancel"),xf,"ck-button-cancel","cancel"),this._focusables=new fl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),vf({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)})}_createButton(e,t,i,n){const o=new od(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:i}}),n&&o.delegate("execute").to(this,n),o}_createLabeledInputView(){const e=this.locale.t,t=new wf(this.locale,_f);return t.label=e("Text alternative"),t.fieldView.placeholder=e("Text alternative"),t}}i(66),i(68);const Cf=Hl("px");class Tf extends vd{static get pluginName(){return"ContextualBalloon"}constructor(e){super(e),this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.view=new eu(e.locale),e.ui.view.body.add(this.view),e.ui.focusTracker.add(this.view.element),this._viewToStack=new Map,this._idToStack=new Map,this.set("_numberOfStacks",0),this.set("_singleViewMode",!1),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this.hasView(e.view))throw new ki.b("contextualballoon-add-view-exist: Cannot add configuration of the same view twice.",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const i=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),i.set(e.view,e),this._viewToStack.set(e.view,i),i===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new ki.b("contextualballoon-remove-view-not-exist: Cannot remove the configuration of a non-existent view.",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new ki.b("contextualballoon-showstack-stack-not-exist: Cannot show a stack that does not exist.",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find(t=>t[1]===e)[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new Pf(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(e,t)=>!t&&e>1),e.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(e,i)=>{if(i<2)return"";const n=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[n,i])}),e.buttonNextView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),e.buttonPrevView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),e}_createFakePanelsView(){const e=new Sf(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(e,t)=>!t&&e>=2?Math.min(e-1,2):0),e.listenTo(this.view,"change:top",()=>e.updatePosition()),e.listenTo(this.view,"change:left",()=>e.updatePosition()),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:i=!0,singleViewMode:n=!1}){this.view.class=t,this.view.withArrow=i,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),n&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&!e.limiter&&(e=Object.assign({},e,{limiter:this.positionLimiter})),e}}class Pf extends Ol{constructor(e){super(e);const t=e.t,i=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new rl,this.buttonPrevView=this._createButtonView(t("Previous"),''),this.buttonNextView=this._createButtonView(t("Next"),''),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",i.to("isNavigationVisible",e=>e?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:i.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const i=new od(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i}}class Sf extends Ol{constructor(e,t){super(e);const i=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",i.to("numberOfPanels",e=>e?"":"ck-hidden")],style:{top:i.to("top",Cf),left:i.to("left",Cf),width:i.to("width",Cf),height:i.to("height",Cf)}},children:this.content}),this.on("change:numberOfPanels",(e,t,i,n)=>{i>n?this._addPanels(i-n):this._removePanels(n-i),this.updatePosition()})}_addPanels(e){for(;e--;){const e=new Ol;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:i,height:n}=new fs(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:i,height:n})}}}function Ef(e){const t=e.editing.view,i=eu.defaultPositions;return{target:t.domConverter.viewToDom(t.document.selection.getSelectedElement()),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast]}}class Mf extends vd{static get requires(){return[Tf]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton(),this._createForm()}destroy(){super.destroy(),this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",i=>{const n=e.commands.get("imageTextAlternative"),o=new od(i);return o.set({label:t("Change image text alternative"),icon:'',tooltip:!0}),o.bind("isEnabled").to(n,"isEnabled"),this.listenTo(o,"execute",()=>{this._showForm()}),o})}_createForm(){const e=this.editor,t=e.editing.view.document;this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new Af(e.locale),this._form.render(),this.listenTo(this._form,"submit",()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),this._form.keystrokes.set("Esc",(e,t)=>{this._hideForm(!0),t()}),this.listenTo(e.ui,"update",()=>{wu(t.selection)?this._isVisible&&function(e){const t=e.plugins.get("ContextualBalloon");if(wu(e.editing.view.document.selection)){const i=Ef(e);t.updatePosition(i)}}(e):this._hideForm(!0)}),ud({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;const e=this.editor,t=e.commands.get("imageTextAlternative"),i=this._form.labeledInput;this._isInBalloon||this._balloon.add({view:this._form,position:Ef(e)}),i.fieldView.value=i.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select()}_hideForm(e){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView===this._form}get _isInBalloon(){return this._balloon.hasView(this._form)}}class If extends vd{static get requires(){return[bf,Mf]}static get pluginName(){return"ImageTextAlternative"}}i(70);class Nf extends vd{static get requires(){return[Cu,ff,If]}static get pluginName(){return"Image"}}function Rf(e){for(const t of e.getChildren())if(t&&t.is("element","caption"))return t;return null}function Of(e){const t=e.parent;return"figcaption"==e.name&&t&&"figure"==t.name&&t.hasClass("image")?{name:!0}:null}class zf extends vd{static get pluginName(){return"ImageCaptionEditing"}init(){const e=this.editor,t=e.editing.view,i=e.model.schema,n=e.data,o=e.editing,r=e.t;i.register("caption",{allowIn:"image",allowContentOf:"$block",isLimit:!0}),e.model.document.registerPostFixer(e=>this._insertMissingModelCaptionElement(e)),e.conversion.for("upcast").elementToElement({view:Of,model:"caption"});n.downcastDispatcher.on("insert:caption",Df(e=>e.createContainerElement("figcaption"),!1));const s=function(e,t){return i=>{const n=i.createEditableElement("figcaption");return i.setCustomProperty("imageCaption",!0,n),cl({view:e,element:n,text:t}),mu(n,i)}}(t,r("Enter image caption"));o.downcastDispatcher.on("insert:caption",Df(s)),o.downcastDispatcher.on("insert",this._fixCaptionVisibility(e=>e.item),{priority:"high"}),o.downcastDispatcher.on("remove",this._fixCaptionVisibility(e=>e.position.parent),{priority:"high"}),t.document.registerPostFixer(e=>this._updateCaptionVisibility(e))}_updateCaptionVisibility(e){const t=this.editor.editing.mapper,i=this._lastSelectedCaption;let n;const o=this.editor.model.document.selection,r=o.getSelectedElement();if(r&&r.is("element","image")){const e=Rf(r);n=t.toViewElement(e)}const s=Lf(o.getFirstPosition().parent);if(s&&(n=t.toViewElement(s)),n)return i?(i===n||(Vf(i,e),this._lastSelectedCaption=n),jf(n,e)):(this._lastSelectedCaption=n,jf(n,e));if(i){const t=Vf(i,e);return this._lastSelectedCaption=null,t}return!1}_fixCaptionVisibility(e){return(t,i,n)=>{const o=Lf(e(i)),r=this.editor.editing.mapper,s=n.writer;if(o){const e=r.toViewElement(o);e&&(o.childCount?s.removeClass("ck-hidden",e):s.addClass("ck-hidden",e))}}}_insertMissingModelCaptionElement(e){const t=this.editor.model,i=t.document.differ.getChanges(),n=[];for(const e of i)if("insert"==e.type&&"$text"!=e.name){const i=e.position.nodeAfter;if(i.is("element","image")&&!Rf(i)&&n.push(i),!i.is("element","image")&&i.childCount)for(const e of t.createRangeIn(i).getItems())e.is("element","image")&&!Rf(e)&&n.push(e)}for(const t of n)e.appendElement("caption",t);return!!n.length}}function Df(e,t=!0){return(i,n,o)=>{const r=n.item;if((r.childCount||t)&&ku(r.parent)){if(!o.consumable.consume(n.item,"insert"))return;const t=o.mapper.toViewElement(n.range.start.parent),i=e(o.writer),s=o.writer;r.childCount||s.addClass("ck-hidden",i),function(e,t,i,n){const o=n.writer.createPositionAt(i,"end");n.writer.insert(o,e),n.mapper.bindElements(t,e)}(i,n.item,t,o)}}}function Lf(e){const t=e.getAncestors({includeSelf:!0}).find(e=>"caption"==e.name);return t&&t.parent&&"image"==t.parent.name?t:null}function Vf(e,t){return!e.childCount&&!e.hasClass("ck-hidden")&&(t.addClass("ck-hidden",e),!0)}function jf(e,t){return!!e.hasClass("ck-hidden")&&(t.removeClass("ck-hidden",e),!0)}i(72);class Bf extends xd{refresh(){const e=this.editor.model.document.selection.getSelectedElement();this.isEnabled=ku(e),e&&e.hasAttribute("width")?this.value={width:e.getAttribute("width"),height:null}:this.value=null}execute(e){const t=this.editor.model,i=t.document.selection.getSelectedElement();this.value={width:e.width,height:null},i&&t.change(t=>{t.setAttribute("width",e.width,i)})}}class Ff extends vd{static get pluginName(){return"ImageResizeEditing"}constructor(e){super(e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"imageResize:original",value:null,icon:"original"},{name:"imageResize:25",value:"25",icon:"small"},{name:"imageResize:50",value:"50",icon:"medium"},{name:"imageResize:75",value:"75",icon:"large"}]})}init(){const e=this.editor,t=new Bf(e);this._registerSchema(),this._registerConverters(),e.commands.add("imageResize",t)}_registerSchema(){this.editor.model.schema.extend("image",{allowAttributes:"width"}),this.editor.model.schema.setAttributeProperties("width",{isFormatting:!0})}_registerConverters(){const e=this.editor;e.conversion.for("downcast").add(e=>e.on("attribute:width:image",(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,o=i.mapper.toViewElement(t.item);null!==t.attributeNewValue?(n.setStyle("width",t.attributeNewValue,o),n.addClass("image_resized",o)):(n.removeStyle("width",o),n.removeClass("image_resized",o))})),e.conversion.for("upcast").attributeToAttribute({view:{name:"figure",styles:{width:/.+/}},model:{key:"width",value:e=>e.getStyle("width")}})}}var Hf='';const Uf={small:'',medium:Hf,large:'',original:''};class Wf extends vd{static get requires(){return[Ff]}static get pluginName(){return"ImageResizeButtons"}constructor(e){super(e),this._resizeUnit=e.config.get("image.resizeUnit")}init(){const e=this.editor,t=e.config.get("image.resizeOptions"),i=e.commands.get("imageResize");this.bind("isEnabled").to(i);for(const e of t)this._registerImageResizeButton(e);this._registerImageResizeDropdown(t)}_registerImageResizeButton(e){const t=this.editor,{name:i,value:n,icon:o}=e,r=n?n+this._resizeUnit:null;t.ui.componentFactory.add(i,n=>{const s=new od(n),a=t.commands.get("imageResize"),c=this._getOptionLabelValue(e,!0);if(!Uf[o])throw new ki.b('imageresizebuttons-missing-icon: The resize option "'+i+'" misses the "icon" property or the property value doesn\'t match any of the available icons.',t,e);return s.set({label:c,icon:Uf[o],tooltip:c,isToggleable:!0}),s.bind("isEnabled").to(this),s.bind("isOn").to(a,"value",qf(r)),this.listenTo(s,"execute",()=>{t.execute("imageResize",{width:r})}),s})}_registerImageResizeDropdown(e){const t=this.editor,i=t.t,n=e.find(e=>!e.value);t.ui.componentFactory.add("imageResize",o=>{const r=t.commands.get("imageResize"),s=hd(o,sd),a=s.buttonView;return a.set({tooltip:i("Resize image"),commandValue:n.value,icon:Hf,isToggleable:!0,label:this._getOptionLabelValue(n),withText:!0,class:"ck-resize-image-button"}),a.bind("label").to(r,"value",e=>e&&e.width?e.width:this._getOptionLabelValue(n)),s.bind("isOn").to(r),s.bind("isEnabled").to(this),fd(s,this._getResizeDropdownListItemDefinitions(e,r)),s.listView.ariaLabel=i("Image resize list"),this.listenTo(s,"execute",e=>{t.execute(e.source.commandName,{width:e.source.commandValue}),t.editing.view.focus()}),s})}_getOptionLabelValue(e,t){const i=this.editor.t;return e.label?e.label:t?e.value?i("Resize image to %0",e.value+this._resizeUnit):i("Resize image to the original size"):e.value?e.value+this._resizeUnit:i("Original")}_getResizeDropdownListItemDefinitions(e,t){const i=new Ii;return e.map(e=>{const n=e.value?e.value+this._resizeUnit:null,o={type:"button",model:new Km({commandName:"imageResize",commandValue:n,label:this._getOptionLabelValue(e),withText:!0,icon:null})};o.model.bind("isOn").to(t,"value",qf(n)),i.add(o)}),i}}function qf(e){return t=>null===e&&t===e||t&&t.width===e}class $f{constructor(e){this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}begin(e,t,i){const n=new fs(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const i of t)if(e.classList.contains(Yf(i)))return i}(e),this._referenceCoordinates=function(e,t){const i=new fs(e),n=t.split("-"),o={x:"right"==n[1]?i.right:i.left,y:"bottom"==n[0]?i.bottom:i.top};return o.x+=e.ownerDocument.defaultView.scrollX,o.y+=e.ownerDocument.defaultView.scrollY,o}(t,function(e){const t=e.split("-"),i={top:"bottom",bottom:"top",left:"right",right:"left"};return`${i[t[0]]}-${i[t[1]]}`}(this.activeHandlePosition)),this.originalWidth=n.width,this.originalHeight=n.height,this.aspectRatio=n.width/n.height;const o=i.style.width;o&&o.match(/^\d+\.?\d*%$/)?this.originalWidthPercents=parseFloat(o):this.originalWidthPercents=function(e,t){const i=e.parentElement,n=parseFloat(i.ownerDocument.defaultView.getComputedStyle(i).width);return t.width/n*100}(i,n)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function Yf(e){return"ck-widget__resizer__handle-"+e}Mi($f,Jn);class Gf{constructor(e){this._options=e,this._domResizerWrapper=null,this._viewResizerWrapper=null,this.set("isEnabled",!0),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())},{priority:"high"}),this.on("change:isEnabled",()=>{this.isEnabled&&this.redraw()})}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change(i=>{const n=i.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(t){const i=this.toDomElement(t);return e._appendHandles(i),e._appendSizeUI(i),e._domResizerWrapper=i,e.on("change:isEnabled",(e,t,n)=>{i.style.display=n?"":"none"}),i.style.display=e.isEnabled?"":"none",i}));i.insert(i.createPositionAt(t,"end"),n),i.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=n})}begin(e){this.state=new $f(this._options),this._sizeUI.bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change(e=>{const i=this._options.unit||"%",n=("%"===i?t.widthPercents:t.width)+i;e.setStyle("width",n,this._options.viewElement)});const i=this._getHandleHost(),n=new fs(i);t.handleHostWidth=Math.round(n.width),t.handleHostHeight=Math.round(n.height);const o=new fs(i);t.width=Math.round(o.width),t.height=Math.round(o.height),this.redraw(n),this.state.update(t)}commit(){const e=this._options.unit||"%",t=("%"===e?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change(()=>{this._cleanup(),this._options.onCommit(t)})}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!((i=t)&&i.ownerDocument&&i.ownerDocument.contains(i)))return;var i;const n=t.parentElement,o=this._getHandleHost(),r=this._viewResizerWrapper,s=[r.getStyle("width"),r.getStyle("height"),r.getStyle("left"),r.getStyle("top")];let a;if(n.isSameNode(o)){const t=e||new fs(o);a=[t.width+"px",t.height+"px",void 0,void 0]}else a=[o.offsetWidth+"px",o.offsetHeight+"px",o.offsetLeft+"px",o.offsetTop+"px"];"same"!==Vi(s,a)&&this._options.editor.editing.view.change(e=>{e.setStyle({width:a[0],height:a[1],left:a[2],top:a[3]},r)})}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeUI.dismiss(),this._sizeUI.isVisible=!1;this._options.editor.editing.view.change(e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)})}_proposeNewSize(e){const t=this.state,i={x:(n=e).pageX,y:n.pageY};var n;const o=!this._options.isCentered||this._options.isCentered(this),r={x:t._referenceCoordinates.x-(i.x+t.originalWidth),y:i.y-t.originalHeight-t._referenceCoordinates.y};o&&t.activeHandlePosition.endsWith("-right")&&(r.x=i.x-(t._referenceCoordinates.x+t.originalWidth)),o&&(r.x*=2);const s={width:Math.abs(t.originalWidth+r.x),height:Math.abs(t.originalHeight+r.y)};s.dominant=s.width/t.aspectRatio>s.height?"width":"height",s.max=s[s.dominant];const a={width:s.width,height:s.height};return"width"==s.dominant?a.height=a.width/t.aspectRatio:a.width=a.height*t.aspectRatio,{width:Math.round(a.width),height:Math.round(a.height),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*a.width*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const n of t)e.appendChild(new gl({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(i=n,"ck-widget__resizer__handle-"+i)}}).render());var i}_appendSizeUI(e){const t=new Kf;t.render(),this._sizeUI=t,e.appendChild(t.element)}}Mi(Gf,Jn);class Kf extends Ol{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("activeHandlePosition",e=>e?"ck-orientation-"+e:"")],style:{display:e.if("isVisible","none",e=>!e)}},children:[{text:e.to("label")}]})}bindToState(e,t){this.bind("isVisible").to(t,"proposedWidth",t,"proposedHeight",(e,t)=>null!==e&&null!==t),this.bind("label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",(t,i,n)=>"px"===e.unit?`${t}×${i}`:n+"%"),this.bind("activeHandlePosition").to(t)}dismiss(){this.unbind(),this.isVisible=!1}}var Jf=function(e,t,i){var n=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return L(i)&&(n="leading"in i?!!i.leading:n,o="trailing"in i?!!i.trailing:o),rs(e,t,{leading:n,maxWait:t,trailing:o})};i(74);class Qf extends vd{static get pluginName(){return"WidgetResize"}init(){this.set("_visibleResizer",null),this.set("_activeResizer",null),this._resizers=new Map;const e=hr.window.document;this.editor.model.schema.setAttributeProperties("width",{isFormatting:!0}),this.editor.editing.view.addObserver(Pu),this._observer=Object.create(vr),this.listenTo(this.editor.editing.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(e,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(e,"mouseup",this._mouseUpListener.bind(this));const t=()=>{this._visibleResizer&&this._visibleResizer.redraw()},i=Jf(t,200);this.on("change:_visibleResizer",t),this.editor.ui.on("update",i),this._observer.listenTo(hr.window,"resize",i);const n=this.editor.editing.view.document.selection;n.on("change",()=>{const e=n.getSelectedElement();this._visibleResizer=this._getResizerByViewElement(e)||null})}destroy(){this._observer.stopListening();for(const e of this._resizers.values())e.destroy()}attachTo(e){const t=new Gf(e),i=this.editor.plugins;if(t.attach(),i.has("WidgetToolbarRepository")){const e=i.get("WidgetToolbarRepository");t.on("begin",()=>{e.forceDisabled("resize")},{priority:"lowest"}),t.on("cancel",()=>{e.clearForceDisabled("resize")},{priority:"highest"}),t.on("commit",()=>{e.clearForceDisabled("resize")},{priority:"highest"})}return this._resizers.set(e.viewElement,t),t}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_getResizerByViewElement(e){return this._resizers.get(e)}_mouseDownListener(e,t){const i=t.domTarget;Gf.isResizeHandle(i)&&(this._activeResizer=this._getResizerByHandle(i),this._activeResizer&&(this._activeResizer.begin(i),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}Mi(Qf,Jn);class Zf extends vd{static get requires(){return[Qf]}static get pluginName(){return"ImageResizeHandles"}init(){const e=this.editor,t=e.commands.get("imageResize");this.bind("isEnabled").to(t),e.editing.downcastDispatcher.on("insert:image",(t,i,n)=>{const o=n.mapper.toViewElement(i.item),r=e.plugins.get(Qf).attachTo({unit:e.config.get("image.resizeUnit"),modelElement:i.item,viewElement:o,editor:e,getHandleHost:e=>e.querySelector("img"),getResizeHost:e=>e,isCentered(){const e=i.item.getAttribute("imageStyle");return!e||"full"==e||"alignCenter"==e},onCommit(t){e.execute("imageResize",{width:t})}});r.on("updateSize",()=>{o.hasClass("image_resized")||e.editing.view.change(e=>{e.addClass("image_resized",o)})}),r.bind("isEnabled").to(this)},{priority:"low"})}}i(76);class Xf extends xd{constructor(e,t){super(e),this.defaultStyle=!1,this.styles=t.reduce((e,t)=>(e[t.name]=t,t.isDefault&&(this.defaultStyle=t.name),e),{})}refresh(){const e=this.editor.model.document.selection.getSelectedElement();if(this.isEnabled=ku(e),e)if(e.hasAttribute("imageStyle")){const t=e.getAttribute("imageStyle");this.value=!!this.styles[t]&&t}else this.value=this.defaultStyle;else this.value=!1}execute(e){const t=e.value,i=this.editor.model,n=i.document.selection.getSelectedElement();i.change(e=>{this.styles[t].isDefault?e.removeAttribute("imageStyle",n):e.setAttribute("imageStyle",t,n)})}}function eg(e,t){for(const i of t)if(i.name===e)return i}var tg='',ig='',ng='',og='';const rg={full:{name:"full",title:"Full size image",icon:tg,isDefault:!0},side:{name:"side",title:"Side image",icon:og,className:"image-style-side"},alignLeft:{name:"alignLeft",title:"Left aligned image",icon:ig,className:"image-style-align-left"},alignCenter:{name:"alignCenter",title:"Centered image",icon:ng,className:"image-style-align-center"},alignRight:{name:"alignRight",title:"Right aligned image",icon:og,className:"image-style-align-right"}},sg={full:tg,left:ig,right:og,center:ng};function ag(e=[]){return e.map(cg)}function cg(e){if("string"==typeof e){const t=e;rg[t]?e=Object.assign({},rg[t]):(console.warn(Object(ki.a)("image-style-not-found: There is no such image style of given name."),{name:t}),e={name:t})}else if(rg[e.name]){const t=rg[e.name],i=Object.assign({},e);for(const n in t)Object.prototype.hasOwnProperty.call(e,n)||(i[n]=t[n]);e=i}return"string"==typeof e.icon&&sg[e.icon]&&(e.icon=sg[e.icon]),e}class lg extends vd{static get pluginName(){return"ImageStyleEditing"}init(){const e=this.editor,t=e.model.schema,i=e.data,n=e.editing;e.config.define("image.styles",["full","side"]);const o=ag(e.config.get("image.styles"));t.extend("image",{allowAttributes:"imageStyle"});const r=function(e){return(t,i,n)=>{if(!n.consumable.consume(i.item,t.name))return;const o=eg(i.attributeNewValue,e),r=eg(i.attributeOldValue,e),s=n.mapper.toViewElement(i.item),a=n.writer;r&&a.removeClass(r.className,s),o&&a.addClass(o.className,s)}}(o);n.downcastDispatcher.on("attribute:imageStyle:image",r),i.downcastDispatcher.on("attribute:imageStyle:image",r),i.upcastDispatcher.on("element:figure",function(e){const t=e.filter(e=>!e.isDefault);return(e,i,n)=>{if(!i.modelRange)return;const o=i.viewItem,r=Cd(i.modelRange.getItems());if(n.schema.checkAttribute(r,"imageStyle"))for(const e of t)n.consumable.consume(o,{classes:e.className})&&n.writer.setAttribute("imageStyle",e.name,r)}}(o),{priority:"low"}),e.commands.add("imageStyle",new Xf(e,o))}}i(78);class dg extends vd{static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){const e=function(e,t){for(const i of e)t[i.title]&&(i.title=t[i.title]);return e}(ag(this.editor.config.get("image.styles")),this.localizedDefaultStylesTitles);for(const t of e)this._createButton(t)}_createButton(e){const t=this.editor,i="imageStyle:"+e.name;t.ui.componentFactory.add(i,i=>{const n=t.commands.get("imageStyle"),o=new od(i);return o.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(n,"isEnabled"),o.bind("isOn").to(n,"value",t=>t===e.name),this.listenTo(o,"execute",()=>{t.execute("imageStyle",{value:e.name}),t.editing.view.focus()}),o})}}class ug extends vd{static get requires(){return[Tf]}static get pluginName(){return"WidgetToolbarRepository"}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",t=>{(function(e){const t=e.getSelectedElement();return!(!t||!lu(t))})(e.editing.view.document.selection)&&t.stop()},{priority:"high"})}this._toolbarDefinitions=new Map,this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui,"update",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui.focusTracker,"change:isFocused",()=>{this._updateToolbarsVisibility()},{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:i,getRelatedElement:n,balloonClassName:o="ck-toolbar-container"}){if(!i.length)return void console.warn(Object(ki.a)("widget-toolbar-no-items: Trying to register a toolbar without items."),{toolbarId:e});const r=this.editor,s=r.t,a=new gd(r.locale);if(a.ariaLabel=t||s("Widget toolbar"),this._toolbarDefinitions.has(e))throw new ki.b("widget-toolbar-duplicated: Toolbar with the given id was already added.",this,{toolbarId:e});a.fillFromConfig(i,r.ui.componentFactory),this._toolbarDefinitions.set(e,{view:a,getRelatedElement:n,balloonClassName:o})}_updateToolbarsVisibility(){let e=0,t=null,i=null;for(const n of this._toolbarDefinitions.values()){const o=n.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&o)if(this.editor.ui.focusTracker.isFocused){const r=o.getAncestors().length;r>e&&(e=r,t=o,i=n)}else this._isToolbarVisible(n)&&this._hideToolbar(n);else this._isToolbarInBalloon(n)&&this._hideToolbar(n)}i&&this._showToolbar(i,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?hg(this.editor,t):this._isToolbarInBalloon(e)||(this._balloon.add({view:e.view,position:mg(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);hg(this.editor,t)}}))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function hg(e,t){const i=e.plugins.get("ContextualBalloon"),n=mg(e,t);i.updatePosition(n)}function mg(e,t){const i=e.editing.view,n=eu.defaultPositions;return{target:i.domConverter.mapViewToDom(t),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,gu]}}i(80);class fg extends Ol{constructor(e){super(e);const t=this.bindTemplate;this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(),this.arrowView=this._createArrowView(),this.keystrokes=new Jc,this.focusTracker=new rl,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",t.if("isVisible","ck-hidden",e=>!e),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",(e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())}),this.keystrokes.set("arrowleft",(e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())})}focus(){this.actionView.focus()}_createActionView(){const e=new od;return e.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),e.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),e.delegate("execute").to(this),e}_createArrowView(){const e=new od,t=e.bindTemplate;return e.icon=rd,e.extendTemplate({attributes:{class:"ck-splitbutton__arrow","aria-haspopup":!0,"aria-expanded":t.to("isOn",e=>String(e))}}),e.bind("isEnabled").to(this),e.delegate("execute").to(this,"open"),e}}i(82);class gg extends Ol{constructor(e,t={}){super(e);const i=this.bindTemplate;this.set("class",t.class||null),this.children=this.createCollection(),t.children&&t.children.forEach(e=>this.children.add(e)),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",i.to("class")],role:i.to("_role"),"aria-labelledby":i.to("_ariaLabelledBy")},children:this.children})}}var pg='';i(84);class bg extends Ol{constructor(e,t){super(e);const{insertButtonView:i,cancelButtonView:n}=this._createActionButtons(e);if(this.insertButtonView=i,this.cancelButtonView=n,this.dropdownView=this._createDropdownView(e),this.set("imageURLInputValue",""),this.focusTracker=new rl,this.keystrokes=new Jc,this._focusables=new fl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.set("_integrations",new Ii),t)for(const[e,i]of Object.entries(t))"insertImageViaUrl"===e&&(i.fieldView.bind("value").to(this,"imageURLInputValue",e=>e||""),i.fieldView.on("input",()=>{this.imageURLInputValue=i.fieldView.element.value})),this._integrations.add(i);this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-upload-form"],tabindex:"-1"},children:[...this._integrations,new gg(e,{children:[this.insertButtonView,this.cancelButtonView],class:"ck-image-upload-form__action-row"})]})}render(){super.render(),vf({view:this});const e=[...this._integrations,this.insertButtonView,this.cancelButtonView];e.forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element);const t=e=>e.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t),this.listenTo(e[0].element,"selectstart",(e,t)=>{t.stopPropagation()},{priority:"high"})}_createDropdownView(e){const t=e.t,i=hd(e,fg),n=i.buttonView,o=i.panelView;return n.set({label:t("Insert image"),icon:pg,tooltip:!0}),o.extendTemplate({attributes:{class:"ck-image-upload__panel"}}),i}_createActionButtons(e){const t=e.t,i=new od(e),n=new od(e);return i.set({label:t("Insert"),icon:yf,class:"ck-button-save",type:"submit",withText:!0,isEnabled:this.imageURLInputValue}),n.set({label:t("Cancel"),icon:xf,class:"ck-button-cancel",withText:!0}),i.bind("isEnabled").to(this,"imageURLInputValue"),i.delegate("execute").to(this,"submit"),n.delegate("execute").to(this,"cancel"),{insertButtonView:i,cancelButtonView:n}}focus(){this._focusCycler.focusFirst()}}class wg extends Ol{constructor(e){super(e),this.buttonView=new od(e),this._fileInputView=new kg(e),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.setTemplate({tag:"span",attributes:{class:"ck-file-dialog-button"},children:[this.buttonView,this._fileInputView]}),this.buttonView.on("execute",()=>{this._fileInputView.open()})}focus(){this.buttonView.focus()}}class kg extends Ol{constructor(e){super(e),this.set("acceptedType"),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""})}})}open(){this.element.click()}}function _g(e){const t=e.map(e=>e.replace("+","\\+"));return new RegExp(`^image\\/(${t.join("|")})$`)}function vg(e){const t=e.t,i=new wf(e,_f);return i.set({label:t("Insert image via URL")}),i.fieldView.placeholder="https://example.com/src/image.png",i.infoText=t("Paste the image source URL."),i}class yg extends vd{static get pluginName(){return"ImageUploadUI"}init(){const e=this.editor,t=!!e.config.get("image.upload.panel.items");e.ui.componentFactory.add("imageUpload",e=>t?this._createDropdownView(e):this._createFileDialogButtonView(e))}_setUpDropdown(e,t,i){const n=this.editor,o=n.t,r=t.insertButtonView;function s(){n.editing.view.focus(),e.isOpen=!1}return e.bind("isEnabled").to(i),e.on("change:isOpen",()=>{const i=n.model.document.selection.getSelectedElement();e.isOpen&&(t.focus(),ku(i)?(t.imageURLInputValue=i.getAttribute("src"),r.label=o("Update")):(t.imageURLInputValue="",r.label=o("Insert")))}),t.delegate("submit","cancel").to(e),this.delegate("cancel").to(e),e.on("submit",()=>{s(),function(){const e=n.model.document.selection.getSelectedElement();ku(e)?n.model.change(i=>{i.setAttribute("src",t.imageURLInputValue,e),i.removeAttribute("srcset",e),i.removeAttribute("sizes",e)}):n.execute("imageInsert",{source:t.imageURLInputValue})}()}),e.on("cancel",()=>{s()}),e}_createDropdownView(e){const t=this.editor,i=new bg(e,function(e){const t=e.config.get("image.upload.panel.items"),i=e.plugins.get("ImageUploadUI"),n={insertImageViaUrl:vg(e.locale)};if(!t)return n;if(t.find(e=>"openCKFinder"===e)&&e.ui.componentFactory.has("ckfinder")){const t=e.ui.componentFactory.create("ckfinder");t.set({withText:!0,class:"ck-image-upload__ck-finder-button"}),t.delegate("execute").to(i,"cancel"),n.openCKFinder=t}return t.reduce((t,i)=>(n[i]?t[i]=n[i]:e.ui.componentFactory.has(i)&&(t[i]=e.ui.componentFactory.create(i)),t),{})}(t)),n=t.commands.get("imageUpload"),o=i.dropdownView,r=o.panelView;return o.buttonView.actionView=this._createFileDialogButtonView(e),r.children.add(i),this._setUpDropdown(o,i,n)}_createFileDialogButtonView(e){const t=this.editor,i=e.t,n=t.config.get("image.upload.types"),o=new wg(e),r=_g(n),s=t.commands.get("imageUpload");return o.set({acceptedType:n.map(e=>"image/"+e).join(","),allowMultipleFiles:!0}),o.buttonView.set({label:i("Insert image"),icon:pg,tooltip:!0}),o.buttonView.bind("isEnabled").to(s),o.on("done",(e,i)=>{const n=Array.from(i).filter(e=>r.test(e.type));n.length&&t.execute("imageUpload",{file:n})}),o}}i(86),i(88),i(90);class xg extends vd{constructor(e){super(e),this.placeholder="data:image/svg+xml;utf8,"+encodeURIComponent('')}init(){this.editor.editing.downcastDispatcher.on("attribute:uploadStatus:image",(...e)=>this.uploadStatusChange(...e))}uploadStatusChange(e,t,i){const n=this.editor,o=t.item,r=o.getAttribute("uploadId");if(!i.consumable.consume(t.item,e.name))return;const s=n.plugins.get(zh),a=r?t.attributeNewValue:null,c=this.placeholder,l=n.editing.mapper.toViewElement(o),d=i.writer;if("reading"==a)return Ag(l,d),void Cg(c,l,d);if("uploading"==a){const e=s.loaders.get(r);return Ag(l,d),void(e?(Tg(l,d),function(e,t,i,n){const o=function(e){const t=e.createUIElement("div",{class:"ck-progress-bar"});return e.setCustomProperty("progressBar",!0,t),t}(t);t.insert(t.createPositionAt(e,"end"),o),i.on("change:uploadedPercent",(e,t,i)=>{n.change(e=>{e.setStyle("width",i+"%",o)})})}(l,d,e,n.editing.view),function(e,t,i){if(i.data){const n=yu(e);t.setAttribute("src",i.data,n)}}(l,d,e)):Cg(c,l,d))}"complete"==a&&s.loaders.get(r)&&function(e,t,i){const n=t.createUIElement("div",{class:"ck-image-upload-complete-icon"});t.insert(t.createPositionAt(e,"end"),n),setTimeout(()=>{i.change(e=>e.remove(e.createRangeOn(n)))},3e3)}(l,d,n.editing.view),function(e,t){Sg(e,t,"progressBar")}(l,d),Tg(l,d),function(e,t){t.removeClass("ck-appear",e)}(l,d)}}function Ag(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function Cg(e,t,i){t.hasClass("ck-image-upload-placeholder")||i.addClass("ck-image-upload-placeholder",t);const n=yu(t);n.getAttribute("src")!==e&&i.setAttribute("src",e,n),Pg(t,"placeholder")||i.insert(i.createPositionAfter(n),function(e){const t=e.createUIElement("div",{class:"ck-upload-placeholder-loader"});return e.setCustomProperty("placeholder",!0,t),t}(i))}function Tg(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),Sg(e,t,"placeholder")}function Pg(e,t){for(const i of e.getChildren())if(i.getCustomProperty(t))return i}function Sg(e,t,i){const n=Pg(e,i);n&&t.remove(t.createRangeOn(n))}class Eg{constructor(e){this.document=e}createDocumentFragment(e){return new Do(this.document,e)}createElement(e,t,i){return new Fn(this.document,e,t,i)}createText(e){return new Fi(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,i){return i._insertChild(e,t)}removeChildren(e,t,i){return i._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const i=e.parent;if(i){const n=i.getChildIndex(e);return this.removeChildren(n,1,i),this.insertChild(n,t,i),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const i=t.getChildIndex(e);this.remove(e),this.insertChild(i,e.getChildren(),t)}}rename(e,t){const i=new Fn(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,i)?i:null}setAttribute(e,t,i){i._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,i){y(e)&&void 0===i&&(i=t),i._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,i){i._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return so._createAt(e,t)}createPositionAfter(e){return so._createAfter(e)}createPositionBefore(e){return so._createBefore(e)}createRange(e,t){return new ao(e,t)}createRangeOn(e){return ao._createOn(e)}createRangeIn(e){return ao._createIn(e)}createSelection(e,t,i){return new uo(e,t,i)}}class Mg extends xd{refresh(){const e=this.editor.model.document.selection.getSelectedElement(),t=e&&"image"===e.name||!1;this.isEnabled=vu(this.editor.model)||t}execute(e){const t=this.editor,i=t.model,n=t.plugins.get(zh);i.change(t=>{const o=Array.isArray(e.file)?e.file:[e.file];for(const e of o)Ig(t,i,n,e)})}}function Ig(e,t,i,n){const o=i.createLoader(n);o&&_u(e,t,{uploadId:o.id})}class Ng extends vd{static get requires(){return[zh,Eh,Gu]}static get pluginName(){return"ImageUploadEditing"}constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}})}init(){const e=this.editor,t=e.model.document,i=e.model.schema,n=e.conversion,o=e.plugins.get(zh),r=_g(e.config.get("image.upload.types"));i.extend("image",{allowAttributes:["uploadId","uploadStatus"]}),e.commands.add("imageUpload",new Mg(e)),n.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(e.editing.view.document,"clipboardInput",(t,i)=>{if(n=i.dataTransfer,Array.from(n.types).includes("text/html")&&""!==n.getData("text/html"))return;var n;const o=Array.from(i.dataTransfer.files).filter(e=>!!e&&r.test(e.type)),s=i.targetRanges.map(t=>e.editing.mapper.toModelRange(t));e.model.change(i=>{i.setSelection(s),o.length&&(t.stop(),e.model.enqueueChange("default",()=>{e.execute("imageUpload",{file:o})}))})}),this.listenTo(e.plugins.get(Gu),"inputTransformation",(t,i)=>{const n=Array.from(e.editing.view.createRangeIn(i.content)).filter(e=>{return!(!(t=e.item).is("element","img")||!t.getAttribute("src"))&&(t.getAttribute("src").match(/^data:image\/\w+;base64,/g)||t.getAttribute("src").match(/^blob:/g))&&!e.item.getAttribute("uploadProcessed");var t}).map(e=>{return{promise:(t=e.item,new Promise((e,i)=>{const n=t.getAttribute("src");fetch(n).then(e=>e.blob()).then(t=>{const i=function(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}(t,n),o=i.replace("image/",""),r=new File([t],"image."+o,{type:i});e(r)}).catch(i)})),imageElement:e.item};var t});if(!n.length)return;const r=new Eg(e.editing.view.document);for(const e of n){r.setAttribute("uploadProcessed",!0,e.imageElement);const t=o.createLoader(e.promise);t&&(r.setAttribute("src","",e.imageElement),r.setAttribute("uploadId",t.id,e.imageElement))}}),e.editing.view.document.on("dragover",(e,t)=>{t.preventDefault()}),t.on("change",()=>{const i=t.differ.getChanges({includeChangesInGraveyard:!0});for(const t of i)if("insert"==t.type&&"$text"!=t.name){const i=t.position.nodeAfter,n="$graveyard"==t.position.root.rootName;for(const t of Rg(e,i)){const e=t.getAttribute("uploadId");if(!e)continue;const i=o.loaders.get(e);i&&(n?i.abort():"idle"==i.status&&this._readAndUpload(i,t))}}})}_readAndUpload(e,t){const i=this.editor,n=i.model,o=i.locale.t,r=i.plugins.get(zh),s=i.plugins.get(Eh);return n.enqueueChange("transparent",e=>{e.setAttribute("uploadStatus","reading",t)}),e.read().then(()=>{const o=e.upload();if(_o.isSafari){const e=yu(i.editing.mapper.toViewElement(t));i.editing.view.once("render",()=>{if(!e.parent)return;const t=i.editing.view.domConverter.mapViewToDom(e.parent);if(!t)return;const n=t.style.display;t.style.display="none",t._ckHack=t.offsetHeight,t.style.display=n})}return n.enqueueChange("transparent",e=>{e.setAttribute("uploadStatus","uploading",t)}),o}).then(e=>{n.enqueueChange("transparent",i=>{i.setAttributes({uploadStatus:"complete",src:e.default},t),this._parseAndSetSrcsetAttributeOnImage(e,t,i)}),a()}).catch(i=>{if("error"!==e.status&&"aborted"!==e.status)throw i;"error"==e.status&&i&&s.showWarning(i,{title:o("Upload failed"),namespace:"upload"}),a(),n.enqueueChange("transparent",e=>{e.remove(t)})});function a(){n.enqueueChange("transparent",e=>{e.removeAttribute("uploadId",t),e.removeAttribute("uploadStatus",t)}),r.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,i){let n=0;const o=Object.keys(e).filter(e=>{const t=parseInt(e,10);if(!isNaN(t))return n=Math.max(n,t),!0}).map(t=>`${e[t]} ${t}w`).join(", ");""!=o&&i.setAttribute("srcset",{data:o,width:n},t)}}function Rg(e,t){return Array.from(e.model.createRangeOn(t)).filter(e=>e.item.is("element","image")).map(e=>e.item)}class Og extends xd{constructor(e){super(e),this._childCommands=[]}refresh(){}execute(...e){return this._getFirstEnabledCommand().execute(e)}registerChildCommand(e){this._childCommands.push(e),e.on("change:isEnabled",()=>this._checkEnabled()),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){return this._childCommands.find(e=>e.isEnabled)}}class zg extends vd{static get pluginName(){return"IndentEditing"}init(){const e=this.editor;e.commands.add("indent",new Og(e)),e.commands.add("outdent",new Og(e))}}var Dg='',Lg='';class Vg extends vd{static get pluginName(){return"IndentUI"}init(){const e=this.editor,t=e.locale,i=e.t,n="ltr"==t.uiLanguageDirection?Dg:Lg,o="ltr"==t.uiLanguageDirection?Lg:Dg;this._defineButton("indent",i("Increase indent"),n),this._defineButton("outdent",i("Decrease indent"),o)}_defineButton(e,t,i){const n=this.editor;n.ui.componentFactory.add(e,o=>{const r=n.commands.get(e),s=new od(o);return s.set({label:t,icon:i,tooltip:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(s,"execute",()=>{n.execute(e),n.editing.view.focus()}),s})}}const jg="italic";class Bg extends vd{static get pluginName(){return"ItalicEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:jg}),e.model.schema.setAttributeProperties(jg,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:jg,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(jg,new Fd(e,jg)),e.keystrokes.set("CTRL+I",jg)}}const Fg="italic";class Hg extends vd{init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Fg,i=>{const n=e.commands.get(Fg),o=new od(i);return o.set({label:t("Italic"),icon:'',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(o,"execute",()=>{e.execute(Fg),e.editing.view.focus()}),o})}}class Ug extends Gr{constructor(e){super(e),this.domEventType="click"}onDomEvent(e){this.fire(e.type,e)}}i(92);class Wg extends Ol{constructor(e,t,i){super(e);const n=e.t;this.focusTracker=new rl,this.keystrokes=new Jc,this.urlInputView=this._createUrlInput(i),this.saveButtonView=this._createButton(n("Save"),yf,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),xf,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t),this.children=this._createFormChildren(t.manualDecorators),this._focusables=new fl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const o=["ck","ck-link-form"];t.manualDecorators.length&&o.push("ck-link-form_layout-vertical"),this.setTemplate({tag:"form",attributes:{class:o,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((e,t)=>(e[t.name]=t.isOn,e),{})}render(){super.render(),vf({view:this});[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createUrlInput(e="https://"){const t=this.locale.t,i=new wf(this.locale,_f);return i.label=t("Link URL"),i.fieldView.placeholder=e+"example.com",i}_createButton(e,t,i,n){const o=new od(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:i}}),n&&o.delegate("execute").to(this,n),o}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const i of e.manualDecorators){const n=new dd(this.locale);n.set({name:i.id,label:i.label,withText:!0}),n.bind("isOn").toMany([i,e],"value",(e,t)=>void 0===t&&void 0===e?i.defaultValue:e),n.on("execute",()=>{i.set("value",!n.isOn)}),t.add(n)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new Ol;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map(e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}})),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}}i(94);class qg extends Ol{constructor(e){super(e);const t=e.t;this.focusTracker=new rl,this.keystrokes=new Jc,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(t("Unlink"),'',"unlink"),this.editButtonView=this._createButton(t("Edit link"),'',"edit"),this.set("href"),this._focusables=new fl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createButton(e,t,i){const n=new od(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n.delegate("execute").to(this,i),n}_createPreviewButton(){const e=new od(this.locale),t=this.bindTemplate,i=this.t;return e.set({withText:!0,tooltip:i("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",e=>e&&wh(e)),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",e=>e||i("This link has no URL")),e.bind("isEnabled").to(this,"href",e=>!!e),e.template.tag="a",e.template.eventListeners={},e}}var $g='';const Yg=/^((\w+:(\/{2,})?)|(\W))/i,Gg=/[\w-]+@[\w-]+\.+[\w-]+/i,Kg="link-ui";class Jg extends vd{static get requires(){return[Tf]}static get pluginName(){return"LinkUI"}init(){const e=this.editor;e.editing.view.addObserver(Ug),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=e.plugins.get(Tf),this._createToolbarLinkButton(),this._enableUserBalloonInteractions(),e.conversion.for("editingDowncast").markerToHighlight({model:Kg,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:Kg,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView.destroy()}_createActionsView(){const e=this.editor,t=new qg(e.locale),i=e.commands.get("link"),n=e.commands.get("unlink");return t.bind("href").to(i,"value"),t.editButtonView.bind("isEnabled").to(i),t.unlinkButtonView.bind("isEnabled").to(n),this.listenTo(t,"edit",()=>{this._addFormView()}),this.listenTo(t,"unlink",()=>{e.execute("unlink"),this._hideUI()}),t.keystrokes.set("Esc",(e,t)=>{this._hideUI(),t()}),t.keystrokes.set(ph,(e,t)=>{this._addFormView(),t()}),t}_createFormView(){const e=this.editor,t=e.commands.get("link"),i=e.config.get("link.defaultProtocol"),n=new Wg(e.locale,t,i);return n.urlInputView.fieldView.bind("value").to(t,"value"),n.urlInputView.bind("isReadOnly").to(t,"isEnabled",e=>!e),n.saveButtonView.bind("isEnabled").to(t),this.listenTo(n,"submit",()=>{const{value:t}=n.urlInputView.fieldView.element,o=!!i&&!Yg.test(t),r=Gg.test(t),s=t&&o?(r?"mailto:":i)+t:t;e.execute("link",s,n.getDecoratorSwitchesState()),this._closeFormView()}),this.listenTo(n,"cancel",()=>{this._closeFormView()}),n.keystrokes.set("Esc",(e,t)=>{this._closeFormView(),t()}),n}_createToolbarLinkButton(){const e=this.editor,t=e.commands.get("link"),i=e.t;e.keystrokes.set(ph,(e,t)=>{t(),this._showUI(!0)}),e.ui.componentFactory.add("link",e=>{const n=new od(e);return n.isEnabled=!0,n.label=i("Link"),n.icon=$g,n.keystroke=ph,n.tooltip=!0,n.isToggleable=!0,n.bind("isEnabled").to(t,"isEnabled"),n.bind("isOn").to(t,"value",e=>!!e),this.listenTo(n,"execute",()=>this._showUI(!0)),n})}_enableUserBalloonInteractions(){const e=this.editor.editing.view.document;this.listenTo(e,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),this.editor.keystrokes.set("Tab",(e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())},{priority:"high"}),this.editor.keystrokes.set("Esc",(e,t)=>{this._isUIVisible&&(this._hideUI(),t())}),ud({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this._isFormInPanel)return;const e=this.editor.commands.get("link");this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.urlInputView.fieldView.element.value=e.value||""}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let i=this._getSelectedLinkElement(),n=r();const o=()=>{const e=this._getSelectedLinkElement(),t=r();i&&!e||!i&&t!==n?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),i=e,n=t};function r(){return t.selection.focus.getAncestors().reverse().find(e=>e.is("element"))}this.listenTo(e.ui,"update",o),this.listenTo(this._balloon,"change:visibleView",o)}get _isFormInPanel(){return this._balloon.hasView(this.formView)}get _areActionsInPanel(){return this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){return this._balloon.visibleView==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model,i=e.document,n=this._getSelectedLinkElement(),o=t.markers.has(Kg)?this.editor.editing.mapper.toViewRange(t.markers.get(Kg).getRange()):i.selection.getFirstRange();return{target:n?e.domConverter.mapViewToDom(n):e.domConverter.viewRangeToDom(o)}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection;if(t.isCollapsed)return Qg(t.getFirstPosition());{const i=t.getFirstRange().getTrimmed(),n=Qg(i.start),o=Qg(i.end);return n&&n==o&&e.createRangeIn(n).getTrimmed().isEqual(i)?n:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change(t=>{e.markers.has(Kg)?t.updateMarker(Kg,{range:e.document.selection.getFirstRange()}):t.addMarker(Kg,{usingOperation:!1,affectsData:!1,range:e.document.selection.getFirstRange()})})}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(Kg)&&e.change(e=>{e.removeMarker(Kg)})}}function Qg(e){return e.getAncestors().find(e=>{return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t})}class Zg extends vd{static get requires(){return[Cu,Ch]}static get pluginName(){return"LinkImageEditing"}init(){const e=this.editor;e.model.schema.extend("image",{allowAttributes:["linkHref"]}),e.conversion.for("upcast").add(e=>{e.on("element:a",(e,t,i)=>{const n=t.viewItem,o=Array.from(n.getChildren()).find(e=>"img"===e.name);if(!o)return;const r={attributes:["href"]};if(!i.consumable.consume(n,r))return;const s=n.getAttribute("href");if(!s)return;let a=t.modelCursor.parent;if(!a.is("element","image")){const e=i.convertItem(o,t.modelCursor);t.modelRange=e.modelRange,t.modelCursor=e.modelCursor,a=t.modelCursor.nodeBefore}a&&a.is("element","image")&&i.writer.setAttribute("linkHref",s,a)},{priority:"high"})}),e.conversion.for("editingDowncast").add(Xg({attachIconIndicator:!0})),e.conversion.for("dataDowncast").add(Xg({attachIconIndicator:!1})),this._enableAutomaticDecorators(),this._enableManualDecorators()}_enableAutomaticDecorators(){const e=this.editor,t=e.commands.get("link").automaticDecorators;t.length&&e.conversion.for("downcast").add(t.getDispatcherForLinkedImage())}_enableManualDecorators(){const e=this.editor,t=e.commands.get("link"),i=t.manualDecorators;for(const n of t.manualDecorators)e.model.schema.extend("image",{allowAttributes:n.id}),e.conversion.for("downcast").add(ep(i,n)),e.conversion.for("upcast").add(tp(i,n))}}function Xg(e){return t=>{t.on("attribute:linkHref:image",(t,i,n)=>{const o=n.mapper.toViewElement(i.item),r=n.writer,s=Array.from(o.getChildren()).find(e=>"a"===e.name);let a;if(e.attachIconIndicator&&(a=r.createUIElement("span",{class:"ck ck-link-image_icon"},(function(e){const t=this.toDomElement(e);return t.innerHTML=$g,t}))),s)if(i.attributeNewValue)r.setAttribute("href",i.attributeNewValue,s);else{const e=Array.from(s.getChildren()).find(e=>"img"===e.name);r.move(r.createRangeOn(e),r.createPositionAt(o,0)),r.remove(s)}else{const e=r.createContainerElement("a",{href:i.attributeNewValue});r.insert(r.createPositionAt(o,0),e),r.move(r.createRangeOn(o.getChild(1)),r.createPositionAt(e,0)),a&&r.insert(r.createPositionAt(e,"end"),a)}})}}function ep(e,t){return i=>{i.on(`attribute:${t.id}:image`,(i,n,o)=>{const r=e.get(t.id).attributes,s=o.mapper.toViewElement(n.item),a=Array.from(s.getChildren()).find(e=>"a"===e.name);for(const[e,t]of Ui(r))o.writer.setAttribute(e,t,a)})}}function tp(e,t){return i=>{i.on("element:a",(i,n,o)=>{const r=n.viewItem,s={attributes:e.get(t.id).attributes},a=new Wi(s).match(r);if(!a)return;if(!o.consumable.consume(r,a.match))return;const c=n.modelCursor.parent;o.writer.setAttribute(t.id,!0,c)},{priority:"high"})}}class ip extends vd{static get requires(){return[Nf,Ch,Jg]}static get pluginName(){return"LinkImageUI"}init(){const e=this.editor.editing.view.document;this.listenTo(e,"click",(t,i)=>{np(e.selection.getSelectedElement())&&i.preventDefault()}),this._createToolbarLinkImageButton()}_createToolbarLinkImageButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("linkImage",i=>{const n=new od(i),o=e.plugins.get("LinkUI"),r=e.commands.get("link");return n.set({isEnabled:!0,label:t("Link image"),icon:$g,keystroke:ph,tooltip:!0,isToggleable:!0}),n.bind("isEnabled").to(r,"isEnabled"),n.bind("isOn").to(r,"value",e=>!!e),this.listenTo(n,"execute",()=>{np(e.editing.view.document.selection.getSelectedElement())?o._addActionsView():o._showUI(!0)}),n})}}function np(e){return!(!e||!bu(e))&&e.getChild(0).is("element","a")}i(96);class op extends xd{constructor(e,t){super(e),this.type=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document,i=Array.from(t.selection.getSelectedBlocks()).filter(t=>sp(t,e.schema)),n=!0===this.value;e.change(e=>{if(n){let t=i[i.length-1].nextSibling,n=Number.POSITIVE_INFINITY,o=[];for(;t&&"listItem"==t.name&&0!==t.getAttribute("listIndent");){const e=t.getAttribute("listIndent");e=i;)r>o.getAttribute("listIndent")&&(r=o.getAttribute("listIndent")),o.getAttribute("listIndent")==r&&e[t?"unshift":"push"](o),o=o[t?"previousSibling":"nextSibling"]}}function sp(e,t){return t.checkChild(e.parent,"listItem")&&!t.isObject(e)}class ap extends xd{constructor(e,t){super(e),this._indentBy="forward"==t?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document;let i=Array.from(t.selection.getSelectedBlocks());e.change(e=>{const t=i[i.length-1];let n=t.nextSibling;for(;n&&"listItem"==n.name&&n.getAttribute("listIndent")>t.getAttribute("listIndent");)i.push(n),n=n.nextSibling;this._indentBy<0&&(i=i.reverse());for(const t of i){const i=t.getAttribute("listIndent")+this._indentBy;i<0?e.rename(t,"paragraph"):e.setAttribute("listIndent",i,t)}this.fire("_executeCleanup",i)})}_checkEnabled(){const e=Cd(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is("element","listItem"))return!1;if(this._indentBy>0){const t=e.getAttribute("listIndent"),i=e.getAttribute("listType");let n=e.previousSibling;for(;n&&n.is("element","listItem")&&n.getAttribute("listIndent")>=t;){if(n.getAttribute("listIndent")==t)return n.getAttribute("listType")==i;n=n.previousSibling}return!1}return!0}}function cp(e,t){const i=t.mapper,n=t.writer,o="numbered"==e.getAttribute("listType")?"ol":"ul",r=function(e){const t=e.createContainerElement("li");return t.getFillerOffset=fp,t}(n),s=n.createContainerElement(o,null);return n.insert(n.createPositionAt(s,0),r),i.bindElements(e,r),r}function lp(e,t,i,n){const o=t.parent,r=i.mapper,s=i.writer;let a=r.toViewPosition(n.createPositionBefore(e));const c=hp(e.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:e.getAttribute("listIndent")}),l=e.previousSibling;if(c&&c.getAttribute("listIndent")==e.getAttribute("listIndent")){const e=r.toViewElement(c);a=s.breakContainer(s.createPositionAfter(e))}else if(l&&"listItem"==l.name){a=r.toViewPosition(n.createPositionAt(l,"end"));const e=r.findMappedViewAncestor(a),t=function(e){for(const t of e.getChildren())if("ul"==t.name||"ol"==t.name)return t;return null}(e);a=t?s.createPositionBefore(t):s.createPositionAt(e,"end")}else a=r.toViewPosition(n.createPositionBefore(e));if(a=up(a),s.insert(a,o),l&&"listItem"==l.name){const e=r.toViewElement(l),i=s.createRange(s.createPositionAt(e,0),a).getWalker({ignoreElementEnd:!0});for(const e of i)if(e.item.is("element","li")){const n=s.breakContainer(s.createPositionBefore(e.item)),o=e.item.parent,r=s.createPositionAt(t,"end");dp(s,r.nodeBefore,r.nodeAfter),s.move(s.createRangeOn(o),r),i.position=n}}else{const i=o.nextSibling;if(i&&(i.is("element","ul")||i.is("element","ol"))){let n=null;for(const t of i.getChildren()){const i=r.toModelElement(t);if(!(i&&i.getAttribute("listIndent")>e.getAttribute("listIndent")))break;n=t}n&&(s.breakContainer(s.createPositionAfter(n)),s.move(s.createRangeOn(n.parent),s.createPositionAt(t,"end")))}}dp(s,o,o.nextSibling),dp(s,o.previousSibling,o)}function dp(e,t,i){return!t||!i||"ul"!=t.name&&"ol"!=t.name||t.name!=i.name||t.getAttribute("class")!==i.getAttribute("class")?null:e.mergeContainers(e.createPositionAfter(t))}function up(e){return e.getLastMatchingPosition(e=>e.item.is("uiElement"))}function hp(e,t){const i=!!t.sameIndent,n=!!t.smallerIndent,o=t.listIndent;let r=e;for(;r&&"listItem"==r.name;){const e=r.getAttribute("listIndent");if(i&&o==e||n&&o>e)return r;r=r.previousSibling}return null}function mp(e,t,i,n){e.ui.componentFactory.add(t,o=>{const r=e.commands.get(t),s=new od(o);return s.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.on("execute",()=>{e.execute(t),e.editing.view.focus()}),s})}function fp(){const e=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||e?0:Wn.call(this)}function gp(e){return(t,i,n)=>{const o=n.consumable;if(!o.test(i.item,"insert")||!o.test(i.item,"attribute:listType")||!o.test(i.item,"attribute:listIndent"))return;o.consume(i.item,"insert"),o.consume(i.item,"attribute:listType"),o.consume(i.item,"attribute:listIndent");const r=i.item;lp(r,cp(r,n),n,e)}}function pp(e,t,i){if(!i.consumable.consume(t.item,"attribute:listType"))return;const n=i.mapper.toViewElement(t.item),o=i.writer;o.breakContainer(o.createPositionBefore(n)),o.breakContainer(o.createPositionAfter(n));const r=n.parent,s="numbered"==t.attributeNewValue?"ol":"ul";o.rename(s,r)}function bp(e,t,i){const n=i.mapper.toViewElement(t.item).parent,o=i.writer;dp(o,n,n.nextSibling),dp(o,n.previousSibling,n);for(const e of t.item.getChildren())i.consumable.consume(e,"insert")}function wp(e,t,i){if("listItem"!=t.item.name){let e=i.mapper.toViewPosition(t.range.start);const n=i.writer,o=[];for(;("ul"==e.parent.name||"ol"==e.parent.name)&&(e=n.breakContainer(e),"li"==e.parent.name);){const t=e,i=n.createPositionAt(e.parent,"end");if(!t.isEqual(i)){const e=n.remove(n.createRange(t,i));o.push(e)}e=n.createPositionAfter(e.parent)}if(o.length>0){for(let t=0;t0){const t=dp(n,i,i.nextSibling);t&&t.parent==i&&e.offset--}}dp(n,e.nodeBefore,e.nodeAfter)}}}function kp(e,t,i){const n=i.mapper.toViewPosition(t.position),o=n.nodeBefore,r=n.nodeAfter;dp(i.writer,o,r)}function _p(e,t,i){if(i.consumable.consume(t.viewItem,{name:!0})){const e=i.writer,n=e.createElement("listItem"),o=function(e){let t=0,i=e.parent;for(;i;){if(i.is("element","li"))t++;else{const e=i.previousSibling;e&&e.is("element","li")&&t++}i=i.parent}return t}(t.viewItem);e.setAttribute("listIndent",o,n);const r=t.viewItem.parent&&"ol"==t.viewItem.parent.name?"numbered":"bulleted";if(e.setAttribute("listType",r,n),!i.safeInsert(n,t.modelCursor))return;const s=function(e,t,i){const{writer:n,schema:o}=i;let r=n.createPositionAfter(e);for(const s of t)if("ul"==s.name||"ol"==s.name)r=i.convertItem(s,r).modelCursor;else{const t=i.convertItem(s,n.createPositionAt(e,"end")),a=t.modelRange.start.nodeAfter;a&&a.is("element")&&!o.checkChild(e,a.name)&&(e=t.modelCursor.parent.is("element","listItem")?t.modelCursor.parent:Cp(t.modelCursor),r=n.createPositionAfter(e))}return r}(n,t.viewItem.getChildren(),i);t.modelRange=e.createRange(t.modelCursor,s),i.updateConversionResult(n,t)}}function vp(e,t,i){if(i.consumable.test(t.viewItem,{name:!0})){const e=Array.from(t.viewItem.getChildren());for(const t of e){!(t.is("element","li")||Pp(t))&&t._remove()}}}function yp(e,t,i){if(i.consumable.test(t.viewItem,{name:!0})){if(0===t.viewItem.childCount)return;const e=[...t.viewItem.getChildren()];let i=!1,n=!0;for(const t of e)i&&!Pp(t)&&t._remove(),t.is("$text")?(n&&(t._data=t.data.replace(/^\s+/,"")),t.nextSibling&&!Pp(t.nextSibling)||(t._data=t.data.replace(/\s+$/,""))):Pp(t)&&(i=!0),n=!1}}function xp(e){return(t,i)=>{if(i.isPhantom)return;const n=i.modelPosition.nodeBefore;if(n&&n.is("element","listItem")){const t=i.mapper.toViewElement(n),o=t.getAncestors().find(Pp),r=e.createPositionAt(t,0).getWalker();for(const e of r){if("elementStart"==e.type&&e.item.is("element","li")){i.viewPosition=e.previousPosition;break}if("elementEnd"==e.type&&e.item==o){i.viewPosition=e.nextPosition;break}}}}}function Ap(e,[t,i]){let n,o=t.is("documentFragment")?t.getChild(0):t;if(n=i?this.createSelection(i):this.document.selection,o&&o.is("element","listItem")){const e=n.getFirstPosition();let t=null;if(e.parent.is("element","listItem")?t=e.parent:e.nodeBefore&&e.nodeBefore.is("element","listItem")&&(t=e.nodeBefore),t){const e=t.getAttribute("listIndent");if(e>0)for(;o&&o.is("element","listItem");)o._setAttribute("listIndent",o.getAttribute("listIndent")+e),o=o.nextSibling}}}function Cp(e){const t=new Rs({startPosition:e});let i;do{i=t.next()}while(!i.value.item.is("element","listItem"));return i.value.item}function Tp(e,t,i,n,o,r){const s=hp(t.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:e,foo:"b"}),a=o.mapper,c=o.writer,l=s?s.getAttribute("listIndent"):null;let d;if(s)if(l==e){const e=a.toViewElement(s).parent;d=c.createPositionAfter(e)}else{const e=r.createPositionAt(s,"end");d=a.toViewPosition(e)}else d=i;d=up(d);for(const e of[...n.getChildren()])Pp(e)&&(d=c.move(c.createRangeOn(e),d).end,dp(c,e,e.nextSibling),dp(c,e.previousSibling,e))}function Pp(e){return e.is("element","ol")||e.is("element","ul")}class Sp extends vd{static get pluginName(){return"ListEditing"}static get requires(){return[ef]}init(){const e=this.editor;e.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const t=e.data,i=e.editing;var n;e.model.document.registerPostFixer(t=>function(e,t){const i=e.document.differ.getChanges(),n=new Map;let o=!1;for(const n of i)if("insert"==n.type&&"listItem"==n.name)r(n.position);else if("insert"==n.type&&"listItem"!=n.name){if("$text"!=n.name){const i=n.position.nodeAfter;i.hasAttribute("listIndent")&&(t.removeAttribute("listIndent",i),o=!0),i.hasAttribute("listType")&&(t.removeAttribute("listType",i),o=!0),i.hasAttribute("listStyle")&&(t.removeAttribute("listStyle",i),o=!0);for(const t of Array.from(e.createRangeIn(i)).filter(e=>e.item.is("element","listItem")))r(t.previousPosition)}r(n.position.getShiftedBy(n.length))}else"remove"==n.type&&"listItem"==n.name?r(n.position):("attribute"==n.type&&"listIndent"==n.attributeKey||"attribute"==n.type&&"listType"==n.attributeKey)&&r(n.range.start);for(const e of n.values())s(e),a(e);return o;function r(e){const t=e.nodeBefore;if(t&&t.is("element","listItem")){let e=t;if(n.has(e))return;for(let t=e.previousSibling;t&&t.is("element","listItem");t=e.previousSibling)if(e=t,n.has(e))return;n.set(t,e)}else{const t=e.nodeAfter;t&&t.is("element","listItem")&&n.set(t,t)}}function s(e){let i=0,n=null;for(;e&&e.is("element","listItem");){const r=e.getAttribute("listIndent");if(r>i){let s;null===n?(n=r-i,s=i):(n>r&&(n=r),s=r-n),t.setAttribute("listIndent",s,e),o=!0}else n=null,i=e.getAttribute("listIndent")+1;e=e.nextSibling}}function a(e){let i=[],n=null;for(;e&&e.is("element","listItem");){const r=e.getAttribute("listIndent");if(n&&n.getAttribute("listIndent")>r&&(i=i.slice(0,r+1)),0!=r)if(i[r]){const n=i[r];e.getAttribute("listType")!=n&&(t.setAttribute("listType",n,e),o=!0)}else i[r]=e.getAttribute("listType");n=e,e=e.nextSibling}}}(e.model,t)),i.mapper.registerViewToModelLength("li",Ep),t.mapper.registerViewToModelLength("li",Ep),i.mapper.on("modelToViewPosition",xp(i.view)),i.mapper.on("viewToModelPosition",(n=e.model,(e,t)=>{const i=t.viewPosition,o=i.parent,r=t.mapper;if("ul"==o.name||"ol"==o.name){if(i.isAtEnd){const e=r.toModelElement(i.nodeBefore),o=r.getModelLength(i.nodeBefore);t.modelPosition=n.createPositionBefore(e).getShiftedBy(o)}else{const e=r.toModelElement(i.nodeAfter);t.modelPosition=n.createPositionBefore(e)}e.stop()}else if("li"==o.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){const s=r.toModelElement(o);let a=1,c=i.nodeBefore;for(;c&&Pp(c);)a+=r.getModelLength(c),c=c.previousSibling;t.modelPosition=n.createPositionBefore(s).getShiftedBy(a),e.stop()}})),t.mapper.on("modelToViewPosition",xp(i.view)),e.conversion.for("editingDowncast").add(t=>{t.on("insert",wp,{priority:"high"}),t.on("insert:listItem",gp(e.model)),t.on("attribute:listType:listItem",pp,{priority:"high"}),t.on("attribute:listType:listItem",bp,{priority:"low"}),t.on("attribute:listIndent:listItem",function(e){return(t,i,n)=>{if(!n.consumable.consume(i.item,"attribute:listIndent"))return;const o=n.mapper.toViewElement(i.item),r=n.writer;r.breakContainer(r.createPositionBefore(o)),r.breakContainer(r.createPositionAfter(o));const s=o.parent,a=s.previousSibling,c=r.createRangeOn(s);r.remove(c),a&&a.nextSibling&&dp(r,a,a.nextSibling),Tp(i.attributeOldValue+1,i.range.start,c.start,o,n,e),lp(i.item,o,n,e);for(const e of i.item.getChildren())n.consumable.consume(e,"insert")}}(e.model)),t.on("remove:listItem",function(e){return(t,i,n)=>{const o=n.mapper.toViewPosition(i.position).getLastMatchingPosition(e=>!e.item.is("element","li")).nodeAfter,r=n.writer;r.breakContainer(r.createPositionBefore(o)),r.breakContainer(r.createPositionAfter(o));const s=o.parent,a=s.previousSibling,c=r.createRangeOn(s),l=r.remove(c);a&&a.nextSibling&&dp(r,a,a.nextSibling),Tp(n.mapper.toModelElement(o).getAttribute("listIndent")+1,i.position,c.start,o,n,e);for(const e of r.createRangeIn(l).getItems())n.mapper.unbindViewElement(e);t.stop()}}(e.model)),t.on("remove",kp,{priority:"low"})}),e.conversion.for("dataDowncast").add(t=>{t.on("insert",wp,{priority:"high"}),t.on("insert:listItem",gp(e.model))}),e.conversion.for("upcast").add(e=>{e.on("element:ul",vp,{priority:"high"}),e.on("element:ol",vp,{priority:"high"}),e.on("element:li",yp,{priority:"high"}),e.on("element:li",_p)}),e.model.on("insertContent",Ap,{priority:"high"}),e.commands.add("numberedList",new op(e,"numbered")),e.commands.add("bulletedList",new op(e,"bulleted")),e.commands.add("indentList",new ap(e,"forward")),e.commands.add("outdentList",new ap(e,"backward"));const o=i.view.document;this.listenTo(o,"enter",(e,t)=>{const i=this.editor.model.document,n=i.selection.getLastPosition().parent;i.selection.isCollapsed&&"listItem"==n.name&&n.isEmpty&&(this.editor.execute("outdentList"),t.preventDefault(),e.stop())}),this.listenTo(o,"delete",(e,t)=>{if("backward"!==t.direction)return;const i=this.editor.model.document.selection;if(!i.isCollapsed)return;const n=i.getFirstPosition();if(!n.isAtStart)return;const o=n.parent;if("listItem"!==o.name)return;o.previousSibling&&"listItem"===o.previousSibling.name||(this.editor.execute("outdentList"),t.preventDefault(),e.stop())},{priority:"high"});const r=e=>(t,i)=>{this.editor.commands.get(e).isEnabled&&(this.editor.execute(e),i())};e.keystrokes.set("Tab",r("indentList")),e.keystrokes.set("Shift+Tab",r("outdentList"))}afterInit(){const e=this.editor.commands,t=e.get("indent"),i=e.get("outdent");t&&t.registerChildCommand(e.get("indentList")),i&&i.registerChildCommand(e.get("outdentList"))}}function Ep(e){let t=1;for(const i of e.getChildren())if("ul"==i.name||"ol"==i.name)for(const e of i.getChildren())t+=Ep(e);return t}class Mp extends vd{init(){const e=this.editor.t;mp(this.editor,"numberedList",e("Numbered List"),''),mp(this.editor,"bulletedList",e("Bulleted List"),'')}}function Ip(e,t){return e=>{e.on("attribute:url:media",i)};function i(i,n,o){if(!o.consumable.consume(n.item,i.name))return;const r=n.attributeNewValue,s=o.writer,a=o.mapper.toViewElement(n.item),c=[...a.getChildren()].find(e=>e.getCustomProperty("media-content"));s.remove(c);const l=e.getMediaViewElement(s,r,t);s.insert(s.createPositionAt(a,0),l)}}function Np(e,t,i,n){const o=e.createContainerElement("figure",{class:"media"});return e.insert(e.createPositionAt(o,0),t.getMediaViewElement(e,i,n)),o}function Rp(e){const t=e.getSelectedElement();return t&&t.is("element","media")?t:null}function Op(e,t,i){e.change(n=>{const o=n.createElement("media",{url:t});e.insertContent(o,i),n.setSelection(o,"on")})}class zp extends xd{refresh(){const e=this.editor.model,t=e.document.selection,i=e.schema,n=t.getFirstPosition(),o=Rp(t);let r=n.parent;r!=r.root&&(r=r.parent),this.value=o?o.getAttribute("url"):null,this.isEnabled=i.checkChild(r,"media")}execute(e){const t=this.editor.model,i=t.document.selection,n=Rp(i);if(n)t.change(t=>{t.setAttribute("url",e,n)});else{const n=fu(i,t);Op(t,e,n)}}}class Dp{constructor(e,t){const i=t.providers,n=t.extraProviders||[],o=new Set(t.removeProviders),r=i.concat(n).filter(e=>{const t=e.name;return t?!o.has(t):(console.warn(Object(ki.a)("media-embed-no-provider-name: The configured media provider has no name and cannot be used."),{provider:e}),!1)});this.locale=e,this.providerDefinitions=r}hasMedia(e){return!!this._getMedia(e)}getMediaViewElement(e,t,i){return this._getMedia(t).getViewElement(e,i)}_getMedia(e){if(!e)return new Lp(this.locale);e=e.trim();for(const t of this.providerDefinitions){const i=t.html;let n=t.url;Array.isArray(n)||(n=[n]);for(const t of n){const n=this._getUrlMatches(e,t);if(n)return new Lp(this.locale,e,n,i)}}return null}_getUrlMatches(e,t){let i=e.match(t);if(i)return i;let n=e.replace(/^https?:\/\//,"");return i=n.match(t),i||(n=n.replace(/^www\./,""),i=n.match(t),i||null)}}class Lp{constructor(e,t,i,n){this.url=this._getValidUrl(t),this._t=e.t,this._match=i,this._previewRenderer=n}getViewElement(e,t){const i={};let n;if(t.renderForEditingView||t.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(i["data-oembed-url"]=this.url),t.renderForEditingView&&(i.class="ck-media__wrapper");const o=this._getPreviewHtml(t);n=e.createRawElement("div",i,(function(e){e.innerHTML=o}))}else this.url&&(i.url=this.url),n=e.createEmptyElement("oembed",i);return e.setCustomProperty("media-content",!0,n),n}_getPreviewHtml(e){return this._previewRenderer?this._previewRenderer(this._match):this.url&&e.renderForEditingView?this._getPlaceholderHtml():""}_getPlaceholderHtml(){const e=new nd,t=new id;e.text=this._t("Open media in new tab"),t.content='',t.viewBox="0 0 64 42";return new gl({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[t]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]},e]}]}).render().outerHTML}_getValidUrl(e){return e?e.match(/^https?/)?e:"https://"+e:null}}i(98);class Vp extends vd{static get pluginName(){return"MediaEmbedEditing"}constructor(e){super(e),e.config.define("mediaEmbed",{providers:[{name:"dailymotion",url:/^dailymotion\.com\/video\/(\w+)/,html:e=>`
`},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:e=>`
`},{name:"youtube",url:[/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)/,/^(?:m\.)?youtube\.com\/v\/([\w-]+)/,/^youtube\.com\/embed\/([\w-]+)/,/^youtu\.be\/([\w-]+)/],html:e=>`
`},{name:"vimeo",url:[/^vimeo\.com\/(\d+)/,/^vimeo\.com\/[^/]+\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/album\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/channels\/[^/]+\/(\d+)/,/^vimeo\.com\/groups\/[^/]+\/videos\/(\d+)/,/^vimeo\.com\/ondemand\/[^/]+\/(\d+)/,/^player\.vimeo\.com\/video\/(\d+)/],html:e=>`
`},{name:"instagram",url:/^instagram\.com\/p\/(\w+)/},{name:"twitter",url:/^twitter\.com/},{name:"googleMaps",url:/^google\.com\/maps/},{name:"flickr",url:/^flickr\.com/},{name:"facebook",url:/^facebook\.com/}]}),this.registry=new Dp(e.locale,e.config.get("mediaEmbed"))}init(){const e=this.editor,t=e.model.schema,i=e.t,n=e.conversion,o=e.config.get("mediaEmbed.previewsInData"),r=this.registry;e.commands.add("mediaEmbed",new zp(e)),t.register("media",{isObject:!0,isBlock:!0,allowWhere:"$block",allowAttributes:["url"]}),n.for("dataDowncast").elementToElement({model:"media",view:(e,{writer:t})=>{const i=e.getAttribute("url");return Np(t,r,i,{renderMediaPreview:i&&o})}}),n.for("dataDowncast").add(Ip(r,{renderMediaPreview:o})),n.for("editingDowncast").elementToElement({model:"media",view:(e,{writer:t})=>{const n=e.getAttribute("url");return function(e,t,i){return t.setCustomProperty("media",!0,e),du(e,t,{label:i})}(Np(t,r,n,{renderForEditingView:!0}),t,i("media widget"))}}),n.for("editingDowncast").add(Ip(r,{renderForEditingView:!0})),n.for("upcast").elementToElement({view:{name:"oembed",attributes:{url:!0}},model:(e,{writer:t})=>{const i=e.getAttribute("url");if(r.hasMedia(i))return t.createElement("media",{url:i})}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:(e,{writer:t})=>{const i=e.getAttribute("data-oembed-url");if(r.hasMedia(i))return t.createElement("media",{url:i})}})}}const jp=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=]+$/;class Bp extends vd{static get requires(){return[Gu,Pm]}static get pluginName(){return"AutoMediaEmbed"}constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,t=e.model.document;this.listenTo(e.plugins.get(Gu),"inputTransformation",()=>{const e=t.selection.getFirstRange(),i=Ic.fromPosition(e.start);i.stickiness="toPrevious";const n=Ic.fromPosition(e.end);n.stickiness="toNext",t.once("change:data",()=>{this._embedMediaBetweenPositions(i,n),i.detach(),n.detach()},{priority:"high"})}),e.commands.get("undo").on("execute",()=>{this._timeoutId&&(hr.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)},{priority:"high"})}_embedMediaBetweenPositions(e,t){const i=this.editor,n=i.plugins.get(Vp).registry,o=new Js(e,t),r=o.getWalker({ignoreElementEnd:!0});let s="";for(const e of r)e.item.is("$textProxy")&&(s+=e.item.data);if(s=s.trim(),!s.match(jp))return void o.detach();if(!n.hasMedia(s))return void o.detach();i.commands.get("mediaEmbed").isEnabled?(this._positionToInsert=Ic.fromPosition(e),this._timeoutId=hr.window.setTimeout(()=>{i.model.change(e=>{let t;this._timeoutId=null,e.remove(o),o.detach(),"$graveyard"!==this._positionToInsert.root.rootName&&(t=this._positionToInsert),Op(i.model,s,t),this._positionToInsert.detach(),this._positionToInsert=null})},100)):o.detach()}}i(100);class Fp extends Ol{constructor(e,t){super(t);const i=t.t;this.focusTracker=new rl,this.keystrokes=new Jc,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(i("Save"),yf,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(i("Cancel"),xf,"ck-button-cancel","cancel"),this._focusables=new fl,this._focusCycler=new ql({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._validators=e,this.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form"],tabindex:"-1"},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),vf({view:this});[this.urlInputView,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element);const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e),this.listenTo(this.urlInputView.element,"selectstart",(e,t)=>{t.stopPropagation()},{priority:"high"})}focus(){this._focusCycler.focusFirst()}get url(){return this.urlInputView.fieldView.element.value.trim()}set url(e){this.urlInputView.fieldView.element.value=e.trim()}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.urlInputView.errorText=t,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const e=this.locale.t,t=new wf(this.locale,_f),i=t.fieldView;return this._urlInputViewInfoDefault=e("Paste the media URL in the input."),this._urlInputViewInfoTip=e("Tip: Paste the URL into the content to embed faster."),t.label=e("Media URL"),t.infoText=this._urlInputViewInfoDefault,i.placeholder="https://example.com",i.on("input",()=>{t.infoText=i.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault}),t}_createButton(e,t,i,n){const o=new od(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:i}}),n&&o.delegate("execute").to(this,n),o}}class Hp extends vd{static get requires(){return[Vp]}static get pluginName(){return"MediaEmbedUI"}init(){const e=this.editor,t=e.commands.get("mediaEmbed"),i=e.plugins.get(Vp).registry;e.ui.componentFactory.add("mediaEmbed",n=>{const o=hd(n),r=new Fp(function(e,t){return[t=>{if(!t.url.length)return e("The URL must not be empty.")},i=>{if(!t.hasMedia(i.url))return e("This media URL is not supported.")}]}(e.t,i),e.locale);return this._setUpDropdown(o,r,t,e),this._setUpForm(o,r,t),o})}_setUpDropdown(e,t,i){const n=this.editor,o=n.t,r=e.buttonView;function s(){n.editing.view.focus(),e.isOpen=!1}e.bind("isEnabled").to(i),e.panelView.children.add(t),r.set({label:o("Insert media"),icon:'',tooltip:!0}),r.on("open",()=>{t.url=i.value||"",t.urlInputView.fieldView.select(),t.focus()},{priority:"low"}),e.on("submit",()=>{t.isValid()&&(n.execute("mediaEmbed",t.url),s())}),e.on("change:isOpen",()=>t.resetFormStatus()),e.on("cancel",()=>s())}_setUpForm(e,t,i){t.delegate("submit","cancel").to(e),t.urlInputView.bind("value").to(i,"value"),t.urlInputView.bind("isReadOnly").to(i,"isEnabled",e=>!e),t.saveButtonView.bind("isEnabled").to(i)}}i(102);function Up(e,t,i,n,o=1){t>o?n.setAttribute(e,t,i):n.removeAttribute(e,i)}function Wp(e,t,i={}){const n=e.createElement("tableCell",i);return e.insertElement("paragraph",n),e.insert(n,t),n}function qp(e,t){const i=t.parent.parent,n=parseInt(i.getAttribute("headingColumns")||0),{column:o}=e.getCellLocation(t);return!!n&&o{e.on("element:table",(e,t,i)=>{const n=t.viewItem;if(!i.consumable.test(n,{name:!0}))return;const{rows:o,headingRows:r,headingColumns:s}=function(e){const t={headingRows:0,headingColumns:0},i=[],n=[];let o;for(const r of Array.from(e.getChildren()))if("tbody"===r.name||"thead"===r.name||"tfoot"===r.name){"thead"!==r.name||o||(o=r);const e=Array.from(r.getChildren()).filter(e=>e.is("element","tr"));for(const r of e)if("thead"===r.parent.name&&r.parent===o)t.headingRows++,i.push(r);else{n.push(r);const e=Gp(r);e>t.headingColumns&&(t.headingColumns=e)}}return t.rows=[...i,...n],t}(n),a={};s&&(a.headingColumns=s),r&&(a.headingRows=r);const c=i.writer.createElement("table",a);if(i.safeInsert(c,t.modelCursor)){if(i.consumable.consume(n,{name:!0}),o.forEach(e=>i.convertItem(e,i.writer.createPositionAt(c,"end"))),c.isEmpty){const e=i.writer.createElement("tableRow");i.writer.insert(e,i.writer.createPositionAt(c,"end")),Wp(i.writer,i.writer.createPositionAt(e,"end"))}i.updateConversionResult(c,t)}})}}function Yp(e){return t=>{t.on("element:"+e,(e,t,i)=>{if(!t.modelRange)return;const n=t.modelRange.start.nodeAfter;if(!n.childCount){const e=i.writer.createPositionAt(n,0);i.writer.insertElement("paragraph",e)}},{priority:"low"})}}function Gp(e){let t=0,i=0;const n=Array.from(e.getChildren()).filter(e=>"th"===e.name||"td"===e.name);for(;i1||o>1)&&this._recordSpans(i,o,n),this._shouldSkipSlot()||(t=this._formatOutValue(i)),this._nextCellAtColumn=this._column+n}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return void 0!==this._endRow&&this._row>this._endRow}_isOverEndColumn(){return void 0!==this._endColumn&&this._column>this._endColumn}_formatOutValue(e,t=this._row,i=this._column){return{done:!1,value:new Jp(this,e,t,i)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._rowthis._endColumn;return e||t||i||n}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,i){const n={cell:e,row:this._row,column:this._column};for(let e=this._row;et.on("insert:table",(t,i,n)=>{const o=i.item;if(!n.consumable.consume(o,"insert"))return;n.consumable.consume(o,"attribute:headingRows:table"),n.consumable.consume(o,"attribute:headingColumns:table");const r=e&&e.asWidget,s=n.writer.createContainerElement("figure",{class:"table"}),a=n.writer.createContainerElement("table");let c;var l,d;n.writer.insert(n.writer.createPositionAt(s,0),a),r&&(l=s,(d=n.writer).setCustomProperty("table",!0,l),c=du(l,d,{hasSelectionHandle:!0}));const u=new Kp(o),h={headingRows:o.getAttribute("headingRows")||0,headingColumns:o.getAttribute("headingColumns")||0},m=new Map;for(const t of u){const{row:i,cell:r}=t,s=o.getChild(i),c=m.get(i)||eb(a,s,i,h,n);m.set(i,c),n.consumable.consume(r,"insert");Xp(t,h,n.writer.createPositionAt(c,"end"),n,e)}for(const e of o.getChildren()){const t=e.index;m.has(t)||m.set(t,eb(a,e,t,h,n))}const f=n.mapper.toViewPosition(i.range.start);n.mapper.bindElements(o,r?c:s),n.writer.insert(f,r?c:s)})}function Zp(e,t,i){const{cell:n}=e,o=tb(e,t),r=i.mapper.toViewElement(n);r&&r.name!==o&&function(e,t,i){const n=i.writer,o=i.mapper.toViewElement(e),r=mu(n.createEditableElement(t,o.getAttributes()),n);uu(r,n,(e,t,i)=>i.addClass(ob(t.classes),e),(e,t,i)=>i.removeClass(ob(t.classes),e)),n.insert(n.createPositionAfter(o),r),n.move(n.createRangeIn(o),n.createPositionAt(r,0)),n.remove(n.createRangeOn(o)),i.mapper.unbindViewElement(o),i.mapper.bindElements(e,r)}(n,o,i)}function Xp(e,t,i,n,o){const r=o&&o.asWidget,s=tb(e,t),a=r?mu(n.writer.createEditableElement(s),n.writer):n.writer.createContainerElement(s);r&&uu(a,n.writer,(e,t,i)=>i.addClass(ob(t.classes),e),(e,t,i)=>i.removeClass(ob(t.classes),e));const c=e.cell,l=c.getChild(0),d=1===c.childCount&&"paragraph"===l.name;if(n.writer.insert(i,a),d&&![...l.getAttributeKeys()].length){const e=c.getChild(0),t=n.writer.createPositionAt(a,"end");if(n.consumable.consume(e,"insert"),r){const i=n.writer.createContainerElement("span",{style:"display:inline-block"});n.mapper.bindElements(e,i),n.writer.insert(t,i),n.mapper.bindElements(c,a)}else n.mapper.bindElements(c,a),n.mapper.bindElements(e,a)}else n.mapper.bindElements(c,a)}function eb(e,t,i,n,o){o.consumable.consume(t,"insert");const r=t.isEmpty?o.writer.createEmptyElement("tr"):o.writer.createContainerElement("tr");o.mapper.bindElements(t,r);const s=n.headingRows,a=function(e,t,i){const n=ib(e,t);return n||function(e,t,i){const n=i.writer.createContainerElement(e),o=i.writer.createPositionAt(t,"tbody"==e?"end":0);return i.writer.insert(o,n),n}(e,t,i)}(function(e,t){return e0&&i>=s?i-s:i,l=o.writer.createPositionAt(a,c);return o.writer.insert(l,r),r}function tb(e,t){const{row:i,column:n}=e,{headingColumns:o,headingRows:r}=t;if(r&&r>i)return"th";return o&&o>n?"th":"td"}function ib(e,t){for(const i of t.getChildren())if(i.name==e)return i}function nb(e,t,i){const n=ib(e,t);n&&0===n.childCount&&i.writer.remove(i.writer.createRangeOn(n))}function ob(e){return Array.isArray(e)?e:[e]}class rb extends xd{refresh(){const e=this.editor.model,t=e.document.selection,i=e.schema,n=function(e){const t=e.parent;return t===t.root?t:t.parent}(t.getFirstPosition());this.isEnabled=i.checkChild(n,"table")}execute(e={}){const t=this.editor.model,i=t.document.selection,n=this.editor.plugins.get("TableUtils"),o=fu(i,t);t.change(i=>{const r=n.createTable(i,e);t.insertContent(r,o),i.setSelection(i.createPositionAt(r.getNodeByPath([0,0,0]),0))})}}function sb(e){const t=[];for(const i of hb(e.getRanges())){const e=i.getContainedElement();e&&e.is("element","tableCell")&&t.push(e)}return t}function ab(e){const t=[];for(const i of e.getRanges()){const e=i.start.findAncestor("tableCell");e&&t.push(e)}return t}function cb(e){const t=sb(e);return t.length?t:ab(e)}function lb(e){return mb(e.map(e=>e.parent.index))}function db(e){const t=e[0].findAncestor("table");return mb([...new Kp(t)].filter(t=>e.includes(t.cell)).map(e=>e.column))}function ub(e,t){if(e.length<2||!function(e){const t=e[0].findAncestor("table"),i=lb(e),n=parseInt(t.getAttribute("headingRows")||0);if(!gb(i,n))return!1;const o=parseInt(t.getAttribute("headingColumns")||0);return gb(db(e),o)}(e))return!1;const i=new Set,n=new Set;let o=0;for(const r of e){const{row:e,column:s}=t.getCellLocation(r),a=parseInt(r.getAttribute("rowspan")||1),c=parseInt(r.getAttribute("colspan")||1);i.add(e),n.add(s),a>1&&i.add(e+a-1),c>1&&n.add(s+c-1),o+=a*c}return function(e,t){const i=Array.from(e.values()),n=Array.from(t.values()),o=Math.max(...i),r=Math.min(...i),s=Math.max(...n),a=Math.min(...n);return(o-r+1)*(s-a+1)}(i,n)==o}function hb(e){return Array.from(e).sort(fb)}function mb(e){const t=e.sort((e,t)=>e-t);return{first:t[0],last:t[t.length-1]}}function fb(e,t){const i=e.start,n=t.start;return i.isBefore(n)?-1:1}function gb({first:e,last:t},i){return e0){Up("headingRows",r-i,e,o,0)}const s=parseInt(t.getAttribute("headingColumns")||0);if(s>0){Up("headingColumns",s-n,e,o,0)}}(a,e,n,o,i),a}function _b(e,t,i=0){const n=[],o=new Kp(e,{startRow:i,endRow:t-1});for(const e of o){const{row:i,cellHeight:o}=e,r=i+o-1;i1&&(a.rowspan=c);const l=parseInt(e.getAttribute("colspan")||1);l>1&&(a.colspan=l);const d=r+s,u=[...new Kp(o,{startRow:r,endRow:d,includeAllSlots:!0})];let h,m=null;for(const t of u){const{row:n,column:o,cell:r}=t;r===e&&void 0===h&&(h=o),void 0!==h&&h===o&&n===d&&(m=Wp(i,t.getPositionBefore(),a))}return Up("rowspan",s,e,i),m}function yb(e,t){const i=[],n=new Kp(e);for(const e of n){const{column:n,cellWidth:o}=e,r=n+o-1;n1&&(r.colspan=s);const a=parseInt(e.getAttribute("rowspan")||1);a>1&&(r.rowspan=a);const c=Wp(n,n.createPositionAfter(e),r);return Up("colspan",o,e,n),c}function Ab(e,t,i,n,o,r){const s=parseInt(e.getAttribute("colspan")||1),a=parseInt(e.getAttribute("rowspan")||1);if(i+s-1>o){Up("colspan",o-i+1,e,r,1)}if(t+a-1>n){Up("rowspan",n-t+1,e,r,1)}}function Cb(e,t){const i=t.getColumns(e),n=new Array(i).fill(0);for(const{column:t}of new Kp(e))n[t]++;const o=n.reduce((e,t,i)=>t?e:[...e,i],[]);if(o.length>0){const i=o[o.length-1];return t.removeColumns(e,{at:i}),!0}return!1}function Tb(e,t){const i=[];for(let t=0;t0){const n=i[i.length-1];return t.removeRows(e,{at:n}),!0}return!1}function Pb(e,t){Cb(e,t)||Tb(e,t)}function Sb(e,t){const i=Array.from(new Kp(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(i.every(({cellHeight:e})=>1===e))return t.lastRow;const n=i[0].cellHeight-1;return t.lastRow+n}function Eb(e,t){const i=Array.from(new Kp(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(i.every(({cellWidth:e})=>1===e))return t.lastColumn;const n=i[0].cellWidth-1;return t.lastColumn+n}class Mb extends xd{constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}refresh(){const e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){const e=this.editor.model,t=ab(e.document.selection)[0],i=this.value,n=this.direction;e.change(e=>{const o="right"==n||"down"==n,r=o?t:i,s=o?i:t,a=s.parent;!function(e,t,i){Ib(e)||(Ib(t)&&i.remove(i.createRangeIn(t)),i.move(i.createRangeIn(e),i.createPositionAt(t,"end")));i.remove(e)}(s,r,e);const c=this.isHorizontal?"colspan":"rowspan",l=parseInt(t.getAttribute(c)||1),d=parseInt(i.getAttribute(c)||1);e.setAttribute(c,l+d,r),e.setSelection(e.createRangeIn(r));const u=this.editor.plugins.get("TableUtils");Pb(a.findAncestor("table"),u)})}_getMergeableCell(){const e=ab(this.editor.model.document.selection)[0];if(!e)return;const t=this.editor.plugins.get("TableUtils"),i=this.isHorizontal?function(e,t,i){const n=e.parent.parent,o="right"==t?e.nextSibling:e.previousSibling,r=(n.getAttribute("headingColumns")||0)>0;if(!o)return;const s="right"==t?e:o,a="right"==t?o:e,{column:c}=i.getCellLocation(s),{column:l}=i.getCellLocation(a),d=parseInt(s.getAttribute("colspan")||1),u=qp(i,s),h=qp(i,a);if(r&&u!=h)return;return c+d===l?o:void 0}(e,this.direction,t):function(e,t){const i=e.parent,n=i.parent,o=n.getChildIndex(i);if("down"==t&&o===n.childCount-1||"up"==t&&0===o)return;const r=parseInt(e.getAttribute("rowspan")||1),s=n.getAttribute("headingRows")||0,a="down"==t&&o+r===s,c="up"==t&&o===s;if(s&&(a||c))return;const l=parseInt(e.getAttribute("rowspan")||1),d="down"==t?o+l:o,u=[...new Kp(n,{endRow:d})],h=u.find(t=>t.cell===e).column,m=u.find(({row:e,cellHeight:i,column:n})=>n===h&&("down"==t?e===d:d===e+i));return m&&m.cell}(e,this.direction);if(!i)return;const n=this.isHorizontal?"rowspan":"colspan",o=parseInt(e.getAttribute(n)||1);return parseInt(i.getAttribute(n)||1)===o?i:void 0}}function Ib(e){return 1==e.childCount&&e.getChild(0).is("element","paragraph")&&e.getChild(0).isEmpty}class Nb extends xd{refresh(){const e=cb(this.editor.model.document.selection),t=e[0];if(t){const i=t.findAncestor("table"),n=this.editor.plugins.get("TableUtils").getRows(i)-1,o=lb(e),r=0===o.first&&o.last===n;this.isEnabled=!r}else this.isEnabled=!1}execute(){const e=this.editor.model,t=cb(e.document.selection),i=lb(t),n=t[0],o=n.findAncestor("table"),r=this.editor.plugins.get("TableUtils").getCellLocation(n).column;e.change(e=>{const t=i.last-i.first+1;this.editor.plugins.get("TableUtils").removeRows(o,{at:i.first,rows:t});const n=function(e,t,i){const n=e.getChild(t)||e.getChild(e.childCount-1);let o=n.getChild(0),r=0;for(const e of n.getChildren()){if(r>i)return o;o=e,r+=parseInt(e.getAttribute("colspan")||1)}return o}(o,i.first,r);e.setSelection(e.createPositionAt(n,0))})}}class Rb extends xd{refresh(){const e=cb(this.editor.model.document.selection),t=e[0];if(t){const i=t.findAncestor("table"),n=this.editor.plugins.get("TableUtils").getColumns(i),{first:o,last:r}=db(e);this.isEnabled=r-ot.cell===e).column,last:n.find(e=>e.cell===t).column},r=function(e,t,i,n){return parseInt(i.getAttribute("colspan")||1)>1?i:t.previousSibling||i.nextSibling?i.nextSibling||t.previousSibling:n.first?e.reverse().find(({column:e})=>ee>n.last).cell}(n,e,t,o);this.editor.model.change(e=>{const t=o.last-o.first+1;this.editor.plugins.get("TableUtils").removeColumns(i,{at:o.first,columns:t}),e.setSelection(e.createPositionAt(r,0))})}}class Ob extends xd{refresh(){const e=cb(this.editor.model.document.selection),t=e.length>0;this.isEnabled=t,this.value=t&&e.every(e=>this._isInHeading(e,e.parent.parent))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.model,i=cb(t.document.selection),n=i[0].findAncestor("table"),{first:o,last:r}=lb(i),s=this.value?o:r+1,a=n.getAttribute("headingRows")||0;t.change(e=>{if(s){const t=_b(n,s,s>a?a:0);for(const{cell:i}of t)vb(i,s,e)}Up("headingRows",s,n,e,0)})}_isInHeading(e,t){const i=parseInt(t.getAttribute("headingRows")||0);return!!i&&e.parent.index0;this.isEnabled=i,this.value=i&&e.every(e=>qp(t,e))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.model,i=cb(t.document.selection),n=i[0].findAncestor("table"),{first:o,last:r}=db(i),s=this.value?o:r+1;t.change(e=>{if(s){const t=yb(n,s);for(const{cell:i,column:n}of t)xb(i,n,s,e)}Up("headingColumns",s,n,e,0)})}}class Db extends vd{static get pluginName(){return"TableUtils"}getCellLocation(e){const t=e.parent,i=t.parent,n=i.getChildIndex(t),o=new Kp(i,{row:n});for(const{cell:t,row:i,column:n}of o)if(t===e)return{row:i,column:n}}createTable(e,t){const i=e.createElement("table");return Lb(e,i,0,parseInt(t.rows)||2,parseInt(t.columns)||2),t.headingRows&&Up("headingRows",t.headingRows,i,e,0),t.headingColumns&&Up("headingColumns",t.headingColumns,i,e,0),i}insertRows(e,t={}){const i=this.editor.model,n=t.at||0,o=t.rows||1,r=void 0!==t.copyStructureFromAbove,s=t.copyStructureFromAbove?n-1:n,a=this.getRows(e),c=this.getColumns(e);i.change(t=>{const i=e.getAttribute("headingRows")||0;if(i>n&&Up("headingRows",i+o,e,t,0),!r&&(0===n||n===a))return void Lb(t,e,n,o,c);const l=r?Math.max(n,s):n,d=new Kp(e,{endRow:l}),u=new Array(c).fill(1);for(const{row:e,column:i,cellHeight:a,cellWidth:c,cell:l}of d){const d=e+a-1,h=e<=s&&s<=d;e0&&Wp(t,o,n>1?{colspan:n}:null),e+=Math.abs(n)-1}}})}insertColumns(e,t={}){const i=this.editor.model,n=t.at||0,o=t.columns||1;i.change(t=>{const i=e.getAttribute("headingColumns");n{const{cellsToMove:i,cellsToTrim:n}=function(e,t,i){const n=new Map,o=[];for(const{row:r,column:s,cellHeight:a,cell:c}of new Kp(e,{endRow:i})){const e=r+a-1;if(r>=t&&r<=i&&e>i){const e=a-(i-r+1);n.set(s,{cell:c,rowspan:e})}if(r=t){let n;n=e>=i?i-t+1:e-t+1,o.push({cell:c,rowspan:a-n})}}return{cellsToMove:n,cellsToTrim:o}}(e,o,r);if(i.size){!function(e,t,i,n){const o=[...new Kp(e,{includeAllSlots:!0,row:t})],r=e.getChild(t);let s;for(const{column:e,cell:t,isAnchor:a}of o)if(i.has(e)){const{cell:t,rowspan:o}=i.get(e),a=s?n.createPositionAfter(s):n.createPositionAt(r,0);n.move(n.createRangeOn(t),a),Up("rowspan",o,t,n),s=t}else a&&(s=t)}(e,r+1,i,t)}for(let i=r;i>=o;i--)t.remove(e.getChild(i));for(const{rowspan:e,cell:i}of n)Up("rowspan",e,i,t);!function(e,t,i,n){const o=e.getAttribute("headingRows")||0;if(t{!function(e,t,i){const n=e.getAttribute("headingColumns")||0;if(n&&t.first=n;i--)for(const{cell:n,column:o,cellWidth:r}of[...new Kp(e)])o<=i&&r>1&&o+r>i?Up("colspan",r-1,n,t):o===i&&t.remove(n);Tb(e,this)||Cb(e,this)})}splitCellVertically(e,t=2){const i=this.editor.model,n=e.parent.parent,o=parseInt(e.getAttribute("rowspan")||1),r=parseInt(e.getAttribute("colspan")||1);i.change(i=>{if(r>1){const{newCellsSpan:n,updatedSpan:s}=jb(r,t);Up("colspan",s,e,i);const a={};n>1&&(a.colspan=n),o>1&&(a.rowspan=o);Vb(r>t?t-1:r-1,i,i.createPositionAfter(e),a)}if(rt===e),l=a.filter(({cell:t,cellWidth:i,column:n})=>t!==e&&n===c||nc);for(const{cell:e,cellWidth:t}of l)i.setAttribute("colspan",t+s,e);const d={};o>1&&(d.rowspan=o),Vb(s,i,i.createPositionAfter(e),d);const u=n.getAttribute("headingColumns")||0;u>c&&Up("headingColumns",u+s,n,i)}})}splitCellHorizontally(e,t=2){const i=this.editor.model,n=e.parent,o=n.parent,r=o.getChildIndex(n),s=parseInt(e.getAttribute("rowspan")||1),a=parseInt(e.getAttribute("colspan")||1);i.change(i=>{if(s>1){const n=[...new Kp(o,{startRow:r,endRow:r+s-1,includeAllSlots:!0})],{newCellsSpan:c,updatedSpan:l}=jb(s,t);Up("rowspan",l,e,i);const{column:d}=n.find(({cell:t})=>t===e),u={};c>1&&(u.rowspan=c),a>1&&(u.colspan=a);for(const e of n){const{column:t,row:n}=e,o=t===d,s=(n+r+l)%c==0;n>=r+l&&o&&s&&Vb(1,i,e.getPositionBefore(),u)}}if(sr){const e=o+n;i.setAttribute("rowspan",e,t)}const l={};a>1&&(l.colspan=a),Lb(i,o,r+1,n,1,l);const d=o.getAttribute("headingRows")||0;d>r&&Up("headingRows",d+n,o,i)}})}getColumns(e){return[...e.getChild(0).getChildren()].reduce((e,t)=>e+parseInt(t.getAttribute("colspan")||1),0)}getRows(e){return e.childCount}}function Lb(e,t,i,n,o,r={}){for(let s=0;s{const n=sb(e.document.selection),o=n.shift(),{mergeWidth:r,mergeHeight:s}=function(e,t,i){let n=0,o=0;for(const e of t){const{row:t,column:r}=i.getCellLocation(e);n=Ub(e,r,n,"colspan"),o=Ub(e,t,o,"rowspan")}const{row:r,column:s}=i.getCellLocation(e);return{mergeWidth:n-s,mergeHeight:o-r}}(o,n,t);Up("colspan",r,o,i),Up("rowspan",s,o,i);for(const e of n)Fb(e,o,i);Pb(o.findAncestor("table"),t),i.setSelection(o,"in")})}}function Fb(e,t,i){Hb(e)||(Hb(t)&&i.remove(i.createRangeIn(t)),i.move(i.createRangeIn(e),i.createPositionAt(t,"end"))),i.remove(e)}function Hb(e){return 1==e.childCount&&e.getChild(0).is("element","paragraph")&&e.getChild(0).isEmpty}function Ub(e,t,i,n){const o=parseInt(e.getAttribute(n)||1);return Math.max(i,t+o)}class Wb extends xd{refresh(){const e=cb(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.model,t=cb(e.document.selection),i=lb(t),n=t[0].findAncestor("table"),o=[];for(let t=i.first;t<=i.last;t++)for(const i of n.getChild(t).getChildren())o.push(e.createRangeOn(i));e.change(e=>{e.setSelection(o)})}}class qb extends xd{refresh(){const e=cb(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.model,t=cb(e.document.selection),i=t[0],n=t.pop(),o=i.findAncestor("table"),r=this.editor.plugins.get("TableUtils"),s=r.getCellLocation(i),a=r.getCellLocation(n),c=Math.min(s.column,a.column),l=Math.max(s.column,a.column),d=[];for(const t of new Kp(o,{startColumn:c,endColumn:l}))d.push(e.createRangeOn(t.cell));e.change(e=>{e.setSelection(d)})}}function $b(e){e.document.registerPostFixer(t=>function(e,t){const i=t.document.differ.getChanges();let n=!1;const o=new Set;for(const t of i){let i;"table"==t.name&&"insert"==t.type&&(i=t.position.nodeAfter),"tableRow"!=t.name&&"tableCell"!=t.name||(i=t.position.findAncestor("table")),Kb(t)&&(i=t.range.start.findAncestor("table")),i&&!o.has(i)&&(n=Yb(i,e)||n,n=Gb(i,e)||n,o.add(i))}return n}(t,e))}function Yb(e,t){let i=!1;const n=function(e){const t=parseInt(e.getAttribute("headingRows")||0),i=e.childCount,n=[];for(const{row:o,cell:r,cellHeight:s}of new Kp(e)){if(s<2)continue;const e=oe){const t=e-o;n.push({cell:r,rowspan:t})}}return n}(e);if(n.length){i=!0;for(const e of n)Up("rowspan",e.rowspan,e.cell,t,1)}return i}function Gb(e,t){let i=!1;const n=function(e){const t=new Array(e.childCount).fill(0);for(const{row:i}of new Kp(e,{includeAllSlots:!0}))t[i]++;return t}(e),o=[];for(const[e,t]of n.entries())t||o.push(e);if(o.length){i=!0;for(const i of o.reverse())t.remove(e.getChild(i)),n.splice(i,1)}const r=n[0];if(!n.every(e=>e===r)){const o=n.reduce((e,t)=>t>e?t:e,0);for(const[r,s]of n.entries()){const n=o-s;if(n){for(let i=0;ifunction(e,t){const i=t.document.differ.getChanges();let n=!1;for(const t of i)"insert"==t.type&&"table"==t.name&&(n=Qb(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableRow"==t.name&&(n=Zb(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableCell"==t.name&&(n=Xb(t.position.nodeAfter,e)||n),ew(t)&&(n=Xb(t.position.parent,e)||n);return n}(t,e))}function Qb(e,t){let i=!1;for(const n of e.getChildren())i=Zb(n,t)||i;return i}function Zb(e,t){let i=!1;for(const n of e.getChildren())i=Xb(n,t)||i;return i}function Xb(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;const i=Array.from(e.getChildren()).filter(e=>e.is("$text"));for(const e of i)t.wrap(t.createRangeOn(e),"paragraph");return!!i.length}function ew(e){return!(!e.position||!e.position.parent.is("element","tableCell"))&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}function tw(e){e.document.registerPostFixer(()=>function(e){const t=e.document.differ,i=new Set;let n=0;for(const e of t.getChanges()){const t="insert"==e.type||"remove"==e.type?e.position.parent:e.range.start.parent;t.is("element","tableCell")&&("insert"==e.type&&n++,iw(t,e.type,n)&&i.add(t))}if(i.size){for(const e of i.values())t.refreshItem(e);return!0}return!1}(e))}function iw(e,t,i){if(!Array.from(e.getChildren()).some(e=>e.is("element","paragraph")))return!1;if("attribute"==t){const t=Array.from(e.getChild(0).getAttributeKeys()).length;return 1===e.childCount&&t<2}return e.childCount<=("insert"==t?i+1:1)}function nw(e){e.document.registerPostFixer(()=>function(e){const t=e.document.differ,i=new Set;for(const e of t.getChanges()){if("attribute"!=e.type)continue;const t=e.range.start.nodeAfter;t&&t.is("element","table")&&"headingRows"==e.attributeKey&&i.add(t)}if(i.size){for(const e of i.values())t.refreshItem(e);return!0}return!1}(e))}i(104);class ow extends vd{static get pluginName(){return"TableEditing"}init(){const e=this.editor,t=e.model,i=t.schema,n=e.conversion;i.register("table",{allowWhere:"$block",allowAttributes:["headingRows","headingColumns"],isObject:!0,isBlock:!0}),i.register("tableRow",{allowIn:"table",isLimit:!0}),i.register("tableCell",{allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),i.extend("$block",{allowIn:"tableCell"}),i.addChildCheck((e,t)=>{if("table"==t.name&&Array.from(e.getNames()).includes("table"))return!1}),n.for("upcast").add($p()),n.for("editingDowncast").add(Qp({asWidget:!0})),n.for("dataDowncast").add(Qp()),n.for("upcast").elementToElement({model:"tableRow",view:"tr"}),n.for("upcast").add(e=>{e.on("element:tr",(e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()},{priority:"high"})}),n.for("editingDowncast").add(e=>e.on("insert:tableRow",(e,t,i)=>{const n=t.item;if(!i.consumable.consume(n,"insert"))return;const o=n.parent,r=function(e){for(const t of e.getChildren())if("table"===t.name)return t}(i.mapper.toViewElement(o)),s=o.getChildIndex(n),a=new Kp(o,{row:s}),c={headingRows:o.getAttribute("headingRows")||0,headingColumns:o.getAttribute("headingColumns")||0},l=new Map;for(const e of a){const t=l.get(s)||eb(r,n,s,c,i);l.set(s,t),i.consumable.consume(e.cell,"insert"),Xp(e,c,i.writer.createPositionAt(t,"end"),i,{asWidget:!0})}})),n.for("editingDowncast").add(e=>e.on("remove:tableRow",(e,t,i)=>{e.stop();const n=i.writer,o=i.mapper,r=o.toViewPosition(t.position).getLastMatchingPosition(e=>!e.item.is("element","tr")).nodeAfter,s=r.parent.parent,a=n.createRangeOn(r),c=n.remove(a);for(const e of n.createRangeIn(c).getItems())o.unbindViewElement(e);nb("thead",s,i),nb("tbody",s,i)},{priority:"higher"})),n.for("upcast").elementToElement({model:"tableCell",view:"td"}),n.for("upcast").elementToElement({model:"tableCell",view:"th"}),n.for("upcast").add(Yp("td")),n.for("upcast").add(Yp("th")),n.for("editingDowncast").add(e=>e.on("insert:tableCell",(e,t,i)=>{const n=t.item;if(!i.consumable.consume(n,"insert"))return;const o=n.parent,r=o.parent,s=r.getChildIndex(o),a=new Kp(r,{row:s}),c={headingRows:r.getAttribute("headingRows")||0,headingColumns:r.getAttribute("headingColumns")||0};for(const e of a)if(e.cell===n){const t=i.mapper.toViewElement(o);return void Xp(e,c,i.writer.createPositionAt(t,o.getChildIndex(n)),i,{asWidget:!0})}})),n.attributeToAttribute({model:"colspan",view:"colspan"}),n.attributeToAttribute({model:"rowspan",view:"rowspan"}),n.for("editingDowncast").add(e=>e.on("attribute:headingColumns:table",(e,t,i)=>{const n=t.item;if(!i.consumable.consume(t.item,e.name))return;const o={headingRows:n.getAttribute("headingRows")||0,headingColumns:n.getAttribute("headingColumns")||0},r=t.attributeOldValue,s=t.attributeNewValue,a=(r>s?r:s)-1;for(const e of new Kp(n,{endColumn:a}))Zp(e,o,i)})),e.commands.add("insertTable",new rb(e)),e.commands.add("insertTableRowAbove",new pb(e,{order:"above"})),e.commands.add("insertTableRowBelow",new pb(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new bb(e,{order:"left"})),e.commands.add("insertTableColumnRight",new bb(e,{order:"right"})),e.commands.add("removeTableRow",new Nb(e)),e.commands.add("removeTableColumn",new Rb(e)),e.commands.add("splitTableCellVertically",new wb(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new wb(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new Bb(e)),e.commands.add("mergeTableCellRight",new Mb(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new Mb(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new Mb(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new Mb(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new zb(e)),e.commands.add("setTableRowHeader",new Ob(e)),e.commands.add("selectTableRow",new Wb(e)),e.commands.add("selectTableColumn",new qb(e)),nw(t),$b(t),tw(t),Jb(t)}static get requires(){return[Db]}}i(106);class rw extends Ol{constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",(e,t)=>`${t} × ${e}`),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"mouseover@.ck-insert-table-dropdown-grid-box":t.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck-insert-table-dropdown__label"]},children:[{text:t.to("label")}]}],on:{mousedown:t.to(e=>{e.preventDefault()}),click:t.to(()=>{this.fire("execute")})}}),this.on("boxover",(e,t)=>{const{row:i,column:n}=t.target.dataset;this.set({rows:parseInt(i),columns:parseInt(n)})}),this.on("change:columns",()=>{this._highlightGridBoxes()}),this.on("change:rows",()=>{this._highlightGridBoxes()})}focus(){}focusLast(){}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map((i,n)=>{const o=Math.floor(n/10){const n=e.commands.get("insertTable"),o=hd(i);let r;return o.bind("isEnabled").to(n),o.buttonView.set({icon:'',label:t("Insert table"),tooltip:!0}),o.on("change:isOpen",()=>{r||(r=new rw(i),o.panelView.children.add(r),r.delegate("execute").to(o),o.buttonView.on("open",()=>{r.rows=0,r.columns=0}),o.on("execute",()=>{e.execute("insertTable",{rows:r.rows,columns:r.columns}),e.editing.view.focus()}))}),o}),e.ui.componentFactory.add("tableColumn",e=>{const n=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:t("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:i?"insertTableColumnLeft":"insertTableColumnRight",label:t("Insert column left")}},{type:"button",model:{commandName:i?"insertTableColumnRight":"insertTableColumnLeft",label:t("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:t("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:t("Select column")}}];return this._prepareDropdown(t("Column"),'',n,e)}),e.ui.componentFactory.add("tableRow",e=>{const i=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:t("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:t("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:t("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:t("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:t("Select row")}}];return this._prepareDropdown(t("Row"),'',i,e)}),e.ui.componentFactory.add("mergeTableCells",e=>{const n=[{type:"button",model:{commandName:"mergeTableCellUp",label:t("Merge cell up")}},{type:"button",model:{commandName:i?"mergeTableCellRight":"mergeTableCellLeft",label:t("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:t("Merge cell down")}},{type:"button",model:{commandName:i?"mergeTableCellLeft":"mergeTableCellRight",label:t("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:t("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:t("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(t("Merge cells"),'',n,e)})}_prepareDropdown(e,t,i,n){const o=this.editor,r=hd(n),s=this._fillDropdownWithListOptions(r,i);return r.buttonView.set({label:e,icon:t,tooltip:!0}),r.bind("isEnabled").toMany(s,"isEnabled",(...e)=>e.some(e=>e)),this.listenTo(r,"execute",e=>{o.execute(e.source.commandName),o.editing.view.focus()}),r}_prepareMergeSplitButtonDropdown(e,t,i,n){const o=this.editor,r=hd(n,fg);return this._fillDropdownWithListOptions(r,i),r.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),this.listenTo(r.buttonView,"execute",()=>{o.execute("mergeTableCells"),o.editing.view.focus()}),this.listenTo(r,"execute",e=>{o.execute(e.source.commandName),o.editing.view.focus()}),r}_fillDropdownWithListOptions(e,t){const i=this.editor,n=[],o=new Ii;for(const e of t)cw(e,i,n,o);return fd(e,o,i.ui.componentFactory),n}}function cw(e,t,i,n){const o=e.model=new Km(e.model),{commandName:r,bindIsOn:s}=e.model;if("button"===e.type||"switchbutton"===e.type){const e=t.commands.get(r);i.push(e),o.set({commandName:r}),o.bind("isEnabled").to(e),s&&o.bind("isOn").to(e,"value")}o.set({withText:!0}),n.add(e)}i(108);class lw extends vd{static get pluginName(){return"TableSelection"}static get requires(){return[Db]}init(){const e=this.editor.model;this.listenTo(e,"deleteContent",(e,t)=>this._handleDeleteContent(e,t),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=sb(this.editor.model.document.selection);return 0==e.length?null:e}getSelectionAsFragment(){const e=this.getSelectedTableCells();return e?this.editor.model.change(t=>{const i=t.createDocumentFragment(),n=this.editor.plugins.get("TableUtils"),{first:o,last:r}=db(e),{first:s,last:a}=lb(e),c=e[0].findAncestor("table");let l=a,d=r;if(ub(e,n)){const e={firstColumn:o,lastColumn:r,firstRow:s,lastRow:a};l=Sb(c,e),d=Eb(c,e)}const u=kb(c,{startRow:s,startColumn:o,endRow:l,endColumn:d},t);return t.insert(u,i,0),i}):null}setCellSelection(e,t){const i=this._getCellsToSelect(e,t);this.editor.model.change(e=>{e.setSelection(i.cells.map(t=>e.createRangeOn(t)),{backward:i.backward})})}getFocusCell(){const e=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return e&&e.is("element","tableCell")?e:null}getAnchorCell(){const e=Cd(this.editor.model.document.selection.getRanges()).getContainedElement();return e&&e.is("element","tableCell")?e:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add(e=>e.on("selection",(e,i,n)=>{const o=n.writer;!function(e){for(const i of t)e.removeClass("ck-editor__editable_selected",i);t.clear()}(o);const r=this.getSelectedTableCells();if(!r)return;for(const e of r){const i=n.mapper.toViewElement(e);o.addClass("ck-editor__editable_selected",i),t.add(i)}const s=n.mapper.toViewElement(r[r.length-1]);o.setSelection(s,0)},{priority:"lowest"}))}_enablePluginDisabling(){const e=this.editor;this.on("change:isEnabled",()=>{if(!this.isEnabled){const t=this.getSelectedTableCells();if(!t)return;e.model.change(i=>{const n=i.createPositionAt(t[0],0),o=e.model.schema.getNearestSelectionRange(n);i.setSelection(o)})}})}_handleDeleteContent(e,t){const[i,n]=t,o=this.editor.model,r=!n||"backward"==n.direction,s=sb(i);s.length&&(e.stop(),o.change(e=>{const t=s[r?s.length-1:0];o.change(e=>{for(const t of s)o.deleteContent(e.createSelection(t,"in"))});const n=o.schema.getNearestSelectionRange(e.createPositionAt(t,0));i.is("documentSelection")?e.setSelection(n):i.setTo(n)}))}_getCellsToSelect(e,t){const i=this.editor.plugins.get("TableUtils"),n=i.getCellLocation(e),o=i.getCellLocation(t),r=Math.min(n.row,o.row),s=Math.max(n.row,o.row),a=Math.min(n.column,o.column),c=Math.max(n.column,o.column),l=new Array(s-r+1).fill(null).map(()=>[]),d={startRow:r,endRow:s,startColumn:a,endColumn:c};for(const{row:t,cell:i}of new Kp(e.findAncestor("table"),d))l[t-r].push(i);const u=o.rowe.reverse()),{cells:l.flat(),backward:u||h}}}class dw extends vd{static get pluginName(){return"TableClipboard"}static get requires(){return[lw,Db]}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"copy",(e,t)=>this._onCopyCut(e,t)),this.listenTo(t,"cut",(e,t)=>this._onCopyCut(e,t)),this.listenTo(e.model,"insertContent",(e,t)=>this._onInsertContent(e,...t),{priority:"high"})}_onCopyCut(e,t){const i=this.editor.plugins.get(lw);if(!i.getSelectedTableCells())return;if("cut"==e.name&&this.editor.isReadOnly)return;t.preventDefault(),e.stop();const n=this.editor.data,o=this.editor.editing.view.document,r=n.toView(i.getSelectionAsFragment());o.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:r,method:e.name})}_onInsertContent(e,t,i){if(i&&!i.is("documentSelection"))return;const n=this.editor.model,o=this.editor.plugins.get(Db);let r=function(e,t){if(!e.is("documentFragment")&&!e.is("element"))return null;if(e.is("element","table"))return e;if(1==e.childCount&&e.getChild(0).is("element","table"))return e.getChild(0);const i=t.createRangeIn(e);for(const e of i.getItems())if(e.is("element","table")){const n=t.createRange(i.start,t.createPositionBefore(e));if(t.hasContent(n,{ignoreWhitespaces:!0}))return null;const o=t.createRange(t.createPositionAfter(e),i.end);return t.hasContent(o,{ignoreWhitespaces:!0})?null:e}return null}(t,n);if(!r)return;const s=cb(n.document.selection);s.length?(e.stop(),n.change(e=>{const t={width:o.getColumns(r),height:o.getRows(r)},i=function(e,t,i,n){const o=e[0].findAncestor("table"),r=db(e),s=lb(e),a={firstColumn:r.first,lastColumn:r.last,firstRow:s.first,lastRow:s.last},c=1===e.length;c&&(a.lastRow+=t.height-1,a.lastColumn+=t.width-1,function(e,t,i,n){const o=n.getColumns(e),r=n.getRows(e);i>o&&n.insertColumns(e,{at:o,columns:i-o});t>r&&n.insertRows(e,{at:r,rows:t-r})}(o,a.lastRow+1,a.lastColumn+1,n));c||!ub(e,n)?function(e,t,i){const{firstRow:n,lastRow:o,firstColumn:r,lastColumn:s}=t,a={first:n,last:o},c={first:r,last:s};hw(e,r,a,i),hw(e,s+1,a,i),uw(e,n,c,i),uw(e,o+1,c,i,n)}(o,a,i):(a.lastRow=Sb(o,a),a.lastColumn=Eb(o,a));return a}(s,t,e,o),n=i.lastRow-i.firstRow+1,a=i.lastColumn-i.firstColumn+1,c={startRow:0,startColumn:0,endRow:Math.min(n,t.height)-1,endColumn:Math.min(a,t.width)-1};r=kb(r,c,e);const l=s[0].findAncestor("table"),d=function(e,t,i,n,o){const{width:r,height:s}=t,a=function(e,t,i){const n=new Array(i).fill(null).map(()=>new Array(t).fill(null));for(const{column:t,row:i,cell:o}of new Kp(e))n[i][t]=o;return n}(e,r,s),c=[...new Kp(i,{startRow:n.firstRow,endRow:n.lastRow,startColumn:n.firstColumn,endColumn:n.lastColumn,includeAllSlots:!0})],l=[];let d;for(const e of c){const{row:t,column:i,cell:c,isAnchor:u}=e;i===n.firstColumn&&(d=e.getPositionBefore()),u&&o.remove(c);const h=t-n.firstRow,m=i-n.firstColumn,f=a[h%s][m%r];if(!f)continue;const g=o.cloneElement(f);Ab(g,t,i,n.lastRow,n.lastColumn,o),o.insert(g,d),l.push(g),d=o.createPositionAfter(g)}const u=parseInt(i.getAttribute("headingRows")||0),h=parseInt(i.getAttribute("headingColumns")||0),m=n.firstRowe.createRangeOn(t)));e.setSelection(t)}else e.setSelection(d[0],0)})):Pb(r,o)}}function uw(e,t,i,n,o=0){if(t<1)return;return _b(e,t,o).filter(({column:e,cellWidth:t})=>mw(e,t,i)).map(({cell:e})=>vb(e,t,n))}function hw(e,t,i,n){if(t<1)return;return yb(e,t).filter(({row:e,cellHeight:t})=>mw(e,t,i)).map(({cell:e,column:i})=>xb(e,i,t,n))}function mw(e,t,i){const n=e+t-1,{first:o,last:r}=i;return e>=o&&e<=r||e=o}class fw extends vd{static get pluginName(){return"TableKeyboard"}static get requires(){return[lw]}init(){const e=this.editor.editing.view.document;this.editor.keystrokes.set("Tab",(...e)=>this._handleTabOnSelectedTable(...e),{priority:"low"}),this.editor.keystrokes.set("Tab",this._getTabHandler(!0),{priority:"low"}),this.editor.keystrokes.set("Shift+Tab",this._getTabHandler(!1),{priority:"low"}),this.listenTo(e,"keydown",(...e)=>this._onKeydown(...e),{priority:wi.get("high")-10})}_handleTabOnSelectedTable(e,t){const i=this.editor,n=i.model.document.selection.getSelectedElement();n&&n.is("element","table")&&(t(),i.model.change(e=>{e.setSelection(e.createRangeIn(n.getChild(0).getChild(0)))}))}_getTabHandler(e){const t=this.editor;return(i,n)=>{let o=ab(t.model.document.selection)[0];if(o||(o=this.editor.plugins.get("TableSelection").getFocusCell()),!o)return;n();const r=o.parent,s=r.parent,a=s.getChildIndex(r),c=r.getChildIndex(o),l=0===c;if(!e&&l&&0===a)return void t.model.change(e=>{e.setSelection(e.createRangeOn(s))});const d=c===r.childCount-1,u=a===s.childCount-1;if(e&&u&&d&&(t.execute("insertTableRowBelow"),a===s.childCount-1))return void t.model.change(e=>{e.setSelection(e.createRangeOn(s))});let h;if(e&&d){const e=s.getChild(a+1);h=e.getChild(0)}else if(!e&&l){const e=s.getChild(a-1);h=e.getChild(e.childCount-1)}else h=r.getChild(c+(e?1:-1));t.model.change(e=>{e.setSelection(e.createRangeIn(h))})}}_onKeydown(e,t){const i=this.editor,n=t.keyCode;if(!Po(n))return;const o=So(n,i.locale.contentLanguageDirection);this._handleArrowKeys(o,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const i=this.editor.model.document.selection,n=["right","down"].includes(e),o=sb(i);if(o.length){let i;return i=t?this.editor.plugins.get("TableSelection").getFocusCell():n?o[o.length-1]:o[0],this._navigateFromCellInDirection(i,e,t),!0}const r=i.focus.findAncestor("tableCell");return!!r&&(!(t&&!i.isCollapsed&&i.isBackward==n)&&(!!this._isSelectionAtCellEdge(i,r,n)&&(this._navigateFromCellInDirection(r,e,t),!0)))}_isSelectionAtCellEdge(e,t,i){const n=this.editor.model,o=this.editor.model.schema,r=i?e.getLastPosition():e.getFirstPosition();if(!o.getLimitElement(r).is("element","tableCell")){return n.createPositionAt(t,i?"end":0).isTouching(r)}const s=n.createSelection(r);return n.modifySelection(s,{direction:i?"forward":"backward"}),r.isEqual(s.focus)}_navigateFromCellInDirection(e,t,i=!1){const n=this.editor.model,o=e.findAncestor("table"),r=[...new Kp(o,{includeAllSlots:!0})],{row:s,column:a}=r[r.length-1],c=r.find(({cell:t})=>t==e);let{row:l,column:d}=c;switch(t){case"left":d--;break;case"up":l--;break;case"right":d+=c.cellWidth;break;case"down":l+=c.cellHeight}if(l<0||l>s||d<0&&l<=0||d>a&&l>=s)return void n.change(e=>{e.setSelection(e.createRangeOn(o))});d<0?(d=i?0:a,l--):d>a&&(d=i?a:0,l++);const u=r.find(e=>e.row==l&&e.column==d).cell,h=["right","down"].includes(t),m=this.editor.plugins.get("TableSelection");if(i&&m.isEnabled){const t=m.getAnchorCell()||e;m.setCellSelection(t,u)}else{const e=n.createPositionAt(u,h?0:"end");n.change(t=>{t.setSelection(e)})}}}class gw extends Gr{constructor(e){super(e),this.domEventType=["mousemove","mouseup","mouseleave"]}onDomEvent(e){this.fire(e.type,e)}}class pw extends vd{static get pluginName(){return"TableMouse"}static get requires(){return[lw]}init(){this.editor.editing.view.addObserver(gw),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor;let t=!1;const i=e.plugins.get(lw);this.listenTo(e.editing.view.document,"mousedown",(n,o)=>{if(!this.isEnabled||!i.isEnabled)return;if(!o.domEvent.shiftKey)return;const r=i.getAnchorCell()||ab(e.model.document.selection)[0];if(!r)return;const s=this._getModelTableCellFromDomEvent(o);s&&bw(r,s)&&(t=!0,i.setCellSelection(r,s),o.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{t=!1}),this.listenTo(e.editing.view.document,"selectionChange",e=>{t&&e.stop()},{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,i,n=!1,o=!1;const r=e.plugins.get(lw);this.listenTo(e.editing.view.document,"mousedown",(e,i)=>{this.isEnabled&&r.isEnabled&&(i.domEvent.shiftKey||i.domEvent.ctrlKey||i.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(i)))}),this.listenTo(e.editing.view.document,"mousemove",(e,s)=>{if(!s.domEvent.buttons)return;if(!t)return;const a=this._getModelTableCellFromDomEvent(s);a&&bw(t,a)&&(i=a,n||i==t||(n=!0)),n&&(o=!0,r.setCellSelection(t,i),s.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{n=!1,o=!1,t=null,i=null}),this.listenTo(e.editing.view.document,"selectionChange",e=>{o&&e.stop()},{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,i=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(i).parent.findAncestor("tableCell",{includeSelf:!0})}}function bw(e,t){return e.parent.parent==t.parent.parent}i(110);function ww(e){const t=e.getSelectedElement();return t&&_w(t)?t:null}function kw(e){const t=function(e,t){let i=t.parent;for(;i;){if(i.name===e)return i;i=i.parent}}("table",e.getFirstPosition());return t&&_w(t.parent)?t.parent:null}function _w(e){return!!e.getCustomProperty("table")&&lu(e)}var vw=/[\\^$.*+?()[\]{}|]/g,yw=RegExp(vw.source);var xw=function(e){return(e=sn(e))&&yw.test(e)?e.replace(vw,"\\$&"):e};const Aw={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:"1/2",to:"½"},oneThird:{from:"1/3",to:"⅓"},twoThirds:{from:"2/3",to:"⅔"},oneForth:{from:"1/4",to:"¼"},threeQuarters:{from:"3/4",to:"¾"},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:Mw('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:Mw("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:Mw("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:Mw('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:Mw('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:Mw("'"),to:[null,"‚",null,"’"]}},Cw={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},Tw=["symbols","mathematical","typography","quotes"];function Pw(e){return"string"==typeof e?new RegExp(`(${xw(e)})$`):e}function Sw(e){return"string"==typeof e?()=>[e]:e instanceof Array?()=>e:e}function Ew(e){return(e.textNode?e.textNode:e.nodeAfter).getAttributes()}function Mw(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function Iw(e){if(e.is("$text")||e.is("$textProxy"))return e.data;let t="",i=null;for(const n of e.getChildren()){const e=Iw(n);i&&i.is("element")&&(t+="\n"),t+=e,i=n}return t}class Nw{constructor(e,t){this.loader=e,this.options=t}upload(){return this.loader.file.then(e=>new Promise((t,i)=>{this._initRequest(),this._initListeners(t,i,e),this._sendRequest(e)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.options.uploadUrl,!0),e.responseType="json"}_initListeners(e,t,i){const n=this.xhr,o=this.loader,r=`Couldn't upload file: ${i.name}.`;n.addEventListener("error",()=>t(r)),n.addEventListener("abort",()=>t()),n.addEventListener("load",()=>{const i=n.response;if(!i||i.error)return t(i&&i.error&&i.error.message?i.error.message:r);e(i.url?{default:i.url}:i.urls)}),n.upload&&n.upload.addEventListener("progress",e=>{e.lengthComputable&&(o.uploadTotal=e.total,o.uploaded=e.loaded)})}_sendRequest(e){const t=this.options.headers||{},i=this.options.withCredentials||!1;for(const e of Object.keys(t))this.xhr.setRequestHeader(e,t[e]);this.xhr.withCredentials=i;const n=new FormData;n.append("upload",e),this.xhr.send(n)}}class Rw extends _d{}Rw.builtinPlugins=[class extends vd{static get requires(){return[Id,zd]}static get pluginName(){return"Alignment"}},class extends vd{static get pluginName(){return"AutoLink"}init(){const e=this.editor.model.document.selection;e.on("change:range",()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")}),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){const e=this.editor,t=new Ld(e.model,e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=Bd(e.substr(0,e.length-1));return t?{url:t}:void 0}),i=e.plugins.get("Input");t.on("matched:data",(t,n)=>{const{batch:o,range:r,url:s}=n;if(!i.isInput(o))return;const a=r.end.getShiftedBy(-1),c=a.getShiftedBy(-s.length),l=e.model.createRange(c,a);this._applyAutoLink(s,l)}),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("enter");i&&i.on("execute",()=>{const e=t.document.selection.getFirstPosition(),i=t.createRange(t.createPositionAt(e.parent.previousSibling,0),t.createPositionAt(e.parent.previousSibling,"end"));this._checkAndApplyAutoLinkOnRange(i)})}_enableShiftEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("shiftEnter");i&&i.on("execute",()=>{const e=t.document.selection.getFirstPosition(),i=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(i)})}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:i,range:n}=Dd(e,t),o=Bd(i);if(o){const e=t.createRange(n.end.getShiftedBy(-o.length),n.end);this._applyAutoLink(o,e)}}_applyAutoLink(e,t){const i=this.editor.model;this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,i)&&i.enqueueChange(i=>{const n=(o=e,jd.exec(o)?"mailto:"+e:e);var o;i.setAttribute("linkHref",n,t)})}},class extends vd{static get requires(){return[Ud,qd]}static get pluginName(){return"Bold"}},class extends vd{static get pluginName(){return"CKFinder"}static get requires(){return[Nh,$d,Bh]}},Bh,class extends vd{static get requires(){return[Gu,$h,im,Jh,sm,Pm]}static get pluginName(){return"Essentials"}},class extends vd{static get requires(){return[Bm,Um]}static get pluginName(){return"FontColor"}},class extends vd{static get requires(){return[Gm,Jm]}static get pluginName(){return"FontSize"}},class extends vd{static get requires(){return[rf,sf]}static get pluginName(){return"Heading"}},class extends vd{static get requires(){return[Em,Mm]}static get pluginName(){return"HorizontalLine"}},Nf,class extends vd{static get requires(){return[zf]}static get pluginName(){return"ImageCaption"}},class extends vd{static get requires(){return[Ff,Zf,Wf]}static get pluginName(){return"ImageResize"}},class extends vd{static get requires(){return[lg,dg]}static get pluginName(){return"ImageStyle"}},class extends vd{static get requires(){return[ug]}static get pluginName(){return"ImageToolbar"}afterInit(){const e=this.editor,t=e.t;e.plugins.get(ug).register("image",{ariaLabel:t("Image toolbar"),items:e.config.get("image.toolbar")||[],getRelatedElement:wu})}},class extends vd{static get pluginName(){return"ImageUpload"}static get requires(){return[Ng,yg,xg]}},class extends vd{static get pluginName(){return"Indent"}static get requires(){return[zg,Vg]}},class extends vd{static get requires(){return[Bg,Hg]}static get pluginName(){return"Italic"}},class extends vd{static get requires(){return[Ch,Jg]}static get pluginName(){return"Link"}},class extends vd{static get requires(){return[Zg,ip]}static get pluginName(){return"LinkImage"}},class extends vd{static get requires(){return[Sp,Mp]}static get pluginName(){return"List"}},class extends vd{static get requires(){return[Vp,Hp,Bp,ff]}static get pluginName(){return"MediaEmbed"}},ef,class extends vd{static get requires(){return[zh]}static get pluginName(){return"SimpleUploadAdapter"}init(){const e=this.editor.config.get("simpleUpload");e&&(e.uploadUrl?this.editor.plugins.get(zh).createUploadAdapter=t=>new Nw(t,e):console.warn(Object(ki.a)('simple-upload-adapter-missing-uploadUrl: Missing the "uploadUrl" property in the "simpleUpload" editor configuration.')))}},class extends vd{static get requires(){return[ow,aw,lw,pw,fw,dw,ff]}static get pluginName(){return"Table"}},class extends vd{static get requires(){return[ug]}static get pluginName(){return"TableToolbar"}afterInit(){const e=this.editor,t=e.t,i=e.plugins.get(ug),n=e.config.get("table.contentToolbar"),o=e.config.get("table.tableToolbar");n&&i.register("tableContent",{ariaLabel:t("Table toolbar"),items:n,getRelatedElement:kw}),o&&i.register("table",{ariaLabel:t("Table toolbar"),items:o,getRelatedElement:ww})}},class extends vd{static get pluginName(){return"TextTransformation"}constructor(e){super(e),e.config.define("typing",{transformations:{include:Tw}})}init(){const e=this.editor.model.document.selection;e.on("change:range",()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")}),this._enableTransformationWatchers()}_enableTransformationWatchers(){const e=this.editor,t=e.model,i=e.plugins.get("Input"),n=function(e){const t=e.extra||[],i=e.remove||[],n=e=>!i.includes(e);return function(e){const t=new Set;for(const i of e)if(Cw[i])for(const e of Cw[i])t.add(e);else t.add(i);return Array.from(t)}(e.include.concat(t).filter(n)).filter(n).map(e=>Aw[e]||e).map(e=>({from:Pw(e.from),to:Sw(e.to)}))}(e.config.get("typing.transformations")),o=new Ld(e.model,e=>{for(const t of n){if(t.from.test(e))return{normalizedTransformation:t}}});o.on("matched:data",(e,n)=>{if(!i.isInput(n.batch))return;const{from:o,to:r}=n.normalizedTransformation,s=o.exec(n.text),a=r(s.slice(1)),c=n.range;let l=s.index;t.enqueueChange(e=>{for(let i=1;i{this._config.onUpdate(t)}),di(this._config.container)&&this._config.container.appendChild(this.wordCountContainer)}destroy(){this._outputView&&(this._outputView.element.remove(),this._outputView.destroy()),super.destroy()}get wordCountContainer(){const e=this.editor,t=e.t,i=e.config.get("wordCount.displayWords"),n=e.config.get("wordCount.displayCharacters"),o=gl.bind(this,this),r=[];return this._outputView||(this._outputView=new Ol,(i||void 0===i)&&(this.bind("_wordsLabel").to(this,"words",e=>t("Words: %0",[e])),r.push({tag:"div",children:[{text:[o.to("_wordsLabel")]}],attributes:{class:"ck-word-count__words"}})),(n||void 0===n)&&(this.bind("_charactersLabel").to(this,"characters",e=>t("Characters: %0",[e])),r.push({tag:"div",children:[{text:[o.to("_charactersLabel")]}],attributes:{class:"ck-word-count__characters"}})),this._outputView.setTemplate({tag:"div",attributes:{class:["ck","ck-word-count"]},children:r}),this._outputView.render()),this._outputView.element}_getCharacters(){return Iw(this.editor.model.document.getRoot()).replace(/\n/g,"").length}_getWords(){return(Iw(this.editor.model.document.getRoot()).match(this._wordsMatchRegExp)||[]).length}_refreshStats(){const e=this.words=this._getWords(),t=this.characters=this._getCharacters();this.fire("update",{words:e,characters:t})}}];t.default=Rw}]).default})); //# sourceMappingURL=ckeditor.js.map \ No newline at end of file diff --git a/resources/views/admin/articles/form.blade.php b/resources/views/admin/articles/form.blade.php deleted file mode 100644 index 4a6738d..0000000 --- a/resources/views/admin/articles/form.blade.php +++ /dev/null @@ -1,12 +0,0 @@ -@extends('twill::layouts.form') - -@section('contentFields') - @formField('wysiwyg', [ - 'name' => 'description', - 'label' => 'Chapeau', - 'maxlength' => 400, - 'note' => 'Texte visible par tout le monde', - - ]) - @formField('block_editor') -@stop diff --git a/resources/views/admin/socialArticles/form.blade.php b/resources/views/admin/socialArticles/form.blade.php index 7dacf56..60a3295 100644 --- a/resources/views/admin/socialArticles/form.blade.php +++ b/resources/views/admin/socialArticles/form.blade.php @@ -1,5 +1,8 @@ @extends('twill::layouts.form') @section('contentFields') - @formField('block_editor', ['blocks' => ['image', 'text', 'youtube']]) + @formField('ckeditor', [ + 'name' => 'content', + 'label' => 'Article complet', + ]) @stop diff --git a/resources/views/social-articles/show.blade.php b/resources/views/social-articles/show.blade.php index b4738a5..1205977 100644 --- a/resources/views/social-articles/show.blade.php +++ b/resources/views/social-articles/show.blade.php @@ -10,8 +10,8 @@

{{$article->title}}

-
- {!! $article->renderBlocks() !!} +
+ {!! $article->content !!}