Skip to content

Build your personal knowledge base with Trilium Notes

ckeditor 35.1.0

zadam20ff5627d8f8
diff --git a/libraries/ckeditor/ckeditor-content.css b/libraries/ckeditor/ckeditor-content.css
index ea8d762783..c6c3686ce9 100644
--- a/libraries/ckeditor/ckeditor-content.css
+++ b/libraries/ckeditor/ckeditor-content.css
@@ -5,9 +5,9 @@
}
/*
- * CKEditor 5 (v33.0.0) content styles.
- * Generated on Fri, 11 Mar 2022 14:34:26 GMT.
- * For more information, check out https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/content-styles.html
+ * CKEditor 5 (v35.1.0) content styles.
+ * Generated on Tue, 20 Sep 2022 05:36:21 GMT.
+ * For more information, check out https://ckeditor.com/docs/ckeditor5/latest/installation/advanced/content-styles.html
*/
:root {
@@ -28,6 +28,21 @@
--ck-todo-list-checkmark-size: 16px;
}
+/* ckeditor5-block-quote/theme/blockquote.css */
+.ck-content blockquote {
+ overflow: hidden;
+ padding-right: 1.5em;
+ padding-left: 1.5em;
+ margin-left: 0;
+ margin-right: 0;
+ font-style: italic;
+ border-left: solid 5px hsl(0, 0%, 80%);
+}
+/* ckeditor5-block-quote/theme/blockquote.css */
+.ck-content[dir="rtl"] blockquote {
+ border-left: 0;
+ border-right: solid 5px hsl(0, 0%, 80%);
+}
/* ckeditor5-basic-styles/theme/code.css */
.ck-content code {
background-color: hsla(0, 0%, 78%, 0.3);
@@ -50,21 +65,6 @@
.ck-content .text-huge {
font-size: 1.8em;
}
-/* ckeditor5-block-quote/theme/blockquote.css */
-.ck-content blockquote {
- overflow: hidden;
- padding-right: 1.5em;
- padding-left: 1.5em;
- margin-left: 0;
- margin-right: 0;
- font-style: italic;
- border-left: solid 5px hsl(0, 0%, 80%);
-}
-/* ckeditor5-block-quote/theme/blockquote.css */
-.ck-content[dir="rtl"] blockquote {
- border-left: 0;
- border-right: solid 5px hsl(0, 0%, 80%);
-}
/* ckeditor5-highlight/theme/highlight.css */
.ck-content .marker-yellow {
background-color: var(--ck-highlight-marker-yellow);
@@ -128,6 +128,20 @@
flex-shrink: 1;
max-width: 100%;
}
+/* ckeditor5-image/theme/imageresize.css */
+.ck-content .image.image_resized {
+ max-width: 100%;
+ display: block;
+ box-sizing: border-box;
+}
+/* ckeditor5-image/theme/imageresize.css */
+.ck-content .image.image_resized img {
+ width: 100%;
+}
+/* ckeditor5-image/theme/imageresize.css */
+.ck-content .image.image_resized > figcaption {
+ display: block;
+}
/* ckeditor5-image/theme/imagecaption.css */
.ck-content .image > figcaption {
display: table-caption;
@@ -200,20 +214,6 @@
.ck-content .image-inline.image-style-align-right {
margin-left: var(--ck-inline-image-style-spacing);
}
-/* ckeditor5-image/theme/imageresize.css */
-.ck-content .image.image_resized {
- max-width: 100%;
- display: block;
- box-sizing: border-box;
-}
-/* ckeditor5-image/theme/imageresize.css */
-.ck-content .image.image_resized img {
- width: 100%;
-}
-/* ckeditor5-image/theme/imageresize.css */
-.ck-content .image.image_resized > figcaption {
- display: block;
-}
/* ckeditor5-language/theme/language.css */
.ck-content span[lang] {
font-style: italic;
@@ -361,6 +361,19 @@
.ck-content[dir="ltr"] .table th {
text-align: left;
}
+/* ckeditor5-table/theme/tablecolumnresize.css */
+.ck-content .table .ck-table-resized {
+ table-layout: fixed;
+}
+/* ckeditor5-table/theme/tablecolumnresize.css */
+.ck-content .table table {
+ overflow: hidden;
+}
+/* ckeditor5-table/theme/tablecolumnresize.css */
+.ck-content .table td,
+.ck-content .table th {
+ position: relative;
+}
/* ckeditor5-table/theme/tablecaption.css */
.ck-content .table > figcaption {
display: table-caption;
diff --git a/libraries/ckeditor/ckeditor.js b/libraries/ckeditor/ckeditor.js
index d7139f2e9b..c736566d16 100644
--- a/libraries/ckeditor/ckeditor.js
+++ b/libraries/ckeditor/ckeditor.js
@@ -1,7 +1,7 @@
-!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{"%0 of %1":"%0 of %1","Align cell text to the bottom":"Align cell text to the bottom","Align cell text to the center":"Align cell text to the center","Align cell text to the left":"Align cell text to the left","Align cell text to the middle":"Align cell text to the middle","Align cell text to the right":"Align cell text to the right","Align cell text to the top":"Align cell text to the top","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Aquamarine:"Aquamarine",Background:"Background",Big:"Big",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold",Border:"Border","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Cannot upload file:":"Cannot upload file:","Cell properties":"Cell properties","Center table":"Center table","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Code:"Code",Color:"Color","Color picker":"Color picker",Column:"Column",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent",Default:"Default","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc","Document colors":"Document colors",Dotted:"Dotted",Double:"Double",Downloadable:"Downloadable","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Enter table caption":"Enter table caption",Find:"Find","Find and replace":"Find and replace","Find in text…":"Find in text…","Font Background Color":"Font Background Color","Font Color":"Font Color","Font Family":"Font Family","Font Size":"Font Size","Full size image":"Full size image",Green:"Green",Grey:"Grey",Groove:"Groove","Header column":"Header column","Header row":"Header row",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6",Height:"Height","Horizontal line":"Horizontal line","Horizontal text alignment toolbar":"Horizontal text alignment toolbar",Huge:"Huge","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase indent":"Increase indent","Insert code block":"Insert code block","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table",Inset:"Inset",Italic:"Italic","Justify cell text":"Justify cell text","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link URL":"Link URL","List properties":"List properties","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","Match case":"Match case","Merge cell down":"Merge cell down","Merge cell left":"Merge cell left","Merge cell right":"Merge cell right","Merge cell up":"Merge cell up","Merge cells":"Merge cells",Next:"Next","Next result":"Next result",None:"None","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Orange:"Orange",Original:"Original",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraph","Plain text":"Plain text",Previous:"Previous","Previous result":"Previous result",Purple:"Purple",Red:"Red",Redo:"Redo","Remove color":"Remove color","Remove Format":"Remove Format",Replace:"Replace","Replace all":"Replace all","Replace with…":"Replace with…","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Restore default":"Restore default","Reversed order":"Reversed order","Rich Text Editor":"Rich Text Editor","Rich Text Editor, %0":"Rich Text Editor, %0",Ridge:"Ridge","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select all":"Select all","Select column":"Select column","Select row":"Select row","Show more items":"Show more items","Show options":"Show options","Side image":"Side image",Small:"Small",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough",Style:"Style",Subscript:"Subscript",Superscript:"Superscript","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Text alternative":"Text alternative","Text to find must not be empty.":"Text to find must not be empty.",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'The value is invalid. Try "10px" or "2em" or simply "2".',"This link has no URL":"This link has no URL",Tiny:"Tiny","Tip: Find some text first in order to replace it.":"Tip: Find some text first in order to replace it.","To-do List":"To-do List","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","Toggle the circle list style":"Toggle the circle list style","Toggle the decimal list style":"Toggle the decimal list style","Toggle the decimal with leading zero list style":"Toggle the decimal with leading zero list style","Toggle the disc list style":"Toggle the disc list style","Toggle the lower–latin list style":"Toggle the lower–latin list style","Toggle the lower–roman list style":"Toggle the lower–roman list style","Toggle the square list style":"Toggle the square list style","Toggle the upper–latin list style":"Toggle the upper–latin list style","Toggle the upper–roman list style":"Toggle the upper–roman list style",Turquoise:"Turquoise",Underline:"Underline",Undo:"Undo",Unlink:"Unlink","Upload failed":"Upload failed","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Vertical text alignment toolbar":"Vertical text alignment toolbar",White:"White","Whole words only":"Whole words only","Widget toolbar":"Widget toolbar",Width:"Width","Wrap text":"Wrap text",Yellow:"Yellow"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
+!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{"%0 of %1":"%0 of %1","Align cell text to the bottom":"Align cell text to the bottom","Align cell text to the center":"Align cell text to the center","Align cell text to the left":"Align cell text to the left","Align cell text to the middle":"Align cell text to the middle","Align cell text to the right":"Align cell text to the right","Align cell text to the top":"Align cell text to the top","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Aquamarine:"Aquamarine",Background:"Background",Big:"Big",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold",Border:"Border","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Cannot upload file:":"Cannot upload file:","Caption for image: %0":"Caption for image: %0","Caption for the image":"Caption for the image","Cell properties":"Cell properties","Center table":"Center table","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Code:"Code",Color:"Color","Color picker":"Color picker",Column:"Column",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent",Default:"Default","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc","Document colors":"Document colors",Dotted:"Dotted",Double:"Double",Downloadable:"Downloadable","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor block content toolbar":"Editor block content toolbar","Editor contextual toolbar":"Editor contextual toolbar","Editor editing area: %0":"Editor editing area: %0","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Enter table caption":"Enter table caption",Find:"Find","Find and replace":"Find and replace","Find in text…":"Find in text…","Font Background Color":"Font Background Color","Font Color":"Font Color","Font Family":"Font Family","Font Size":"Font Size","Full size image":"Full size image",Green:"Green",Grey:"Grey",Groove:"Groove","Header column":"Header column","Header row":"Header row",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6",Height:"Height","Horizontal line":"Horizontal line","Horizontal text alignment toolbar":"Horizontal text alignment toolbar",Huge:"Huge","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase indent":"Increase indent","Insert code block":"Insert code block","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table",Inset:"Inset",Italic:"Italic","Justify cell text":"Justify cell text","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link URL":"Link URL","List properties":"List properties","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","Match case":"Match case","Merge cell down":"Merge cell down","Merge cell left":"Merge cell left","Merge cell right":"Merge cell right","Merge cell up":"Merge cell up","Merge cells":"Merge cells",Next:"Next","Next result":"Next result",None:"None","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Orange:"Orange",Original:"Original",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraph","Plain text":"Plain text",Previous:"Previous","Previous result":"Previous result",Purple:"Purple",Red:"Red",Redo:"Redo","Remove color":"Remove color","Remove Format":"Remove Format",Replace:"Replace","Replace all":"Replace all","Replace with…":"Replace with…","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Restore default":"Restore default","Reversed order":"Reversed order","Rich Text Editor":"Rich Text Editor","Rich Text Editor. Editing area: %0":"Rich Text Editor. Editing area: %0",Ridge:"Ridge","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select all":"Select all","Select column":"Select column","Select row":"Select row","Show more items":"Show more items","Show options":"Show options","Side image":"Side image",Small:"Small",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough",Style:"Style",Subscript:"Subscript",Superscript:"Superscript","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Text alternative":"Text alternative","Text to find must not be empty.":"Text to find must not be empty.",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'The value is invalid. Try "10px" or "2em" or simply "2".',"This link has no URL":"This link has no URL",Tiny:"Tiny","Tip: Find some text first in order to replace it.":"Tip: Find some text first in order to replace it.","To-do List":"To-do List","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","Toggle the circle list style":"Toggle the circle list style","Toggle the decimal list style":"Toggle the decimal list style","Toggle the decimal with leading zero list style":"Toggle the decimal with leading zero list style","Toggle the disc list style":"Toggle the disc list style","Toggle the lower–latin list style":"Toggle the lower–latin list style","Toggle the lower–roman list style":"Toggle the lower–roman list style","Toggle the square list style":"Toggle the square list style","Toggle the upper–latin list style":"Toggle the upper–latin list style","Toggle the upper–roman list style":"Toggle the upper–roman list style",Turquoise:"Turquoise",Underline:"Underline",Undo:"Undo",Unlink:"Unlink","Upload failed":"Upload failed","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Vertical text alignment toolbar":"Vertical text alignment toolbar",White:"White","Whole words only":"Whole words only","Widget toolbar":"Widget toolbar",Width:"Width","Wrap text":"Wrap text",Yellow:"Yellow"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md.
*/
-function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.BalloonEditor=e():t.BalloonEditor=e()}(self,(function(){return(()=>{"use strict";var t={4722:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-math-form{display:flex;align-items:flex-start;flex-direction:row;flex-wrap:nowrap}@media screen and (max-width:600px){.ck.ck-math-form{flex-wrap:wrap}.ck.ck-math-form .ck-math-view,.ck.ck-math-form .ck-math-view .ck-label,.ck.ck-math-form .ck-math-view .ck-labeled-input{flex-basis:100%}.ck.ck-math-form .ck-button{flex-basis:50%}}.ck-math-tex.ck-placeholder:before{display:none!important}.ck.ck-toolbar-container{z-index:calc(var(--ck-z-modal) + 2)}.ck.ck-math-form{padding:var(--ck-spacing-standard)}.ck.ck-math-form:focus{outline:none}[dir=ltr] .ck.ck-math-form>:not(:first-child),[dir=rtl] .ck.ck-math-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-math-form{padding:0}.ck.ck-math-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-math-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-math-form .ck-label,.ck.ck-math-form .ck-math-view .ck-button,.ck.ck-math-form .ck-math-view .ck.ck-math-preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-math-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-math-form>.ck-button{margin-left:0}[dir=ltr] .ck.ck-math-form>.ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-math-form>.ck-button{margin-left:0}[dir=rtl] .ck.ck-math-form>.ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}","",{version:3,sources:["webpack://./../../node_modules/ckeditor5-math/theme/mathform.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-math/mathform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAAA,iBACC,YAAa,CACb,sBAAuB,CACvB,kBAAmB,CACnB,gBAqBD,CAnBC,oCAND,iBAOE,cAkBF,CATG,yHACC,eACD,CAGD,4BACC,cACD,CACD,CAGD,mCACC,sBACD,CAEA,yBACC,mCACD,CC9BA,iBACI,kCAsEJ,CApEI,uBAEF,YACD,CASC,2FACC,sCACD,CCdD,oCDHD,iBAqBE,SAkDF,CAhDE,mCACC,8DAMD,CAJC,kDACC,WAAY,CACZ,UACD,CAYA,wHACC,8DACD,CAGD,4BACC,kCAAmC,CACnC,qCAAsC,CAEtC,eAAgB,CAChB,QAAS,CACT,gDAiBD,CAvBA,sCASE,aAcF,CAZE,oDACC,kDACD,CAbF,sCAiBE,aAMF,CAJE,mDACC,kDACD,CC9DH",sourcesContent:[".ck.ck-math-form {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t@media screen and (max-width: 600px) {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-math-view {\n\t\t\tflex-basis: 100%;\n\n\t\t\t& .ck-labeled-input {\n\t\t\t\tflex-basis: 100%;\n\t\t\t}\n\n\t\t\t& .ck-label {\n\t\t\t\tflex-basis: 100%;\n\t\t\t}\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n\n.ck-math-tex.ck-placeholder::before {\n\tdisplay: none !important;\n}\n\n.ck.ck-toolbar-container {\n\tz-index: calc(var(--ck-z-modal) + 2);\n}\n",'@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-math-form {\n padding: var(--ck-spacing-standard);\n\n &:focus {\n\t\t/* https://github.com/ckeditor/ckeditor5-link/issues/90 */\n\t\toutline: none;\n\t}\n\n @mixin ck-dir ltr {\n\t\t& > :not(:first-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& > :not(:last-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\tpadding: 0;\n\n\t\t& .ck-labeled-input {\n\t\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\n\n\t\t\t& .ck-input-text {\n\t\t\t\tmin-width: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\n & .ck-label {\n margin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\n }\n\n\t\t& .ck-math-view {\n\t\t\t& .ck-button {\n\t\t\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\n\t\t\t}\n\n\t\t\t& .ck.ck-math-preview {\n\t\t\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\n\t\t\t}\n\t\t}\n\n\t\t& > .ck-button {\n\t\t\tpadding: var(--ck-spacing-standard);\n\t\t\tmargin-top: var(--ck-spacing-standard);\n\n\t\t\tborder-radius: 0;\n\t\t\tborder: 0;\n\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: 0;\n\n\t\t\t\t&:first-of-type {\n\t\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-left: 0;\n\n\t\t\t\t&:last-of-type {\n\t\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},8603:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-content code{background-color:hsla(0,0%,78%,.3);padding:.15em;border-radius:2px}.ck.ck-editor__editable .ck-code_selected{background-color:hsla(0,0%,78%,.5)}","",{version:3,sources:["webpack://./../ckeditor5-basic-styles/theme/code.css"],names:[],mappings:"AAKA,iBACC,kCAAuC,CACvC,aAAc,CACd,iBACD,CAEA,0CACC,kCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content code {\n\tbackground-color: hsla(0, 0%, 78%, 0.3);\n\tpadding: .15em;\n\tborder-radius: 2px;\n}\n\n.ck.ck-editor__editable .ck-code_selected {\n\tbackground-color: hsla(0, 0%, 78%, 0.5);\n}\n"],sourceRoot:""}]);const a=s},3062:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-content blockquote{overflow:hidden;padding-right:1.5em;padding-left:1.5em;margin-left:0;margin-right:0;font-style:italic;border-left:5px solid #ccc}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}","",{version:3,sources:["webpack://./../ckeditor5-block-quote/theme/blockquote.css"],names:[],mappings:"AAKA,uBAEC,eAAgB,CAGhB,mBAAoB,CACpB,kBAAmB,CAEnB,aAAc,CACd,cAAe,CACf,iBAAkB,CAClB,0BACD,CAEA,gCACC,aAAc,CACd,2BACD",sourcesContent:['/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content blockquote {\n\t/* See #12 */\n\toverflow: hidden;\n\n\t/* https://github.com/ckeditor/ckeditor5-block-quote/issues/15 */\n\tpadding-right: 1.5em;\n\tpadding-left: 1.5em;\n\n\tmargin-left: 0;\n\tmargin-right: 0;\n\tfont-style: italic;\n\tborder-left: solid 5px hsl(0, 0%, 80%);\n}\n\n.ck-content[dir="rtl"] blockquote {\n\tborder-left: 0;\n\tborder-right: solid 5px hsl(0, 0%, 80%);\n}\n'],sourceRoot:""}]);const a=s},9932:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-find-result{background:#ff0;color:var(--ck-color-text)}.ck-find-result_selected{background:#ff9633}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-find-and-replace/theme/findandreplace.css"],names:[],mappings:"AAKA,gBACC,eAA8B,CAC9B,0BACD,CAEA,yBACC,kBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-find-result {\n\tbackground: hsl(60, 100%, 50%);\n\tcolor: var(--ck-color-text);\n}\n\n.ck-find-result_selected {\n\tbackground: hsl(29, 100%, 60%);\n}\n"],sourceRoot:""}]);const a=s},2822:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-find-and-replace-form{max-width:100%}.ck.ck-find-and-replace-form fieldset{display:flex}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{position:absolute}.ck.ck-find-and-replace-form{width:400px}.ck.ck-find-and-replace-form:focus{outline:none}.ck.ck-find-and-replace-form fieldset{flex-direction:row;flex-wrap:nowrap;align-items:center;align-content:stretch;padding:var(--ck-spacing-large);border:0;margin:0}.ck.ck-find-and-replace-form fieldset>.ck-button{flex:0 0 auto}[dir=ltr] .ck.ck-find-and-replace-form fieldset>*+*{margin-left:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-find-and-replace-form fieldset>*+*{margin-right:var(--ck-spacing-standard)}.ck.ck-find-and-replace-form fieldset .ck-labeled-field-view{flex:1 1 auto}.ck.ck-find-and-replace-form fieldset .ck-labeled-field-view .ck-input{width:100%;min-width:50px}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find{align-items:flex-start}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-find{font-weight:700}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-find .ck-button__label{padding-left:var(--ck-spacing-large);padding-right:var(--ck-spacing-large)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-prev>.ck-icon{transform:rotate(90deg)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-next>.ck-icon{transform:rotate(-90deg)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{top:50%;transform:translateY(-50%)}[dir=ltr] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{left:var(--ck-spacing-standard)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{color:var(--ck-color-base-border)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace{flex-wrap:wrap;justify-content:flex-end;margin-top:calc(var(--ck-spacing-large)*-1)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-labeled-field-view{margin-bottom:var(--ck-spacing-large)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-options-dropdown{margin-right:auto;margin-left:0}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-labeled-field-view,.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-labeled-field-view .ck-input{width:100%}@media screen and (max-width:600px){.ck.ck-find-and-replace-form{width:300px}.ck.ck-find-and-replace-form fieldset{flex-wrap:wrap}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-labeled-field-view{flex:1 0 auto;width:100%;margin-bottom:var(--ck-spacing-standard)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button{text-align:center}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type{flex:1 1 auto}[dir=ltr] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type{margin-left:0}[dir=rtl] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type{margin-right:0}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type .ck-button__label{width:100%;text-align:center}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>:not(.ck-labeled-field-view){flex:1 1 auto}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>:not(.ck-labeled-field-view).ck-dropdown{flex-grow:0}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>:not(.ck-labeled-field-view).ck-button>.ck-button__label{width:100%;text-align:center}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-find-and-replace/theme/findandreplaceform.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-find-and-replace/findandreplaceform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAKA,6BACC,cAUD,CARC,sCACC,YAMD,CAHC,yFACC,iBACD,CCNF,6BACC,WAyGD,CAnGC,mCACC,YACD,CAEA,sCACC,kBAAmB,CACnB,gBAAiB,CACjB,kBAAmB,CACnB,qBAAsB,CAEtB,+BAAgC,CAChC,QAAS,CACT,QAsFD,CApFC,iDACC,aACD,CAGC,oDACC,sCACD,CAIA,oDACC,uCACD,CAGD,6DACC,aAMD,CAJC,uEACC,UAAW,CACX,cACD,CAID,qEAEC,sBAkCD,CAhCC,qFACC,eAOD,CAJC,uGACC,oCAAqC,CACrC,qCACD,CAGD,8FACC,uBACD,CAEA,8FACC,wBACD,CAEA,yFACC,OAAQ,CACR,0BAWD,CAbA,mGAKE,gCAQF,CAbA,mGASE,+BAIF,CAbA,yFAYC,iCACD,CAID,wEACC,cAAe,CACf,wBAAyB,CACzB,2CAeD,CAbC,+FACC,qCACD,CAEA,6FACC,iBAAkB,CAClB,aACD,CAEA,wMAEC,UACD,CCzGF,oCD+GA,6BACC,WAiDD,CA/CC,sCACC,cA6CD,CAzCE,4FACC,aAAc,CACd,UAAW,CACX,wCACD,CAEA,gFACC,iBAkBD,CAhBC,8FACC,aAcD,CAfA,wGAIE,aAWF,CAfA,wGAQE,cAOF,CAJC,gHACC,UAAW,CACX,iBACD,CAMH,qGACC,aAUD,CARC,iHACC,WACD,CAEA,iIACC,UAAW,CACX,iBACD,CC5JH",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-find-and-replace-form {\n\tmax-width: 100%;\n\n\t& fieldset {\n\t\tdisplay: flex;\n\n\t\t/* The find fieldset */\n\t\t&.ck-find-and-replace-form__find .ck-results-counter {\n\t\t\tposition: absolute;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-find-and-replace-form {\n\twidth: 400px;\n\n\t/*\n\t * The <form> needs tabindex="-1" for proper Esc handling after being clicked\n\t * but the side effect is that this creates a nasty focus outline in some browsers.\n\t */\n\t&:focus {\n\t\toutline: none;\n\t}\n\n\t& fieldset {\n\t\tflex-direction: row;\n\t\tflex-wrap: nowrap;\n\t\talign-items: center;\n\t\talign-content: stretch;\n\n\t\tpadding: var(--ck-spacing-large);\n\t\tborder: 0;\n\t\tmargin: 0;\n\n\t\t& > .ck-button {\n\t\t\tflex: 0 0 auto;\n\t\t}\n\n\t\t@mixin ck-dir ltr {\n\t\t\t& > * + * {\n\t\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t& > * + * {\n\t\t\t\tmargin-right: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex: 1 1 auto;\n\n\t\t\t& .ck-input {\n\t\t\t\twidth: 100%;\n\t\t\t\tmin-width: 50px;\n\t\t\t}\n\t\t}\n\n\t\t/* The find fieldset */\n\t\t&.ck-find-and-replace-form__find {\n\t\t\t/* To display all controls in line when there\'s an error under the input */\n\t\t\talign-items: flex-start;\n\n\t\t\t& > .ck-button-find {\n\t\t\t\tfont-weight: bold;\n\n\t\t\t\t/* Beef the find button up a little. It\'s the main action button in the form */\n\t\t\t\t& .ck-button__label {\n\t\t\t\t\tpadding-left: var(--ck-spacing-large);\n\t\t\t\t\tpadding-right: var(--ck-spacing-large);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t& > .ck-button-prev > .ck-icon {\n\t\t\t\ttransform: rotate(90deg);\n\t\t\t}\n\n\t\t\t& > .ck-button-next > .ck-icon {\n\t\t\t\ttransform: rotate(-90deg);\n\t\t\t}\n\n\t\t\t& .ck-results-counter {\n\t\t\t\ttop: 50%;\n\t\t\t\ttransform: translateY(-50%);\n\n\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\tright: var(--ck-spacing-standard);\n\t\t\t\t}\n\n\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\tleft: var(--ck-spacing-standard);\n\t\t\t\t}\n\n\t\t\t\tcolor: var(--ck-color-base-border);\n\t\t\t}\n\t\t}\n\n\t\t/* The replace fieldset */\n\t\t&.ck-find-and-replace-form__replace {\n\t\t\tflex-wrap: wrap;\n\t\t\tjustify-content: flex-end;\n\t\t\tmargin-top: calc( -1 * var(--ck-spacing-large) );\n\n\t\t\t& > .ck-labeled-field-view {\n\t\t\t\tmargin-bottom: var(--ck-spacing-large);\n\t\t\t}\n\n\t\t\t& > .ck-options-dropdown {\n\t\t\t\tmargin-right: auto;\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t\t& > .ck-labeled-field-view,\n\t\t\t& > .ck-labeled-field-view .ck-input {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\t}\n}\n\n@mixin ck-media-phone {\n\t.ck.ck-find-and-replace-form {\n\t\twidth: 300px;\n\n\t\t& fieldset {\n\t\t\tflex-wrap: wrap;\n\n\t\t\t/* The find fieldset */\n\t\t\t&.ck-find-and-replace-form__find {\n\t\t\t\t& .ck-labeled-field-view {\n\t\t\t\t\tflex: 1 0 auto;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\tmargin-bottom: var(--ck-spacing-standard);\n\t\t\t\t}\n\n\t\t\t\t& > .ck-button {\n\t\t\t\t\ttext-align: center;\n\n\t\t\t\t\t&:first-of-type {\n\t\t\t\t\t\tflex: 1 1 auto;\n\n\t\t\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\t\t\tmargin-left: 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\t\t\tmargin-right: 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t& .ck-button__label {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* The replace fieldset */\n\t\t\t&.ck-find-and-replace-form__replace > :not(.ck-labeled-field-view) {\n\t\t\t\tflex: 1 1 auto;\n\n\t\t\t\t&.ck-dropdown {\n\t\t\t\t\tflex-grow: 0;\n\t\t\t\t}\n\n\t\t\t\t&.ck-button > .ck-button__label {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},5023:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-color-mention-background:rgba(153,0,48,0.1);--ck-color-mention-text:#990030}.ck-content .mention{background:var(--ck-color-mention-background);color:var(--ck-color-mention-text)}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-mention/mention.css"],names:[],mappings:"AAKA,MACC,gDAAwD,CACxD,+BACD,CAEA,qBACC,6CAA8C,CAC9C,kCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-mention-background: hsla(341, 100%, 30%, 0.1);\n\t--ck-color-mention-text: hsl(341, 100%, 30%);\n}\n\n.ck-content .mention {\n\tbackground: var(--ck-color-mention-background);\n\tcolor: var(--ck-color-mention-text);\n}\n"],sourceRoot:""}]);const a=s},7640:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-mention-list-max-height:300px}.ck.ck-mentions{max-height:var(--ck-mention-list-max-height);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}.ck.ck-mentions>.ck-list__item{overflow:hidden;flex-shrink:0}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-mention/theme/mentionui.css"],names:[],mappings:"AAKA,MACC,kCACD,CAEA,gBACC,4CAA6C,CAE7C,eAAgB,CAIhB,iBAAkB,CAElB,2BAQD,CAJC,+BACC,eAAgB,CAChB,aACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-mention-list-max-height: 300px;\n}\n\n.ck.ck-mentions {\n\tmax-height: var(--ck-mention-list-max-height);\n\n\toverflow-y: auto;\n\n\t/* Prevent unnecessary horizontal scrollbar in Safari\n\thttps://github.com/ckeditor/ckeditor5-mention/issues/41 */\n\toverflow-x: hidden;\n\n\toverscroll-behavior: contain;\n\n\t/* Prevent unnecessary vertical scrollbar in Safari\n\thttps://github.com/ckeditor/ckeditor5-mention/issues/41 */\n\t& > .ck-list__item {\n\t\toverflow: hidden;\n\t\tflex-shrink: 0;\n\t}\n}\n"],sourceRoot:""}]);const a=s},903:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,'.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;position:relative;pointer-events:none}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);top:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);border:1px solid var(--ck-clipboard-drop-target-color);background:var(--ck-clipboard-drop-target-color);margin-left:-1px}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{content:"";width:0;height:0;display:block;position:absolute;left:50%;top:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);transform:translateX(-50%);border-left:calc(var(--ck-clipboard-drop-target-dot-width)*0.5) solid transparent;border-bottom:0 solid transparent;border-right:calc(var(--ck-clipboard-drop-target-dot-width)*0.5) solid transparent;border-top:calc(var(--ck-clipboard-drop-target-dot-height)) solid var(--ck-clipboard-drop-target-color)}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}',"",{version:3,sources:["webpack://./../ckeditor5-clipboard/theme/clipboard.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-clipboard/clipboard.css"],names:[],mappings:"AASC,8DACC,cAAe,CACf,iBAAkB,CAClB,mBAMD,CAJC,mEACC,iBAAkB,CAClB,OACD,CAWA,qJACC,YACD,CCzBF,MACC,yCAA0C,CAC1C,yCAA0C,CAC1C,6DACD,CAOE,mEACC,4DAA8D,CAC9D,yDAA2D,CAC3D,sDAAuD,CACvD,gDAAiD,CACjD,gBAkBD,CAfC,yEACC,UAAW,CACX,OAAQ,CACR,QAAS,CAET,aAAc,CACd,iBAAkB,CAClB,QAAS,CACT,yDAA2D,CAE3D,0BAA2B,CAG3B,iFAAmB,CAAnB,iCAAmB,CAAnB,kFAAmB,CAAnB,uGACD,CA2DF,kEACC,gGACD,CAKA,gDACC,OAAS,CACT,sBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t/*\n\t * Vertical drop target (in text).\n\t */\n\t& .ck.ck-clipboard-drop-target-position {\n\t\tdisplay: inline;\n\t\tposition: relative;\n\t\tpointer-events: none;\n\n\t\t& span {\n\t\t\tposition: absolute;\n\t\t\twidth: 0;\n\t\t}\n\t}\n\n\t/*\n\t * Styles of the widget being dragged (its preview).\n\t */\n\t& .ck-widget:-webkit-drag {\n\t\t& > .ck-widget__selection-handle {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t& > .ck-widget__type-around {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-clipboard-drop-target-dot-width: 12px;\n\t--ck-clipboard-drop-target-dot-height: 8px;\n\t--ck-clipboard-drop-target-color: var(--ck-color-focus-border)\n}\n\n.ck.ck-editor__editable {\n\t/*\n\t * Vertical drop target (in text).\n\t */\n\t& .ck.ck-clipboard-drop-target-position {\n\t\t& span {\n\t\t\tbottom: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\n\t\t\ttop: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\n\t\t\tborder: 1px solid var(--ck-clipboard-drop-target-color);\n\t\t\tbackground: var(--ck-clipboard-drop-target-color);\n\t\t\tmargin-left: -1px;\n\n\t\t\t/* The triangle above the marker */\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\twidth: 0;\n\t\t\t\theight: 0;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 50%;\n\t\t\t\ttop: calc(var(--ck-clipboard-drop-target-dot-height) * -.5);\n\n\t\t\t\ttransform: translateX(-50%);\n\t\t\t\tborder-color: var(--ck-clipboard-drop-target-color) transparent transparent transparent;\n\t\t\t\tborder-width: calc(var(--ck-clipboard-drop-target-dot-height)) calc(.5 * var(--ck-clipboard-drop-target-dot-width)) 0 calc(.5 * var(--ck-clipboard-drop-target-dot-width));\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t// Horizontal drop target (between blocks).\n\t& .ck.ck-clipboard-drop-target-position {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\theight: 0;\n\t\tmargin: 0;\n\t\ttext-align: initial;\n\n\t\t& .ck-clipboard-drop-target__line {\n\t\t\tposition: absolute;\n\t\t\twidth: 100%;\n\t\t\theight: 0;\n\t\t\tborder: 1px solid var(--ck-clipboard-drop-target-color);\n\t\t\tmargin-top: -1px;\n\n\t\t\t&::before {\n\t\t\t\tcontent: "";\n\t\t\t\twidth: 0;\n\t\t\t\theight: 0;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: calc(-1 * var(--ck-clipboard-drop-target-dot-size));\n\t\t\t\ttop: 0;\n\n\t\t\t\ttransform: translateY(-50%);\n\t\t\t\tborder-color: transparent transparent transparent var(--ck-clipboard-drop-target-color);\n\t\t\t\tborder-width: var(--ck-clipboard-drop-target-dot-size) 0 var(--ck-clipboard-drop-target-dot-size) calc(2 * var(--ck-clipboard-drop-target-dot-size));\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\twidth: 0;\n\t\t\t\theight: 0;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: calc(-1 * var(--ck-clipboard-drop-target-dot-size));\n\t\t\t\ttop: 0;\n\n\t\t\t\ttransform: translateY(-50%);\n\t\t\t\tborder-color: transparent var(--ck-clipboard-drop-target-color) transparent transparent;\n\t\t\t\tborder-width: var(--ck-clipboard-drop-target-dot-size) calc(2 * var(--ck-clipboard-drop-target-dot-size)) var(--ck-clipboard-drop-target-dot-size) 0;\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\t\t}\n\t}\n\t*/\n\n\t/*\n\t * Styles of the widget that it a drop target.\n\t */\n\t& .ck-widget.ck-clipboard-drop-target-range {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color) !important;\n\t}\n\n\t/*\n\t * Styles of the widget being dragged (its preview).\n\t */\n\t& .ck-widget:-webkit-drag {\n\t\tzoom: 0.6;\n\t\toutline: none !important;\n\t}\n}\n'],sourceRoot:""}]);const a=s},8343:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-content pre{padding:1em;color:#353535;background:hsla(0,0%,78%,.3);border:1px solid #c4c4c4;border-radius:2px;text-align:left;direction:ltr;tab-size:4;white-space:pre-wrap;font-style:normal;min-width:200px}.ck-content pre code{background:unset;padding:0;border-radius:0}.ck.ck-editor__editable pre{position:relative}.ck.ck-editor__editable pre[data-language]:after{content:attr(data-language);position:absolute}:root{--ck-color-code-block-label-background:#757575}.ck.ck-editor__editable pre[data-language]:after{top:-1px;right:10px;background:var(--ck-color-code-block-label-background);font-size:10px;font-family:var(--ck-font-face);line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);color:#fff;white-space:nowrap}.ck.ck-code-block-dropdown .ck-dropdown__panel{max-height:250px;overflow-y:auto;overflow-x:hidden}","",{version:3,sources:["webpack://./../ckeditor5-code-block/theme/codeblock.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-code-block/codeblock.css"],names:[],mappings:"AAKA,gBACC,WAAY,CACZ,aAAwB,CACxB,4BAAiC,CACjC,wBAAiC,CACjC,iBAAkB,CAGlB,eAAgB,CAChB,aAAc,CAEd,UAAW,CACX,oBAAqB,CAGrB,iBAAkB,CAGlB,eAOD,CALC,qBACC,gBAAiB,CACjB,SAAU,CACV,eACD,CAGD,4BACC,iBAMD,CAJC,iDACC,2BAA4B,CAC5B,iBACD,CCjCD,MACC,8CACD,CAEA,iDACC,QAAS,CACT,UAAW,CACX,sDAAuD,CAEvD,cAAe,CACf,+BAAgC,CAChC,gBAAiB,CACjB,uDAAwD,CACxD,UAAuB,CACvB,kBACD,CAEA,+CAEC,gBAAiB,CACjB,eAAgB,CAChB,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content pre {\n\tpadding: 1em;\n\tcolor: hsl(0, 0%, 20.8%);\n\tbackground: hsla(0, 0%, 78%, 0.3);\n\tborder: 1px solid hsl(0, 0%, 77%);\n\tborder-radius: 2px;\n\n\t/* Code block are language direction–agnostic. */\n\ttext-align: left;\n\tdirection: ltr;\n\n\ttab-size: 4;\n\twhite-space: pre-wrap;\n\n\t/* Don't inherit the style, e.g. when in a block quote. */\n\tfont-style: normal;\n\n\t/* Don't let the code be squashed e.g. when in a table cell. */\n\tmin-width: 200px;\n\n\t& code {\n\t\tbackground: unset;\n\t\tpadding: 0;\n\t\tborder-radius: 0;\n\t}\n}\n\n.ck.ck-editor__editable pre {\n\tposition: relative;\n\n\t&[data-language]::after {\n\t\tcontent: attr(data-language);\n\t\tposition: absolute;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-code-block-label-background: hsl(0, 0%, 46%);\n}\n\n.ck.ck-editor__editable pre[data-language]::after {\n\ttop: -1px;\n\tright: 10px;\n\tbackground: var(--ck-color-code-block-label-background);\n\n\tfont-size: 10px;\n\tfont-family: var(--ck-font-face);\n\tline-height: 16px;\n\tpadding: var(--ck-spacing-tiny) var(--ck-spacing-medium);\n\tcolor: hsl(0, 0%, 100%);\n\twhite-space: nowrap;\n}\n\n.ck.ck-code-block-dropdown .ck-dropdown__panel {\n\t/* There could be dozens of languages available. Use scroll to prevent a 10e6px dropdown. */\n\tmax-height: 250px;\n\toverflow-y: auto;\n\toverflow-x: hidden;\n}\n"],sourceRoot:""}]);const a=s},4717:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-placeholder,.ck .ck-placeholder{position:relative}.ck.ck-placeholder:before,.ck .ck-placeholder:before{position:absolute;left:0;right:0;content:attr(data-placeholder);pointer-events:none}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}.ck.ck-placeholder:before,.ck .ck-placeholder:before{cursor:text;color:var(--ck-color-engine-placeholder-text)}","",{version:3,sources:["webpack://./../ckeditor5-engine/theme/placeholder.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-engine/placeholder.css"],names:[],mappings:"AAMA,uCAEC,iBAWD,CATC,qDACC,iBAAkB,CAClB,MAAO,CACP,OAAQ,CACR,8BAA+B,CAG/B,mBACD,CAKA,wCACC,YACD,CAQD,iCACC,iBACD,CC5BC,qDACC,WAAY,CACZ,6CACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* See ckeditor/ckeditor5#936. */\n.ck.ck-placeholder,\n.ck .ck-placeholder {\n\tposition: relative;\n\n\t&::before {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tcontent: attr(data-placeholder);\n\n\t\t/* See ckeditor/ckeditor5#469. */\n\t\tpointer-events: none;\n\t}\n}\n\n/* See ckeditor/ckeditor5#1987. */\n.ck.ck-read-only .ck-placeholder {\n\t&::before {\n\t\tdisplay: none;\n\t}\n}\n\n/*\n * Rules for the `ck-placeholder` are loaded before the rules for `ck-reset_all` in the base CKEditor 5 DLL build.\n * This fix overwrites the incorrectly set `position: static` from `ck-reset_all`.\n * See https://github.com/ckeditor/ckeditor5/issues/11418.\n */\n.ck.ck-reset_all .ck-placeholder {\n\tposition: relative;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* See ckeditor/ckeditor5#936. */\n.ck.ck-placeholder, .ck .ck-placeholder {\n\t&::before {\n\t\tcursor: text;\n\t\tcolor: var(--ck-color-engine-placeholder-text);\n\t}\n}\n"],sourceRoot:""}]);const a=s},9315:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}","",{version:3,sources:["webpack://./../ckeditor5-engine/theme/renderer.css"],names:[],mappings:"AAMA,qDACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Elements marked by the Renderer as hidden should be invisible in the editor. */\n.ck.ck-editor__editable span[data-ck-unsafe-element] {\n\tdisplay: none;\n}\n"],sourceRoot:""}]);const a=s},1896:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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)}","",{version:3,sources:["webpack://./../ckeditor5-font/theme/fontcolor.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-font/fontcolor.css"],names:[],mappings:"AAKA,4CACC,YAAa,CACb,kBAAmB,CACnB,UACD,CAEA,8BACC,iBACD,CCNA,4CACC,qEAAyE,CACzE,2BAA4B,CAC5B,4BAeD,CAbC,wDACC,mDACD,CAEA,kEAEE,uCAMF,CARA,kEAME,sCAEF",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-button.ck-color-table__remove-color {\n\tdisplay: flex;\n\talign-items: center;\n\twidth: 100%;\n}\n\nlabel.ck.ck-color-grid__label {\n\tfont-weight: unset;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck .ck-button.ck-color-table__remove-color {\n\tpadding: calc(var(--ck-spacing-standard) / 2 ) var(--ck-spacing-standard);\n\tborder-bottom-left-radius: 0;\n\tborder-bottom-right-radius: 0;\n\n\t&:not(:focus) {\n\t\tborder-bottom: 1px solid var(--ck-color-base-border);\n\t}\n\n\t& .ck.ck-icon {\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-right: var(--ck-spacing-standard);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n}\n\n'],sourceRoot:""}]);const a=s},6007:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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}","",{version:3,sources:["webpack://./../ckeditor5-font/theme/fontsize.css"],names:[],mappings:"AAUC,uBACC,cACD,CAEA,wBACC,eACD,CAEA,sBACC,eACD,CAEA,uBACC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* The values should be synchronized with the "FONT_SIZE_PRESET_UNITS" object in the "/src/fontsize/utils.js" file. */\n\n/* Styles should be prefixed with the `.ck-content` class.\nSee https://github.com/ckeditor/ckeditor5/issues/6636 */\n.ck-content {\n\t& .text-tiny {\n\t\tfont-size: .7em;\n\t}\n\n\t& .text-small {\n\t\tfont-size: .85em;\n\t}\n\n\t& .text-big {\n\t\tfont-size: 1.4em;\n\t}\n\n\t& .text-huge {\n\t\tfont-size: 1.8em;\n\t}\n}\n'],sourceRoot:""}]);const a=s},8733:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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}","",{version:3,sources:["webpack://./../ckeditor5-heading/theme/heading.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-heading/heading.css"],names:[],mappings:"AAKA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,+BACC,eACD,CCZC,2EACC,SACD,CAEA,uEACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-heading_heading1 {\n\tfont-size: 20px;\n}\n\n.ck.ck-heading_heading2 {\n\tfont-size: 17px;\n}\n\n.ck.ck-heading_heading3 {\n\tfont-size: 14px;\n}\n\n.ck[class*="ck-heading_heading"] {\n\tfont-weight: bold;\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Resize dropdown's button label. */\n.ck.ck-dropdown.ck-heading-dropdown {\n\t& .ck-dropdown__button .ck-button__label {\n\t\twidth: 8em;\n\t}\n\n\t& .ck-dropdown__panel .ck-list__item {\n\t\tmin-width: 18em;\n\t}\n}\n"],sourceRoot:""}]);const a=s},2974:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-editor__editable .ck-horizontal-line{display:flow-root}.ck-content hr{margin:15px 0;height:4px;background:#dedede;border:0}","",{version:3,sources:["webpack://./../ckeditor5-horizontal-line/theme/horizontalline.css"],names:[],mappings:"AAMA,yCAEC,iBACD,CAEA,eACC,aAAc,CACd,UAAW,CACX,kBAA2B,CAC3B,QACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n\n.ck-editor__editable .ck-horizontal-line {\n\t/* Necessary to render properly next to floated objects, e.g. side image case. */\n\tdisplay: flow-root;\n}\n\n.ck-content hr {\n\tmargin: 15px 0;\n\theight: 4px;\n\tbackground: hsl(0, 0%, 87%);\n\tborder: 0;\n}\n"],sourceRoot:""}]);const a=s},3508:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-content .image{display:table;clear:both;text-align:center;margin:.9em auto;min-width:50px}.ck-content .image img{display:block;margin:0 auto;max-width:100%;min-width:100%}.ck-content .image-inline{display:inline-flex;max-width:100%;align-items:flex-start}.ck-content .image-inline picture{display:flex}.ck-content .image-inline img,.ck-content .image-inline picture{flex-grow:1;flex-shrink:1;max-width:100%}.ck.ck-editor__editable .image>figcaption.ck-placeholder:before{padding-left:inherit;padding-right:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ck.ck-editor__editable .image-inline.ck-widget_selected,.ck.ck-editor__editable .image.ck-widget_selected{z-index:1}.ck.ck-editor__editable .image-inline.ck-widget_selected ::selection{display:none}.ck.ck-editor__editable td .image-inline img,.ck.ck-editor__editable th .image-inline img{max-width:none}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/image.css"],names:[],mappings:"AAMC,mBACC,aAAc,CACd,UAAW,CACX,iBAAkB,CAKlB,gBAAkB,CAGlB,cAeD,CAbC,uBAEC,aAAc,CAGd,aAAc,CAGd,cAAe,CAGf,cACD,CAGD,0BAMC,mBAAoB,CAGpB,cAAe,CAGf,sBAiBD,CAdC,kCACC,YACD,CAGA,gEAGC,WAAY,CACZ,aAAc,CAGd,cACD,CAUD,gEACC,oBAAqB,CACrB,qBAAsB,CAMtB,kBAAmB,CACnB,eAAgB,CAChB,sBACD,CAWA,2GACC,SAUD,CAHC,qEACC,YACD,CAOA,0FACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content {\n\t& .image {\n\t\tdisplay: table;\n\t\tclear: both;\n\t\ttext-align: center;\n\n\t\t/* Make sure there is some space between the content and the image. Center image by default. */\n\t\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\t \tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\t\tmargin: 0.9em auto;\n\n\t\t/* Make sure the caption will be displayed properly (See: https://github.com/ckeditor/ckeditor5/issues/1870). */\n\t\tmin-width: 50px;\n\n\t\t& img {\n\t\t\t/* Prevent unnecessary margins caused by line-height (see #44). */\n\t\t\tdisplay: block;\n\n\t\t\t/* Center the image if its width is smaller than the content\'s width. */\n\t\t\tmargin: 0 auto;\n\n\t\t\t/* Make sure the image never exceeds the size of the parent container (ckeditor/ckeditor5-ui#67). */\n\t\t\tmax-width: 100%;\n\n\t\t\t/* Make sure the image is never smaller than the parent container (See: https://github.com/ckeditor/ckeditor5/issues/9300). */\n\t\t\tmin-width: 100%\n\t\t}\n\t}\n\n\t& .image-inline {\n\t\t/*\n\t\t * Normally, the .image-inline would have "display: inline-block" and "img { width: 100% }" (to follow the wrapper while resizing).\n\t\t * Unfortunately, together with "srcset", it gets automatically stretched up to the width of the editing root.\n\t\t * This strange behavior does not happen with inline-flex.\n\t\t */\n\t\tdisplay: inline-flex;\n\n\t\t/* While being resized, don\'t allow the image to exceed the width of the editing root. */\n\t\tmax-width: 100%;\n\n\t\t/* This is required by Safari to resize images in a sensible way. Without this, the browser breaks the ratio. */\n\t\talign-items: flex-start;\n\n\t\t/* When the picture is present it must act as a flex container to let the img resize properly */\n\t\t& picture {\n\t\t\tdisplay: flex;\n\t\t}\n\n\t\t/* When the picture is present, it must act like a resizable img. */\n\t\t& picture,\n\t\t& img {\n\t\t\t/* This is necessary for the img to span the entire .image-inline wrapper and to resize properly. */\n\t\t\tflex-grow: 1;\n\t\t\tflex-shrink: 1;\n\n\t\t\t/* Prevents overflowing the editing root boundaries when an inline image is very wide. */\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n\n.ck.ck-editor__editable {\n\t/*\n\t * Inhertit the content styles padding of the <figcaption> in case the integration overrides `text-align: center`\n\t * of `.image` (e.g. to the left/right). This ensures the placeholder stays at the padding just like the native\n\t * caret does, and not at the edge of <figcaption>.\n\t */\n\t& .image > figcaption.ck-placeholder::before {\n\t\tpadding-left: inherit;\n\t\tpadding-right: inherit;\n\n\t\t/*\n\t\t * Make sure the image caption placeholder doesn\'t overflow the placeholder area.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9162.\n\t\t */\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\n\t/*\n\t * Make sure the selected inline image always stays on top of its siblings.\n\t * See https://github.com/ckeditor/ckeditor5/issues/9108.\n\t */\n\t& .image.ck-widget_selected {\n\t\tz-index: 1;\n\t}\n\n\t& .image-inline.ck-widget_selected {\n\t\tz-index: 1;\n\n\t\t/*\n\t\t * Make sure the native browser selection style is not displayed.\n\t\t * Inline image widgets have their own styles for the selected state and\n\t\t * leaving this up to the browser is asking for a visual collision.\n\t\t */\n\t\t& ::selection {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t/* The inline image nested in the table should have its original size if not resized.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9117. */\n\t& td,\n\t& th {\n\t\t& .image-inline img {\n\t\t\tmax-width: none;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},2640:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-color-image-caption-background:#f7f7f7;--ck-color-image-caption-text:#333;--ck-color-image-caption-highligted-background:hsl(52deg 100% 50%)}.ck-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:var(--ck-color-image-caption-text);background-color:var(--ck-color-image-caption-background);padding:.6em;font-size:.75em;outline-offset:-1px}.ck.ck-editor__editable .image>figcaption.image__caption_highlighted{animation:ck-image-caption-highlight .6s ease-out}@keyframes ck-image-caption-highlight{0%{background-color:var(--ck-color-image-caption-highligted-background)}to{background-color:var(--ck-color-image-caption-background)}}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imagecaption.css"],names:[],mappings:"AAKA,MACC,2CAAoD,CACpD,kCAA8C,CAC9C,kEACD,CAGA,8BACC,qBAAsB,CACtB,mBAAoB,CACpB,qBAAsB,CACtB,wCAAyC,CACzC,yDAA0D,CAC1D,YAAa,CACb,eAAgB,CAChB,mBACD,CAGA,qEACC,iDACD,CAEA,sCACC,GACC,oEACD,CAEA,GACC,yDACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-image-caption-background: hsl(0, 0%, 97%);\n\t--ck-color-image-caption-text: hsl(0, 0%, 20%);\n\t--ck-color-image-caption-highligted-background: hsl(52deg 100% 50%);\n}\n\n/* Content styles */\n.ck-content .image > figcaption {\n\tdisplay: table-caption;\n\tcaption-side: bottom;\n\tword-break: break-word;\n\tcolor: var(--ck-color-image-caption-text);\n\tbackground-color: var(--ck-color-image-caption-background);\n\tpadding: .6em;\n\tfont-size: .75em;\n\toutline-offset: -1px;\n}\n\n/* Editing styles */\n.ck.ck-editor__editable .image > figcaption.image__caption_highlighted {\n\tanimation: ck-image-caption-highlight .6s ease-out;\n}\n\n@keyframes ck-image-caption-highlight {\n\t0% {\n\t\tbackground-color: var(--ck-color-image-caption-highligted-background);\n\t}\n\n\t100% {\n\t\tbackground-color: var(--ck-color-image-caption-background);\n\t}\n}\n"],sourceRoot:""}]);const a=s},6270:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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}.ck.ck-editor__editable td .image-inline.image_resized img,.ck.ck-editor__editable th .image-inline.image_resized img{max-width:100%}[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}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageresize.css"],names:[],mappings:"AAKA,iCACC,cAAe,CAMf,aAAc,CACd,qBAWD,CATC,qCAEC,UACD,CAEA,4CAEC,aACD,CAQC,sHACC,cACD,CAIF,oFACC,uCACD,CAEA,oFACC,sCACD,CAEA,oEACC,SACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content .image.image_resized {\n\tmax-width: 100%;\n\t/*\n\tThe `<figure>` element for resized images must not use `display:table` as browsers do not support `max-width` for it well.\n\tSee https://stackoverflow.com/questions/4019604/chrome-safari-ignoring-max-width-in-table/14420691#14420691 for more.\n\tFortunately, since we control the width, there is no risk that the image will look bad.\n\t*/\n\tdisplay: block;\n\tbox-sizing: border-box;\n\n\t& img {\n\t\t/* For resized images it is the `<figure>` element that determines the image width. */\n\t\twidth: 100%;\n\t}\n\n\t& > figcaption {\n\t\t/* The `<figure>` element uses `display:block`, so `<figcaption>` also has to. */\n\t\tdisplay: block;\n\t}\n}\n\n.ck.ck-editor__editable {\n\t/* The resized inline image nested in the table should respect its parent size.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9117. */\n\t& td,\n\t& th {\n\t\t& .image-inline.image_resized img {\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n\n[dir="ltr"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {\n\tmargin-right: var(--ck-spacing-standard);\n}\n\n[dir="rtl"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {\n\tmargin-left: var(--ck-spacing-standard);\n}\n\n.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label {\n\twidth: 4em;\n}\n'],sourceRoot:""}]);const a=s},5083:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-image-style-spacing:1.5em;--ck-inline-image-style-spacing:calc(var(--ck-image-style-spacing)/2)}.ck-content .image-style-block-align-left,.ck-content .image-style-block-align-right{max-width:calc(100% - var(--ck-image-style-spacing))}.ck-content .image-style-align-left,.ck-content .image-style-align-right{clear:none}.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)}.ck-content .image-style-block-align-right{margin-right:0;margin-left:auto}.ck-content .image-style-block-align-left{margin-left:0;margin-right:auto}.ck-content p+.image-style-align-left,.ck-content p+.image-style-align-right,.ck-content p+.image-style-side{margin-top:0}.ck-content .image-inline.image-style-align-left,.ck-content .image-inline.image-style-align-right{margin-top:var(--ck-inline-image-style-spacing);margin-bottom:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-left{margin-right:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-right{margin-left:var(--ck-inline-image-style-spacing)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-background)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after{display:none}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-hover-background)}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imagestyle.css"],names:[],mappings:"AAKA,MACC,8BAA+B,CAC/B,qEACD,CAMC,qFAEC,oDACD,CAIA,yEAEC,UACD,CAEA,8BACC,WAAY,CACZ,yCAA0C,CAC1C,aACD,CAEA,oCACC,UAAW,CACX,0CACD,CAEA,sCACC,gBAAiB,CACjB,iBACD,CAEA,qCACC,WAAY,CACZ,yCACD,CAEA,2CACC,cAAe,CACf,gBACD,CAEA,0CACC,aAAc,CACd,iBACD,CAGA,6GAGC,YACD,CAGC,mGAEC,+CAAgD,CAChD,kDACD,CAEA,iDACC,iDACD,CAEA,kDACC,gDACD,CAUC,0lBAGC,qDAKD,CAHC,8nBACC,YACD,CAKD,oVAGC,2DACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-image-style-spacing: 1.5em;\n\t--ck-inline-image-style-spacing: calc(var(--ck-image-style-spacing) / 2);\n}\n\n.ck-content {\n\t/* Provides a minimal side margin for the left and right aligned images, so that the user has a visual feedback\n\tconfirming successful application of the style if image width exceeds the editor's size.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9342 */\n\t& .image-style-block-align-left,\n\t& .image-style-block-align-right {\n\t\tmax-width: calc(100% - var(--ck-image-style-spacing));\n\t}\n\n\t/* Allows displaying multiple floating images in the same line.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9183#issuecomment-804988132 */\n\t& .image-style-align-left,\n\t& .image-style-align-right {\n\t\tclear: none;\n\t}\n\n\t& .image-style-side {\n\t\tfloat: right;\n\t\tmargin-left: var(--ck-image-style-spacing);\n\t\tmax-width: 50%;\n\t}\n\n\t& .image-style-align-left {\n\t\tfloat: left;\n\t\tmargin-right: var(--ck-image-style-spacing);\n\t}\n\n\t& .image-style-align-center {\n\t\tmargin-left: auto;\n\t\tmargin-right: auto;\n\t}\n\n\t& .image-style-align-right {\n\t\tfloat: right;\n\t\tmargin-left: var(--ck-image-style-spacing);\n\t}\n\n\t& .image-style-block-align-right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\n\t& .image-style-block-align-left {\n\t\tmargin-left: 0;\n\t\tmargin-right: auto;\n\t}\n\n\t/* Simulates margin collapsing with the preceding paragraph, which does not work for the floating elements. */\n\t& p + .image-style-align-left,\n\t& p + .image-style-align-right,\n\t& p + .image-style-side {\n\t\tmargin-top: 0;\n\t}\n\n\t& .image-inline {\n\t\t&.image-style-align-left,\n\t\t&.image-style-align-right {\n\t\t\tmargin-top: var(--ck-inline-image-style-spacing);\n\t\t\tmargin-bottom: var(--ck-inline-image-style-spacing);\n\t\t}\n\n\t\t&.image-style-align-left {\n\t\t\tmargin-right: var(--ck-inline-image-style-spacing);\n\t\t}\n\n\t\t&.image-style-align-right {\n\t\t\tmargin-left: var(--ck-inline-image-style-spacing);\n\t\t}\n\t}\n}\n\n.ck.ck-splitbutton {\n\t/* The button should display as a regular drop-down if the action button\n\tis forced to fire the same action as the arrow button. */\n\t&.ck-splitbutton_flatten {\n\t\t&:hover,\n\t\t&.ck-splitbutton_open {\n\t\t\t& > .ck-splitbutton__action:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {\n\t\t\t\tbackground-color: var(--ck-color-button-on-background);\n\n\t\t\t\t&::after {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.ck-splitbutton_open:hover {\n\t\t\t& > .ck-splitbutton__action:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {\n\t\t\t\tbackground-color: var(--ck-color-button-on-hover-background);\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},4036:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,'.ck-image-upload-complete-icon{display:block;position:absolute;top:min(var(--ck-spacing-medium),6%);right:min(var(--ck-spacing-medium),6%);border-radius:50%;z-index:1}.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:20;--ck-image-upload-icon-width:2px;--ck-image-upload-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck-image-upload-complete-icon{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:calc(1px*var(--ck-image-upload-icon-size));animation-delay:0ms,3s;overflow:hidden;width:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size));height:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size))}.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}}',"",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageuploadicon.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadicon.css"],names:[],mappings:"AAKA,+BACC,aAAc,CACd,iBAAkB,CAMlB,oCAAsC,CACtC,sCAAwC,CACxC,iBAAkB,CAClB,SAMD,CAJC,qCACC,UAAW,CACX,iBACD,CChBD,MACC,iCAA8C,CAC9C,+CAA4D,CAG5D,8BAA+B,CAC/B,gCAAiC,CACjC,4DACD,CAEA,+BACC,SAAU,CACV,uDAAwD,CACxD,wEAA0E,CAC1E,qCAAuC,CACvC,0BAAgC,CAGhC,oDAAuD,CAGvD,sBAA4B,CAM5B,eAAgB,CAChB,mFAAsF,CACtF,oFAyBD,CAtBC,qCAEC,QAAS,CAET,OAAQ,CACR,SAAU,CACV,QAAS,CACT,OAAQ,CAER,mCAAoC,CACpC,yBAA0B,CAC1B,oFAAqF,CACrF,sFAAuF,CAEvF,4CAA6C,CAC7C,sBAAyB,CACzB,mBAAsB,CACtB,4BAA6B,CAG7B,qBACD,CAGD,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,yCACC,GACC,SAAU,CACV,OAAQ,CACR,QACD,CACA,IACC,UAAY,CACZ,QACD,CACA,GACC,SAAU,CACV,UAAY,CACZ,YACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-image-upload-complete-icon {\n\tdisplay: block;\n\tposition: absolute;\n\n\t/*\n\t * Smaller images should have the icon closer to the border.\n\t * Match the icon position with the linked image indicator brought by the link image feature.\n\t */\n\ttop: min(var(--ck-spacing-medium), 6%);\n\tright: min(var(--ck-spacing-medium), 6%);\n\tborder-radius: 50%;\n\tz-index: 1;\n\n\t&::after {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t}\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-image-upload-icon: hsl(0, 0%, 100%);\n\t--ck-color-image-upload-icon-background: hsl(120, 100%, 27%);\n\n\t/* Match the icon size with the linked image indicator brought by the link image feature. */\n\t--ck-image-upload-icon-size: 20;\n\t--ck-image-upload-icon-width: 2px;\n\t--ck-image-upload-icon-is-visible: clamp(0px, 100% - 50px, 1px);\n}\n\n.ck-image-upload-complete-icon {\n\topacity: 0;\n\tbackground: var(--ck-color-image-upload-icon-background);\n\tanimation-name: ck-upload-complete-icon-show, ck-upload-complete-icon-hide;\n\tanimation-fill-mode: forwards, forwards;\n\tanimation-duration: 500ms, 500ms;\n\n\t/* To make animation scalable. */\n\tfont-size: calc(1px * var(--ck-image-upload-icon-size));\n\n\t/* Hide completed upload icon after 3 seconds. */\n\tanimation-delay: 0ms, 3000ms;\n\n\t/*\n\t * Use CSS math to simulate container queries.\n\t * https://css-tricks.com/the-raven-technique-one-step-closer-to-container-queries/#what-about-showing-and-hiding-things\n\t */\n\toverflow: hidden;\n\twidth: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size));\n\theight: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size));\n\n\t/* This is check icon element made from border-width mixed with animations. */\n\t&::after {\n\t\t/* Because of border transformation we need to "hard code" left position. */\n\t\tleft: 25%;\n\n\t\ttop: 50%;\n\t\topacity: 0;\n\t\theight: 0;\n\t\twidth: 0;\n\n\t\ttransform: scaleX(-1) rotate(135deg);\n\t\ttransform-origin: left top;\n\t\tborder-top: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);\n\t\tborder-right: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);\n\n\t\tanimation-name: ck-upload-complete-icon-check;\n\t\tanimation-duration: 500ms;\n\t\tanimation-delay: 500ms;\n\t\tanimation-fill-mode: forwards;\n\n\t\t/* #1095. While reset is not providing proper box-sizing for pseudoelements, we need to handle it. */\n\t\tbox-sizing: border-box;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-show {\n\tfrom {\n\t\topacity: 0;\n\t}\n\n\tto {\n\t\topacity: 1;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-hide {\n\tfrom {\n\t\topacity: 1;\n\t}\n\n\tto {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-check {\n\t0% {\n\t\topacity: 1;\n\t\twidth: 0;\n\t\theight: 0;\n\t}\n\t33% {\n\t\twidth: 0.3em;\n\t\theight: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t\twidth: 0.3em;\n\t\theight: 0.45em;\n\t}\n}\n'],sourceRoot:""}]);const a=s},3773:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,'.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-upload-placeholder-image-aspect-ratio:2.8}.ck .ck-image-upload-placeholder{width:100%;margin:0}.ck .ck-image-upload-placeholder.image-inline{width:calc(var(--ck-upload-placeholder-loader-size)*2*var(--ck-upload-placeholder-image-aspect-ratio))}.ck .ck-image-upload-placeholder img{aspect-ratio:var(--ck-upload-placeholder-image-aspect-ratio)}.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)}}',"",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageuploadloader.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadloader.css"],names:[],mappings:"AAKA,kCACC,iBAAkB,CAClB,YAAa,CACb,kBAAmB,CACnB,sBAAuB,CACvB,KAAM,CACN,MAMD,CAJC,yCACC,UAAW,CACX,iBACD,CCXD,MACC,4CAAqD,CACrD,wCAAyC,CACzC,8CACD,CAEA,iCAEC,UAAW,CACX,QAeD,CAbC,8CACC,sGACD,CAEA,qCAOC,4DACD,CAGD,kCACC,UAAW,CACX,WAUD,CARC,yCACC,8CAA+C,CAC/C,+CAAgD,CAChD,iBAAkB,CAClB,8DAA+D,CAC/D,kCAAmC,CACnC,yDACD,CAGD,wCACC,GACC,uBACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-upload-placeholder-loader {\n\tposition: absolute;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\ttop: 0;\n\tleft: 0;\n\n\t&::before {\n\t\tcontent: '';\n\t\tposition: relative;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-upload-placeholder-loader: hsl(0, 0%, 70%);\n\t--ck-upload-placeholder-loader-size: 32px;\n\t--ck-upload-placeholder-image-aspect-ratio: 2.8;\n}\n\n.ck .ck-image-upload-placeholder {\n\t/* We need to control the full width of the SVG gray background. */\n\twidth: 100%;\n\tmargin: 0;\n\n\t&.image-inline {\n\t\twidth: calc( 2 * var(--ck-upload-placeholder-loader-size) * var(--ck-upload-placeholder-image-aspect-ratio) );\n\t}\n\n\t& img {\n\t\t/*\n\t\t * This is an arbitrary aspect for a 1x1 px GIF to display to the user. Not too tall, not too short.\n\t\t * There's nothing special about this number except that it should make the image placeholder look like\n\t\t * a real image during this short period after the upload started and before the image was read from the\n\t\t * file system (and a rich preview was loaded).\n\t\t */\n\t\taspect-ratio: var(--ck-upload-placeholder-image-aspect-ratio);\n\t}\n}\n\n.ck .ck-upload-placeholder-loader {\n\twidth: 100%;\n\theight: 100%;\n\n\t&::before {\n\t\twidth: var(--ck-upload-placeholder-loader-size);\n\t\theight: var(--ck-upload-placeholder-loader-size);\n\t\tborder-radius: 50%;\n\t\tborder-top: 3px solid var(--ck-color-upload-placeholder-loader);\n\t\tborder-right: 2px solid transparent;\n\t\tanimation: ck-upload-placeholder-loader 1s linear infinite;\n\t}\n}\n\n@keyframes ck-upload-placeholder-loader {\n\tto {\n\t\ttransform: rotate( 360deg );\n\t}\n}\n"],sourceRoot:""}]);const a=s},3689:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-editor__editable .image,.ck.ck-editor__editable .image-inline{position:relative}.ck.ck-editor__editable .image-inline .ck-progress-bar,.ck.ck-editor__editable .image .ck-progress-bar{position:absolute;top:0;left:0}.ck.ck-editor__editable .image-inline.ck-appear,.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image-inline .ck-progress-bar,.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}}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageuploadprogress.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadprogress.css"],names:[],mappings:"AAMC,qEAEC,iBACD,CAGA,uGAEC,iBAAkB,CAClB,KAAM,CACN,MACD,CCRC,yFACC,oBACD,CAID,uGAEC,UAAW,CACX,OAAQ,CACR,gDAAiD,CACjD,oBACD,CAGD,kBACC,GAAO,SAAY,CACnB,GAAO,SAAY,CACpB",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t& .image,\n\t& .image-inline {\n\t\tposition: relative;\n\t}\n\n\t/* Upload progress bar. */\n\t& .image .ck-progress-bar,\n\t& .image-inline .ck-progress-bar {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t& .image,\n\t& .image-inline {\n\t\t/* Showing animation. */\n\t\t&.ck-appear {\n\t\t\tanimation: fadeIn 700ms;\n\t\t}\n\t}\n\n\t/* Upload progress bar. */\n\t& .image .ck-progress-bar,\n\t& .image-inline .ck-progress-bar {\n\t\theight: 2px;\n\t\twidth: 0;\n\t\tbackground: var(--ck-color-upload-bar-background);\n\t\ttransition: width 100ms;\n\t}\n}\n\n@keyframes fadeIn {\n\tfrom { opacity: 0; }\n\tto { opacity: 1; }\n}\n"],sourceRoot:""}]);const a=s},1905:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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%}}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/textalternativeform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,6BACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,oDACC,oBACD,CAEA,uCACC,YACD,CCZA,oCDCD,6BAcE,cAUF,CARE,oDACC,eACD,CAEA,wCACC,cACD,CCrBD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-text-alternative-form {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t& .ck-labeled-field-view {\n\t\tdisplay: inline-block;\n\t}\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},9773:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid 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)}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/link.css"],names:[],mappings:"AAMA,sBACC,mDAMD,CAHC,wCACC,yFACD,CAOD,4BACC,8CACD,CAGA,sCACC,WAAY,CACZ,gDAAiD,CACjD,iBAAkB,CAClB,oCACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Class added to span element surrounding currently selected link. */\n.ck .ck-link_selected {\n\tbackground: var(--ck-color-link-selected-background);\n\n\t/* Give linked inline images some outline to let the user know they are also part of the link. */\n\t& span.image-inline {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background);\n\t}\n}\n\n/*\n * Classes used by the "fake visual selection" displayed in the content when an input\n * in the link UI has focus (the browser does not render the native selection in this state).\n */\n.ck .ck-fake-link-selection {\n\tbackground: var(--ck-color-link-fake-selection);\n}\n\n/* A collapsed fake visual selection. */\n.ck .ck-fake-link-selection_collapsed {\n\theight: 100%;\n\tborder-right: 1px solid var(--ck-color-base-text);\n\tmargin-right: -1px;\n\toutline: solid 1px hsla(0, 0%, 100%, .5);\n}\n'],sourceRoot:""}]);const a=s},2347:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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 .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-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}[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 .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%}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview),[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}","",{version:3,sources:["webpack://./../ckeditor5-link/theme/linkactions.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/linkactions.css"],names:[],mappings:"AAOA,oBACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,8CACC,oBAKD,CAHC,gEACC,eACD,CCXD,oCDCD,oBAcE,cAUF,CARE,8CACC,eACD,CAEA,8DACC,cACD,CCrBD,CCKA,wDACC,cAAe,CACf,eAmCD,CAjCC,0EACC,kCAAmC,CACnC,kCAAmC,CACnC,sBAAuB,CACvB,cAAe,CAIf,+BAAgC,CAChC,aAAc,CACd,iBAKD,CAHC,gFACC,yBACD,CAGD,mPAIC,eACD,CAEA,+DACC,eACD,CAGC,gFACC,yBACD,CAWD,qHACC,sCACD,CDvDD,oCC2DC,wDACC,8DAMD,CAJC,0EACC,WAAY,CACZ,cACD,CAGD,gJAME,aAEF,CD1ED",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-actions {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t& .ck-link-actions__preview {\n\t\tdisplay: inline-block;\n\n\t\t& .ck-button__label {\n\t\t\toverflow: hidden;\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-link-actions__preview {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button:not(.ck-link-actions__preview) {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../mixins/_focus.css";\n@import "../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-actions {\n\t& .ck-button.ck-link-actions__preview {\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\n\t\t& .ck-button__label {\n\t\t\tpadding: 0 var(--ck-spacing-medium);\n\t\t\tcolor: var(--ck-color-link-default);\n\t\t\ttext-overflow: ellipsis;\n\t\t\tcursor: pointer;\n\n\t\t\t/* Match the box model of the link editor form\'s input so the balloon\n\t\t\tdoes not change width when moving between actions and the form. */\n\t\t\tmax-width: var(--ck-input-width);\n\t\t\tmin-width: 3em;\n\t\t\ttext-align: center;\n\n\t\t\t&:hover {\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\t\t}\n\n\t\t&,\n\t\t&:hover,\n\t\t&:focus,\n\t\t&:active {\n\t\t\tbackground: none;\n\t\t}\n\n\t\t&:active {\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t&:focus {\n\t\t\t& .ck-button__label {\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\t\t}\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& .ck-button:not(:first-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& .ck-button:not(:last-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\t& .ck-button.ck-link-actions__preview {\n\t\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\n\n\t\t\t& .ck-button__label {\n\t\t\t\tmin-width: 0;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\n\t\t& .ck-button:not(.ck-link-actions__preview) {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},7754:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{padding:0;min-width:var(--ck-input-width)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 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,[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:var(--ck-spacing-standard) var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{border:0;padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}","",{version:3,sources:["webpack://./../ckeditor5-link/theme/linkform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/linkform.css"],names:[],mappings:"AAOA,iBACC,YAiBD,CAfC,2BACC,YACD,CCNA,oCDCD,iBAQE,cAUF,CARE,wCACC,eACD,CAEA,4BACC,cACD,CCfD,CDuBD,iCACC,aAYD,CALE,wHAEC,mCACD,CE/BF,iCACC,SAAU,CACV,+BA8CD,CA5CC,wDACC,8EAMD,CAJC,uEACC,WAAY,CACZ,UACD,CAGD,4CACC,kCAAmC,CACnC,QAAS,CACT,eAAgB,CAChB,QAAS,CACT,gDAAiD,CACjD,SAaD,CAnBA,4GAaE,aAMF,CAJE,mEACC,kDACD,CAKF,6CACC,yDAWD,CATC,wEACC,QAAS,CACT,SAAU,CACV,UAKD,CAHC,8EACC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-form {\n\tdisplay: flex;\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n\n/*\n * Style link form differently when manual decorators are available.\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\n */\n.ck.ck-link-form_layout-vertical {\n\tdisplay: block;\n\n\t/*\n\t * Whether the form is in the responsive mode or not, if there are decorator buttons\n\t * keep the top margin of action buttons medium.\n\t */\n\t& .ck-button {\n\t\t&.ck-button-save,\n\t\t&.ck-button-cancel {\n\t\t\tmargin-top: var(--ck-spacing-medium);\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n/*\n * Style link form differently when manual decorators are available.\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\n */\n.ck.ck-link-form_layout-vertical {\n\tpadding: 0;\n\tmin-width: var(--ck-input-width);\n\n\t& .ck-labeled-field-view {\n\t\tmargin: var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small);\n\n\t\t& .ck-input-text {\n\t\t\tmin-width: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t}\n\n\t& .ck-button {\n\t\tpadding: var(--ck-spacing-standard);\n\t\tmargin: 0;\n\t\tborder-radius: 0;\n\t\tborder: 0;\n\t\tborder-top: 1px solid var(--ck-color-base-border);\n\t\twidth: 50%;\n\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-left: 0;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-left: 0;\n\n\t\t\t&:last-of-type {\n\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Using additional `.ck` class for stronger CSS specificity than `.ck.ck-link-form > :not(:first-child)`. */\n\t& .ck.ck-list {\n\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-large);\n\n\t\t& .ck-button.ck-switchbutton {\n\t\t\tborder: 0;\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\n\t\t\t&:hover {\n\t\t\t\tbackground: none;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},4721:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-collapsible.ck-collapsible_collapsed>.ck-collapsible__children{display:none}:root{--ck-collapsible-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-collapsible>.ck.ck-button{width:100%;font-weight:700;padding:var(--ck-spacing-medium) var(--ck-spacing-large);border-radius:0}.ck.ck-collapsible>.ck.ck-button:focus{background:transparent}.ck.ck-collapsible>.ck.ck-button:active,.ck.ck-collapsible>.ck.ck-button:hover:not(:focus),.ck.ck-collapsible>.ck.ck-button:not(:focus){background:transparent;border-color:transparent;box-shadow:none}.ck.ck-collapsible>.ck.ck-button>.ck-icon{margin-right:var(--ck-spacing-medium);width:var(--ck-collapsible-arrow-size)}.ck.ck-collapsible>.ck-collapsible__children{padding:0 var(--ck-spacing-large) var(--ck-spacing-large)}.ck.ck-collapsible.ck-collapsible_collapsed>.ck.ck-button .ck-icon{transform:rotate(-90deg)}","",{version:3,sources:["webpack://./../ckeditor5-list/theme/collapsible.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-list/collapsible.css"],names:[],mappings:"AAMC,sEACC,YACD,CCHD,MACC,yDACD,CAGC,iCACC,UAAW,CACX,eAAiB,CACjB,wDAAyD,CACzD,eAgBD,CAdC,uCACC,sBACD,CAEA,wIACC,sBAAuB,CACvB,wBAAyB,CACzB,eACD,CAEA,0CACC,qCAAsC,CACtC,sCACD,CAGD,6CACC,yDACD,CAGC,mEACC,wBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-collapsible.ck-collapsible_collapsed {\n\t& > .ck-collapsible__children {\n\t\tdisplay: none;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-collapsible-arrow-size: calc(0.5 * var(--ck-icon-size));\n}\n\n.ck.ck-collapsible {\n\t& > .ck.ck-button {\n\t\twidth: 100%;\n\t\tfont-weight: bold;\n\t\tpadding: var(--ck-spacing-medium) var(--ck-spacing-large);\n\t\tborder-radius: 0;\n\n\t\t&:focus {\n\t\t\tbackground: transparent;\n\t\t}\n\n\t\t&:active, &:not(:focus), &:hover:not(:focus) {\n\t\t\tbackground: transparent;\n\t\t\tborder-color: transparent;\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t& > .ck-icon {\n\t\t\tmargin-right: var(--ck-spacing-medium);\n\t\t\twidth: var(--ck-collapsible-arrow-size);\n\t\t}\n\t}\n\n\t& > .ck-collapsible__children {\n\t\tpadding: 0 var(--ck-spacing-large) var(--ck-spacing-large);\n\t}\n\n\t&.ck-collapsible_collapsed {\n\t\t& > .ck.ck-button .ck-icon {\n\t\t\ttransform: rotate(-90deg);\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},6082:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-list-properties.ck-list-properties_without-styles{padding:var(--ck-spacing-large)}.ck.ck-list-properties.ck-list-properties_without-styles>*{min-width:14em}.ck.ck-list-properties.ck-list-properties_without-styles>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-list-styles-list{grid-template-columns:repeat(4,auto)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*{width:100%}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties .ck.ck-numbered-list-properties__start-index .ck-input{min-width:auto;width:100%}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order{background:transparent;padding-left:0;padding-right:0;margin-bottom:calc(var(--ck-spacing-tiny)*-1)}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:active,.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:hover{box-shadow:none;border-color:transparent;background:none}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-list/listproperties.css"],names:[],mappings:"AAOC,yDACC,+BASD,CAPC,2DACC,cAKD,CAHC,6DACC,qCACD,CASD,wFACC,oCACD,CAGA,mFACC,gDAWD,CARE,+GACC,UAKD,CAHC,iHACC,qCACD,CAMJ,8EACC,cAAe,CACf,UACD,CAEA,uEACC,sBAAuB,CACvB,cAAe,CACf,eAAgB,CAChB,6CAOD,CALC,2JACC,eAAgB,CAChB,wBAAyB,CACzB,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-list-properties {\n\t/* When there are no list styles and there is no collapsible. */\n\t&.ck-list-properties_without-styles {\n\t\tpadding: var(--ck-spacing-large);\n\n\t\t& > * {\n\t\t\tmin-width: 14em;\n\n\t\t\t& + * {\n\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * When the numbered list property fields (start at, reversed) should be displayed,\n\t * more horizontal space is needed. Reconfigure the style grid to create that space.\n\t */\n\t&.ck-list-properties_with-numbered-properties {\n\t\t& > .ck-list-styles-list {\n\t\t\tgrid-template-columns: repeat( 4, auto );\n\t\t}\n\n\t\t/* When list styles are rendered and property fields are in a collapsible. */\n\t\t& > .ck-collapsible {\n\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\n\t\t\t& > .ck-collapsible__children {\n\t\t\t\t& > * {\n\t\t\t\t\twidth: 100%;\n\n\t\t\t\t\t& + * {\n\t\t\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-numbered-list-properties__start-index .ck-input {\n\t\tmin-width: auto;\n\t\twidth: 100%;\n\t}\n\n\t& .ck.ck-numbered-list-properties__reversed-order {\n\t\tbackground: transparent;\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\t\tmargin-bottom: calc(-1 * var(--ck-spacing-tiny));\n\n\t\t&:active, &:hover {\n\t\t\tbox-shadow: none;\n\t\t\tborder-color: transparent;\n\t\t\tbackground: none;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},2417:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-list-styles-list{display:grid}:root{--ck-list-style-button-size:44px}.ck.ck-list-styles-list{grid-template-columns:repeat(3,auto);row-gap:var(--ck-spacing-medium);column-gap:var(--ck-spacing-medium);padding:var(--ck-spacing-large)}.ck.ck-list-styles-list .ck-button{padding:0;margin:0;box-sizing:content-box}.ck.ck-list-styles-list .ck-button,.ck.ck-list-styles-list .ck-button .ck-icon{width:var(--ck-list-style-button-size);height:var(--ck-list-style-button-size)}","",{version:3,sources:["webpack://./../ckeditor5-list/theme/liststyles.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-list/liststyles.css"],names:[],mappings:"AAKA,wBACC,YACD,CCFA,MACC,gCACD,CAEA,wBACC,oCAAwC,CACxC,gCAAiC,CACjC,mCAAoC,CACpC,+BA0BD,CAxBC,mCAIC,SAAU,CAMV,QAAS,CAOT,sBAMD,CAJC,+EAjBA,sCAAuC,CACvC,uCAmBA",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-list-styles-list {\n\tdisplay: grid;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-list-style-button-size: 44px;\n}\n\n.ck.ck-list-styles-list {\n\tgrid-template-columns: repeat( 3, auto );\n\trow-gap: var(--ck-spacing-medium);\n\tcolumn-gap: var(--ck-spacing-medium);\n\tpadding: var(--ck-spacing-large);\n\n\t& .ck-button {\n\t\t/* Make the button look like a thumbnail (the icon "takes it all"). */\n\t\twidth: var(--ck-list-style-button-size);\n\t\theight: var(--ck-list-style-button-size);\n\t\tpadding: 0;\n\n\t\t/*\n\t\t * Buttons are aligned by the grid so disable default button margins to not collide with the\n\t\t * gaps in the grid.\n\t\t */\n\t\tmargin: 0;\n\n\t\t/*\n\t\t * Make sure the button border (which is displayed on focus, BTW) does not steal pixels\n\t\t * from the button dimensions and, as a result, decrease the size of the icon\n\t\t * (which becomes blurry as it scales down).\n\t\t */\n\t\tbox-sizing: content-box;\n\n\t\t& .ck-icon {\n\t\t\twidth: var(--ck-list-style-button-size);\n\t\t\theight: var(--ck-list-style-button-size);\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},1199:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,':root{--ck-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px}.ck-content .todo-list li .todo-list{margin-top:5px}.ck-content .todo-list .todo-list__label>input{-webkit-appearance:none;display:inline-block;position:relative;width:var(--ck-todo-list-checkmark-size);height:var(--ck-todo-list-checkmark-size);vertical-align:middle;border:0;left:-25px;margin-right:-15px;right:0;margin-left:0}.ck-content .todo-list .todo-list__label>input:before{display:block;position:absolute;box-sizing:border-box;content:"";width:100%;height:100%;border:1px solid #333;border-radius:2px;transition:box-shadow .25s ease-in-out,background .25s ease-in-out,border .25s ease-in-out}.ck-content .todo-list .todo-list__label>input:after{display:block;position:absolute;box-sizing:content-box;pointer-events:none;content:"";left:calc(var(--ck-todo-list-checkmark-size)/3);top:calc(var(--ck-todo-list-checkmark-size)/5.3);width:calc(var(--ck-todo-list-checkmark-size)/5.3);height:calc(var(--ck-todo-list-checkmark-size)/2.6);border-left:0 solid transparent;border-bottom:calc(var(--ck-todo-list-checkmark-size)/8) solid transparent;border-right:calc(var(--ck-todo-list-checkmark-size)/8) solid transparent;border-top:0 solid transparent;transform:rotate(45deg)}.ck-content .todo-list .todo-list__label>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-content .todo-list .todo-list__label>input[checked]:after{border-color:#fff}.ck-content .todo-list .todo-list__label .todo-list__label__description{vertical-align:middle}[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-right:0;right:-25px;margin-left:-15px}.ck-editor__editable .todo-list .todo-list__label>input{cursor:pointer}.ck-editor__editable .todo-list .todo-list__label>input:hover:before{box-shadow:0 0 0 5px rgba(0,0,0,.1)}',"",{version:3,sources:["webpack://./../ckeditor5-list/theme/todolist.css"],names:[],mappings:"AAKA,MACC,kCACD,CAEA,uBACC,eA0ED,CAxEC,0BACC,iBAKD,CAHC,qCACC,cACD,CAIA,+CACC,uBAAwB,CACxB,oBAAqB,CACrB,iBAAkB,CAClB,wCAAyC,CACzC,yCAA0C,CAC1C,qBAAsB,CAGtB,QAAS,CAGT,UAAW,CACX,kBAAmB,CACnB,OAAQ,CACR,aA0CD,CAxCC,sDACC,aAAc,CACd,iBAAkB,CAClB,qBAAsB,CACtB,UAAW,CACX,UAAW,CACX,WAAY,CACZ,qBAAiC,CACjC,iBAAkB,CAClB,0FACD,CAEA,qDACC,aAAc,CACd,iBAAkB,CAClB,sBAAuB,CACvB,mBAAoB,CACpB,UAAW,CAGX,+CAAoD,CACpD,gDAAqD,CACrD,kDAAuD,CACvD,mDAAwD,CAGxD,+BAA+G,CAA/G,0EAA+G,CAA/G,yEAA+G,CAA/G,8BAA+G,CAC/G,uBACD,CAGC,+DACC,kBAA8B,CAC9B,oBACD,CAEA,8DACC,iBACD,CAIF,wEACC,qBACD,CAKF,6CACC,MAAO,CACP,cAAe,CACf,WAAY,CACZ,iBACD,CAMA,wDACC,cAKD,CAHC,qEACC,mCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-todo-list-checkmark-size: 16px;\n}\n\n.ck-content .todo-list {\n\tlist-style: none;\n\n\t& li {\n\t\tmargin-bottom: 5px;\n\n\t\t& .todo-list {\n\t\t\tmargin-top: 5px;\n\t\t}\n\t}\n\n\t& .todo-list__label {\n\t\t& > input {\n\t\t\t-webkit-appearance: none;\n\t\t\tdisplay: inline-block;\n\t\t\tposition: relative;\n\t\t\twidth: var(--ck-todo-list-checkmark-size);\n\t\t\theight: var(--ck-todo-list-checkmark-size);\n\t\t\tvertical-align: middle;\n\n\t\t\t/* Needed on iOS */\n\t\t\tborder: 0;\n\n\t\t\t/* LTR styles */\n\t\t\tleft: -25px;\n\t\t\tmargin-right: -15px;\n\t\t\tright: 0;\n\t\t\tmargin-left: 0;\n\n\t\t\t&::before {\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tcontent: '';\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tborder: 1px solid hsl(0, 0%, 20%);\n\t\t\t\tborder-radius: 2px;\n\t\t\t\ttransition: 250ms ease-in-out box-shadow, 250ms ease-in-out background, 250ms ease-in-out border;\n\t\t\t}\n\n\t\t\t&::after {\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tbox-sizing: content-box;\n\t\t\t\tpointer-events: none;\n\t\t\t\tcontent: '';\n\n\t\t\t\t/* Calculate tick position, size and border-width proportional to the checkmark size. */\n\t\t\t\tleft: calc( var(--ck-todo-list-checkmark-size) / 3 );\n\t\t\t\ttop: calc( var(--ck-todo-list-checkmark-size) / 5.3 );\n\t\t\t\twidth: calc( var(--ck-todo-list-checkmark-size) / 5.3 );\n\t\t\t\theight: calc( var(--ck-todo-list-checkmark-size) / 2.6 );\n\t\t\t\tborder-style: solid;\n\t\t\t\tborder-color: transparent;\n\t\t\t\tborder-width: 0 calc( var(--ck-todo-list-checkmark-size) / 8 ) calc( var(--ck-todo-list-checkmark-size) / 8 ) 0;\n\t\t\t\ttransform: rotate(45deg);\n\t\t\t}\n\n\t\t\t&[checked] {\n\t\t\t\t&::before {\n\t\t\t\t\tbackground: hsl(126, 64%, 41%);\n\t\t\t\t\tborder-color: hsl(126, 64%, 41%);\n\t\t\t\t}\n\n\t\t\t\t&::after {\n\t\t\t\t\tborder-color: hsl(0, 0%, 100%);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t& .todo-list__label__description {\n\t\t\tvertical-align: middle;\n\t\t}\n\t}\n}\n\n/* RTL styles */\n[dir=\"rtl\"] .todo-list .todo-list__label > input {\n\tleft: 0;\n\tmargin-right: 0;\n\tright: -25px;\n\tmargin-left: -15px;\n}\n\n/*\n * To-do list should be interactive only during the editing\n * (https://github.com/ckeditor/ckeditor5/issues/2090).\n */\n.ck-editor__editable .todo-list .todo-list__label > input {\n\tcursor: pointer;\n\n\t&:hover::before {\n\t\tbox-shadow: 0 0 0 5px hsla(0, 0%, 0%, 0.1);\n\t}\n}\n"],sourceRoot:""}]);const a=s},7368:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-input-color{width:100%;display:flex;flex-direction:row-reverse}.ck.ck-input-color>input.ck.ck-input-text{min-width:auto;flex-grow:1}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button{display:flex}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{position:relative;overflow:hidden}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{position:absolute;display:block}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-left-width:0;border-top-left-radius:0;border-bottom-left-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-right-width:0;border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border-radius:0}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{width:20px;height:20px;border:1px solid var(--ck-color-input-border)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{top:-30%;left:50%;height:150%;width:8%;background:red;border-radius:2px;transform:rotate(45deg);transform-origin:50%}.ck.ck-input-color .ck.ck-input-color__remove-color{width:100%;border-bottom:1px solid var(--ck-color-input-border);padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);border-bottom-left-radius:0;border-bottom-right-radius:0}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:0;margin-left:var(--ck-spacing-standard)}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/colorinput.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/colorinput.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,mBACC,UAAW,CACX,YAAa,CACb,0BA8BD,CA5BC,0CACC,cAAe,CACf,WACD,CAEA,sCACC,cAMD,CAHC,kFACC,YACD,CAGD,8CAEC,YAWD,CATC,kFACC,iBAAkB,CAClB,eAMD,CAJC,0IACC,iBAAkB,CAClB,aACD,CC1BF,+CAEE,yBAA0B,CAC1B,4BAOF,CAVA,+CAOE,wBAAyB,CACzB,2BAEF,CAGC,wEACC,SAoCD,CArCA,kFAIE,mBAAoB,CACpB,wBAAyB,CACzB,2BA+BF,CArCA,kFAUE,oBAAqB,CACrB,yBAA0B,CAC1B,4BAyBF,CAtBC,oFACC,oDACD,CAEA,4GC9BF,eD+CE,CAjBA,+PC1BD,qCD2CC,CAjBA,4GAGC,UAAW,CACX,WAAY,CACZ,6CAYD,CAVC,oKACC,QAAS,CACT,QAAS,CACT,WAAY,CACZ,QAAS,CACT,cAA6B,CAC7B,iBAAkB,CAClB,uBAAwB,CACxB,oBACD,CAKH,oDACC,UAAW,CACX,oDAAqD,CACrD,qEAAwE,CAExE,2BAA4B,CAC5B,4BAkBD,CAxBA,8DASE,yBAeF,CAxBA,8DAaE,wBAWF,CARC,gEACC,uCAMD,CAPA,0EAIE,cAAe,CACf,sCAEF",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-input-color {\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: row-reverse;\n\n\t& > input.ck.ck-input-text {\n\t\tmin-width: auto;\n\t\tflex-grow: 1;\n\t}\n\n\t& > div.ck.ck-dropdown {\n\t\tmin-width: auto;\n\n\t\t/* This dropdown has no arrow but a color preview instead. */\n\t\t& > .ck-input-color__button .ck-dropdown__arrow {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& .ck.ck-input-color__button {\n\t\t/* Resolving issue with misaligned buttons on Safari (see #10589) */\n\t\tdisplay: flex;\n\n\t\t& .ck.ck-input-color__button__preview {\n\t\t\tposition: relative;\n\t\t\toverflow: hidden;\n\n\t\t\t& > .ck.ck-input-color__button__preview__no-color-indicator {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../mixins/_rounded.css";\n\n.ck.ck-input-color {\n\t& > .ck.ck-input-text {\n\t\t@mixin ck-dir ltr {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\t}\n\n\t& > .ck.ck-dropdown {\n\t\t& > .ck.ck-button.ck-input-color__button {\n\t\t\tpadding: 0;\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tborder-left-width: 0;\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tborder-right-width: 0;\n\t\t\t\tborder-top-right-radius: 0;\n\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t}\n\n\t\t\t&.ck-disabled {\n\t\t\t\tbackground: var(--ck-color-input-disabled-background);\n\t\t\t}\n\n\t\t\t& > .ck.ck-input-color__button__preview {\n\t\t\t\t@mixin ck-rounded-corners;\n\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t\tborder: 1px solid var(--ck-color-input-border);\n\n\t\t\t\t& > .ck.ck-input-color__button__preview__no-color-indicator {\n\t\t\t\t\ttop: -30%;\n\t\t\t\t\tleft: 50%;\n\t\t\t\t\theight: 150%;\n\t\t\t\t\twidth: 8%;\n\t\t\t\t\tbackground: hsl(0, 100%, 50%);\n\t\t\t\t\tborder-radius: 2px;\n\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\ttransform-origin: 50%;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-input-color__remove-color {\n\t\twidth: 100%;\n\t\tborder-bottom: 1px solid var(--ck-color-input-border);\n\t\tpadding: calc(var(--ck-spacing-standard) / 2) var(--ck-spacing-standard);\n\n\t\tborder-bottom-left-radius: 0;\n\t\tborder-bottom-right-radius: 0;\n\n\t\t@mixin ck-dir ltr {\n\t\t\tborder-top-right-radius: 0;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tborder-top-left-radius: 0;\n\t\t}\n\n\t\t& .ck.ck-icon {\n\t\t\tmargin-right: var(--ck-spacing-standard);\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: 0;\n\t\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},4070:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/form.css"],names:[],mappings:"AAKA,YACC,mCAyBD,CAvBC,kBAEC,YACD,CAEA,8BACC,cAAe,CACf,OACD,CAEA,4BACC,cAWD,CARE,6DACC,4CACD,CAEA,mEACC,UACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form {\n\tpadding: 0 0 var(--ck-spacing-large);\n\n\t&:focus {\n\t\t/* See: https://github.com/ckeditor/ckeditor5/issues/4773 */\n\t\toutline: none;\n\t}\n\n\t& .ck.ck-input-text {\n\t\tmin-width: 100%;\n\t\twidth: 0;\n\t}\n\n\t& .ck.ck-dropdown {\n\t\tmin-width: 100%;\n\n\t\t& .ck-dropdown__button {\n\t\t\t&:not(:focus) {\n\t\t\t\tborder: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\n\t\t\t& .ck-button__label {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},9247:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}[dir=ltr] .ck.ck-form__row>:not(.ck-label)+*{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-form__row>:not(.ck-label)+*{margin-right:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{width:100%;min-width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/formrow.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/formrow.css"],names:[],mappings:"AAKA,iBACC,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,6BAaD,CAVC,iCACC,WACD,CAGC,wHAEC,sBACD,CCbF,iBACC,4DA2BD,CAvBE,6CAEE,mCAMF,CARA,6CAME,oCAEF,CAGD,2BACC,UAAW,CACX,cACD,CAEA,2CACC,kCAKD,CAHC,wEACC,0BACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form__row {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\tjustify-content: space-between;\n\n\t/* Ignore labels that work as fieldset legends */\n\t& > *:not(.ck-label) {\n\t\tflex-grow: 1;\n\t}\n\n\t&.ck-table-form__action-row {\n\t\t& .ck-button-save,\n\t\t& .ck-button-cancel {\n\t\t\tjustify-content: center;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-form__row {\n\tpadding: var(--ck-spacing-standard) var(--ck-spacing-large) 0;\n\n\t/* Ignore labels that work as fieldset legends */\n\t& > *:not(.ck-label) {\n\t\t& + * {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: var(--ck-spacing-large);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: var(--ck-spacing-large);\n\t\t\t}\n\t\t}\n\t}\n\n\t& > .ck-label {\n\t\twidth: 100%;\n\t\tmin-width: 100%;\n\t}\n\n\t&.ck-table-form__action-row {\n\t\tmargin-top: var(--ck-spacing-large);\n\n\t\t& .ck-button .ck-button__label {\n\t\t\tcolor: var(--ck-color-text);\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},1613:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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)}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/inserttable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/inserttable.css"],names:[],mappings:"AAKA,oCACC,YAAa,CACb,kBAAmB,CACnB,cACD,CCJA,MACC,uCAAwC,CACxC,0CAA2C,CAC3C,yCAA0C,CAC1C,yCACD,CAEA,oCAEC,oJAA2J,CAC3J,yFACD,CAEA,qCACC,iBACD,CAEA,uCACC,+CAAgD,CAChD,iDAAkD,CAClD,iDAAkD,CAClD,4CAA6C,CAC7C,iBAMD,CAJC,6CACC,yCAA0C,CAC1C,6CACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-insert-table-dropdown__grid {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-insert-table-dropdown-padding: 10px;\n\t--ck-insert-table-dropdown-box-height: 11px;\n\t--ck-insert-table-dropdown-box-width: 12px;\n\t--ck-insert-table-dropdown-box-margin: 1px;\n}\n\n.ck .ck-insert-table-dropdown__grid {\n\t/* The width of a container should match 10 items in a row so there will be a 10x10 grid. */\n\twidth: calc(var(--ck-insert-table-dropdown-box-width) * 10 + var(--ck-insert-table-dropdown-box-margin) * 20 + var(--ck-insert-table-dropdown-padding) * 2);\n\tpadding: var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;\n}\n\n.ck .ck-insert-table-dropdown__label {\n\ttext-align: center;\n}\n\n.ck .ck-insert-table-dropdown-grid-box {\n\twidth: var(--ck-insert-table-dropdown-box-width);\n\theight: var(--ck-insert-table-dropdown-box-height);\n\tmargin: var(--ck-insert-table-dropdown-box-margin);\n\tborder: 1px solid var(--ck-color-base-border);\n\tborder-radius: 1px;\n\n\t&.ck-on {\n\t\tborder-color: var(--ck-color-focus-border);\n\t\tbackground: var(--ck-color-focus-outer-shadow);\n\t}\n}\n\n"],sourceRoot:""}]);const a=s},6306:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-content .table{margin:.9em 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}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/table.css"],names:[],mappings:"AAKA,mBAIC,gBAAkB,CAClB,aAgCD,CA9BC,yBAEC,wBAAyB,CACzB,gBAAiB,CAIjB,UAAW,CACX,WAAY,CAIZ,yBAiBD,CAfC,wDAEC,aAAc,CACd,YAAa,CAKb,wBACD,CAEA,4BACC,eAAiB,CACjB,2BACD,CAMF,+BACC,gBACD,CAEA,+BACC,eACD,CAEA,+CAKC,oBAAqB,CAMrB,UACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content .table {\n\t/* Give the table widget some air and center it horizontally */\n\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\tmargin: 0.9em auto;\n\tdisplay: table;\n\n\t& table {\n\t\t/* The table cells should have slight borders */\n\t\tborder-collapse: collapse;\n\t\tborder-spacing: 0;\n\n\t\t/* Table width and height are set on the parent <figure>. Make sure the table inside stretches\n\t\tto the full dimensions of the container (https://github.com/ckeditor/ckeditor5/issues/6186). */\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\t/* The outer border of the table should be slightly darker than the inner lines.\n\t\tAlso see https://github.com/ckeditor/ckeditor5-table/issues/50. */\n\t\tborder: 1px double hsl(0, 0%, 70%);\n\n\t\t& td,\n\t\t& th {\n\t\t\tmin-width: 2em;\n\t\t\tpadding: .4em;\n\n\t\t\t/* The border is inherited from .ck-editor__nested-editable styles, so theoretically it\'s not necessary here.\n\t\t\tHowever, the border is a content style, so it should use .ck-content (so it works outside the editor).\n\t\t\tHence, the duplication. See https://github.com/ckeditor/ckeditor5/issues/6314 */\n\t\t\tborder: 1px solid hsl(0, 0%, 75%);\n\t\t}\n\n\t\t& th {\n\t\t\tfont-weight: bold;\n\t\t\tbackground: hsla(0, 0%, 0%, 5%);\n\t\t}\n\t}\n}\n\n/* Text alignment of the table header should match the editor settings and override the native browser styling,\nwhen content is available outside the editor. See https://github.com/ckeditor/ckeditor5/issues/6638 */\n.ck-content[dir="rtl"] .table th {\n\ttext-align: right;\n}\n\n.ck-content[dir="ltr"] .table th {\n\ttext-align: left;\n}\n\n.ck-editor__editable .ck-table-bogus-paragraph {\n\t/*\n\t * Use display:inline-block to force Chrome/Safari to limit text mutations to this element.\n\t * See https://github.com/ckeditor/ckeditor5/issues/6062.\n\t */\n\tdisplay: inline-block;\n\n\t/*\n\t * Inline HTML elements nested in the span should always be dimensioned in relation to the whole cell width.\n\t * See https://github.com/ckeditor/ckeditor5/issues/9117.\n\t */\n\twidth: 100%;\n}\n'],sourceRoot:""}]);const a=s},2128:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-color-table-caption-background:#f7f7f7;--ck-color-table-caption-text:#333;--ck-color-table-caption-highlighted-background:hsl(52deg 100% 50%)}.ck-content .table>figcaption{display:table-caption;caption-side:top;word-break:break-word;text-align:center;color:var(--ck-color-table-caption-text);background-color:var(--ck-color-table-caption-background);padding:.6em;font-size:.75em;outline-offset:-1px}.ck.ck-editor__editable .table>figcaption.table__caption_highlighted{animation:ck-table-caption-highlight .6s ease-out}.ck.ck-editor__editable .table>figcaption.ck-placeholder:before{padding-left:inherit;padding-right:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@keyframes ck-table-caption-highlight{0%{background-color:var(--ck-color-table-caption-highlighted-background)}to{background-color:var(--ck-color-table-caption-background)}}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/tablecaption.css"],names:[],mappings:"AAKA,MACC,2CAAoD,CACpD,kCAA8C,CAC9C,mEACD,CAGA,8BACC,qBAAsB,CACtB,gBAAiB,CACjB,qBAAsB,CACtB,iBAAkB,CAClB,wCAAyC,CACzC,yDAA0D,CAC1D,YAAa,CACb,eAAgB,CAChB,mBACD,CAIC,qEACC,iDACD,CAEA,gEACC,oBAAqB,CACrB,qBAAsB,CAMtB,kBAAmB,CACnB,eAAgB,CAChB,sBACD,CAGD,sCACC,GACC,qEACD,CAEA,GACC,yDACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-table-caption-background: hsl(0, 0%, 97%);\n\t--ck-color-table-caption-text: hsl(0, 0%, 20%);\n\t--ck-color-table-caption-highlighted-background: hsl(52deg 100% 50%);\n}\n\n/* Content styles */\n.ck-content .table > figcaption {\n\tdisplay: table-caption;\n\tcaption-side: top;\n\tword-break: break-word;\n\ttext-align: center;\n\tcolor: var(--ck-color-table-caption-text);\n\tbackground-color: var(--ck-color-table-caption-background);\n\tpadding: .6em;\n\tfont-size: .75em;\n\toutline-offset: -1px;\n}\n\n/* Editing styles */\n.ck.ck-editor__editable .table > figcaption {\n\t&.table__caption_highlighted {\n\t\tanimation: ck-table-caption-highlight .6s ease-out;\n\t}\n\n\t&.ck-placeholder::before {\n\t\tpadding-left: inherit;\n\t\tpadding-right: inherit;\n\n\t\t/*\n\t\t * Make sure the table caption placeholder doesn't overflow the placeholder area.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9162.\n\t\t */\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n@keyframes ck-table-caption-highlight {\n\t0% {\n\t\tbackground-color: var(--ck-color-table-caption-highlighted-background);\n\t}\n\n\t100% {\n\t\tbackground-color: var(--ck-color-table-caption-background);\n\t}\n}\n"],sourceRoot:""}]);const a=s},5087:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:first-of-type{flex-grow:0.57}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:last-of-type{flex-grow:0.43}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar .ck-button{flex-grow:1}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{align-self:flex-end;padding:0;width:25%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/tablecellproperties.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tablecellproperties.css"],names:[],mappings:"AAOE,6FACC,cAiBD,CAdE,0HAEC,cACD,CAEA,yHAEC,cACD,CAEA,uHACC,WACD,CClBJ,kCACC,WAkBD,CAfE,2FACC,mBAAoB,CACpB,SAAU,CACV,SACD,CAGC,4GACC,eAAgB,CAGhB,qCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-cell-properties-form {\n\t& .ck-form__row {\n\t\t&.ck-table-cell-properties-form__alignment-row {\n\t\t\tflex-wrap: wrap;\n\n\t\t\t& .ck.ck-toolbar {\n\t\t\t\t&:first-of-type {\n\t\t\t\t\t/* 4 buttons out of 7 (h-alignment + v-alignment) = 0.57 */\n\t\t\t\t\tflex-grow: 0.57;\n\t\t\t\t}\n\n\t\t\t\t&:last-of-type {\n\t\t\t\t\t/* 3 buttons out of 7 (h-alignment + v-alignment) = 0.43 */\n\t\t\t\t\tflex-grow: 0.43;\n\t\t\t\t}\n\n\t\t\t\t& .ck-button {\n\t\t\t\t\tflex-grow: 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-cell-properties-form {\n\twidth: 320px;\n\n\t& .ck-form__row {\n\t\t&.ck-table-cell-properties-form__padding-row {\n\t\t\talign-self: flex-end;\n\t\t\tpadding: 0;\n\t\t\twidth: 25%;\n\t\t}\n\n\t\t&.ck-table-cell-properties-form__alignment-row {\n\t\t\t& .ck.ck-toolbar {\n\t\t\t\tbackground: none;\n\n\t\t\t\t/* Compensate for missing input label that would push the margin (toolbar has no inputs). */\n\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},3881:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":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}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableediting.css"],names:[],mappings:"AAKA,MACC,8DACD,CAKE,8QAGC,wDAAyD,CAKzD,iBAAkB,CAClB,8CAA+C,CAC/C,mBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-table-focused-cell-background: hsla(208, 90%, 80%, .3);\n}\n\n.ck-widget.table {\n\t& td,\n\t& th {\n\t\t&.ck-editor__nested-editable.ck-editor__nested-editable_focused,\n\t\t&.ck-editor__nested-editable:focus {\n\t\t\t/* A very slight background to highlight the focused cell */\n\t\t\tbackground: var(--ck-color-table-focused-cell-background);\n\n\t\t\t/* Fixes the problem where surrounding cells cover the focused cell's border.\n\t\t\tIt does not fix the problem in all places but the UX is improved.\n\t\t\tSee https://github.com/ckeditor/ckeditor5-table/issues/29. */\n\t\t\tborder-style: none;\n\t\t\toutline: 1px solid var(--ck-color-focus-border);\n\t\t\toutline-offset: -1px; /* progressive enhancement - no IE support */\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},6237:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,'.ck.ck-table-form .ck-form__row.ck-table-form__background-row,.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{flex-wrap:wrap;align-items:center}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view{display:flex;flex-direction:column-reverse;align-items:center}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck.ck-labeled-field-view{position:relative}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{position:absolute;left:50%;bottom:calc(var(--ck-table-properties-error-arrow-size)*-1);transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{content:"";position:absolute;top:calc(var(--ck-table-properties-error-arrow-size)*-1);left:50%;transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{width:80px;min-width:80px;max-width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-field-view{padding-top:var(--ck-spacing-standard)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{border-radius:0}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status,.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{background:var(--ck-color-base-error);color:var(--ck-color-base-background);padding:var(--ck-spacing-small) var(--ck-spacing-medium);min-width:var(--ck-table-properties-min-error-width);text-align:center}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-left:var(--ck-table-properties-error-arrow-size) solid transparent;border-bottom:var(--ck-table-properties-error-arrow-size) solid var(--ck-color-base-error);border-right:var(--ck-table-properties-error-arrow-size) solid transparent;border-top:0 solid transparent}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both}.ck.ck-table-form .ck.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}',"",{version:3,sources:["webpack://./../ckeditor5-table/theme/tableform.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableform.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAWE,wHACC,cACD,CAEA,8DACC,cAAe,CACf,kBAeD,CAbC,qFACC,YAAa,CACb,6BAA8B,CAC9B,kBAKD,CAEA,sMACC,WACD,CAIF,4CAEC,iBAoBD,CAlBC,8EACC,iBAAkB,CAClB,QAAS,CACT,2DAAgE,CAChE,8BAA+B,CAG/B,SAUD,CAPC,oFACC,UAAW,CACX,iBAAkB,CAClB,wDAA6D,CAC7D,QAAS,CACT,0BACD,CChDH,MACC,0CAA2C,CAC3C,2CACD,CAMI,2FACC,kCAAmC,CACnC,iBACD,CAGD,8KAEC,UAAW,CACX,cAAe,CACf,cACD,CAGD,8DACC,SAcD,CAZC,yMAEC,QACD,CAEA,iGACC,mBAAoB,CACpB,oBAAqB,CACrB,wCAAyC,CACzC,6CAA8C,CAC9C,gCACD,CAIF,4CACC,sCAyBD,CAvBC,8ECxCD,eDyDC,CAjBA,mMCpCA,qCDqDA,CAjBA,8EAGC,qCAAsC,CACtC,qCAAsC,CACtC,wDAAyD,CACzD,oDAAqD,CACrD,iBAUD,CAPC,oFAGC,yEAAmB,CAAnB,0FAAmB,CAAnB,0EAAmB,CAAnB,8BACD,CAdD,8EAgBC,iEACD,CAGA,6GACC,YACD,CAIF,oDACC,GACC,SACD,CAEA,GACC,SACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-form {\n\t& .ck-form__row {\n\t\t&.ck-table-form__border-row {\n\t\t\tflex-wrap: wrap;\n\t\t}\n\n\t\t&.ck-table-form__background-row {\n\t\t\tflex-wrap: wrap;\n\t\t}\n\n\t\t&.ck-table-form__dimensions-row {\n\t\t\tflex-wrap: wrap;\n\t\t\talign-items: center;\n\n\t\t\t& .ck-labeled-field-view {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column-reverse;\n\t\t\t\talign-items: center;\n\n\t\t\t\t& .ck.ck-dropdown {\n\t\t\t\t\tflex-grow: 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t& .ck-table-form__dimension-operator {\n\t\t\t\tflex-grow: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-labeled-field-view {\n\t\t/* Allow absolute positioning of the status (error) balloons. */\n\t\tposition: relative;\n\n\t\t& .ck.ck-labeled-field-view__status {\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\tbottom: calc( -1 * var(--ck-table-properties-error-arrow-size) );\n\t\t\ttransform: translate(-50%,100%);\n\n\t\t\t/* Make sure the balloon status stays on top of other form elements. */\n\t\t\tz-index: 1;\n\n\t\t\t/* The arrow pointing towards the field. */\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: calc( -1 * var(--ck-table-properties-error-arrow-size) );\n\t\t\t\tleft: 50%;\n\t\t\t\ttransform: translateX( -50% );\n\t\t\t}\n\t\t}\n\t}\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../mixins/_rounded.css";\n\n:root {\n\t--ck-table-properties-error-arrow-size: 6px;\n\t--ck-table-properties-min-error-width: 150px;\n}\n\n.ck.ck-table-form {\n\t& .ck-form__row {\n\t\t&.ck-table-form__border-row {\n\t\t\t& .ck-labeled-field-view {\n\t\t\t\t& > .ck-label {\n\t\t\t\t\tfont-size: var(--ck-font-size-tiny);\n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t& .ck-table-form__border-style,\n\t\t\t& .ck-table-form__border-width {\n\t\t\t\twidth: 80px;\n\t\t\t\tmin-width: 80px;\n\t\t\t\tmax-width: 80px;\n\t\t\t}\n\t\t}\n\n\t\t&.ck-table-form__dimensions-row {\n\t\t\tpadding: 0;\n\n\t\t\t& .ck-table-form__dimensions-row__width,\n\t\t\t& .ck-table-form__dimensions-row__height {\n\t\t\t\tmargin: 0\n\t\t\t}\n\n\t\t\t& .ck-table-form__dimension-operator {\n\t\t\t\talign-self: flex-end;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\theight: var(--ck-ui-component-min-height);\n\t\t\t\tline-height: var(--ck-ui-component-min-height);\n\t\t\t\tmargin: 0 var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-labeled-field-view {\n\t\tpadding-top: var(--ck-spacing-standard);\n\n\t\t& .ck.ck-labeled-field-view__status {\n\t\t\t@mixin ck-rounded-corners;\n\n\t\t\tbackground: var(--ck-color-base-error);\n\t\t\tcolor: var(--ck-color-base-background);\n\t\t\tpadding: var(--ck-spacing-small) var(--ck-spacing-medium);\n\t\t\tmin-width: var(--ck-table-properties-min-error-width);\n\t\t\ttext-align: center;\n\n\t\t\t/* The arrow pointing towards the field. */\n\t\t\t&::after {\n\t\t\t\tborder-color: transparent transparent var(--ck-color-base-error) transparent;\n\t\t\t\tborder-width: 0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size);\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\n\t\t\tanimation: ck-table-form-labeled-view-status-appear .15s ease both;\n\t\t}\n\n\t\t/* Hide the error balloon when the field is blurred. Makes the experience much more clear. */\n\t\t& .ck-input.ck-error:not(:focus) + .ck.ck-labeled-field-view__status {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n@keyframes ck-table-form-labeled-view-status-appear {\n\t0% {\n\t\topacity: 0;\n\t}\n\n\t100% {\n\t\topacity: 1;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},7341:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{flex-wrap:wrap;flex-basis:0;align-content:baseline}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-self:flex-end;padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/tableproperties.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableproperties.css"],names:[],mappings:"AAOE,mFACC,cAAe,CACf,YAAa,CACb,sBAKD,CAHC,qHACC,gBACD,CCTH,6BACC,WAmBD,CAhBE,mFACC,mBAAoB,CACpB,SAYD,CAVC,kGACC,eAAgB,CAGhB,qCAKD,CAHC,uHACC,UACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-properties-form {\n\t& .ck-form__row {\n\t\t&.ck-table-properties-form__alignment-row {\n\t\t\tflex-wrap: wrap;\n\t\t\tflex-basis: 0;\n\t\t\talign-content: baseline;\n\n\t\t\t& .ck.ck-toolbar .ck-toolbar__items {\n\t\t\t\tflex-wrap: nowrap;\n\t\t\t}\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-properties-form {\n\twidth: 320px;\n\n\t& .ck-form__row {\n\t\t&.ck-table-properties-form__alignment-row {\n\t\t\talign-self: flex-end;\n\t\t\tpadding: 0;\n\n\t\t\t& .ck.ck-toolbar {\n\t\t\t\tbackground: none;\n\n\t\t\t\t/* Compensate for missing input label that would push the margin (toolbar has no inputs). */\n\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\n\t\t\t\t& .ck-toolbar__items > * {\n\t\t\t\t\twidth: 40px;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},6945:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,':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,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}',"",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableselection.css"],names:[],mappings:"AAKA,MACC,yDACD,CAGC,0IAEC,iBAAkB,CAClB,uBAAwB,CACxB,aAAc,CACd,gBA8BD,CA3BC,sJACC,UAAW,CACX,mBAAoB,CACpB,yDAA0D,CAC1D,iBAAkB,CAClB,KAAM,CACN,MAAO,CACP,OAAQ,CACR,QACD,CAEA,wTAEC,4BACD,CAMA,gKACC,aAKD,CAHC,0NACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-table-selected-cell-background: hsla(208, 90%, 80%, .3);\n}\n\n.ck.ck-editor__editable .table table {\n\t& td.ck-editor__editable_selected,\n\t& th.ck-editor__editable_selected {\n\t\tposition: relative;\n\t\tcaret-color: transparent;\n\t\toutline: unset;\n\t\tbox-shadow: unset;\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/6446 */\n\t\t&:after {\n\t\t\tcontent: '';\n\t\t\tpointer-events: none;\n\t\t\tbackground-color: var(--ck-table-selected-cell-background);\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tbottom: 0;\n\t\t}\n\n\t\t& ::selection,\n\t\t&:focus {\n\t\t\tbackground-color: transparent;\n\t\t}\n\n\t\t/*\n\t\t * To reduce the amount of noise, all widgets in the table selection have no outline and no selection handle.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9491.\n\t\t */\n\t\t& .ck-widget {\n\t\t\toutline: unset;\n\n\t\t\t& > .ck-widget__selection-handle {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},4906:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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(var(--ck-spacing-small)*-1);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(var(--ck-spacing-small)*-1);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}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/button/button.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/button.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/mixins/_button.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AAQA,6BCCC,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBD6BD,CE/BC,qDACC,aAqBD,CAHC,oBAnBD,qDAoBE,YAEF,CADC,CFvBF,6BAKC,iBAAkB,CAClB,mBAAoB,CACpB,kBAAmB,CACnB,oBAyBD,CAvBC,iEACC,YACD,CAGC,yGACC,oBACD,CAID,iFACC,sBACD,CEkBA,iEACC,kBAAmB,CACnB,SACD,CAbA,yFACC,YACD,CC7BD,6BCAC,oDD0ID,CCvIE,6EACC,0DACD,CAEA,+EACC,2DAA4C,CAC5C,uEACD,CAID,qDACC,6DACD,CDhBD,6BEDC,eF2ID,CA1IA,wIEGE,qCFuIF,CA1IA,6BAKC,kBAAmB,CACnB,cAAe,CACf,qBAAsB,CACtB,8BAA+B,CAC/B,iBAAkB,CAGlB,2CAA4C,CAC5C,4CAA6C,CAI7C,aAAc,CAGd,iBAAkB,CAGlB,4BAA6B,CAG7B,4DAA8D,CAG9D,uBA6GD,CA3GC,oFGjCA,YAAa,CACb,2BAA2B,CCF3B,2CJsCA,CAIC,kJAEC,aACD,CAGD,iEAEC,iBAAkB,CAClB,mBAAoB,CACpB,aAAc,CACd,cAAe,CAIf,qBASD,CAlBA,qFAYE,eAMF,CAlBA,qFAgBE,gBAEF,CAEA,yEACC,aAYD,CAbA,6FAIE,mCASF,CAbA,6FAQE,oCAKF,CAbA,yEAWC,eAAiB,CACjB,UACD,CAIC,oIIrFD,oDJyFC,CAEA,uFK3FD,kCL6FC,CAGA,yFKhGD,kCLkGC,CAEA,iGACC,UACD,CAGD,qEACC,yDAcD,CAXC,2HAEE,4CAA+C,CAC/C,oCAOF,CAVA,2HAOE,6CAAgD,CAChD,mCAEF,CAKA,mHACC,WACD,CAID,yCC/HA,+CDiIA,CC9HC,yFACC,qDACD,CAEA,2FACC,sDAA4C,CAC5C,kEACD,CAID,iEACC,wDACD,CDmHA,2DACC,iCACD,CAEA,+DACC,mCACD,CAID,2CC7IC,mDDkJD,CC/IE,2FACC,yDACD,CAEA,6FACC,0DAA4C,CAC5C,sEACD,CAID,mEACC,4DACD,CD6HD,2CAIC,wCACD,CAEA,uCAEC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n@import "../tooltip/mixins/_tooltip.css";\n\n.ck.ck-button,\na.ck.ck-button {\n\t@mixin ck-unselectable;\n\t@mixin ck-tooltip_enabled;\n\n\tposition: relative;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: left;\n\n\t& .ck-button__label {\n\t\tdisplay: none;\n\t}\n\n\t&.ck-button_with-text {\n\t\t& .ck-button__label {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t}\n\n\t/* Center the icon horizontally in a button without text. */\n\t&:not(.ck-button_with-text) {\n\t\tjustify-content: center;\n\t}\n\n\t&:hover {\n\t\t@mixin ck-tooltip_visible;\n\t}\n\n\t/* Get rid of the native focus outline around the tooltip when focused (but not :hover). */\n\t&:focus:not(:hover) {\n\t\t@mixin ck-tooltip_disabled;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Enables the tooltip, which is the tooltip is in DOM but\n * not yet displayed.\n */\n@define-mixin ck-tooltip_enabled {\n\t& .ck-tooltip {\n\t\tdisplay: block;\n\n\t\t/*\n\t\t * Don't display tooltips in devices which don't support :hover.\n\t\t * In fact, it's all about iOS, which forces user to click UI elements twice to execute\n\t\t * the primary action, when tooltips are enabled.\n\t\t *\n\t\t * Q: OK, but why not the following query?\n\t\t *\n\t\t * @media (hover) {\n\t\t * display: block;\n\t\t * }\n\t\t *\n\t\t * A: Because FF does not support it and it would completely disable tooltips\n\t\t * in that browser.\n\t\t *\n\t\t * More in https://github.com/ckeditor/ckeditor5/issues/920.\n\t\t */\n\t\t@media (hover:none) {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n/**\n * Disables the tooltip making it disappear from DOM.\n */\n@define-mixin ck-tooltip_disabled {\n\t& .ck-tooltip {\n\t\tdisplay: none;\n\t}\n}\n\n/**\n * Shows the tooltip, which is already in DOM.\n * Requires `ck-tooltip_enabled` first.\n */\n@define-mixin ck-tooltip_visible {\n\t& .ck-tooltip {\n\t\tvisibility: visible;\n\t\topacity: 1;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_focus.css";\n@import "../../../mixins/_shadow.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_rounded.css";\n@import "../../mixins/_button.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-button,\na.ck.ck-button {\n\t@mixin ck-button-colors --ck-color-button-default;\n\t@mixin ck-rounded-corners;\n\n\twhite-space: nowrap;\n\tcursor: default;\n\tvertical-align: middle;\n\tpadding: var(--ck-spacing-tiny);\n\ttext-align: center;\n\n\t/* A very important piece of styling. Go to variable declaration to learn more. */\n\tmin-width: var(--ck-ui-component-min-height);\n\tmin-height: var(--ck-ui-component-min-height);\n\n\t/* Normalize the height of the line. Removing this will break consistent height\n\tamong text and text-less buttons (with icons). */\n\tline-height: 1;\n\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t/* Avoid flickering when the foucs border shows up. */\n\tborder: 1px solid transparent;\n\n\t/* Apply some smooth transition to the box-shadow and border. */\n\ttransition: box-shadow .2s ease-in-out, border .2s ease-in-out;\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/189 */\n\t-webkit-appearance: none;\n\n\t&:active,\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t}\n\n\t/* Allow icon coloring using the text "color" property. */\n\t& .ck-button__icon {\n\t\t& use,\n\t\t& use * {\n\t\t\tcolor: inherit;\n\t\t}\n\t}\n\n\t& .ck-button__label {\n\t\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\t\tfont-size: inherit;\n\t\tfont-weight: inherit;\n\t\tcolor: inherit;\n\t\tcursor: inherit;\n\n\t\t/* Must be consistent with .ck-icon\'s vertical align. Otherwise, buttons with and\n\t\twithout labels (but with icons) have different sizes in Chrome */\n\t\tvertical-align: middle;\n\n\t\t@mixin ck-dir ltr {\n\t\t\ttext-align: left;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\ttext-align: right;\n\t\t}\n\t}\n\n\t& .ck-button__keystroke {\n\t\tcolor: inherit;\n\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-left: var(--ck-spacing-large);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-right: var(--ck-spacing-large);\n\t\t}\n\n\t\tfont-weight: bold;\n\t\topacity: .7;\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */\n\t&.ck-disabled {\n\t\t&:active,\n\t\t&:focus {\n\t\t\t/* The disabled button should have a slightly less visible shadow when focused. */\n\t\t\t@mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow);\n\t\t}\n\n\t\t& .ck-button__icon {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */\n\t\t& .ck-button__label {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t& .ck-button__keystroke {\n\t\t\topacity: .3;\n\t\t}\n\t}\n\n\t&.ck-button_with-text {\n\t\tpadding: var(--ck-spacing-tiny) var(--ck-spacing-standard);\n\n\t\t/* stylelint-disable-next-line no-descending-specificity */\n\t\t& .ck-button__icon {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: calc(-1 * var(--ck-spacing-small));\n\t\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: calc(-1 * var(--ck-spacing-small));\n\t\t\t\tmargin-left: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\t}\n\n\t&.ck-button_with-keystroke {\n\t\t/* stylelint-disable-next-line no-descending-specificity */\n\t\t& .ck-button__label {\n\t\t\tflex-grow: 1;\n\t\t}\n\t}\n\n\t/* A style of the button which is currently on, e.g. its feature is active. */\n\t&.ck-on {\n\t\t@mixin ck-button-colors --ck-color-button-on;\n\t}\n\n\t&.ck-button-save {\n\t\tcolor: var(--ck-color-button-save);\n\t}\n\n\t&.ck-button-cancel {\n\t\tcolor: var(--ck-color-button-cancel);\n\t}\n}\n\n/* A style of the button which handles the primary action. */\n.ck.ck-button-action,\na.ck.ck-button-action {\n\t@mixin ck-button-colors --ck-color-button-action;\n\n\tcolor: var(--ck-color-button-action-text);\n}\n\n.ck.ck-button-bold,\na.ck.ck-button-bold {\n\tfont-weight: bold;\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements a button of given background color.\n *\n * @param {String} $background - Background color of the button.\n * @param {String} $border - Border color of the button.\n */\n@define-mixin ck-button-colors $prefix {\n\tbackground: var($(prefix)-background);\n\n\t&:not(.ck-disabled) {\n\t\t&:hover {\n\t\t\tbackground: var($(prefix)-hover-background);\n\t\t}\n\n\t\t&:active {\n\t\t\tbackground: var($(prefix)-active-background);\n\t\t\tbox-shadow: inset 0 2px 2px var($(prefix)-active-shadow);\n\t\t}\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */\n\t&.ck-disabled {\n\t\tbackground: var($(prefix)-disabled-background);\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n"],sourceRoot:""}]);const a=s},5332:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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) - var(--ck-switch-button-toggle-spacing)*2)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.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(var(--ck-border-radius)*0.5)}.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(var(--ck-switch-button-translation)*-1))}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/button/switchbutton.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/switchbutton.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AASE,4HACC,aACD,CCCF,MAEC,8CAA+C,CAE/C,mDAAoD,CACpD,qCAAsC,CACtC,gKAKD,CAGC,0DAGE,4CAOF,CAVA,0DAQE,2CAEF,CAEA,iDC3BA,eDoEA,CAzCA,yICvBC,qCDgED,CAzCA,2DAKE,gBAoCF,CAzCA,2DAUE,iBA+BF,CAzCA,iDAcC,8BAAiC,CAEjC,0CAA2C,CAC3C,uDAwBD,CAtBC,2EC9CD,eD2DC,CAbA,6LC1CA,qCAAsC,CD4CpC,+CAWF,CAbA,2EAMC,6CAA8C,CAC9C,+CAAgD,CAChD,gDAAiD,CACjD,yDAA0D,CAG1D,uBACD,CAEA,uDACC,6DAKD,CAHC,iFACC,+DACD,CAIF,6DExEA,kCF0EA,CAEA,uDACC,sDAkBD,CAhBC,6DACC,4DACD,CAEA,2FAKE,yDAMF,CAXA,2FASE,kEAEF",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-button.ck-switchbutton {\n\t& .ck-button__toggle {\n\t\tdisplay: block;\n\n\t\t& .ck-button__toggle__inner {\n\t\t\tdisplay: block;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n/* Note: To avoid rendering issues (aliasing) but to preserve the responsive nature\nof the component, floating–point numbers have been used which, for the default font size\n(see: --ck-font-size-base), will generate simple integers. */\n:root {\n\t/* 34px at 13px font-size */\n\t--ck-switch-button-toggle-width: 2.6153846154em;\n\t/* 14px at 13px font-size */\n\t--ck-switch-button-toggle-inner-size: 1.0769230769em;\n\t--ck-switch-button-toggle-spacing: 1px;\n\t--ck-switch-button-translation: calc(\n\t\tvar(--ck-switch-button-toggle-width) -\n\t\tvar(--ck-switch-button-toggle-inner-size) -\n\t\t2 * var(--ck-switch-button-toggle-spacing)\n\t);\n}\n\n.ck.ck-button.ck-switchbutton {\n\t& .ck-button__label {\n\t\t@mixin ck-dir ltr {\n\t\t\t/* Separate the label from the switch */\n\t\t\tmargin-right: calc(2 * var(--ck-spacing-large));\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t/* Separate the label from the switch */\n\t\t\tmargin-left: calc(2 * var(--ck-spacing-large));\n\t\t}\n\t}\n\n\t& .ck-button__toggle {\n\t\t@mixin ck-rounded-corners;\n\n\t\t@mixin ck-dir ltr {\n\t\t\t/* Make sure the toggle is always to the right as far as possible. */\n\t\t\tmargin-left: auto;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t/* Make sure the toggle is always to the left as far as possible. */\n\t\t\tmargin-right: auto;\n\t\t}\n\n\t\t/* Gently animate the background color of the toggle switch */\n\t\ttransition: background 400ms ease;\n\n\t\twidth: var(--ck-switch-button-toggle-width);\n\t\tbackground: var(--ck-color-switch-button-off-background);\n\n\t\t& .ck-button__toggle__inner {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-radius: calc(.5 * var(--ck-border-radius));\n\t\t\t}\n\n\t\t\t/* Leave some tiny bit of space around the inner part of the switch */\n\t\t\tmargin: var(--ck-switch-button-toggle-spacing);\n\t\t\twidth: var(--ck-switch-button-toggle-inner-size);\n\t\t\theight: var(--ck-switch-button-toggle-inner-size);\n\t\t\tbackground: var(--ck-color-switch-button-inner-background);\n\n\t\t\t/* Gently animate the inner part of the toggle switch */\n\t\t\ttransition: all 300ms ease;\n\t\t}\n\n\t\t&:hover {\n\t\t\tbackground: var(--ck-color-switch-button-off-hover-background);\n\n\t\t\t& .ck-button__toggle__inner {\n\t\t\t\tbox-shadow: 0 0 0 5px var(--ck-color-switch-button-inner-shadow);\n\t\t\t}\n\t\t}\n\t}\n\n\t&.ck-disabled .ck-button__toggle {\n\t\t@mixin ck-disabled;\n\t}\n\n\t&.ck-on .ck-button__toggle {\n\t\tbackground: var(--ck-color-switch-button-on-background);\n\n\t\t&:hover {\n\t\t\tbackground: var(--ck-color-switch-button-on-hover-background);\n\t\t}\n\n\t\t& .ck-button__toggle__inner {\n\t\t\t/*\n\t\t\t * Move the toggle switch to the right. It will be animated.\n\t\t\t */\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\ttransform: translateX( var( --ck-switch-button-translation ) );\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\ttransform: translateX( calc( -1 * var( --ck-switch-button-translation ) ) );\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n"],sourceRoot:""}]);const a=s},6781:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/colorgrid/colorgrid.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/colorgrid/colorgrid.css"],names:[],mappings:"AAKA,kBACC,YACD,CCAA,MACC,8BAA+B,CAK/B,qCACD,CAEA,kBACC,YAAa,CACb,WACD,CAEA,wBACC,oCAAqC,CACrC,qCAAsC,CACtC,wCAAyC,CACzC,yCAA0C,CAC1C,SAAU,CACV,8BAA+B,CAC/B,QAmCD,CAjCC,oCACC,YAAa,CACb,gBACD,CAEA,4DACC,gDACD,CAEA,oCACC,YAAa,CACb,2CACD,CAEA,8BACC,8FAKD,CAHC,0CACC,aACD,CAGD,8HAIC,QACD,CAEA,gGAEC,iGACD,CAGD,yBACC,oCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-color-grid {\n\tdisplay: grid;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-color-grid-tile-size: 24px;\n\n\t/* Not using global colors here because these may change but some colors in a pallette\n\t * require special treatment. For instance, this ensures no matter what the UI text color is,\n\t * the check icon will look good on the black color tile. */\n\t--ck-color-color-grid-check-icon: hsl(0, 0%, 0%);\n}\n\n.ck.ck-color-grid {\n\tgrid-gap: 5px;\n\tpadding: 8px;\n}\n\n.ck.ck-color-grid__tile {\n\twidth: var(--ck-color-grid-tile-size);\n\theight: var(--ck-color-grid-tile-size);\n\tmin-width: var(--ck-color-grid-tile-size);\n\tmin-height: var(--ck-color-grid-tile-size);\n\tpadding: 0;\n\ttransition: .2s ease box-shadow;\n\tborder: 0;\n\n\t&.ck-disabled {\n\t\tcursor: unset;\n\t\ttransition: unset;\n\t}\n\n\t&.ck-color-table__color-tile_bordered {\n\t\tbox-shadow: 0 0 0 1px var(--ck-color-base-border);\n\t}\n\n\t& .ck.ck-icon {\n\t\tdisplay: none;\n\t\tcolor: var(--ck-color-color-grid-check-icon);\n\t}\n\n\t&.ck-on {\n\t\tbox-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-base-text);\n\n\t\t& .ck.ck-icon {\n\t\t\tdisplay: block;\n\t\t}\n\t}\n\n\t&.ck-on,\n\t&:focus:not( .ck-disabled ),\n\t&:hover:not( .ck-disabled ) {\n\t\t/* Disable the default .ck-button\'s border ring. */\n\t\tborder: 0;\n\t}\n\n\t&:focus:not( .ck-disabled ),\n\t&:hover:not( .ck-disabled ) {\n\t\tbox-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-focus-border);\n\t}\n}\n\n.ck.ck-color-grid__label {\n\tpadding: 0 var(--ck-spacing-standard);\n}\n'],sourceRoot:""}]);const a=s},5485:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-dropdown-max-width:75vw}.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);max-width:var(--ck-dropdown-max-width);position:absolute}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.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-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.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 .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.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}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dropdown/dropdown.css","webpack://./../ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/dropdown.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,MACC,4BACD,CAEA,gBACC,oBAAqB,CACrB,iBAqFD,CAnFC,oCACC,mBAAoB,CACpB,2BACD,CAGA,+CACC,UAOD,CCUA,iEACC,YACD,CDVA,oCAGC,kCAAmC,CAEnC,YAAa,CACb,yBAA0B,CAC1B,sCAAuC,CAEvC,iBAyDD,CAvDC,+DACC,oBACD,CAEA,mSAKC,WACD,CAEA,mSASC,QAAS,CACT,WACD,CAEA,oHAEC,MACD,CAEA,oHAEC,OACD,CAEA,kHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAQF,mCACC,mCACD,CEhGA,MACC,sDACD,CAEA,gBAEC,iBA2ED,CAzEC,oCACC,mCACD,CAGC,8CACC,gCAAiC,CAGjC,sCACD,CAIA,8CACC,+BAAgC,CAGhC,oCACD,CAGD,gDC/BA,kCDiCA,CAIE,mFAEC,oCACD,CAIA,mFAEC,qCACD,CAID,iEACC,SAAU,CACV,eAAgB,CAChB,sBACD,CAGA,6EC1DD,kCD4DC,CAGA,qDACC,2BAA4B,CAC5B,4BACD,CAEA,sGACC,UACD,CAGA,yHAEC,eAKD,CAHC,qIE7EF,2CF+EE,CAKH,uBGlFC,eH8GD,CA5BA,qFG9EE,qCH0GF,CA5BA,uBEpFC,oCAA8B,CFwF9B,oDAAqD,CACrD,sDAAuD,CACvD,QAAS,CAGT,cAmBD,CAfC,6CACC,wBACD,CAEA,6CACC,yBACD,CAEA,6CACC,2BACD,CAEA,6CACC,4BACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import \"../tooltip/mixins/_tooltip.css\";\n\n:root {\n\t--ck-dropdown-max-width: 75vw;\n}\n\n.ck.ck-dropdown {\n\tdisplay: inline-block;\n\tposition: relative;\n\n\t& .ck-dropdown__arrow {\n\t\tpointer-events: none;\n\t\tz-index: var(--ck-z-default);\n\t}\n\n\t/* Dropdown button should span horizontally, e.g. in vertical toolbars */\n\t& .ck-button.ck-dropdown__button {\n\t\twidth: 100%;\n\n\t\t/* Disable main button's tooltip when the dropdown is open. Otherwise the panel may\n\t\tpartially cover the tooltip */\n\t\t&.ck-on {\n\t\t\t@mixin ck-tooltip_disabled;\n\t\t}\n\t}\n\n\t& .ck-dropdown__panel {\n\t\t/* This is to get rid of flickering when the tooltip is shown under the panel,\n\t\twhich looks like the panel moves vertically a pixel down and up. */\n\t\t-webkit-backface-visibility: hidden;\n\n\t\tdisplay: none;\n\t\tz-index: var(--ck-z-modal);\n\t\tmax-width: var(--ck-dropdown-max-width);\n\n\t\tposition: absolute;\n\n\t\t&.ck-dropdown__panel-visible {\n\t\t\tdisplay: inline-block;\n\t\t}\n\n\t\t&.ck-dropdown__panel_ne,\n\t\t&.ck-dropdown__panel_nw,\n\t\t&.ck-dropdown__panel_n,\n\t\t&.ck-dropdown__panel_nmw,\n\t\t&.ck-dropdown__panel_nme {\n\t\t\tbottom: 100%;\n\t\t}\n\n\t\t&.ck-dropdown__panel_se,\n\t\t&.ck-dropdown__panel_sw,\n\t\t&.ck-dropdown__panel_smw,\n\t\t&.ck-dropdown__panel_sme,\n\t\t&.ck-dropdown__panel_s {\n\t\t\t/*\n\t\t\t * Using transform: translate3d( 0, 100%, 0 ) causes blurry dropdown on Chrome 67-78+ on non-retina displays.\n\t\t\t * See https://github.com/ckeditor/ckeditor5/issues/1053.\n\t\t\t */\n\t\t\ttop: 100%;\n\t\t\tbottom: auto;\n\t\t}\n\n\t\t&.ck-dropdown__panel_ne,\n\t\t&.ck-dropdown__panel_se {\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t&.ck-dropdown__panel_nw,\n\t\t&.ck-dropdown__panel_sw {\n\t\t\tright: 0px;\n\t\t}\n\n\t\t&.ck-dropdown__panel_s,\n\t\t&.ck-dropdown__panel_n {\n\t\t\t/* Positioning panels relative to the center of the button */\n\t\t\tleft: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t}\n\n\t\t&.ck-dropdown__panel_nmw,\n\t\t&.ck-dropdown__panel_smw {\n\t\t\t/* Positioning panels relative to the middle-west of the button */\n\t\t\tleft: 75%;\n\t\t\ttransform: translateX(-75%);\n\t\t}\n\n\t\t&.ck-dropdown__panel_nme,\n\t\t&.ck-dropdown__panel_sme {\n\t\t\t/* Positioning panels relative to the middle-east of the button */\n\t\t\tleft: 25%;\n\t\t\ttransform: translateX(-25%);\n\t\t}\n\t}\n}\n\n/*\n * Toolbar dropdown panels should be always above the UI (eg. other dropdown panels) from the editor's content.\n * See https://github.com/ckeditor/ckeditor5/issues/7874\n */\n.ck.ck-toolbar .ck-dropdown__panel {\n\tz-index: calc( var(--ck-z-modal) + 1 );\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Enables the tooltip, which is the tooltip is in DOM but\n * not yet displayed.\n */\n@define-mixin ck-tooltip_enabled {\n\t& .ck-tooltip {\n\t\tdisplay: block;\n\n\t\t/*\n\t\t * Don't display tooltips in devices which don't support :hover.\n\t\t * In fact, it's all about iOS, which forces user to click UI elements twice to execute\n\t\t * the primary action, when tooltips are enabled.\n\t\t *\n\t\t * Q: OK, but why not the following query?\n\t\t *\n\t\t * @media (hover) {\n\t\t * display: block;\n\t\t * }\n\t\t *\n\t\t * A: Because FF does not support it and it would completely disable tooltips\n\t\t * in that browser.\n\t\t *\n\t\t * More in https://github.com/ckeditor/ckeditor5/issues/920.\n\t\t */\n\t\t@media (hover:none) {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n/**\n * Disables the tooltip making it disappear from DOM.\n */\n@define-mixin ck-tooltip_disabled {\n\t& .ck-tooltip {\n\t\tdisplay: none;\n\t}\n}\n\n/**\n * Shows the tooltip, which is already in DOM.\n * Requires `ck-tooltip_enabled` first.\n */\n@define-mixin ck-tooltip_visible {\n\t& .ck-tooltip {\n\t\tvisibility: visible;\n\t\topacity: 1;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n:root {\n\t--ck-dropdown-arrow-size: calc(0.5 * var(--ck-icon-size));\n}\n\n.ck.ck-dropdown {\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t& .ck-dropdown__arrow {\n\t\twidth: var(--ck-dropdown-arrow-size);\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& .ck-dropdown__arrow {\n\t\t\tright: var(--ck-spacing-standard);\n\n\t\t\t/* A space to accommodate the triangle. */\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& .ck-dropdown__arrow {\n\t\t\tleft: var(--ck-spacing-standard);\n\n\t\t\t/* A space to accommodate the triangle. */\n\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t}\n\t}\n\n\t&.ck-disabled .ck-dropdown__arrow {\n\t\t@mixin ck-disabled;\n\t}\n\n\t& .ck-button.ck-dropdown__button {\n\t\t@mixin ck-dir ltr {\n\t\t\t&:not(.ck-button_with-text) {\n\t\t\t\t/* Make sure dropdowns with just an icon have the right inner spacing */\n\t\t\t\tpadding-left: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t&:not(.ck-button_with-text) {\n\t\t\t\t/* Make sure dropdowns with just an icon have the right inner spacing */\n\t\t\t\tpadding-right: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\n\t\t/* #23 */\n\t\t& .ck-button__label {\n\t\t\twidth: 7em;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */\n\t\t&.ck-disabled .ck-button__label {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/816 */\n\t\t&.ck-on {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t&.ck-dropdown__button_label-width_auto .ck-button__label {\n\t\t\twidth: auto;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/8699 */\n\t\t&.ck-off:active,\n\t\t&.ck-on:active {\n\t\t\tbox-shadow: none;\n\t\t\t\n\t\t\t&:focus {\n\t\t\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck.ck-dropdown__panel {\n\t@mixin ck-rounded-corners;\n\t@mixin ck-drop-shadow;\n\n\tbackground: var(--ck-color-dropdown-panel-background);\n\tborder: 1px solid var(--ck-color-dropdown-panel-border);\n\tbottom: 0;\n\n\t/* Make sure the panel is at least as wide as the drop-down\'s button. */\n\tmin-width: 100%;\n\n\t/* Disabled corner border radius to be consistent with the .dropdown__button\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t&.ck-dropdown__panel_se {\n\t\tborder-top-left-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_sw {\n\t\tborder-top-right-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_ne {\n\t\tborder-bottom-left-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_nw {\n\t\tborder-bottom-right-radius: 0;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},3949:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/listdropdown.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,6CCIC,eDqBD,CAzBA,iICQE,qCAAsC,CDJtC,wBAqBF,CAfE,mFCND,eDYC,CANA,6MCFA,qCAAsC,CDIpC,wBAAyB,CACzB,2BAA4B,CAC5B,4BAEF,CAEA,kFCdD,eDmBC,CALA,2MCVA,qCAAsC,CDYpC,wBAAyB,CACzB,yBAEF",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n.ck.ck-dropdown .ck-dropdown__panel .ck-list {\n\t/* Disabled radius of top-left border to be consistent with .dropdown__button\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t@mixin ck-rounded-corners {\n\t\tborder-top-left-radius: 0;\n\t}\n\n\t/* Make sure the button belonging to the first/last child of the list goes well with the\n\tborder radius of the entire panel. */\n\t& .ck-list__item {\n\t\t&:first-child .ck-button {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t}\n\t\t}\n\n\t\t&:last-child .ck-button {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-top-right-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},7686:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,'.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_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-top-right-radius:unset;border-bottom-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.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-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)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{content:"";position:absolute;width:1px;height:100%;background-color:var(--ck-color-split-button-hover-border)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.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}',"",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dropdown/splitbutton.css","webpack://./../ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/splitbutton.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,mBAEC,iBAUD,CARC,iDACC,qCACD,CC0BA,8DACC,YACD,CClCD,MACC,gDAAyD,CACzD,4CACD,CAMC,oIAIE,6BAA8B,CAC9B,gCAQF,CAbA,oIAUE,4BAA6B,CAC7B,+BAEF,CAEA,0CAGC,eAiBD,CApBA,oDAOE,4BAA6B,CAC7B,+BAYF,CApBA,oDAaE,6BAA8B,CAC9B,gCAMF,CAHC,8CACC,mCACD,CASA,0KACC,wDACD,CAIA,8JACC,UAAW,CACX,iBAAkB,CAClB,SAAU,CACV,WAAY,CACZ,0DACD,CAGC,kLACC,SACD,CAIA,kLACC,UACD,CAMF,uCC7EA,eDuFA,CAVA,qHCzEC,qCDmFD,CARE,qKACC,2BACD,CAEA,mKACC,4BACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../tooltip/mixins/_tooltip.css";\n\n.ck.ck-splitbutton {\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t& .ck-splitbutton__action:focus {\n\t\tz-index: calc(var(--ck-z-default) + 1);\n\t}\n\n\t/* Disable tooltips for the buttons when the button is "open" */\n\t&.ck-splitbutton_open > .ck-button {\n\t\t@mixin ck-tooltip_disabled;\n\t}\n}\n\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Enables the tooltip, which is the tooltip is in DOM but\n * not yet displayed.\n */\n@define-mixin ck-tooltip_enabled {\n\t& .ck-tooltip {\n\t\tdisplay: block;\n\n\t\t/*\n\t\t * Don't display tooltips in devices which don't support :hover.\n\t\t * In fact, it's all about iOS, which forces user to click UI elements twice to execute\n\t\t * the primary action, when tooltips are enabled.\n\t\t *\n\t\t * Q: OK, but why not the following query?\n\t\t *\n\t\t * @media (hover) {\n\t\t * display: block;\n\t\t * }\n\t\t *\n\t\t * A: Because FF does not support it and it would completely disable tooltips\n\t\t * in that browser.\n\t\t *\n\t\t * More in https://github.com/ckeditor/ckeditor5/issues/920.\n\t\t */\n\t\t@media (hover:none) {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n/**\n * Disables the tooltip making it disappear from DOM.\n */\n@define-mixin ck-tooltip_disabled {\n\t& .ck-tooltip {\n\t\tdisplay: none;\n\t}\n}\n\n/**\n * Shows the tooltip, which is already in DOM.\n * Requires `ck-tooltip_enabled` first.\n */\n@define-mixin ck-tooltip_visible {\n\t& .ck-tooltip {\n\t\tvisibility: visible;\n\t\topacity: 1;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-color-split-button-hover-background: hsl(0, 0%, 92%);\n\t--ck-color-split-button-hover-border: hsl(0, 0%, 70%);\n}\n\n.ck.ck-splitbutton {\n\t/*\n\t * Note: ck-rounded and ck-dir mixins don\'t go together (because they both use @nest).\n\t */\n\t&:hover > .ck-splitbutton__action,\n\t&.ck-splitbutton_open > .ck-splitbutton__action {\n\t\t@nest [dir="ltr"] & {\n\t\t\t/* Don\'t round the action button on the right side */\n\t\t\tborder-top-right-radius: unset;\n\t\t\tborder-bottom-right-radius: unset;\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t/* Don\'t round the action button on the left side */\n\t\t\tborder-top-left-radius: unset;\n\t\t\tborder-bottom-left-radius: unset;\n\t\t}\n\t}\n\n\t& > .ck-splitbutton__arrow {\n\t\t/* It\'s a text-less button and since the icon is positioned absolutely in such situation,\n\t\tit must get some arbitrary min-width. */\n\t\tmin-width: unset;\n\n\t\t@nest [dir="ltr"] & {\n\t\t\t/* Don\'t round the arrow button on the left side */\n\t\t\tborder-top-left-radius: unset;\n\t\t\tborder-bottom-left-radius: unset;\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t/* Don\'t round the arrow button on the right side */\n\t\t\tborder-top-right-radius: unset;\n\t\t\tborder-bottom-right-radius: unset;\n\t\t}\n\n\t\t& svg {\n\t\t\twidth: var(--ck-dropdown-arrow-size);\n\t\t}\n\t}\n\n\t/* When the split button is "open" (the arrow is on) or being hovered, it should get some styling\n\tas a whole. The background of both buttons should stand out and there should be a visual\n\tseparation between both buttons. */\n\t&.ck-splitbutton_open,\n\t&:hover {\n\t\t/* When the split button hovered as a whole, not as individual buttons. */\n\t\t& > .ck-button:not(.ck-on):not(.ck-disabled):not(:hover) {\n\t\t\tbackground: var(--ck-color-split-button-hover-background);\n\t\t}\n\n\t\t/* Splitbutton separator needs to be set with the ::after pseudoselector\n\t\tto display properly the borders on focus */\n\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\tcontent: \'\';\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t\theight: 100%;\n\t\t\tbackground-color: var(--ck-color-split-button-hover-border);\n\t\t}\n\n\t\t@nest [dir="ltr"] & {\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\t\tleft: -1px;\n\t\t\t}\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\t\tright: -1px;\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Don\'t round the bottom left and right corners of the buttons when "open"\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t&.ck-splitbutton_open {\n\t\t@mixin ck-rounded-corners {\n\t\t\t& > .ck-splitbutton__action {\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t}\n\n\t\t\t& > .ck-splitbutton__arrow {\n\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},7339:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{width:max-content;max-width:var(--ck-toolbar-dropdown-max-width)}.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}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dropdown/toolbardropdown.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/toolbardropdown.css"],names:[],mappings:"AAKA,MACC,oCACD,CAEA,4CAEC,iBAAkB,CAClB,8CAOD,CAJE,6DACC,qCACD,CCZF,oCACC,QACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-toolbar-dropdown-max-width: 60vw;\n}\n\n.ck.ck-toolbar-dropdown > .ck-dropdown__panel {\n\t/* https://github.com/ckeditor/ckeditor5/issues/5586 */\n\twidth: max-content;\n\tmax-width: var(--ck-toolbar-dropdown-max-width);\n\n\t& .ck-button {\n\t\t&:focus {\n\t\t\tz-index: calc(var(--ck-z-default) + 1);\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-toolbar-dropdown .ck-toolbar {\n\tborder: 0;\n}\n"],sourceRoot:""}]);const a=s},9688:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-focused{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0}.ck.ck-editor__editable_inline{overflow:auto;padding:0 var(--ck-spacing-standard);border:1px solid transparent}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>: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)}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/editorui/editorui.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAWA,MACC,0CACD,CAEA,yDCJC,eDWD,CAPA,yJCAE,qCDOF,CAJC,oEERA,YAAa,CACb,2BAA2B,CCF3B,qCHYA,CAGD,+BACC,aAAc,CACd,oCAAqC,CACrC,4BA4BD,CA1BC,wCACC,eACD,CAEA,wCACC,gBACD,CAGA,4CACC,kCACD,CAGA,2CAKC,qCACD,CAGA,sDACC,kDACD,CAKA,gEACC,mDACD,CAIA,gEACC,gDACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_shadow.css";\n@import "../../../mixins/_focus.css";\n@import "../../mixins/_button.css";\n\n:root {\n\t--ck-color-editable-blur-selection: hsl(0, 0%, 85%);\n}\n\n.ck.ck-editor__editable:not(.ck-editor__nested-editable) {\n\t@mixin ck-rounded-corners;\n\n\t&.ck-focused {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-inner-shadow);\n\t}\n}\n\n.ck.ck-editor__editable_inline {\n\toverflow: auto;\n\tpadding: 0 var(--ck-spacing-standard);\n\tborder: 1px solid transparent;\n\n\t&[dir="ltr"] {\n\t\ttext-align: left;\n\t}\n\n\t&[dir="rtl"] {\n\t\ttext-align: right;\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/116 */\n\t& > *:first-child {\n\t\tmargin-top: var(--ck-spacing-large);\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5/issues/847 */\n\t& > *:last-child {\n\t\t/*\n\t\t * This value should match with the default margins of the block elements (like .media or .image)\n\t\t * to avoid a content jumping when the fake selection container shows up (See https://github.com/ckeditor/ckeditor5/issues/9825).\n\t\t */\n\t\tmargin-bottom: var(--ck-spacing-large);\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5/issues/6517 */\n\t&.ck-blurred ::selection {\n\t\tbackground: var(--ck-color-editable-blur-selection);\n\t}\n}\n\n/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/111 */\n.ck.ck-balloon-panel.ck-toolbar-container[class*="arrow_n"] {\n\t&::after {\n\t\tborder-bottom-color: var(--ck-color-base-foreground);\n\t}\n}\n\n.ck.ck-balloon-panel.ck-toolbar-container[class*="arrow_s"] {\n\t&::after {\n\t\tborder-top-color: var(--ck-color-base-foreground);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},8847:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-form__header{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{padding:var(--ck-spacing-small) var(--ck-spacing-large);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);border-bottom:1px solid var(--ck-color-base-border)}.ck.ck-form__header .ck-form__header__label{font-weight:700}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/formheader/formheader.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/formheader/formheader.css"],names:[],mappings:"AAKA,oBACC,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,kBAAmB,CACnB,6BACD,CCNA,MACC,4BACD,CAEA,oBACC,uDAAwD,CACxD,mCAAoC,CACpC,wCAAyC,CACzC,mDAKD,CAHC,4CACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form__header {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\talign-items: center;\n\tjustify-content: space-between;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-form-header-height: 38px;\n}\n\n.ck.ck-form__header {\n\tpadding: var(--ck-spacing-small) var(--ck-spacing-large);\n\theight: var(--ck-form-header-height);\n\tline-height: var(--ck-form-header-height);\n\tborder-bottom: 1px solid var(--ck-color-base-border);\n\n\t& .ck-form__header__label {\n\t\tfont-weight: bold;\n\t}\n}\n"],sourceRoot:""}]);const a=s},6574:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/icon/icon.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/icon/icon.css"],names:[],mappings:"AAKA,YACC,qBACD,CCFA,MACC,0EACD,CAEA,YACC,yBAA0B,CAC1B,0BAA2B,CAG3B,uBAAwB,CAQxB,qBAcD,CAZC,0BARA,aAAc,CAGd,cAgBA,CAJC,yBAEC,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-icon {\n\tvertical-align: middle;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-icon-size: calc(var(--ck-line-height-base) * var(--ck-font-size-normal));\n}\n\n.ck.ck-icon {\n\twidth: var(--ck-icon-size);\n\theight: var(--ck-icon-size);\n\n\t/* Multiplied by the height of the line in "px" should give SVG "viewport" dimensions */\n\tfont-size: .8333350694em;\n\n\tcolor: inherit;\n\n\t/* Inherit cursor style (#5). */\n\tcursor: inherit;\n\n\t/* This will prevent blurry icons on Firefox. See #340. */\n\twill-change: transform;\n\n\t& * {\n\t\t/* Inherit cursor style (#5). */\n\t\tcursor: inherit;\n\n\t\t/* Allows dynamic coloring of the icons. */\n\t\tcolor: inherit;\n\n\t\t&:not([fill]) {\n\t\t\t/* Needed by FF. */\n\t\t\tfill: currentColor;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},4879:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{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-width);min-height:var(--ck-ui-component-min-height);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-input[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[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{border-color:var(--ck-color-input-error-border);animation:ck-input-shake .3s ease both}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/input/input.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AASA,MACC,qBAAsB,CAGtB,2CACD,CAEA,aCLC,eD2CD,CAtCA,iECDE,qCDuCF,CAtCA,aAGC,2CAA4C,CAC5C,6CAA8C,CAC9C,6DAA8D,CAC9D,+BAAgC,CAGhC,4CAA6C,CAG7C,4DA0BD,CAxBC,mBEpBA,YAAa,CACb,2BAA2B,CCF3B,2CHwBA,CAEA,uBACC,sDAAuD,CACvD,oDAAqD,CACrD,yCAMD,CAJC,6BG/BD,oDHkCC,CAGD,sBACC,+CAAgD,CAChD,sCAKD,CAHC,4BGzCD,iDH2CC,CAIF,0BACC,IACC,0BACD,CAEA,IACC,yBACD,CAEA,IACC,0BACD,CAEA,IACC,yBACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_focus.css";\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-input-width: 18em;\n\n\t/* Backward compatibility. */\n\t--ck-input-text-width: var(--ck-input-width);\n}\n\n.ck.ck-input {\n\t@mixin ck-rounded-corners;\n\n\tbackground: var(--ck-color-input-background);\n\tborder: 1px solid var(--ck-color-input-border);\n\tpadding: var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);\n\tmin-width: var(--ck-input-width);\n\n\t/* This is important to stay of the same height as surrounding buttons */\n\tmin-height: var(--ck-ui-component-min-height);\n\n\t/* Apply some smooth transition to the box-shadow and border. */\n\ttransition: box-shadow .1s ease-in-out, border .1s ease-in-out;\n\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t}\n\n\t&[readonly] {\n\t\tborder: 1px solid var(--ck-color-input-disabled-border);\n\t\tbackground: var(--ck-color-input-disabled-background);\n\t\tcolor: var(--ck-color-input-disabled-text);\n\n\t\t&:focus {\n\t\t\t/* The read-only input should have a slightly less visible shadow when focused. */\n\t\t\t@mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow);\n\t\t}\n\t}\n\n\t&.ck-error {\n\t\tborder-color: var(--ck-color-input-error-border);\n\t\tanimation: ck-input-shake .3s ease both;\n\n\t\t&:focus {\n\t\t\t@mixin ck-box-shadow var(--ck-focus-error-outer-shadow);\n\t\t}\n\t}\n}\n\n@keyframes ck-input-shake {\n\t20% {\n\t\ttransform: translateX(-2px);\n\t}\n\n\t40% {\n\t\ttransform: translateX(2px);\n\t}\n\n\t60% {\n\t\ttransform: translateX(-1px);\n\t}\n\n\t80% {\n\t\ttransform: translateX(1px);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},3662:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/label/label.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/label/label.css"],names:[],mappings:"AAKA,aACC,aACD,CAEA,mBACC,YACD,CCNA,aACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-label {\n\tdisplay: block;\n}\n\n.ck.ck-voice-label {\n\tdisplay: none;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-label {\n\tfont-weight: bold;\n}\n"],sourceRoot:""}]);const a=s},2577:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{pointer-events:none;transform-origin:0 0;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);background:var(--ck-color-labeled-field-label-background);padding:0 calc(var(--ck-font-size-tiny)*0.5);line-height:normal;font-weight:400;text-overflow:ellipsis;overflow:hidden;max-width:100%;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.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.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-spacing-medium),calc(var(--ck-font-size-base)*0.6)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-spacing-medium)*-1),calc(var(--ck-font-size-base)*0.6)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));background:transparent;padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/labeledfield/labeledfieldview.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAMC,mEACC,YAAa,CACb,iBACD,CAEA,uCACC,aAAc,CACd,iBACD,CCND,MACC,kEAAsE,CACtE,gFAAiF,CACjF,yEACD,CAEA,0BCHC,eD4GD,CAzGA,2FCCE,qCDwGF,CAtGC,mEACC,UAmCD,CAjCC,gFACC,KA+BD,CAhCA,0FAIE,MA4BF,CAhCA,0FAQE,OAwBF,CAhCA,gFAWC,mBAAoB,CACpB,oBAAqB,CAGrB,6DAA+D,CAE/D,yDAA0D,CAC1D,4CAA8C,CAC9C,kBAAoB,CACpB,eAAmB,CAGnB,sBAAuB,CACvB,eAAgB,CAEhB,cAAe,CAEf,+JAID,CAQA,mKACC,gCACD,CAGD,yDACC,mCAAoC,CACpC,kCAAmC,CAInC,kBAKD,CAHC,6FACC,gCACD,CAID,4OAEC,yCACD,CAIA,oUAGE,yFAYF,CAfA,oUAOE,kGAQF,CAfA,gTAWC,iEAAkE,CAElE,sBAAuB,CACvB,SACD,CAKA,8FACC,sBACD,CAGA,yIACC,SACD,CAGA,kMACC,8HACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-labeled-field-view {\n\t& > .ck.ck-labeled-field-view__input-wrapper {\n\t\tdisplay: flex;\n\t\tposition: relative;\n\t}\n\n\t& .ck.ck-label {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-labeled-field-view-transition: .1s cubic-bezier(0, 0, 0.24, 0.95);\n\t--ck-labeled-field-empty-unfocused-max-width: 100% - 2 * var(--ck-spacing-medium);\n\t--ck-color-labeled-field-label-background: var(--ck-color-base-background);\n}\n\n.ck.ck-labeled-field-view {\n\t@mixin ck-rounded-corners;\n\n\t& > .ck.ck-labeled-field-view__input-wrapper {\n\t\twidth: 100%;\n\n\t\t& > .ck.ck-label {\n\t\t\ttop: 0px;\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tleft: 0px;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tright: 0px;\n\t\t\t}\n\n\t\t\tpointer-events: none;\n\t\t\ttransform-origin: 0 0;\n\n\t\t\t/* By default, display the label scaled down above the field. */\n\t\t\ttransform: translate(var(--ck-spacing-medium), -6px) scale(.75);\n\n\t\t\tbackground: var(--ck-color-labeled-field-label-background);\n\t\t\tpadding: 0 calc(.5 * var(--ck-font-size-tiny));\n\t\t\tline-height: initial;\n\t\t\tfont-weight: normal;\n\n\t\t\t/* Prevent overflow when the label is longer than the input */\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\n\t\t\tmax-width: 100%;\n\n\t\t\ttransition:\n\t\t\t\ttransform var(--ck-labeled-field-view-transition),\n\t\t\t\tpadding var(--ck-labeled-field-view-transition),\n\t\t\t\tbackground var(--ck-labeled-field-view-transition);\n\t\t}\n\t}\n\n\t&.ck-error {\n\t\t& > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\n\t\t& .ck-input:not([readonly]) + .ck.ck-label {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\t}\n\n\t& .ck-labeled-field-view__status {\n\t\tfont-size: var(--ck-font-size-small);\n\t\tmargin-top: var(--ck-spacing-small);\n\n\t\t/* Let the info wrap to the next line to avoid stretching the layout horizontally.\n\t\tThe status could be very long. */\n\t\twhite-space: normal;\n\n\t\t&.ck-labeled-field-view__status_error {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\t}\n\n\t/* Disabled fields and fields that have no focus should fade out. */\n\t&.ck-disabled > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label,\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\tcolor: var(--ck-color-input-disabled-text);\n\t}\n\n\t/* Fields that are disabled or not focused and without a placeholder should have full-sized labels. */\n\t/* stylelint-disable-next-line no-descending-specificity */\n\t&.ck-disabled.ck-labeled-field-view_empty > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label,\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\t@mixin ck-dir ltr {\n\t\t\ttransform: translate(var(--ck-spacing-medium), calc(0.6 * var(--ck-font-size-base))) scale(1);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\ttransform: translate(calc(-1 * var(--ck-spacing-medium)), calc(0.6 * var(--ck-font-size-base))) scale(1);\n\t\t}\n\n\t\t/* Compensate for the default translate position. */\n\t\tmax-width: calc(var(--ck-labeled-field-empty-unfocused-max-width));\n\n\t\tbackground: transparent;\n\t\tpadding: 0;\n\t}\n\n\t/*------ DropdownView integration ----------------------------------------------------------------------------------- */\n\n\t/* Make sure dropdown\' background color in any of dropdown\'s state does not collide with labeled field. */\n\t& > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck.ck-button {\n\t\tbackground: transparent;\n\t}\n\n\t/* When the dropdown is "empty", the labeled field label replaces its label. */\n\t&.ck-labeled-field-view_empty > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck-button > .ck-button__label {\n\t\topacity: 0;\n\t}\n\n\t/* Make sure the label of the empty, unfocused input does not cover the dropdown arrow. */\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown + .ck-label {\n\t\tmax-width: calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard));\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},2053:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-labeled-input .ck-labeled-input__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-input .ck-labeled-input__status_error{color:var(--ck-color-base-error)}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/labeledinput/labeledinput.css"],names:[],mappings:"AAKA,+CACC,mCAAoC,CACpC,kCAAmC,CAInC,kBACD,CAEA,qDACC,gCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-labeled-input .ck-labeled-input__status {\n\tfont-size: var(--ck-font-size-small);\n\tmargin-top: var(--ck-spacing-small);\n\n\t/* Let the info wrap to the next line to avoid stretching the layout horizontally.\n\tThe status could be very long. */\n\twhite-space: normal;\n}\n\n.ck.ck-labeled-input .ck-labeled-input__status_error {\n\tcolor: var(--ck-color-base-error);\n}\n"],sourceRoot:""}]);const a=s},1046:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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(var(--ck-line-height-base)*0.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*0.4*var(--ck-font-size-base))}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(var(--ck-line-height-base)*1.2*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)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/list/list.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/list/list.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,YCEC,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBAAgB,CDFhB,YAAa,CACb,qBAcD,CAZC,2DAEC,aACD,CAKA,kCACC,iBAAkB,CAClB,2BACD,CEfD,YCEC,eDGD,CALA,+DCME,qCDDF,CALA,YAGC,oBAAqB,CACrB,0CACD,CAEA,kBACC,cAAe,CACf,cA2DD,CAzDC,6BACC,gBAAiB,CACjB,UAAW,CACX,eAAgB,CAChB,eAAgB,CAKhB,mIAiCD,CA7BC,+CAEC,yEACD,CAEA,oCACC,eACD,CAEA,mCACC,oDAAqD,CACrD,yCAaD,CAXC,0CACC,eACD,CAEA,2DACC,0DACD,CAEA,2DACC,4CACD,CAGD,qDACC,uDACD,CAMA,yCACC,0CAA2C,CAC3C,aAMD,CAJC,iEACC,uDAAwD,CACxD,aACD,CAKH,uBACC,UAAW,CACX,UAAW,CACX,sCACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-list {\n\t@mixin ck-unselectable;\n\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t& .ck-list__item,\n\t& .ck-list__separator {\n\t\tdisplay: block;\n\t}\n\n\t/* Make sure that whatever child of the list item gets focus, it remains on the\n\ttop. Thanks to that, styles like box-shadow, outline, etc. are not masked by\n\tadjacent list items. */\n\t& .ck-list__item > *:focus {\n\t\tposition: relative;\n\t\tz-index: var(--ck-z-default);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_shadow.css";\n\n.ck.ck-list {\n\t@mixin ck-rounded-corners;\n\n\tlist-style-type: none;\n\tbackground: var(--ck-color-list-background);\n}\n\n.ck.ck-list__item {\n\tcursor: default;\n\tmin-width: 12em;\n\n\t& .ck-button {\n\t\tmin-height: unset;\n\t\twidth: 100%;\n\t\ttext-align: left;\n\t\tborder-radius: 0;\n\n\t\t/* List items should have the same height. Use absolute units to make sure it is so\n\t\t because e.g. different heading styles may have different height\n\t\t https://github.com/ckeditor/ckeditor5-heading/issues/63 */\n\t\tpadding:\n\t\t\tcalc(.2 * var(--ck-line-height-base) * var(--ck-font-size-base))\n\t\t\tcalc(.4 * var(--ck-line-height-base) * var(--ck-font-size-base));\n\n\t\t& .ck-button__label {\n\t\t\t/* https://github.com/ckeditor/ckeditor5-heading/issues/63 */\n\t\t\tline-height: calc(1.2 * var(--ck-line-height-base) * var(--ck-font-size-base));\n\t\t}\n\n\t\t&:active {\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t&.ck-on {\n\t\t\tbackground: var(--ck-color-list-button-on-background);\n\t\t\tcolor: var(--ck-color-list-button-on-text);\n\n\t\t\t&:active {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n\t\t\t&:hover:not(.ck-disabled) {\n\t\t\t\tbackground: var(--ck-color-list-button-on-background-focus);\n\t\t\t}\n\n\t\t\t&:focus:not(.ck-disabled) {\n\t\t\t\tborder-color: var(--ck-color-base-background);\n\t\t\t}\n\t\t}\n\n\t\t&:hover:not(.ck-disabled) {\n\t\t\tbackground: var(--ck-color-list-button-hover-background);\n\t\t}\n\t}\n\n\t/* It\'s unnecessary to change the background/text of a switch toggle; it has different ways\n\tof conveying its state (like the switcher) */\n\t& .ck-switchbutton {\n\t\t&.ck-on {\n\t\t\tbackground: var(--ck-color-list-background);\n\t\t\tcolor: inherit;\n\n\t\t\t&:hover:not(.ck-disabled) {\n\t\t\t\tbackground: var(--ck-color-list-button-hover-background);\n\t\t\t\tcolor: inherit;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck.ck-list__separator {\n\theight: 1px;\n\twidth: 100%;\n\tbackground: var(--ck-color-base-border);\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},8793:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,':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-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.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);filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow))}.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(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.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(var(--ck-balloon-arrow-half-width)*-1);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.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(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.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(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.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(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.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(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}',"",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/balloonpanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonpanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,MAEC,8DACD,CAEA,qBACC,YAAa,CACb,iBAAkB,CAElB,yBAyCD,CAtCE,+GAEC,UAAW,CACX,iBACD,CAEA,wDACC,6CACD,CAEA,uDACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAGD,8CACC,aACD,CC9CD,MACC,6BAA8B,CAC9B,8BAA+B,CAC/B,iCAAkC,CAClC,oEACD,CAEA,qBCJC,eD4ID,CAxIA,iFCAE,qCDwIF,CAxIA,qBENC,oCAA8B,CFU9B,eAAgB,CAEhB,2CAA4C,CAC5C,6CAiID,CA9HE,+GAEC,OAAQ,CACR,QAAS,CACT,kBACD,CAIA,uFAEC,oDAAoH,CAApH,kDAAoH,CAApH,qDAAoH,CAApH,kBACD,CAEA,4CACC,gDACD,CAEA,uFAHC,6BAA8E,CAA9E,8BAA8E,CAA9E,4BAMD,CAHA,2CACC,oDAAkF,CAClF,yCACD,CAIA,uFAEC,oDAAoH,CAApH,qBAAoH,CAApH,qDAAoH,CAApH,+CACD,CAEA,4CACC,6CAAkE,CAClE,uDACD,CAEA,uFAJC,6BAAkE,CAAlE,+BAAkE,CAAlE,8BAOD,CAHA,2CACC,iDAAkF,CAClF,4CACD,CAIA,yGAEC,QAAS,CACT,uDAA0D,CAC1D,2CACD,CAIA,2GAEC,+CAAkD,CAClD,2CACD,CAIA,2GAEC,gDAAmD,CACnD,2CACD,CAIA,yGAEC,QAAS,CACT,uDAA0D,CAC1D,8CACD,CAIA,2GAEC,+CAAkD,CAClD,8CACD,CAIA,2GAEC,gDAAmD,CACnD,8CACD,CAIA,6GAEC,SAAU,CACV,uDAA0D,CAC1D,8CACD,CAIA,6GAEC,QAAS,CACT,sDAAyD,CACzD,8CACD,CAIA,6GAEC,SAAU,CACV,uDAA0D,CAC1D,2CACD,CAIA,6GAEC,QAAS,CACT,sDAAyD,CACzD,2CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/* Make sure the balloon arrow does not float over its children. */\n\t--ck-balloon-panel-arrow-z-index: calc(var(--ck-z-default) - 3);\n}\n\n.ck.ck-balloon-panel {\n\tdisplay: none;\n\tposition: absolute;\n\n\tz-index: var(--ck-z-modal);\n\n\t&.ck-balloon-panel_with-arrow {\n\t\t&::before,\n\t\t&::after {\n\t\t\tcontent: "";\n\t\t\tposition: absolute;\n\t\t}\n\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&[class*="arrow_n"] {\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&[class*="arrow_s"] {\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_visible {\n\t\tdisplay: block;\n\t}\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-balloon-arrow-offset: 2px;\n\t--ck-balloon-arrow-height: 10px;\n\t--ck-balloon-arrow-half-width: 8px;\n\t--ck-balloon-arrow-drop-shadow: 0 2px 2px var(--ck-color-shadow-drop);\n}\n\n.ck.ck-balloon-panel {\n\t@mixin ck-rounded-corners;\n\t@mixin ck-drop-shadow;\n\n\tmin-height: 15px;\n\n\tbackground: var(--ck-color-panel-background);\n\tborder: 1px solid var(--ck-color-panel-border);\n\n\t&.ck-balloon-panel_with-arrow {\n\t\t&::before,\n\t\t&::after {\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t}\n\t}\n\n\t&[class*="arrow_n"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width);\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: transparent transparent var(--ck-color-panel-border) transparent;\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: transparent transparent var(--ck-color-panel-background) transparent;\n\t\t\tmargin-top: var(--ck-balloon-arrow-offset);\n\t\t}\n\t}\n\n\t&[class*="arrow_s"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width);\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: var(--ck-color-panel-border) transparent transparent;\n\t\t\tfilter: drop-shadow(var(--ck-balloon-arrow-drop-shadow));\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: var(--ck-color-panel-background) transparent transparent transparent;\n\t\t\tmargin-bottom: var(--ck-balloon-arrow-offset);\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_n {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 50%;\n\t\t\tmargin-left: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_ne {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_s {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 50%;\n\t\t\tmargin-left: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_sw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_se {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_sme {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: 25%;\n\t\t\tmargin-right: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_smw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 25%;\n\t\t\tmargin-left: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nme {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: 25%;\n\t\t\tmargin-right: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nmw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 25%;\n\t\t\tmargin-left: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},4650:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/balloonrotator.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonrotator.css"],names:[],mappings:"AAKA,oCACC,YAAa,CACb,kBAAmB,CACnB,sBACD,CAKA,6CACC,sBACD,CCXA,oCACC,6CAA8C,CAC9C,sDAAuD,CACvD,iCAgBD,CAbC,sCACC,oCAAqC,CACrC,kCAAmC,CACnC,qCACD,CAGA,iEACC,uCAAwC,CAGxC,mCACD,CAMA,2DACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-balloon-rotator__navigation {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Buttons inside a toolbar should be centered when rotator bar is wider.\n * See: https://github.com/ckeditor/ckeditor5-ui/issues/495\n */\n.ck .ck-balloon-rotator__content .ck-toolbar {\n\tjustify-content: center;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-balloon-rotator__navigation {\n\tbackground: var(--ck-color-toolbar-background);\n\tborder-bottom: 1px solid var(--ck-color-toolbar-border);\n\tpadding: 0 var(--ck-spacing-small);\n\n\t/* Let's keep similar appearance to `ck-toolbar`. */\n\t& > * {\n\t\tmargin-right: var(--ck-spacing-small);\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t/* Gives counter more breath than buttons. */\n\t& .ck-balloon-rotator__counter {\n\t\tmargin-right: var(--ck-spacing-standard);\n\n\t\t/* We need to use smaller margin because of previous button's right margin. */\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n}\n\n.ck .ck-balloon-rotator__content {\n\n\t/* Disable default annotation shadow inside rotator with fake panels. */\n\t& .ck.ck-annotation-wrapper {\n\t\tbox-shadow: none;\n\t}\n}\n"],sourceRoot:""}]);const a=s},7676:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/fakepanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/fakepanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,mBACC,iBAAkB,CAGlB,mCACD,CAEA,uBACC,iBACD,CAEA,mCACC,SACD,CAEA,oCACC,SACD,CCfA,MACC,6CAA8C,CAC9C,2CACD,CAGA,uBCJC,oCAA8B,CDO9B,eAAgB,CAEhB,2CAA4C,CAC5C,6CAA8C,CAC9C,qCAAsC,CAEtC,UAAW,CACX,WACD,CAEA,mCACC,0DAA2D,CAC3D,uDACD,CAEA,oCACC,kEAAqE,CACrE,+DACD,CACA,oCACC,kEAAqE,CACrE,+DACD,CAGA,yIAGC,4CACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-fake-panel {\n\tposition: absolute;\n\n\t/* Fake panels should be placed under main balloon content. */\n\tz-index: calc(var(--ck-z-modal) - 1);\n}\n\n.ck .ck-fake-panel div {\n\tposition: absolute;\n}\n\n.ck .ck-fake-panel div:nth-child( 1 ) {\n\tz-index: 2;\n}\n\n.ck .ck-fake-panel div:nth-child( 2 ) {\n\tz-index: 1;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-balloon-fake-panel-offset-horizontal: 6px;\n\t--ck-balloon-fake-panel-offset-vertical: 6px;\n}\n\n/* Let\'s use `.ck-balloon-panel` appearance. See: balloonpanel.css. */\n.ck .ck-fake-panel div {\n\t@mixin ck-drop-shadow;\n\n\tmin-height: 15px;\n\n\tbackground: var(--ck-color-panel-background);\n\tborder: 1px solid var(--ck-color-panel-border);\n\tborder-radius: var(--ck-border-radius);\n\n\twidth: 100%;\n\theight: 100%;\n}\n\n.ck .ck-fake-panel div:nth-child( 1 ) {\n\tmargin-left: var(--ck-balloon-fake-panel-offset-horizontal);\n\tmargin-top: var(--ck-balloon-fake-panel-offset-vertical);\n}\n\n.ck .ck-fake-panel div:nth-child( 2 ) {\n\tmargin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 2);\n\tmargin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 2);\n}\n.ck .ck-fake-panel div:nth-child( 3 ) {\n\tmargin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 3);\n\tmargin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 3);\n}\n\n/* If balloon is positioned above element, we need to move fake panel to the top. */\n.ck .ck-balloon-panel_arrow_s + .ck-fake-panel,\n.ck .ck-balloon-panel_arrow_se + .ck-fake-panel,\n.ck .ck-balloon-panel_arrow_sw + .ck-fake-panel {\n\t--ck-balloon-fake-panel-offset-vertical: -6px;\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},5868:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/stickypanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/stickypanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAMC,qDACC,yBAA0B,CAC1B,cAAe,CACf,KACD,CAEA,kEACC,QAAS,CACT,iBACD,CCPA,qDCCA,oCAA8B,CDE7B,sBAAuB,CACvB,wBAAyB,CACzB,yBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-sticky-panel {\n\t& .ck-sticky-panel__content_sticky {\n\t\tz-index: var(--ck-z-modal); /* #315 */\n\t\tposition: fixed;\n\t\ttop: 0;\n\t}\n\n\t& .ck-sticky-panel__content_sticky_bottom-limit {\n\t\ttop: auto;\n\t\tposition: absolute;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_shadow.css";\n\n.ck.ck-sticky-panel {\n\t& .ck-sticky-panel__content_sticky {\n\t\t@mixin ck-drop-shadow;\n\n\t\tborder-width: 0 1px 1px;\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},6764:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,'.ck-vertical-form .ck-button:after{content:"";width:0;position:absolute;right:-1px;top:var(--ck-spacing-small);bottom:var(--ck-spacing-small);z-index:1}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{content:"";width:0;position:absolute;right:-1px;top:var(--ck-spacing-small);bottom:var(--ck-spacing-small);z-index:1}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*0.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-large);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after,[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}',"",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/responsive-form/responsiveform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/responsive-form/responsiveform.css"],names:[],mappings:"AAOA,mCACC,UAAW,CACX,OAAQ,CACR,iBAAkB,CAClB,UAAW,CACX,2BAA4B,CAC5B,8BAA+B,CAC/B,SACD,CCTC,oCDaC,wCACC,UAAW,CACX,OAAQ,CACR,iBAAkB,CAClB,UAAW,CACX,2BAA4B,CAC5B,8BAA+B,CAC/B,SACD,CCnBD,CCAD,qDACC,kDACD,CAEA,uBACC,+BAkED,CAhEC,6BAEC,YACD,CASC,uGACC,sCACD,CDvBD,oCCMD,uBAqBE,SAAU,CACV,qCA6CF,CA3CE,8CACC,wDAWD,CATC,6DACC,WAAY,CACZ,UACD,CAGA,4EACC,kBACD,CAID,iGAEC,kCAAmC,CACnC,kCAAmC,CAEnC,eAAgB,CAChB,QAAS,CACT,gDAaD,CApBA,0OAcE,aAMF,CAGC,yMACC,kDACD,CDpEF",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck-vertical-form .ck-button::after {\n\tcontent: "";\n\twidth: 0;\n\tposition: absolute;\n\tright: -1px;\n\ttop: var(--ck-spacing-small);\n\tbottom: var(--ck-spacing-small);\n\tz-index: 1;\n}\n\n.ck.ck-responsive-form {\n\t@mixin ck-media-phone {\n\t\t& .ck-button::after {\n\t\t\tcontent: "";\n\t\t\twidth: 0;\n\t\t\tposition: absolute;\n\t\t\tright: -1px;\n\t\t\ttop: var(--ck-spacing-small);\n\t\t\tbottom: var(--ck-spacing-small);\n\t\t\tz-index: 1;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck-vertical-form > .ck-button:nth-last-child(2)::after {\n\tborder-right: 1px solid var(--ck-color-base-border);\n}\n\n.ck.ck-responsive-form {\n\tpadding: var(--ck-spacing-large);\n\n\t&:focus {\n\t\t/* See: https://github.com/ckeditor/ckeditor5/issues/4773 */\n\t\toutline: none;\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& > :not(:first-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& > :not(:last-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\tpadding: 0;\n\t\twidth: calc(.8 * var(--ck-input-width));\n\n\t\t& .ck-labeled-field-view {\n\t\t\tmargin: var(--ck-spacing-large) var(--ck-spacing-large) 0;\n\n\t\t\t& .ck-input-text {\n\t\t\t\tmin-width: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t/* Let the long error messages wrap in the narrow form. */\n\t\t\t& .ck-labeled-field-view__error {\n\t\t\t\twhite-space: normal;\n\t\t\t}\n\t\t}\n\n\t\t/* Styles for two last buttons in the form (save&cancel, edit&unlink, etc.). */\n\t\t& > .ck-button:nth-last-child(1),\n\t\t& > .ck-button:nth-last-child(2) {\n\t\t\tpadding: var(--ck-spacing-standard);\n\t\t\tmargin-top: var(--ck-spacing-large);\n\n\t\t\tborder-radius: 0;\n\t\t\tborder: 0;\n\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-left: 0;\n\n\t\t\t\t&:last-of-type {\n\t\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t& > .ck-button:nth-last-child(2) {\n\t\t\t&::after {\n\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},9695:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/toolbar/blocktoolbar.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/blocktoolbar.css"],names:[],mappings:"AAKA,4BACC,iBAAkB,CAClB,2BACD,CCHA,MACC,oDAAqD,CACrD,yDACD,CAEA,4BACC,0CAA2C,CAC3C,sCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-block-toolbar-button {\n\tposition: absolute;\n\tz-index: var(--ck-z-default);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-block-toolbar-button: var(--ck-color-text);\n\t--ck-block-toolbar-button-size: var(--ck-font-size-normal);\n}\n\n.ck.ck-block-toolbar-button {\n\tcolor: var(--ck-color-block-toolbar-button);\n\tfont-size: var(--ck-block-toolbar-size);\n}\n"],sourceRoot:""}]);const a=s},5542:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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__line-break{flex-basis:100%}.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__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){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>:not(.ck-toolbar__line-break),.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)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/toolbar/toolbar.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/toolbar.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,eCEC,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBAAgB,CDFhB,YAAa,CACb,oBAAqB,CACrB,kBA6CD,CA3CC,kCACC,YAAa,CACb,kBAAmB,CACnB,kBAAmB,CACnB,WAED,CAEA,yCACC,oBAWD,CAJC,yGAEC,YACD,CAGD,uCACC,eACD,CAEA,sDACC,gBACD,CAEA,sDACC,qBACD,CAEA,sDACC,gBACD,CAGC,yFACC,YACD,CE/CF,eCGC,eD0FD,CA7FA,qECOE,qCDsFF,CA7FA,eAGC,6CAA8C,CAC9C,iCAAkC,CAClC,+CAwFD,CAtFC,yCACC,kBAAmB,CACnB,SAAU,CACV,aAAc,CACd,yCAA0C,CAM1C,kCAAmC,CACnC,qCACD,CAEA,uCACC,QACD,CAGC,gEAEC,oCACD,CAIA,kEACC,YACD,CAGD,gHAGC,kCAAmC,CACnC,qCACD,CAEA,mCAEC,SAgBD,CAbC,0DAEC,UAAW,CAGX,QAAS,CAGT,eAAgB,CAGhB,QACD,CAGD,kCAEC,SAWD,CATC,uDAEC,QAMD,CAHC,yFACC,eACD,CASD,kFACC,mCACD,CAvFF,qCA2FE,QAEF,CAYC,+FACC,cACD,CAEA,iJAEC,mCACD,CAEA,qHACC,aACD,CAIC,6JACC,wBAAyB,CACzB,2BACD,CAGA,2JACC,yBAA0B,CAC1B,4BACD,CAID,qGACC,mCACD,CAGA,yLACC,mCACD,CAWA,qHACC,cACD,CAIC,6JACC,yBAA0B,CAC1B,4BACD,CAGA,2JACC,wBAAyB,CACzB,2BACD,CAID,qGACC,oCACD,CAGA,yLACC,oCACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-toolbar {\n\t@mixin ck-unselectable;\n\n\tdisplay: flex;\n\tflex-flow: row nowrap;\n\talign-items: center;\n\n\t& > .ck-toolbar__items {\n\t\tdisplay: flex;\n\t\tflex-flow: row wrap;\n\t\talign-items: center;\n\t\tflex-grow: 1;\n\n\t}\n\n\t& .ck.ck-toolbar__separator {\n\t\tdisplay: inline-block;\n\n\t\t/*\n\t\t * A leading or trailing separator makes no sense (separates from nothing on one side).\n\t\t * For instance, it can happen when toolbar items (also separators) are getting grouped one by one and\n\t\t * moved to another toolbar in the dropdown.\n\t\t */\n\t\t&:first-child,\n\t\t&:last-child {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& .ck-toolbar__line-break {\n\t\tflex-basis: 100%;\n\t}\n\n\t&.ck-toolbar_grouping > .ck-toolbar__items {\n\t\tflex-wrap: nowrap;\n\t}\n\n\t&.ck-toolbar_vertical > .ck-toolbar__items {\n\t\tflex-direction: column;\n\t}\n\n\t&.ck-toolbar_floating > .ck-toolbar__items {\n\t\tflex-wrap: nowrap;\n\t}\n\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t& > .ck-dropdown__button .ck-dropdown__arrow {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-toolbar {\n\t@mixin ck-rounded-corners;\n\n\tbackground: var(--ck-color-toolbar-background);\n\tpadding: 0 var(--ck-spacing-small);\n\tborder: 1px solid var(--ck-color-toolbar-border);\n\n\t& .ck.ck-toolbar__separator {\n\t\talign-self: stretch;\n\t\twidth: 1px;\n\t\tmin-width: 1px;\n\t\tbackground: var(--ck-color-toolbar-border);\n\n\t\t/*\n\t\t * These margins make the separators look better in balloon toolbars (when aligned with the "tip").\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/7493.\n\t\t */\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t& .ck-toolbar__line-break {\n\t\theight: 0;\n\t}\n\n\t& > .ck-toolbar__items {\n\t\t& > *:not(.ck-toolbar__line-break) {\n\t\t\t/* (#11) Separate toolbar items. */\n\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t}\n\n\t\t/* Don\'t display a separator after an empty items container, for instance,\n\t\twhen all items were grouped */\n\t\t&:empty + .ck.ck-toolbar__separator {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& > .ck-toolbar__items > *:not(.ck-toolbar__line-break),\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t/* Make sure items wrapped to the next line have v-spacing */\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t&.ck-toolbar_vertical {\n\t\t/* Items in a vertical toolbar span the entire width. */\n\t\tpadding: 0;\n\n\t\t/* Specificity matters here. See https://github.com/ckeditor/ckeditor5-theme-lark/issues/168. */\n\t\t& > .ck-toolbar__items > .ck {\n\t\t\t/* Items in a vertical toolbar should span the horizontal space. */\n\t\t\twidth: 100%;\n\n\t\t\t/* Items in a vertical toolbar should have no margin. */\n\t\t\tmargin: 0;\n\n\t\t\t/* Items in a vertical toolbar span the entire width so rounded corners are pointless. */\n\t\t\tborder-radius: 0;\n\n\t\t\t/* Items in a vertical toolbar span the entire width so any border is pointless. */\n\t\t\tborder: 0;\n\t\t}\n\t}\n\n\t&.ck-toolbar_compact {\n\t\t/* No spacing around items. */\n\t\tpadding: 0;\n\n\t\t& > .ck-toolbar__items > * {\n\t\t\t/* Compact toolbar items have no spacing between them. */\n\t\t\tmargin: 0;\n\n\t\t\t/* "Middle" children should have no rounded corners. */\n\t\t\t&:not(:first-child):not(:last-child) {\n\t\t\t\tborder-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t/*\n\t\t * Dropdown button has asymmetric padding to fit the arrow.\n\t\t * This button has no arrow so let\'s revert that padding back to normal.\n\t\t */\n\t\t& > .ck.ck-button.ck-dropdown__button {\n\t\t\tpadding-left: var(--ck-spacing-tiny);\n\t\t}\n\t}\n\n\t@nest .ck-toolbar-container & {\n\t\tborder: 0;\n\t}\n}\n\n/* stylelint-disable */\n\n/*\n * Styles for RTL toolbars.\n *\n * Note: In some cases (e.g. a decoupled editor), the toolbar has its own "dir"\n * because its parent is not controlled by the editor framework.\n */\n[dir="rtl"] .ck.ck-toolbar,\n.ck.ck-toolbar[dir="rtl"] {\n\t& > .ck-toolbar__items > .ck {\n\t\tmargin-right: 0;\n\t}\n\n\t&:not(.ck-toolbar_compact) > .ck-toolbar__items > .ck {\n\t\t/* (#11) Separate toolbar items. */\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n\n\t& > .ck-toolbar__items > .ck:last-child {\n\t\tmargin-left: 0;\n\t}\n\n\t&.ck-toolbar_compact > .ck-toolbar__items > .ck {\n\t\t/* No rounded corners on the right side of the first child. */\n\t\t&:first-child {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\n\t\t/* No rounded corners on the left side of the last child. */\n\t\t&:last-child {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\t}\n\n\t/* Separate the the separator form the grouping dropdown when some items are grouped. */\n\t& > .ck.ck-toolbar__separator {\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n\n\t/* Some spacing between the items and the separator before the grouped items dropdown. */\n\t&.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) {\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n}\n\n/*\n * Styles for LTR toolbars.\n *\n * Note: In some cases (e.g. a decoupled editor), the toolbar has its own "dir"\n * because its parent is not controlled by the editor framework.\n */\n[dir="ltr"] .ck.ck-toolbar,\n.ck.ck-toolbar[dir="ltr"] {\n\t& > .ck-toolbar__items > .ck:last-child {\n\t\tmargin-right: 0;\n\t}\n\n\t&.ck-toolbar_compact > .ck-toolbar__items > .ck {\n\t\t/* No rounded corners on the right side of the first child. */\n\t\t&:first-child {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t/* No rounded corners on the left side of the last child. */\n\t\t&:last-child {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\t}\n\n\t/* Separate the the separator form the grouping dropdown when some items are grouped. */\n\t& > .ck.ck-toolbar__separator {\n\t\tmargin-right: var(--ck-spacing-small);\n\t}\n\n\t/* Some spacing between the items and the separator before the grouped items dropdown. */\n\t&.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) {\n\t\tmargin-right: var(--ck-spacing-small);\n\t}\n}\n\n/* stylelint-enable */\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},3332:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,'.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,.ck.ck-tooltip.ck-tooltip_se,.ck.ck-tooltip.ck-tooltip_sw{bottom:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after,.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text:after,.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text:after{top:calc(var(--ck-tooltip-arrow-size)*-1 + 1px);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_sw{right:50%;left:auto}.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text{left:auto;right:calc(var(--ck-tooltip-arrow-size)*-2)}.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text:after{left:auto;right:0}.ck.ck-tooltip.ck-tooltip_se{left:50%;right:auto}.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text{right:auto;left:calc(var(--ck-tooltip-arrow-size)*-2)}.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text:after{right:auto;left:0;transform:translateX(50%)}.ck.ck-tooltip.ck-tooltip_n{top:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:calc(var(--ck-tooltip-arrow-size)*-1);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)}.ck.ck-tooltip.ck-tooltip_e{left:calc(100% + var(--ck-tooltip-arrow-size));top:50%}.ck.ck-tooltip.ck-tooltip_e .ck-tooltip__text{left:0;transform:translateY(-50%)}.ck.ck-tooltip.ck-tooltip_e .ck-tooltip__text:after{left:calc(var(--ck-tooltip-arrow-size)*-1);top:calc(50% - var(--ck-tooltip-arrow-size)*1);border-left-color:transparent;border-bottom-color:transparent;border-right-color:var(--ck-color-tooltip-background);border-top-color:transparent;border-left-width:0;border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:var(--ck-tooltip-arrow-size);border-top-width:var(--ck-tooltip-arrow-size)}.ck.ck-tooltip.ck-tooltip_w{right:calc(100% + var(--ck-tooltip-arrow-size));left:auto;top:50%}.ck.ck-tooltip.ck-tooltip_w .ck-tooltip__text{left:0;transform:translateY(-50%)}.ck.ck-tooltip.ck-tooltip_w .ck-tooltip__text:after{left:100%;top:calc(50% - var(--ck-tooltip-arrow-size)*1);border-left-color:var(--ck-color-tooltip-background);border-bottom-color:transparent;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:0;border-top-width:var(--ck-tooltip-arrow-size)}',"",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/tooltip/tooltip.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/tooltip/tooltip.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,sDAEC,iBAAkB,CAGlB,mBAAoB,CAIpB,kCACD,CAEA,eAEC,iBAAkB,CAClB,SAAU,CACV,YAAa,CACb,yBAWD,CATC,iCACC,oBAOD,CALC,uCACC,UAAW,CACX,OAAQ,CACR,QACD,CCxBF,MACC,2BACD,CAEA,eACC,QAAS,CAMT,KAAM,CAON,sCAwKD,CAtKC,iCChBA,eDqCA,CArBA,yGCZC,qCDiCD,CArBA,iCAGC,cAAe,CACf,eAAgB,CAChB,kCAAmC,CACnC,wDAAyD,CACzD,6CAA8C,CAC9C,iBAAkB,CAClB,SAYD,CAVC,uCAMC,sCAAuC,CACvC,kBAAmB,CACnB,QACD,CAYD,sFAGC,4CAA+C,CAC/C,0BASD,CAPC,8JAEC,+CAAkD,CAClD,0BAA6B,CAC7B,6BAAoF,CAApF,sDAAoF,CAApF,8BAAoF,CAApF,4BAAoF,CACpF,8CAAsG,CAAtG,gDAAsG,CAAtG,+CAAsG,CAAtG,kBACD,CAaD,6BACC,SAAU,CACV,SAWD,CATC,+CACC,SAAU,CACV,2CACD,CAEA,qDACC,SAAU,CACV,OACD,CAYD,6BACC,QAAS,CACT,UAYD,CAVC,+CACC,UAAW,CACX,0CACD,CAEA,qDACC,UAAW,CACX,MAAO,CACP,yBACD,CAYD,4BACC,yCAA4C,CAC5C,2BAQD,CANC,oDACC,4CAA+C,CAC/C,0BAA6B,CAC7B,6BAAoF,CAApF,+BAAoF,CAApF,8BAAoF,CAApF,mDAAoF,CACpF,8CAAsG,CAAtG,qBAAsG,CAAtG,+CAAsG,CAAtG,6CACD,CAUD,4BACC,8CAA+C,CAC/C,OAaD,CAXC,8CACC,MAAO,CACP,0BAQD,CANC,oDACC,0CAA6C,CAC7C,8CAAiD,CACjD,6BAAoF,CAApF,+BAAoF,CAApF,qDAAoF,CAApF,4BAAoF,CACpF,mBAAsG,CAAtG,gDAAsG,CAAtG,+CAAsG,CAAtG,6CACD,CAWF,4BACC,+CAAgD,CAChD,SAAU,CACV,OAaD,CAXC,8CACC,MAAO,CACP,0BAQD,CANC,oDACC,SAAU,CACV,8CAAiD,CACjD,oDAAoF,CAApF,+BAAoF,CAApF,8BAAoF,CAApF,4BAAoF,CACpF,8CAAsG,CAAtG,gDAAsG,CAAtG,oBAAsG,CAAtG,6CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-tooltip,\n.ck.ck-tooltip .ck-tooltip__text::after {\n\tposition: absolute;\n\n\t/* Without this, hovering the tooltip could keep it visible. */\n\tpointer-events: none;\n\n\t/* This is to get rid of flickering when transitioning opacity in Chrome.\n\tIt\'s weird but it works. */\n\t-webkit-backface-visibility: hidden;\n}\n\n.ck.ck-tooltip {\n\t/* Tooltip is hidden by default. */\n\tvisibility: hidden;\n\topacity: 0;\n\tdisplay: none;\n\tz-index: var(--ck-z-modal);\n\n\t& .ck-tooltip__text {\n\t\tdisplay: inline-block;\n\n\t\t&::after {\n\t\t\tcontent: "";\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t}\n\t}\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-tooltip-arrow-size: 5px;\n}\n\n.ck.ck-tooltip {\n\tleft: 50%;\n\n\t/*\n\t * Prevent blurry tooltips in LoDPI environments.\n\t * See https://github.com/ckeditor/ckeditor5/issues/1802.\n\t */\n\ttop: 0;\n\n\t/*\n\t * For the transition to work, the tooltip must be controlled\n\t * using visibility+opacity. A delay prevents a "tooltip avalanche"\n\t * i.e. when scanning the toolbar with mouse cursor.\n\t */\n\ttransition: opacity .2s ease-in-out .2s;\n\n\t& .ck-tooltip__text {\n\t\t@mixin ck-rounded-corners;\n\n\t\tfont-size: .9em;\n\t\tline-height: 1.5;\n\t\tcolor: var(--ck-color-tooltip-text);\n\t\tpadding: var(--ck-spacing-small) var(--ck-spacing-medium);\n\t\tbackground: var(--ck-color-tooltip-background);\n\t\tposition: relative;\n\t\tleft: -50%;\n\n\t\t&::after {\n\t\t\t/*\n\t\t\t * For the transition to work, the tooltip must be controlled\n\t\t\t * using visibility+opacity. A delay prevents a "tooltip avalanche"\n\t\t\t * i.e. when scanning the toolbar with mouse cursor.\n\t\t\t */\n\t\t\ttransition: opacity .2s ease-in-out .2s;\n\t\t\tborder-style: solid;\n\t\t\tleft: 50%;\n\t\t}\n\t}\n\n\t/**\n\t * A class that displays the tooltip south of the element.\n\t *\n\t * [element]\n\t * ^\n\t * +-----------+\n\t * | Tooltip |\n\t * +-----------+\n\t */\n\t&.ck-tooltip_s,\n\t&.ck-tooltip_sw,\n\t&.ck-tooltip_se {\n\t\tbottom: calc(-1 * var(--ck-tooltip-arrow-size));\n\t\ttransform: translateY( 100% );\n\n\t\t& .ck-tooltip__text::after {\n\t\t\t/* 1px addresses gliches in rendering causing gap between the triangle and the text */\n\t\t\ttop: calc(-1 * var(--ck-tooltip-arrow-size) + 1px);\n\t\t\ttransform: translateX( -50% );\n\t\t\tborder-color: transparent transparent var(--ck-color-tooltip-background) transparent;\n\t\t\tborder-width: 0 var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size);\n\t\t}\n\t}\n\n\t/**\n\t * A class that displays the tooltip south-west of the element.\n\t *\n\t * [element]\n\t * ^\n\t * +-----------+\n\t * | Tooltip |\n\t * +-----------+\n\t */\n\n\t&.ck-tooltip_sw {\n\t\tright: 50%;\n\t\tleft: auto;\n\n\t\t& .ck-tooltip__text {\n\t\t\tleft: auto;\n\t\t\tright: calc( -2 * var(--ck-tooltip-arrow-size));\n\t\t}\n\n\t\t& .ck-tooltip__text::after {\n\t\t\tleft: auto;\n\t\t\tright: 0;\n\t\t}\n\t}\n\n\t/**\n\t * A class that displays the tooltip south-east of the element.\n\t *\n\t * [element]\n\t * ^\n\t * +-----------+\n\t * | Tooltip |\n\t * +-----------+\n\t */\n\t&.ck-tooltip_se {\n\t\tleft: 50%;\n\t\tright: auto;\n\n\t\t& .ck-tooltip__text {\n\t\t\tright: auto;\n\t\t\tleft: calc( -2 * var(--ck-tooltip-arrow-size));\n\t\t}\n\n\t\t& .ck-tooltip__text::after {\n\t\t\tright: auto;\n\t\t\tleft: 0;\n\t\t\ttransform: translateX( 50% );\n\t\t}\n\t}\n\n\t/**\n\t * A class that displays the tooltip north of the element.\n\t *\n\t * +-----------+\n\t * | Tooltip |\n\t * +-----------+\n\t * V\n\t * [element]\n\t */\n\t&.ck-tooltip_n {\n\t\ttop: calc(-1 * var(--ck-tooltip-arrow-size));\n\t\ttransform: translateY( -100% );\n\n\t\t& .ck-tooltip__text::after {\n\t\t\tbottom: calc(-1 * var(--ck-tooltip-arrow-size));\n\t\t\ttransform: translateX( -50% );\n\t\t\tborder-color: var(--ck-color-tooltip-background) transparent transparent transparent;\n\t\t\tborder-width: var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) 0 var(--ck-tooltip-arrow-size);\n\t\t}\n\t}\n\n\t/**\n\t * A class that displays the tooltip east of the element.\n\t *\n\t * +----------+\n\t * [element] < | east |\n\t * +----------+\n\t */\n\t&.ck-tooltip_e {\n\t\tleft: calc(100% + var(--ck-tooltip-arrow-size));\n\t\ttop: 50%;\n\n\t\t& .ck-tooltip__text {\n\t\t\tleft: 0;\n\t\t\ttransform: translateY( -50% );\n\n\t\t\t&::after {\n\t\t\t\tleft: calc(-1 * var(--ck-tooltip-arrow-size));\n\t\t\t\ttop: calc(50% - 1 * var(--ck-tooltip-arrow-size));\n\t\t\t\tborder-color: transparent var(--ck-color-tooltip-background) transparent transparent;\n\t\t\t\tborder-width: var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * A class that displays the tooltip west of the element.\n\t *\n\t * +----------+\n\t * | west | > [element]\n\t * +----------+\n\t */\n\t&.ck-tooltip_w {\n\t\tright: calc(100% + var(--ck-tooltip-arrow-size));\n\t\tleft: auto;\n\t\ttop: 50%;\n\n\t\t& .ck-tooltip__text {\n\t\t\tleft: 0;\n\t\t\ttransform: translateY( -50% );\n\n\t\t\t&::after {\n\t\t\t\tleft: 100%;\n\t\t\t\ttop: calc(50% - 1 * var(--ck-tooltip-arrow-size));\n\t\t\t\tborder-color: transparent transparent transparent var(--ck-color-tooltip-background);\n\t\t\t\tborder-width: var(--ck-tooltip-arrow-size) 0 var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size);\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},4793:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-hidden{display:none!important}.ck.ck-reset,.ck.ck-reset_all,.ck.ck-reset_all *{box-sizing:border-box;width:auto;height:auto;position:static}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#c4c4c4;--ck-color-base-action:#61b045;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#198cf0;--ck-color-base-active-focus:#0e7fe1;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:208,79%,51%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#bcdefb;--ck-color-focus-disabled-shadow:rgba(119,186,248,0.3);--ck-color-focus-error-shadow:rgba(255,64,31,0.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,0.15);--ck-color-shadow-drop-active:rgba(0,0,0,0.2);--ck-color-shadow-inner:rgba(0,0,0,0.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#e6e6e6;--ck-color-button-default-active-background:#d9d9d9;--ck-color-button-default-active-shadow:#bfbfbf;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#dedede;--ck-color-button-on-hover-background:#c4c4c4;--ck-color-button-on-active-background:#bababa;--ck-color-button-on-active-shadow:#a1a1a1;--ck-color-button-on-disabled-background:#dedede;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#579e3d;--ck-color-button-action-active-background:#53973b;--ck-color-button-action-active-shadow:#498433;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#b0b0b0;--ck-color-switch-button-off-hover-background:#a3a3a3;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#579e3d;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,0.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:#c7c7c7;--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:#c7c7c7;--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-base-active);--ck-color-list-button-on-background-focus:var(--ck-color-base-active-focus);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-foreground);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,177,255,0.1);--ck-color-link-fake-selection:rgba(31,177,255,0.3);--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck.ck-reset,.ck.ck-reset_all,.ck.ck-reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;vertical-align:middle;transition:none;word-wrap:break-word}.ck.ck-reset_all,.ck.ck-reset_all *{border-collapse:collapse;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);color:var(--ck-color-text);text-align:left;white-space:nowrap;cursor:auto;float:none}.ck.ck-reset_all .ck-rtl *{text-align:right}.ck.ck-reset_all iframe{vertical-align:inherit}.ck.ck-reset_all textarea{white-space:pre-wrap}.ck.ck-reset_all input[type=password],.ck.ck-reset_all input[type=text],.ck.ck-reset_all textarea{cursor:text}.ck.ck-reset_all input[type=password][disabled],.ck.ck-reset_all input[type=text][disabled],.ck.ck-reset_all textarea[disabled]{cursor:default}.ck.ck-reset_all fieldset{padding:10px;border:2px groove #dfdee3}.ck.ck-reset_all button::-moz-focus-inner{padding:0;border:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/globals/_hidden.css","webpack://./../ckeditor5-ui/theme/globals/_reset.css","webpack://./../ckeditor5-ui/theme/globals/_zindex.css","webpack://./../ckeditor5-ui/theme/globals/_transition.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_colors.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_disabled.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_focus.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_fonts.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_reset.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_spacing.css"],names:[],mappings:"AAQA,WAGC,sBACD,CCPA,iDAGC,qBAAsB,CACtB,UAAW,CACX,WAAY,CACZ,eACD,CCPA,MACC,gBAAiB,CACjB,4CACD,CCAA,oDAEC,yBACD,CCNA,MACC,kCAAmD,CACnD,+BAAoD,CACpD,8BAAgD,CAChD,8BAAmD,CACnD,6BAAmD,CACnD,yBAA+C,CAC/C,8BAAmD,CACnD,oCAAuD,CACvD,6BAAkD,CAIlD,+CAAwD,CACxD,qEAA+E,CAC/E,qCAAwD,CACxD,sDAA8D,CAC9D,iDAA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,CACZ,UACD,CAGC,2BACC,gBACD,CAEA,wBAEC,sBACD,CAEA,0BACC,oBACD,CAEA,kGAGC,WACD,CAEA,gIAGC,cACD,CAEA,0BACC,YAAa,CACb,yBACD,CAEA,0CAEC,SAAU,CACV,QACD,CAMD,8BAEC,gBACD,CCnFA,MACC,sBAAuB,CCAvB,gEAAiE,CAKjE,0DAA2D,CAK3D,wEAAyE,CCbzE,uBAA8B,CAC9B,mDAA2D,CAC3D,4CAAkD,CAClD,oDAA4D,CAC5D,mDAA2D,CAC3D,kDAA2D,CAC3D,yDFFD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which hides an element in DOM.\n */\n.ck-hidden {\n\t/* Override selector specificity. Otherwise, all elements with some display\n\tstyle defined will override this one, which is not a desired result. */\n\tdisplay: none !important;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-reset,\n.ck.ck-reset_all,\n.ck.ck-reset_all * {\n\tbox-sizing: border-box;\n\twidth: auto;\n\theight: auto;\n\tposition: static;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-z-default: 1;\n\t--ck-z-modal: calc( var(--ck-z-default) + 999 );\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class that disables all transitions of the element and its children.\n */\n.ck-transitions-disabled,\n.ck-transitions-disabled * {\n\ttransition: none !important;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-base-foreground: \t\t\t\t\t\t\t\thsl(0, 0%, 98%);\n\t--ck-color-base-background: \t\t\t\t\t\t\t\thsl(0, 0%, 100%);\n\t--ck-color-base-border: \t\t\t\t\t\t\t\t\thsl(0, 0%, 77%);\n\t--ck-color-base-action: \t\t\t\t\t\t\t\t\thsl(104, 44%, 48%);\n\t--ck-color-base-focus: \t\t\t\t\t\t\t\t\t\thsl(209, 92%, 70%);\n\t--ck-color-base-text: \t\t\t\t\t\t\t\t\t\thsl(0, 0%, 20%);\n\t--ck-color-base-active: \t\t\t\t\t\t\t\t\thsl(208, 88%, 52%);\n\t--ck-color-base-active-focus:\t\t\t\t\t\t\t\thsl(208, 88%, 47%);\n\t--ck-color-base-error:\t\t\t\t\t\t\t\t\t\thsl(15, 100%, 43%);\n\n\t/* -- Generic colors ------------------------------------------------------------------------ */\n\n\t--ck-color-focus-border-coordinates: \t\t\t\t\t\t208, 79%, 51%;\n\t--ck-color-focus-border: \t\t\t\t\t\t\t\t\thsl(var(--ck-color-focus-border-coordinates));\n\t--ck-color-focus-outer-shadow:\t\t\t\t\t\t\t\thsl(207, 89%, 86%);\n\t--ck-color-focus-disabled-shadow:\t\t\t\t\t\t\thsla(209, 90%, 72%,.3);\n\t--ck-color-focus-error-shadow:\t\t\t\t\t\t\t\thsla(9,100%,56%,.3);\n\t--ck-color-text: \t\t\t\t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-shadow-drop: \t\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.15);\n\t--ck-color-shadow-drop-active:\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.2);\n\t--ck-color-shadow-inner: \t\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.1);\n\n\t/* -- Buttons ------------------------------------------------------------------------------- */\n\n\t--ck-color-button-default-background: \t\t\t\t\t\ttransparent;\n\t--ck-color-button-default-hover-background: \t\t\t\thsl(0, 0%, 90%);\n\t--ck-color-button-default-active-background: \t\t\t\thsl(0, 0%, 85%);\n\t--ck-color-button-default-active-shadow: \t\t\t\t\thsl(0, 0%, 75%);\n\t--ck-color-button-default-disabled-background: \t\t\t\ttransparent;\n\n\t--ck-color-button-on-background: \t\t\t\t\t\t\thsl(0, 0%, 87%);\n\t--ck-color-button-on-hover-background: \t\t\t\t\t\thsl(0, 0%, 77%);\n\t--ck-color-button-on-active-background: \t\t\t\t\thsl(0, 0%, 73%);\n\t--ck-color-button-on-active-shadow: \t\t\t\t\t\thsl(0, 0%, 63%);\n\t--ck-color-button-on-disabled-background: \t\t\t\t\thsl(0, 0%, 87%);\n\n\t--ck-color-button-action-background: \t\t\t\t\t\tvar(--ck-color-base-action);\n\t--ck-color-button-action-hover-background: \t\t\t\t\thsl(104, 44%, 43%);\n\t--ck-color-button-action-active-background: \t\t\t\thsl(104, 44%, 41%);\n\t--ck-color-button-action-active-shadow: \t\t\t\t\thsl(104, 44%, 36%);\n\t--ck-color-button-action-disabled-background: \t\t\t\thsl(104, 44%, 58%);\n\t--ck-color-button-action-text: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t--ck-color-button-save: \t\t\t\t\t\t\t\t\thsl(120, 100%, 27%);\n\t--ck-color-button-cancel: \t\t\t\t\t\t\t\t\thsl(15, 100%, 43%);\n\n\t--ck-color-switch-button-off-background:\t\t\t\t\thsl(0, 0%, 69%);\n\t--ck-color-switch-button-off-hover-background:\t\t\t\thsl(0, 0%, 64%);\n\t--ck-color-switch-button-on-background:\t\t\t\t\t\tvar(--ck-color-button-action-background);\n\t--ck-color-switch-button-on-hover-background:\t\t\t\thsl(104, 44%, 43%);\n\t--ck-color-switch-button-inner-background:\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-switch-button-inner-shadow:\t\t\t\t\t\thsla(0, 0%, 0%, 0.1);\n\n\t/* -- Dropdown ------------------------------------------------------------------------------ */\n\n\t--ck-color-dropdown-panel-background: \t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-dropdown-panel-border: \t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Input --------------------------------------------------------------------------------- */\n\n\t--ck-color-input-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-input-border: \t\t\t\t\t\t\t\t\thsl(0, 0%, 78%);\n\t--ck-color-input-error-border:\t\t\t\t\t\t\t\tvar(--ck-color-base-error);\n\t--ck-color-input-text: \t\t\t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-input-disabled-background: \t\t\t\t\t\thsl(0, 0%, 95%);\n\t--ck-color-input-disabled-border: \t\t\t\t\t\t\thsl(0, 0%, 78%);\n\t--ck-color-input-disabled-text: \t\t\t\t\t\t\thsl(0, 0%, 46%);\n\n\t/* -- List ---------------------------------------------------------------------------------- */\n\n\t--ck-color-list-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-list-button-hover-background: \t\t\t\t\tvar(--ck-color-button-default-hover-background);\n\t--ck-color-list-button-on-background: \t\t\t\t\t\tvar(--ck-color-base-active);\n\t--ck-color-list-button-on-background-focus: \t\t\t\tvar(--ck-color-base-active-focus);\n\t--ck-color-list-button-on-text:\t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t/* -- Panel --------------------------------------------------------------------------------- */\n\n\t--ck-color-panel-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-panel-border: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Toolbar ------------------------------------------------------------------------------- */\n\n\t--ck-color-toolbar-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-foreground);\n\t--ck-color-toolbar-border: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Tooltip ------------------------------------------------------------------------------- */\n\n\t--ck-color-tooltip-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-tooltip-text: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t/* -- Engine -------------------------------------------------------------------------------- */\n\n\t--ck-color-engine-placeholder-text: \t\t\t\t\t\thsl(0, 0%, 44%);\n\n\t/* -- Upload -------------------------------------------------------------------------------- */\n\n\t--ck-color-upload-bar-background:\t\t \t\t\t\t\thsl(209, 92%, 70%);\n\n\t/* -- Link -------------------------------------------------------------------------------- */\n\n\t--ck-color-link-default:\t\t\t\t\t\t\t\t\thsl(240, 100%, 47%);\n\t--ck-color-link-selected-background:\t\t\t\t\t\thsla(201, 100%, 56%, 0.1);\n\t--ck-color-link-fake-selection:\t\t\t\t\t\t\t\thsla(201, 100%, 56%, 0.3);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/**\n\t * An opacity value of disabled UI item.\n\t */\n\t--ck-disabled-opacity: .5;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/**\n\t * The geometry of the of focused element's outer shadow.\n\t */\n\t--ck-focus-outer-shadow-geometry: 0 0 0 3px;\n\n\t/**\n\t * A visual style of focused element's outer shadow.\n\t */\n\t--ck-focus-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);\n\n\t/**\n\t * A visual style of focused element's outer shadow (when disabled).\n\t */\n\t--ck-focus-disabled-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);\n\n\t/**\n\t * A visual style of focused element's outer shadow (when has errors).\n\t */\n\t--ck-focus-error-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);\n\n\t/**\n\t * A visual style of focused element's border or outline.\n\t */\n\t--ck-focus-ring: 1px solid var(--ck-color-focus-border);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-font-size-base: 13px;\n\t--ck-line-height-base: 1.84615;\n\t--ck-font-face: Helvetica, Arial, Tahoma, Verdana, Sans-Serif;\n\n\t--ck-font-size-tiny: 0.7em;\n\t--ck-font-size-small: 0.75em;\n\t--ck-font-size-normal: 1em;\n\t--ck-font-size-big: 1.4em;\n\t--ck-font-size-large: 1.8em;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/* This is super-important. This is **manually** adjusted so a button without an icon\n\tis never smaller than a button with icon, additionally making sure that text-less buttons\n\tare perfect squares. The value is also shared by other components which should stay "in-line"\n\twith buttons. */\n\t--ck-ui-component-min-height: 2.3em;\n}\n\n/**\n * Resets an element, ignoring its children.\n */\n.ck.ck-reset,\n.ck.ck-reset_all,\n.ck.ck-reset_all * {\n\t/* Do not include inheritable rules here. */\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tbackground: transparent;\n\ttext-decoration: none;\n\tvertical-align: middle;\n\ttransition: none;\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/105 */\n\tword-wrap: break-word;\n}\n\n/**\n * Resets an element AND its children.\n */\n.ck.ck-reset_all,\n.ck.ck-reset_all * {\n\t/* These are rule inherited by all children elements. */\n\tborder-collapse: collapse;\n\tfont: normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);\n\tcolor: var(--ck-color-text);\n\ttext-align: left;\n\twhite-space: nowrap;\n\tcursor: auto;\n\tfloat: none;\n}\n\n.ck.ck-reset_all {\n\t& .ck-rtl * {\n\t\ttext-align: right;\n\t}\n\n\t& iframe {\n\t\t/* For IE */\n\t\tvertical-align: inherit;\n\t}\n\n\t& textarea {\n\t\twhite-space: pre-wrap;\n\t}\n\n\t& textarea,\n\t& input[type="text"],\n\t& input[type="password"] {\n\t\tcursor: text;\n\t}\n\n\t& textarea[disabled],\n\t& input[type="text"][disabled],\n\t& input[type="password"][disabled] {\n\t\tcursor: default;\n\t}\n\n\t& fieldset {\n\t\tpadding: 10px;\n\t\tborder: 2px groove hsl(255, 7%, 88%);\n\t}\n\n\t& button::-moz-focus-inner {\n\t\t/* See http://stackoverflow.com/questions/5517744/remove-extra-button-spacing-padding-in-firefox */\n\t\tpadding: 0;\n\t\tborder: 0\n\t}\n}\n\n/**\n * Default UI rules for RTL languages.\n */\n.ck[dir="rtl"],\n.ck[dir="rtl"] .ck {\n\ttext-align: right;\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Default border-radius value.\n */\n:root{\n\t--ck-border-radius: 2px;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/**\n\t * A visual style of element's inner shadow (i.e. input).\n\t */\n\t--ck-inner-shadow: 2px 2px 3px var(--ck-color-shadow-inner) inset;\n\n\t/**\n\t * A visual style of element's drop shadow (i.e. panel).\n\t */\n\t--ck-drop-shadow: 0 1px 2px 1px var(--ck-color-shadow-drop);\n\n\t/**\n\t * A visual style of element's active shadow (i.e. comment or suggestion).\n\t */\n\t--ck-drop-shadow-active: 0 3px 6px 1px var(--ck-color-shadow-drop-active);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-spacing-unit: \t\t\t\t\t\t0.6em;\n\t--ck-spacing-large: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 1.5);\n\t--ck-spacing-standard: \t\t\t\t\tvar(--ck-spacing-unit);\n\t--ck-spacing-medium: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.8);\n\t--ck-spacing-small: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.5);\n\t--ck-spacing-tiny: \t\t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.3);\n\t--ck-spacing-extra-tiny: \t\t\t\tcalc(var(--ck-spacing-unit) * 0.16);\n}\n"],sourceRoot:""}]);const a=s},3488:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.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:0 var(--ck-spacing-small);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height)}.ck .ck-size-view.ck-orientation-above-center,.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)}.ck .ck-size-view.ck-orientation-above-center{top:calc(var(--ck-resizer-tooltip-height)*-1);left:50%;transform:translate(-50%)}: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));top:0}.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:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-focus-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.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))}","",{version:3,sources:["webpack://./../ckeditor5-widget/theme/widget.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widget.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,MACC,+CAAgD,CAChD,6CAAsD,CACtD,uCAAgD,CAEhD,kDAAmD,CACnD,gCAAiC,CACjC,kEACD,CAOA,8DAEC,iBAqBD,CAnBC,4EACC,iBAOD,CALC,qFAGC,aACD,CASD,iLACC,kBACD,CAGD,kBACC,qDAAsD,CACtD,0CAA2C,CAC3C,qDAAsD,CACtD,6CAA8C,CAC9C,kCAAmC,CACnC,aAAc,CACd,iCAAkC,CAClC,uCAAwC,CACxC,4CAoCD,CAlCC,8NAKC,iBACD,CAEA,0CACC,oCAAqC,CACrC,qCACD,CAEA,2CACC,oCAAqC,CACrC,sCACD,CAEA,8CACC,uCAAwC,CACxC,sCACD,CAEA,6CACC,uCAAwC,CACxC,qCACD,CAGA,8CACC,6CAAgD,CAChD,QAAS,CACT,yBACD,CCjFD,MACC,iCAAkC,CAClC,kCAAmC,CACnC,4CAA6C,CAC7C,wCAAyC,CAEzC,wCAAiD,CACjD,sCAAkD,CAClD,2EAA4E,CAC5E,yEACD,CAEA,eACC,gDAAiD,CACjD,mBAAoB,CACpB,yBAA0B,CAC1B,6GAUD,CARC,0EAEC,6EACD,CAEA,qBACC,iDACD,CAGD,gCACC,4BAWD,CAPC,yGC/BA,YAAa,CACb,2BAA2B,CCF3B,qCAA8B,CFqC7B,iEACD,CAIA,4EACC,WAAY,CACZ,qBAAsB,CAGtB,4BAA6B,CAC7B,SAAU,CAMV,6SAG6F,CAG7F,iEAAkE,CAGlE,2BAA4B,CAC5B,mDAAoD,CACpD,KAqBD,CAnBC,qFAEC,wCAAyC,CACzC,yCAA0C,CAC1C,oDASD,CANC,kHACC,SAAU,CAGV,+DACD,CAID,wHACC,SACD,CAID,kFACC,SAAU,CACV,oDACD,CAKC,oMACC,SAAU,CACV,6CAMD,CAHC,gRACC,SACD,CAOH,qFACC,SAAU,CACV,oDACD,CAGA,gDAEC,eAkBD,CAhBC,yEAOC,iCACD,CAGC,gOAEC,gDACD,CAOD,wIAEC,mDAQD,CALE,ghBAEC,gDACD,CAKH,yKAOC,yDACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-resizer: var(--ck-color-focus-border);\n\t--ck-color-resizer-tooltip-background: hsl(0, 0%, 15%);\n\t--ck-color-resizer-tooltip-text: hsl(0, 0%, 95%);\n\n\t--ck-resizer-border-radius: var(--ck-border-radius);\n\t--ck-resizer-tooltip-offset: 10px;\n\t--ck-resizer-tooltip-height: calc(var(--ck-spacing-small) * 2 + 10px);\n}\n\n.ck .ck-widget {\n\t/* This is neccessary for type around UI to be positioned properly. */\n\tposition: relative;\n}\n\n.ck .ck-widget.ck-widget_with-selection-handle {\n\t/* Make the widget wrapper a relative positioning container for the drag handle. */\n\tposition: relative;\n\n\t& .ck-widget__selection-handle {\n\t\tposition: absolute;\n\n\t\t& .ck-icon {\n\t\t\t/* Make sure the icon in not a subject to font-size or line-height to avoid\n\t\t\tunnecessary spacing around it. */\n\t\t\tdisplay: block;\n\t\t}\n\t}\n\n\t/* Show the selection handle on mouse hover over the widget, but not for nested widgets. */\n\t&:hover > .ck-widget__selection-handle {\n\t\tvisibility: visible;\n\t}\n\n\t/* Show the selection handle when the widget is selected, but not for nested widgets. */\n\t&.ck-widget_selected > .ck-widget__selection-handle {\n\t\tvisibility: visible;\n\t}\n}\n\n.ck .ck-size-view {\n\tbackground: var(--ck-color-resizer-tooltip-background);\n\tcolor: var(--ck-color-resizer-tooltip-text);\n\tborder: 1px solid var(--ck-color-resizer-tooltip-text);\n\tborder-radius: var(--ck-resizer-border-radius);\n\tfont-size: var(--ck-font-size-tiny);\n\tdisplay: block;\n\tpadding: 0 var(--ck-spacing-small);\n\theight: var(--ck-resizer-tooltip-height);\n\tline-height: var(--ck-resizer-tooltip-height);\n\n\t&.ck-orientation-top-left,\n\t&.ck-orientation-top-right,\n\t&.ck-orientation-bottom-right,\n\t&.ck-orientation-bottom-left,\n\t&.ck-orientation-above-center {\n\t\tposition: absolute;\n\t}\n\n\t&.ck-orientation-top-left {\n\t\ttop: var(--ck-resizer-tooltip-offset);\n\t\tleft: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-top-right {\n\t\ttop: var(--ck-resizer-tooltip-offset);\n\t\tright: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-bottom-right {\n\t\tbottom: var(--ck-resizer-tooltip-offset);\n\t\tright: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-bottom-left {\n\t\tbottom: var(--ck-resizer-tooltip-offset);\n\t\tleft: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t/* Class applied if the widget is too small to contain the size label */\n\t&.ck-orientation-above-center {\n\t\ttop: calc(var(--ck-resizer-tooltip-height) * -1);\n\t\tleft: 50%;\n\t\ttransform: translate(-50%);\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../mixins/_focus.css";\n@import "../mixins/_shadow.css";\n\n:root {\n\t--ck-widget-outline-thickness: 3px;\n\t--ck-widget-handler-icon-size: 16px;\n\t--ck-widget-handler-animation-duration: 200ms;\n\t--ck-widget-handler-animation-curve: ease;\n\n\t--ck-color-widget-blurred-border: hsl(0, 0%, 87%);\n\t--ck-color-widget-hover-border: hsl(43, 100%, 62%);\n\t--ck-color-widget-editable-focus-background: var(--ck-color-base-background);\n\t--ck-color-widget-drag-handler-icon-color: var(--ck-color-base-background);\n}\n\n.ck .ck-widget {\n\toutline-width: var(--ck-widget-outline-thickness);\n\toutline-style: solid;\n\toutline-color: transparent;\n\ttransition: outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border);\n\t}\n\n\t&:hover {\n\t\toutline-color: var(--ck-color-widget-hover-border);\n\t}\n}\n\n.ck .ck-editor__nested-editable {\n\tborder: 1px solid transparent;\n\n\t/* The :focus style is applied before .ck-editor__nested-editable_focused class is rendered in the view.\n\tThese styles show a different border for a blink of an eye, so `:focus` need to have same styles applied. */\n\t&.ck-editor__nested-editable_focused,\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-inner-shadow);\n\n\t\tbackground-color: var(--ck-color-widget-editable-focus-background);\n\t}\n}\n\n.ck .ck-widget.ck-widget_with-selection-handle {\n\t& .ck-widget__selection-handle {\n\t\tpadding: 4px;\n\t\tbox-sizing: border-box;\n\n\t\t/* Background and opacity will be animated as the handler shows up or the widget gets selected. */\n\t\tbackground-color: transparent;\n\t\topacity: 0;\n\n\t\t/* Transition:\n\t\t * background-color for the .ck-widget_selected state change,\n\t\t * visibility for hiding the handler,\n\t\t * opacity for the proper look of the icon when the handler disappears. */\n\t\ttransition:\n\t\t\tbackground-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),\n\t\t\tvisibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),\n\t\t\topacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n\t\t/* Make only top corners round. */\n\t\tborder-radius: var(--ck-border-radius) var(--ck-border-radius) 0 0;\n\n\t\t/* Place the drag handler outside the widget wrapper. */\n\t\ttransform: translateY(-100%);\n\t\tleft: calc(0px - var(--ck-widget-outline-thickness));\n\t\ttop: 0;\n\n\t\t& .ck-icon {\n\t\t\t/* Make sure the dimensions of the icon are independent of the fon-size of the content. */\n\t\t\twidth: var(--ck-widget-handler-icon-size);\n\t\t\theight: var(--ck-widget-handler-icon-size);\n\t\t\tcolor: var(--ck-color-widget-drag-handler-icon-color);\n\n\t\t\t/* The "selected" part of the icon is invisible by default */\n\t\t\t& .ck-icon__selected-indicator {\n\t\t\t\topacity: 0;\n\n\t\t\t\t/* Note: The animation is longer on purpose. Simply feels better. */\n\t\t\t\ttransition: opacity 300ms var(--ck-widget-handler-animation-curve);\n\t\t\t}\n\t\t}\n\n\t\t/* Advertise using the look of the icon that once clicked the handler, the widget will be selected. */\n\t\t&:hover .ck-icon .ck-icon__selected-indicator {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n\t/* Show the selection handler on mouse hover over the widget, but not for nested widgets. */\n\t&:hover > .ck-widget__selection-handle {\n\t\topacity: 1;\n\t\tbackground-color: var(--ck-color-widget-hover-border);\n\t}\n\n\t/* Show the selection handler when the widget is selected, but not for nested widgets. */\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\t& > .ck-widget__selection-handle {\n\t\t\topacity: 1;\n\t\t\tbackground-color: var(--ck-color-focus-border);\n\n\t\t\t/* When the widget is selected, notify the user using the proper look of the icon. */\n\t\t\t& .ck-icon .ck-icon__selected-indicator {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/* In a RTL environment, align the selection handler to the right side of the widget */\n/* stylelint-disable-next-line no-descending-specificity */\n.ck[dir="rtl"] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle {\n\tleft: auto;\n\tright: calc(0px - var(--ck-widget-outline-thickness));\n}\n\n/* https://github.com/ckeditor/ckeditor5/issues/6415 */\n.ck.ck-editor__editable.ck-read-only .ck-widget {\n\t/* Prevent the :hover outline from showing up because of the used outline-color transition. */\n\ttransition: none;\n\n\t&:not(.ck-widget_selected) {\n\t\t/* Disable visual effects of hover/active widget when CKEditor is in readOnly mode.\n\t\t * See: https://github.com/ckeditor/ckeditor5/issues/1261\n\t\t *\n\t\t * Leave the unit because this custom property is used in calc() by other features.\n\t\t * See: https://github.com/ckeditor/ckeditor5/issues/6775\n\t\t */\n\t\t--ck-widget-outline-thickness: 0px;\n\t}\n\n\t&.ck-widget_with-selection-handle {\n\t\t& .ck-widget__selection-handle,\n\t\t& .ck-widget__selection-handle:hover {\n\t\t\tbackground: var(--ck-color-widget-blurred-border);\n\t\t}\n\t}\n}\n\n/* Style the widget when it\'s selected but the editable it belongs to lost focus. */\n/* stylelint-disable-next-line no-descending-specificity */\n.ck.ck-editor__editable.ck-blurred .ck-widget {\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\toutline-color: var(--ck-color-widget-blurred-border);\n\n\t\t&.ck-widget_with-selection-handle {\n\t\t\t& > .ck-widget__selection-handle,\n\t\t\t& > .ck-widget__selection-handle:hover {\n\t\t\t\tbackground: var(--ck-color-widget-blurred-border);\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck.ck-editor__editable > .ck-widget.ck-widget_with-selection-handle:first-child,\n.ck.ck-editor__editable blockquote > .ck-widget.ck-widget_with-selection-handle:first-child {\n\t/* Do not crop selection handler if a widget is a first-child in the blockquote or in the root editable.\n\tIn fact, anything with overflow: hidden.\n\thttps://github.com/ckeditor/ckeditor5-block-quote/issues/28\n\thttps://github.com/ckeditor/ckeditor5-widget/issues/44\n\thttps://github.com/ckeditor/ckeditor5-widget/issues/66 */\n\tmargin-top: calc(1em + var(--ck-widget-handler-icon-size));\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},8506:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;position:absolute;pointer-events:none;left:0;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{position:absolute;pointer-events:all}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{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)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{top:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}","",{version:3,sources:["webpack://./../ckeditor5-widget/theme/widgetresize.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widgetresize.css"],names:[],mappings:"AAKA,4BAEC,iBACD,CAEA,wBACC,YAAa,CACb,iBAAkB,CAGlB,mBAAoB,CAEpB,MAAO,CACP,KACD,CAGC,2EACC,aACD,CAGD,gCACC,iBAAkB,CAGlB,kBAWD,CATC,4IAEC,kBACD,CAEA,4IAEC,kBACD,CCpCD,MACC,sBAAuB,CAGvB,yDAAiE,CACjE,6BACD,CAEA,wBACC,yCACD,CAEA,gCACC,4BAA6B,CAC7B,6BAA8B,CAC9B,uCAAwC,CACxC,gDAA6D,CAC7D,6CAqBD,CAnBC,oEACC,4BAA6B,CAC7B,6BACD,CAEA,qEACC,4BAA6B,CAC7B,8BACD,CAEA,wEACC,+BAAgC,CAChC,8BACD,CAEA,uEACC,+BAAgC,CAChC,6BACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-widget_with-resizer {\n\t/* Make the widget wrapper a relative positioning container for the drag handle. */\n\tposition: relative;\n}\n\n.ck .ck-widget__resizer {\n\tdisplay: none;\n\tposition: absolute;\n\n\t/* The wrapper itself should not interfere with the pointer device, only the handles should. */\n\tpointer-events: none;\n\n\tleft: 0;\n\ttop: 0;\n}\n\n.ck-focused .ck-widget_with-resizer.ck-widget_selected {\n\t& > .ck-widget__resizer {\n\t\tdisplay: block;\n\t}\n}\n\n.ck .ck-widget__resizer__handle {\n\tposition: absolute;\n\n\t/* Resizers are the only UI elements that should interfere with a pointer device. */\n\tpointer-events: all;\n\n\t&.ck-widget__resizer__handle-top-left,\n\t&.ck-widget__resizer__handle-bottom-right {\n\t\tcursor: nwse-resize;\n\t}\n\n\t&.ck-widget__resizer__handle-top-right,\n\t&.ck-widget__resizer__handle-bottom-left {\n\t\tcursor: nesw-resize;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-resizer-size: 10px;\n\n\t/* Set the resizer with a 50% offset. */\n\t--ck-resizer-offset: calc( ( var(--ck-resizer-size) / -2 ) - 2px);\n\t--ck-resizer-border-width: 1px;\n}\n\n.ck .ck-widget__resizer {\n\toutline: 1px solid var(--ck-color-resizer);\n}\n\n.ck .ck-widget__resizer__handle {\n\twidth: var(--ck-resizer-size);\n\theight: var(--ck-resizer-size);\n\tbackground: var(--ck-color-focus-border);\n\tborder: var(--ck-resizer-border-width) solid hsl(0, 0%, 100%);\n\tborder-radius: var(--ck-resizer-border-radius);\n\n\t&.ck-widget__resizer__handle-top-left {\n\t\ttop: var(--ck-resizer-offset);\n\t\tleft: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-top-right {\n\t\ttop: var(--ck-resizer-offset);\n\t\tright: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-bottom-right {\n\t\tbottom: var(--ck-resizer-offset);\n\t\tright: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-bottom-left {\n\t\tbottom: var(--ck-resizer-offset);\n\t\tleft: var(--ck-resizer-offset);\n\t}\n}\n"],sourceRoot:""}]);const a=s},4921:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,'.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(var(--ck-widget-outline-thickness)*-0.5);left:min(10%,30px);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-0.5);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(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{top:calc(var(--ck-widget-outline-thickness)*-1 - 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(var(--ck-widget-outline-thickness)*-1 - 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[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.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}}',"",{version:3,sources:["webpack://./../ckeditor5-widget/theme/widgettypearound.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widgettypearound.css"],names:[],mappings:"AASC,+CACC,aAAc,CACd,iBAAkB,CAClB,eAAgB,CAChB,2BAwBD,CAtBC,mDACC,iBAAkB,CAClB,OAAQ,CACR,QAAS,CACT,qCACD,CAEA,qFAEC,iDAAoD,CACpD,kBAAoB,CAEpB,0BACD,CAEA,oFAEC,oDAAuD,CACvD,mBAAqB,CAErB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,8CACC,GACC,6HACD,CACA,IACC,6HACD,CACA,GACC,+HACD,CACD,CAEA,kDACC,GACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,GACC,SACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-widget {\n\t/*\n\t * Styles of the type around buttons\n\t */\n\t& .ck-widget__type-around__button {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\toverflow: hidden;\n\t\tz-index: var(--ck-z-default);\n\n\t\t& svg {\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: 50%;\n\t\t\tz-index: calc(var(--ck-z-default) + 2);\n\t\t}\n\n\t\t&.ck-widget__type-around__button_before {\n\t\t\t/* Place it in the middle of the outline */\n\t\t\ttop: calc(-0.5 * var(--ck-widget-outline-thickness));\n\t\t\tleft: min(10%, 30px);\n\n\t\t\ttransform: translateY(-50%);\n\t\t}\n\n\t\t&.ck-widget__type-around__button_after {\n\t\t\t/* Place it in the middle of the outline */\n\t\t\tbottom: calc(-0.5 * var(--ck-widget-outline-thickness));\n\t\t\tright: min(10%, 30px);\n\n\t\t\ttransform: translateY(50%);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the buttons when:\n\t * - the widget is selected,\n\t * - or the button is being hovered (regardless of the widget state).\n\t */\n\t&.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\n\t& > .ck-widget__type-around > .ck-widget__type-around__button:hover {\n\t\t&::after {\n\t\t\tcontent: "";\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\ttop: 1px;\n\t\t\tleft: 1px;\n\t\t\tz-index: calc(var(--ck-z-default) + 1);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard.\n\t */\n\t& > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tdisplay: none;\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t}\n\n\t/*\n\t * When the widget is hovered the "fake caret" would normally be narrower than the\n\t * extra outline displayed around the widget. Let\'s extend the "fake caret" to match\n\t * the full width of the widget.\n\t */\n\t&:hover > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tleft: calc( -1 * var(--ck-widget-outline-thickness) );\n\t\tright: calc( -1 * var(--ck-widget-outline-thickness) );\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" when it should be displayed before the widget (backward keyboard navigation).\n\t */\n\t&.ck-widget_type-around_show-fake-caret_before > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\ttop: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\n\t\tdisplay: block;\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" when it should be displayed after the widget (forward keyboard navigation).\n\t */\n\t&.ck-widget_type-around_show-fake-caret_after > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tbottom: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\n\t\tdisplay: block;\n\t}\n}\n\n/*\n * Integration with the read-only mode of the editor.\n */\n.ck.ck-editor__editable.ck-read-only .ck-widget__type-around {\n\tdisplay: none;\n}\n\n/*\n * Integration with the restricted editing mode (feature) of the editor.\n */\n.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around {\n\tdisplay: none;\n}\n\n/*\n * Integration with the #isEnabled property of the WidgetTypeAround plugin.\n */\n.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around {\n\tdisplay: none;\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-widget-type-around-button-size: 20px;\n\t--ck-color-widget-type-around-button-active: var(--ck-color-focus-border);\n\t--ck-color-widget-type-around-button-hover: var(--ck-color-widget-hover-border);\n\t--ck-color-widget-type-around-button-blurred-editable: var(--ck-color-widget-blurred-border);\n\t--ck-color-widget-type-around-button-radar-start-alpha: 0;\n\t--ck-color-widget-type-around-button-radar-end-alpha: .3;\n\t--ck-color-widget-type-around-button-icon: var(--ck-color-base-background);\n}\n\n@define-mixin ck-widget-type-around-button-visible {\n\topacity: 1;\n\tpointer-events: auto;\n}\n\n@define-mixin ck-widget-type-around-button-hidden {\n\topacity: 0;\n\tpointer-events: none;\n}\n\n.ck .ck-widget {\n\t/*\n\t * Styles of the type around buttons\n\t */\n\t& .ck-widget__type-around__button {\n\t\twidth: var(--ck-widget-type-around-button-size);\n\t\theight: var(--ck-widget-type-around-button-size);\n\t\tbackground: var(--ck-color-widget-type-around-button);\n\t\tborder-radius: 100px;\n\t\ttransition: 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);\n\n\t\t@mixin ck-widget-type-around-button-hidden;\n\n\t\t& svg {\n\t\t\twidth: 10px;\n\t\t\theight: 8px;\n\t\t\ttransform: translate(-50%,-50%);\n\t\t\ttransition: transform .5s ease;\n\t\t\tmargin-top: 1px;\n\n\t\t\t& * {\n\t\t\t\tstroke-dasharray: 10;\n\t\t\t\tstroke-dashoffset: 0;\n\n\t\t\t\tfill: none;\n\t\t\t\tstroke: var(--ck-color-widget-type-around-button-icon);\n\t\t\t\tstroke-width: 1.5px;\n\t\t\t\tstroke-linecap: round;\n\t\t\t\tstroke-linejoin: round;\n\t\t\t}\n\n\t\t\t& line {\n\t\t\t\tstroke-dasharray: 7;\n\t\t\t}\n\t\t}\n\n\t\t&:hover {\n\t\t\t/*\n\t\t\t * Display the "sonar" around the button when hovered.\n\t\t\t */\n\t\t\tanimation: ck-widget-type-around-button-sonar 1s ease infinite;\n\n\t\t\t/*\n\t\t\t * Animate active button\'s icon.\n\t\t\t */\n\t\t\t& svg {\n\t\t\t\t& polyline {\n\t\t\t\t\tanimation: ck-widget-type-around-arrow-dash 2s linear;\n\t\t\t\t}\n\n\t\t\t\t& line {\n\t\t\t\t\tanimation: ck-widget-type-around-arrow-tip-dash 2s linear;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Show type around buttons when the widget gets selected or being hovered.\n\t */\n\t&.ck-widget_selected,\n\t&:hover {\n\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t@mixin ck-widget-type-around-button-visible;\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the buttons when the widget is NOT selected (but the buttons are visible\n\t * and still can be hovered).\n\t */\n\t&:not(.ck-widget_selected) > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\tbackground: var(--ck-color-widget-type-around-button-hover);\n\t}\n\n\t/*\n\t * Styles for the buttons when:\n\t * - the widget is selected,\n\t * - or the button is being hovered (regardless of the widget state).\n\t */\n\t&.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\n\t& > .ck-widget__type-around > .ck-widget__type-around__button:hover {\n\t\tbackground: var(--ck-color-widget-type-around-button-active);\n\n\t\t&::after {\n\t\t\twidth: calc(var(--ck-widget-type-around-button-size) - 2px);\n\t\t\theight: calc(var(--ck-widget-type-around-button-size) - 2px);\n\t\t\tborder-radius: 100px;\n\t\t\tbackground: linear-gradient(135deg, hsla(0,0%,100%,0) 0%, hsla(0,0%,100%,.3) 100%);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the "before" button when the widget has a selection handle. Because some space\n\t * is consumed by the handle, the button must be moved slightly to the right to let it breathe.\n\t */\n\t&.ck-widget_with-selection-handle > .ck-widget__type-around > .ck-widget__type-around__button_before {\n\t\tmargin-left: 20px;\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard.\n\t */\n\t& .ck-widget__type-around__fake-caret {\n\t\tpointer-events: none;\n\t\theight: 1px;\n\t\tanimation: ck-widget-type-around-fake-caret-pulse linear 1s infinite normal forwards;\n\n\t\t/*\n\t\t * The semi-transparent-outline+background combo improves the contrast\n\t\t * when the background underneath the fake caret is dark.\n\t\t */\n\t\toutline: solid 1px hsla(0, 0%, 100%, .5);\n\t\tbackground: var(--ck-color-base-text);\n\t}\n\n\t/*\n\t * Styles of the widget when the "fake caret" is blinking (e.g. upon keyboard navigation).\n\t * Despite the widget being physically selected in the model, its outline should disappear.\n\t */\n\t&.ck-widget_selected {\n\t\t&.ck-widget_type-around_show-fake-caret_before,\n\t\t&.ck-widget_type-around_show-fake-caret_after {\n\t\t\toutline-color: transparent;\n\t\t}\n\t}\n\n\t&.ck-widget_type-around_show-fake-caret_before,\n\t&.ck-widget_type-around_show-fake-caret_after {\n\t\t/*\n\t\t * When the "fake caret" is visible we simulate that the widget is not selected\n\t\t * (despite being physically selected), so the outline color should be for the\n\t\t * unselected widget.\n\t\t */\n\t\t&.ck-widget_selected:hover {\n\t\t\toutline-color: var(--ck-color-widget-hover-border);\n\t\t}\n\n\t\t/*\n\t\t * Styles of the type around buttons when the "fake caret" is blinking (e.g. upon keyboard navigation).\n\t\t * In this state, the type around buttons would collide with the fake carets so they should disappear.\n\t\t */\n\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t@mixin ck-widget-type-around-button-hidden;\n\t\t}\n\n\t\t/*\n\t\t * Fake horizontal caret integration with the selection handle. When the caret is visible, simply\n\t\t * hide the handle because it intersects with the caret (and does not make much sense anyway).\n\t\t */\n\t\t&.ck-widget_with-selection-handle {\n\t\t\t&.ck-widget_selected,\n\t\t\t&.ck-widget_selected:hover {\n\t\t\t\t& > .ck-widget__selection-handle {\n\t\t\t\t\topacity: 0\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Fake horizontal caret integration with the resize UI. When the caret is visible, simply\n\t\t * hide the resize UI because it creates too much noise. It can be visible when the user\n\t\t * hovers the widget, though.\n\t\t */\n\t\t&.ck-widget_selected.ck-widget_with-resizer > .ck-widget__resizer {\n\t\t\topacity: 0\n\t\t}\n\t}\n}\n\n/*\n * Styles for the "before" button when the widget has a selection handle in an RTL environment.\n * The selection handler is aligned to the right side of the widget so there is no need to create\n * additional space for it next to the "before" button.\n */\n.ck[dir="rtl"] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around > .ck-widget__type-around__button_before {\n\tmargin-left: 0;\n\tmargin-right: 20px;\n}\n\n/*\n * Hide type around buttons when the widget is selected as a child of a selected\n * nested editable (e.g. mulit-cell table selection).\n *\n * See https://github.com/ckeditor/ckeditor5/issues/7263.\n */\n.ck-editor__nested-editable.ck-editor__editable_selected {\n\t& .ck-widget {\n\t\t&.ck-widget_selected,\n\t\t&:hover {\n\t\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t\t@mixin ck-widget-type-around-button-hidden;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/*\n * Styles for the buttons when the widget is selected but the user clicked outside of the editor (blurred the editor).\n */\n.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button:not(:hover) {\n\tbackground: var(--ck-color-widget-type-around-button-blurred-editable);\n\n\t& svg * {\n\t\tstroke: hsl(0,0%,60%);\n\t}\n}\n\n@keyframes ck-widget-type-around-arrow-dash {\n\t0% {\n\t\tstroke-dashoffset: 10;\n\t}\n\t20%, 100% {\n\t\tstroke-dashoffset: 0;\n\t}\n}\n\n@keyframes ck-widget-type-around-arrow-tip-dash {\n\t0%, 20% {\n\t\tstroke-dashoffset: 7;\n\t}\n\t40%, 100% {\n\t\tstroke-dashoffset: 0;\n\t}\n}\n\n@keyframes ck-widget-type-around-button-sonar {\n\t0% {\n\t\tbox-shadow: 0 0 0 0 hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));\n\t}\n\t50% {\n\t\tbox-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-end-alpha));\n\t}\n\t100% {\n\t\tbox-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));\n\t}\n}\n\n@keyframes ck-widget-type-around-fake-caret-pulse {\n\t0% {\n\t\topacity: 1;\n\t}\n\t49% {\n\t\topacity: 1;\n\t}\n\t50% {\n\t\topacity: 0;\n\t}\n\t99% {\n\t\topacity: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}\n'],sourceRoot:""}]);const a=s},2609:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,o){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(o)for(var r=0;r<this.length;r++){var s=this[r][0];null!=s&&(i[s]=!0)}for(var a=0;a<t.length;a++){var l=[].concat(t[a]);o&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},1799:t=>{function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var o,i,r=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(o=n.next()).done)&&(r.push(o.value),!e||r.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);"Object"===o&&t.constructor&&(o=t.constructor.name);if("Map"===o||"Set"===o)return Array.from(t);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return n(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}t.exports=function(t){var n=e(t,4),o=n[1],i=n[3];if(!i)return o;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),a="/*# ".concat(s," */"),l=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[o].concat(l).concat([a]).join("\n")}return[o].join("\n")}},6062:(t,e,n)=>{var o,i=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},r=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),s=[];function a(t){for(var e=-1,n=0;n<s.length;n++)if(s[n].identifier===t){e=n;break}return e}function l(t,e){for(var n={},o=[],i=0;i<t.length;i++){var r=t[i],l=e.base?r[0]+e.base:r[0],c=n[l]||0,d="".concat(l," ").concat(c);n[l]=c+1;var h=a(d),u={css:r[1],media:r[2],sourceMap:r[3]};-1!==h?(s[h].references++,s[h].updater(u)):s.push({identifier:d,updater:f(u,e),references:1}),o.push(d)}return o}function c(t){var e=document.createElement("style"),o=t.attributes||{};if(void 0===o.nonce){var i=n.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(t){e.setAttribute(t,o[t])})),"function"==typeof t.insert)t.insert(e);else{var s=r(t.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(e)}return e}var d,h=(d=[],function(t,e){return d[t]=e,d.filter(Boolean).join("\n")});function u(t,e,n,o){var i=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(t.styleSheet)t.styleSheet.cssText=h(e,i);else{var r=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}function g(t,e,n){var o=n.css,i=n.media,r=n.sourceMap;if(i?t.setAttribute("media",i):t.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}var m=null,p=0;function f(t,e){var n,o,i;if(e.singleton){var r=p++;n=m||(m=c(e)),o=u.bind(null,n,r,!1),i=u.bind(null,n,r,!0)}else n=c(e),o=g.bind(null,n,e),i=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=i());var n=l(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var o=0;o<n.length;o++){var i=a(n[o]);s[i].references--}for(var r=l(t,e),c=0;c<n.length;c++){var d=a(n[c]);0===s[d].references&&(s[d].updater(),s.splice(d,1))}n=r}}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={id:o,exports:{}};return t[o](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var o={};return(()=>{n.d(o,{default:()=>_S});const t=function(){return function t(){t.called=!0}};class e{constructor(e,n){this.source=e,this.name=n,this.path=[],this.stop=t(),this.off=t()}}const i=new Array(256).fill().map(((t,e)=>("0"+e.toString(16)).slice(-2)));function r(){const t=4294967296*Math.random()>>>0,e=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0;return"e"+i[t>>0&255]+i[t>>8&255]+i[t>>16&255]+i[t>>24&255]+i[e>>0&255]+i[e>>8&255]+i[e>>16&255]+i[e>>24&255]+i[n>>0&255]+i[n>>8&255]+i[n>>16&255]+i[n>>24&255]+i[o>>0&255]+i[o>>8&255]+i[o>>16&255]+i[o>>24&255]}const s={get(t){return"number"!=typeof t?this[t]||this.normal:t},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};class a extends Error{constructor(t,e,n){super(function(t,e){const n=new WeakSet,o=(t,e)=>{if("object"==typeof e&&null!==e){if(n.has(e))return`[object ${e.constructor.name}]`;n.add(e)}return e},i=e?` ${JSON.stringify(e,o)}`:"",r=c(t);return t+i+r}(t,n)),this.name="CKEditorError",this.context=e,this.data=n}is(t){return"CKEditorError"===t}static rethrowUnexpectedError(t,e){if(t.is&&t.is("CKEditorError"))throw t;const n=new a(t.message,e);throw n.stack=t.stack,n}}function l(t,e){console.warn(...d(t,e))}function c(t){return`\nRead more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-${t}`}function d(t,e){const n=c(t);return e?[t,e,n]:[t,n]}const h="33.0.0",u="object"==typeof window?window:n.g;if(u.CKEDITOR_VERSION)throw new a("ckeditor-duplicated-modules",null);u.CKEDITOR_VERSION=h;const g=Symbol("listeningTo"),m=Symbol("emitterId"),p={on(t,e,n={}){this.listenTo(this,t,e,n)},once(t,e,n){let o=!1;this.listenTo(this,t,(function(t,...n){o||(o=!0,t.off(),e.call(this,t,...n))}),n)},off(t,e){this.stopListening(this,t,e)},listenTo(t,e,n,o={}){let i,r;this[g]||(this[g]={});const s=this[g];k(t)||b(t);const a=k(t);(i=s[a])||(i=s[a]={emitter:t,callbacks:{}}),(r=i.callbacks[e])||(r=i.callbacks[e]=[]),r.push(n),function(t,e,n,o,i){e._addEventListener?e._addEventListener(n,o,i):t._addEventListener.call(e,n,o,i)}(this,t,e,n,o)},stopListening(t,e,n){const o=this[g];let i=t&&k(t);const r=o&&i&&o[i],s=r&&e&&r.callbacks[e];if(!(!o||t&&!r||e&&!s))if(n){v(this,t,e,n);-1!==s.indexOf(n)&&(1===s.length?delete r.callbacks[e]:v(this,t,e,n))}else if(s){for(;n=s.pop();)v(this,t,e,n);delete r.callbacks[e]}else if(r){for(e in r.callbacks)this.stopListening(t,e);delete o[i]}else{for(i in o)this.stopListening(o[i].emitter);delete this[g]}},fire(t,...n){try{const o=t instanceof e?t:new e(this,t),i=o.name;let r=A(this,i);if(o.path.push(this),r){const t=[o,...n];r=Array.from(r);for(let e=0;e<r.length&&(r[e].callback.apply(this,t),o.off.called&&(delete o.off.called,this._removeEventListener(i,r[e].callback)),!o.stop.called);e++);}if(this._delegations){const t=this._delegations.get(i),e=this._delegations.get("*");t&&_(t,o,n),e&&_(e,o,n)}return o.return}catch(t){a.rethrowUnexpectedError(t,this)}},delegate(...t){return{to:(e,n)=>{this._delegations||(this._delegations=new Map),t.forEach((t=>{const o=this._delegations.get(t);o?o.set(e,n):this._delegations.set(t,new Map([[e,n]]))}))}}},stopDelegating(t,e){if(this._delegations)if(t)if(e){const n=this._delegations.get(t);n&&n.delete(e)}else this._delegations.delete(t);else this._delegations.clear()},_addEventListener(t,e,n){!function(t,e){const n=w(t);if(n[e])return;let o=e,i=null;const r=[];for(;""!==o&&!n[o];)n[o]={callbacks:[],childEvents:[]},r.push(n[o]),i&&n[o].childEvents.push(i),i=o,o=o.substr(0,o.lastIndexOf(":"));if(""!==o){for(const t of r)t.callbacks=n[o].callbacks.slice();n[o].childEvents.push(i)}}(this,t);const o=C(this,t),i=s.get(n.priority),r={callback:e,priority:i};for(const t of o){let e=!1;for(let n=0;n<t.length;n++)if(t[n].priority<i){t.splice(n,0,r),e=!0;break}e||t.push(r)}},_removeEventListener(t,e){const n=C(this,t);for(const t of n)for(let n=0;n<t.length;n++)t[n].callback==e&&(t.splice(n,1),n--)}},f=p;function b(t,e){t[m]||(t[m]=e||r())}function k(t){return t[m]}function w(t){return t._events||Object.defineProperty(t,"_events",{value:{}}),t._events}function C(t,e){const n=w(t)[e];if(!n)return[];let o=[n.callbacks];for(let e=0;e<n.childEvents.length;e++){const i=C(t,n.childEvents[e]);o=o.concat(i)}return o}function A(t,e){let n;return t._events&&(n=t._events[e])&&n.callbacks.length?n.callbacks:e.indexOf(":")>-1?A(t,e.substr(0,e.lastIndexOf(":"))):null}function _(t,n,o){for(let[i,r]of t){r?"function"==typeof r&&(r=r(n.name)):r=n.name;const t=new e(n.source,r);t.path=[...n.path],i.fire(t,...o)}}function v(t,e,n,o){e._removeEventListener?e._removeEventListener(n,o):t._removeEventListener.call(e,n,o)}const y=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};const x="object"==typeof global&&global&&global.Object===Object&&global;var E="object"==typeof self&&self&&self.Object===Object&&self;const S=x||E||Function("return this")();const T=S.Symbol;var B=Object.prototype,D=B.hasOwnProperty,I=B.toString,P=T?T.toStringTag:void 0;const z=function(t){var e=D.call(t,P),n=t[P];try{t[P]=void 0;var o=!0}catch(t){}var i=I.call(t);return o&&(e?t[P]=n:delete t[P]),i};var R=Object.prototype.toString;const V=function(t){return R.call(t)};var F=T?T.toStringTag:void 0;const N=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":F&&F in Object(t)?z(t):V(t)};const M=function(t){if(!y(t))return!1;var e=N(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e};const O=S["__core-js_shared__"];var L=function(){var t=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();const H=function(t){return!!L&&L in t};var q=Function.prototype.toString;const W=function(t){if(null!=t){try{return q.call(t)}catch(t){}try{return t+""}catch(t){}}return""};var U=/^\[object .+?Constructor\]$/,j=Function.prototype,G=Object.prototype,K=j.toString,Z=G.hasOwnProperty,J=RegExp("^"+K.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Y=function(t){return!(!y(t)||H(t))&&(M(t)?J:U).test(W(t))};const Q=function(t,e){return null==t?void 0:t[e]};const X=function(t,e){var n=Q(t,e);return Y(n)?n:void 0};const tt=function(){try{var t=X(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();const et=function(t,e,n){"__proto__"==e&&tt?tt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n};const nt=function(t,e){return t===e||t!=t&&e!=e};var ot=Object.prototype.hasOwnProperty;const it=function(t,e,n){var o=t[e];ot.call(t,e)&&nt(o,n)&&(void 0!==n||e in t)||et(t,e,n)};const rt=function(t,e,n,o){var i=!n;n||(n={});for(var r=-1,s=e.length;++r<s;){var a=e[r],l=o?o(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),i?et(n,a,l):it(n,a,l)}return n};const st=function(t){return t};const at=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)};var lt=Math.max;const ct=function(t,e,n){return e=lt(void 0===e?t.length-1:e,0),function(){for(var o=arguments,i=-1,r=lt(o.length-e,0),s=Array(r);++i<r;)s[i]=o[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=o[i];return a[e]=n(s),at(t,this,a)}};const dt=function(t){return function(){return t}};const ht=tt?function(t,e){return tt(t,"toString",{configurable:!0,enumerable:!1,value:dt(e),writable:!0})}:st;var ut=Date.now;const gt=function(t){var e=0,n=0;return function(){var o=ut(),i=16-(o-n);if(n=o,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}};const mt=gt(ht);const pt=function(t,e){return mt(ct(t,e,st),t+"")};const ft=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};const bt=function(t){return null!=t&&ft(t.length)&&!M(t)};var kt=/^(?:0|[1-9]\d*)$/;const wt=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&kt.test(t))&&t>-1&&t%1==0&&t<e};const Ct=function(t,e,n){if(!y(n))return!1;var o=typeof e;return!!("number"==o?bt(n)&&wt(e,n.length):"string"==o&&e in n)&&nt(n[e],t)};const At=function(t){return pt((function(e,n){var o=-1,i=n.length,r=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(r=t.length>3&&"function"==typeof r?(i--,r):void 0,s&&Ct(n[0],n[1],s)&&(r=i<3?void 0:r,i=1),e=Object(e);++o<i;){var a=n[o];a&&t(e,a,o,r)}return e}))};const _t=function(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o};const vt=function(t){return null!=t&&"object"==typeof t};const yt=function(t){return vt(t)&&"[object Arguments]"==N(t)};var xt=Object.prototype,Et=xt.hasOwnProperty,St=xt.propertyIsEnumerable,Tt=yt(function(){return arguments}())?yt:function(t){return vt(t)&&Et.call(t,"callee")&&!St.call(t,"callee")};const Bt=Tt;const Dt=Array.isArray;const It=function(){return!1};var Pt="object"==typeof exports&&exports&&!exports.nodeType&&exports,zt=Pt&&"object"==typeof module&&module&&!module.nodeType&&module,Rt=zt&&zt.exports===Pt?S.Buffer:void 0;const Vt=(Rt?Rt.isBuffer:void 0)||It;var Ft={};Ft["[object Float32Array]"]=Ft["[object Float64Array]"]=Ft["[object Int8Array]"]=Ft["[object Int16Array]"]=Ft["[object Int32Array]"]=Ft["[object Uint8Array]"]=Ft["[object Uint8ClampedArray]"]=Ft["[object Uint16Array]"]=Ft["[object Uint32Array]"]=!0,Ft["[object Arguments]"]=Ft["[object Array]"]=Ft["[object ArrayBuffer]"]=Ft["[object Boolean]"]=Ft["[object DataView]"]=Ft["[object Date]"]=Ft["[object Error]"]=Ft["[object Function]"]=Ft["[object Map]"]=Ft["[object Number]"]=Ft["[object Object]"]=Ft["[object RegExp]"]=Ft["[object Set]"]=Ft["[object String]"]=Ft["[object WeakMap]"]=!1;const Nt=function(t){return vt(t)&&ft(t.length)&&!!Ft[N(t)]};const Mt=function(t){return function(e){return t(e)}};var Ot="object"==typeof exports&&exports&&!exports.nodeType&&exports,Lt=Ot&&"object"==typeof module&&module&&!module.nodeType&&module,Ht=Lt&&Lt.exports===Ot&&x.process;const qt=function(){try{var t=Lt&&Lt.require&&Lt.require("util").types;return t||Ht&&Ht.binding&&Ht.binding("util")}catch(t){}}();var Wt=qt&&qt.isTypedArray;const Ut=Wt?Mt(Wt):Nt;var jt=Object.prototype.hasOwnProperty;const $t=function(t,e){var n=Dt(t),o=!n&&Bt(t),i=!n&&!o&&Vt(t),r=!n&&!o&&!i&&Ut(t),s=n||o||i||r,a=s?_t(t.length,String):[],l=a.length;for(var c in t)!e&&!jt.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||wt(c,l))||a.push(c);return a};var Gt=Object.prototype;const Kt=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Gt)};const Zt=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e};var Jt=Object.prototype.hasOwnProperty;const Yt=function(t){if(!y(t))return Zt(t);var e=Kt(t),n=[];for(var o in t)("constructor"!=o||!e&&Jt.call(t,o))&&n.push(o);return n};const Qt=function(t){return bt(t)?$t(t,!0):Yt(t)};const Xt=At((function(t,e){rt(e,Qt(e),t)})),te=Symbol("observableProperties"),ee=Symbol("boundObservables"),ne=Symbol("boundProperties"),oe=Symbol("decoratedMethods"),ie=Symbol("decoratedOriginal"),re={set(t,e){if(y(t))return void Object.keys(t).forEach((e=>{this.set(e,t[e])}),this);ae(this);const n=this[te];if(t in this&&!n.has(t))throw new a("observable-set-cannot-override",this);Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get:()=>n.get(t),set(e){const o=n.get(t);let i=this.fire("set:"+t,t,e,o);void 0===i&&(i=e),o===i&&n.has(t)||(n.set(t,i),this.fire("change:"+t,t,i,o))}}),this[t]=e},bind(...t){if(!t.length||!de(t))throw new a("observable-bind-wrong-properties",this);if(new Set(t).size!==t.length)throw new a("observable-bind-duplicate-properties",this);ae(this);const e=this[ne];t.forEach((t=>{if(e.has(t))throw new a("observable-bind-rebind",this)}));const n=new Map;return t.forEach((t=>{const o={property:t,to:[]};e.set(t,o),n.set(t,o)})),{to:le,toMany:ce,_observable:this,_bindProperties:t,_to:[],_bindings:n}},unbind(...t){if(!this[te])return;const e=this[ne],n=this[ee];if(t.length){if(!de(t))throw new a("observable-unbind-wrong-properties",this);t.forEach((t=>{const o=e.get(t);if(!o)return;let i,r,s,a;o.to.forEach((t=>{i=t[0],r=t[1],s=n.get(i),a=s[r],a.delete(o),a.size||delete s[r],Object.keys(s).length||(n.delete(i),this.stopListening(i,"change"))})),e.delete(t)}))}else n.forEach(((t,e)=>{this.stopListening(e,"change")})),n.clear(),e.clear()},decorate(t){const e=this[t];if(!e)throw new a("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:t});this.on(t,((t,n)=>{t.return=e.apply(this,n)})),this[t]=function(...e){return this.fire(t,e)},this[t][ie]=e,this[oe]||(this[oe]=[]),this[oe].push(t)}};Xt(re,f),re.stopListening=function(t,e,n){if(!t&&this[oe]){for(const t of this[oe])this[t]=this[t][ie];delete this[oe]}f.stopListening.call(this,t,e,n)};const se=re;function ae(t){t[te]||(Object.defineProperty(t,te,{value:new Map}),Object.defineProperty(t,ee,{value:new Map}),Object.defineProperty(t,ne,{value:new Map}))}function le(...t){const e=function(...t){if(!t.length)throw new a("observable-bind-to-parse-error",null);const e={to:[]};let n;"function"==typeof t[t.length-1]&&(e.callback=t.pop());return t.forEach((t=>{if("string"==typeof t)n.properties.push(t);else{if("object"!=typeof t)throw new a("observable-bind-to-parse-error",null);n={observable:t,properties:[]},e.to.push(n)}})),e}(...t),n=Array.from(this._bindings.keys()),o=n.length;if(!e.callback&&e.to.length>1)throw new a("observable-bind-to-no-callback",this);if(o>1&&e.callback)throw new a("observable-bind-to-extra-callback",this);var i;e.to.forEach((t=>{if(t.properties.length&&t.properties.length!==o)throw new a("observable-bind-to-properties-length",this);t.properties.length||(t.properties=this._bindProperties)})),this._to=e.to,e.callback&&(this._bindings.get(n[0]).callback=e.callback),i=this._observable,this._to.forEach((t=>{const e=i[ee];let n;e.get(t.observable)||i.listenTo(t.observable,"change",((o,r)=>{n=e.get(t.observable)[r],n&&n.forEach((t=>{he(i,t.property)}))}))})),function(t){let e;t._bindings.forEach(((n,o)=>{t._to.forEach((i=>{e=i.properties[n.callback?0:t._bindProperties.indexOf(o)],n.to.push([i.observable,e]),function(t,e,n,o){const i=t[ee],r=i.get(n),s=r||{};s[o]||(s[o]=new Set);s[o].add(e),r||i.set(n,s)}(t._observable,n,i.observable,e)}))}))}(this),this._bindProperties.forEach((t=>{he(this._observable,t)}))}function ce(t,e,n){if(this._bindings.size>1)throw new a("observable-bind-to-many-not-one-binding",this);this.to(...function(t,e){const n=t.map((t=>[t,e]));return Array.prototype.concat.apply([],n)}(t,e),n)}function de(t){return t.every((t=>"string"==typeof t))}function he(t,e){const n=t[ne].get(e);let o;n.callback?o=n.callback.apply(t,n.to.map((t=>t[0][t[1]]))):(o=n.to[0],o=o[0][o[1]]),Object.prototype.hasOwnProperty.call(t,e)?t[e]=o:t.set(e,o)}function ue(t,...e){e.forEach((e=>{Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)).forEach((n=>{if(n in t.prototype)return;const o=Object.getOwnPropertyDescriptor(e,n);o.enumerable=!1,Object.defineProperty(t.prototype,n,o)}))}))}class ge{constructor(t){this.editor=t,this.set("isEnabled",!0),this._disableStack=new Set}forceDisabled(t){this._disableStack.add(t),1==this._disableStack.size&&(this.on("set:isEnabled",me,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),0==this._disableStack.size&&(this.off("set:isEnabled",me),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function me(t){t.return=!1,t.stop()}ue(ge,se);class pe{constructor(t){this.editor=t,this.set("value",void 0),this.set("isEnabled",!1),this.affectsData=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",(()=>{this.refresh()})),this.on("execute",(t=>{this.isEnabled||t.stop()}),{priority:"high"}),this.listenTo(t,"change:isReadOnly",((t,e,n)=>{n&&this.affectsData?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}))}refresh(){this.isEnabled=!0}forceDisabled(t){this._disableStack.add(t),1==this._disableStack.size&&(this.on("set:isEnabled",fe,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),0==this._disableStack.size&&(this.off("set:isEnabled",fe),this.refresh())}execute(){}destroy(){this.stopListening()}}function fe(t){t.return=!1,t.stop()}ue(pe,se);class be extends pe{constructor(t){super(t),this._childCommands=[]}refresh(){}execute(...t){const e=this._getFirstEnabledCommand();return null!=e&&e.execute(t)}registerChildCommand(t){this._childCommands.push(t),t.on("change:isEnabled",(()=>this._checkEnabled())),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){return this._childCommands.find((t=>t.isEnabled))}}const ke=function(t,e){return function(n){return t(e(n))}};const we=ke(Object.getPrototypeOf,Object);var Ce=Function.prototype,Ae=Object.prototype,_e=Ce.toString,ve=Ae.hasOwnProperty,ye=_e.call(Object);const xe=function(t){if(!vt(t)||"[object Object]"!=N(t))return!1;var e=we(t);if(null===e)return!0;var n=ve.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&_e.call(n)==ye};const Ee=function(){this.__data__=[],this.size=0};const Se=function(t,e){for(var n=t.length;n--;)if(nt(t[n][0],e))return n;return-1};var Te=Array.prototype.splice;const Be=function(t){var e=this.__data__,n=Se(e,t);return!(n<0)&&(n==e.length-1?e.pop():Te.call(e,n,1),--this.size,!0)};const De=function(t){var e=this.__data__,n=Se(e,t);return n<0?void 0:e[n][1]};const Ie=function(t){return Se(this.__data__,t)>-1};const Pe=function(t,e){var n=this.__data__,o=Se(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this};function ze(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}ze.prototype.clear=Ee,ze.prototype.delete=Be,ze.prototype.get=De,ze.prototype.has=Ie,ze.prototype.set=Pe;const Re=ze;const Ve=function(){this.__data__=new Re,this.size=0};const Fe=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};const Ne=function(t){return this.__data__.get(t)};const Me=function(t){return this.__data__.has(t)};const Oe=X(S,"Map");const Le=X(Object,"create");const He=function(){this.__data__=Le?Le(null):{},this.size=0};const qe=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var We=Object.prototype.hasOwnProperty;const Ue=function(t){var e=this.__data__;if(Le){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return We.call(e,t)?e[t]:void 0};var je=Object.prototype.hasOwnProperty;const $e=function(t){var e=this.__data__;return Le?void 0!==e[t]:je.call(e,t)};const Ge=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Le&&void 0===e?"__lodash_hash_undefined__":e,this};function Ke(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}Ke.prototype.clear=He,Ke.prototype.delete=qe,Ke.prototype.get=Ue,Ke.prototype.has=$e,Ke.prototype.set=Ge;const Ze=Ke;const Je=function(){this.size=0,this.__data__={hash:new Ze,map:new(Oe||Re),string:new Ze}};const Ye=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};const Qe=function(t,e){var n=t.__data__;return Ye(e)?n["string"==typeof e?"string":"hash"]:n.map};const Xe=function(t){var e=Qe(this,t).delete(t);return this.size-=e?1:0,e};const tn=function(t){return Qe(this,t).get(t)};const en=function(t){return Qe(this,t).has(t)};const nn=function(t,e){var n=Qe(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this};function on(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}on.prototype.clear=Je,on.prototype.delete=Xe,on.prototype.get=tn,on.prototype.has=en,on.prototype.set=nn;const rn=on;const sn=function(t,e){var n=this.__data__;if(n instanceof Re){var o=n.__data__;if(!Oe||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new rn(o)}return n.set(t,e),this.size=n.size,this};function an(t){var e=this.__data__=new Re(t);this.size=e.size}an.prototype.clear=Ve,an.prototype.delete=Fe,an.prototype.get=Ne,an.prototype.has=Me,an.prototype.set=sn;const ln=an;const cn=function(t,e){for(var n=-1,o=null==t?0:t.length;++n<o&&!1!==e(t[n],n,t););return t};const dn=ke(Object.keys,Object);var hn=Object.prototype.hasOwnProperty;const un=function(t){if(!Kt(t))return dn(t);var e=[];for(var n in Object(t))hn.call(t,n)&&"constructor"!=n&&e.push(n);return e};const gn=function(t){return bt(t)?$t(t):un(t)};const mn=function(t,e){return t&&rt(e,gn(e),t)};const pn=function(t,e){return t&&rt(e,Qt(e),t)};var fn="object"==typeof exports&&exports&&!exports.nodeType&&exports,bn=fn&&"object"==typeof module&&module&&!module.nodeType&&module,kn=bn&&bn.exports===fn?S.Buffer:void 0,wn=kn?kn.allocUnsafe:void 0;const Cn=function(t,e){if(e)return t.slice();var n=t.length,o=wn?wn(n):new t.constructor(n);return t.copy(o),o};const An=function(t,e){var n=-1,o=t.length;for(e||(e=Array(o));++n<o;)e[n]=t[n];return e};const _n=function(t,e){for(var n=-1,o=null==t?0:t.length,i=0,r=[];++n<o;){var s=t[n];e(s,n,t)&&(r[i++]=s)}return r};const vn=function(){return[]};var yn=Object.prototype.propertyIsEnumerable,xn=Object.getOwnPropertySymbols;const En=xn?function(t){return null==t?[]:(t=Object(t),_n(xn(t),(function(e){return yn.call(t,e)})))}:vn;const Sn=function(t,e){return rt(t,En(t),e)};const Tn=function(t,e){for(var n=-1,o=e.length,i=t.length;++n<o;)t[i+n]=e[n];return t};const Bn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Tn(e,En(t)),t=we(t);return e}:vn;const Dn=function(t,e){return rt(t,Bn(t),e)};const In=function(t,e,n){var o=e(t);return Dt(t)?o:Tn(o,n(t))};const Pn=function(t){return In(t,gn,En)};const zn=function(t){return In(t,Qt,Bn)};const Rn=X(S,"DataView");const Vn=X(S,"Promise");const Fn=X(S,"Set");const Nn=X(S,"WeakMap");var Mn="[object Map]",On="[object Promise]",Ln="[object Set]",Hn="[object WeakMap]",qn="[object DataView]",Wn=W(Rn),Un=W(Oe),jn=W(Vn),$n=W(Fn),Gn=W(Nn),Kn=N;(Rn&&Kn(new Rn(new ArrayBuffer(1)))!=qn||Oe&&Kn(new Oe)!=Mn||Vn&&Kn(Vn.resolve())!=On||Fn&&Kn(new Fn)!=Ln||Nn&&Kn(new Nn)!=Hn)&&(Kn=function(t){var e=N(t),n="[object Object]"==e?t.constructor:void 0,o=n?W(n):"";if(o)switch(o){case Wn:return qn;case Un:return Mn;case jn:return On;case $n:return Ln;case Gn:return Hn}return e});const Zn=Kn;var Jn=Object.prototype.hasOwnProperty;const Yn=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Jn.call(t,"index")&&(n.index=t.index,n.input=t.input),n};const Qn=S.Uint8Array;const Xn=function(t){var e=new t.constructor(t.byteLength);return new Qn(e).set(new Qn(t)),e};const to=function(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)};var eo=/\w*$/;const no=function(t){var e=new t.constructor(t.source,eo.exec(t));return e.lastIndex=t.lastIndex,e};var oo=T?T.prototype:void 0,io=oo?oo.valueOf:void 0;const ro=function(t){return io?Object(io.call(t)):{}};const so=function(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)};const ao=function(t,e,n){var o=t.constructor;switch(e){case"[object ArrayBuffer]":return Xn(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return to(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return so(t,n);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return no(t);case"[object Symbol]":return ro(t)}};var lo=Object.create;const co=function(){function t(){}return function(e){if(!y(e))return{};if(lo)return lo(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();const ho=function(t){return"function"!=typeof t.constructor||Kt(t)?{}:co(we(t))};const uo=function(t){return vt(t)&&"[object Map]"==Zn(t)};var go=qt&&qt.isMap;const mo=go?Mt(go):uo;const po=function(t){return vt(t)&&"[object Set]"==Zn(t)};var fo=qt&&qt.isSet;const bo=fo?Mt(fo):po;var ko="[object Arguments]",wo="[object Function]",Co="[object Object]",Ao={};Ao[ko]=Ao["[object Array]"]=Ao["[object ArrayBuffer]"]=Ao["[object DataView]"]=Ao["[object Boolean]"]=Ao["[object Date]"]=Ao["[object Float32Array]"]=Ao["[object Float64Array]"]=Ao["[object Int8Array]"]=Ao["[object Int16Array]"]=Ao["[object Int32Array]"]=Ao["[object Map]"]=Ao["[object Number]"]=Ao["[object Object]"]=Ao["[object RegExp]"]=Ao["[object Set]"]=Ao["[object String]"]=Ao["[object Symbol]"]=Ao["[object Uint8Array]"]=Ao["[object Uint8ClampedArray]"]=Ao["[object Uint16Array]"]=Ao["[object Uint32Array]"]=!0,Ao["[object Error]"]=Ao[wo]=Ao["[object WeakMap]"]=!1;const _o=function t(e,n,o,i,r,s){var a,l=1&n,c=2&n,d=4&n;if(o&&(a=r?o(e,i,r,s):o(e)),void 0!==a)return a;if(!y(e))return e;var h=Dt(e);if(h){if(a=Yn(e),!l)return An(e,a)}else{var u=Zn(e),g=u==wo||"[object GeneratorFunction]"==u;if(Vt(e))return Cn(e,l);if(u==Co||u==ko||g&&!r){if(a=c||g?{}:ho(e),!l)return c?Dn(e,pn(a,e)):Sn(e,mn(a,e))}else{if(!Ao[u])return r?e:{};a=ao(e,u,l)}}s||(s=new ln);var m=s.get(e);if(m)return m;s.set(e,a),bo(e)?e.forEach((function(i){a.add(t(i,n,o,i,e,s))})):mo(e)&&e.forEach((function(i,r){a.set(r,t(i,n,o,r,e,s))}));var p=h?void 0:(d?c?zn:Pn:c?Qt:gn)(e);return cn(p||e,(function(i,r){p&&(i=e[r=i]),it(a,r,t(i,n,o,r,e,s))})),a};const vo=function(t,e){return _o(t,5,e="function"==typeof e?e:void 0)};const yo=function(t){return vt(t)&&1===t.nodeType&&!xe(t)};class xo{constructor(t,e){this._config={},e&&this.define(Eo(e)),t&&this._setObjectToTarget(this._config,t)}set(t,e){this._setToTarget(this._config,t,e)}define(t,e){this._setToTarget(this._config,t,e,!0)}get(t){return this._getFromSource(this._config,t)}*names(){for(const t of Object.keys(this._config))yield t}_setToTarget(t,e,n,o=!1){if(xe(e))return void this._setObjectToTarget(t,e,o);const i=e.split(".");e=i.pop();for(const e of i)xe(t[e])||(t[e]={}),t=t[e];if(xe(n))return xe(t[e])||(t[e]={}),t=t[e],void this._setObjectToTarget(t,n,o);o&&void 0!==t[e]||(t[e]=n)}_getFromSource(t,e){const n=e.split(".");e=n.pop();for(const e of n){if(!xe(t[e])){t=null;break}t=t[e]}return t?Eo(t[e]):void 0}_setObjectToTarget(t,e,n){Object.keys(e).forEach((o=>{this._setToTarget(t,o,e[o],n)}))}}function Eo(t){return vo(t,So)}function So(t){return yo(t)?t:void 0}function To(t){return!(!t||!t[Symbol.iterator])}class Bo{constructor(t={},e={}){const n=To(t);if(n||(e=t),this._items=[],this._itemMap=new Map,this._idProperty=e.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],n)for(const e of t)this._items.push(e),this._itemMap.set(this._getItemIdBeforeAdding(e),e)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(t,e){return this.addMany([t],e)}addMany(t,e){if(void 0===e)e=this._items.length;else if(e>this._items.length||e<0)throw new a("collection-add-item-invalid-index",this);for(let n=0;n<t.length;n++){const o=t[n],i=this._getItemIdBeforeAdding(o),r=e+n;this._items.splice(r,0,o),this._itemMap.set(i,o),this.fire("add",o,r)}return this.fire("change",{added:t,removed:[],index:e}),this}get(t){let e;if("string"==typeof t)e=this._itemMap.get(t);else{if("number"!=typeof t)throw new a("collection-get-invalid-arg",this);e=this._items[t]}return e||null}has(t){if("string"==typeof t)return this._itemMap.has(t);{const e=t[this._idProperty];return this._itemMap.has(e)}}getIndex(t){let e;return e="string"==typeof t?this._itemMap.get(t):t,this._items.indexOf(e)}remove(t){const[e,n]=this._remove(t);return this.fire("change",{added:[],removed:[e],index:n}),e}map(t,e){return this._items.map(t,e)}find(t,e){return this._items.find(t,e)}filter(t,e){return this._items.filter(t,e)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const t=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:t,index:0})}bindTo(t){if(this._bindToCollection)throw new a("collection-bind-to-rebind",this);return this._bindToCollection=t,{as:t=>{this._setUpBindToBinding((e=>new t(e)))},using:t=>{"function"==typeof t?this._setUpBindToBinding((e=>t(e))):this._setUpBindToBinding((e=>e[t]))}}}_setUpBindToBinding(t){const e=this._bindToCollection,n=(n,o,i)=>{const r=e._bindToCollection==this,s=e._bindToInternalToExternalMap.get(o);if(r&&s)this._bindToExternalToInternalMap.set(o,s),this._bindToInternalToExternalMap.set(s,o);else{const n=t(o);if(!n)return void this._skippedIndexesFromExternal.push(i);let r=i;for(const t of this._skippedIndexesFromExternal)i>t&&r--;for(const t of e._skippedIndexesFromExternal)r>=t&&r++;this._bindToExternalToInternalMap.set(o,n),this._bindToInternalToExternalMap.set(n,o),this.add(n,r);for(let t=0;t<e._skippedIndexesFromExternal.length;t++)r<=e._skippedIndexesFromExternal[t]&&e._skippedIndexesFromExternal[t]++}};for(const t of e)n(0,t,e.getIndex(t));this.listenTo(e,"add",n),this.listenTo(e,"remove",((t,e,n)=>{const o=this._bindToExternalToInternalMap.get(e);o&&this.remove(o),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((t,e)=>(n<e&&t.push(e-1),n>e&&t.push(e),t)),[])}))}_getItemIdBeforeAdding(t){const e=this._idProperty;let n;if(e in t){if(n=t[e],"string"!=typeof n)throw new a("collection-add-invalid-id",this);if(this.get(n))throw new a("collection-add-item-already-exists",this)}else t[e]=n=r();return n}_remove(t){let e,n,o,i=!1;const r=this._idProperty;if("string"==typeof t?(n=t,o=this._itemMap.get(n),i=!o,o&&(e=this._items.indexOf(o))):"number"==typeof t?(e=t,o=this._items[e],i=!o,o&&(n=o[r])):(o=t,n=o[r],e=this._items.indexOf(o),i=-1==e||!this._itemMap.get(n)),i)throw new a("collection-remove-404",this);this._items.splice(e,1),this._itemMap.delete(n);const s=this._bindToInternalToExternalMap.get(o);return this._bindToInternalToExternalMap.delete(o),this._bindToExternalToInternalMap.delete(s),this.fire("remove",o,e),[o,e]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}ue(Bo,f);class Do{constructor(t,e=[],n=[]){this._context=t,this._plugins=new Map,this._availablePlugins=new Map;for(const t of e)t.pluginName&&this._availablePlugins.set(t.pluginName,t);this._contextPlugins=new Map;for(const[t,e]of n)this._contextPlugins.set(t,e),this._contextPlugins.set(e,t),t.pluginName&&this._availablePlugins.set(t.pluginName,t)}*[Symbol.iterator](){for(const t of this._plugins)"function"==typeof t[0]&&(yield t)}get(t){const e=this._plugins.get(t);if(!e){let e=t;throw"function"==typeof t&&(e=t.pluginName||t.name),new a("plugincollection-plugin-not-loaded",this._context,{plugin:e})}return e}has(t){return this._plugins.has(t)}init(t,e=[],n=[]){const o=this,i=this._context;!function t(e,n=new Set){e.forEach((e=>{l(e)&&(n.has(e)||(n.add(e),e.pluginName&&!o._availablePlugins.has(e.pluginName)&&o._availablePlugins.set(e.pluginName,e),e.requires&&t(e.requires,n)))}))}(t),u(t);const r=[...function t(e,n=new Set){return e.map((t=>l(t)?t:o._availablePlugins.get(t))).reduce(((e,o)=>n.has(o)?e:(n.add(o),o.requires&&(u(o.requires,o),t(o.requires,n).forEach((t=>e.add(t)))),e.add(o))),new Set)}(t.filter((t=>!d(t,e))))];!function(t,e){for(const n of e){if("function"!=typeof n)throw new a("plugincollection-replace-plugin-invalid-type",null,{pluginItem:n});const e=n.pluginName;if(!e)throw new a("plugincollection-replace-plugin-missing-name",null,{pluginItem:n});if(n.requires&&n.requires.length)throw new a("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:e});const i=o._availablePlugins.get(e);if(!i)throw new a("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:e});const r=t.indexOf(i);if(-1===r){if(o._contextPlugins.has(i))return;throw new a("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:e})}if(i.requires&&i.requires.length)throw new a("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:e});t.splice(r,1,n),o._availablePlugins.set(e,n)}}(r,n);const s=function(t){return t.map((t=>{const e=o._contextPlugins.get(t)||new t(i);return o._add(t,e),e}))}(r);return g(s,"init").then((()=>g(s,"afterInit"))).then((()=>s));function l(t){return"function"==typeof t}function c(t){return l(t)&&t.isContextPlugin}function d(t,e){return e.some((e=>e===t||(h(t)===e||h(e)===t)))}function h(t){return l(t)?t.pluginName||t.name:t}function u(t,n=null){t.map((t=>l(t)?t:o._availablePlugins.get(t)||t)).forEach((t=>{!function(t,e){if(l(t))return;if(e)throw new a("plugincollection-soft-required",i,{missingPlugin:t,requiredBy:h(e)});throw new a("plugincollection-plugin-not-found",i,{plugin:t})}(t,n),function(t,e){if(!c(e))return;if(c(t))return;throw new a("plugincollection-context-required",i,{plugin:h(t),requiredBy:h(e)})}(t,n),function(t,n){if(!n)return;if(!d(t,e))return;throw new a("plugincollection-required",i,{plugin:h(t),requiredBy:h(n)})}(t,n)}))}function g(t,e){return t.reduce(((t,n)=>n[e]?o._contextPlugins.has(n)?t:t.then(n[e].bind(n)):t),Promise.resolve())}}destroy(){const t=[];for(const[,e]of this)"function"!=typeof e.destroy||this._contextPlugins.has(e)||t.push(e.destroy());return Promise.all(t)}_add(t,e){this._plugins.set(t,e);const n=t.pluginName;if(n){if(this._plugins.has(n))throw new a("plugincollection-plugin-name-conflict",null,{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:t});this._plugins.set(n,e)}}}function Io(t){return Array.isArray(t)?t:[t]}function Po(t,e,n=1){if("number"!=typeof n)throw new a("translation-service-quantity-not-a-number",null,{quantity:n});const o=Object.keys(window.CKEDITOR_TRANSLATIONS).length;1===o&&(t=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]);const i=e.id||e.string;if(0===o||!function(t,e){return!!window.CKEDITOR_TRANSLATIONS[t]&&!!window.CKEDITOR_TRANSLATIONS[t].dictionary[e]}(t,i))return 1!==n?e.plural:e.string;const r=window.CKEDITOR_TRANSLATIONS[t].dictionary,s=window.CKEDITOR_TRANSLATIONS[t].getPluralForm||(t=>1===t?0:1);if("string"==typeof r[i])return r[i];const l=Number(s(n));return r[i][l]}ue(Do,f),window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});const zo=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function Ro(t){return zo.includes(t)?"rtl":"ltr"}class Vo{constructor(t={}){this.uiLanguage=t.uiLanguage||"en",this.contentLanguage=t.contentLanguage||this.uiLanguage,this.uiLanguageDirection=Ro(this.uiLanguage),this.contentLanguageDirection=Ro(this.contentLanguage),this.t=(t,e)=>this._t(t,e)}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(t,e=[]){e=Io(e),"string"==typeof t&&(t={string:t});const n=!!t.plural?e[0]:1;return function(t,e){return t.replace(/%(\d+)/g,((t,n)=>n<e.length?e[n]:t))}(Po(this.uiLanguage,t,n),e)}}class Fo{constructor(t){this.config=new xo(t,this.constructor.defaultConfig);const e=this.constructor.builtinPlugins;this.config.define("plugins",e),this.plugins=new Do(this,e);const n=this.config.get("language")||{};this.locale=new Vo({uiLanguage:"string"==typeof n?n:n.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new Bo,this._contextOwner=null}initPlugins(){const t=this.config.get("plugins")||[],e=this.config.get("substitutePlugins")||[];for(const n of t.concat(e)){if("function"!=typeof n)throw new a("context-initplugins-constructor-only",null,{Plugin:n});if(!0!==n.isContextPlugin)throw new a("context-initplugins-invalid-plugin",null,{Plugin:n})}return this.plugins.init(t,[],e)}destroy(){return Promise.all(Array.from(this.editors,(t=>t.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(t,e){if(this._contextOwner)throw new a("context-addeditor-private-context");this.editors.add(t),e&&(this._contextOwner=t)}_removeEditor(t){return this.editors.has(t)&&this.editors.remove(t),this._contextOwner===t?this.destroy():Promise.resolve()}_getEditorConfig(){const t={};for(const e of this.config.names())["plugins","removePlugins","extraPlugins"].includes(e)||(t[e]=this.config.get(e));return t}static create(t){return new Promise((e=>{const n=new this(t);e(n.initPlugins().then((()=>n)))}))}}class No{constructor(t){this.context=t}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}function Mo(t,e){const n=Math.min(t.length,e.length);for(let o=0;o<n;o++)if(t[o]!=e[o])return o;return t.length==e.length?"same":t.length<e.length?"prefix":"extension"}ue(No,se);const Oo=function(t){return _o(t,4)};class Lo{constructor(t){this.document=t,this.parent=null}get index(){let t;if(!this.parent)return null;if(-1==(t=this.parent.getChildIndex(this)))throw new a("view-node-not-found-in-parent",this);return t}get nextSibling(){const t=this.index;return null!==t&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return null!==t&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}isAttached(){return this.root.is("rootElement")}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.index),e=e.parent;return t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}getCommonAncestor(t,e={}){const n=this.getAncestors(e),o=t.getAncestors(e);let i=0;for(;n[i]==o[i]&&n[i];)i++;return 0===i?null:n[i-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),n=t.getPath(),o=Mo(e,n);switch(o){case"prefix":return!0;case"extension":return!1;default:return e[o]<n[o]}}isAfter(t){return this!=t&&(this.root===t.root&&!this.isBefore(t))}_remove(){this.parent._removeChildren(this.index)}_fireChange(t,e){this.fire("change:"+t,e),this.parent&&this.parent._fireChange(t,e)}toJSON(){const t=Oo(this);return delete t.parent,t}is(t){return"node"===t||"view:node"===t}}ue(Lo,f);class Ho extends Lo{constructor(t,e){super(t),this._textData=e}is(t){return"$text"===t||"view:$text"===t||"text"===t||"view:text"===t||"node"===t||"view:node"===t}get data(){return this._textData}get _data(){return this.data}set _data(t){this._fireChange("text",this),this._textData=t}isSimilar(t){return t instanceof Ho&&(this===t||this.data===t.data)}_clone(){return new Ho(this.document,this.data)}}class qo{constructor(t,e,n){if(this.textNode=t,e<0||e>t.data.length)throw new a("view-textproxy-wrong-offsetintext",this);if(n<0||e+n>t.data.length)throw new a("view-textproxy-wrong-length",this);this.data=t.data.substring(e,e+n),this.offsetInText=e}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(t){return"$textProxy"===t||"view:$textProxy"===t||"textProxy"===t||"view:textProxy"===t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let n=t.includeSelf?this.textNode:this.parent;for(;null!==n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}}function Wo(t){return To(t)?new Map(t):function(t){const e=new Map;for(const n in t)e.set(n,t[n]);return e}(t)}class Uo{constructor(...t){this._patterns=[],this.add(...t)}add(...t){for(let e of t)("string"==typeof e||e instanceof RegExp)&&(e={name:e}),this._patterns.push(e)}match(...t){for(const e of t)for(const t of this._patterns){const n=jo(e,t);if(n)return{element:e,pattern:t,match:n}}return null}matchAll(...t){const e=[];for(const n of t)for(const t of this._patterns){const o=jo(n,t);o&&e.push({element:n,pattern:t,match:o})}return e.length>0?e:null}getElementName(){if(1!==this._patterns.length)return null;const t=this._patterns[0],e=t.name;return"function"==typeof t||!e||e instanceof RegExp?null:e}}function jo(t,e){if("function"==typeof e)return e(t);const n={};return e.name&&(n.name=function(t,e){if(t instanceof RegExp)return!!e.match(t);return t===e}(e.name,t.name),!n.name)||e.attributes&&(n.attributes=function(t,e){const n=new Set(e.getAttributeKeys());xe(t)?(void 0!==t.style&&l("matcher-pattern-deprecated-attributes-style-key",t),void 0!==t.class&&l("matcher-pattern-deprecated-attributes-class-key",t)):(n.delete("style"),n.delete("class"));return $o(t,n,(t=>e.getAttribute(t)))}(e.attributes,t),!n.attributes)?null:!(e.classes&&(n.classes=function(t,e){return $o(t,e.getClassNames())}(e.classes,t),!n.classes))&&(!(e.styles&&(n.styles=function(t,e){return $o(t,e.getStyleNames(!0),(t=>e.getStyle(t)))}(e.styles,t),!n.styles))&&n)}function $o(t,e,n){const o=function(t){if(Array.isArray(t))return t.map((t=>xe(t)?(void 0!==t.key&&void 0!==t.value||l("matcher-pattern-missing-key-or-value",t),[t.key,t.value]):[t,!0]));if(xe(t))return Object.entries(t);return[[t,!0]]}(t),i=Array.from(e),r=[];return o.forEach((([t,e])=>{i.forEach((o=>{(function(t,e){return!0===t||t===e||t instanceof RegExp&&e.match(t)})(t,o)&&function(t,e,n){if(!0===t)return!0;const o=n(e);return t===o||t instanceof RegExp&&!!String(o).match(t)}(e,o,n)&&r.push(o)}))})),!o.length||r.length<o.length?null:r}const Go=function(t){return"symbol"==typeof t||vt(t)&&"[object Symbol]"==N(t)};var Ko=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zo=/^\w*$/;const Jo=function(t,e){if(Dt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Go(t))||(Zo.test(t)||!Ko.test(t)||null!=e&&t in Object(e))};function Yo(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var o=arguments,i=e?e.apply(this,o):o[0],r=n.cache;if(r.has(i))return r.get(i);var s=t.apply(this,o);return n.cache=r.set(i,s)||r,s};return n.cache=new(Yo.Cache||rn),n}Yo.Cache=rn;const Qo=Yo;var Xo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ti=/\\(\\)?/g,ei=function(t){var e=Qo(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Xo,(function(t,n,o,i){e.push(o?i.replace(ti,"$1"):n||t)})),e}));const ni=ei;const oi=function(t,e){for(var n=-1,o=null==t?0:t.length,i=Array(o);++n<o;)i[n]=e(t[n],n,t);return i};var ii=T?T.prototype:void 0,ri=ii?ii.toString:void 0;const si=function t(e){if("string"==typeof e)return e;if(Dt(e))return oi(e,t)+"";if(Go(e))return ri?ri.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n};const ai=function(t){return null==t?"":si(t)};const li=function(t,e){return Dt(t)?t:Jo(t,e)?[t]:ni(ai(t))};const ci=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0};const di=function(t){if("string"==typeof t||Go(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};const hi=function(t,e){for(var n=0,o=(e=li(e,t)).length;null!=t&&n<o;)t=t[di(e[n++])];return n&&n==o?t:void 0};const ui=function(t,e,n){var o=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var r=Array(i);++o<i;)r[o]=t[o+e];return r};const gi=function(t,e){return e.length<2?t:hi(t,ui(e,0,-1))};const mi=function(t,e){return e=li(e,t),null==(t=gi(t,e))||delete t[di(ci(e))]};const pi=function(t,e){return null==t||mi(t,e)};const fi=function(t,e,n){var o=null==t?void 0:hi(t,e);return void 0===o?n:o};const bi=function(t,e,n){(void 0!==n&&!nt(t[e],n)||void 0===n&&!(e in t))&&et(t,e,n)};const ki=function(t){return function(e,n,o){for(var i=-1,r=Object(e),s=o(e),a=s.length;a--;){var l=s[t?a:++i];if(!1===n(r[l],l,r))break}return e}}();const wi=function(t){return vt(t)&&bt(t)};const Ci=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};const Ai=function(t){return rt(t,Qt(t))};const _i=function(t,e,n,o,i,r,s){var a=Ci(t,n),l=Ci(e,n),c=s.get(l);if(c)bi(t,n,c);else{var d=r?r(a,l,n+"",t,e,s):void 0,h=void 0===d;if(h){var u=Dt(l),g=!u&&Vt(l),m=!u&&!g&&Ut(l);d=l,u||g||m?Dt(a)?d=a:wi(a)?d=An(a):g?(h=!1,d=Cn(l,!0)):m?(h=!1,d=so(l,!0)):d=[]:xe(l)||Bt(l)?(d=a,Bt(a)?d=Ai(a):y(a)&&!M(a)||(d=ho(l))):h=!1}h&&(s.set(l,d),i(d,l,o,r,s),s.delete(l)),bi(t,n,d)}};const vi=function t(e,n,o,i,r){e!==n&&ki(n,(function(s,a){if(r||(r=new ln),y(s))_i(e,n,a,o,t,i,r);else{var l=i?i(Ci(e,a),s,a+"",e,n,r):void 0;void 0===l&&(l=s),bi(e,a,l)}}),Qt)};const yi=At((function(t,e,n){vi(t,e,n)}));const xi=function(t,e,n,o){if(!y(t))return t;for(var i=-1,r=(e=li(e,t)).length,s=r-1,a=t;null!=a&&++i<r;){var l=di(e[i]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(i!=s){var d=a[l];void 0===(c=o?o(d,l,a):void 0)&&(c=y(d)?d:wt(e[i+1])?[]:{})}it(a,l,c),a=a[l]}return t};const Ei=function(t,e,n){return null==t?t:xi(t,e,n)};class Si{constructor(t){this._styles={},this._styleProcessor=t}get isEmpty(){const t=Object.entries(this._styles);return!Array.from(t).length}get size(){return this.isEmpty?0:this.getStyleNames().length}setTo(t){this.clear();const e=Array.from(function(t){let e=null,n=0,o=0,i=null;const r=new Map;if(""===t)return r;";"!=t.charAt(t.length-1)&&(t+=";");for(let s=0;s<t.length;s++){const a=t.charAt(s);if(null===e)switch(a){case":":i||(i=t.substr(n,s-n),o=s+1);break;case'"':case"'":e=a;break;case";":{const e=t.substr(o,s-o);i&&r.set(i.trim(),e.trim()),i=null,n=s+1;break}}else a===e&&(e=null)}return r}(t).entries());for(const[t,n]of e)this._styleProcessor.toNormalizedForm(t,n,this._styles)}has(t){if(this.isEmpty)return!1;const e=this._styleProcessor.getReducedForm(t,this._styles).find((([e])=>e===t));return Array.isArray(e)}set(t,e){if(y(t))for(const[e,n]of Object.entries(t))this._styleProcessor.toNormalizedForm(e,n,this._styles);else this._styleProcessor.toNormalizedForm(t,e,this._styles)}remove(t){const e=Bi(t);pi(this._styles,e),delete this._styles[t],this._cleanEmptyObjectsOnPath(e)}getNormalized(t){return this._styleProcessor.getNormalized(t,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map((t=>t.join(":"))).sort().join(";")+";"}getAsString(t){if(this.isEmpty)return;if(this._styles[t]&&!y(this._styles[t]))return this._styles[t];const e=this._styleProcessor.getReducedForm(t,this._styles).find((([e])=>e===t));return Array.isArray(e)?e[1]:void 0}getStyleNames(t=!1){if(this.isEmpty)return[];if(t)return this._styleProcessor.getStyleNames(this._styles);return this._getStylesEntries().map((([t])=>t))}clear(){this._styles={}}_getStylesEntries(){const t=[],e=Object.keys(this._styles);for(const n of e)t.push(...this._styleProcessor.getReducedForm(n,this._styles));return t}_cleanEmptyObjectsOnPath(t){const e=t.split(".");if(!(e.length>1))return;const n=e.splice(0,e.length-1).join("."),o=fi(this._styles,n);if(!o)return;!Array.from(Object.keys(o)).length&&this.remove(n)}}class Ti{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(t,e,n){if(y(e))Di(n,Bi(t),e);else if(this._normalizers.has(t)){const o=this._normalizers.get(t),{path:i,value:r}=o(e);Di(n,i,r)}else Di(n,t,e)}getNormalized(t,e){if(!t)return yi({},e);if(void 0!==e[t])return e[t];if(this._extractors.has(t)){const n=this._extractors.get(t);if("string"==typeof n)return fi(e,n);const o=n(t,e);if(o)return o}return fi(e,Bi(t))}getReducedForm(t,e){const n=this.getNormalized(t,e);if(void 0===n)return[];if(this._reducers.has(t)){return this._reducers.get(t)(n)}return[[t,n]]}getStyleNames(t){const e=Array.from(this._consumables.keys()).filter((e=>{const n=this.getNormalized(e,t);return n&&"object"==typeof n?Object.keys(n).length:n})),n=new Set([...e,...Object.keys(t)]);return Array.from(n.values())}getRelatedStyles(t){return this._consumables.get(t)||[]}setNormalizer(t,e){this._normalizers.set(t,e)}setExtractor(t,e){this._extractors.set(t,e)}setReducer(t,e){this._reducers.set(t,e)}setStyleRelation(t,e){this._mapStyleNames(t,e);for(const n of e)this._mapStyleNames(n,[t])}_mapStyleNames(t,e){this._consumables.has(t)||this._consumables.set(t,[]),this._consumables.get(t).push(...e)}}function Bi(t){return t.replace("-",".")}function Di(t,e,n){let o=n;y(n)&&(o=yi({},fi(t,e),n)),Ei(t,e,o)}class Ii extends Lo{constructor(t,e,n,o){if(super(t),this.name=e,this._attrs=function(t){t=Wo(t);for(const[e,n]of t)null===n?t.delete(e):"string"!=typeof n&&t.set(e,String(n));return t}(n),this._children=[],o&&this._insertChild(0,o),this._classes=new Set,this._attrs.has("class")){const t=this._attrs.get("class");Pi(this._classes,t),this._attrs.delete("class")}this._styles=new Si(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map,this._isAllowedInsideAttributeElement=!1,this._unsafeAttributesToRender=[]}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}get isAllowedInsideAttributeElement(){return this._isAllowedInsideAttributeElement}is(t,e=null){return e?e===this.name&&("element"===t||"view:element"===t):"element"===t||"view:element"===t||"node"===t||"view:node"===t}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}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(t){if("class"==t)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==t){const t=this._styles.toString();return""==t?void 0:t}return this._attrs.get(t)}hasAttribute(t){return"class"==t?this._classes.size>0:"style"==t?!this._styles.isEmpty:this._attrs.has(t)}isSimilar(t){if(!(t instanceof Ii))return!1;if(this===t)return!0;if(this.name!=t.name)return!1;if(this.isAllowedInsideAttributeElement!=t.isAllowedInsideAttributeElement)return!1;if(this._attrs.size!==t._attrs.size||this._classes.size!==t._classes.size||this._styles.size!==t._styles.size)return!1;for(const[e,n]of this._attrs)if(!t._attrs.has(e)||t._attrs.get(e)!==n)return!1;for(const e of this._classes)if(!t._classes.has(e))return!1;for(const e of this._styles.getStyleNames())if(!t._styles.has(e)||t._styles.getAsString(e)!==this._styles.getAsString(e))return!1;return!0}hasClass(...t){for(const e of t)if(!this._classes.has(e))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(t){return this._styles.getAsString(t)}getNormalizedStyle(t){return this._styles.getNormalized(t)}getStyleNames(t=!1){return this._styles.getStyleNames(t)}hasStyle(...t){for(const e of t)if(!this._styles.has(e))return!1;return!0}findAncestor(...t){const e=new Uo(...t);let n=this.parent;for(;n;){if(e.match(n))return n;n=n.parent}return null}getCustomProperty(t){return this._customProperties.get(t)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const t=Array.from(this._classes).sort().join(","),e=this._styles.toString(),n=Array.from(this._attrs).map((t=>`${t[0]}="${t[1]}"`)).sort().join(" ");return this.name+(""==t?"":` class="${t}"`)+(e?` style="${e}"`:"")+(""==n?"":` ${n}`)}shouldRenderUnsafeAttribute(t){return this._unsafeAttributesToRender.includes(t)}_clone(t=!1){const e=[];if(t)for(const n of this.getChildren())e.push(n._clone(t));const n=new this.constructor(this.document,this.name,this._attrs,e);return n._classes=new Set(this._classes),n._styles.set(this._styles.getNormalized()),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n._isAllowedInsideAttributeElement=this.isAllowedInsideAttributeElement,n}_appendChild(t){return this._insertChild(this.childCount,t)}_insertChild(t,e){this._fireChange("children",this);let n=0;const o=function(t,e){if("string"==typeof e)return[new Ho(t,e)];To(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Ho(t,e):e instanceof qo?new Ho(t,e.data):e))}(this.document,e);for(const e of o)null!==e.parent&&e._remove(),e.parent=this,e.document=this.document,this._children.splice(t,0,e),t++,n++;return n}_removeChildren(t,e=1){this._fireChange("children",this);for(let n=t;n<t+e;n++)this._children[n].parent=null;return this._children.splice(t,e)}_setAttribute(t,e){e=String(e),this._fireChange("attributes",this),"class"==t?Pi(this._classes,e):"style"==t?this._styles.setTo(e):this._attrs.set(t,e)}_removeAttribute(t){return this._fireChange("attributes",this),"class"==t?this._classes.size>0&&(this._classes.clear(),!0):"style"==t?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(t)}_addClass(t){this._fireChange("attributes",this);for(const e of Io(t))this._classes.add(e)}_removeClass(t){this._fireChange("attributes",this);for(const e of Io(t))this._classes.delete(e)}_setStyle(t,e){this._fireChange("attributes",this),this._styles.set(t,e)}_removeStyle(t){this._fireChange("attributes",this);for(const e of Io(t))this._styles.remove(e)}_setCustomProperty(t,e){this._customProperties.set(t,e)}_removeCustomProperty(t){return this._customProperties.delete(t)}}function Pi(t,e){const n=e.split(/\s+/);t.clear(),n.forEach((e=>t.add(e)))}class zi extends Ii{constructor(t,e,n,o){super(t,e,n,o),this.getFillerOffset=Ri}is(t,e=null){return e?e===this.name&&("containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}}function Ri(){const t=[...this.getChildren()],e=t[this.childCount-1];if(e&&e.is("element","br"))return this.childCount;for(const e of t)if(!e.is("uiElement"))return null;return this.childCount}class Vi extends zi{constructor(t,e,n,o){super(t,e,n,o),this.set("isReadOnly",!1),this.set("isFocused",!1),this.bind("isReadOnly").to(t),this.bind("isFocused").to(t,"isFocused",(e=>e&&t.selection.editableElement==this)),this.listenTo(t.selection,"change",(()=>{this.isFocused=t.isFocused&&t.selection.editableElement==this}))}is(t,e=null){return e?e===this.name&&("editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}destroy(){this.stopListening()}}ue(Vi,se);const Fi=Symbol("rootName");class Ni extends Vi{constructor(t,e){super(t,e),this.rootName="main"}is(t,e=null){return e?e===this.name&&("rootElement"===t||"view:rootElement"===t||"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"rootElement"===t||"view:rootElement"===t||"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}get rootName(){return this.getCustomProperty(Fi)}set rootName(t){this._setCustomProperty(Fi,t)}set _name(t){this.name=t}}class Mi{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new a("view-tree-walker-no-start-position",null);if(t.direction&&"forward"!=t.direction&&"backward"!=t.direction)throw new a("view-tree-walker-unknown-direction",t.startPosition,{direction:t.direction});this.boundaries=t.boundaries||null,t.startPosition?this.position=Oi._createAt(t.startPosition):this.position=Oi._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}[Symbol.iterator](){return this}skip(t){let e,n,o;do{o=this.position,({done:e,value:n}=this.next())}while(!e&&t(n));e||(this.position=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let t=this.position.clone();const e=this.position,n=t.parent;if(null===n.parent&&t.offset===n.childCount)return{done:!0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};let o;if(n instanceof Ho){if(t.isAtEnd)return this.position=Oi._createAfter(n),this._next();o=n.data[t.offset]}else o=n.getChild(t.offset);if(o instanceof Ii)return this.shallow?t.offset++:t=new Oi(o,0),this.position=t,this._formatReturnValue("elementStart",o,e,t,1);if(o instanceof Ho){if(this.singleCharacters)return t=new Oi(o,0),this.position=t,this._next();{let n,i=o.data.length;return o==this._boundaryEndParent?(i=this.boundaries.end.offset,n=new qo(o,0,i),t=Oi._createAfter(n)):(n=new qo(o,0,o.data.length),t.offset++),this.position=t,this._formatReturnValue("text",n,e,t,i)}}if("string"==typeof o){let o;if(this.singleCharacters)o=1;else{o=(n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length)-t.offset}const i=new qo(n,t.offset,o);return t.offset+=o,this.position=t,this._formatReturnValue("text",i,e,t,o)}return t=Oi._createAfter(n),this.position=t,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",n,e,t)}_previous(){let t=this.position.clone();const e=this.position,n=t.parent;if(null===n.parent&&0===t.offset)return{done:!0};if(n==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0};let o;if(n instanceof Ho){if(t.isAtStart)return this.position=Oi._createBefore(n),this._previous();o=n.data[t.offset-1]}else o=n.getChild(t.offset-1);if(o instanceof Ii)return this.shallow?(t.offset--,this.position=t,this._formatReturnValue("elementStart",o,e,t,1)):(t=new Oi(o,o.childCount),this.position=t,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",o,e,t));if(o instanceof Ho){if(this.singleCharacters)return t=new Oi(o,o.data.length),this.position=t,this._previous();{let n,i=o.data.length;if(o==this._boundaryStartParent){const e=this.boundaries.start.offset;n=new qo(o,e,o.data.length-e),i=n.data.length,t=Oi._createBefore(n)}else n=new qo(o,0,o.data.length),t.offset--;return this.position=t,this._formatReturnValue("text",n,e,t,i)}}if("string"==typeof o){let o;if(this.singleCharacters)o=1;else{const e=n===this._boundaryStartParent?this.boundaries.start.offset:0;o=t.offset-e}t.offset-=o;const i=new qo(n,t.offset,o);return this.position=t,this._formatReturnValue("text",i,e,t,o)}return t=Oi._createBefore(n),this.position=t,this._formatReturnValue("elementStart",n,e,t,1)}_formatReturnValue(t,e,n,o,i){return e instanceof qo&&(e.offsetInText+e.data.length==e.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=Oi._createAfter(e.textNode):(o=Oi._createAfter(e.textNode),this.position=o)),0===e.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=Oi._createBefore(e.textNode):(o=Oi._createBefore(e.textNode),this.position=o))),{done:!1,value:{type:t,item:e,previousPosition:n,nextPosition:o,length:i}}}}class Oi{constructor(t,e){this.parent=t,this.offset=e}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 t=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===t}get root(){return this.parent.root}get editableElement(){let t=this.parent;for(;!(t instanceof Vi);){if(!t.parent)return null;t=t.parent}return t}getShiftedBy(t){const e=Oi._createAt(this),n=e.offset+t;return e.offset=n<0?0:n,e}getLastMatchingPosition(t,e={}){e.startPosition=this;const n=new Mi(e);return n.skip(t),n.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(t){const e=this.getAncestors(),n=t.getAncestors();let o=0;for(;e[o]==n[o]&&e[o];)o++;return 0===o?null:e[o-1]}is(t){return"position"===t||"view:position"===t}isEqual(t){return this.parent==t.parent&&this.offset==t.offset}isBefore(t){return"before"==this.compareWith(t)}isAfter(t){return"after"==this.compareWith(t)}compareWith(t){if(this.root!==t.root)return"different";if(this.isEqual(t))return"same";const e=this.parent.is("node")?this.parent.getPath():[],n=t.parent.is("node")?t.parent.getPath():[];e.push(this.offset),n.push(t.offset);const o=Mo(e,n);switch(o){case"prefix":return"before";case"extension":return"after";default:return e[o]<n[o]?"before":"after"}}getWalker(t={}){return t.startPosition=this,new Mi(t)}clone(){return new Oi(this.parent,this.offset)}static _createAt(t,e){if(t instanceof Oi)return new this(t.parent,t.offset);{const n=t;if("end"==e)e=n.is("$text")?n.data.length:n.childCount;else{if("before"==e)return this._createBefore(n);if("after"==e)return this._createAfter(n);if(0!==e&&!e)throw new a("view-createpositionat-offset-required",n)}return new Oi(n,e)}}static _createAfter(t){if(t.is("$textProxy"))return new Oi(t.textNode,t.offsetInText+t.data.length);if(!t.parent)throw new a("view-position-after-root",t,{root:t});return new Oi(t.parent,t.index+1)}static _createBefore(t){if(t.is("$textProxy"))return new Oi(t.textNode,t.offsetInText);if(!t.parent)throw new a("view-position-before-root",t,{root:t});return new Oi(t.parent,t.index)}}class Li{constructor(t,e=null){this.start=t.clone(),this.end=e?e.clone():t.clone()}*[Symbol.iterator](){yield*new Mi({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let t=this.start.getLastMatchingPosition(Hi,{direction:"backward"}),e=this.end.getLastMatchingPosition(Hi);return t.parent.is("$text")&&t.isAtStart&&(t=Oi._createBefore(t.parent)),e.parent.is("$text")&&e.isAtEnd&&(e=Oi._createAfter(e.parent)),new Li(t,e)}getTrimmed(){let t=this.start.getLastMatchingPosition(Hi);if(t.isAfter(this.end)||t.isEqual(this.end))return new Li(t,t);let e=this.end.getLastMatchingPosition(Hi,{direction:"backward"});const n=t.nodeAfter,o=e.nodeBefore;return n&&n.is("$text")&&(t=new Oi(n,0)),o&&o.is("$text")&&(e=new Oi(o,o.data.length)),new Li(t,e)}isEqual(t){return this==t||this.start.isEqual(t.start)&&this.end.isEqual(t.end)}containsPosition(t){return t.isAfter(this.start)&&t.isBefore(this.end)}containsRange(t,e=!1){t.isCollapsed&&(e=!1);const n=this.containsPosition(t.start)||e&&this.start.isEqual(t.start),o=this.containsPosition(t.end)||e&&this.end.isEqual(t.end);return n&&o}getDifference(t){const e=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&e.push(new Li(this.start,t.start)),this.containsPosition(t.end)&&e.push(new Li(t.end,this.end))):e.push(this.clone()),e}getIntersection(t){if(this.isIntersecting(t)){let e=this.start,n=this.end;return this.containsPosition(t.start)&&(e=t.start),this.containsPosition(t.end)&&(n=t.end),new Li(e,n)}return null}getWalker(t={}){return t.boundaries=this,new Mi(t)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let t=this.start.nodeAfter,e=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(t=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(e=this.end.parent.previousSibling),t&&t.is("element")&&t===e?t:null}clone(){return new Li(this.start,this.end)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const e=new Mi(t);for(const t of e)yield t.item}*getPositions(t={}){t.boundaries=this;const e=new Mi(t);yield e.position;for(const t of e)yield t.nextPosition}is(t){return"range"===t||"view:range"===t}isIntersecting(t){return this.start.isBefore(t.end)&&this.end.isAfter(t.start)}static _createFromParentsAndOffsets(t,e,n,o){return new this(new Oi(t,e),new Oi(n,o))}static _createFromPositionAndShift(t,e){const n=t,o=t.getShiftedBy(e);return e>0?new this(n,o):new this(o,n)}static _createIn(t){return this._createFromParentsAndOffsets(t,0,t,t.childCount)}static _createOn(t){const e=t.is("$textProxy")?t.offsetSize:1;return this._createFromPositionAndShift(Oi._createBefore(t),e)}}function Hi(t){return!(!t.item.is("attributeElement")&&!t.item.is("uiElement"))}function qi(t){let e=0;for(const n of t)e++;return e}class Wi{constructor(t=null,e,n){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",this.setTo(t,e,n)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.end:t.start).clone()}get focus(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.start:t.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 t of this._ranges)yield t.clone()}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?t.clone():null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?t.clone():null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}isEqual(t){if(this.isFake!=t.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=t.fakeSelectionLabel)return!1;if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let n=!1;for(const o of t._ranges)if(e.isEqual(o)){n=!0;break}if(!n)return!1}return!0}isSimilar(t){if(this.isBackward!=t.isBackward)return!1;const e=qi(this.getRanges());if(e!=qi(t.getRanges()))return!1;if(0==e)return!0;for(let e of this.getRanges()){e=e.getTrimmed();let n=!1;for(let o of t.getRanges())if(o=o.getTrimmed(),e.start.isEqual(o.start)&&e.end.isEqual(o.end)){n=!0;break}if(!n)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(t,e,n){if(null===t)this._setRanges([]),this._setFakeOptions(e);else if(t instanceof Wi||t instanceof Ui)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof Li)this._setRanges([t],e&&e.backward),this._setFakeOptions(e);else if(t instanceof Oi)this._setRanges([new Li(t)]),this._setFakeOptions(e);else if(t instanceof Lo){const o=!!n&&!!n.backward;let i;if(void 0===e)throw new a("view-selection-setto-required-second-parameter",this);i="in"==e?Li._createIn(t):"on"==e?Li._createOn(t):new Li(Oi._createAt(t,e)),this._setRanges([i],o),this._setFakeOptions(n)}else{if(!To(t))throw new a("view-selection-setto-not-selectable",this);this._setRanges(t,e&&e.backward),this._setFakeOptions(e)}this.fire("change")}setFocus(t,e){if(null===this.anchor)throw new a("view-selection-setfocus-no-ranges",this);const n=Oi._createAt(t,e);if("same"==n.compareWith(this.focus))return;const o=this.anchor;this._ranges.pop(),"before"==n.compareWith(o)?this._addRange(new Li(n,o),!0):this._addRange(new Li(o,n)),this.fire("change")}is(t){return"selection"===t||"view:selection"===t}_setRanges(t,e=!1){t=Array.from(t),this._ranges=[];for(const e of t)this._addRange(e);this._lastRangeBackward=!!e}_setFakeOptions(t={}){this._isFake=!!t.fake,this._fakeSelectionLabel=t.fake&&t.label||""}_addRange(t,e=!1){if(!(t instanceof Li))throw new a("view-selection-add-range-not-range",this);this._pushRange(t),this._lastRangeBackward=!!e}_pushRange(t){for(const e of this._ranges)if(t.isIntersecting(e))throw new a("view-selection-range-intersects",this,{addedRange:t,intersectingRange:e});this._ranges.push(new Li(t.start,t.end))}}ue(Wi,f);class Ui{constructor(t=null,e,n){this._selection=new Wi,this._selection.delegate("change").to(this),this._selection.setTo(t,e,n)}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(t){return this._selection.isEqual(t)}isSimilar(t){return this._selection.isSimilar(t)}is(t){return"selection"===t||"documentSelection"==t||"view:selection"==t||"view:documentSelection"==t}_setTo(t,e,n){this._selection.setTo(t,e,n)}_setFocus(t,e){this._selection.setFocus(t,e)}}ue(Ui,f);class ji extends e{constructor(t,e,n){super(t,e),this.startRange=n,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const $i=Symbol("bubbling contexts"),Gi={fire(t,...n){try{const o=t instanceof e?t:new e(this,t),i=Qi(this);if(!i.size)return;if(Zi(o,"capturing",this),Ji(i,"$capture",o,...n))return o.return;const r=o.startRange||this.selection.getFirstRange(),s=r?r.getContainedElement():null,a=!!s&&Boolean(Yi(i,s));let l=s||function(t){if(!t)return null;const e=t.start.parent,n=t.end.parent,o=e.getPath(),i=n.getPath();return o.length>i.length?e:n}(r);if(Zi(o,"atTarget",l),!a){if(Ji(i,"$text",o,...n))return o.return;Zi(o,"bubbling",l)}for(;l;){if(l.is("rootElement")){if(Ji(i,"$root",o,...n))return o.return}else if(l.is("element")&&Ji(i,l.name,o,...n))return o.return;if(Ji(i,l,o,...n))return o.return;l=l.parent,Zi(o,"bubbling",l)}return Zi(o,"bubbling",this),Ji(i,"$document",o,...n),o.return}catch(t){a.rethrowUnexpectedError(t,this)}},_addEventListener(t,e,n){const o=Io(n.context||"$document"),i=Qi(this);for(const r of o){let o=i.get(r);o||(o=Object.create(f),i.set(r,o)),this.listenTo(o,t,e,n)}},_removeEventListener(t,e){const n=Qi(this);for(const o of n.values())this.stopListening(o,t,e)}},Ki=Gi;function Zi(t,e,n){t instanceof ji&&(t._eventPhase=e,t._currentTarget=n)}function Ji(t,e,n,...o){const i="string"==typeof e?t.get(e):Yi(t,e);return!!i&&(i.fire(n,...o),n.stop.called)}function Yi(t,e){for(const[n,o]of t)if("function"==typeof n&&n(e))return o;return null}function Qi(t){return t[$i]||(t[$i]=new Map),t[$i]}class Xi{constructor(t){this.selection=new Ui,this.roots=new Bo({idProperty:"rootName"}),this.stylesProcessor=t,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1),this._postFixers=new Set}getRoot(t="main"){return this.roots.get(t)}registerPostFixer(t){this._postFixers.add(t)}destroy(){this.roots.map((t=>t.destroy())),this.stopListening()}_callPostFixers(t){let e=!1;do{for(const n of this._postFixers)if(e=n(t),e)break}while(e)}}ue(Xi,Ki),ue(Xi,se);class tr extends Ii{constructor(t,e,n,o){super(t,e,n,o),this.getFillerOffset=er,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 a("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}is(t,e=null){return e?e===this.name&&("attributeElement"===t||"view:attributeElement"===t||"element"===t||"view:element"===t):"attributeElement"===t||"view:attributeElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}isSimilar(t){return null!==this.id||null!==t.id?this.id===t.id:super.isSimilar(t)&&this.priority==t.priority}_clone(t){const e=super._clone(t);return e._priority=this._priority,e._id=this._id,e}}function er(){if(nr(this))return null;let t=this.parent;for(;t&&t.is("attributeElement");){if(nr(t)>1)return null;t=t.parent}return!t||nr(t)>1?null:this.childCount}function nr(t){return Array.from(t.getChildren()).filter((t=>!t.is("uiElement"))).length}tr.DEFAULT_PRIORITY=10;class or extends Ii{constructor(t,e,n,o){super(t,e,n,o),this._isAllowedInsideAttributeElement=!0,this.getFillerOffset=ir}is(t,e=null){return e?e===this.name&&("emptyElement"===t||"view:emptyElement"===t||"element"===t||"view:element"===t):"emptyElement"===t||"view:emptyElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}_insertChild(t,e){if(e&&(e instanceof Lo||Array.from(e).length>0))throw new a("view-emptyelement-cannot-add",[this,e])}}function ir(){return null}const rr=navigator.userAgent.toLowerCase(),sr={isMac:lr(rr),isWindows:function(t){return t.indexOf("windows")>-1}(rr),isGecko:function(t){return!!t.match(/gecko\/\d+/)}(rr),isSafari:function(t){return t.indexOf(" applewebkit/")>-1&&-1===t.indexOf("chrome")}(rr),isiOS:function(t){return!!t.match(/iphone|ipad/i)||lr(t)&&navigator.maxTouchPoints>0}(rr),isAndroid:function(t){return t.indexOf("android")>-1}(rr),isBlink:function(t){return t.indexOf("chrome/")>-1&&t.indexOf("edge/")<0}(rr),features:{isRegExpUnicodePropertySupported:function(){let t=!1;try{t=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(t){}return t}()}},ar=sr;function lr(t){return t.indexOf("macintosh")>-1}const cr={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},dr={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},hr=function(){const t={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let e=65;e<=90;e++){const n=String.fromCharCode(e);t[n.toLowerCase()]=e}for(let e=48;e<=57;e++)t[e-48]=e;for(let e=112;e<=123;e++)t["f"+(e-111)]=e;for(const e of"`-=[];',./\\")t[e]=e.charCodeAt(0);return t}(),ur=Object.fromEntries(Object.entries(hr).map((([t,e])=>[e,t.charAt(0).toUpperCase()+t.slice(1)])));function gr(t){let e;if("string"==typeof t){if(e=hr[t.toLowerCase()],!e)throw new a("keyboard-unknown-key",null,{key:t})}else e=t.keyCode+(t.altKey?hr.alt:0)+(t.ctrlKey?hr.ctrl:0)+(t.shiftKey?hr.shift:0)+(t.metaKey?hr.cmd:0);return e}function mr(t){return"string"==typeof t&&(t=function(t){return t.split("+").map((t=>t.trim()))}(t)),t.map((t=>"string"==typeof t?function(t){if(t.endsWith("!"))return gr(t.slice(0,-1));const e=gr(t);return ar.isMac&&e==hr.ctrl?hr.cmd:e}(t):t)).reduce(((t,e)=>e+t),0)}function pr(t){let e=mr(t);return Object.entries(ar.isMac?cr:dr).reduce(((t,[n,o])=>(0!=(e&hr[n])&&(e&=~hr[n],t+=o),t)),"")+(e?ur[e]:"")}function fr(t,e){const n="ltr"===e;switch(t){case hr.arrowleft:return n?"left":"right";case hr.arrowright:return n?"right":"left";case hr.arrowup:return"up";case hr.arrowdown:return"down"}}class br extends Ii{constructor(t,e,n,o){super(t,e,n,o),this._isAllowedInsideAttributeElement=!0,this.getFillerOffset=wr}is(t,e=null){return e?e===this.name&&("uiElement"===t||"view:uiElement"===t||"element"===t||"view:element"===t):"uiElement"===t||"view:uiElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}_insertChild(t,e){if(e&&(e instanceof Lo||Array.from(e).length>0))throw new a("view-uielement-cannot-add",this)}render(t){return this.toDomElement(t)}toDomElement(t){const e=t.createElement(this.name);for(const t of this.getAttributeKeys())e.setAttribute(t,this.getAttribute(t));return e}}function kr(t){t.document.on("arrowKey",((e,n)=>function(t,e,n){if(e.keyCode==hr.arrowright){const t=e.domTarget.ownerDocument.defaultView.getSelection(),o=1==t.rangeCount&&t.getRangeAt(0).collapsed;if(o||e.shiftKey){const e=t.focusNode,i=t.focusOffset,r=n.domPositionToView(e,i);if(null===r)return;let s=!1;const a=r.getLastMatchingPosition((t=>(t.item.is("uiElement")&&(s=!0),!(!t.item.is("uiElement")&&!t.item.is("attributeElement")))));if(s){const e=n.viewPositionToDom(a);o?t.collapse(e.parent,e.offset):t.extend(e.parent,e.offset)}}}}(0,n,t.domConverter)),{priority:"low"})}function wr(){return null}class Cr extends Ii{constructor(t,e,n,o){super(t,e,n,o),this._isAllowedInsideAttributeElement=!0,this.getFillerOffset=Ar}is(t,e=null){return e?e===this.name&&("rawElement"===t||"view:rawElement"===t||"element"===t||"view:element"===t):"rawElement"===t||"view:rawElement"===t||t===this.name||t==="view:"+this.name||"element"===t||"view:element"===t||"node"===t||"view:node"===t}_insertChild(t,e){if(e&&(e instanceof Lo||Array.from(e).length>0))throw new a("view-rawelement-cannot-add",[this,e])}}function Ar(){return null}class _r{constructor(t,e){this.document=t,this._children=[],e&&this._insertChild(0,e)}[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(t){return"documentFragment"===t||"view:documentFragment"===t}_appendChild(t){return this._insertChild(this.childCount,t)}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(t,e){this._fireChange("children",this);let n=0;const o=function(t,e){if("string"==typeof e)return[new Ho(t,e)];To(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Ho(t,e):e instanceof qo?new Ho(t,e.data):e))}(this.document,e);for(const e of o)null!==e.parent&&e._remove(),e.parent=this,this._children.splice(t,0,e),t++,n++;return n}_removeChildren(t,e=1){this._fireChange("children",this);for(let n=t;n<t+e;n++)this._children[n].parent=null;return this._children.splice(t,e)}_fireChange(t,e){this.fire("change:"+t,e)}}ue(_r,f);class vr{constructor(t){this.document=t,this._cloneGroups=new Map,this._slotFactory=null}setSelection(t,e,n){this.document.selection._setTo(t,e,n)}setSelectionFocus(t,e){this.document.selection._setFocus(t,e)}createDocumentFragment(t){return new _r(this.document,t)}createText(t){return new Ho(this.document,t)}createAttributeElement(t,e,n={}){const o=new tr(this.document,t,e);return"number"==typeof n.priority&&(o._priority=n.priority),n.id&&(o._id=n.id),n.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),o}createContainerElement(t,e,n={},o={}){let i=null;xe(n)?o=n:i=n;const r=new zi(this.document,t,e,i);return void 0!==o.isAllowedInsideAttributeElement&&(r._isAllowedInsideAttributeElement=o.isAllowedInsideAttributeElement),o.renderUnsafeAttributes&&r._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),r}createEditableElement(t,e,n={}){const o=new Vi(this.document,t,e);return o._document=this.document,n.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),o}createEmptyElement(t,e,n={}){const o=new or(this.document,t,e);return void 0!==n.isAllowedInsideAttributeElement&&(o._isAllowedInsideAttributeElement=n.isAllowedInsideAttributeElement),n.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),o}createUIElement(t,e,n,o={}){const i=new br(this.document,t,e);return n&&(i.render=n),void 0!==o.isAllowedInsideAttributeElement&&(i._isAllowedInsideAttributeElement=o.isAllowedInsideAttributeElement),i}createRawElement(t,e,n,o={}){const i=new Cr(this.document,t,e);return i.render=n||(()=>{}),void 0!==o.isAllowedInsideAttributeElement&&(i._isAllowedInsideAttributeElement=o.isAllowedInsideAttributeElement),o.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),i}setAttribute(t,e,n){n._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,n){xe(t)&&void 0===n&&(n=e),n._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,n){n._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}breakAttributes(t){return t instanceof Oi?this._breakAttributes(t):this._breakAttributesRange(t)}breakContainer(t){const e=t.parent;if(!e.is("containerElement"))throw new a("view-writer-break-non-container-element",this.document);if(!e.parent)throw new a("view-writer-break-root",this.document);if(t.isAtStart)return Oi._createBefore(e);if(!t.isAtEnd){const n=e._clone(!1);this.insert(Oi._createAfter(e),n);const o=new Li(t,Oi._createAt(e,"end")),i=new Oi(n,0);this.move(o,i)}return Oi._createAfter(e)}mergeAttributes(t){const e=t.offset,n=t.parent;if(n.is("$text"))return t;if(n.is("attributeElement")&&0===n.childCount){const t=n.parent,e=n.index;return n._remove(),this._removeFromClonedElementsGroup(n),this.mergeAttributes(new Oi(t,e))}const o=n.getChild(e-1),i=n.getChild(e);if(!o||!i)return t;if(o.is("$text")&&i.is("$text"))return Tr(o,i);if(o.is("attributeElement")&&i.is("attributeElement")&&o.isSimilar(i)){const t=o.childCount;return o._appendChild(i.getChildren()),i._remove(),this._removeFromClonedElementsGroup(i),this.mergeAttributes(new Oi(o,t))}return t}mergeContainers(t){const e=t.nodeBefore,n=t.nodeAfter;if(!(e&&n&&e.is("containerElement")&&n.is("containerElement")))throw new a("view-writer-merge-containers-invalid-position",this.document);const o=e.getChild(e.childCount-1),i=o instanceof Ho?Oi._createAt(o,"end"):Oi._createAt(e,"end");return this.move(Li._createIn(n),Oi._createAt(e,"end")),this.remove(Li._createOn(n)),i}insert(t,e){Br(e=To(e)?[...e]:[e],this.document);const n=e.reduce(((t,e)=>{const n=t[t.length-1],o=!(e.is("uiElement")&&e.isAllowedInsideAttributeElement);return n&&n.breakAttributes==o?n.nodes.push(e):t.push({breakAttributes:o,nodes:[e]}),t}),[]);let o=null,i=t;for(const{nodes:t,breakAttributes:e}of n){const n=this._insertNodes(i,t,e);o||(o=n.start),i=n.end}return o?new Li(o,i):new Li(t)}remove(t){const e=t instanceof Li?t:Li._createOn(t);if(Pr(e,this.document),e.isCollapsed)return new _r(this.document);const{start:n,end:o}=this._breakAttributesRange(e,!0),i=n.parent,r=o.offset-n.offset,s=i._removeChildren(n.offset,r);for(const t of s)this._removeFromClonedElementsGroup(t);const a=this.mergeAttributes(n);return e.start=a,e.end=a.clone(),new _r(this.document,s)}clear(t,e){Pr(t,this.document);const n=t.getWalker({direction:"backward",ignoreElementEnd:!0});for(const o of n){const n=o.item;let i;if(n.is("element")&&e.isSimilar(n))i=Li._createOn(n);else if(!o.nextPosition.isAfter(t.start)&&n.is("$textProxy")){const t=n.getAncestors().find((t=>t.is("element")&&e.isSimilar(t)));t&&(i=Li._createIn(t))}i&&(i.end.isAfter(t.end)&&(i.end=t.end),i.start.isBefore(t.start)&&(i.start=t.start),this.remove(i))}}move(t,e){let n;if(e.isAfter(t.end)){const o=(e=this._breakAttributes(e,!0)).parent,i=o.childCount;t=this._breakAttributesRange(t,!0),n=this.remove(t),e.offset+=o.childCount-i}else n=this.remove(t);return this.insert(e,n)}wrap(t,e){if(!(e instanceof tr))throw new a("view-writer-wrap-invalid-attribute",this.document);if(Pr(t,this.document),t.isCollapsed){let o=t.start;o.parent.is("element")&&(n=o.parent,!Array.from(n.getChildren()).some((t=>!t.is("uiElement"))))&&(o=o.getLastMatchingPosition((t=>t.item.is("uiElement")))),o=this._wrapPosition(o,e);const i=this.document.selection;return i.isCollapsed&&i.getFirstPosition().isEqual(t.start)&&this.setSelection(o),new Li(o)}return this._wrapRange(t,e);var n}unwrap(t,e){if(!(e instanceof tr))throw new a("view-writer-unwrap-invalid-attribute",this.document);if(Pr(t,this.document),t.isCollapsed)return t;const{start:n,end:o}=this._breakAttributesRange(t,!0),i=n.parent,r=this._unwrapChildren(i,n.offset,o.offset,e),s=this.mergeAttributes(r.start);s.isEqual(r.start)||r.end.offset--;const l=this.mergeAttributes(r.end);return new Li(s,l)}rename(t,e){const n=new zi(this.document,t,e.getAttributes());return this.insert(Oi._createAfter(e),n),this.move(Li._createIn(e),Oi._createAt(n,0)),this.remove(Li._createOn(e)),n}clearClonedElementsGroup(t){this._cloneGroups.delete(t)}createPositionAt(t,e){return Oi._createAt(t,e)}createPositionAfter(t){return Oi._createAfter(t)}createPositionBefore(t){return Oi._createBefore(t)}createRange(t,e){return new Li(t,e)}createRangeOn(t){return Li._createOn(t)}createRangeIn(t){return Li._createIn(t)}createSelection(t,e,n){return new Wi(t,e,n)}createSlot(t){if(!this._slotFactory)throw new a("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,t)}_registerSlotFactory(t){this._slotFactory=t}_clearSlotFactory(){this._slotFactory=null}_insertNodes(t,e,n){let o,i;if(o=n?yr(t):t.parent.is("$text")?t.parent.parent:t.parent,!o)throw new a("view-writer-invalid-position-container",this.document);i=n?this._breakAttributes(t,!0):t.parent.is("$text")?Sr(t):t;const r=o._insertChild(i.offset,e);for(const t of e)this._addToClonedElementsGroup(t);const s=i.getShiftedBy(r),l=this.mergeAttributes(i);l.isEqual(i)||s.offset--;const c=this.mergeAttributes(s);return new Li(l,c)}_wrapChildren(t,e,n,o){let i=e;const r=[];for(;i<n;){const e=t.getChild(i),n=e.is("$text"),s=e.is("attributeElement"),a=e.isAllowedInsideAttributeElement;if(s&&this._wrapAttributeElement(o,e))r.push(new Oi(t,i));else if(n||a||s&&xr(o,e)){const n=o._clone();e._remove(),n._appendChild(e),t._insertChild(i,n),this._addToClonedElementsGroup(n),r.push(new Oi(t,i))}else s&&this._wrapChildren(e,0,e.childCount,o);i++}let s=0;for(const t of r){if(t.offset-=s,t.offset==e)continue;this.mergeAttributes(t).isEqual(t)||(s++,n--)}return Li._createFromParentsAndOffsets(t,e,t,n)}_unwrapChildren(t,e,n,o){let i=e;const r=[];for(;i<n;){const e=t.getChild(i);if(e.is("attributeElement"))if(e.isSimilar(o)){const o=e.getChildren(),s=e.childCount;e._remove(),t._insertChild(i,o),this._removeFromClonedElementsGroup(e),r.push(new Oi(t,i),new Oi(t,i+s)),i+=s,n+=s-1}else this._unwrapAttributeElement(o,e)?(r.push(new Oi(t,i),new Oi(t,i+1)),i++):(this._unwrapChildren(e,0,e.childCount,o),i++);else i++}let s=0;for(const t of r){if(t.offset-=s,t.offset==e||t.offset==n)continue;this.mergeAttributes(t).isEqual(t)||(s++,n--)}return Li._createFromParentsAndOffsets(t,e,t,n)}_wrapRange(t,e){const{start:n,end:o}=this._breakAttributesRange(t,!0),i=n.parent,r=this._wrapChildren(i,n.offset,o.offset,e),s=this.mergeAttributes(r.start);s.isEqual(r.start)||r.end.offset--;const a=this.mergeAttributes(r.end);return new Li(s,a)}_wrapPosition(t,e){if(e.isSimilar(t.parent))return Er(t.clone());t.parent.is("$text")&&(t=Sr(t));const n=this.createAttributeElement();n._priority=Number.POSITIVE_INFINITY,n.isSimilar=()=>!1,t.parent._insertChild(t.offset,n);const o=new Li(t,t.getShiftedBy(1));this.wrap(o,e);const i=new Oi(n.parent,n.index);n._remove();const r=i.nodeBefore,s=i.nodeAfter;return r instanceof Ho&&s instanceof Ho?Tr(r,s):Er(i)}_wrapAttributeElement(t,e){if(!zr(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const n of t.getAttributeKeys())if("class"!==n&&"style"!==n&&e.hasAttribute(n)&&e.getAttribute(n)!==t.getAttribute(n))return!1;for(const n of t.getStyleNames())if(e.hasStyle(n)&&e.getStyle(n)!==t.getStyle(n))return!1;for(const n of t.getAttributeKeys())"class"!==n&&"style"!==n&&(e.hasAttribute(n)||this.setAttribute(n,t.getAttribute(n),e));for(const n of t.getStyleNames())e.hasStyle(n)||this.setStyle(n,t.getStyle(n),e);for(const n of t.getClassNames())e.hasClass(n)||this.addClass(n,e);return!0}_unwrapAttributeElement(t,e){if(!zr(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const n of t.getAttributeKeys())if("class"!==n&&"style"!==n&&(!e.hasAttribute(n)||e.getAttribute(n)!==t.getAttribute(n)))return!1;if(!e.hasClass(...t.getClassNames()))return!1;for(const n of t.getStyleNames())if(!e.hasStyle(n)||e.getStyle(n)!==t.getStyle(n))return!1;for(const n of t.getAttributeKeys())"class"!==n&&"style"!==n&&this.removeAttribute(n,e);return this.removeClass(Array.from(t.getClassNames()),e),this.removeStyle(Array.from(t.getStyleNames()),e),!0}_breakAttributesRange(t,e=!1){const n=t.start,o=t.end;if(Pr(t,this.document),t.isCollapsed){const n=this._breakAttributes(t.start,e);return new Li(n,n)}const i=this._breakAttributes(o,e),r=i.parent.childCount,s=this._breakAttributes(n,e);return i.offset+=i.parent.childCount-r,new Li(s,i)}_breakAttributes(t,e=!1){const n=t.offset,o=t.parent;if(t.parent.is("emptyElement"))throw new a("view-writer-cannot-break-empty-element",this.document);if(t.parent.is("uiElement"))throw new a("view-writer-cannot-break-ui-element",this.document);if(t.parent.is("rawElement"))throw new a("view-writer-cannot-break-raw-element",this.document);if(!e&&o.is("$text")&&Ir(o.parent))return t.clone();if(Ir(o))return t.clone();if(o.is("$text"))return this._breakAttributes(Sr(t),e);if(n==o.childCount){const t=new Oi(o.parent,o.index+1);return this._breakAttributes(t,e)}if(0===n){const t=new Oi(o.parent,o.index);return this._breakAttributes(t,e)}{const t=o.index+1,i=o._clone();o.parent._insertChild(t,i),this._addToClonedElementsGroup(i);const r=o.childCount-n,s=o._removeChildren(n,r);i._appendChild(s);const a=new Oi(o.parent,t);return this._breakAttributes(a,e)}}_addToClonedElementsGroup(t){if(!t.root.is("rootElement"))return;if(t.is("element"))for(const e of t.getChildren())this._addToClonedElementsGroup(e);const e=t.id;if(!e)return;let n=this._cloneGroups.get(e);n||(n=new Set,this._cloneGroups.set(e,n)),n.add(t),t._clonesGroup=n}_removeFromClonedElementsGroup(t){if(t.is("element"))for(const e of t.getChildren())this._removeFromClonedElementsGroup(e);const e=t.id;if(!e)return;const n=this._cloneGroups.get(e);n&&n.delete(t)}}function yr(t){let e=t.parent;for(;!Ir(e);){if(!e)return;e=e.parent}return e}function xr(t,e){return t.priority<e.priority||!(t.priority>e.priority)&&t.getIdentity()<e.getIdentity()}function Er(t){const e=t.nodeBefore;if(e&&e.is("$text"))return new Oi(e,e.data.length);const n=t.nodeAfter;return n&&n.is("$text")?new Oi(n,0):t}function Sr(t){if(t.offset==t.parent.data.length)return new Oi(t.parent.parent,t.parent.index+1);if(0===t.offset)return new Oi(t.parent.parent,t.parent.index);const e=t.parent.data.slice(t.offset);return t.parent._data=t.parent.data.slice(0,t.offset),t.parent.parent._insertChild(t.parent.index+1,new Ho(t.root.document,e)),new Oi(t.parent.parent,t.parent.index+1)}function Tr(t,e){const n=t.data.length;return t._data+=e.data,e._remove(),new Oi(t,n)}function Br(t,e){for(const n of t){if(!Dr.some((t=>n instanceof t)))throw new a("view-writer-insert-invalid-node-type",e);n.is("$text")||Br(n.getChildren(),e)}}const Dr=[Ho,tr,zi,or,Cr,br];function Ir(t){return t&&(t.is("containerElement")||t.is("documentFragment"))}function Pr(t,e){const n=yr(t.start),o=yr(t.end);if(!n||!o||n!==o)throw new a("view-writer-invalid-range-container",e)}function zr(t,e){return null===t.id&&null===e.id}function Rr(t){return"[object Text]"==Object.prototype.toString.call(t)}const Vr=t=>t.createTextNode(" "),Fr=t=>{const e=t.createElement("span");return e.dataset.ckeFiller=!0,e.innerHTML=" ",e},Nr=t=>{const e=t.createElement("br");return e.dataset.ckeFiller=!0,e},Mr="⁠".repeat(7);function Or(t){return Rr(t)&&t.data.substr(0,7)===Mr}function Lr(t){return 7==t.data.length&&Or(t)}function Hr(t){return Or(t)?t.data.slice(7):t.data}function qr(t,e){if(e.keyCode==hr.arrowleft){const t=e.domTarget.ownerDocument.defaultView.getSelection();if(1==t.rangeCount&&t.getRangeAt(0).collapsed){const e=t.getRangeAt(0).startContainer,n=t.getRangeAt(0).startOffset;Or(e)&&n<=7&&t.collapse(e,0)}}}function Wr(t,e,n,o=!1){n=n||function(t,e){return t===e},Array.isArray(t)||(t=Array.prototype.slice.call(t)),Array.isArray(e)||(e=Array.prototype.slice.call(e));const i=function(t,e,n){const o=Ur(t,e,n);if(-1===o)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const i=jr(t,o),r=jr(e,o),s=Ur(i,r,n),a=t.length-s,l=e.length-s;return{firstIndex:o,lastIndexOld:a,lastIndexNew:l}}(t,e,n);return o?function(t,e){const{firstIndex:n,lastIndexOld:o,lastIndexNew:i}=t;if(-1===n)return Array(e).fill("equal");let r=[];n>0&&(r=r.concat(Array(n).fill("equal")));i-n>0&&(r=r.concat(Array(i-n).fill("insert")));o-n>0&&(r=r.concat(Array(o-n).fill("delete")));i<e&&(r=r.concat(Array(e-i).fill("equal")));return r}(i,e.length):function(t,e){const n=[],{firstIndex:o,lastIndexOld:i,lastIndexNew:r}=e;r-o>0&&n.push({index:o,type:"insert",values:t.slice(o,r)});i-o>0&&n.push({index:o+(r-o),type:"delete",howMany:i-o});return n}(e,i)}function Ur(t,e,n){for(let o=0;o<Math.max(t.length,e.length);o++)if(void 0===t[o]||void 0===e[o]||!n(t[o],e[o]))return o;return-1}function jr(t,e){return t.slice(e).reverse()}function $r(t,e,n){n=n||function(t,e){return t===e};const o=t.length,i=e.length;if(o>200||i>200||o+i>300)return $r.fastDiff(t,e,n,!0);let r,s;if(i<o){const n=t;t=e,e=n,r="delete",s="insert"}else r="insert",s="delete";const a=t.length,l=e.length,c=l-a,d={},h={};function u(o){const i=(void 0!==h[o-1]?h[o-1]:-1)+1,c=void 0!==h[o+1]?h[o+1]:-1,u=i>c?-1:1;d[o+u]&&(d[o]=d[o+u].slice(0)),d[o]||(d[o]=[]),d[o].push(i>c?r:s);let g=Math.max(i,c),m=g-o;for(;m<a&&g<l&&n(t[m],e[g]);)m++,g++,d[o].push("equal");return g}let g,m=0;do{for(g=-m;g<c;g++)h[g]=u(g);for(g=c+m;g>c;g--)h[g]=u(g);h[c]=u(c),m++}while(h[c]!==l);return d[c].slice(1)}function Gr(t,e,n){t.insertBefore(n,t.childNodes[e]||null)}function Kr(t){const e=t.parentNode;e&&e.removeChild(t)}function Zr(t){return t&&t.nodeType===Node.COMMENT_NODE}function Jr(t){if(t){if(t.defaultView)return t instanceof t.defaultView.Document;if(t.ownerDocument&&t.ownerDocument.defaultView)return t instanceof t.ownerDocument.defaultView.Node}return!1}$r.fastDiff=Wr;var Yr=n(6062),Qr=n.n(Yr),Xr=n(9315),ts={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Xr.Z,ts);Xr.Z.locals;class es{constructor(t,e){this.domDocuments=new Set,this.domConverter=t,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=e,this.set("isFocused",!1),this.set("isSelecting",!1),ar.isBlink&&!ar.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this._inlineFiller=null,this._fakeSelectionContainer=null}markToSync(t,e){if("text"===t)this.domConverter.mapViewToDom(e.parent)&&this.markedTexts.add(e);else{if(!this.domConverter.mapViewToDom(e))return;if("attributes"===t)this.markedAttributes.add(e);else{if("children"!==t)throw new a("view-renderer-unknown-type",this);this.markedChildren.add(e)}}}render(){let t;const e=!(ar.isBlink&&!ar.isAndroid)||!this.isSelecting;for(const t of this.markedChildren)this._updateChildrenMappings(t);e?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?t=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(t=this.selection.getFirstPosition(),this.markedChildren.add(t.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(t=this.domConverter.domPositionToView(this._inlineFiller));for(const t of this.markedAttributes)this._updateAttrs(t);for(const e of this.markedChildren)this._updateChildren(e,{inlineFillerPosition:t});for(const e of this.markedTexts)!this.markedChildren.has(e.parent)&&this.domConverter.mapViewToDom(e.parent)&&this._updateText(e,{inlineFillerPosition:t});if(e)if(t){const e=this.domConverter.viewPositionToDom(t),n=e.parent.ownerDocument;Or(e.parent)?this._inlineFiller=e.parent:this._inlineFiller=ns(n,e.parent,e.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const n=Array.from(this.domConverter.mapViewToDom(t).childNodes),o=Array.from(this.domConverter.viewChildrenToDom(t,e.ownerDocument,{withChildren:!1})),i=this._diffNodeLists(n,o),r=this._findReplaceActions(i,n,o);if(-1!==r.indexOf("replace")){const e={equal:0,insert:0,delete:0};for(const i of r)if("replace"===i){const i=e.equal+e.insert,r=e.equal+e.delete,s=t.getChild(i);!s||s.is("uiElement")||s.is("rawElement")||this._updateElementMappings(s,n[r]),Kr(o[i]),e.equal++}else e[i]++}}_updateElementMappings(t,e){this.domConverter.unbindDomElement(e),this.domConverter.bindElements(e,t),this.markedChildren.add(t),this.markedAttributes.add(t)}_getInlineFillerPosition(){const t=this.selection.getFirstPosition();return t.parent.is("$text")?Oi._createBefore(this.selection.getFirstPosition().parent):t}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=this.domConverter.viewPositionToDom(t);return!!(e&&Rr(e.parent)&&Or(e.parent))}_removeInlineFiller(){const t=this._inlineFiller;if(!Or(t))throw new a("view-renderer-filler-was-lost",this);Lr(t)?t.remove():t.data=t.data.substr(7),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=t.parent,n=t.offset;if(!this.domConverter.mapViewToDom(e.root))return!1;if(!e.is("element"))return!1;if(!function(t){if("false"==t.getAttribute("contenteditable"))return!1;const e=t.findAncestor((t=>t.hasAttribute("contenteditable")));return!e||"true"==e.getAttribute("contenteditable")}(e))return!1;if(n===e.getFillerOffset())return!1;const o=t.nodeBefore,i=t.nodeAfter;return!(o instanceof Ho||i instanceof Ho)}_updateText(t,e){const n=this.domConverter.findCorrespondingDomText(t),o=this.domConverter.viewToDom(t,n.ownerDocument),i=n.data;let r=o.data;const s=e.inlineFillerPosition;if(s&&s.parent==t.parent&&s.offset==t.index&&(r=Mr+r),i!=r){const t=Wr(i,r);for(const e of t)"insert"===e.type?n.insertData(e.index,e.values.join("")):n.deleteData(e.index,e.howMany)}}_updateAttrs(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const n=Array.from(e.attributes).map((t=>t.name)),o=t.getAttributeKeys();for(const n of o)this.domConverter.setDomElementAttribute(e,n,t.getAttribute(n),t);for(const o of n)t.hasAttribute(o)||this.domConverter.removeDomElementAttribute(e,o)}_updateChildren(t,e){const n=this.domConverter.mapViewToDom(t);if(!n)return;const o=e.inlineFillerPosition,i=this.domConverter.mapViewToDom(t).childNodes,r=Array.from(this.domConverter.viewChildrenToDom(t,n.ownerDocument,{bind:!0}));o&&o.parent===t&&ns(n.ownerDocument,r,o.offset);const s=this._diffNodeLists(i,r);let a=0;const l=new Set;for(const t of s)"delete"===t?(l.add(i[a]),Kr(i[a])):"equal"===t&&a++;a=0;for(const t of s)"insert"===t?(Gr(n,a,r[a]),a++):"equal"===t&&(this._markDescendantTextToSync(this.domConverter.domToView(r[a])),a++);for(const t of l)t.parentNode||this.domConverter.unbindDomElement(t)}_diffNodeLists(t,e){return $r(t=function(t,e){const n=Array.from(t);if(0==n.length||!e)return n;n[n.length-1]==e&&n.pop();return n}(t,this._fakeSelectionContainer),e,is.bind(null,this.domConverter))}_findReplaceActions(t,e,n){if(-1===t.indexOf("insert")||-1===t.indexOf("delete"))return t;let o=[],i=[],r=[];const s={equal:0,insert:0,delete:0};for(const a of t)"insert"===a?r.push(n[s.equal+s.insert]):"delete"===a?i.push(e[s.equal+s.delete]):(o=o.concat($r(i,r,os).map((t=>"equal"===t?"replace":t))),o.push("equal"),i=[],r=[]),s[a]++;return o.concat($r(i,r,os).map((t=>"equal"===t?"replace":t)))}_markDescendantTextToSync(t){if(t)if(t.is("$text"))this.markedTexts.add(t);else if(t.is("element"))for(const e of t.getChildren())this._markDescendantTextToSync(e)}_updateSelection(){if(ar.isBlink&&!ar.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const t=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&t&&(this.selection.isFake?this._updateFakeSelection(t):(this._removeFakeSelection(),this._updateDomSelection(t)))}_updateFakeSelection(t){const e=t.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(t){const e=t.createElement("div");return e.className="ck-fake-selection-container",Object.assign(e.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),e.textContent=" ",e}(e));const n=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(n,this.selection),!this._fakeSelectionNeedsUpdate(t))return;n.parentElement&&n.parentElement==t||t.appendChild(n),n.textContent=this.selection.fakeSelectionLabel||" ";const o=e.getSelection(),i=e.createRange();o.removeAllRanges(),i.selectNodeContents(n),o.addRange(i)}_updateDomSelection(t){const e=t.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(e))return;const n=this.domConverter.viewPositionToDom(this.selection.anchor),o=this.domConverter.viewPositionToDom(this.selection.focus);e.collapse(n.parent,n.offset),e.extend(o.parent,o.offset),ar.isGecko&&function(t,e){const n=t.parent;if(n.nodeType!=Node.ELEMENT_NODE||t.offset!=n.childNodes.length-1)return;const o=n.childNodes[t.offset];o&&"BR"==o.tagName&&e.addRange(e.getRangeAt(0))}(o,e)}_domSelectionNeedsUpdate(t){if(!this.domConverter.isDomSelectionCorrect(t))return!0;const e=t&&this.domConverter.domSelectionToView(t);return(!e||!this.selection.isEqual(e))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(e))}_fakeSelectionNeedsUpdate(t){const e=this._fakeSelectionContainer,n=t.ownerDocument.getSelection();return!e||e.parentElement!==t||(n.anchorNode!==e&&!e.contains(n.anchorNode)||e.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const t of this.domDocuments){if(t.getSelection().rangeCount){const e=t.activeElement,n=this.domConverter.mapDomToView(e);e&&n&&t.getSelection().removeAllRanges()}}}_removeFakeSelection(){const t=this._fakeSelectionContainer;t&&t.remove()}_updateFocus(){if(this.isFocused){const t=this.selection.editableElement;t&&this.domConverter.focus(t)}}}function ns(t,e,n){const o=e instanceof Array?e:e.childNodes,i=o[n];if(Rr(i))return i.data=Mr+i.data,i;{const i=t.createTextNode(Mr);return Array.isArray(e)?o.splice(n,0,i):Gr(e,n,i),i}}function os(t,e){return Jr(t)&&Jr(e)&&!Rr(t)&&!Rr(e)&&!Zr(t)&&!Zr(e)&&t.tagName.toLowerCase()===e.tagName.toLowerCase()}function is(t,e,n){return e===n||(Rr(e)&&Rr(n)?e.data===n.data:!(!t.isBlockFiller(e)||!t.isBlockFiller(n)))}ue(es,se);const rs={window,document};function ss(t){let e=0;for(;t.previousSibling;)t=t.previousSibling,e++;return e}function as(t){const e=[];for(;t&&t.nodeType!=Node.DOCUMENT_NODE;)e.unshift(t),t=t.parentNode;return e}const ls=Nr(document),cs=Vr(document),ds=Fr(document),hs="data-ck-unsafe-attribute-",us="data-ck-unsafe-element",gs=["script","style"];class ms{constructor(t,e={}){this.document=t,this.renderingMode=e.renderingMode||"editing",this.blockFillerMode=e.blockFillerMode||("editing"===this.renderingMode?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new Uo,this._encounteredRawContentDomNodes=new WeakSet}bindFakeSelection(t,e){this._fakeSelectionMapping.set(t,new Wi(e))}fakeSelectionToView(t){return this._fakeSelectionMapping.get(t)}bindElements(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}unbindDomElement(t){const e=this._domToViewMapping.get(t);if(e){this._domToViewMapping.delete(t),this._viewToDomMapping.delete(e);for(const e of t.childNodes)this.unbindDomElement(e)}}bindDocumentFragments(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}shouldRenderAttribute(t,e,n){return"data"===this.renderingMode||!(t=t.toLowerCase()).startsWith("on")&&(("srcdoc"!==t||!e.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===n&&("src"===t||"srcset"===t)||("source"===n&&"srcset"===t||!e.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))))}setContentOf(t,e){if("data"===this.renderingMode)return void(t.innerHTML=e);const n=(new DOMParser).parseFromString(e,"text/html"),o=n.createDocumentFragment(),i=n.body.childNodes;for(;i.length>0;)o.appendChild(i[0]);const r=n.createTreeWalker(o,NodeFilter.SHOW_ELEMENT),s=[];let a;for(;a=r.nextNode();)s.push(a);for(const t of s){for(const e of t.getAttributeNames())this.setDomElementAttribute(t,e,t.getAttribute(e));const e=t.tagName.toLowerCase();this._shouldRenameElement(e)&&(bs(e),t.replaceWith(this._createReplacementDomElement(e,t)))}for(;t.firstChild;)t.firstChild.remove();t.append(o)}viewToDom(t,e,n={}){if(t.is("$text")){const n=this._processDataFromViewText(t);return e.createTextNode(n)}{if(this.mapViewToDom(t))return this.mapViewToDom(t);let o;if(t.is("documentFragment"))o=e.createDocumentFragment(),n.bind&&this.bindDocumentFragments(o,t);else{if(t.is("uiElement"))return o="$comment"===t.name?e.createComment(t.getCustomProperty("$rawContent")):t.render(e,this),n.bind&&this.bindElements(o,t),o;this._shouldRenameElement(t.name)?(bs(t.name),o=this._createReplacementDomElement(t.name)):o=t.hasAttribute("xmlns")?e.createElementNS(t.getAttribute("xmlns"),t.name):e.createElement(t.name),t.is("rawElement")&&t.render(o,this),n.bind&&this.bindElements(o,t);for(const e of t.getAttributeKeys())this.setDomElementAttribute(o,e,t.getAttribute(e),t)}if(!1!==n.withChildren)for(const i of this.viewChildrenToDom(t,e,n))o.appendChild(i);return o}}setDomElementAttribute(t,e,n,o=null){const i=this.shouldRenderAttribute(e,n,t.tagName.toLowerCase())||o&&o.shouldRenderUnsafeAttribute(e);i||l("domconverter-unsafe-attribute-detected",{domElement:t,key:e,value:n}),t.hasAttribute(e)&&!i?t.removeAttribute(e):t.hasAttribute(hs+e)&&i&&t.removeAttribute(hs+e),t.setAttribute(i?e:hs+e,n)}removeDomElementAttribute(t,e){e!=us&&(t.removeAttribute(e),t.removeAttribute(hs+e))}*viewChildrenToDom(t,e,n={}){const o=t.getFillerOffset&&t.getFillerOffset();let i=0;for(const r of t.getChildren())o===i&&(yield this._getBlockFiller(e)),yield this.viewToDom(r,e,n),i++;o===i&&(yield this._getBlockFiller(e))}viewRangeToDom(t){const e=this.viewPositionToDom(t.start),n=this.viewPositionToDom(t.end),o=document.createRange();return o.setStart(e.parent,e.offset),o.setEnd(n.parent,n.offset),o}viewPositionToDom(t){const e=t.parent;if(e.is("$text")){const n=this.findCorrespondingDomText(e);if(!n)return null;let o=t.offset;return Or(n)&&(o+=7),{parent:n,offset:o}}{let n,o,i;if(0===t.offset){if(n=this.mapViewToDom(e),!n)return null;i=n.childNodes[0]}else{const e=t.nodeBefore;if(o=e.is("$text")?this.findCorrespondingDomText(e):this.mapViewToDom(t.nodeBefore),!o)return null;n=o.parentNode,i=o.nextSibling}if(Rr(i)&&Or(i))return{parent:i,offset:7};return{parent:n,offset:o?ss(o)+1:0}}}domToView(t,e={}){if(this.isBlockFiller(t))return null;const n=this.getHostViewElement(t);if(n)return n;if(Zr(t)&&e.skipComments)return null;if(Rr(t)){if(Lr(t))return null;{const e=this._processDataFromDomText(t);return""===e?null:new Ho(this.document,e)}}{if(this.mapDomToView(t))return this.mapDomToView(t);let n;if(this.isDocumentFragment(t))n=new _r(this.document),e.bind&&this.bindDocumentFragments(t,n);else{n=this._createViewElement(t,e),e.bind&&this.bindElements(t,n);const o=t.attributes;if(o)for(let t=o.length-1;t>=0;t--)n._setAttribute(o[t].name,o[t].value);if(this._isViewElementWithRawContent(n,e)||Zr(t)){const e=Zr(t)?t.data:t.innerHTML;return n._setCustomProperty("$rawContent",e),this._encounteredRawContentDomNodes.add(t),n}}if(!1!==e.withChildren)for(const o of this.domChildrenToView(t,e))n._appendChild(o);return n}}*domChildrenToView(t,e={}){for(let n=0;n<t.childNodes.length;n++){const o=t.childNodes[n],i=this.domToView(o,e);null!==i&&(yield i)}}domSelectionToView(t){if(1===t.rangeCount){let e=t.getRangeAt(0).startContainer;Rr(e)&&(e=e.parentNode);const n=this.fakeSelectionToView(e);if(n)return n}const e=this.isDomSelectionBackward(t),n=[];for(let e=0;e<t.rangeCount;e++){const o=t.getRangeAt(e),i=this.domRangeToView(o);i&&n.push(i)}return new Wi(n,{backward:e})}domRangeToView(t){const e=this.domPositionToView(t.startContainer,t.startOffset),n=this.domPositionToView(t.endContainer,t.endOffset);return e&&n?new Li(e,n):null}domPositionToView(t,e=0){if(this.isBlockFiller(t))return this.domPositionToView(t.parentNode,ss(t));const n=this.mapDomToView(t);if(n&&(n.is("uiElement")||n.is("rawElement")))return Oi._createBefore(n);if(Rr(t)){if(Lr(t))return this.domPositionToView(t.parentNode,ss(t));const n=this.findCorrespondingViewText(t);let o=e;return n?(Or(t)&&(o-=7,o=o<0?0:o),new Oi(n,o)):null}if(0===e){const e=this.mapDomToView(t);if(e)return new Oi(e,0)}else{const n=t.childNodes[e-1],o=Rr(n)?this.findCorrespondingViewText(n):this.mapDomToView(n);if(o&&o.parent)return new Oi(o.parent,o.index+1)}return null}mapDomToView(t){return this.getHostViewElement(t)||this._domToViewMapping.get(t)}findCorrespondingViewText(t){if(Lr(t))return null;const e=this.getHostViewElement(t);if(e)return e;const n=t.previousSibling;if(n){if(!this.isElement(n))return null;const t=this.mapDomToView(n);if(t){return t.nextSibling instanceof Ho?t.nextSibling:null}}else{const e=this.mapDomToView(t.parentNode);if(e){const t=e.getChild(0);return t instanceof Ho?t:null}}return null}mapViewToDom(t){return this._viewToDomMapping.get(t)}findCorrespondingDomText(t){const e=t.previousSibling;return e&&this.mapViewToDom(e)?this.mapViewToDom(e).nextSibling:!e&&t.parent&&this.mapViewToDom(t.parent)?this.mapViewToDom(t.parent).childNodes[0]:null}focus(t){const e=this.mapViewToDom(t);if(e&&e.ownerDocument.activeElement!==e){const{scrollX:t,scrollY:n}=rs.window,o=[];ps(e,(t=>{const{scrollLeft:e,scrollTop:n}=t;o.push([e,n])})),e.focus(),ps(e,(t=>{const[e,n]=o.shift();t.scrollLeft=e,t.scrollTop=n})),rs.window.scrollTo(t,n)}}isElement(t){return t&&t.nodeType==Node.ELEMENT_NODE}isDocumentFragment(t){return t&&t.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(t){return"br"==this.blockFillerMode?t.isEqualNode(ls):!("BR"!==t.tagName||!fs(t,this.blockElements)||1!==t.parentNode.childNodes.length)||(t.isEqualNode(ds)||function(t,e){return t.isEqualNode(cs)&&fs(t,e)&&1===t.parentNode.childNodes.length}(t,this.blockElements))}isDomSelectionBackward(t){if(t.isCollapsed)return!1;const e=document.createRange();e.setStart(t.anchorNode,t.anchorOffset),e.setEnd(t.focusNode,t.focusOffset);const n=e.collapsed;return e.detach(),n}getHostViewElement(t){const e=as(t);for(e.pop();e.length;){const t=e.pop(),n=this._domToViewMapping.get(t);if(n&&(n.is("uiElement")||n.is("rawElement")))return n}return null}isDomSelectionCorrect(t){return this._isDomSelectionPositionCorrect(t.anchorNode,t.anchorOffset)&&this._isDomSelectionPositionCorrect(t.focusNode,t.focusOffset)}registerRawContentMatcher(t){this._rawContentElementMatcher.add(t)}_getBlockFiller(t){switch(this.blockFillerMode){case"nbsp":return Vr(t);case"markedNbsp":return Fr(t);case"br":return Nr(t)}}_isDomSelectionPositionCorrect(t,e){if(Rr(t)&&Or(t)&&e<7)return!1;if(this.isElement(t)&&Or(t.childNodes[e]))return!1;const n=this.mapDomToView(t);return!n||!n.is("uiElement")&&!n.is("rawElement")}_processDataFromViewText(t){let e=t.data;if(t.getAncestors().some((t=>this.preElements.includes(t.name))))return e;if(" "==e.charAt(0)){const n=this._getTouchingInlineViewNode(t,!1);!(n&&n.is("$textProxy")&&this._nodeEndsWithSpace(n))&&n||(e=" "+e.substr(1))}if(" "==e.charAt(e.length-1)){const n=this._getTouchingInlineViewNode(t,!0),o=n&&n.is("$textProxy")&&" "==n.data.charAt(0);" "!=e.charAt(e.length-2)&&n&&!o||(e=e.substr(0,e.length-1)+" ")}return e.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(t){if(t.getAncestors().some((t=>this.preElements.includes(t.name))))return!1;const e=this._processDataFromViewText(t);return" "==e.charAt(e.length-1)}_processDataFromDomText(t){let e=t.data;if(function(t,e){return as(t).some((t=>t.tagName&&e.includes(t.tagName.toLowerCase())))}(t,this.preElements))return Hr(t);e=e.replace(/[ \n\t\r]{1,}/g," ");const n=this._getTouchingInlineDomNode(t,!1),o=this._getTouchingInlineDomNode(t,!0),i=this._checkShouldLeftTrimDomText(t,n),r=this._checkShouldRightTrimDomText(t,o);i&&(e=e.replace(/^ /,"")),r&&(e=e.replace(/ $/,"")),e=Hr(new Text(e)),e=e.replace(/ \u00A0/g," ");const s=o&&this.isElement(o)&&"BR"!=o.tagName,a=o&&Rr(o)&&" "==o.data.charAt(0);return(/( |\u00A0)\u00A0$/.test(e)||!o||s||a)&&(e=e.replace(/\u00A0$/," ")),(i||n&&this.isElement(n)&&"BR"!=n.tagName)&&(e=e.replace(/^\u00A0/," ")),e}_checkShouldLeftTrimDomText(t,e){return!e||(this.isElement(e)?"BR"===e.tagName:!this._encounteredRawContentDomNodes.has(t.previousSibling)&&/[^\S\u00A0]/.test(e.data.charAt(e.data.length-1)))}_checkShouldRightTrimDomText(t,e){return!e&&!Or(t)}_getTouchingInlineViewNode(t,e){const n=new Mi({startPosition:e?Oi._createAfter(t):Oi._createBefore(t),direction:e?"forward":"backward"});for(const t of n){if(t.item.is("element")&&this.inlineObjectElements.includes(t.item.name))return t.item;if(t.item.is("containerElement"))return null;if(t.item.is("element","br"))return null;if(t.item.is("$textProxy"))return t.item}return null}_getTouchingInlineDomNode(t,e){if(!t.parentNode)return null;const n=e?"firstChild":"lastChild",o=e?"nextSibling":"previousSibling";let i=!0;do{if(!i&&t[n]?t=t[n]:t[o]?(t=t[o],i=!1):(t=t.parentNode,i=!0),!t||this._isBlockElement(t))return null}while(!Rr(t)&&"BR"!=t.tagName&&!this._isInlineObjectElement(t));return t}_isBlockElement(t){return this.isElement(t)&&this.blockElements.includes(t.tagName.toLowerCase())}_isInlineObjectElement(t){return this.isElement(t)&&this.inlineObjectElements.includes(t.tagName.toLowerCase())}_createViewElement(t,e){if(Zr(t))return new br(this.document,"$comment");const n=e.keepOriginalCase?t.tagName:t.tagName.toLowerCase();return new Ii(this.document,n)}_isViewElementWithRawContent(t,e){return!1!==e.withChildren&&this._rawContentElementMatcher.match(t)}_shouldRenameElement(t){const e=t.toLowerCase();return"editing"===this.renderingMode&&gs.includes(e)}_createReplacementDomElement(t,e=null){const n=document.createElement("span");if(n.setAttribute(us,t),e){for(;e.firstChild;)n.appendChild(e.firstChild);for(const t of e.getAttributeNames())n.setAttribute(t,e.getAttribute(t))}return n}}function ps(t,e){for(;t&&t!=rs.document;)e(t),t=t.parentNode}function fs(t,e){const n=t.parentNode;return n&&n.tagName&&e.includes(n.tagName.toLowerCase())}function bs(t){"script"===t&&l("domconverter-unsafe-script-element-detected"),"style"===t&&l("domconverter-unsafe-style-element-detected")}function ks(t){const e=Object.prototype.toString.apply(t);return"[object Window]"==e||"[object global]"==e}const ws=Xt({},f,{listenTo(t,e,n,o={}){if(Jr(t)||ks(t)){const i={capture:!!o.useCapture,passive:!!o.usePassive},r=this._getProxyEmitter(t,i)||new As(t,i);this.listenTo(r,e,n,o)}else f.listenTo.call(this,t,e,n,o)},stopListening(t,e,n){if(Jr(t)||ks(t)){const o=this._getAllProxyEmitters(t);for(const t of o)this.stopListening(t,e,n)}else f.stopListening.call(this,t,e,n)},_getProxyEmitter(t,e){return n=this,o=_s(t,e),n[g]&&n[g][o]?n[g][o].emitter:null;var n,o},_getAllProxyEmitters(t){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map((e=>this._getProxyEmitter(t,e))).filter((t=>!!t))}}),Cs=ws;class As{constructor(t,e){b(this,_s(t,e)),this._domNode=t,this._options=e}}function _s(t,e){let n=function(t){return t["data-ck-expando"]||(t["data-ck-expando"]=r())}(t);for(const t of Object.keys(e).sort())e[t]&&(n+="-"+t);return n}Xt(As.prototype,f,{attach(t){if(this._domListeners&&this._domListeners[t])return;const e=this._createDomListener(t);this._domNode.addEventListener(t,e,this._options),this._domListeners||(this._domListeners={}),this._domListeners[t]=e},detach(t){let e;!this._domListeners[t]||(e=this._events[t])&&e.callbacks.length||this._domListeners[t].removeListener()},_addEventListener(t,e,n){this.attach(t),f._addEventListener.call(this,t,e,n)},_removeEventListener(t,e){f._removeEventListener.call(this,t,e),this.detach(t)},_createDomListener(t){const e=e=>{this.fire(t,e)};return e.removeListener=()=>{this._domNode.removeEventListener(t,e,this._options),delete this._domListeners[t]},e}});class vs{constructor(t){this.view=t,this.document=t.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(t){return t&&3===t.nodeType&&(t=t.parentNode),!(!t||1!==t.nodeType)&&t.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}ue(vs,Cs);const ys=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const xs=function(t){return this.__data__.has(t)};function Es(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new rn;++e<n;)this.add(t[e])}Es.prototype.add=Es.prototype.push=ys,Es.prototype.has=xs;const Ss=Es;const Ts=function(t,e){for(var n=-1,o=null==t?0:t.length;++n<o;)if(e(t[n],n,t))return!0;return!1};const Bs=function(t,e){return t.has(e)};const Ds=function(t,e,n,o,i,r){var s=1&n,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=r.get(t),d=r.get(e);if(c&&d)return c==e&&d==t;var h=-1,u=!0,g=2&n?new Ss:void 0;for(r.set(t,e),r.set(e,t);++h<a;){var m=t[h],p=e[h];if(o)var f=s?o(p,m,h,e,t,r):o(m,p,h,t,e,r);if(void 0!==f){if(f)continue;u=!1;break}if(g){if(!Ts(e,(function(t,e){if(!Bs(g,e)&&(m===t||i(m,t,n,o,r)))return g.push(e)}))){u=!1;break}}else if(m!==p&&!i(m,p,n,o,r)){u=!1;break}}return r.delete(t),r.delete(e),u};const Is=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,o){n[++e]=[o,t]})),n};const Ps=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n};var zs=T?T.prototype:void 0,Rs=zs?zs.valueOf:void 0;const Vs=function(t,e,n,o,i,r,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!r(new Qn(t),new Qn(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return nt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=Is;case"[object Set]":var l=1&o;if(a||(a=Ps),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;o|=2,s.set(t,e);var d=Ds(a(t),a(e),o,i,r,s);return s.delete(t),d;case"[object Symbol]":if(Rs)return Rs.call(t)==Rs.call(e)}return!1};var Fs=Object.prototype.hasOwnProperty;const Ns=function(t,e,n,o,i,r){var s=1&n,a=Pn(t),l=a.length;if(l!=Pn(e).length&&!s)return!1;for(var c=l;c--;){var d=a[c];if(!(s?d in e:Fs.call(e,d)))return!1}var h=r.get(t),u=r.get(e);if(h&&u)return h==e&&u==t;var g=!0;r.set(t,e),r.set(e,t);for(var m=s;++c<l;){var p=t[d=a[c]],f=e[d];if(o)var b=s?o(f,p,d,e,t,r):o(p,f,d,t,e,r);if(!(void 0===b?p===f||i(p,f,n,o,r):b)){g=!1;break}m||(m="constructor"==d)}if(g&&!m){var k=t.constructor,w=e.constructor;k==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof k&&k instanceof k&&"function"==typeof w&&w instanceof w||(g=!1)}return r.delete(t),r.delete(e),g};var Ms="[object Arguments]",Os="[object Array]",Ls="[object Object]",Hs=Object.prototype.hasOwnProperty;const qs=function(t,e,n,o,i,r){var s=Dt(t),a=Dt(e),l=s?Os:Zn(t),c=a?Os:Zn(e),d=(l=l==Ms?Ls:l)==Ls,h=(c=c==Ms?Ls:c)==Ls,u=l==c;if(u&&Vt(t)){if(!Vt(e))return!1;s=!0,d=!1}if(u&&!d)return r||(r=new ln),s||Ut(t)?Ds(t,e,n,o,i,r):Vs(t,e,l,n,o,i,r);if(!(1&n)){var g=d&&Hs.call(t,"__wrapped__"),m=h&&Hs.call(e,"__wrapped__");if(g||m){var p=g?t.value():t,f=m?e.value():e;return r||(r=new ln),i(p,f,n,o,r)}}return!!u&&(r||(r=new ln),Ns(t,e,n,o,i,r))};const Ws=function t(e,n,o,i,r){return e===n||(null==e||null==n||!vt(e)&&!vt(n)?e!=e&&n!=n:qs(e,n,o,i,t,r))};const Us=function(t,e,n){var o=(n="function"==typeof n?n:void 0)?n(t,e):void 0;return void 0===o?Ws(t,e,void 0,n):!!o};class js extends vs{constructor(t){super(t),this._config={childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},this.domConverter=t.domConverter,this.renderer=t._renderer,this._domElements=[],this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(t){this._domElements.push(t),this.isEnabled&&this._mutationObserver.observe(t,this._config)}enable(){super.enable();for(const t of this._domElements)this._mutationObserver.observe(t,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(t){if(0===t.length)return;const e=this.domConverter,n=new Map,o=new Set;for(const n of t)if("childList"===n.type){const t=e.mapDomToView(n.target);if(t&&(t.is("uiElement")||t.is("rawElement")))continue;t&&!this._isBogusBrMutation(n)&&o.add(t)}for(const i of t){const t=e.mapDomToView(i.target);if((!t||!t.is("uiElement")&&!t.is("rawElement"))&&"characterData"===i.type){const t=e.findCorrespondingViewText(i.target);t&&!o.has(t.parent)?n.set(t,{type:"text",oldText:t.data,newText:Hr(i.target),node:t}):!t&&Or(i.target)&&o.add(e.mapDomToView(i.target.parentNode))}}const i=[];for(const t of n.values())this.renderer.markToSync("text",t.node),i.push(t);for(const t of o){const n=e.mapViewToDom(t),o=Array.from(t.getChildren()),r=Array.from(e.domChildrenToView(n,{withChildren:!1}));Us(o,r,a)||(this.renderer.markToSync("children",t),i.push({type:"children",oldChildren:o,newChildren:r,node:t}))}const r=t[0].target.ownerDocument.getSelection();let s=null;if(r&&r.anchorNode){const t=e.domPositionToView(r.anchorNode,r.anchorOffset),n=e.domPositionToView(r.focusNode,r.focusOffset);t&&n&&(s=new Wi(t),s.setFocus(n))}function a(t,e){if(!Array.isArray(t))return t===e||!(!t.is("$text")||!e.is("$text"))&&t.data===e.data}i.length&&(this.document.fire("mutations",i,s),this.view.forceRender())}_isBogusBrMutation(t){let e=null;return null===t.nextSibling&&0===t.removedNodes.length&&1==t.addedNodes.length&&(e=this.domConverter.domToView(t.addedNodes[0],{withChildren:!1})),e&&e.is("element","br")}}class $s{constructor(t,e,n){this.view=t,this.document=t.document,this.domEvent=e,this.domTarget=e.target,Xt(this,n)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Gs extends vs{constructor(t){super(t),this.useCapture=!1}observe(t){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((e=>{this.listenTo(t,e,((t,e)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(e.target)&&this.onDomEvent(e)}),{useCapture:this.useCapture})}))}fire(t,e,n){this.isEnabled&&this.document.fire(t,new $s(this.view,e,n))}}class Ks extends Gs{constructor(t){super(t),this.domEventType=["keydown","keyup"]}onDomEvent(t){this.fire(t.type,t,{keyCode:t.keyCode,altKey:t.altKey,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,metaKey:t.metaKey,get keystroke(){return gr(this)}})}}const Zs=function(){return S.Date.now()};var Js=/\s/;const Ys=function(t){for(var e=t.length;e--&&Js.test(t.charAt(e)););return e};var Qs=/^\s+/;const Xs=function(t){return t?t.slice(0,Ys(t)+1).replace(Qs,""):t};var ta=/^[-+]0x[0-9a-f]+$/i,ea=/^0b[01]+$/i,na=/^0o[0-7]+$/i,oa=parseInt;const ia=function(t){if("number"==typeof t)return t;if(Go(t))return NaN;if(y(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=y(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Xs(t);var n=ea.test(t);return n||na.test(t)?oa(t.slice(2),n?2:8):ta.test(t)?NaN:+t};var ra=Math.max,sa=Math.min;const aa=function(t,e,n){var o,i,r,s,a,l,c=0,d=!1,h=!1,u=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var n=o,r=i;return o=i=void 0,c=e,s=t.apply(r,n)}function m(t){return c=t,a=setTimeout(f,e),d?g(t):s}function p(t){var n=t-l;return void 0===l||n>=e||n<0||h&&t-c>=r}function f(){var t=Zs();if(p(t))return b(t);a=setTimeout(f,function(t){var n=e-(t-l);return h?sa(n,r-(t-c)):n}(t))}function b(t){return a=void 0,u&&o?g(t):(o=i=void 0,s)}function k(){var t=Zs(),n=p(t);if(o=arguments,i=this,l=t,n){if(void 0===a)return m(l);if(h)return clearTimeout(a),a=setTimeout(f,e),g(l)}return void 0===a&&(a=setTimeout(f,e)),s}return e=ia(e)||0,y(n)&&(d=!!n.leading,r=(h="maxWait"in n)?ra(ia(n.maxWait)||0,e):r,u="trailing"in n?!!n.trailing:u),k.cancel=function(){void 0!==a&&clearTimeout(a),c=0,o=l=i=a=void 0},k.flush=function(){return void 0===a?s:b(Zs())},k};class la extends vs{constructor(t){super(t),this._fireSelectionChangeDoneDebounced=aa((t=>this.document.fire("selectionChangeDone",t)),200)}observe(){const t=this.document;t.on("arrowKey",((e,n)=>{t.selection.isFake&&this.isEnabled&&n.preventDefault()}),{context:"$capture"}),t.on("arrowKey",((e,n)=>{t.selection.isFake&&this.isEnabled&&this._handleSelectionMove(n.keyCode)}),{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(t){const e=this.document.selection,n=new Wi(e.getRanges(),{backward:e.isBackward,fake:!1});t!=hr.arrowleft&&t!=hr.arrowup||n.setTo(n.getFirstPosition()),t!=hr.arrowright&&t!=hr.arrowdown||n.setTo(n.getLastPosition());const o={oldSelection:e,newSelection:n,domSelection:null};this.document.fire("selectionChange",o),this._fireSelectionChangeDoneDebounced(o)}}class ca extends vs{constructor(t){super(t),this.mutationObserver=t.getObserver(js),this.selection=this.document.selection,this.domConverter=t.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=aa((t=>this.document.fire("selectionChangeDone",t)),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=aa((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(t){const e=t.ownerDocument,n=()=>{this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel()};this.listenTo(t,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(t,"keydown",n,{priority:"highest"}),this.listenTo(t,"keyup",n,{priority:"highest"}),this._documents.has(e)||(this.listenTo(e,"mouseup",n,{priority:"highest"}),this.listenTo(e,"selectionchange",((t,n)=>{this._handleSelectionChange(n,e),this._documentIsSelectingInactivityTimeoutDebounced()})),this._documents.add(e))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_handleSelectionChange(t,e){if(!this.isEnabled)return;const n=e.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(n.anchorNode))return;this.mutationObserver.flush();const o=this.domConverter.domSelectionToView(n);if(0!=o.rangeCount){if(this.view.hasDomSelection=!0,!(this.selection.isEqual(o)&&this.domConverter.isDomSelectionCorrect(n)||++this._loopbackCounter>60))if(this.selection.isSimilar(o))this.view.forceRender();else{const t={oldSelection:this.selection,newSelection:o,domSelection:n};this.document.fire("selectionChange",t),this._fireSelectionChangeDoneDebounced(t)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class da extends Gs{constructor(t){super(t),this.domEventType=["focus","blur"],this.useCapture=!0;const e=this.document;e.on("focus",(()=>{e.isFocused=!0,this._renderTimeoutId=setTimeout((()=>t.change((()=>{}))),50)})),e.on("blur",((n,o)=>{const i=e.selection.editableElement;null!==i&&i!==o.target||(e.isFocused=!1,t.change((()=>{})))}))}onDomEvent(t){this.fire(t.type,t)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class ha extends Gs{constructor(t){super(t),this.domEventType=["compositionstart","compositionupdate","compositionend"];const e=this.document;e.on("compositionstart",(()=>{e.isComposing=!0})),e.on("compositionend",(()=>{e.isComposing=!1}))}onDomEvent(t){this.fire(t.type,t)}}class ua extends Gs{constructor(t){super(t),this.domEventType=["beforeinput"]}onDomEvent(t){this.fire(t.type,t)}}const ga=function(t){return"string"==typeof t||!Dt(t)&&vt(t)&&"[object String]"==N(t)};function ma(t,e,n={},o=[]){const i=n&&n.xmlns,r=i?t.createElementNS(i,e):t.createElement(e);for(const t in n)r.setAttribute(t,n[t]);!ga(o)&&To(o)||(o=[o]);for(let e of o)ga(e)&&(e=t.createTextNode(e)),r.appendChild(e);return r}function pa(t){return"[object Range]"==Object.prototype.toString.apply(t)}function fa(t){const e=t.ownerDocument.defaultView.getComputedStyle(t);return{top:parseInt(e.borderTopWidth,10),right:parseInt(e.borderRightWidth,10),bottom:parseInt(e.borderBottomWidth,10),left:parseInt(e.borderLeftWidth,10)}}const ba=["top","right","bottom","left","width","height"];class ka{constructor(t){const e=pa(t);if(Object.defineProperty(this,"_source",{value:t._source||t,writable:!0,enumerable:!1}),yo(t)||e)if(e){const e=ka.getDomRangeRects(t);wa(this,ka.getBoundingRect(e))}else wa(this,t.getBoundingClientRect());else if(ks(t)){const{innerWidth:e,innerHeight:n}=t;wa(this,{top:0,right:e,bottom:n,left:0,width:e,height:n})}else wa(this,t)}clone(){return new ka(this)}moveTo(t,e){return this.top=e,this.right=t+this.width,this.bottom=e+this.height,this.left=t,this}moveBy(t,e){return this.top+=e,this.right+=t,this.left+=t,this.bottom+=e,this}getIntersection(t){const e={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 e.width=e.right-e.left,e.height=e.bottom-e.top,e.width<0||e.height<0?null:new ka(e)}getIntersectionArea(t){const e=this.getIntersection(t);return e?e.getArea():0}getArea(){return this.width*this.height}getVisible(){const t=this._source;let e=this.clone();if(!Ca(t)){let n=t.parentNode||t.commonAncestorContainer;for(;n&&!Ca(n);){const t=new ka(n),o=e.getIntersection(t);if(!o)return null;o.getArea()<e.getArea()&&(e=o),n=n.parentNode}}return e}isEqual(t){for(const e of ba)if(this[e]!==t[e])return!1;return!0}contains(t){const e=this.getIntersection(t);return!(!e||!e.isEqual(t))}excludeScrollbarsAndBorders(){const t=this._source;let e,n,o;if(ks(t))e=t.innerWidth-t.document.documentElement.clientWidth,n=t.innerHeight-t.document.documentElement.clientHeight,o=t.getComputedStyle(t.document.documentElement).direction;else{const i=fa(this._source);e=t.offsetWidth-t.clientWidth-i.left-i.right,n=t.offsetHeight-t.clientHeight-i.top-i.bottom,o=t.ownerDocument.defaultView.getComputedStyle(t).direction,this.left+=i.left,this.top+=i.top,this.right-=i.right,this.bottom-=i.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=e,"ltr"===o?this.right-=e:this.left+=e,this.height-=n,this.bottom-=n,this}static getDomRangeRects(t){const e=[],n=Array.from(t.getClientRects());if(n.length)for(const t of n)e.push(new ka(t));else{let n=t.startContainer;Rr(n)&&(n=n.parentNode);const o=new ka(n.getBoundingClientRect());o.right=o.left,o.width=0,e.push(o)}return e}static getBoundingRect(t){const e={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY};let n=0;for(const o of t)n++,e.left=Math.min(e.left,o.left),e.top=Math.min(e.top,o.top),e.right=Math.max(e.right,o.right),e.bottom=Math.max(e.bottom,o.bottom);return 0==n?null:(e.width=e.right-e.left,e.height=e.bottom-e.top,new ka(e))}}function wa(t,e){for(const n of ba)t[n]=e[n]}function Ca(t){return!!yo(t)&&t===t.ownerDocument.body}class Aa{constructor(t,e){Aa._observerInstance||Aa._createObserver(),this._element=t,this._callback=e,Aa._addElementCallback(t,e),Aa._observerInstance.observe(t)}destroy(){Aa._deleteElementCallback(this._element,this._callback)}static _addElementCallback(t,e){Aa._elementCallbacks||(Aa._elementCallbacks=new Map);let n=Aa._elementCallbacks.get(t);n||(n=new Set,Aa._elementCallbacks.set(t,n)),n.add(e)}static _deleteElementCallback(t,e){const n=Aa._getElementCallbacks(t);n&&(n.delete(e),n.size||(Aa._elementCallbacks.delete(t),Aa._observerInstance.unobserve(t))),Aa._elementCallbacks&&!Aa._elementCallbacks.size&&(Aa._observerInstance=null,Aa._elementCallbacks=null)}static _getElementCallbacks(t){return Aa._elementCallbacks?Aa._elementCallbacks.get(t):null}static _createObserver(){let t;t="function"==typeof rs.window.ResizeObserver?rs.window.ResizeObserver:_a,Aa._observerInstance=new t((t=>{for(const e of t){const t=Aa._getElementCallbacks(e.target);if(t)for(const n of t)n(e)}}))}}Aa._observerInstance=null,Aa._elementCallbacks=null;class _a{constructor(t){this._callback=t,this._elements=new Set,this._previousRects=new Map,this._periodicCheckTimeout=null}observe(t){this._elements.add(t),this._checkElementRectsAndExecuteCallback(),1===this._elements.size&&this._startPeriodicCheck()}unobserve(t){this._elements.delete(t),this._previousRects.delete(t),this._elements.size||this._stopPeriodicCheck()}_startPeriodicCheck(){const t=()=>{this._checkElementRectsAndExecuteCallback(),this._periodicCheckTimeout=setTimeout(t,100)};this.listenTo(rs.window,"resize",(()=>{this._checkElementRectsAndExecuteCallback()})),this._periodicCheckTimeout=setTimeout(t,100)}_stopPeriodicCheck(){clearTimeout(this._periodicCheckTimeout),this.stopListening(),this._previousRects.clear()}_checkElementRectsAndExecuteCallback(){const t=[];for(const e of this._elements)this._hasRectChanged(e)&&t.push({target:e,contentRect:this._previousRects.get(e)});t.length&&this._callback(t)}_hasRectChanged(t){if(!t.ownerDocument.body.contains(t))return!1;const e=new ka(t),n=this._previousRects.get(t),o=!n||!n.isEqual(e);return this._previousRects.set(t,e),o}}function va(t,e){t instanceof HTMLTextAreaElement&&(t.value=e),t.innerHTML=e}function ya(t){return!!(t&&t.getClientRects&&t.getClientRects().length)}function xa(t){const e=t.next();return e.done?null:e.value}ue(_a,Cs);class Ea{constructor(){this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}add(t){if(this._elements.has(t))throw new a("focustracker-add-element-already-exist",this);this.listenTo(t,"focus",(()=>this._focus(t)),{useCapture:!0}),this.listenTo(t,"blur",(()=>this._blur()),{useCapture:!0}),this._elements.add(t)}remove(t){t===this.focusedElement&&this._blur(t),this._elements.has(t)&&(this.stopListening(t),this._elements.delete(t))}destroy(){this.stopListening()}_focus(t){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=t,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((()=>{this.focusedElement=null,this.isFocused=!1}),0)}}ue(Ea,Cs),ue(Ea,se);class Sa{constructor(){this._listener=Object.create(Cs)}listenTo(t){this._listener.listenTo(t,"keydown",((t,e)=>{this._listener.fire("_keydown:"+gr(e),e)}))}set(t,e,n={}){const o=mr(t),i=n.priority;this._listener.listenTo(this._listener,"_keydown:"+o,((t,n)=>{e(n,(()=>{n.preventDefault(),n.stopPropagation(),t.stop()})),t.return=!0}),{priority:i})}press(t){return!!this._listener.fire("_keydown:"+gr(t),t)}destroy(){this._listener.stopListening()}}class Ta extends vs{constructor(t){super(t),this.document.on("keydown",((t,e)=>{if(this.isEnabled&&((n=e.keyCode)==hr.arrowright||n==hr.arrowleft||n==hr.arrowup||n==hr.arrowdown)){const n=new ji(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(n,e),n.stop.called&&t.stop()}var n}))}observe(){}}function Ba({target:t,viewportOffset:e=0}){const n=Fa(t);let o=n,i=null;for(;o;){let r;r=Na(o==n?t:i),Ia(r,(()=>Ma(t,o)));const s=Ma(t,o);if(Da(o,s,e),o.parent!=o){if(i=o.frameElement,o=o.parent,!i)return}else o=null}}function Da(t,e,n){const o=e.clone().moveBy(0,n),i=e.clone().moveBy(0,-n),r=new ka(t).excludeScrollbarsAndBorders();if(![i,o].every((t=>r.contains(t)))){let{scrollX:s,scrollY:a}=t;za(i,r)?a-=r.top-e.top+n:Pa(o,r)&&(a+=e.bottom-r.bottom+n),Ra(e,r)?s-=r.left-e.left+n:Va(e,r)&&(s+=e.right-r.right+n),t.scrollTo(s,a)}}function Ia(t,e){const n=Fa(t);let o,i;for(;t!=n.document.body;)i=e(),o=new ka(t).excludeScrollbarsAndBorders(),o.contains(i)||(za(i,o)?t.scrollTop-=o.top-i.top:Pa(i,o)&&(t.scrollTop+=i.bottom-o.bottom),Ra(i,o)?t.scrollLeft-=o.left-i.left:Va(i,o)&&(t.scrollLeft+=i.right-o.right)),t=t.parentNode}function Pa(t,e){return t.bottom>e.bottom}function za(t,e){return t.top<e.top}function Ra(t,e){return t.left<e.left}function Va(t,e){return t.right>e.right}function Fa(t){return pa(t)?t.startContainer.ownerDocument.defaultView:t.ownerDocument.defaultView}function Na(t){if(pa(t)){let e=t.commonAncestorContainer;return Rr(e)&&(e=e.parentNode),e}return t.parentNode}function Ma(t,e){const n=Fa(t),o=new ka(t);if(n===e)return o;{let t=n;for(;t!=e;){const e=t.frameElement,n=new ka(e).excludeScrollbarsAndBorders();o.moveBy(n.left,n.top),t=t.parent}}return o}Object.assign({},{scrollViewportToShowTarget:Ba,scrollAncestorsToShowTarget:function(t){Ia(Na(t),(()=>new ka(t)))}});class Oa{constructor(t){this.document=new Xi(t),this.domConverter=new ms(this.document),this.domRoots=new Map,this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new es(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting").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 vr(this.document),this.addObserver(js),this.addObserver(ca),this.addObserver(da),this.addObserver(Ks),this.addObserver(la),this.addObserver(ha),this.addObserver(Ta),ar.isAndroid&&this.addObserver(ua),this.document.on("arrowKey",qr,{priority:"low"}),kr(this),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0}))}attachDomRoot(t,e="main"){const n=this.document.getRoot(e);n._name=t.tagName.toLowerCase();const o={};for(const{name:e,value:i}of Array.from(t.attributes))o[e]=i,"class"===e?this._writer.addClass(i.split(" "),n):this._writer.setAttribute(e,i,n);this._initialDomRootAttributes.set(t,o);const i=()=>{this._writer.setAttribute("contenteditable",!n.isReadOnly,n),n.isReadOnly?this._writer.addClass("ck-read-only",n):this._writer.removeClass("ck-read-only",n)};i(),this.domRoots.set(e,t),this.domConverter.bindElements(t,n),this._renderer.markToSync("children",n),this._renderer.markToSync("attributes",n),this._renderer.domDocuments.add(t.ownerDocument),n.on("change:children",((t,e)=>this._renderer.markToSync("children",e))),n.on("change:attributes",((t,e)=>this._renderer.markToSync("attributes",e))),n.on("change:text",((t,e)=>this._renderer.markToSync("text",e))),n.on("change:isReadOnly",(()=>this.change(i))),n.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const n of this._observers.values())n.observe(t,e)}detachDomRoot(t){const e=this.domRoots.get(t);Array.from(e.attributes).forEach((({name:t})=>e.removeAttribute(t)));const n=this._initialDomRootAttributes.get(e);for(const t in n)e.setAttribute(t,n[t]);this.domRoots.delete(t),this.domConverter.unbindDomElement(e)}getDomRoot(t="main"){return this.domRoots.get(t)}addObserver(t){let e=this._observers.get(t);if(e)return e;e=new t(this),this._observers.set(t,e);for(const[t,n]of this.domRoots)e.observe(n,t);return e.enable(),e}getObserver(t){return this._observers.get(t)}disableObservers(){for(const t of this._observers.values())t.disable()}enableObservers(){for(const t of this._observers.values())t.enable()}scrollToTheSelection(){const t=this.document.selection.getFirstRange();t&&Ba({target:this.domConverter.viewRangeToDom(t),viewportOffset:20})}focus(){if(!this.document.isFocused){const t=this.document.selection.editableElement;t&&(this.domConverter.focus(t),this.forceRender())}}change(t){if(this.isRenderingInProgress||this._postFixersInProgress)throw new a("cannot-change-view-tree",this);try{if(this._ongoingChange)return t(this._writer);this._ongoingChange=!0;const e=t(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),e}catch(t){a.rethrowUnexpectedError(t,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.change((()=>{}))}destroy(){for(const t of this._observers.values())t.destroy();this.document.destroy(),this.stopListening()}createPositionAt(t,e){return Oi._createAt(t,e)}createPositionAfter(t){return Oi._createAfter(t)}createPositionBefore(t){return Oi._createBefore(t)}createRange(t,e){return new Li(t,e)}createRangeOn(t){return Li._createOn(t)}createRangeIn(t){return Li._createIn(t)}createSelection(t,e,n){return new Wi(t,e,n)}_disableRendering(t){this._renderingDisabled=t,0==t&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}ue(Oa,se);class La{constructor(t){this.parent=null,this._attrs=Wo(t)}get index(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildIndex(this)))throw new a("model-node-not-found-in-parent",this);return t}get startOffset(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildStartOffset(this)))throw new a("model-node-not-found-in-parent",this);return t}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const t=this.index;return null!==t&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return null!==t&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}isAttached(){return this.root.is("rootElement")}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.startOffset),e=e.parent;return t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}getCommonAncestor(t,e={}){const n=this.getAncestors(e),o=t.getAncestors(e);let i=0;for(;n[i]==o[i]&&n[i];)i++;return 0===i?null:n[i-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),n=t.getPath(),o=Mo(e,n);switch(o){case"prefix":return!0;case"extension":return!1;default:return e[o]<n[o]}}isAfter(t){return this!=t&&(this.root===t.root&&!this.isBefore(t))}hasAttribute(t){return this._attrs.has(t)}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const t={};return this._attrs.size&&(t.attributes=Array.from(this._attrs).reduce(((t,e)=>(t[e[0]]=e[1],t)),{})),t}is(t){return"node"===t||"model:node"===t}_clone(){return new La(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(t,e){this._attrs.set(t,e)}_setAttributesTo(t){this._attrs=Wo(t)}_removeAttribute(t){return this._attrs.delete(t)}_clearAttributes(){this._attrs.clear()}}class Ha extends La{constructor(t,e){super(e),this._data=t||""}get offsetSize(){return this.data.length}get data(){return this._data}is(t){return"$text"===t||"model:$text"===t||"text"===t||"model:text"===t||"node"===t||"model:node"===t}toJSON(){const t=super.toJSON();return t.data=this.data,t}_clone(){return new Ha(this.data,this.getAttributes())}static fromJSON(t){return new Ha(t.data,t.attributes)}}class qa{constructor(t,e,n){if(this.textNode=t,e<0||e>t.offsetSize)throw new a("model-textproxy-wrong-offsetintext",this);if(n<0||e+n>t.offsetSize)throw new a("model-textproxy-wrong-length",this);this.data=t.data.substring(e,e+n),this.offsetInText=e}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(t){return"$textProxy"===t||"model:$textProxy"===t||"textProxy"===t||"model:textProxy"===t}getPath(){const t=this.textNode.getPath();return t.length>0&&(t[t.length-1]+=this.offsetInText),t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}hasAttribute(t){return this.textNode.hasAttribute(t)}getAttribute(t){return this.textNode.getAttribute(t)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}class Wa{constructor(t){this._nodes=[],t&&this._insertNodes(0,t)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((t,e)=>t+e.offsetSize),0)}getNode(t){return this._nodes[t]||null}getNodeIndex(t){const e=this._nodes.indexOf(t);return-1==e?null:e}getNodeStartOffset(t){const e=this.getNodeIndex(t);return null===e?null:this._nodes.slice(0,e).reduce(((t,e)=>t+e.offsetSize),0)}indexToOffset(t){if(t==this._nodes.length)return this.maxOffset;const e=this._nodes[t];if(!e)throw new a("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(e)}offsetToIndex(t){let e=0;for(const n of this._nodes){if(t>=e&&t<e+n.offsetSize)return this.getNodeIndex(n);e+=n.offsetSize}if(e!=t)throw new a("model-nodelist-offset-out-of-bounds",this,{offset:t,nodeList:this});return this.length}_insertNodes(t,e){for(const t of e)if(!(t instanceof La))throw new a("model-nodelist-insertnodes-not-node",this);this._nodes.splice(t,0,...e)}_removeNodes(t,e=1){return this._nodes.splice(t,e)}toJSON(){return this._nodes.map((t=>t.toJSON()))}}class Ua extends La{constructor(t,e,n){super(e),this.name=t,this._children=new Wa,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(t,e=null){return e?e===this.name&&("element"===t||"model:element"===t):"element"===t||"model:element"===t||"node"===t||"model:node"===t}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}offsetToIndex(t){return this._children.offsetToIndex(t)}getNodeByPath(t){let e=this;for(const n of t)e=e.getChild(e.offsetToIndex(n));return e}findAncestor(t,e={includeSelf:!1}){let n=e.includeSelf?this:this.parent;for(;n;){if(n.name===t)return n;n=n.parent}return null}toJSON(){const t=super.toJSON();if(t.name=this.name,this._children.length>0){t.children=[];for(const e of this._children)t.children.push(e.toJSON())}return t}_clone(t=!1){const e=t?Array.from(this._children).map((t=>t._clone(!0))):null;return new Ua(this.name,this.getAttributes(),e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const n=function(t){if("string"==typeof t)return[new Ha(t)];To(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new Ha(t):t instanceof qa?new Ha(t.data,t.getAttributes()):t))}(e);for(const t of n)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,n)}_removeChildren(t,e=1){const n=this._children._removeNodes(t,e);for(const t of n)t.parent=null;return n}static fromJSON(t){let e=null;if(t.children){e=[];for(const n of t.children)n.name?e.push(Ua.fromJSON(n)):e.push(Ha.fromJSON(n))}return new Ua(t.name,t.attributes,e)}}class ja{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new a("model-tree-walker-no-start-position",null);const e=t.direction||"forward";if("forward"!=e&&"backward"!=e)throw new a("model-tree-walker-unknown-direction",t,{direction:e});this.direction=e,this.boundaries=t.boundaries||null,t.startPosition?this.position=t.startPosition.clone():this.position=Ga._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}[Symbol.iterator](){return this}skip(t){let e,n,o,i;do{o=this.position,i=this._visitedParent,({done:e,value:n}=this.next())}while(!e&&t(n));e||(this.position=o,this._visitedParent=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const t=this.position,e=this.position.clone(),n=this._visitedParent;if(null===n.parent&&e.offset===n.maxOffset)return{done:!0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};const o=e.parent,i=Ka(e,o),r=i||Za(e,o,i);if(r instanceof Ua)return this.shallow?e.offset++:(e.path.push(0),this._visitedParent=r),this.position=e,$a("elementStart",r,t,e,1);if(r instanceof Ha){let o;if(this.singleCharacters)o=1;else{let t=r.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offset<t&&(t=this.boundaries.end.offset),o=t-e.offset}const i=e.offset-r.startOffset,s=new qa(r,i,o);return e.offset+=o,this.position=e,$a("text",s,t,e,o)}return e.path.pop(),e.offset++,this.position=e,this._visitedParent=n.parent,this.ignoreElementEnd?this._next():$a("elementEnd",n,t,e)}_previous(){const t=this.position,e=this.position.clone(),n=this._visitedParent;if(null===n.parent&&0===e.offset)return{done:!0};if(n==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};const o=e.parent,i=Ka(e,o),r=i||Ja(e,o,i);if(r instanceof Ua)return e.offset--,this.shallow?(this.position=e,$a("elementStart",r,t,e,1)):(e.path.push(r.maxOffset),this.position=e,this._visitedParent=r,this.ignoreElementEnd?this._previous():$a("elementEnd",r,t,e));if(r instanceof Ha){let o;if(this.singleCharacters)o=1;else{let t=r.startOffset;this._boundaryStartParent==n&&this.boundaries.start.offset>t&&(t=this.boundaries.start.offset),o=e.offset-t}const i=e.offset-r.startOffset,s=new qa(r,i-o,o);return e.offset-=o,this.position=e,$a("text",s,t,e,o)}return e.path.pop(),this.position=e,this._visitedParent=n.parent,$a("elementStart",n,t,e,1)}}function $a(t,e,n,o,i){return{done:!1,value:{type:t,item:e,previousPosition:n,nextPosition:o,length:i}}}class Ga{constructor(t,e,n="toNone"){if(!t.is("element")&&!t.is("documentFragment"))throw new a("model-position-root-invalid",t);if(!(e instanceof Array)||0===e.length)throw new a("model-position-path-incorrect-format",t,{path:e});t.is("rootElement")?e=e.slice():(e=[...t.getPath(),...e],t=t.root),this.root=t,this.path=e,this.stickiness=n}get offset(){return this.path[this.path.length-1]}set offset(t){this.path[this.path.length-1]=t}get parent(){let t=this.root;for(let e=0;e<this.path.length-1;e++)if(t=t.getChild(t.offsetToIndex(this.path[e])),!t)throw new a("model-position-path-incorrect",this,{position:this});if(t.is("$text"))throw new a("model-position-path-incorrect",this,{position:this});return t}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){return Ka(this,this.parent)}get nodeAfter(){const t=this.parent;return Za(this,t,Ka(this,t))}get nodeBefore(){const t=this.parent;return Ja(this,t,Ka(this,t))}get isAtStart(){return 0===this.offset}get isAtEnd(){return this.offset==this.parent.maxOffset}compareWith(t){if(this.root!=t.root)return"different";const e=Mo(this.path,t.path);switch(e){case"same":return"same";case"prefix":return"before";case"extension":return"after";default:return this.path[e]<t.path[e]?"before":"after"}}getLastMatchingPosition(t,e={}){e.startPosition=this;const n=new ja(e);return n.skip(t),n.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){const t=this.parent;return t.is("documentFragment")?[t]:t.getAncestors({includeSelf:!0})}findAncestor(t){const e=this.parent;return e.is("element")?e.findAncestor(t,{includeSelf:!0}):null}getCommonPath(t){if(this.root!=t.root)return[];const e=Mo(this.path,t.path),n="string"==typeof e?Math.min(this.path.length,t.path.length):e;return this.path.slice(0,n)}getCommonAncestor(t){const e=this.getAncestors(),n=t.getAncestors();let o=0;for(;e[o]==n[o]&&e[o];)o++;return 0===o?null:e[o-1]}getShiftedBy(t){const e=this.clone(),n=e.offset+t;return e.offset=n<0?0:n,e}isAfter(t){return"after"==this.compareWith(t)}isBefore(t){return"before"==this.compareWith(t)}isEqual(t){return"same"==this.compareWith(t)}isTouching(t){let e=null,n=null;switch(this.compareWith(t)){case"same":return!0;case"before":e=Ga._createAt(this),n=Ga._createAt(t);break;case"after":e=Ga._createAt(t),n=Ga._createAt(this);break;default:return!1}let o=e.parent;for(;e.path.length+n.path.length;){if(e.isEqual(n))return!0;if(e.path.length>n.path.length){if(e.offset!==o.maxOffset)return!1;e.path=e.path.slice(0,-1),o=o.parent,e.offset++}else{if(0!==n.offset)return!1;n.path=n.path.slice(0,-1)}}}is(t){return"position"===t||"model:position"===t}hasSameParentAs(t){if(this.root!==t.root)return!1;return"same"==Mo(this.getParentPath(),t.getParentPath())}getTransformedByOperation(t){let e;switch(t.type){case"insert":e=this._getTransformedByInsertOperation(t);break;case"move":case"remove":case"reinsert":e=this._getTransformedByMoveOperation(t);break;case"split":e=this._getTransformedBySplitOperation(t);break;case"merge":e=this._getTransformedByMergeOperation(t);break;default:e=Ga._createAt(this)}return e}_getTransformedByInsertOperation(t){return this._getTransformedByInsertion(t.position,t.howMany)}_getTransformedByMoveOperation(t){return this._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany)}_getTransformedBySplitOperation(t){const e=t.movedRange;return e.containsPosition(this)||e.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(t.splitPosition,t.moveTargetPosition):t.graveyardPosition?this._getTransformedByMove(t.graveyardPosition,t.insertionPosition,1):this._getTransformedByInsertion(t.insertionPosition,1)}_getTransformedByMergeOperation(t){const e=t.movedRange;let n;return e.containsPosition(this)||e.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)?Ga._createAt(t.deletionPosition):this._getTransformedByMove(t.deletionPosition,t.graveyardPosition,1),n}_getTransformedByDeletion(t,e){const n=Ga._createAt(this);if(this.root!=t.root)return n;if("same"==Mo(t.getParentPath(),this.getParentPath())){if(t.offset<this.offset){if(t.offset+e>this.offset)return null;n.offset-=e}}else if("prefix"==Mo(t.getParentPath(),this.getParentPath())){const o=t.path.length-1;if(t.offset<=this.path[o]){if(t.offset+e>this.path[o])return null;n.path[o]-=e}}return n}_getTransformedByInsertion(t,e){const n=Ga._createAt(this);if(this.root!=t.root)return n;if("same"==Mo(t.getParentPath(),this.getParentPath()))(t.offset<this.offset||t.offset==this.offset&&"toPrevious"!=this.stickiness)&&(n.offset+=e);else if("prefix"==Mo(t.getParentPath(),this.getParentPath())){const o=t.path.length-1;t.offset<=this.path[o]&&(n.path[o]+=e)}return n}_getTransformedByMove(t,e,n){if(e=e._getTransformedByDeletion(t,n),t.isEqual(e))return Ga._createAt(this);const o=this._getTransformedByDeletion(t,n);return null===o||t.isEqual(this)&&"toNext"==this.stickiness||t.getShiftedBy(n).isEqual(this)&&"toPrevious"==this.stickiness?this._getCombined(t,e):o._getTransformedByInsertion(e,n)}_getCombined(t,e){const n=t.path.length-1,o=Ga._createAt(e);return o.stickiness=this.stickiness,o.offset=o.offset+this.path[n]-t.offset,o.path=[...o.path,...this.path.slice(n+1)],o}toJSON(){return{root:this.root.toJSON(),path:Array.from(this.path),stickiness:this.stickiness}}clone(){return new this.constructor(this.root,this.path,this.stickiness)}static _createAt(t,e,n="toNone"){if(t instanceof Ga)return new Ga(t.root,t.path,t.stickiness);{const o=t;if("end"==e)e=o.maxOffset;else{if("before"==e)return this._createBefore(o,n);if("after"==e)return this._createAfter(o,n);if(0!==e&&!e)throw new a("model-createpositionat-offset-required",[this,t])}if(!o.is("element")&&!o.is("documentFragment"))throw new a("model-position-parent-incorrect",[this,t]);const i=o.getPath();return i.push(e),new this(o.root,i,n)}}static _createAfter(t,e){if(!t.parent)throw new a("model-position-after-root",[this,t],{root:t});return this._createAt(t.parent,t.endOffset,e)}static _createBefore(t,e){if(!t.parent)throw new a("model-position-before-root",t,{root:t});return this._createAt(t.parent,t.startOffset,e)}static fromJSON(t,e){if("$graveyard"===t.root){const n=new Ga(e.graveyard,t.path);return n.stickiness=t.stickiness,n}if(!e.getRoot(t.root))throw new a("model-position-fromjson-no-root",e,{rootName:t.root});return new Ga(e.getRoot(t.root),t.path,t.stickiness)}}function Ka(t,e){const n=e.getChild(e.offsetToIndex(t.offset));return n&&n.is("$text")&&n.startOffset<t.offset?n:null}function Za(t,e,n){return null!==n?null:e.getChild(e.offsetToIndex(t.offset))}function Ja(t,e,n){return null!==n?null:e.getChild(e.offsetToIndex(t.offset)-1)}class Ya{constructor(t,e=null){this.start=Ga._createAt(t),this.end=e?Ga._createAt(e):Ga._createAt(t),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new ja({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return"same"==Mo(this.start.getParentPath(),this.end.getParentPath())}get root(){return this.start.root}containsPosition(t){return t.isAfter(this.start)&&t.isBefore(this.end)}containsRange(t,e=!1){t.isCollapsed&&(e=!1);const n=this.containsPosition(t.start)||e&&this.start.isEqual(t.start),o=this.containsPosition(t.end)||e&&this.end.isEqual(t.end);return n&&o}containsItem(t){const e=Ga._createBefore(t);return this.containsPosition(e)||this.start.isEqual(e)}is(t){return"range"===t||"model:range"===t}isEqual(t){return this.start.isEqual(t.start)&&this.end.isEqual(t.end)}isIntersecting(t){return this.start.isBefore(t.end)&&this.end.isAfter(t.start)}getDifference(t){const e=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&e.push(new Ya(this.start,t.start)),this.containsPosition(t.end)&&e.push(new Ya(t.end,this.end))):e.push(new Ya(this.start,this.end)),e}getIntersection(t){if(this.isIntersecting(t)){let e=this.start,n=this.end;return this.containsPosition(t.start)&&(e=t.start),this.containsPosition(t.end)&&(n=t.end),new Ya(e,n)}return null}getJoined(t,e=!1){let n=this.isIntersecting(t);if(n||(n=this.start.isBefore(t.start)?e?this.end.isTouching(t.start):this.end.isEqual(t.start):e?t.end.isTouching(this.start):t.end.isEqual(this.start)),!n)return null;let o=this.start,i=this.end;return t.start.isBefore(o)&&(o=t.start),t.end.isAfter(i)&&(i=t.end),new Ya(o,i)}getMinimalFlatRanges(){const t=[],e=this.start.getCommonPath(this.end).length,n=Ga._createAt(this.start);let o=n.parent;for(;n.path.length>e+1;){const e=o.maxOffset-n.offset;0!==e&&t.push(new Ya(n,n.getShiftedBy(e))),n.path=n.path.slice(0,-1),n.offset++,o=o.parent}for(;n.path.length<=this.end.path.length;){const e=this.end.path[n.path.length-1],o=e-n.offset;0!==o&&t.push(new Ya(n,n.getShiftedBy(o))),n.offset=e,n.path.push(0)}return t}getWalker(t={}){return t.boundaries=this,new ja(t)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const e=new ja(t);for(const t of e)yield t.item}*getPositions(t={}){t.boundaries=this;const e=new ja(t);yield e.position;for(const t of e)yield t.nextPosition}getTransformedByOperation(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 Ya(this.start,this.end)]}getTransformedByOperations(t){const e=[new Ya(this.start,this.end)];for(const n of t)for(let t=0;t<e.length;t++){const o=e[t].getTransformedByOperation(n);e.splice(t,1,...o),t+=o.length-1}for(let t=0;t<e.length;t++){const n=e[t];for(let o=t+1;o<e.length;o++){const t=e[o];(n.containsRange(t)||t.containsRange(n)||n.isEqual(t))&&e.splice(o,1)}}return e}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;const t=this.start.nodeAfter,e=this.end.nodeBefore;return t&&t.is("element")&&t===e?t:null}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(t,e=!1){return this._getTransformedByInsertion(t.position,t.howMany,e)}_getTransformedByMoveOperation(t,e=!1){const n=t.sourcePosition,o=t.howMany,i=t.targetPosition;return this._getTransformedByMove(n,i,o,e)}_getTransformedBySplitOperation(t){const e=this.start._getTransformedBySplitOperation(t);let n=this.end._getTransformedBySplitOperation(t);return this.end.isEqual(t.insertionPosition)&&(n=this.end.getShiftedBy(1)),e.root!=n.root&&(n=this.end.getShiftedBy(-1)),new Ya(e,n)}_getTransformedByMergeOperation(t){if(this.start.isEqual(t.targetPosition)&&this.end.isEqual(t.deletionPosition))return new Ya(this.start);let e=this.start._getTransformedByMergeOperation(t),n=this.end._getTransformedByMergeOperation(t);return e.root!=n.root&&(n=this.end.getShiftedBy(-1)),e.isAfter(n)?(t.sourcePosition.isBefore(t.targetPosition)?(e=Ga._createAt(n),e.offset=0):(t.deletionPosition.isEqual(e)||(n=t.deletionPosition),e=t.targetPosition),new Ya(e,n)):new Ya(e,n)}_getTransformedByInsertion(t,e,n=!1){if(n&&this.containsPosition(t))return[new Ya(this.start,t),new Ya(t.getShiftedBy(e),this.end._getTransformedByInsertion(t,e))];{const n=new Ya(this.start,this.end);return n.start=n.start._getTransformedByInsertion(t,e),n.end=n.end._getTransformedByInsertion(t,e),[n]}}_getTransformedByMove(t,e,n,o=!1){if(this.isCollapsed){const o=this.start._getTransformedByMove(t,e,n);return[new Ya(o)]}const i=Ya._createFromPositionAndShift(t,n),r=e._getTransformedByDeletion(t,n);if(this.containsPosition(e)&&!o&&(i.containsPosition(this.start)||i.containsPosition(this.end))){const o=this.start._getTransformedByMove(t,e,n),i=this.end._getTransformedByMove(t,e,n);return[new Ya(o,i)]}let s;const a=this.getDifference(i);let l=null;const c=this.getIntersection(i);if(1==a.length?l=new Ya(a[0].start._getTransformedByDeletion(t,n),a[0].end._getTransformedByDeletion(t,n)):2==a.length&&(l=new Ya(this.start,this.end._getTransformedByDeletion(t,n))),s=l?l._getTransformedByInsertion(r,n,null!==c||o):[],c){const t=new Ya(c.start._getCombined(i.start,r),c.end._getCombined(i.start,r));2==s.length?s.splice(1,0,t):s.push(t)}return s}_getTransformedByDeletion(t,e){let n=this.start._getTransformedByDeletion(t,e),o=this.end._getTransformedByDeletion(t,e);return null==n&&null==o?null:(null==n&&(n=t),null==o&&(o=t),new Ya(n,o))}static _createFromPositionAndShift(t,e){const n=t,o=t.getShiftedBy(e);return e>0?new this(n,o):new this(o,n)}static _createIn(t){return new this(Ga._createAt(t,0),Ga._createAt(t,t.maxOffset))}static _createOn(t){return this._createFromPositionAndShift(Ga._createBefore(t),t.offsetSize)}static _createFromRanges(t){if(0===t.length)throw new a("range-create-from-ranges-empty-array",null);if(1==t.length)return t[0].clone();const e=t[0];t.sort(((t,e)=>t.start.isAfter(e.start)?1:-1));const n=t.indexOf(e),o=new this(e.start,e.end);if(n>0)for(let e=n-1;t[e].end.isEqual(o.start);e++)o.start=Ga._createAt(t[e].start);for(let e=n+1;e<t.length&&t[e].start.isEqual(o.end);e++)o.end=Ga._createAt(t[e].end);return o}static fromJSON(t,e){return new this(Ga.fromJSON(t.start,e),Ga.fromJSON(t.end,e))}}class Qa{constructor(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._deferredBindingRemovals=new Map,this._unboundMarkerNames=new Set,this.on("modelToViewPosition",((t,e)=>{if(e.viewPosition)return;const n=this._modelToViewMapping.get(e.modelPosition.parent);if(!n)throw new a("mapping-view-position-parent-not-found",this,{modelPosition:e.modelPosition});e.viewPosition=this.findPositionIn(n,e.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((t,e)=>{if(e.modelPosition)return;const n=this.findMappedViewAncestor(e.viewPosition),o=this._viewToModelMapping.get(n),i=this._toModelOffset(e.viewPosition.parent,e.viewPosition.offset,n);e.modelPosition=Ga._createAt(o,i)}),{priority:"low"})}bindElements(t,e){this._modelToViewMapping.set(t,e),this._viewToModelMapping.set(e,t)}unbindViewElement(t,e={}){const n=this.toModelElement(t);if(this._elementToMarkerNames.has(t))for(const e of this._elementToMarkerNames.get(t))this._unboundMarkerNames.add(e);e.defer?this._deferredBindingRemovals.set(t,t.root):(this._viewToModelMapping.delete(t),this._modelToViewMapping.get(n)==t&&this._modelToViewMapping.delete(n))}unbindModelElement(t){const e=this.toViewElement(t);this._modelToViewMapping.delete(t),this._viewToModelMapping.get(e)==t&&this._viewToModelMapping.delete(e)}bindElementToMarker(t,e){const n=this._markerNameToElements.get(e)||new Set;n.add(t);const o=this._elementToMarkerNames.get(t)||new Set;o.add(e),this._markerNameToElements.set(e,n),this._elementToMarkerNames.set(t,o)}unbindElementFromMarkerName(t,e){const n=this._markerNameToElements.get(e);n&&(n.delete(t),0==n.size&&this._markerNameToElements.delete(e));const o=this._elementToMarkerNames.get(t);o&&(o.delete(e),0==o.size&&this._elementToMarkerNames.delete(t))}flushUnboundMarkerNames(){const t=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),t}flushDeferredBindings(){for(const[t,e]of this._deferredBindingRemovals)t.root==e&&this.unbindViewElement(t);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(t){return this._viewToModelMapping.get(t)}toViewElement(t){return this._modelToViewMapping.get(t)}toModelRange(t){return new Ya(this.toModelPosition(t.start),this.toModelPosition(t.end))}toViewRange(t){return new Li(this.toViewPosition(t.start),this.toViewPosition(t.end))}toModelPosition(t){const e={viewPosition:t,mapper:this};return this.fire("viewToModelPosition",e),e.modelPosition}toViewPosition(t,e={isPhantom:!1}){const n={modelPosition:t,mapper:this,isPhantom:e.isPhantom};return this.fire("modelToViewPosition",n),n.viewPosition}markerNameToElements(t){const e=this._markerNameToElements.get(t);if(!e)return null;const n=new Set;for(const t of e)if(t.is("attributeElement"))for(const e of t.getElementsWithSameId())n.add(e);else n.add(t);return n}registerViewToModelLength(t,e){this._viewToModelLengthCallbacks.set(t,e)}findMappedViewAncestor(t){let e=t.parent;for(;!this._viewToModelMapping.has(e);)e=e.parent;return e}_toModelOffset(t,e,n){if(n!=t){return this._toModelOffset(t.parent,t.index,n)+this._toModelOffset(t,e,t)}if(t.is("$text"))return e;let o=0;for(let n=0;n<e;n++)o+=this.getModelLength(t.getChild(n));return o}getModelLength(t){if(this._viewToModelLengthCallbacks.get(t.name)){return this._viewToModelLengthCallbacks.get(t.name)(t)}if(this._viewToModelMapping.has(t))return 1;if(t.is("$text"))return t.data.length;if(t.is("uiElement"))return 0;{let e=0;for(const n of t.getChildren())e+=this.getModelLength(n);return e}}findPositionIn(t,e){let n,o=0,i=0,r=0;if(t.is("$text"))return new Oi(t,e);for(;i<e;)n=t.getChild(r),o=this.getModelLength(n),i+=o,r++;return i==e?this._moveViewPositionToTextNode(new Oi(t,r)):this.findPositionIn(n,e-(i-o))}_moveViewPositionToTextNode(t){const e=t.nodeBefore,n=t.nodeAfter;return e instanceof Ho?new Oi(e,e.data.length):n instanceof Ho?new Oi(n,0):t}}ue(Qa,f);class Xa{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(t,e){e=tl(e),t instanceof qa&&(t=this._getSymbolForTextProxy(t)),this._consumable.has(t)||this._consumable.set(t,new Map),this._consumable.get(t).set(e,!0)}consume(t,e){return e=tl(e),t instanceof qa&&(t=this._getSymbolForTextProxy(t)),!!this.test(t,e)&&(this._consumable.get(t).set(e,!1),!0)}test(t,e){e=tl(e),t instanceof qa&&(t=this._getSymbolForTextProxy(t));const n=this._consumable.get(t);if(void 0===n)return null;const o=n.get(e);return void 0===o?null:o}revert(t,e){e=tl(e),t instanceof qa&&(t=this._getSymbolForTextProxy(t));const n=this.test(t,e);return!1===n?(this._consumable.get(t).set(e,!0),!0):!0!==n&&null}verifyAllConsumed(t){const e=[];for(const[n,o]of this._consumable)for(const[i,r]of o){const o=i.split(":")[0];r&&t==o&&e.push({event:i,item:n.name||n.description})}if(e.length)throw new a("conversion-model-consumable-not-consumed",null,{items:e})}_getSymbolForTextProxy(t){let e=null;const n=this._textProxyRegistry.get(t.startOffset);if(n){const o=n.get(t.endOffset);o&&(e=o.get(t.parent))}return e||(e=this._addSymbolForTextProxy(t)),e}_addSymbolForTextProxy(t){const e=t.startOffset,n=t.endOffset,o=t.parent,i=Symbol("$textProxy:"+t.data);let r,s;return r=this._textProxyRegistry.get(e),r||(r=new Map,this._textProxyRegistry.set(e,r)),s=r.get(n),s||(s=new Map,r.set(n,s)),s.set(o,i),i}}function tl(t){const e=t.split(":");return"insert"==e[0]?e[0]:"addMarker"==e[0]||"removeMarker"==e[0]?t:e.length>1?e[0]+":"+e[1]:e[0]}class el{constructor(t){this._conversionApi={dispatcher:this,...t},this._firedEventsMap=new WeakMap}convertChanges(t,e,n){const o=this._createConversionApi(n,t.getRefreshedItems());for(const e of t.getMarkersToRemove())this._convertMarkerRemove(e.name,e.range,o);const i=this._reduceChanges(t.getChanges());for(const t of i)"insert"===t.type?this._convertInsert(Ya._createFromPositionAndShift(t.position,t.length),o):"reinsert"===t.type?this._convertReinsert(Ya._createFromPositionAndShift(t.position,t.length),o):"remove"===t.type?this._convertRemove(t.position,t.length,t.name,o):this._convertAttribute(t.range,t.attributeKey,t.attributeOldValue,t.attributeNewValue,o);for(const t of o.mapper.flushUnboundMarkerNames()){const n=e.get(t).getRange();this._convertMarkerRemove(t,n,o),this._convertMarkerAdd(t,n,o)}for(const e of t.getMarkersToAdd())this._convertMarkerAdd(e.name,e.range,o);o.mapper.flushDeferredBindings(),o.consumable.verifyAllConsumed("insert")}convert(t,e,n,o={}){const i=this._createConversionApi(n,void 0,o);this._convertInsert(t,i);for(const[t,n]of e)this._convertMarkerAdd(t,n,i);i.consumable.verifyAllConsumed("insert")}convertSelection(t,e,n){const o=Array.from(e.getMarkersAtPosition(t.getFirstPosition())),i=this._createConversionApi(n);if(this._addConsumablesForSelection(i.consumable,t,o),this.fire("selection",{selection:t},i),t.isCollapsed){for(const e of o){const n=e.getRange();if(!nl(t.getFirstPosition(),e,i.mapper))continue;const o={item:t,markerName:e.name,markerRange:n};i.consumable.test(t,"addMarker:"+e.name)&&this.fire("addMarker:"+e.name,o,i)}for(const e of t.getAttributeKeys()){const n={item:t,range:t.getFirstRange(),attributeKey:e,attributeOldValue:null,attributeNewValue:t.getAttribute(e)};i.consumable.test(t,"attribute:"+n.attributeKey)&&this.fire("attribute:"+n.attributeKey+":$text",n,i)}}}_convertInsert(t,e,n={}){n.doNotAddConsumables||this._addConsumablesForInsert(e.consumable,Array.from(t));for(const n of Array.from(t.getWalker({shallow:!0})).map(ol))this._testAndFire("insert",n,e)}_convertRemove(t,e,n,o){this.fire("remove:"+n,{position:t,length:e},o)}_convertAttribute(t,e,n,o,i){this._addConsumablesForRange(i.consumable,t,`attribute:${e}`);for(const r of t){const t={item:r.item,range:Ya._createFromPositionAndShift(r.previousPosition,r.length),attributeKey:e,attributeOldValue:n,attributeNewValue:o};this._testAndFire(`attribute:${e}`,t,i)}}_convertReinsert(t,e){const n=Array.from(t.getWalker({shallow:!0}));this._addConsumablesForInsert(e.consumable,n);for(const t of n.map(ol))this._testAndFire("insert",{...t,reconversion:!0},e)}_convertMarkerAdd(t,e,n){if("$graveyard"==e.root.rootName)return;const o="addMarker:"+t;if(n.consumable.add(e,o),this.fire(o,{markerName:t,markerRange:e},n),n.consumable.consume(e,o)){this._addConsumablesForRange(n.consumable,e,o);for(const i of e.getItems()){if(!n.consumable.test(i,o))continue;const r={item:i,range:Ya._createOn(i),markerName:t,markerRange:e};this.fire(o,r,n)}}}_convertMarkerRemove(t,e,n){"$graveyard"!=e.root.rootName&&this.fire("removeMarker:"+t,{markerName:t,markerRange:e},n)}_reduceChanges(t){const e={changes:t};return this.fire("reduceChanges",e),e.changes}_addConsumablesForInsert(t,e){for(const n of e){const e=n.item;if(null===t.test(e,"insert")){t.add(e,"insert");for(const n of e.getAttributeKeys())t.add(e,"attribute:"+n)}}return t}_addConsumablesForRange(t,e,n){for(const o of e.getItems())t.add(o,n);return t}_addConsumablesForSelection(t,e,n){t.add(e,"selection");for(const o of n)t.add(e,"addMarker:"+o.name);for(const n of e.getAttributeKeys())t.add(e,"attribute:"+n);return t}_testAndFire(t,e,n){const o=function(t,e){const n=e.item.name||"$text";return`${t}:${n}`}(t,e),i=e.item.is("$textProxy")?n.consumable._getSymbolForTextProxy(e.item):e.item,r=this._firedEventsMap.get(n),s=r.get(i);if(s){if(s.has(o))return;s.add(o)}else r.set(i,new Set([o]));this.fire(o,e,n)}_testAndFireAddAttributes(t,e){const n={item:t,range:Ya._createOn(t)};for(const t of n.item.getAttributeKeys())n.attributeKey=t,n.attributeOldValue=null,n.attributeNewValue=n.item.getAttribute(t),this._testAndFire(`attribute:${t}`,n,e)}_createConversionApi(t,e=new Set,n={}){const o={...this._conversionApi,consumable:new Xa,writer:t,options:n,convertItem:t=>this._convertInsert(Ya._createOn(t),o),convertChildren:t=>this._convertInsert(Ya._createIn(t),o,{doNotAddConsumables:!0}),convertAttributes:t=>this._testAndFireAddAttributes(t,o),canReuseView:t=>!e.has(o.mapper.toModelElement(t))};return this._firedEventsMap.set(o,new Map),o}}function nl(t,e,n){const o=e.getRange(),i=Array.from(t.getAncestors());i.shift(),i.reverse();return!i.some((t=>{if(o.containsItem(t)){return!!n.toViewElement(t).getCustomProperty("addHighlight")}}))}function ol(t){return{item:t.item,range:Ya._createFromPositionAndShift(t.previousPosition,t.length)}}ue(el,f);class il{constructor(t,e,n){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,t&&this.setTo(t,e,n)}get anchor(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.end:t.start}return null}get focus(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.start:t.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(t){if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let n=!1;for(const o of t._ranges)if(e.isEqual(o)){n=!0;break}if(!n)return!1}return!0}*getRanges(){for(const t of this._ranges)yield new Ya(t.start,t.end)}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?new Ya(t.start,t.end):null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?new Ya(t.start,t.end):null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}setTo(t,e,n){if(null===t)this._setRanges([]);else if(t instanceof il)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof Ya)this._setRanges([t],!!e&&!!e.backward);else if(t instanceof Ga)this._setRanges([new Ya(t)]);else if(t instanceof La){const o=!!n&&!!n.backward;let i;if("in"==e)i=Ya._createIn(t);else if("on"==e)i=Ya._createOn(t);else{if(void 0===e)throw new a("model-selection-setto-required-second-parameter",[this,t]);i=new Ya(Ga._createAt(t,e))}this._setRanges([i],o)}else{if(!To(t))throw new a("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,e&&!!e.backward)}}_setRanges(t,e=!1){const n=(t=Array.from(t)).some((e=>{if(!(e instanceof Ya))throw new a("model-selection-set-ranges-not-range",[this,t]);return this._ranges.every((t=>!t.isEqual(e)))}));if(t.length!==this._ranges.length||n){this._removeAllRanges();for(const e of t)this._pushRange(e);this._lastRangeBackward=!!e,this.fire("change:range",{directChange:!0})}}setFocus(t,e){if(null===this.anchor)throw new a("model-selection-setfocus-no-ranges",[this,t]);const n=Ga._createAt(t,e);if("same"==n.compareWith(this.focus))return;const o=this.anchor;this._ranges.length&&this._popRange(),"before"==n.compareWith(o)?(this._pushRange(new Ya(n,o)),this._lastRangeBackward=!0):(this._pushRange(new Ya(o,n)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(t){return this._attrs.has(t)}removeAttribute(t){this.hasAttribute(t)&&(this._attrs.delete(t),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}setAttribute(t,e){this.getAttribute(t)!==e&&(this._attrs.set(t,e),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}is(t){return"selection"===t||"model:selection"===t}*getSelectedBlocks(){const t=new WeakSet;for(const e of this.getRanges()){const n=al(e.start,t);n&&ll(n,e)&&(yield n);for(const n of e.getWalker()){const o=n.item;"elementEnd"==n.type&&sl(o,t,e)&&(yield o)}const o=al(e.end,t);o&&!e.end.isTouching(Ga._createAt(o,0))&&ll(o,e)&&(yield o)}}containsEntireContent(t=this.anchor.root){const e=Ga._createAt(t,0),n=Ga._createAt(t,"end");return e.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}_pushRange(t){this._checkRange(t),this._ranges.push(new Ya(t.start,t.end))}_checkRange(t){for(let e=0;e<this._ranges.length;e++)if(t.isIntersecting(this._ranges[e]))throw new a("model-selection-range-intersects",[this,t],{addedRange:t,intersectingRange:this._ranges[e]})}_removeAllRanges(){for(;this._ranges.length>0;)this._popRange()}_popRange(){this._ranges.pop()}}function rl(t,e){return!e.has(t)&&(e.add(t),t.root.document.model.schema.isBlock(t)&&t.parent)}function sl(t,e,n){return rl(t,e)&&ll(t,n)}function al(t,e){const n=t.parent.root.document.model.schema,o=t.parent.getAncestors({parentFirst:!0,includeSelf:!0});let i=!1;const r=o.find((t=>!i&&(i=n.isLimit(t),!i&&rl(t,e))));return o.forEach((t=>e.add(t))),r}function ll(t,e){const n=function(t){const e=t.root.document.model.schema;let n=t.parent;for(;n;){if(e.isBlock(n))return n;n=n.parent}}(t);if(!n)return!0;return!e.containsRange(Ya._createOn(n),!0)}ue(il,f);class cl extends Ya{constructor(t,e){super(t,e),dl.call(this)}detach(){this.stopListening()}is(t){return"liveRange"===t||"model:liveRange"===t||"range"==t||"model:range"===t}toRange(){return new Ya(this.start,this.end)}static fromRange(t){return new cl(t.start,t.end)}}function dl(){this.listenTo(this.root.document.model,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&hl.call(this,n)}),{priority:"low"})}function hl(t){const e=this.getTransformedByOperation(t),n=Ya._createFromRanges(e),o=!n.isEqual(this),i=function(t,e){switch(e.type){case"insert":return t.containsPosition(e.position);case"move":case"remove":case"reinsert":case"merge":return t.containsPosition(e.sourcePosition)||t.start.isEqual(e.sourcePosition)||t.containsPosition(e.targetPosition);case"split":return t.containsPosition(e.splitPosition)||t.containsPosition(e.insertionPosition)}return!1}(this,t);let r=null;if(o){"$graveyard"==n.root.rootName&&(r="remove"==t.type?t.sourcePosition:t.deletionPosition);const e=this.toRange();this.start=n.start,this.end=n.end,this.fire("change:range",e,{deletionPosition:r})}else i&&this.fire("change:content",this.toRange(),{deletionPosition:r})}ue(cl,f);const ul="selection:";class gl{constructor(t){this._selection=new ml(t),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(t){return this._selection.containsEntireContent(t)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(t){return this._selection.getAttribute(t)}hasAttribute(t){return this._selection.hasAttribute(t)}refresh(){this._selection._updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(t){this._selection.observeMarkers(t)}is(t){return"selection"===t||"model:selection"==t||"documentSelection"==t||"model:documentSelection"==t}_setFocus(t,e){this._selection.setFocus(t,e)}_setTo(t,e,n){this._selection.setTo(t,e,n)}_setAttribute(t,e){this._selection.setAttribute(t,e)}_removeAttribute(t){this._selection.removeAttribute(t)}_getStoredAttributes(){return this._selection._getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(t){this._selection.restoreGravity(t)}static _getStoreAttributeKey(t){return ul+t}static _isStoreAttributeKey(t){return t.startsWith(ul)}}ue(gl,f);class ml extends il{constructor(t){super(),this.markers=new Bo({idProperty:"name"}),this._model=t.model,this._document=t,this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this.listenTo(this._model,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&"marker"!=n.type&&"rename"!=n.type&&"noop"!=n.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 t of this.getRanges())if(!this._document._validateSelectionRange(t))throw new a("document-selection-wrong-position",this,{range:t})})),this.listenTo(this._model.markers,"update",((t,e,n,o)=>{this._updateMarker(e,o)})),this.listenTo(this._document,"change",((t,e)=>{!function(t,e){const n=t.document.differ;for(const o of n.getChanges()){if("insert"!=o.type)continue;const n=o.position.parent;o.length===n.maxOffset&&t.enqueueChange(e,(t=>{const e=Array.from(n.getAttributeKeys()).filter((t=>t.startsWith(ul)));for(const o of e)t.removeAttribute(o,n)}))}}(this._model,e)}))}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 t=0;t<this._ranges.length;t++)this._ranges[t].detach();this.stopListening()}*getRanges(){this._ranges.length?yield*super.getRanges():yield this._document._getDefaultRange()}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(t,e,n){super.setTo(t,e,n),this._updateAttributes(!0),this._updateMarkers()}setFocus(t,e){super.setFocus(t,e),this._updateAttributes(!0),this._updateMarkers()}setAttribute(t,e){if(this._setAttribute(t,e)){const e=[t];this.fire("change:attribute",{attributeKeys:e,directChange:!0})}}removeAttribute(t){if(this._removeAttribute(t)){const e=[t];this.fire("change:attribute",{attributeKeys:e,directChange:!0})}}overrideGravity(){const t=r();return this._overriddenGravityRegister.add(t),1===this._overriddenGravityRegister.size&&this._updateAttributes(!0),t}restoreGravity(t){if(!this._overriddenGravityRegister.has(t))throw new a("document-selection-gravity-wrong-restore",this,{uid:t});this._overriddenGravityRegister.delete(t),this.isGravityOverridden||this._updateAttributes(!0)}observeMarkers(t){this._observedMarkers.add(t),this._updateMarkers()}_popRange(){this._ranges.pop().detach()}_pushRange(t){const e=this._prepareRange(t);e&&this._ranges.push(e)}_prepareRange(t){if(this._checkRange(t),t.root==this._document.graveyard)return;const e=cl.fromRange(t);return e.on("change:range",((t,n,o)=>{if(this._hasChangedRange=!0,e.root==this._document.graveyard){this._selectionRestorePosition=o.deletionPosition;const t=this._ranges.indexOf(e);this._ranges.splice(t,1),e.detach()}})),e}_updateMarkers(){if(!this._observedMarkers.size)return;const t=[];let e=!1;for(const e of this._model.markers){const n=e.name.split(":",1)[0];if(!this._observedMarkers.has(n))continue;const o=e.getRange();for(const n of this.getRanges())o.containsRange(n,!n.isCollapsed)&&t.push(e)}const n=Array.from(this.markers);for(const n of t)this.markers.has(n)||(this.markers.add(n),e=!0);for(const n of Array.from(this.markers))t.includes(n)||(this.markers.remove(n),e=!0);e&&this.fire("change:marker",{oldMarkers:n,directChange:!1})}_updateMarker(t,e){const n=t.name.split(":",1)[0];if(!this._observedMarkers.has(n))return;let o=!1;const i=Array.from(this.markers),r=this.markers.has(t);if(e){let n=!1;for(const t of this.getRanges())if(e.containsRange(t,!t.isCollapsed)){n=!0;break}n&&!r?(this.markers.add(t),o=!0):!n&&r&&(this.markers.remove(t),o=!0)}else r&&(this.markers.remove(t),o=!0);o&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateAttributes(t){const e=Wo(this._getSurroundingAttributes()),n=Wo(this.getAttributes());if(t)this._attributePriority=new Map,this._attrs=new Map;else for(const[t,e]of this._attributePriority)"low"==e&&(this._attrs.delete(t),this._attributePriority.delete(t));this._setAttributesTo(e);const o=[];for(const[t,e]of this.getAttributes())n.has(t)&&n.get(t)===e||o.push(t);for(const[t]of n)this.hasAttribute(t)||o.push(t);o.length>0&&this.fire("change:attribute",{attributeKeys:o,directChange:!1})}_setAttribute(t,e,n=!0){const o=n?"normal":"low";if("low"==o&&"normal"==this._attributePriority.get(t))return!1;return super.getAttribute(t)!==e&&(this._attrs.set(t,e),this._attributePriority.set(t,o),!0)}_removeAttribute(t,e=!0){const n=e?"normal":"low";return("low"!=n||"normal"!=this._attributePriority.get(t))&&(this._attributePriority.set(t,n),!!super.hasAttribute(t)&&(this._attrs.delete(t),!0))}_setAttributesTo(t){const e=new Set;for(const[e,n]of this.getAttributes())t.get(e)!==n&&this._removeAttribute(e,!1);for(const[n,o]of t){this._setAttribute(n,o,!1)&&e.add(n)}return e}*_getStoredAttributes(){const t=this.getFirstPosition().parent;if(this.isCollapsed&&t.isEmpty)for(const e of t.getAttributeKeys())if(e.startsWith(ul)){const n=e.substr(ul.length);yield[n,t.getAttribute(e)]}}_getSurroundingAttributes(){const t=this.getFirstPosition(),e=this._model.schema;let n=null;if(this.isCollapsed){const o=t.textNode?t.textNode:t.nodeBefore,i=t.textNode?t.textNode:t.nodeAfter;if(this.isGravityOverridden||(n=pl(o)),n||(n=pl(i)),!this.isGravityOverridden&&!n){let t=o;for(;t&&!e.isInline(t)&&!n;)t=t.previousSibling,n=pl(t)}if(!n){let t=i;for(;t&&!e.isInline(t)&&!n;)t=t.nextSibling,n=pl(t)}n||(n=this._getStoredAttributes())}else{const t=this.getFirstRange();for(const o of t){if(o.item.is("element")&&e.isObject(o.item))break;if("text"==o.type){n=o.item.getAttributes();break}}}return n}_fixGraveyardSelection(t){const e=this._model.schema.getNearestSelectionRange(t);e&&this._pushRange(e)}}function pl(t){return t instanceof qa||t instanceof Ha?t.getAttributes():null}class fl{constructor(t){this._dispatchers=t}add(t){for(const e of this._dispatchers)t(e);return this}}const bl=function(t){return _o(t,5)};class kl extends fl{elementToElement(t){return this.add(function(t){(t=bl(t)).model=Al(t.model),t.view=_l(t.view,"container"),t.model.attributes.length&&(t.model.children=!0);return e=>{e.on("insert:"+t.model.name,function(t,e=Dl){return(n,o,i)=>{if(!e(o.item,i.consumable,{preflight:!0}))return;const r=t(o.item,i);if(!r)return;e(o.item,i.consumable);const s=i.mapper.toViewPosition(o.range.start);i.mapper.bindElements(o.item,r),i.writer.insert(s,r),i.convertAttributes(o.item),Tl(r,o.item.getChildren(),i,{reconversion:o.reconversion})}}(t.view,Sl(t.model)),{priority:t.converterPriority||"normal"}),(t.model.children||t.model.attributes.length)&&e.on("reduceChanges",El(t.model),{priority:"low"})}}(t))}elementToStructure(t){return this.add(function(t){return(t=bl(t)).model=Al(t.model),t.view=_l(t.view,"container"),t.model.children=!0,e=>{if(e._conversionApi.schema.checkChild(t.model.name,"$text"))throw new a("conversion-element-to-structure-disallowed-text",e,{elementName:t.model.name});var n,o;e.on("insert:"+t.model.name,(n=t.view,o=Sl(t.model),(t,e,i)=>{if(!o(e.item,i.consumable,{preflight:!0}))return;const r=new Map;i.writer._registerSlotFactory(function(t,e,n){return(o,i="children")=>{const r=o.createContainerElement("$slot");let s=null;if("children"===i)s=Array.from(t.getChildren());else{if("function"!=typeof i)throw new a("conversion-slot-mode-unknown",n.dispatcher,{modeOrFilter:i});s=Array.from(t.getChildren()).filter((t=>i(t)))}return e.set(r,s),r}}(e.item,r,i));const s=n(e.item,i);if(i.writer._clearSlotFactory(),!s)return;!function(t,e,n){const o=Array.from(e.values()).flat(),i=new Set(o);if(i.size!=o.length)throw new a("conversion-slot-filter-overlap",n.dispatcher,{element:t});if(i.size!=t.childCount)throw new a("conversion-slot-filter-incomplete",n.dispatcher,{element:t})}(e.item,r,i),o(e.item,i.consumable);const l=i.mapper.toViewPosition(e.range.start);i.mapper.bindElements(e.item,s),i.writer.insert(l,s),i.convertAttributes(e.item),function(t,e,n,o){n.mapper.on("modelToViewPosition",s,{priority:"highest"});let i=null,r=null;for([i,r]of e)Tl(t,r,n,o),n.writer.move(n.writer.createRangeIn(i),n.writer.createPositionBefore(i)),n.writer.remove(i);function s(t,e){const n=e.modelPosition.nodeAfter,o=r.indexOf(n);o<0||(e.viewPosition=e.mapper.findPositionIn(i,o))}n.mapper.off("modelToViewPosition",s)}(s,r,i,{reconversion:e.reconversion})}),{priority:t.converterPriority||"normal"}),e.on("reduceChanges",El(t.model),{priority:"low"})}}(t))}attributeToElement(t){return this.add(function(t){t=bl(t);let e="attribute:"+(t.model.key?t.model.key:t.model);t.model.name&&(e+=":"+t.model.name);if(t.model.values)for(const e of t.model.values)t.view[e]=_l(t.view[e],"attribute");else t.view=_l(t.view,"attribute");const n=vl(t);return o=>{o.on(e,function(t){return(e,n,o)=>{if(!o.consumable.test(n.item,e.name))return;const i=t(n.attributeOldValue,o),r=t(n.attributeNewValue,o);if(!i&&!r)return;o.consumable.consume(n.item,e.name);const s=o.writer,a=s.document.selection;if(n.item instanceof il||n.item instanceof gl)s.wrap(a.getFirstRange(),r);else{let t=o.mapper.toViewRange(n.range);null!==n.attributeOldValue&&i&&(t=s.unwrap(t,i)),null!==n.attributeNewValue&&r&&s.wrap(t,r)}}}(n),{priority:t.converterPriority||"normal"})}}(t))}attributeToAttribute(t){return this.add(function(t){t=bl(t);let e="attribute:"+(t.model.key?t.model.key:t.model);t.model.name&&(e+=":"+t.model.name);if(t.model.values)for(const e of t.model.values)t.view[e]=yl(t.view[e]);else t.view=yl(t.view);const n=vl(t);return o=>{var i;o.on(e,(i=n,(t,e,n)=>{if(!n.consumable.test(e.item,t.name))return;const o=i(e.attributeOldValue,n),r=i(e.attributeNewValue,n);if(!o&&!r)return;n.consumable.consume(e.item,t.name);const s=n.mapper.toViewElement(e.item),l=n.writer;if(!s)throw new a("conversion-attribute-to-attribute-on-text",n.dispatcher,e);if(null!==e.attributeOldValue&&o)if("class"==o.key){const t=Io(o.value);for(const e of t)l.removeClass(e,s)}else if("style"==o.key){const t=Object.keys(o.value);for(const e of t)l.removeStyle(e,s)}else l.removeAttribute(o.key,s);if(null!==e.attributeNewValue&&r)if("class"==r.key){const t=Io(r.value);for(const e of t)l.addClass(e,s)}else if("style"==r.key){const t=Object.keys(r.value);for(const e of t)l.setStyle(e,r.value[e],s)}else l.setAttribute(r.key,r.value,s)}),{priority:t.converterPriority||"normal"})}}(t))}markerToElement(t){return this.add(function(t){return(t=bl(t)).view=_l(t.view,"ui"),e=>{var n;e.on("addMarker:"+t.model,(n=t.view,(t,e,o)=>{e.isOpening=!0;const i=n(e,o);e.isOpening=!1;const r=n(e,o);if(!i||!r)return;const s=e.markerRange;if(s.isCollapsed&&!o.consumable.consume(s,t.name))return;for(const e of s)if(!o.consumable.consume(e.item,t.name))return;const a=o.mapper,l=o.writer;l.insert(a.toViewPosition(s.start),i),o.mapper.bindElementToMarker(i,e.markerName),s.isCollapsed||(l.insert(a.toViewPosition(s.end),r),o.mapper.bindElementToMarker(r,e.markerName)),t.stop()}),{priority:t.converterPriority||"normal"}),e.on("removeMarker:"+t.model,(t.view,(t,e,n)=>{const o=n.mapper.markerNameToElements(e.markerName);if(o){for(const t of o)n.mapper.unbindElementFromMarkerName(t,e.markerName),n.writer.clear(n.writer.createRangeOn(t),t);n.writer.clearClonedElementsGroup(e.markerName),t.stop()}}),{priority:t.converterPriority||"normal"})}}(t))}markerToHighlight(t){return this.add(function(t){return e=>{var n;e.on("addMarker:"+t.model,(n=t.view,(t,e,o)=>{if(!e.item)return;if(!(e.item instanceof il||e.item instanceof gl||e.item.is("$textProxy")))return;const i=xl(n,e,o);if(!i)return;if(!o.consumable.consume(e.item,t.name))return;const r=o.writer,s=wl(r,i),a=r.document.selection;if(e.item instanceof il||e.item instanceof gl)r.wrap(a.getFirstRange(),s,a);else{const t=o.mapper.toViewRange(e.range),n=r.wrap(t,s);for(const t of n.getItems())if(t.is("attributeElement")&&t.isSimilar(s)){o.mapper.bindElementToMarker(t,e.markerName);break}}}),{priority:t.converterPriority||"normal"}),e.on("addMarker:"+t.model,function(t){return(e,n,o)=>{if(!n.item)return;if(!(n.item instanceof Ua))return;const i=xl(t,n,o);if(!i)return;if(!o.consumable.test(n.item,e.name))return;const r=o.mapper.toViewElement(n.item);if(r&&r.getCustomProperty("addHighlight")){o.consumable.consume(n.item,e.name);for(const t of Ya._createIn(n.item))o.consumable.consume(t.item,e.name);r.getCustomProperty("addHighlight")(r,i,o.writer),o.mapper.bindElementToMarker(r,n.markerName)}}}(t.view),{priority:t.converterPriority||"normal"}),e.on("removeMarker:"+t.model,function(t){return(e,n,o)=>{if(n.markerRange.isCollapsed)return;const i=xl(t,n,o);if(!i)return;const r=wl(o.writer,i),s=o.mapper.markerNameToElements(n.markerName);if(s){for(const t of s)o.mapper.unbindElementFromMarkerName(t,n.markerName),t.is("attributeElement")?o.writer.unwrap(o.writer.createRangeOn(t),r):t.getCustomProperty("removeHighlight")(t,i.id,o.writer);o.writer.clearClonedElementsGroup(n.markerName),e.stop()}}}(t.view),{priority:t.converterPriority||"normal"})}}(t))}markerToData(t){return this.add(function(t){const e=(t=bl(t)).model;t.view||(t.view=n=>({group:e,name:n.substr(t.model.length+1)}));return n=>{var o;n.on("addMarker:"+e,(o=t.view,(t,e,n)=>{const i=o(e.markerName,n);if(!i)return;const r=e.markerRange;n.consumable.consume(r,t.name)&&(Cl(r,!1,n,e,i),Cl(r,!0,n,e,i),t.stop())}),{priority:t.converterPriority||"normal"}),n.on("removeMarker:"+e,function(t){return(e,n,o)=>{const i=t(n.markerName,o);if(!i)return;const r=o.mapper.markerNameToElements(n.markerName);if(r){for(const t of r)o.mapper.unbindElementFromMarkerName(t,n.markerName),t.is("containerElement")?(s(`data-${i.group}-start-before`,t),s(`data-${i.group}-start-after`,t),s(`data-${i.group}-end-before`,t),s(`data-${i.group}-end-after`,t)):o.writer.clear(o.writer.createRangeOn(t),t);o.writer.clearClonedElementsGroup(n.markerName),e.stop()}function s(t,e){if(e.hasAttribute(t)){const n=new Set(e.getAttribute(t).split(","));n.delete(i.name),0==n.size?o.writer.removeAttribute(t,e):o.writer.setAttribute(t,Array.from(n).join(","),e)}}}}(t.view),{priority:t.converterPriority||"normal"})}}(t))}}function wl(t,e){const n=t.createAttributeElement("span",e.attributes);return e.classes&&n._addClass(e.classes),"number"==typeof e.priority&&(n._priority=e.priority),n._id=e.id,n}function Cl(t,e,n,o,i){const r=e?t.start:t.end,s=r.nodeAfter&&r.nodeAfter.is("element")?r.nodeAfter:null,a=r.nodeBefore&&r.nodeBefore.is("element")?r.nodeBefore:null;if(s||a){let t,r;e&&s||!e&&!a?(t=s,r=!0):(t=a,r=!1);const l=n.mapper.toViewElement(t);if(l)return void function(t,e,n,o,i,r){const s=`data-${r.group}-${e?"start":"end"}-${n?"before":"after"}`,a=t.hasAttribute(s)?t.getAttribute(s).split(","):[];a.unshift(r.name),o.writer.setAttribute(s,a.join(","),t),o.mapper.bindElementToMarker(t,i.markerName)}(l,e,r,n,o,i)}!function(t,e,n,o,i){const r=`${i.group}-${e?"start":"end"}`,s=i.name?{name:i.name}:null,a=n.writer.createUIElement(r,s);n.writer.insert(t,a),n.mapper.bindElementToMarker(a,o.markerName)}(n.mapper.toViewPosition(r),e,n,o,i)}function Al(t){return"string"==typeof t&&(t={name:t}),t.attributes?Array.isArray(t.attributes)||(t.attributes=[t.attributes]):t.attributes=[],t.children=!!t.children,t}function _l(t,e){return"function"==typeof t?t:(n,o)=>function(t,e,n){"string"==typeof t&&(t={name:t});let o;const i=e.writer,r=Object.assign({},t.attributes);if("container"==n)o=i.createContainerElement(t.name,r);else if("attribute"==n){const e={priority:t.priority||tr.DEFAULT_PRIORITY};o=i.createAttributeElement(t.name,r,e)}else o=i.createUIElement(t.name,r);if(t.styles){const e=Object.keys(t.styles);for(const n of e)i.setStyle(n,t.styles[n],o)}if(t.classes){const e=t.classes;if("string"==typeof e)i.addClass(e,o);else for(const t of e)i.addClass(t,o)}return o}(t,o,e)}function vl(t){return t.model.values?(e,n)=>{const o=t.view[e];return o?o(e,n):null}:t.view}function yl(t){return"string"==typeof t?e=>({key:t,value:e}):"object"==typeof t?t.value?()=>t:e=>({key:t.key,value:e}):t}function xl(t,e,n){const o="function"==typeof t?t(e,n):t;return o?(o.priority||(o.priority=10),o.id||(o.id=e.markerName),o):null}function El(t){const e=function(t){return(e,n)=>{if(!e.is("element",t.name))return!1;if("attribute"==n.type){if(t.attributes.includes(n.attributeKey))return!0}else if(t.children)return!0;return!1}}(t);return(t,n)=>{const o=[];n.reconvertedElements||(n.reconvertedElements=new Set);for(const t of n.changes){const i=t.position?t.position.parent:t.range.start.nodeAfter;if(i&&e(i,t)){if(!n.reconvertedElements.has(i)){n.reconvertedElements.add(i);const t=Ga._createBefore(i);o.push({type:"remove",name:i.name,position:t,length:1},{type:"reinsert",name:i.name,position:t,length:1})}}else o.push(t)}n.changes=o}}function Sl(t){return(e,n,o={})=>{const i=["insert"];for(const n of t.attributes)e.hasAttribute(n)&&i.push(`attribute:${n}`);return!!i.every((t=>n.test(e,t)))&&(o.preflight||i.forEach((t=>n.consume(e,t))),!0)}}function Tl(t,e,n,o){for(const i of e)Bl(t.root,i,n,o)||n.convertItem(i)}function Bl(t,e,n,o){const{writer:i,mapper:r}=n;if(!o.reconversion)return!1;const s=r.toViewElement(e);return!(!s||s.root==t)&&(!!n.canReuseView(s)&&(i.move(i.createRangeOn(s),r.toViewPosition(Ga._createBefore(e))),!0))}function Dl(t,e,{preflight:n}={}){return n?e.test(t,"insert"):e.consume(t,"insert")}function Il(t){const{schema:e,document:n}=t.model;for(const o of n.getRootNames()){const i=n.getRoot(o);if(i.isEmpty&&!e.checkChild(i,"$text")&&e.checkChild(i,"paragraph"))return t.insertElement("paragraph",i),!0}return!1}function Pl(t,e,n){const o=n.createContext(t);return!!n.checkChild(o,"paragraph")&&!!n.checkChild(o.push("paragraph"),e)}function zl(t,e){const n=e.createElement("paragraph");return e.insert(n,t),e.createPositionAt(n,0)}class Rl extends fl{elementToElement(t){return this.add(Vl(t))}elementToAttribute(t){return this.add(function(t){Ml(t=bl(t));const e=Ol(t,!1),n=Fl(t.view),o=n?"element:"+n:"element";return n=>{n.on(o,e,{priority:t.converterPriority||"low"})}}(t))}attributeToAttribute(t){return this.add(function(t){t=bl(t);let e=null;("string"==typeof t.view||t.view.key)&&(e=function(t){"string"==typeof t.view&&(t.view={key:t.view});const e=t.view.key;let n;if("class"==e||"style"==e){n={["class"==e?"classes":"styles"]:t.view.value}}else{n={attributes:{[e]:void 0===t.view.value?/[\s\S]*/:t.view.value}}}t.view.name&&(n.name=t.view.name);return t.view=n,e}(t));Ml(t,e);const n=Ol(t,!0);return e=>{e.on("element",n,{priority:t.converterPriority||"low"})}}(t))}elementToMarker(t){return this.add(function(t){return function(t){const e=t.model;t.model=(t,n)=>{const o="string"==typeof e?e:e(t,n);return n.writer.createElement("$marker",{"data-name":o})}}(t=bl(t)),Vl(t)}(t))}dataToMarker(t){return this.add(function(t){(t=bl(t)).model||(t.model=e=>e?t.view+":"+e:t.view);const e=Nl(Ll(t,"start")),n=Nl(Ll(t,"end"));return o=>{o.on("element:"+t.view+"-start",e,{priority:t.converterPriority||"normal"}),o.on("element:"+t.view+"-end",n,{priority:t.converterPriority||"normal"});const i=s.get("low"),r=s.get("highest"),a=s.get(t.converterPriority)/r;o.on("element",function(t){return(e,n,o)=>{const i=`data-${t.view}`;function r(e,i){for(const r of i){const i=t.model(r,o),s=o.writer.createElement("$marker",{"data-name":i});o.writer.insert(s,e),n.modelCursor.isEqual(e)?n.modelCursor=n.modelCursor.getShiftedBy(1):n.modelCursor=n.modelCursor._getTransformedByInsertion(e,1),n.modelRange=n.modelRange._getTransformedByInsertion(e,1)[0]}}(o.consumable.test(n.viewItem,{attributes:i+"-end-after"})||o.consumable.test(n.viewItem,{attributes:i+"-start-after"})||o.consumable.test(n.viewItem,{attributes:i+"-end-before"})||o.consumable.test(n.viewItem,{attributes:i+"-start-before"}))&&(n.modelRange||Object.assign(n,o.convertChildren(n.viewItem,n.modelCursor)),o.consumable.consume(n.viewItem,{attributes:i+"-end-after"})&&r(n.modelRange.end,n.viewItem.getAttribute(i+"-end-after").split(",")),o.consumable.consume(n.viewItem,{attributes:i+"-start-after"})&&r(n.modelRange.end,n.viewItem.getAttribute(i+"-start-after").split(",")),o.consumable.consume(n.viewItem,{attributes:i+"-end-before"})&&r(n.modelRange.start,n.viewItem.getAttribute(i+"-end-before").split(",")),o.consumable.consume(n.viewItem,{attributes:i+"-start-before"})&&r(n.modelRange.start,n.viewItem.getAttribute(i+"-start-before").split(",")))}}(t),{priority:i+a})}}(t))}}function Vl(t){const e=Nl(t=bl(t)),n=Fl(t.view),o=n?"element:"+n:"element";return n=>{n.on(o,e,{priority:t.converterPriority||"normal"})}}function Fl(t){return"string"==typeof t?t:"object"==typeof t&&"string"==typeof t.name?t.name:null}function Nl(t){const e=new Uo(t.view);return(n,o,i)=>{const r=e.match(o.viewItem);if(!r)return;const s=r.match;if(s.name=!0,!i.consumable.test(o.viewItem,s))return;const a=function(t,e,n){return t instanceof Function?t(e,n):n.writer.createElement(t)}(t.model,o.viewItem,i);a&&i.safeInsert(a,o.modelCursor)&&(i.consumable.consume(o.viewItem,s),i.convertChildren(o.viewItem,a),i.updateConversionResult(a,o))}}function Ml(t,e=null){const n=null===e||(t=>t.getAttribute(e)),o="object"!=typeof t.model?t.model:t.model.key,i="object"!=typeof t.model||void 0===t.model.value?n:t.model.value;t.model={key:o,value:i}}function Ol(t,e){const n=new Uo(t.view);return(o,i,r)=>{const s=n.match(i.viewItem);if(!s)return;if(!function(t,e){const n="function"==typeof t?t(e):t;if("object"==typeof n&&!Fl(n))return!1;return!n.classes&&!n.attributes&&!n.styles}(t.view,i.viewItem)?delete s.match.name:s.match.name=!0,!r.consumable.test(i.viewItem,s.match))return;const a=t.model.key,l="function"==typeof t.model.value?t.model.value(i.viewItem,r):t.model.value;if(null===l)return;i.modelRange||Object.assign(i,r.convertChildren(i.viewItem,i.modelCursor));const c=function(t,e,n,o){let i=!1;for(const r of Array.from(t.getItems({shallow:n})))o.schema.checkAttribute(r,e.key)&&(i=!0,r.hasAttribute(e.key)||o.writer.setAttribute(e.key,e.value,r));return i}(i.modelRange,{key:a,value:l},e,r);c&&r.consumable.consume(i.viewItem,s.match)}}function Ll(t,e){const n={};return n.view=t.view+"-"+e,n.model=(e,n)=>{const o=e.getAttribute("name"),i=t.model(o,n);return n.writer.createElement("$marker",{"data-name":i})},n}class Hl{constructor(t,e){this.model=t,this.view=new Oa(e),this.mapper=new Qa,this.downcastDispatcher=new el({mapper:this.mapper,schema:t.schema});const n=this.model.document,o=n.selection,i=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(n,"change",(()=>{this.view.change((t=>{this.downcastDispatcher.convertChanges(n.differ,i,t),this.downcastDispatcher.convertSelection(o,i,t)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(t,e){return(n,o)=>{const i=o.newSelection,r=[];for(const t of i.getRanges())r.push(e.toModelRange(t));const s=t.createSelection(r,{backward:i.isBackward});s.isEqual(t.document.selection)||t.change((t=>{t.setSelection(s)}))}}(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",((t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const o=n.writer,i=n.mapper.toViewPosition(e.range.start),r=o.createText(e.item.data);o.insert(i,r)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((t,e,n)=>{n.convertAttributes(e.item),e.reconversion||!e.item.is("element")||e.item.isEmpty||n.convertChildren(e.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((t,e,n)=>{const o=n.mapper.toViewPosition(e.position),i=e.position.getShiftedBy(e.length),r=n.mapper.toViewPosition(i,{isPhantom:!0}),s=n.writer.createRange(o,r),a=n.writer.remove(s.getTrimmed());for(const t of n.writer.createRangeIn(a).getItems())n.mapper.unbindViewElement(t,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("selection",((t,e,n)=>{const o=n.writer,i=o.document.selection;for(const t of i.getRanges())t.isCollapsed&&t.end.parent.isAttached()&&n.writer.mergeAttributes(t.start);o.setSelection(null)}),{priority:"high"}),this.downcastDispatcher.on("selection",((t,e,n)=>{const o=e.selection;if(o.isCollapsed)return;if(!n.consumable.consume(o,"selection"))return;const i=[];for(const t of o.getRanges()){const e=n.mapper.toViewRange(t);i.push(e)}n.writer.setSelection(i,{backward:o.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((t,e,n)=>{const o=e.selection;if(!o.isCollapsed)return;if(!n.consumable.consume(o,"selection"))return;const i=n.writer,r=o.getFirstPosition(),s=n.mapper.toViewPosition(r),a=i.breakAttributes(s);i.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((t=>{if("$graveyard"==t.rootName)return null;const e=new Ni(this.view.document,t.name);return e.rootName=t.rootName,this.mapper.bindElements(t,e),e}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(t){const e="string"==typeof t?t:t.name,n=this.model.markers.get(e);if(!n)throw new a("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:e});this.model.change((()=>{this.model.markers._refresh(n)}))}reconvertItem(t){this.model.change((()=>{this.model.document.differ._refreshItem(t)}))}}ue(Hl,se);class ql{constructor(){this._commands=new Map}add(t,e){this._commands.set(t,e)}get(t){return this._commands.get(t)}execute(t,...e){const n=this.get(t);if(!n)throw new a("commandcollection-command-not-found",this,{commandName:t});return n.execute(...e)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const t of this.commands())t.destroy()}}class Wl{constructor(){this._consumables=new Map}add(t,e){let n;t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!0):(this._consumables.has(t)?n=this._consumables.get(t):(n=new Ul(t),this._consumables.set(t,n)),n.add(e))}test(t,e){const n=this._consumables.get(t);return void 0===n?null:t.is("$text")||t.is("documentFragment")?n:n.test(e)}consume(t,e){return!!this.test(t,e)&&(t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!1):this._consumables.get(t).consume(e),!0)}revert(t,e){const n=this._consumables.get(t);void 0!==n&&(t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!0):n.revert(e))}static consumablesFromElement(t){const e={element:t,name:!0,attributes:[],classes:[],styles:[]},n=t.getAttributeKeys();for(const t of n)"style"!=t&&"class"!=t&&e.attributes.push(t);const o=t.getClassNames();for(const t of o)e.classes.push(t);const i=t.getStyleNames();for(const t of i)e.styles.push(t);return e}static createFrom(t,e){if(e||(e=new Wl(t)),t.is("$text"))return e.add(t),e;t.is("element")&&e.add(t,Wl.consumablesFromElement(t)),t.is("documentFragment")&&e.add(t);for(const n of t.getChildren())e=Wl.createFrom(n,e);return e}}class Ul{constructor(t){this.element=t,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(t){t.name&&(this._canConsumeName=!0);for(const e in this._consumables)e in t&&this._add(e,t[e])}test(t){if(t.name&&!this._canConsumeName)return this._canConsumeName;for(const e in this._consumables)if(e in t){const n=this._test(e,t[e]);if(!0!==n)return n}return!0}consume(t){t.name&&(this._canConsumeName=!1);for(const e in this._consumables)e in t&&this._consume(e,t[e])}revert(t){t.name&&(this._canConsumeName=!0);for(const e in this._consumables)e in t&&this._revert(e,t[e])}_add(t,e){const n=Dt(e)?e:[e],o=this._consumables[t];for(const e of n){if("attributes"===t&&("class"===e||"style"===e))throw new a("viewconsumable-invalid-attribute",this);if(o.set(e,!0),"styles"===t)for(const t of this.element.document.stylesProcessor.getRelatedStyles(e))o.set(t,!0)}}_test(t,e){const n=Dt(e)?e:[e],o=this._consumables[t];for(const e of n)if("attributes"!==t||"class"!==e&&"style"!==e){const t=o.get(e);if(void 0===t)return null;if(!t)return!1}else{const t="class"==e?"classes":"styles",n=this._test(t,[...this._consumables[t].keys()]);if(!0!==n)return n}return!0}_consume(t,e){const n=Dt(e)?e:[e],o=this._consumables[t];for(const e of n)if("attributes"!==t||"class"!==e&&"style"!==e){if(o.set(e,!1),"styles"==t)for(const t of this.element.document.stylesProcessor.getRelatedStyles(e))o.set(t,!1)}else{const t="class"==e?"classes":"styles";this._consume(t,[...this._consumables[t].keys()])}}_revert(t,e){const n=Dt(e)?e:[e],o=this._consumables[t];for(const e of n)if("attributes"!==t||"class"!==e&&"style"!==e){!1===o.get(e)&&o.set(e,!0)}else{const t="class"==e?"classes":"styles";this._revert(t,[...this._consumables[t].keys()])}}}class jl{constructor(){this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((t,e)=>{e[0]=new $l(e[0])}),{priority:"highest"}),this.on("checkChild",((t,e)=>{e[0]=new $l(e[0]),e[1]=this.getDefinition(e[1])}),{priority:"highest"})}register(t,e){if(this._sourceDefinitions[t])throw new a("schema-cannot-register-item-twice",this,{itemName:t});this._sourceDefinitions[t]=[Object.assign({},e)],this._clearCache()}extend(t,e){if(!this._sourceDefinitions[t])throw new a("schema-cannot-extend-missing-item",this,{itemName:t});this._sourceDefinitions[t].push(Object.assign({},e)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(t){let e;return e="string"==typeof t?t:t.is&&(t.is("$text")||t.is("$textProxy"))?"$text":t.name,this.getDefinitions()[e]}isRegistered(t){return!!this.getDefinition(t)}isBlock(t){const e=this.getDefinition(t);return!(!e||!e.isBlock)}isLimit(t){const e=this.getDefinition(t);return!!e&&!(!e.isLimit&&!e.isObject)}isObject(t){const e=this.getDefinition(t);return!!e&&!!(e.isObject||e.isLimit&&e.isSelectable&&e.isContent)}isInline(t){const e=this.getDefinition(t);return!(!e||!e.isInline)}isSelectable(t){const e=this.getDefinition(t);return!!e&&!(!e.isSelectable&&!e.isObject)}isContent(t){const e=this.getDefinition(t);return!!e&&!(!e.isContent&&!e.isObject)}checkChild(t,e){return!!e&&this._checkContextMatch(e,t)}checkAttribute(t,e){const n=this.getDefinition(t.last);return!!n&&n.allowAttributes.includes(e)}checkMerge(t,e=null){if(t instanceof Ga){const e=t.nodeBefore,n=t.nodeAfter;if(!(e instanceof Ua))throw new a("schema-check-merge-no-element-before",this);if(!(n instanceof Ua))throw new a("schema-check-merge-no-element-after",this);return this.checkMerge(e,n)}for(const n of e.getChildren())if(!this.checkChild(t,n))return!1;return!0}addChildCheck(t){this.on("checkChild",((e,[n,o])=>{if(!o)return;const i=t(n,o);"boolean"==typeof i&&(e.stop(),e.return=i)}),{priority:"high"})}addAttributeCheck(t){this.on("checkAttribute",((e,[n,o])=>{const i=t(n,o);"boolean"==typeof i&&(e.stop(),e.return=i)}),{priority:"high"})}setAttributeProperties(t,e){this._attributeProperties[t]=Object.assign(this.getAttributeProperties(t),e)}getAttributeProperties(t){return this._attributeProperties[t]||{}}getLimitElement(t){let e;if(t instanceof Ga)e=t.parent;else{e=(t instanceof Ya?[t]:Array.from(t.getRanges())).reduce(((t,e)=>{const n=e.getCommonAncestor();return t?t.getCommonAncestor(n,{includeSelf:!0}):n}),null)}for(;!this.isLimit(e)&&e.parent;)e=e.parent;return e}checkAttributeInSelection(t,e){if(t.isCollapsed){const n=[...t.getFirstPosition().getAncestors(),new Ha("",t.getAttributes())];return this.checkAttribute(n,e)}{const n=t.getRanges();for(const t of n)for(const n of t)if(this.checkAttribute(n.item,e))return!0}return!1}*getValidRanges(t,e){t=function*(t){for(const e of t)yield*e.getMinimalFlatRanges()}(t);for(const n of t)yield*this._getValidRangesForRange(n,e)}getNearestSelectionRange(t,e="both"){if(this.checkChild(t,"$text"))return new Ya(t);let n,o;const i=t.getAncestors().reverse().find((t=>this.isLimit(t)))||t.root;"both"!=e&&"backward"!=e||(n=new ja({boundaries:Ya._createIn(i),startPosition:t,direction:"backward"})),"both"!=e&&"forward"!=e||(o=new ja({boundaries:Ya._createIn(i),startPosition:t}));for(const t of function*(t,e){let n=!1;for(;!n;){if(n=!0,t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}if(e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}}}(n,o)){const e=t.walker==n?"elementEnd":"elementStart",o=t.value;if(o.type==e&&this.isObject(o.item))return Ya._createOn(o.item);if(this.checkChild(o.nextPosition,"$text"))return new Ya(o.nextPosition)}return null}findAllowedParent(t,e){let n=t.parent;for(;n;){if(this.checkChild(n,e))return n;if(this.isLimit(n))return null;n=n.parent}return null}removeDisallowedAttributes(t,e){for(const n of t)if(n.is("$text"))rc(this,n,e);else{const t=Ya._createIn(n).getPositions();for(const n of t){rc(this,n.nodeBefore||n.parent,e)}}}createContext(t){return new $l(t)}_clearCache(){this._compiledDefinitions=null}_compile(){const t={},e=this._sourceDefinitions,n=Object.keys(e);for(const o of n)t[o]=Gl(e[o],o);for(const e of n)Kl(t,e);for(const e of n)Zl(t,e);for(const e of n)Jl(t,e);for(const e of n)Yl(t,e),Ql(t,e);for(const e of n)Xl(t,e),tc(t,e),ec(t,e);this._compiledDefinitions=t}_checkContextMatch(t,e,n=e.length-1){const o=e.getItem(n);if(t.allowIn.includes(o.name)){if(0==n)return!0;{const t=this.getDefinition(o);return this._checkContextMatch(t,e,n-1)}}return!1}*_getValidRangesForRange(t,e){let n=t.start,o=t.start;for(const i of t.getItems({shallow:!0}))i.is("element")&&(yield*this._getValidRangesForRange(Ya._createIn(i),e)),this.checkAttribute(i,e)||(n.isEqual(o)||(yield new Ya(n,o)),n=Ga._createAfter(i)),o=Ga._createAfter(i);n.isEqual(o)||(yield new Ya(n,o))}}ue(jl,se);class $l{constructor(t){if(t instanceof $l)return t;"string"==typeof t?t=[t]:Array.isArray(t)||(t=t.getAncestors({includeSelf:!0})),this._items=t.map(ic)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(t){const e=new $l([t]);return e._items=[...this._items,...e._items],e}getItem(t){return this._items[t]}*getNames(){yield*this._items.map((t=>t.name))}endsWith(t){return Array.from(this.getNames()).join(" ").endsWith(t)}startsWith(t){return Array.from(this.getNames()).join(" ").startsWith(t)}}function Gl(t,e){const n={name:e,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(t,e){for(const n of t){const t=Object.keys(n).filter((t=>t.startsWith("is")));for(const o of t)e[o]=n[o]}}(t,n),nc(t,n,"allowIn"),nc(t,n,"allowContentOf"),nc(t,n,"allowWhere"),nc(t,n,"allowAttributes"),nc(t,n,"allowAttributesOf"),nc(t,n,"allowChildren"),nc(t,n,"inheritTypesFrom"),function(t,e){for(const n of t){const t=n.inheritAllFrom;t&&(e.allowContentOf.push(t),e.allowWhere.push(t),e.allowAttributesOf.push(t),e.inheritTypesFrom.push(t))}}(t,n),n}function Kl(t,e){const n=t[e];for(const o of n.allowChildren){const n=t[o];n&&n.allowIn.push(e)}n.allowChildren.length=0}function Zl(t,e){for(const n of t[e].allowContentOf)if(t[n]){oc(t,n).forEach((t=>{t.allowIn.push(e)}))}delete t[e].allowContentOf}function Jl(t,e){for(const n of t[e].allowWhere){const o=t[n];if(o){const n=o.allowIn;t[e].allowIn.push(...n)}}delete t[e].allowWhere}function Yl(t,e){for(const n of t[e].allowAttributesOf){const o=t[n];if(o){const n=o.allowAttributes;t[e].allowAttributes.push(...n)}}delete t[e].allowAttributesOf}function Ql(t,e){const n=t[e];for(const e of n.inheritTypesFrom){const o=t[e];if(o){const t=Object.keys(o).filter((t=>t.startsWith("is")));for(const e of t)e in n||(n[e]=o[e])}}delete n.inheritTypesFrom}function Xl(t,e){const n=t[e],o=n.allowIn.filter((e=>t[e]));n.allowIn=Array.from(new Set(o))}function tc(t,e){const n=t[e];for(const o of n.allowIn){t[o].allowChildren.push(e)}}function ec(t,e){const n=t[e];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function nc(t,e,n){for(const o of t)"string"==typeof o[n]?e[n].push(o[n]):Array.isArray(o[n])&&e[n].push(...o[n])}function oc(t,e){const n=t[e];return(o=t,Object.keys(o).map((t=>o[t]))).filter((t=>t.allowIn.includes(n.name)));var o}function ic(t){return"string"==typeof t||t.is("documentFragment")?{name:"string"==typeof t?t:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:t.is("element")?t.name:"$text",*getAttributeKeys(){yield*t.getAttributeKeys()},getAttribute:e=>t.getAttribute(e)}}function rc(t,e,n){for(const o of e.getAttributeKeys())t.checkAttribute(e,o)||n.removeAttribute(o,e)}class sc{constructor(t={}){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)}convert(t,e,n=["$root"]){this.fire("viewCleanup",t),this._modelCursor=function(t,e){let n;for(const o of new $l(t)){const t={};for(const e of o.getAttributeKeys())t[e]=o.getAttribute(e);const i=e.createElement(o.name,t);n&&e.append(i,n),n=Ga._createAt(i,0)}return n}(n,e),this.conversionApi.writer=e,this.conversionApi.consumable=Wl.createFrom(t),this.conversionApi.store={};const{modelRange:o}=this._convertItem(t,this._modelCursor),i=e.createDocumentFragment();if(o){this._removeEmptyElements();for(const t of Array.from(this._modelCursor.parent.getChildren()))e.append(t,i);i.markers=function(t,e){const n=new Set,o=new Map,i=Ya._createIn(t).getItems();for(const t of i)"$marker"==t.name&&n.add(t);for(const t of n){const n=t.getAttribute("data-name"),i=e.createPositionBefore(t);o.has(n)?o.get(n).end=i.clone():o.set(n,new Ya(i.clone())),e.remove(t)}return o}(i,e)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,i}_convertItem(t,e){const n=Object.assign({viewItem:t,modelCursor:e,modelRange:null});if(t.is("element")?this.fire("element:"+t.name,n,this.conversionApi):t.is("$text")?this.fire("text",n,this.conversionApi):this.fire("documentFragment",n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof Ya))throw new a("view-conversion-dispatcher-incorrect-result",this);return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(t,e){let n=e.is("position")?e:Ga._createAt(e,0);const o=new Ya(n);for(const e of Array.from(t.getChildren())){const t=this._convertItem(e,n);t.modelRange instanceof Ya&&(o.end=t.modelRange.end,n=t.modelCursor)}return{modelRange:o,modelCursor:n}}_safeInsert(t,e){const n=this._splitToAllowedParent(t,e);return!!n&&(this.conversionApi.writer.insert(t,n.position),!0)}_updateConversionResult(t,e){const n=this._getSplitParts(t),o=this.conversionApi.writer;e.modelRange||(e.modelRange=o.createRange(o.createPositionBefore(t),o.createPositionAfter(n[n.length-1])));const i=this._cursorParents.get(t);e.modelCursor=i?o.createPositionAt(i,0):e.modelRange.end}_splitToAllowedParent(t,e){const{schema:n,writer:o}=this.conversionApi;let i=n.findAllowedParent(e,t);if(i){if(i===e.parent)return{position:e};this._modelCursor.parent.getAncestors().includes(i)&&(i=null)}if(!i)return Pl(e,t,n)?{position:zl(e,o)}:null;const r=this.conversionApi.writer.split(e,i),s=[];for(const t of r.range.getWalker())if("elementEnd"==t.type)s.push(t.item);else{const e=s.pop(),n=t.item;this._registerSplitPair(e,n)}const a=r.range.end.parent;return this._cursorParents.set(t,a),{position:r.position,cursorParent:a}}_registerSplitPair(t,e){this._splitParts.has(t)||this._splitParts.set(t,[t]);const n=this._splitParts.get(t);this._splitParts.set(e,n),n.push(e)}_getSplitParts(t){let e;return e=this._splitParts.has(t)?this._splitParts.get(t):[t],e}_removeEmptyElements(){let t=!1;for(const e of this._splitParts.keys())e.isEmpty&&(this.conversionApi.writer.remove(e),this._splitParts.delete(e),t=!0);t&&this._removeEmptyElements()}}ue(sc,f);class ac{getHtml(t){const e=document.implementation.createHTMLDocument("").createElement("div");return e.appendChild(t),e.innerHTML}}class lc{constructor(t){this.domParser=new DOMParser,this.domConverter=new ms(t,{renderingMode:"data"}),this.htmlWriter=new ac}toData(t){const e=this.domConverter.viewToDom(t,document);return this.htmlWriter.getHtml(e)}toView(t){const e=this._toDom(t);return this.domConverter.domToView(e)}registerRawContentMatcher(t){this.domConverter.registerRawContentMatcher(t)}useFillerType(t){this.domConverter.blockFillerMode="marked"==t?"markedNbsp":"nbsp"}_toDom(t){t.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(t=`<body>${t}</body>`);const e=this.domParser.parseFromString(t,"text/html"),n=e.createDocumentFragment(),o=e.body.childNodes;for(;o.length>0;)n.appendChild(o[0]);return n}}class cc{constructor(t,e){this.model=t,this.mapper=new Qa,this.downcastDispatcher=new el({mapper:this.mapper,schema:t.schema}),this.downcastDispatcher.on("insert:$text",((t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const o=n.writer,i=n.mapper.toViewPosition(e.range.start),r=o.createText(e.item.data);o.insert(i,r)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((t,e,n)=>{n.convertAttributes(e.item),e.reconversion||!e.item.is("element")||e.item.isEmpty||n.convertChildren(e.item)}),{priority:"lowest"}),this.upcastDispatcher=new sc({schema:t.schema}),this.viewDocument=new Xi(e),this.stylesProcessor=e,this.htmlProcessor=new lc(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new vr(this.viewDocument),this.upcastDispatcher.on("text",((t,e,{schema:n,consumable:o,writer:i})=>{let r=e.modelCursor;if(!o.test(e.viewItem))return;if(!n.checkChild(r,"$text")){if(!Pl(r,"$text",n))return;r=zl(r,i)}o.consume(e.viewItem);const s=i.createText(e.viewItem.data);i.insert(s,r),e.modelRange=i.createRange(r,r.getShiftedBy(s.offsetSize)),e.modelCursor=e.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((t,e,n)=>{if(!e.modelRange&&n.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:o}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=o}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((t,e,n)=>{if(!e.modelRange&&n.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:o}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=o}}),{priority:"lowest"}),this.decorate("init"),this.decorate("set"),this.decorate("get"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},Il)}),{priority:"lowest"})}get(t={}){const{rootName:e="main",trim:n="empty"}=t;if(!this._checkIfRootsExists([e]))throw new a("datacontroller-get-non-existent-root",this);const o=this.model.document.getRoot(e);return"empty"!==n||this.model.hasContent(o,{ignoreWhitespaces:!0})?this.stringify(o,t):""}stringify(t,e={}){const n=this.toView(t,e);return this.processor.toData(n)}toView(t,e={}){const n=this.viewDocument,o=this._viewWriter;this.mapper.clearBindings();const i=Ya._createIn(t),r=new _r(n);this.mapper.bindElements(t,r);const s=t.is("documentFragment")?t.markers:function(t){const e=[],n=t.root.document;if(!n)return new Map;const o=Ya._createIn(t);for(const t of n.model.markers){const n=t.getRange(),i=n.isCollapsed,r=n.start.isEqual(o.start)||n.end.isEqual(o.end);if(i&&r)e.push([t.name,n]);else{const i=o.getIntersection(n);i&&e.push([t.name,i])}}return e.sort((([t,e],[n,o])=>{if("after"!==e.end.compareWith(o.start))return 1;if("before"!==e.start.compareWith(o.end))return-1;switch(e.start.compareWith(o.start)){case"before":return 1;case"after":return-1;default:switch(e.end.compareWith(o.end)){case"before":return 1;case"after":return-1;default:return n.localeCompare(t)}}})),new Map(e)}(t);return this.downcastDispatcher.convert(i,s,o,e),r}init(t){if(this.model.document.version)throw new a("datacontroller-init-document-not-empty",this);let e={};if("string"==typeof t?e.main=t:e=t,!this._checkIfRootsExists(Object.keys(e)))throw new a("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(t=>{for(const n of Object.keys(e)){const o=this.model.document.getRoot(n);t.insert(this.parse(e[n],o),o,0)}})),Promise.resolve()}set(t,e={}){let n={};if("string"==typeof t?n.main=t:n=t,!this._checkIfRootsExists(Object.keys(n)))throw new a("datacontroller-set-non-existent-root",this);this.model.enqueueChange(e.batchType||{},(t=>{t.setSelection(null),t.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const e of Object.keys(n)){const o=this.model.document.getRoot(e);t.remove(t.createRangeIn(o)),t.insert(this.parse(n[e],o),o,0)}}))}parse(t,e="$root"){const n=this.processor.toView(t);return this.toModel(n,e)}toModel(t,e="$root"){return this.model.change((n=>this.upcastDispatcher.convert(t,n,e)))}addStyleProcessorRules(t){t(this.stylesProcessor)}registerRawContentMatcher(t){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(t),this.htmlProcessor.registerRawContentMatcher(t)}destroy(){this.stopListening()}_checkIfRootsExists(t){for(const e of t)if(!this.model.document.getRootNames().includes(e))return!1;return!0}}ue(cc,se);class dc{constructor(t,e){this._helpers=new Map,this._downcast=Io(t),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=Io(e),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(t,e){const n=this._downcast.includes(e);if(!this._upcast.includes(e)&&!n)throw new a("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:t,dispatchers:[e],isDowncast:n})}for(t){if(!this._helpers.has(t))throw new a("conversion-for-unknown-group",this);return this._helpers.get(t)}elementToElement(t){this.for("downcast").elementToElement(t);for(const{model:e,view:n}of hc(t))this.for("upcast").elementToElement({model:e,view:n,converterPriority:t.converterPriority})}attributeToElement(t){this.for("downcast").attributeToElement(t);for(const{model:e,view:n}of hc(t))this.for("upcast").elementToAttribute({view:n,model:e,converterPriority:t.converterPriority})}attributeToAttribute(t){this.for("downcast").attributeToAttribute(t);for(const{model:e,view:n}of hc(t))this.for("upcast").attributeToAttribute({view:n,model:e})}_createConversionHelpers({name:t,dispatchers:e,isDowncast:n}){if(this._helpers.has(t))throw new a("conversion-group-exists",this);const o=n?new kl(e):new Rl(e);this._helpers.set(t,o)}}function*hc(t){if(t.model.values)for(const e of t.model.values){const n={key:t.model.key,value:e},o=t.view[e],i=t.upcastAlso?t.upcastAlso[e]:void 0;yield*uc(n,o,i)}else yield*uc(t.model,t.view,t.upcastAlso)}function*uc(t,e,n){if(yield{model:t,view:e},n)for(const e of Io(n))yield{model:t,view:e}}class gc{constructor(t={}){"string"==typeof t&&(t="transparent"===t?{isUndoable:!1}:{},l("batch-constructor-deprecated-string-type"));const{isUndoable:e=!0,isLocal:n=!0,isUndo:o=!1,isTyping:i=!1}=t;this.operations=[],this.isUndoable=e,this.isLocal=n,this.isUndo=o,this.isTyping=i}get type(){return l("batch-type-deprecated"),"default"}get baseVersion(){for(const t of this.operations)if(null!==t.baseVersion)return t.baseVersion;return null}addOperation(t){return t.batch=this,this.operations.push(t),t}}class mc{constructor(t){this.baseVersion=t,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const t=Object.assign({},this);return t.__className=this.constructor.className,delete t.batch,delete t.isDocumentOperation,t}static get className(){return"Operation"}static fromJSON(t){return new this(t.baseVersion)}}class pc{constructor(t){this.markers=new Map,this._children=new Wa,t&&this._insertChild(0,t)}[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(t){return"documentFragment"===t||"model:documentFragment"===t}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}getPath(){return[]}getNodeByPath(t){let e=this;for(const n of t)e=e.getChild(e.offsetToIndex(n));return e}offsetToIndex(t){return this._children.offsetToIndex(t)}toJSON(){const t=[];for(const e of this._children)t.push(e.toJSON());return t}static fromJSON(t){const e=[];for(const n of t)n.name?e.push(Ua.fromJSON(n)):e.push(Ha.fromJSON(n));return new pc(e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const n=function(t){if("string"==typeof t)return[new Ha(t)];To(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new Ha(t):t instanceof qa?new Ha(t.data,t.getAttributes()):t))}(e);for(const t of n)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,n)}_removeChildren(t,e=1){const n=this._children._removeNodes(t,e);for(const t of n)t.parent=null;return n}}function fc(t,e){const n=(e=wc(e)).reduce(((t,e)=>t+e.offsetSize),0),o=t.parent;Ac(t);const i=t.index;return o._insertChild(i,e),Cc(o,i+e.length),Cc(o,i),new Ya(t,t.getShiftedBy(n))}function bc(t){if(!t.isFlat)throw new a("operation-utils-remove-range-not-flat",this);const e=t.start.parent;Ac(t.start),Ac(t.end);const n=e._removeChildren(t.start.index,t.end.index-t.start.index);return Cc(e,t.start.index),n}function kc(t,e){if(!t.isFlat)throw new a("operation-utils-move-range-not-flat",this);const n=bc(t);return fc(e=e._getTransformedByDeletion(t.start,t.end.offset-t.start.offset),n)}function wc(t){const e=[];t instanceof Array||(t=[t]);for(let n=0;n<t.length;n++)if("string"==typeof t[n])e.push(new Ha(t[n]));else if(t[n]instanceof qa)e.push(new Ha(t[n].data,t[n].getAttributes()));else if(t[n]instanceof pc||t[n]instanceof Wa)for(const o of t[n])e.push(o);else t[n]instanceof La&&e.push(t[n]);for(let t=1;t<e.length;t++){const n=e[t],o=e[t-1];n instanceof Ha&&o instanceof Ha&&_c(n,o)&&(e.splice(t-1,2,new Ha(o.data+n.data,o.getAttributes())),t--)}return e}function Cc(t,e){const n=t.getChild(e-1),o=t.getChild(e);if(n&&o&&n.is("$text")&&o.is("$text")&&_c(n,o)){const i=new Ha(n.data+o.data,n.getAttributes());t._removeChildren(e-1,2),t._insertChild(e-1,i)}}function Ac(t){const e=t.textNode,n=t.parent;if(e){const o=t.offset-e.startOffset,i=e.index;n._removeChildren(i,1);const r=new Ha(e.data.substr(0,o),e.getAttributes()),s=new Ha(e.data.substr(o),e.getAttributes());n._insertChild(i,[r,s])}}function _c(t,e){const n=t.getAttributes(),o=e.getAttributes();for(const t of n){if(t[1]!==e.getAttribute(t[0]))return!1;o.next()}return o.next().done}const vc=function(t,e){return Ws(t,e)};class yc extends mc{constructor(t,e,n,o,i){super(i),this.range=t.clone(),this.key=e,this.oldValue=void 0===n?null:n,this.newValue=void 0===o?null:o}get type(){return null===this.oldValue?"addAttribute":null===this.newValue?"removeAttribute":"changeAttribute"}clone(){return new yc(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new yc(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const t=super.toJSON();return t.range=this.range.toJSON(),t}_validate(){if(!this.range.isFlat)throw new a("attribute-operation-range-not-flat",this);for(const t of this.range.getItems({shallow:!0})){if(null!==this.oldValue&&!vc(t.getAttribute(this.key),this.oldValue))throw new a("attribute-operation-wrong-old-value",this,{item:t,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&t.hasAttribute(this.key))throw new a("attribute-operation-attribute-exists",this,{node:t,key:this.key})}}_execute(){vc(this.oldValue,this.newValue)||function(t,e,n){Ac(t.start),Ac(t.end);for(const o of t.getItems({shallow:!0})){const t=o.is("$textProxy")?o.textNode:o;null!==n?t._setAttribute(e,n):t._removeAttribute(e),Cc(t.parent,t.index)}Cc(t.end.parent,t.end.index)}(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(t,e){return new yc(Ya.fromJSON(t.range,e),t.key,t.oldValue,t.newValue,t.baseVersion)}}class xc extends mc{constructor(t,e){super(null),this.sourcePosition=t.clone(),this.howMany=e}get type(){return"detach"}toJSON(){const t=super.toJSON();return t.sourcePosition=this.sourcePosition.toJSON(),t}_validate(){if(this.sourcePosition.root.document)throw new a("detach-operation-on-document-node",this)}_execute(){bc(Ya._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class Ec extends mc{constructor(t,e,n,o){super(o),this.sourcePosition=t.clone(),this.sourcePosition.stickiness="toNext",this.howMany=e,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNone"}get type(){return"$graveyard"==this.targetPosition.root.rootName?"remove":"$graveyard"==this.sourcePosition.root.rootName?"reinsert":"move"}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const t=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new this.constructor(this.getMovedRangeStart(),this.howMany,t,this.baseVersion+1)}_validate(){const t=this.sourcePosition.parent,e=this.targetPosition.parent,n=this.sourcePosition.offset,o=this.targetPosition.offset;if(n+this.howMany>t.maxOffset)throw new a("move-operation-nodes-do-not-exist",this);if(t===e&&n<o&&o<n+this.howMany)throw new a("move-operation-range-into-itself",this);if(this.sourcePosition.root==this.targetPosition.root&&"prefix"==Mo(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())){const t=this.sourcePosition.path.length-1;if(this.targetPosition.path[t]>=n&&this.targetPosition.path[t]<n+this.howMany)throw new a("move-operation-node-into-itself",this)}}_execute(){kc(Ya._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const t=super.toJSON();return t.sourcePosition=this.sourcePosition.toJSON(),t.targetPosition=this.targetPosition.toJSON(),t}static get className(){return"MoveOperation"}static fromJSON(t,e){const n=Ga.fromJSON(t.sourcePosition,e),o=Ga.fromJSON(t.targetPosition,e);return new this(n,t.howMany,o,t.baseVersion)}}class Sc extends mc{constructor(t,e,n){super(n),this.position=t.clone(),this.position.stickiness="toNone",this.nodes=new Wa(wc(e)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}clone(){const t=new Wa([...this.nodes].map((t=>t._clone(!0)))),e=new Sc(this.position,t,this.baseVersion);return e.shouldReceiveAttributes=this.shouldReceiveAttributes,e}getReversed(){const t=this.position.root.document.graveyard,e=new Ga(t,[0]);return new Ec(this.position,this.nodes.maxOffset,e,this.baseVersion+1)}_validate(){const t=this.position.parent;if(!t||t.maxOffset<this.position.offset)throw new a("insert-operation-position-invalid",this)}_execute(){const t=this.nodes;this.nodes=new Wa([...t].map((t=>t._clone(!0)))),fc(this.position,t)}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t.nodes=this.nodes.toJSON(),t}static get className(){return"InsertOperation"}static fromJSON(t,e){const n=[];for(const e of t.nodes)e.name?n.push(Ua.fromJSON(e)):n.push(Ha.fromJSON(e));const o=new Sc(Ga.fromJSON(t.position,e),n,t.baseVersion);return o.shouldReceiveAttributes=t.shouldReceiveAttributes,o}}class Tc extends mc{constructor(t,e,n,o,i,r){super(r),this.name=t,this.oldRange=e?e.clone():null,this.newRange=n?n.clone():null,this.affectsData=i,this._markers=o}get type(){return"marker"}clone(){return new Tc(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new Tc(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){const t=this.newRange?"_set":"_remove";this._markers[t](this.name,this.newRange,!0,this.affectsData)}toJSON(){const t=super.toJSON();return this.oldRange&&(t.oldRange=this.oldRange.toJSON()),this.newRange&&(t.newRange=this.newRange.toJSON()),delete t._markers,t}static get className(){return"MarkerOperation"}static fromJSON(t,e){return new Tc(t.name,t.oldRange?Ya.fromJSON(t.oldRange,e):null,t.newRange?Ya.fromJSON(t.newRange,e):null,e.model.markers,t.affectsData,t.baseVersion)}}class Bc extends mc{constructor(t,e,n,o){super(o),this.position=t,this.position.stickiness="toNext",this.oldName=e,this.newName=n}get type(){return"rename"}clone(){return new Bc(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new Bc(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const t=this.position.nodeAfter;if(!(t instanceof Ua))throw new a("rename-operation-wrong-position",this);if(t.name!==this.oldName)throw new a("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t}static get className(){return"RenameOperation"}static fromJSON(t,e){return new Bc(Ga.fromJSON(t.position,e),t.oldName,t.newName,t.baseVersion)}}class Dc extends mc{constructor(t,e,n,o,i){super(i),this.root=t,this.key=e,this.oldValue=n,this.newValue=o}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new Dc(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Dc(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new a("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new a("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new a("rootattribute-operation-attribute-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 t=super.toJSON();return t.root=this.root.toJSON(),t}static get className(){return"RootAttributeOperation"}static fromJSON(t,e){if(!e.getRoot(t.root))throw new a("rootattribute-operation-fromjson-no-root",this,{rootName:t.root});return new Dc(e.getRoot(t.root),t.key,t.oldValue,t.newValue,t.baseVersion)}}class Ic extends mc{constructor(t,e,n,o,i){super(i),this.sourcePosition=t.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=e,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=o.clone()}get type(){return"merge"}get deletionPosition(){return new Ga(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const t=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Ya(this.sourcePosition,t)}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.targetPosition._getTransformedByMergeOperation(this),e=this.sourcePosition.path.slice(0,-1),n=new Ga(this.sourcePosition.root,e)._getTransformedByMergeOperation(this);return new Pc(t,this.howMany,n,this.graveyardPosition,this.baseVersion+1)}_validate(){const t=this.sourcePosition.parent,e=this.targetPosition.parent;if(!t.parent)throw new a("merge-operation-source-position-invalid",this);if(!e.parent)throw new a("merge-operation-target-position-invalid",this);if(this.howMany!=t.maxOffset)throw new a("merge-operation-how-many-invalid",this)}_execute(){const t=this.sourcePosition.parent;kc(Ya._createIn(t),this.targetPosition),kc(Ya._createOn(t),this.graveyardPosition)}toJSON(){const t=super.toJSON();return t.sourcePosition=t.sourcePosition.toJSON(),t.targetPosition=t.targetPosition.toJSON(),t.graveyardPosition=t.graveyardPosition.toJSON(),t}static get className(){return"MergeOperation"}static fromJSON(t,e){const n=Ga.fromJSON(t.sourcePosition,e),o=Ga.fromJSON(t.targetPosition,e),i=Ga.fromJSON(t.graveyardPosition,e);return new this(n,t.howMany,o,i,t.baseVersion)}}class Pc extends mc{constructor(t,e,n,o,i){super(i),this.splitPosition=t.clone(),this.splitPosition.stickiness="toNext",this.howMany=e,this.insertionPosition=n,this.graveyardPosition=o?o.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const t=this.insertionPosition.path.slice();return t.push(0),new Ga(this.insertionPosition.root,t)}get movedRange(){const t=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Ya(this.splitPosition,t)}clone(){return new this.constructor(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.splitPosition.root.document.graveyard,e=new Ga(t,[0]);return new Ic(this.moveTargetPosition,this.howMany,this.splitPosition,e,this.baseVersion+1)}_validate(){const t=this.splitPosition.parent,e=this.splitPosition.offset;if(!t||t.maxOffset<e)throw new a("split-operation-position-invalid",this);if(!t.parent)throw new a("split-operation-split-in-root",this);if(this.howMany!=t.maxOffset-this.splitPosition.offset)throw new a("split-operation-how-many-invalid",this);if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter)throw new a("split-operation-graveyard-position-invalid",this)}_execute(){const t=this.splitPosition.parent;if(this.graveyardPosition)kc(Ya._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition);else{const e=t._clone();fc(this.insertionPosition,e)}kc(new Ya(Ga._createAt(t,this.splitPosition.offset),Ga._createAt(t,t.maxOffset)),this.moveTargetPosition)}toJSON(){const t=super.toJSON();return t.splitPosition=this.splitPosition.toJSON(),t.insertionPosition=this.insertionPosition.toJSON(),this.graveyardPosition&&(t.graveyardPosition=this.graveyardPosition.toJSON()),t}static get className(){return"SplitOperation"}static getInsertionPosition(t){const e=t.path.slice(0,-1);return e[e.length-1]++,new Ga(t.root,e,"toPrevious")}static fromJSON(t,e){const n=Ga.fromJSON(t.splitPosition,e),o=Ga.fromJSON(t.insertionPosition,e),i=t.graveyardPosition?Ga.fromJSON(t.graveyardPosition,e):null;return new this(n,t.howMany,o,i,t.baseVersion)}}class zc extends Ua{constructor(t,e,n="main"){super(e),this._document=t,this.rootName=n}get document(){return this._document}is(t,e){return e?e===this.name&&("rootElement"===t||"model:rootElement"===t||"element"===t||"model:element"===t):"rootElement"===t||"model:rootElement"===t||"element"===t||"model:element"===t||"node"===t||"model:node"===t}toJSON(){return this.rootName}}class Rc{constructor(t,e){this.model=t,this.batch=e}createText(t,e){return new Ha(t,e)}createElement(t,e){return new Ua(t,e)}createDocumentFragment(){return new pc}cloneElement(t,e=!0){return t._clone(e)}insert(t,e,n=0){if(this._assertWriterUsedCorrectly(),t instanceof Ha&&""==t.data)return;const o=Ga._createAt(e,n);if(t.parent){if(Oc(t.root,o.root))return void this.move(Ya._createOn(t),o);if(t.root.document)throw new a("model-writer-insert-forbidden-move",this);this.remove(t)}const i=o.root.document?o.root.document.version:null,r=new Sc(o,t,i);if(t instanceof Ha&&(r.shouldReceiveAttributes=!0),this.batch.addOperation(r),this.model.applyOperation(r),t instanceof pc)for(const[e,n]of t.markers){const t=Ga._createAt(n.root,0),i={range:new Ya(n.start._getCombined(t,o),n.end._getCombined(t,o)),usingOperation:!0,affectsData:!0};this.model.markers.has(e)?this.updateMarker(e,i):this.addMarker(e,i)}}insertText(t,e,n,o){e instanceof pc||e instanceof Ua||e instanceof Ga?this.insert(this.createText(t),e,n):this.insert(this.createText(t,e),n,o)}insertElement(t,e,n,o){e instanceof pc||e instanceof Ua||e instanceof Ga?this.insert(this.createElement(t),e,n):this.insert(this.createElement(t,e),n,o)}append(t,e){this.insert(t,e,"end")}appendText(t,e,n){e instanceof pc||e instanceof Ua?this.insert(this.createText(t),e,"end"):this.insert(this.createText(t,e),n,"end")}appendElement(t,e,n){e instanceof pc||e instanceof Ua?this.insert(this.createElement(t),e,"end"):this.insert(this.createElement(t,e),n,"end")}setAttribute(t,e,n){if(this._assertWriterUsedCorrectly(),n instanceof Ya){const o=n.getMinimalFlatRanges();for(const n of o)Vc(this,t,e,n)}else Fc(this,t,e,n)}setAttributes(t,e){for(const[n,o]of Wo(t))this.setAttribute(n,o,e)}removeAttribute(t,e){if(this._assertWriterUsedCorrectly(),e instanceof Ya){const n=e.getMinimalFlatRanges();for(const e of n)Vc(this,t,null,e)}else Fc(this,t,null,e)}clearAttributes(t){this._assertWriterUsedCorrectly();const e=t=>{for(const e of t.getAttributeKeys())this.removeAttribute(e,t)};if(t instanceof Ya)for(const n of t.getItems())e(n);else e(t)}move(t,e,n){if(this._assertWriterUsedCorrectly(),!(t instanceof Ya))throw new a("writer-move-invalid-range",this);if(!t.isFlat)throw new a("writer-move-range-not-flat",this);const o=Ga._createAt(e,n);if(o.isEqual(t.start))return;if(this._addOperationForAffectedMarkers("move",t),!Oc(t.root,o.root))throw new a("writer-move-different-document",this);const i=t.root.document?t.root.document.version:null,r=new Ec(t.start,t.end.offset-t.start.offset,o,i);this.batch.addOperation(r),this.model.applyOperation(r)}remove(t){this._assertWriterUsedCorrectly();const e=(t instanceof Ya?t:Ya._createOn(t)).getMinimalFlatRanges().reverse();for(const t of e)this._addOperationForAffectedMarkers("move",t),Mc(t.start,t.end.offset-t.start.offset,this.batch,this.model)}merge(t){this._assertWriterUsedCorrectly();const e=t.nodeBefore,n=t.nodeAfter;if(this._addOperationForAffectedMarkers("merge",t),!(e instanceof Ua))throw new a("writer-merge-no-element-before",this);if(!(n instanceof Ua))throw new a("writer-merge-no-element-after",this);t.root.document?this._merge(t):this._mergeDetached(t)}createPositionFromPath(t,e,n){return this.model.createPositionFromPath(t,e,n)}createPositionAt(t,e){return this.model.createPositionAt(t,e)}createPositionAfter(t){return this.model.createPositionAfter(t)}createPositionBefore(t){return this.model.createPositionBefore(t)}createRange(t,e){return this.model.createRange(t,e)}createRangeIn(t){return this.model.createRangeIn(t)}createRangeOn(t){return this.model.createRangeOn(t)}createSelection(t,e,n){return this.model.createSelection(t,e,n)}_mergeDetached(t){const e=t.nodeBefore,n=t.nodeAfter;this.move(Ya._createIn(n),Ga._createAt(e,"end")),this.remove(n)}_merge(t){const e=Ga._createAt(t.nodeBefore,"end"),n=Ga._createAt(t.nodeAfter,0),o=t.root.document.graveyard,i=new Ga(o,[0]),r=t.root.document.version,s=new Ic(n,t.nodeAfter.maxOffset,e,i,r);this.batch.addOperation(s),this.model.applyOperation(s)}rename(t,e){if(this._assertWriterUsedCorrectly(),!(t instanceof Ua))throw new a("writer-rename-not-element-instance",this);const n=t.root.document?t.root.document.version:null,o=new Bc(Ga._createBefore(t),t.name,e,n);this.batch.addOperation(o),this.model.applyOperation(o)}split(t,e){this._assertWriterUsedCorrectly();let n,o,i=t.parent;if(!i.parent)throw new a("writer-split-element-no-parent",this);if(e||(e=i.parent),!t.parent.getAncestors({includeSelf:!0}).includes(e))throw new a("writer-split-invalid-limit-element",this);do{const e=i.root.document?i.root.document.version:null,r=i.maxOffset-t.offset,s=Pc.getInsertionPosition(t),a=new Pc(t,r,s,null,e);this.batch.addOperation(a),this.model.applyOperation(a),n||o||(n=i,o=t.parent.nextSibling),i=(t=this.createPositionAfter(t.parent)).parent}while(i!==e);return{position:t,range:new Ya(Ga._createAt(n,"end"),Ga._createAt(o,0))}}wrap(t,e){if(this._assertWriterUsedCorrectly(),!t.isFlat)throw new a("writer-wrap-range-not-flat",this);const n=e instanceof Ua?e:new Ua(e);if(n.childCount>0)throw new a("writer-wrap-element-not-empty",this);if(null!==n.parent)throw new a("writer-wrap-element-attached",this);this.insert(n,t.start);const o=new Ya(t.start.getShiftedBy(1),t.end.getShiftedBy(1));this.move(o,Ga._createAt(n,0))}unwrap(t){if(this._assertWriterUsedCorrectly(),null===t.parent)throw new a("writer-unwrap-element-no-parent",this);this.move(Ya._createIn(t),this.createPositionAfter(t)),this.remove(t)}addMarker(t,e){if(this._assertWriterUsedCorrectly(),!e||"boolean"!=typeof e.usingOperation)throw new a("writer-addmarker-no-usingoperation",this);const n=e.usingOperation,o=e.range,i=void 0!==e.affectsData&&e.affectsData;if(this.model.markers.has(t))throw new a("writer-addmarker-marker-exists",this);if(!o)throw new a("writer-addmarker-no-range",this);return n?(Nc(this,t,null,o,i),this.model.markers.get(t)):this.model.markers._set(t,o,n,i)}updateMarker(t,e){this._assertWriterUsedCorrectly();const n="string"==typeof t?t:t.name,o=this.model.markers.get(n);if(!o)throw new a("writer-updatemarker-marker-not-exists",this);if(!e)return l("writer-updatemarker-reconvert-using-editingcontroller",{markerName:n}),void this.model.markers._refresh(o);const i="boolean"==typeof e.usingOperation,r="boolean"==typeof e.affectsData,s=r?e.affectsData:o.affectsData;if(!i&&!e.range&&!r)throw new a("writer-updatemarker-wrong-options",this);const c=o.getRange(),d=e.range?e.range:c;i&&e.usingOperation!==o.managedUsingOperations?e.usingOperation?Nc(this,n,null,d,s):(Nc(this,n,c,null,s),this.model.markers._set(n,d,void 0,s)):o.managedUsingOperations?Nc(this,n,c,d,s):this.model.markers._set(n,d,void 0,s)}removeMarker(t){this._assertWriterUsedCorrectly();const e="string"==typeof t?t:t.name;if(!this.model.markers.has(e))throw new a("writer-removemarker-no-marker",this);const n=this.model.markers.get(e);if(!n.managedUsingOperations)return void this.model.markers._remove(e);Nc(this,e,n.getRange(),null,n.affectsData)}setSelection(t,e,n){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(t,e,n)}setSelectionFocus(t,e){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(t,e)}setSelectionAttribute(t,e){if(this._assertWriterUsedCorrectly(),"string"==typeof t)this._setSelectionAttribute(t,e);else for(const[e,n]of Wo(t))this._setSelectionAttribute(e,n)}removeSelectionAttribute(t){if(this._assertWriterUsedCorrectly(),"string"==typeof t)this._removeSelectionAttribute(t);else for(const e of t)this._removeSelectionAttribute(e)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(t){this.model.document.selection._restoreGravity(t)}_setSelectionAttribute(t,e){const n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){const o=gl._getStoreAttributeKey(t);this.setAttribute(o,e,n.anchor.parent)}n._setAttribute(t,e)}_removeSelectionAttribute(t){const e=this.model.document.selection;if(e.isCollapsed&&e.anchor.parent.isEmpty){const n=gl._getStoreAttributeKey(t);this.removeAttribute(n,e.anchor.parent)}e._removeAttribute(t)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new a("writer-incorrect-use",this)}_addOperationForAffectedMarkers(t,e){for(const n of this.model.markers){if(!n.managedUsingOperations)continue;const o=n.getRange();let i=!1;if("move"===t)i=e.containsPosition(o.start)||e.start.isEqual(o.start)||e.containsPosition(o.end)||e.end.isEqual(o.end);else{const t=e.nodeBefore,n=e.nodeAfter,r=o.start.parent==t&&o.start.isAtEnd,s=o.end.parent==n&&0==o.end.offset,a=o.end.nodeAfter==n,l=o.start.nodeAfter==n;i=r||s||a||l}i&&this.updateMarker(n.name,{range:o})}}}function Vc(t,e,n,o){const i=t.model,r=i.document;let s,a,l,c=o.start;for(const t of o.getWalker({shallow:!0}))l=t.item.getAttribute(e),s&&a!=l&&(a!=n&&d(),c=s),s=t.nextPosition,a=l;function d(){const o=new Ya(c,s),l=o.root.document?r.version:null,d=new yc(o,e,a,n,l);t.batch.addOperation(d),i.applyOperation(d)}s instanceof Ga&&s!=c&&a!=n&&d()}function Fc(t,e,n,o){const i=t.model,r=i.document,s=o.getAttribute(e);let a,l;if(s!=n){if(o.root===o){const t=o.document?r.version:null;l=new Dc(o,e,s,n,t)}else{a=new Ya(Ga._createBefore(o),t.createPositionAfter(o));const i=a.root.document?r.version:null;l=new yc(a,e,s,n,i)}t.batch.addOperation(l),i.applyOperation(l)}}function Nc(t,e,n,o,i){const r=t.model,s=r.document,a=new Tc(e,n,o,r.markers,i,s.version);t.batch.addOperation(a),r.applyOperation(a)}function Mc(t,e,n,o){let i;if(t.root.document){const n=o.document,r=new Ga(n.graveyard,[0]);i=new Ec(t,e,r,n.version)}else i=new xc(t,e);n.addOperation(i),o.applyOperation(i)}function Oc(t,e){return t===e||t instanceof zc&&e instanceof zc}class Lc{constructor(t){this._markerCollection=t,this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}bufferOperation(t){switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),n=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),n||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=Ya._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}break}case"split":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const n=t.graveyardPosition.parent;this._markInsert(n,t.graveyardPosition.offset,1);const o=t.targetPosition.parent;this._isInInsertedElement(o)||this._markInsert(o,t.targetPosition.offset,e.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(t,e,n){const o=this._changedMarkers.get(t);o?(o.newMarkerData=n,null==o.oldMarkerData.range&&null==n.range&&this._changedMarkers.delete(t)):this._changedMarkers.set(t,{newMarkerData:n,oldMarkerData:e})}getMarkersToRemove(){const t=[];for(const[e,n]of this._changedMarkers)null!=n.oldMarkerData.range&&t.push({name:e,range:n.oldMarkerData.range});return t}getMarkersToAdd(){const t=[];for(const[e,n]of this._changedMarkers)null!=n.newMarkerData.range&&t.push({name:e,range:n.newMarkerData.range});return t}getChangedMarkers(){return Array.from(this._changedMarkers).map((([t,e])=>({name:t,data:{oldRange:e.oldMarkerData.range,newRange:e.newMarkerData.range}})))}hasDataChanges(){for(const{newMarkerData:t,oldMarkerData:e}of this._changedMarkers.values()){if(t.affectsData!==e.affectsData)return!0;if(t.affectsData)return!(t.range&&e.range&&t.range.isEqual(e.range))}return this._changesInElement.size>0}getChanges(t={includeChangesInGraveyard:!1}){if(this._cachedChanges)return t.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let e=[];for(const t of this._changesInElement.keys()){const n=this._changesInElement.get(t).sort(((t,e)=>t.offset===e.offset?t.type!=e.type?"remove"==t.type?-1:1:0:t.offset<e.offset?-1:1)),o=this._elementSnapshots.get(t),i=Hc(t.getChildren()),r=qc(o.length,n);let s=0,a=0;for(const n of r)if("i"===n)e.push(this._getInsertDiff(t,s,i[s].name)),s++;else if("r"===n)e.push(this._getRemoveDiff(t,s,o[a].name)),a++;else if("a"===n){const n=i[s].attributes,r=o[a].attributes;let l;if("$text"==i[s].name)l=new Ya(Ga._createAt(t,s),Ga._createAt(t,s+1));else{const e=t.offsetToIndex(s);l=new Ya(Ga._createAt(t,s),Ga._createAt(t.getChild(e),0))}e.push(...this._getAttributesDiff(l,r,n)),s++,a++}else s++,a++}e.sort(((t,e)=>t.position.root!=e.position.root?t.position.root.rootName<e.position.root.rootName?-1:1:t.position.isEqual(e.position)?t.changeCount-e.changeCount:t.position.isBefore(e.position)?-1:1));for(let t=1,n=0;t<e.length;t++){const o=e[n],i=e[t],r="remove"==o.type&&"remove"==i.type&&"$text"==o.name&&"$text"==i.name&&o.position.isEqual(i.position),s="insert"==o.type&&"insert"==i.type&&"$text"==o.name&&"$text"==i.name&&o.position.parent==i.position.parent&&o.position.offset+o.length==i.position.offset,a="attribute"==o.type&&"attribute"==i.type&&o.position.parent==i.position.parent&&o.range.isFlat&&i.range.isFlat&&o.position.offset+o.length==i.position.offset&&o.attributeKey==i.attributeKey&&o.attributeOldValue==i.attributeOldValue&&o.attributeNewValue==i.attributeNewValue;r||s||a?(o.length++,a&&(o.range.end=o.range.end.getShiftedBy(1)),e[t]=null):n=t}e=e.filter((t=>t));for(const t of e)delete t.changeCount,"attribute"==t.type&&(delete t.position,delete t.length);return this._changeCount=0,this._cachedChangesWithGraveyard=e,this._cachedChanges=e.filter(Wc),t.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_refreshItem(t){if(this._isInInsertedElement(t.parent))return;this._markRemove(t.parent,t.startOffset,t.offsetSize),this._markInsert(t.parent,t.startOffset,t.offsetSize),this._refreshedItems.add(t);const e=Ya._createOn(t);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}this._cachedChanges=null}_markInsert(t,e,n){const o={type:"insert",offset:e,howMany:n,count:this._changeCount++};this._markChange(t,o)}_markRemove(t,e,n){const o={type:"remove",offset:e,howMany:n,count:this._changeCount++};this._markChange(t,o),this._removeAllNestedChanges(t,e,n)}_markAttribute(t){const e={type:"attribute",offset:t.startOffset,howMany:t.offsetSize,count:this._changeCount++};this._markChange(t.parent,e)}_markChange(t,e){this._makeSnapshot(t);const n=this._getChangesForElement(t);this._handleChange(e,n),n.push(e);for(let t=0;t<n.length;t++)n[t].howMany<1&&(n.splice(t,1),t--)}_getChangesForElement(t){let e;return this._changesInElement.has(t)?e=this._changesInElement.get(t):(e=[],this._changesInElement.set(t,e)),e}_makeSnapshot(t){this._elementSnapshots.has(t)||this._elementSnapshots.set(t,Hc(t.getChildren()))}_handleChange(t,e){t.nodesToHandle=t.howMany;for(const n of e){const o=t.offset+t.howMany,i=n.offset+n.howMany;if("insert"==t.type&&("insert"==n.type&&(t.offset<=n.offset?n.offset+=t.howMany:t.offset<i&&(n.howMany+=t.nodesToHandle,t.nodesToHandle=0)),"remove"==n.type&&t.offset<n.offset&&(n.offset+=t.howMany),"attribute"==n.type))if(t.offset<=n.offset)n.offset+=t.howMany;else if(t.offset<i){const i=n.howMany;n.howMany=t.offset-n.offset,e.unshift({type:"attribute",offset:o,howMany:i-n.howMany,count:this._changeCount++})}if("remove"==t.type){if("insert"==n.type)if(o<=n.offset)n.offset-=t.howMany;else if(o<=i)if(t.offset<n.offset){const e=o-n.offset;n.offset=t.offset,n.howMany-=e,t.nodesToHandle-=e}else n.howMany-=t.nodesToHandle,t.nodesToHandle=0;else if(t.offset<=n.offset)t.nodesToHandle-=n.howMany,n.howMany=0;else if(t.offset<i){const e=i-t.offset;n.howMany-=e,t.nodesToHandle-=e}if("remove"==n.type&&(o<=n.offset?n.offset-=t.howMany:t.offset<n.offset&&(t.nodesToHandle+=n.howMany,n.howMany=0)),"attribute"==n.type)if(o<=n.offset)n.offset-=t.howMany;else if(t.offset<n.offset){const e=o-n.offset;n.offset=t.offset,n.howMany-=e}else if(t.offset<i)if(o<=i){const o=n.howMany;n.howMany=t.offset-n.offset;const i=o-n.howMany-t.nodesToHandle;e.unshift({type:"attribute",offset:t.offset,howMany:i,count:this._changeCount++})}else n.howMany-=i-t.offset}if("attribute"==t.type){if("insert"==n.type)if(t.offset<n.offset&&o>n.offset){if(o>i){const t={type:"attribute",offset:i,howMany:o-i,count:this._changeCount++};this._handleChange(t,e),e.push(t)}t.nodesToHandle=n.offset-t.offset,t.howMany=t.nodesToHandle}else t.offset>=n.offset&&t.offset<i&&(o>i?(t.nodesToHandle=o-i,t.offset=i):t.nodesToHandle=0);if("remove"==n.type&&t.offset<n.offset&&o>n.offset){const i={type:"attribute",offset:n.offset,howMany:o-n.offset,count:this._changeCount++};this._handleChange(i,e),e.push(i),t.nodesToHandle=n.offset-t.offset,t.howMany=t.nodesToHandle}"attribute"==n.type&&(t.offset>=n.offset&&o<=i?(t.nodesToHandle=0,t.howMany=0,t.offset=0):t.offset<=n.offset&&o>=i&&(n.howMany=0))}}t.howMany=t.nodesToHandle,delete t.nodesToHandle}_getInsertDiff(t,e,n){return{type:"insert",position:Ga._createAt(t,e),name:n,length:1,changeCount:this._changeCount++}}_getRemoveDiff(t,e,n){return{type:"remove",position:Ga._createAt(t,e),name:n,length:1,changeCount:this._changeCount++}}_getAttributesDiff(t,e,n){const o=[];n=new Map(n);for(const[i,r]of e){const e=n.has(i)?n.get(i):null;e!==r&&o.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:i,attributeOldValue:r,attributeNewValue:e,changeCount:this._changeCount++}),n.delete(i)}for(const[e,i]of n)o.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:e,attributeOldValue:null,attributeNewValue:i,changeCount:this._changeCount++});return o}_isInInsertedElement(t){const e=t.parent;if(!e)return!1;const n=this._changesInElement.get(e),o=t.startOffset;if(n)for(const t of n)if("insert"==t.type&&o>=t.offset&&o<t.offset+t.howMany)return!0;return this._isInInsertedElement(e)}_removeAllNestedChanges(t,e,n){const o=new Ya(Ga._createAt(t,e),Ga._createAt(t,e+n));for(const t of o.getItems({shallow:!0}))t.is("element")&&(this._elementSnapshots.delete(t),this._changesInElement.delete(t),this._removeAllNestedChanges(t,0,t.maxOffset))}}function Hc(t){const e=[];for(const n of t)if(n.is("$text"))for(let t=0;t<n.data.length;t++)e.push({name:"$text",attributes:new Map(n.getAttributes())});else e.push({name:n.name,attributes:new Map(n.getAttributes())});return e}function qc(t,e){const n=[];let o=0,i=0;for(const t of e){if(t.offset>o){for(let e=0;e<t.offset-o;e++)n.push("e");i+=t.offset-o}if("insert"==t.type){for(let e=0;e<t.howMany;e++)n.push("i");o=t.offset+t.howMany}else if("remove"==t.type){for(let e=0;e<t.howMany;e++)n.push("r");o=t.offset,i+=t.howMany}else n.push(..."a".repeat(t.howMany).split("")),o=t.offset+t.howMany,i+=t.howMany}if(i<t)for(let e=0;e<t-i-o;e++)n.push("e");return n}function Wc(t){const e=t.position&&"$graveyard"==t.position.root.rootName,n=t.range&&"$graveyard"==t.range.root.rootName;return!e&&!n}class Uc{constructor(){this._operations=[],this._undoPairs=new Map,this._undoneOperations=new Set}addOperation(t){this._operations.includes(t)||this._operations.push(t)}getOperations(t=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY){const n=[];for(const o of this._operations)o.baseVersion>=t&&o.baseVersion<e&&n.push(o);return n}getOperation(t){for(const e of this._operations)if(e.baseVersion==t)return e}setOperationAsUndone(t,e){this._undoPairs.set(e,t),this._undoneOperations.add(t)}isUndoingOperation(t){return this._undoPairs.has(t)}isUndoneOperation(t){return this._undoneOperations.has(t)}getUndoneOperation(t){return this._undoPairs.get(t)}}function jc(t,e){return!!(n=t.charAt(e-1))&&1==n.length&&/[\ud800-\udbff]/.test(n)&&function(t){return!!t&&1==t.length&&/[\udc00-\udfff]/.test(t)}(t.charAt(e));var n}function $c(t,e){return!!(n=t.charAt(e))&&1==n.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(n);var n}const Gc=function(){const t=/\p{Regional_Indicator}{2}/u.source,e="(?:"+[/\p{Emoji}[\u{E0020}-\u{E007E}]+\u{E007F}/u,/\p{Emoji}\u{FE0F}?\u{20E3}/u,/\p{Emoji}\u{FE0F}/u,/(?=\p{General_Category=Other_Symbol})\p{Emoji}\p{Emoji_Modifier}*/u].map((t=>t.source)).join("|")+")";return new RegExp(`${t}|${e}(?:‍${e})*`,"ug")}();function Kc(t,e){const n=String(t).matchAll(Gc);return Array.from(n).some((t=>t.index<e&&e<t.index+t[0].length))}const Zc="$graveyard";class Jc{constructor(t){this.model=t,this.version=0,this.history=new Uc(this),this.selection=new gl(this),this.roots=new Bo({idProperty:"rootName"}),this.differ=new Lc(t.markers),this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",Zc),this.listenTo(t,"applyOperation",((t,e)=>{const n=e[0];if(n.isDocumentOperation&&n.baseVersion!==this.version)throw new a("model-document-applyoperation-wrong-version",this,{operation:n})}),{priority:"highest"}),this.listenTo(t,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&this.differ.bufferOperation(n)}),{priority:"high"}),this.listenTo(t,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&(this.version++,this.history.addOperation(n))}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(t.markers,"update",((t,e,n,o,i)=>{const r={...e.getData(),range:o};this.differ.bufferMarkerChange(e.name,i,r),null===n&&e.on("change",((t,n)=>{const o=e.getData();this.differ.bufferMarkerChange(e.name,{...o,range:n},o)}))}))}get graveyard(){return this.getRoot(Zc)}createRoot(t="$root",e="main"){if(this.roots.get(e))throw new a("model-document-createroot-name-exists",this,{name:e});const n=new zc(this,t,e);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(t="main"){return this.roots.get(t)}getRootNames(){return Array.from(this.roots,(t=>t.rootName)).filter((t=>t!=Zc))}registerPostFixer(t){this._postFixers.add(t)}toJSON(){const t=Oo(this);return t.selection="[engine.model.DocumentSelection]",t.model="[engine.model.Model]",t}_handleChangeBlock(t){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(t),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",t.batch):this.fire("change",t.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const t of this.roots)if(t!==this.graveyard)return t;return this.graveyard}_getDefaultRange(){const t=this._getDefaultRoot(),e=this.model,n=e.schema,o=e.createPositionFromPath(t,[0]);return n.getNearestSelectionRange(o)||e.createRange(o)}_validateSelectionRange(t){return Yc(t.start)&&Yc(t.end)}_callPostFixers(t){let e=!1;do{for(const n of this._postFixers)if(this.selection.refresh(),e=n(t),e)break}while(e)}}function Yc(t){const e=t.textNode;if(e){const n=e.data,o=t.offset-e.startOffset;return!jc(n,o)&&!$c(n,o)}return!0}ue(Jc,f);class Qc{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(t){const e=t instanceof Xc?t.name:t;return this._markers.has(e)}get(t){return this._markers.get(t)||null}_set(t,e,n=!1,o=!1){const i=t instanceof Xc?t.name:t;if(i.includes(","))throw new a("markercollection-incorrect-marker-name",this);const r=this._markers.get(i);if(r){const t=r.getData(),s=r.getRange();let a=!1;return s.isEqual(e)||(r._attachLiveRange(cl.fromRange(e)),a=!0),n!=r.managedUsingOperations&&(r._managedUsingOperations=n,a=!0),"boolean"==typeof o&&o!=r.affectsData&&(r._affectsData=o,a=!0),a&&this.fire("update:"+i,r,s,e,t),r}const s=cl.fromRange(e),l=new Xc(i,s,n,o);return this._markers.set(i,l),this.fire("update:"+i,l,null,e,{...l.getData(),range:null}),l}_remove(t){const e=t instanceof Xc?t.name:t,n=this._markers.get(e);return!!n&&(this._markers.delete(e),this.fire("update:"+e,n,n.getRange(),null,n.getData()),this._destroyMarker(n),!0)}_refresh(t){const e=t instanceof Xc?t.name:t,n=this._markers.get(e);if(!n)throw new a("markercollection-refresh-marker-not-exists",this);const o=n.getRange();this.fire("update:"+e,n,o,o,n.getData())}*getMarkersAtPosition(t){for(const e of this)e.getRange().containsPosition(t)&&(yield e)}*getMarkersIntersectingRange(t){for(const e of this)null!==e.getRange().getIntersection(t)&&(yield e)}destroy(){for(const t of this._markers.values())this._destroyMarker(t);this._markers=null,this.stopListening()}*getMarkersGroup(t){for(const e of this._markers.values())e.name.startsWith(t+":")&&(yield e)}_destroyMarker(t){t.stopListening(),t._detachLiveRange()}}ue(Qc,f);class Xc{constructor(t,e,n,o){this.name=t,this._liveRange=this._attachLiveRange(e),this._managedUsingOperations=n,this._affectsData=o}get managedUsingOperations(){if(!this._liveRange)throw new a("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new a("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new a("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new a("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new a("marker-destroyed",this);return this._liveRange.toRange()}is(t){return"marker"===t||"model:marker"===t}_attachLiveRange(t){return this._liveRange&&this._detachLiveRange(),t.delegate("change:range").to(this),t.delegate("change:content").to(this),this._liveRange=t,t}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}ue(Xc,f);class td extends mc{get type(){return"noop"}clone(){return new td(this.baseVersion)}getReversed(){return new td(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}const ed={};ed[yc.className]=yc,ed[Sc.className]=Sc,ed[Tc.className]=Tc,ed[Ec.className]=Ec,ed[td.className]=td,ed[mc.className]=mc,ed[Bc.className]=Bc,ed[Dc.className]=Dc,ed[Pc.className]=Pc,ed[Ic.className]=Ic;class nd extends Ga{constructor(t,e,n="toNone"){if(super(t,e,n),!this.root.is("rootElement"))throw new a("model-liveposition-root-not-rootelement",t);od.call(this)}detach(){this.stopListening()}is(t){return"livePosition"===t||"model:livePosition"===t||"position"==t||"model:position"===t}toPosition(){return new Ga(this.root,this.path.slice(),this.stickiness)}static fromPosition(t,e){return new this(t.root,t.path.slice(),e||t.stickiness)}}function od(){this.listenTo(this.root.document.model,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&id.call(this,n)}),{priority:"low"})}function id(t){const e=this.getTransformedByOperation(t);if(!this.isEqual(e)){const t=this.toPosition();this.path=e.path,this.root=e.root,this.fire("change",t)}}ue(nd,f);class rd{constructor(t,e,n){this.model=t,this.writer=e,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=t.schema,this._documentFragment=e.createDocumentFragment(),this._documentFragmentPosition=e.createPositionAt(this._documentFragment,0),this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}handleNodes(t){for(const e of Array.from(t))this._handleNode(e);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(t){const e=this.writer.createPositionAfter(this._lastNode),n=this.writer.createPositionAfter(t);if(n.isAfter(e)){if(this._lastNode=t,this.position.parent!=t||!this.position.isAtEnd)throw new a("insertcontent-invalid-insertion-position",this);this.position=n,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this.nodeToSelect?Ya._createOn(this.nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new Ya(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(t){if(this.schema.isObject(t))return void this._handleObject(t);let e=this._checkAndAutoParagraphToAllowedPosition(t);e||(e=this._checkAndSplitToAllowedPosition(t),e)?(this._appendToFragment(t),this._firstNode||(this._firstNode=t),this._lastNode=t):this._handleDisallowedNode(t)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const t=nd.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=t.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=t.toPosition(),t.detach()}_handleObject(t){this._checkAndSplitToAllowedPosition(t)?this._appendToFragment(t):this._tryAutoparagraphing(t)}_handleDisallowedNode(t){t.is("element")?this.handleNodes(t.getChildren()):this._tryAutoparagraphing(t)}_appendToFragment(t){if(!this.schema.checkChild(this.position,t))throw new a("insertcontent-wrong-position",this,{node:t,position:this.position});this.writer.insert(t,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(t.offsetSize),this.schema.isObject(t)&&!this.schema.checkChild(this.position,"$text")?this.nodeToSelect=t:this.nodeToSelect=null,this._filterAttributesOf.push(t)}_setAffectedBoundaries(t){this._affectedStart||(this._affectedStart=nd.fromPosition(t,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(t)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=nd.fromPosition(t,"toNext"))}_mergeOnLeft(){const t=this._firstNode;if(!(t instanceof Ua))return;if(!this._canMergeLeft(t))return;const e=nd._createBefore(t);e.stickiness="toNext";const n=nd.fromPosition(this.position,"toNext");this._affectedStart.isEqual(e)&&(this._affectedStart.detach(),this._affectedStart=nd._createAt(e.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=e.nodeBefore,this._lastNode=e.nodeBefore),this.writer.merge(e),e.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=nd._createAt(e.nodeBefore,"end","toNext")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),e.detach()}_mergeOnRight(){const t=this._lastNode;if(!(t instanceof Ua))return;if(!this._canMergeRight(t))return;const e=nd._createAfter(t);if(e.stickiness="toNext",!this.position.isEqual(e))throw new a("insertcontent-invalid-insertion-position",this);this.position=Ga._createAt(e.nodeBefore,"end");const n=nd.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(e)&&(this._affectedEnd.detach(),this._affectedEnd=nd._createAt(e.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=e.nodeBefore,this._lastNode=e.nodeBefore),this.writer.merge(e),e.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=nd._createAt(e.nodeBefore,0,"toPrevious")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),e.detach()}_canMergeLeft(t){const e=t.previousSibling;return e instanceof Ua&&this.canMergeWith.has(e)&&this.model.schema.checkMerge(e,t)}_canMergeRight(t){const e=t.nextSibling;return e instanceof Ua&&this.canMergeWith.has(e)&&this.model.schema.checkMerge(t,e)}_tryAutoparagraphing(t){const e=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,e)&&this.schema.checkChild(e,t)&&(e._appendChild(t),this._handleNode(e))}_checkAndAutoParagraphToAllowedPosition(t){if(this.schema.checkChild(this.position.parent,t))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",t))return!1;this._insertPartialFragment();const e=this.writer.createElement("paragraph");return this.writer.insert(e,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=e,this.position=this.writer.createPositionAt(e,0),!0}_checkAndSplitToAllowedPosition(t){const e=this._getAllowedIn(this.position.parent,t);if(!e)return!1;for(e!=this.position.parent&&this._insertPartialFragment();e!=this.position.parent;)if(this.position.isAtStart){const t=this.position.parent;this.position=this.writer.createPositionBefore(t),t.isEmpty&&t.parent===e&&this.writer.remove(t)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const t=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=t,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(t,e){return this.schema.checkChild(t,e)?t:this.schema.isLimit(t)?null:this._getAllowedIn(t.parent,e)}}function sd(t,e,n={}){if(e.isCollapsed)return;const o=e.getFirstRange();if("$graveyard"==o.root.rootName)return;const i=t.schema;t.change((t=>{if(!n.doNotResetEntireContent&&function(t,e){const n=t.getLimitElement(e);if(!e.containsEntireContent(n))return!1;const o=e.getFirstRange();if(o.start.parent==o.end.parent)return!1;return t.checkChild(n,"paragraph")}(i,e))return void function(t,e){const n=t.model.schema.getLimitElement(e);t.remove(t.createRangeIn(n)),dd(t,t.createPositionAt(n,0),e)}(t,e);const[r,s]=function(t){const e=t.root.document.model,n=t.start;let o=t.end;if(e.hasContent(t,{ignoreMarkers:!0})){const n=function(t){const e=t.parent,n=e.root.document.model.schema,o=e.getAncestors({parentFirst:!0,includeSelf:!0});for(const t of o){if(n.isLimit(t))return null;if(n.isBlock(t))return t}}(o);if(n&&o.isTouching(e.createPositionAt(n,0))){const n=e.createSelection(t);e.modifySelection(n,{direction:"backward"});const i=n.getLastPosition(),r=e.createRange(i,o);e.hasContent(r,{ignoreMarkers:!0})||(o=i)}}return[nd.fromPosition(n,"toPrevious"),nd.fromPosition(o,"toNext")]}(o);r.isTouching(s)||t.remove(t.createRange(r,s)),n.leaveUnmerged||(!function(t,e,n){const o=t.model;if(!cd(t.model.schema,e,n))return;const[i,r]=function(t,e){const n=t.getAncestors(),o=e.getAncestors();let i=0;for(;n[i]&&n[i]==o[i];)i++;return[n[i],o[i]]}(e,n);if(!i||!r)return;!o.hasContent(i,{ignoreMarkers:!0})&&o.hasContent(r,{ignoreMarkers:!0})?ld(t,e,n,i.parent):ad(t,e,n,i.parent)}(t,r,s),i.removeDisallowedAttributes(r.parent.getChildren(),t)),hd(t,e,r),!n.doNotAutoparagraph&&function(t,e){const n=t.checkChild(e,"$text"),o=t.checkChild(e,"paragraph");return!n&&o}(i,r)&&dd(t,r,e),r.detach(),s.detach()}))}function ad(t,e,n,o){const i=e.parent,r=n.parent;if(i!=o&&r!=o){for(e=t.createPositionAfter(i),(n=t.createPositionBefore(r)).isEqual(e)||t.insert(r,e),t.merge(e);n.parent.isEmpty;){const e=n.parent;n=t.createPositionBefore(e),t.remove(e)}cd(t.model.schema,e,n)&&ad(t,e,n,o)}}function ld(t,e,n,o){const i=e.parent,r=n.parent;if(i!=o&&r!=o){for(e=t.createPositionAfter(i),(n=t.createPositionBefore(r)).isEqual(e)||t.insert(i,n);e.parent.isEmpty;){const n=e.parent;e=t.createPositionBefore(n),t.remove(n)}n=t.createPositionBefore(r),function(t,e){const n=e.nodeBefore,o=e.nodeAfter;n.name!=o.name&&t.rename(n,o.name);t.clearAttributes(n),t.setAttributes(Object.fromEntries(o.getAttributes()),n),t.merge(e)}(t,n),cd(t.model.schema,e,n)&&ld(t,e,n,o)}}function cd(t,e,n){const o=e.parent,i=n.parent;return o!=i&&(!t.isLimit(o)&&!t.isLimit(i)&&function(t,e,n){const o=new Ya(t,e);for(const t of o.getWalker())if(n.isLimit(t.item))return!1;return!0}(e,n,t))}function dd(t,e,n){const o=t.createElement("paragraph");t.insert(o,e),hd(t,n,t.createPositionAt(o,0))}function hd(t,e,n){e instanceof gl?t.setSelection(n):e.setTo(n)}const ud=' ,.?!:;"-()';function gd(t,e){const{isForward:n,walker:o,unit:i,schema:r,treatEmojiAsSingleUnit:s}=t,{type:a,item:l,nextPosition:c}=e;if("text"==a)return"word"===t.unit?function(t,e){let n=t.position.textNode;if(n){let o=t.position.offset-n.startOffset;for(;!pd(n.data,o,e)&&!fd(n,o,e);){t.next();const i=e?t.position.nodeAfter:t.position.nodeBefore;if(i&&i.is("$text")){const o=i.data.charAt(e?0:i.data.length-1);ud.includes(o)||(t.next(),n=t.position.textNode)}o=t.position.offset-n.startOffset}}return t.position}(o,n):function(t,e,n){const o=t.position.textNode;if(o){const i=o.data;let r=t.position.offset-o.startOffset;for(;jc(i,r)||"character"==e&&$c(i,r)||n&&Kc(i,r);)t.next(),r=t.position.offset-o.startOffset}return t.position}(o,i,s);if(a==(n?"elementStart":"elementEnd")){if(r.isSelectable(l))return Ga._createAt(l,n?"after":"before");if(r.checkChild(c,"$text"))return c}else{if(r.isLimit(l))return void o.skip((()=>!0));if(r.checkChild(c,"$text"))return c}}function md(t,e){const n=t.root,o=Ga._createAt(n,e?"end":0);return e?new Ya(t,o):new Ya(o,t)}function pd(t,e,n){const o=e+(n?0:-1);return ud.includes(t.charAt(o))}function fd(t,e,n){return e===(n?t.endOffset:0)}function bd(t,e){const n=[];Array.from(t.getItems({direction:"backward"})).map((t=>e.createRangeOn(t))).filter((e=>(e.start.isAfter(t.start)||e.start.isEqual(t.start))&&(e.end.isBefore(t.end)||e.end.isEqual(t.end)))).forEach((t=>{n.push(t.start.parent),e.remove(t)})),n.forEach((t=>{let n=t;for(;n.parent&&n.isEmpty;){const t=e.createRangeOn(n);n=n.parent,e.remove(t)}}))}function kd(t){t.document.registerPostFixer((e=>function(t,e){const n=e.document.selection,o=e.schema,i=[];let r=!1;for(const t of n.getRanges()){const e=wd(t,o);e&&!e.isEqual(t)?(i.push(e),r=!0):i.push(t)}r&&t.setSelection(function(t){const e=[...t],n=new Set;let o=1;for(;o<e.length;){const t=e[o],i=e.slice(0,o);for(const[r,s]of i.entries())if(!n.has(r))if(t.isEqual(s))n.add(r);else if(t.isIntersecting(s)){n.add(r),n.add(o);const i=t.getJoined(s);e.push(i)}o++}return e.filter(((t,e)=>!n.has(e)))}(i),{backward:n.isBackward})}(e,t)))}function wd(t,e){return t.isCollapsed?function(t,e){const n=t.start,o=e.getNearestSelectionRange(n);if(!o){const t=n.getAncestors().reverse().find((t=>e.isObject(t)));return t?Ya._createOn(t):null}if(!o.isCollapsed)return o;const i=o.start;if(n.isEqual(i))return null;return new Ya(i)}(t,e):function(t,e){const{start:n,end:o}=t,i=e.checkChild(n,"$text"),r=e.checkChild(o,"$text"),s=e.getLimitElement(n),a=e.getLimitElement(o);if(s===a){if(i&&r)return null;if(function(t,e,n){const o=t.nodeAfter&&!n.isLimit(t.nodeAfter)||n.checkChild(t,"$text"),i=e.nodeBefore&&!n.isLimit(e.nodeBefore)||n.checkChild(e,"$text");return o||i}(n,o,e)){const t=n.nodeAfter&&e.isSelectable(n.nodeAfter)?null:e.getNearestSelectionRange(n,"forward"),i=o.nodeBefore&&e.isSelectable(o.nodeBefore)?null:e.getNearestSelectionRange(o,"backward"),r=t?t.start:n,s=i?i.end:o;return new Ya(r,s)}}const l=s&&!s.is("rootElement"),c=a&&!a.is("rootElement");if(l||c){const t=n.nodeAfter&&o.nodeBefore&&n.nodeAfter.parent===o.nodeBefore.parent,i=l&&(!t||!Ad(n.nodeAfter,e)),r=c&&(!t||!Ad(o.nodeBefore,e));let d=n,h=o;return i&&(d=Ga._createBefore(Cd(s,e))),r&&(h=Ga._createAfter(Cd(a,e))),new Ya(d,h)}return null}(t,e)}function Cd(t,e){let n=t,o=n;for(;e.isLimit(o)&&o.parent;)n=o,o=o.parent;return n}function Ad(t,e){return t&&e.isSelectable(t)}class _d{constructor(){this.markers=new Qc,this.document=new Jc(this),this.schema=new jl,this._pendingChanges=[],this._currentWriter=null,["insertContent","deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((t=>this.decorate(t))),this.on("applyOperation",((t,e)=>{e[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",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(((t,e)=>{if("$marker"===e.name)return!0})),kd(this),this.document.registerPostFixer(Il)}change(t){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new gc,callback:t}),this._runPendingChanges()[0]):t(this._currentWriter)}catch(t){a.rethrowUnexpectedError(t,this)}}enqueueChange(t,e){try{t?"function"==typeof t?(e=t,t=new gc):t instanceof gc||(t=new gc(t)):t=new gc,this._pendingChanges.push({batch:t,callback:e}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(t){a.rethrowUnexpectedError(t,this)}}applyOperation(t){t._execute()}insertContent(t,e,n){return function(t,e,n,o){return t.change((i=>{let r;r=n?n instanceof il||n instanceof gl?n:i.createSelection(n,o):t.document.selection,r.isCollapsed||t.deleteContent(r,{doNotAutoparagraph:!0});const s=new rd(t,i,r.anchor);let a;a=e.is("documentFragment")?e.getChildren():[e],s.handleNodes(a);const l=s.getSelectionRange();l&&(r instanceof gl?i.setSelection(l):r.setTo(l));const c=s.getAffectedRange()||t.createRange(r.anchor);return s.destroy(),c}))}(this,t,e,n)}deleteContent(t,e){sd(this,t,e)}modifySelection(t,e){!function(t,e,n={}){const o=t.schema,i="backward"!=n.direction,r=n.unit?n.unit:"character",s=!!n.treatEmojiAsSingleUnit,a=e.focus,l=new ja({boundaries:md(a,i),singleCharacters:!0,direction:i?"forward":"backward"}),c={walker:l,schema:o,isForward:i,unit:r,treatEmojiAsSingleUnit:s};let d;for(;d=l.next();){if(d.done)return;const n=gd(c,d.value);if(n)return void(e instanceof gl?t.change((t=>{t.setSelectionFocus(n)})):e.setFocus(n))}}(this,t,e)}getSelectedContent(t){return function(t,e){return t.change((t=>{const n=t.createDocumentFragment(),o=e.getFirstRange();if(!o||o.isCollapsed)return n;const i=o.start.root,r=o.start.getCommonPath(o.end),s=i.getNodeByPath(r);let a;a=o.start.parent==o.end.parent?o:t.createRange(t.createPositionAt(s,o.start.path[r.length]),t.createPositionAt(s,o.end.path[r.length]+1));const l=a.end.offset-a.start.offset;for(const e of a.getItems({shallow:!0}))e.is("$textProxy")?t.appendText(e.data,e.getAttributes(),n):t.append(t.cloneElement(e,!0),n);if(a!=o){const e=o._getTransformedByMove(a.start,t.createPositionAt(n,0),l)[0],i=t.createRange(t.createPositionAt(n,0),e.start);bd(t.createRange(e.end,t.createPositionAt(n,"end")),t),bd(i,t)}return n}))}(this,t)}hasContent(t,e={}){const n=t instanceof Ua?Ya._createIn(t):t;if(n.isCollapsed)return!1;const{ignoreWhitespaces:o=!1,ignoreMarkers:i=!1}=e;if(!i)for(const t of this.markers.getMarkersIntersectingRange(n))if(t.affectsData)return!0;for(const t of n.getItems())if(this.schema.isContent(t)){if(!t.is("$textProxy"))return!0;if(!o)return!0;if(-1!==t.data.search(/\S/))return!0}return!1}createPositionFromPath(t,e,n){return new Ga(t,e,n)}createPositionAt(t,e){return Ga._createAt(t,e)}createPositionAfter(t){return Ga._createAfter(t)}createPositionBefore(t){return Ga._createBefore(t)}createRange(t,e){return new Ya(t,e)}createRangeIn(t){return Ya._createIn(t)}createRangeOn(t){return Ya._createOn(t)}createSelection(t,e,n){return new il(t,e,n)}createBatch(t){return new gc(t)}createOperationFromJSON(t){return class{static fromJSON(t,e){return ed[t.__className].fromJSON(t,e)}}.fromJSON(t,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const t=[];for(this.fire("_beforeChanges");this._pendingChanges.length;){const e=this._pendingChanges[0].batch;this._currentWriter=new Rc(this,e);const n=this._pendingChanges[0].callback(this._currentWriter);t.push(n),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return this.fire("_afterChanges"),t}}ue(_d,se);class vd extends Sa{constructor(t){super(),this.editor=t}set(t,e,n={}){if("string"==typeof e){const t=e;e=(e,n)=>{this.editor.execute(t),n()}}super.set(t,e,n)}}class yd{constructor(t={}){const e=t.language||this.constructor.defaultConfig&&this.constructor.defaultConfig.language;this._context=t.context||new Fo({language:e}),this._context._addEditor(this,!t.context);const n=Array.from(this.constructor.builtinPlugins||[]);this.config=new xo(t,this.constructor.defaultConfig),this.config.define("plugins",n),this.config.define(this._context._getEditorConfig()),this.plugins=new Do(this,n,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this.commands=new ql,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 _d;const o=new Ti;this.data=new cc(this.model,o),this.editing=new Hl(this.model,o),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new dc([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 vd(this),this.keystrokes.listenTo(this.editing.view.document)}initPlugins(){const t=this.config,e=t.get("plugins"),n=t.get("removePlugins")||[],o=t.get("extraPlugins")||[],i=t.get("substitutePlugins")||[];return this.plugins.init(e.concat(o),n,i)}destroy(){let t=Promise.resolve();return"initializing"==this.state&&(t=new Promise((t=>this.once("ready",t)))),t.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(...t){try{return this.commands.execute(...t)}catch(t){a.rethrowUnexpectedError(t,this)}}focus(){this.editing.view.focus()}}ue(yd,se);class xd{constructor(t){this.editor=t,this._components=new Map}*names(){for(const t of this._components.values())yield t.originalName}add(t,e){this._components.set(Ed(t),{callback:e,originalName:t})}create(t){if(!this.has(t))throw new a("componentfactory-item-missing",this,{name:t});return this._components.get(Ed(t)).callback(this.editor.locale)}has(t){return this._components.has(Ed(t))}}function Ed(t){return String(t).toLowerCase()}class Sd{constructor(t){this.editor=t,this.componentFactory=new xd(t),this.focusTracker=new Ea,this.set("viewportOffset",this._readViewportOffsetFromConfig()),this._editableElementsMap=new Map,this.listenTo(t.editing.view.document,"layoutChanged",(()=>this.update()))}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy();for(const t of this._editableElementsMap.values())t.ckeditorInstance=null;this._editableElementsMap=new Map}setEditableElement(t,e){this._editableElementsMap.set(t,e),e.ckeditorInstance||(e.ckeditorInstance=this.editor)}getEditableElement(t="main"){return this._editableElementsMap.get(t)}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}_readViewportOffsetFromConfig(){const t=this.editor,e=t.config.get("ui.viewportOffset");if(e)return e;const n=t.config.get("toolbar.viewportTopOffset");return n?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:n}):{top:0}}}ue(Sd,se);const Td={setData(t){this.data.set(t)},getData(t){return this.data.get(t)}},Bd=Td,Dd={updateSourceElement(){if(!this.sourceElement)throw new a("editor-missing-sourceelement",this);va(this.sourceElement,this.data.get())}};class Id extends No{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new Bo({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(t){if("string"!=typeof t)throw new a("pendingactions-add-invalid-message",this);const e=Object.create(se);return e.set("message",t),this._actions.add(e),this.hasAny=!0,e}remove(t){this._actions.remove(t),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const Pd='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.591 10.177 4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414l-4.243 4.243z"/></svg>',zd='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.972 16.615a.997.997 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a.997.997 0 0 1-.745.292z"/></svg>',Rd='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.999 2H15a1 1 0 0 1 0 2h-1.004v13a1 1 0 1 1-2 0V4H8.999v13a1 1 0 1 1-2 0v-7A4 4 0 0 1 3 6a4 4 0 0 1 3.999-4z"/></svg>',Vd='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="9.5" cy="4.5" r="1.5"/><circle cx="9.5" cy="10.5" r="1.5"/><circle cx="9.5" cy="16.5" r="1.5"/></svg>',Fd={cancel:Pd,caption:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 16h9a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2z"/><path d="M17 1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14zm0 1.5H3a.5.5 0 0 0-.492.41L2.5 3v9a.5.5 0 0 0 .41.492L3 12.5h14a.5.5 0 0 0 .492-.41L17.5 12V3a.5.5 0 0 0-.41-.492L17 2.5z" fill-opacity=".6"/></svg>',check:zd,cog:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.333 2 .19 2.263a5.899 5.899 0 0 1 1.458.604L14.714 3.4 16.6 5.286l-1.467 1.733c.263.452.468.942.605 1.46L18 8.666v2.666l-2.263.19a5.899 5.899 0 0 1-.604 1.458l1.467 1.733-1.886 1.886-1.733-1.467a5.899 5.899 0 0 1-1.46.605L11.334 18H8.667l-.19-2.263a5.899 5.899 0 0 1-1.458-.604L5.286 16.6 3.4 14.714l1.467-1.733a5.899 5.899 0 0 1-.604-1.458L2 11.333V8.667l2.262-.189a5.899 5.899 0 0 1 .605-1.459L3.4 5.286 5.286 3.4l1.733 1.467a5.899 5.899 0 0 1 1.46-.605L8.666 2h2.666zM10 6.267a3.733 3.733 0 1 0 0 7.466 3.733 3.733 0 0 0 0-7.466z"/></svg>',eraser:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m8.636 9.531-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053-2.147-.066z"/><path d="M4 18h5.523v-1H4zm-2 0h1v-1H2z"/></svg>',lowVision:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.085 6.22 2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.094 11.094 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.488.488 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304c-.258.11-.51.233-.757.365l6.239 6.24-.006.005.78.78c-.388.094-.78.166-1.174.215l-1.11-1.11h.011L4.55 8.197a7.2 7.2 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10.164 10.164 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a2.563 2.563 0 0 0-.124.2c-.043.077-.08.158-.108.241a.534.534 0 0 0-.028.133.29.29 0 0 0 .008.072.927.927 0 0 0 .082.226c.067.133.145.26.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93zm7.07.531a4.632 4.632 0 0 1 1.108 5.992l.345.344.046-.018a9.313 9.313 0 0 0 2-1.112c.256-.187.5-.392.727-.613.137-.134.27-.277.392-.431.072-.091.141-.185.203-.286.057-.093.107-.19.148-.292a.72.72 0 0 0 .036-.12.29.29 0 0 0 .008-.072.492.492 0 0 0-.028-.133.999.999 0 0 0-.036-.096 2.165 2.165 0 0 0-.071-.145 2.917 2.917 0 0 0-.125-.2 3.592 3.592 0 0 0-.263-.335 5.444 5.444 0 0 0-.53-.523 7.955 7.955 0 0 0-1.054-.768 9.766 9.766 0 0 0-1.879-.891c-.337-.118-.68-.219-1.027-.301zm-2.85.21-.069.002a.508.508 0 0 0-.254.097.496.496 0 0 0-.104.679.498.498 0 0 0 .326.199l.045.005c.091.003.181.003.272.012a2.45 2.45 0 0 1 2.017 1.513c.024.061.043.125.069.185a.494.494 0 0 0 .45.287h.008a.496.496 0 0 0 .35-.158.482.482 0 0 0 .13-.335.638.638 0 0 0-.048-.219 3.379 3.379 0 0 0-.36-.723 3.438 3.438 0 0 0-2.791-1.543l-.028-.001h-.013z"/></svg>',image:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.91 10.54c.26-.23.64-.21.88.03l3.36 3.14 2.23-2.06a.64.64 0 0 1 .87 0l2.52 2.97V4.5H3.2v10.12l3.71-4.08zm10.27-7.51c.6 0 1.09.47 1.09 1.05v11.84c0 .59-.49 1.06-1.09 1.06H2.79c-.6 0-1.09-.47-1.09-1.06V4.08c0-.58.49-1.05 1.1-1.05h14.38zm-5.22 5.56a1.96 1.96 0 1 1 3.4-1.96 1.96 1.96 0 0 1-3.4 1.96z"/></svg>',alignBottom:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.239 13.938-2.88-1.663a.75.75 0 0 1 .75-1.3L9 12.067V4.75a.75.75 0 1 1 1.5 0v7.318l1.89-1.093a.75.75 0 0 1 .75 1.3l-2.879 1.663a.752.752 0 0 1-.511.187.752.752 0 0 1-.511-.187zM4.25 17a.75.75 0 1 1 0-1.5h10.5a.75.75 0 0 1 0 1.5H4.25z"/></svg>',alignMiddle:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.75 11.875a.752.752 0 0 1 .508.184l2.883 1.666a.75.75 0 0 1-.659 1.344l-.091-.044-1.892-1.093.001 4.318a.75.75 0 1 1-1.5 0v-4.317l-1.89 1.092a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .51-.187zM15.25 9a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM9.75.375a.75.75 0 0 1 .75.75v4.318l1.89-1.093.092-.045a.75.75 0 0 1 .659 1.344l-2.883 1.667a.752.752 0 0 1-.508.184.752.752 0 0 1-.511-.187L6.359 5.65a.75.75 0 0 1 .75-1.299L9 5.442V1.125a.75.75 0 0 1 .75-.75z"/></svg>',alignTop:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m10.261 7.062 2.88 1.663a.75.75 0 0 1-.75 1.3L10.5 8.933v7.317a.75.75 0 1 1-1.5 0V8.932l-1.89 1.093a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .511-.187.752.752 0 0 1 .511.187zM15.25 4a.75.75 0 1 1 0 1.5H4.75a.75.75 0 0 1 0-1.5h10.5z"/></svg>',alignLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',alignCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm2.286 4c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75z"/></svg>',alignRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M18 3.75a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 4a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75zm0-8a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75z"/></svg>',alignJustify:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',objectLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zm0-3H18v1.5h-4.5zm0-3H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M15.003 7v5.5a1 1 0 0 1-1 1H5.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H6.5V12h6.997V7.5z"/></svg>',objectRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2zm0-9h5v1.5H2zm0 3h5v1.5H2zm0 3h5v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectFullWidth:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18 7v5.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1zm-1.505.5H3.504V12h12.991V7.5z"/></svg>',objectInline:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectSizeFull:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M18.095 2H1.905C.853 2 0 2.895 0 4v12c0 1.105.853 2 1.905 2h16.19C19.147 18 20 17.105 20 16V4c0-1.105-.853-2-1.905-2zm0 1.5c.263 0 .476.224.476.5v12c0 .276-.213.5-.476.5H1.905a.489.489 0 0 1-.476-.5V4c0-.276.213-.5.476-.5h16.19z"/></svg>',objectSizeLarge:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M13 6H2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5h11z"/></svg>',objectSizeSmall:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19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 0 0-2 2v6a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-6a.5.5 0 0 1 .5-.5h8z"/></svg>',pencil:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m7.3 17.37-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5 9.375 17H19v1.5H8z"/></svg>',pilcrow:Rd,quote:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574z"/></svg>',threeVerticalDots:Vd};function Nd({emitter:t,activator:e,callback:n,contextElements:o}){t.listenTo(document,"mousedown",((t,i)=>{if(!e())return;const r="function"==typeof i.composedPath?i.composedPath():[];for(const t of o)if(t.contains(i.target)||r.includes(t))return;n()}))}function Md(t){t.set("_isCssTransitionsDisabled",!1),t.disableCssTransitions=()=>{t._isCssTransitionsDisabled=!0},t.enableCssTransitions=()=>{t._isCssTransitionsDisabled=!1},t.extendTemplate({attributes:{class:[t.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}function Od({view:t}){t.listenTo(t.element,"submit",((e,n)=>{n.preventDefault(),t.fire("submit")}),{useCapture:!0})}class Ld extends Bo{constructor(t=[]){super(t,{idProperty:"viewUid"}),this.on("add",((t,e,n)=>{this._renderViewIntoCollectionParent(e,n)})),this.on("remove",((t,e)=>{e.element&&this._parentElement&&e.element.remove()})),this._parentElement=null}destroy(){this.map((t=>t.destroy()))}setParent(t){this._parentElement=t;for(const t of this)this._renderViewIntoCollectionParent(t)}delegate(...t){if(!t.length||!t.every((t=>"string"==typeof t)))throw new a("ui-viewcollection-delegate-wrong-events",this);return{to:e=>{for(const n of this)for(const o of t)n.delegate(o).to(e);this.on("add",((n,o)=>{for(const n of t)o.delegate(n).to(e)})),this.on("remove",((n,o)=>{for(const n of t)o.stopDelegating(n,e)}))}}}_renderViewIntoCollectionParent(t,e){t.isRendered||t.render(),t.element&&this._parentElement&&this._parentElement.insertBefore(t.element,this._parentElement.children[e])}}var Hd=n(4793),qd={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Hd.Z,qd);Hd.Z.locals;class Wd{constructor(t){this.element=null,this.isRendered=!1,this.locale=t,this.t=t&&t.t,this._viewCollections=new Bo,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((e,n)=>{n.locale=t})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=Ud.bind(this,this)}createCollection(t){const e=new Ld(t);return this._viewCollections.add(e),e}registerChild(t){To(t)||(t=[t]);for(const e of t)this._unboundChildren.add(e)}deregisterChild(t){To(t)||(t=[t]);for(const e of t)this._unboundChildren.remove(e)}setTemplate(t){this.template=new Ud(t)}extendTemplate(t){Ud.extend(this.template,t)}render(){if(this.isRendered)throw new a("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((t=>t.destroy())),this.template&&this.template._revertData&&this.template.revert(this.element)}}ue(Wd,Cs),ue(Wd,se);class Ud{constructor(t){Object.assign(this,th(Xd(t))),this._isRendered=!1,this._revertData=null}render(){const t=this._renderNode({intoFragment:!0});return this._isRendered=!0,t}apply(t){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:t,isApplying:!0,revertData:this._revertData}),t}revert(t){if(!this._revertData)throw new a("ui-template-revert-not-applied",[this,t]);this._revertTemplateFromNode(t,this._revertData)}*getViews(){yield*function*t(e){if(e.children)for(const n of e.children)sh(n)?yield n:ah(n)&&(yield*t(n))}(this)}static bind(t,e){return{to:(n,o)=>new $d({eventNameOrFunction:n,attribute:n,observable:t,emitter:e,callback:o}),if:(n,o,i)=>new Gd({observable:t,emitter:e,attribute:n,valueIfTrue:o,callback:i})}}static extend(t,e){if(t._isRendered)throw new a("template-extend-render",[this,t]);ih(t,th(Xd(e)))}_renderNode(t){let e;if(e=t.node?this.tag&&this.text:this.tag?this.text:!this.text,e)throw new a("ui-template-wrong-syntax",this);return this.text?this._renderText(t):this._renderElement(t)}_renderElement(t){let e=t.node;return e||(e=t.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(t),this._renderElementChildren(t),this._setUpListeners(t),e}_renderText(t){let e=t.node;return e?t.revertData.text=e.textContent:e=t.node=document.createTextNode(""),Kd(this.text)?this._bindToObservable({schema:this.text,updater:Jd(e),data:t}):e.textContent=this.text.join(""),e}_renderAttributes(t){let e,n,o,i;if(!this.attributes)return;const r=t.node,s=t.revertData;for(e in this.attributes)if(o=r.getAttribute(e),n=this.attributes[e],s&&(s.attributes[e]=o),i=y(n[0])&&n[0].ns?n[0].ns:null,Kd(n)){const a=i?n[0].value:n;s&&ch(e)&&a.unshift(o),this._bindToObservable({schema:a,updater:Yd(r,e,i),data:t})}else"style"==e&&"string"!=typeof n[0]?this._renderStyleAttribute(n[0],t):(s&&o&&ch(e)&&n.unshift(o),n=n.map((t=>t&&t.value||t)).reduce(((t,e)=>t.concat(e)),[]).reduce(nh,""),rh(n)||r.setAttributeNS(i,e,n))}_renderStyleAttribute(t,e){const n=e.node;for(const o in t){const i=t[o];Kd(i)?this._bindToObservable({schema:[i],updater:Qd(n,o),data:e}):n.style[o]=i}}_renderElementChildren(t){const e=t.node,n=t.intoFragment?document.createDocumentFragment():e,o=t.isApplying;let i=0;for(const r of this.children)if(lh(r)){if(!o){r.setParent(e);for(const t of r)n.appendChild(t.element)}}else if(sh(r))o||(r.isRendered||r.render(),n.appendChild(r.element));else if(Jr(r))n.appendChild(r);else if(o){const e={children:[],bindings:[],attributes:{}};t.revertData.children.push(e),r._renderNode({node:n.childNodes[i++],isApplying:!0,revertData:e})}else n.appendChild(r.render());t.intoFragment&&e.appendChild(n)}_setUpListeners(t){if(this.eventListeners)for(const e in this.eventListeners){const n=this.eventListeners[e].map((n=>{const[o,i]=e.split("@");return n.activateDomEventListener(o,i,t)}));t.revertData&&t.revertData.bindings.push(n)}}_bindToObservable({schema:t,updater:e,data:n}){const o=n.revertData;Zd(t,e,n);const i=t.filter((t=>!rh(t))).filter((t=>t.observable)).map((o=>o.activateAttributeListener(t,e,n)));o&&o.bindings.push(i)}_revertTemplateFromNode(t,e){for(const t of e.bindings)for(const e of t)e();if(e.text)t.textContent=e.text;else{for(const n in e.attributes){const o=e.attributes[n];null===o?t.removeAttribute(n):t.setAttribute(n,o)}for(let n=0;n<e.children.length;++n)this._revertTemplateFromNode(t.childNodes[n],e.children[n])}}}ue(Ud,f);class jd{constructor(t){Object.assign(this,t)}getValue(t){const e=this.observable[this.attribute];return this.callback?this.callback(e,t):e}activateAttributeListener(t,e,n){const o=()=>Zd(t,e,n);return this.emitter.listenTo(this.observable,"change:"+this.attribute,o),()=>{this.emitter.stopListening(this.observable,"change:"+this.attribute,o)}}}class $d extends jd{activateDomEventListener(t,e,n){const o=(t,n)=>{e&&!n.target.matches(e)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,t,o),()=>{this.emitter.stopListening(n.node,t,o)}}}class Gd extends jd{getValue(t){return!rh(super.getValue(t))&&(this.valueIfTrue||!0)}}function Kd(t){return!!t&&(t.value&&(t=t.value),Array.isArray(t)?t.some(Kd):t instanceof jd)}function Zd(t,e,{node:n}){let o=function(t,e){return t.map((t=>t instanceof jd?t.getValue(e):t))}(t,n);o=1==t.length&&t[0]instanceof Gd?o[0]:o.reduce(nh,""),rh(o)?e.remove():e.set(o)}function Jd(t){return{set(e){t.textContent=e},remove(){t.textContent=""}}}function Yd(t,e,n){return{set(o){t.setAttributeNS(n,e,o)},remove(){t.removeAttributeNS(n,e)}}}function Qd(t,e){return{set(n){t.style[e]=n},remove(){t.style[e]=null}}}function Xd(t){return vo(t,(t=>{if(t&&(t instanceof jd||ah(t)||sh(t)||lh(t)))return t}))}function th(t){if("string"==typeof t?t=function(t){return{text:[t]}}(t):t.text&&function(t){t.text=Io(t.text)}(t),t.on&&(t.eventListeners=function(t){for(const e in t)eh(t,e);return t}(t.on),delete t.on),!t.text){t.attributes&&function(t){for(const e in t)t[e].value&&(t[e].value=Io(t[e].value)),eh(t,e)}(t.attributes);const e=[];if(t.children)if(lh(t.children))e.push(t.children);else for(const n of t.children)ah(n)||sh(n)||Jr(n)?e.push(n):e.push(new Ud(n));t.children=e}return t}function eh(t,e){t[e]=Io(t[e])}function nh(t,e){return rh(e)?t:rh(t)?e:`${t} ${e}`}function oh(t,e){for(const n in e)t[n]?t[n].push(...e[n]):t[n]=e[n]}function ih(t,e){if(e.attributes&&(t.attributes||(t.attributes={}),oh(t.attributes,e.attributes)),e.eventListeners&&(t.eventListeners||(t.eventListeners={}),oh(t.eventListeners,e.eventListeners)),e.text&&t.text.push(...e.text),e.children&&e.children.length){if(t.children.length!=e.children.length)throw new a("ui-template-extend-children-mismatch",t);let n=0;for(const o of e.children)ih(t.children[n++],o)}}function rh(t){return!t&&0!==t}function sh(t){return t instanceof Wd}function ah(t){return t instanceof Ud}function lh(t){return t instanceof Ld}function ch(t){return"class"==t||"style"==t}class dh extends Ld{constructor(t,e=[]){super(e),this.locale=t}attachToDom(){this._bodyCollectionContainer=new Ud({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let t=document.querySelector(".ck-body-wrapper");t||(t=ma(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(t)),t.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const t=document.querySelector(".ck-body-wrapper");t&&0==t.childElementCount&&t.remove()}}var hh=n(6574),uh={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(hh.Z,uh);hh.Z.locals;class gh extends Wd{constructor(){super();const t=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:t.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 t=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),e=t.getAttribute("viewBox");for(e&&(this.viewBox=e),this.element.innerHTML="";t.childNodes.length>0;)this.element.appendChild(t.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach((t=>{t.style.fill=this.fillColor}))}}var mh=n(3332),ph={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(mh.Z,ph);mh.Z.locals;class fh extends Wd{constructor(t){super(t),this.set("text",""),this.set("position","s");const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip",e.to("position",(t=>"ck-tooltip_"+t)),e.if("text","ck-hidden",(t=>!t.trim()))]},children:[{tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:e.to("text")}]}]})}}var bh=n(4906),kh={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(bh.Z,kh);bh.Z.locals;class wh extends Wd{constructor(t){super(t);const e=this.bindTemplate,n=r();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(n),this.iconView=new gh,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",e.to("class"),e.if("isEnabled","ck-disabled",(t=>!t)),e.if("isVisible","ck-hidden",(t=>!t)),e.to("isOn",(t=>t?"ck-on":"ck-off")),e.if("withText","ck-button_with-text"),e.if("withKeystroke","ck-button_with-keystroke")],type:e.to("type",(t=>t||"button")),tabindex:e.to("tabindex"),"aria-labelledby":`ck-editor__aria-label_${n}`,"aria-disabled":e.if("isEnabled",!0,(t=>!t)),"aria-pressed":e.to("isOn",(t=>!!this.isToggleable&&String(t)))},children:this.children,on:{mousedown:e.to((t=>{t.preventDefault()})),click:e.to((t=>{this.isEnabled?this.fire("execute"):t.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.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}_createTooltipView(){const t=new fh;return t.bind("text").to(this,"_tooltipString"),t.bind("position").to(this,"tooltipPosition"),t}_createLabelView(t){const e=new Wd,n=this.bindTemplate;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:n.to("labelStyle"),id:`ck-editor__aria-label_${t}`},children:[{text:this.bindTemplate.to("label")}]}),e}_createKeystrokeView(){const t=new Wd;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(t=>pr(t)))}]}),t}_getTooltipString(t,e,n){return t?"string"==typeof t?t:(n&&(n=pr(n)),t instanceof Function?t(e,n):`${e}${n?` (${n})`:""}`):""}}var Ch=n(5332),Ah={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Ch.Z,Ah);Ch.Z.locals;class _h extends wh{constructor(t){super(t),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const t=new Wd;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),t}}function vh(t,e){const n=t.t,o={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 e.map((t=>{const e=o[t.label];return e&&e!=t.label&&(t.label=e),t}))}function yh(t){return t.map(xh).filter((t=>!!t))}function xh(t){return"string"==typeof t?{model:t,label:t,hasBorder:!1,view:{name:"span",styles:{color:t}}}:{model:t.color,label:t.label||t.color,hasBorder:void 0!==t.hasBorder&&t.hasBorder,view:{name:"span",styles:{color:`${t.color}`}}}}class Eh extends wh{constructor(t){super(t);const e=this.bindTemplate;this.set("color"),this.set("hasBorder"),this.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0z"/><path d="M14.814 6.035 8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z"/></svg>',this.extendTemplate({attributes:{style:{backgroundColor:e.to("color")},class:["ck","ck-color-grid__tile",e.if("hasBorder","ck-color-table__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}class Sh{constructor(t){if(Object.assign(this,t),t.actions&&t.keystrokeHandler)for(const e in t.actions){let n=t.actions[e];"string"==typeof n&&(n=[n]);for(const o of n)t.keystrokeHandler.set(o,((t,n)=>{this[e](),n()}))}}get first(){return this.focusables.find(Th)||null}get last(){return this.focusables.filter(Th).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let t=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((e,n)=>{const o=e.element===this.focusTracker.focusedElement;return o&&(t=n),o})),t)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(t){t&&t.focus()}_getFocusableItem(t){const e=this.current,n=this.focusables.length;if(!n)return null;if(null===e)return this[1===t?"first":"last"];let o=(e+n+t)%n;do{const e=this.focusables.get(o);if(Th(e))return e;o=(o+n+t)%n}while(o!==e);return null}}function Th(t){return!(!t.focus||!ya(t.element))}var Bh=n(6781),Dh={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Bh.Z,Dh);Bh.Z.locals;class Ih extends Wd{constructor(t,e){super(t);const n=e&&e.colorDefinitions||[],o={};e&&e.columns&&(o.gridTemplateColumns=`repeat( ${e.columns}, 1fr)`),this.set("selectedColor"),this.items=this.createCollection(),this.focusTracker=new Ea,this.keystrokes=new Sa,this._focusCycler=new Sh({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowleft",focusNext:"arrowright"}}),this.items.on("add",((t,e)=>{e.isOn=e.color===this.selectedColor})),n.forEach((t=>{const e=new Eh;e.set({color:t.color,label:t.label,tooltip:!0,hasBorder:t.options.hasBorder}),e.on("execute",(()=>{this.fire("execute",{value:t.color,hasBorder:t.options.hasBorder,label:t.label})})),this.items.add(e)})),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:o}}),this.on("change:selectedColor",((t,e,n)=>{for(const t of this.items)t.isOn=t.color===n}))}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",((t,e)=>{this.focusTracker.add(e.element)})),this.items.on("remove",((t,e)=>{this.focusTracker.remove(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}const Ph='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/></svg>';class zh extends wh{constructor(t){super(t),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 t=new gh;return t.content=Ph,t.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),t}}var Rh=n(7686),Vh={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Rh.Z,Vh);Rh.Z.locals;class Fh extends Wd{constructor(t){super(t);const e=this.bindTemplate;this.set("class"),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 Sa,this.focusTracker=new Ea,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",e.to("class"),e.if("isVisible","ck-hidden",(t=>!t)),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",((t,e)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),e())})),this.keystrokes.set("arrowleft",((t,e)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),e())}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(){const t=new wh;return t.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),t.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),t.delegate("execute").to(this),t}_createArrowView(){const t=new wh,e=t.bindTemplate;return t.icon=Ph,t.extendTemplate({attributes:{class:"ck-splitbutton__arrow","aria-haspopup":!0,"aria-expanded":e.to("isOn",(t=>String(t)))}}),t.bind("isEnabled").to(this),t.delegate("execute").to(this,"open"),t}}class Nh extends Wd{constructor(t){super(t);const e=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",e.to("position",(t=>`ck-dropdown__panel_${t}`)),e.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:e.to((t=>t.preventDefault()))}})}focus(){this.children.length&&this.children.first.focus()}focusLast(){if(this.children.length){const t=this.children.last;"function"==typeof t.focusLast?t.focusLast():t.focus()}}}var Mh=n(5485),Oh={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Mh.Z,Oh);Mh.Z.locals;function Lh({element:t,target:e,positions:n,limiter:o,fitInViewport:i,viewportOffsetConfig:r}){M(e)&&(e=e()),M(o)&&(o=o());const s=function(t){return t&&t.parentNode?t.offsetParent===rs.document.body?null:t.offsetParent:null}(t),a=new ka(t);let l;const c={targetRect:new ka(e),elementRect:a,positionedElementAncestor:s};if(o||i){const t=o&&new ka(o).getVisible(),e=i&&function(t){t=Object.assign({top:0,bottom:0,left:0,right:0},t);const e=new ka(rs.window);return e.top+=t.top,e.height-=t.top,e.bottom-=t.bottom,e.height-=t.bottom,e}(r);Object.assign(c,{limiterRect:t,viewportRect:e}),l=function(t,e){const{elementRect:n}=e,o=n.getArea(),i=t.map((t=>new qh(t,e))).filter((t=>!!t.name));let r=0,s=null;for(const t of i){const{_limiterIntersectionArea:e,_viewportIntersectionArea:n}=t;if(e===o)return t;const i=n**2+e**2;i>r&&(r=i,s=t)}return s}(n,c)||new qh(n[0],c)}else l=new qh(n[0],c);return l}function Hh(t){const{scrollX:e,scrollY:n}=rs.window;return t.clone().moveBy(e,n)}class qh{constructor(t,e){const n=t(e.targetRect,e.elementRect,e.viewportRect);if(!n)return;const{left:o,top:i,name:r,config:s}=n;Object.assign(this,{name:r,config:s}),this._positioningFunctionCorrdinates={left:o,top:i},this._options=e}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get _limiterIntersectionArea(){const t=this._options.limiterRect;if(t){const e=this._options.viewportRect;if(!e)return t.getIntersectionArea(this._rect);{const n=t.getIntersection(e);if(n)return n.getIntersectionArea(this._rect)}}return 0}get _viewportIntersectionArea(){const t=this._options.viewportRect;return t?t.getIntersectionArea(this._rect):0}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCorrdinates.left,this._positioningFunctionCorrdinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=Hh(this._rect),this._options.positionedElementAncestor&&function(t,e){const n=Hh(new ka(e)),o=fa(e);let i=0,r=0;i-=n.left,r-=n.top,i+=e.scrollLeft,r+=e.scrollTop,i-=o.left,r-=o.top,t.moveBy(i,r)}(this._cachedAbsoluteRect,this._options.positionedElementAncestor)),this._cachedAbsoluteRect}}class Wh extends Wd{constructor(t,e,n){super(t);const o=this.bindTemplate;this.buttonView=e,this.panelView=n,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class"),this.set("id"),this.set("panelPosition","auto"),this.keystrokes=new Sa,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",o.to("class"),o.if("isEnabled","ck-disabled",(t=>!t))],id:o.to("id"),"aria-describedby":o.to("ariaDescribedById")},children:[e,n]}),e.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=Wh._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 t=(t,e)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,e())};this.keystrokes.set("arrowdown",((t,e)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,e())})),this.keystrokes.set("arrowright",((t,e)=>{this.isOpen&&e()})),this.keystrokes.set("arrowleft",t),this.keystrokes.set("esc",t)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:t,north:e,southEast:n,southWest:o,northEast:i,northWest:r,southMiddleEast:s,southMiddleWest:a,northMiddleEast:l,northMiddleWest:c}=Wh.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[n,o,s,a,t,i,r,l,c,e]:[o,n,a,s,t,r,i,c,l,e]}}Wh.defaultPanelPositions={south:(t,e)=>({top:t.bottom,left:t.left-(e.width-t.width)/2,name:"s"}),southEast:t=>({top:t.bottom,left:t.left,name:"se"}),southWest:(t,e)=>({top:t.bottom,left:t.left-e.width+t.width,name:"sw"}),southMiddleEast:(t,e)=>({top:t.bottom,left:t.left-(e.width-t.width)/4,name:"sme"}),southMiddleWest:(t,e)=>({top:t.bottom,left:t.left-3*(e.width-t.width)/4,name:"smw"}),north:(t,e)=>({top:t.top-e.height,left:t.left-(e.width-t.width)/2,name:"n"}),northEast:(t,e)=>({top:t.top-e.height,left:t.left,name:"ne"}),northWest:(t,e)=>({top:t.top-e.height,left:t.left-e.width+t.width,name:"nw"}),northMiddleEast:(t,e)=>({top:t.top-e.height,left:t.left-(e.width-t.width)/4,name:"nme"}),northMiddleWest:(t,e)=>({top:t.top-e.height,left:t.left-3*(e.width-t.width)/4,name:"nmw"})},Wh._getOptimalPosition=Lh;class Uh extends Wd{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class jh extends Wd{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function $h(t){return Array.isArray(t)?{items:t,removeItems:[]}:t?Object.assign({items:[],removeItems:[]},t):{items:[],removeItems:[]}}var Gh=n(5542),Kh={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Gh.Z,Kh);Gh.Z.locals;class Zh extends Wd{constructor(t,e){super(t);const n=this.bindTemplate,o=this.t;this.options=e||{},this.set("ariaLabel",o("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new Ea,this.keystrokes=new Sa,this.set("class"),this.set("isCompact",!1),this.itemsView=new Jh(t),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const i="rtl"===t.uiLanguageDirection;this._focusCycler=new Sh({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[i?"arrowright":"arrowleft","arrowup"],focusNext:[i?"arrowleft":"arrowright","arrowdown"]}});const r=["ck","ck-toolbar",n.to("class"),n.if("isCompact","ck-toolbar_compact")];var s;this.options.shouldGroupWhenFull&&this.options.isFloating&&r.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:r,role:"toolbar","aria-label":n.to("ariaLabel"),style:{maxWidth:n.to("maxWidth")}},children:this.children,on:{mousedown:(s=this,s.bindTemplate.to((t=>{t.target===s.element&&t.preventDefault()})))}}),this._behavior=this.options.shouldGroupWhenFull?new Qh(this):new Yh(this)}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",((t,e)=>{this.focusTracker.add(e.element)})),this.items.on("remove",((t,e)=>{this.focusTracker.remove(e.element)})),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(t,e){const n=$h(t),o=n.items.filter(((t,o,i)=>"|"===t||-1===n.removeItems.indexOf(t)&&("-"===t?!this.options.shouldGroupWhenFull||(l("toolbarview-line-break-ignored-when-grouping-items",i),!1):!!e.has(t)||(l("toolbarview-item-unavailable",{name:t}),!1)))),i=this._cleanSeparators(o).map((t=>"|"===t?new Uh:"-"===t?new jh:e.create(t)));this.items.addMany(i)}_cleanSeparators(t){const e=t=>"-"!==t&&"|"!==t,n=t.length,o=t.findIndex(e),i=n-t.slice().reverse().findIndex(e);return t.slice(o,i).filter(((t,n,o)=>{if(e(t))return!0;return!(n>0&&o[n-1]===t)}))}}class Jh extends Wd{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class Yh{constructor(t){const e=t.bindTemplate;t.set("isVertical",!1),t.itemsView.children.bindTo(t.items).using((t=>t)),t.focusables.bindTo(t.items).using((t=>t)),t.extendTemplate({attributes:{class:[e.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class Qh{constructor(t){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((t=>t)),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",((t,e)=>{const n=e.index;for(const t of e.removed)n>=this.ungroupedItems.length?this.groupedItems.remove(t):this.ungroupedItems.remove(t);for(let t=n;t<n+e.added.length;t++){const o=e.added[t-n];t>this.ungroupedItems.length?this.groupedItems.add(o,t-this.ungroupedItems.length):this.ungroupedItems.add(o,t)}this._updateGrouping()})),t.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(t){this.viewElement=t.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(t)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!ya(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const t=this.groupedItems.length;let e;for(;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")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const t=this.viewElement,e=this.viewLocale.uiLanguageDirection,n=new ka(t.lastChild),o=new ka(t);if(!this.cachedPadding){const n=rs.window.getComputedStyle(t),o="ltr"===e?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(n[o])}return"ltr"===e?n.right>o.right-this.cachedPadding:n.left<o.left+this.cachedPadding}_enableGroupingOnResize(){let t;this.resizeObserver=new Aa(this.viewElement,(e=>{t&&t===e.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),t=e.contentRect.width)})),this._updateGrouping()}_enableGroupingOnMaxWidthChange(t){t.on("change:maxWidth",(()=>{this._updateGrouping()}))}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new Uh),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 t=this.viewLocale,e=t.t,n=lu(t);return n.class="ck-toolbar__grouped-dropdown",n.panelPosition="ltr"===t.uiLanguageDirection?"sw":"se",cu(n,[]),n.buttonView.set({label:e("Show more items"),tooltip:!0,tooltipPosition:"rtl"===t.uiLanguageDirection?"se":"sw",icon:Vd}),n.toolbarView.items.bindTo(this.groupedItems).using((t=>t)),n}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((t=>{this.viewFocusables.add(t)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}var Xh=n(1046),tu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Xh.Z,tu);Xh.Z.locals;class eu extends Wd{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new Ea,this.keystrokes=new Sa,this._focusCycler=new Sh({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 t of this.items)this.focusTracker.add(t.element);this.items.on("add",((t,e)=>{this.focusTracker.add(e.element)})),this.items.on("remove",((t,e)=>{this.focusTracker.remove(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class nu extends Wd{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item"]},children:this.children})}focus(){this.children.first.focus()}}class ou extends Wd{constructor(t){super(t),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}var iu=n(7339),ru={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(iu.Z,ru);iu.Z.locals;var su=n(3949),au={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(su.Z,au);su.Z.locals;function lu(t,e=zh){const n=new e(t),o=new Nh(t),i=new Wh(t,n,o);return n.bind("isEnabled").to(i),n instanceof zh?n.bind("isOn").to(i,"isOpen"):n.arrowView.bind("isOn").to(i,"isOpen"),function(t){(function(t){t.on("render",(()=>{Nd({emitter:t,activator:()=>t.isOpen,callback:()=>{t.isOpen=!1},contextElements:[t.element]})}))})(t),function(t){t.on("execute",(e=>{e.source instanceof _h||(t.isOpen=!1)}))}(t),function(t){t.keystrokes.set("arrowdown",((e,n)=>{t.isOpen&&(t.panelView.focus(),n())})),t.keystrokes.set("arrowup",((e,n)=>{t.isOpen&&(t.panelView.focusLast(),n())}))}(t)}(i),i}function cu(t,e){const n=t.locale,o=n.t,i=t.toolbarView=new Zh(n);i.set("ariaLabel",o("Dropdown toolbar")),t.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),e.map((t=>i.items.add(t))),t.panelView.children.add(i),i.items.delegate("execute").to(t)}function du(t,e){const n=t.locale,o=t.listView=new eu(n);o.items.bindTo(e).using((({type:t,model:e})=>{if("separator"===t)return new ou(n);if("button"===t||"switchbutton"===t){const o=new nu(n);let i;return i="button"===t?new wh(n):new _h(n),i.bind(...Object.keys(e)).to(e),i.delegate("execute").to(o),o.children.add(i),o}})),t.panelView.children.add(o),o.items.delegate("execute").to(t)}var hu=n(9688),uu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(hu.Z,uu);hu.Z.locals;class gu extends Wd{constructor(t){super(t),this.body=new dh(t)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}var mu=n(3662),pu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(mu.Z,pu);mu.Z.locals;class fu extends Wd{constructor(t){super(t),this.set("text"),this.set("for"),this.id=`ck-editor__label_${r()}`;const e=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:e.to("for")},children:[{text:e.to("text")}]})}}class bu extends Wd{constructor(t,e,n){super(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:t.contentLanguage,dir:t.contentLanguageDirection}}),this.name=null,this.set("isFocused",!1),this._editableElement=n,this._hasExternalElement=!!this._editableElement,this._editingView=e}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 t=this._editingView;function e(e){t.change((n=>{const o=t.document.getRoot(e.name);n.addClass(e.isFocused?"ck-focused":"ck-blurred",o),n.removeClass(e.isFocused?"ck-blurred":"ck-focused",o)}))}t.isRenderingInProgress?function n(o){t.once("change:isRenderingInProgress",((t,i,r)=>{r?n(o):e(o)}))}(this):e(this)}}class ku extends bu{constructor(t,e,n){super(t,e,n),this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const t=this._editingView,e=this.t;t.change((n=>{const o=t.document.getRoot(this.name);n.setAttribute("aria-label",e("Rich Text Editor, %0",this.name),o)}))}}var wu=n(8847),Cu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(wu.Z,Cu);wu.Z.locals;class Au extends Wd{constructor(t,e={}){super(t);const n=this.bindTemplate;this.set("label",e.label||""),this.set("class",e.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",n.to("class")]},children:this.children});const o=new Wd(t);o.setTemplate({tag:"span",attributes:{class:["ck","ck-form__header__label"]},children:[{text:n.to("label")}]}),this.children.add(o)}}var _u=n(4879),vu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(_u.Z,vu);_u.Z.locals;class yu extends Wd{constructor(t){super(t),this.set("value"),this.set("id"),this.set("placeholder"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById"),this.focusTracker=new Ea,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0),this.set("inputMode","text");const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",e.if("isFocused","ck-input_focused"),e.if("isEmpty","ck-input-text_empty"),e.if("hasError","ck-error")],id:e.to("id"),placeholder:e.to("placeholder"),readonly:e.to("isReadOnly"),inputmode:e.to("inputMode"),"aria-invalid":e.if("hasError",!0),"aria-describedby":e.to("ariaDescribedById")},on:{input:e.to(((...t)=>{this.fire("input",...t),this._updateIsEmpty()})),change:e.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",((t,e,n)=>{this._setDomElementValue(n),this._updateIsEmpty()}))}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(t){this.element.value=t||0===t?t:""}}class xu extends yu{constructor(t){super(t),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class Eu extends yu{constructor(t,{min:e,max:n,step:o}={}){super(t);const i=this.bindTemplate;this.set("min",e),this.set("max",n),this.set("step",o),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:i.to("min"),max:i.to("max"),step:i.to("step")}})}}var Su=n(2577),Tu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Su.Z,Tu);Su.Z.locals;class Bu extends Wd{constructor(t,e){super(t);const n=`ck-labeled-field-view-${r()}`,o=`ck-labeled-field-view-status-${r()}`;this.fieldView=e(this,n,o),this.set("label"),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class"),this.set("placeholder"),this.labelView=this._createLabelView(n),this.statusView=this._createStatusView(o),this.bind("_statusText").to(this,"errorText",this,"infoText",((t,e)=>t||e));const i=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",i.to("class"),i.if("isEnabled","ck-disabled",(t=>!t)),i.if("isEmpty","ck-labeled-field-view_empty"),i.if("isFocused","ck-labeled-field-view_focused"),i.if("placeholder","ck-labeled-field-view_placeholder"),i.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:[this.fieldView,this.labelView]},this.statusView]})}_createLabelView(t){const e=new fu(this.locale);return e.for=t,e.bind("text").to(this,"label"),e}_createStatusView(t){const e=new Wd(this.locale),n=this.bindTemplate;return e.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",(t=>!t))],id:t,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),e}focus(){this.fieldView.focus()}}function Du(t,e,n){const o=new xu(t.locale);return o.set({id:e,ariaDescribedById:n}),o.bind("isReadOnly").to(t,"isEnabled",(t=>!t)),o.bind("hasError").to(t,"errorText",(t=>!!t)),o.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused","placeholder").to(o),o}function Iu(t,e,n){const o=new Eu(t.locale);return o.set({id:e,ariaDescribedById:n,inputMode:"numeric"}),o.bind("isReadOnly").to(t,"isEnabled",(t=>!t)),o.bind("hasError").to(t,"errorText",(t=>!!t)),o.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused","placeholder").to(o),o}function Pu(t,e,n){const o=lu(t.locale);return o.set({id:e,ariaDescribedById:n}),o.bind("isEnabled").to(t),o}class zu extends No{static get pluginName(){return"Notification"}init(){this.on("show:warning",((t,e)=>{window.alert(e.message)}),{priority:"lowest"})}showSuccess(t,e={}){this._showNotification({message:t,type:"success",namespace:e.namespace,title:e.title})}showInfo(t,e={}){this._showNotification({message:t,type:"info",namespace:e.namespace,title:e.title})}showWarning(t,e={}){this._showNotification({message:t,type:"warning",namespace:e.namespace,title:e.title})}_showNotification(t){const e=`show:${t.type}`+(t.namespace?`:${t.namespace}`:"");this.fire(e,{message:t.message,type:t.type,title:t.title||""})}}class Ru{constructor(t,e){e&&Xt(this,e),t&&this.set(t)}}function Vu(t){return e=>e+t}ue(Ru,se);var Fu=n(8793),Nu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Fu.Z,Nu);Fu.Z.locals;const Mu=Vu("px"),Ou=rs.document.body;class Lu extends Wd{constructor(t){super(t);const e=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",e.to("position",(t=>`ck-balloon-panel_${t}`)),e.if("isVisible","ck-balloon-panel_visible"),e.if("withArrow","ck-balloon-panel_with-arrow"),e.to("class")],style:{top:e.to("top",Mu),left:e.to("left",Mu)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(t){this.show();const e=Lu.defaultPositions,n=Object.assign({},{element:this.element,positions:[e.southArrowNorth,e.southArrowNorthMiddleWest,e.southArrowNorthMiddleEast,e.southArrowNorthWest,e.southArrowNorthEast,e.northArrowSouth,e.northArrowSouthMiddleWest,e.northArrowSouthMiddleEast,e.northArrowSouthWest,e.northArrowSouthEast,e.viewportStickyNorth],limiter:Ou,fitInViewport:!0},t),o=Lu._getOptimalPosition(n),i=parseInt(o.left),r=parseInt(o.top),{name:s,config:a={}}=o,{withArrow:l=!0}=a;Object.assign(this,{top:r,left:i,position:s,withArrow:l})}pin(t){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(t):this._stopPinning()},this._startPinning(t),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(t){this.attachTo(t);const e=Hu(t.target),n=t.limiter?Hu(t.limiter):Ou;this.listenTo(rs.document,"scroll",((o,i)=>{const r=i.target,s=e&&r.contains(e),a=n&&r.contains(n);!s&&!a&&e&&n||this.attachTo(t)}),{useCapture:!0}),this.listenTo(rs.window,"resize",(()=>{this.attachTo(t)}))}_stopPinning(){this.stopListening(rs.document,"scroll"),this.stopListening(rs.window,"resize")}}function Hu(t){return yo(t)?t:pa(t)?t.commonAncestorContainer:"function"==typeof t?Hu(t()):null}function qu({horizontalOffset:t=Lu.arrowHorizontalOffset,verticalOffset:e=Lu.arrowVerticalOffset,stickyVerticalOffset:n=Lu.stickyVerticalOffset,config:o}={}){return{northWestArrowSouthWest:(e,n)=>({top:i(e,n),left:e.left-t,name:"arrow_sw",...o&&{config:o}}),northWestArrowSouthMiddleWest:(e,n)=>({top:i(e,n),left:e.left-.25*n.width-t,name:"arrow_smw",...o&&{config:o}}),northWestArrowSouth:(t,e)=>({top:i(t,e),left:t.left-e.width/2,name:"arrow_s",...o&&{config:o}}),northWestArrowSouthMiddleEast:(e,n)=>({top:i(e,n),left:e.left-.75*n.width+t,name:"arrow_sme",...o&&{config:o}}),northWestArrowSouthEast:(e,n)=>({top:i(e,n),left:e.left-n.width+t,name:"arrow_se",...o&&{config:o}}),northArrowSouthWest:(e,n)=>({top:i(e,n),left:e.left+e.width/2-t,name:"arrow_sw",...o&&{config:o}}),northArrowSouthMiddleWest:(e,n)=>({top:i(e,n),left:e.left+e.width/2-.25*n.width-t,name:"arrow_smw",...o&&{config:o}}),northArrowSouth:(t,e)=>({top:i(t,e),left:t.left+t.width/2-e.width/2,name:"arrow_s",...o&&{config:o}}),northArrowSouthMiddleEast:(e,n)=>({top:i(e,n),left:e.left+e.width/2-.75*n.width+t,name:"arrow_sme",...o&&{config:o}}),northArrowSouthEast:(e,n)=>({top:i(e,n),left:e.left+e.width/2-n.width+t,name:"arrow_se",...o&&{config:o}}),northEastArrowSouthWest:(e,n)=>({top:i(e,n),left:e.right-t,name:"arrow_sw",...o&&{config:o}}),northEastArrowSouthMiddleWest:(e,n)=>({top:i(e,n),left:e.right-.25*n.width-t,name:"arrow_smw",...o&&{config:o}}),northEastArrowSouth:(t,e)=>({top:i(t,e),left:t.right-e.width/2,name:"arrow_s",...o&&{config:o}}),northEastArrowSouthMiddleEast:(e,n)=>({top:i(e,n),left:e.right-.75*n.width+t,name:"arrow_sme",...o&&{config:o}}),northEastArrowSouthEast:(e,n)=>({top:i(e,n),left:e.right-n.width+t,name:"arrow_se",...o&&{config:o}}),southWestArrowNorthWest:(e,n)=>({top:r(e),left:e.left-t,name:"arrow_nw",...o&&{config:o}}),southWestArrowNorthMiddleWest:(e,n)=>({top:r(e),left:e.left-.25*n.width-t,name:"arrow_nmw",...o&&{config:o}}),southWestArrowNorth:(t,e)=>({top:r(t),left:t.left-e.width/2,name:"arrow_n",...o&&{config:o}}),southWestArrowNorthMiddleEast:(e,n)=>({top:r(e),left:e.left-.75*n.width+t,name:"arrow_nme",...o&&{config:o}}),southWestArrowNorthEast:(e,n)=>({top:r(e),left:e.left-n.width+t,name:"arrow_ne",...o&&{config:o}}),southArrowNorthWest:(e,n)=>({top:r(e),left:e.left+e.width/2-t,name:"arrow_nw",...o&&{config:o}}),southArrowNorthMiddleWest:(e,n)=>({top:r(e),left:e.left+e.width/2-.25*n.width-t,name:"arrow_nmw",...o&&{config:o}}),southArrowNorth:(t,e)=>({top:r(t),left:t.left+t.width/2-e.width/2,name:"arrow_n",...o&&{config:o}}),southArrowNorthMiddleEast:(e,n)=>({top:r(e),left:e.left+e.width/2-.75*n.width+t,name:"arrow_nme",...o&&{config:o}}),southArrowNorthEast:(e,n)=>({top:r(e),left:e.left+e.width/2-n.width+t,name:"arrow_ne",...o&&{config:o}}),southEastArrowNorthWest:(e,n)=>({top:r(e),left:e.right-t,name:"arrow_nw",...o&&{config:o}}),southEastArrowNorthMiddleWest:(e,n)=>({top:r(e),left:e.right-.25*n.width-t,name:"arrow_nmw",...o&&{config:o}}),southEastArrowNorth:(t,e)=>({top:r(t),left:t.right-e.width/2,name:"arrow_n",...o&&{config:o}}),southEastArrowNorthMiddleEast:(e,n)=>({top:r(e),left:e.right-.75*n.width+t,name:"arrow_nme",...o&&{config:o}}),southEastArrowNorthEast:(e,n)=>({top:r(e),left:e.right-n.width+t,name:"arrow_ne",...o&&{config:o}}),viewportStickyNorth:(t,e,i)=>t.getIntersection(i)?{top:i.top+n,left:t.left+t.width/2-e.width/2,name:"arrowless",config:{withArrow:!1,...o}}:null};function i(t,n){return t.top-n.height-e}function r(t){return t.bottom+e}}Lu.arrowHorizontalOffset=25,Lu.arrowVerticalOffset=10,Lu.stickyVerticalOffset=20,Lu._getOptimalPosition=Lh,Lu.defaultPositions=qu();const Wu='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z"/></svg>';var Uu=n(4650),ju={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Uu.Z,ju);Uu.Z.locals;var $u=n(7676),Gu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()($u.Z,Gu);$u.Z.locals;const Ku=Vu("px");class Zu extends ge{static get pluginName(){return"ContextualBalloon"}constructor(t){super(t),this.positionLimiter=()=>{const t=this.editor.editing.view,e=t.document.selection.editableElement;return e?t.domConverter.mapViewToDom(e.root):null},this.set("visibleView",null),this.view=new Lu(t.locale),t.ui.view.body.add(this.view),t.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()}destroy(){super.destroy(),this.view.destroy(),this._rotatorView.destroy(),this._fakePanelsView.destroy()}hasView(t){return Array.from(this._viewToStack.keys()).includes(t)}add(t){if(this.hasView(t.view))throw new a("contextualballoon-add-view-exist",[this,t]);const e=t.stackId||"main";if(!this._idToStack.has(e))return this._idToStack.set(e,new Map([[t.view,t]])),this._viewToStack.set(t.view,this._idToStack.get(e)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!t.singleViewMode||this.showStack(e));const n=this._idToStack.get(e);t.singleViewMode&&this.showStack(e),n.set(t.view,t),this._viewToStack.set(t.view,n),n===this._visibleStack&&this._showView(t)}remove(t){if(!this.hasView(t))throw new a("contextualballoon-remove-view-not-exist",[this,t]);const e=this._viewToStack.get(t);this._singleViewMode&&this.visibleView===t&&(this._singleViewMode=!1),this.visibleView===t&&(1===e.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(e.values())[e.size-2])),1===e.size?(this._idToStack.delete(this._getStackId(e)),this._numberOfStacks=this._idToStack.size):e.delete(t),this._viewToStack.delete(t)}updatePosition(t){t&&(this._visibleStack.get(this.visibleView).position=t),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(t){this.visibleStack=t;const e=this._idToStack.get(t);if(!e)throw new a("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==e&&this._showView(Array.from(e.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(t){return Array.from(this._idToStack.entries()).find((e=>e[1]===t))[0]}_showNextStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)+1;t[e]||(e=0),this.showStack(this._getStackId(t[e]))}_showPrevStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)-1;t[e]||(e=t.length-1),this.showStack(this._getStackId(t[e]))}_createRotatorView(){const t=new Ju(this.editor.locale),e=this.editor.locale.t;return this.view.content.add(t),t.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",((t,e)=>!e&&t>1)),t.on("change:isNavigationVisible",(()=>this.updatePosition()),{priority:"low"}),t.bind("counter").to(this,"visibleView",this,"_numberOfStacks",((t,n)=>{if(n<2)return"";const o=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return e("%0 of %1",[o,n])})),t.buttonNextView.on("execute",(()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()})),t.buttonPrevView.on("execute",(()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()})),t}_createFakePanelsView(){const t=new Yu(this.editor.locale,this.view);return t.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",((t,e)=>!e&&t>=2?Math.min(t-1,2):0)),t.listenTo(this.view,"change:top",(()=>t.updatePosition())),t.listenTo(this.view,"change:left",(()=>t.updatePosition())),this.editor.ui.view.body.add(t),t}_showView({view:t,balloonClassName:e="",withArrow:n=!0,singleViewMode:o=!1}){this.view.class=e,this.view.withArrow=n,this._rotatorView.showView(t),this.visibleView=t,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),o&&(this._singleViewMode=!0)}_getBalloonPosition(){let t=Array.from(this._visibleStack.values()).pop().position;return t&&(t.limiter||(t=Object.assign({},t,{limiter:this.positionLimiter})),t=Object.assign({},t,{viewportOffsetConfig:this.editor.ui.viewportOffset})),t}}class Ju extends Wd{constructor(t){super(t);const e=t.t,n=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new Ea,this.buttonPrevView=this._createButtonView(e("Previous"),Wu),this.buttonNextView=this._createButtonView(e("Next"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382l-4.043 4.042z"/></svg>'),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",n.to("isNavigationVisible",(t=>t?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:n.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(t){this.hideView(),this.content.add(t)}hideView(){this.content.clear()}_createButtonView(t,e){const n=new wh(this.locale);return n.set({label:t,icon:e,tooltip:!0}),n}}class Yu extends Wd{constructor(t,e){super(t);const n=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=e,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",n.to("numberOfPanels",(t=>t?"":"ck-hidden"))],style:{top:n.to("top",Ku),left:n.to("left",Ku),width:n.to("width",Ku),height:n.to("height",Ku)}},children:this.content}),this.on("change:numberOfPanels",((t,e,n,o)=>{n>o?this._addPanels(n-o):this._removePanels(o-n),this.updatePosition()}))}_addPanels(t){for(;t--;){const t=new Wd;t.setTemplate({tag:"div"}),this.content.add(t),this.registerChild(t)}}_removePanels(t){for(;t--;){const t=this.content.last;this.content.remove(t),this.deregisterChild(t),t.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:t,left:e}=this._balloonPanelView,{width:n,height:o}=new ka(this._balloonPanelView.element);Object.assign(this,{top:t,left:e,width:n,height:o})}}}var Qu=n(5868),Xu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Qu.Z,Xu);Qu.Z.locals,Vu("px");const tg=Vu("px");class eg extends ge{static get pluginName(){return"BalloonToolbar"}static get requires(){return[Zu]}constructor(t){super(t),this._balloonConfig=$h(t.config.get("balloonToolbar")),this.toolbarView=this._createToolbarView(),this.focusTracker=new Ea,t.ui.once("ready",(()=>{this.focusTracker.add(t.ui.getEditableElement()),this.focusTracker.add(this.toolbarView.element)})),this._resizeObserver=null,this._balloon=t.plugins.get(Zu),this._fireSelectionChangeDebounced=aa((()=>this.fire("_selectionChangeDebounced")),200),this.decorate("show")}init(){const t=this.editor,e=t.model.document.selection;this.listenTo(this.focusTracker,"change:isFocused",((t,e,n)=>{const o=this._balloon.visibleView===this.toolbarView;!n&&o?this.hide():n&&this.show()})),this.listenTo(e,"change:range",((t,n)=>{(n.directChange||e.isCollapsed)&&this.hide(),this._fireSelectionChangeDebounced()})),this.listenTo(this,"_selectionChangeDebounced",(()=>{this.editor.editing.view.document.isFocused&&this.show()})),this._balloonConfig.shouldNotGroupWhenFull||this.listenTo(t,"ready",(()=>{const e=t.ui.view.editable.element;this._resizeObserver=new Aa(e,(()=>{this.toolbarView.maxWidth=tg(.9*new ka(e).width)}))})),this.listenTo(this.toolbarView,"groupedItemsUpdate",(()=>{this._updatePosition()}))}afterInit(){const t=this.editor.ui.componentFactory;this.toolbarView.fillFromConfig(this._balloonConfig,t)}_createToolbarView(){const t=!this._balloonConfig.shouldNotGroupWhenFull,e=new Zh(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return e.render(),e}show(){const t=this.editor,e=t.model.document.selection,n=t.model.schema;this._balloon.hasView(this.toolbarView)||e.isCollapsed||function(t,e){if(1===t.rangeCount)return!1;return[...t.getRanges()].every((t=>{const n=t.getContainedElement();return n&&e.isSelectable(n)}))}(e,n)||Array.from(this.toolbarView.items).every((t=>void 0!==t.isEnabled&&!t.isEnabled))||(this.listenTo(this.editor.ui,"update",(()=>{this._updatePosition()})),this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:"ck-toolbar-container"}))}hide(){this._balloon.hasView(this.toolbarView)&&(this.stopListening(this.editor.ui,"update"),this._balloon.remove(this.toolbarView))}_getBalloonPositionData(){const t=this.editor.editing.view,e=t.document,n=e.selection,o=e.selection.isBackward;return{target:()=>{const e=o?n.getFirstRange():n.getLastRange(),i=ka.getDomRangeRects(t.domConverter.viewRangeToDom(e));return o?i[0]:(i.length>1&&0===i[i.length-1].width&&i.pop(),i[i.length-1])},positions:this._getBalloonPositions(o)}}_updatePosition(){this._balloon.updatePosition(this._getBalloonPositionData())}destroy(){super.destroy(),this.stopListening(),this._fireSelectionChangeDebounced.cancel(),this.toolbarView.destroy(),this.focusTracker.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getBalloonPositions(t){const e=ar.isSafari&&ar.isiOS?qu({verticalOffset:Math.max(Lu.arrowVerticalOffset,Math.round(20/rs.window.visualViewport.scale))}):Lu.defaultPositions;return t?[e.northWestArrowSouth,e.northWestArrowSouthWest,e.northWestArrowSouthEast,e.northWestArrowSouthMiddleEast,e.northWestArrowSouthMiddleWest,e.southWestArrowNorth,e.southWestArrowNorthWest,e.southWestArrowNorthEast,e.southWestArrowNorthMiddleWest,e.southWestArrowNorthMiddleEast]:[e.southEastArrowNorth,e.southEastArrowNorthEast,e.southEastArrowNorthWest,e.southEastArrowNorthMiddleEast,e.southEastArrowNorthMiddleWest,e.northEastArrowSouth,e.northEastArrowSouthEast,e.northEastArrowSouthWest,e.northEastArrowSouthMiddleEast,e.northEastArrowSouthMiddleWest]}}var ng=n(9695),og={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(ng.Z,og);ng.Z.locals;const ig=Vu("px");class rg extends wh{constructor(t){super(t);const e=this.bindTemplate;this.isVisible=!1,this.isToggleable=!0,this.set("top",0),this.set("left",0),this.extendTemplate({attributes:{class:"ck-block-toolbar-button",style:{top:e.to("top",(t=>ig(t))),left:e.to("left",(t=>ig(t)))}}})}}const sg=Vu("px");var ag=n(4717),lg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(ag.Z,lg);ag.Z.locals;const cg=new WeakMap;function dg(t){const{view:e,element:n,text:o,isDirectHost:i=!0,keepOnFocus:r=!1}=t,s=e.document;cg.has(s)||(cg.set(s,new Map),s.registerPostFixer((t=>ug(s,t)))),cg.get(s).set(n,{text:o,isDirectHost:i,keepOnFocus:r,hostElement:i?n:null}),e.change((t=>ug(s,t)))}function hg(t,e){return!!e.hasClass("ck-placeholder")&&(t.removeClass("ck-placeholder",e),!0)}function ug(t,e){const n=cg.get(t),o=[];let i=!1;for(const[t,r]of n)r.isDirectHost&&(o.push(t),gg(e,t,r)&&(i=!0));for(const[t,r]of n){if(r.isDirectHost)continue;const n=mg(t);n&&(o.includes(n)||(r.hostElement=n,gg(e,t,r)&&(i=!0)))}return i}function gg(t,e,n){const{text:o,isDirectHost:i,hostElement:r}=n;let s=!1;r.getAttribute("data-placeholder")!==o&&(t.setAttribute("data-placeholder",o,r),s=!0);return(i||1==e.childCount)&&function(t,e){if(!t.isAttached())return!1;const n=Array.from(t.getChildren()).some((t=>!t.is("uiElement")));if(n)return!1;if(e)return!0;const o=t.document;if(!o.isFocused)return!0;const i=o.selection.anchor;return i&&i.parent!==t}(r,n.keepOnFocus)?function(t,e){return!e.hasClass("ck-placeholder")&&(t.addClass("ck-placeholder",e),!0)}(t,r)&&(s=!0):hg(t,r)&&(s=!0),s}function mg(t){if(t.childCount){const e=t.getChild(0);if(e.is("element")&&!e.is("uiElement"))return e}return null}const pg=new Map;function fg(t,e,n){let o=pg.get(t);o||(o=new Map,pg.set(t,o)),o.set(e,n)}function bg(t){return[t]}function kg(t,e,n={}){const o=function(t,e){const n=pg.get(t);return n&&n.has(e)?n.get(e):bg}(t.constructor,e.constructor);try{return o(t=t.clone(),e,n)}catch(t){throw t}}function wg(t,e,n){t=t.slice(),e=e.slice();const o=new Cg(n.document,n.useRelations,n.forceWeakRemove);o.setOriginalOperations(t),o.setOriginalOperations(e);const i=o.originalOperations;if(0==t.length||0==e.length)return{operationsA:t,operationsB:e,originalOperations:i};const r=new WeakMap;for(const e of t)r.set(e,0);const s={nextBaseVersionA:t[t.length-1].baseVersion+1,nextBaseVersionB:e[e.length-1].baseVersion+1,originalOperationsACount:t.length,originalOperationsBCount:e.length};let a=0;for(;a<t.length;){const n=t[a],i=r.get(n);if(i==e.length){a++;continue}const s=e[i],l=kg(n,s,o.getContext(n,s,!0)),c=kg(s,n,o.getContext(s,n,!1));o.updateRelation(n,s),o.setOriginalOperations(l,n),o.setOriginalOperations(c,s);for(const t of l)r.set(t,i+c.length);t.splice(a,1,...l),e.splice(i,1,...c)}if(n.padWithNoOps){const n=t.length-s.originalOperationsACount,o=e.length-s.originalOperationsBCount;_g(t,o-n),_g(e,n-o)}return Ag(t,s.nextBaseVersionB),Ag(e,s.nextBaseVersionA),{operationsA:t,operationsB:e,originalOperations:i}}class Cg{constructor(t,e,n=!1){this.originalOperations=new Map,this._history=t.history,this._useRelations=e,this._forceWeakRemove=!!n,this._relations=new Map}setOriginalOperations(t,e=null){const n=e?this.originalOperations.get(e):null;for(const e of t)this.originalOperations.set(e,n||e)}updateRelation(t,e){switch(t.constructor){case Ec:switch(e.constructor){case Ic:t.targetPosition.isEqual(e.sourcePosition)||e.movedRange.containsPosition(t.targetPosition)?this._setRelation(t,e,"insertAtSource"):t.targetPosition.isEqual(e.deletionPosition)?this._setRelation(t,e,"insertBetween"):t.targetPosition.isAfter(e.sourcePosition)&&this._setRelation(t,e,"moveTargetAfter");break;case Ec:t.targetPosition.isEqual(e.sourcePosition)||t.targetPosition.isBefore(e.sourcePosition)?this._setRelation(t,e,"insertBefore"):this._setRelation(t,e,"insertAfter")}break;case Pc:switch(e.constructor){case Ic:t.splitPosition.isBefore(e.sourcePosition)&&this._setRelation(t,e,"splitBefore");break;case Ec:if(t.splitPosition.isEqual(e.sourcePosition)||t.splitPosition.isBefore(e.sourcePosition))this._setRelation(t,e,"splitBefore");else{const n=Ya._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.splitPosition)){const o=n.end.offset-t.splitPosition.offset,i=t.splitPosition.offset-n.start.offset;this._setRelation(t,e,{howMany:o,offset:i})}}}break;case Ic:switch(e.constructor){case Ic:t.targetPosition.isEqual(e.sourcePosition)||this._setRelation(t,e,"mergeTargetNotMoved"),t.sourcePosition.isEqual(e.targetPosition)&&this._setRelation(t,e,"mergeSourceNotMoved"),t.sourcePosition.isEqual(e.sourcePosition)&&this._setRelation(t,e,"mergeSameElement");break;case Pc:t.sourcePosition.isEqual(e.splitPosition)&&this._setRelation(t,e,"splitAtSource")}break;case Tc:{const n=t.newRange;if(!n)return;switch(e.constructor){case Ec:{const o=Ya._createFromPositionAndShift(e.sourcePosition,e.howMany),i=o.containsPosition(n.start)||o.start.isEqual(n.start),r=o.containsPosition(n.end)||o.end.isEqual(n.end);!i&&!r||o.containsRange(n)||this._setRelation(t,e,{side:i?"left":"right",path:i?n.start.path.slice():n.end.path.slice()});break}case Ic:{const o=n.start.isEqual(e.targetPosition),i=n.start.isEqual(e.deletionPosition),r=n.end.isEqual(e.deletionPosition),s=n.end.isEqual(e.sourcePosition);(o||i||r||s)&&this._setRelation(t,e,{wasInLeftElement:o,wasStartBeforeMergedElement:i,wasEndBeforeMergedElement:r,wasInRightElement:s});break}}break}}}getContext(t,e,n){return{aIsStrong:n,aWasUndone:this._wasUndone(t),bWasUndone:this._wasUndone(e),abRelation:this._useRelations?this._getRelation(t,e):null,baRelation:this._useRelations?this._getRelation(e,t):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(t){const e=this.originalOperations.get(t);return e.wasUndone||this._history.isUndoneOperation(e)}_getRelation(t,e){const n=this.originalOperations.get(e),o=this._history.getUndoneOperation(n);if(!o)return null;const i=this.originalOperations.get(t),r=this._relations.get(i);return r&&r.get(o)||null}_setRelation(t,e,n){const o=this.originalOperations.get(t),i=this.originalOperations.get(e);let r=this._relations.get(o);r||(r=new Map,this._relations.set(o,r)),r.set(i,n)}}function Ag(t,e){for(const n of t)n.baseVersion=e++}function _g(t,e){for(let n=0;n<e;n++)t.push(new td(0))}function vg(t,e,n){const o=t.nodes.getNode(0).getAttribute(e);if(o==n)return null;const i=new Ya(t.position,t.position.getShiftedBy(t.howMany));return new yc(i,e,o,n,0)}function yg(t,e){return null===t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany)}function xg(t,e){const n=[];for(let o=0;o<t.length;o++){const i=t[o],r=new Ec(i.start,i.end.offset-i.start.offset,e,0);n.push(r);for(let e=o+1;e<t.length;e++)t[e]=t[e]._getTransformedByMove(r.sourcePosition,r.targetPosition,r.howMany)[0];e=e._getTransformedByMove(r.sourcePosition,r.targetPosition,r.howMany)}return n}fg(yc,yc,((t,e,n)=>{if(t.key===e.key&&t.range.start.hasSameParentAs(e.range.start)){const o=t.range.getDifference(e.range).map((e=>new yc(e,t.key,t.oldValue,t.newValue,0))),i=t.range.getIntersection(e.range);return i&&n.aIsStrong&&o.push(new yc(i,e.key,e.newValue,t.newValue,0)),0==o.length?[new td(0)]:o}return[t]})),fg(yc,Sc,((t,e)=>{if(t.range.start.hasSameParentAs(e.position)&&t.range.containsPosition(e.position)){const n=t.range._getTransformedByInsertion(e.position,e.howMany,!e.shouldReceiveAttributes).map((e=>new yc(e,t.key,t.oldValue,t.newValue,t.baseVersion)));if(e.shouldReceiveAttributes){const o=vg(e,t.key,t.oldValue);o&&n.unshift(o)}return n}return t.range=t.range._getTransformedByInsertion(e.position,e.howMany,!1)[0],[t]})),fg(yc,Ic,((t,e)=>{const n=[];t.range.start.hasSameParentAs(e.deletionPosition)&&(t.range.containsPosition(e.deletionPosition)||t.range.start.isEqual(e.deletionPosition))&&n.push(Ya._createFromPositionAndShift(e.graveyardPosition,1));const o=t.range._getTransformedByMergeOperation(e);return o.isCollapsed||n.push(o),n.map((e=>new yc(e,t.key,t.oldValue,t.newValue,t.baseVersion)))})),fg(yc,Ec,((t,e)=>{const n=function(t,e){const n=Ya._createFromPositionAndShift(e.sourcePosition,e.howMany);let o=null,i=[];n.containsRange(t,!0)?o=t:t.start.hasSameParentAs(n.start)?(i=t.getDifference(n),o=t.getIntersection(n)):i=[t];const r=[];for(let t of i){t=t._getTransformedByDeletion(e.sourcePosition,e.howMany);const n=e.getMovedRangeStart(),o=t.start.hasSameParentAs(n);t=t._getTransformedByInsertion(n,e.howMany,o),r.push(...t)}o&&r.push(o._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany,!1)[0]);return r}(t.range,e);return n.map((e=>new yc(e,t.key,t.oldValue,t.newValue,t.baseVersion)))})),fg(yc,Pc,((t,e)=>{if(t.range.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.range.end.offset++,[t];if(t.range.start.hasSameParentAs(e.splitPosition)&&t.range.containsPosition(e.splitPosition)){const n=t.clone();return n.range=new Ya(e.moveTargetPosition.clone(),t.range.end._getCombined(e.splitPosition,e.moveTargetPosition)),t.range.end=e.splitPosition.clone(),t.range.end.stickiness="toPrevious",[t,n]}return t.range=t.range._getTransformedBySplitOperation(e),[t]})),fg(Sc,yc,((t,e)=>{const n=[t];if(t.shouldReceiveAttributes&&t.position.hasSameParentAs(e.range.start)&&e.range.containsPosition(t.position)){const o=vg(t,e.key,e.newValue);o&&n.push(o)}return n})),fg(Sc,Sc,((t,e,n)=>(t.position.isEqual(e.position)&&n.aIsStrong||(t.position=t.position._getTransformedByInsertOperation(e)),[t]))),fg(Sc,Ec,((t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t]))),fg(Sc,Pc,((t,e)=>(t.position=t.position._getTransformedBySplitOperation(e),[t]))),fg(Sc,Ic,((t,e)=>(t.position=t.position._getTransformedByMergeOperation(e),[t]))),fg(Tc,Sc,((t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByInsertOperation(e)[0]),t.newRange&&(t.newRange=t.newRange._getTransformedByInsertOperation(e)[0]),[t]))),fg(Tc,Tc,((t,e,n)=>{if(t.name==e.name){if(!n.aIsStrong)return[new td(0)];t.oldRange=e.newRange?e.newRange.clone():null}return[t]})),fg(Tc,Ic,((t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByMergeOperation(e)),t.newRange&&(t.newRange=t.newRange._getTransformedByMergeOperation(e)),[t]))),fg(Tc,Ec,((t,e,n)=>{if(t.oldRange&&(t.oldRange=Ya._createFromRanges(t.oldRange._getTransformedByMoveOperation(e))),t.newRange){if(n.abRelation){const o=Ya._createFromRanges(t.newRange._getTransformedByMoveOperation(e));if("left"==n.abRelation.side&&e.targetPosition.isEqual(t.newRange.start))return t.newRange.start.path=n.abRelation.path,t.newRange.end=o.end,[t];if("right"==n.abRelation.side&&e.targetPosition.isEqual(t.newRange.end))return t.newRange.start=o.start,t.newRange.end.path=n.abRelation.path,[t]}t.newRange=Ya._createFromRanges(t.newRange._getTransformedByMoveOperation(e))}return[t]})),fg(Tc,Pc,((t,e,n)=>{if(t.oldRange&&(t.oldRange=t.oldRange._getTransformedBySplitOperation(e)),t.newRange){if(n.abRelation){const o=t.newRange._getTransformedBySplitOperation(e);return t.newRange.start.isEqual(e.splitPosition)&&n.abRelation.wasStartBeforeMergedElement?t.newRange.start=Ga._createAt(e.insertionPosition):t.newRange.start.isEqual(e.splitPosition)&&!n.abRelation.wasInLeftElement&&(t.newRange.start=Ga._createAt(e.moveTargetPosition)),t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasInRightElement?t.newRange.end=Ga._createAt(e.moveTargetPosition):t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasEndBeforeMergedElement?t.newRange.end=Ga._createAt(e.insertionPosition):t.newRange.end=o.end,[t]}t.newRange=t.newRange._getTransformedBySplitOperation(e)}return[t]})),fg(Ic,Sc,((t,e)=>(t.sourcePosition.hasSameParentAs(e.position)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByInsertOperation(e),t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e),[t]))),fg(Ic,Ic,((t,e,n)=>{if(t.sourcePosition.isEqual(e.sourcePosition)&&t.targetPosition.isEqual(e.targetPosition)){if(n.bWasUndone){const n=e.graveyardPosition.path.slice();return n.push(0),t.sourcePosition=new Ga(e.graveyardPosition.root,n),t.howMany=0,[t]}return[new td(0)]}if(t.sourcePosition.isEqual(e.sourcePosition)&&!t.targetPosition.isEqual(e.targetPosition)&&!n.bWasUndone&&"splitAtSource"!=n.abRelation){const o="$graveyard"==t.targetPosition.root.rootName,i="$graveyard"==e.targetPosition.root.rootName,r=o&&!i;if(i&&!o||!r&&n.aIsStrong){const n=e.targetPosition._getTransformedByMergeOperation(e),o=t.targetPosition._getTransformedByMergeOperation(e);return[new Ec(n,t.howMany,o,0)]}return[new td(0)]}return t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMergeOperation(e),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),t.graveyardPosition.isEqual(e.graveyardPosition)&&n.aIsStrong||(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]})),fg(Ic,Ec,((t,e,n)=>{const o=Ya._createFromPositionAndShift(e.sourcePosition,e.howMany);return"remove"==e.type&&!n.bWasUndone&&!n.forceWeakRemove&&t.deletionPosition.hasSameParentAs(e.sourcePosition)&&o.containsPosition(t.sourcePosition)?[new td(0)]:(t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition.hasSameParentAs(e.sourcePosition)&&(t.howMany-=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMoveOperation(e),t.targetPosition=t.targetPosition._getTransformedByMoveOperation(e),t.graveyardPosition.isEqual(e.targetPosition)||(t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)),[t])})),fg(Ic,Pc,((t,e,n)=>{if(e.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByDeletion(e.graveyardPosition,1),t.deletionPosition.isEqual(e.graveyardPosition)&&(t.howMany=e.howMany)),t.targetPosition.isEqual(e.splitPosition)){const o=0!=e.howMany,i=e.graveyardPosition&&t.deletionPosition.isEqual(e.graveyardPosition);if(o||i||"mergeTargetNotMoved"==n.abRelation)return t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),[t]}if(t.sourcePosition.isEqual(e.splitPosition)){if("mergeSourceNotMoved"==n.abRelation)return t.howMany=0,t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t];if("mergeSameElement"==n.abRelation||t.sourcePosition.offset>0)return t.sourcePosition=e.moveTargetPosition.clone(),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]}return t.sourcePosition.hasSameParentAs(e.splitPosition)&&(t.howMany=e.splitPosition.offset),t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]})),fg(Ec,Sc,((t,e)=>{const n=Ya._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByInsertOperation(e,!1)[0];return t.sourcePosition=n.start,t.howMany=n.end.offset-n.start.offset,t.targetPosition.isEqual(e.position)||(t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e)),[t]})),fg(Ec,Ec,((t,e,n)=>{const o=Ya._createFromPositionAndShift(t.sourcePosition,t.howMany),i=Ya._createFromPositionAndShift(e.sourcePosition,e.howMany);let r,s=n.aIsStrong,a=!n.aIsStrong;if("insertBefore"==n.abRelation||"insertAfter"==n.baRelation?a=!0:"insertAfter"!=n.abRelation&&"insertBefore"!=n.baRelation||(a=!1),r=t.targetPosition.isEqual(e.targetPosition)&&a?t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany):t.targetPosition._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),yg(t,e)&&yg(e,t))return[e.getReversed()];if(o.containsPosition(e.targetPosition)&&o.containsRange(i,!0))return o.start=o.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),o.end=o.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),xg([o],r);if(i.containsPosition(t.targetPosition)&&i.containsRange(o,!0))return o.start=o.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),o.end=o.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),xg([o],r);const l=Mo(t.sourcePosition.getParentPath(),e.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return o.start=o.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),o.end=o.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),xg([o],r);"remove"!=t.type||"remove"==e.type||n.aWasUndone||n.forceWeakRemove?"remove"==t.type||"remove"!=e.type||n.bWasUndone||n.forceWeakRemove||(s=!1):s=!0;const c=[],d=o.getDifference(i);for(const t of d){t.start=t.start._getTransformedByDeletion(e.sourcePosition,e.howMany),t.end=t.end._getTransformedByDeletion(e.sourcePosition,e.howMany);const n="same"==Mo(t.start.getParentPath(),e.getMovedRangeStart().getParentPath()),o=t._getTransformedByInsertion(e.getMovedRangeStart(),e.howMany,n);c.push(...o)}const h=o.getIntersection(i);return null!==h&&s&&(h.start=h.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),h.end=h.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),0===c.length?c.push(h):1==c.length?i.start.isBefore(o.start)||i.start.isEqual(o.start)?c.unshift(h):c.push(h):c.splice(1,0,h)),0===c.length?[new td(t.baseVersion)]:xg(c,r)})),fg(Ec,Pc,((t,e,n)=>{let o=t.targetPosition.clone();t.targetPosition.isEqual(e.insertionPosition)&&e.graveyardPosition&&"moveTargetAfter"!=n.abRelation||(o=t.targetPosition._getTransformedBySplitOperation(e));const i=Ya._createFromPositionAndShift(t.sourcePosition,t.howMany);if(i.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.howMany++,t.targetPosition=o,[t];if(i.start.hasSameParentAs(e.splitPosition)&&i.containsPosition(e.splitPosition)){let t=new Ya(e.splitPosition,i.end);t=t._getTransformedBySplitOperation(e);return xg([new Ya(i.start,e.splitPosition),t],o)}t.targetPosition.isEqual(e.splitPosition)&&"insertAtSource"==n.abRelation&&(o=e.moveTargetPosition),t.targetPosition.isEqual(e.insertionPosition)&&"insertBetween"==n.abRelation&&(o=t.targetPosition);const r=[i._getTransformedBySplitOperation(e)];if(e.graveyardPosition){const o=i.start.isEqual(e.graveyardPosition)||i.containsPosition(e.graveyardPosition);t.howMany>1&&o&&!n.aWasUndone&&r.push(Ya._createFromPositionAndShift(e.insertionPosition,1))}return xg(r,o)})),fg(Ec,Ic,((t,e,n)=>{const o=Ya._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.deletionPosition.hasSameParentAs(t.sourcePosition)&&o.containsPosition(e.sourcePosition))if("remove"!=t.type||n.forceWeakRemove){if(1==t.howMany)return n.bWasUndone?(t.sourcePosition=e.graveyardPosition.clone(),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]):[new td(0)]}else if(!n.aWasUndone){const n=[];let o=e.graveyardPosition.clone(),i=e.targetPosition._getTransformedByMergeOperation(e);t.howMany>1&&(n.push(new Ec(t.sourcePosition,t.howMany-1,t.targetPosition,0)),o=o._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1),i=i._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1));const r=e.deletionPosition._getCombined(t.sourcePosition,t.targetPosition),s=new Ec(o,1,r,0),a=s.getMovedRangeStart().path.slice();a.push(0);const l=new Ga(s.targetPosition.root,a);i=i._getTransformedByMove(o,r,1);const c=new Ec(i,e.howMany,l,0);return n.push(s),n.push(c),n}const i=Ya._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByMergeOperation(e);return t.sourcePosition=i.start,t.howMany=i.end.offset-i.start.offset,t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]})),fg(Bc,Sc,((t,e)=>(t.position=t.position._getTransformedByInsertOperation(e),[t]))),fg(Bc,Ic,((t,e)=>t.position.isEqual(e.deletionPosition)?(t.position=e.graveyardPosition.clone(),t.position.stickiness="toNext",[t]):(t.position=t.position._getTransformedByMergeOperation(e),[t]))),fg(Bc,Ec,((t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t]))),fg(Bc,Bc,((t,e,n)=>{if(t.position.isEqual(e.position)){if(!n.aIsStrong)return[new td(0)];t.oldName=e.newName}return[t]})),fg(Bc,Pc,((t,e)=>{if("same"==Mo(t.position.path,e.splitPosition.getParentPath())&&!e.graveyardPosition){const e=new Bc(t.position.getShiftedBy(1),t.oldName,t.newName,0);return[t,e]}return t.position=t.position._getTransformedBySplitOperation(e),[t]})),fg(Dc,Dc,((t,e,n)=>{if(t.root===e.root&&t.key===e.key){if(!n.aIsStrong||t.newValue===e.newValue)return[new td(0)];t.oldValue=e.newValue}return[t]})),fg(Pc,Sc,((t,e)=>(t.splitPosition.hasSameParentAs(e.position)&&t.splitPosition.offset<e.position.offset&&(t.howMany+=e.howMany),t.splitPosition=t.splitPosition._getTransformedByInsertOperation(e),t.insertionPosition=t.insertionPosition._getTransformedByInsertOperation(e),[t]))),fg(Pc,Ic,((t,e,n)=>{if(!t.graveyardPosition&&!n.bWasUndone&&t.splitPosition.hasSameParentAs(e.sourcePosition)){const n=e.graveyardPosition.path.slice();n.push(0);const o=new Ga(e.graveyardPosition.root,n),i=Pc.getInsertionPosition(new Ga(e.graveyardPosition.root,n)),r=new Pc(o,0,i,null,0);return t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=Pc.getInsertionPosition(t.splitPosition),t.graveyardPosition=r.insertionPosition.clone(),t.graveyardPosition.stickiness="toNext",[r,t]}return t.splitPosition.hasSameParentAs(e.deletionPosition)&&!t.splitPosition.isAfter(e.deletionPosition)&&t.howMany--,t.splitPosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=Pc.getInsertionPosition(t.splitPosition),t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]})),fg(Pc,Ec,((t,e,n)=>{const o=Ya._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.graveyardPosition){const i=o.start.isEqual(t.graveyardPosition)||o.containsPosition(t.graveyardPosition);if(!n.bWasUndone&&i){const n=t.splitPosition._getTransformedByMoveOperation(e),o=t.graveyardPosition._getTransformedByMoveOperation(e),i=o.path.slice();i.push(0);const r=new Ga(o.root,i);return[new Ec(n,t.howMany,r,0)]}t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}const i=t.splitPosition.isEqual(e.targetPosition);if(i&&("insertAtSource"==n.baRelation||"splitBefore"==n.abRelation))return t.howMany+=e.howMany,t.splitPosition=t.splitPosition._getTransformedByDeletion(e.sourcePosition,e.howMany),t.insertionPosition=Pc.getInsertionPosition(t.splitPosition),[t];if(i&&n.abRelation&&n.abRelation.howMany){const{howMany:e,offset:o}=n.abRelation;return t.howMany+=e,t.splitPosition=t.splitPosition.getShiftedBy(o),[t]}if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&o.containsPosition(t.splitPosition)){const n=e.howMany-(t.splitPosition.offset-e.sourcePosition.offset);return t.howMany-=n,t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset<e.targetPosition.offset&&(t.howMany+=e.howMany),t.splitPosition=e.sourcePosition.clone(),t.insertionPosition=Pc.getInsertionPosition(t.splitPosition),[t]}return e.sourcePosition.isEqual(e.targetPosition)||(t.splitPosition.hasSameParentAs(e.sourcePosition)&&t.splitPosition.offset<=e.sourcePosition.offset&&(t.howMany-=e.howMany),t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset<e.targetPosition.offset&&(t.howMany+=e.howMany)),t.splitPosition.stickiness="toNone",t.splitPosition=t.splitPosition._getTransformedByMoveOperation(e),t.splitPosition.stickiness="toNext",t.graveyardPosition?t.insertionPosition=t.insertionPosition._getTransformedByMoveOperation(e):t.insertionPosition=Pc.getInsertionPosition(t.splitPosition),[t]})),fg(Pc,Pc,((t,e,n)=>{if(t.splitPosition.isEqual(e.splitPosition)){if(!t.graveyardPosition&&!e.graveyardPosition)return[new td(0)];if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition))return[new td(0)];if("splitBefore"==n.abRelation)return t.howMany=0,t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e),[t]}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){const o="$graveyard"==t.splitPosition.root.rootName,i="$graveyard"==e.splitPosition.root.rootName,r=o&&!i;if(i&&!o||!r&&n.aIsStrong){const n=[];return e.howMany&&n.push(new Ec(e.moveTargetPosition,e.howMany,e.splitPosition,0)),t.howMany&&n.push(new Ec(t.splitPosition,t.howMany,t.moveTargetPosition,0)),n}return[new td(0)]}if(t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e)),t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==n.abRelation)return t.howMany++,[t];if(e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==n.baRelation){const n=e.insertionPosition.path.slice();n.push(0);const o=new Ga(e.insertionPosition.root,n);return[t,new Ec(t.insertionPosition,1,o,0)]}return t.splitPosition.hasSameParentAs(e.splitPosition)&&t.splitPosition.offset<e.splitPosition.offset&&(t.howMany-=e.howMany),t.splitPosition=t.splitPosition._getTransformedBySplitOperation(e),t.insertionPosition=Pc.getInsertionPosition(t.splitPosition),[t]}));class Eg extends Gs{constructor(t){super(t),this.domEventType="click"}onDomEvent(t){this.fire(t.type,t)}}class Sg extends Gs{constructor(t){super(t),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(t){this.fire(t.type,t)}}class Tg{constructor(t){this.document=t}createDocumentFragment(t){return new _r(this.document,t)}createElement(t,e,n){return new Ii(this.document,t,e,n)}createText(t){return new Ho(this.document,t)}clone(t,e=!1){return t._clone(e)}appendChild(t,e){return e._appendChild(t)}insertChild(t,e,n){return n._insertChild(t,e)}removeChildren(t,e,n){return n._removeChildren(t,e)}remove(t){const e=t.parent;return e?this.removeChildren(e.getChildIndex(t),1,e):[]}replace(t,e){const n=t.parent;if(n){const o=n.getChildIndex(t);return this.removeChildren(o,1,n),this.insertChild(o,e,n),!0}return!1}unwrapElement(t){const e=t.parent;if(e){const n=e.getChildIndex(t);this.remove(t),this.insertChild(n,t.getChildren(),e)}}rename(t,e){const n=new Ii(this.document,t,e.getAttributes(),e.getChildren());return this.replace(e,n)?n:null}setAttribute(t,e,n){n._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,n){xe(t)&&void 0===n&&(n=e),n._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,n){n._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}createPositionAt(t,e){return Oi._createAt(t,e)}createPositionAfter(t){return Oi._createAfter(t)}createPositionBefore(t){return Oi._createBefore(t)}createRange(t,e){return new Li(t,e)}createRangeOn(t){return Li._createOn(t)}createRangeIn(t){return Li._createIn(t)}createSelection(t,e,n){return new Wi(t,e,n)}}const Bg=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Dg=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,Ig=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,Pg=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,zg=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,Rg=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function Vg(t){return t.startsWith("#")?Bg.test(t):t.startsWith("rgb")?Dg.test(t)||Ig.test(t):t.startsWith("hsl")?Pg.test(t)||zg.test(t):Rg.has(t.toLowerCase())}const Fg=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function Ng(t){return Fg.includes(t)}const Mg=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function Og(t){return Mg.test(t)}const Lg=/^[+-]?[0-9]*([.][0-9]+)?%$/;function Hg(t){return Lg.test(t)}const qg=["repeat-x","repeat-y","repeat","space","round","no-repeat"];const Wg=["center","top","bottom","left","right"];function Ug(t){return Wg.includes(t)}const jg=["fixed","scroll","local"];function $g(t){return jg.includes(t)}const Gg=/^url\(/;function Kg(t){return Gg.test(t)}function Zg(t=""){if(""===t)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const e=Xg(t),n=e[0],o=e[2]||n,i=e[1]||n;return{top:n,bottom:o,right:i,left:e[3]||i}}function Jg(t){return e=>{const{top:n,right:o,bottom:i,left:r}=e,s=[];return[n,o,r,i].every((t=>!!t))?s.push([t,Yg(e)]):(n&&s.push([t+"-top",n]),o&&s.push([t+"-right",o]),i&&s.push([t+"-bottom",i]),r&&s.push([t+"-left",r])),s}}function Yg({top:t,right:e,bottom:n,left:o}){const i=[];return o!==e?i.push(t,e,n,o):n!==t?i.push(t,e,n):e!==t?i.push(t,e):i.push(t),i.join(" ")}function Qg(t){return e=>({path:t,value:Zg(e)})}function Xg(t){return t.replace(/, /g,",").split(" ").map((t=>t.replace(/,/g,", ")))}function tm(t){t.setNormalizer("background",em),t.setNormalizer("background-color",(t=>({path:"background.color",value:t}))),t.setReducer("background",(t=>{const e=[];return e.push(["background-color",t.color]),e})),t.setStyleRelation("background",["background-color"])}function em(t){const e={},n=Xg(t);for(const t of n)o=t,qg.includes(o)?(e.repeat=e.repeat||[],e.repeat.push(t)):Ug(t)?(e.position=e.position||[],e.position.push(t)):$g(t)?e.attachment=t:Vg(t)?e.color=t:Kg(t)&&(e.image=t);var o;return{path:"background",value:e}}function nm(t){t.setNormalizer("border",om),t.setNormalizer("border-top",im("top")),t.setNormalizer("border-right",im("right")),t.setNormalizer("border-bottom",im("bottom")),t.setNormalizer("border-left",im("left")),t.setNormalizer("border-color",rm("color")),t.setNormalizer("border-width",rm("width")),t.setNormalizer("border-style",rm("style")),t.setNormalizer("border-top-color",am("color","top")),t.setNormalizer("border-top-style",am("style","top")),t.setNormalizer("border-top-width",am("width","top")),t.setNormalizer("border-right-color",am("color","right")),t.setNormalizer("border-right-style",am("style","right")),t.setNormalizer("border-right-width",am("width","right")),t.setNormalizer("border-bottom-color",am("color","bottom")),t.setNormalizer("border-bottom-style",am("style","bottom")),t.setNormalizer("border-bottom-width",am("width","bottom")),t.setNormalizer("border-left-color",am("color","left")),t.setNormalizer("border-left-style",am("style","left")),t.setNormalizer("border-left-width",am("width","left")),t.setExtractor("border-top",lm("top")),t.setExtractor("border-right",lm("right")),t.setExtractor("border-bottom",lm("bottom")),t.setExtractor("border-left",lm("left")),t.setExtractor("border-top-color","border.color.top"),t.setExtractor("border-right-color","border.color.right"),t.setExtractor("border-bottom-color","border.color.bottom"),t.setExtractor("border-left-color","border.color.left"),t.setExtractor("border-top-width","border.width.top"),t.setExtractor("border-right-width","border.width.right"),t.setExtractor("border-bottom-width","border.width.bottom"),t.setExtractor("border-left-width","border.width.left"),t.setExtractor("border-top-style","border.style.top"),t.setExtractor("border-right-style","border.style.right"),t.setExtractor("border-bottom-style","border.style.bottom"),t.setExtractor("border-left-style","border.style.left"),t.setReducer("border-color",Jg("border-color")),t.setReducer("border-style",Jg("border-style")),t.setReducer("border-width",Jg("border-width")),t.setReducer("border-top",hm("top")),t.setReducer("border-right",hm("right")),t.setReducer("border-bottom",hm("bottom")),t.setReducer("border-left",hm("left")),t.setReducer("border",function(){return e=>{const n=cm(e,"top"),o=cm(e,"right"),i=cm(e,"bottom"),r=cm(e,"left"),s=[n,o,i,r],a={width:t(s,"width"),style:t(s,"style"),color:t(s,"color")},l=um(a,"all");if(l.length)return l;const c=Object.entries(a).reduce(((t,[e,n])=>(n&&(t.push([`border-${e}`,n]),s.forEach((t=>t[e]=null))),t)),[]);return[...c,...um(n,"top"),...um(o,"right"),...um(i,"bottom"),...um(r,"left")]};function t(t,e){return t.map((t=>t[e])).reduce(((t,e)=>t==e?t:null))}}()),t.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),t.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),t.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),t.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),t.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),t.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),t.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),t.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function om(t){const{color:e,style:n,width:o}=dm(t);return{path:"border",value:{color:Zg(e),style:Zg(n),width:Zg(o)}}}function im(t){return e=>{const{color:n,style:o,width:i}=dm(e),r={};return void 0!==n&&(r.color={[t]:n}),void 0!==o&&(r.style={[t]:o}),void 0!==i&&(r.width={[t]:i}),{path:"border",value:r}}}function rm(t){return e=>({path:"border",value:sm(e,t)})}function sm(t,e){return{[e]:Zg(t)}}function am(t,e){return n=>({path:"border",value:{[t]:{[e]:n}}})}function lm(t){return(e,n)=>{if(n.border)return cm(n.border,t)}}function cm(t,e){const n={};return t.width&&t.width[e]&&(n.width=t.width[e]),t.style&&t.style[e]&&(n.style=t.style[e]),t.color&&t.color[e]&&(n.color=t.color[e]),n}function dm(t){const e={},n=Xg(t);for(const t of n)Og(t)||/thin|medium|thick/.test(t)?e.width=t:Ng(t)?e.style=t:e.color=t;return e}function hm(t){return e=>um(e,t)}function um(t,e){const n=[];if(t&&t.width&&n.push("width"),t&&t.style&&n.push("style"),t&&t.color&&n.push("color"),3==n.length){const o=n.map((e=>t[e])).join(" ");return["all"==e?["border",o]:[`border-${e}`,o]]}return"all"==e?[]:n.map((n=>[`border-${e}-${n}`,t[n]]))}function gm(t){t.setNormalizer("margin",Qg("margin")),t.setNormalizer("margin-top",(t=>({path:"margin.top",value:t}))),t.setNormalizer("margin-right",(t=>({path:"margin.right",value:t}))),t.setNormalizer("margin-bottom",(t=>({path:"margin.bottom",value:t}))),t.setNormalizer("margin-left",(t=>({path:"margin.left",value:t}))),t.setReducer("margin",Jg("margin")),t.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}function mm(t){t.setNormalizer("padding",Qg("padding")),t.setNormalizer("padding-top",(t=>({path:"padding.top",value:t}))),t.setNormalizer("padding-right",(t=>({path:"padding.right",value:t}))),t.setNormalizer("padding-bottom",(t=>({path:"padding.bottom",value:t}))),t.setNormalizer("padding-left",(t=>({path:"padding.left",value:t}))),t.setReducer("padding",Jg("padding")),t.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}class pm extends Sd{constructor(t,e){super(t),this.view=e}get element(){return this.view.editable.element}init(){const t=this.editor,e=this.view,n=t.plugins.get("BalloonToolbar"),o=t.editing.view,i=e.editable,r=o.document.getRoot();i.name=r.rootName,e.render();const s=i.element;this.setEditableElement(i.name,s),this.focusTracker.add(s),i.bind("isFocused").to(this.focusTracker),o.attachDomRoot(s),function({origin:t,originKeystrokeHandler:e,originFocusTracker:n,toolbar:o,beforeFocus:i,afterBlur:r}){n.add(o.element),e.set("Alt+F10",((t,e)=>{n.isFocused&&!o.focusTracker.isFocused&&(i&&i(),o.focus(),e())})),o.keystrokes.set("Esc",((e,n)=>{o.focusTracker.isFocused&&(t.focus(),r&&r(),n())}))}({origin:o,originFocusTracker:this.focusTracker,originKeystrokeHandler:t.keystrokes,toolbar:n.toolbarView,beforeFocus(){n.show()},afterBlur(){n.hide()}}),this._initPlaceholder(),this.fire("ready")}destroy(){const t=this.view;this.editor.editing.view.detachDomRoot(t.editable.name),t.destroy(),super.destroy()}_initPlaceholder(){const t=this.editor,e=t.editing.view,n=e.document.getRoot(),o=t.sourceElement,i=t.config.get("placeholder")||o&&"textarea"===o.tagName.toLowerCase()&&o.getAttribute("placeholder");i&&dg({view:e,element:n,text:i,isDirectHost:!1,keepOnFocus:!0})}}class fm extends gu{constructor(t,e,n){super(t),this.editable=new ku(t,e,n)}render(){super.render(),this.registerChild(this.editable)}}class bm extends yd{constructor(t,e={}){if(!yo(t)&&void 0!==e.initialData)throw new a("editor-create-initial-data",null);super(e),void 0===this.config.get("initialData")&&this.config.set("initialData",function(t){return yo(t)?(e=t,e instanceof HTMLTextAreaElement?e.value:e.innerHTML):t;var e}(t)),yo(t)&&(this.sourceElement=t,function(t){const e=t.sourceElement;if(e){if(e.ckeditorInstance)throw new a("editor-source-element-already-used",t);e.ckeditorInstance=t,t.once("destroy",(()=>{delete e.ckeditorInstance}))}}(this));const n=this.config.get("plugins");n.push(eg),this.config.set("plugins",n),this.config.define("balloonToolbar",this.config.get("toolbar")),this.model.document.createRoot();const o=new fm(this.locale,this.editing.view,this.sourceElement);this.ui=new pm(this,o),function(t){if(!M(t.updateSourceElement))throw new a("attachtoform-missing-elementapi-interface",t);const e=t.sourceElement;if(e&&"textarea"===e.tagName.toLowerCase()&&e.form){let n;const o=e.form,i=()=>t.updateSourceElement();M(o.submit)&&(n=o.submit,o.submit=()=>{i(),n.apply(o)}),o.addEventListener("submit",i),t.on("destroy",(()=>{o.removeEventListener("submit",i),n&&(o.submit=n)}))}}(this)}destroy(){const t=this.getData();return this.ui.destroy(),super.destroy().then((()=>{this.sourceElement&&va(this.sourceElement,t)}))}static create(t,e={}){return new Promise((n=>{if(yo(t)&&"TEXTAREA"===t.tagName)throw new a("editor-wrong-element",null);const o=new this(t,e);n(o.initPlugins().then((()=>o.ui.init())).then((()=>o.data.init(o.config.get("initialData")))).then((()=>o.fire("ready"))).then((()=>o)))}))}}ue(bm,Bd),ue(bm,Dd);var km=n(6764),wm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(km.Z,wm);km.Z.locals;var Cm=n(2822),Am={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Cm.Z,Am);Cm.Z.locals;class _m extends Wd{constructor(t){super(t);const e=t.t;this.set("matchCount",0),this.set("highlightOffset",0),this.set("isDirty",!1),this.set("_areCommandsEnabled",{}),this.set("_resultsCounterText",""),this.set("_matchCase",!1),this.set("_wholeWordsOnly",!1),this.bind("_searchResultsFound").to(this,"matchCount",this,"isDirty",((t,e)=>t>0&&!e)),this._findInputView=this._createInputField(e("Find in text…")),this._replaceInputView=this._createInputField(e("Replace with…")),this._findButtonView=this._createButton({label:e("Find"),class:"ck-button-find ck-button-action",withText:!0}),this._findPrevButtonView=this._createButton({label:e("Previous result"),class:"ck-button-prev",icon:Wu,keystroke:"Shift+F3",tooltip:!0}),this._findNextButtonView=this._createButton({label:e("Next result"),class:"ck-button-next",icon:Wu,keystroke:"F3",tooltip:!0}),this._optionsDropdown=this._createOptionsDropdown(),this._replaceButtonView=this._createButton({label:e("Replace"),class:"ck-button-replace",withText:!0}),this._replaceAllButtonView=this._createButton({label:e("Replace all"),class:"ck-button-replaceall",withText:!0}),this._findFieldsetView=this._createFindFieldset(),this._replaceFieldsetView=this._createReplaceFieldset(),this._focusTracker=new Ea,this._keystrokes=new Sa,this._focusables=new Ld,this._focusCycler=new Sh({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this._keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-find-and-replace-form"],tabindex:"-1"},children:[new Au(t,{label:e("Find and replace")}),this._findFieldsetView,this._replaceFieldsetView]}),Md(this)}render(){super.render(),Od({view:this}),this._initFocusCycling(),this._initKeystrokeHandling()}destroy(){super.destroy(),this._focusTracker.destroy(),this._keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}reset(){this._findInputView.errorText=null,this.isDirty=!0}get _textToFind(){return this._findInputView.fieldView.element.value}get _textToReplace(){return this._replaceInputView.fieldView.element.value}_createFindFieldset(){const t=this.locale,e=new Wd(t);return this._findInputView.fieldView.on("input",(()=>{this.isDirty=!0})),this._findButtonView.on("execute",this._onFindButtonExecute.bind(this)),this._findPrevButtonView.delegate("execute").to(this,"findPrevious"),this._findNextButtonView.delegate("execute").to(this,"findNext"),this._findPrevButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",(({findPrevious:t})=>t)),this._findNextButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",(({findNext:t})=>t)),this._injectFindResultsCounter(),e.setTemplate({tag:"fieldset",attributes:{class:["ck","ck-find-and-replace-form__find"]},children:[this._findInputView,this._findButtonView,this._findPrevButtonView,this._findNextButtonView]}),e}_onFindButtonExecute(){if(this._textToFind)this.isDirty=!1,this.fire("findNext",{searchText:this._textToFind,matchCase:this._matchCase,wholeWords:this._wholeWordsOnly});else{const t=this.t;this._findInputView.errorText=t("Text to find must not be empty.")}}_injectFindResultsCounter(){const t=this.locale,e=t.t,n=this.bindTemplate,o=new Wd(t);this.bind("_resultsCounterText").to(this,"highlightOffset",this,"matchCount",((t,n)=>e("%0 of %1",[t,n]))),o.setTemplate({tag:"span",attributes:{class:["ck","ck-results-counter",n.if("isDirty","ck-hidden")]},children:[{text:n.to("_resultsCounterText")}]});const i=()=>{const e=this._findInputView.fieldView.element;if(!e||!ya(e))return;const n=new ka(o.element).width,i="ltr"===t.uiLanguageDirection?"paddingRight":"paddingLeft";e.style[i]=n?`calc( 2 * var(--ck-spacing-standard) + ${n}px )`:null};this.on("change:_resultsCounterText",i,{priority:"low"}),this.on("change:isDirty",i,{priority:"low"}),this._findInputView.template.children[0].children.push(o)}_createReplaceFieldset(){const t=this.locale,e=t.t,n=new Wd(t);return this._replaceButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replace:t},e)=>t&&e)),this._replaceAllButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replaceAll:t},e)=>t&&e)),this._replaceInputView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replace:t},e)=>t&&e)),this._replaceInputView.bind("infoText").to(this._replaceInputView,"isEnabled",this._replaceInputView,"isFocused",((t,n)=>t||!n?"":e("Tip: Find some text first in order to replace it."))),this._replaceButtonView.on("execute",(()=>{this.fire("replace",{searchText:this._textToFind,replaceText:this._textToReplace})})),this._replaceAllButtonView.on("execute",(()=>{this.fire("replaceAll",{searchText:this._textToFind,replaceText:this._textToReplace}),this.focus()})),n.setTemplate({tag:"fieldset",attributes:{class:["ck","ck-find-and-replace-form__replace"]},children:[this._replaceInputView,this._optionsDropdown,this._replaceButtonView,this._replaceAllButtonView]}),n}_createOptionsDropdown(){const t=this.locale,e=t.t,n=lu(t);n.class="ck-options-dropdown",n.buttonView.set({withText:!1,label:e("Show options"),icon:Fd.cog,tooltip:!0});const o=new Ru({withText:!0,label:e("Match case"),_isMatchCaseSwitch:!0}),i=new Ru({withText:!0,label:e("Whole words only")});return o.bind("isOn").to(this,"_matchCase"),i.bind("isOn").to(this,"_wholeWordsOnly"),n.on("execute",(t=>{t.source._isMatchCaseSwitch?this._matchCase=!this._matchCase:this._wholeWordsOnly=!this._wholeWordsOnly,this.isDirty=!0})),du(n,new Bo([{type:"switchbutton",model:o},{type:"switchbutton",model:i}])),n}_initFocusCycling(){[this._findInputView,this._findButtonView,this._findPrevButtonView,this._findNextButtonView,this._replaceInputView,this._optionsDropdown,this._replaceButtonView,this._replaceAllButtonView].forEach((t=>{this._focusables.add(t),this._focusTracker.add(t.element)}))}_initKeystrokeHandling(){const t=t=>t.stopPropagation(),e=t=>{t.stopPropagation(),t.preventDefault()};this._keystrokes.listenTo(this.element),this._keystrokes.set("f3",(t=>{e(t),this._findNextButtonView.fire("execute")})),this._keystrokes.set("shift+f3",(t=>{e(t),this._findPrevButtonView.fire("execute")})),this._keystrokes.set("enter",(t=>{const n=t.target;n===this._findInputView.fieldView.element?(this._areCommandsEnabled.findNext?this._findNextButtonView.fire("execute"):this._findButtonView.fire("execute"),e(t)):n!==this._replaceInputView.fieldView.element||this.isDirty||(this._replaceButtonView.fire("execute"),e(t))})),this._keystrokes.set("shift+enter",(t=>{t.target===this._findInputView.fieldView.element&&(this._areCommandsEnabled.findPrevious?this._findPrevButtonView.fire("execute"):this._findButtonView.fire("execute"),e(t))})),this._keystrokes.set("arrowright",t),this._keystrokes.set("arrowleft",t),this._keystrokes.set("arrowup",t),this._keystrokes.set("arrowdown",t),this.listenTo(this._findInputView.element,"selectstart",((t,e)=>{e.stopPropagation()}),{priority:"high"}),this.listenTo(this._replaceInputView.element,"selectstart",((t,e)=>{e.stopPropagation()}),{priority:"high"})}_createButton(t){const e=new wh(this.locale);return e.set(t),e}_createInputField(t){const e=new Bu(this.locale,Du);return e.label=t,e}}class vm extends ge{static get pluginName(){return"FindAndReplaceUI"}constructor(t){super(t),this.formView=null}init(){const t=this.editor;t.ui.componentFactory.add("findAndReplace",(e=>{const n=lu(e),o=this.formView=new _m(t.locale);return n.bind("isEnabled").to(t.commands.get("find")),n.panelView.children.add(o),n.on("change:isOpen",((t,e,n)=>{n?(o.disableCssTransitions(),o.reset(),o._findInputView.fieldView.select(),o.focus(),o.enableCssTransitions()):(o.focus(),this.fire("searchReseted"))}),{priority:"low"}),this._setupDropdownButton(n),this._setupFormView(o),n}))}_setupDropdownButton(t){const e=this.editor.locale.t;t.buttonView.set({icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12.87 13.786 1.532-1.286 3.857 4.596a1 1 0 1 1-1.532 1.286l-3.857-4.596z"/><path d="M16.004 8.5a6.5 6.5 0 0 1-9.216 5.905c-1.154-.53-.863-1.415-.663-1.615.194-.194.564-.592 1.635-.141a4.5 4.5 0 0 0 5.89-5.904l-.104-.227 1.332-1.331c.045-.046.196-.041.224.007a6.47 6.47 0 0 1 .902 3.306zm-3.4-5.715c.562.305.742 1.106.354 1.494-.388.388-.995.414-1.476.178a4.5 4.5 0 0 0-6.086 5.882l.114.236-1.348 1.349c-.038.037-.17.022-.198-.023a6.5 6.5 0 0 1 5.54-9.9 6.469 6.469 0 0 1 3.1.784z"/><path d="M4.001 11.93.948 8.877a.2.2 0 0 1 .141-.341h6.106a.2.2 0 0 1 .141.341L4.283 11.93a.2.2 0 0 1-.282 0zm11.083-6.789 3.053 3.053a.2.2 0 0 1-.14.342H11.89a.2.2 0 0 1-.14-.342l3.052-3.053a.2.2 0 0 1 .282 0z"/></svg>',label:e("Find and replace"),tooltip:!0})}_setupFormView(t){const e=this.editor.commands,n=this.editor.plugins.get("FindAndReplaceEditing").state,o={before:-1,same:0,after:1};t.bind("highlightOffset").to(n,"highlightedResult",(t=>t?Array.from(n.results).sort(((t,e)=>o[t.marker.getStart().compareWith(e.marker.getStart())])).indexOf(t)+1:0)),t.listenTo(n.results,"change",(()=>{t.matchCount=n.results.length})),t.bind("_areCommandsEnabled").to(e.get("findNext"),"isEnabled",e.get("findPrevious"),"isEnabled",e.get("replace"),"isEnabled",e.get("replaceAll"),"isEnabled",((t,e,n,o)=>({findNext:t,findPrevious:e,replace:n,replaceAll:o}))),t.delegate("findNext","findPrevious","replace","replaceAll").to(this),t.on("change:isDirty",((t,e,n)=>{n&&this.fire("searchReseted")}))}}var ym=/[\\^$.*+?()[\]{}|]/g,xm=RegExp(ym.source);const Em=function(t){return(t=ai(t))&&xm.test(t)?t.replace(ym,"\\$&"):t};function Sm(t,e,n,o){const i=o||new Bo;return e.change((o=>{[...t].forEach((({type:t,item:s})=>{if("elementStart"===t&&e.schema.checkChild(s,"$text")){const t=n({item:s,text:Tm(e.createRangeIn(s))});if(!t)return;t.forEach((t=>{const e=`findResult:${r()}`,n=o.addMarker(e,{usingOperation:!1,affectsData:!1,range:o.createRange(o.createPositionAt(s,t.start),o.createPositionAt(s,t.end))}),a=function(t,e){const n=t.find((({marker:t})=>e.getStart().isBefore(t.getStart())));return n?t.getIndex(n):t.length}(i,n);i.add({id:e,label:t.label,marker:n},a)}))}}))})),i}function Tm(t){return Array.from(t.getItems()).reduce(((t,e)=>e.is("text")||e.is("textProxy")?t+e.data:`${t}\n`),"")}function Bm(t){const e=t.length-1;let n=t.index;return 3===t.length&&(n+=t[1].length),{label:t[e],start:n,end:n+t[e].length}}function Dm(t,e){let n="gu";e.matchCase||(n+="i");let o=`(${Em(t)})`;if(e.wholeWords){const e="[^a-zA-ZÀ-ɏḀ-ỿ]";new RegExp("^"+e).test(t)||(o=`(^|${e}|_)${o}`),new RegExp(e+"$").test(t)||(o=`${o}(?=_|${e}|$)`)}const i=new RegExp(o,n);return function({text:t}){return[...t.matchAll(i)].map(Bm)}}class Im extends pe{constructor(t,e){super(t),this.isEnabled=!0,this.affectsData=!1,this._state=e}execute(t,{matchCase:e,wholeWords:n}={}){const{editor:o}=this,{model:i}=o;let r;"string"==typeof t?(r=Dm(t,{matchCase:e,wholeWords:n}),this._state.searchText=t):r=t;const s=i.document.getRootNames().reduce(((t,e)=>Sm(i.createRangeIn(i.document.getRoot(e)),i,r,t)),null);return this._state.clear(i),this._state.results.addMany(Array.from(s)),this._state.highlightedResult=s.get(0),"string"==typeof t&&(this._state.searchText=t),this._state.matchCase=!!e,this._state.matchWholeWords=!!n,{results:s,findCallback:r}}}class Pm extends pe{constructor(t,e){super(t),this.isEnabled=!0,this._state=e}execute(t,e){const{model:n}=this.editor;n.change((o=>{const i=e.marker.getRange();if("$graveyard"===i.root.rootName)return void this._state.results.remove(e);let r={};for(const t of i.getItems())if(t.is("$text")||t.is("$textProxy")){r=t.getAttributes();break}n.insertContent(o.createText(t,r),i),this._state.results.has(e)&&this._state.results.remove(e)}))}}class zm extends Pm{execute(t,e){const{editor:n}=this,{model:o}=n,i=e instanceof Bo?e:o.document.getRootNames().reduce(((t,n)=>Sm(o.createRangeIn(o.document.getRoot(n)),o,Dm(e,this._state),t)),null);i.length&&o.change((()=>{[...i].forEach((e=>{super.execute(t,e)}))}))}}class Rm extends pe{constructor(t,e){super(t),this.affectsData=!1,this._state=e,this.isEnabled=!1,this.listenTo(this._state.results,"change",(()=>{this.isEnabled=this._state.results.length>1}))}refresh(){this.isEnabled=this._state.results.length>1}execute(){const t=this._state.results,e=t.getIndex(this._state.highlightedResult),n=e+1>=t.length?0:e+1;this._state.highlightedResult=this._state.results.get(n)}}class Vm extends Rm{execute(){const t=this._state.results.getIndex(this._state.highlightedResult),e=t-1<0?this._state.results.length-1:t-1;this._state.highlightedResult=this._state.results.get(e)}}class Fm{constructor(t){this.set("results",new Bo),this.set("highlightedResult",null),this.set("searchText",""),this.set("replaceText",""),this.set("matchCase",!1),this.set("matchWholeWords",!1),this.results.on("change",((e,{removed:n,index:o})=>{if((n=Array.from(n)).length){let e=!1;if(t.change((o=>{for(const i of n)this.highlightedResult===i&&(e=!0),t.markers.has(i.marker.name)&&o.removeMarker(i.marker)})),e){const t=o>=this.results.length?0:o;this.highlightedResult=this.results.get(t)}}}))}clear(t){this.searchText="",t.change((e=>{if(this.highlightedResult){const n=this.highlightedResult.marker.name.split(":")[1],o=t.markers.get(`findResultHighlighted:${n}`);o&&e.removeMarker(o)}[...this.results].forEach((({marker:t})=>{e.removeMarker(t)}))})),this.results.clear()}}ue(Fm,se);var Nm=n(9932),Mm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Nm.Z,Mm);Nm.Z.locals;class Om extends ge{static get pluginName(){return"FindAndReplaceEditing"}init(){this._activeResults=null,this.state=new Fm(this.editor.model),this._defineConverters(),this._defineCommands(),this.listenTo(this.state,"change:highlightedResult",((t,e,n,o)=>{const{model:i}=this.editor;i.change((t=>{if(o){const e=o.marker.name.split(":")[1],n=i.markers.get(`findResultHighlighted:${e}`);n&&t.removeMarker(n)}if(n){const e=n.marker.name.split(":")[1];t.addMarker(`findResultHighlighted:${e}`,{usingOperation:!1,affectsData:!1,range:n.marker.getRange()})}}))}));const t=aa(function(t,e,n){if(n){const t=this.editor.editing.view.domConverter,e=this.editor.editing.mapper.toViewRange(n.marker.getRange());Ba({target:t.viewRangeToDom(e),viewportOffset:40})}}.bind(this),32);this.listenTo(this.state,"change:highlightedResult",t,{priority:"low"}),this.listenTo(this.editor,"destroy",t.cancel)}find(t){const{editor:e}=this,{model:n}=e,{findCallback:o,results:i}=e.execute("find",t);return this._activeResults=i,this.listenTo(n.document,"change:data",(()=>function(t,e,n){const o=new Set,i=new Set;e.document.differ.getChanges().forEach((t=>{"$text"===t.name||e.schema.isInline(t.position.nodeAfter)?(o.add(t.position.parent),[...e.markers.getMarkersAtPosition(t.position)].forEach((t=>{i.add(t.name)}))):"insert"===t.type&&o.add(t.position.nodeAfter)})),e.document.differ.getChangedMarkers().forEach((({name:t,data:{newRange:e}})=>{e&&"$graveyard"===e.start.root.rootName&&i.add(t)})),o.forEach((t=>{[...e.markers.getMarkersIntersectingRange(e.createRangeIn(t))].forEach((t=>i.add(t.name)))})),e.change((e=>{i.forEach((n=>{t.has(n)&&t.remove(n),e.removeMarker(n)}))})),o.forEach((o=>{Sm(e.createRangeOn(o),e,n,t)}))}(this._activeResults,n,o))),this._activeResults}stop(){this._activeResults&&(this.stopListening(this.editor.model.document),this.state.clear(this.editor.model),this._activeResults=null)}_defineCommands(){this.editor.commands.add("find",new Im(this.editor,this.state)),this.editor.commands.add("findNext",new Rm(this.editor,this.state)),this.editor.commands.add("findPrevious",new Vm(this.editor,this.state)),this.editor.commands.add("replace",new Pm(this.editor,this.state)),this.editor.commands.add("replaceAll",new zm(this.editor,this.state))}_defineConverters(){const{editor:t}=this;t.conversion.for("editingDowncast").markerToHighlight({model:"findResult",view:({markerName:t})=>{const[,e]=t.split(":");return{name:"span",classes:["ck-find-result"],attributes:{"data-find-result":e}}}}),t.conversion.for("editingDowncast").markerToHighlight({model:"findResultHighlighted",view:({markerName:t})=>{const[,e]=t.split(":");return{name:"span",classes:["ck-find-result_selected"],attributes:{"data-find-result":e}}}})}}class Lm{constructor(){const t=new window.FileReader;this._reader=t,this._data=void 0,this.set("loaded",0),t.onprogress=t=>{this.loaded=t.loaded}}get error(){return this._reader.error}get data(){return this._data}read(t){const e=this._reader;return this.total=t.size,new Promise(((n,o)=>{e.onload=()=>{const t=e.result;this._data=t,n(t)},e.onerror=()=>{o("error")},e.onabort=()=>{o("aborted")},this._reader.readAsDataURL(t)}))}abort(){this._reader.abort()}}ue(Lm,se);class Hm extends ge{static get pluginName(){return"FileRepository"}static get requires(){return[Id]}init(){this.loaders=new Bo,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",((t,e)=>e?t/e*100:0))}getLoader(t){return this._loadersMap.get(t)||null}createLoader(t){if(!this.createUploadAdapter)return l("filerepository-no-upload-adapter"),null;const e=new qm(Promise.resolve(t),this.createUploadAdapter);return this.loaders.add(e),this._loadersMap.set(t,e),t instanceof Promise&&e.file.then((t=>{this._loadersMap.set(t,e)})).catch((()=>{})),e.on("change:uploaded",(()=>{let t=0;for(const e of this.loaders)t+=e.uploaded;this.uploaded=t})),e.on("change:uploadTotal",(()=>{let t=0;for(const e of this.loaders)e.uploadTotal&&(t+=e.uploadTotal);this.uploadTotal=t})),e}destroyLoader(t){const e=t instanceof qm?t:this.getLoader(t);e._destroy(),this.loaders.remove(e),this._loadersMap.forEach(((t,n)=>{t===e&&this._loadersMap.delete(n)}))}_updatePendingAction(){const t=this.editor.plugins.get(Id);if(this.loaders.length){if(!this._pendingAction){const e=this.editor.t,n=t=>`${e("Upload in progress")} ${parseInt(t)}%.`;this._pendingAction=t.add(n(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",n)}}else t.remove(this._pendingAction),this._pendingAction=null}}ue(Hm,se);class qm{constructor(t,e){this.id=r(),this._filePromiseWrapper=this._createFilePromiseWrapper(t),this._adapter=e(this),this._reader=new Lm,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((t,e)=>e?t/e*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((t=>this._filePromiseWrapper?t:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new a("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((t=>this._reader.read(t))).then((t=>{if("reading"!==this.status)throw this.status;return this.status="idle",t})).catch((t=>{if("aborted"===t)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:t}))}upload(){if("idle"!=this.status)throw new a("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((t=>(this.uploadResponse=t,this.status="idle",t))).catch((t=>{if("aborted"===this.status)throw"aborted";throw this.status="error",t}))}abort(){const t=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==t?this._reader.abort():"uploading"==t&&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(t){const e={};return e.promise=new Promise(((n,o)=>{e.rejecter=o,e.isFulfilled=!1,t.then((t=>{e.isFulfilled=!0,n(t)})).catch((t=>{e.isFulfilled=!0,o(t)}))})),e}}ue(qm,se);class Wm extends Wd{constructor(t){super(t),this.buttonView=new wh(t),this._fileInputView=new Um(t),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 Um extends Wd{constructor(t){super(t),this.set("acceptedType"),this.set("allowMultipleFiles",!1);const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:e.to("acceptedType"),multiple:e.to("allowMultipleFiles")},on:{change:e.to((()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""}))}})}open(){this.element.click()}}const jm="ckCsrfToken",$m="abcdefghijklmnopqrstuvwxyz0123456789";function Gm(){let t=function(t){t=t.toLowerCase();const e=document.cookie.split(";");for(const n of e){const e=n.split("=");if(decodeURIComponent(e[0].trim().toLowerCase())===t)return decodeURIComponent(e[1])}return null}(jm);var e,n;return t&&40==t.length||(t=function(t){let e="";const n=new Uint8Array(t);window.crypto.getRandomValues(n);for(let t=0;t<n.length;t++){const o=$m.charAt(n[t]%$m.length);e+=Math.random()>.5?o.toUpperCase():o}return e}(40),e=jm,n=t,document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(n)+";path=/"),t}class Km{constructor(t,e,n){this.loader=t,this.url=e,this.t=n}upload(){return this.loader.file.then((t=>new Promise(((e,n)=>{this._initRequest(),this._initListeners(e,n,t),this._sendRequest(t)}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const t=this.xhr=new XMLHttpRequest;t.open("POST",this.url,!0),t.responseType="json"}_initListeners(t,e,n){const o=this.xhr,i=this.loader,r=(0,this.t)("Cannot upload file:")+` ${n.name}.`;o.addEventListener("error",(()=>e(r))),o.addEventListener("abort",(()=>e())),o.addEventListener("load",(()=>{const n=o.response;if(!n||!n.uploaded)return e(n&&n.error&&n.error.message?n.error.message:r);t({default:n.url})})),o.upload&&o.upload.addEventListener("progress",(t=>{t.lengthComputable&&(i.uploadTotal=t.total,i.uploaded=t.loaded)}))}_sendRequest(t){const e=new FormData;e.append("upload",t),e.append("ckCsrfToken",Gm()),this.xhr.send(e)}}class Zm{constructor(t,e=20){this.model=t,this.size=0,this.limit=e,this.isLocked=!1,this._changeCallback=(t,e)=>{e.isLocal&&e.isUndoable&&e!==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({isTyping:!0})),this._batch}input(t){this.size+=t,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(t){this.isLocked&&!t||(this._batch=null,this.size=0)}}class Jm extends pe{constructor(t,e){super(t),this._buffer=new Zm(t.model,e)}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(t={}){const e=this.editor.model,n=e.document,o=t.text||"",i=o.length,r=t.range?e.createSelection(t.range):n.selection,s=t.resultRange;e.enqueueChange(this._buffer.batch,(t=>{this._buffer.lock(),e.deleteContent(r),o&&e.insertContent(t.createText(o,n.selection.getAttributes()),r),s?t.setSelection(s):r.is("documentSelection")||t.setSelection(r),this._buffer.unlock(),this._buffer.input(i)}))}}function Ym(t){if(t.newChildren.length-t.oldChildren.length!=1)return;const e=function(t,e){const n=[];let o,i=0;return t.forEach((t=>{"equal"==t?(r(),i++):"insert"==t?(s("insert")?o.values.push(e[i]):(r(),o={type:"insert",index:i,values:[e[i]]}),i++):s("delete")?o.howMany++:(r(),o={type:"delete",index:i,howMany:1})})),r(),n;function r(){o&&(n.push(o),o=null)}function s(t){return o&&o.type==t}}($r(t.oldChildren,t.newChildren,Qm),t.newChildren);if(e.length>1)return;const n=e[0];return n.values[0]&&n.values[0].is("$text")?n:void 0}function Qm(t,e){return t&&t.is("$text")&&e&&e.is("$text")?t.data===e.data:t===e}function Xm(t,e){const n=e.selection,o=t.shiftKey&&t.keyCode===hr.delete,i=!n.isCollapsed;return o&&i}const tp=[gr("arrowUp"),gr("arrowRight"),gr("arrowDown"),gr("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 t=112;t<=135;t++)tp.push(t);function ep(t){return!(!t.ctrlKey&&!t.metaKey)||tp.includes(t.keyCode)}class np{constructor(t){this.editor=t,this.editing=this.editor.editing}handle(t,e){if(function(t){if(0==t.length)return!1;for(const e of t)if("children"===e.type&&!Ym(e))return!0;return!1}(t))this._handleContainerChildrenMutations(t,e);else for(const n of t)this._handleTextMutation(n,e),this._handleTextNodeInsertion(n)}_handleContainerChildrenMutations(t,e){const n=function(t){const e=t.map((t=>t.node)).reduce(((t,e)=>t.getCommonAncestor(e,{includeSelf:!0})));if(!e)return;return e.getAncestors({includeSelf:!0,parentFirst:!0}).find((t=>t.is("containerElement")||t.is("rootElement")))}(t);if(!n)return;const o=this.editor.editing.view.domConverter.mapViewToDom(n),i=new ms(this.editor.editing.view.document),r=this.editor.data.toModel(i.domToView(o)).getChild(0),s=this.editor.editing.mapper.toModelElement(n);if(!s)return;const a=Array.from(r.getChildren()),l=Array.from(s.getChildren()),c=a[a.length-1],d=l[l.length-1],h=c&&c.is("element","softBreak"),u=d&&!d.is("element","softBreak");h&&u&&a.pop();const g=this.editor.model.schema;if(!op(a,g)||!op(l,g))return;const m=a.map((t=>t.is("$text")?t.data:"@")).join("").replace(/\u00A0/g," "),p=l.map((t=>t.is("$text")?t.data:"@")).join("").replace(/\u00A0/g," ");if(p===m)return;const f=$r(p,m),{firstChangeAt:b,insertions:k,deletions:w}=ip(f);let C=null;e&&(C=this.editing.mapper.toModelRange(e.getFirstRange()));const A=m.substr(b,k),_=this.editor.model.createRange(this.editor.model.createPositionAt(s,b),this.editor.model.createPositionAt(s,b+w));this.editor.execute("input",{text:A,range:_,resultRange:C})}_handleTextMutation(t,e){if("text"!=t.type)return;const n=t.newText.replace(/\u00A0/g," "),o=t.oldText.replace(/\u00A0/g," ");if(o===n)return;const i=$r(o,n),{firstChangeAt:r,insertions:s,deletions:a}=ip(i);let l=null;e&&(l=this.editing.mapper.toModelRange(e.getFirstRange()));const c=this.editing.view.createPositionAt(t.node,r),d=this.editing.mapper.toModelPosition(c),h=this.editor.model.createRange(d,d.getShiftedBy(a)),u=n.substr(r,s);this.editor.execute("input",{text:u,range:h,resultRange:l})}_handleTextNodeInsertion(t){if("children"!=t.type)return;const e=Ym(t),n=this.editing.view.createPositionAt(t.node,e.index),o=this.editing.mapper.toModelPosition(n),i=e.values[0].data;this.editor.execute("input",{text:i.replace(/\u00A0/g," "),range:this.editor.model.createRange(o)})}}function op(t,e){return t.every((t=>e.isInline(t)))}function ip(t){let e=null,n=null;for(let o=0;o<t.length;o++){"equal"!=t[o]&&(e=null===e?o:e,n=o)}let o=0,i=0;for(let r=e;r<=n;r++)"insert"!=t[r]&&o++,"delete"!=t[r]&&i++;return{insertions:i,deletions:o,firstChangeAt:e}}class rp extends ge{static get pluginName(){return"Input"}init(){const t=this.editor,e=new Jm(t,t.config.get("typing.undoStep")||20);t.commands.add("input",e),function(t){let e=null;const n=t.model,o=t.editing.view,i=t.commands.get("input");function r(t){if(ar.isWindows&&Xm(t,o.document))return;const r=n.document,a=o.document.isComposing,l=e&&e.isEqual(r.selection);e=null,i.isEnabled&&(ep(t)||r.selection.isCollapsed||a&&229===t.keyCode||!a&&229===t.keyCode&&l||s())}function s(){const t=i.buffer;t.lock();const e=t.batch;n.enqueueChange(e,(()=>{n.deleteContent(n.document.selection)})),t.unlock()}ar.isAndroid?o.document.on("beforeinput",((t,e)=>r(e)),{priority:"lowest"}):o.document.on("keydown",((t,e)=>r(e)),{priority:"lowest"}),o.document.on("compositionstart",(function(){const t=n.document,e=1!==t.selection.rangeCount||t.selection.getFirstRange().isFlat;t.selection.isCollapsed||e||s()}),{priority:"lowest"}),o.document.on("compositionend",(()=>{e=n.createSelection(n.document.selection)}),{priority:"lowest"})}(t),function(t){t.editing.view.document.on("mutations",((e,n,o)=>{new np(t).handle(n,o)}))}(t)}}class sp extends pe{constructor(t,e){super(t),this.direction=e,this._buffer=new Zm(t.model,t.config.get("typing.undoStep"))}get buffer(){return this._buffer}execute(t={}){const e=this.editor.model,n=e.document;e.enqueueChange(this._buffer.batch,(o=>{this._buffer.lock();const i=o.createSelection(t.selection||n.selection),r=t.sequence||1,s=i.isCollapsed;if(i.isCollapsed&&e.modifySelection(i,{direction:this.direction,unit:t.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(r))return void this._replaceEntireContentWithParagraph(o);if(this._shouldReplaceFirstBlockWithParagraph(i,r))return void this.editor.execute("paragraph",{selection:i});if(i.isCollapsed)return;let a=0;i.getFirstRange().getMinimalFlatRanges().forEach((t=>{a+=qi(t.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),e.deleteContent(i,{doNotResetEntireContent:s,direction:this.direction}),this._buffer.input(a),o.setSelection(i),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(t){if(t>1)return!1;const e=this.editor.model,n=e.document.selection,o=e.schema.getLimitElement(n);if(!(n.isCollapsed&&n.containsEntireContent(o)))return!1;if(!e.schema.checkChild(o,"paragraph"))return!1;const i=o.getChild(0);return!i||"paragraph"!==i.name}_replaceEntireContentWithParagraph(t){const e=this.editor.model,n=e.document.selection,o=e.schema.getLimitElement(n),i=t.createElement("paragraph");t.remove(t.createRangeIn(o)),t.insert(i,o),t.setSelection(i,0)}_shouldReplaceFirstBlockWithParagraph(t,e){const n=this.editor.model;if(e>1||"backward"!=this.direction)return!1;if(!t.isCollapsed)return!1;const o=t.getFirstPosition(),i=n.schema.getLimitElement(o),r=i.getChild(0);return o.parent==r&&(!!t.containsEntireContent(r)&&(!!n.schema.checkChild(i,"paragraph")&&"paragraph"!=r.name))}}class ap extends vs{constructor(t){super(t);const e=t.document;let n=0;function o(t,n,o){const i=new ji(e,"delete",e.selection.getFirstRange());e.fire(i,new $s(e,n,o)),i.stop.called&&t.stop()}e.on("keyup",((t,e)=>{e.keyCode!=hr.delete&&e.keyCode!=hr.backspace||(n=0)})),e.on("keydown",((t,i)=>{if(ar.isWindows&&Xm(i,e))return;const r={};if(i.keyCode==hr.delete)r.direction="forward",r.unit="character";else{if(i.keyCode!=hr.backspace)return;r.direction="backward",r.unit="codePoint"}const s=ar.isMac?i.altKey:i.ctrlKey;r.unit=s?"word":r.unit,r.sequence=++n,o(t,i.domEvent,r)})),ar.isAndroid&&e.on("beforeinput",((e,n)=>{if("deleteContentBackward"!=n.domEvent.inputType)return;const i={unit:"codepoint",direction:"backward",sequence:1},r=n.domTarget.ownerDocument.defaultView.getSelection();r.anchorNode==r.focusNode&&r.anchorOffset+1!=r.focusOffset&&(i.selectionToRemove=t.domConverter.domSelectionToView(r)),o(e,n.domEvent,i)}))}observe(){}}class lp extends ge{static get pluginName(){return"Delete"}init(){const t=this.editor,e=t.editing.view,n=e.document,o=t.model.document;e.addObserver(ap),this._undoOnBackspace=!1;const i=new sp(t,"forward");if(t.commands.add("deleteForward",i),t.commands.add("forwardDelete",i),t.commands.add("delete",new sp(t,"backward")),this.listenTo(n,"delete",((n,o)=>{const i={unit:o.unit,sequence:o.sequence};if(o.selectionToRemove){const e=t.model.createSelection(),n=[];for(const e of o.selectionToRemove.getRanges())n.push(t.editing.mapper.toModelRange(e));e.setTo(n),i.selection=e}t.execute("forward"==o.direction?"deleteForward":"delete",i),o.preventDefault(),e.scrollToTheSelection()}),{priority:"low"}),ar.isAndroid){let t=null;this.listenTo(n,"delete",((e,n)=>{const o=n.domTarget.ownerDocument.defaultView.getSelection();t={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}}),{priority:"lowest"}),this.listenTo(n,"keyup",((e,n)=>{if(t){const e=n.domTarget.ownerDocument.defaultView.getSelection();e.collapse(t.anchorNode,t.anchorOffset),e.extend(t.focusNode,t.focusOffset),t=null}}))}this.editor.plugins.has("UndoEditing")&&(this.listenTo(n,"delete",((e,n)=>{this._undoOnBackspace&&"backward"==n.direction&&1==n.sequence&&"codePoint"==n.unit&&(this._undoOnBackspace=!1,t.execute("undo"),n.preventDefault(),e.stop())}),{context:"$capture"}),this.listenTo(o,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}function cp(t,e){let n=t.start;return{text:Array.from(t.getItems()).reduce(((t,o)=>o.is("$text")||o.is("$textProxy")?t+o.data:(n=e.createPositionAfter(o),"")),""),range:e.createRange(n,t.end)}}class dp{constructor(t,e){this.model=t,this.testCallback=e,this.hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(t.document.selection),this.stopListening(t.document))})),this._startListening()}_startListening(){const t=this.model.document;this.listenTo(t.selection,"change:range",((e,{directChange:n})=>{n&&(t.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this.hasMatch=!1))})),this.listenTo(t,"change:data",((t,e)=>{!e.isUndo&&e.isLocal&&this._evaluateTextBeforeSelection("data",{batch:e})}))}_evaluateTextBeforeSelection(t,e={}){const n=this.model,o=n.document.selection,i=n.createRange(n.createPositionAt(o.focus.parent,0),o.focus),{text:r,range:s}=cp(i,n),a=this.testCallback(r);if(!a&&this.hasMatch&&this.fire("unmatched"),this.hasMatch=!!a,a){const n=Object.assign(e,{text:r,range:s});"object"==typeof a&&Object.assign(n,a),this.fire(`matched:${t}`,n)}}}ue(dp,se);class hp extends ge{static get pluginName(){return"TwoStepCaretMovement"}constructor(t){super(t),this.attributes=new Set,this._overrideUid=null}init(){const t=this.editor,e=t.model,n=t.editing.view,o=t.locale,i=e.document.selection;this.listenTo(n.document,"arrowKey",((t,e)=>{if(!i.isCollapsed)return;if(e.shiftKey||e.altKey||e.ctrlKey)return;const n=e.keyCode==hr.arrowright,r=e.keyCode==hr.arrowleft;if(!n&&!r)return;const s=o.contentLanguageDirection;let a=!1;a="ltr"===s&&n||"rtl"===s&&r?this._handleForwardMovement(e):this._handleBackwardMovement(e),!0===a&&t.stop()}),{context:"$text",priority:"highest"}),this._isNextGravityRestorationSkipped=!1,this.listenTo(i,"change:range",((t,e)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!e.directChange&&pp(i.getFirstPosition(),this.attributes)||this._restoreGravity())}))}registerAttribute(t){this.attributes.add(t)}_handleForwardMovement(t){const e=this.attributes,n=this.editor.model.document.selection,o=n.getFirstPosition();return!this._isGravityOverridden&&((!o.isAtStart||!up(n,e))&&(pp(o,e)?(mp(t),this._overrideGravity(),!0):void 0))}_handleBackwardMovement(t){const e=this.attributes,n=this.editor.model,o=n.document.selection,i=o.getFirstPosition();return this._isGravityOverridden?(mp(t),this._restoreGravity(),gp(n,e,i),!0):i.isAtStart?!!up(o,e)&&(mp(t),gp(n,e,i),!0):function(t,e){return pp(t.getShiftedBy(-1),e)}(i,e)?i.isAtEnd&&!up(o,e)&&pp(i,e)?(mp(t),gp(n,e,i),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):void 0}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((t=>t.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((t=>{t.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function up(t,e){for(const n of e)if(t.hasAttribute(n))return!0;return!1}function gp(t,e,n){const o=n.nodeBefore;t.change((t=>{o?t.setSelectionAttribute(o.getAttributes()):t.removeSelectionAttribute(e)}))}function mp(t){t.preventDefault()}function pp(t,e){const{nodeBefore:n,nodeAfter:o}=t;for(const t of e){const e=n?n.getAttribute(t):void 0;if((o?o.getAttribute(t):void 0)!==e)return!0}return!1}const fp={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"⅓",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"⅔",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},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:_p('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:_p("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:_p("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:_p('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:_p('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:_p("'"),to:[null,"‚",null,"’"]}},bp={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},kp=["symbols","mathematical","typography","quotes"];function wp(t){return"string"==typeof t?new RegExp(`(${Em(t)})$`):t}function Cp(t){return"string"==typeof t?()=>[t]:t instanceof Array?()=>t:t}function Ap(t){return(t.textNode?t.textNode:t.nodeAfter).getAttributes()}function _p(t){return new RegExp(`(^|\\s)(${t})([^${t}]*)(${t})$`)}function vp(t,e,n,o){return o.createRange(yp(t,e,n,!0,o),yp(t,e,n,!1,o))}function yp(t,e,n,o,i){let r=t.textNode||(o?t.nodeBefore:t.nodeAfter),s=null;for(;r&&r.getAttribute(e)==n;)s=r,r=o?r.previousSibling:r.nextSibling;return s?i.createPositionAt(s,o?"before":"after"):t}function xp(t,e,n,o){const i=t.editing.view,r=new Set;i.document.registerPostFixer((i=>{const s=t.model.document.selection;let a=!1;if(s.hasAttribute(e)){const l=vp(s.getFirstPosition(),e,s.getAttribute(e),t.model),c=t.editing.mapper.toViewRange(l);for(const t of c.getItems())t.is("element",n)&&!t.hasClass(o)&&(i.addClass(o,t),r.add(t),a=!0)}return a})),t.conversion.for("editingDowncast").add((t=>{function e(){i.change((t=>{for(const e of r.values())t.removeClass(o,e),r.delete(e)}))}t.on("insert",e,{priority:"highest"}),t.on("remove",e,{priority:"highest"}),t.on("attribute",e,{priority:"highest"}),t.on("selection",e,{priority:"highest"})}))}function Ep(t,e,n,o){let i,r=null;"function"==typeof o?i=o:(r=t.commands.get(o),i=()=>{t.execute(o)}),t.model.document.on("change:data",((s,a)=>{if(r&&!r.isEnabled||!e.isEnabled)return;const l=xa(t.model.document.selection.getRanges());if(!l.isCollapsed)return;if(a.isUndo||!a.isLocal)return;const c=Array.from(t.model.document.differ.getChanges()),d=c[0];if(1!=c.length||"insert"!==d.type||"$text"!=d.name||1!=d.length)return;const h=d.position.parent;if(h.is("element","codeBlock"))return;if(h.is("element","listItem")&&"function"!=typeof o&&!["numberedList","bulletedList","todoList"].includes(o))return;if(r&&!0===r.value)return;const u=h.getChild(0),g=t.model.createRangeOn(u);if(!g.containsRange(l)&&!l.end.isEqual(g.end))return;const m=n.exec(u.data.substr(0,l.end.offset));m&&t.model.enqueueChange((e=>{const n=e.createPositionAt(h,0),o=e.createPositionAt(h,m[0].length),r=new cl(n,o);if(!1!==i({match:m})){e.remove(r);const n=t.model.document.selection.getFirstRange(),o=e.createRangeIn(h);!h.isEmpty||o.isEqual(n)||o.containsRange(n,!0)||e.remove(h)}r.detach(),t.model.enqueueChange((()=>{t.plugins.get("Delete").requestUndoOnBackspace()}))}))}))}function Sp(t,e,n,o){let i,r;n instanceof RegExp?i=n:r=n,r=r||(t=>{let e;const n=[],o=[];for(;null!==(e=i.exec(t))&&!(e&&e.length<4);){let{index:t,1:i,2:r,3:s}=e;const a=i+r+s;t+=e[0].length-a.length;const l=[t,t+i.length],c=[t+i.length+r.length,t+i.length+r.length+s.length];n.push(l),n.push(c),o.push([t+i.length,t+i.length+r.length])}return{remove:n,format:o}}),t.model.document.on("change:data",((n,i)=>{if(i.isUndo||!i.isLocal||!e.isEnabled)return;const s=t.model,a=s.document.selection;if(!a.isCollapsed)return;const l=Array.from(s.document.differ.getChanges()),c=l[0];if(1!=l.length||"insert"!==c.type||"$text"!=c.name||1!=c.length)return;const d=a.focus,h=d.parent,{text:u,range:g}=function(t,e){let n=t.start;return{text:Array.from(t.getItems()).reduce(((t,o)=>!o.is("$text")&&!o.is("$textProxy")||o.getAttribute("code")?(n=e.createPositionAfter(o),""):t+o.data),""),range:e.createRange(n,t.end)}}(s.createRange(s.createPositionAt(h,0),d),s),m=r(u),p=Tp(g.start,m.format,s),f=Tp(g.start,m.remove,s);p.length&&f.length&&s.enqueueChange((e=>{if(!1!==o(e,p)){for(const t of f.reverse())e.remove(t);s.enqueueChange((()=>{t.plugins.get("Delete").requestUndoOnBackspace()}))}}))}))}function Tp(t,e,n){return e.filter((t=>void 0!==t[0]&&void 0!==t[1])).map((e=>n.createRange(t.getShiftedBy(e[0]),t.getShiftedBy(e[1]))))}class Bp extends ge{static get requires(){return[lp]}static get pluginName(){return"Autoformat"}afterInit(){this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats(),this._addCodeBlockAutoformats(),this._addHorizontalLineAutoformats()}_addListAutoformats(){const t=this.editor.commands;t.get("bulletedList")&&Ep(this.editor,this,/^[*-]\s$/,"bulletedList"),t.get("numberedList")&&Ep(this.editor,this,/^1[.|)]\s$/,"numberedList"),t.get("todoList")&&Ep(this.editor,this,/^\[\s?\]\s$/,"todoList"),t.get("checkTodoList")&&Ep(this.editor,this,/^\[\s?x\s?\]\s$/,(()=>{this.editor.execute("todoList"),this.editor.execute("checkTodoList")}))}_addBasicStylesAutoformats(){const t=this.editor.commands;if(t.get("bold")){const t=Dp(this.editor,"bold");Sp(this.editor,this,/(?:^|\s)(\*\*)([^*]+)(\*\*)$/g,t),Sp(this.editor,this,/(?:^|\s)(__)([^_]+)(__)$/g,t)}if(t.get("italic")){const t=Dp(this.editor,"italic");Sp(this.editor,this,/(?:^|\s)(\*)([^*_]+)(\*)$/g,t),Sp(this.editor,this,/(?:^|\s)(_)([^_]+)(_)$/g,t)}if(t.get("code")){const t=Dp(this.editor,"code");Sp(this.editor,this,/(`)([^`]+)(`)$/g,t)}if(t.get("strikethrough")){const t=Dp(this.editor,"strikethrough");Sp(this.editor,this,/(~~)([^~]+)(~~)$/g,t)}}_addHeadingAutoformats(){const t=this.editor.commands.get("heading");t&&t.modelElements.filter((t=>t.match(/^heading[1-6]$/))).forEach((e=>{const n=e[7],o=new RegExp(`^(#{${n}})\\s$`);Ep(this.editor,this,o,(()=>{if(!t.isEnabled||t.value===e)return!1;this.editor.execute("heading",{value:e})}))}))}_addBlockQuoteAutoformats(){this.editor.commands.get("blockQuote")&&Ep(this.editor,this,/^>\s$/,"blockQuote")}_addCodeBlockAutoformats(){const t=this.editor,e=t.model.document.selection;t.commands.get("codeBlock")&&Ep(t,this,/^```$/,(()=>{if(e.getFirstPosition().parent.is("element","listItem"))return!1;this.editor.execute("codeBlock",{usePreviousLanguageChoice:!0})}))}_addHorizontalLineAutoformats(){this.editor.commands.get("horizontalLine")&&Ep(this.editor,this,/^---$/,"horizontalLine")}}function Dp(t,e){return(n,o)=>{if(!t.commands.get(e).isEnabled)return!1;const i=t.model.schema.getValidRanges(o,e);for(const t of i)n.setAttribute(e,!0,t);n.removeSelectionAttribute(e)}}class Ip extends pe{constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model,n=e.document.selection,o=void 0===t.forceValue?!this.value:t.forceValue;e.change((t=>{if(n.isCollapsed)o?t.setSelectionAttribute(this.attributeKey,!0):t.removeSelectionAttribute(this.attributeKey);else{const i=e.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const e of i)o?t.setAttribute(this.attributeKey,o,e):t.removeAttribute(this.attributeKey,e)}}))}_getValueFromFirstAllowedNode(){const t=this.editor.model,e=t.schema,n=t.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);for(const t of n.getRanges())for(const n of t.getItems())if(e.checkAttribute(n,this.attributeKey))return n.hasAttribute(this.attributeKey);return!1}}const Pp="bold";class zp extends ge{static get pluginName(){return"BoldEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Pp}),t.model.schema.setAttributeProperties(Pp,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Pp,view:"strong",upcastAlso:["b",t=>{const e=t.getStyle("font-weight");return e?"bold"==e||Number(e)>=600?{name:!0,styles:["font-weight"]}:void 0:null}]}),t.commands.add(Pp,new Ip(t,Pp)),t.keystrokes.set("CTRL+B",Pp)}}const Rp="bold";class Vp extends ge{static get pluginName(){return"BoldUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(Rp,(n=>{const o=t.commands.get(Rp),i=new wh(n);return i.set({label:e("Bold"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.6 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z"/></svg>',keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(Rp),t.editing.view.focus()})),i}))}}const Fp="italic";class Np extends ge{static get pluginName(){return"ItalicEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Fp}),t.model.schema.setAttributeProperties(Fp,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Fp,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),t.commands.add(Fp,new Ip(t,Fp)),t.keystrokes.set("CTRL+I",Fp)}}const Mp="italic";class Op extends ge{static get pluginName(){return"ItalicUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(Mp,(n=>{const o=t.commands.get(Mp),i=new wh(n);return i.set({label:e("Italic"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.586 14.633.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z"/></svg>',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(Mp),t.editing.view.focus()})),i}))}}const Lp="superscript";class Hp extends ge{static get pluginName(){return"SuperscriptEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Lp}),t.model.schema.setAttributeProperties(Lp,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Lp,view:"sup",upcastAlso:[{styles:{"vertical-align":"super"}}]}),t.commands.add(Lp,new Ip(t,Lp))}}const qp="superscript";class Wp extends ge{static get pluginName(){return"SuperscriptUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(qp,(n=>{const o=t.commands.get(qp),i=new wh(n);return i.set({label:e("Superscript"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.677 8.678h2.549c.254 0 .447.05.58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393c-.105.108-.266.162-.48.162h-3.594c-.245 0-.435-.066-.572-.197a.621.621 0 0 1-.205-.463c0-.114.044-.265.132-.453a1.62 1.62 0 0 1 .288-.444c.433-.436.824-.81 1.172-1.122.348-.312.597-.517.747-.615.267-.183.49-.368.667-.553.177-.185.312-.375.405-.57.093-.194.139-.384.139-.57a1.008 1.008 0 0 0-.554-.917 1.197 1.197 0 0 0-.56-.133c-.426 0-.761.182-1.005.546a2.332 2.332 0 0 0-.164.39 1.609 1.609 0 0 1-.258.488c-.096.114-.237.17-.423.17a.558.558 0 0 1-.405-.156.568.568 0 0 1-.161-.427c0-.218.05-.446.151-.683.101-.238.252-.453.452-.646s.454-.349.762-.467a2.998 2.998 0 0 1 1.081-.178c.498 0 .923.076 1.274.228a1.916 1.916 0 0 1 1.004 1.032 1.984 1.984 0 0 1-.156 1.794c-.2.32-.405.572-.613.754-.208.182-.558.468-1.048.857-.49.39-.826.691-1.008.906a2.703 2.703 0 0 0-.24.309zM7.03 10.349l3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53l3.818 3.82z"/></svg>',tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(qp),t.editing.view.focus()})),i}))}}const Up="subscript";class jp extends ge{static get pluginName(){return"SubscriptEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Up}),t.model.schema.setAttributeProperties(Up,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Up,view:"sub",upcastAlso:[{styles:{"vertical-align":"sub"}}]}),t.commands.add(Up,new Ip(t,Up))}}const $p="subscript";class Gp extends ge{static get pluginName(){return"SubscriptUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add($p,(n=>{const o=t.commands.get($p),i=new wh(n);return i.set({label:e("Subscript"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m7.03 10.349 3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53l3.818 3.82zm8.147 7.829h2.549c.254 0 .447.05.58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393c-.105.108-.266.162-.48.162h-3.594c-.245 0-.435-.066-.572-.197a.621.621 0 0 1-.205-.463c0-.114.044-.265.132-.453a1.62 1.62 0 0 1 .288-.444c.433-.436.824-.81 1.172-1.122.348-.312.597-.517.747-.615.267-.183.49-.368.667-.553.177-.185.312-.375.405-.57.093-.194.139-.384.139-.57a1.008 1.008 0 0 0-.554-.917 1.197 1.197 0 0 0-.56-.133c-.426 0-.761.182-1.005.546a2.332 2.332 0 0 0-.164.39 1.609 1.609 0 0 1-.258.488c-.096.114-.237.17-.423.17a.558.558 0 0 1-.405-.156.568.568 0 0 1-.161-.427c0-.218.05-.446.151-.683.101-.238.252-.453.452-.646s.454-.349.762-.467a2.998 2.998 0 0 1 1.081-.178c.498 0 .923.076 1.274.228a1.916 1.916 0 0 1 1.004 1.032 1.984 1.984 0 0 1-.156 1.794c-.2.32-.405.572-.613.754-.208.182-.558.468-1.048.857-.49.39-.826.691-1.008.906a2.703 2.703 0 0 0-.24.309z"/></svg>',tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute($p),t.editing.view.focus()})),i}))}}const Kp="underline";class Zp extends ge{static get pluginName(){return"UnderlineEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Kp}),t.model.schema.setAttributeProperties(Kp,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Kp,view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),t.commands.add(Kp,new Ip(t,Kp)),t.keystrokes.set("CTRL+U","underline")}}const Jp="underline";class Yp extends ge{static get pluginName(){return"UnderlineUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(Jp,(n=>{const o=t.commands.get(Jp),i=new wh(n);return i.set({label:e("Underline"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 18v-1.5h14V18zm2.2-8V3.6c0-.4.4-.6.8-.6.3 0 .7.2.7.6v6.2c0 2 1.3 2.8 3.2 2.8 1.9 0 3.4-.9 3.4-2.9V3.6c0-.3.4-.5.8-.5.3 0 .7.2.7.5V10c0 2.7-2.2 4-4.9 4-2.6 0-4.7-1.2-4.7-4z"/></svg>',keystroke:"CTRL+U",tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(Jp),t.editing.view.focus()})),i}))}}const Qp="strikethrough";class Xp extends ge{static get pluginName(){return"StrikethroughEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Qp}),t.model.schema.setAttributeProperties(Qp,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Qp,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),t.commands.add(Qp,new Ip(t,Qp)),t.keystrokes.set("CTRL+SHIFT+X","strikethrough")}}const tf="strikethrough";class ef extends ge{static get pluginName(){return"StrikethroughUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(tf,(n=>{const o=t.commands.get(tf),i=new wh(n);return i.set({label:e("Strikethrough"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.1 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6zM6.8 9 6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z"/><path d="M3 10.5V9h14v1.5z"/></svg>',keystroke:"CTRL+SHIFT+X",tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(tf),t.editing.view.focus()})),i}))}}const nf="code";class of extends ge{static get pluginName(){return"CodeEditing"}static get requires(){return[hp]}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:nf}),t.model.schema.setAttributeProperties(nf,{isFormatting:!0,copyOnEnter:!1}),t.conversion.attributeToElement({model:nf,view:"code",upcastAlso:{styles:{"word-wrap":"break-word"}}}),t.commands.add(nf,new Ip(t,nf)),t.plugins.get(hp).registerAttribute(nf),xp(t,nf,"code","ck-code_selected")}}var rf=n(8603),sf={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(rf.Z,sf);rf.Z.locals;const af="code";class lf extends ge{static get pluginName(){return"CodeUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(af,(n=>{const o=t.commands.get(af),i=new wh(n);return i.set({label:e("Code"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12.5 5.7 5.2 3.9v1.3l-5.6 4c-.1.2-.3.2-.5.2-.3-.1-.6-.7-.6-1l.3-.4 4.7-3.5L11.5 7l-.2-.2c-.1-.3-.1-.6 0-.8.2-.2.5-.4.8-.4a.8.8 0 0 1 .4.1zm-5.2 0L2 9.6v1.3l5.6 4c.1.2.3.2.5.2.3-.1.7-.7.6-1 0-.1 0-.3-.2-.4l-5-3.5L8.2 7l.2-.2c.1-.3.1-.6 0-.8-.2-.2-.5-.4-.8-.4a.8.8 0 0 0-.3.1z"/></svg>',tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(af),t.editing.view.focus()})),i}))}}function*cf(t,e){for(const n of e)n&&t.getAttributeProperties(n[0]).copyOnEnter&&(yield n)}class df extends pe{execute(){const t=this.editor.model,e=t.document;t.change((n=>{!function(t,e,n,o){const i=n.isCollapsed,r=n.getFirstRange(),s=r.start.parent,a=r.end.parent;if(o.isLimit(s)||o.isLimit(a))return void(i||s!=a||t.deleteContent(n));if(i){const t=cf(e.model.schema,n.getAttributes());hf(e,r.start),e.setSelectionAttribute(t)}else{const o=!(r.start.isAtStart&&r.end.isAtEnd),i=s==a;t.deleteContent(n,{leaveUnmerged:o}),o&&(i?hf(e,n.focus):e.setSelection(a,0))}}(this.editor.model,n,e.selection,t.schema),this.fire("afterExecute",{writer:n})}))}}function hf(t,e){t.split(e),t.setSelection(e.parent.nextSibling,0)}class uf extends vs{constructor(t){super(t);const e=this.document;e.on("keydown",((t,n)=>{if(this.isEnabled&&n.keyCode==hr.enter){const o=new ji(e,"enter",e.selection.getFirstRange());e.fire(o,new $s(e,n.domEvent,{isSoft:n.shiftKey})),o.stop.called&&t.stop()}}))}observe(){}}class gf extends ge{static get pluginName(){return"Enter"}init(){const t=this.editor,e=t.editing.view,n=e.document;e.addObserver(uf),t.commands.add("enter",new df(t)),this.listenTo(n,"enter",((n,o)=>{o.preventDefault(),o.isSoft||(t.execute("enter"),e.scrollToTheSelection())}),{priority:"low"})}}class mf extends pe{execute(){const t=this.editor.model,e=t.document;t.change((n=>{!function(t,e,n){const o=n.isCollapsed,i=n.getFirstRange(),r=i.start.parent,s=i.end.parent,a=r==s;if(o){const o=cf(t.schema,n.getAttributes());pf(t,e,i.end),e.removeSelectionAttribute(n.getAttributeKeys()),e.setSelectionAttribute(o)}else{const o=!(i.start.isAtStart&&i.end.isAtEnd);t.deleteContent(n,{leaveUnmerged:o}),a?pf(t,e,n.focus):o&&e.setSelection(s,0)}}(t,n,e.selection),this.fire("afterExecute",{writer:n})}))}refresh(){const t=this.editor.model,e=t.document;this.isEnabled=function(t,e){if(e.rangeCount>1)return!1;const n=e.anchor;if(!n||!t.checkChild(n,"softBreak"))return!1;const o=e.getFirstRange(),i=o.start.parent,r=o.end.parent;if((ff(i,t)||ff(r,t))&&i!==r)return!1;return!0}(t.schema,e.selection)}}function pf(t,e,n){const o=e.createElement("softBreak");t.insertContent(o,n),e.setSelection(o,"after")}function ff(t,e){return!t.is("rootElement")&&(e.isLimit(t)||ff(t.parent,e))}class bf extends ge{static get pluginName(){return"ShiftEnter"}init(){const t=this.editor,e=t.model.schema,n=t.conversion,o=t.editing.view,i=o.document;e.register("softBreak",{allowWhere:"$text",isInline:!0}),n.for("upcast").elementToElement({model:"softBreak",view:"br"}),n.for("downcast").elementToElement({model:"softBreak",view:(t,{writer:e})=>e.createEmptyElement("br")}),o.addObserver(uf),t.commands.add("shiftEnter",new mf(t)),this.listenTo(i,"enter",((e,n)=>{n.preventDefault(),n.isSoft&&(t.execute("shiftEnter"),o.scrollToTheSelection())}),{priority:"low"})}}class kf extends pe{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,n=e.schema,o=e.document.selection,i=Array.from(o.getSelectedBlocks()),r=void 0===t.forceValue?!this.value:t.forceValue;e.change((t=>{if(r){const e=i.filter((t=>wf(t)||Af(n,t)));this._applyQuote(t,e)}else this._removeQuote(t,i.filter(wf))}))}_getValue(){const t=xa(this.editor.model.document.selection.getSelectedBlocks());return!(!t||!wf(t))}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,n=xa(t.getSelectedBlocks());return!!n&&Af(e,n)}_removeQuote(t,e){Cf(t,e).reverse().forEach((e=>{if(e.start.isAtStart&&e.end.isAtEnd)return void t.unwrap(e.start.parent);if(e.start.isAtStart){const n=t.createPositionBefore(e.start.parent);return void t.move(e,n)}e.end.isAtEnd||t.split(e.end);const n=t.createPositionAfter(e.end.parent);t.move(e,n)}))}_applyQuote(t,e){const n=[];Cf(t,e).reverse().forEach((e=>{let o=wf(e.start);o||(o=t.createElement("blockQuote"),t.wrap(e,o)),n.push(o)})),n.reverse().reduce(((e,n)=>e.nextSibling==n?(t.merge(t.createPositionAfter(e)),e):n))}}function wf(t){return"blockQuote"==t.parent.name?t.parent:null}function Cf(t,e){let n,o=0;const i=[];for(;o<e.length;){const r=e[o],s=e[o+1];n||(n=t.createPositionBefore(r)),s&&r.nextSibling==s||(i.push(t.createRange(n,t.createPositionAfter(r))),n=null),o++}return i}function Af(t,e){const n=t.checkChild(e.parent,"blockQuote"),o=t.checkChild(["$root","blockQuote"],e);return n&&o}class _f extends ge{static get pluginName(){return"BlockQuoteEditing"}static get requires(){return[gf,lp]}init(){const t=this.editor,e=t.model.schema;t.commands.add("blockQuote",new kf(t)),e.register("blockQuote",{allowWhere:"$block",allowContentOf:"$root"}),t.conversion.elementToElement({model:"blockQuote",view:"blockquote"}),t.model.document.registerPostFixer((n=>{const o=t.model.document.differ.getChanges();for(const t of o)if("insert"==t.type){const o=t.position.nodeAfter;if(!o)continue;if(o.is("element","blockQuote")&&o.isEmpty)return n.remove(o),!0;if(o.is("element","blockQuote")&&!e.checkChild(t.position,o))return n.unwrap(o),!0;if(o.is("element")){const t=n.createRangeIn(o);for(const o of t.getItems())if(o.is("element","blockQuote")&&!e.checkChild(n.createPositionBefore(o),o))return n.unwrap(o),!0}}else if("remove"==t.type){const e=t.position.parent;if(e.is("element","blockQuote")&&e.isEmpty)return n.remove(e),!0}return!1}));const n=this.editor.editing.view.document,o=t.model.document.selection,i=t.commands.get("blockQuote");this.listenTo(n,"enter",((e,n)=>{if(!o.isCollapsed||!i.value)return;o.getLastPosition().parent.isEmpty&&(t.execute("blockQuote"),t.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())}),{context:"blockquote"}),this.listenTo(n,"delete",((e,n)=>{if("backward"!=n.direction||!o.isCollapsed||!i.value)return;const r=o.getLastPosition().parent;r.isEmpty&&!r.previousSibling&&(t.execute("blockQuote"),t.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())}),{context:"blockquote"})}}var vf=n(3062),yf={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(vf.Z,yf);vf.Z.locals;class xf extends ge{static get pluginName(){return"BlockQuoteUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("blockQuote",(n=>{const o=t.commands.get("blockQuote"),i=new wh(n);return i.set({label:e("Block quote"),icon:Fd.quote,tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute("blockQuote"),t.editing.view.focus()})),i}))}}class Ef extends pe{refresh(){const t=this.editor.model,e=xa(t.document.selection.getSelectedBlocks());this.value=!!e&&e.is("element","paragraph"),this.isEnabled=!!e&&Sf(e,t.schema)}execute(t={}){const e=this.editor.model,n=e.document;e.change((o=>{const i=(t.selection||n.selection).getSelectedBlocks();for(const t of i)!t.is("element","paragraph")&&Sf(t,e.schema)&&o.rename(t,"paragraph")}))}}function Sf(t,e){return e.checkChild(t.parent,"paragraph")&&!e.isObject(t)}class Tf extends pe{execute(t){const e=this.editor.model;let n=t.position;e.change((t=>{const o=t.createElement("paragraph");if(!e.schema.checkChild(n.parent,o)){const i=e.schema.findAllowedParent(n,o);if(!i)return;n=t.split(n,i).position}e.insertContent(o,n),t.setSelection(o,"in")}))}}class Bf extends ge{static get pluginName(){return"Paragraph"}init(){const t=this.editor,e=t.model;t.commands.add("paragraph",new Ef(t)),t.commands.add("insertParagraph",new Tf(t)),e.schema.register("paragraph",{inheritAllFrom:"$block"}),t.conversion.elementToElement({model:"paragraph",view:"p"}),t.conversion.for("upcast").elementToElement({model:(t,{writer:e})=>Bf.paragraphLikeElements.has(t.name)?t.isEmpty?null:e.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}Bf.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);class Df extends pe{constructor(t,e){super(t),this.modelElements=e}refresh(){const t=xa(this.editor.model.document.selection.getSelectedBlocks());this.value=!!t&&this.modelElements.includes(t.name)&&t.name,this.isEnabled=!!t&&this.modelElements.some((e=>If(t,e,this.editor.model.schema)))}execute(t){const e=this.editor.model,n=e.document,o=t.value;e.change((t=>{const i=Array.from(n.selection.getSelectedBlocks()).filter((t=>If(t,o,e.schema)));for(const e of i)e.is("element",o)||t.rename(e,o)}))}}function If(t,e,n){return n.checkChild(t.parent,e)&&!n.isObject(t)}const Pf="paragraph";class zf extends ge{static get pluginName(){return"HeadingEditing"}constructor(t){super(t),t.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[Bf]}init(){const t=this.editor,e=t.config.get("heading.options"),n=[];for(const o of e)o.model!==Pf&&(t.model.schema.register(o.model,{inheritAllFrom:"$block"}),t.conversion.elementToElement(o),n.push(o.model));this._addDefaultH1Conversion(t),t.commands.add("heading",new Df(t,n))}afterInit(){const t=this.editor,e=t.commands.get("enter"),n=t.config.get("heading.options");e&&this.listenTo(e,"afterExecute",((e,o)=>{const i=t.model.document.selection.getFirstPosition().parent;n.some((t=>i.is("element",t.model)))&&!i.is("element",Pf)&&0===i.childCount&&o.writer.rename(i,Pf)}))}_addDefaultH1Conversion(t){t.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:s.get("low")+1})}}function Rf(t){const e=t.t,n={Paragraph:e("Paragraph"),"Heading 1":e("Heading 1"),"Heading 2":e("Heading 2"),"Heading 3":e("Heading 3"),"Heading 4":e("Heading 4"),"Heading 5":e("Heading 5"),"Heading 6":e("Heading 6")};return t.config.get("heading.options").map((t=>{const e=n[t.title];return e&&e!=t.title&&(t.title=e),t}))}var Vf=n(8733),Ff={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Vf.Z,Ff);Vf.Z.locals;class Nf extends ge{static get pluginName(){return"HeadingUI"}init(){const t=this.editor,e=t.t,n=Rf(t),o=e("Choose heading"),i=e("Heading");t.ui.componentFactory.add("heading",(e=>{const r={},s=new Bo,a=t.commands.get("heading"),l=t.commands.get("paragraph"),c=[a];for(const t of n){const e={type:"button",model:new Ru({label:t.title,class:t.class,withText:!0})};"paragraph"===t.model?(e.model.bind("isOn").to(l,"value"),e.model.set("commandName","paragraph"),c.push(l)):(e.model.bind("isOn").to(a,"value",(e=>e===t.model)),e.model.set({commandName:"heading",commandValue:t.model})),s.add(e),r[t.model]=t.title}const d=lu(e);return du(d,s),d.buttonView.set({isOn:!1,withText:!0,tooltip:i}),d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),d.bind("isEnabled").toMany(c,"isEnabled",((...t)=>t.some((t=>t)))),d.buttonView.bind("label").to(a,"value",l,"value",((t,e)=>{const n=t||e&&"paragraph";return r[n]?r[n]:o})),this.listenTo(d,"execute",(e=>{t.execute(e.source.commandName,e.source.commandValue?{value:e.source.commandValue}:void 0),t.editing.view.focus()})),d}))}}class Mf{constructor(){this._stack=[]}add(t,e){const n=this._stack,o=n[0];this._insertDescriptor(t);const i=n[0];o===i||Of(o,i)||this.fire("change:top",{oldDescriptor:o,newDescriptor:i,writer:e})}remove(t,e){const n=this._stack,o=n[0];this._removeDescriptor(t);const i=n[0];o===i||Of(o,i)||this.fire("change:top",{oldDescriptor:o,newDescriptor:i,writer:e})}_insertDescriptor(t){const e=this._stack,n=e.findIndex((e=>e.id===t.id));if(Of(t,e[n]))return;n>-1&&e.splice(n,1);let o=0;for(;e[o]&&Lf(e[o],t);)o++;e.splice(o,0,t)}_removeDescriptor(t){const e=this._stack,n=e.findIndex((e=>e.id===t));n>-1&&e.splice(n,1)}}function Of(t,e){return t&&e&&t.priority==e.priority&&Hf(t.classes)==Hf(e.classes)}function Lf(t,e){return t.priority>e.priority||!(t.priority<e.priority)&&Hf(t.classes)>Hf(e.classes)}function Hf(t){return Array.isArray(t)?t.sort().join(","):t}ue(Mf,f);const qf='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z"/><path fill-opacity=".256" d="M1 1h14v14H1z"/><g class="ck-icon__selected-indicator"><path d="M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z"/><path fill-opacity=".254" d="M1 1h14v14H1z"/></g></svg>',Wf="ck-widget_selected";function Uf(t){return!!t.is("element")&&!!t.getCustomProperty("widget")}function jf(t,e,n={}){if(!t.is("containerElement"))throw new a("widget-to-widget-wrong-element-type",null,{element:t});return e.setAttribute("contenteditable","false",t),e.addClass("ck-widget",t),e.setCustomProperty("widget",!0,t),t.getFillerOffset=Xf,n.label&&function(t,e,n){n.setCustomProperty("widgetLabel",e,t)}(t,n.label,e),n.hasSelectionHandle&&function(t,e){const n=e.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(t){const e=this.toDomElement(t),n=new gh;return n.set("content",qf),n.render(),e.appendChild(n.element),e}));e.insert(e.createPositionAt(t,0),n),e.addClass(["ck-widget_with-selection-handle"],t)}(t,e),Kf(t,e),t}function $f(t,e,n){if(e.classes&&n.addClass(Io(e.classes),t),e.attributes)for(const o in e.attributes)n.setAttribute(o,e.attributes[o],t)}function Gf(t,e,n){if(e.classes&&n.removeClass(Io(e.classes),t),e.attributes)for(const o in e.attributes)n.removeAttribute(o,t)}function Kf(t,e,n=$f,o=Gf){const i=new Mf;i.on("change:top",((e,i)=>{i.oldDescriptor&&o(t,i.oldDescriptor,i.writer),i.newDescriptor&&n(t,i.newDescriptor,i.writer)})),e.setCustomProperty("addHighlight",((t,e,n)=>i.add(e,n)),t),e.setCustomProperty("removeHighlight",((t,e,n)=>i.remove(e,n)),t)}function Zf(t){const e=t.getCustomProperty("widgetLabel");return e?"function"==typeof e?e():e:""}function Jf(t,e){return e.addClass(["ck-editor__editable","ck-editor__nested-editable"],t),e.setAttribute("contenteditable",t.isReadOnly?"false":"true",t),t.on("change:isReadOnly",((n,o,i)=>{e.setAttribute("contenteditable",i?"false":"true",t)})),t.on("change:isFocused",((n,o,i)=>{i?e.addClass("ck-editor__nested-editable_focused",t):e.removeClass("ck-editor__nested-editable_focused",t)})),Kf(t,e),t}function Yf(t,e){const n=t.getSelectedElement();if(n){const o=nb(t);if(o)return e.createRange(e.createPositionAt(n,o));if(e.schema.isObject(n)&&!e.schema.isInline(n))return e.createRangeOn(n)}const o=t.getSelectedBlocks().next().value;if(o){if(o.isEmpty)return e.createRange(e.createPositionAt(o,0));const n=e.createPositionAfter(o);return t.focus.isTouching(n)?e.createRange(n):e.createRange(e.createPositionBefore(o))}return e.createRange(t.focus)}function Qf(t,e){return(n,o)=>{const{mapper:i,viewPosition:r}=o,s=i.findMappedViewAncestor(r);if(!e(s))return;const a=i.toModelElement(s);o.modelPosition=t.createPositionAt(a,r.isAtStart?"before":"after")}}function Xf(){return null}const tb="widget-type-around";function eb(t,e,n){return t&&Uf(t)&&!n.isInline(e)}function nb(t){return t.getAttribute(tb)}var ob=n(4921),ib={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(ob.Z,ib);ob.Z.locals;const rb=["before","after"],sb=(new DOMParser).parseFromString('<svg viewBox="0 0 10 8" xmlns="http://www.w3.org/2000/svg"><path d="M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038"/></svg>',"image/svg+xml").firstChild,ab="ck-widget__type-around_disabled";class lb extends ge{static get pluginName(){return"WidgetTypeAround"}static get requires(){return[gf,lp]}constructor(t){super(t),this._currentFakeCaretModelElement=null}init(){const t=this.editor,e=t.editing.view;this.on("change:isEnabled",((n,o,i)=>{e.change((t=>{for(const n of e.document.roots)i?t.removeClass(ab,n):t.addClass(ab,n)})),i||t.model.change((t=>{t.removeSelectionAttribute(tb)}))})),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableDeleteContentIntegration()}destroy(){this._currentFakeCaretModelElement=null}_insertParagraph(t,e){const n=this.editor,o=n.editing.view;n.execute("insertParagraph",{position:n.model.createPositionAt(t,e)}),o.focus(),o.scrollToTheSelection()}_listenToIfEnabled(t,e,n,o){this.listenTo(t,e,((...t)=>{this.isEnabled&&n(...t)}),o)}_insertParagraphAccordingToFakeCaretPosition(){const t=this.editor.model.document.selection,e=nb(t);if(!e)return!1;const n=t.getSelectedElement();return this._insertParagraph(n,e),!0}_enableTypeAroundUIInjection(){const t=this.editor,e=t.model.schema,n=t.locale.t,o={before:n("Insert paragraph before block"),after:n("Insert paragraph after block")};t.editing.downcastDispatcher.on("insert",((t,n,i)=>{const r=i.mapper.toViewElement(n.item);eb(r,n.item,e)&&function(t,e,n){const o=t.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(t){const n=this.toDomElement(t);return function(t,e){for(const n of rb){const o=new Ud({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${n}`],title:e[n]},children:[t.ownerDocument.importNode(sb,!0)]});t.appendChild(o.render())}}(n,e),function(t){const e=new Ud({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});t.appendChild(e.render())}(n),n}));t.insert(t.createPositionAt(n,"end"),o)}(i.writer,o,r)}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const t=this.editor,e=t.model,n=e.document.selection,o=e.schema,i=t.editing.view;function r(t){return`ck-widget_type-around_show-fake-caret_${t}`}this._listenToIfEnabled(i.document,"arrowKey",((t,e)=>{this._handleArrowKeyPress(t,e)}),{context:[Uf,"$text"],priority:"high"}),this._listenToIfEnabled(n,"change:range",((e,n)=>{n.directChange&&t.model.change((t=>{t.removeSelectionAttribute(tb)}))})),this._listenToIfEnabled(e.document,"change:data",(()=>{const e=n.getSelectedElement();if(e){if(eb(t.editing.mapper.toViewElement(e),e,o))return}t.model.change((t=>{t.removeSelectionAttribute(tb)}))})),this._listenToIfEnabled(t.editing.downcastDispatcher,"selection",((t,e,n)=>{const i=n.writer;if(this._currentFakeCaretModelElement){const t=n.mapper.toViewElement(this._currentFakeCaretModelElement);t&&(i.removeClass(rb.map(r),t),this._currentFakeCaretModelElement=null)}const s=e.selection.getSelectedElement();if(!s)return;const a=n.mapper.toViewElement(s);if(!eb(a,s,o))return;const l=nb(e.selection);l&&(i.addClass(r(l),a),this._currentFakeCaretModelElement=s)})),this._listenToIfEnabled(t.ui.focusTracker,"change:isFocused",((e,n,o)=>{o||t.model.change((t=>{t.removeSelectionAttribute(tb)}))}))}_handleArrowKeyPress(t,e){const n=this.editor,o=n.model,i=o.document.selection,r=o.schema,s=n.editing.view,a=function(t,e){const n=fr(t,e);return"down"===n||"right"===n}(e.keyCode,n.locale.contentLanguageDirection),l=s.document.selection.getSelectedElement();let c;eb(l,n.editing.mapper.toModelElement(l),r)?c=this._handleArrowKeyPressOnSelectedWidget(a):i.isCollapsed?c=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):e.shiftKey||(c=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),c&&(e.preventDefault(),t.stop())}_handleArrowKeyPressOnSelectedWidget(t){const e=this.editor.model,n=nb(e.document.selection);return e.change((e=>{if(!n)return e.setSelectionAttribute(tb,t?"after":"before"),!0;if(!(n===(t?"after":"before")))return e.removeSelectionAttribute(tb),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(t){const e=this.editor,n=e.model,o=n.schema,i=e.plugins.get("Widget"),r=i._getObjectElementNextToSelection(t);return!!eb(e.editing.mapper.toViewElement(r),r,o)&&(n.change((e=>{i._setSelectionOverElement(r),e.setSelectionAttribute(tb,t?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(t){const e=this.editor,n=e.model,o=n.schema,i=e.editing.mapper,r=n.document.selection,s=t?r.getLastPosition().nodeBefore:r.getFirstPosition().nodeAfter;return!!eb(i.toViewElement(s),s,o)&&(n.change((e=>{e.setSelection(s,"on"),e.setSelectionAttribute(tb,t?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const t=this.editor,e=t.editing.view;this._listenToIfEnabled(e.document,"mousedown",((n,o)=>{const i=o.domTarget.closest(".ck-widget__type-around__button");if(!i)return;const r=function(t){return t.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(i),s=function(t,e){const n=t.closest(".ck-widget");return e.mapDomToView(n)}(i,e.domConverter),a=t.editing.mapper.toModelElement(s);this._insertParagraph(a,r),o.preventDefault(),n.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const t=this.editor,e=t.model.document.selection,n=t.editing.view;this._listenToIfEnabled(n.document,"enter",((n,o)=>{if("atTarget"!=n.eventPhase)return;const i=e.getSelectedElement(),r=t.editing.mapper.toViewElement(i),s=t.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:eb(r,i,s)&&(this._insertParagraph(i,o.isSoft?"before":"after"),a=!0),a&&(o.preventDefault(),n.stop())}),{context:Uf})}_enableInsertingParagraphsOnTypingKeystroke(){const t=this.editor.editing.view,e=[hr.enter,hr.delete,hr.backspace];this._listenToIfEnabled(t.document,"keydown",((t,n)=>{e.includes(n.keyCode)||ep(n)||this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const t=this.editor,e=t.editing.view,n=t.model,o=n.schema;this._listenToIfEnabled(e.document,"delete",((e,i)=>{if("atTarget"!=e.eventPhase)return;const r=nb(n.document.selection);if(!r)return;const s=i.direction,a=n.document.selection.getSelectedElement(),l="forward"==s;if("before"===r===l)t.execute("delete",{selection:n.createSelection(a,"on")});else{const e=o.getNearestSelectionRange(n.createPositionAt(a,r),s);if(e)if(e.isCollapsed){const i=n.createSelection(e.start);if(n.modifySelection(i,{direction:s}),i.focus.isEqual(e.start)){const t=function(t,e){let n=e;for(const o of e.getAncestors({parentFirst:!0})){if(o.childCount>1||t.isLimit(o))break;n=o}return n}(o,e.start.parent);n.deleteContent(n.createSelection(t,"on"),{doNotAutoparagraph:!0})}else n.change((n=>{n.setSelection(e),t.execute(l?"deleteForward":"delete")}))}else n.change((n=>{n.setSelection(e),t.execute(l?"deleteForward":"delete")}))}i.preventDefault(),e.stop()}),{context:Uf})}_enableInsertContentIntegration(){const t=this.editor,e=this.editor.model,n=e.document.selection;this._listenToIfEnabled(t.model,"insertContent",((t,[o,i])=>{if(i&&!i.is("documentSelection"))return;const r=nb(n);return r?(t.stop(),e.change((t=>{const i=n.getSelectedElement(),s=e.createPositionAt(i,r),a=t.createSelection(s),l=e.insertContent(o,a);return t.setSelection(a),l}))):void 0}),{priority:"high"})}_enableDeleteContentIntegration(){const t=this.editor,e=this.editor.model.document.selection;this._listenToIfEnabled(t.model,"deleteContent",((t,[n])=>{if(n&&!n.is("documentSelection"))return;nb(e)&&t.stop()}),{priority:"high"})}}function cb(t){const e=t.model;return(n,o)=>{const i=o.keyCode==hr.arrowup,r=o.keyCode==hr.arrowdown,s=o.shiftKey,a=e.document.selection;if(!i&&!r)return;const l=r;if(s&&function(t,e){return!t.isCollapsed&&t.isBackward==e}(a,l))return;const c=function(t,e,n){const o=t.model;if(n){const t=e.isCollapsed?e.focus:e.getLastPosition(),n=db(o,t,"forward");if(!n)return null;const i=o.createRange(t,n),r=hb(o.schema,i,"backward");return r?o.createRange(t,r):null}{const t=e.isCollapsed?e.focus:e.getFirstPosition(),n=db(o,t,"backward");if(!n)return null;const i=o.createRange(n,t),r=hb(o.schema,i,"forward");return r?o.createRange(r,t):null}}(t,a,l);if(c){if(c.isCollapsed){if(a.isCollapsed)return;if(s)return}(c.isCollapsed||function(t,e,n){const o=t.model,i=t.view.domConverter;if(n){const t=o.createSelection(e.start);o.modifySelection(t),t.focus.isAtEnd||e.start.isEqual(t.focus)||(e=o.createRange(t.focus,e.end))}const r=t.mapper.toViewRange(e),s=i.viewRangeToDom(r),a=ka.getDomRangeRects(s);let l;for(const t of a)if(void 0!==l){if(Math.round(t.top)>=l)return!1;l=Math.max(l,Math.round(t.bottom))}else l=Math.round(t.bottom);return!0}(t,c,l))&&(e.change((t=>{const n=l?c.end:c.start;if(s){const o=e.createSelection(a.anchor);o.setFocus(n),t.setSelection(o)}else t.setSelection(n)})),n.stop(),o.preventDefault(),o.stopPropagation())}}}function db(t,e,n){const o=t.schema,i=t.createRangeIn(e.root),r="forward"==n?"elementStart":"elementEnd";for(const{previousPosition:t,item:s,type:a}of i.getWalker({startPosition:e,direction:n})){if(o.isLimit(s)&&!o.isInline(s))return t;if(a==r&&o.isBlock(s))return null}return null}function hb(t,e,n){const o="backward"==n?e.end:e.start;if(t.checkChild(o,"$text"))return o;for(const{nextPosition:o}of e.getWalker({direction:n}))if(t.checkChild(o,"$text"))return o;return null}var ub=n(3488),gb={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(ub.Z,gb);ub.Z.locals;class mb extends ge{static get pluginName(){return"Widget"}static get requires(){return[lb,lp]}init(){const t=this.editor,e=t.editing.view,n=e.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",((e,n,o)=>{const i=o.writer,r=n.selection;if(r.isCollapsed)return;const s=r.getSelectedElement();if(!s)return;const a=t.editing.mapper.toViewElement(s);Uf(a)&&o.consumable.consume(r,"selection")&&i.setSelection(i.createRangeOn(a),{fake:!0,label:Zf(a)})})),this.editor.editing.downcastDispatcher.on("selection",((t,e,n)=>{this._clearPreviouslySelectedWidgets(n.writer);const o=n.writer,i=o.document.selection;let r=null;for(const t of i.getRanges())for(const e of t){const t=e.item;Uf(t)&&!pb(t,r)&&(o.addClass(Wf,t),this._previouslySelected.add(t),r=t)}}),{priority:"low"}),e.addObserver(Sg),this.listenTo(n,"mousedown",((...t)=>this._onMousedown(...t))),this.listenTo(n,"arrowKey",((...t)=>{this._handleSelectionChangeOnArrowKeyPress(...t)}),{context:[Uf,"$text"]}),this.listenTo(n,"arrowKey",((...t)=>{this._preventDefaultOnArrowKeyPress(...t)}),{context:"$root"}),this.listenTo(n,"arrowKey",cb(this.editor.editing),{context:"$text"}),this.listenTo(n,"delete",((t,e)=>{this._handleDelete("forward"==e.direction)&&(e.preventDefault(),t.stop())}),{context:"$root"})}_onMousedown(t,e){const n=this.editor,o=n.editing.view,i=o.document;let r=e.target;if(function(t){for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if(Uf(t))return!1;t=t.parent}return!1}(r)){if((ar.isSafari||ar.isGecko)&&e.domEvent.detail>=3){const t=n.editing.mapper,o=r.is("attributeElement")?r.findAncestor((t=>!t.is("attributeElement"))):r,i=t.toModelElement(o);e.preventDefault(),this.editor.model.change((t=>{t.setSelection(i,"in")}))}return}if(!Uf(r)&&(r=r.findAncestor(Uf),!r))return;ar.isAndroid&&e.preventDefault(),i.isFocused||o.focus();const s=n.editing.mapper.toModelElement(r);this._setSelectionOverElement(s)}_handleSelectionChangeOnArrowKeyPress(t,e){const n=e.keyCode,o=this.editor.model,i=o.schema,r=o.document.selection,s=r.getSelectedElement(),a=fr(n,this.editor.locale.contentLanguageDirection),l="down"==a||"right"==a,c="up"==a||"down"==a;if(s&&i.isObject(s)){const n=l?r.getLastPosition():r.getFirstPosition(),s=i.getNearestSelectionRange(n,l?"forward":"backward");return void(s&&(o.change((t=>{t.setSelection(s)})),e.preventDefault(),t.stop()))}if(!r.isCollapsed&&!e.shiftKey){const n=r.getFirstPosition(),s=r.getLastPosition(),a=n.nodeAfter,c=s.nodeBefore;return void((a&&i.isObject(a)||c&&i.isObject(c))&&(o.change((t=>{t.setSelection(l?s:n)})),e.preventDefault(),t.stop()))}if(!r.isCollapsed)return;const d=this._getObjectElementNextToSelection(l);if(d&&i.isObject(d)){if(i.isInline(d)&&c)return;this._setSelectionOverElement(d),e.preventDefault(),t.stop()}}_preventDefaultOnArrowKeyPress(t,e){const n=this.editor.model,o=n.schema,i=n.document.selection.getSelectedElement();i&&o.isObject(i)&&(e.preventDefault(),t.stop())}_handleDelete(t){if(this.editor.isReadOnly)return;const e=this.editor.model.document.selection;if(!e.isCollapsed)return;const n=this._getObjectElementNextToSelection(t);return n?(this.editor.model.change((t=>{let o=e.anchor.parent;for(;o.isEmpty;){const e=o;o=e.parent,t.remove(e)}this._setSelectionOverElement(n)})),!0):void 0}_setSelectionOverElement(t){this.editor.model.change((e=>{e.setSelection(e.createRangeOn(t))}))}_getObjectElementNextToSelection(t){const e=this.editor.model,n=e.schema,o=e.document.selection,i=e.createSelection(o);if(e.modifySelection(i,{direction:t?"forward":"backward"}),i.isEqual(o))return null;const r=t?i.focus.nodeBefore:i.focus.nodeAfter;return r&&n.isObject(r)?r:null}_clearPreviouslySelectedWidgets(t){for(const e of this._previouslySelected)t.removeClass(Wf,e);this._previouslySelected.clear()}}function pb(t,e){return!!e&&Array.from(t.getAncestors()).includes(e)}class fb extends ge{static get requires(){return[Zu]}static get pluginName(){return"WidgetToolbarRepository"}init(){const t=this.editor;if(t.plugins.has("BalloonToolbar")){const e=t.plugins.get("BalloonToolbar");this.listenTo(e,"show",(e=>{(function(t){const e=t.getSelectedElement();return!(!e||!Uf(e))})(t.editing.view.document.selection)&&e.stop()}),{priority:"high"})}this._toolbarDefinitions=new Map,this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(()=>{this._updateToolbarsVisibility()})),this.listenTo(t.ui,"update",(()=>{this._updateToolbarsVisibility()})),this.listenTo(t.ui.focusTracker,"change:isFocused",(()=>{this._updateToolbarsVisibility()}),{priority:"low"})}destroy(){super.destroy();for(const t of this._toolbarDefinitions.values())t.view.destroy()}register(t,{ariaLabel:e,items:n,getRelatedElement:o,balloonClassName:i="ck-toolbar-container"}){if(!n.length)return void l("widget-toolbar-no-items",{toolbarId:t});const r=this.editor,s=r.t,c=new Zh(r.locale);if(c.ariaLabel=e||s("Widget toolbar"),this._toolbarDefinitions.has(t))throw new a("widget-toolbar-duplicated",this,{toolbarId:t});c.fillFromConfig(n,r.ui.componentFactory),this._toolbarDefinitions.set(t,{view:c,getRelatedElement:o,balloonClassName:i})}_updateToolbarsVisibility(){let t=0,e=null,n=null;for(const o of this._toolbarDefinitions.values()){const i=o.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&i)if(this.editor.ui.focusTracker.isFocused){const r=i.getAncestors().length;r>t&&(t=r,e=i,n=o)}else this._isToolbarVisible(o)&&this._hideToolbar(o);else this._isToolbarInBalloon(o)&&this._hideToolbar(o)}n&&this._showToolbar(n,e)}_hideToolbar(t){this._balloon.remove(t.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(t,e){this._isToolbarVisible(t)?bb(this.editor,e):this._isToolbarInBalloon(t)||(this._balloon.add({view:t.view,position:kb(this.editor,e),balloonClassName:t.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const t of this._toolbarDefinitions.values())if(this._isToolbarVisible(t)){const e=t.getRelatedElement(this.editor.editing.view.document.selection);bb(this.editor,e)}})))}_isToolbarVisible(t){return this._balloon.visibleView===t.view}_isToolbarInBalloon(t){return this._balloon.hasView(t.view)}}function bb(t,e){const n=t.plugins.get("ContextualBalloon"),o=kb(t,e);n.updatePosition(o)}function kb(t,e){const n=t.editing.view,o=Lu.defaultPositions;return{target:n.domConverter.mapViewToDom(e),positions:[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast,o.viewportStickyNorth]}}class wb{constructor(t){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}begin(t,e,n){const o=new ka(e);this.activeHandlePosition=function(t){const e=["top-left","top-right","bottom-right","bottom-left"];for(const n of e)if(t.classList.contains(Cb(n)))return n}(t),this._referenceCoordinates=function(t,e){const n=new ka(t),o=e.split("-"),i={x:"right"==o[1]?n.right:n.left,y:"bottom"==o[0]?n.bottom:n.top};return i.x+=t.ownerDocument.defaultView.scrollX,i.y+=t.ownerDocument.defaultView.scrollY,i}(e,function(t){const e=t.split("-"),n={top:"bottom",bottom:"top",left:"right",right:"left"};return`${n[e[0]]}-${n[e[1]]}`}(this.activeHandlePosition)),this.originalWidth=o.width,this.originalHeight=o.height,this.aspectRatio=o.width/o.height;const i=n.style.width;i&&i.match(/^\d+(\.\d*)?%$/)?this.originalWidthPercents=parseFloat(i):this.originalWidthPercents=function(t,e){const n=t.parentElement,o=parseFloat(n.ownerDocument.defaultView.getComputedStyle(n).width);return e.width/o*100}(n,o)}update(t){this.proposedWidth=t.width,this.proposedHeight=t.height,this.proposedWidthPercents=t.widthPercents,this.proposedHandleHostWidth=t.handleHostWidth,this.proposedHandleHostHeight=t.handleHostHeight}}function Cb(t){return`ck-widget__resizer__handle-${t}`}ue(wb,se);class Ab extends Wd{constructor(){super();const t=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",t.to("_viewPosition",(t=>t?`ck-orientation-${t}`:""))],style:{display:t.if("_isVisible","none",(t=>!t))}},children:[{text:t.to("_label")}]})}_bindToState(t,e){this.bind("_isVisible").to(e,"proposedWidth",e,"proposedHeight",((t,e)=>null!==t&&null!==e)),this.bind("_label").to(e,"proposedHandleHostWidth",e,"proposedHandleHostHeight",e,"proposedWidthPercents",((e,n,o)=>"px"===t.unit?`${e}×${n}`:`${o}%`)),this.bind("_viewPosition").to(e,"activeHandlePosition",e,"proposedHandleHostWidth",e,"proposedHandleHostHeight",((t,e,n)=>e<50||n<50?"above-center":t))}_dismiss(){this.unbind(),this._isVisible=!1}}class _b{constructor(t){this._options=t,this._viewResizerWrapper=null,this.set("isEnabled",!0),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",(t=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),t.stop())}),{priority:"high"}),this.on("change:isEnabled",(()=>{this.isEnabled&&this.redraw()}))}attach(){const t=this,e=this._options.viewElement;this._options.editor.editing.view.change((n=>{const o=n.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(e){const n=this.toDomElement(e);return t._appendHandles(n),t._appendSizeUI(n),t.on("change:isEnabled",((t,e,o)=>{n.style.display=o?"":"none"})),n.style.display=t.isEnabled?"":"none",n}));n.insert(n.createPositionAt(e,"end"),o),n.addClass("ck-widget_with-resizer",e),this._viewResizerWrapper=o}))}begin(t){this.state=new wb(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(t,this._getHandleHost(),this._getResizeHost())}updateSize(t){const e=this._proposeNewSize(t);this._options.editor.editing.view.change((t=>{const n=this._options.unit||"%",o=("%"===n?e.widthPercents:e.width)+n;t.setStyle("width",o,this._options.viewElement)}));const n=this._getHandleHost(),o=new ka(n);e.handleHostWidth=Math.round(o.width),e.handleHostHeight=Math.round(o.height);const i=new ka(n);e.width=Math.round(i.width),e.height=Math.round(i.height),this.redraw(o),this.state.update(e)}commit(){const t=this._options.unit||"%",e=("%"===t?this.state.proposedWidthPercents:this.state.proposedWidth)+t;this._options.editor.editing.view.change((()=>{this._cleanup(),this._options.onCommit(e)}))}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(t){const e=this._domResizerWrapper;if(!((n=e)&&n.ownerDocument&&n.ownerDocument.contains(n)))return;var n;const o=e.parentElement,i=this._getHandleHost(),r=this._viewResizerWrapper,s=[r.getStyle("width"),r.getStyle("height"),r.getStyle("left"),r.getStyle("top")];let a;if(o.isSameNode(i)){const e=t||new ka(i);a=[e.width+"px",e.height+"px",void 0,void 0]}else a=[i.offsetWidth+"px",i.offsetHeight+"px",i.offsetLeft+"px",i.offsetTop+"px"];"same"!==Mo(s,a)&&this._options.editor.editing.view.change((t=>{t.setStyle({width:a[0],height:a[1],left:a[2],top:a[3]},r)}))}containsHandle(t){return this._domResizerWrapper.contains(t)}static isResizeHandle(t){return t.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss();this._options.editor.editing.view.change((t=>{t.setStyle("width",this._initialViewWidth,this._options.viewElement)}))}_proposeNewSize(t){const e=this.state,n={x:(o=t).pageX,y:o.pageY};var o;const i=!this._options.isCentered||this._options.isCentered(this),r={x:e._referenceCoordinates.x-(n.x+e.originalWidth),y:n.y-e.originalHeight-e._referenceCoordinates.y};i&&e.activeHandlePosition.endsWith("-right")&&(r.x=n.x-(e._referenceCoordinates.x+e.originalWidth)),i&&(r.x*=2);const s={width:Math.abs(e.originalWidth+r.x),height:Math.abs(e.originalHeight+r.y)};s.dominant=s.width/e.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/e.aspectRatio:a.width=a.height*e.aspectRatio,{width:Math.round(a.width),height:Math.round(a.height),widthPercents:Math.min(Math.round(e.originalWidthPercents/e.originalWidth*a.width*100)/100,100)}}_getResizeHost(){const t=this._domResizerWrapper.parentElement;return this._options.getResizeHost(t)}_getHandleHost(){const t=this._domResizerWrapper.parentElement;return this._options.getHandleHost(t)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(t){const e=["top-left","top-right","bottom-right","bottom-left"];for(const o of e)t.appendChild(new Ud({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(n=o,`ck-widget__resizer__handle-${n}`)}}).render());var n}_appendSizeUI(t){this._sizeView=new Ab,this._sizeView.render(),t.appendChild(this._sizeView.element)}}ue(_b,se);const vb=function(t,e,n){var o=!0,i=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return y(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),aa(t,e,{leading:o,maxWait:e,trailing:i})};var yb=n(8506),xb={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(yb.Z,xb);yb.Z.locals;class Eb extends ge{static get pluginName(){return"WidgetResize"}init(){const t=this.editor.editing,e=rs.window.document;this.set("visibleResizer",null),this.set("_activeResizer",null),this._resizers=new Map,t.view.addObserver(Sg),this._observer=Object.create(Cs),this.listenTo(t.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 n=()=>{this.visibleResizer&&this.visibleResizer.redraw()};this._redrawFocusedResizerThrottled=vb(n,200),this.on("change:visibleResizer",n),this.editor.ui.on("update",this._redrawFocusedResizerThrottled),this.editor.model.document.on("change",(()=>{for(const[t,e]of this._resizers)t.isAttached()||(this._resizers.delete(t),e.destroy())}),{priority:"lowest"}),this._observer.listenTo(rs.window,"resize",this._redrawFocusedResizerThrottled);const o=this.editor.editing.view.document.selection;o.on("change",(()=>{const t=o.getSelectedElement();this.visibleResizer=this.getResizerByViewElement(t)||null}))}destroy(){this._observer.stopListening();for(const t of this._resizers.values())t.destroy();this._redrawFocusedResizerThrottled.cancel()}attachTo(t){const e=new _b(t),n=this.editor.plugins;if(e.attach(),n.has("WidgetToolbarRepository")){const t=n.get("WidgetToolbarRepository");e.on("begin",(()=>{t.forceDisabled("resize")}),{priority:"lowest"}),e.on("cancel",(()=>{t.clearForceDisabled("resize")}),{priority:"highest"}),e.on("commit",(()=>{t.clearForceDisabled("resize")}),{priority:"highest"})}this._resizers.set(t.viewElement,e);const o=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(o)==e&&(this.visibleResizer=e),e}getResizerByViewElement(t){return this._resizers.get(t)}_getResizerByHandle(t){for(const e of this._resizers.values())if(e.containsHandle(t))return e}_mouseDownListener(t,e){const n=e.domTarget;_b.isResizeHandle(n)&&(this._activeResizer=this._getResizerByHandle(n),this._activeResizer&&(this._activeResizer.begin(n),t.stop(),e.preventDefault()))}_mouseMoveListener(t,e){this._activeResizer&&this._activeResizer.updateSize(e)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}ue(Eb,se);class Sb extends pe{refresh(){const t=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!t,this.isEnabled&&t.hasAttribute("alt")?this.value=t.getAttribute("alt"):this.value=!1}execute(t){const e=this.editor,n=e.plugins.get("ImageUtils"),o=e.model,i=n.getClosestSelectedImageElement(o.document.selection);o.change((e=>{e.setAttribute("alt",t.newValue,i)}))}}function Tb(t){return t.createContainerElement("figure",{class:"image"},[t.createEmptyElement("img"),t.createSlot()])}function Bb(t,e){if(t.plugins.has("ImageInlineEditing")!==t.plugins.has("ImageBlockEditing"))return{name:"img"};const n=t.plugins.get("ImageUtils");return t=>{if(!n.isInlineImageView(t))return null;return(t.findAncestor(n.isBlockImageView)?"imageBlock":"imageInline")!==e?null:{name:!0}}}function Db(t,e){const n=xa(e.getSelectedBlocks());return!n||t.isObject(n)||n.isEmpty&&"listItem"!=n.name?"imageBlock":"imageInline"}class Ib extends ge{static get pluginName(){return"ImageUtils"}isImage(t){return this.isInlineImage(t)||this.isBlockImage(t)}isInlineImageView(t){return!!t&&t.is("element","img")}isBlockImageView(t){return!!t&&t.is("element","figure")&&t.hasClass("image")}insertImage(t={},e=null,n=null){const o=this.editor,i=o.model,r=i.document.selection;n=Pb(o,e||r,n),t={...Object.fromEntries(r.getAttributes()),...t};for(const e in t)i.schema.checkAttribute(n,e)||delete t[e];return i.change((o=>{const s=o.createElement(n,t);return e||"imageInline"==n||(e=Yf(r,i)),i.insertContent(s,e),s.parent?(o.setSelection(s,"on"),s):null}))}getClosestSelectedImageWidget(t){const e=t.getSelectedElement();if(e&&this.isImageWidget(e))return e;let n=t.getFirstPosition().parent;for(;n;){if(n.is("element")&&this.isImageWidget(n))return n;n=n.parent}return null}getClosestSelectedImageElement(t){const e=t.getSelectedElement();return this.isImage(e)?e:t.getFirstPosition().findAncestor("imageBlock")}isImageAllowed(){const t=this.editor.model.document.selection;return function(t,e){if("imageBlock"==Pb(t,e)){const n=function(t,e){const n=Yf(t,e).start.parent;if(n.isEmpty&&!n.is("element","$root"))return n.parent;return n}(e,t.model);if(t.model.schema.checkChild(n,"imageBlock"))return!0}else if(t.model.schema.checkChild(e.focus,"imageInline"))return!0;return!1}(this.editor,t)&&function(t){return[...t.focus.getAncestors()].every((t=>!t.is("element","imageBlock")))}(t)}toImageWidget(t,e,n){e.setCustomProperty("image",!0,t);return jf(t,e,{label:()=>{const e=this.findViewImgElement(t).getAttribute("alt");return e?`${e} ${n}`:n}})}isImageWidget(t){return!!t.getCustomProperty("image")&&Uf(t)}isBlockImage(t){return!!t&&t.is("element","imageBlock")}isInlineImage(t){return!!t&&t.is("element","imageInline")}findViewImgElement(t){if(this.isInlineImageView(t))return t;const e=this.editor.editing.view;for(const{item:n}of e.createRangeIn(t))if(this.isInlineImageView(n))return n}}function Pb(t,e,n){const o=t.model.schema,i=t.config.get("image.insert.type");return t.plugins.has("ImageBlockEditing")?t.plugins.has("ImageInlineEditing")?n||("inline"===i?"imageInline":"block"===i?"imageBlock":e.is("selection")?Db(o,e):o.checkChild(e,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}class zb extends ge{static get requires(){return[Ib]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new Sb(this.editor))}}var Rb=n(1905),Vb={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Rb.Z,Vb);Rb.Z.locals;class Fb extends Wd{constructor(t){super(t);const e=this.locale.t;this.focusTracker=new Ea,this.keystrokes=new Sa,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(e("Save"),Fd.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(e("Cancel"),Fd.cancel,"ck-button-cancel","cancel"),this._focusables=new Ld,this._focusCycler=new Sh({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","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]}),Md(this)}render(){super.render(),this.keystrokes.listenTo(this.element),Od({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(t,e,n,o){const i=new wh(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i.extendTemplate({attributes:{class:n}}),o&&i.delegate("execute").to(this,o),i}_createLabeledInputView(){const t=this.locale.t,e=new Bu(this.locale,Du);return e.label=t("Text alternative"),e}}function Nb(t){const e=t.editing.view,n=Lu.defaultPositions,o=t.plugins.get("ImageUtils");return{target:e.domConverter.viewToDom(o.getClosestSelectedImageWidget(e.document.selection)),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}class Mb extends ge{static get requires(){return[Zu]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton(),this._createForm()}destroy(){super.destroy(),this._form.destroy()}_createButton(){const t=this.editor,e=t.t;t.ui.componentFactory.add("imageTextAlternative",(n=>{const o=t.commands.get("imageTextAlternative"),i=new wh(n);return i.set({label:e("Change image text alternative"),icon:Fd.lowVision,tooltip:!0}),i.bind("isEnabled").to(o,"isEnabled"),this.listenTo(i,"execute",(()=>{this._showForm()})),i}))}_createForm(){const t=this.editor,e=t.editing.view.document,n=t.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new Fb(t.locale),this._form.render(),this.listenTo(this._form,"submit",(()=>{t.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",((t,e)=>{this._hideForm(!0),e()})),this.listenTo(t.ui,"update",(()=>{n.getClosestSelectedImageWidget(e.selection)?this._isVisible&&function(t){const e=t.plugins.get("ContextualBalloon");if(t.plugins.get("ImageUtils").getClosestSelectedImageWidget(t.editing.view.document.selection)){const n=Nb(t);e.updatePosition(n)}}(t):this._hideForm(!0)})),Nd({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;const t=this.editor,e=t.commands.get("imageTextAlternative"),n=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:Nb(t)}),n.fieldView.value=n.fieldView.element.value=e.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(t){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),t&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView===this._form}get _isInBalloon(){return this._balloon.hasView(this._form)}}class Ob extends ge{static get requires(){return[zb,Mb]}static get pluginName(){return"ImageTextAlternative"}}class Lb{constructor(t){this.files=function(t){const e=Array.from(t.files||[]),n=Array.from(t.items||[]);if(e.length)return e;return n.filter((t=>"file"===t.kind)).map((t=>t.getAsFile()))}(t),this._native=t}get types(){return this._native.types}getData(t){return this._native.getData(t)}setData(t,e){this._native.setData(t,e)}set effectAllowed(t){this._native.effectAllowed=t}get effectAllowed(){return this._native.effectAllowed}set dropEffect(t){this._native.dropEffect=t}get dropEffect(){return this._native.dropEffect}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}class Hb extends Gs{constructor(t){super(t);const n=this.document;function o(t){return(o,i)=>{i.preventDefault();const r=i.dropRange?[i.dropRange]:null,s=new e(n,t);n.fire(s,{dataTransfer:i.dataTransfer,method:o.name,targetRanges:r,target:i.target}),s.stop.called&&i.stopPropagation()}}this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"],this.listenTo(n,"paste",o("clipboardInput"),{priority:"low"}),this.listenTo(n,"drop",o("clipboardInput"),{priority:"low"}),this.listenTo(n,"dragover",o("dragging"),{priority:"low"})}onDomEvent(t){const e={dataTransfer:new Lb(t.clipboardData?t.clipboardData:t.dataTransfer)};"drop"!=t.type&&"dragover"!=t.type||(e.dropRange=function(t,e){const n=e.target.ownerDocument,o=e.clientX,i=e.clientY;let r;n.caretRangeFromPoint&&n.caretRangeFromPoint(o,i)?r=n.caretRangeFromPoint(o,i):e.rangeParent&&(r=n.createRange(),r.setStart(e.rangeParent,e.rangeOffset),r.collapse(!0));if(r)return t.domConverter.domRangeToView(r);return null}(this.view,t)),this.fire(t.type,t,e)}}const qb=["figcaption","li"];function Wb(t){let e="";if(t.is("$text")||t.is("$textProxy"))e=t.data;else if(t.is("element","img")&&t.hasAttribute("alt"))e=t.getAttribute("alt");else if(t.is("element","br"))e="\n";else{let n=null;for(const o of t.getChildren()){const t=Wb(o);n&&(n.is("containerElement")||o.is("containerElement"))&&(qb.includes(n.name)||qb.includes(o.name)?e+="\n":e+="\n\n"),e+=t,n=o}}return e}class Ub extends ge{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(Hb),this._setupPasteDrop(),this._setupCopyCut()}_setupPasteDrop(){const t=this.editor,n=t.model,o=t.editing.view,i=o.document;this.listenTo(i,"clipboardInput",(e=>{t.isReadOnly&&e.stop()}),{priority:"highest"}),this.listenTo(i,"clipboardInput",((t,n)=>{const i=n.dataTransfer;let r=n.content||"";var s;r||(i.getData("text/html")?r=function(t){return t.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,((t,e)=>1==e.length?" ":e)).replace(/<!--[\s\S]*?-->/g,"")}(i.getData("text/html")):i.getData("text/plain")&&(((s=(s=i.getData("text/plain")).replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br>").replace(/^\s/,"&nbsp;").replace(/\s$/,"&nbsp;").replace(/\s\s/g," &nbsp;")).includes("</p><p>")||s.includes("<br>"))&&(s=`<p>${s}</p>`),r=s),r=this.editor.data.htmlProcessor.toView(r));const a=new e(this,"inputTransformation");this.fire(a,{content:r,dataTransfer:i,targetRanges:n.targetRanges,method:n.method}),a.stop.called&&t.stop(),o.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((t,e)=>{if(e.content.isEmpty)return;const o=this.editor.data.toModel(e.content,"$clipboardHolder");0!=o.childCount&&(t.stop(),n.change((()=>{this.fire("contentInsertion",{content:o,method:e.method,dataTransfer:e.dataTransfer,targetRanges:e.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((t,e)=>{e.resultRange=n.insertContent(e.content)}),{priority:"low"})}_setupCopyCut(){const t=this.editor,e=t.model.document,n=t.editing.view.document;function o(o,i){const r=i.dataTransfer;i.preventDefault();const s=t.data.toView(t.model.getSelectedContent(e.selection));n.fire("clipboardOutput",{dataTransfer:r,content:s,method:o.name})}this.listenTo(n,"copy",o,{priority:"low"}),this.listenTo(n,"cut",((e,n)=>{t.isReadOnly?n.preventDefault():o(e,n)}),{priority:"low"}),this.listenTo(n,"clipboardOutput",((n,o)=>{o.content.isEmpty||(o.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(o.content)),o.dataTransfer.setData("text/plain",Wb(o.content))),"cut"==o.method&&t.model.deleteContent(e.selection)}),{priority:"low"})}}var jb=n(903),$b={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(jb.Z,$b);jb.Z.locals;class Gb extends ge{static get pluginName(){return"DragDrop"}static get requires(){return[Ub,mb]}init(){const t=this.editor,e=t.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=vb((t=>this._updateDropMarker(t)),40),this._removeDropMarkerDelayed=Jb((()=>this._removeDropMarker()),40),this._clearDraggableAttributesDelayed=Jb((()=>this._clearDraggableAttributes()),40),e.addObserver(Hb),e.addObserver(Sg),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(t,"change:isReadOnly",((t,e,n)=>{n?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((t,e,n)=>{n||this._finalizeDragging(!1)})),ar.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._updateDropMarkerThrottled.cancel(),this._removeDropMarkerDelayed.cancel(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const t=this.editor,e=t.model,n=e.document,o=t.editing.view,i=o.document;this.listenTo(i,"dragstart",((o,s)=>{const a=n.selection;if(s.target&&s.target.is("editableElement"))return void s.preventDefault();const l=s.target?Yb(s.target):null;if(l){const n=t.editing.mapper.toModelElement(l);this._draggedRange=cl.fromRange(e.createRangeOn(n)),t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}else if(!i.selection.isCollapsed){const t=i.selection.getSelectedElement();t&&Uf(t)||(this._draggedRange=cl.fromRange(a.getFirstRange()))}if(!this._draggedRange)return void s.preventDefault();this._draggingUid=r(),s.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",s.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const c=e.createSelection(this._draggedRange.toRange()),d=t.data.toView(e.getSelectedContent(c));i.fire("clipboardOutput",{dataTransfer:s.dataTransfer,content:d,method:o.name}),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(i,"dragend",((t,e)=>{this._finalizeDragging(!e.dataTransfer.isCanceled&&"move"==e.dataTransfer.dropEffect)}),{priority:"low"}),this.listenTo(i,"dragenter",(()=>{this.isEnabled&&o.focus()})),this.listenTo(i,"dragleave",(()=>{this._removeDropMarkerDelayed()})),this.listenTo(i,"dragging",((e,n)=>{if(!this.isEnabled)return void(n.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const o=Kb(t,n.targetRanges,n.target);this._draggedRange||(n.dataTransfer.dropEffect="copy"),ar.isGecko||("copy"==n.dataTransfer.effectAllowed?n.dataTransfer.dropEffect="copy":["all","copyMove"].includes(n.dataTransfer.effectAllowed)&&(n.dataTransfer.dropEffect="move")),o&&this._updateDropMarkerThrottled(o)}),{priority:"low"})}_setupClipboardInputIntegration(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"clipboardInput",((e,n)=>{if("drop"!=n.method)return;const o=Kb(t,n.targetRanges,n.target);if(this._removeDropMarker(),!o)return this._finalizeDragging(!1),void e.stop();this._draggedRange&&this._draggingUid!=n.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==Zb(n.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(o,!0))return this._finalizeDragging(!1),void e.stop();n.targetRanges=[t.editing.mapper.toViewRange(o)]}),{priority:"high"})}_setupContentInsertionIntegration(){const t=this.editor.plugins.get(Ub);t.on("contentInsertion",((t,e)=>{if(!this.isEnabled||"drop"!==e.method)return;const n=e.targetRanges.map((t=>this.editor.editing.mapper.toModelRange(t)));this.editor.model.change((t=>t.setSelection(n)))}),{priority:"high"}),t.on("contentInsertion",((t,e)=>{if(!this.isEnabled||"drop"!==e.method)return;const n="move"==Zb(e.dataTransfer),o=!e.resultRange||!e.resultRange.isCollapsed;this._finalizeDragging(o&&n)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const t=this.editor,e=t.editing.view,n=e.document;this.listenTo(n,"mousedown",((o,i)=>{if(ar.isAndroid||!i)return;this._clearDraggableAttributesDelayed.cancel();let r=Yb(i.target);if(ar.isBlink&&!t.isReadOnly&&!r&&!n.selection.isCollapsed){const t=n.selection.getSelectedElement();t&&Uf(t)||(r=n.selection.editableElement)}r&&(e.change((t=>{t.setAttribute("draggable","true",r)})),this._draggableElement=t.editing.mapper.toModelElement(r))})),this.listenTo(n,"mouseup",(()=>{ar.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const t=this.editor.editing;t.view.change((e=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&e.removeAttribute("draggable",t.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_setupDropMarker(){const t=this.editor;t.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),t.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(e,{writer:n})=>{if(t.model.schema.checkChild(e.markerRange.start,"$text"))return n.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(t){const e=this.toDomElement(t);return e.innerHTML="&NoBreak;<span></span>&NoBreak;",e}))}})}_updateDropMarker(t){const e=this.editor,n=e.model.markers;e.model.change((e=>{n.has("drop-target")?n.get("drop-target").getRange().isEqual(t)||e.updateMarker("drop-target",{range:t}):e.addMarker("drop-target",{range:t,usingOperation:!1,affectsData:!1})}))}_removeDropMarker(){const t=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),t.markers.has("drop-target")&&t.change((t=>{t.removeMarker("drop-target")}))}_finalizeDragging(t){const e=this.editor,n=e.model;this._removeDropMarker(),this._clearDraggableAttributes(),e.plugins.has("WidgetToolbarRepository")&&e.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._draggedRange&&(t&&this.isEnabled&&n.deleteContent(n.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function Kb(t,e,n){const o=t.model,i=t.editing.mapper;let r=null;const s=e?e[0].start:null;if(n.is("uiElement")&&(n=n.parent),r=function(t,e){const n=t.model,o=t.editing.mapper;if(Uf(e))return n.createRangeOn(o.toModelElement(e));if(!e.is("editableElement")){const t=e.findAncestor((t=>Uf(t)||t.is("editableElement")));if(Uf(t))return n.createRangeOn(o.toModelElement(t))}return null}(t,n),r)return r;const a=function(t,e){const n=t.editing.mapper,o=t.editing.view,i=n.toModelElement(e);if(i)return i;const r=o.createPositionBefore(e),s=n.findMappedViewAncestor(r);return n.toModelElement(s)}(t,n),l=s?i.toModelPosition(s):null;return l?(r=function(t,e,n){const o=t.model;if(!o.schema.checkChild(n,"$block"))return null;const i=o.createPositionAt(n,0),r=e.path.slice(0,i.path.length),s=o.createPositionFromPath(e.root,r).nodeAfter;if(s&&o.schema.isObject(s))return o.createRangeOn(s);return null}(t,l,a),r||(r=o.schema.getNearestSelectionRange(l,ar.isGecko?"forward":"backward"),r||function(t,e){const n=t.model;for(;e;){if(n.schema.isObject(e))return n.createRangeOn(e);e=e.parent}}(t,l.parent))):function(t,e){const n=t.model,o=n.schema,i=n.createPositionAt(e,0);return o.getNearestSelectionRange(i,"forward")}(t,a)}function Zb(t){return ar.isGecko?t.dropEffect:["all","copyMove"].includes(t.effectAllowed)?"move":"copy"}function Jb(t,e){let n;function o(...i){o.cancel(),n=setTimeout((()=>t(...i)),e)}return o.cancel=()=>{clearTimeout(n)},o}function Yb(t){if(t.is("editableElement"))return null;if(t.hasClass("ck-widget__selection-handle"))return t.findAncestor(Uf);if(Uf(t))return t;const e=t.findAncestor((t=>Uf(t)||t.is("editableElement")));return Uf(e)?e:null}class Qb extends ge{static get pluginName(){return"PastePlainText"}static get requires(){return[Ub]}init(){const t=this.editor,e=t.model,n=t.editing.view,o=n.document,i=e.document.selection;let r=!1;n.addObserver(Hb),this.listenTo(o,"keydown",((t,e)=>{r=e.shiftKey})),t.plugins.get(Ub).on("contentInsertion",((t,n)=>{(r||function(t,e){if(t.childCount>1)return!1;const n=t.getChild(0);if(e.isObject(n))return!1;return 0==[...n.getAttributeKeys()].length}(n.content,e.schema))&&e.change((t=>{const o=Array.from(i.getAttributes()).filter((([t])=>e.schema.getAttributeProperties(t).isFormatting));i.isCollapsed||e.deleteContent(i,{doNotAutoparagraph:!0}),o.push(...i.getAttributes());const r=t.createRangeIn(n.content);for(const e of r.getItems())e.is("$textProxy")&&t.setAttributes(o,e)}))}))}}class Xb extends ge{static get pluginName(){return"Clipboard"}static get requires(){return[Ub,Gb,Qb]}}function tk(t,e){return t=>{t.on(`attribute:srcset:${e}`,n)};function n(e,n,o){if(!o.consumable.consume(n.item,e.name))return;const i=o.writer,r=o.mapper.toViewElement(n.item),s=t.findViewImgElement(r);if(null===n.attributeNewValue){const t=n.attributeOldValue;t.data&&(i.removeAttribute("srcset",s),i.removeAttribute("sizes",s),t.width&&i.removeAttribute("width",s))}else{const t=n.attributeNewValue;t.data&&(i.setAttribute("srcset",t.data,s),i.setAttribute("sizes","100vw",s),t.width&&i.setAttribute("width",t.width,s))}}}function ek(t,e,n){return t=>{t.on(`attribute:${n}:${e}`,o)};function o(e,n,o){if(!o.consumable.consume(n.item,e.name))return;const i=o.writer,r=o.mapper.toViewElement(n.item),s=t.findViewImgElement(r);i.setAttribute(n.attributeKey,n.attributeNewValue||"",s)}}class nk extends vs{observe(t){this.listenTo(t,"load",((t,e)=>{const n=e.target;this.checkShouldIgnoreEventFromTarget(n)||"IMG"==n.tagName&&this._fireEvents(e)}),{useCapture:!0})}_fireEvents(t){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",t))}}class ok extends pe{constructor(t){super(t);const e=t.config.get("image.insert.type");t.plugins.has("ImageBlockEditing")||"block"===e&&l("image-block-plugin-required"),t.plugins.has("ImageInlineEditing")||"inline"===e&&l("image-inline-plugin-required")}refresh(){this.isEnabled=this.editor.plugins.get("ImageUtils").isImageAllowed()}execute(t){const e=Io(t.source),n=this.editor.model.document.selection,o=this.editor.plugins.get("ImageUtils"),i=Object.fromEntries(n.getAttributes());e.forEach(((t,e)=>{const r=n.getSelectedElement();if("string"==typeof t&&(t={src:t}),e&&r&&o.isImage(r)){const e=this.editor.model.createPositionAfter(r);o.insertImage({...t,...i},e)}else o.insertImage({...t,...i})}))}}class ik extends ge{static get requires(){return[Ib]}static get pluginName(){return"ImageEditing"}init(){const t=this.editor,e=t.conversion;t.editing.view.addObserver(nk),e.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:t=>{const e={data:t.getAttribute("srcset")};return t.hasAttribute("width")&&(e.width=t.getAttribute("width")),e}}});const n=new ok(t);t.commands.add("insertImage",n),t.commands.add("imageInsert",n)}}class rk extends pe{constructor(t,e){super(t),this._modelElementName=e}refresh(){const t=this.editor.plugins.get("ImageUtils"),e=t.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=t.isInlineImage(e):this.isEnabled=t.isBlockImage(e)}execute(){const t=this.editor,e=this.editor.model,n=t.plugins.get("ImageUtils"),o=n.getClosestSelectedImageElement(e.document.selection),i=Object.fromEntries(o.getAttributes());return i.src||i.uploadId?e.change((t=>{const r=Array.from(e.markers).filter((t=>t.getRange().containsItem(o))),s=n.insertImage(i,e.createSelection(o,"on"),this._modelElementName);if(!s)return null;const a=t.createRangeOn(s);for(const e of r){const n=e.getRange(),o="$graveyard"!=n.root.rootName?n.getJoined(a,!0):a;t.updateMarker(e,{range:o})}return{oldElement:o,newElement:s}})):null}}class sk extends ge{static get requires(){return[ik,Ib,Ub]}static get pluginName(){return"ImageBlockEditing"}init(){const t=this.editor;t.model.schema.register("imageBlock",{isObject:!0,isBlock:!0,allowWhere:"$block",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),t.plugins.has("ImageInlineEditing")&&(t.commands.add("imageTypeBlock",new rk(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const t=this.editor,e=t.t,n=t.conversion,o=t.plugins.get("ImageUtils");n.for("dataDowncast").elementToStructure({model:"imageBlock",view:(t,{writer:e})=>Tb(e)}),n.for("editingDowncast").elementToStructure({model:"imageBlock",view:(t,{writer:n})=>o.toImageWidget(Tb(n),n,e("image widget"))}),n.for("downcast").add(ek(o,"imageBlock","src")).add(ek(o,"imageBlock","alt")).add(tk(o,"imageBlock")),n.for("upcast").elementToElement({view:Bb(t,"imageBlock"),model:(t,{writer:e})=>e.createElement("imageBlock",t.hasAttribute("src")?{src:t.getAttribute("src")}:null)}).add(function(t){return t=>{t.on("element:figure",e)};function e(e,n,o){if(!o.consumable.test(n.viewItem,{name:!0,classes:"image"}))return;const i=t.findViewImgElement(n.viewItem);if(!i||!o.consumable.test(i,{name:!0}))return;o.consumable.consume(n.viewItem,{name:!0,classes:"image"});const r=xa(o.convertItem(i,n.modelCursor).modelRange.getItems());r?(o.convertChildren(n.viewItem,r),o.updateConversionResult(r,n)):o.consumable.revert(n.viewItem,{name:!0,classes:"image"})}}(o))}_setupClipboardIntegration(){const t=this.editor,e=t.model,n=t.editing.view,o=t.plugins.get("ImageUtils");this.listenTo(t.plugins.get("ClipboardPipeline"),"inputTransformation",((i,r)=>{const s=Array.from(r.content.getChildren());let a;if(!s.every(o.isInlineImageView))return;a=r.targetRanges?t.editing.mapper.toModelRange(r.targetRanges[0]):e.document.selection.getFirstRange();const l=e.createSelection(a);if("imageBlock"===Db(e.schema,l)){const t=new Tg(n.document),e=s.map((e=>t.createElement("figure",{class:"image"},e)));r.content=t.createDocumentFragment(e)}}))}}var ak=n(3508),lk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(ak.Z,lk);ak.Z.locals;class ck extends ge{static get requires(){return[sk,mb,Ob]}static get pluginName(){return"ImageBlock"}}class dk extends ge{static get requires(){return[ik,Ib,Ub]}static get pluginName(){return"ImageInlineEditing"}init(){const t=this.editor,e=t.model.schema;e.register("imageInline",{isObject:!0,isInline:!0,allowWhere:"$text",allowAttributesOf:"$text",allowAttributes:["alt","src","srcset"]}),e.addChildCheck(((t,e)=>{if(t.endsWith("caption")&&"imageInline"===e.name)return!1})),this._setupConversion(),t.plugins.has("ImageBlockEditing")&&(t.commands.add("imageTypeInline",new rk(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const t=this.editor,e=t.t,n=t.conversion,o=t.plugins.get("ImageUtils");n.for("dataDowncast").elementToElement({model:"imageInline",view:(t,{writer:e})=>e.createEmptyElement("img")}),n.for("editingDowncast").elementToStructure({model:"imageInline",view:(t,{writer:n})=>o.toImageWidget(function(t){return t.createContainerElement("span",{class:"image-inline"},t.createEmptyElement("img"),{isAllowedInsideAttributeElement:!0})}(n),n,e("image widget"))}),n.for("downcast").add(ek(o,"imageInline","src")).add(ek(o,"imageInline","alt")).add(tk(o,"imageInline")),n.for("upcast").elementToElement({view:Bb(t,"imageInline"),model:(t,{writer:e})=>e.createElement("imageInline",t.hasAttribute("src")?{src:t.getAttribute("src")}:null)})}_setupClipboardIntegration(){const t=this.editor,e=t.model,n=t.editing.view,o=t.plugins.get("ImageUtils");this.listenTo(t.plugins.get("ClipboardPipeline"),"inputTransformation",((i,r)=>{const s=Array.from(r.content.getChildren());let a;if(!s.every(o.isBlockImageView))return;a=r.targetRanges?t.editing.mapper.toModelRange(r.targetRanges[0]):e.document.selection.getFirstRange();const l=e.createSelection(a);if("imageInline"===Db(e.schema,l)){const t=new Tg(n.document),e=s.map((e=>1===e.childCount?(Array.from(e.getAttributes()).forEach((n=>t.setAttribute(...n,o.findViewImgElement(e)))),e.getChild(0)):e));r.content=t.createDocumentFragment(e)}}))}}class hk extends ge{static get requires(){return[dk,mb,Ob]}static get pluginName(){return"ImageInline"}}class uk extends pe{refresh(){const t=this.editor,e=t.plugins.get("ImageCaptionUtils");if(!t.plugins.has(sk))return this.isEnabled=!1,void(this.value=!1);const n=t.model.document.selection,o=n.getSelectedElement();if(!o){const t=e.getCaptionFromModelSelection(n);return this.isEnabled=!!t,void(this.value=!!t)}this.isEnabled=this.editor.plugins.get("ImageUtils").isImage(o),this.isEnabled?this.value=!!e.getCaptionFromImageModelElement(o):this.value=!1}execute(t={}){const{focusCaptionOnShow:e}=t;this.editor.model.change((t=>{this.value?this._hideImageCaption(t):this._showImageCaption(t,e)}))}_showImageCaption(t,e){const n=this.editor.model.document.selection,o=this.editor.plugins.get("ImageCaptionEditing");let i=n.getSelectedElement();const r=o._getSavedCaption(i);this.editor.plugins.get("ImageUtils").isInlineImage(i)&&(this.editor.execute("imageTypeBlock"),i=n.getSelectedElement());const s=r||t.createElement("caption");t.append(s,i),e&&t.setSelection(s,"in")}_hideImageCaption(t){const e=this.editor,n=e.model.document.selection,o=e.plugins.get("ImageCaptionEditing"),i=e.plugins.get("ImageCaptionUtils");let r,s=n.getSelectedElement();s?r=i.getCaptionFromImageModelElement(s):(r=i.getCaptionFromModelSelection(n),s=r.parent),o._saveCaption(s,r),t.setSelection(s,"on"),t.remove(r)}}class gk extends ge{static get pluginName(){return"ImageCaptionUtils"}static get requires(){return[Ib]}getCaptionFromImageModelElement(t){for(const e of t.getChildren())if(e&&e.is("element","caption"))return e;return null}getCaptionFromModelSelection(t){const e=this.editor.plugins.get("ImageUtils"),n=t.getFirstPosition().findAncestor("caption");return n&&e.isBlockImage(n.parent)?n:null}matchImageCaptionViewElement(t){const e=this.editor.plugins.get("ImageUtils");return"figcaption"==t.name&&e.isBlockImageView(t.parent)?{name:!0}:null}}class mk extends ge{static get requires(){return[Ib,gk]}static get pluginName(){return"ImageCaptionEditing"}constructor(t){super(t),this._savedCaptionsMap=new WeakMap}init(){const t=this.editor,e=t.model.schema;e.isRegistered("caption")?e.extend("caption",{allowIn:"imageBlock"}):e.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),t.commands.add("toggleImageCaption",new uk(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration()}_setupConversion(){const t=this.editor,e=t.editing.view,n=t.plugins.get("ImageUtils"),o=t.plugins.get("ImageCaptionUtils"),i=t.t;t.conversion.for("upcast").elementToElement({view:t=>o.matchImageCaptionViewElement(t),model:"caption"}),t.conversion.for("dataDowncast").elementToElement({model:"caption",view:(t,{writer:e})=>n.isBlockImage(t.parent)?e.createContainerElement("figcaption"):null}),t.conversion.for("editingDowncast").elementToElement({model:"caption",view:(t,{writer:o})=>{if(!n.isBlockImage(t.parent))return null;const r=o.createEditableElement("figcaption");return o.setCustomProperty("imageCaption",!0,r),dg({view:e,element:r,text:i("Enter image caption"),keepOnFocus:!0}),Jf(r,o)}})}_setupImageTypeCommandsIntegration(){const t=this.editor,e=t.plugins.get("ImageUtils"),n=t.plugins.get("ImageCaptionUtils"),o=t.commands.get("imageTypeInline"),i=t.commands.get("imageTypeBlock"),r=t=>{if(!t.return)return;const{oldElement:o,newElement:i}=t.return;if(!o)return;if(e.isBlockImage(o)){const t=n.getCaptionFromImageModelElement(o);if(t)return void this._saveCaption(i,t)}const r=this._getSavedCaption(o);r&&this._saveCaption(i,r)};o&&this.listenTo(o,"execute",r,{priority:"low"}),i&&this.listenTo(i,"execute",r,{priority:"low"})}_getSavedCaption(t){const e=this._savedCaptionsMap.get(t);return e?Ua.fromJSON(e):null}_saveCaption(t,e){this._savedCaptionsMap.set(t,e.toJSON())}}class pk extends ge{static get requires(){return[gk]}static get pluginName(){return"ImageCaptionUI"}init(){const t=this.editor,e=t.editing.view,n=t.plugins.get("ImageCaptionUtils"),o=t.t;t.ui.componentFactory.add("toggleImageCaption",(i=>{const r=t.commands.get("toggleImageCaption"),s=new wh(i);return s.set({icon:Fd.caption,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.bind("label").to(r,"value",(t=>o(t?"Toggle caption off":"Toggle caption on"))),this.listenTo(s,"execute",(()=>{t.execute("toggleImageCaption",{focusCaptionOnShow:!0});const o=n.getCaptionFromModelSelection(t.model.document.selection);if(o){const n=t.editing.mapper.toViewElement(o);e.scrollToTheSelection(),e.change((t=>{t.addClass("image__caption_highlighted",n)}))}})),s}))}}var fk=n(2640),bk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(fk.Z,bk);fk.Z.locals;class kk extends pe{constructor(t,e){super(t),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(e.map((t=>{if(t.isDefault)for(const e of t.modelElements)this._defaultStyles[e]=t.name;return[t.name,t]})))}refresh(){const t=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!t,this.isEnabled?t.hasAttribute("imageStyle")?this.value=t.getAttribute("imageStyle"):this.value=this._defaultStyles[t.name]:this.value=!1}execute(t={}){const e=this.editor,n=e.model,o=e.plugins.get("ImageUtils");n.change((e=>{const i=t.value;let r=o.getClosestSelectedImageElement(n.document.selection);i&&this.shouldConvertImageType(i,r)&&(this.editor.execute(o.isBlockImage(r)?"imageTypeInline":"imageTypeBlock"),r=o.getClosestSelectedImageElement(n.document.selection)),!i||this._styles.get(i).isDefault?e.removeAttribute("imageStyle",r):e.setAttribute("imageStyle",i,r)}))}shouldConvertImageType(t,e){return!this._styles.get(t).modelElements.includes(e.name)}}const{objectFullWidth:wk,objectInline:Ck,objectLeft:Ak,objectRight:_k,objectCenter:vk,objectBlockLeft:yk,objectBlockRight:xk}=Fd,Ek={get inline(){return{name:"inline",title:"In line",icon:Ck,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:Ak,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:yk,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:vk,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:_k,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:xk,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:vk,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:_k,modelElements:["imageBlock"],className:"image-style-side"}}},Sk={full:wk,left:yk,right:xk,center:vk,inlineLeft:Ak,inlineRight:_k,inline:Ck},Tk=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function Bk(t){l("image-style-configuration-definition-invalid",t)}const Dk={normalizeStyles:function(t){return(t.configuredStyles.options||[]).map((t=>function(t){t="string"==typeof t?Ek[t]?{...Ek[t]}:{name:t}:function(t,e){const n={...e};for(const o in t)Object.prototype.hasOwnProperty.call(e,o)||(n[o]=t[o]);return n}(Ek[t.name],t);"string"==typeof t.icon&&(t.icon=Sk[t.icon]||t.icon);return t}(t))).filter((e=>function(t,{isBlockPluginLoaded:e,isInlinePluginLoaded:n}){const{modelElements:o,name:i}=t;if(!(o&&o.length&&i))return Bk({style:t}),!1;{const i=[e?"imageBlock":null,n?"imageInline":null];if(!o.some((t=>i.includes(t))))return l("image-style-missing-dependency",{style:t,missingPlugins:o.map((t=>"imageBlock"===t?"ImageBlockEditing":"ImageInlineEditing"))}),!1}return!0}(e,t)))},getDefaultStylesConfiguration:function(t,e){return t&&e?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:t?{options:["block","side"]}:e?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(t){return t.has("ImageBlockEditing")&&t.has("ImageInlineEditing")?[...Tk]:[]},warnInvalidStyle:Bk,DEFAULT_OPTIONS:Ek,DEFAULT_ICONS:Sk,DEFAULT_DROPDOWN_DEFINITIONS:Tk};function Ik(t,e){for(const n of e)if(n.name===t)return n}class Pk extends ge{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[Ib]}init(){const{normalizeStyles:t,getDefaultStylesConfiguration:e}=Dk,n=this.editor,o=n.plugins.has("ImageBlockEditing"),i=n.plugins.has("ImageInlineEditing");n.config.define("image.styles",e(o,i)),this.normalizedStyles=t({configuredStyles:n.config.get("image.styles"),isBlockPluginLoaded:o,isInlinePluginLoaded:i}),this._setupConversion(o,i),this._setupPostFixer(),n.commands.add("imageStyle",new kk(n,this.normalizedStyles))}_setupConversion(t,e){const n=this.editor,o=n.model.schema,i=(r=this.normalizedStyles,(t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const o=Ik(e.attributeNewValue,r),i=Ik(e.attributeOldValue,r),s=n.mapper.toViewElement(e.item),a=n.writer;i&&a.removeClass(i.className,s),o&&a.addClass(o.className,s)});var r;const s=function(t){const e={imageInline:t.filter((t=>!t.isDefault&&t.modelElements.includes("imageInline"))),imageBlock:t.filter((t=>!t.isDefault&&t.modelElements.includes("imageBlock")))};return(t,n,o)=>{if(!n.modelRange)return;const i=n.viewItem,r=xa(n.modelRange.getItems());if(r&&o.schema.checkAttribute(r,"imageStyle"))for(const t of e[r.name])o.consumable.consume(i,{classes:t.className})&&o.writer.setAttribute("imageStyle",t.name,r)}}(this.normalizedStyles);n.editing.downcastDispatcher.on("attribute:imageStyle",i),n.data.downcastDispatcher.on("attribute:imageStyle",i),t&&(o.extend("imageBlock",{allowAttributes:"imageStyle"}),n.data.upcastDispatcher.on("element:figure",s,{priority:"low"})),e&&(o.extend("imageInline",{allowAttributes:"imageStyle"}),n.data.upcastDispatcher.on("element:img",s,{priority:"low"}))}_setupPostFixer(){const t=this.editor,e=t.model.document,n=t.plugins.get(Ib),o=new Map(this.normalizedStyles.map((t=>[t.name,t])));e.registerPostFixer((t=>{let i=!1;for(const r of e.differ.getChanges())if("insert"==r.type||"attribute"==r.type&&"imageStyle"==r.attributeKey){let e="insert"==r.type?r.position.nodeAfter:r.range.start.nodeAfter;if(e&&e.is("element","paragraph")&&e.childCount>0&&(e=e.getChild(0)),!n.isImage(e))continue;const s=e.getAttribute("imageStyle");if(!s)continue;const a=o.get(s);a&&a.modelElements.includes(e.name)||(t.removeAttribute("imageStyle",e),i=!0)}return i}))}}var zk=n(5083),Rk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(zk.Z,Rk);zk.Z.locals;class Vk extends ge{static get requires(){return[Pk]}static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const t=this.editor.t;return{"Wrap text":t("Wrap text"),"Break text":t("Break text"),"In line":t("In line"),"Full size image":t("Full size image"),"Side image":t("Side image"),"Left aligned image":t("Left aligned image"),"Centered image":t("Centered image"),"Right aligned image":t("Right aligned image")}}init(){const t=this.editor.plugins,e=this.editor.config.get("image.toolbar")||[],n=Fk(t.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const t of n)this._createButton(t);const o=Fk([...e.filter(y),...Dk.getDefaultDropdownDefinitions(t)],this.localizedDefaultStylesTitles);for(const t of o)this._createDropdown(t,n)}_createDropdown(t,e){const n=this.editor.ui.componentFactory;n.add(t.name,(o=>{let i;const{defaultItem:r,items:s,title:a}=t,l=s.filter((t=>e.find((({name:e})=>Nk(e)===t)))).map((t=>{const e=n.create(t);return t===r&&(i=e),e}));s.length!==l.length&&Dk.warnInvalidStyle({dropdown:t});const c=lu(o,Fh),d=c.buttonView;return cu(c,l),d.set({label:Mk(a,i.label),class:null,tooltip:!0}),d.bind("icon").toMany(l,"isOn",((...t)=>{const e=t.findIndex(st);return e<0?i.icon:l[e].icon})),d.bind("label").toMany(l,"isOn",((...t)=>{const e=t.findIndex(st);return Mk(a,e<0?i.label:l[e].label)})),d.bind("isOn").toMany(l,"isOn",((...t)=>t.some(st))),d.bind("class").toMany(l,"isOn",((...t)=>t.some(st)?"ck-splitbutton_flatten":null)),d.on("execute",(()=>{l.some((({isOn:t})=>t))?c.isOpen=!c.isOpen:i.fire("execute")})),c.bind("isEnabled").toMany(l,"isEnabled",((...t)=>t.some(st))),c}))}_createButton(t){const e=t.name;this.editor.ui.componentFactory.add(Nk(e),(n=>{const o=this.editor.commands.get("imageStyle"),i=new wh(n);return i.set({label:t.title,icon:t.icon,tooltip:!0,isToggleable:!0}),i.bind("isEnabled").to(o,"isEnabled"),i.bind("isOn").to(o,"value",(t=>t===e)),i.on("execute",this._executeCommand.bind(this,e)),i}))}_executeCommand(t){this.editor.execute("imageStyle",{value:t}),this.editor.editing.view.focus()}}function Fk(t,e){for(const n of t)e[n.title]&&(n.title=e[n.title]);return t}function Nk(t){return`imageStyle:${t}`}function Mk(t,e){return(t?t+": ":"")+e}function Ok(t){const e=t.map((t=>t.replace("+","\\+")));return new RegExp(`^image\\/(${e.join("|")})$`)}function Lk(t){return new Promise(((e,n)=>{const o=t.getAttribute("src");fetch(o).then((t=>t.blob())).then((t=>{const n=Hk(t,o),i=n.replace("image/",""),r=new File([t],`image.${i}`,{type:n});e(r)})).catch((t=>t&&"TypeError"===t.name?function(t){return function(t){return new Promise(((e,n)=>{const o=rs.document.createElement("img");o.addEventListener("load",(()=>{const t=rs.document.createElement("canvas");t.width=o.width,t.height=o.height;t.getContext("2d").drawImage(o,0,0),t.toBlob((t=>t?e(t):n()))})),o.addEventListener("error",(()=>n())),o.src=t}))}(t).then((e=>{const n=Hk(e,t),o=n.replace("image/","");return new File([e],`image.${o}`,{type:n})}))}(o).then(e).catch(n):n(t)))}))}function Hk(t,e){return t.type?t.type:e.match(/data:(image\/\w+);base64/)?e.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class qk extends ge{static get pluginName(){return"ImageUploadUI"}init(){const t=this.editor,e=t.t,n=n=>{const o=new Wm(n),i=t.commands.get("uploadImage"),r=t.config.get("image.upload.types"),s=Ok(r);return o.set({acceptedType:r.map((t=>`image/${t}`)).join(","),allowMultipleFiles:!0}),o.buttonView.set({label:e("Insert image"),icon:Fd.image,tooltip:!0}),o.buttonView.bind("isEnabled").to(i),o.on("done",((e,n)=>{const o=Array.from(n).filter((t=>s.test(t.type)));o.length&&t.execute("uploadImage",{file:o})})),o};t.ui.componentFactory.add("uploadImage",n),t.ui.componentFactory.add("imageUpload",n)}}var Wk=n(3689),Uk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Wk.Z,Uk);Wk.Z.locals;var jk=n(4036),$k={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(jk.Z,$k);jk.Z.locals;var Gk=n(3773),Kk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Gk.Z,Kk);Gk.Z.locals;class Zk extends ge{static get pluginName(){return"ImageUploadProgress"}constructor(t){super(t),this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const t=this.editor;t.plugins.has("ImageBlockEditing")&&t.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",((...t)=>this.uploadStatusChange(...t))),t.plugins.has("ImageInlineEditing")&&t.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",((...t)=>this.uploadStatusChange(...t)))}uploadStatusChange(t,e,n){const o=this.editor,i=e.item,r=i.getAttribute("uploadId");if(!n.consumable.consume(e.item,t.name))return;const s=o.plugins.get("ImageUtils"),a=o.plugins.get(Hm),l=r?e.attributeNewValue:null,c=this.placeholder,d=o.editing.mapper.toViewElement(i),h=n.writer;if("reading"==l)return Jk(d,h),void Yk(s,c,d,h);if("uploading"==l){const t=a.loaders.get(r);return Jk(d,h),void(t?(Qk(d,h),function(t,e,n,o){const i=function(t){const e=t.createUIElement("div",{class:"ck-progress-bar"});return t.setCustomProperty("progressBar",!0,e),e}(e);e.insert(e.createPositionAt(t,"end"),i),n.on("change:uploadedPercent",((t,e,n)=>{o.change((t=>{t.setStyle("width",n+"%",i)}))}))}(d,h,t,o.editing.view),function(t,e,n,o){if(o.data){const i=t.findViewImgElement(e);n.setAttribute("src",o.data,i)}}(s,d,h,t)):Yk(s,c,d,h))}"complete"==l&&a.loaders.get(r)&&function(t,e,n){const o=e.createUIElement("div",{class:"ck-image-upload-complete-icon"});e.insert(e.createPositionAt(t,"end"),o),setTimeout((()=>{n.change((t=>t.remove(t.createRangeOn(o))))}),3e3)}(d,h,o.editing.view),function(t,e){tw(t,e,"progressBar")}(d,h),Qk(d,h),function(t,e){e.removeClass("ck-appear",t)}(d,h)}}function Jk(t,e){t.hasClass("ck-appear")||e.addClass("ck-appear",t)}function Yk(t,e,n,o){n.hasClass("ck-image-upload-placeholder")||o.addClass("ck-image-upload-placeholder",n);const i=t.findViewImgElement(n);i.getAttribute("src")!==e&&o.setAttribute("src",e,i),Xk(n,"placeholder")||o.insert(o.createPositionAfter(i),function(t){const e=t.createUIElement("div",{class:"ck-upload-placeholder-loader"});return t.setCustomProperty("placeholder",!0,e),e}(o))}function Qk(t,e){t.hasClass("ck-image-upload-placeholder")&&e.removeClass("ck-image-upload-placeholder",t),tw(t,e,"placeholder")}function Xk(t,e){for(const n of t.getChildren())if(n.getCustomProperty(e))return n}function tw(t,e,n){const o=Xk(t,n);o&&e.remove(e.createRangeOn(o))}class ew extends pe{refresh(){const t=this.editor,e=t.plugins.get("ImageUtils"),n=t.model.document.selection.getSelectedElement();this.isEnabled=e.isImageAllowed()||e.isImage(n)}execute(t){const e=Io(t.file),n=this.editor.model.document.selection,o=this.editor.plugins.get("ImageUtils"),i=Object.fromEntries(n.getAttributes());e.forEach(((t,e)=>{const r=n.getSelectedElement();if(e&&r&&o.isImage(r)){const e=this.editor.model.createPositionAfter(r);this._uploadImage(t,i,e)}else this._uploadImage(t,i)}))}_uploadImage(t,e,n){const o=this.editor,i=o.plugins.get(Hm).createLoader(t),r=o.plugins.get("ImageUtils");i&&r.insertImage({...e,uploadId:i.id},n)}}class nw extends ge{static get requires(){return[Hm,zu,Ub,Ib]}static get pluginName(){return"ImageUploadEditing"}constructor(t){super(t),t.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const t=this.editor,e=t.model.document,n=t.conversion,o=t.plugins.get(Hm),i=t.plugins.get("ImageUtils"),r=Ok(t.config.get("image.upload.types")),s=new ew(t);t.commands.add("uploadImage",s),t.commands.add("imageUpload",s),n.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(t.editing.view.document,"clipboardInput",((e,n)=>{if(o=n.dataTransfer,Array.from(o.types).includes("text/html")&&""!==o.getData("text/html"))return;var o;const i=Array.from(n.dataTransfer.files).filter((t=>!!t&&r.test(t.type)));i.length&&(e.stop(),t.model.change((e=>{n.targetRanges&&e.setSelection(n.targetRanges.map((e=>t.editing.mapper.toModelRange(e)))),t.model.enqueueChange((()=>{t.execute("uploadImage",{file:i})}))})))})),this.listenTo(t.plugins.get("ClipboardPipeline"),"inputTransformation",((e,n)=>{const r=Array.from(t.editing.view.createRangeIn(n.content)).filter((t=>function(t,e){return!(!t.isInlineImageView(e)||!e.getAttribute("src"))&&(e.getAttribute("src").match(/^data:image\/\w+;base64,/g)||e.getAttribute("src").match(/^blob:/g))}(i,t.item)&&!t.item.getAttribute("uploadProcessed"))).map((t=>({promise:Lk(t.item),imageElement:t.item})));if(!r.length)return;const s=new Tg(t.editing.view.document);for(const t of r){s.setAttribute("uploadProcessed",!0,t.imageElement);const e=o.createLoader(t.promise);e&&(s.setAttribute("src","",t.imageElement),s.setAttribute("uploadId",e.id,t.imageElement))}})),t.editing.view.document.on("dragover",((t,e)=>{e.preventDefault()})),e.on("change",(()=>{const n=e.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),i=new Set;for(const e of n)if("insert"==e.type&&"$text"!=e.name){const n=e.position.nodeAfter,r="$graveyard"==e.position.root.rootName;for(const e of ow(t,n)){const t=e.getAttribute("uploadId");if(!t)continue;const n=o.loaders.get(t);n&&(r?i.has(t)||n.abort():(i.add(t),this._uploadImageElements.set(t,e),"idle"==n.status&&this._readAndUpload(n)))}}})),this.on("uploadComplete",((t,{imageElement:e,data:n})=>{const o=n.urls?n.urls:n;this.editor.model.change((t=>{t.setAttribute("src",o.default,e),this._parseAndSetSrcsetAttributeOnImage(o,e,t)}))}),{priority:"low"})}afterInit(){const t=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&t.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&t.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(t){const e=this.editor,n=e.model,o=e.locale.t,i=e.plugins.get(Hm),r=e.plugins.get(zu),s=e.plugins.get("ImageUtils"),a=this._uploadImageElements;return n.enqueueChange({isUndoable:!1},(e=>{e.setAttribute("uploadStatus","reading",a.get(t.id))})),t.read().then((()=>{const o=t.upload(),i=a.get(t.id);if(ar.isSafari){const t=e.editing.mapper.toViewElement(i),n=s.findViewImgElement(t);e.editing.view.once("render",(()=>{if(!n.parent)return;const t=e.editing.view.domConverter.mapViewToDom(n.parent);if(!t)return;const o=t.style.display;t.style.display="none",t._ckHack=t.offsetHeight,t.style.display=o}))}return n.enqueueChange({isUndoable:!1},(t=>{t.setAttribute("uploadStatus","uploading",i)})),o})).then((e=>{n.enqueueChange({isUndoable:!1},(n=>{const o=a.get(t.id);n.setAttribute("uploadStatus","complete",o),this.fire("uploadComplete",{data:e,imageElement:o})})),l()})).catch((e=>{if("error"!==t.status&&"aborted"!==t.status)throw e;"error"==t.status&&e&&r.showWarning(e,{title:o("Upload failed"),namespace:"upload"}),n.enqueueChange({isUndoable:!1},(e=>{e.remove(a.get(t.id))})),l()}));function l(){n.enqueueChange({isUndoable:!1},(e=>{const n=a.get(t.id);e.removeAttribute("uploadId",n),e.removeAttribute("uploadStatus",n),a.delete(t.id)})),i.destroyLoader(t)}}_parseAndSetSrcsetAttributeOnImage(t,e,n){let o=0;const i=Object.keys(t).filter((t=>{const e=parseInt(t,10);if(!isNaN(e))return o=Math.max(o,e),!0})).map((e=>`${t[e]} ${e}w`)).join(", ");""!=i&&n.setAttribute("srcset",{data:i,width:o},e)}}function ow(t,e){const n=t.plugins.get("ImageUtils");return Array.from(t.model.createRangeOn(e)).filter((t=>n.isImage(t.item))).map((t=>t.item))}class iw extends pe{refresh(){const t=this.editor,e=t.plugins.get("ImageUtils").getClosestSelectedImageElement(t.model.document.selection);this.isEnabled=!!e,e&&e.hasAttribute("width")?this.value={width:e.getAttribute("width"),height:null}:this.value=null}execute(t){const e=this.editor,n=e.model,o=e.plugins.get("ImageUtils").getClosestSelectedImageElement(n.document.selection);this.value={width:t.width,height:null},o&&n.change((e=>{e.setAttribute("width",t.width,o)}))}}class rw extends ge{static get requires(){return[Ib]}static get pluginName(){return"ImageResizeEditing"}constructor(t){super(t),t.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const t=this.editor,e=new iw(t);this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline"),t.commands.add("resizeImage",e),t.commands.add("imageResize",e)}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:"width"}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:"width"})}_registerConverters(t){const e=this.editor;e.conversion.for("downcast").add((e=>e.on(`attribute:width:${t}`,((t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const o=n.writer,i=n.mapper.toViewElement(e.item);null!==e.attributeNewValue?(o.setStyle("width",e.attributeNewValue,i),o.addClass("image_resized",i)):(o.removeStyle("width",i),o.removeClass("image_resized",i))})))),e.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===t?"figure":"img",styles:{width:/.+/}},model:{key:"width",value:t=>t.getStyle("width")}})}}const sw={small:Fd.objectSizeSmall,medium:Fd.objectSizeMedium,large:Fd.objectSizeLarge,original:Fd.objectSizeFull};class aw extends ge{static get requires(){return[rw]}static get pluginName(){return"ImageResizeButtons"}constructor(t){super(t),this._resizeUnit=t.config.get("image.resizeUnit")}init(){const t=this.editor,e=t.config.get("image.resizeOptions"),n=t.commands.get("resizeImage");this.bind("isEnabled").to(n);for(const t of e)this._registerImageResizeButton(t);this._registerImageResizeDropdown(e)}_registerImageResizeButton(t){const e=this.editor,{name:n,value:o,icon:i}=t,r=o?o+this._resizeUnit:null;e.ui.componentFactory.add(n,(n=>{const o=new wh(n),s=e.commands.get("resizeImage"),l=this._getOptionLabelValue(t,!0);if(!sw[i])throw new a("imageresizebuttons-missing-icon",e,t);return o.set({label:l,icon:sw[i],tooltip:l,isToggleable:!0}),o.bind("isEnabled").to(this),o.bind("isOn").to(s,"value",lw(r)),this.listenTo(o,"execute",(()=>{e.execute("resizeImage",{width:r})})),o}))}_registerImageResizeDropdown(t){const e=this.editor,n=e.t,o=t.find((t=>!t.value)),i=i=>{const r=e.commands.get("resizeImage"),s=lu(i,zh),a=s.buttonView;return a.set({tooltip:n("Resize image"),commandValue:o.value,icon:sw.medium,isToggleable:!0,label:this._getOptionLabelValue(o),withText:!0,class:"ck-resize-image-button"}),a.bind("label").to(r,"value",(t=>t&&t.width?t.width:this._getOptionLabelValue(o))),s.bind("isOn").to(r),s.bind("isEnabled").to(this),du(s,this._getResizeDropdownListItemDefinitions(t,r)),s.listView.ariaLabel=n("Image resize list"),this.listenTo(s,"execute",(t=>{e.execute(t.source.commandName,{width:t.source.commandValue}),e.editing.view.focus()})),s};e.ui.componentFactory.add("resizeImage",i),e.ui.componentFactory.add("imageResize",i)}_getOptionLabelValue(t,e){const n=this.editor.t;return t.label?t.label:e?t.value?n("Resize image to %0",t.value+this._resizeUnit):n("Resize image to the original size"):t.value?t.value+this._resizeUnit:n("Original")}_getResizeDropdownListItemDefinitions(t,e){const n=new Bo;return t.map((t=>{const o=t.value?t.value+this._resizeUnit:null,i={type:"button",model:new Ru({commandName:"resizeImage",commandValue:o,label:this._getOptionLabelValue(t),withText:!0,icon:null})};i.model.bind("isOn").to(e,"value",lw(o)),n.add(i)})),n}}function lw(t){return e=>null===t&&e===t||e&&e.width===t}const cw=/(image|image-inline)/,dw="image_resized";class hw extends ge{static get requires(){return[Eb]}static get pluginName(){return"ImageResizeHandles"}init(){const t=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(t),this._setupResizerCreator()}_setupResizerCreator(){const t=this.editor,e=t.editing.view;e.addObserver(nk),this.listenTo(e.document,"imageLoaded",((n,o)=>{if(!o.target.matches("figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img"))return;const i=t.editing.view.domConverter,r=i.domToView(o.target).findAncestor({classes:cw});let s=this.editor.plugins.get(Eb).getResizerByViewElement(r);if(s)return void s.redraw();const a=t.editing.mapper,l=a.toModelElement(r);s=t.plugins.get(Eb).attachTo({unit:t.config.get("image.resizeUnit"),modelElement:l,viewElement:r,editor:t,getHandleHost:t=>t.querySelector("img"),getResizeHost:()=>i.viewToDom(a.toViewElement(l.parent)),isCentered(){const t=l.getAttribute("imageStyle");return!t||"block"==t||"alignCenter"==t},onCommit(n){e.change((t=>{t.removeClass(dw,r)})),t.execute("resizeImage",{width:n})}}),s.on("updateSize",(()=>{r.hasClass(dw)||e.change((t=>{t.addClass(dw,r)}))})),s.bind("isEnabled").to(this)}))}}var uw=n(6270),gw={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(uw.Z,gw);uw.Z.locals;class mw{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(t){Array.isArray(t)?t.forEach((t=>this._definitions.add(t))):this._definitions.add(t)}getDispatcher(){return t=>{t.on("attribute:linkHref",((t,e,n)=>{if(!n.consumable.test(e.item,"attribute:linkHref"))return;const o=n.writer,i=o.document.selection;for(const t of this._definitions){const r=o.createAttributeElement("a",t.attributes,{priority:5});t.classes&&o.addClass(t.classes,r);for(const e in t.styles)o.setStyle(e,t.styles[e],r);o.setCustomProperty("link",!0,r),t.callback(e.attributeNewValue)?e.item.is("selection")?o.wrap(i.getFirstRange(),r):o.wrap(n.mapper.toViewRange(e.range),r):o.unwrap(n.mapper.toViewRange(e.range),r)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return t=>{t.on("attribute:linkHref:imageBlock",((t,e,{writer:n,mapper:o})=>{const i=o.toViewElement(e.item),r=Array.from(i.getChildren()).find((t=>"a"===t.name));for(const t of this._definitions){const o=Wo(t.attributes);if(t.callback(e.attributeNewValue)){for(const[t,e]of o)"class"===t?n.addClass(e,r):n.setAttribute(t,e,r);t.classes&&n.addClass(t.classes,r);for(const e in t.styles)n.setStyle(e,t.styles[e],r)}else{for(const[t,e]of o)"class"===t?n.removeClass(e,r):n.removeAttribute(t,r);t.classes&&n.removeClass(t.classes,r);for(const e in t.styles)n.removeStyle(e,r)}}}))}}}const pw=function(t,e,n){var o=t.length;return n=void 0===n?o:n,!e&&n>=o?t:ui(t,e,n)};var fw=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const bw=function(t){return fw.test(t)};const kw=function(t){return t.split("")};var ww="[\\ud800-\\udfff]",Cw="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Aw="\\ud83c[\\udffb-\\udfff]",_w="[^\\ud800-\\udfff]",vw="(?:\\ud83c[\\udde6-\\uddff]){2}",yw="[\\ud800-\\udbff][\\udc00-\\udfff]",xw="(?:"+Cw+"|"+Aw+")"+"?",Ew="[\\ufe0e\\ufe0f]?",Sw=Ew+xw+("(?:\\u200d(?:"+[_w,vw,yw].join("|")+")"+Ew+xw+")*"),Tw="(?:"+[_w+Cw+"?",Cw,vw,yw,ww].join("|")+")",Bw=RegExp(Aw+"(?="+Aw+")|"+Tw+Sw,"g");const Dw=function(t){return t.match(Bw)||[]};const Iw=function(t){return bw(t)?Dw(t):kw(t)};const Pw=function(t){return function(e){e=ai(e);var n=bw(e)?Iw(e):void 0,o=n?n[0]:e.charAt(0),i=n?pw(n,1).join(""):e.slice(1);return o[t]()+i}}("toUpperCase"),zw=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Rw=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,Vw=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,Fw=/^((\w+:(\/{2,})?)|(\W))/i,Nw="Ctrl+K";function Mw(t,{writer:e}){const n=e.createAttributeElement("a",{href:t},{priority:5});return e.setCustomProperty("link",!0,n),n}function Ow(t){return function(t){return t.replace(zw,"").match(Rw)}(t=String(t))?t:"#"}function Lw(t,e){return!!t&&e.checkAttribute(t.name,"linkHref")}function Hw(t,e){const n=(o=t,Vw.test(o)?"mailto:":e);var o;const i=!!n&&!Fw.test(t);return t&&i?n+t:t}function qw(t){window.open(t,"_blank","noopener")}class Ww extends pe{constructor(t){super(t),this.manualDecorators=new Bo,this.automaticDecorators=new mw}restoreManualDecoratorStates(){for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}refresh(){const t=this.editor.model,e=t.document.selection,n=e.getSelectedElement()||xa(e.getSelectedBlocks());Lw(n,t.schema)?(this.value=n.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttribute(n,"linkHref")):(this.value=e.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttributeInSelection(e,"linkHref"));for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}execute(t,e={}){const n=this.editor.model,o=n.document.selection,i=[],r=[];for(const t in e)e[t]?i.push(t):r.push(t);n.change((e=>{if(o.isCollapsed){const s=o.getFirstPosition();if(o.hasAttribute("linkHref")){const a=vp(s,"linkHref",o.getAttribute("linkHref"),n);e.setAttribute("linkHref",t,a),i.forEach((t=>{e.setAttribute(t,!0,a)})),r.forEach((t=>{e.removeAttribute(t,a)})),e.setSelection(e.createPositionAfter(a.end.nodeBefore))}else if(""!==t){const r=Wo(o.getAttributes());r.set("linkHref",t),i.forEach((t=>{r.set(t,!0)}));const{end:a}=n.insertContent(e.createText(t,r),s);e.setSelection(a)}["linkHref",...i,...r].forEach((t=>{e.removeSelectionAttribute(t)}))}else{const s=n.schema.getValidRanges(o.getRanges(),"linkHref"),a=[];for(const t of o.getSelectedBlocks())n.schema.checkAttribute(t,"linkHref")&&a.push(e.createRangeOn(t));const l=a.slice();for(const t of s)this._isRangeToUpdate(t,a)&&l.push(t);for(const n of l)e.setAttribute("linkHref",t,n),i.forEach((t=>{e.setAttribute(t,!0,n)})),r.forEach((t=>{e.removeAttribute(t,n)}))}}))}_getDecoratorStateFromModel(t){const e=this.editor.model,n=e.document.selection,o=n.getSelectedElement();return Lw(o,e.schema)?o.getAttribute(t):n.getAttribute(t)}_isRangeToUpdate(t,e){for(const n of e)if(n.containsRange(t))return!1;return!0}}class Uw extends pe{refresh(){const t=this.editor.model,e=t.document.selection,n=e.getSelectedElement();Lw(n,t.schema)?this.isEnabled=t.schema.checkAttribute(n,"linkHref"):this.isEnabled=t.schema.checkAttributeInSelection(e,"linkHref")}execute(){const t=this.editor,e=this.editor.model,n=e.document.selection,o=t.commands.get("link");e.change((t=>{const i=n.isCollapsed?[vp(n.getFirstPosition(),"linkHref",n.getAttribute("linkHref"),e)]:e.schema.getValidRanges(n.getRanges(),"linkHref");for(const e of i)if(t.removeAttribute("linkHref",e),o)for(const n of o.manualDecorators)t.removeAttribute(n.id,e)}))}}class jw{constructor({id:t,label:e,attributes:n,classes:o,styles:i,defaultValue:r}){this.id=t,this.set("value"),this.defaultValue=r,this.label=e,this.attributes=n,this.classes=o,this.styles=i}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}ue(jw,se);var $w=n(9773),Gw={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()($w.Z,Gw);$w.Z.locals;const Kw="automatic",Zw=/^(https?:)?\/\//;class Jw extends ge{static get pluginName(){return"LinkEditing"}static get requires(){return[hp,rp,Ub]}constructor(t){super(t),t.config.define("link",{addTargetToExternalLinks:!1})}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:"linkHref"}),t.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:Mw}),t.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(t,e)=>Mw(Ow(t),e)}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:t=>t.getAttribute("href")}}),t.commands.add("link",new Ww(t)),t.commands.add("unlink",new Uw(t));const e=function(t,e){const n={"Open in a new tab":t("Open in a new tab"),Downloadable:t("Downloadable")};return e.forEach((t=>(t.label&&n[t.label]&&(t.label=n[t.label]),t))),e}(t.t,function(t){const e=[];if(t)for(const[n,o]of Object.entries(t)){const t=Object.assign({},o,{id:`link${Pw(n)}`});e.push(t)}return e}(t.config.get("link.decorators")));this._enableAutomaticDecorators(e.filter((t=>t.mode===Kw))),this._enableManualDecorators(e.filter((t=>"manual"===t.mode)));t.plugins.get(hp).registerAttribute("linkHref"),xp(t,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink()}_enableAutomaticDecorators(t){const e=this.editor,n=e.commands.get("link").automaticDecorators;e.config.get("link.addTargetToExternalLinks")&&n.add({id:"linkIsExternal",mode:Kw,callback:t=>Zw.test(t),attributes:{target:"_blank",rel:"noopener noreferrer"}}),n.add(t),n.length&&e.conversion.for("downcast").add(n.getDispatcher())}_enableManualDecorators(t){if(!t.length)return;const e=this.editor,n=e.commands.get("link").manualDecorators;t.forEach((t=>{e.model.schema.extend("$text",{allowAttributes:t.id}),t=new jw(t),n.add(t),e.conversion.for("downcast").attributeToElement({model:t.id,view:(e,{writer:n})=>{if(e){const e=n.createAttributeElement("a",t.attributes,{priority:5});t.classes&&n.addClass(t.classes,e);for(const o in t.styles)n.setStyle(o,t.styles[o],e);return n.setCustomProperty("link",!0,e),e}}}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",...t._createPattern()},model:{key:t.id}})}))}_enableLinkOpen(){const t=this.editor,e=t.editing.view.document,n=t.model.document;this.listenTo(e,"click",((t,e)=>{if(!(ar.isMac?e.domEvent.metaKey:e.domEvent.ctrlKey))return;let n=e.domTarget;if("a"!=n.tagName.toLowerCase()&&(n=n.closest("a")),!n)return;const o=n.getAttribute("href");o&&(t.stop(),e.preventDefault(),qw(o))}),{context:"$capture"}),this.listenTo(e,"enter",((t,e)=>{const o=n.selection,i=o.getSelectedElement(),r=i?i.getAttribute("linkHref"):o.getAttribute("linkHref");r&&e.domEvent.altKey&&(t.stop(),qw(r))}),{context:"a"})}_enableInsertContentSelectionAttributesFixer(){const t=this.editor.model,e=t.document.selection;this.listenTo(t,"insertContent",(()=>{const n=e.anchor.nodeBefore,o=e.anchor.nodeAfter;e.hasAttribute("linkHref")&&n&&n.hasAttribute("linkHref")&&(o&&o.hasAttribute("linkHref")||t.change((e=>{Yw(e,Xw(t.schema))})))}),{priority:"low"})}_enableClickingAfterLink(){const t=this.editor,e=t.model;t.editing.view.addObserver(Sg);let n=!1;this.listenTo(t.editing.view.document,"mousedown",(()=>{n=!0})),this.listenTo(t.editing.view.document,"selectionChange",(()=>{if(!n)return;n=!1;const t=e.document.selection;if(!t.isCollapsed)return;if(!t.hasAttribute("linkHref"))return;const o=t.getFirstPosition(),i=vp(o,"linkHref",t.getAttribute("linkHref"),e);(o.isTouching(i.start)||o.isTouching(i.end))&&e.change((t=>{Yw(t,Xw(e.schema))}))}))}_enableTypingOverLink(){const t=this.editor,e=t.editing.view;let n,o;this.listenTo(e.document,"delete",(()=>{o=!0}),{priority:"high"}),this.listenTo(t.model,"deleteContent",(()=>{const e=t.model.document.selection;e.isCollapsed||(o?o=!1:Qw(t)&&function(t){const e=t.document.selection,n=e.getFirstPosition(),o=e.getLastPosition(),i=n.nodeAfter;if(!i)return!1;if(!i.is("$text"))return!1;if(!i.hasAttribute("linkHref"))return!1;const r=o.textNode||o.nodeBefore;if(i===r)return!0;return vp(n,"linkHref",i.getAttribute("linkHref"),t).containsRange(t.createRange(n,o),!0)}(t.model)&&(n=e.getAttributes()))}),{priority:"high"}),this.listenTo(t.model,"insertContent",((e,[i])=>{o=!1,Qw(t)&&n&&(t.model.change((t=>{for(const[e,o]of n)t.setAttribute(e,o,i)})),n=null)}),{priority:"high"})}_handleDeleteContentAfterLink(){const t=this.editor,e=t.model,n=e.document.selection,o=t.editing.view;let i=!1,r=!1;this.listenTo(o.document,"delete",((t,e)=>{r=e.domEvent.keyCode===hr.backspace}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{i=!1;const t=n.getFirstPosition(),o=n.getAttribute("linkHref");if(!o)return;const r=vp(t,"linkHref",o,e);i=r.containsPosition(t)||r.end.isEqual(t)}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{r&&(r=!1,i||t.model.enqueueChange((t=>{Yw(t,Xw(e.schema))})))}),{priority:"low"})}}function Yw(t,e){t.removeSelectionAttribute("linkHref");for(const n of e)t.removeSelectionAttribute(n)}function Qw(t){return t.model.change((t=>t.batch)).isTyping}function Xw(t){return t.getDefinition("$text").allowAttributes.filter((t=>t.startsWith("link")))}var tC=n(7754),eC={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(tC.Z,eC);tC.Z.locals;class nC extends Wd{constructor(t,e){super(t);const n=t.t;this.focusTracker=new Ea,this.keystrokes=new Sa,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),Fd.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),Fd.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(e),this.children=this._createFormChildren(e.manualDecorators),this._focusables=new Ld,this._focusCycler=new Sh({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const o=["ck","ck-link-form","ck-responsive-form"];e.manualDecorators.length&&o.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:o,tabindex:"-1"},children:this.children}),Md(this)}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce(((t,e)=>(t[e.name]=e.isOn,t)),{})}render(){super.render(),Od({view:this});[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const t=this.locale.t,e=new Bu(this.locale,Du);return e.label=t("Link URL"),e}_createButton(t,e,n,o){const i=new wh(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i.extendTemplate({attributes:{class:n}}),o&&i.delegate("execute").to(this,o),i}_createManualDecoratorSwitches(t){const e=this.createCollection();for(const n of t.manualDecorators){const o=new _h(this.locale);o.set({name:n.id,label:n.label,withText:!0}),o.bind("isOn").toMany([n,t],"value",((t,e)=>void 0===e&&void 0===t?n.defaultValue:t)),o.on("execute",(()=>{n.set("value",!o.isOn)})),e.add(o)}return e}_createFormChildren(t){const e=this.createCollection();if(e.add(this.urlInputView),t.length){const t=new Wd;t.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map((t=>({tag:"li",children:[t],attributes:{class:["ck","ck-list__item"]}}))),attributes:{class:["ck","ck-reset","ck-list"]}}),e.add(t)}return e.add(this.saveButtonView),e.add(this.cancelButtonView),e}}var oC=n(2347),iC={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(oC.Z,iC);oC.Z.locals;class rC extends Wd{constructor(t){super(t);const e=t.t;this.focusTracker=new Ea,this.keystrokes=new Sa,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(e("Unlink"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184zm4.919 10.562-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z"/></svg>',"unlink"),this.editButtonView=this._createButton(e("Edit link"),Fd.pencil,"edit"),this.set("href"),this._focusables=new Ld,this._focusCycler=new Sh({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","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(t,e,n){const o=new wh(this.locale);return o.set({label:t,icon:e,tooltip:!0}),o.delegate("execute").to(this,n),o}_createPreviewButton(){const t=new wh(this.locale),e=this.bindTemplate,n=this.t;return t.set({withText:!0,tooltip:n("Open link in new tab")}),t.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:e.to("href",(t=>t&&Ow(t))),target:"_blank",rel:"noopener noreferrer"}}),t.bind("label").to(this,"href",(t=>t||n("This link has no URL"))),t.bind("isEnabled").to(this,"href",(t=>!!t)),t.template.tag="a",t.template.eventListeners={},t}}const sC="link-ui";class aC extends ge{static get requires(){return[Zu]}static get pluginName(){return"LinkUI"}init(){const t=this.editor;t.editing.view.addObserver(Eg),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=t.plugins.get(Zu),this._createToolbarLinkButton(),this._enableUserBalloonInteractions(),t.conversion.for("editingDowncast").markerToHighlight({model:sC,view:{classes:["ck-fake-link-selection"]}}),t.conversion.for("editingDowncast").markerToElement({model:sC,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView.destroy()}_createActionsView(){const t=this.editor,e=new rC(t.locale),n=t.commands.get("link"),o=t.commands.get("unlink");return e.bind("href").to(n,"value"),e.editButtonView.bind("isEnabled").to(n),e.unlinkButtonView.bind("isEnabled").to(o),this.listenTo(e,"edit",(()=>{this._addFormView()})),this.listenTo(e,"unlink",(()=>{t.execute("unlink"),this._hideUI()})),e.keystrokes.set("Esc",((t,e)=>{this._hideUI(),e()})),e.keystrokes.set(Nw,((t,e)=>{this._addFormView(),e()})),e}_createFormView(){const t=this.editor,e=t.commands.get("link"),n=t.config.get("link.defaultProtocol"),o=new nC(t.locale,e);return o.urlInputView.fieldView.bind("value").to(e,"value"),o.urlInputView.bind("isReadOnly").to(e,"isEnabled",(t=>!t)),o.saveButtonView.bind("isEnabled").to(e),this.listenTo(o,"submit",(()=>{const{value:e}=o.urlInputView.fieldView.element,i=Hw(e,n);t.execute("link",i,o.getDecoratorSwitchesState()),this._closeFormView()})),this.listenTo(o,"cancel",(()=>{this._closeFormView()})),o.keystrokes.set("Esc",((t,e)=>{this._closeFormView(),e()})),o}_createToolbarLinkButton(){const t=this.editor,e=t.commands.get("link"),n=t.t;t.keystrokes.set(Nw,((t,n)=>{n(),e.isEnabled&&this._showUI(!0)})),t.ui.componentFactory.add("link",(t=>{const o=new wh(t);return o.isEnabled=!0,o.label=n("Link"),o.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184z"/></svg>',o.keystroke=Nw,o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(e,"isEnabled"),o.bind("isOn").to(e,"value",(t=>!!t)),this.listenTo(o,"execute",(()=>this._showUI(!0))),o}))}_enableUserBalloonInteractions(){const t=this.editor.editing.view.document;this.listenTo(t,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),this.editor.keystrokes.set("Tab",((t,e)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),e())}),{priority:"high"}),this.editor.keystrokes.set("Esc",((t,e)=>{this._isUIVisible&&(this._hideUI(),e())})),Nd({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 t=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions(),this.formView.urlInputView.fieldView.element.value=t.value||""}_closeFormView(){const t=this.editor.commands.get("link");t.restoreManualDecoratorStates(),void 0!==t.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(t=!1){this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),t&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),t&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const t=this.editor;this.stopListening(t.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),t.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const t=this.editor,e=t.editing.view.document;let n=this._getSelectedLinkElement(),o=r();const i=()=>{const t=this._getSelectedLinkElement(),e=r();n&&!t||!n&&e!==o?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),n=t,o=e};function r(){return e.selection.focus.getAncestors().reverse().find((t=>t.is("element")))}this.listenTo(t.ui,"update",i),this.listenTo(this._balloon,"change:visibleView",i)}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 t=this.editor.editing.view,e=this.editor.model,n=t.document;let o=null;if(e.markers.has(sC)){const e=Array.from(this.editor.editing.mapper.markerNameToElements(sC)),n=t.createRange(t.createPositionBefore(e[0]),t.createPositionAfter(e[e.length-1]));o=t.domConverter.viewRangeToDom(n)}else o=()=>{const e=this._getSelectedLinkElement();return e?t.domConverter.mapViewToDom(e):t.domConverter.viewRangeToDom(n.selection.getFirstRange())};return{target:o}}_getSelectedLinkElement(){const t=this.editor.editing.view,e=t.document.selection,n=e.getSelectedElement();if(e.isCollapsed||n&&Uf(n))return lC(e.getFirstPosition());{const n=e.getFirstRange().getTrimmed(),o=lC(n.start),i=lC(n.end);return o&&o==i&&t.createRangeIn(o).getTrimmed().isEqual(n)?o:null}}_showFakeVisualSelection(){const t=this.editor.model;t.change((e=>{const n=t.document.selection.getFirstRange();if(t.markers.has(sC))e.updateMarker(sC,{range:n});else if(n.start.isAtEnd){const o=n.start.getLastMatchingPosition((({item:e})=>!t.schema.isContent(e)),{boundaries:n});e.addMarker(sC,{usingOperation:!1,affectsData:!1,range:e.createRange(o,n.end)})}else e.addMarker(sC,{usingOperation:!1,affectsData:!1,range:n})}))}_hideFakeVisualSelection(){const t=this.editor.model;t.markers.has(sC)&&t.change((t=>{t.removeMarker(sC)}))}}function lC(t){return t.getAncestors().find((t=>{return(e=t).is("attributeElement")&&!!e.getCustomProperty("link");var e}))}const cC=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class dC extends ge{static get requires(){return[lp]}static get pluginName(){return"AutoLink"}init(){const t=this.editor.model.document.selection;t.on("change:range",(()=>{this.isEnabled=!t.anchor.parent.is("element","codeBlock")})),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){const t=this.editor,e=new dp(t.model,(t=>{if(!function(t){return t.length>4&&" "===t[t.length-1]&&" "!==t[t.length-2]}(t))return;const e=hC(t.substr(0,t.length-1));return e?{url:e}:void 0}));e.on("matched:data",((e,n)=>{const{batch:o,range:i,url:r}=n;if(!o.isTyping)return;const s=i.end.getShiftedBy(-1),a=s.getShiftedBy(-r.length),l=t.model.createRange(a,s);this._applyAutoLink(r,l)})),e.bind("isEnabled").to(this)}_enableEnterHandling(){const t=this.editor,e=t.model,n=t.commands.get("enter");n&&n.on("execute",(()=>{const t=e.document.selection.getFirstPosition();if(!t.parent.previousSibling)return;const n=e.createRangeIn(t.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(n)}))}_enableShiftEnterHandling(){const t=this.editor,e=t.model,n=t.commands.get("shiftEnter");n&&n.on("execute",(()=>{const t=e.document.selection.getFirstPosition(),n=e.createRange(e.createPositionAt(t.parent,0),t.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(n)}))}_checkAndApplyAutoLinkOnRange(t){const e=this.editor.model,{text:n,range:o}=cp(t,e),i=hC(n);if(i){const t=e.createRange(o.end.getShiftedBy(-i.length),o.end);this._applyAutoLink(i,t)}}_applyAutoLink(t,e){const n=this.editor.model,o=this.editor.plugins.get("Delete");this.isEnabled&&function(t,e){return e.schema.checkAttributeInSelection(e.createSelection(t),"linkHref")}(e,n)&&n.enqueueChange((i=>{const r=this.editor.config.get("link.defaultProtocol"),s=Hw(t,r);i.setAttribute("linkHref",s,e),n.enqueueChange((()=>{o.requestUndoOnBackspace()}))}))}}function hC(t){const e=cC.exec(t);return e?e[2]:null}class uC extends pe{constructor(t,e){super(t),this.type=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,n=e.document,o=Array.from(n.selection.getSelectedBlocks()).filter((t=>mC(t,e.schema))),i=void 0!==t.forceValue?!t.forceValue:this.value;e.change((t=>{if(i){let e=o[o.length-1].nextSibling,n=Number.POSITIVE_INFINITY,i=[];for(;e&&"listItem"==e.name&&0!==e.getAttribute("listIndent");){const t=e.getAttribute("listIndent");t<n&&(n=t);const o=t-n;i.push({element:e,listIndent:o}),e=e.nextSibling}i=i.reverse();for(const e of i)t.setAttribute("listIndent",e.listIndent,e.element)}if(!i){let t=Number.POSITIVE_INFINITY;for(const e of o)e.is("element","listItem")&&e.getAttribute("listIndent")<t&&(t=e.getAttribute("listIndent"));t=0===t?1:t,gC(o,!0,t),gC(o,!1,t)}for(const e of o.reverse())i&&"listItem"==e.name?t.rename(e,"paragraph"):i||"listItem"==e.name?i||"listItem"!=e.name||e.getAttribute("listType")==this.type||t.setAttribute("listType",this.type,e):(t.setAttributes({listType:this.type,listIndent:0},e),t.rename(e,"listItem"));this.fire("_executeCleanup",o)}))}_getValue(){const t=xa(this.editor.model.document.selection.getSelectedBlocks());return!!t&&t.is("element","listItem")&&t.getAttribute("listType")==this.type}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,n=xa(t.getSelectedBlocks());return!!n&&mC(n,e)}}function gC(t,e,n){const o=e?t[0]:t[t.length-1];if(o.is("element","listItem")){let i=o[e?"previousSibling":"nextSibling"],r=o.getAttribute("listIndent");for(;i&&i.is("element","listItem")&&i.getAttribute("listIndent")>=n;)r>i.getAttribute("listIndent")&&(r=i.getAttribute("listIndent")),i.getAttribute("listIndent")==r&&t[e?"unshift":"push"](i),i=i[e?"previousSibling":"nextSibling"]}}function mC(t,e){return e.checkChild(t.parent,"listItem")&&!e.isObject(t)}class pC extends pe{constructor(t,e){super(t),this._indentBy="forward"==e?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=t.document;let n=Array.from(e.selection.getSelectedBlocks());t.change((t=>{const e=n[n.length-1];let o=e.nextSibling;for(;o&&"listItem"==o.name&&o.getAttribute("listIndent")>e.getAttribute("listIndent");)n.push(o),o=o.nextSibling;this._indentBy<0&&(n=n.reverse());for(const e of n){const n=e.getAttribute("listIndent")+this._indentBy;n<0?t.rename(e,"paragraph"):t.setAttribute("listIndent",n,e)}this.fire("_executeCleanup",n)}))}_checkEnabled(){const t=xa(this.editor.model.document.selection.getSelectedBlocks());if(!t||!t.is("element","listItem"))return!1;if(this._indentBy>0){const e=t.getAttribute("listIndent"),n=t.getAttribute("listType");let o=t.previousSibling;for(;o&&o.is("element","listItem")&&o.getAttribute("listIndent")>=e;){if(o.getAttribute("listIndent")==e)return o.getAttribute("listType")==n;o=o.previousSibling}return!1}return!0}}function fC(t,e){const n=e.mapper,o=e.writer,i="numbered"==t.getAttribute("listType")?"ol":"ul",r=function(t){const e=t.createContainerElement("li");return e.getFillerOffset=SC,e}(o),s=o.createContainerElement(i,null);return o.insert(o.createPositionAt(s,0),r),n.bindElements(t,r),r}function bC(t,e,n,o){const i=e.parent,r=n.mapper,s=n.writer;let a=r.toViewPosition(o.createPositionBefore(t));const l=CC(t.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:t.getAttribute("listIndent")}),c=t.previousSibling;if(l&&l.getAttribute("listIndent")==t.getAttribute("listIndent")){const t=r.toViewElement(l);a=s.breakContainer(s.createPositionAfter(t))}else if(c&&"listItem"==c.name){a=r.toViewPosition(o.createPositionAt(c,"end"));const t=r.findMappedViewAncestor(a),e=_C(t);a=e?s.createPositionBefore(e):s.createPositionAt(t,"end")}else a=r.toViewPosition(o.createPositionBefore(t));if(a=wC(a),s.insert(a,i),c&&"listItem"==c.name){const t=r.toViewElement(c),n=s.createRange(s.createPositionAt(t,0),a).getWalker({ignoreElementEnd:!0});for(const t of n)if(t.item.is("element","li")){const o=s.breakContainer(s.createPositionBefore(t.item)),i=t.item.parent,r=s.createPositionAt(e,"end");kC(s,r.nodeBefore,r.nodeAfter),s.move(s.createRangeOn(i),r),n.position=o}}else{const n=i.nextSibling;if(n&&(n.is("element","ul")||n.is("element","ol"))){let o=null;for(const e of n.getChildren()){const n=r.toModelElement(e);if(!(n&&n.getAttribute("listIndent")>t.getAttribute("listIndent")))break;o=e}o&&(s.breakContainer(s.createPositionAfter(o)),s.move(s.createRangeOn(o.parent),s.createPositionAt(e,"end")))}}kC(s,i,i.nextSibling),kC(s,i.previousSibling,i)}function kC(t,e,n){return!e||!n||"ul"!=e.name&&"ol"!=e.name||e.name!=n.name||e.getAttribute("class")!==n.getAttribute("class")?null:t.mergeContainers(t.createPositionAfter(e))}function wC(t){return t.getLastMatchingPosition((t=>t.item.is("uiElement")))}function CC(t,e){const n=!!e.sameIndent,o=!!e.smallerIndent,i=e.listIndent;let r=t;for(;r&&"listItem"==r.name;){const t=r.getAttribute("listIndent");if(n&&i==t||o&&i>t)return r;r="forward"===e.direction?r.nextSibling:r.previousSibling}return null}function AC(t,e,n,o){t.ui.componentFactory.add(e,(i=>{const r=t.commands.get(e),s=new wh(i);return s.set({label:n,icon:o,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.on("execute",(()=>{t.execute(e),t.editing.view.focus()})),s}))}function _C(t){for(const e of t.getChildren())if("ul"==e.name||"ol"==e.name)return e;return null}function vC(t,e){const n=[],o=t.parent,i={ignoreElementEnd:!0,startPosition:t,shallow:!0,direction:e},r=o.getAttribute("listIndent"),s=[...new ja(i)].filter((t=>t.item.is("element"))).map((t=>t.item));for(const t of s){if(!t.is("element","listItem"))break;if(t.getAttribute("listIndent")<r)break;if(!(t.getAttribute("listIndent")>r)){if(t.getAttribute("listType")!==o.getAttribute("listType"))break;if(t.getAttribute("listStyle")!==o.getAttribute("listStyle"))break;if(t.getAttribute("listReversed")!==o.getAttribute("listReversed"))break;if(t.getAttribute("listStart")!==o.getAttribute("listStart"))break;"backward"===e?n.unshift(t):n.push(t)}}return n}function yC(t){let e=[...t.document.selection.getSelectedBlocks()].filter((t=>t.is("element","listItem"))).map((e=>{const n=t.change((t=>t.createPositionAt(e,0)));return[...vC(n,"backward"),...vC(n,"forward")]})).flat();return e=[...new Set(e)],e}const xC=["disc","circle","square"],EC=["decimal","decimal-leading-zero","lower-roman","upper-roman","lower-latin","upper-latin"];function SC(){const t=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||t?0:Ri.call(this)}function TC(t){return(e,n,o)=>{const i=o.consumable;if(!i.test(n.item,"insert")||!i.test(n.item,"attribute:listType")||!i.test(n.item,"attribute:listIndent"))return;i.consume(n.item,"insert"),i.consume(n.item,"attribute:listType"),i.consume(n.item,"attribute:listIndent");const r=n.item;bC(r,fC(r,o),o,t)}}function BC(t,e,n){if(!n.consumable.test(e.item,t.name))return;const o=n.mapper.toViewElement(e.item),i=n.writer;i.breakContainer(i.createPositionBefore(o)),i.breakContainer(i.createPositionAfter(o));const r=o.parent,s="numbered"==e.attributeNewValue?"ol":"ul";i.rename(s,r)}function DC(t,e,n){n.consumable.consume(e.item,t.name);const o=n.mapper.toViewElement(e.item).parent,i=n.writer;kC(i,o,o.nextSibling),kC(i,o.previousSibling,o)}function IC(t,e,n){if("listItem"!=e.item.name){let t=n.mapper.toViewPosition(e.range.start);const o=n.writer,i=[];for(;("ul"==t.parent.name||"ol"==t.parent.name)&&(t=o.breakContainer(t),"li"==t.parent.name);){const e=t,n=o.createPositionAt(t.parent,"end");if(!e.isEqual(n)){const t=o.remove(o.createRange(e,n));i.push(t)}t=o.createPositionAfter(t.parent)}if(i.length>0){for(let e=0;e<i.length;e++){const n=t.nodeBefore;if(t=o.insert(t,i[e]).end,e>0){const e=kC(o,n,n.nextSibling);e&&e.parent==n&&t.offset--}}kC(o,t.nodeBefore,t.nodeAfter)}}}function PC(t,e,n){const o=n.mapper.toViewPosition(e.position),i=o.nodeBefore,r=o.nodeAfter;kC(n.writer,i,r)}function zC(t,e,n){if(n.consumable.consume(e.viewItem,{name:!0})){const t=n.writer,o=t.createElement("listItem"),i=function(t){let e=0,n=t.parent;for(;n;){if(n.is("element","li"))e++;else{const t=n.previousSibling;t&&t.is("element","li")&&e++}n=n.parent}return e}(e.viewItem);t.setAttribute("listIndent",i,o);const r=e.viewItem.parent&&"ol"==e.viewItem.parent.name?"numbered":"bulleted";if(t.setAttribute("listType",r,o),!n.safeInsert(o,e.modelCursor))return;const s=function(t,e,n){const{writer:o,schema:i}=n;let r=o.createPositionAfter(t);for(const s of e)if("ul"==s.name||"ol"==s.name)r=n.convertItem(s,r).modelCursor;else{const e=n.convertItem(s,o.createPositionAt(t,"end")),a=e.modelRange.start.nodeAfter;a&&a.is("element")&&!i.checkChild(t,a.name)&&(t=e.modelCursor.parent.is("element","listItem")?e.modelCursor.parent:MC(e.modelCursor),r=o.createPositionAfter(t))}return r}(o,e.viewItem.getChildren(),n);e.modelRange=t.createRange(e.modelCursor,s),n.updateConversionResult(o,e)}}function RC(t,e,n){if(n.consumable.test(e.viewItem,{name:!0})){const t=Array.from(e.viewItem.getChildren());for(const e of t){!(e.is("element","li")||LC(e))&&e._remove()}}}function VC(t,e,n){if(n.consumable.test(e.viewItem,{name:!0})){if(0===e.viewItem.childCount)return;const t=[...e.viewItem.getChildren()];let n=!1;for(const e of t)n&&!LC(e)&&e._remove(),LC(e)&&(n=!0)}}function FC(t){return(e,n)=>{if(n.isPhantom)return;const o=n.modelPosition.nodeBefore;if(o&&o.is("element","listItem")){const e=n.mapper.toViewElement(o),i=e.getAncestors().find(LC),r=t.createPositionAt(e,0).getWalker();for(const t of r){if("elementStart"==t.type&&t.item.is("element","li")){n.viewPosition=t.previousPosition;break}if("elementEnd"==t.type&&t.item==i){n.viewPosition=t.nextPosition;break}}}}}function NC(t,[e,n]){let o,i=e.is("documentFragment")?e.getChild(0):e;if(o=n?this.createSelection(n):this.document.selection,i&&i.is("element","listItem")){const t=o.getFirstPosition();let e=null;if(t.parent.is("element","listItem")?e=t.parent:t.nodeBefore&&t.nodeBefore.is("element","listItem")&&(e=t.nodeBefore),e){const t=e.getAttribute("listIndent");if(t>0)for(;i&&i.is("element","listItem");)i._setAttribute("listIndent",i.getAttribute("listIndent")+t),i=i.nextSibling}}}function MC(t){const e=new ja({startPosition:t});let n;do{n=e.next()}while(!n.value.item.is("element","listItem"));return n.value.item}function OC(t,e,n,o,i,r){const s=CC(e.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:t,foo:"b"}),a=i.mapper,l=i.writer,c=s?s.getAttribute("listIndent"):null;let d;if(s)if(c==t){const t=a.toViewElement(s).parent;d=l.createPositionAfter(t)}else{const t=r.createPositionAt(s,"end");d=a.toViewPosition(t)}else d=n;d=wC(d);for(const t of[...o.getChildren()])LC(t)&&(d=l.move(l.createRangeOn(t),d).end,kC(l,t,t.nextSibling),kC(l,t.previousSibling,t))}function LC(t){return t.is("element","ol")||t.is("element","ul")}class HC extends ge{static get pluginName(){return"ListEditing"}static get requires(){return[gf,lp]}init(){const t=this.editor;t.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const e=t.data,n=t.editing;var o;t.model.document.registerPostFixer((e=>function(t,e){const n=t.document.differ.getChanges(),o=new Map;let i=!1;for(const o of n)if("insert"==o.type&&"listItem"==o.name)r(o.position);else if("insert"==o.type&&"listItem"!=o.name){if("$text"!=o.name){const n=o.position.nodeAfter;n.hasAttribute("listIndent")&&(e.removeAttribute("listIndent",n),i=!0),n.hasAttribute("listType")&&(e.removeAttribute("listType",n),i=!0),n.hasAttribute("listStyle")&&(e.removeAttribute("listStyle",n),i=!0),n.hasAttribute("listReversed")&&(e.removeAttribute("listReversed",n),i=!0),n.hasAttribute("listStart")&&(e.removeAttribute("listStart",n),i=!0);for(const e of Array.from(t.createRangeIn(n)).filter((t=>t.item.is("element","listItem"))))r(e.previousPosition)}r(o.position.getShiftedBy(o.length))}else"remove"==o.type&&"listItem"==o.name?r(o.position):("attribute"==o.type&&"listIndent"==o.attributeKey||"attribute"==o.type&&"listType"==o.attributeKey)&&r(o.range.start);for(const t of o.values())s(t),a(t);return i;function r(t){const e=t.nodeBefore;if(e&&e.is("element","listItem")){let t=e;if(o.has(t))return;for(let e=t.previousSibling;e&&e.is("element","listItem");e=t.previousSibling)if(t=e,o.has(t))return;o.set(e,t)}else{const e=t.nodeAfter;e&&e.is("element","listItem")&&o.set(e,e)}}function s(t){let n=0,o=null;for(;t&&t.is("element","listItem");){const r=t.getAttribute("listIndent");if(r>n){let s;null===o?(o=r-n,s=n):(o>r&&(o=r),s=r-o),e.setAttribute("listIndent",s,t),i=!0}else o=null,n=t.getAttribute("listIndent")+1;t=t.nextSibling}}function a(t){let n=[],o=null;for(;t&&t.is("element","listItem");){const r=t.getAttribute("listIndent");if(o&&o.getAttribute("listIndent")>r&&(n=n.slice(0,r+1)),0!=r)if(n[r]){const o=n[r];t.getAttribute("listType")!=o&&(e.setAttribute("listType",o,t),i=!0)}else n[r]=t.getAttribute("listType");o=t,t=t.nextSibling}}}(t.model,e))),n.mapper.registerViewToModelLength("li",qC),e.mapper.registerViewToModelLength("li",qC),n.mapper.on("modelToViewPosition",FC(n.view)),n.mapper.on("viewToModelPosition",(o=t.model,(t,e)=>{const n=e.viewPosition,i=n.parent,r=e.mapper;if("ul"==i.name||"ol"==i.name){if(n.isAtEnd){const t=r.toModelElement(n.nodeBefore),i=r.getModelLength(n.nodeBefore);e.modelPosition=o.createPositionBefore(t).getShiftedBy(i)}else{const t=r.toModelElement(n.nodeAfter);e.modelPosition=o.createPositionBefore(t)}t.stop()}else if("li"==i.name&&n.nodeBefore&&("ul"==n.nodeBefore.name||"ol"==n.nodeBefore.name)){const s=r.toModelElement(i);let a=1,l=n.nodeBefore;for(;l&&LC(l);)a+=r.getModelLength(l),l=l.previousSibling;e.modelPosition=o.createPositionBefore(s).getShiftedBy(a),t.stop()}})),e.mapper.on("modelToViewPosition",FC(n.view)),t.conversion.for("editingDowncast").add((e=>{e.on("insert",IC,{priority:"high"}),e.on("insert:listItem",TC(t.model)),e.on("attribute:listType:listItem",BC,{priority:"high"}),e.on("attribute:listType:listItem",DC,{priority:"low"}),e.on("attribute:listIndent:listItem",function(t){return(e,n,o)=>{if(!o.consumable.consume(n.item,"attribute:listIndent"))return;const i=o.mapper.toViewElement(n.item),r=o.writer;r.breakContainer(r.createPositionBefore(i)),r.breakContainer(r.createPositionAfter(i));const s=i.parent,a=s.previousSibling,l=r.createRangeOn(s);r.remove(l),a&&a.nextSibling&&kC(r,a,a.nextSibling),OC(n.attributeOldValue+1,n.range.start,l.start,i,o,t),bC(n.item,i,o,t);for(const t of n.item.getChildren())o.consumable.consume(t,"insert")}}(t.model)),e.on("remove:listItem",function(t){return(e,n,o)=>{const i=o.mapper.toViewPosition(n.position).getLastMatchingPosition((t=>!t.item.is("element","li"))).nodeAfter,r=o.writer;r.breakContainer(r.createPositionBefore(i)),r.breakContainer(r.createPositionAfter(i));const s=i.parent,a=s.previousSibling,l=r.createRangeOn(s),c=r.remove(l);a&&a.nextSibling&&kC(r,a,a.nextSibling),OC(o.mapper.toModelElement(i).getAttribute("listIndent")+1,n.position,l.start,i,o,t);for(const t of r.createRangeIn(c).getItems())o.mapper.unbindViewElement(t);e.stop()}}(t.model)),e.on("remove",PC,{priority:"low"})})),t.conversion.for("dataDowncast").add((e=>{e.on("insert",IC,{priority:"high"}),e.on("insert:listItem",TC(t.model))})),t.conversion.for("upcast").add((t=>{t.on("element:ul",RC,{priority:"high"}),t.on("element:ol",RC,{priority:"high"}),t.on("element:li",VC,{priority:"high"}),t.on("element:li",zC)})),t.model.on("insertContent",NC,{priority:"high"}),t.commands.add("numberedList",new uC(t,"numbered")),t.commands.add("bulletedList",new uC(t,"bulleted")),t.commands.add("indentList",new pC(t,"forward")),t.commands.add("outdentList",new pC(t,"backward"));const i=n.view.document;this.listenTo(i,"enter",((t,e)=>{const n=this.editor.model.document,o=n.selection.getLastPosition().parent;n.selection.isCollapsed&&"listItem"==o.name&&o.isEmpty&&(this.editor.execute("outdentList"),e.preventDefault(),t.stop())}),{context:"li"}),this.listenTo(i,"delete",((t,e)=>{if("backward"!==e.direction)return;const n=this.editor.model.document.selection;if(!n.isCollapsed)return;const o=n.getFirstPosition();if(!o.isAtStart)return;const i=o.parent;if("listItem"!==i.name)return;i.previousSibling&&"listItem"===i.previousSibling.name||(this.editor.execute("outdentList"),e.preventDefault(),t.stop())}),{context:"li"});const r=t=>(e,n)=>{this.editor.commands.get(t).isEnabled&&(this.editor.execute(t),n())};t.keystrokes.set("Tab",r("indentList")),t.keystrokes.set("Shift+Tab",r("outdentList"))}afterInit(){const t=this.editor.commands,e=t.get("indent"),n=t.get("outdent");e&&e.registerChildCommand(t.get("indentList")),n&&n.registerChildCommand(t.get("outdentList"))}}function qC(t){let e=1;for(const n of t.getChildren())if("ul"==n.name||"ol"==n.name)for(const t of n.getChildren())e+=qC(t);return e}const WC='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM3.5 3v5H2V3.7H1v-1h2.5V3zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001c-.048.405-.16.734-.333.988-.175.254-.59.692-1.244 1.312H4.3v1h-4l.043-.043zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>',UC='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75zm6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75z"/></svg>';class jC extends ge{static get pluginName(){return"ListUI"}init(){const t=this.editor.t;AC(this.editor,"numberedList",t("Numbered List"),WC),AC(this.editor,"bulletedList",t("Bulleted List"),UC)}}class $C extends pe{constructor(t,e){super(t),this._defaultType=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){this._tryToConvertItemsToList(t);const e=this.editor.model,n=yC(e);n.length&&e.change((e=>{for(const o of n)e.setAttribute("listStyle",t.type||this._defaultType,o)}))}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")?t.getAttribute("listStyle"):null}_checkEnabled(){const t=this.editor,e=t.commands.get("numberedList"),n=t.commands.get("bulletedList");return e.isEnabled||n.isEnabled}_tryToConvertItemsToList(t){if(!t.type)return;const e=(n=t.type,xC.includes(n)?"bulleted":EC.includes(n)?"numbered":null);var n;if(!e)return;const o=this.editor,i=e+"List";o.commands.get(i).value||o.execute(i)}}class GC extends pe{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute(t={}){const e=this.editor.model,n=yC(e).filter((t=>"numbered"==t.getAttribute("listType")));e.change((e=>{for(const o of n)e.setAttribute("listReversed",!!t.reversed,o)}))}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")&&"numbered"==t.getAttribute("listType")?t.getAttribute("listReversed"):null}}class KC extends pe{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute(t={}){const e=this.editor.model,n=yC(e).filter((t=>"numbered"==t.getAttribute("listType")));e.change((e=>{for(const o of n)e.setAttribute("listStart",t.startIndex||1,o)}))}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")&&"numbered"==t.getAttribute("listType")?t.getAttribute("listStart"):null}}const ZC="default";class JC extends ge{static get requires(){return[HC]}static get pluginName(){return"ListPropertiesEditing"}constructor(t){super(t),t.config.define("list",{properties:{styles:!0,startIndex:!1,reversed:!1}})}init(){const t=this.editor,e=t.model,n=function(t){const e=[];t.styles&&e.push({attributeName:"listStyle",defaultValue:ZC,addCommand(t){t.commands.add("listStyle",new $C(t,ZC))},appliesToListItem:()=>!0,setAttributeOnDowncast(t,e,n){e&&e!==ZC?t.setStyle("list-style-type",e,n):t.removeStyle("list-style-type",n)},getAttributeOnUpcast:t=>t.getStyle("list-style-type")||ZC});t.reversed&&e.push({attributeName:"listReversed",defaultValue:!1,addCommand(t){t.commands.add("listReversed",new GC(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),setAttributeOnDowncast(t,e,n){e?t.setAttribute("reversed","reversed",n):t.removeAttribute("reversed",n)},getAttributeOnUpcast:t=>t.hasAttribute("reversed")});t.startIndex&&e.push({attributeName:"listStart",defaultValue:1,addCommand(t){t.commands.add("listStart",new KC(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),setAttributeOnDowncast(t,e,n){1!=e?t.setAttribute("start",e,n):t.removeAttribute("start",n)},getAttributeOnUpcast:t=>t.getAttribute("start")||1});return e}(t.config.get("list.properties"));e.schema.extend("listItem",{allowAttributes:n.map((t=>t.attributeName))});for(const e of n)e.addCommand(t);var o;this.listenTo(t.commands.get("indentList"),"_executeCleanup",function(t,e){return(n,o)=>{const i=o[0],r=i.getAttribute("listIndent"),s=o.filter((t=>t.getAttribute("listIndent")===r));let a=null;i.previousSibling.getAttribute("listIndent")+1!==r&&(a=CC(i.previousSibling,{sameIndent:!0,direction:"backward",listIndent:r})),t.model.change((t=>{for(const n of s)for(const o of e)if(o.appliesToListItem(n)){const e=null==a?o.defaultValue:a.getAttribute(o.attributeName);t.setAttribute(o.attributeName,e,n)}}))}}(t,n)),this.listenTo(t.commands.get("outdentList"),"_executeCleanup",function(t,e){return(n,o)=>{if(!(o=o.reverse().filter((t=>t.is("element","listItem")))).length)return;const i=o[0].getAttribute("listIndent"),r=o[0].getAttribute("listType");let s=o[0].previousSibling;if(s.is("element","listItem"))for(;s.getAttribute("listIndent")!==i;)s=s.previousSibling;else s=null;s||(s=o[o.length-1].nextSibling),s&&s.is("element","listItem")&&s.getAttribute("listType")===r&&t.model.change((t=>{const n=o.filter((t=>t.getAttribute("listIndent")===i));for(const o of n)for(const n of e)if(n.appliesToListItem(o)){const e=n.attributeName,i=s.getAttribute(e);t.setAttribute(e,i,o)}}))}}(t,n)),this.listenTo(t.commands.get("bulletedList"),"_executeCleanup",XC(t)),this.listenTo(t.commands.get("numberedList"),"_executeCleanup",XC(t)),e.document.registerPostFixer(function(t,e){return n=>{let o=!1;const i=tA(t.model.document.differ.getChanges()).filter((t=>"todo"!==t.getAttribute("listType")));if(!i.length)return o;let r=i[i.length-1].nextSibling;if((!r||!r.is("element","listItem"))&&(r=i[i.length-1].previousSibling,r)){const t=i[0].getAttribute("listIndent");for(;r.is("element","listItem")&&r.getAttribute("listIndent")!==t&&(r=r.previousSibling,r););}for(const t of e){const e=t.attributeName;for(const s of i)if(t.appliesToListItem(s))if(s.hasAttribute(e)){const i=s.previousSibling;QC(i,s,t.attributeName)&&(n.setAttribute(e,i.getAttribute(e),s),o=!0)}else YC(r,s,t)?n.setAttribute(e,r.getAttribute(e),s):n.setAttribute(e,t.defaultValue,s),o=!0;else n.removeAttribute(e,s)}return o}}(t,n)),t.conversion.for("upcast").add((o=n,t=>{t.on("element:li",((t,e,n)=>{const i=e.viewItem.parent;if(!i)return;const r=e.modelRange.start.nodeAfter||e.modelRange.end.nodeBefore;for(const t of o)if(t.appliesToListItem(r)){const e=t.getAttributeOnUpcast(i);n.writer.setAttribute(t.attributeName,e,r)}}),{priority:"low"})})),t.conversion.for("downcast").add(function(t){return n=>{for(const o of t)n.on(`attribute:${o.attributeName}:listItem`,((t,n,i)=>{const r=i.writer,s=n.item,a=CC(s.previousSibling,{sameIndent:!0,listIndent:s.getAttribute("listIndent"),direction:"backward"}),l=i.mapper.toViewElement(s);e(s,a)||r.breakContainer(r.createPositionBefore(l)),o.setAttributeOnDowncast(r,n.attributeNewValue,l.parent)}),{priority:"low"})};function e(t,e){return e&&t.getAttribute("listType")===e.getAttribute("listType")&&t.getAttribute("listIndent")===e.getAttribute("listIndent")&&t.getAttribute("listStyle")===e.getAttribute("listStyle")&&t.getAttribute("listReversed")===e.getAttribute("listReversed")&&t.getAttribute("listStart")===e.getAttribute("listStart")}}(n)),this._mergeListAttributesWhileMergingLists(n)}afterInit(){const t=this.editor;t.commands.get("todoList")&&t.model.document.registerPostFixer(function(t){return e=>{const n=tA(t.model.document.differ.getChanges()).filter((t=>"todo"===t.getAttribute("listType")&&(t.hasAttribute("listStyle")||t.hasAttribute("listReversed")||t.hasAttribute("listStart"))));if(!n.length)return!1;for(const t of n)e.removeAttribute("listStyle",t),e.removeAttribute("listReversed",t),e.removeAttribute("listStart",t);return!0}}(t))}_mergeListAttributesWhileMergingLists(t){const e=this.editor.model;let n;this.listenTo(e,"deleteContent",((t,[e])=>{const o=e.getFirstPosition(),i=e.getLastPosition();if(o.parent===i.parent)return;if(!o.parent.is("element","listItem"))return;const r=i.parent.nextSibling;if(!r||!r.is("element","listItem"))return;const s=CC(o.parent,{sameIndent:!0,listIndent:r.getAttribute("listIndent")});s&&s.getAttribute("listType")===r.getAttribute("listType")&&(n=s)}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{n&&(e.change((e=>{const o=CC(n.nextSibling,{sameIndent:!0,listIndent:n.getAttribute("listIndent"),direction:"forward"});if(!o)return void(n=null);const i=[o,...vC(e.createPositionAt(o,0),"forward")];for(const o of i)for(const i of t)if(i.appliesToListItem(o)){const t=i.attributeName,r=n.getAttribute(t);e.setAttribute(t,r,o)}})),n=null)}),{priority:"low"})}}function YC(t,e,n){if(!t)return!1;const o=t.getAttribute(n.attributeName);return!!o&&(o!=n.defaultValue&&t.getAttribute("listType")===e.getAttribute("listType"))}function QC(t,e,n){if(!t||!t.is("element","listItem"))return!1;if(e.getAttribute("listType")!==t.getAttribute("listType"))return!1;const o=t.getAttribute("listIndent");if(o<1||o!==e.getAttribute("listIndent"))return!1;const i=t.getAttribute(n);return!(!i||i===e.getAttribute(n))}function XC(t){return(e,n)=>{n=n.filter((t=>t.is("element","listItem"))),t.model.change((t=>{for(const e of n)t.removeAttribute("listStyle",e)}))}}function tA(t){const e=[];for(const n of t){const t=eA(n);t&&t.is("element","listItem")&&e.push(t)}return e}function eA(t){return"attribute"===t.type?t.range.start.nodeAfter:"insert"===t.type?t.position.nodeAfter:null}var nA=n(4721),oA={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(nA.Z,oA);nA.Z.locals;class iA extends Wd{constructor(t,e){super(t);const n=this.bindTemplate;this.set("isCollapsed",!1),this.set("label",""),this.buttonView=this._createButtonView(),this.children=this.createCollection(),this.set("_collapsibleAriaLabelUid"),e&&this.children.addMany(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-collapsible",n.if("isCollapsed","ck-collapsible_collapsed")]},children:[this.buttonView,{tag:"div",attributes:{class:["ck","ck-collapsible__children"],role:"region",hidden:n.if("isCollapsed","hidden"),"aria-labelledby":n.to("_collapsibleAriaLabelUid")},children:this.children}]})}render(){super.render(),this._collapsibleAriaLabelUid=this.buttonView.labelView.element.id}_createButtonView(){const t=new wh(this.locale),e=t.bindTemplate;return t.set({withText:!0,icon:Ph}),t.extendTemplate({attributes:{"aria-expanded":e.to("isOn",(t=>String(t)))}}),t.bind("label").to(this),t.bind("isOn").to(this,"isCollapsed",(t=>!t)),t.on("execute",(()=>{this.isCollapsed=!this.isCollapsed})),t}}var rA=n(6082),sA={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(rA.Z,sA);rA.Z.locals;class aA extends Wd{constructor(t,{enabledProperties:e,styleButtonViews:n,styleGridAriaLabel:o}){super(t);const i=["ck","ck-list-properties"];this.children=this.createCollection(),this.stylesView=null,this.additionalPropertiesCollapsibleView=null,this.startIndexFieldView=null,this.reversedSwitchButtonView=null,this.focusTracker=new Ea,this.keystrokes=new Sa,this.focusables=new Ld,this.focusCycler=new Sh({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),e.styles?(this.stylesView=this._createStylesView(n,o),this.children.add(this.stylesView)):i.push("ck-list-properties_without-styles"),(e.startIndex||e.reversed)&&(this._addNumberedListPropertyViews(e,n),i.push("ck-list-properties_with-numbered-properties")),this.setTemplate({tag:"div",attributes:{class:i},children:this.children})}render(){if(super.render(),this.stylesView){for(const t of this.stylesView.children)this.focusables.add(t),this.focusTracker.add(t.element);(this.startIndexFieldView||this.reversedSwitchButtonView)&&(this.focusables.add(this.children.last.buttonView),this.focusTracker.add(this.children.last.buttonView.element))}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element),this.listenTo(this.startIndexFieldView.element,"selectstart",((t,e)=>{e.stopPropagation()}),{priority:"high"});const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.reversedSwitchButtonView&&(this.focusables.add(this.reversedSwitchButtonView),this.focusTracker.add(this.reversedSwitchButtonView.element)),this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createStylesView(t,e){const n=new Wd(this.locale);return n.children=n.createCollection(this.locale),n.children.addMany(t),n.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-list-styles-list"]},children:n.children}),n.children.delegate("execute").to(this),n}_addNumberedListPropertyViews(t){const e=this.locale.t,n=[];t.startIndex&&(this.startIndexFieldView=this._createStartIndexField(),n.push(this.startIndexFieldView)),t.reversed&&(this.reversedSwitchButtonView=this._createReversedSwitchButton(),n.push(this.reversedSwitchButtonView)),t.styles?(this.additionalPropertiesCollapsibleView=new iA(this.locale,n),this.additionalPropertiesCollapsibleView.set({label:e("List properties"),isCollapsed:!0}),this.additionalPropertiesCollapsibleView.buttonView.bind("isEnabled").toMany(n,"isEnabled",((...t)=>t.some((t=>t)))),this.additionalPropertiesCollapsibleView.buttonView.on("change:isEnabled",((t,e,n)=>{n||(this.additionalPropertiesCollapsibleView.isCollapsed=!0)})),this.children.add(this.additionalPropertiesCollapsibleView)):this.children.addMany(n)}_createStartIndexField(){const t=this.locale.t,e=new Bu(this.locale,Iu);return e.set({label:t("Start at"),class:"ck-numbered-list-properties__start-index"}),e.fieldView.set({min:1,step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",(()=>{const n=e.fieldView.element,o=n.valueAsNumber;Number.isNaN(o)||(n.checkValidity()?this.fire("listStart",{startIndex:o}):e.errorText=t("Start index must be greater than 0."))})),e}_createReversedSwitchButton(){const t=this.locale.t,e=new _h(this.locale);return e.set({withText:!0,label:t("Reversed order"),class:"ck-numbered-list-properties__reversed-order"}),e.delegate("execute").to(this,"listReversed"),e}}var lA=n(2417),cA={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(lA.Z,cA);lA.Z.locals;class dA extends ge{static get pluginName(){return"ListPropertiesUI"}init(){const t=this.editor,e=t.locale.t,n=t.config.get("list.properties");n.styles&&t.ui.componentFactory.add("bulletedList",hA({editor:t,parentCommandName:"bulletedList",buttonLabel:e("Bulleted List"),buttonIcon:UC,styleGridAriaLabel:e("Bulleted list styles toolbar"),styleDefinitions:[{label:e("Toggle the disc list style"),tooltip:e("Disc"),type:"disc",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6z"/></svg>'},{label:e("Toggle the circle list style"),tooltip:e("Circle"),type:"circle",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4z"/></svg>'},{label:e("Toggle the square list style"),tooltip:e("Square"),type:"square",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M14 27v6H8v-6h6zm0-9v6H8v-6h6zm0-9v6H8V9h6z"/></svg>'}]})),(n.styles||n.startIndex||n.reversed)&&t.ui.componentFactory.add("numberedList",hA({editor:t,parentCommandName:"numberedList",buttonLabel:e("Numbered List"),buttonIcon:WC,styleGridAriaLabel:e("Numbered list styles toolbar"),styleDefinitions:[{label:e("Toggle the decimal list style"),tooltip:e("Decimal"),type:"decimal",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M10.29 15V8.531H9.286c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.343 0v-1.235h-1.235V15h1.235zM11.3 24v-1.147H8.848c.064-.111.148-.226.252-.343.104-.117.351-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.494-.824.104-.263.156-.539.156-.829 0-.51-.182-.936-.545-1.279-.363-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.153-.155.358-.233.616-.233.26 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.468.536-1.024 1.055-.692.641-1.155 1.156-1.389 1.544-.234.389-.375.8-.422 1.233H11.3zm2.333 0v-1.235h-1.235V24h1.235zM9.204 34.11c.615 0 1.129-.2 1.542-.598.413-.398.62-.88.62-1.446 0-.39-.11-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.619-.337.928-.788.928-1.353 0-.399-.151-.756-.453-1.073-.366-.386-.852-.58-1.459-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.668.55c-.16.232-.28.544-.358.933l1.138.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.215 0 .386.065.515.194s.193.302.193.518c0 .255-.087.46-.263.613-.176.154-.43.227-.765.218l-.136 1.006c.22-.061.409-.092.567-.092.24 0 .444.09.61.272.168.182.251.428.251.739 0 .328-.087.589-.261.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.307-.698l-1.196.145c.062.542.285.98.668 1.316.384.335.868.503 1.45.503zm4.43-.11v-1.235h-1.236V34h1.235z"/></svg>'},{label:e("Toggle the decimal with leading zero list style"),tooltip:e("Decimal with leading zero"),type:"decimal-leading-zero",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M5.714 15.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm6.078.914V8.531H10.79c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.344 0v-1.235h-1.235V15h1.235zm-9.422 9.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm7.088.914v-1.147H10.35c.065-.111.149-.226.253-.343.104-.117.35-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.493-.824.104-.263.156-.539.156-.829 0-.51-.181-.936-.544-1.279-.364-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.152-.155.357-.233.615-.233.261 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.467.536-1.024 1.055-.691.641-1.154 1.156-1.388 1.544-.235.389-.375.8-.422 1.233h4.328zm2.334 0v-1.235h-1.235V24h1.235zM5.714 34.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm4.992 1.024c.616 0 1.13-.2 1.543-.598.413-.398.62-.88.62-1.446 0-.39-.111-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.618-.337.927-.788.927-1.353 0-.399-.15-.756-.452-1.073-.366-.386-.853-.58-1.46-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.667.55c-.16.232-.28.544-.359.933l1.139.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.214 0 .386.065.515.194s.193.302.193.518c0 .255-.088.46-.264.613-.175.154-.43.227-.764.218l-.136 1.006c.22-.061.408-.092.566-.092.24 0 .444.09.611.272.167.182.25.428.25.739 0 .328-.086.589-.26.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.308-.698l-1.195.145c.062.542.284.98.668 1.316.384.335.867.503 1.45.503zm4.43-.11v-1.235h-1.235V34h1.235z"/></svg>'},{label:e("Toggle the lower–roman list style"),tooltip:e("Lower–roman"),type:"lower-roman",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11.88 8.7V7.558h-1.234V8.7h1.234zm0 5.3V9.333h-1.234V14h1.234zm2.5 0v-1.235h-1.234V14h1.235zm-4.75 4.7v-1.142H8.395V18.7H9.63zm0 5.3v-4.667H8.395V24H9.63zm2.5-5.3v-1.142h-1.234V18.7h1.235zm0 5.3v-4.667h-1.234V24h1.235zm2.501 0v-1.235h-1.235V24h1.235zM7.38 28.7v-1.142H6.145V28.7H7.38zm0 5.3v-4.667H6.145V34H7.38zm2.5-5.3v-1.142H8.646V28.7H9.88zm0 5.3v-4.667H8.646V34H9.88zm2.5-5.3v-1.142h-1.234V28.7h1.235zm0 5.3v-4.667h-1.234V34h1.235zm2.501 0v-1.235h-1.235V34h1.235z"/></svg>'},{label:e("Toggle the upper–roman list style"),tooltip:e("Upper-roman"),type:"upper-roman",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11.916 15V8.558h-1.301V15h1.3zm2.465 0v-1.235h-1.235V15h1.235zM9.665 25v-6.442h-1.3V25h1.3zm2.5 0v-6.442h-1.3V25h1.3zm2.466 0v-1.235h-1.235V25h1.235zm-7.216 9v-6.442h-1.3V34h1.3zm2.5 0v-6.442h-1.3V34h1.3zm2.501 0v-6.442h-1.3V34h1.3zm2.465 0v-1.235h-1.235V34h1.235z"/></svg>'},{label:e("Toggle the lower–latin list style"),tooltip:e("Lower-latin"),type:"lower-latin",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M9.62 14.105c.272 0 .528-.05.768-.153s.466-.257.677-.462c.009.024.023.072.044.145.047.161.086.283.119.365h1.221a2.649 2.649 0 0 1-.222-.626c-.04-.195-.059-.498-.059-.908l.013-1.441c0-.536-.055-.905-.165-1.105-.11-.201-.3-.367-.569-.497-.27-.13-.68-.195-1.23-.195-.607 0-1.064.108-1.371.325-.308.217-.525.55-.65 1.002l1.12.202c.076-.217.176-.369.299-.455.123-.086.294-.13.514-.13.325 0 .546.05.663.152.118.101.176.27.176.508v.123c-.222.093-.622.194-1.2.303-.427.082-.755.178-.982.288-.227.11-.403.268-.53.474a1.327 1.327 0 0 0-.188.706c0 .398.138.728.415.988.277.261.656.391 1.136.391zm.368-.87a.675.675 0 0 1-.492-.189.606.606 0 0 1-.193-.448c0-.176.08-.32.241-.435.106-.07.33-.142.673-.215a7.19 7.19 0 0 0 .751-.19v.247c0 .296-.016.496-.048.602a.773.773 0 0 1-.295.409 1.07 1.07 0 0 1-.637.22zm4.645.765v-1.235h-1.235V14h1.235zM10.2 25.105c.542 0 1.003-.215 1.382-.646.38-.43.57-1.044.57-1.84 0-.771-.187-1.362-.559-1.774a1.82 1.82 0 0 0-1.41-.617c-.522 0-.973.216-1.354.65v-2.32H7.594V25h1.147v-.686a1.9 1.9 0 0 0 .67.592c.26.133.523.2.79.2zm-.299-.975c-.354 0-.638-.164-.852-.492-.153-.232-.229-.59-.229-1.073 0-.468.098-.818.295-1.048a.93.93 0 0 1 .738-.345c.302 0 .55.118.743.354.193.236.29.62.29 1.154 0 .5-.096.868-.288 1.1-.192.233-.424.35-.697.35zm4.478.87v-1.235h-1.234V25h1.234zm-4.017 9.105c.6 0 1.08-.142 1.437-.426.357-.284.599-.704.725-1.261l-1.213-.207c-.061.326-.167.555-.316.688a.832.832 0 0 1-.576.2.916.916 0 0 1-.75-.343c-.185-.228-.278-.62-.278-1.173 0-.498.091-.853.274-1.066.183-.212.429-.318.736-.318.232 0 .42.061.565.184.145.123.238.306.28.55l1.216-.22c-.146-.501-.387-.874-.722-1.119-.336-.244-.788-.366-1.356-.366-.695 0-1.245.214-1.653.643-.407.43-.61 1.03-.61 1.8 0 .762.202 1.358.608 1.788.406.431.95.646 1.633.646zM14.633 34v-1.235h-1.235V34h1.235z"/></svg>'},{label:e("Toggle the upper–latin list style"),tooltip:e("Upper-latin"),type:"upper-latin",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="m7.88 15 .532-1.463h2.575L11.549 15h1.415l-2.58-6.442H9.01L6.5 15h1.38zm2.69-2.549H8.811l.87-2.39.887 2.39zM14.88 15v-1.235h-1.234V15h1.234zM9.352 25c.83-.006 1.352-.02 1.569-.044.346-.038.636-.14.872-.305.236-.166.422-.387.558-.664.137-.277.205-.562.205-.855 0-.372-.106-.695-.317-.97-.21-.276-.512-.471-.905-.585a1.51 1.51 0 0 0 .661-.567 1.5 1.5 0 0 0 .244-.83c0-.28-.066-.53-.197-.754a1.654 1.654 0 0 0-.495-.539 1.676 1.676 0 0 0-.672-.266c-.25-.042-.63-.063-1.14-.063H7.158V25h2.193zm.142-3.88H8.46v-1.49h.747c.612 0 .983.007 1.112.022.217.026.38.102.49.226.11.125.165.287.165.486a.68.68 0 0 1-.192.503.86.86 0 0 1-.525.23 11.47 11.47 0 0 1-.944.023h.18zm.17 2.795H8.46v-1.723h1.05c.592 0 .977.03 1.154.092.177.062.313.16.406.295a.84.84 0 0 1 .14.492c0 .228-.06.41-.181.547a.806.806 0 0 1-.473.257c-.126.026-.423.04-.892.04zM14.88 25v-1.235h-1.234V25h1.234zm-5.018 9.11c.691 0 1.262-.17 1.711-.512.45-.341.772-.864.965-1.567l-1.261-.4c-.109.472-.287.818-.536 1.037-.25.22-.547.33-.892.33-.47 0-.85-.173-1.143-.519-.293-.345-.44-.925-.44-1.74 0-.767.15-1.322.447-1.665.297-.343.684-.514 1.162-.514.346 0 .64.096.881.29.242.193.4.457.477.79l1.288-.307c-.147-.516-.367-.911-.66-1.187-.492-.465-1.132-.698-1.92-.698-.902 0-1.63.296-2.184.89-.554.593-.83 1.426-.83 2.498 0 1.014.275 1.813.825 2.397.551.585 1.254.877 2.11.877zM14.88 34v-1.235h-1.234V34h1.234z"/></svg>'}]}))}}function hA({editor:t,parentCommandName:e,buttonLabel:n,buttonIcon:o,styleGridAriaLabel:i,styleDefinitions:r}){const s=t.commands.get(e);return a=>{const l=lu(a,Fh),c=l.buttonView;l.bind("isEnabled").to(s),l.class="ck-list-styles-dropdown",c.on("execute",(()=>{t.execute(e),t.editing.view.focus()})),c.set({label:n,icon:o,tooltip:!0,isToggleable:!0}),c.bind("isOn").to(s,"value",(t=>!!t));const d=function({editor:t,dropdownView:e,parentCommandName:n,styleDefinitions:o,styleGridAriaLabel:i}){const r=t.locale,s=t.config.get("list.properties");let a;"numberedList"!=n&&(s.startIndex=!1,s.reversed=!1);if(s.styles){const e=t.commands.get("listStyle"),i=function({editor:t,listStyleCommand:e,parentCommandName:n}){const o=t.locale,i=t.commands.get(n);return({label:n,type:r,icon:s,tooltip:a})=>{const l=new wh(o);return l.set({label:n,icon:s,tooltip:a}),e.on("change:value",(()=>{l.isOn=e.value===r})),l.on("execute",(()=>{i.value?e.value!==r?t.execute("listStyle",{type:r}):t.execute("listStyle",{type:e._defaultType}):t.model.change((()=>{t.execute("listStyle",{type:r})})),t.editing.view.focus()})),l}}({editor:t,parentCommandName:n,listStyleCommand:e});a=o.map(i)}const l=new aA(r,{styleGridAriaLabel:i,enabledProperties:s,styleButtonViews:a});if(s.startIndex){const e=t.commands.get("listStart");l.startIndexFieldView.bind("isEnabled").to(e),l.startIndexFieldView.fieldView.bind("value").to(e),l.on("listStart",((e,n)=>t.execute("listStart",n)))}if(s.reversed){const e=t.commands.get("listReversed");l.reversedSwitchButtonView.bind("isEnabled").to(e),l.reversedSwitchButtonView.bind("isOn").to(e,"value"),l.on("listReversed",(()=>{const n=e.value;t.execute("listReversed",{reversed:!n})}))}return l.delegate("execute").to(e),l}({editor:t,dropdownView:l,parentCommandName:e,styleGridAriaLabel:i,styleDefinitions:r});return l.panelView.children.add(d),l}}class uA extends ge{static get requires(){return[JC,dA]}static get pluginName(){return"ListProperties"}}const gA="todoListChecked";class mA extends pe{constructor(t){super(t),this._selectedElements=[],this.on("execute",(()=>{this.refresh()}),{priority:"highest"})}refresh(){this._selectedElements=this._getSelectedItems(),this.value=this._selectedElements.every((t=>!!t.getAttribute("todoListChecked"))),this.isEnabled=!!this._selectedElements.length}_getSelectedItems(){const t=this.editor.model,e=t.schema,n=t.document.selection.getFirstRange(),o=n.start.parent,i=[];e.checkAttribute(o,gA)&&i.push(o);for(const t of n.getItems())e.checkAttribute(t,gA)&&!i.includes(t)&&i.push(t);return i}execute(t={}){this.editor.model.change((e=>{for(const n of this._selectedElements){(void 0===t.forceValue?!this.value:t.forceValue)?e.setAttribute(gA,!0,n):e.removeAttribute(gA,n)}}))}}function pA(t,e,n){const o=e.modelCursor,i=o.parent,r=e.viewItem;if("checkbox"!=r.getAttribute("type")||"listItem"!=i.name||!o.isAtStart)return;if(!n.consumable.consume(r,{name:!0}))return;const s=n.writer;s.setAttribute("listType","todo",i),e.viewItem.hasAttribute("checked")&&s.setAttribute("todoListChecked",!0,i),e.modelRange=s.createRange(o)}function fA(t){return(e,n)=>{const o=n.modelPosition,i=o.parent;if(!i.is("element","listItem")||"todo"!=i.getAttribute("listType"))return;const r=kA(n.mapper.toViewElement(i),t);r&&(n.viewPosition=n.mapper.findPositionIn(r,o.offset))}}function bA(t,e,n,o){return e.createUIElement("label",{class:"todo-list__label",contenteditable:!1},(function(e){const i=ma(document,"input",{type:"checkbox"});n&&i.setAttribute("checked","checked"),i.addEventListener("change",(()=>o(t)));const r=this.toDomElement(e);return r.appendChild(i),r}))}function kA(t,e){const n=e.createRangeIn(t);for(const t of n)if(t.item.is("containerElement","span")&&t.item.hasClass("todo-list__label__description"))return t.item}const wA=mr("Ctrl+Enter");class CA extends ge{static get pluginName(){return"TodoListEditing"}static get requires(){return[HC]}init(){const t=this.editor,{editing:e,data:n,model:o}=t;o.schema.extend("listItem",{allowAttributes:["todoListChecked"]}),o.schema.addAttributeCheck(((t,e)=>{const n=t.last;if("todoListChecked"==e&&"listItem"==n.name&&"todo"!=n.getAttribute("listType"))return!1})),t.commands.add("todoList",new uC(t,"todo"));const i=new mA(t);var r,s;t.commands.add("checkTodoList",i),t.commands.add("todoListCheck",i),n.downcastDispatcher.on("insert:listItem",function(t){return(e,n,o)=>{const i=o.consumable;if(!i.test(n.item,"insert")||!i.test(n.item,"attribute:listType")||!i.test(n.item,"attribute:listIndent"))return;if("todo"!=n.item.getAttribute("listType"))return;const r=n.item;i.consume(r,"insert"),i.consume(r,"attribute:listType"),i.consume(r,"attribute:listIndent"),i.consume(r,"attribute:todoListChecked");const s=o.writer,a=fC(r,o);s.addClass("todo-list",a.parent);const l=s.createContainerElement("label",{class:"todo-list__label"}),c=s.createEmptyElement("input",{type:"checkbox",disabled:"disabled"}),d=s.createContainerElement("span",{class:"todo-list__label__description"});r.getAttribute("todoListChecked")&&s.setAttribute("checked","checked",c),s.insert(s.createPositionAt(a,0),l),s.insert(s.createPositionAt(l,0),c),s.insert(s.createPositionAfter(c),d),bC(r,a,o,t)}}(o),{priority:"high"}),n.upcastDispatcher.on("element:input",pA,{priority:"high"}),e.downcastDispatcher.on("insert:listItem",function(t,e){return(n,o,i)=>{const r=i.consumable;if(!r.test(o.item,"insert")||!r.test(o.item,"attribute:listType")||!r.test(o.item,"attribute:listIndent"))return;if("todo"!=o.item.getAttribute("listType"))return;const s=o.item;r.consume(s,"insert"),r.consume(s,"attribute:listType"),r.consume(s,"attribute:listIndent"),r.consume(s,"attribute:todoListChecked");const a=i.writer,l=fC(s,i),c=!!s.getAttribute("todoListChecked"),d=bA(s,a,c,e),h=a.createContainerElement("span",{class:"todo-list__label__description"});a.addClass("todo-list",l.parent),a.insert(a.createPositionAt(l,0),d),a.insert(a.createPositionAfter(d),h),bC(s,l,i,t)}}(o,(t=>this._handleCheckmarkChange(t))),{priority:"high"}),e.downcastDispatcher.on("attribute:listType:listItem",(r=t=>this._handleCheckmarkChange(t),s=e.view,(t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const o=n.mapper.toViewElement(e.item),i=n.writer,a=function(t,e){const n=e.createRangeIn(t);for(const t of n)if(t.item.is("uiElement","label"))return t.item}(o,s);if("todo"==e.attributeNewValue){const t=!!e.item.getAttribute("todoListChecked"),n=bA(e.item,i,t,r),s=i.createContainerElement("span",{class:"todo-list__label__description"}),a=i.createRangeIn(o),l=_C(o),c=wC(a.start),d=l?i.createPositionBefore(l):a.end,h=i.createRange(c,d);i.addClass("todo-list",o.parent),i.move(h,i.createPositionAt(s,0)),i.insert(i.createPositionAt(o,0),n),i.insert(i.createPositionAfter(n),s)}else if("todo"==e.attributeOldValue){const t=kA(o,s);i.removeClass("todo-list",o.parent),i.remove(a),i.move(i.createRangeIn(t),i.createPositionBefore(t)),i.remove(t)}})),e.downcastDispatcher.on("attribute:todoListChecked:listItem",function(t){return(e,n,o)=>{if("todo"!=n.item.getAttribute("listType"))return;if(!o.consumable.consume(n.item,"attribute:todoListChecked"))return;const{mapper:i,writer:r}=o,s=!!n.item.getAttribute("todoListChecked"),a=i.toViewElement(n.item).getChild(0),l=bA(n.item,r,s,t);r.insert(r.createPositionAfter(a),l),r.remove(a)}}((t=>this._handleCheckmarkChange(t)))),e.mapper.on("modelToViewPosition",fA(e.view)),n.mapper.on("modelToViewPosition",fA(e.view)),this.listenTo(e.view.document,"arrowKey",function(t,e){return(n,o)=>{if("left"!=fr(o.keyCode,e.contentLanguageDirection))return;const i=t.schema,r=t.document.selection;if(!r.isCollapsed)return;const s=r.getFirstPosition(),a=s.parent;if("listItem"===a.name&&"todo"==a.getAttribute("listType")&&s.isAtStart){const e=i.getNearestSelectionRange(t.createPositionBefore(a),"backward");e&&t.change((t=>t.setSelection(e))),o.preventDefault(),o.stopPropagation(),n.stop()}}}(o,t.locale),{context:"li"}),this.listenTo(e.view.document,"keydown",((e,n)=>{gr(n)===wA&&(t.execute("checkTodoList"),e.stop())}),{priority:"high"});const a=new Set;this.listenTo(o,"applyOperation",((t,e)=>{const n=e[0];if("rename"==n.type&&"listItem"==n.oldName){const t=n.position.nodeAfter;t.hasAttribute("todoListChecked")&&a.add(t)}else if("changeAttribute"==n.type&&"listType"==n.key&&"todo"===n.oldValue)for(const t of n.range.getItems())t.hasAttribute("todoListChecked")&&"todo"!==t.getAttribute("listType")&&a.add(t)})),o.document.registerPostFixer((t=>{let e=!1;for(const n of a)t.removeAttribute("todoListChecked",n),e=!0;return a.clear(),e}))}_handleCheckmarkChange(t){const e=this.editor,n=e.model,o=Array.from(n.document.selection.getRanges());n.change((n=>{n.setSelection(t,"end"),e.execute("checkTodoList"),n.setSelection(o)}))}}class AA extends ge{static get pluginName(){return"TodoListUI"}init(){const t=this.editor.t;AC(this.editor,"todoList",t("To-do List"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m2.315 14.705 2.224-2.24a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .949L2.865 16.07a.682.682 0 0 1-.112.089.647.647 0 0 1-.852-.051L.688 14.886a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.717.722zm5.185.045a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75zM2.329 5.745l2.21-2.226a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .95L2.865 7.125a.685.685 0 0 1-.496.196.644.644 0 0 1-.468-.187L.688 5.912a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.73.736zM7.5 5.75A.75.75 0 0 1 8.25 5h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>')}}var _A=n(1199),vA={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(_A.Z,vA);_A.Z.locals;function yA(t,e){if(!t.childCount)return;const n=new Tg(t.document),o=function(t,e){const n=e.createRangeIn(t),o=new Uo({name:/^p|h\d+$/,styles:{"mso-list":/.*/}}),i=[];for(const t of n)if("elementStart"===t.type&&o.match(t.item)){const e=SA(t.item);i.push({element:t.item,id:e.id,order:e.order,indent:e.indent})}return i}(t,n);if(!o.length)return;let i=null,r=1;o.forEach(((t,s)=>{const a=function(t,e){if(!t)return!0;if(t.id!==e.id)return e.indent-t.indent!=1;const n=e.element.previousSibling;if(!n)return!0;return o=n,!(o.is("element","ol")||o.is("element","ul"));var o}(o[s-1],t),l=a?null:o[s-1],c=(h=t,(d=l)?h.indent-d.indent:h.indent-1);var d,h;if(a&&(i=null,r=1),!i||0!==c){const o=function(t,e){const n=new RegExp(`@list l${t.id}:level${t.indent}\\s*({[^}]*)`,"gi"),o=/mso-level-number-format:([^;]{0,100});/gi,i=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,r=n.exec(e);let s="decimal",a="ol",l=null;if(r&&r[1]){const e=o.exec(r[1]);if(e&&e[1]&&(s=e[1].trim(),a="bullet"!==s&&"image"!==s?"ol":"ul"),"bullet"===s){const e=function(t){const e=function(t){if(t.getChild(0).is("$text"))return null;for(const e of t.getChildren()){if(!e.is("element","span"))continue;const t=e.getChild(0);return t.is("$text")?t:t.getChild(0)}}(t);if(!e)return null;const n=e._data;if("o"===n)return"circle";if("·"===n)return"disc";if("§"===n)return"square";return null}(t.element);e&&(s=e)}else{const t=i.exec(r[1]);t&&t[1]&&(l=parseInt(t[1]))}}return{type:a,startIndex:l,style:xA(s)}}(t,e);if(i){if(t.indent>r){const t=i.getChild(i.childCount-1),e=t.getChild(t.childCount-1);i=EA(o,e,n),r+=1}else if(t.indent<r){const e=r-t.indent;i=function(t,e){const n=t.getAncestors({parentFirst:!0});let o=null,i=0;for(const t of n)if("ul"!==t.name&&"ol"!==t.name||i++,i===e){o=t;break}return o}(i,e),r=parseInt(t.indent)}}else i=EA(o,t.element,n);t.indent<=r&&(i.is("element",o.type)||(i=n.rename(o.type,i)))}const u=function(t,e){return function(t,e){const n=new Uo({name:"span",styles:{"mso-list":"Ignore"}}),o=e.createRangeIn(t);for(const t of o)"elementStart"===t.type&&n.match(t.item)&&e.remove(t.item)}(t,e),e.rename("li",t)}(t.element,n);n.appendChild(u,i)}))}function xA(t){if(t.startsWith("arabic-leading-zero"))return"decimal-leading-zero";switch(t){case"alpha-upper":return"upper-alpha";case"alpha-lower":return"lower-alpha";case"roman-upper":return"upper-roman";case"roman-lower":return"lower-roman";case"circle":case"disc":case"square":return t;default:return null}}function EA(t,e,n){const o=e.parent,i=n.createElement(t.type),r=o.getChildIndex(e)+1;return n.insertChild(r,i,o),t.style&&n.setStyle("list-style-type",t.style,i),t.startIndex&&t.startIndex>1&&n.setAttribute("start",t.startIndex,i),i}function SA(t){const e={},n=t.getStyle("mso-list");if(n){const t=n.match(/(^|\s{1,100})l(\d+)/i),o=n.match(/\s{0,100}lfo(\d+)/i),i=n.match(/\s{0,100}level(\d+)/i);t&&o&&i&&(e.id=t[2],e.order=o[1],e.indent=i[1])}return e}const TA=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class BA{constructor(t){this.document=t}isActive(t){return TA.test(t)}execute(t){const e=new Tg(this.document),{body:n}=t._parsedData;!function(t,e){for(const n of t.getChildren())if(n.is("element","b")&&"normal"===n.getStyle("font-weight")){const o=t.getChildIndex(n);e.remove(n),e.insertChild(o,n.getChildren(),t)}}(n,e),function(t,e){for(const n of e.createRangeIn(t)){const t=n.item;if(t.is("element","li")){const n=t.getChild(0);n&&n.is("element","p")&&e.unwrapElement(n)}}}(n,e),t.content=n}}function DA(t,e){if(!t.childCount)return;const n=new Tg,o=function(t,e){const n=e.createRangeIn(t),o=new Uo({name:/v:(.+)/}),i=[];for(const t of n){if("elementStart"!=t.type)continue;const e=t.item,n=e.previousSibling&&e.previousSibling.name||null;o.match(e)&&e.getAttribute("o:gfxdata")&&"v:shapetype"!==n&&i.push(t.item.getAttribute("id"))}return i}(t,n);!function(t,e,n){const o=n.createRangeIn(e),i=new Uo({name:"img"}),r=[];for(const e of o)if(i.match(e.item)){const n=e.item,o=n.getAttribute("v:shapes")?n.getAttribute("v:shapes").split(" "):[];o.length&&o.every((e=>t.indexOf(e)>-1))?r.push(n):n.getAttribute("src")||r.push(n)}for(const t of r)n.remove(t)}(o,t,n),function(t,e){const n=e.createRangeIn(t),o=new Uo({name:/v:(.+)/}),i=[];for(const t of n)"elementStart"==t.type&&o.match(t.item)&&i.push(t.item);for(const t of i)e.remove(t)}(t,n);const i=function(t,e){const n=e.createRangeIn(t),o=new Uo({name:"img"}),i=[];for(const t of n)o.match(t.item)&&t.item.getAttribute("src").startsWith("file://")&&i.push(t.item);return i}(t,n);i.length&&function(t,e,n){if(t.length===e.length)for(let o=0;o<t.length;o++){const i=`data:${e[o].type};base64,${IA(e[o].hex)}`;n.setAttribute("src",i,t[o])}}(i,function(t){if(!t)return[];const e=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,n=new RegExp("(?:("+e.source+"))([\\da-fA-F\\s]+)\\}","g"),o=t.match(n),i=[];if(o)for(const t of o){let n=!1;t.includes("\\pngblip")?n="image/png":t.includes("\\jpegblip")&&(n="image/jpeg"),n&&i.push({hex:t.replace(e,"").replace(/[^\da-fA-F]/g,""),type:n})}return i}(e),n)}function IA(t){return btoa(t.match(/\w{2}/g).map((t=>String.fromCharCode(parseInt(t,16)))).join(""))}const PA=/<meta\s*name="?generator"?\s*content="?microsoft\s*word\s*\d+"?\/?>/i,zA=/xmlns:o="urn:schemas-microsoft-com/i;class RA{constructor(t){this.document=t}isActive(t){return PA.test(t)||zA.test(t)}execute(t){const{body:e,stylesString:n}=t._parsedData;yA(e,n),DA(e,t.dataTransfer.getData("text/rtf")),t.content=e}}function VA(t){return t.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,((t,e)=>1===e.length?" ":Array(e.length+1).join("  ").substr(0,e.length)))}function FA(t,e){const n=new DOMParser,o=function(t){return VA(VA(t)).replace(/(<span\s+style=['"]mso-spacerun:yes['"]>[^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g,"$1$2").replace(/<span\s+style=['"]mso-spacerun:yes['"]><\/span>/g,"").replace(/ <\//g," </").replace(/ <o:p><\/o:p>/g," <o:p></o:p>").replace(/<o:p>(&nbsp;|\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)</g,"><")}(function(t){const e="</body>",n="</html>",o=t.indexOf(e);if(o<0)return t;const i=t.indexOf(n,o+e.length);return t.substring(0,o+e.length)+(i>=0?t.substring(i):"")}(t=t.replace(/<!--\[if gte vml 1]>/g,""))),i=n.parseFromString(o,"text/html");!function(t){t.querySelectorAll("span[style*=spacerun]").forEach((t=>{const e=t.innerText.length||0;t.innerHTML=Array(e+1).join("  ").substr(0,e)}))}(i);const r=i.body.innerHTML,s=function(t,e){const n=new Xi(e),o=new ms(n,{renderingMode:"data"}),i=t.createDocumentFragment(),r=t.body.childNodes;for(;r.length>0;)i.appendChild(r[0]);return o.domToView(i,{skipComments:!0})}(i,e),a=function(t){const e=[],n=[],o=Array.from(t.getElementsByTagName("style"));for(const t of o)t.sheet&&t.sheet.cssRules&&t.sheet.cssRules.length&&(e.push(t.sheet),n.push(t.innerHTML));return{styles:e,stylesString:n.join(" ")}}(i);return{body:s,bodyString:r,styles:a.styles,stylesString:a.stylesString}}function NA(t,e,n,o,i=1){e>i?o.setAttribute(t,e,n):o.removeAttribute(t,n)}function MA(t,e,n={}){const o=t.createElement("tableCell",n);return t.insertElement("paragraph",o),t.insert(o,e),o}function OA(t,e){const n=e.parent.parent,o=parseInt(n.getAttribute("headingColumns")||0),{column:i}=t.getCellLocation(e);return!!o&&i<o}function LA(){return t=>{t.on("element:table",((t,e,n)=>{const o=e.viewItem;if(!n.consumable.test(o,{name:!0}))return;const{rows:i,headingRows:r,headingColumns:s}=function(t){const e={headingRows:0,headingColumns:0},n=[],o=[];let i;for(const r of Array.from(t.getChildren()))if("tbody"===r.name||"thead"===r.name||"tfoot"===r.name){"thead"!==r.name||i||(i=r);const t=Array.from(r.getChildren()).filter((t=>t.is("element","tr")));for(const r of t)if("thead"===r.parent.name&&r.parent===i)e.headingRows++,n.push(r);else{o.push(r);const t=qA(r);t>e.headingColumns&&(e.headingColumns=t)}}return e.rows=[...n,...o],e}(o),a={};s&&(a.headingColumns=s),r&&(a.headingRows=r);const l=n.writer.createElement("table",a);if(n.safeInsert(l,e.modelCursor)){if(n.consumable.consume(o,{name:!0}),i.forEach((t=>n.convertItem(t,n.writer.createPositionAt(l,"end")))),n.convertChildren(o,n.writer.createPositionAt(l,"end")),l.isEmpty){const t=n.writer.createElement("tableRow");n.writer.insert(t,n.writer.createPositionAt(l,"end")),MA(n.writer,n.writer.createPositionAt(t,"end"))}n.updateConversionResult(l,e)}}))}}function HA(t){return e=>{e.on(`element:${t}`,((t,e,n)=>{if(e.modelRange&&e.viewItem.isEmpty){const t=e.modelRange.start.nodeAfter,o=n.writer.createPositionAt(t,0);n.writer.insertElement("paragraph",o)}}),{priority:"low"})}}function qA(t){let e=0,n=0;const o=Array.from(t.getChildren()).filter((t=>"th"===t.name||"td"===t.name));for(;n<o.length&&"th"===o[n].name;){const t=o[n];e+=parseInt(t.getAttribute("colspan")||1),n++}return e}class WA{constructor(t,e={}){this._table=t,this._startRow=void 0!==e.row?e.row:e.startRow||0,this._endRow=void 0!==e.row?e.row:e.endRow,this._startColumn=void 0!==e.column?e.column:e.startColumn||0,this._endColumn=void 0!==e.column?e.column:e.endColumn,this._includeAllSlots=!!e.includeAllSlots,this._skipRows=new Set,this._row=0,this._rowIndex=0,this._column=0,this._cellIndex=0,this._spannedCells=new Map,this._nextCellAtColumn=-1}[Symbol.iterator](){return this}next(){const t=this._table.getChild(this._rowIndex);if(!t||this._isOverEndRow())return{done:!0};if(!t.is("element","tableRow"))return this._rowIndex++,this.next();if(this._isOverEndColumn())return this._advanceToNextRow();let e=null;const n=this._getSpanned();if(n)this._includeAllSlots&&!this._shouldSkipSlot()&&(e=this._formatOutValue(n.cell,n.row,n.column));else{const n=t.getChild(this._cellIndex);if(!n)return this._advanceToNextRow();const o=parseInt(n.getAttribute("colspan")||1),i=parseInt(n.getAttribute("rowspan")||1);(o>1||i>1)&&this._recordSpans(n,i,o),this._shouldSkipSlot()||(e=this._formatOutValue(n)),this._nextCellAtColumn=this._column+o}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,e||this.next()}skipRow(t){this._skipRows.add(t)}_advanceToNextRow(){return this._row++,this._rowIndex++,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(t,e=this._row,n=this._column){return{done:!1,value:new UA(this,t,e,n)}}_shouldSkipSlot(){const t=this._skipRows.has(this._row),e=this._row<this._startRow,n=this._column<this._startColumn,o=void 0!==this._endColumn&&this._column>this._endColumn;return t||e||n||o}_getSpanned(){const t=this._spannedCells.get(this._row);return t&&t.get(this._column)||null}_recordSpans(t,e,n){const o={cell:t,row:this._row,column:this._column};for(let t=this._row;t<this._row+e;t++)for(let e=this._column;e<this._column+n;e++)t==this._row&&e==this._column||this._markSpannedCell(t,e,o)}_markSpannedCell(t,e,n){this._spannedCells.has(t)||this._spannedCells.set(t,new Map);this._spannedCells.get(t).set(e,n)}}class UA{constructor(t,e,n,o){this.cell=e,this.row=t._row,this.column=t._column,this.cellAnchorRow=n,this.cellAnchorColumn=o,this._cellIndex=t._cellIndex,this._rowIndex=t._rowIndex,this._table=t._table}get isAnchor(){return this.row===this.cellAnchorRow&&this.column===this.cellAnchorColumn}get cellWidth(){return parseInt(this.cell.getAttribute("colspan")||1)}get cellHeight(){return parseInt(this.cell.getAttribute("rowspan")||1)}get rowIndex(){return this._rowIndex}getPositionBefore(){return this._table.root.document.model.createPositionAt(this._table.getChild(this.row),this._cellIndex)}}function jA(t,e={}){return(n,{writer:o})=>{const i=n.getAttribute("headingRows")||0,r=[];i>0&&r.push(o.createContainerElement("thead",null,o.createSlot((t=>t.is("element","tableRow")&&t.index<i)))),i<t.getRows(n)&&r.push(o.createContainerElement("tbody",null,o.createSlot((t=>t.is("element","tableRow")&&t.index>=i))));const s=o.createContainerElement("figure",{class:"table"},[o.createContainerElement("table",null,r),o.createSlot((t=>!t.is("element","tableRow")))]);return e.asWidget?function(t,e){return e.setCustomProperty("table",!0,t),jf(t,e,{hasSelectionHandle:!0})}(s,o):s}}function $A(t={}){return(e,{writer:n})=>{const o=e.parent,i=o.parent,r=i.getChildIndex(o),s=new WA(i,{row:r}),a=i.getAttribute("headingRows")||0,l=i.getAttribute("headingColumns")||0;for(const o of s)if(o.cell==e){const e=o.row<a||o.column<l?"th":"td";return t.asWidget?Jf(n.createEditableElement(e),n):n.createContainerElement(e)}}}function GA(t={}){return(e,{writer:n,consumable:o,mapper:i})=>{if(e.parent.is("element","tableCell")&&KA(e))return t.asWidget?n.createContainerElement("span",{class:"ck-table-bogus-paragraph"}):(o.consume(e,"insert"),void i.bindElements(e,i.toViewElement(e.parent)))}}function KA(t){return 1==t.parent.childCount&&![...t.getAttributeKeys()].length}class ZA extends pe{refresh(){const t=this.editor.model,e=t.document.selection,n=t.schema;this.isEnabled=function(t,e){const n=t.getFirstPosition().parent,o=n===n.root?n:n.parent;return e.checkChild(o,"table")}(e,n)}execute(t={}){const e=this.editor.model,n=e.document.selection,o=this.editor.plugins.get("TableUtils"),i=this.editor.config.get("table"),r=Yf(n,e),s=i.defaultHeadings.rows,a=i.defaultHeadings.columns;void 0===t.headingRows&&s&&(t.headingRows=s),void 0===t.headingColumns&&a&&(t.headingColumns=a),e.change((n=>{const i=o.createTable(n,t);e.insertContent(i,r),n.setSelection(n.createPositionAt(i.getNodeByPath([0,0,0]),0))}))}}class JA extends pe{constructor(t,e={}){super(t),this.order=e.order||"below"}refresh(){const t=this.editor.model.document.selection,e=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(t).length;this.isEnabled=e}execute(){const t=this.editor,e=t.model.document.selection,n=t.plugins.get("TableUtils"),o="above"===this.order,i=n.getSelectionAffectedTableCells(e),r=n.getRowIndexes(i),s=o?r.first:r.last,a=i[0].findAncestor("table");n.insertRows(a,{at:o?s:s+1,copyStructureFromAbove:!o})}}class YA extends pe{constructor(t,e={}){super(t),this.order=e.order||"right"}refresh(){const t=this.editor.model.document.selection,e=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(t).length;this.isEnabled=e}execute(){const t=this.editor,e=t.model.document.selection,n=t.plugins.get("TableUtils"),o="left"===this.order,i=n.getSelectionAffectedTableCells(e),r=n.getColumnIndexes(i),s=o?r.first:r.last,a=i[0].findAncestor("table");n.insertColumns(a,{columns:1,at:o?s:s+1})}}class QA extends pe{constructor(t,e={}){super(t),this.direction=e.direction||"horizontally"}refresh(){const t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=1===t.length}execute(){const t=this.editor.plugins.get("TableUtils"),e=t.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];"horizontally"===this.direction?t.splitCellHorizontally(e,2):t.splitCellVertically(e,2)}}function XA(t,e,n){const{startRow:o,startColumn:i,endRow:r,endColumn:s}=e,a=n.createElement("table"),l=r-o+1;for(let t=0;t<l;t++)n.insertElement("tableRow",a,"end");const c=[...new WA(t,{startRow:o,endRow:r,startColumn:i,endColumn:s,includeAllSlots:!0})];for(const{row:t,column:e,cell:l,isAnchor:d,cellAnchorRow:h,cellAnchorColumn:u}of c){const c=t-o,g=a.getChild(c);if(d){const o=n.cloneElement(l);n.append(o,g),i_(o,t,e,r,s,n)}else(h<o||u<i)&&MA(n,n.createPositionAt(g,"end"))}return function(t,e,n,o,i){const r=parseInt(e.getAttribute("headingRows")||0);if(r>0){NA("headingRows",r-n,t,i,0)}const s=parseInt(e.getAttribute("headingColumns")||0);if(s>0){NA("headingColumns",s-o,t,i,0)}}(a,t,o,i,n),a}function t_(t,e,n=0){const o=[],i=new WA(t,{startRow:n,endRow:e-1});for(const t of i){const{row:n,cellHeight:i}=t,r=n+i-1;n<e&&e<=r&&o.push(t)}return o}function e_(t,e,n){const o=t.parent,i=o.parent,r=o.index,s=e-r,a={},l=parseInt(t.getAttribute("rowspan"))-s;l>1&&(a.rowspan=l);const c=parseInt(t.getAttribute("colspan")||1);c>1&&(a.colspan=c);const d=r+s,h=[...new WA(i,{startRow:r,endRow:d,includeAllSlots:!0})];let u,g=null;for(const e of h){const{row:o,column:i,cell:r}=e;r===t&&void 0===u&&(u=i),void 0!==u&&u===i&&o===d&&(g=MA(n,e.getPositionBefore(),a))}return NA("rowspan",s,t,n),g}function n_(t,e){const n=[],o=new WA(t);for(const t of o){const{column:o,cellWidth:i}=t,r=o+i-1;o<e&&e<=r&&n.push(t)}return n}function o_(t,e,n,o){const i=n-e,r={},s=parseInt(t.getAttribute("colspan"))-i;s>1&&(r.colspan=s);const a=parseInt(t.getAttribute("rowspan")||1);a>1&&(r.rowspan=a);const l=MA(o,o.createPositionAfter(t),r);return NA("colspan",i,t,o),l}function i_(t,e,n,o,i,r){const s=parseInt(t.getAttribute("colspan")||1),a=parseInt(t.getAttribute("rowspan")||1);if(n+s-1>i){NA("colspan",i-n+1,t,r,1)}if(e+a-1>o){NA("rowspan",o-e+1,t,r,1)}}function r_(t,e){const n=e.getColumns(t),o=new Array(n).fill(0);for(const{column:e}of new WA(t))o[e]++;const i=o.reduce(((t,e,n)=>e?t:[...t,n]),[]);if(i.length>0){const n=i[i.length-1];return e.removeColumns(t,{at:n}),!0}return!1}function s_(t,e){const n=[],o=e.getRows(t);for(let e=0;e<o;e++){t.getChild(e).isEmpty&&n.push(e)}if(n.length>0){const o=n[n.length-1];return e.removeRows(t,{at:o}),!0}return!1}function a_(t,e){r_(t,e)||s_(t,e)}function l_(t,e){const n=Array.from(new WA(t,{startColumn:e.firstColumn,endColumn:e.lastColumn,row:e.lastRow}));if(n.every((({cellHeight:t})=>1===t)))return e.lastRow;const o=n[0].cellHeight-1;return e.lastRow+o}function c_(t,e){const n=Array.from(new WA(t,{startRow:e.firstRow,endRow:e.lastRow,column:e.lastColumn}));if(n.every((({cellWidth:t})=>1===t)))return e.lastColumn;const o=n[0].cellWidth-1;return e.lastColumn+o}class d_ extends pe{constructor(t,e){super(t),this.direction=e.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}refresh(){const t=this._getMergeableCell();this.value=t,this.isEnabled=!!t}execute(){const t=this.editor.model,e=t.document,n=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(e.selection)[0],o=this.value,i=this.direction;t.change((t=>{const e="right"==i||"down"==i,r=e?n:o,s=e?o:n,a=s.parent;!function(t,e,n){h_(t)||(h_(e)&&n.remove(n.createRangeIn(e)),n.move(n.createRangeIn(t),n.createPositionAt(e,"end")));n.remove(t)}(s,r,t);const l=this.isHorizontal?"colspan":"rowspan",c=parseInt(n.getAttribute(l)||1),d=parseInt(o.getAttribute(l)||1);t.setAttribute(l,c+d,r),t.setSelection(t.createRangeIn(r));const h=this.editor.plugins.get("TableUtils");a_(a.findAncestor("table"),h)}))}_getMergeableCell(){const t=this.editor.model.document,e=this.editor.plugins.get("TableUtils"),n=e.getTableCellsContainingSelection(t.selection)[0];if(!n)return;const o=this.isHorizontal?function(t,e,n){const o=t.parent.parent,i="right"==e?t.nextSibling:t.previousSibling,r=(o.getAttribute("headingColumns")||0)>0;if(!i)return;const s="right"==e?t:i,a="right"==e?i:t,{column:l}=n.getCellLocation(s),{column:c}=n.getCellLocation(a),d=parseInt(s.getAttribute("colspan")||1),h=OA(n,s),u=OA(n,a);if(r&&h!=u)return;return l+d===c?i:void 0}(n,this.direction,e):function(t,e,n){const o=t.parent,i=o.parent,r=i.getChildIndex(o);if("down"==e&&r===n.getRows(i)-1||"up"==e&&0===r)return;const s=parseInt(t.getAttribute("rowspan")||1),a=i.getAttribute("headingRows")||0,l="down"==e&&r+s===a,c="up"==e&&r===a;if(a&&(l||c))return;const d=parseInt(t.getAttribute("rowspan")||1),h="down"==e?r+d:r,u=[...new WA(i,{endRow:h})],g=u.find((e=>e.cell===t)).column,m=u.find((({row:t,cellHeight:n,column:o})=>o===g&&("down"==e?t===h:h===t+n)));return m&&m.cell}(n,this.direction,e);if(!o)return;const i=this.isHorizontal?"rowspan":"colspan",r=parseInt(n.getAttribute(i)||1);return parseInt(o.getAttribute(i)||1)===r?o:void 0}}function h_(t){return 1==t.childCount&&t.getChild(0).is("element","paragraph")&&t.getChild(0).isEmpty}class u_ extends pe{refresh(){const t=this.editor.plugins.get("TableUtils"),e=t.getSelectionAffectedTableCells(this.editor.model.document.selection),n=e[0];if(n){const o=n.findAncestor("table"),i=this.editor.plugins.get("TableUtils").getRows(o)-1,r=t.getRowIndexes(e),s=0===r.first&&r.last===i;this.isEnabled=!s}else this.isEnabled=!1}execute(){const t=this.editor.model,e=this.editor.plugins.get("TableUtils"),n=e.getSelectionAffectedTableCells(t.document.selection),o=e.getRowIndexes(n),i=n[0],r=i.findAncestor("table"),s=e.getCellLocation(i).column;t.change((t=>{const n=o.last-o.first+1;e.removeRows(r,{at:o.first,rows:n});const i=function(t,e,n,o){const i=t.getChild(Math.min(e,o-1));let r=i.getChild(0),s=0;for(const t of i.getChildren()){if(s>n)return r;r=t,s+=parseInt(t.getAttribute("colspan")||1)}return r}(r,o.first,s,e.getRows(r));t.setSelection(t.createPositionAt(i,0))}))}}class g_ extends pe{refresh(){const t=this.editor.plugins.get("TableUtils"),e=t.getSelectionAffectedTableCells(this.editor.model.document.selection),n=e[0];if(n){const o=n.findAncestor("table"),i=t.getColumns(o),{first:r,last:s}=t.getColumnIndexes(e);this.isEnabled=s-r<i-1}else this.isEnabled=!1}execute(){const t=this.editor.plugins.get("TableUtils"),[e,n]=function(t,e){const n=e.getSelectionAffectedTableCells(t),o=n[0],i=n.pop(),r=[o,i];return o.isBefore(i)?r:r.reverse()}(this.editor.model.document.selection,t),o=e.parent.parent,i=[...new WA(o)],r={first:i.find((t=>t.cell===e)).column,last:i.find((t=>t.cell===n)).column},s=function(t,e,n,o){return parseInt(n.getAttribute("colspan")||1)>1?n:e.previousSibling||n.nextSibling?n.nextSibling||e.previousSibling:o.first?t.reverse().find((({column:t})=>t<o.first)).cell:t.reverse().find((({column:t})=>t>o.last)).cell}(i,e,n,r);this.editor.model.change((t=>{const e=r.last-r.first+1;this.editor.plugins.get("TableUtils").removeColumns(o,{at:r.first,columns:e}),t.setSelection(t.createPositionAt(s,0))}))}}class m_ extends pe{refresh(){const t=this.editor.plugins.get("TableUtils"),e=this.editor.model,n=t.getSelectionAffectedTableCells(e.document.selection),o=n.length>0;this.isEnabled=o,this.value=o&&n.every((t=>this._isInHeading(t,t.parent.parent)))}execute(t={}){if(t.forceValue===this.value)return;const e=this.editor.plugins.get("TableUtils"),n=this.editor.model,o=e.getSelectionAffectedTableCells(n.document.selection),i=o[0].findAncestor("table"),{first:r,last:s}=e.getRowIndexes(o),a=this.value?r:s+1,l=i.getAttribute("headingRows")||0;n.change((t=>{if(a){const e=t_(i,a,a>l?l:0);for(const{cell:n}of e)e_(n,a,t)}NA("headingRows",a,i,t,0)}))}_isInHeading(t,e){const n=parseInt(e.getAttribute("headingRows")||0);return!!n&&t.parent.index<n}}class p_ extends pe{refresh(){const t=this.editor.model,e=this.editor.plugins.get("TableUtils"),n=e.getSelectionAffectedTableCells(t.document.selection),o=n.length>0;this.isEnabled=o,this.value=o&&n.every((t=>OA(e,t)))}execute(t={}){if(t.forceValue===this.value)return;const e=this.editor.plugins.get("TableUtils"),n=this.editor.model,o=e.getSelectionAffectedTableCells(n.document.selection),i=o[0].findAncestor("table"),{first:r,last:s}=e.getColumnIndexes(o),a=this.value?r:s+1;n.change((t=>{if(a){const e=n_(i,a);for(const{cell:n,column:o}of e)o_(n,o,a,t)}NA("headingColumns",a,i,t,0)}))}}class f_ extends ge{static get pluginName(){return"TableUtils"}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(t){const e=t.parent,n=e.parent,o=n.getChildIndex(e),i=new WA(n,{row:o});for(const{cell:e,row:n,column:o}of i)if(e===t)return{row:n,column:o}}createTable(t,e){const n=t.createElement("table"),o=parseInt(e.rows)||2,i=parseInt(e.columns)||2;return b_(t,n,0,o,i),e.headingRows&&NA("headingRows",Math.min(e.headingRows,o),n,t,0),e.headingColumns&&NA("headingColumns",Math.min(e.headingColumns,i),n,t,0),n}insertRows(t,e={}){const n=this.editor.model,o=e.at||0,i=e.rows||1,r=void 0!==e.copyStructureFromAbove,s=e.copyStructureFromAbove?o-1:o,l=this.getRows(t),c=this.getColumns(t);if(o>l)throw new a("tableutils-insertrows-insert-out-of-range",this,{options:e});n.change((e=>{const n=t.getAttribute("headingRows")||0;if(n>o&&NA("headingRows",n+i,t,e,0),!r&&(0===o||o===l))return void b_(e,t,o,i,c);const a=r?Math.max(o,s):o,d=new WA(t,{endRow:a}),h=new Array(c).fill(1);for(const{row:t,column:n,cellHeight:a,cellWidth:l,cell:c}of d){const d=t+a-1,u=t<=s&&s<=d;t<o&&o<=d?(e.setAttribute("rowspan",a+i,c),h[n]=-l):r&&u&&(h[n]=l)}for(let n=0;n<i;n++){const n=e.createElement("tableRow");e.insert(n,t,o);for(let t=0;t<h.length;t++){const o=h[t],i=e.createPositionAt(n,"end");o>0&&MA(e,i,o>1?{colspan:o}:null),t+=Math.abs(o)-1}}}))}insertColumns(t,e={}){const n=this.editor.model,o=e.at||0,i=e.columns||1;n.change((e=>{const n=t.getAttribute("headingColumns");o<n&&e.setAttribute("headingColumns",n+i,t);const r=this.getColumns(t);if(0===o||r===o){for(const n of t.getChildren())n.is("element","tableRow")&&k_(i,e,e.createPositionAt(n,o?"end":0));return}const s=new WA(t,{column:o,includeAllSlots:!0});for(const t of s){const{row:n,cell:r,cellAnchorColumn:a,cellAnchorRow:l,cellWidth:c,cellHeight:d}=t;if(a<o){e.setAttribute("colspan",c+i,r);const t=l+d-1;for(let e=n;e<=t;e++)s.skipRow(e)}else k_(i,e,t.getPositionBefore())}}))}removeRows(t,e){const n=this.editor.model,o=e.rows||1,i=this.getRows(t),r=e.at,s=r+o-1;if(s>i-1)throw new a("tableutils-removerows-row-index-out-of-range",this,{table:t,options:e});n.change((e=>{const{cellsToMove:n,cellsToTrim:o}=function(t,e,n){const o=new Map,i=[];for(const{row:r,column:s,cellHeight:a,cell:l}of new WA(t,{endRow:n})){const t=r+a-1;if(r>=e&&r<=n&&t>n){const t=a-(n-r+1);o.set(s,{cell:l,rowspan:t})}if(r<e&&t>=e){let o;o=t>=n?n-e+1:t-e+1,i.push({cell:l,rowspan:a-o})}}return{cellsToMove:o,cellsToTrim:i}}(t,r,s);if(n.size){!function(t,e,n,o){const i=[...new WA(t,{includeAllSlots:!0,row:e})],r=t.getChild(e);let s;for(const{column:t,cell:e,isAnchor:a}of i)if(n.has(t)){const{cell:e,rowspan:i}=n.get(t),a=s?o.createPositionAfter(s):o.createPositionAt(r,0);o.move(o.createRangeOn(e),a),NA("rowspan",i,e,o),s=e}else a&&(s=e)}(t,s+1,n,e)}for(let n=s;n>=r;n--)e.remove(t.getChild(n));for(const{rowspan:t,cell:n}of o)NA("rowspan",t,n,e);!function(t,e,n,o){const i=t.getAttribute("headingRows")||0;if(e<i){NA("headingRows",n<i?i-(n-e+1):e,t,o,0)}}(t,r,s,e),r_(t,this)||s_(t,this)}))}removeColumns(t,e){const n=this.editor.model,o=e.at,i=e.columns||1,r=e.at+i-1;n.change((e=>{!function(t,e,n){const o=t.getAttribute("headingColumns")||0;if(o&&e.first<o){const i=Math.min(o-1,e.last)-e.first+1;n.setAttribute("headingColumns",o-i,t)}}(t,{first:o,last:r},e);for(let n=r;n>=o;n--)for(const{cell:o,column:i,cellWidth:r}of[...new WA(t)])i<=n&&r>1&&i+r>n?NA("colspan",r-1,o,e):i===n&&e.remove(o);s_(t,this)||r_(t,this)}))}splitCellVertically(t,e=2){const n=this.editor.model,o=t.parent.parent,i=parseInt(t.getAttribute("rowspan")||1),r=parseInt(t.getAttribute("colspan")||1);n.change((n=>{if(r>1){const{newCellsSpan:o,updatedSpan:s}=w_(r,e);NA("colspan",s,t,n);const a={};o>1&&(a.colspan=o),i>1&&(a.rowspan=i);k_(r>e?e-1:r-1,n,n.createPositionAfter(t),a)}if(r<e){const s=e-r,a=[...new WA(o)],{column:l}=a.find((({cell:e})=>e===t)),c=a.filter((({cell:e,cellWidth:n,column:o})=>e!==t&&o===l||o<l&&o+n>l));for(const{cell:t,cellWidth:e}of c)n.setAttribute("colspan",e+s,t);const d={};i>1&&(d.rowspan=i),k_(s,n,n.createPositionAfter(t),d);const h=o.getAttribute("headingColumns")||0;h>l&&NA("headingColumns",h+s,o,n)}}))}splitCellHorizontally(t,e=2){const n=this.editor.model,o=t.parent,i=o.parent,r=i.getChildIndex(o),s=parseInt(t.getAttribute("rowspan")||1),a=parseInt(t.getAttribute("colspan")||1);n.change((n=>{if(s>1){const o=[...new WA(i,{startRow:r,endRow:r+s-1,includeAllSlots:!0})],{newCellsSpan:l,updatedSpan:c}=w_(s,e);NA("rowspan",c,t,n);const{column:d}=o.find((({cell:e})=>e===t)),h={};l>1&&(h.rowspan=l),a>1&&(h.colspan=a);for(const t of o){const{column:e,row:o}=t,i=e===d,s=(o+r+c)%l==0;o>=r+c&&i&&s&&k_(1,n,t.getPositionBefore(),h)}}if(s<e){const o=e-s,l=[...new WA(i,{startRow:0,endRow:r})];for(const{cell:e,cellHeight:i,row:s}of l)if(e!==t&&s+i>r){const t=i+o;n.setAttribute("rowspan",t,e)}const c={};a>1&&(c.colspan=a),b_(n,i,r+1,o,1,c);const d=i.getAttribute("headingRows")||0;d>r&&NA("headingRows",d+o,i,n)}}))}getColumns(t){return[...t.getChild(0).getChildren()].reduce(((t,e)=>t+parseInt(e.getAttribute("colspan")||1)),0)}getRows(t){return Array.from(t.getChildren()).reduce(((t,e)=>e.is("element","tableRow")?t+1:t),0)}createTableWalker(t,e={}){return new WA(t,e)}getSelectedTableCells(t){const e=[];for(const n of this.sortRanges(t.getRanges())){const t=n.getContainedElement();t&&t.is("element","tableCell")&&e.push(t)}return e}getTableCellsContainingSelection(t){const e=[];for(const n of t.getRanges()){const t=n.start.findAncestor("tableCell");t&&e.push(t)}return e}getSelectionAffectedTableCells(t){const e=this.getSelectedTableCells(t);return e.length?e:this.getTableCellsContainingSelection(t)}getRowIndexes(t){const e=t.map((t=>t.parent.index));return this._getFirstLastIndexesObject(e)}getColumnIndexes(t){const e=t[0].findAncestor("table"),n=[...new WA(e)].filter((e=>t.includes(e.cell))).map((t=>t.column));return this._getFirstLastIndexesObject(n)}isSelectionRectangular(t){if(t.length<2||!this._areCellInTheSameTableSection(t))return!1;const e=new Set,n=new Set;let o=0;for(const i of t){const{row:t,column:r}=this.getCellLocation(i),s=parseInt(i.getAttribute("rowspan")||1),a=parseInt(i.getAttribute("colspan")||1);e.add(t),n.add(r),s>1&&e.add(t+s-1),a>1&&n.add(r+a-1),o+=s*a}const i=function(t,e){const n=Array.from(t.values()),o=Array.from(e.values()),i=Math.max(...n),r=Math.min(...n),s=Math.max(...o),a=Math.min(...o);return(i-r+1)*(s-a+1)}(e,n);return i==o}sortRanges(t){return Array.from(t).sort(C_)}_getFirstLastIndexesObject(t){const e=t.sort(((t,e)=>t-e));return{first:e[0],last:e[e.length-1]}}_areCellInTheSameTableSection(t){const e=t[0].findAncestor("table"),n=this.getRowIndexes(t),o=parseInt(e.getAttribute("headingRows")||0);if(!this._areIndexesInSameSection(n,o))return!1;const i=parseInt(e.getAttribute("headingColumns")||0),r=this.getColumnIndexes(t);return this._areIndexesInSameSection(r,i)}_areIndexesInSameSection({first:t,last:e},n){return t<n===e<n}}function b_(t,e,n,o,i,r={}){for(let s=0;s<o;s++){const o=t.createElement("tableRow");t.insert(o,e,n),k_(i,t,t.createPositionAt(o,"end"),r)}}function k_(t,e,n,o={}){for(let i=0;i<t;i++)MA(e,n,o)}function w_(t,e){if(t<e)return{newCellsSpan:1,updatedSpan:1};const n=Math.floor(t/e);return{newCellsSpan:n,updatedSpan:t-n*e+n}}function C_(t,e){const n=t.start,o=e.start;return n.isBefore(o)?-1:1}class A_ extends pe{refresh(){const t=this.editor.plugins.get(f_),e=t.getSelectedTableCells(this.editor.model.document.selection);this.isEnabled=t.isSelectionRectangular(e,this.editor.plugins.get(f_))}execute(){const t=this.editor.model,e=this.editor.plugins.get(f_);t.change((n=>{const o=e.getSelectedTableCells(t.document.selection),i=o.shift(),{mergeWidth:r,mergeHeight:s}=function(t,e,n){let o=0,i=0;for(const t of e){const{row:e,column:r}=n.getCellLocation(t);o=y_(t,r,o,"colspan"),i=y_(t,e,i,"rowspan")}const{row:r,column:s}=n.getCellLocation(t);return{mergeWidth:o-s,mergeHeight:i-r}}(i,o,e);NA("colspan",r,i,n),NA("rowspan",s,i,n);for(const t of o)__(t,i,n);a_(i.findAncestor("table"),e),n.setSelection(i,"in")}))}}function __(t,e,n){v_(t)||(v_(e)&&n.remove(n.createRangeIn(e)),n.move(n.createRangeIn(t),n.createPositionAt(e,"end"))),n.remove(t)}function v_(t){return 1==t.childCount&&t.getChild(0).is("element","paragraph")&&t.getChild(0).isEmpty}function y_(t,e,n,o){const i=parseInt(t.getAttribute(o)||1);return Math.max(n,e+i)}class x_ extends pe{constructor(t){super(t),this.affectsData=!1}refresh(){const t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=t.length>0}execute(){const t=this.editor.model,e=this.editor.plugins.get("TableUtils"),n=e.getSelectionAffectedTableCells(t.document.selection),o=e.getRowIndexes(n),i=n[0].findAncestor("table"),r=[];for(let e=o.first;e<=o.last;e++)for(const n of i.getChild(e).getChildren())r.push(t.createRangeOn(n));t.change((t=>{t.setSelection(r)}))}}class E_ extends pe{constructor(t){super(t),this.affectsData=!1}refresh(){const t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=t.length>0}execute(){const t=this.editor.plugins.get("TableUtils"),e=this.editor.model,n=t.getSelectionAffectedTableCells(e.document.selection),o=n[0],i=n.pop(),r=o.findAncestor("table"),s=t.getCellLocation(o),a=t.getCellLocation(i),l=Math.min(s.column,a.column),c=Math.max(s.column,a.column),d=[];for(const t of new WA(r,{startColumn:l,endColumn:c}))d.push(e.createRangeOn(t.cell));e.change((t=>{t.setSelection(d)}))}}function S_(t){t.document.registerPostFixer((e=>function(t,e){const n=e.document.differ.getChanges();let o=!1;const i=new Set;for(const e of n){let n;"table"==e.name&&"insert"==e.type&&(n=e.position.nodeAfter),"tableRow"!=e.name&&"tableCell"!=e.name||(n=e.position.findAncestor("table")),D_(e)&&(n=e.range.start.findAncestor("table")),n&&!i.has(n)&&(o=T_(n,t)||o,o=B_(n,t)||o,i.add(n))}return o}(e,t)))}function T_(t,e){let n=!1;const o=function(t){const e=parseInt(t.getAttribute("headingRows")||0),n=Array.from(t.getChildren()).reduce(((t,e)=>e.is("element","tableRow")?t+1:t),0),o=[];for(const{row:i,cell:r,cellHeight:s}of new WA(t)){if(s<2)continue;const t=i<e?e:n;if(i+s>t){const e=t-i;o.push({cell:r,rowspan:e})}}return o}(t);if(o.length){n=!0;for(const t of o)NA("rowspan",t.rowspan,t.cell,e,1)}return n}function B_(t,e){let n=!1;const o=function(t){const e=new Array(t.childCount).fill(0);for(const{rowIndex:n}of new WA(t,{includeAllSlots:!0}))e[n]++;return e}(t),i=[];for(const[e,n]of o.entries())!n&&t.getChild(e).is("element","tableRow")&&i.push(e);if(i.length){n=!0;for(const n of i.reverse())e.remove(t.getChild(n)),o.splice(n,1)}const r=o.filter(((e,n)=>t.getChild(n).is("element","tableRow"))),s=r[0];if(!r.every((t=>t===s))){const o=r.reduce(((t,e)=>e>t?e:t),0);for(const[i,s]of r.entries()){const r=o-s;if(r){for(let n=0;n<r;n++)MA(e,e.createPositionAt(t.getChild(i),"end"));n=!0}}}return n}function D_(t){const e="attribute"===t.type,n=t.attributeKey;return e&&("headingRows"===n||"colspan"===n||"rowspan"===n)}function I_(t){t.document.registerPostFixer((e=>function(t,e){const n=e.document.differ.getChanges();let o=!1;for(const e of n)"insert"==e.type&&"table"==e.name&&(o=P_(e.position.nodeAfter,t)||o),"insert"==e.type&&"tableRow"==e.name&&(o=z_(e.position.nodeAfter,t)||o),"insert"==e.type&&"tableCell"==e.name&&(o=R_(e.position.nodeAfter,t)||o),V_(e)&&(o=R_(e.position.parent,t)||o);return o}(e,t)))}function P_(t,e){let n=!1;for(const o of t.getChildren())o.is("element","tableRow")&&(n=z_(o,e)||n);return n}function z_(t,e){let n=!1;for(const o of t.getChildren())n=R_(o,e)||n;return n}function R_(t,e){if(0==t.childCount)return e.insertElement("paragraph",t),!0;const n=Array.from(t.getChildren()).filter((t=>t.is("$text")));for(const t of n)e.wrap(e.createRangeOn(t),"paragraph");return!!n.length}function V_(t){return!(!t.position||!t.position.parent.is("element","tableCell"))&&("insert"==t.type&&"$text"==t.name||"remove"==t.type)}function F_(t,e){if(!t.is("element","paragraph"))return!1;const n=e.toViewElement(t);return!!n&&KA(t)!==n.is("element","span")}var N_=n(3881),M_={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(N_.Z,M_);N_.Z.locals;class O_ extends ge{static get pluginName(){return"TableEditing"}static get requires(){return[f_]}init(){const t=this.editor,e=t.model,n=e.schema,o=t.conversion,i=t.plugins.get(f_);n.register("table",{allowWhere:"$block",allowAttributes:["headingRows","headingColumns"],isObject:!0,isBlock:!0}),n.register("tableRow",{allowIn:"table",isLimit:!0}),n.register("tableCell",{allowIn:"tableRow",allowChildren:"$block",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),o.for("upcast").add((t=>{t.on("element:figure",((t,e,n)=>{if(!n.consumable.test(e.viewItem,{name:!0,classes:"table"}))return;const o=function(t){for(const e of t.getChildren())if(e.is("element","table"))return e}(e.viewItem);if(!o||!n.consumable.test(o,{name:!0}))return;n.consumable.consume(e.viewItem,{name:!0,classes:"table"});const i=xa(n.convertItem(o,e.modelCursor).modelRange.getItems());i?(n.convertChildren(e.viewItem,n.writer.createPositionAt(i,"end")),n.updateConversionResult(i,e)):n.consumable.revert(e.viewItem,{name:!0,classes:"table"})}))})),o.for("upcast").add(LA()),o.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:jA(i,{asWidget:!0})}),o.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:jA(i)}),o.for("upcast").elementToElement({model:"tableRow",view:"tr"}),o.for("upcast").add((t=>{t.on("element:tr",((t,e)=>{e.viewItem.isEmpty&&0==e.modelCursor.index&&t.stop()}),{priority:"high"})})),o.for("downcast").elementToElement({model:"tableRow",view:(t,{writer:e})=>t.isEmpty?e.createEmptyElement("tr"):e.createContainerElement("tr")}),o.for("upcast").elementToElement({model:"tableCell",view:"td"}),o.for("upcast").elementToElement({model:"tableCell",view:"th"}),o.for("upcast").add(HA("td")),o.for("upcast").add(HA("th")),o.for("editingDowncast").elementToElement({model:"tableCell",view:$A({asWidget:!0})}),o.for("dataDowncast").elementToElement({model:"tableCell",view:$A()}),o.for("editingDowncast").elementToElement({model:"paragraph",view:GA({asWidget:!0}),converterPriority:"high"}),o.for("dataDowncast").elementToElement({model:"paragraph",view:GA(),converterPriority:"high"}),o.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),o.for("upcast").attributeToAttribute({model:{key:"colspan",value:L_("colspan")},view:"colspan"}),o.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),o.for("upcast").attributeToAttribute({model:{key:"rowspan",value:L_("rowspan")},view:"rowspan"}),t.data.mapper.on("modelToViewPosition",((t,e)=>{const n=e.modelPosition.parent,o=e.modelPosition.nodeBefore;if(!n.is("element","tableCell"))return;if(!o||!o.is("element","paragraph"))return;const i=e.mapper.toViewElement(o),r=e.mapper.toViewElement(n);i===r&&(e.viewPosition=e.mapper.findPositionIn(r,o.maxOffset))})),t.config.define("table.defaultHeadings.rows",0),t.config.define("table.defaultHeadings.columns",0),t.commands.add("insertTable",new ZA(t)),t.commands.add("insertTableRowAbove",new JA(t,{order:"above"})),t.commands.add("insertTableRowBelow",new JA(t,{order:"below"})),t.commands.add("insertTableColumnLeft",new YA(t,{order:"left"})),t.commands.add("insertTableColumnRight",new YA(t,{order:"right"})),t.commands.add("removeTableRow",new u_(t)),t.commands.add("removeTableColumn",new g_(t)),t.commands.add("splitTableCellVertically",new QA(t,{direction:"vertically"})),t.commands.add("splitTableCellHorizontally",new QA(t,{direction:"horizontally"})),t.commands.add("mergeTableCells",new A_(t)),t.commands.add("mergeTableCellRight",new d_(t,{direction:"right"})),t.commands.add("mergeTableCellLeft",new d_(t,{direction:"left"})),t.commands.add("mergeTableCellDown",new d_(t,{direction:"down"})),t.commands.add("mergeTableCellUp",new d_(t,{direction:"up"})),t.commands.add("setTableColumnHeader",new p_(t)),t.commands.add("setTableRowHeader",new m_(t)),t.commands.add("selectTableRow",new x_(t)),t.commands.add("selectTableColumn",new E_(t)),S_(e),I_(e),this.listenTo(e.document,"change:data",(()=>{!function(t,e){const n=t.document.differ;for(const t of n.getChanges()){let n,o=!1;if("attribute"==t.type){const e=t.range.start.nodeAfter;if(!e||!e.is("element","table"))continue;if("headingRows"!=t.attributeKey&&"headingColumns"!=t.attributeKey)continue;n=e,o="headingRows"==t.attributeKey}else"tableRow"!=t.name&&"tableCell"!=t.name||(n=t.position.findAncestor("table"),o="tableRow"==t.name);if(!n)continue;const i=n.getAttribute("headingRows")||0,r=n.getAttribute("headingColumns")||0,s=new WA(n);for(const t of s){const n=t.row<i||t.column<r?"th":"td",s=e.mapper.toViewElement(t.cell);s&&s.is("element")&&s.name!=n&&e.reconvertItem(o?t.cell.parent:t.cell)}}}(e,t.editing),function(t,e){const n=t.document.differ,o=new Set;for(const t of n.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","tableCell")&&o.add(e)}for(const t of o.values()){const n=Array.from(t.getChildren()).filter((t=>F_(t,e.mapper)));for(const t of n)e.reconvertItem(t)}}(e,t.editing)}))}}function L_(t){return e=>{const n=parseInt(e.getAttribute(t));return Number.isNaN(n)||n<=0?null:n}}var H_=n(1613),q_={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(H_.Z,q_);H_.Z.locals;class W_ extends Wd{constructor(t){super(t);const e=this.bindTemplate;this.items=this._createGridCollection(),this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",((t,e)=>`${e} × ${t}`)),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"[email protected]":e.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck-insert-table-dropdown__label"]},children:[{text:e.to("label")}]}],on:{mousedown:e.to((t=>{t.preventDefault()})),click:e.to((()=>{this.fire("execute")}))}}),this.on("boxover",((t,e)=>{const{row:n,column:o}=e.target.dataset;this.set({rows:parseInt(n),columns:parseInt(o)})})),this.on("change:columns",(()=>{this._highlightGridBoxes()})),this.on("change:rows",(()=>{this._highlightGridBoxes()}))}focus(){}focusLast(){}_highlightGridBoxes(){const t=this.rows,e=this.columns;this.items.map(((n,o)=>{const i=Math.floor(o/10)<t&&o%10<e;n.set("isOn",i)}))}_createGridCollection(){const t=[];for(let e=0;e<100;e++){const n=Math.floor(e/10),o=e%10;t.push(new U_(this.locale,n+1,o+1))}return this.createCollection(t)}}class U_ extends Wd{constructor(t,e,n){super(t);const o=this.bindTemplate;this.set("isOn",!1),this.setTemplate({tag:"div",attributes:{class:["ck-insert-table-dropdown-grid-box",o.if("isOn","ck-on")],"data-row":e,"data-column":n}})}}class j_ extends ge{static get pluginName(){return"TableUI"}init(){const t=this.editor,e=this.editor.t,n="ltr"===t.locale.contentLanguageDirection;t.ui.componentFactory.add("insertTable",(n=>{const o=t.commands.get("insertTable"),i=lu(n);let r;return i.bind("isEnabled").to(o),i.buttonView.set({icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 6v3h4V6H3zm0 4v3h4v-3H3zm0 4v3h4v-3H3zm5 3h4v-3H8v3zm5 0h4v-3h-4v3zm4-4v-3h-4v3h4zm0-4V6h-4v3h4zm1.5 8a1.5 1.5 0 0 1-1.5 1.5H3A1.5 1.5 0 0 1 1.5 17V4c.222-.863 1.068-1.5 2-1.5h13c.932 0 1.778.637 2 1.5v13zM12 13v-3H8v3h4zm0-4V6H8v3h4z"/></svg>',label:e("Insert table"),tooltip:!0}),i.on("change:isOpen",(()=>{r||(r=new W_(n),i.panelView.children.add(r),r.delegate("execute").to(i),i.buttonView.on("open",(()=>{r.rows=0,r.columns=0})),i.on("execute",(()=>{t.execute("insertTable",{rows:r.rows,columns:r.columns}),t.editing.view.focus()})))})),i})),t.ui.componentFactory.add("tableColumn",(t=>{const o=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:e("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:n?"insertTableColumnLeft":"insertTableColumnRight",label:e("Insert column left")}},{type:"button",model:{commandName:n?"insertTableColumnRight":"insertTableColumnLeft",label:e("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:e("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:e("Select column")}}];return this._prepareDropdown(e("Column"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M18 7v1H2V7h16zm0 5v1H2v-1h16z" opacity=".6"/><path d="M14 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1zm-2 1H8v4h4V2zm0 6H8v4h4V8zm0 6H8v4h4v-4z"/></svg>',o,t)})),t.ui.componentFactory.add("tableRow",(t=>{const n=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:e("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:e("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:e("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:e("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:e("Select row")}}];return this._prepareDropdown(e("Row"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v16h-1V2z" opacity=".6"/><path d="M1 6h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm1 2v4h4V8H2zm6 0v4h4V8H8zm6 0v4h4V8h-4z"/></svg>',n,t)})),t.ui.componentFactory.add("mergeTableCells",(t=>{const o=[{type:"button",model:{commandName:"mergeTableCellUp",label:e("Merge cell up")}},{type:"button",model:{commandName:n?"mergeTableCellRight":"mergeTableCellLeft",label:e("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:e("Merge cell down")}},{type:"button",model:{commandName:n?"mergeTableCellLeft":"mergeTableCellRight",label:e("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:e("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:e("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(e("Merge cells"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v7h-1V2zm6 5v1H2V7h16zM8 12v1H2v-1h6z" opacity=".6"/><path d="M7 7h12a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm1 2v9h10V9H8z"/></svg>',o,t)}))}_prepareDropdown(t,e,n,o){const i=this.editor,r=lu(o),s=this._fillDropdownWithListOptions(r,n);return r.buttonView.set({label:t,icon:e,tooltip:!0}),r.bind("isEnabled").toMany(s,"isEnabled",((...t)=>t.some((t=>t)))),this.listenTo(r,"execute",(t=>{i.execute(t.source.commandName),i.editing.view.focus()})),r}_prepareMergeSplitButtonDropdown(t,e,n,o){const i=this.editor,r=lu(o,Fh),s="mergeTableCells",a=i.commands.get(s),l=this._fillDropdownWithListOptions(r,n);return r.buttonView.set({label:t,icon:e,tooltip:!0,isEnabled:!0}),r.bind("isEnabled").toMany([a,...l],"isEnabled",((...t)=>t.some((t=>t)))),this.listenTo(r.buttonView,"execute",(()=>{i.execute(s),i.editing.view.focus()})),this.listenTo(r,"execute",(t=>{i.execute(t.source.commandName),i.editing.view.focus()})),r}_fillDropdownWithListOptions(t,e){const n=this.editor,o=[],i=new Bo;for(const t of e)$_(t,n,o,i);return du(t,i,n.ui.componentFactory),o}}function $_(t,e,n,o){const i=t.model=new Ru(t.model),{commandName:r,bindIsOn:s}=t.model;if("button"===t.type||"switchbutton"===t.type){const t=e.commands.get(r);n.push(t),i.set({commandName:r}),i.bind("isEnabled").to(t),s&&i.bind("isOn").to(t,"value")}i.set({withText:!0}),o.add(t)}var G_=n(6945),K_={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(G_.Z,K_);G_.Z.locals;class Z_ extends ge{static get pluginName(){return"TableSelection"}static get requires(){return[f_,f_]}init(){const t=this.editor.model;this.listenTo(t,"deleteContent",((t,e)=>this._handleDeleteContent(t,e)),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const t=this.editor.plugins.get(f_),e=this.editor.model.document.selection,n=t.getSelectedTableCells(e);return 0==n.length?null:n}getSelectionAsFragment(){const t=this.editor.plugins.get(f_),e=this.getSelectedTableCells();return e?this.editor.model.change((n=>{const o=n.createDocumentFragment(),{first:i,last:r}=t.getColumnIndexes(e),{first:s,last:a}=t.getRowIndexes(e),l=e[0].findAncestor("table");let c=a,d=r;if(t.isSelectionRectangular(e)){const t={firstColumn:i,lastColumn:r,firstRow:s,lastRow:a};c=l_(l,t),d=c_(l,t)}const h=XA(l,{startRow:s,startColumn:i,endRow:c,endColumn:d},n);return n.insert(h,o,0),o})):null}setCellSelection(t,e){const n=this._getCellsToSelect(t,e);this.editor.model.change((t=>{t.setSelection(n.cells.map((e=>t.createRangeOn(e))),{backward:n.backward})}))}getFocusCell(){const t=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return t&&t.is("element","tableCell")?t:null}getAnchorCell(){const t=xa(this.editor.model.document.selection.getRanges()).getContainedElement();return t&&t.is("element","tableCell")?t:null}_defineSelectionConverter(){const t=this.editor,e=new Set;t.conversion.for("editingDowncast").add((t=>t.on("selection",((t,n,o)=>{const i=o.writer;!function(t){for(const n of e)t.removeClass("ck-editor__editable_selected",n);e.clear()}(i);const r=this.getSelectedTableCells();if(!r)return;for(const t of r){const n=o.mapper.toViewElement(t);i.addClass("ck-editor__editable_selected",n),e.add(n)}const s=o.mapper.toViewElement(r[r.length-1]);i.setSelection(s,0)}),{priority:"lowest"})))}_enablePluginDisabling(){const t=this.editor;this.on("change:isEnabled",(()=>{if(!this.isEnabled){const e=this.getSelectedTableCells();if(!e)return;t.model.change((n=>{const o=n.createPositionAt(e[0],0),i=t.model.schema.getNearestSelectionRange(o);n.setSelection(i)}))}}))}_handleDeleteContent(t,e){const n=this.editor.plugins.get(f_),[o,i]=e,r=this.editor.model,s=!i||"backward"==i.direction,a=n.getSelectedTableCells(o);a.length&&(t.stop(),r.change((t=>{const e=a[s?a.length-1:0];r.change((t=>{for(const e of a)r.deleteContent(t.createSelection(e,"in"))}));const n=r.schema.getNearestSelectionRange(t.createPositionAt(e,0));o.is("documentSelection")?t.setSelection(n):o.setTo(n)})))}_getCellsToSelect(t,e){const n=this.editor.plugins.get("TableUtils"),o=n.getCellLocation(t),i=n.getCellLocation(e),r=Math.min(o.row,i.row),s=Math.max(o.row,i.row),a=Math.min(o.column,i.column),l=Math.max(o.column,i.column),c=new Array(s-r+1).fill(null).map((()=>[])),d={startRow:r,endRow:s,startColumn:a,endColumn:l};for(const{row:e,cell:n}of new WA(t.findAncestor("table"),d))c[e-r].push(n);const h=i.row<o.row,u=i.column<o.column;return h&&c.reverse(),u&&c.forEach((t=>t.reverse())),{cells:c.flat(),backward:h||u}}}class J_ extends ge{static get pluginName(){return"TableClipboard"}static get requires(){return[Z_,f_]}init(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"copy",((t,e)=>this._onCopyCut(t,e))),this.listenTo(e,"cut",((t,e)=>this._onCopyCut(t,e))),this.listenTo(t.model,"insertContent",((t,e)=>this._onInsertContent(t,...e)),{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(t,e){const n=this.editor.plugins.get(Z_);if(!n.getSelectedTableCells())return;if("cut"==t.name&&this.editor.isReadOnly)return;e.preventDefault(),t.stop();const o=this.editor.data,i=this.editor.editing.view.document,r=o.toView(n.getSelectionAsFragment());i.fire("clipboardOutput",{dataTransfer:e.dataTransfer,content:r,method:t.name})}_onInsertContent(t,e,n){if(n&&!n.is("documentSelection"))return;const o=this.editor.model,i=this.editor.plugins.get(f_);let r=Y_(e,o);if(!r)return;const s=i.getSelectionAffectedTableCells(o.document.selection);s.length?(t.stop(),o.change((t=>{const e={width:i.getColumns(r),height:i.getRows(r)},n=function(t,e,n,o){const i=t[0].findAncestor("table"),r=o.getColumnIndexes(t),s=o.getRowIndexes(t),a={firstColumn:r.first,lastColumn:r.last,firstRow:s.first,lastRow:s.last},l=1===t.length;l&&(a.lastRow+=e.height-1,a.lastColumn+=e.width-1,function(t,e,n,o){const i=o.getColumns(t),r=o.getRows(t);n>i&&o.insertColumns(t,{at:i,columns:n-i});e>r&&o.insertRows(t,{at:r,rows:e-r})}(i,a.lastRow+1,a.lastColumn+1,o));l||!o.isSelectionRectangular(t)?function(t,e,n){const{firstRow:o,lastRow:i,firstColumn:r,lastColumn:s}=e,a={first:o,last:i},l={first:r,last:s};X_(t,r,a,n),X_(t,s+1,a,n),Q_(t,o,l,n),Q_(t,i+1,l,n,o)}(i,a,n):(a.lastRow=l_(i,a),a.lastColumn=c_(i,a));return a}(s,e,t,i),o=n.lastRow-n.firstRow+1,a=n.lastColumn-n.firstColumn+1,l={startRow:0,startColumn:0,endRow:Math.min(o,e.height)-1,endColumn:Math.min(a,e.width)-1};r=XA(r,l,t);const c=s[0].findAncestor("table"),d=this._replaceSelectedCellsWithPasted(r,e,c,n,t);if(this.editor.plugins.get("TableSelection").isEnabled){const e=i.sortRanges(d.map((e=>t.createRangeOn(e))));t.setSelection(e)}else t.setSelection(d[0],0)}))):a_(r,i)}_replaceSelectedCellsWithPasted(t,e,n,o,i){const{width:r,height:s}=e,a=function(t,e,n){const o=new Array(n).fill(null).map((()=>new Array(e).fill(null)));for(const{column:e,row:n,cell:i}of new WA(t))o[n][e]=i;return o}(t,r,s),l=[...new WA(n,{startRow:o.firstRow,endRow:o.lastRow,startColumn:o.firstColumn,endColumn:o.lastColumn,includeAllSlots:!0})],c=[];let d;for(const t of l){const{row:e,column:n}=t;n===o.firstColumn&&(d=t.getPositionBefore());const l=e-o.firstRow,h=n-o.firstColumn,u=a[l%s][h%r],g=u?i.cloneElement(u):null,m=this._replaceTableSlotCell(t,g,d,i);m&&(i_(m,e,n,o.lastRow,o.lastColumn,i),c.push(m),d=i.createPositionAfter(m))}const h=parseInt(n.getAttribute("headingRows")||0),u=parseInt(n.getAttribute("headingColumns")||0),g=o.firstRow<h&&h<=o.lastRow,m=o.firstColumn<u&&u<=o.lastColumn;if(g){const t=Q_(n,h,{first:o.firstColumn,last:o.lastColumn},i,o.firstRow);c.push(...t)}if(m){const t=X_(n,u,{first:o.firstRow,last:o.lastRow},i);c.push(...t)}return c}_replaceTableSlotCell(t,e,n,o){const{cell:i,isAnchor:r}=t;return r&&o.remove(i),e?(o.insert(e,n),e):null}getTableIfOnlyTableInContent(t,e){return Y_(t,e)}}function Y_(t,e){if(!t.is("documentFragment")&&!t.is("element"))return null;if(t.is("element","table"))return t;if(1==t.childCount&&t.getChild(0).is("element","table"))return t.getChild(0);const n=e.createRangeIn(t);for(const t of n.getItems())if(t.is("element","table")){const o=e.createRange(n.start,e.createPositionBefore(t));if(e.hasContent(o,{ignoreWhitespaces:!0}))return null;const i=e.createRange(e.createPositionAfter(t),n.end);return e.hasContent(i,{ignoreWhitespaces:!0})?null:t}return null}function Q_(t,e,n,o,i=0){if(e<1)return;return t_(t,e,i).filter((({column:t,cellWidth:e})=>tv(t,e,n))).map((({cell:t})=>e_(t,e,o)))}function X_(t,e,n,o){if(e<1)return;return n_(t,e).filter((({row:t,cellHeight:e})=>tv(t,e,n))).map((({cell:t,column:n})=>o_(t,n,e,o)))}function tv(t,e,n){const o=t+e-1,{first:i,last:r}=n;return t>=i&&t<=r||t<i&&o>=i}class ev extends ge{static get pluginName(){return"TableKeyboard"}static get requires(){return[Z_,f_]}init(){const t=this.editor.editing.view.document;this.editor.keystrokes.set("Tab",((...t)=>this._handleTabOnSelectedTable(...t)),{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,"arrowKey",((...t)=>this._onArrowKey(...t)),{context:"table"})}_handleTabOnSelectedTable(t,e){const n=this.editor,o=n.model.document.selection.getSelectedElement();o&&o.is("element","table")&&(e(),n.model.change((t=>{t.setSelection(t.createRangeIn(o.getChild(0).getChild(0)))})))}_getTabHandler(t){const e=this.editor,n=this.editor.plugins.get(f_);return(o,i)=>{const r=e.model.document.selection;let s=n.getTableCellsContainingSelection(r)[0];if(s||(s=this.editor.plugins.get("TableSelection").getFocusCell()),!s)return;i();const a=s.parent,l=a.parent,c=l.getChildIndex(a),d=a.getChildIndex(s),h=0===d;if(!t&&h&&0===c)return void e.model.change((t=>{t.setSelection(t.createRangeOn(l))}));const u=d===a.childCount-1,g=c===n.getRows(l)-1;if(t&&g&&u&&(e.execute("insertTableRowBelow"),c===n.getRows(l)-1))return void e.model.change((t=>{t.setSelection(t.createRangeOn(l))}));let m;if(t&&u){const t=l.getChild(c+1);m=t.getChild(0)}else if(!t&&h){const t=l.getChild(c-1);m=t.getChild(t.childCount-1)}else m=a.getChild(d+(t?1:-1));e.model.change((t=>{t.setSelection(t.createRangeIn(m))}))}}_onArrowKey(t,e){const n=this.editor,o=fr(e.keyCode,n.locale.contentLanguageDirection);this._handleArrowKeys(o,e.shiftKey)&&(e.preventDefault(),e.stopPropagation(),t.stop())}_handleArrowKeys(t,e){const n=this.editor.plugins.get(f_),o=this.editor.model,i=o.document.selection,r=["right","down"].includes(t),s=n.getSelectedTableCells(i);if(s.length){let n;return n=e?this.editor.plugins.get("TableSelection").getFocusCell():r?s[s.length-1]:s[0],this._navigateFromCellInDirection(n,t,e),!0}const a=i.focus.findAncestor("tableCell");if(!a)return!1;if(!i.isCollapsed)if(e){if(i.isBackward==r&&!i.containsEntireContent(a))return!1}else{const t=i.getSelectedElement();if(!t||!o.schema.isObject(t))return!1}return!!this._isSelectionAtCellEdge(i,a,r)&&(this._navigateFromCellInDirection(a,t,e),!0)}_isSelectionAtCellEdge(t,e,n){const o=this.editor.model,i=this.editor.model.schema,r=n?t.getLastPosition():t.getFirstPosition();if(!i.getLimitElement(r).is("element","tableCell")){return o.createPositionAt(e,n?"end":0).isTouching(r)}const s=o.createSelection(r);return o.modifySelection(s,{direction:n?"forward":"backward"}),r.isEqual(s.focus)}_navigateFromCellInDirection(t,e,n=!1){const o=this.editor.model,i=t.findAncestor("table"),r=[...new WA(i,{includeAllSlots:!0})],{row:s,column:a}=r[r.length-1],l=r.find((({cell:e})=>e==t));let{row:c,column:d}=l;switch(e){case"left":d--;break;case"up":c--;break;case"right":d+=l.cellWidth;break;case"down":c+=l.cellHeight}if(c<0||c>s||d<0&&c<=0||d>a&&c>=s)return void o.change((t=>{t.setSelection(t.createRangeOn(i))}));d<0?(d=n?0:a,c--):d>a&&(d=n?a:0,c++);const h=r.find((t=>t.row==c&&t.column==d)).cell,u=["right","down"].includes(e),g=this.editor.plugins.get("TableSelection");if(n&&g.isEnabled){const e=g.getAnchorCell()||t;g.setCellSelection(e,h)}else{const t=o.createPositionAt(h,u?0:"end");o.change((e=>{e.setSelection(t)}))}}}class nv extends Gs{constructor(t){super(t),this.domEventType=["mousemove","mouseleave"]}onDomEvent(t){this.fire(t.type,t)}}class ov extends ge{static get pluginName(){return"TableMouse"}static get requires(){return[Z_,f_]}init(){this.editor.editing.view.addObserver(nv),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const t=this.editor,e=t.plugins.get(f_);let n=!1;const o=t.plugins.get(Z_);this.listenTo(t.editing.view.document,"mousedown",((i,r)=>{const s=t.model.document.selection;if(!this.isEnabled||!o.isEnabled)return;if(!r.domEvent.shiftKey)return;const a=o.getAnchorCell()||e.getTableCellsContainingSelection(s)[0];if(!a)return;const l=this._getModelTableCellFromDomEvent(r);l&&iv(a,l)&&(n=!0,o.setCellSelection(a,l),r.preventDefault())})),this.listenTo(t.editing.view.document,"mouseup",(()=>{n=!1})),this.listenTo(t.editing.view.document,"selectionChange",(t=>{n&&t.stop()}),{priority:"highest"})}_enableMouseDragSelection(){const t=this.editor;let e,n,o=!1,i=!1;const r=t.plugins.get(Z_);this.listenTo(t.editing.view.document,"mousedown",((t,n)=>{this.isEnabled&&r.isEnabled&&(n.domEvent.shiftKey||n.domEvent.ctrlKey||n.domEvent.altKey||(e=this._getModelTableCellFromDomEvent(n)))})),this.listenTo(t.editing.view.document,"mousemove",((t,s)=>{if(!s.domEvent.buttons)return;if(!e)return;const a=this._getModelTableCellFromDomEvent(s);a&&iv(e,a)&&(n=a,o||n==e||(o=!0)),o&&(i=!0,r.setCellSelection(e,n),s.preventDefault())})),this.listenTo(t.editing.view.document,"mouseup",(()=>{o=!1,i=!1,e=null,n=null})),this.listenTo(t.editing.view.document,"selectionChange",(t=>{i&&t.stop()}),{priority:"highest"})}_getModelTableCellFromDomEvent(t){const e=t.target,n=this.editor.editing.view.createPositionAt(e,0);return this.editor.editing.mapper.toModelPosition(n).parent.findAncestor("tableCell",{includeSelf:!0})}}function iv(t,e){return t.parent.parent==e.parent.parent}var rv=n(6306),sv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(rv.Z,sv);rv.Z.locals;function av(t){const e=t.getSelectedElement();return e&&cv(e)?e:null}function lv(t){let e=t.getFirstPosition().parent;for(;e;){if(e.is("element")&&cv(e))return e;e=e.parent}return null}function cv(t){return!!t.getCustomProperty("table")&&Uf(t)}function dv(t,e){const{viewElement:n,defaultValue:o,modelAttribute:i,styleName:r,reduceBoxSides:s=!1}=e;t.for("upcast").attributeToAttribute({view:{name:n,styles:{[r]:/[\s\S]+/}},model:{key:i,value:t=>{const e=t.getNormalizedStyle(r),n=s?mv(e):e;if(o!==n)return n}}})}function hv(t,e,n,o){t.for("upcast").add((t=>t.on("element:"+e,((t,e,i)=>{if(!e.modelRange)return;const r=["border-top-width","border-top-color","border-top-style","border-bottom-width","border-bottom-color","border-bottom-style","border-right-width","border-right-color","border-right-style","border-left-width","border-left-color","border-left-style"].filter((t=>e.viewItem.hasStyle(t)));if(!r.length)return;const s={styles:r};if(!i.consumable.test(e.viewItem,s))return;const a=[...e.modelRange.getItems({shallow:!0})].pop();i.consumable.consume(e.viewItem,s);const l={style:e.viewItem.getNormalizedStyle("border-style"),color:e.viewItem.getNormalizedStyle("border-color"),width:e.viewItem.getNormalizedStyle("border-width")},c={style:mv(l.style),color:mv(l.color),width:mv(l.width)};c.style!==o.style&&i.writer.setAttribute(n.style,c.style,a),c.color!==o.color&&i.writer.setAttribute(n.color,c.color,a),c.width!==o.width&&i.writer.setAttribute(n.width,c.width,a)}))))}function uv(t,{modelElement:e,modelAttribute:n,styleName:o}){t.for("downcast").attributeToAttribute({model:{name:e,key:n},view:t=>({key:"style",value:{[o]:t}})})}function gv(t,{modelAttribute:e,styleName:n}){t.for("downcast").add((t=>t.on(`attribute:${e}:table`,((t,e,o)=>{const{item:i,attributeNewValue:r}=e,{mapper:s,writer:a}=o;if(!o.consumable.consume(e.item,t.name))return;const l=[...s.toViewElement(i).getChildren()].find((t=>t.is("element","table")));r?a.setStyle(n,r,l):a.removeStyle(n,l)}))))}function mv(t){if(!t)return;return["top","right","bottom","left"].map((e=>t[e])).reduce(((t,e)=>t==e?t:null))||t}class pv extends pe{constructor(t,e,n){super(t),this.attributeName=e,this._defaultValue=n}refresh(){const t=this.editor.model.document.selection.getFirstPosition().findAncestor("table");this.isEnabled=!!t,this.value=this._getValue(t)}execute(t={}){const e=this.editor.model,n=e.document.selection,{value:o,batch:i}=t,r=n.getFirstPosition().findAncestor("table"),s=this._getValueToSet(o);e.enqueueChange(i,(t=>{s?t.setAttribute(this.attributeName,s,r):t.removeAttribute(this.attributeName,r)}))}_getValue(t){if(!t)return;const e=t.getAttribute(this.attributeName);return e!==this._defaultValue?e:void 0}_getValueToSet(t){if(t!==this._defaultValue)return t}}class fv extends pv{constructor(t,e){super(t,"tableBackgroundColor",e)}}function bv(t){if(!t||!y(t))return t;const{top:e,right:n,bottom:o,left:i}=t;return e==n&&n==o&&o==i?e:void 0}function kv(t,e){const n=parseFloat(t);return Number.isNaN(n)||String(n)!==String(t)?t:`${n}${e}`}function wv(t,e={}){const n=Object.assign({borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:""},t);return e.includeAlignmentProperty&&!n.alignment&&(n.alignment="center"),e.includePaddingProperty&&!n.padding&&(n.padding=""),e.includeVerticalAlignmentProperty&&!n.verticalAlignment&&(n.verticalAlignment="middle"),e.includeHorizontalAlignmentProperty&&!n.horizontalAlignment&&(n.horizontalAlignment=e.isRightToLeftContent?"right":"left"),n}class Cv extends pv{constructor(t,e){super(t,"tableBorderColor",e)}_getValue(t){if(!t)return;const e=bv(t.getAttribute(this.attributeName));return e!==this._defaultValue?e:void 0}}class Av extends pv{constructor(t,e){super(t,"tableBorderStyle",e)}_getValue(t){if(!t)return;const e=bv(t.getAttribute(this.attributeName));return e!==this._defaultValue?e:void 0}}class _v extends pv{constructor(t,e){super(t,"tableBorderWidth",e)}_getValue(t){if(!t)return;const e=bv(t.getAttribute(this.attributeName));return e!==this._defaultValue?e:void 0}_getValueToSet(t){if((t=kv(t,"px"))!==this._defaultValue)return t}}class vv extends pv{constructor(t,e){super(t,"tableWidth",e)}_getValueToSet(t){if((t=kv(t,"px"))!==this._defaultValue)return t}}class yv extends pv{constructor(t,e){super(t,"tableHeight",e)}_getValueToSet(t){return(t=kv(t,"px"))===this._defaultValue?null:t}}class xv extends pv{constructor(t,e){super(t,"tableAlignment",e)}}const Ev=/^(left|center|right)$/,Sv=/^(left|none|right)$/;class Tv extends ge{static get pluginName(){return"TablePropertiesEditing"}static get requires(){return[O_]}init(){const t=this.editor,e=t.model.schema,n=t.conversion;t.config.define("table.tableProperties.defaultProperties",{});const o=wv(t.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0});t.data.addStyleProcessorRules(nm),function(t,e,n){const o={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};t.extend("table",{allowAttributes:Object.values(o)}),hv(e,"table",o,n),gv(e,{modelAttribute:o.color,styleName:"border-color"}),gv(e,{modelAttribute:o.style,styleName:"border-style"}),gv(e,{modelAttribute:o.width,styleName:"border-width"})}(e,n,{color:o.borderColor,style:o.borderStyle,width:o.borderWidth}),t.commands.add("tableBorderColor",new Cv(t,o.borderColor)),t.commands.add("tableBorderStyle",new Av(t,o.borderStyle)),t.commands.add("tableBorderWidth",new _v(t,o.borderWidth)),function(t,e,n){t.extend("table",{allowAttributes:["tableAlignment"]}),e.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment"},view:t=>({key:"style",value:{float:"center"===t?"none":t}}),converterPriority:"high"}),e.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:Sv}},model:{key:"tableAlignment",value:t=>{let e=t.getStyle("float");return"none"===e&&(e="center"),e===n?null:e}}}).attributeToAttribute({view:{attributes:{align:Ev}},model:{name:"table",key:"tableAlignment",value:t=>{const e=t.getAttribute("align");return e===n?null:e}}})}(e,n,o.alignment),t.commands.add("tableAlignment",new xv(t,o.alignment)),Bv(e,n,{modelAttribute:"tableWidth",styleName:"width",defaultValue:o.width}),t.commands.add("tableWidth",new vv(t,o.width)),Bv(e,n,{modelAttribute:"tableHeight",styleName:"height",defaultValue:o.height}),t.commands.add("tableHeight",new yv(t,o.height)),t.data.addStyleProcessorRules(tm),function(t,e,n){const{modelAttribute:o}=n;t.extend("table",{allowAttributes:[o]}),dv(e,{viewElement:"table",...n}),gv(e,n)}(e,n,{modelAttribute:"tableBackgroundColor",styleName:"background-color",defaultValue:o.backgroundColor}),t.commands.add("tableBackgroundColor",new fv(t,o.backgroundColor))}}function Bv(t,e,n){const{modelAttribute:o}=n;t.extend("table",{allowAttributes:[o]}),dv(e,{viewElement:/^(table|figure)$/,...n}),uv(e,{modelElement:"table",...n})}var Dv=n(7368),Iv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Dv.Z,Iv);Dv.Z.locals;class Pv extends Wd{constructor(t,e){super(t);const n=this.bindTemplate;this.set("value",""),this.set("id"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("isFocused",!1),this.set("isEmpty",!0),this.set("ariaDescribedById"),this.options=e,this._dropdownView=this._createDropdownView(),this._inputView=this._createInputTextView(),this._stillTyping=!1,this.setTemplate({tag:"div",attributes:{class:["ck","ck-input-color",n.if("hasError","ck-error")],id:n.to("id"),"aria-invalid":n.if("hasError",!0),"aria-describedby":n.to("ariaDescribedById")},children:[this._dropdownView,this._inputView]}),this.on("change:value",((t,e,n)=>this._setInputValue(n)))}focus(){this._inputView.focus()}_createDropdownView(){const t=this.locale,e=t.t,n=this.bindTemplate,o=this._createColorGrid(t),i=lu(t),r=new Wd,s=this._createRemoveColorButton();return r.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:n.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",n.if("value","ck-hidden",(t=>""!=t))]}}]}),i.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),i.buttonView.children.add(r),i.buttonView.tooltip=e("Color picker"),i.panelPosition="rtl"===t.uiLanguageDirection?"se":"sw",i.panelView.children.add(s),i.panelView.children.add(o),i.bind("isEnabled").to(this,"isReadOnly",(t=>!t)),i}_createInputTextView(){const t=this.locale,e=new xu(t);return e.extendTemplate({on:{blur:e.bindTemplate.to("blur")}}),e.value=this.value,e.bind("isReadOnly","hasError").to(this),this.bind("isFocused","isEmpty").to(e),e.on("input",(()=>{const t=e.element.value,n=this.options.colorDefinitions.find((e=>t===e.label));this._stillTyping=!0,this.value=n&&n.color||t})),e.on("blur",(()=>{this._stillTyping=!1,this._setInputValue(e.element.value)})),e.delegate("input").to(this),e}_createRemoveColorButton(){const t=this.locale,e=t.t,n=new wh(t),o=this.options.defaultColorValue||"",i=e(o?"Restore default":"Remove color");return n.class="ck-input-color__remove-color",n.withText=!0,n.icon=Fd.eraser,n.label=i,n.on("execute",(()=>{this.value=o,this._dropdownView.isOpen=!1,this.fire("input")})),n}_createColorGrid(t){const e=new Ih(t,{colorDefinitions:this.options.colorDefinitions,columns:this.options.columns});return e.on("execute",((t,e)=>{this.value=e.value,this._dropdownView.isOpen=!1,this.fire("input")})),e.bind("selectedColor").to(this,"value"),e}_setInputValue(t){if(!this._stillTyping){const e=zv(t),n=this.options.colorDefinitions.find((t=>e===zv(t.color)));this._inputView.value=n?n.label:t||""}}}function zv(t){return t.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const Rv=t=>""===t;function Vv(t){return{none:t("None"),solid:t("Solid"),dotted:t("Dotted"),dashed:t("Dashed"),double:t("Double"),groove:t("Groove"),ridge:t("Ridge"),inset:t("Inset"),outset:t("Outset")}}function Fv(t){return t('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function Nv(t){return t('The value is invalid. Try "10px" or "2em" or simply "2".')}function Mv(t){return t=t.trim(),Rv(t)||Vg(t)}function Ov(t){return t=t.trim(),Rv(t)||jv(t)||Og(t)||Hg(t)}function Lv(t){return t=t.trim(),Rv(t)||jv(t)||Og(t)}function Hv(t,e){const n=new Bo,o=Vv(t.t);for(const i in o){const r={type:"button",model:new Ru({_borderStyleValue:i,label:o[i],withText:!0})};"none"===i?r.model.bind("isOn").to(t,"borderStyle",(t=>"none"===e?!t:t===i)):r.model.bind("isOn").to(t,"borderStyle",(t=>t===i)),n.add(r)}return n}function qv(t){const{view:e,icons:n,toolbar:o,labels:i,propertyName:r,nameToValue:s,defaultValue:a}=t;for(const t in i){const l=new wh(e.locale);l.set({label:i[t],icon:n[t],tooltip:i[t]});const c=s?s(t):t;l.bind("isOn").to(e,r,(t=>{let e=t;return""===t&&a&&(e=a),c===e})),l.on("execute",(()=>{e[r]=c})),o.items.add(l)}}const Wv=[{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"}];function Uv(t){return(e,n,o)=>{const i=new Pv(e.locale,{colorDefinitions:(r=t.colorConfig,r.map((t=>({color:t.model,label:t.label,options:{hasBorder:t.hasBorder}})))),columns:t.columns,defaultColorValue:t.defaultColorValue});var r;return i.set({id:n,ariaDescribedById:o}),i.bind("isReadOnly").to(e,"isEnabled",(t=>!t)),i.bind("hasError").to(e,"errorText",(t=>!!t)),i.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused").to(i),i}}function jv(t){const e=parseFloat(t);return!Number.isNaN(e)&&t===String(e)}var $v=n(9247),Gv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()($v.Z,Gv);$v.Z.locals;class Kv extends Wd{constructor(t,e={}){super(t);const n=this.bindTemplate;this.set("class",e.class||null),this.children=this.createCollection(),e.children&&e.children.forEach((t=>this.children.add(t))),this.set("_role",null),this.set("_ariaLabelledBy",null),e.labelView&&this.set({_role:"group",_ariaLabelledBy:e.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",n.to("class")],role:n.to("_role"),"aria-labelledby":n.to("_ariaLabelledBy")},children:this.children})}}var Zv=n(4070),Jv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Zv.Z,Jv);Zv.Z.locals;var Yv=n(6237),Qv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Yv.Z,Qv);Yv.Z.locals;var Xv=n(7341),ty={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Xv.Z,ty);Xv.Z.locals;const ey={left:Fd.objectLeft,center:Fd.objectCenter,right:Fd.objectRight};class ny extends Wd{constructor(t,e){super(t),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=e;const{borderStyleDropdown:n,borderWidthInput:o,borderColorInput:i,borderRowLabel:r}=this._createBorderFields(),{backgroundRowLabel:s,backgroundInput:a}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:d,dimensionsLabel:h}=this._createDimensionFields(),{alignmentToolbar:u,alignmentLabel:g}=this._createAlignmentFields();this.focusTracker=new Ea,this.keystrokes=new Sa,this.children=this.createCollection(),this.borderStyleDropdown=n,this.borderWidthInput=o,this.borderColorInput=i,this.backgroundInput=a,this.widthInput=l,this.heightInput=d,this.alignmentToolbar=u;const{saveButtonView:m,cancelButtonView:p}=this._createActionButtons();this.saveButtonView=m,this.cancelButtonView=p,this._focusables=new Ld,this._focusCycler=new Sh({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Au(t,{label:this.t("Table properties")})),this.children.add(new Kv(t,{labelView:r,children:[r,n,i,o],class:"ck-table-form__border-row"})),this.children.add(new Kv(t,{labelView:s,children:[s,a],class:"ck-table-form__background-row"})),this.children.add(new Kv(t,{children:[new Kv(t,{labelView:h,children:[h,l,c,d],class:"ck-table-form__dimensions-row"}),new Kv(t,{labelView:g,children:[g,u],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new Kv(t,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Od({view:this}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.alignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const t=this.options.defaultTableProperties,e={style:t.borderStyle,width:t.borderWidth,color:t.borderColor},n=Uv({colorConfig:this.options.borderColors,columns:5,defaultColorValue:e.color}),o=this.locale,i=this.t,r=new fu(o);r.text=i("Border");const s=Vv(this.t),a=new Bu(o,Pu);a.set({label:i("Style"),class:"ck-table-form__border-style"}),a.fieldView.buttonView.set({isOn:!1,withText:!0,tooltip:i("Style")}),a.fieldView.buttonView.bind("label").to(this,"borderStyle",(t=>s[t||"none"])),a.fieldView.on("execute",(t=>{this.borderStyle=t.source._borderStyleValue})),a.bind("isEmpty").to(this,"borderStyle",(t=>!t)),du(a.fieldView,Hv(this,e.style));const l=new Bu(o,Du);l.set({label:i("Width"),class:"ck-table-form__border-width"}),l.fieldView.bind("value").to(this,"borderWidth"),l.bind("isEnabled").to(this,"borderStyle",oy),l.fieldView.on("input",(()=>{this.borderWidth=l.fieldView.element.value}));const c=new Bu(o,n);return c.set({label:i("Color"),class:"ck-table-form__border-color"}),c.fieldView.bind("value").to(this,"borderColor"),c.bind("isEnabled").to(this,"borderStyle",oy),c.fieldView.on("input",(()=>{this.borderColor=c.fieldView.value})),this.on("change:borderStyle",((t,n,o,i)=>{oy(o)||(this.borderColor="",this.borderWidth=""),oy(i)||(this.borderColor=e.color,this.borderWidth=e.width)})),{borderRowLabel:r,borderStyleDropdown:a,borderColorInput:c,borderWidthInput:l}}_createBackgroundFields(){const t=this.locale,e=this.t,n=new fu(t);n.text=e("Background");const o=Uv({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor}),i=new Bu(t,o);return i.set({label:e("Color"),class:"ck-table-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",(()=>{this.backgroundColor=i.fieldView.value})),{backgroundRowLabel:n,backgroundInput:i}}_createDimensionFields(){const t=this.locale,e=this.t,n=new fu(t);n.text=e("Dimensions");const o=new Bu(t,Du);o.set({label:e("Width"),class:"ck-table-form__dimensions-row__width"}),o.fieldView.bind("value").to(this,"width"),o.fieldView.on("input",(()=>{this.width=o.fieldView.element.value}));const i=new Wd(t);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const r=new Bu(t,Du);return r.set({label:e("Height"),class:"ck-table-form__dimensions-row__height"}),r.fieldView.bind("value").to(this,"height"),r.fieldView.on("input",(()=>{this.height=r.fieldView.element.value})),{dimensionsLabel:n,widthInput:o,operatorLabel:i,heightInput:r}}_createAlignmentFields(){const t=this.locale,e=this.t,n=new fu(t);n.text=e("Alignment");const o=new Zh(t);return o.set({isCompact:!0,ariaLabel:e("Table alignment toolbar")}),qv({view:this,icons:ey,toolbar:o,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:n,alignmentToolbar:o}}_createActionButtons(){const t=this.locale,e=this.t,n=new wh(t),o=new wh(t),i=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return n.set({label:e("Save"),icon:Fd.check,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(i,"errorText",((...t)=>t.every((t=>!t)))),o.set({label:e("Cancel"),icon:Fd.cancel,class:"ck-button-cancel",withText:!0}),o.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:o}}get _alignmentLabels(){const t=this.locale,e=this.t,n=e("Align table to the left"),o=e("Center table"),i=e("Align table to the right");return"rtl"===t.uiLanguageDirection?{right:i,center:o,left:n}:{left:n,center:o,right:i}}}function oy(t){return"none"!==t}const iy=Lu.defaultPositions,ry=[iy.northArrowSouth,iy.northArrowSouthWest,iy.northArrowSouthEast,iy.southArrowNorth,iy.southArrowNorthWest,iy.southArrowNorthEast,iy.viewportStickyNorth];function sy(t,e){const n=t.plugins.get("ContextualBalloon");if(lv(t.editing.view.document.selection)){let o;o="cell"===e?ly(t):ay(t),n.updatePosition(o)}}function ay(t){const e=t.model.document.selection.getFirstPosition().findAncestor("table"),n=t.editing.mapper.toViewElement(e);return{target:t.editing.view.domConverter.viewToDom(n),positions:ry}}function ly(t){const e=t.editing.mapper,n=t.editing.view.domConverter,o=t.model.document.selection;if(o.rangeCount>1)return{target:()=>function(t,e){const n=e.editing.mapper,o=e.editing.view.domConverter,i=Array.from(t).map((t=>{const e=cy(t.start),i=n.toViewElement(e);return new ka(o.viewToDom(i))}));return ka.getBoundingRect(i)}(o.getRanges(),t),positions:ry};const i=cy(o.getFirstPosition()),r=e.toViewElement(i);return{target:n.viewToDom(r),positions:ry}}function cy(t){return t.nodeAfter&&t.nodeAfter.is("element","tableCell")?t.nodeAfter:t.findAncestor("tableCell")}const dy={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class hy extends ge{static get requires(){return[Zu]}static get pluginName(){return"TablePropertiesUI"}constructor(t){super(t),t.config.define("table.tableProperties",{borderColors:Wv,backgroundColors:Wv})}init(){const t=this.editor,e=t.t;this._defaultTableProperties=wv(t.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._balloon=t.plugins.get(Zu),this.view=this._createPropertiesView(),this._undoStepBatch=null,t.ui.componentFactory.add("tableProperties",(n=>{const o=new wh(n);o.set({label:e("Table properties"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z"/></svg>',tooltip:!0}),this.listenTo(o,"execute",(()=>this._showView()));const i=Object.values(dy).map((e=>t.commands.get(e)));return o.bind("isEnabled").toMany(i,"isEnabled",((...t)=>t.some((t=>t)))),o}))}destroy(){super.destroy(),this.view.destroy()}_createPropertiesView(){const t=this.editor,e=t.config.get("table.tableProperties"),n=yh(e.borderColors),o=vh(t.locale,n),i=yh(e.backgroundColors),r=vh(t.locale,i),s=new ny(t.locale,{borderColors:o,backgroundColors:r,defaultTableProperties:this._defaultTableProperties}),a=t.t;s.render(),this.listenTo(s,"submit",(()=>{this._hideView()})),this.listenTo(s,"cancel",(()=>{this._undoStepBatch.operations.length&&t.execute("undo",this._undoStepBatch),this._hideView()})),s.keystrokes.set("Esc",((t,e)=>{this._hideView(),e()})),Nd({emitter:s,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const l=Fv(a),c=Nv(a);return s.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle",this._defaultTableProperties.borderStyle)),s.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:s.borderColorInput,commandName:"tableBorderColor",errorText:l,validator:Mv,defaultValue:this._defaultTableProperties.borderColor})),s.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:s.borderWidthInput,commandName:"tableBorderWidth",errorText:c,validator:Lv,defaultValue:this._defaultTableProperties.borderWidth})),s.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:s.backgroundInput,commandName:"tableBackgroundColor",errorText:l,validator:Mv,defaultValue:this._defaultTableProperties.backgroundColor})),s.on("change:width",this._getValidatedPropertyChangeCallback({viewField:s.widthInput,commandName:"tableWidth",errorText:c,validator:Ov,defaultValue:this._defaultTableProperties.width})),s.on("change:height",this._getValidatedPropertyChangeCallback({viewField:s.heightInput,commandName:"tableHeight",errorText:c,validator:Ov,defaultValue:this._defaultTableProperties.height})),s.on("change:alignment",this._getPropertyChangeCallback("tableAlignment",this._defaultTableProperties.alignment)),s}_fillViewFormFromCommandValues(){const t=this.editor.commands,e=t.get("tableBorderStyle");Object.entries(dy).map((([e,n])=>{const o=this._defaultTableProperties[e]||"";return[e,t.get(n).value||o]})).forEach((([t,n])=>{("borderColor"!==t&&"borderWidth"!==t||"none"!==e.value)&&this.view.set(t,n)}))}_showView(){const t=this.editor;this.listenTo(t.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:ay(t)}),this._undoStepBatch=t.model.createBatch(),this.view.focus()}_hideView(){const t=this.editor;this.stopListening(t.ui,"update"),this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const t=this.editor;lv(t.editing.view.document.selection)?this._isViewVisible&&sy(t,"table"):this._hideView()}get _isViewVisible(){return this._balloon.visibleView===this.view}get _isViewInBalloon(){return this._balloon.hasView(this.view)}_getPropertyChangeCallback(t,e){return(n,o,i,r)=>{(r||e!==i)&&this.editor.execute(t,{value:i,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(t){const{commandName:e,viewField:n,validator:o,errorText:i,defaultValue:r}=t,s=aa((()=>{n.errorText=i}),500);return(t,i,a,l)=>{s.cancel(),(l||r!==a)&&(o(a)?(this.editor.execute(e,{value:a,batch:this._undoStepBatch}),n.errorText=null):s())}}}var uy=n(5087),gy={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(uy.Z,gy);uy.Z.locals;const my={left:Fd.alignLeft,center:Fd.alignCenter,right:Fd.alignRight,justify:Fd.alignJustify,top:Fd.alignTop,middle:Fd.alignMiddle,bottom:Fd.alignBottom};class py extends Wd{constructor(t,e){super(t),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=e;const{borderStyleDropdown:n,borderWidthInput:o,borderColorInput:i,borderRowLabel:r}=this._createBorderFields(),{backgroundRowLabel:s,backgroundInput:a}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:d,dimensionsLabel:h}=this._createDimensionFields(),{horizontalAlignmentToolbar:u,verticalAlignmentToolbar:g,alignmentLabel:m}=this._createAlignmentFields();this.focusTracker=new Ea,this.keystrokes=new Sa,this.children=this.createCollection(),this.borderStyleDropdown=n,this.borderWidthInput=o,this.borderColorInput=i,this.backgroundInput=a,this.paddingInput=this._createPaddingField(),this.widthInput=l,this.heightInput=d,this.horizontalAlignmentToolbar=u,this.verticalAlignmentToolbar=g;const{saveButtonView:p,cancelButtonView:f}=this._createActionButtons();this.saveButtonView=p,this.cancelButtonView=f,this._focusables=new Ld,this._focusCycler=new Sh({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Au(t,{label:this.t("Cell properties")})),this.children.add(new Kv(t,{labelView:r,children:[r,n,i,o],class:"ck-table-form__border-row"})),this.children.add(new Kv(t,{labelView:s,children:[s,a],class:"ck-table-form__background-row"})),this.children.add(new Kv(t,{children:[new Kv(t,{labelView:h,children:[h,l,c,d],class:"ck-table-form__dimensions-row"}),new Kv(t,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new Kv(t,{labelView:m,children:[m,u,g],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new Kv(t,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-cell-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Od({view:this}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const t=this.options.defaultTableCellProperties,e={style:t.borderStyle,width:t.borderWidth,color:t.borderColor},n=Uv({colorConfig:this.options.borderColors,columns:5,defaultColorValue:e.color}),o=this.locale,i=this.t,r=new fu(o);r.text=i("Border");const s=Vv(i),a=new Bu(o,Pu);a.set({label:i("Style"),class:"ck-table-form__border-style"}),a.fieldView.buttonView.set({isOn:!1,withText:!0,tooltip:i("Style")}),a.fieldView.buttonView.bind("label").to(this,"borderStyle",(t=>s[t||"none"])),a.fieldView.on("execute",(t=>{this.borderStyle=t.source._borderStyleValue})),a.bind("isEmpty").to(this,"borderStyle",(t=>!t)),du(a.fieldView,Hv(this,e.style));const l=new Bu(o,Du);l.set({label:i("Width"),class:"ck-table-form__border-width"}),l.fieldView.bind("value").to(this,"borderWidth"),l.bind("isEnabled").to(this,"borderStyle",fy),l.fieldView.on("input",(()=>{this.borderWidth=l.fieldView.element.value}));const c=new Bu(o,n);return c.set({label:i("Color"),class:"ck-table-form__border-color"}),c.fieldView.bind("value").to(this,"borderColor"),c.bind("isEnabled").to(this,"borderStyle",fy),c.fieldView.on("input",(()=>{this.borderColor=c.fieldView.value})),this.on("change:borderStyle",((t,n,o,i)=>{fy(o)||(this.borderColor="",this.borderWidth=""),fy(i)||(this.borderColor=e.color,this.borderWidth=e.width)})),{borderRowLabel:r,borderStyleDropdown:a,borderColorInput:c,borderWidthInput:l}}_createBackgroundFields(){const t=this.locale,e=this.t,n=new fu(t);n.text=e("Background");const o=Uv({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor}),i=new Bu(t,o);return i.set({label:e("Color"),class:"ck-table-cell-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",(()=>{this.backgroundColor=i.fieldView.value})),{backgroundRowLabel:n,backgroundInput:i}}_createDimensionFields(){const t=this.locale,e=this.t,n=new fu(t);n.text=e("Dimensions");const o=new Bu(t,Du);o.set({label:e("Width"),class:"ck-table-form__dimensions-row__width"}),o.fieldView.bind("value").to(this,"width"),o.fieldView.on("input",(()=>{this.width=o.fieldView.element.value}));const i=new Wd(t);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const r=new Bu(t,Du);return r.set({label:e("Height"),class:"ck-table-form__dimensions-row__height"}),r.fieldView.bind("value").to(this,"height"),r.fieldView.on("input",(()=>{this.height=r.fieldView.element.value})),{dimensionsLabel:n,widthInput:o,operatorLabel:i,heightInput:r}}_createPaddingField(){const t=this.locale,e=this.t,n=new Bu(t,Du);return n.set({label:e("Padding"),class:"ck-table-cell-properties-form__padding"}),n.fieldView.bind("value").to(this,"padding"),n.fieldView.on("input",(()=>{this.padding=n.fieldView.element.value})),n}_createAlignmentFields(){const t=this.locale,e=this.t,n=new fu(t);n.text=e("Table cell text alignment");const o=new Zh(t),i="rtl"===this.locale.contentLanguageDirection;o.set({isCompact:!0,ariaLabel:e("Horizontal text alignment toolbar")}),qv({view:this,icons:my,toolbar:o,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:t=>{if(i){if("left"===t)return"right";if("right"===t)return"left"}return t},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const r=new Zh(t);return r.set({isCompact:!0,ariaLabel:e("Vertical text alignment toolbar")}),qv({view:this,icons:my,toolbar:r,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:o,verticalAlignmentToolbar:r,alignmentLabel:n}}_createActionButtons(){const t=this.locale,e=this.t,n=new wh(t),o=new wh(t),i=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return n.set({label:e("Save"),icon:Fd.check,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(i,"errorText",((...t)=>t.every((t=>!t)))),o.set({label:e("Cancel"),icon:Fd.cancel,class:"ck-button-cancel",withText:!0}),o.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:o}}get _horizontalAlignmentLabels(){const t=this.locale,e=this.t,n=e("Align cell text to the left"),o=e("Align cell text to the center"),i=e("Align cell text to the right"),r=e("Justify cell text");return"rtl"===t.uiLanguageDirection?{right:i,center:o,left:n,justify:r}:{left:n,center:o,right:i,justify:r}}get _verticalAlignmentLabels(){const t=this.t;return{top:t("Align cell text to the top"),middle:t("Align cell text to the middle"),bottom:t("Align cell text to the bottom")}}}function fy(t){return"none"!==t}const by={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",width:"tableCellWidth",height:"tableCellHeight",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class ky extends ge{static get requires(){return[Zu]}static get pluginName(){return"TableCellPropertiesUI"}constructor(t){super(t),t.config.define("table.tableCellProperties",{borderColors:Wv,backgroundColors:Wv})}init(){const t=this.editor,e=t.t;this._defaultTableCellProperties=wv(t.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===t.locale.contentLanguageDirection}),this._balloon=t.plugins.get(Zu),this.view=this._createPropertiesView(),this._undoStepBatch=null,t.ui.componentFactory.add("tableCellProperties",(n=>{const o=new wh(n);o.set({label:e("Cell properties"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z"/></svg>',tooltip:!0}),this.listenTo(o,"execute",(()=>this._showView()));const i=Object.values(by).map((e=>t.commands.get(e)));return o.bind("isEnabled").toMany(i,"isEnabled",((...t)=>t.some((t=>t)))),o}))}destroy(){super.destroy(),this.view.destroy()}_createPropertiesView(){const t=this.editor,e=t.editing.view.document,n=t.config.get("table.tableCellProperties"),o=yh(n.borderColors),i=vh(t.locale,o),r=yh(n.backgroundColors),s=vh(t.locale,r),a=new py(t.locale,{borderColors:i,backgroundColors:s,defaultTableCellProperties:this._defaultTableCellProperties}),l=t.t;a.render(),this.listenTo(a,"submit",(()=>{this._hideView()})),this.listenTo(a,"cancel",(()=>{this._undoStepBatch.operations.length&&t.execute("undo",this._undoStepBatch),this._hideView()})),a.keystrokes.set("Esc",((t,e)=>{this._hideView(),e()})),this.listenTo(t.ui,"update",(()=>{lv(e.selection)?this._isViewVisible&&sy(t,"cell"):this._hideView()})),Nd({emitter:a,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const c=Fv(l),d=Nv(l);return a.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle",this._defaultTableCellProperties.borderStyle)),a.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:a.borderColorInput,commandName:"tableCellBorderColor",errorText:c,validator:Mv,defaultValue:this._defaultTableCellProperties.borderColor})),a.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:a.borderWidthInput,commandName:"tableCellBorderWidth",errorText:d,validator:Lv,defaultValue:this._defaultTableCellProperties.borderWidth})),a.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:a.paddingInput,commandName:"tableCellPadding",errorText:d,validator:Ov,defaultValue:this._defaultTableCellProperties.padding})),a.on("change:width",this._getValidatedPropertyChangeCallback({viewField:a.widthInput,commandName:"tableCellWidth",errorText:d,validator:Ov,defaultValue:this._defaultTableCellProperties.width})),a.on("change:height",this._getValidatedPropertyChangeCallback({viewField:a.heightInput,commandName:"tableCellHeight",errorText:d,validator:Ov,defaultValue:this._defaultTableCellProperties.height})),a.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:a.backgroundInput,commandName:"tableCellBackgroundColor",errorText:c,validator:Mv,defaultValue:this._defaultTableCellProperties.backgroundColor})),a.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment",this._defaultTableCellProperties.horizontalAlignment)),a.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment",this._defaultTableCellProperties.verticalAlignment)),a}_fillViewFormFromCommandValues(){const t=this.editor.commands,e=t.get("tableCellBorderStyle");Object.entries(by).map((([e,n])=>{const o=this._defaultTableCellProperties[e]||"";return[e,t.get(n).value||o]})).forEach((([t,n])=>{("borderColor"!==t&&"borderWidth"!==t||"none"!==e.value)&&this.view.set(t,n)}))}_showView(){const t=this.editor;this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:ly(t)}),this._undoStepBatch=t.model.createBatch(),this.view.focus()}_hideView(){if(!this._isViewInBalloon)return;const t=this.editor;this.stopListening(t.ui,"update"),this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}get _isViewVisible(){return this._balloon.visibleView===this.view}get _isViewInBalloon(){return this._balloon.hasView(this.view)}_getPropertyChangeCallback(t,e){return(n,o,i,r)=>{(r||e!==i)&&this.editor.execute(t,{value:i,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(t){const{commandName:e,viewField:n,validator:o,errorText:i,defaultValue:r}=t,s=aa((()=>{n.errorText=i}),500);return(t,i,a,l)=>{s.cancel(),(l||r!==a)&&(o(a)?(this.editor.execute(e,{value:a,batch:this._undoStepBatch}),n.errorText=null):s())}}}class wy extends pe{constructor(t,e,n){super(t),this.attributeName=e,this._defaultValue=n}refresh(){const t=this.editor,e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(t.model.document.selection);this.isEnabled=!!e.length,this.value=this._getSingleValue(e)}execute(t={}){const{value:e,batch:n}=t,o=this.editor.model,i=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(o.document.selection),r=this._getValueToSet(e);o.enqueueChange(n,(t=>{r?i.forEach((e=>t.setAttribute(this.attributeName,r,e))):i.forEach((e=>t.removeAttribute(this.attributeName,e)))}))}_getAttribute(t){if(!t)return;const e=t.getAttribute(this.attributeName);return e!==this._defaultValue?e:void 0}_getValueToSet(t){if(t!==this._defaultValue)return t}_getSingleValue(t){const e=this._getAttribute(t[0]);return t.every((t=>this._getAttribute(t)===e))?e:void 0}}class Cy extends wy{constructor(t,e){super(t,"tableCellPadding",e)}_getAttribute(t){if(!t)return;const e=bv(t.getAttribute(this.attributeName));return e!==this._defaultValue?e:void 0}_getValueToSet(t){if((t=kv(t,"px"))!==this._defaultValue)return t}}class Ay extends wy{constructor(t,e){super(t,"tableCellWidth",e)}_getValueToSet(t){if((t=kv(t,"px"))!==this._defaultValue)return t}}class _y extends wy{constructor(t,e){super(t,"tableCellHeight",e)}_getValueToSet(t){return(t=kv(t,"px"))===this._defaultValue?null:t}}class vy extends wy{constructor(t,e){super(t,"tableCellBackgroundColor",e)}}class yy extends wy{constructor(t,e){super(t,"tableCellVerticalAlignment",e)}}class xy extends wy{constructor(t,e){super(t,"tableCellHorizontalAlignment",e)}}class Ey extends wy{constructor(t,e){super(t,"tableCellBorderStyle",e)}_getAttribute(t){if(!t)return;const e=bv(t.getAttribute(this.attributeName));return e!==this._defaultValue?e:void 0}}class Sy extends wy{constructor(t,e){super(t,"tableCellBorderColor",e)}_getAttribute(t){if(!t)return;const e=bv(t.getAttribute(this.attributeName));return e!==this._defaultValue?e:void 0}}class Ty extends wy{constructor(t,e){super(t,"tableCellBorderWidth",e)}_getAttribute(t){if(!t)return;const e=bv(t.getAttribute(this.attributeName));return e!==this._defaultValue?e:void 0}_getValueToSet(t){if((t=kv(t,"px"))!==this._defaultValue)return t}}const By=/^(top|middle|bottom)$/,Dy=/^(left|center|right|justify)$/;class Iy extends ge{static get pluginName(){return"TableCellPropertiesEditing"}static get requires(){return[O_]}init(){const t=this.editor,e=t.model.schema,n=t.conversion;t.config.define("table.tableCellProperties.defaultProperties",{});const o=wv(t.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===t.locale.contentLanguageDirection});t.data.addStyleProcessorRules(nm),function(t,e,n){const o={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};t.extend("tableCell",{allowAttributes:Object.values(o)}),hv(e,"td",o,n),hv(e,"th",o,n),uv(e,{modelElement:"tableCell",modelAttribute:o.style,styleName:"border-style"}),uv(e,{modelElement:"tableCell",modelAttribute:o.color,styleName:"border-color"}),uv(e,{modelElement:"tableCell",modelAttribute:o.width,styleName:"border-width"})}(e,n,{color:o.borderColor,style:o.borderStyle,width:o.borderWidth}),t.commands.add("tableCellBorderStyle",new Ey(t,o.borderStyle)),t.commands.add("tableCellBorderColor",new Sy(t,o.borderColor)),t.commands.add("tableCellBorderWidth",new Ty(t,o.borderWidth)),Py(e,n,{modelAttribute:"tableCellWidth",styleName:"width",defaultValue:o.width}),t.commands.add("tableCellWidth",new Ay(t,o.width)),Py(e,n,{modelAttribute:"tableCellHeight",styleName:"height",defaultValue:o.height}),t.commands.add("tableCellHeight",new _y(t,o.height)),t.data.addStyleProcessorRules(mm),Py(e,n,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:o.padding}),t.commands.add("tableCellPadding",new Cy(t,o.padding)),t.data.addStyleProcessorRules(tm),Py(e,n,{modelAttribute:"tableCellBackgroundColor",styleName:"background-color",defaultValue:o.backgroundColor}),t.commands.add("tableCellBackgroundColor",new vy(t,o.backgroundColor)),function(t,e,n){t.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),e.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellHorizontalAlignment"},view:t=>({key:"style",value:{"text-align":t}})}),e.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"text-align":Dy}},model:{key:"tableCellHorizontalAlignment",value:t=>{const e=t.getStyle("text-align");return e===n?null:e}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:Dy}},model:{key:"tableCellHorizontalAlignment",value:t=>{const e=t.getAttribute("align");return e===n?null:e}}})}(e,n,o.horizontalAlignment),t.commands.add("tableCellHorizontalAlignment",new xy(t,o.horizontalAlignment)),function(t,e,n){t.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),e.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellVerticalAlignment"},view:t=>({key:"style",value:{"vertical-align":t}})}),e.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"vertical-align":By}},model:{key:"tableCellVerticalAlignment",value:t=>{const e=t.getStyle("vertical-align");return e===n?null:e}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:By}},model:{key:"tableCellVerticalAlignment",value:t=>{const e=t.getAttribute("valign");return e===n?null:e}}})}(e,n,o.verticalAlignment),t.commands.add("tableCellVerticalAlignment",new yy(t,o.verticalAlignment))}}function Py(t,e,n){const{modelAttribute:o}=n;t.extend("tableCell",{allowAttributes:[o]}),dv(e,{viewElement:/^(td|th)$/,...n}),uv(e,{modelElement:"tableCell",...n})}function zy(t){t.document.registerPostFixer((e=>function(t,e){const n=e.document.differ.getChanges();let o=!1;for(const e of n){if("insert"!=e.type)continue;if(e.position.parent.is("element","table")||"table"==e.name){const n="table"==e.name?e.position.nodeAfter:e.position.parent,i=Array.from(n.getChildren()).filter((t=>t.is("element","caption"))),r=i.shift();if(!r)continue;for(const e of i)t.move(t.createRangeIn(e),r,"end"),t.remove(e);r.nextSibling&&(t.move(t.createRangeOn(r),n,"end"),o=!0),o=!!i.length||o}}return o}(e,t)))}function Ry(t){return!!t&&t.is("element","table")}function Vy(t){for(const e of t.getChildren())if(e.is("element","caption"))return e;return null}function Fy(t){const e=t.parent;return"figcaption"==t.name&&e&&"figure"==e.name&&e.hasClass("table")||"caption"==t.name&&e&&"table"==e.name?{name:!0}:null}function Ny(t){const e=t.getSelectedElement();return e&&e.is("element","table")?e:t.getFirstPosition().findAncestor("table")}class My extends pe{refresh(){const t=Ny(this.editor.model.document.selection);this.isEnabled=!!t,this.isEnabled?this.value=!!Vy(t):this.value=!1}execute(t={}){const{focusCaptionOnShow:e}=t;this.editor.model.change((t=>{this.value?this._hideTableCaption(t):this._showTableCaption(t,e)}))}_showTableCaption(t,e){const n=Ny(this.editor.model.document.selection),o=this.editor.plugins.get("TableCaptionEditing")._getSavedCaption(n)||t.createElement("caption");t.append(o,n),e&&t.setSelection(o,"in")}_hideTableCaption(t){const e=Ny(this.editor.model.document.selection),n=this.editor.plugins.get("TableCaptionEditing"),o=Vy(e);n._saveCaption(e,o),t.setSelection(t.createRangeIn(e.getChild(0).getChild(0))),t.remove(o)}}class Oy extends ge{static get pluginName(){return"TableCaptionEditing"}constructor(t){super(t),this._savedCaptionsMap=new WeakMap}init(){const t=this.editor,e=t.model.schema,n=t.editing.view,o=t.t;e.isRegistered("caption")?e.extend("caption",{allowIn:"table"}):e.register("caption",{allowIn:"table",allowContentOf:"$block",isLimit:!0}),t.commands.add("toggleTableCaption",new My(this.editor)),t.conversion.for("upcast").elementToElement({view:Fy,model:"caption"}),t.conversion.for("dataDowncast").elementToElement({model:"caption",view:(t,{writer:e})=>Ry(t.parent)?e.createContainerElement("figcaption"):null}),t.conversion.for("editingDowncast").elementToElement({model:"caption",view:(t,{writer:e})=>{if(!Ry(t.parent))return null;const i=e.createEditableElement("figcaption");return e.setCustomProperty("tableCaption",!0,i),dg({view:n,element:i,text:o("Enter table caption"),keepOnFocus:!0}),Jf(i,e)}}),zy(t.model)}_getSavedCaption(t){const e=this._savedCaptionsMap.get(t);return e?Ua.fromJSON(e):null}_saveCaption(t,e){this._savedCaptionsMap.set(t,e.toJSON())}}class Ly extends ge{static get pluginName(){return"TableCaptionUI"}init(){const t=this.editor,e=t.editing.view,n=t.t;t.ui.componentFactory.add("toggleTableCaption",(o=>{const i=t.commands.get("toggleTableCaption"),r=new wh(o);return r.set({icon:Fd.caption,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(i,"value","isEnabled"),r.bind("label").to(i,"value",(t=>n(t?"Toggle caption off":"Toggle caption on"))),this.listenTo(r,"execute",(()=>{if(t.execute("toggleTableCaption",{focusCaptionOnShow:!0}),i.value){const n=function(t){const e=Ny(t);return e?Vy(e):null}(t.model.document.selection),o=t.editing.mapper.toViewElement(n);if(!o)return;e.scrollToTheSelection(),e.change((t=>{t.addClass("table__caption_highlighted",o)}))}})),r}))}}var Hy=n(2128),qy={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Hy.Z,qy);Hy.Z.locals;const Wy={heading1:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M19 9v10h-2v-8h-2V9h4zM4 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H10a1 1 0 0 1-1-1V11H4v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v4.5z"/></svg>',heading2:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1v4.5zm16.076 8.343V18.5h-6.252c.067-.626.27-1.22.61-1.78.338-.561 1.006-1.305 2.005-2.232.804-.749 1.297-1.257 1.479-1.523.245-.368.368-.732.368-1.092 0-.398-.107-.703-.32-.917-.214-.214-.51-.32-.886-.32-.372 0-.669.111-.889.336-.22.224-.347.596-.38 1.117l-1.778-.178c.106-.982.438-1.686.997-2.114.558-.427 1.257-.64 2.095-.64.918 0 1.64.247 2.164.742.525.495.787 1.11.787 1.847 0 .419-.075.818-.225 1.197-.15.378-.388.775-.714 1.19-.216.275-.605.67-1.168 1.187-.563.516-.92.859-1.07 1.028a3.11 3.11 0 0 0-.365.495h3.542z"/></svg>',heading3:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1v4.5zm9.989 7.53 1.726-.209c.055.44.203.777.445 1.01.24.232.533.349.876.349.368 0 .678-.14.93-.42.251-.279.377-.655.377-1.13 0-.448-.12-.803-.362-1.066a1.153 1.153 0 0 0-.882-.393c-.228 0-.501.044-.819.133l.197-1.453c.482.012.85-.092 1.105-.315.253-.222.38-.517.38-.885 0-.313-.093-.563-.279-.75-.186-.185-.434-.278-.743-.278a1.07 1.07 0 0 0-.78.317c-.216.212-.347.52-.394.927l-1.644-.28c.114-.562.287-1.012.517-1.348.231-.337.553-.601.965-.794a3.24 3.24 0 0 1 1.387-.289c.876 0 1.579.28 2.108.838.436.457.653.973.653 1.549 0 .817-.446 1.468-1.339 1.955.533.114.96.37 1.28.768.319.398.478.878.478 1.441 0 .817-.298 1.513-.895 2.088-.596.576-1.339.864-2.228.864-.842 0-1.54-.243-2.094-.727-.555-.485-.876-1.118-.965-1.901z"/></svg>',heading4:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm13.55 10v-1.873h-3.81v-1.561l4.037-5.91h1.498v5.904h1.156v1.567h-1.156V18.5H17.05zm0-3.44v-3.18l-2.14 3.18h2.14z"/></svg>',heading5:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm9.578 7.607 1.777-.184c.05.402.201.72.45.955a1.223 1.223 0 0 0 1.81-.101c.258-.303.387-.759.387-1.368 0-.572-.128-1-.384-1.286-.256-.285-.59-.428-1-.428-.512 0-.971.226-1.377.679l-1.448-.21.915-4.843h4.716v1.67H15.56l-.28 1.58a2.697 2.697 0 0 1 1.219-.298 2.68 2.68 0 0 1 2.012.863c.55.576.825 1.323.825 2.241a3.36 3.36 0 0 1-.666 2.05c-.605.821-1.445 1.232-2.52 1.232-.86 0-1.56-.23-2.101-.692-.542-.461-.866-1.081-.971-1.86z"/></svg>',heading6:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm15.595 2.973-1.726.19c-.043-.355-.153-.617-.33-.787-.178-.169-.409-.253-.692-.253-.377 0-.695.169-.956.507-.26.339-.424 1.043-.492 2.114.445-.525.997-.787 1.657-.787.745 0 1.383.284 1.914.85.531.568.797 1.3.797 2.197 0 .952-.28 1.716-.838 2.291-.559.576-1.276.864-2.152.864-.94 0-1.712-.365-2.317-1.095-.605-.73-.908-1.927-.908-3.59 0-1.705.316-2.935.946-3.688.63-.753 1.45-1.13 2.457-1.13.706 0 1.291.198 1.755.594.463.395.758.97.885 1.723zm-4.043 3.891c0 .58.133 1.028.4 1.343.266.315.57.473.914.473.33 0 .605-.13.825-.388.22-.258.33-.68.33-1.27 0-.604-.118-1.047-.355-1.329a1.115 1.115 0 0 0-.89-.422c-.342 0-.632.134-.869.403s-.355.666-.355 1.19z"/></svg>'};class Uy extends pe{constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=e.selection.getAttribute(this.attributeKey),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model,n=e.document.selection,o=t.value;e.change((t=>{if(n.isCollapsed)o?t.setSelectionAttribute(this.attributeKey,o):t.removeSelectionAttribute(this.attributeKey);else{const i=e.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const e of i)o?t.setAttribute(this.attributeKey,o,e):t.removeAttribute(this.attributeKey,e)}}))}}class jy extends Bo{constructor(t){super(t),this.set("isEmpty",!0),this.on("change",(()=>{this.set("isEmpty",0===this.length)}))}add(t,e){this.find((e=>e.color===t.color))||super.add(t,e)}hasColor(t){return!!this.find((e=>e.color===t))}}ue(jy,se);var $y=n(1896),Gy={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()($y.Z,Gy);$y.Z.locals;class Ky extends Wd{constructor(t,{colors:e,columns:n,removeButtonLabel:o,documentColorsLabel:i,documentColorsCount:r}){super(t),this.items=this.createCollection(),this.colorDefinitions=e,this.focusTracker=new Ea,this.keystrokes=new Sa,this.set("selectedColor"),this.removeButtonLabel=o,this.columns=n,this.documentColors=new jy,this.documentColorsCount=r,this._focusCycler=new Sh({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this._documentColorsLabel=i,this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-table"]},children:this.items}),this.items.add(this._removeColorButton())}updateDocumentColors(t,e){const n=t.document,o=this.documentColorsCount;this.documentColors.clear();for(const i of n.getRootNames()){const r=n.getRoot(i),s=t.createRangeIn(r);for(const t of s.getItems())if(t.is("$textProxy")&&t.hasAttribute(e)&&(this._addColorToDocumentColors(t.getAttribute(e)),this.documentColors.length>=o))return}}updateSelectedColors(){const t=this.documentColorsGrid,e=this.staticColorsGrid,n=this.selectedColor;e.selectedColor=n,t&&(t.selectedColor=n)}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendGrids(){if(!this.staticColorsGrid&&(this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount)){const t=Ud.bind(this.documentColors,this.documentColors),e=new fu(this.locale);e.text=this._documentColorsLabel,e.extendTemplate({attributes:{class:["ck","ck-color-grid__label",t.if("isEmpty","ck-hidden")]}}),this.items.add(e),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_removeColorButton(){const t=new wh;return t.set({withText:!0,icon:Fd.eraser,tooltip:!0,label:this.removeButtonLabel}),t.class="ck-color-table__remove-color",t.on("execute",(()=>{this.fire("execute",{value:null})})),t}_createStaticColorsGrid(){const t=new Ih(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return t.delegate("execute").to(this),t}_createDocumentColorsGrid(){const t=Ud.bind(this.documentColors,this.documentColors),e=new Ih(this.locale,{columns:this.columns});return e.delegate("execute").to(this),e.extendTemplate({attributes:{class:t.if("isEmpty","ck-hidden")}}),e.items.bindTo(this.documentColors).using((t=>{const e=new Eh;return e.set({color:t.color,hasBorder:t.options&&t.options.hasBorder}),t.label&&e.set({label:t.label,tooltip:!0}),e.on("execute",(()=>{this.fire("execute",{value:t.color})})),e})),this.documentColors.on("change:isEmpty",((t,n,o)=>{o&&(e.selectedColor=null)})),e}_addColorToDocumentColors(t){const e=this.colorDefinitions.find((e=>e.color===t));e?this.documentColors.add(Object.assign({},e)):this.documentColors.add({color:t,label:t,options:{hasBorder:!1}})}}const Zy="fontSize",Jy="fontFamily",Yy="fontColor",Qy="fontBackgroundColor";function Xy(t,e){const n={model:{key:t,values:[]},view:{},upcastAlso:{}};for(const t of e)n.model.values.push(t.model),n.view[t.model]=t.view,t.upcastAlso&&(n.upcastAlso[t.model]=t.upcastAlso);return n}function tx(t){return e=>e.getStyle(t).replace(/\s/g,"")}function ex(t){return(e,{writer:n})=>n.createAttributeElement("span",{style:`${t}:${e}`},{priority:7})}class nx extends Uy{constructor(t){super(t,Jy)}}function ox(t){return t.map(ix).filter((t=>!!t))}function ix(t){return"object"==typeof t?t:"default"===t?{title:"Default",model:void 0}:"string"==typeof t?function(t){const e=t.replace(/"|'/g,"").split(","),n=e[0],o=e.map(rx).join(", ");return{title:n,model:o,view:{name:"span",styles:{"font-family":o},priority:7}}}(t):void 0}function rx(t){return(t=t.trim()).indexOf(" ")>0&&(t=`'${t}'`),t}class sx extends ge{static get pluginName(){return"FontFamilyEditing"}constructor(t){super(t),t.config.define(Jy,{options:["default","Arial, Helvetica, sans-serif","Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif","Trebuchet MS, Helvetica, sans-serif","Verdana, Geneva, sans-serif"],supportAllValues:!1})}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Jy}),t.model.schema.setAttributeProperties(Jy,{isFormatting:!0,copyOnEnter:!0});const e=ox(t.config.get("fontFamily.options")).filter((t=>t.model)),n=Xy(Jy,e);t.config.get("fontFamily.supportAllValues")?(this._prepareAnyValueConverters(),this._prepareCompatibilityConverter()):t.conversion.attributeToElement(n),t.commands.add(Jy,new nx(t))}_prepareAnyValueConverters(){const t=this.editor;t.conversion.for("downcast").attributeToElement({model:Jy,view:(t,{writer:e})=>e.createAttributeElement("span",{style:"font-family:"+t},{priority:7})}),t.conversion.for("upcast").elementToAttribute({model:{key:Jy,value:t=>t.getStyle("font-family")},view:{name:"span",styles:{"font-family":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{face:/.*/}},model:{key:Jy,value:t=>t.getAttribute("face")}})}}class ax extends ge{static get pluginName(){return"FontFamilyUI"}init(){const t=this.editor,e=t.t,n=this._getLocalizedOptions(),o=t.commands.get(Jy);t.ui.componentFactory.add(Jy,(i=>{const r=lu(i);return du(r,function(t,e){const n=new Bo;for(const o of t){const t={type:"button",model:new Ru({commandName:Jy,commandParam:o.model,label:o.title,withText:!0})};t.model.bind("isOn").to(e,"value",(t=>t===o.model||!(!t||!o.model)&&t.split(",")[0].replace(/'/g,"").toLowerCase()===o.model.toLowerCase())),o.view&&o.view.styles&&t.model.set("labelStyle",`font-family: ${o.view.styles["font-family"]}`),n.add(t)}return n}(n,o)),r.buttonView.set({label:e("Font Family"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.03 3h6.149a.75.75 0 1 1 0 1.5h-5.514L11.03 3zm1.27 3h4.879a.75.75 0 1 1 0 1.5h-4.244L12.3 6zm1.27 3h3.609a.75.75 0 1 1 0 1.5h-2.973L13.57 9zm-2.754 2.5L8.038 4.785 5.261 11.5h5.555zm.62 1.5H4.641l-1.666 4.028H1.312l5.789-14h1.875l5.789 14h-1.663L11.436 13z"/></svg>',tooltip:!0}),r.extendTemplate({attributes:{class:"ck-font-family-dropdown"}}),r.bind("isEnabled").to(o),this.listenTo(r,"execute",(e=>{t.execute(e.source.commandName,{value:e.source.commandParam}),t.editing.view.focus()})),r}))}_getLocalizedOptions(){const t=this.editor,e=t.t;return ox(t.config.get(Jy).options).map((t=>("Default"===t.title&&(t.title=e("Default")),t)))}}class lx extends ge{static get requires(){return[sx,ax]}static get pluginName(){return"FontFamily"}}class cx extends Uy{constructor(t){super(t,Zy)}}function dx(t){return t.map((t=>function(t){if(e=t,"object"==typeof e&&e.title&&e.model&&e.view)return ux(t);var e;const n=function(t){return hx[t]||hx[t.model]}(t);if(n)return ux(n);if("default"===t)return{model:void 0,title:"Default"};if(function(t){let e;if("object"==typeof t){if(!t.model)throw new a("font-size-invalid-definition",null,t);e=parseFloat(t.model)}else e=parseFloat(t);return isNaN(e)}(t))return;return function(t){"number"!=typeof t&&"string"!=typeof t||(t={title:String(t),model:`${parseFloat(t)}px`});return t.view={name:"span",styles:{"font-size":t.model}},ux(t)}(t)}(t))).filter((t=>!!t))}const hx={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 ux(t){return t.view.priority||(t.view.priority=7),t}const gx=["x-small","x-small","small","medium","large","x-large","xx-large","xxx-large"];class mx extends ge{static get pluginName(){return"FontSizeEditing"}constructor(t){super(t),t.config.define(Zy,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Zy}),t.model.schema.setAttributeProperties(Zy,{isFormatting:!0,copyOnEnter:!0});const e=t.config.get("fontSize.supportAllValues"),n=dx(this.editor.config.get("fontSize.options")).filter((t=>t.model)),o=Xy(Zy,n);e?(this._prepareAnyValueConverters(o),this._prepareCompatibilityConverter()):t.conversion.attributeToElement(o),t.commands.add(Zy,new cx(t))}_prepareAnyValueConverters(t){const e=this.editor,n=t.model.values.filter((t=>!Og(String(t))&&!Hg(String(t))));if(n.length)throw new a("font-size-invalid-use-of-named-presets",null,{presets:n});e.conversion.for("downcast").attributeToElement({model:Zy,view:(t,{writer:e})=>{if(t)return e.createAttributeElement("span",{style:"font-size:"+t},{priority:7})}}),e.conversion.for("upcast").elementToAttribute({model:{key:Zy,value:t=>t.getStyle("font-size")},view:{name:"span",styles:{"font-size":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{size:/^[+-]?\d{1,3}$/}},model:{key:Zy,value:t=>{const e=t.getAttribute("size"),n="-"===e[0]||"+"===e[0];let o=parseInt(e,10);n&&(o=3+o);const i=gx.length-1,r=Math.min(Math.max(o,0),i);return gx[r]}}})}}var px=n(6007),fx={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(px.Z,fx);px.Z.locals;class bx extends ge{static get pluginName(){return"FontSizeUI"}init(){const t=this.editor,e=t.t,n=this._getLocalizedOptions(),o=t.commands.get(Zy);t.ui.componentFactory.add(Zy,(i=>{const r=lu(i);return du(r,function(t,e){const n=new Bo;for(const o of t){const t={type:"button",model:new Ru({commandName:Zy,commandParam:o.model,label:o.title,class:"ck-fontsize-option",withText:!0})};o.view&&o.view.styles&&t.model.set("labelStyle",`font-size:${o.view.styles["font-size"]}`),o.view&&o.view.classes&&t.model.set("class",`${t.model.class} ${o.view.classes}`),t.model.bind("isOn").to(e,"value",(t=>t===o.model)),n.add(t)}return n}(n,o)),r.buttonView.set({label:e("Font Size"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13zm7.55 2.279.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825c0-.042 0-.083.002-.123l-.77.77-.707-.707L17.207 2.5l2.265 2.265-.707.707-.782-.782c.002.043.003.089.003.135v10.454z"/></svg>',tooltip:!0}),r.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),r.bind("isEnabled").to(o),this.listenTo(r,"execute",(e=>{t.execute(e.source.commandName,{value:e.source.commandParam}),t.editing.view.focus()})),r}))}_getLocalizedOptions(){const t=this.editor,e=t.t,n={Default:e("Default"),Tiny:e("Tiny"),Small:e("Small"),Big:e("Big"),Huge:e("Huge")};return dx(t.config.get(Zy).options).map((t=>{const e=n[t.title];return e&&e!=t.title&&(t=Object.assign({},t,{title:e})),t}))}}class kx extends ge{static get requires(){return[mx,bx]}static get pluginName(){return"FontSize"}normalizeSizeOptions(t){return dx(t)}}class wx extends Uy{constructor(t){super(t,Yy)}}class Cx extends ge{static get pluginName(){return"FontColorEditing"}constructor(t){super(t),t.config.define(Yy,{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}),t.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:Yy,value:tx("color")}}),t.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:Yy,value:t=>t.getAttribute("color")}}),t.conversion.for("downcast").attributeToElement({model:Yy,view:ex("color")}),t.commands.add(Yy,new wx(t)),t.model.schema.extend("$text",{allowAttributes:Yy}),t.model.schema.setAttributeProperties(Yy,{isFormatting:!0,copyOnEnter:!0})}}class Ax extends ge{constructor(t,{commandName:e,icon:n,componentName:o,dropdownLabel:i}){super(t),this.commandName=e,this.componentName=o,this.icon=n,this.dropdownLabel=i,this.columns=t.config.get(`${this.componentName}.columns`),this.colorTableView=void 0}init(){const t=this.editor,e=t.locale,n=e.t,o=t.commands.get(this.commandName),i=vh(e,yh(t.config.get(this.componentName).colors)),r=t.config.get(`${this.componentName}.documentColors`);t.ui.componentFactory.add(this.componentName,(e=>{const s=lu(e);return this.colorTableView=function({dropdownView:t,colors:e,columns:n,removeButtonLabel:o,documentColorsLabel:i,documentColorsCount:r}){const s=t.locale,a=new Ky(s,{colors:e,columns:n,removeButtonLabel:o,documentColorsLabel:i,documentColorsCount:r});return t.colorTableView=a,t.panelView.children.add(a),a.delegate("execute").to(t,"execute"),a}({dropdownView:s,colors:i.map((t=>({label:t.label,color:t.model,options:{hasBorder:t.hasBorder}}))),columns:this.columns,removeButtonLabel:n("Remove color"),documentColorsLabel:0!==r?n("Document colors"):void 0,documentColorsCount:void 0===r?this.columns:r}),this.colorTableView.bind("selectedColor").to(o,"value"),s.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),s.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),s.bind("isEnabled").to(o),s.on("execute",((e,n)=>{t.execute(this.commandName,n),t.editing.view.focus()})),s.on("change:isOpen",((e,n,o)=>{s.colorTableView.appendGrids(),o&&(0!==r&&this.colorTableView.updateDocumentColors(t.model,this.componentName),this.colorTableView.updateSelectedColors())})),s}))}}class _x extends Ax{constructor(t){const e=t.locale.t;super(t,{commandName:Yy,componentName:Yy,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.4 10.3 10 4.5l-2.4 5.8h4.8zm.5 1.2H7.1L5.7 15H4.2l5-12h1.6l5 12h-1.5L13 11.5zm3.1 7H4a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2z"/></svg>',dropdownLabel:e("Font Color")})}static get pluginName(){return"FontColorUI"}}class vx extends ge{static get requires(){return[Cx,_x]}static get pluginName(){return"FontColor"}}class yx extends Uy{constructor(t){super(t,Qy)}}class xx extends ge{static get pluginName(){return"FontBackgroundColorEditing"}constructor(t){super(t),t.config.define(Qy,{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}),t.data.addStyleProcessorRules(tm),t.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{"background-color":/[\s\S]+/}},model:{key:Qy,value:tx("background-color")}}),t.conversion.for("downcast").attributeToElement({model:Qy,view:ex("background-color")}),t.commands.add(Qy,new yx(t)),t.model.schema.extend("$text",{allowAttributes:Qy}),t.model.schema.setAttributeProperties(Qy,{isFormatting:!0,copyOnEnter:!0})}}class Ex extends Ax{constructor(t){const e=t.locale.t;super(t,{commandName:Qy,componentName:Qy,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M4 2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm8.38 9.262H7.62L10 5.506l2.38 5.756zm.532 1.285L14.34 16h1.426L10.804 4H9.196L4.234 16H5.66l1.428-3.453h5.824z"/></svg>',dropdownLabel:e("Font Background Color")})}static get pluginName(){return"FontBackgroundColorUI"}}class Sx extends ge{static get requires(){return[xx,Ex]}static get pluginName(){return"FontBackgroundColor"}}function Tx(t){const e=t.t,n=t.config.get("codeBlock.languages");for(const t of n)"Plain text"===t.label&&(t.label=e("Plain text")),void 0===t.class&&(t.class=`language-${t.language}`);return n}function Bx(t,e,n){const o={};for(const i of t)"class"===e?o[i[e].split(" ").shift()]=i[n]:o[i[e]]=i[n];return o}function Dx(t){return t.data.match(/^(\s*)/)[0]}function Ix(t){const e=t.document.selection,n=[];if(e.isCollapsed)n.push(e.anchor);else{const o=e.getFirstRange().getWalker({ignoreElementEnd:!0,direction:"backward"});for(const{item:e}of o)if(e.is("$textProxy")&&e.parent.is("element","codeBlock")){const o=Dx(e.textNode),{parent:i,startOffset:r}=e.textNode,s=t.createPositionAt(i,r+o.length);n.push(s)}}return n}function Px(t){const e=xa(t.getSelectedBlocks());return e&&e.is("element","codeBlock")}class zx extends pe{constructor(t){super(t),this._lastLanguage=null}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor,n=e.model,o=n.document.selection,i=Tx(e)[0],r=Array.from(o.getSelectedBlocks()),s=void 0===t.forceValue?!this.value:t.forceValue,a=function(t,e,n){if(t.language)return t.language;if(t.usePreviousLanguageChoice&&e)return e;return n}(t,this._lastLanguage,i.language);n.change((t=>{s?this._applyCodeBlock(t,r,a):this._removeCodeBlock(t,r)}))}_getValue(){const t=xa(this.editor.model.document.selection.getSelectedBlocks());return!!!(!t||!t.is("element","codeBlock"))&&t.getAttribute("language")}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,n=xa(t.getSelectedBlocks());return!!n&&Rx(e,n)}_applyCodeBlock(t,e,n){this._lastLanguage=n;const o=this.editor.model.schema,i=e.filter((t=>Rx(o,t)));for(const e of i)t.rename(e,"codeBlock"),t.setAttribute("language",n,e),o.removeDisallowedAttributes([e],t),Array.from(e.getChildren()).filter((t=>!o.checkChild(e,t))).forEach((e=>t.remove(e)));i.reverse().forEach(((e,n)=>{const o=i[n+1];e.previousSibling===o&&(t.appendElement("softBreak",o),t.merge(t.createPositionBefore(e)))}))}_removeCodeBlock(t,e){const n=e.filter((t=>t.is("element","codeBlock")));for(const e of n){const n=t.createRangeOn(e);for(const e of Array.from(n.getItems()).reverse())if(e.is("element","softBreak")&&e.parent.is("element","codeBlock")){const{position:n}=t.split(t.createPositionBefore(e));t.rename(n.nodeAfter,"paragraph"),t.removeAttribute("language",n.nodeAfter),t.remove(e)}t.rename(e,"paragraph"),t.removeAttribute("language",e)}}}function Rx(t,e){return!e.is("rootElement")&&!t.isLimit(e)&&t.checkChild(e.parent,"codeBlock")}class Vx extends pe{constructor(t){super(t),this._indentSequence=t.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model;t.change((e=>{const n=Ix(t);for(const t of n)e.insertText(this._indentSequence,t)}))}_checkEnabled(){return!!this._indentSequence&&Px(this.editor.model.document.selection)}}class Fx extends pe{constructor(t){super(t),this._indentSequence=t.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model;t.change((e=>{const n=Ix(t);for(const t of n){const n=Nx(this.editor.model,t,this._indentSequence);n&&e.remove(n)}}))}_checkEnabled(){if(!this._indentSequence)return!1;const t=this.editor.model;return!!Px(t.document.selection)&&Ix(t).some((e=>Nx(t,e,this._indentSequence)))}}function Nx(t,e,n){const o=function(t){let e=t.parent.getChild(t.index);e&&!e.is("element","softBreak")||(e=t.nodeBefore);if(!e||e.is("element","softBreak"))return null;return e}(e);if(!o)return null;const i=Dx(o),r=i.lastIndexOf(n);if(r+n.length!==i.length)return null;if(-1===r)return null;const{parent:s,startOffset:a}=o;return t.createRange(t.createPositionAt(s,a+r),t.createPositionAt(s,a+r+n.length))}function Mx(t,e,n=!1){const o=Bx(e,"language","class"),i=Bx(e,"language","label");return(e,r,s)=>{const{writer:a,mapper:l,consumable:c}=s;if(!c.consume(r.item,"insert"))return;const d=r.item.getAttribute("language"),h=l.toViewPosition(t.createPositionBefore(r.item)),u={};n&&(u["data-language"]=i[d],u.spellcheck="false");const g=a.createContainerElement("code",{class:o[d]||null}),m=a.createContainerElement("pre",u,g);a.insert(h,m),l.bindElements(r.item,g)}}const Ox="paragraph";class Lx extends ge{static get pluginName(){return"CodeBlockEditing"}static get requires(){return[bf]}constructor(t){super(t),t.config.define("codeBlock",{languages:[{language:"plaintext",label:"Plain text"},{language:"c",label:"C"},{language:"cs",label:"C#"},{language:"cpp",label:"C++"},{language:"css",label:"CSS"},{language:"diff",label:"Diff"},{language:"html",label:"HTML"},{language:"java",label:"Java"},{language:"javascript",label:"JavaScript"},{language:"php",label:"PHP"},{language:"python",label:"Python"},{language:"ruby",label:"Ruby"},{language:"typescript",label:"TypeScript"},{language:"xml",label:"XML"}],indentSequence:"\t"})}init(){const t=this.editor,e=t.model.schema,n=t.model,o=(t.editing.view,Tx(t));t.commands.add("codeBlock",new zx(t)),t.commands.add("indentCodeBlock",new Vx(t)),t.commands.add("outdentCodeBlock",new Fx(t));const i=t=>(e,n)=>{this.editor.commands.get(t).isEnabled&&(this.editor.execute(t),n())};t.keystrokes.set("Tab",i("indentCodeBlock")),t.keystrokes.set("Shift+Tab",i("outdentCodeBlock")),e.register("codeBlock",{allowWhere:"$block",allowChildren:"$text",isBlock:!0,allowAttributes:["language"]}),e.addAttributeCheck((t=>{if(t.endsWith("codeBlock $text"))return!1})),t.model.schema.addChildCheck(((t,e)=>{if(t.endsWith("codeBlock")&&e.isObject)return!1})),t.editing.downcastDispatcher.on("insert:codeBlock",Mx(n,o,!0)),t.data.downcastDispatcher.on("insert:codeBlock",Mx(n,o)),t.data.downcastDispatcher.on("insert:softBreak",function(t){return(e,n,o)=>{if("codeBlock"!==n.item.parent.name)return;const{writer:i,mapper:r,consumable:s}=o;if(!s.consume(n.item,"insert"))return;const a=r.toViewPosition(t.createPositionBefore(n.item));i.insert(a,i.createText("\n"))}}(n),{priority:"high"}),t.data.upcastDispatcher.on("element:code",function(t,e){const n=Bx(e,"class","language"),o=e[0].language;return(t,e,i)=>{const r=e.viewItem,s=r.parent;if(!s||!s.is("element","pre"))return;if(e.modelCursor.findAncestor("codeBlock"))return;const{consumable:a,writer:l}=i;if(!a.test(r,{name:!0}))return;const c=l.createElement("codeBlock"),d=[...r.getClassNames()];d.length||d.push("");for(const t of d){const e=n[t];if(e){l.setAttribute("language",e,c);break}}c.hasAttribute("language")||l.setAttribute("language",o,c),i.convertChildren(r,c),i.safeInsert(c,e.modelCursor)&&(a.consume(r,{name:!0}),i.updateConversionResult(c,e))}}(0,o)),t.data.upcastDispatcher.on("text",((t,e,{consumable:n,writer:o})=>{let i=e.modelCursor;if(!n.test(e.viewItem))return;if(!i.findAncestor("codeBlock"))return;n.consume(e.viewItem);const r=e.viewItem.data.split("\n").map((t=>o.createText(t))),s=r[r.length-1];for(const t of r)if(o.insert(t,i),i=i.getShiftedBy(t.offsetSize),t!==s){const t=o.createElement("softBreak");o.insert(t,i),i=o.createPositionAfter(t)}e.modelRange=o.createRange(e.modelCursor,i),e.modelCursor=i})),this.listenTo(t.editing.view.document,"clipboardInput",((e,o)=>{let i=n.createRange(n.document.selection.anchor);if(o.targetRanges&&(i=t.editing.mapper.toModelRange(o.targetRanges[0])),!i.start.parent.is("element","codeBlock"))return;const r=o.dataTransfer.getData("text/plain"),s=new Tg(t.editing.view.document);o.content=function(t,e){const n=t.createDocumentFragment(),o=e.split("\n"),i=o.reduce(((e,n,i)=>(e.push(n),i<o.length-1&&e.push(t.createElement("br")),e)),[]);return t.appendChild(i,n),n}(s,r)})),this.listenTo(n,"getSelectedContent",((t,[o])=>{const i=o.anchor;!o.isCollapsed&&i.parent.is("element","codeBlock")&&i.hasSameParentAs(o.focus)&&n.change((n=>{const r=t.return;if(r.childCount>1||o.containsEntireContent(i.parent)){const e=n.createElement("codeBlock",i.parent.getAttributes());n.append(r,e);const o=n.createDocumentFragment();n.append(e,o),t.return=o}else{const t=r.getChild(0);e.checkAttribute(t,"code")&&n.setAttribute("code",!0,t)}}))}))}afterInit(){const t=this.editor,e=t.commands,n=e.get("indent"),o=e.get("outdent");n&&n.registerChildCommand(e.get("indentCodeBlock")),o&&o.registerChildCommand(e.get("outdentCodeBlock")),this.listenTo(t.editing.view.document,"enter",((e,n)=>{t.model.document.selection.getLastPosition().parent.is("element","codeBlock")&&(function(t,e){const n=t.model.document,o=t.editing.view,i=n.selection.getLastPosition(),r=i.nodeAfter;if(e||!n.selection.isCollapsed||!i.isAtStart)return!1;if(!qx(r))return!1;return t.model.change((e=>{t.execute("enter");const o=n.selection.anchor.parent.previousSibling;e.rename(o,Ox),e.setSelection(o,"in"),t.model.schema.removeDisallowedAttributes([o],e),e.remove(r)})),o.scrollToTheSelection(),!0}(t,n.isSoft)||function(t,e){const n=t.model,o=n.document,i=t.editing.view,r=o.selection.getLastPosition(),s=r.nodeBefore;let a;if(e||!o.selection.isCollapsed||!r.isAtEnd||!s||!s.previousSibling)return!1;if(qx(s)&&qx(s.previousSibling))a=n.createRange(n.createPositionBefore(s.previousSibling),n.createPositionAfter(s));else if(Hx(s)&&qx(s.previousSibling)&&qx(s.previousSibling.previousSibling))a=n.createRange(n.createPositionBefore(s.previousSibling.previousSibling),n.createPositionAfter(s));else{if(!(Hx(s)&&qx(s.previousSibling)&&Hx(s.previousSibling.previousSibling)&&qx(s.previousSibling.previousSibling.previousSibling)))return!1;a=n.createRange(n.createPositionBefore(s.previousSibling.previousSibling.previousSibling),n.createPositionAfter(s))}return t.model.change((e=>{e.remove(a),t.execute("enter");const n=o.selection.anchor.parent;e.rename(n,Ox),t.model.schema.removeDisallowedAttributes([n],e)})),i.scrollToTheSelection(),!0}(t,n.isSoft)||function(t){const e=t.model.document,n=e.selection.getLastPosition(),o=n.nodeBefore||n.textNode;let i;o&&o.is("$text")&&(i=Dx(o));t.model.change((n=>{t.execute("shiftEnter"),i&&n.insertText(i,e.selection.anchor)}))}(t),n.preventDefault(),e.stop())}),{context:"pre"})}}function Hx(t){return t&&t.is("$text")&&!t.data.match(/\S/)}function qx(t){return t&&t.is("element","softBreak")}var Wx=n(8343),Ux={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(Wx.Z,Ux);Wx.Z.locals;class jx extends ge{static get pluginName(){return"CodeBlockUI"}init(){const t=this.editor,e=t.t,n=t.ui.componentFactory,o=Tx(t);n.add("codeBlock",(n=>{const i=t.commands.get("codeBlock"),r=lu(n,Fh),s=r.buttonView;return s.set({label:e("Insert code block"),tooltip:!0,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.87 12.61a.75.75 0 0 1-.089.976l-.085.07-3.154 2.254 3.412 2.414a.75.75 0 0 1 .237.95l-.057.095a.75.75 0 0 1-.95.237l-.096-.058-4.272-3.022-.003-1.223 4.01-2.867a.75.75 0 0 1 1.047.174zm2.795-.231.095.057 4.011 2.867-.003 1.223-4.272 3.022-.095.058a.75.75 0 0 1-.88-.151l-.07-.086-.058-.095a.75.75 0 0 1 .15-.88l.087-.07 3.412-2.414-3.154-2.253-.085-.071a.75.75 0 0 1 .862-1.207zM16 0a2 2 0 0 1 2 2v9.354l-.663-.492-.837-.001V2a.5.5 0 0 0-.5-.5H2a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3.118L7.156 19H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h14zM5.009 15l.003 1H3v-1h2.009zm2.188-2-1.471 1H5v-1h2.197zM10 11v.095L8.668 12H7v-1h3zm4-2v1H7V9h7zm0-2v1H7V7h7zm-4-2v1H5V5h5zM6 3v1H3V3h3z"/></svg>',isToggleable:!0}),s.bind("isOn").to(i,"value",(t=>!!t)),s.on("execute",(()=>{t.execute("codeBlock",{usePreviousLanguageChoice:!0}),t.editing.view.focus()})),r.on("execute",(e=>{t.execute("codeBlock",{language:e.source._codeBlockLanguage,forceValue:!0}),t.editing.view.focus()})),r.class="ck-code-block-dropdown",r.bind("isEnabled").to(i),du(r,this._getLanguageListItemDefinitions(o)),r}))}_getLanguageListItemDefinitions(t){const e=this.editor.commands.get("codeBlock"),n=new Bo;for(const o of t){const t={type:"button",model:new Ru({_codeBlockLanguage:o.language,label:o.label,withText:!0})};t.model.bind("isOn").to(e,"value",(e=>e===t.model._codeBlockLanguage)),n.add(t)}return n}}class $x extends pe{refresh(){const t=this.editor.model,e=t.document;this.isEnabled=t.schema.checkAttributeInSelection(e.selection,"mention")}execute(t){const e=this.editor.model,n=e.document.selection,o="string"==typeof t.mention?{id:t.mention}:t.mention,i=o.id,r=t.range||n.getFirstRange(),s=t.text||i,l=Kx({_text:s,id:i},o);if(1!=t.marker.length)throw new a("mentioncommand-incorrect-marker",this);if(i.charAt(0)!=t.marker)throw new a("mentioncommand-incorrect-id",this);e.change((t=>{const o=Wo(n.getAttributes()),i=new Map(o.entries());i.set("mention",l),e.insertContent(t.createText(s,i),r),e.insertContent(t.createText(" ",o),r.start.getShiftedBy(s.length))}))}}class Gx extends ge{static get pluginName(){return"MentionEditing"}init(){const t=this.editor,e=t.model,n=e.document;e.schema.extend("$text",{allowAttributes:"mention"}),t.conversion.for("upcast").elementToAttribute({view:{name:"span",key:"data-mention",classes:"mention"},model:{key:"mention",value:t=>Zx(t)}}),t.conversion.for("downcast").attributeToElement({model:"mention",view:Yx}),t.conversion.for("downcast").add(Jx),n.registerPostFixer((t=>function(t,e,n){const o=e.differ.getChanges();let i=!1;for(const e of o){const o=e.position;if("$text"==e.name){const e=o.textNode&&o.textNode.nextSibling;i=Xx(o.textNode,t)||i,i=Xx(e,t)||i,i=Xx(o.nodeBefore,t)||i,i=Xx(o.nodeAfter,t)||i}if("$text"!=e.name&&"insert"==e.type){const e=o.nodeAfter;for(const n of t.createRangeIn(e).getItems())i=Xx(n,t)||i}if("insert"==e.type&&n.isInline(e.name)){const e=o.nodeAfter&&o.nodeAfter.nextSibling;i=Xx(o.nodeBefore,t)||i,i=Xx(e,t)||i}}return i}(t,n,e.schema))),n.registerPostFixer((t=>function(t,e){const n=e.differ.getChanges();let o=!1;for(const e of n)if("attribute"===e.type&&"mention"!=e.attributeKey){const n=e.range.start.nodeBefore,i=e.range.end.nodeAfter;for(const r of[n,i])Qx(r)&&r.getAttribute(e.attributeKey)!=e.attributeNewValue&&(t.setAttribute(e.attributeKey,e.attributeNewValue,r),o=!0)}return o}(t,n))),n.registerPostFixer((t=>function(t,e){const n=e.selection,o=n.focus;if(n.isCollapsed&&n.hasAttribute("mention")&&function(t){const e=t.isAtStart;return t.nodeBefore&&t.nodeBefore.is("$text")||e}(o))return t.removeSelectionAttribute("mention"),!0}(t,n))),t.commands.add("mention",new $x(t))}}function Kx(t,e){return Object.assign({uid:r()},t,e||{})}function Zx(t,e){const n=t.getAttribute("data-mention"),o=t.getChild(0);if(!o)return;return Kx({id:n,_text:o.data},e)}function Jx(t){t.on("attribute:mention",((t,e,n)=>{const o=e.attributeNewValue;if(!e.item.is("$textProxy")||!o)return;const i=e.range.start;(i.textNode||i.nodeAfter).data!=o._text&&n.consumable.consume(e.item,t.name)}),{priority:"highest"})}function Yx(t,{writer:e}){if(!t)return;const n={class:"mention","data-mention":t.id},o={id:t.uid,priority:20};return e.createAttributeElement("span",n,o)}function Qx(t){if(!t||!t.is("$text")&&!t.is("$textProxy")||!t.hasAttribute("mention"))return!1;return t.data!=t.getAttribute("mention")._text}function Xx(t,e){return!!Qx(t)&&(e.removeAttribute("mention",t),!0)}var tE=n(7640),eE={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(tE.Z,eE);tE.Z.locals;class nE extends eu{constructor(t){super(t),this.extendTemplate({attributes:{class:["ck-mentions"],tabindex:"-1"}})}selectFirst(){this.select(0)}selectNext(){const t=this.selected,e=this.items.getIndex(t);this.select(e+1)}selectPrevious(){const t=this.selected,e=this.items.getIndex(t);this.select(e-1)}select(t){let e=0;t>0&&t<this.items.length?e=t:t<0&&(e=this.items.length-1);const n=this.items.get(e);this.selected!==n&&(this.selected&&this.selected.removeHighlight(),n.highlight(),this.selected=n,this._isItemVisibleInScrolledArea(n)||(this.element.scrollTop=n.element.offsetTop))}executeSelected(){this.selected.fire("execute")}_isItemVisibleInScrolledArea(t){return new ka(this.element).contains(new ka(t.element))}}class oE extends Wd{constructor(t,e){super(t),this.template=!1,this.domElement=e,this.domElement.classList.add("ck-button"),this.set("isOn",!1),this.on("change:isOn",((t,e,n)=>{n?(this.domElement.classList.add("ck-on"),this.domElement.classList.remove("ck-off")):(this.domElement.classList.add("ck-off"),this.domElement.classList.remove("ck-on"))})),this.listenTo(this.domElement,"click",(()=>{this.fire("execute")}))}render(){super.render(),this.element=this.domElement}}class iE extends nu{highlight(){this.children.first.isOn=!0}removeHighlight(){this.children.first.isOn=!1}}const rE=[hr.arrowup,hr.arrowdown,hr.esc],sE=[hr.enter,hr.tab];class aE extends ge{static get pluginName(){return"MentionUI"}static get requires(){return[Zu]}constructor(t){super(t),this._mentionsView=this._createMentionView(),this._mentionsConfigurations=new Map,this._requestFeedDebounced=aa(this._requestFeed,100),t.config.define("mention",{feeds:[]})}init(){const t=this.editor,e=t.config.get("mention.commitKeys")||sE,n=rE.concat(e);this._balloon=t.plugins.get(Zu),t.editing.view.document.on("keydown",((t,o)=>{if(i=o.keyCode,n.includes(i)&&this._isUIVisible){if(o.keyCode==hr.space)return void this._hideUIAndRemoveMarker();o.preventDefault(),t.stop(),o.keyCode==hr.arrowdown&&this._mentionsView.selectNext(),o.keyCode==hr.arrowup&&this._mentionsView.selectPrevious(),e.includes(o.keyCode)&&this._mentionsView.executeSelected(),o.keyCode==hr.esc&&this._hideUIAndRemoveMarker()}var i}),{priority:"highest"}),Nd({emitter:this._mentionsView,activator:()=>this._isUIVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideUIAndRemoveMarker()});const o=t.config.get("mention.feeds");for(const t of o){const e=t.feed,n=t.marker;if(!uE(n))throw new a("mentionconfig-incorrect-marker",null,{marker:n});const o={marker:n,feedCallback:"function"==typeof e?e.bind(this.editor):hE(e),itemRenderer:t.itemRenderer};this._mentionsConfigurations.set(n,o)}this._setupTextWatcher(o),this.listenTo(t,"change:isReadOnly",(()=>{this._hideUIAndRemoveMarker()})),this.on("requestFeed:response",((t,e)=>this._handleFeedResponse(e))),this.on("requestFeed:error",(()=>this._hideUIAndRemoveMarker()))}destroy(){super.destroy(),this._mentionsView.destroy()}get _isUIVisible(){return this._balloon.visibleView===this._mentionsView}_createMentionView(){const t=this.editor.locale,e=new nE(t);return this._items=new Bo,e.items.bindTo(this._items).using((n=>{const{item:o,marker:i}=n,r=this.editor.config.get("mention.dropdownLimit")||10;if(e.items.length>=r)return;const s=new iE(t),a=this._renderItem(o,i);return a.delegate("execute").to(s),s.children.add(a),s.item=o,s.marker=i,s.on("execute",(()=>{e.fire("execute",{item:o,marker:i})})),s})),e.on("execute",((t,e)=>{const n=this.editor,o=n.model,i=e.item,r=e.marker,s=n.model.markers.get("mention"),a=o.createPositionAt(o.document.selection.focus),l=o.createPositionAt(s.getStart()),c=o.createRange(l,a);this._hideUIAndRemoveMarker(),n.execute("mention",{mention:i,text:i.text,marker:r,range:c}),n.editing.view.focus()})),e}_getItemRenderer(t){const{itemRenderer:e}=this._mentionsConfigurations.get(t);return e}_requestFeed(t,e){this._lastRequested=e;const{feedCallback:n}=this._mentionsConfigurations.get(t),o=n(e);o instanceof Promise?o.then((n=>{this._lastRequested==e?this.fire("requestFeed:response",{feed:n,marker:t,feedText:e}):this.fire("requestFeed:discarded",{feed:n,marker:t,feedText:e})})).catch((e=>{this.fire("requestFeed:error",{error:e}),l("mention-feed-callback-error",{marker:t})})):this.fire("requestFeed:response",{feed:o,marker:t,feedText:e})}_setupTextWatcher(t){const e=this.editor,n=t.map((t=>({...t,pattern:dE(t.marker,t.minimumCharacters||0)}))),o=new dp(e.model,function(t){return e=>{const n=cE(t,e);if(!n)return!1;let o=0;0!==n.position&&(o=n.position-1);const i=e.substring(o);return n.pattern.test(i)}}(n));o.on("matched:data",((t,o)=>{const i=cE(n,o.text),r=e.model.document.selection.focus;if(function(t){const e=t.textNode&&t.textNode.hasAttribute("mention"),n=t.nodeBefore;return e||n&&n.is("$text")&&n.hasAttribute("mention")}(r))return void this._hideUIAndRemoveMarker();const s=function(t,e){let n=0;0!==t.position&&(n=t.position-1);const o=dE(t.marker,0),i=e.substring(n);return i.match(o)[2]}(i,o.text),a=i.marker.length+s.length,l=r.getShiftedBy(-a),c=r.getShiftedBy(-s.length),d=e.model.createRange(l,c);if(gE(e)){const t=e.model.markers.get("mention");e.model.change((e=>{e.updateMarker(t,{range:d})}))}else e.model.change((t=>{t.addMarker("mention",{range:d,usingOperation:!1,affectsData:!1})}));this._requestFeedDebounced(i.marker,s)})),o.on("unmatched",(()=>{this._hideUIAndRemoveMarker()}));const i=e.commands.get("mention");return o.bind("isEnabled").to(i),o}_handleFeedResponse(t){const{feed:e,marker:n}=t;if(!gE(this.editor))return;this._items.clear();for(const t of e){const e="object"!=typeof t?{id:t,text:t}:t;this._items.add({item:e,marker:n})}const o=this.editor.model.markers.get("mention");this._items.length?this._showOrUpdateUI(o):this._hideUIAndRemoveMarker()}_showOrUpdateUI(t){this._isUIVisible?this._balloon.updatePosition(this._getBalloonPanelPositionData(t,this._mentionsView.position)):this._balloon.add({view:this._mentionsView,position:this._getBalloonPanelPositionData(t,this._mentionsView.position),singleViewMode:!0}),this._mentionsView.position=this._balloon.view.position,this._mentionsView.selectFirst()}_hideUIAndRemoveMarker(){this._balloon.hasView(this._mentionsView)&&this._balloon.remove(this._mentionsView),gE(this.editor)&&this.editor.model.change((t=>t.removeMarker("mention"))),this._mentionsView.position=void 0}_renderItem(t,e){const n=this.editor;let o,i=t.id;const r=this._getItemRenderer(e);if(r){const e=r(t);"string"!=typeof e?o=new oE(n.locale,e):i=e}if(!o){const t=new wh(n.locale);t.label=i,t.withText=!0,o=t}return o}_getBalloonPanelPositionData(t,e){const n=this.editor,o=n.editing,i=o.view.domConverter,r=o.mapper;return{target:()=>{let e=t.getRange();"$graveyard"==e.start.root.rootName&&(e=n.model.document.selection.getFirstRange());const o=r.toViewRange(e);return ka.getDomRangeRects(i.viewRangeToDom(o)).pop()},limiter:()=>{const t=this.editor.editing.view,e=t.document.selection.editableElement;return e?t.domConverter.mapViewToDom(e.root):null},positions:lE(e)}}}function lE(t){const e={caret_se:t=>({top:t.bottom+3,left:t.right,name:"caret_se",config:{withArrow:!1}}),caret_ne:(t,e)=>({top:t.top-e.height-3,left:t.right,name:"caret_ne",config:{withArrow:!1}}),caret_sw:(t,e)=>({top:t.bottom+3,left:t.right-e.width,name:"caret_sw",config:{withArrow:!1}}),caret_nw:(t,e)=>({top:t.top-e.height-3,left:t.right-e.width,name:"caret_nw",config:{withArrow:!1}})};return Object.prototype.hasOwnProperty.call(e,t)?[e[t]]:[e.caret_se,e.caret_sw,e.caret_ne,e.caret_nw]}function cE(t,e){let n;for(const o of t){const t=e.lastIndexOf(o.marker);t>0&&!e.substring(t-1).match(o.pattern)||(!n||t>=n.position)&&(n={marker:o.marker,position:t,minimumCharacters:o.minimumCharacters,pattern:o.pattern})}return n}function dE(t,e){const n=0==e?"*":`{${e},}`,o=ar.features.isRegExpUnicodePropertySupported?"\\p{Ps}\\p{Pi}\"'":"\\(\\[{\"'";return new RegExp(`(?:^|[= ${o}])([${t}])([^=]${n})$`,"u")}function hE(t){return e=>t.filter((t=>("string"==typeof t?t:String(t.id)).toLowerCase().includes(e.toLowerCase())))}function uE(t){return t&&1==t.length}function gE(t){return t.model.markers.has("mention")}var mE=n(5023),pE={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(mE.Z,pE);mE.Z.locals;class fE extends ge{static get pluginName(){return"IndentEditing"}init(){const t=this.editor;t.commands.add("indent",new be(t)),t.commands.add("outdent",new be(t))}}const bE='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zM1.632 6.95 5.02 9.358a.4.4 0 0 1-.013.661l-3.39 2.207A.4.4 0 0 1 1 11.892V7.275a.4.4 0 0 1 .632-.326z"/></svg>',kE='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zm1.618-9.55L.98 9.358a.4.4 0 0 0 .013.661l3.39 2.207A.4.4 0 0 0 5 11.892V7.275a.4.4 0 0 0-.632-.326z"/></svg>';class wE extends ge{static get pluginName(){return"IndentUI"}init(){const t=this.editor,e=t.locale,n=t.t,o="ltr"==e.uiLanguageDirection?bE:kE,i="ltr"==e.uiLanguageDirection?kE:bE;this._defineButton("indent",n("Increase indent"),o),this._defineButton("outdent",n("Decrease indent"),i)}_defineButton(t,e,n){const o=this.editor;o.ui.componentFactory.add(t,(i=>{const r=o.commands.get(t),s=new wh(i);return s.set({label:e,icon:n,tooltip:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(s,"execute",(()=>{o.execute(t),o.editing.view.focus()})),s}))}}class CE extends pe{constructor(t,e){super(t),this._indentBehavior=e}refresh(){const t=this.editor.model,e=xa(t.document.selection.getSelectedBlocks());e&&t.schema.checkAttribute(e,"blockIndent")?this.isEnabled=this._indentBehavior.checkEnabled(e.getAttribute("blockIndent")):this.isEnabled=!1}execute(){const t=this.editor.model,e=function(t){const e=t.document.selection,n=t.schema;return Array.from(e.getSelectedBlocks()).filter((t=>n.checkAttribute(t,"blockIndent")))}(t);t.change((t=>{for(const n of e){const e=n.getAttribute("blockIndent"),o=this._indentBehavior.getNextIndent(e);o?t.setAttribute("blockIndent",o,n):t.removeAttribute("blockIndent",n)}}))}}class AE{constructor(t){this.isForward="forward"===t.direction,this.offset=t.offset,this.unit=t.unit}checkEnabled(t){const e=parseFloat(t||0);return this.isForward||e>0}getNextIndent(t){const e=parseFloat(t||0);if(!(!t||t.endsWith(this.unit)))return this.isForward?this.offset+this.unit:void 0;const n=e+(this.isForward?this.offset:-this.offset);return n>0?n+this.unit:void 0}}class _E{constructor(t){this.isForward="forward"===t.direction,this.classes=t.classes}checkEnabled(t){const e=this.classes.indexOf(t);return this.isForward?e<this.classes.length-1:e>=0}getNextIndent(t){const e=this.classes.indexOf(t),n=this.isForward?1:-1;return this.classes[e+n]}}const vE=["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"];class yE extends pe{constructor(t){super(t),this.affectsData=!1}execute(){const t=this.editor.model,e=t.document.selection;let n=t.schema.getLimitElement(e);if(e.containsEntireContent(n)||!xE(t.schema,n))do{if(n=n.parent,!n)return}while(!xE(t.schema,n));t.change((t=>{t.setSelection(n,"in")}))}}function xE(t,e){return t.isLimit(e)&&(t.checkChild(e,"$text")||t.checkChild(e,"paragraph"))}const EE=mr("Ctrl+A");class SE extends ge{static get pluginName(){return"SelectAllEditing"}init(){const t=this.editor,e=t.editing.view.document;t.commands.add("selectAll",new yE(t)),this.listenTo(e,"keydown",((e,n)=>{gr(n)===EE&&(t.execute("selectAll"),n.preventDefault())}))}}class TE extends ge{static get pluginName(){return"SelectAllUI"}init(){const t=this.editor;t.ui.componentFactory.add("selectAll",(e=>{const n=t.commands.get("selectAll"),o=new wh(e),i=e.t;return o.set({label:i("Select all"),icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75zm18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75zm-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5h8.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5h2.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5h5.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0h2.25zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5h2.25zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6z"/></svg>',keystroke:"Ctrl+A",tooltip:!0}),o.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(o,"execute",(()=>{t.execute("selectAll"),t.editing.view.focus()})),o}))}}class BE extends ge{static get requires(){return[SE,TE]}static get pluginName(){return"SelectAll"}}class DE extends pe{refresh(){const t=this.editor.model,e=t.schema,n=t.document.selection;this.isEnabled=function(t,e,n){const o=function(t,e){const n=Yf(t,e).start.parent;if(n.isEmpty&&!n.is("element","$root"))return n.parent;return n}(t,n);return e.checkChild(o,"horizontalLine")}(n,e,t)}execute(){const t=this.editor.model;t.change((e=>{const n=e.createElement("horizontalLine");t.insertContent(n);let o=n.nextSibling;!(o&&t.schema.checkChild(o,"$text"))&&t.schema.checkChild(n.parent,"paragraph")&&(o=e.createElement("paragraph"),t.insertContent(o,e.createPositionAfter(n))),o&&e.setSelection(o,0)}))}}var IE=n(2974),PE={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(IE.Z,PE);IE.Z.locals;class zE extends ge{static get pluginName(){return"HorizontalLineEditing"}init(){const t=this.editor,e=t.model.schema,n=t.t,o=t.conversion;e.register("horizontalLine",{isObject:!0,allowWhere:"$block"}),o.for("dataDowncast").elementToElement({model:"horizontalLine",view:(t,{writer:e})=>e.createEmptyElement("hr")}),o.for("editingDowncast").elementToStructure({model:"horizontalLine",view:(t,{writer:e})=>{const o=n("Horizontal line"),i=e.createContainerElement("div",null,e.createEmptyElement("hr"));return e.addClass("ck-horizontal-line",i),e.setCustomProperty("hr",!0,i),function(t,e,n){return e.setCustomProperty("horizontalLine",!0,t),jf(t,e,{label:n})}(i,e,o)}}),o.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),t.commands.add("horizontalLine",new DE(t))}}class RE extends ge{static get pluginName(){return"HorizontalLineUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("horizontalLine",(n=>{const o=t.commands.get("horizontalLine"),i=new wh(n);return i.set({label:e("Horizontal line"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 9h16v2H2z"/></svg>',tooltip:!0}),i.bind("isEnabled").to(o,"isEnabled"),this.listenTo(i,"execute",(()=>{t.execute("horizontalLine"),t.editing.view.focus()})),i}))}}class VE extends pe{constructor(t){super(t),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this.listenTo(t.data,"set",((t,e)=>{e[1]={...e[1]};const n=e[1];n.batchType||(n.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(t.data,"set",((t,e)=>{e[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}addBatch(t){const e=this.editor.model.document.selection,n={ranges:e.hasOwnRange?Array.from(e.getRanges()):[],isBackward:e.isBackward};this._stack.push({batch:t,selection:n}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(t,e,n){const o=this.editor.model,i=o.document,r=[],s=t.map((t=>t.getTransformedByOperations(n))),a=s.flat();for(const t of s){const e=t.filter((t=>t.root!=i.graveyard)).filter((t=>!NE(t,a)));e.length&&(FE(e),r.push(e[0]))}r.length&&o.change((t=>{t.setSelection(r,{backward:e})}))}_undo(t,e){const n=this.editor.model,o=n.document;this._createdBatches.add(e);const i=t.operations.slice().filter((t=>t.isDocumentOperation));i.reverse();for(const t of i){const i=t.baseVersion+1,r=Array.from(o.history.getOperations(i)),s=wg([t.getReversed()],r,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(const i of s)e.addOperation(i),n.applyOperation(i),o.history.setOperationAsUndone(t,i)}}}function FE(t){t.sort(((t,e)=>t.start.isBefore(e.start)?-1:1));for(let e=1;e<t.length;e++){const n=t[e-1].getJoined(t[e],!0);n&&(e--,t.splice(e,2,n))}}function NE(t,e){return e.some((e=>e!==t&&e.containsRange(t,!0)))}class ME extends VE{execute(t=null){const e=t?this._stack.findIndex((e=>e.batch==t)):this._stack.length-1,n=this._stack.splice(e,1)[0],o=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(o,(()=>{this._undo(n.batch,o);const t=this.editor.model.document.history.getOperations(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,t),this.fire("revert",n.batch,o)})),this.refresh()}}class OE extends VE{execute(){const t=this._stack.pop(),e=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(e,(()=>{const n=t.batch.operations[t.batch.operations.length-1].baseVersion+1,o=this.editor.model.document.history.getOperations(n);this._restoreSelection(t.selection.ranges,t.selection.isBackward,o),this._undo(t.batch,e)})),this.refresh()}}class LE extends ge{static get pluginName(){return"UndoEditing"}constructor(t){super(t),this._batchRegistry=new WeakSet}init(){const t=this.editor;this._undoCommand=new ME(t),this._redoCommand=new OE(t),t.commands.add("undo",this._undoCommand),t.commands.add("redo",this._redoCommand),this.listenTo(t.model,"applyOperation",((t,e)=>{const n=e[0];if(!n.isDocumentOperation)return;const o=n.batch,i=this._redoCommand._createdBatches.has(o),r=this._undoCommand._createdBatches.has(o);this._batchRegistry.has(o)||(this._batchRegistry.add(o),o.isUndoable&&(i?this._undoCommand.addBatch(o):r||(this._undoCommand.addBatch(o),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((t,e,n)=>{this._redoCommand.addBatch(n)})),t.keystrokes.set("CTRL+Z","undo"),t.keystrokes.set("CTRL+Y","redo"),t.keystrokes.set("CTRL+SHIFT+Z","redo")}}const HE='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.75.75 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032H5.042z"/></svg>',qE='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z"/></svg>';class WE extends ge{static get pluginName(){return"UndoUI"}init(){const t=this.editor,e=t.locale,n=t.t,o="ltr"==e.uiLanguageDirection?HE:qE,i="ltr"==e.uiLanguageDirection?qE:HE;this._addButton("undo",n("Undo"),"CTRL+Z",o),this._addButton("redo",n("Redo"),"CTRL+Y",i)}_addButton(t,e,n,o){const i=this.editor;i.ui.componentFactory.add(t,(r=>{const s=i.commands.get(t),a=new wh(r);return a.set({label:e,icon:o,keystroke:n,tooltip:!0}),a.bind("isEnabled").to(s,"isEnabled"),this.listenTo(a,"execute",(()=>{i.execute(t),i.editing.view.focus()})),a}))}}class UE extends ge{static get requires(){return[LE,WE]}static get pluginName(){return"Undo"}}const jE="removeFormat";class $E extends ge{static get pluginName(){return"RemoveFormatUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(jE,(n=>{const o=t.commands.get(jE),i=new wh(n);return i.set({label:e("Remove Format"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.69 14.915c.053.052.173.083.36.093a.366.366 0 0 1 .345.485l-.003.01a.738.738 0 0 1-.697.497h-2.67a.374.374 0 0 1-.353-.496l.013-.038a.681.681 0 0 1 .644-.458c.197-.012.325-.043.386-.093a.28.28 0 0 0 .072-.11L9.592 4.5H6.269c-.359-.017-.609.013-.75.09-.142.078-.289.265-.442.563-.192.29-.516.464-.864.464H4.17a.43.43 0 0 1-.407-.569L4.46 3h13.08l-.62 2.043a.81.81 0 0 1-.775.574h-.114a.486.486 0 0 1-.486-.486c.001-.284-.054-.464-.167-.54-.112-.076-.367-.106-.766-.091h-3.28l-2.68 10.257c-.006.074.007.127.038.158zM3 17h8a.5.5 0 1 1 0 1H3a.5.5 0 1 1 0-1zm11.299 1.17a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.06-1.06l1.415 1.414 1.414-1.415a.75.75 0 1 1 1.06 1.06l-1.413 1.415 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414-1.414 1.414z"/></svg>',tooltip:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(jE),t.editing.view.focus()})),i}))}}class GE extends pe{refresh(){const t=this.editor.model;this.isEnabled=!!xa(this._getFormattingItems(t.document.selection,t.schema))}execute(){const t=this.editor.model,e=t.schema;t.change((n=>{for(const o of this._getFormattingItems(t.document.selection,e))if(o.is("selection"))for(const t of this._getFormattingAttributes(o,e))n.removeSelectionAttribute(t);else{const t=n.createRangeOn(o);for(const i of this._getFormattingAttributes(o,e))n.removeAttribute(i,t)}}))}*_getFormattingItems(t,e){const n=t=>!!xa(this._getFormattingAttributes(t,e));for(const o of t.getRanges())for(const t of o.getItems())!e.isBlock(t)&&n(t)&&(yield t);for(const e of t.getSelectedBlocks())n(e)&&(yield e);n(t)&&(yield t)}*_getFormattingAttributes(t,e){for(const[n]of t.getAttributes()){const t=e.getAttributeProperties(n);t&&t.isFormatting&&(yield n)}}}class KE extends ge{static get pluginName(){return"RemoveFormatEditing"}init(){const t=this.editor;t.commands.add("removeFormat",new GE(t))}}class ZE extends pe{execute(t){const{model:e}=this.editor,{document:n}=e,{selection:o}=n,{mention:i}=t,r=t.range||o.getFirstRange();if(i.id.startsWith("#")||i.id.startsWith("~"))e.change((t=>{e.insertContent(t.createText(i.id,{}),r)}));else if("create-note"===i.action){const t=this.editor.editing.view.getDomRoot();glob.getComponentByEl(t).createNoteForReferenceLink(i.noteTitle).then((t=>{this.insertReference(r,t)}))}else this.insertReference(r,t.mention.notePath)}insertReference(t,e){const{model:n}=this.editor;n.change((o=>{n.insertContent(o.createText("",{}),t),this.editor.execute("referenceLink",{notePath:e})}))}}class JE{constructor(t){this.loader=t}upload(){return this.loader.file.then((t=>new Promise(((e,n)=>{this._initRequest().then((()=>{this._initListeners(e,n,t),this._sendRequest(t)}))}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){return glob.getHeaders().then((t=>{const e=this.xhr=new XMLHttpRequest,{noteId:n}=glob.getActiveTabNote(),o="api/images?noteId="+n;e.open("POST",o,!0),e.responseType="json";for(const n in t)e.setRequestHeader(n,t[n])}))}async _initListeners(t,e){const n=this.xhr,o=this.loader,i=`Cannot upload file: ${(await o.file).name}.`;n.addEventListener("error",(()=>e(i))),n.addEventListener("abort",(()=>e())),n.addEventListener("load",(()=>{const o=n.response;if(!o||!o.uploaded)return e(o&&o.error&&o.error.message?o.error.message:i);t({default:o.url})})),n.upload&&n.upload.addEventListener("progress",(t=>{t.lengthComputable&&(o.uploadTotal=t.total,o.uploaded=t.loaded)}))}async _sendRequest(){const t=new FormData;t.append("upload",await this.loader.file),this.xhr.send(t)}}class YE extends ge{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("includeNote",(n=>{const o=t.commands.get("insertIncludeNote"),i=new wh(n);return i.set({label:e("Include note"),icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19,3H5C3.897,3,3,3.897,3,5v14c0,1.103,0.897,2,2,2h8c0.131,0,0.26-0.026,0.381-0.076s0.232-0.123,0.326-0.217l7-7 c0.086-0.086,0.147-0.187,0.196-0.293c0.014-0.03,0.022-0.061,0.033-0.093c0.028-0.084,0.046-0.17,0.051-0.259 C20.989,13.041,21,13.021,21,13V5C21,3.897,20.103,3,19,3z M5,5h14v7h-6c-0.553,0-1,0.448-1,1v6H5V5z M14,17.586V14h3.586 L14,17.586z"/></svg>',tooltip:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>t.execute("insertIncludeNote"))),i}))}}class QE extends ge{static get requires(){return[mb]}init(){this._defineSchema(),this._defineConverters(),this.editor.commands.add("insertIncludeNote",new XE(this.editor))}_defineSchema(){this.editor.model.schema.register("includeNote",{isObject:!0,allowAttributes:["noteId","boxSize"],allowWhere:"$block"})}_defineConverters(){const t=this.editor,e=t.conversion;e.for("upcast").elementToElement({model:(t,{writer:e})=>e.createElement("includeNote",{noteId:t.getAttribute("data-note-id"),boxSize:t.getAttribute("data-box-size")}),view:{name:"section",classes:"include-note"}}),e.for("dataDowncast").elementToElement({model:"includeNote",view:(t,{writer:e})=>e.createContainerElement("section",{class:"include-note","data-note-id":t.getAttribute("noteId"),"data-box-size":t.getAttribute("boxSize")})}),e.for("editingDowncast").elementToElement({model:"includeNote",view:(e,{writer:n})=>{const o=e.getAttribute("noteId"),i=e.getAttribute("boxSize"),r=n.createContainerElement("section",{class:"include-note box-size-"+i,"data-note-id":o,"data-box-size":i}),s=n.createUIElement("div",{class:"include-note-wrapper"},(function(e){const n=this.toDomElement(e),i=t.editing.view.getDomRoot();return glob.getComponentByEl(i).loadIncludedNote(o,$(n)),function(t,e){function n(t){t.stopPropagation(),e.editing.view._renderer.isFocused=!1}t.addEventListener("mousedown",n,{capture:!0}),t.addEventListener("focus",n,{capture:!0}),t.addEventListener("keydown",n,{capture:!0})}(n,t),n}));return n.insert(n.createPositionAt(r,0),s),jf(r,n,{label:"include note widget"})}})}}class XE extends pe{execute(){const t=this.editor.editing.view.getDomRoot();glob.getComponentByEl(t).triggerCommand("addIncludeNoteToText")}refresh(){const t=this.editor.model,e=t.document.selection,n=t.schema.findAllowedParent(e.getFirstPosition(),"includeNote");this.isEnabled=null!==n}}class tS extends pe{execute({notePath:t}){if(!t||!t.trim())return;const e=this.editor,n=t.split("/").pop();glob.treeCache.getNote(n,!0).then((()=>{e.model.change((n=>{const o=n.createElement("reference",{notePath:t});e.model.insertContent(o),n.setSelection(o,"after")}))}))}refresh(){const t=this.editor.model,e=t.document.selection;this.isEnabled=t.schema.checkChild(e.focus.parent,"reference")}}class eS extends ge{static get requires(){return[mb]}init(){this._defineSchema(),this._defineConverters(),this.editor.commands.add("referenceLink",new tS(this.editor)),this.editor.editing.mapper.on("viewToModelPosition",Qf(this.editor.model,(t=>t.hasClass("reference-link"))))}_defineSchema(){this.editor.model.schema.register("reference",{allowWhere:"$text",isInline:!0,isObject:!0,allowAttributes:["notePath"]})}_defineConverters(){const t=this.editor,e=t.conversion;e.for("upcast").elementToElement({view:{name:"a",classes:["reference-link"]},model:(t,{writer:e})=>{let n=t.getAttribute("data-note-path");return n||(n=t.getAttribute("href")),e.createElement("reference",{notePath:n})}}),e.for("editingDowncast").elementToElement({model:"reference",view:(e,{writer:n})=>{let o=e.getAttribute("notePath");o||(o=e.getAttribute("href"));const i=n.createContainerElement("a",{href:"javascript:",class:"reference-link","data-note-path":o}),r=n.createUIElement("span",{},(function(e){const n=this.toDomElement(e),i=o.split("/").pop(),r=t.editing.view.getDomRoot();return glob.getComponentByEl(r).loadReferenceLinkTitle(i,$(n)),n}));return n.insert(n.createPositionAt(i,0),r),jf(i,n)}}),e.for("dataDowncast").elementToElement({model:"reference",view:(t,{writer:e})=>{let n=t.getAttribute("notePath");n||(n=t.getAttribute("href"));const o=e.createContainerElement("a",{href:"#"+n,class:"reference-link","data-note-path":n}),i=n.split("/").pop(),r=glob.treeCache.getNoteFromCache(i);if(r){const t=e.createText(r.title);e.insert(e.createPositionAt(o,0),t)}return o}})}}function nS(t){return t.match(/^(\\\[.*?\\\]|\\\(.*?\\\))$/)}function oS(t){const e=(t=t.trim()).includes("\\(")&&t.includes("\\)"),n=t.includes("\\[")&&t.includes("\\]");return(e||n)&&(t=t.substring(2,t.length-2).trim()),{equation:t,display:n}}async function iS(t,e,n="katex",o,i=!1,r=!1,s,a=[]){if("mathjax"===n&&"undefined"!=typeof MathJax)!function(t){return t&&"string"==typeof t&&3===t.split(".").length&&"3"===t.split(".")[0]}(MathJax.version)?sS(e,r,s,a,(n=>{rs.window.setTimeout((()=>{!function(t,e,n){e.innerHTML=n?"\\["+t+"\\]":"\\("+t+"\\)";MathJax.Hub.Queue(["Typeset",MathJax.Hub,e])}(t,n,i),r&&MathJax.Hub.Queue((()=>{aS(e,n),n.style.visibility="visible"}))}))})):sS(e,r,s,a,(n=>{!function(t,e,n,o){let i;void 0!==MathJax.tex2chtmlPromise?i=MathJax.tex2chtmlPromise:void 0!==MathJax.tex2svgPromise&&(i=MathJax.tex2svgPromise);void 0!==i&&i(t,{display:n}).then((t=>{e.firstChild&&e.removeChild(e.firstChild),e.appendChild(t),o()}))}(t,n,i,(()=>{r&&(aS(e,n),n.style.visibility="visible")}))}));else if("katex"===n&&"undefined"!=typeof katex)sS(e,r,s,a,(n=>{katex.render(t,n,{throwOnError:!1,displayMode:i}),r&&(aS(e,n),n.style.visibility="visible")}));else if("function"==typeof n)n(t,e,i);else if(void 0!==o)try{rs.window.CKEDITOR_MATH_LAZY_LOAD||(rs.window.CKEDITOR_MATH_LAZY_LOAD=o()),e.innerHTML=t,await rs.window.CKEDITOR_MATH_LAZY_LOAD,iS(t,e,n,void 0,i,r,s,a)}catch(n){e.innerHTML=t,console.error(`math-tex-typesetting-lazy-load-failed: Lazy load failed: ${n}`)}else e.innerHTML=t,console.warn(`math-tex-typesetting-missing: Missing the mathematical typesetting engine (${n}) for tex.`)}function rS(t){const e=t.editing.view,n=Lu.defaultPositions,o=e.document.selection.getSelectedElement();if(o)return{target:e.domConverter.viewToDom(o),positions:[n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast]};{const t=e.document;return{target:e.domConverter.viewRangeToDom(t.selection.getFirstRange()),positions:[n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast]}}}function sS(t,e,n,o,i){e?function(t,e,n,o){const i=function(t,e,n){let o=rs.document.getElementById(e);if(!o){o=rs.document.createElement("div"),o.setAttribute("id",e),o.classList.add(...n),o.style.visibility="hidden",rs.document.body.appendChild(o);let i=!1;const r=()=>{i||(rs.window.requestAnimationFrame((()=>{lS(t,o),i=!1})),i=!0)};rs.window.addEventListener("resize",r),rs.window.addEventListener("scroll",r)}return o}(t,e,n);o(i)}(t,n,o,(t=>{i(t)})):i(t)}function aS(t,e){lS(t,e);const n=e.getBoundingClientRect();t.style.width=n.width+"px",t.style.height=n.height+"px"}function lS(t,e){const n=t.getBoundingClientRect(),o=rs.window.scrollX+n.left,i=rs.window.scrollY+n.top;e.style.position="absolute",e.style.left=o+"px",e.style.top=i+"px",e.style.zIndex="var(--ck-z-modal)",e.style.pointerEvents="none"}var cS=n(2053),dS={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(cS.Z,dS);cS.Z.locals;class hS extends Wd{constructor(t,e){super(t);const n=`ck-input-${r()}`,o=`ck-status-${r()}`;this.set("label"),this.set("value"),this.set("isReadOnly",!1),this.set("errorText",null),this.set("infoText",null),this.labelView=this._createLabelView(n),this.inputView=this._createInputView(e,n,o),this.statusView=this._createStatusView(o),this.bind("_statusText").to(this,"errorText",this,"infoText",((t,e)=>t||e));const i=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-input",i.if("isReadOnly","ck-disabled")]},children:[this.labelView,this.inputView,this.statusView]})}_createLabelView(t){const e=new fu(this.locale);return e.for=t,e.bind("text").to(this,"label"),e}_createInputView(t,e,n){const o=new t(this.locale,n);return o.id=e,o.ariaDescribedById=n,o.bind("value").to(this),o.bind("isReadOnly").to(this),o.bind("hasError").to(this,"errorText",(t=>!!t)),o.on("input",(()=>{this.errorText=null})),o}_createStatusView(t){const e=new Wd(this.locale),n=this.bindTemplate;return e.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-input__status",n.if("errorText","ck-labeled-input__status_error"),n.if("_statusText","ck-hidden",(t=>!t))],id:t,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),e}select(){this.inputView.select()}focus(){this.inputView.focus()}}class uS extends Wd{constructor(t,e,n,o,i){super(n),this.engine=t,this.lazyLoad=e,this.previewUid=o,this.previewClassName=i,this.set("value",""),this.set("display",!1),this.on("change",(()=>{this.isRendered&&this.updateMath()})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-math-preview"]}})}updateMath(){iS(this.value,this.element,this.engine,this.lazyLoad,this.display,!0,this.previewUid,this.previewClassName)}render(){super.render(),this.updateMath()}}var gS=n(4722),mS={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Qr()(gS.Z,mS);gS.Z.locals;class pS extends Wd{constructor(t,e,n,o,i,r,s){super(t);const a=t.t;this._createKeyAndFocusTrackers(),this.saveButtonView=this._createButton(a("Save"),zd,"ck-button-save",null),this.saveButtonView.type="submit",this.mathInputView=this._createMathInput(),this.displayButtonView=this._createDisplayButton(),this.cancelButtonView=this._createButton(a("Cancel"),Pd,"ck-button-cancel","cancel"),this.previewEnabled=o;let l=[];this.previewEnabled?(this.previewLabel=new fu(t),this.previewLabel.text=a("Equation preview"),this.mathView=new uS(e,n,t,i,r),this.mathView.bind("display").to(this.displayButtonView,"isOn"),l=[this.mathInputView,this.displayButtonView,this.previewLabel,this.mathView]):l=[this.mathInputView,this.displayButtonView],this.setTemplate({tag:"form",attributes:{class:["ck","ck-math-form",...s],tabindex:"-1",spellcheck:"false"},children:[{tag:"div",attributes:{class:["ck-math-view"]},children:l},this.saveButtonView,this.cancelButtonView]})}render(){super.render(),Od({view:this});[this.mathInputView,this.displayButtonView,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}get equation(){return this.mathInputView.inputView.element.value}set equation(t){this.mathInputView.inputView.element.value=t,this.previewEnabled&&(this.mathView.value=t)}_createKeyAndFocusTrackers(){this.focusTracker=new Ea,this.keystrokes=new Sa,this._focusables=new Ld,this._focusCycler=new Sh({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}})}_createMathInput(){const t=this.locale.t,e=new hS(this.locale,xu),n=e.inputView;e.infoText=t("Insert equation in TeX format.");const o=()=>{if(null!=n.element){let t=n.element.value.trim();if(nS(t)){const e=oS(t);n.element.value=e.equation,t=e.equation,this.displayButtonView.isOn=e.display}this.previewEnabled&&(this.mathView.value=t),this.saveButtonView.isEnabled=!!t}};return n.on("render",o),n.on("input",o),e}_createButton(t,e,n,o){const i=new wh(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i.extendTemplate({attributes:{class:n}}),o&&i.delegate("execute").to(this,o),i}_createDisplayButton(){const t=this.locale.t,e=new _h(this.locale);return e.set({label:t("Display mode"),withText:!0}),e.extendTemplate({attributes:{class:"ck-button-display-toggle"}}),e.on("execute",(()=>{e.isOn=!e.isOn,this.previewEnabled&&(this.mathView.display=e.isOn)})),e}}class fS extends pe{execute(t,e,n,o){const i=this.editor.model,r=i.document.selection.getSelectedElement();i.change((s=>{let a;if(r&&(r.is("element","mathtex-inline")||r.is("element","mathtex-display"))){const i=r.getAttribute("type"),l=o?n:i||n;a=s.createElement(e?"mathtex-display":"mathtex-inline",{equation:t,type:l,display:e})}else a=s.createElement(e?"mathtex-display":"mathtex-inline",{equation:t,type:n,display:e});i.insertContent(a)}))}refresh(){const t=this.editor.model.document.selection,e=t.getSelectedElement();this.isEnabled=null===e||e.is("element","mathtex-inline")||e.is("element","mathtex-display");const n=function(t){const e=t.getSelectedElement();return e&&(e.is("element","mathtex-inline")||e.is("element","mathtex-display"))?e:null}(t);this.value=n?n.getAttribute("equation"):null,this.display=n?n.getAttribute("display"):null}}class bS extends ge{static get requires(){return[mb]}static get pluginName(){return"MathEditing"}init(){const t=this.editor;t.commands.add("math",new fS(t)),this._defineSchema(),this._defineConverters(),t.editing.mapper.on("viewToModelPosition",Qf(t.model,(t=>t.hasClass("math")))),t.config.define("math",{engine:"mathjax",outputType:"script",forceOutputType:!1,enablePreview:!0,previewClassName:[],popupClassName:[]})}_defineSchema(){const t=this.editor.model.schema;t.register("mathtex-inline",{allowWhere:"$text",isInline:!0,isObject:!0,allowAttributes:["equation","type","display"]}),t.register("mathtex-display",{allowWhere:"$block",isInline:!1,isObject:!0,allowAttributes:["equation","type","display"]})}_defineConverters(){const t=this.editor.conversion,e=this.editor.config.get("math");function n(t,n){const o=t.getAttribute("equation"),i=t.getAttribute("display"),r="user-select: none; "+(i?"":"display: inline-block;"),s="ck-math-tex "+(i?"ck-math-tex-display":"ck-math-tex-inline"),a=n.createContainerElement(i?"div":"span",{style:r,class:s}),l=n.createUIElement("div",null,(function(t){const n=this.toDomElement(t);return iS(o,n,e.engine,e.lazyLoad,i,!1),n}));return n.insert(n.createPositionAt(a,0),l),a}function o(t,{writer:e}){const n=t.getAttribute("equation"),o=t.getAttribute("type"),i=t.getAttribute("display");if("span"===o){const t=e.createContainerElement("span",{class:"math-tex"});return i?e.insert(e.createPositionAt(t,0),e.createText("\\["+n+"\\]")):e.insert(e.createPositionAt(t,0),e.createText("\\("+n+"\\)")),t}{const t=e.createContainerElement("script",{type:i?"math/tex; mode=display":"math/tex"});return e.insert(e.createPositionAt(t,0),e.createText(n)),t}}t.for("upcast").elementToElement({view:{name:"script",attributes:{type:"math/tex"}},model:(t,{writer:n})=>{const o=t.getChild(0).data.trim();return n.createElement("mathtex-inline",{equation:o,type:e.forceOutputType?e.outputType:"script",display:!1})}}).elementToElement({view:{name:"script",attributes:{type:"math/tex; mode=display"}},model:(t,{writer:n})=>{const o=t.getChild(0).data.trim();return n.createElement("mathtex-display",{equation:o,type:e.forceOutputType?e.outputType:"script",display:!0})}}).elementToElement({view:{name:"span",classes:["math-tex"]},model:(t,{writer:n})=>{const o=t.getChild(0).data.trim(),i=Object.assign(oS(o),{type:e.forceOutputType?e.outputType:"span"});return n.createElement(i.display?"mathtex-display":"mathtex-inline",i)}}).elementToElement({view:{name:"span",classes:["ql-formula"]},model:(t,{writer:n})=>{const o=t.getAttribute("data-value").trim();return n.createElement("mathtex-inline",{equation:o,type:e.forceOutputType?e.outputType:"script",display:!1})}}),t.for("editingDowncast").elementToElement({model:"mathtex-inline",view:(t,{writer:e})=>jf(n(t,e),e,"span")}).elementToElement({model:"mathtex-display",view:(t,{writer:e})=>jf(n(t,e),e,"div")}),t.for("dataDowncast").elementToElement({model:"mathtex-inline",view:o}).elementToElement({model:"mathtex-display",view:o})}}const kS="Ctrl+M";class wS extends ge{static get requires(){return[Zu,bS]}static get pluginName(){return"MathUI"}init(){const t=this.editor;t.editing.view.addObserver(Eg),this._previewUid=`math-preview-${r()}`,this.formView=this._createFormView(),this._balloon=t.plugins.get(Zu),this._createToolbarMathButton(),this._enableUserBalloonInteractions()}destroy(){super.destroy(),this.formView.destroy();const t=rs.document.getElementById(this._previewUid);t&&t.parentNode.removeChild(t)}_showUI(){this.editor.commands.get("math").isEnabled&&(this._addFormView(),this._balloon.showStack("main"))}_createFormView(){const t=this.editor,e=t.commands.get("math"),n=t.config.get("math"),o=new pS(t.locale,n.engine,n.lazyLoad,n.enablePreview,this._previewUid,n.previewClassName,n.popupClassName);return o.mathInputView.bind("value").to(e,"value"),o.displayButtonView.bind("isOn").to(e,"display"),o.mathInputView.bind("isReadOnly").to(e,"isEnabled",(t=>!t)),o.saveButtonView.bind("isEnabled").to(e),o.displayButtonView.bind("isEnabled").to(e),this.listenTo(o,"submit",(()=>{t.execute("math",o.equation,o.displayButtonView.isOn,n.outputType,n.forceOutputType),this._closeFormView()})),this.listenTo(o,"cancel",(()=>{this._closeFormView()})),o.keystrokes.set("esc",((t,e)=>{this._closeFormView(),e()})),o}_addFormView(){if(this._isFormInPanel)return;const t=this.editor,e=t.commands.get("math");this._balloon.add({view:this.formView,position:rS(t)}),this._balloon.visibleView===this.formView&&this.formView.mathInputView.select();rs.document.getElementById(this._previewUid)&&this.formView.previewEnabled&&this.formView.mathView.updateMath(),this.formView.equation=e.value||"",this.formView.displayButtonView.isOn=e.display||!1}_hideUI(){if(!this._isFormInPanel)return;const t=this.editor;this.stopListening(t.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),t.editing.view.focus(),this._removeFormView()}_closeFormView(){void 0!==this.editor.commands.get("math").value?this._removeFormView():this._hideUI()}_removeFormView(){if(this._isFormInPanel){this.formView.saveButtonView.focus(),this._balloon.remove(this.formView);const t=rs.document.getElementById(this._previewUid);t&&(t.style.visibility="hidden"),this.editor.editing.view.focus()}}_createToolbarMathButton(){const t=this.editor,e=t.commands.get("math"),n=t.t;t.keystrokes.set(kS,((t,n)=>{n(),e.isEnabled&&this._showUI()})),this.editor.ui.componentFactory.add("math",(t=>{const o=new wh(t);return o.isEnabled=!0,o.label=n("Insert math"),o.icon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.44 10.78" height="40.74" width="58.35"><path d="M8.15 0c-.06 0-.1.02-.11.03a.12.12 0 0 0-.02.01 6.81 6.81 0 0 0-2.32 4.9v.9a6.82 6.82 0 0 0 2.32 4.9.12.12 0 0 0 .02 0c.02.02.06.04.11.04.07 0 .12-.03.16-.07a.22.22 0 0 0 0-.32.12.12 0 0 0-.02-.02A4.4 4.4 0 0 1 7 8.44a7.62 7.62 0 0 1-.5-2.6v-.9c0-.82.19-1.76.5-2.6A4.4 4.4 0 0 1 8.3.42.12.12 0 0 0 8.3.39a.22.22 0 0 0 .08-.16.22.22 0 0 0-.07-.16.22.22 0 0 0-.16-.07zm4.83 0a.22.22 0 0 0-.16.07.22.22 0 0 0-.07.16c0 .08.05.13.08.16a.12.12 0 0 0 .01.02c.52.39.98 1.1 1.3 1.94.3.83.49 1.77.49 2.6v.88c0 .83-.18 1.78-.5 2.6a4.4 4.4 0 0 1-1.29 1.95.22.22 0 0 0-.01.33c.03.04.08.07.15.07.05 0 .09-.02.12-.03a.12.12 0 0 0 .02-.01 6.82 6.82 0 0 0 2.32-4.9v-.9a6.81 6.81 0 0 0-2.32-4.9.12.12 0 0 0-.02 0c-.03-.02-.06-.04-.12-.04zm-8.5.46c-.4 0-1.13.23-1.46 1.32-.06.2-.11.45-.33 1.58h-.64c-.1 0-.19-.01-.28.03a.25.25 0 0 0-.12.12.38.38 0 0 0-.03.17c0 .04 0 .1.04.14.03.04.07.07.11.08.09.03.16.02.26.02h.56l-.77 4.04c-.1.51-.19 1-.32 1.36-.06.18-.14.32-.22.4-.08.1-.16.13-.26.13-.03 0-.1 0-.2-.03.11-.05.2-.13.26-.2a.7.7 0 0 0 .13-.4.48.48 0 0 0-.16-.38.53.53 0 0 0-.35-.12c-.34 0-.7.3-.7.76 0 .27.14.5.34.64s.44.2.68.2c.33 0 .61-.17.83-.4.21-.21.37-.48.47-.69.18-.35.32-.84.43-1.25a14.17 14.17 0 0 0 .18-.8l.61-3.26h.81c.1 0 .2.01.3-.03.04-.03.09-.07.11-.13.02-.05.03-.1.03-.17 0-.05-.01-.1-.05-.14a.23.23 0 0 0-.11-.07c-.08-.03-.16-.02-.25-.02h-.73l.2-1.07a26.3 26.3 0 0 1 .24-1.07c.08-.17.22-.3.39-.3l.21.05a.7.7 0 0 0-.25.2.7.7 0 0 0-.13.4c0 .15.06.28.16.37.1.08.22.12.35.12.34 0 .7-.3.7-.76 0-.28-.15-.5-.35-.64-.2-.14-.45-.2-.7-.2zm5.4 2.78c-.6 0-1.06.37-1.36.76-.16.2-.27.4-.35.57-.07.18-.12.3-.12.42 0 .1.08.18.14.2.06.03.1.02.1.02.06 0 .12 0 .18-.04.05-.05.07-.1.08-.17v.02c.35-1.09 1-1.3 1.3-1.3.09 0 .2.01.29.09.09.07.17.2.17.5 0 .27-.18 1-.57 2.48a1.8 1.8 0 0 1-.37.75.7.7 0 0 1-.52.26c-.04 0-.13 0-.22-.03a.68.68 0 0 0 .3-.56.47.47 0 0 0-.18-.39.55.55 0 0 0-.32-.1c-.4 0-.7.33-.7.74 0 .28.16.5.38.63.21.13.48.18.73.18.39 0 .69-.2.89-.41.09-.1.15-.19.2-.27.2.36.59.68 1.16.68.6 0 1.05-.37 1.35-.76.15-.2.27-.4.34-.57.08-.18.12-.3.12-.42a.24.24 0 0 0-.11-.2c-.06-.03-.12-.02-.13-.02a.26.26 0 0 0-.18.06c-.05.05-.06.1-.07.14-.34 1.1-1.02 1.3-1.3 1.3-.17 0-.27-.06-.35-.17a.72.72 0 0 1-.11-.4c0-.22.06-.45.18-.91l.36-1.45c.03-.14.1-.44.25-.7.15-.25.36-.46.68-.46.03 0 .12 0 .22.03a.7.7 0 0 0-.32.56c0 .11.04.23.13.33.08.1.22.16.4.16.14 0 .3-.06.44-.18a.73.73 0 0 0 .24-.55c0-.32-.2-.54-.42-.66a1.52 1.52 0 0 0-.68-.16c-.34 0-.62.16-.82.34a1.8 1.8 0 0 0-.3.35 1.32 1.32 0 0 0-.5-.54 1.37 1.37 0 0 0-.63-.15z" style="line-height:1.25;-inkscape-font-specification:\'Latin Modern Math\'" font-weight="400" font-size="10.58" font-family="Latin Modern Math" letter-spacing="-1.06" word-spacing="0"/></svg>\n',o.keystroke=kS,o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(e,"isEnabled"),this.listenTo(o,"execute",(()=>this._showUI())),o}))}_enableUserBalloonInteractions(){const t=this.editor,e=this.editor.editing.view.document;this.listenTo(e,"click",(()=>{const e=t.commands.get("math");e.value&&e.isEnabled&&this._showUI()})),t.keystrokes.set("Esc",((t,e)=>{this._isUIVisible&&(this._hideUI(),e())})),Nd({emitter:this.formView,activator:()=>this._isFormInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}get _isUIVisible(){return this._balloon.visibleView==this.formView}get _isFormInPanel(){return this._balloon.hasView(this.formView)}}class CS extends ge{static get requires(){return[Xb,UE]}static get pluginName(){return"AutoMath"}constructor(t){super(t),this._timeoutId=null,this._positionToInsert=null}init(){const t=this.editor,e=t.model.document;this.listenTo(t.plugins.get(Xb),"inputTransformation",(()=>{const t=e.selection.getFirstRange(),n=nd.fromPosition(t.start);n.stickiness="toPrevious";const o=nd.fromPosition(t.end);o.stickiness="toNext",e.once("change:data",(()=>{this._mathBetweenPositions(n,o),n.detach(),o.detach()}),{priority:"high"})})),t.commands.get("undo").on("execute",(()=>{this._timeoutId&&(rs.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)}),{priority:"high"})}_mathBetweenPositions(t,e){const n=this.editor,o=this.editor.config.get("math"),i=new cl(t,e),r=i.getWalker({ignoreElementEnd:!0});let s="";for(const t of r)t.item.is("$textProxy")&&(s+=t.item.data);if(s=s.trim(),!nS(s)||2!==function(t){return t.match(/(\\\[|\\\]|\\\(|\\\))/g).length}(s))return;n.commands.get("math").isEnabled&&(this._positionToInsert=nd.fromPosition(t),this._timeoutId=rs.window.setTimeout((()=>{n.model.change((t=>{let e;this._timeoutId=null,t.remove(i),"$graveyard"!==this._positionToInsert.root.rootName&&(e=this._positionToInsert),n.model.change((t=>{const i=Object.assign(oS(s),{type:o.outputType}),r=t.createElement(i.display?"mathtex-display":"mathtex-inline",i);n.model.insertContent(r,e),t.setSelection(r,"on")})),this._positionToInsert.detach(),this._positionToInsert=null}))}),100))}}class AS extends ge{static get requires(){return[bS,wS,CS,mb]}static get pluginName(){return"Math"}}class _S extends bm{}_S.builtinPlugins=[Xb,gf,BE,bf,class extends ge{static get requires(){return[rp,lp]}static get pluginName(){return"Typing"}},UE,class extends ge{static get requires(){return[Hm]}static get pluginName(){return"CKFinderUploadAdapter"}init(){const t=this.editor.config.get("ckfinder.uploadUrl");t&&(this.editor.plugins.get(Hm).createUploadAdapter=e=>new Km(e,t,this.editor.t))}},Bp,class extends ge{static get requires(){return[zp,Vp]}static get pluginName(){return"Bold"}},class extends ge{static get requires(){return[Np,Op]}static get pluginName(){return"Italic"}},class extends ge{static get requires(){return[Zp,Yp]}static get pluginName(){return"Underline"}},class extends ge{static get requires(){return[Xp,ef]}static get pluginName(){return"Strikethrough"}},class extends ge{static get requires(){return[of,lf]}static get pluginName(){return"Code"}},class extends ge{static get requires(){return[Hp,Wp]}static get pluginName(){return"Superscript"}},class extends ge{static get requires(){return[jp,Gp]}static get pluginName(){return"Subscript"}},class extends ge{static get requires(){return[_f,xf]}static get pluginName(){return"BlockQuote"}},class extends ge{static get requires(){return[zf,Nf]}static get pluginName(){return"Heading"}},class extends ge{static get requires(){return[ck,hk]}static get pluginName(){return"Image"}},class extends ge{static get requires(){return[mk,pk]}static get pluginName(){return"ImageCaption"}},class extends ge{static get requires(){return[Pk,Vk]}static get pluginName(){return"ImageStyle"}},class extends ge{static get requires(){return[fb,Ib]}static get pluginName(){return"ImageToolbar"}afterInit(){const t=this.editor,e=t.t,n=t.plugins.get(fb),o=t.plugins.get("ImageUtils");var i;n.register("image",{ariaLabel:e("Image toolbar"),items:(i=t.config.get("image.toolbar")||[],i.map((t=>y(t)?t.name:t))),getRelatedElement:t=>o.getClosestSelectedImageWidget(t)})}},class extends ge{static get pluginName(){return"ImageUpload"}static get requires(){return[nw,qk,Zk]}},class extends ge{static get requires(){return[rw,hw,aw]}static get pluginName(){return"ImageResize"}},class extends ge{static get requires(){return[Jw,aC,dC]}static get pluginName(){return"Link"}},dC,class extends ge{static get requires(){return[HC,jC]}static get pluginName(){return"List"}},class extends ge{static get requires(){return[uA]}static get pluginName(){return"ListStyle"}constructor(t){super(t),l("The `ListStyle` plugin is obsolete. Use `ListProperties` instead.")}},class extends ge{static get requires(){return[CA,AA]}static get pluginName(){return"TodoList"}},Bf,class extends ge{static get pluginName(){return"PasteFromOffice"}static get requires(){return[Ub]}init(){const t=this.editor,e=t.editing.view.document,n=[];n.push(new RA(e)),n.push(new BA(e)),t.plugins.get("ClipboardPipeline").on("inputTransformation",((t,o)=>{if(o._isTransformedWithPasteFromOffice)return;const i=o.dataTransfer.getData("text/html"),r=n.find((t=>t.isActive(i)));r&&(o._parsedData=FA(i,e.stylesProcessor),r.execute(o),o._isTransformedWithPasteFromOffice=!0)}),{priority:"high"})}},class extends ge{static get requires(){return[O_,j_,Z_,ov,ev,J_,mb]}static get pluginName(){return"Table"}},class extends ge{static get requires(){return[fb]}static get pluginName(){return"TableToolbar"}afterInit(){const t=this.editor,e=t.t,n=t.plugins.get(fb),o=t.config.get("table.contentToolbar"),i=t.config.get("table.tableToolbar");o&&n.register("tableContent",{ariaLabel:e("Table toolbar"),items:o,getRelatedElement:lv}),i&&n.register("table",{ariaLabel:e("Table toolbar"),items:i,getRelatedElement:av})}},class extends ge{static get pluginName(){return"TableProperties"}static get requires(){return[Tv,hy]}},class extends ge{static get pluginName(){return"TableCellProperties"}static get requires(){return[Iy,ky]}},Z_,class extends ge{static get pluginName(){return"TableCaption"}static get requires(){return[Oy,Ly]}},class extends ge{static get pluginName(){return"Indent"}static get requires(){return[fE,wE]}},class extends ge{constructor(t){super(t),t.config.define("indentBlock",{offset:40,unit:"px"})}static get pluginName(){return"IndentBlock"}init(){const t=this.editor,e=t.config.get("indentBlock"),n=!e.classes||!e.classes.length,o=Object.assign({direction:"forward"},e),i=Object.assign({direction:"backward"},e);n?(t.data.addStyleProcessorRules(gm),this._setupConversionUsingOffset(t.conversion),t.commands.add("indentBlock",new CE(t,new AE(o))),t.commands.add("outdentBlock",new CE(t,new AE(i)))):(this._setupConversionUsingClasses(e.classes),t.commands.add("indentBlock",new CE(t,new _E(o))),t.commands.add("outdentBlock",new CE(t,new _E(i))))}afterInit(){const t=this.editor,e=t.model.schema,n=t.commands.get("indent"),o=t.commands.get("outdent"),i=t.config.get("heading.options");(i&&i.map((t=>t.model))||vE).forEach((t=>{e.isRegistered(t)&&e.extend(t,{allowAttributes:"blockIndent"})})),e.setAttributeProperties("blockIndent",{isFormatting:!0}),n.registerChildCommand(t.commands.get("indentBlock")),o.registerChildCommand(t.commands.get("outdentBlock"))}_setupConversionUsingOffset(){const t=this.editor.conversion,e="rtl"===this.editor.locale.contentLanguageDirection?"margin-right":"margin-left";t.for("upcast").attributeToAttribute({view:{styles:{[e]:/[\s\S]+/}},model:{key:"blockIndent",value:t=>t.getStyle(e)}}),t.for("downcast").attributeToAttribute({model:"blockIndent",view:t=>({key:"style",value:{[e]:t}})})}_setupConversionUsingClasses(t){const e={model:{key:"blockIndent",values:[]},view:{}};for(const n of t)e.model.values.push(n),e.view[n]={key:"class",value:[n]};this.editor.conversion.attributeToAttribute(e)}},class extends ge{static get pluginName(){return"BlockToolbar"}constructor(t){super(t),this._blockToolbarConfig=$h(this.editor.config.get("blockToolbar")),this.toolbarView=this._createToolbarView(),this.panelView=this._createPanelView(),this.buttonView=this._createButtonView(),this._resizeObserver=null,Nd({emitter:this.panelView,contextElements:[this.panelView.element,this.buttonView.element],activator:()=>this.panelView.isVisible,callback:()=>this._hidePanel()})}init(){const t=this.editor;this.listenTo(t.model.document.selection,"change:range",((t,e)=>{e.directChange&&this._hidePanel()})),this.listenTo(t.ui,"update",(()=>this._updateButton())),this.listenTo(t,"change:isReadOnly",(()=>this._updateButton()),{priority:"low"}),this.listenTo(t.ui.focusTracker,"change:isFocused",(()=>this._updateButton())),this.listenTo(this.buttonView,"change:isVisible",((t,e,n)=>{n?this.buttonView.listenTo(window,"resize",(()=>this._updateButton())):(this.buttonView.stopListening(window,"resize"),this._hidePanel())}))}afterInit(){const t=this.editor.ui.componentFactory,e=this._blockToolbarConfig;this.toolbarView.fillFromConfig(e,t);for(const t of this.toolbarView.items)t.on("execute",(()=>this._hidePanel(!0)),{priority:"high"});e.shouldNotGroupWhenFull||this.listenTo(this.editor,"ready",(()=>{const t=this.editor.ui.view.editable.element;this._resizeObserver=new Aa(t,(()=>{this.toolbarView.maxWidth=this._getToolbarMaxWidth()}))}))}destroy(){super.destroy(),this.panelView.destroy(),this.buttonView.destroy(),this.toolbarView.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_createToolbarView(){const t=!this._blockToolbarConfig.shouldNotGroupWhenFull,e=new Zh(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return e.focusTracker.on("change:isFocused",((t,e,n)=>{n||this._hidePanel()})),e}_createPanelView(){const t=this.editor,e=new Lu(t.locale);return e.content.add(this.toolbarView),e.class="ck-toolbar-container",t.ui.view.body.add(e),t.ui.focusTracker.add(e.element),this.toolbarView.keystrokes.set("Esc",((t,e)=>{this._hidePanel(!0),e()})),e}_createButtonView(){const t=this.editor,e=t.t,n=new rg(t.locale);return n.set({label:e("Edit block"),icon:Rd,withText:!1}),n.bind("isOn").to(this.panelView,"isVisible"),n.bind("tooltip").to(this.panelView,"isVisible",(t=>!t)),this.listenTo(n,"execute",(()=>{this.panelView.isVisible?this._hidePanel(!0):this._showPanel()})),t.ui.view.body.add(n),t.ui.focusTracker.add(n.element),n}_updateButton(){const t=this.editor,e=t.model,n=t.editing.view;if(!t.ui.focusTracker.isFocused)return void this._hideButton();if(t.isReadOnly)return void this._hideButton();const o=Array.from(e.document.selection.getSelectedBlocks())[0];if(!o||Array.from(this.toolbarView.items).every((t=>!t.isEnabled)))return void this._hideButton();const i=n.domConverter.mapViewToDom(t.editing.mapper.toViewElement(o));this.buttonView.isVisible=!0,this._attachButtonToElement(i),this.panelView.isVisible&&this._showPanel()}_hideButton(){this.buttonView.isVisible=!1}_showPanel(){const t=this.panelView.isVisible;this.panelView.show(),this.toolbarView.maxWidth=this._getToolbarMaxWidth(),this.panelView.pin({target:this.buttonView.element,limiter:this.editor.ui.getEditableElement()}),t||this.toolbarView.items.get(0).focus()}_hidePanel(t){this.panelView.isVisible=!1,t&&this.editor.editing.view.focus()}_attachButtonToElement(t){const e=window.getComputedStyle(t),n=new ka(this.editor.ui.getEditableElement()),o=parseInt(e.paddingTop,10),i=parseInt(e.lineHeight,10)||1.2*parseInt(e.fontSize,10),r=Lh({element:this.buttonView.element,target:t,positions:[(t,e)=>{let r;return r="ltr"===this.editor.locale.uiLanguageDirection?n.left-e.width:n.right,{top:t.top+o+(i-e.height)/2,left:r}}]});this.buttonView.top=r.top,this.buttonView.left=r.left}_getToolbarMaxWidth(){const t=this.editor.ui.view.editable.element,e=new ka(t),n=new ka(this.buttonView.element),o="rtl"===this.editor.locale.uiLanguageDirection?n.left-e.right+n.width:e.left-n.left;return sg(e.width+o)}},class extends ge{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("paragraph",(n=>{const o=new wh(n),i=t.commands.get("paragraph");return o.label=e("Paragraph"),o.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.5 5.5H7v5h3.5a2.5 2.5 0 1 0 0-5zM5 3h6.5v.025a5 5 0 0 1 0 9.95V13H7v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/></svg>',o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(i),o.bind("isOn").to(i,"value"),o.on("execute",(()=>{t.execute("paragraph")})),o}))}},class extends ge{init(){Rf(this.editor).filter((t=>"paragraph"!==t.model)).map((t=>this._createButton(t)))}_createButton(t){const e=this.editor;e.ui.componentFactory.add(t.model,(n=>{const o=new wh(n),i=e.commands.get("heading");return o.label=t.title,o.icon=t.icon||Wy[t.model],o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(i),o.bind("isOn").to(i,"value",(e=>e==t.model)),o.on("execute",(()=>{e.execute("heading",{value:t.model}),e.editing.view.focus()})),o}))}},class extends ge{static get requires(){return[Hm]}static get pluginName(){return"UploadimagePlugin"}init(){this.editor.plugins.get("FileRepository").createUploadAdapter=t=>new JE(t)}},class extends ge{init(){const t=this.editor;t.ui.componentFactory.add("internalLink",(e=>{const n=new wh(e);return n.set({label:"Internal Trilium link (CTRL-L)",icon:'<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n xmlns:dc="http://purl.org/dc/elements/1.1/"\n xmlns:cc="http://creativecommons.org/ns#"\n xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n xmlns:svg="http://www.w3.org/2000/svg"\n xmlns="http://www.w3.org/2000/svg"\n xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"\n xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"\n version="1.1"\n x="0px"\n y="0px"\n viewBox="0 0 67.008179 71.908997"\n enable-background="new 0 0 100 100"\n xml:space="preserve"\n id="svg4"\n sodipodi:docname="trilium.svg"\n width="67.008179"\n height="71.908997"\n inkscape:version="0.92.3 (2405546, 2018-03-11)"><metadata\n id="metadata10"><rdf:RDF><cc:Work\n rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type\n rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs\n id="defs8" /><sodipodi:namedview\n pagecolor="#ffffff"\n bordercolor="#666666"\n borderopacity="1"\n objecttolerance="10"\n gridtolerance="10"\n guidetolerance="10"\n inkscape:pageopacity="0"\n inkscape:pageshadow="2"\n inkscape:window-width="1857"\n inkscape:window-height="1053"\n id="namedview6"\n showgrid="false"\n fit-margin-top="0"\n fit-margin-left="0"\n fit-margin-right="0"\n fit-margin-bottom="0"\n inkscape:zoom="2.36"\n inkscape:cx="33.504176"\n inkscape:cy="35.954"\n inkscape:window-x="63"\n inkscape:window-y="27"\n inkscape:window-maximized="1"\n inkscape:current-layer="svg4" /><path\n d="m 47.470176,30.998 c 0.008,-0.009 0.021,-0.021 0.027,-0.029 0.938,-1.156 -0.823,-13.453 -5.063,-20.125 -1.389,-2.186 -2.239,-3.423 -3.219,-4.719 -3.907,-5.166 -6,-6.125 -6,-6.125 0,0 -13.979,10.735 -13.562,30.27 -1.754,0.065 -11.2179997,7.528 -14.8259997,14.388 -1.206,2.291 -1.856,3.645 -2.493,5.141 -2.53899996,5.957 -2.32999996,8.25 -2.32999996,8.25 0,0 16.27099966,6.79 33.01399966,-3.294 0.007,0.021 0.013,0.046 0.02,0.063 0.537,1.389 12.08,5.979 19.976,5.621 2.587,-0.116 4.084,-0.238 5.696,-0.444 6.424,-0.818 8.298,-2.157 8.298,-2.157 0,0 -2.36,-17.487 -19.538,-26.84 z m -13.179,20.3 c 1.059,-1.183 4.648,-5.853 0.995,-11.315 -0.253,-0.377 -0.496,-0.236 -0.496,-0.236 0,0 0.063,10.822 -5.162,12.359 -5.225,1.537 -13.886,4.4 -20.4269997,0.455 -0.697,-0.42 1.2269997,-13 12.8469997,-19.377 0.546,1.599 2.836,6.854 9.292,6.409 0.453,-0.031 0.453,-0.313 0.453,-0.313 0,0 -9.422,-5.328 -8.156,-10.625 1.266,-5.297 3.089,-14.236 9.766,-17.948 0.714,-0.397 10.746,7.593 10.417,20.94 -1.606,-0.319 -7.377,-1.004 -10.226,4.864 -0.198,0.409 0.046,0.549 0.046,0.549 0,0 9.31,-5.521 13.275,-1.789 3.965,3.733 10.813,9.763 10.71,17.4 -0.01,0.817 -11.924,5.542 -23.334,-1.373 z M 19.117176,21.1 c 0,0 -0.991,3.241 -0.603,7.524 L 5.1211763,21.1 c 10e-4,0 6.2209997,-4.214 13.9959997,0 z M 4.6971763,21.985 18.041176,29.597 c -3.872,1.872 -6.142,4.388 -6.142,4.388 -7.6149997,-4.499 -7.2019997,-12 -7.2019997,-12 z M 55.791176,35.019 c 0,0 -2.321,-2.471 -6.23,-4.263 l 13.187,-7.881 c -10e-4,0 0.564,7.493 -6.957,12.144 z m 6.4,-12.951 -13.237,7.794 c 0.3,-4.291 -0.754,-7.511 -0.754,-7.511 7.687,-4.371 13.991,-0.283 13.991,-0.283 z m -36.611,37.665 c 0,0 3.309,-0.737 6.845,-3.185 l 0.056,15.361 c 0,10e-4 -6.733,-3.333 -6.901,-12.176 z m 7.88,12.11 0.044,-15.362 c 3.539,2.445 6.846,3.181 6.846,3.181 -0.16,8.844 -6.89,12.181 -6.89,12.181 z"\n id="path2"\n inkscape:connector-curvature="0" /></svg>',tooltip:!0}),n.bind("isEnabled").to(t,"isReadOnly",(t=>!t)),n.on("execute",(()=>{const e=t.editing.view.getDomRoot();glob.getComponentByEl(e).triggerCommand("addLinkToText")})),n}))}},class extends ge{init(){this.editor.ui.componentFactory.add("markdownImport",(t=>{const e=new wh(t);return e.set({label:"Markdown import from clipboard",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="208" height="128" viewBox="0 0 208 128"><rect width="198" height="118" x="5" y="5" ry="10" stroke="#000" stroke-width="10" fill="none"/><path d="M30 98V30h20l20 25 20-25h20v68H90V59L70 84 50 59v39zm125 0l-30-33h20V30h20v35h20z"/></svg>',tooltip:!0}),e.on("execute",(()=>{glob.importMarkdownInline()})),e}))}},class extends ge{init(){this.htmlDataProcessor=new lc,this.editor.ui.componentFactory.add("cutToNote",(t=>{const e=new wh(t);return e.set({label:"Cut & paste selection to sub-note",icon:'<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon --\x3e\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">\n<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>\n<g><g><path d="M853.9,754.9c-26-45.4-66.5-76.2-109.1-87.8c-33.7-9.2-68.7-6.4-98.9,10.7l-90-157.3C611.6,409.5,736.5,160.5,759,121.2C788,70.4,736,10,736,10L500,422.8L264,10c0,0-52,60.4-22.9,111.2c22.5,39.3,147.5,288.3,203.1,399.3l-89.9,157.3c-30.2-17.1-65.3-19.9-98.9-10.7c-42.7,11.6-83.1,42.3-109.1,87.8c-46.8,81.7-28.9,179.7,39.7,219c30.4,17.5,65.7,20.3,99.6,11.1c42.6-11.6,83.1-42.4,109.1-87.7c11.4-20,18.9-41,22.8-61.8v0c0-0.2,0-0.3,0.2-0.5c0.2-1.7,0.5-3.5,0.7-5.4c19.3-129.5,55.8-195.7,81.6-227.8c25.9,32.1,62.4,98.3,81.7,227.8c0.2,1.9,0.5,3.6,0.7,5.4c0.1,0.2,0.1,0.3,0.2,0.5v0c3.9,20.8,11.4,41.8,22.7,61.8c26,45.3,66.5,76.1,109.2,87.7c34,9.2,69.2,6.4,99.7-11.1C882.8,934.5,900.6,836.5,853.9,754.9z M327.9,858.9c-14.8,25.8-38.1,45.2-62.5,51.8c-10.8,3-26.7,4.7-41.3-3.6c-31.1-17.8-36.2-70.1-11.1-114c15-26,37.8-45,62.5-51.8c10.7-2.9,26.7-4.7,41.3,3.6C347.9,762.7,353,814.9,327.9,858.9z M775.9,907.1c-14.6,8.4-30.4,6.6-41.3,3.6c-24.4-6.6-47.7-26-62.5-51.8c-25.1-44-20-96.2,11.1-114c14.7-8.3,30.6-6.5,41.3-3.6C749.3,748,772.1,767,787,793C812.1,837,807.1,889.3,775.9,907.1z"/><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></g>\n</svg>',tooltip:!0}),e.on("execute",(()=>{const t=this.editor.editing.view.getDomRoot();glob.getComponentByEl(t).triggerCommand("cutIntoNote")})),e})),this.editor.getSelectedHtml=()=>this.getSelectedHtml(),this.editor.removeSelection=()=>this.removeSelection()}getSelectedHtml(){const t=this.editor.model,e=t.document,n=this.editor.data.toView(t.getSelectedContent(e.selection));return this.htmlDataProcessor.toData(n)}async removeSelection(){const t=this.editor.model;t.deleteContent(t.document.selection);const e=this.getComponent();await e.triggerCommand("saveNoteDetailNow")}getComponent(){const t=this.editor.editing.view.getDomRoot();return glob.getComponentByEl(t)}},class extends ge{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}constructor(t){super(t),t.config.define("typing",{transformations:{include:kp}})}init(){const t=this.editor.model.document.selection;t.on("change:range",(()=>{this.isEnabled=!t.anchor.parent.is("element","codeBlock")})),this._enableTransformationWatchers()}_enableTransformationWatchers(){const t=this.editor,e=t.model,n=t.plugins.get("Delete"),o=function(t){const e=t.extra||[],n=t.remove||[],o=t=>!n.includes(t);return function(t){const e=new Set;for(const n of t)if(bp[n])for(const t of bp[n])e.add(t);else e.add(n);return Array.from(e)}(t.include.concat(e).filter(o)).filter(o).map((t=>fp[t]||t)).filter((t=>"object"==typeof t)).map((t=>({from:wp(t.from),to:Cp(t.to)})))}(t.config.get("typing.transformations")),i=new dp(t.model,(t=>{for(const e of o){if(e.from.test(t))return{normalizedTransformation:e}}}));i.on("matched:data",((t,o)=>{if(!o.batch.isTyping)return;const{from:i,to:r}=o.normalizedTransformation,s=i.exec(o.text),a=r(s.slice(1)),l=o.range;let c=s.index;e.enqueueChange((t=>{for(let n=1;n<s.length;n++){const o=s[n],i=a[n-1];if(null==i){c+=o.length;continue}const r=l.start.getShiftedBy(c),d=e.createRange(r,r.getShiftedBy(o.length)),h=Ap(r);e.insertContent(t.createText(i,h),d),c+=i.length}e.enqueueChange((()=>{n.requestUndoOnBackspace()}))}))})),i.bind("isEnabled").to(this)}},class extends ge{static get requires(){return[lx,kx,vx,Sx]}static get pluginName(){return"Font"}},vx,Sx,class extends ge{static get requires(){return[Lx,jx]}static get pluginName(){return"CodeBlock"}},BE,class extends ge{static get requires(){return[zE,RE,mb]}static get pluginName(){return"HorizontalLine"}},class extends ge{static get requires(){return[KE,$E]}static get pluginName(){return"RemoveFormat"}},class extends ge{static get requires(){return[Om,vm]}static get pluginName(){return"FindAndReplace"}init(){const t=this.editor.plugins.get("FindAndReplaceUI"),e=this.editor.plugins.get("FindAndReplaceEditing"),n=e.state;t.on("findNext",((t,e)=>{e?(n.searchText=e.searchText,this.editor.execute("find",e.searchText,e)):this.editor.execute("findNext")})),t.on("findPrevious",((t,e)=>{e&&n.searchText!==e.searchText?this.editor.execute("find",e.searchText):this.editor.execute("findPrevious")})),t.on("replace",((t,e)=>{n.searchText!==e.searchText&&this.editor.execute("find",e.searchText);const o=n.highlightedResult;o&&this.editor.execute("replace",e.replaceText,o)})),t.on("replaceAll",((t,e)=>{n.searchText!==e.searchText&&this.editor.execute("find",e.searchText),this.editor.execute("replaceAll",e.replaceText,n.results)})),t.on("searchReseted",(()=>{n.clear(this.editor.model),e.stop()}))}},class extends ge{toMentionAttribute(t,e){return Zx(t,e)}static get pluginName(){return"Mention"}static get requires(){return[Gx,aE]}},class extends ge{afterInit(){const t=this.editor;t.commands.add("mention",new ZE(t))}},class extends ge{static get requires(){return[QE,YE]}},class extends ge{static get requires(){return[eS]}},function(t){function e(){let e=t.model.document.selection.getFirstPosition();for(;e;){if("tableCell"===e.name)return!0;e=e.parent}return!1}t.keystrokes.set("Tab",((n,o)=>{const i=t.commands.get("indentBlock");i.isEnabled&&!e()&&(i.execute(),o())})),t.keystrokes.set("Shift+Tab",((n,o)=>{const i=t.commands.get("outdentBlock");i.isEnabled&&!e()&&(i.execute(),o())}))},function(t){t.model.schema.setAttributeProperties("linkHref",{isFormatting:!0})},AS,class extends ge{static get requires(){return[AS,Bp]}afterInit(){const t=this.editor,e=t.commands.get("math");if(e){const n=function(t,e){return()=>{if(!e.isEnabled)return!1;e.display=!0,t.plugins.get("MathUI")._showUI()}}(t,e);Ep(t,this,/^\\\[$/,n),Ep(t,this,/^\$\$$/,n)}}static get pluginName(){return"AutoformatMath"}}],_S.defaultConfig={toolbar:{items:["fontSize","bold","italic","underline","strikethrough","superscript","subscript","fontColor","fontBackgroundColor","code","link","removeFormat","internallink","cuttonote"]},image:{styles:["alignLeft","alignCenter","alignRight","full","side"],resizeOptions:[{name:"imageResize:original",value:null,icon:"original"},{name:"imageResize:25",value:"25",icon:"small"},{name:"imageResize:50",value:"50",icon:"medium"}],toolbar:["imageStyle:inline","imageStyle:alignLeft","imageStyle:alignCenter","imageStyle:alignRight","|","imageResize:25","imageResize:50","imageResize:original","|","toggleImageCaption"]},heading:{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading2",view:"h2",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h3",title:"Heading 3",class:"ck-heading_heading3"},{model:"heading4",view:"h4",title:"Heading 4",class:"ck-heading_heading4"},{model:"heading5",view:"h5",title:"Heading 5",class:"ck-heading_heading5"},{model:"heading6",view:"h6",title:"Heading 6",class:"ck-heading_heading6"}]},blockToolbar:["heading","|","bulletedList","numberedList","todoList","|","blockQuote","codeBlock","insertTable","includeNote","math","|","outdent","indent","horizontalLine","|","imageUpload","markdownImport","findAndReplace"],table:{contentToolbar:["tableColumn","tableRow","mergeTableCells","tableProperties","tableCellProperties","toggleTableCaption"]},link:{defaultProtocol:"https://"},language:"en"}})(),o=o.default})()}));
+function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.BalloonEditor=e():t.BalloonEditor=e()}(self,(function(){return(()=>{"use strict";var t={4722:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-math-form{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:nowrap}@media screen and (max-width:600px){.ck.ck-math-form{flex-wrap:wrap}.ck.ck-math-form .ck-math-view,.ck.ck-math-form .ck-math-view .ck-label,.ck.ck-math-form .ck-math-view .ck-labeled-input{flex-basis:100%}.ck.ck-math-form .ck-button{flex-basis:50%}}.ck-math-tex.ck-placeholder:before{display:none!important}.ck.ck-toolbar-container{z-index:calc(var(--ck-z-modal) + 2)}.ck.ck-math-form{padding:var(--ck-spacing-standard)}.ck.ck-math-form:focus{outline:none}[dir=ltr] .ck.ck-math-form>:not(:first-child),[dir=rtl] .ck.ck-math-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-math-form{padding:0}.ck.ck-math-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-math-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-math-form .ck-label,.ck.ck-math-form .ck-math-view .ck-button,.ck.ck-math-form .ck-math-view .ck.ck-math-preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-math-form>.ck-button{border:0;border-radius:0;border-top:1px solid var(--ck-color-base-border);margin-top:var(--ck-spacing-standard);padding:var(--ck-spacing-standard)}[dir=ltr] .ck.ck-math-form>.ck-button{margin-left:0}[dir=ltr] .ck.ck-math-form>.ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-math-form>.ck-button{margin-left:0}[dir=rtl] .ck.ck-math-form>.ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}","",{version:3,sources:["webpack://./../../node_modules/ckeditor5-math/theme/mathform.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-math/mathform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAAA,iBAEC,sBAAuB,CADvB,YAAa,CAEb,kBAAmB,CACnB,gBAqBD,CAnBC,oCAND,iBAOE,cAkBF,CATG,yHACC,eACD,CAGD,4BACC,cACD,CACD,CAGD,mCACC,sBACD,CAEA,yBACC,mCACD,CC9BA,iBACI,kCAsEJ,CApEI,uBAEF,YACD,CASC,2FACC,sCACD,CCdD,oCDHD,iBAqBE,SAkDF,CAhDE,mCACC,8DAMD,CAJC,kDACC,WAAY,CACZ,UACD,CAYA,wHACC,8DACD,CAGD,4BAKC,QAAS,CADT,eAAgB,CAEhB,gDAAiD,CAJjD,qCAAsC,CADtC,kCAsBD,CAvBA,sCASE,aAcF,CAZE,oDACC,kDACD,CAbF,sCAiBE,aAMF,CAJE,mDACC,kDACD,CC9DH",sourcesContent:[".ck.ck-math-form {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t@media screen and (max-width: 600px) {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-math-view {\n\t\t\tflex-basis: 100%;\n\n\t\t\t& .ck-labeled-input {\n\t\t\t\tflex-basis: 100%;\n\t\t\t}\n\n\t\t\t& .ck-label {\n\t\t\t\tflex-basis: 100%;\n\t\t\t}\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n\n.ck-math-tex.ck-placeholder::before {\n\tdisplay: none !important;\n}\n\n.ck.ck-toolbar-container {\n\tz-index: calc(var(--ck-z-modal) + 2);\n}\n",'@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-math-form {\n padding: var(--ck-spacing-standard);\n\n &:focus {\n\t\t/* https://github.com/ckeditor/ckeditor5-link/issues/90 */\n\t\toutline: none;\n\t}\n\n @mixin ck-dir ltr {\n\t\t& > :not(:first-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& > :not(:last-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\tpadding: 0;\n\n\t\t& .ck-labeled-input {\n\t\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\n\n\t\t\t& .ck-input-text {\n\t\t\t\tmin-width: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\n & .ck-label {\n margin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\n }\n\n\t\t& .ck-math-view {\n\t\t\t& .ck-button {\n\t\t\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\n\t\t\t}\n\n\t\t\t& .ck.ck-math-preview {\n\t\t\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\n\t\t\t}\n\t\t}\n\n\t\t& > .ck-button {\n\t\t\tpadding: var(--ck-spacing-standard);\n\t\t\tmargin-top: var(--ck-spacing-standard);\n\n\t\t\tborder-radius: 0;\n\t\t\tborder: 0;\n\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: 0;\n\n\t\t\t\t&:first-of-type {\n\t\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-left: 0;\n\n\t\t\t\t&:last-of-type {\n\t\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},8603:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-content code{background-color:hsla(0,0%,78%,.3);border-radius:2px;padding:.15em}.ck.ck-editor__editable .ck-code_selected{background-color:hsla(0,0%,78%,.5)}","",{version:3,sources:["webpack://./../ckeditor5-basic-styles/theme/code.css"],names:[],mappings:"AAKA,iBACC,kCAAuC,CAEvC,iBAAkB,CADlB,aAED,CAEA,0CACC,kCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content code {\n\tbackground-color: hsla(0, 0%, 78%, 0.3);\n\tpadding: .15em;\n\tborder-radius: 2px;\n}\n\n.ck.ck-editor__editable .ck-code_selected {\n\tbackground-color: hsla(0, 0%, 78%, 0.5);\n}\n"],sourceRoot:""}]);const a=s},3062:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-content blockquote{border-left:5px solid #ccc;font-style:italic;margin-left:0;margin-right:0;overflow:hidden;padding-left:1.5em;padding-right:1.5em}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}","",{version:3,sources:["webpack://./../ckeditor5-block-quote/theme/blockquote.css"],names:[],mappings:"AAKA,uBAWC,0BAAsC,CADtC,iBAAkB,CAFlB,aAAc,CACd,cAAe,CAPf,eAAgB,CAIhB,kBAAmB,CADnB,mBAOD,CAEA,gCACC,aAAc,CACd,2BACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content blockquote {\n\t/* See #12 */\n\toverflow: hidden;\n\n\t/* https://github.com/ckeditor/ckeditor5-block-quote/issues/15 */\n\tpadding-right: 1.5em;\n\tpadding-left: 1.5em;\n\n\tmargin-left: 0;\n\tmargin-right: 0;\n\tfont-style: italic;\n\tborder-left: solid 5px hsl(0, 0%, 80%);\n}\n\n.ck-content[dir="rtl"] blockquote {\n\tborder-left: 0;\n\tborder-right: solid 5px hsl(0, 0%, 80%);\n}\n'],sourceRoot:""}]);const a=s},9932:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-find-result{background:#ff0;color:var(--ck-color-text)}.ck-find-result_selected{background:#ff9633}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-find-and-replace/theme/findandreplace.css"],names:[],mappings:"AAKA,gBACC,eAA8B,CAC9B,0BACD,CAEA,yBACC,kBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-find-result {\n\tbackground: hsl(60, 100%, 50%);\n\tcolor: var(--ck-color-text);\n}\n\n.ck-find-result_selected {\n\tbackground: hsl(29, 100%, 60%);\n}\n"],sourceRoot:""}]);const a=s},2822:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-find-and-replace-form{max-width:100%}.ck.ck-find-and-replace-form fieldset{display:flex}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{position:absolute}.ck.ck-find-and-replace-form{width:400px}.ck.ck-find-and-replace-form:focus{outline:none}.ck.ck-find-and-replace-form fieldset{align-content:stretch;align-items:center;border:0;flex-direction:row;flex-wrap:nowrap;margin:0;padding:var(--ck-spacing-large)}.ck.ck-find-and-replace-form fieldset>.ck-button{flex:0 0 auto}[dir=ltr] .ck.ck-find-and-replace-form fieldset>*+*{margin-left:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-find-and-replace-form fieldset>*+*{margin-right:var(--ck-spacing-standard)}.ck.ck-find-and-replace-form fieldset .ck-labeled-field-view{flex:1 1 auto}.ck.ck-find-and-replace-form fieldset .ck-labeled-field-view .ck-input{min-width:50px;width:100%}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find{align-items:flex-start}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-find{font-weight:700}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-find .ck-button__label{padding-left:var(--ck-spacing-large);padding-right:var(--ck-spacing-large)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-prev>.ck-icon{transform:rotate(90deg)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-next>.ck-icon{transform:rotate(-90deg)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{top:50%;transform:translateY(-50%)}[dir=ltr] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{left:var(--ck-spacing-standard)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{color:var(--ck-color-base-border)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace{flex-wrap:wrap;justify-content:flex-end;margin-top:calc(var(--ck-spacing-large)*-1)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-labeled-field-view{margin-bottom:var(--ck-spacing-large)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-options-dropdown{margin-left:0;margin-right:auto}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-labeled-field-view,.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-labeled-field-view .ck-input{width:100%}@media screen and (max-width:600px){.ck.ck-find-and-replace-form{width:300px}.ck.ck-find-and-replace-form fieldset{flex-wrap:wrap}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-labeled-field-view{flex:1 0 auto;margin-bottom:var(--ck-spacing-standard);width:100%}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button{text-align:center}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type{flex:1 1 auto}[dir=ltr] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type{margin-left:0}[dir=rtl] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type{margin-right:0}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type .ck-button__label{text-align:center;width:100%}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>:not(.ck-labeled-field-view){flex:1 1 auto}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-dropdown:not(.ck-labeled-field-view){flex-grow:0}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-button:not(.ck-labeled-field-view)>.ck-button__label{text-align:center;width:100%}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-find-and-replace/theme/findandreplaceform.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-find-and-replace/findandreplaceform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAKA,6BACC,cAUD,CARC,sCACC,YAMD,CAHC,yFACC,iBACD,CCNF,6BACC,WAyGD,CAnGC,mCACC,YACD,CAEA,sCAIC,qBAAsB,CADtB,kBAAmB,CAInB,QAAS,CANT,kBAAmB,CACnB,gBAAiB,CAMjB,QAAS,CAFT,+BAwFD,CApFC,iDACC,aACD,CAGC,oDACC,sCACD,CAIA,oDACC,uCACD,CAGD,6DACC,aAMD,CAJC,uEAEC,cAAe,CADf,UAED,CAID,qEAEC,sBAkCD,CAhCC,qFACC,eAOD,CAJC,uGACC,oCAAqC,CACrC,qCACD,CAGD,8FACC,uBACD,CAEA,8FACC,wBACD,CAEA,yFACC,OAAQ,CACR,0BAWD,CAbA,mGAKE,gCAQF,CAbA,mGASE,+BAIF,CAbA,yFAYC,iCACD,CAID,wEACC,cAAe,CACf,wBAAyB,CACzB,2CAeD,CAbC,+FACC,qCACD,CAEA,6FAEC,aAAc,CADd,iBAED,CAEA,wMAEC,UACD,CCzGF,oCD+GA,6BACC,WAiDD,CA/CC,sCACC,cA6CD,CAzCE,4FACC,aAAc,CAEd,wCAAyC,CADzC,UAED,CAEA,gFACC,iBAkBD,CAhBC,8FACC,aAcD,CAfA,wGAIE,aAWF,CAfA,wGAQE,cAOF,CAJC,gHAEC,iBAAkB,CADlB,UAED,CAMH,qGACC,aAUD,CARC,iHACC,WACD,CAEA,iIAEC,iBAAkB,CADlB,UAED,CC5JH",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-find-and-replace-form {\n\tmax-width: 100%;\n\n\t& fieldset {\n\t\tdisplay: flex;\n\n\t\t/* The find fieldset */\n\t\t&.ck-find-and-replace-form__find .ck-results-counter {\n\t\t\tposition: absolute;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-find-and-replace-form {\n\twidth: 400px;\n\n\t/*\n\t * The <form> needs tabindex="-1" for proper Esc handling after being clicked\n\t * but the side effect is that this creates a nasty focus outline in some browsers.\n\t */\n\t&:focus {\n\t\toutline: none;\n\t}\n\n\t& fieldset {\n\t\tflex-direction: row;\n\t\tflex-wrap: nowrap;\n\t\talign-items: center;\n\t\talign-content: stretch;\n\n\t\tpadding: var(--ck-spacing-large);\n\t\tborder: 0;\n\t\tmargin: 0;\n\n\t\t& > .ck-button {\n\t\t\tflex: 0 0 auto;\n\t\t}\n\n\t\t@mixin ck-dir ltr {\n\t\t\t& > * + * {\n\t\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t& > * + * {\n\t\t\t\tmargin-right: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex: 1 1 auto;\n\n\t\t\t& .ck-input {\n\t\t\t\twidth: 100%;\n\t\t\t\tmin-width: 50px;\n\t\t\t}\n\t\t}\n\n\t\t/* The find fieldset */\n\t\t&.ck-find-and-replace-form__find {\n\t\t\t/* To display all controls in line when there\'s an error under the input */\n\t\t\talign-items: flex-start;\n\n\t\t\t& > .ck-button-find {\n\t\t\t\tfont-weight: bold;\n\n\t\t\t\t/* Beef the find button up a little. It\'s the main action button in the form */\n\t\t\t\t& .ck-button__label {\n\t\t\t\t\tpadding-left: var(--ck-spacing-large);\n\t\t\t\t\tpadding-right: var(--ck-spacing-large);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t& > .ck-button-prev > .ck-icon {\n\t\t\t\ttransform: rotate(90deg);\n\t\t\t}\n\n\t\t\t& > .ck-button-next > .ck-icon {\n\t\t\t\ttransform: rotate(-90deg);\n\t\t\t}\n\n\t\t\t& .ck-results-counter {\n\t\t\t\ttop: 50%;\n\t\t\t\ttransform: translateY(-50%);\n\n\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\tright: var(--ck-spacing-standard);\n\t\t\t\t}\n\n\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\tleft: var(--ck-spacing-standard);\n\t\t\t\t}\n\n\t\t\t\tcolor: var(--ck-color-base-border);\n\t\t\t}\n\t\t}\n\n\t\t/* The replace fieldset */\n\t\t&.ck-find-and-replace-form__replace {\n\t\t\tflex-wrap: wrap;\n\t\t\tjustify-content: flex-end;\n\t\t\tmargin-top: calc( -1 * var(--ck-spacing-large) );\n\n\t\t\t& > .ck-labeled-field-view {\n\t\t\t\tmargin-bottom: var(--ck-spacing-large);\n\t\t\t}\n\n\t\t\t& > .ck-options-dropdown {\n\t\t\t\tmargin-right: auto;\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t\t& > .ck-labeled-field-view,\n\t\t\t& > .ck-labeled-field-view .ck-input {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\t}\n}\n\n@mixin ck-media-phone {\n\t.ck.ck-find-and-replace-form {\n\t\twidth: 300px;\n\n\t\t& fieldset {\n\t\t\tflex-wrap: wrap;\n\n\t\t\t/* The find fieldset */\n\t\t\t&.ck-find-and-replace-form__find {\n\t\t\t\t& .ck-labeled-field-view {\n\t\t\t\t\tflex: 1 0 auto;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\tmargin-bottom: var(--ck-spacing-standard);\n\t\t\t\t}\n\n\t\t\t\t& > .ck-button {\n\t\t\t\t\ttext-align: center;\n\n\t\t\t\t\t&:first-of-type {\n\t\t\t\t\t\tflex: 1 1 auto;\n\n\t\t\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\t\t\tmargin-left: 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\t\t\tmargin-right: 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t& .ck-button__label {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* The replace fieldset */\n\t\t\t&.ck-find-and-replace-form__replace > :not(.ck-labeled-field-view) {\n\t\t\t\tflex: 1 1 auto;\n\n\t\t\t\t&.ck-dropdown {\n\t\t\t\t\tflex-grow: 0;\n\t\t\t\t}\n\n\t\t\t\t&.ck-button > .ck-button__label {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},5023:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-color-mention-background:rgba(153,0,48,.1);--ck-color-mention-text:#990030}.ck-content .mention{background:var(--ck-color-mention-background);color:var(--ck-color-mention-text)}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-mention/mention.css"],names:[],mappings:"AAKA,MACC,+CAAwD,CACxD,+BACD,CAEA,qBACC,6CAA8C,CAC9C,kCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-mention-background: hsla(341, 100%, 30%, 0.1);\n\t--ck-color-mention-text: hsl(341, 100%, 30%);\n}\n\n.ck-content .mention {\n\tbackground: var(--ck-color-mention-background);\n\tcolor: var(--ck-color-mention-text);\n}\n"],sourceRoot:""}]);const a=s},7640:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-mention-list-max-height:300px}.ck.ck-mentions{max-height:var(--ck-mention-list-max-height);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}.ck.ck-mentions>.ck-list__item{flex-shrink:0;overflow:hidden}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-mention/theme/mentionui.css"],names:[],mappings:"AAKA,MACC,kCACD,CAEA,gBACC,4CAA6C,CAM7C,iBAAkB,CAJlB,eAAgB,CAMhB,2BAQD,CAJC,+BAEC,aAAc,CADd,eAED",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-mention-list-max-height: 300px;\n}\n\n.ck.ck-mentions {\n\tmax-height: var(--ck-mention-list-max-height);\n\n\toverflow-y: auto;\n\n\t/* Prevent unnecessary horizontal scrollbar in Safari\n\thttps://github.com/ckeditor/ckeditor5-mention/issues/41 */\n\toverflow-x: hidden;\n\n\toverscroll-behavior: contain;\n\n\t/* Prevent unnecessary vertical scrollbar in Safari\n\thttps://github.com/ckeditor/ckeditor5-mention/issues/41 */\n\t& > .ck-list__item {\n\t\toverflow: hidden;\n\t\tflex-shrink: 0;\n\t}\n}\n"],sourceRoot:""}]);const a=s},903:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,'.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;pointer-events:none;position:relative}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);margin-left:-1px;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{border-color:var(--ck-clipboard-drop-target-color) transparent transparent transparent;border-style:solid;border-width:calc(var(--ck-clipboard-drop-target-dot-height)) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5);content:"";display:block;height:0;left:50%;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);transform:translateX(-50%);width:0}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}',"",{version:3,sources:["webpack://./../ckeditor5-clipboard/theme/clipboard.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-clipboard/clipboard.css"],names:[],mappings:"AASC,8DACC,cAAe,CAEf,mBAAoB,CADpB,iBAOD,CAJC,mEACC,iBAAkB,CAClB,OACD,CAWA,qJACC,YACD,CCzBF,MACC,yCAA0C,CAC1C,yCAA0C,CAC1C,6DACD,CAOE,mEAIC,gDAAiD,CADjD,sDAAuD,CAFvD,2DAA8D,CAI9D,gBAAiB,CAHjB,wDAqBD,CAfC,yEAWC,sFAAuF,CAEvF,kBAAmB,CADnB,qKAA0K,CAX1K,UAAW,CAIX,aAAc,CAFd,QAAS,CAIT,QAAS,CADT,iBAAkB,CAElB,wDAA2D,CAE3D,0BAA2B,CAR3B,OAYD,CA2DF,kEACC,gGACD,CAKA,gDACC,OAAS,CACT,sBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t/*\n\t * Vertical drop target (in text).\n\t */\n\t& .ck.ck-clipboard-drop-target-position {\n\t\tdisplay: inline;\n\t\tposition: relative;\n\t\tpointer-events: none;\n\n\t\t& span {\n\t\t\tposition: absolute;\n\t\t\twidth: 0;\n\t\t}\n\t}\n\n\t/*\n\t * Styles of the widget being dragged (its preview).\n\t */\n\t& .ck-widget:-webkit-drag {\n\t\t& > .ck-widget__selection-handle {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t& > .ck-widget__type-around {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-clipboard-drop-target-dot-width: 12px;\n\t--ck-clipboard-drop-target-dot-height: 8px;\n\t--ck-clipboard-drop-target-color: var(--ck-color-focus-border)\n}\n\n.ck.ck-editor__editable {\n\t/*\n\t * Vertical drop target (in text).\n\t */\n\t& .ck.ck-clipboard-drop-target-position {\n\t\t& span {\n\t\t\tbottom: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\n\t\t\ttop: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\n\t\t\tborder: 1px solid var(--ck-clipboard-drop-target-color);\n\t\t\tbackground: var(--ck-clipboard-drop-target-color);\n\t\t\tmargin-left: -1px;\n\n\t\t\t/* The triangle above the marker */\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\twidth: 0;\n\t\t\t\theight: 0;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 50%;\n\t\t\t\ttop: calc(var(--ck-clipboard-drop-target-dot-height) * -.5);\n\n\t\t\t\ttransform: translateX(-50%);\n\t\t\t\tborder-color: var(--ck-clipboard-drop-target-color) transparent transparent transparent;\n\t\t\t\tborder-width: calc(var(--ck-clipboard-drop-target-dot-height)) calc(.5 * var(--ck-clipboard-drop-target-dot-width)) 0 calc(.5 * var(--ck-clipboard-drop-target-dot-width));\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t// Horizontal drop target (between blocks).\n\t& .ck.ck-clipboard-drop-target-position {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\theight: 0;\n\t\tmargin: 0;\n\t\ttext-align: initial;\n\n\t\t& .ck-clipboard-drop-target__line {\n\t\t\tposition: absolute;\n\t\t\twidth: 100%;\n\t\t\theight: 0;\n\t\t\tborder: 1px solid var(--ck-clipboard-drop-target-color);\n\t\t\tmargin-top: -1px;\n\n\t\t\t&::before {\n\t\t\t\tcontent: "";\n\t\t\t\twidth: 0;\n\t\t\t\theight: 0;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: calc(-1 * var(--ck-clipboard-drop-target-dot-size));\n\t\t\t\ttop: 0;\n\n\t\t\t\ttransform: translateY(-50%);\n\t\t\t\tborder-color: transparent transparent transparent var(--ck-clipboard-drop-target-color);\n\t\t\t\tborder-width: var(--ck-clipboard-drop-target-dot-size) 0 var(--ck-clipboard-drop-target-dot-size) calc(2 * var(--ck-clipboard-drop-target-dot-size));\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\twidth: 0;\n\t\t\t\theight: 0;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: calc(-1 * var(--ck-clipboard-drop-target-dot-size));\n\t\t\t\ttop: 0;\n\n\t\t\t\ttransform: translateY(-50%);\n\t\t\t\tborder-color: transparent var(--ck-clipboard-drop-target-color) transparent transparent;\n\t\t\t\tborder-width: var(--ck-clipboard-drop-target-dot-size) calc(2 * var(--ck-clipboard-drop-target-dot-size)) var(--ck-clipboard-drop-target-dot-size) 0;\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\t\t}\n\t}\n\t*/\n\n\t/*\n\t * Styles of the widget that it a drop target.\n\t */\n\t& .ck-widget.ck-clipboard-drop-target-range {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color) !important;\n\t}\n\n\t/*\n\t * Styles of the widget being dragged (its preview).\n\t */\n\t& .ck-widget:-webkit-drag {\n\t\tzoom: 0.6;\n\t\toutline: none !important;\n\t}\n}\n'],sourceRoot:""}]);const a=s},8343:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-content pre{background:hsla(0,0%,78%,.3);border:1px solid #c4c4c4;border-radius:2px;color:#353535;direction:ltr;font-style:normal;min-width:200px;padding:1em;tab-size:4;text-align:left;white-space:pre-wrap}.ck-content pre code{background:unset;border-radius:0;padding:0}.ck.ck-editor__editable pre{position:relative}.ck.ck-editor__editable pre[data-language]:after{content:attr(data-language);position:absolute}:root{--ck-color-code-block-label-background:#757575}.ck.ck-editor__editable pre[data-language]:after{background:var(--ck-color-code-block-label-background);color:#fff;font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);right:10px;top:-1px;white-space:nowrap}.ck.ck-code-block-dropdown .ck-dropdown__panel{max-height:250px;overflow-x:hidden;overflow-y:auto}","",{version:3,sources:["webpack://./../ckeditor5-code-block/theme/codeblock.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-code-block/codeblock.css"],names:[],mappings:"AAKA,gBAGC,4BAAiC,CACjC,wBAAiC,CACjC,iBAAkB,CAHlB,aAAwB,CAOxB,aAAc,CAMd,iBAAkB,CAGlB,eAAgB,CAjBhB,WAAY,CAUZ,UAAW,CAHX,eAAgB,CAIhB,oBAaD,CALC,qBACC,gBAAiB,CAEjB,eAAgB,CADhB,SAED,CAGD,4BACC,iBAMD,CAJC,iDACC,2BAA4B,CAC5B,iBACD,CCjCD,MACC,8CACD,CAEA,iDAGC,sDAAuD,CAMvD,UAAuB,CAHvB,+BAAgC,CADhC,cAAe,CAEf,gBAAiB,CACjB,uDAAwD,CANxD,UAAW,CADX,QAAS,CAST,kBACD,CAEA,+CAEC,gBAAiB,CAEjB,iBAAkB,CADlB,eAED",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content pre {\n\tpadding: 1em;\n\tcolor: hsl(0, 0%, 20.8%);\n\tbackground: hsla(0, 0%, 78%, 0.3);\n\tborder: 1px solid hsl(0, 0%, 77%);\n\tborder-radius: 2px;\n\n\t/* Code block are language direction–agnostic. */\n\ttext-align: left;\n\tdirection: ltr;\n\n\ttab-size: 4;\n\twhite-space: pre-wrap;\n\n\t/* Don't inherit the style, e.g. when in a block quote. */\n\tfont-style: normal;\n\n\t/* Don't let the code be squashed e.g. when in a table cell. */\n\tmin-width: 200px;\n\n\t& code {\n\t\tbackground: unset;\n\t\tpadding: 0;\n\t\tborder-radius: 0;\n\t}\n}\n\n.ck.ck-editor__editable pre {\n\tposition: relative;\n\n\t&[data-language]::after {\n\t\tcontent: attr(data-language);\n\t\tposition: absolute;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-code-block-label-background: hsl(0, 0%, 46%);\n}\n\n.ck.ck-editor__editable pre[data-language]::after {\n\ttop: -1px;\n\tright: 10px;\n\tbackground: var(--ck-color-code-block-label-background);\n\n\tfont-size: 10px;\n\tfont-family: var(--ck-font-face);\n\tline-height: 16px;\n\tpadding: var(--ck-spacing-tiny) var(--ck-spacing-medium);\n\tcolor: hsl(0, 0%, 100%);\n\twhite-space: nowrap;\n}\n\n.ck.ck-code-block-dropdown .ck-dropdown__panel {\n\t/* There could be dozens of languages available. Use scroll to prevent a 10e6px dropdown. */\n\tmax-height: 250px;\n\toverflow-y: auto;\n\toverflow-x: hidden;\n}\n"],sourceRoot:""}]);const a=s},4717:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text);cursor:text}","",{version:3,sources:["webpack://./../ckeditor5-engine/theme/placeholder.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-engine/placeholder.css"],names:[],mappings:"AAMA,uCAEC,iBAWD,CATC,qDAIC,8BAA+B,CAF/B,MAAO,CAKP,mBAAoB,CANpB,iBAAkB,CAElB,OAKD,CAKA,wCACC,YACD,CAQD,iCACC,iBACD,CC5BC,qDAEC,6CAA8C,CAD9C,WAED",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* See ckeditor/ckeditor5#936. */\n.ck.ck-placeholder,\n.ck .ck-placeholder {\n\tposition: relative;\n\n\t&::before {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tcontent: attr(data-placeholder);\n\n\t\t/* See ckeditor/ckeditor5#469. */\n\t\tpointer-events: none;\n\t}\n}\n\n/* See ckeditor/ckeditor5#1987. */\n.ck.ck-read-only .ck-placeholder {\n\t&::before {\n\t\tdisplay: none;\n\t}\n}\n\n/*\n * Rules for the `ck-placeholder` are loaded before the rules for `ck-reset_all` in the base CKEditor 5 DLL build.\n * This fix overwrites the incorrectly set `position: static` from `ck-reset_all`.\n * See https://github.com/ckeditor/ckeditor5/issues/11418.\n */\n.ck.ck-reset_all .ck-placeholder {\n\tposition: relative;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* See ckeditor/ckeditor5#936. */\n.ck.ck-placeholder, .ck .ck-placeholder {\n\t&::before {\n\t\tcursor: text;\n\t\tcolor: var(--ck-color-engine-placeholder-text);\n\t}\n}\n"],sourceRoot:""}]);const a=s},9315:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}","",{version:3,sources:["webpack://./../ckeditor5-engine/theme/renderer.css"],names:[],mappings:"AAMA,qDACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Elements marked by the Renderer as hidden should be invisible in the editor. */\n.ck.ck-editor__editable span[data-ck-unsafe-element] {\n\tdisplay: none;\n}\n"],sourceRoot:""}]);const a=s},1896:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck .ck-button.ck-color-table__remove-color{align-items:center;display:flex;width:100%}label.ck.ck-color-grid__label{font-weight:unset}.ck .ck-button.ck-color-table__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard)}.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)}","",{version:3,sources:["webpack://./../ckeditor5-font/theme/fontcolor.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-font/fontcolor.css"],names:[],mappings:"AAKA,4CAEC,kBAAmB,CADnB,YAAa,CAEb,UACD,CAEA,8BACC,iBACD,CCNA,4CAEC,2BAA4B,CAC5B,4BAA6B,CAF7B,qEAiBD,CAbC,wDACC,mDACD,CAEA,kEAEE,uCAMF,CARA,kEAME,sCAEF",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-button.ck-color-table__remove-color {\n\tdisplay: flex;\n\talign-items: center;\n\twidth: 100%;\n}\n\nlabel.ck.ck-color-grid__label {\n\tfont-weight: unset;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck .ck-button.ck-color-table__remove-color {\n\tpadding: calc(var(--ck-spacing-standard) / 2 ) var(--ck-spacing-standard);\n\tborder-bottom-left-radius: 0;\n\tborder-bottom-right-radius: 0;\n\n\t&:not(:focus) {\n\t\tborder-bottom: 1px solid var(--ck-color-base-border);\n\t}\n\n\t& .ck.ck-icon {\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-right: var(--ck-spacing-standard);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n}\n\n'],sourceRoot:""}]);const a=s},6007:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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}","",{version:3,sources:["webpack://./../ckeditor5-font/theme/fontsize.css"],names:[],mappings:"AAUC,uBACC,cACD,CAEA,wBACC,eACD,CAEA,sBACC,eACD,CAEA,uBACC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* The values should be synchronized with the "FONT_SIZE_PRESET_UNITS" object in the "/src/fontsize/utils.js" file. */\n\n/* Styles should be prefixed with the `.ck-content` class.\nSee https://github.com/ckeditor/ckeditor5/issues/6636 */\n.ck-content {\n\t& .text-tiny {\n\t\tfont-size: .7em;\n\t}\n\n\t& .text-small {\n\t\tfont-size: .85em;\n\t}\n\n\t& .text-big {\n\t\tfont-size: 1.4em;\n\t}\n\n\t& .text-huge {\n\t\tfont-size: 1.8em;\n\t}\n}\n'],sourceRoot:""}]);const a=s},8733:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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}","",{version:3,sources:["webpack://./../ckeditor5-heading/theme/heading.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-heading/heading.css"],names:[],mappings:"AAKA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,+BACC,eACD,CCZC,2EACC,SACD,CAEA,uEACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-heading_heading1 {\n\tfont-size: 20px;\n}\n\n.ck.ck-heading_heading2 {\n\tfont-size: 17px;\n}\n\n.ck.ck-heading_heading3 {\n\tfont-size: 14px;\n}\n\n.ck[class*="ck-heading_heading"] {\n\tfont-weight: bold;\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Resize dropdown's button label. */\n.ck.ck-dropdown.ck-heading-dropdown {\n\t& .ck-dropdown__button .ck-button__label {\n\t\twidth: 8em;\n\t}\n\n\t& .ck-dropdown__panel .ck-list__item {\n\t\tmin-width: 18em;\n\t}\n}\n"],sourceRoot:""}]);const a=s},2974:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-editor__editable .ck-horizontal-line{display:flow-root}.ck-content hr{background:#dedede;border:0;height:4px;margin:15px 0}","",{version:3,sources:["webpack://./../ckeditor5-horizontal-line/theme/horizontalline.css"],names:[],mappings:"AAMA,yCAEC,iBACD,CAEA,eAGC,kBAA2B,CAC3B,QAAS,CAFT,UAAW,CADX,aAID",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n\n.ck-editor__editable .ck-horizontal-line {\n\t/* Necessary to render properly next to floated objects, e.g. side image case. */\n\tdisplay: flow-root;\n}\n\n.ck-content hr {\n\tmargin: 15px 0;\n\theight: 4px;\n\tbackground: hsl(0, 0%, 87%);\n\tborder: 0;\n}\n"],sourceRoot:""}]);const a=s},3508:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-content .image{clear:both;display:table;margin:.9em auto;min-width:50px;text-align:center}.ck-content .image img{display:block;margin:0 auto;max-width:100%;min-width:100%}.ck-content .image-inline{align-items:flex-start;display:inline-flex;max-width:100%}.ck-content .image-inline picture{display:flex}.ck-content .image-inline img,.ck-content .image-inline picture{flex-grow:1;flex-shrink:1;max-width:100%}.ck.ck-editor__editable .image>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}.ck.ck-editor__editable .image-inline.ck-widget_selected,.ck.ck-editor__editable .image.ck-widget_selected{z-index:1}.ck.ck-editor__editable .image-inline.ck-widget_selected ::selection{display:none}.ck.ck-editor__editable td .image-inline img,.ck.ck-editor__editable th .image-inline img{max-width:none}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/image.css"],names:[],mappings:"AAMC,mBAEC,UAAW,CADX,aAAc,CAOd,gBAAkB,CAGlB,cAAe,CARf,iBAuBD,CAbC,uBAEC,aAAc,CAGd,aAAc,CAGd,cAAe,CAGf,cACD,CAGD,0BAYC,sBAAuB,CANvB,mBAAoB,CAGpB,cAoBD,CAdC,kCACC,YACD,CAGA,gEAGC,WAAY,CACZ,aAAc,CAGd,cACD,CAUD,gEASC,eAAgB,CARhB,oBAAqB,CACrB,qBAAsB,CAQtB,sBAAuB,CAFvB,kBAGD,CAWA,2GACC,SAUD,CAHC,qEACC,YACD,CAOA,0FACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content {\n\t& .image {\n\t\tdisplay: table;\n\t\tclear: both;\n\t\ttext-align: center;\n\n\t\t/* Make sure there is some space between the content and the image. Center image by default. */\n\t\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\t \tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\t\tmargin: 0.9em auto;\n\n\t\t/* Make sure the caption will be displayed properly (See: https://github.com/ckeditor/ckeditor5/issues/1870). */\n\t\tmin-width: 50px;\n\n\t\t& img {\n\t\t\t/* Prevent unnecessary margins caused by line-height (see #44). */\n\t\t\tdisplay: block;\n\n\t\t\t/* Center the image if its width is smaller than the content\'s width. */\n\t\t\tmargin: 0 auto;\n\n\t\t\t/* Make sure the image never exceeds the size of the parent container (ckeditor/ckeditor5-ui#67). */\n\t\t\tmax-width: 100%;\n\n\t\t\t/* Make sure the image is never smaller than the parent container (See: https://github.com/ckeditor/ckeditor5/issues/9300). */\n\t\t\tmin-width: 100%\n\t\t}\n\t}\n\n\t& .image-inline {\n\t\t/*\n\t\t * Normally, the .image-inline would have "display: inline-block" and "img { width: 100% }" (to follow the wrapper while resizing).\n\t\t * Unfortunately, together with "srcset", it gets automatically stretched up to the width of the editing root.\n\t\t * This strange behavior does not happen with inline-flex.\n\t\t */\n\t\tdisplay: inline-flex;\n\n\t\t/* While being resized, don\'t allow the image to exceed the width of the editing root. */\n\t\tmax-width: 100%;\n\n\t\t/* This is required by Safari to resize images in a sensible way. Without this, the browser breaks the ratio. */\n\t\talign-items: flex-start;\n\n\t\t/* When the picture is present it must act as a flex container to let the img resize properly */\n\t\t& picture {\n\t\t\tdisplay: flex;\n\t\t}\n\n\t\t/* When the picture is present, it must act like a resizable img. */\n\t\t& picture,\n\t\t& img {\n\t\t\t/* This is necessary for the img to span the entire .image-inline wrapper and to resize properly. */\n\t\t\tflex-grow: 1;\n\t\t\tflex-shrink: 1;\n\n\t\t\t/* Prevents overflowing the editing root boundaries when an inline image is very wide. */\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n\n.ck.ck-editor__editable {\n\t/*\n\t * Inhertit the content styles padding of the <figcaption> in case the integration overrides `text-align: center`\n\t * of `.image` (e.g. to the left/right). This ensures the placeholder stays at the padding just like the native\n\t * caret does, and not at the edge of <figcaption>.\n\t */\n\t& .image > figcaption.ck-placeholder::before {\n\t\tpadding-left: inherit;\n\t\tpadding-right: inherit;\n\n\t\t/*\n\t\t * Make sure the image caption placeholder doesn\'t overflow the placeholder area.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9162.\n\t\t */\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\n\t/*\n\t * Make sure the selected inline image always stays on top of its siblings.\n\t * See https://github.com/ckeditor/ckeditor5/issues/9108.\n\t */\n\t& .image.ck-widget_selected {\n\t\tz-index: 1;\n\t}\n\n\t& .image-inline.ck-widget_selected {\n\t\tz-index: 1;\n\n\t\t/*\n\t\t * Make sure the native browser selection style is not displayed.\n\t\t * Inline image widgets have their own styles for the selected state and\n\t\t * leaving this up to the browser is asking for a visual collision.\n\t\t */\n\t\t& ::selection {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t/* The inline image nested in the table should have its original size if not resized.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9117. */\n\t& td,\n\t& th {\n\t\t& .image-inline img {\n\t\t\tmax-width: none;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},2640:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-color-image-caption-background:#f7f7f7;--ck-color-image-caption-text:#333;--ck-color-image-caption-highligted-background:#fd0}.ck-content .image>figcaption{background-color:var(--ck-color-image-caption-background);caption-side:bottom;color:var(--ck-color-image-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;word-break:break-word}.ck.ck-editor__editable .image>figcaption.image__caption_highlighted{animation:ck-image-caption-highlight .6s ease-out}@keyframes ck-image-caption-highlight{0%{background-color:var(--ck-color-image-caption-highligted-background)}to{background-color:var(--ck-color-image-caption-background)}}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imagecaption.css"],names:[],mappings:"AAKA,MACC,2CAAoD,CACpD,kCAA8C,CAC9C,mDACD,CAGA,8BAKC,yDAA0D,CAH1D,mBAAoB,CAEpB,wCAAyC,CAHzC,qBAAsB,CAMtB,eAAgB,CAChB,mBAAoB,CAFpB,YAAa,CAHb,qBAMD,CAGA,qEACC,iDACD,CAEA,sCACC,GACC,oEACD,CAEA,GACC,yDACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-image-caption-background: hsl(0, 0%, 97%);\n\t--ck-color-image-caption-text: hsl(0, 0%, 20%);\n\t--ck-color-image-caption-highligted-background: hsl(52deg 100% 50%);\n}\n\n/* Content styles */\n.ck-content .image > figcaption {\n\tdisplay: table-caption;\n\tcaption-side: bottom;\n\tword-break: break-word;\n\tcolor: var(--ck-color-image-caption-text);\n\tbackground-color: var(--ck-color-image-caption-background);\n\tpadding: .6em;\n\tfont-size: .75em;\n\toutline-offset: -1px;\n}\n\n/* Editing styles */\n.ck.ck-editor__editable .image > figcaption.image__caption_highlighted {\n\tanimation: ck-image-caption-highlight .6s ease-out;\n}\n\n@keyframes ck-image-caption-highlight {\n\t0% {\n\t\tbackground-color: var(--ck-color-image-caption-highligted-background);\n\t}\n\n\t100% {\n\t\tbackground-color: var(--ck-color-image-caption-background);\n\t}\n}\n"],sourceRoot:""}]);const a=s},6270:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-content .image.image_resized{box-sizing:border-box;display:block;max-width:100%}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}.ck.ck-editor__editable td .image-inline.image_resized img,.ck.ck-editor__editable th .image-inline.image_resized img{max-width:100%}[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}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageresize.css"],names:[],mappings:"AAKA,iCAQC,qBAAsB,CADtB,aAAc,CANd,cAkBD,CATC,qCAEC,UACD,CAEA,4CAEC,aACD,CAQC,sHACC,cACD,CAIF,oFACC,uCACD,CAEA,oFACC,sCACD,CAEA,oEACC,SACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content .image.image_resized {\n\tmax-width: 100%;\n\t/*\n\tThe `<figure>` element for resized images must not use `display:table` as browsers do not support `max-width` for it well.\n\tSee https://stackoverflow.com/questions/4019604/chrome-safari-ignoring-max-width-in-table/14420691#14420691 for more.\n\tFortunately, since we control the width, there is no risk that the image will look bad.\n\t*/\n\tdisplay: block;\n\tbox-sizing: border-box;\n\n\t& img {\n\t\t/* For resized images it is the `<figure>` element that determines the image width. */\n\t\twidth: 100%;\n\t}\n\n\t& > figcaption {\n\t\t/* The `<figure>` element uses `display:block`, so `<figcaption>` also has to. */\n\t\tdisplay: block;\n\t}\n}\n\n.ck.ck-editor__editable {\n\t/* The resized inline image nested in the table should respect its parent size.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9117. */\n\t& td,\n\t& th {\n\t\t& .image-inline.image_resized img {\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n\n[dir="ltr"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {\n\tmargin-right: var(--ck-spacing-standard);\n}\n\n[dir="rtl"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {\n\tmargin-left: var(--ck-spacing-standard);\n}\n\n.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label {\n\twidth: 4em;\n}\n'],sourceRoot:""}]);const a=s},5083:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-image-style-spacing:1.5em;--ck-inline-image-style-spacing:calc(var(--ck-image-style-spacing)/2)}.ck-content .image-style-block-align-left,.ck-content .image-style-block-align-right{max-width:calc(100% - var(--ck-image-style-spacing))}.ck-content .image-style-align-left,.ck-content .image-style-align-right{clear:none}.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)}.ck-content .image-style-block-align-right{margin-left:auto;margin-right:0}.ck-content .image-style-block-align-left{margin-left:0;margin-right:auto}.ck-content p+.image-style-align-left,.ck-content p+.image-style-align-right,.ck-content p+.image-style-side{margin-top:0}.ck-content .image-inline.image-style-align-left,.ck-content .image-inline.image-style-align-right{margin-bottom:var(--ck-inline-image-style-spacing);margin-top:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-left{margin-right:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-right{margin-left:var(--ck-inline-image-style-spacing)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-background)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after{display:none}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-hover-background)}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imagestyle.css"],names:[],mappings:"AAKA,MACC,8BAA+B,CAC/B,qEACD,CAMC,qFAEC,oDACD,CAIA,yEAEC,UACD,CAEA,8BACC,WAAY,CACZ,yCAA0C,CAC1C,aACD,CAEA,oCACC,UAAW,CACX,0CACD,CAEA,sCACC,gBAAiB,CACjB,iBACD,CAEA,qCACC,WAAY,CACZ,yCACD,CAEA,2CAEC,gBAAiB,CADjB,cAED,CAEA,0CACC,aAAc,CACd,iBACD,CAGA,6GAGC,YACD,CAGC,mGAGC,kDAAmD,CADnD,+CAED,CAEA,iDACC,iDACD,CAEA,kDACC,gDACD,CAUC,0lBAGC,qDAKD,CAHC,8nBACC,YACD,CAKD,oVAGC,2DACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-image-style-spacing: 1.5em;\n\t--ck-inline-image-style-spacing: calc(var(--ck-image-style-spacing) / 2);\n}\n\n.ck-content {\n\t/* Provides a minimal side margin for the left and right aligned images, so that the user has a visual feedback\n\tconfirming successful application of the style if image width exceeds the editor's size.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9342 */\n\t& .image-style-block-align-left,\n\t& .image-style-block-align-right {\n\t\tmax-width: calc(100% - var(--ck-image-style-spacing));\n\t}\n\n\t/* Allows displaying multiple floating images in the same line.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9183#issuecomment-804988132 */\n\t& .image-style-align-left,\n\t& .image-style-align-right {\n\t\tclear: none;\n\t}\n\n\t& .image-style-side {\n\t\tfloat: right;\n\t\tmargin-left: var(--ck-image-style-spacing);\n\t\tmax-width: 50%;\n\t}\n\n\t& .image-style-align-left {\n\t\tfloat: left;\n\t\tmargin-right: var(--ck-image-style-spacing);\n\t}\n\n\t& .image-style-align-center {\n\t\tmargin-left: auto;\n\t\tmargin-right: auto;\n\t}\n\n\t& .image-style-align-right {\n\t\tfloat: right;\n\t\tmargin-left: var(--ck-image-style-spacing);\n\t}\n\n\t& .image-style-block-align-right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\n\t& .image-style-block-align-left {\n\t\tmargin-left: 0;\n\t\tmargin-right: auto;\n\t}\n\n\t/* Simulates margin collapsing with the preceding paragraph, which does not work for the floating elements. */\n\t& p + .image-style-align-left,\n\t& p + .image-style-align-right,\n\t& p + .image-style-side {\n\t\tmargin-top: 0;\n\t}\n\n\t& .image-inline {\n\t\t&.image-style-align-left,\n\t\t&.image-style-align-right {\n\t\t\tmargin-top: var(--ck-inline-image-style-spacing);\n\t\t\tmargin-bottom: var(--ck-inline-image-style-spacing);\n\t\t}\n\n\t\t&.image-style-align-left {\n\t\t\tmargin-right: var(--ck-inline-image-style-spacing);\n\t\t}\n\n\t\t&.image-style-align-right {\n\t\t\tmargin-left: var(--ck-inline-image-style-spacing);\n\t\t}\n\t}\n}\n\n.ck.ck-splitbutton {\n\t/* The button should display as a regular drop-down if the action button\n\tis forced to fire the same action as the arrow button. */\n\t&.ck-splitbutton_flatten {\n\t\t&:hover,\n\t\t&.ck-splitbutton_open {\n\t\t\t& > .ck-splitbutton__action:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {\n\t\t\t\tbackground-color: var(--ck-color-button-on-background);\n\n\t\t\t\t&::after {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.ck-splitbutton_open:hover {\n\t\t\t& > .ck-splitbutton__action:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {\n\t\t\t\tbackground-color: var(--ck-color-button-on-hover-background);\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},4036:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,'.ck-image-upload-complete-icon{border-radius:50%;display:block;position:absolute;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);z-index:1}.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:20;--ck-image-upload-icon-width:2px;--ck-image-upload-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck-image-upload-complete-icon{animation-delay:0ms,3s;animation-duration:.5s,.5s;animation-fill-mode:forwards,forwards;animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;background:var(--ck-color-image-upload-icon-background);font-size:calc(1px*var(--ck-image-upload-icon-size));height:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size));opacity:0;overflow:hidden;width:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size))}.ck-image-upload-complete-icon:after{animation-delay:.5s;animation-duration:.5s;animation-fill-mode:forwards;animation-name:ck-upload-complete-icon-check;border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);box-sizing:border-box;height:0;left:25%;opacity:0;top:50%;transform:scaleX(-1) rotate(135deg);transform-origin:left top;width:0}@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%{height:0;opacity:1;width:0}33%{height:0;width:.3em}to{height:.45em;opacity:1;width:.3em}}',"",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageuploadicon.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadicon.css"],names:[],mappings:"AAKA,+BAUC,iBAAkB,CATlB,aAAc,CACd,iBAAkB,CAOlB,sCAAwC,CADxC,oCAAsC,CAGtC,SAMD,CAJC,qCACC,UAAW,CACX,iBACD,CChBD,MACC,iCAA8C,CAC9C,+CAA4D,CAG5D,8BAA+B,CAC/B,gCAAiC,CACjC,4DACD,CAEA,+BAWC,sBAA4B,CAN5B,0BAAgC,CADhC,qCAAuC,CADvC,wEAA0E,CAD1E,uDAAwD,CAMxD,oDAAuD,CAWvD,oFAAuF,CAlBvF,SAAU,CAgBV,eAAgB,CAChB,mFA0BD,CAtBC,qCAgBC,mBAAsB,CADtB,sBAAyB,CAEzB,4BAA6B,CAH7B,4CAA6C,CAF7C,sFAAuF,CADvF,oFAAqF,CASrF,qBAAsB,CAdtB,QAAS,CAJT,QAAS,CAGT,SAAU,CADV,OAAQ,CAKR,mCAAoC,CACpC,yBAA0B,CAH1B,OAcD,CAGD,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,yCACC,GAGC,QAAS,CAFT,SAAU,CACV,OAED,CACA,IAEC,QAAS,CADT,UAED,CACA,GAGC,YAAc,CAFd,SAAU,CACV,UAED,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-image-upload-complete-icon {\n\tdisplay: block;\n\tposition: absolute;\n\n\t/*\n\t * Smaller images should have the icon closer to the border.\n\t * Match the icon position with the linked image indicator brought by the link image feature.\n\t */\n\ttop: min(var(--ck-spacing-medium), 6%);\n\tright: min(var(--ck-spacing-medium), 6%);\n\tborder-radius: 50%;\n\tz-index: 1;\n\n\t&::after {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t}\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-image-upload-icon: hsl(0, 0%, 100%);\n\t--ck-color-image-upload-icon-background: hsl(120, 100%, 27%);\n\n\t/* Match the icon size with the linked image indicator brought by the link image feature. */\n\t--ck-image-upload-icon-size: 20;\n\t--ck-image-upload-icon-width: 2px;\n\t--ck-image-upload-icon-is-visible: clamp(0px, 100% - 50px, 1px);\n}\n\n.ck-image-upload-complete-icon {\n\topacity: 0;\n\tbackground: var(--ck-color-image-upload-icon-background);\n\tanimation-name: ck-upload-complete-icon-show, ck-upload-complete-icon-hide;\n\tanimation-fill-mode: forwards, forwards;\n\tanimation-duration: 500ms, 500ms;\n\n\t/* To make animation scalable. */\n\tfont-size: calc(1px * var(--ck-image-upload-icon-size));\n\n\t/* Hide completed upload icon after 3 seconds. */\n\tanimation-delay: 0ms, 3000ms;\n\n\t/*\n\t * Use CSS math to simulate container queries.\n\t * https://css-tricks.com/the-raven-technique-one-step-closer-to-container-queries/#what-about-showing-and-hiding-things\n\t */\n\toverflow: hidden;\n\twidth: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size));\n\theight: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size));\n\n\t/* This is check icon element made from border-width mixed with animations. */\n\t&::after {\n\t\t/* Because of border transformation we need to "hard code" left position. */\n\t\tleft: 25%;\n\n\t\ttop: 50%;\n\t\topacity: 0;\n\t\theight: 0;\n\t\twidth: 0;\n\n\t\ttransform: scaleX(-1) rotate(135deg);\n\t\ttransform-origin: left top;\n\t\tborder-top: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);\n\t\tborder-right: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);\n\n\t\tanimation-name: ck-upload-complete-icon-check;\n\t\tanimation-duration: 500ms;\n\t\tanimation-delay: 500ms;\n\t\tanimation-fill-mode: forwards;\n\n\t\t/* #1095. While reset is not providing proper box-sizing for pseudoelements, we need to handle it. */\n\t\tbox-sizing: border-box;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-show {\n\tfrom {\n\t\topacity: 0;\n\t}\n\n\tto {\n\t\topacity: 1;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-hide {\n\tfrom {\n\t\topacity: 1;\n\t}\n\n\tto {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-check {\n\t0% {\n\t\topacity: 1;\n\t\twidth: 0;\n\t\theight: 0;\n\t}\n\t33% {\n\t\twidth: 0.3em;\n\t\theight: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t\twidth: 0.3em;\n\t\theight: 0.45em;\n\t}\n}\n'],sourceRoot:""}]);const a=s},3773:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,'.ck .ck-upload-placeholder-loader{align-items:center;display:flex;justify-content:center;left:0;position:absolute;top:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px;--ck-upload-placeholder-image-aspect-ratio:2.8}.ck .ck-image-upload-placeholder{margin:0;width:100%}.ck .ck-image-upload-placeholder.image-inline{width:calc(var(--ck-upload-placeholder-loader-size)*2*var(--ck-upload-placeholder-image-aspect-ratio))}.ck .ck-image-upload-placeholder img{aspect-ratio:var(--ck-upload-placeholder-image-aspect-ratio)}.ck .ck-upload-placeholder-loader{height:100%;width:100%}.ck .ck-upload-placeholder-loader:before{animation:ck-upload-placeholder-loader 1s linear infinite;border-radius:50%;border-right:2px solid transparent;border-top:3px solid var(--ck-color-upload-placeholder-loader);height:var(--ck-upload-placeholder-loader-size);width:var(--ck-upload-placeholder-loader-size)}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}',"",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageuploadloader.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadloader.css"],names:[],mappings:"AAKA,kCAGC,kBAAmB,CADnB,YAAa,CAEb,sBAAuB,CAEvB,MAAO,CALP,iBAAkB,CAIlB,KAOD,CAJC,yCACC,UAAW,CACX,iBACD,CCXD,MACC,4CAAqD,CACrD,wCAAyC,CACzC,8CACD,CAEA,iCAGC,QAAS,CADT,UAgBD,CAbC,8CACC,sGACD,CAEA,qCAOC,4DACD,CAGD,kCAEC,WAAY,CADZ,UAWD,CARC,yCAMC,yDAA0D,CAH1D,iBAAkB,CAElB,kCAAmC,CADnC,8DAA+D,CAF/D,+CAAgD,CADhD,8CAMD,CAGD,wCACC,GACC,uBACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-upload-placeholder-loader {\n\tposition: absolute;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\ttop: 0;\n\tleft: 0;\n\n\t&::before {\n\t\tcontent: '';\n\t\tposition: relative;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-upload-placeholder-loader: hsl(0, 0%, 70%);\n\t--ck-upload-placeholder-loader-size: 32px;\n\t--ck-upload-placeholder-image-aspect-ratio: 2.8;\n}\n\n.ck .ck-image-upload-placeholder {\n\t/* We need to control the full width of the SVG gray background. */\n\twidth: 100%;\n\tmargin: 0;\n\n\t&.image-inline {\n\t\twidth: calc( 2 * var(--ck-upload-placeholder-loader-size) * var(--ck-upload-placeholder-image-aspect-ratio) );\n\t}\n\n\t& img {\n\t\t/*\n\t\t * This is an arbitrary aspect for a 1x1 px GIF to display to the user. Not too tall, not too short.\n\t\t * There's nothing special about this number except that it should make the image placeholder look like\n\t\t * a real image during this short period after the upload started and before the image was read from the\n\t\t * file system (and a rich preview was loaded).\n\t\t */\n\t\taspect-ratio: var(--ck-upload-placeholder-image-aspect-ratio);\n\t}\n}\n\n.ck .ck-upload-placeholder-loader {\n\twidth: 100%;\n\theight: 100%;\n\n\t&::before {\n\t\twidth: var(--ck-upload-placeholder-loader-size);\n\t\theight: var(--ck-upload-placeholder-loader-size);\n\t\tborder-radius: 50%;\n\t\tborder-top: 3px solid var(--ck-color-upload-placeholder-loader);\n\t\tborder-right: 2px solid transparent;\n\t\tanimation: ck-upload-placeholder-loader 1s linear infinite;\n\t}\n}\n\n@keyframes ck-upload-placeholder-loader {\n\tto {\n\t\ttransform: rotate( 360deg );\n\t}\n}\n"],sourceRoot:""}]);const a=s},3689:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-editor__editable .image,.ck.ck-editor__editable .image-inline{position:relative}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{left:0;position:absolute;top:0}.ck.ck-editor__editable .image-inline.ck-appear,.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{background:var(--ck-color-upload-bar-background);height:2px;transition:width .1s;width:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageuploadprogress.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadprogress.css"],names:[],mappings:"AAMC,qEAEC,iBACD,CAGA,uGAIC,MAAO,CAFP,iBAAkB,CAClB,KAED,CCRC,yFACC,oBACD,CAID,uGAIC,gDAAiD,CAFjD,UAAW,CAGX,oBAAuB,CAFvB,OAGD,CAGD,kBACC,GAAO,SAAY,CACnB,GAAO,SAAY,CACpB",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t& .image,\n\t& .image-inline {\n\t\tposition: relative;\n\t}\n\n\t/* Upload progress bar. */\n\t& .image .ck-progress-bar,\n\t& .image-inline .ck-progress-bar {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t& .image,\n\t& .image-inline {\n\t\t/* Showing animation. */\n\t\t&.ck-appear {\n\t\t\tanimation: fadeIn 700ms;\n\t\t}\n\t}\n\n\t/* Upload progress bar. */\n\t& .image .ck-progress-bar,\n\t& .image-inline .ck-progress-bar {\n\t\theight: 2px;\n\t\twidth: 0;\n\t\tbackground: var(--ck-color-upload-bar-background);\n\t\ttransition: width 100ms;\n\t}\n}\n\n@keyframes fadeIn {\n\tfrom { opacity: 0; }\n\tto { opacity: 1; }\n}\n"],sourceRoot:""}]);const a=s},1905:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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%}}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/textalternativeform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,6BACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,oDACC,oBACD,CAEA,uCACC,YACD,CCZA,oCDCD,6BAcE,cAUF,CARE,oDACC,eACD,CAEA,wCACC,cACD,CCrBD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-text-alternative-form {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t& .ck-labeled-field-view {\n\t\tdisplay: inline-block;\n\t}\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},9773:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/link.css"],names:[],mappings:"AAMA,sBACC,mDAMD,CAHC,wCACC,yFACD,CAOD,4BACC,8CACD,CAGA,sCAEC,gDAAiD,CADjD,WAAY,CAEZ,iBAAkB,CAClB,oCACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Class added to span element surrounding currently selected link. */\n.ck .ck-link_selected {\n\tbackground: var(--ck-color-link-selected-background);\n\n\t/* Give linked inline images some outline to let the user know they are also part of the link. */\n\t& span.image-inline {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background);\n\t}\n}\n\n/*\n * Classes used by the "fake visual selection" displayed in the content when an input\n * in the link UI has focus (the browser does not render the native selection in this state).\n */\n.ck .ck-fake-link-selection {\n\tbackground: var(--ck-color-link-fake-selection);\n}\n\n/* A collapsed fake visual selection. */\n.ck .ck-fake-link-selection_collapsed {\n\theight: 100%;\n\tborder-right: 1px solid var(--ck-color-base-text);\n\tmargin-right: -1px;\n\toutline: solid 1px hsla(0, 0%, 100%, .5);\n}\n'],sourceRoot:""}]);const a=s},2347:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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 .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{color:var(--ck-color-link-default);cursor:pointer;max-width:var(--ck-input-width);min-width:3em;padding:0 var(--ck-spacing-medium);text-align:center;text-overflow:ellipsis}.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}[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 .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{max-width:100%;min-width:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview),[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}","",{version:3,sources:["webpack://./../ckeditor5-link/theme/linkactions.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/linkactions.css"],names:[],mappings:"AAOA,oBACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,8CACC,oBAKD,CAHC,gEACC,eACD,CCXD,oCDCD,oBAcE,cAUF,CARE,8CACC,eACD,CAEA,8DACC,cACD,CCrBD,CCIA,wDACC,cAAe,CACf,eAmCD,CAjCC,0EAEC,kCAAmC,CAEnC,cAAe,CAIf,+BAAgC,CAChC,aAAc,CARd,kCAAmC,CASnC,iBAAkB,CAPlB,sBAYD,CAHC,gFACC,yBACD,CAGD,mPAIC,eACD,CAEA,+DACC,eACD,CAGC,gFACC,yBACD,CAWD,qHACC,sCACD,CDtDD,oCC0DC,wDACC,8DAMD,CAJC,0EAEC,cAAe,CADf,WAED,CAGD,gJAME,aAEF,CDzED",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-actions {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t& .ck-link-actions__preview {\n\t\tdisplay: inline-block;\n\n\t\t& .ck-button__label {\n\t\t\toverflow: hidden;\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-link-actions__preview {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button:not(.ck-link-actions__preview) {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../mixins/_focus.css";\n@import "../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-actions {\n\t& .ck-button.ck-link-actions__preview {\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\n\t\t& .ck-button__label {\n\t\t\tpadding: 0 var(--ck-spacing-medium);\n\t\t\tcolor: var(--ck-color-link-default);\n\t\t\ttext-overflow: ellipsis;\n\t\t\tcursor: pointer;\n\n\t\t\t/* Match the box model of the link editor form\'s input so the balloon\n\t\t\tdoes not change width when moving between actions and the form. */\n\t\t\tmax-width: var(--ck-input-width);\n\t\t\tmin-width: 3em;\n\t\t\ttext-align: center;\n\n\t\t\t&:hover {\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\t\t}\n\n\t\t&,\n\t\t&:hover,\n\t\t&:focus,\n\t\t&:active {\n\t\t\tbackground: none;\n\t\t}\n\n\t\t&:active {\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t&:focus {\n\t\t\t& .ck-button__label {\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\t\t}\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& .ck-button:not(:first-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& .ck-button:not(:last-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\t& .ck-button.ck-link-actions__preview {\n\t\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\n\n\t\t\t& .ck-button__label {\n\t\t\t\tmin-width: 0;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\n\t\t& .ck-button:not(.ck-link-actions__preview) {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},7754:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{min-width:var(--ck-input-width);padding:0}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 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{border-radius:0;margin:0;padding:var(--ck-spacing-standard);width:50%}.ck.ck-link-form_layout-vertical>.ck-button:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form_layout-vertical>.ck-button,[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:var(--ck-spacing-standard) var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}","",{version:3,sources:["webpack://./../ckeditor5-link/theme/linkform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/linkform.css"],names:[],mappings:"AAOA,iBACC,YAiBD,CAfC,2BACC,YACD,CCNA,oCDCD,iBAQE,cAUF,CARE,wCACC,eACD,CAEA,4BACC,cACD,CCfD,CDuBD,iCACC,aAYD,CALE,wHAEC,mCACD,CE/BF,iCAEC,+BAAgC,CADhC,SAgDD,CA7CC,wDACC,8EAMD,CAJC,uEACC,WAAY,CACZ,UACD,CAGD,4CAIC,eAAgB,CAFhB,QAAS,CADT,kCAAmC,CAEnC,SAkBD,CAfC,wDACC,gDACD,CARD,4GAeE,aAMF,CAJE,mEACC,kDACD,CAKF,6CACC,yDAUD,CARC,wEACC,SAAU,CACV,UAKD,CAHC,8EACC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-form {\n\tdisplay: flex;\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n\n/*\n * Style link form differently when manual decorators are available.\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\n */\n.ck.ck-link-form_layout-vertical {\n\tdisplay: block;\n\n\t/*\n\t * Whether the form is in the responsive mode or not, if there are decorator buttons\n\t * keep the top margin of action buttons medium.\n\t */\n\t& .ck-button {\n\t\t&.ck-button-save,\n\t\t&.ck-button-cancel {\n\t\t\tmargin-top: var(--ck-spacing-medium);\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n/*\n * Style link form differently when manual decorators are available.\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\n */\n.ck.ck-link-form_layout-vertical {\n\tpadding: 0;\n\tmin-width: var(--ck-input-width);\n\n\t& .ck-labeled-field-view {\n\t\tmargin: var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small);\n\n\t\t& .ck-input-text {\n\t\t\tmin-width: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t}\n\n\t& > .ck-button {\n\t\tpadding: var(--ck-spacing-standard);\n\t\tmargin: 0;\n\t\twidth: 50%;\n\t\tborder-radius: 0;\n\n\t\t&:not(:focus) {\n\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\t\t}\n\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-left: 0;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-left: 0;\n\n\t\t\t&:last-of-type {\n\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Using additional `.ck` class for stronger CSS specificity than `.ck.ck-link-form > :not(:first-child)`. */\n\t& .ck.ck-list {\n\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-large);\n\n\t\t& .ck-button.ck-switchbutton {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\n\t\t\t&:hover {\n\t\t\t\tbackground: none;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},4721:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-collapsible.ck-collapsible_collapsed>.ck-collapsible__children{display:none}:root{--ck-collapsible-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-collapsible>.ck.ck-button{border-radius:0;font-weight:700;padding:var(--ck-spacing-medium) var(--ck-spacing-large);width:100%}.ck.ck-collapsible>.ck.ck-button:focus{background:transparent}.ck.ck-collapsible>.ck.ck-button:active,.ck.ck-collapsible>.ck.ck-button:hover:not(:focus),.ck.ck-collapsible>.ck.ck-button:not(:focus){background:transparent;border-color:transparent;box-shadow:none}.ck.ck-collapsible>.ck.ck-button>.ck-icon{margin-right:var(--ck-spacing-medium);width:var(--ck-collapsible-arrow-size)}.ck.ck-collapsible>.ck-collapsible__children{padding:0 var(--ck-spacing-large) var(--ck-spacing-large)}.ck.ck-collapsible.ck-collapsible_collapsed>.ck.ck-button .ck-icon{transform:rotate(-90deg)}","",{version:3,sources:["webpack://./../ckeditor5-list/theme/collapsible.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-list/collapsible.css"],names:[],mappings:"AAMC,sEACC,YACD,CCHD,MACC,yDACD,CAGC,iCAIC,eAAgB,CAFhB,eAAiB,CACjB,wDAAyD,CAFzD,UAmBD,CAdC,uCACC,sBACD,CAEA,wIACC,sBAAuB,CACvB,wBAAyB,CACzB,eACD,CAEA,0CACC,qCAAsC,CACtC,sCACD,CAGD,6CACC,yDACD,CAGC,mEACC,wBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-collapsible.ck-collapsible_collapsed {\n\t& > .ck-collapsible__children {\n\t\tdisplay: none;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-collapsible-arrow-size: calc(0.5 * var(--ck-icon-size));\n}\n\n.ck.ck-collapsible {\n\t& > .ck.ck-button {\n\t\twidth: 100%;\n\t\tfont-weight: bold;\n\t\tpadding: var(--ck-spacing-medium) var(--ck-spacing-large);\n\t\tborder-radius: 0;\n\n\t\t&:focus {\n\t\t\tbackground: transparent;\n\t\t}\n\n\t\t&:active, &:not(:focus), &:hover:not(:focus) {\n\t\t\tbackground: transparent;\n\t\t\tborder-color: transparent;\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t& > .ck-icon {\n\t\t\tmargin-right: var(--ck-spacing-medium);\n\t\t\twidth: var(--ck-collapsible-arrow-size);\n\t\t}\n\t}\n\n\t& > .ck-collapsible__children {\n\t\tpadding: 0 var(--ck-spacing-large) var(--ck-spacing-large);\n\t}\n\n\t&.ck-collapsible_collapsed {\n\t\t& > .ck.ck-button .ck-icon {\n\t\t\ttransform: rotate(-90deg);\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},6082:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-list-properties.ck-list-properties_without-styles{padding:var(--ck-spacing-large)}.ck.ck-list-properties.ck-list-properties_without-styles>*{min-width:14em}.ck.ck-list-properties.ck-list-properties_without-styles>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-list-styles-list{grid-template-columns:repeat(4,auto)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*{width:100%}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties .ck.ck-numbered-list-properties__start-index .ck-input{min-width:auto;width:100%}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order{background:transparent;margin-bottom:calc(var(--ck-spacing-tiny)*-1);padding-left:0;padding-right:0}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:active,.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:hover{background:none;border-color:transparent;box-shadow:none}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-list/listproperties.css"],names:[],mappings:"AAOC,yDACC,+BASD,CAPC,2DACC,cAKD,CAHC,6DACC,qCACD,CASD,wFACC,oCACD,CAGA,mFACC,gDAWD,CARE,+GACC,UAKD,CAHC,iHACC,qCACD,CAMJ,8EACC,cAAe,CACf,UACD,CAEA,uEACC,sBAAuB,CAGvB,6CAAgD,CAFhD,cAAe,CACf,eAQD,CALC,2JAGC,eAAgB,CADhB,wBAAyB,CADzB,eAGD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-list-properties {\n\t/* When there are no list styles and there is no collapsible. */\n\t&.ck-list-properties_without-styles {\n\t\tpadding: var(--ck-spacing-large);\n\n\t\t& > * {\n\t\t\tmin-width: 14em;\n\n\t\t\t& + * {\n\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * When the numbered list property fields (start at, reversed) should be displayed,\n\t * more horizontal space is needed. Reconfigure the style grid to create that space.\n\t */\n\t&.ck-list-properties_with-numbered-properties {\n\t\t& > .ck-list-styles-list {\n\t\t\tgrid-template-columns: repeat( 4, auto );\n\t\t}\n\n\t\t/* When list styles are rendered and property fields are in a collapsible. */\n\t\t& > .ck-collapsible {\n\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\n\t\t\t& > .ck-collapsible__children {\n\t\t\t\t& > * {\n\t\t\t\t\twidth: 100%;\n\n\t\t\t\t\t& + * {\n\t\t\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-numbered-list-properties__start-index .ck-input {\n\t\tmin-width: auto;\n\t\twidth: 100%;\n\t}\n\n\t& .ck.ck-numbered-list-properties__reversed-order {\n\t\tbackground: transparent;\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\t\tmargin-bottom: calc(-1 * var(--ck-spacing-tiny));\n\n\t\t&:active, &:hover {\n\t\t\tbox-shadow: none;\n\t\t\tborder-color: transparent;\n\t\t\tbackground: none;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},2417:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-list-styles-list{display:grid}:root{--ck-list-style-button-size:44px}.ck.ck-list-styles-list{column-gap:var(--ck-spacing-medium);grid-template-columns:repeat(3,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-list-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-list-styles-list .ck-button,.ck.ck-list-styles-list .ck-button .ck-icon{height:var(--ck-list-style-button-size);width:var(--ck-list-style-button-size)}","",{version:3,sources:["webpack://./../ckeditor5-list/theme/liststyles.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-list/liststyles.css"],names:[],mappings:"AAKA,wBACC,YACD,CCFA,MACC,gCACD,CAEA,wBAGC,mCAAoC,CAFpC,oCAAwC,CAGxC,+BAAgC,CAFhC,gCA4BD,CAxBC,mCAiBC,sBAAuB,CAPvB,QAAS,CANT,SAmBD,CAJC,+EAhBA,uCAAwC,CADxC,sCAoBA",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-list-styles-list {\n\tdisplay: grid;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-list-style-button-size: 44px;\n}\n\n.ck.ck-list-styles-list {\n\tgrid-template-columns: repeat( 3, auto );\n\trow-gap: var(--ck-spacing-medium);\n\tcolumn-gap: var(--ck-spacing-medium);\n\tpadding: var(--ck-spacing-large);\n\n\t& .ck-button {\n\t\t/* Make the button look like a thumbnail (the icon "takes it all"). */\n\t\twidth: var(--ck-list-style-button-size);\n\t\theight: var(--ck-list-style-button-size);\n\t\tpadding: 0;\n\n\t\t/*\n\t\t * Buttons are aligned by the grid so disable default button margins to not collide with the\n\t\t * gaps in the grid.\n\t\t */\n\t\tmargin: 0;\n\n\t\t/*\n\t\t * Make sure the button border (which is displayed on focus, BTW) does not steal pixels\n\t\t * from the button dimensions and, as a result, decrease the size of the icon\n\t\t * (which becomes blurry as it scales down).\n\t\t */\n\t\tbox-sizing: content-box;\n\n\t\t& .ck-icon {\n\t\t\twidth: var(--ck-list-style-button-size);\n\t\t\theight: var(--ck-list-style-button-size);\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},1199:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,':root{--ck-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px}.ck-content .todo-list li .todo-list{margin-top:5px}.ck-content .todo-list .todo-list__label>input{-webkit-appearance:none;border:0;display:inline-block;height:var(--ck-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:var(--ck-todo-list-checkmark-size)}.ck-content .todo-list .todo-list__label>input:before{border:1px solid #333;border-radius:2px;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;transition:box-shadow .25s ease-in-out,background .25s ease-in-out,border .25s ease-in-out;width:100%}.ck-content .todo-list .todo-list__label>input:after{border-color:transparent;border-style:solid;border-width:0 calc(var(--ck-todo-list-checkmark-size)/8) calc(var(--ck-todo-list-checkmark-size)/8) 0;box-sizing:content-box;content:"";display:block;height:calc(var(--ck-todo-list-checkmark-size)/2.6);left:calc(var(--ck-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:calc(var(--ck-todo-list-checkmark-size)/5.3);transform:rotate(45deg);width:calc(var(--ck-todo-list-checkmark-size)/5.3)}.ck-content .todo-list .todo-list__label>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-content .todo-list .todo-list__label>input[checked]:after{border-color:#fff}.ck-content .todo-list .todo-list__label .todo-list__label__description{vertical-align:middle}[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-editor__editable .todo-list .todo-list__label>input{cursor:pointer}.ck-editor__editable .todo-list .todo-list__label>input:hover:before{box-shadow:0 0 0 5px rgba(0,0,0,.1)}',"",{version:3,sources:["webpack://./../ckeditor5-list/theme/todolist.css"],names:[],mappings:"AAKA,MACC,kCACD,CAEA,uBACC,eA0ED,CAxEC,0BACC,iBAKD,CAHC,qCACC,cACD,CAIA,+CACC,uBAAwB,CAQxB,QAAS,CAPT,oBAAqB,CAGrB,yCAA0C,CAO1C,UAAW,CAGX,aAAc,CAFd,kBAAmB,CAVnB,iBAAkB,CAWlB,OAAQ,CARR,qBAAsB,CAFtB,wCAqDD,CAxCC,sDAOC,qBAAiC,CACjC,iBAAkB,CALlB,qBAAsB,CACtB,UAAW,CAHX,aAAc,CAKd,WAAY,CAJZ,iBAAkB,CAOlB,0FAAgG,CAJhG,UAKD,CAEA,qDAaC,wBAAyB,CADzB,kBAAmB,CAEnB,sGAA+G,CAX/G,sBAAuB,CAEvB,UAAW,CAJX,aAAc,CAUd,mDAAwD,CAHxD,+CAAoD,CAJpD,mBAAoB,CAFpB,iBAAkB,CAOlB,gDAAqD,CAMrD,uBAAwB,CALxB,kDAMD,CAGC,+DACC,kBAA8B,CAC9B,oBACD,CAEA,8DACC,iBACD,CAIF,wEACC,qBACD,CAKF,6CACC,MAAO,CAGP,iBAAkB,CAFlB,cAAe,CACf,WAED,CAMA,wDACC,cAKD,CAHC,qEACC,mCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-todo-list-checkmark-size: 16px;\n}\n\n.ck-content .todo-list {\n\tlist-style: none;\n\n\t& li {\n\t\tmargin-bottom: 5px;\n\n\t\t& .todo-list {\n\t\t\tmargin-top: 5px;\n\t\t}\n\t}\n\n\t& .todo-list__label {\n\t\t& > input {\n\t\t\t-webkit-appearance: none;\n\t\t\tdisplay: inline-block;\n\t\t\tposition: relative;\n\t\t\twidth: var(--ck-todo-list-checkmark-size);\n\t\t\theight: var(--ck-todo-list-checkmark-size);\n\t\t\tvertical-align: middle;\n\n\t\t\t/* Needed on iOS */\n\t\t\tborder: 0;\n\n\t\t\t/* LTR styles */\n\t\t\tleft: -25px;\n\t\t\tmargin-right: -15px;\n\t\t\tright: 0;\n\t\t\tmargin-left: 0;\n\n\t\t\t&::before {\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tcontent: '';\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tborder: 1px solid hsl(0, 0%, 20%);\n\t\t\t\tborder-radius: 2px;\n\t\t\t\ttransition: 250ms ease-in-out box-shadow, 250ms ease-in-out background, 250ms ease-in-out border;\n\t\t\t}\n\n\t\t\t&::after {\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tbox-sizing: content-box;\n\t\t\t\tpointer-events: none;\n\t\t\t\tcontent: '';\n\n\t\t\t\t/* Calculate tick position, size and border-width proportional to the checkmark size. */\n\t\t\t\tleft: calc( var(--ck-todo-list-checkmark-size) / 3 );\n\t\t\t\ttop: calc( var(--ck-todo-list-checkmark-size) / 5.3 );\n\t\t\t\twidth: calc( var(--ck-todo-list-checkmark-size) / 5.3 );\n\t\t\t\theight: calc( var(--ck-todo-list-checkmark-size) / 2.6 );\n\t\t\t\tborder-style: solid;\n\t\t\t\tborder-color: transparent;\n\t\t\t\tborder-width: 0 calc( var(--ck-todo-list-checkmark-size) / 8 ) calc( var(--ck-todo-list-checkmark-size) / 8 ) 0;\n\t\t\t\ttransform: rotate(45deg);\n\t\t\t}\n\n\t\t\t&[checked] {\n\t\t\t\t&::before {\n\t\t\t\t\tbackground: hsl(126, 64%, 41%);\n\t\t\t\t\tborder-color: hsl(126, 64%, 41%);\n\t\t\t\t}\n\n\t\t\t\t&::after {\n\t\t\t\t\tborder-color: hsl(0, 0%, 100%);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t& .todo-list__label__description {\n\t\t\tvertical-align: middle;\n\t\t}\n\t}\n}\n\n/* RTL styles */\n[dir=\"rtl\"] .todo-list .todo-list__label > input {\n\tleft: 0;\n\tmargin-right: 0;\n\tright: -25px;\n\tmargin-left: -15px;\n}\n\n/*\n * To-do list should be interactive only during the editing\n * (https://github.com/ckeditor/ckeditor5/issues/2090).\n */\n.ck-editor__editable .todo-list .todo-list__label > input {\n\tcursor: pointer;\n\n\t&:hover::before {\n\t\tbox-shadow: 0 0 0 5px hsla(0, 0%, 0%, 0.1);\n\t}\n}\n"],sourceRoot:""}]);const a=s},7368:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-input-color{display:flex;flex-direction:row-reverse;width:100%}.ck.ck-input-color>input.ck.ck-input-text{flex-grow:1;min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button{display:flex}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{overflow:hidden;position:relative}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{display:block;position:absolute}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border-radius:0}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border:1px solid var(--ck-color-input-border);height:20px;width:20px}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{background:red;border-radius:2px;height:150%;left:50%;top:-30%;transform:rotate(45deg);transform-origin:50%;width:8%}.ck.ck-input-color .ck.ck-input-color__remove-color{border-bottom:1px solid var(--ck-color-input-border);border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);width:100%}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard);margin-right:0}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/colorinput.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/colorinput.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,mBAEC,YAAa,CACb,0BAA2B,CAF3B,UAgCD,CA5BC,0CAEC,WAAY,CADZ,cAED,CAEA,sCACC,cAMD,CAHC,kFACC,YACD,CAGD,8CAEC,YAWD,CATC,kFAEC,eAAgB,CADhB,iBAOD,CAJC,0IAEC,aAAc,CADd,iBAED,CC1BF,+CAGE,4BAA6B,CAD7B,yBAQF,CAVA,+CAQE,2BAA4B,CAD5B,wBAGF,CAGC,wEACC,SAoCD,CArCA,kFAME,2BAA4B,CAF5B,mBAAoB,CACpB,wBAgCF,CArCA,kFAYE,4BAA6B,CAF7B,oBAAqB,CACrB,yBA0BF,CAtBC,oFACC,oDACD,CAEA,4GC9BF,eD+CE,CAjBA,+PC1BD,qCD2CC,CAjBA,4GAKC,6CAA8C,CAD9C,WAAY,CADZ,UAcD,CAVC,oKAKC,cAA6B,CAC7B,iBAAkB,CAHlB,WAAY,CADZ,QAAS,CADT,QAAS,CAMT,uBAAwB,CACxB,oBAAqB,CAJrB,QAKD,CAKH,oDAEC,oDAAqD,CAGrD,2BAA4B,CAC5B,4BAA6B,CAH7B,qEAAwE,CAFxE,UAuBD,CAxBA,8DASE,yBAeF,CAxBA,8DAaE,wBAWF,CARC,gEACC,uCAMD,CAPA,0EAKE,sCAAuC,CADvC,cAGF",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-input-color {\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: row-reverse;\n\n\t& > input.ck.ck-input-text {\n\t\tmin-width: auto;\n\t\tflex-grow: 1;\n\t}\n\n\t& > div.ck.ck-dropdown {\n\t\tmin-width: auto;\n\n\t\t/* This dropdown has no arrow but a color preview instead. */\n\t\t& > .ck-input-color__button .ck-dropdown__arrow {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& .ck.ck-input-color__button {\n\t\t/* Resolving issue with misaligned buttons on Safari (see #10589) */\n\t\tdisplay: flex;\n\n\t\t& .ck.ck-input-color__button__preview {\n\t\t\tposition: relative;\n\t\t\toverflow: hidden;\n\n\t\t\t& > .ck.ck-input-color__button__preview__no-color-indicator {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../mixins/_rounded.css";\n\n.ck.ck-input-color {\n\t& > .ck.ck-input-text {\n\t\t@mixin ck-dir ltr {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\t}\n\n\t& > .ck.ck-dropdown {\n\t\t& > .ck.ck-button.ck-input-color__button {\n\t\t\tpadding: 0;\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tborder-left-width: 0;\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tborder-right-width: 0;\n\t\t\t\tborder-top-right-radius: 0;\n\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t}\n\n\t\t\t&.ck-disabled {\n\t\t\t\tbackground: var(--ck-color-input-disabled-background);\n\t\t\t}\n\n\t\t\t& > .ck.ck-input-color__button__preview {\n\t\t\t\t@mixin ck-rounded-corners;\n\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t\tborder: 1px solid var(--ck-color-input-border);\n\n\t\t\t\t& > .ck.ck-input-color__button__preview__no-color-indicator {\n\t\t\t\t\ttop: -30%;\n\t\t\t\t\tleft: 50%;\n\t\t\t\t\theight: 150%;\n\t\t\t\t\twidth: 8%;\n\t\t\t\t\tbackground: hsl(0, 100%, 50%);\n\t\t\t\t\tborder-radius: 2px;\n\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\ttransform-origin: 50%;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-input-color__remove-color {\n\t\twidth: 100%;\n\t\tborder-bottom: 1px solid var(--ck-color-input-border);\n\t\tpadding: calc(var(--ck-spacing-standard) / 2) var(--ck-spacing-standard);\n\n\t\tborder-bottom-left-radius: 0;\n\t\tborder-bottom-right-radius: 0;\n\n\t\t@mixin ck-dir ltr {\n\t\t\tborder-top-right-radius: 0;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tborder-top-left-radius: 0;\n\t\t}\n\n\t\t& .ck.ck-icon {\n\t\t\tmargin-right: var(--ck-spacing-standard);\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: 0;\n\t\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},4070:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/form.css"],names:[],mappings:"AAKA,YACC,mCAyBD,CAvBC,kBAEC,YACD,CAEA,8BACC,cAAe,CACf,OACD,CAEA,4BACC,cAWD,CARE,6DACC,4CACD,CAEA,mEACC,UACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form {\n\tpadding: 0 0 var(--ck-spacing-large);\n\n\t&:focus {\n\t\t/* See: https://github.com/ckeditor/ckeditor5/issues/4773 */\n\t\toutline: none;\n\t}\n\n\t& .ck.ck-input-text {\n\t\tmin-width: 100%;\n\t\twidth: 0;\n\t}\n\n\t& .ck.ck-dropdown {\n\t\tmin-width: 100%;\n\n\t\t& .ck-dropdown__button {\n\t\t\t&:not(:focus) {\n\t\t\t\tborder: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\n\t\t\t& .ck-button__label {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},9247:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}[dir=ltr] .ck.ck-form__row>:not(.ck-label)+*{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-form__row>:not(.ck-label)+*{margin-right:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{min-width:100%;width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/formrow.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/formrow.css"],names:[],mappings:"AAKA,iBACC,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,6BAaD,CAVC,iCACC,WACD,CAGC,wHAEC,sBACD,CCbF,iBACC,4DA2BD,CAvBE,6CAEE,mCAMF,CARA,6CAME,oCAEF,CAGD,2BAEC,cAAe,CADf,UAED,CAEA,2CACC,kCAKD,CAHC,wEACC,0BACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form__row {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\tjustify-content: space-between;\n\n\t/* Ignore labels that work as fieldset legends */\n\t& > *:not(.ck-label) {\n\t\tflex-grow: 1;\n\t}\n\n\t&.ck-table-form__action-row {\n\t\t& .ck-button-save,\n\t\t& .ck-button-cancel {\n\t\t\tjustify-content: center;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-form__row {\n\tpadding: var(--ck-spacing-standard) var(--ck-spacing-large) 0;\n\n\t/* Ignore labels that work as fieldset legends */\n\t& > *:not(.ck-label) {\n\t\t& + * {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: var(--ck-spacing-large);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: var(--ck-spacing-large);\n\t\t\t}\n\t\t}\n\t}\n\n\t& > .ck-label {\n\t\twidth: 100%;\n\t\tmin-width: 100%;\n\t}\n\n\t&.ck-table-form__action-row {\n\t\tmargin-top: var(--ck-spacing-large);\n\n\t\t& .ck-button .ck-button__label {\n\t\t\tcolor: var(--ck-color-text);\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},1613:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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{padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;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)}.ck .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{border:1px solid var(--ck-color-base-border);border-radius:1px;height:var(--ck-insert-table-dropdown-box-height);margin:var(--ck-insert-table-dropdown-box-margin);outline:none;width:var(--ck-insert-table-dropdown-box-width)}.ck .ck-insert-table-dropdown-grid-box.ck-on{background:var(--ck-color-focus-outer-shadow);border-color:var(--ck-color-focus-border)}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/inserttable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/inserttable.css"],names:[],mappings:"AAKA,oCACC,YAAa,CACb,kBAAmB,CACnB,cACD,CCJA,MACC,uCAAwC,CACxC,0CAA2C,CAC3C,yCAA0C,CAC1C,yCACD,CAEA,oCAGC,yFAA0F,CAD1F,oJAED,CAEA,qCACC,iBACD,CAEA,uCAIC,4CAA6C,CAC7C,iBAAkB,CAHlB,iDAAkD,CAClD,iDAAkD,CAGlD,YAAa,CALb,+CAWD,CAJC,6CAEC,6CAA8C,CAD9C,yCAED",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-insert-table-dropdown__grid {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-insert-table-dropdown-padding: 10px;\n\t--ck-insert-table-dropdown-box-height: 11px;\n\t--ck-insert-table-dropdown-box-width: 12px;\n\t--ck-insert-table-dropdown-box-margin: 1px;\n}\n\n.ck .ck-insert-table-dropdown__grid {\n\t/* The width of a container should match 10 items in a row so there will be a 10x10 grid. */\n\twidth: calc(var(--ck-insert-table-dropdown-box-width) * 10 + var(--ck-insert-table-dropdown-box-margin) * 20 + var(--ck-insert-table-dropdown-padding) * 2);\n\tpadding: var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;\n}\n\n.ck .ck-insert-table-dropdown__label {\n\ttext-align: center;\n}\n\n.ck .ck-insert-table-dropdown-grid-box {\n\twidth: var(--ck-insert-table-dropdown-box-width);\n\theight: var(--ck-insert-table-dropdown-box-height);\n\tmargin: var(--ck-insert-table-dropdown-box-margin);\n\tborder: 1px solid var(--ck-color-base-border);\n\tborder-radius: 1px;\n\toutline: none;\n\n\t&.ck-on {\n\t\tborder-color: var(--ck-color-focus-border);\n\t\tbackground: var(--ck-color-focus-outer-shadow);\n\t}\n}\n\n"],sourceRoot:""}]);const a=s},6306:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-content .table{display:table;margin:.9em auto}.ck-content .table table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;height:100%;width:100%}.ck-content .table table td,.ck-content .table table th{border:1px solid #bfbfbf;min-width:2em;padding:.4em}.ck-content .table table th{background:rgba(0,0,0,.05);font-weight:700}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/table.css"],names:[],mappings:"AAKA,mBAKC,aAAc,CADd,gBAiCD,CA9BC,yBAYC,yBAAkC,CAVlC,wBAAyB,CACzB,gBAAiB,CAKjB,WAAY,CADZ,UAsBD,CAfC,wDAQC,wBAAiC,CANjC,aAAc,CACd,YAMD,CAEA,4BAEC,0BAA+B,CAD/B,eAED,CAMF,+BACC,gBACD,CAEA,+BACC,eACD,CAEA,+CAKC,oBAAqB,CAMrB,UACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content .table {\n\t/* Give the table widget some air and center it horizontally */\n\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\tmargin: 0.9em auto;\n\tdisplay: table;\n\n\t& table {\n\t\t/* The table cells should have slight borders */\n\t\tborder-collapse: collapse;\n\t\tborder-spacing: 0;\n\n\t\t/* Table width and height are set on the parent <figure>. Make sure the table inside stretches\n\t\tto the full dimensions of the container (https://github.com/ckeditor/ckeditor5/issues/6186). */\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\t/* The outer border of the table should be slightly darker than the inner lines.\n\t\tAlso see https://github.com/ckeditor/ckeditor5-table/issues/50. */\n\t\tborder: 1px double hsl(0, 0%, 70%);\n\n\t\t& td,\n\t\t& th {\n\t\t\tmin-width: 2em;\n\t\t\tpadding: .4em;\n\n\t\t\t/* The border is inherited from .ck-editor__nested-editable styles, so theoretically it\'s not necessary here.\n\t\t\tHowever, the border is a content style, so it should use .ck-content (so it works outside the editor).\n\t\t\tHence, the duplication. See https://github.com/ckeditor/ckeditor5/issues/6314 */\n\t\t\tborder: 1px solid hsl(0, 0%, 75%);\n\t\t}\n\n\t\t& th {\n\t\t\tfont-weight: bold;\n\t\t\tbackground: hsla(0, 0%, 0%, 5%);\n\t\t}\n\t}\n}\n\n/* Text alignment of the table header should match the editor settings and override the native browser styling,\nwhen content is available outside the editor. See https://github.com/ckeditor/ckeditor5/issues/6638 */\n.ck-content[dir="rtl"] .table th {\n\ttext-align: right;\n}\n\n.ck-content[dir="ltr"] .table th {\n\ttext-align: left;\n}\n\n.ck-editor__editable .ck-table-bogus-paragraph {\n\t/*\n\t * Use display:inline-block to force Chrome/Safari to limit text mutations to this element.\n\t * See https://github.com/ckeditor/ckeditor5/issues/6062.\n\t */\n\tdisplay: inline-block;\n\n\t/*\n\t * Inline HTML elements nested in the span should always be dimensioned in relation to the whole cell width.\n\t * See https://github.com/ckeditor/ckeditor5/issues/9117.\n\t */\n\twidth: 100%;\n}\n'],sourceRoot:""}]);const a=s},2128:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-color-table-caption-background:#f7f7f7;--ck-color-table-caption-text:#333;--ck-color-table-caption-highlighted-background:#fd0}.ck-content .table>figcaption{background-color:var(--ck-color-table-caption-background);caption-side:top;color:var(--ck-color-table-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;text-align:center;word-break:break-word}.ck.ck-editor__editable .table>figcaption.table__caption_highlighted{animation:ck-table-caption-highlight .6s ease-out}.ck.ck-editor__editable .table>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}@keyframes ck-table-caption-highlight{0%{background-color:var(--ck-color-table-caption-highlighted-background)}to{background-color:var(--ck-color-table-caption-background)}}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/tablecaption.css"],names:[],mappings:"AAKA,MACC,2CAAoD,CACpD,kCAA8C,CAC9C,oDACD,CAGA,8BAMC,yDAA0D,CAJ1D,gBAAiB,CAGjB,wCAAyC,CAJzC,qBAAsB,CAOtB,eAAgB,CAChB,mBAAoB,CAFpB,YAAa,CAHb,iBAAkB,CADlB,qBAOD,CAIC,qEACC,iDACD,CAEA,gEASC,eAAgB,CARhB,oBAAqB,CACrB,qBAAsB,CAQtB,sBAAuB,CAFvB,kBAGD,CAGD,sCACC,GACC,qEACD,CAEA,GACC,yDACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-table-caption-background: hsl(0, 0%, 97%);\n\t--ck-color-table-caption-text: hsl(0, 0%, 20%);\n\t--ck-color-table-caption-highlighted-background: hsl(52deg 100% 50%);\n}\n\n/* Content styles */\n.ck-content .table > figcaption {\n\tdisplay: table-caption;\n\tcaption-side: top;\n\tword-break: break-word;\n\ttext-align: center;\n\tcolor: var(--ck-color-table-caption-text);\n\tbackground-color: var(--ck-color-table-caption-background);\n\tpadding: .6em;\n\tfont-size: .75em;\n\toutline-offset: -1px;\n}\n\n/* Editing styles */\n.ck.ck-editor__editable .table > figcaption {\n\t&.table__caption_highlighted {\n\t\tanimation: ck-table-caption-highlight .6s ease-out;\n\t}\n\n\t&.ck-placeholder::before {\n\t\tpadding-left: inherit;\n\t\tpadding-right: inherit;\n\n\t\t/*\n\t\t * Make sure the table caption placeholder doesn't overflow the placeholder area.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9162.\n\t\t */\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n@keyframes ck-table-caption-highlight {\n\t0% {\n\t\tbackground-color: var(--ck-color-table-caption-highlighted-background);\n\t}\n\n\t100% {\n\t\tbackground-color: var(--ck-color-table-caption-background);\n\t}\n}\n"],sourceRoot:""}]);const a=s},5087:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:first-of-type{flex-grow:0.57}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:last-of-type{flex-grow:0.43}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar .ck-button{flex-grow:1}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{align-self:flex-end;padding:0;width:25%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/tablecellproperties.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tablecellproperties.css"],names:[],mappings:"AAOE,6FACC,cAiBD,CAdE,0HAEC,cACD,CAEA,yHAEC,cACD,CAEA,uHACC,WACD,CClBJ,kCACC,WAkBD,CAfE,2FACC,mBAAoB,CACpB,SAAU,CACV,SACD,CAGC,4GACC,eAAgB,CAGhB,qCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-cell-properties-form {\n\t& .ck-form__row {\n\t\t&.ck-table-cell-properties-form__alignment-row {\n\t\t\tflex-wrap: wrap;\n\n\t\t\t& .ck.ck-toolbar {\n\t\t\t\t&:first-of-type {\n\t\t\t\t\t/* 4 buttons out of 7 (h-alignment + v-alignment) = 0.57 */\n\t\t\t\t\tflex-grow: 0.57;\n\t\t\t\t}\n\n\t\t\t\t&:last-of-type {\n\t\t\t\t\t/* 3 buttons out of 7 (h-alignment + v-alignment) = 0.43 */\n\t\t\t\t\tflex-grow: 0.43;\n\t\t\t\t}\n\n\t\t\t\t& .ck-button {\n\t\t\t\t\tflex-grow: 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-cell-properties-form {\n\twidth: 320px;\n\n\t& .ck-form__row {\n\t\t&.ck-table-cell-properties-form__padding-row {\n\t\t\talign-self: flex-end;\n\t\t\tpadding: 0;\n\t\t\twidth: 25%;\n\t\t}\n\n\t\t&.ck-table-cell-properties-form__alignment-row {\n\t\t\t& .ck.ck-toolbar {\n\t\t\t\tbackground: none;\n\n\t\t\t\t/* Compensate for missing input label that would push the margin (toolbar has no inputs). */\n\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},3881:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-color-table-focused-cell-background:rgba(158,201,250,.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}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableediting.css"],names:[],mappings:"AAKA,MACC,6DACD,CAKE,8QAGC,wDAAyD,CAKzD,iBAAkB,CAClB,8CAA+C,CAC/C,mBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-table-focused-cell-background: hsla(212, 90%, 80%, .3);\n}\n\n.ck-widget.table {\n\t& td,\n\t& th {\n\t\t&.ck-editor__nested-editable.ck-editor__nested-editable_focused,\n\t\t&.ck-editor__nested-editable:focus {\n\t\t\t/* A very slight background to highlight the focused cell */\n\t\t\tbackground: var(--ck-color-table-focused-cell-background);\n\n\t\t\t/* Fixes the problem where surrounding cells cover the focused cell's border.\n\t\t\tIt does not fix the problem in all places but the UX is improved.\n\t\t\tSee https://github.com/ckeditor/ckeditor5-table/issues/29. */\n\t\t\tborder-style: none;\n\t\t\toutline: 1px solid var(--ck-color-focus-border);\n\t\t\toutline-offset: -1px; /* progressive enhancement - no IE support */\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},6237:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,'.ck.ck-table-form .ck-form__row.ck-table-form__background-row,.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{align-items:center;flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view{align-items:center;display:flex;flex-direction:column-reverse}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck.ck-labeled-field-view{position:relative}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{bottom:calc(var(--ck-table-properties-error-arrow-size)*-1);left:50%;position:absolute;transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{content:"";left:50%;position:absolute;top:calc(var(--ck-table-properties-error-arrow-size)*-1);transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{max-width:80px;min-width:80px;width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-field-view{padding-top:var(--ck-spacing-standard)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{border-radius:0}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status,.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{background:var(--ck-color-base-error);color:var(--ck-color-base-background);min-width:var(--ck-table-properties-min-error-width);padding:var(--ck-spacing-small) var(--ck-spacing-medium);text-align:center}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-color:transparent transparent var(--ck-color-base-error) transparent;border-style:solid;border-width:0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both}.ck.ck-table-form .ck.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}',"",{version:3,sources:["webpack://./../ckeditor5-table/theme/tableform.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableform.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAWE,wHACC,cACD,CAEA,8DAEC,kBAAmB,CADnB,cAgBD,CAbC,qFAGC,kBAAmB,CAFnB,YAAa,CACb,6BAMD,CAEA,sMACC,WACD,CAIF,4CAEC,iBAoBD,CAlBC,8EAGC,2DAAgE,CADhE,QAAS,CADT,iBAAkB,CAGlB,8BAA+B,CAG/B,SAUD,CAPC,oFACC,UAAW,CAGX,QAAS,CAFT,iBAAkB,CAClB,wDAA6D,CAE7D,0BACD,CChDH,MACC,0CAA2C,CAC3C,2CACD,CAMI,2FACC,kCAAmC,CACnC,iBACD,CAGD,8KAIC,cAAe,CADf,cAAe,CADf,UAGD,CAGD,8DACC,SAcD,CAZC,yMAEC,QACD,CAEA,iGACC,mBAAoB,CACpB,oBAAqB,CACrB,wCAAyC,CACzC,6CAA8C,CAC9C,gCACD,CAIF,4CACC,sCAyBD,CAvBC,8ECxCD,eDyDC,CAjBA,mMCpCA,qCDqDA,CAjBA,8EAGC,qCAAsC,CACtC,qCAAsC,CAEtC,oDAAqD,CADrD,wDAAyD,CAEzD,iBAUD,CAPC,oFACC,2EAA4E,CAE5E,kBAAmB,CADnB,kJAED,CAdD,8EAgBC,iEACD,CAGA,6GACC,YACD,CAIF,oDACC,GACC,SACD,CAEA,GACC,SACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-form {\n\t& .ck-form__row {\n\t\t&.ck-table-form__border-row {\n\t\t\tflex-wrap: wrap;\n\t\t}\n\n\t\t&.ck-table-form__background-row {\n\t\t\tflex-wrap: wrap;\n\t\t}\n\n\t\t&.ck-table-form__dimensions-row {\n\t\t\tflex-wrap: wrap;\n\t\t\talign-items: center;\n\n\t\t\t& .ck-labeled-field-view {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column-reverse;\n\t\t\t\talign-items: center;\n\n\t\t\t\t& .ck.ck-dropdown {\n\t\t\t\t\tflex-grow: 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t& .ck-table-form__dimension-operator {\n\t\t\t\tflex-grow: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-labeled-field-view {\n\t\t/* Allow absolute positioning of the status (error) balloons. */\n\t\tposition: relative;\n\n\t\t& .ck.ck-labeled-field-view__status {\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\tbottom: calc( -1 * var(--ck-table-properties-error-arrow-size) );\n\t\t\ttransform: translate(-50%,100%);\n\n\t\t\t/* Make sure the balloon status stays on top of other form elements. */\n\t\t\tz-index: 1;\n\n\t\t\t/* The arrow pointing towards the field. */\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: calc( -1 * var(--ck-table-properties-error-arrow-size) );\n\t\t\t\tleft: 50%;\n\t\t\t\ttransform: translateX( -50% );\n\t\t\t}\n\t\t}\n\t}\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../mixins/_rounded.css";\n\n:root {\n\t--ck-table-properties-error-arrow-size: 6px;\n\t--ck-table-properties-min-error-width: 150px;\n}\n\n.ck.ck-table-form {\n\t& .ck-form__row {\n\t\t&.ck-table-form__border-row {\n\t\t\t& .ck-labeled-field-view {\n\t\t\t\t& > .ck-label {\n\t\t\t\t\tfont-size: var(--ck-font-size-tiny);\n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t& .ck-table-form__border-style,\n\t\t\t& .ck-table-form__border-width {\n\t\t\t\twidth: 80px;\n\t\t\t\tmin-width: 80px;\n\t\t\t\tmax-width: 80px;\n\t\t\t}\n\t\t}\n\n\t\t&.ck-table-form__dimensions-row {\n\t\t\tpadding: 0;\n\n\t\t\t& .ck-table-form__dimensions-row__width,\n\t\t\t& .ck-table-form__dimensions-row__height {\n\t\t\t\tmargin: 0\n\t\t\t}\n\n\t\t\t& .ck-table-form__dimension-operator {\n\t\t\t\talign-self: flex-end;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\theight: var(--ck-ui-component-min-height);\n\t\t\t\tline-height: var(--ck-ui-component-min-height);\n\t\t\t\tmargin: 0 var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-labeled-field-view {\n\t\tpadding-top: var(--ck-spacing-standard);\n\n\t\t& .ck.ck-labeled-field-view__status {\n\t\t\t@mixin ck-rounded-corners;\n\n\t\t\tbackground: var(--ck-color-base-error);\n\t\t\tcolor: var(--ck-color-base-background);\n\t\t\tpadding: var(--ck-spacing-small) var(--ck-spacing-medium);\n\t\t\tmin-width: var(--ck-table-properties-min-error-width);\n\t\t\ttext-align: center;\n\n\t\t\t/* The arrow pointing towards the field. */\n\t\t\t&::after {\n\t\t\t\tborder-color: transparent transparent var(--ck-color-base-error) transparent;\n\t\t\t\tborder-width: 0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size);\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\n\t\t\tanimation: ck-table-form-labeled-view-status-appear .15s ease both;\n\t\t}\n\n\t\t/* Hide the error balloon when the field is blurred. Makes the experience much more clear. */\n\t\t& .ck-input.ck-error:not(:focus) + .ck.ck-labeled-field-view__status {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n@keyframes ck-table-form-labeled-view-status-appear {\n\t0% {\n\t\topacity: 0;\n\t}\n\n\t100% {\n\t\topacity: 1;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},7341:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-content:baseline;flex-basis:0;flex-wrap:wrap}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-self:flex-end;padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/tableproperties.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableproperties.css"],names:[],mappings:"AAOE,mFAGC,sBAAuB,CADvB,YAAa,CADb,cAOD,CAHC,qHACC,gBACD,CCTH,6BACC,WAmBD,CAhBE,mFACC,mBAAoB,CACpB,SAYD,CAVC,kGACC,eAAgB,CAGhB,qCAKD,CAHC,uHACC,UACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-properties-form {\n\t& .ck-form__row {\n\t\t&.ck-table-properties-form__alignment-row {\n\t\t\tflex-wrap: wrap;\n\t\t\tflex-basis: 0;\n\t\t\talign-content: baseline;\n\n\t\t\t& .ck.ck-toolbar .ck-toolbar__items {\n\t\t\t\tflex-wrap: nowrap;\n\t\t\t}\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-properties-form {\n\twidth: 320px;\n\n\t& .ck-form__row {\n\t\t&.ck-table-properties-form__alignment-row {\n\t\t\talign-self: flex-end;\n\t\t\tpadding: 0;\n\n\t\t\t& .ck.ck-toolbar {\n\t\t\t\tbackground: none;\n\n\t\t\t\t/* Compensate for missing input label that would push the margin (toolbar has no inputs). */\n\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\n\t\t\t\t& .ck-toolbar__items > * {\n\t\t\t\t\twidth: 40px;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},6945:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,':root{--ck-table-selected-cell-background:rgba(158,207,250,.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{box-shadow:unset;caret-color:transparent;outline:unset;position:relative}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{background-color:var(--ck-table-selected-cell-background);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top: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,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}',"",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableselection.css"],names:[],mappings:"AAKA,MACC,wDACD,CAGC,0IAKC,gBAAiB,CAFjB,uBAAwB,CACxB,aAAc,CAFd,iBAiCD,CA3BC,sJAGC,yDAA0D,CAK1D,QAAS,CAPT,UAAW,CAKX,MAAO,CAJP,mBAAoB,CAEpB,iBAAkB,CAGlB,OAAQ,CAFR,KAID,CAEA,wTAEC,4BACD,CAMA,gKACC,aAKD,CAHC,0NACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-table-selected-cell-background: hsla(208, 90%, 80%, .3);\n}\n\n.ck.ck-editor__editable .table table {\n\t& td.ck-editor__editable_selected,\n\t& th.ck-editor__editable_selected {\n\t\tposition: relative;\n\t\tcaret-color: transparent;\n\t\toutline: unset;\n\t\tbox-shadow: unset;\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/6446 */\n\t\t&:after {\n\t\t\tcontent: '';\n\t\t\tpointer-events: none;\n\t\t\tbackground-color: var(--ck-table-selected-cell-background);\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tbottom: 0;\n\t\t}\n\n\t\t& ::selection,\n\t\t&:focus {\n\t\t\tbackground-color: transparent;\n\t\t}\n\n\t\t/*\n\t\t * To reduce the amount of noise, all widgets in the table selection have no outline and no selection handle.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9491.\n\t\t */\n\t\t& .ck-widget {\n\t\t\toutline: unset;\n\n\t\t\t& > .ck-widget__selection-handle {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},4906:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;justify-content:left;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.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,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)}.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{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.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{color:inherit;cursor:inherit;font-size:inherit;font-weight: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,.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__icon,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(var(--ck-spacing-small)*-1);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-left:var(--ck-spacing-small);margin-right:calc(var(--ck-spacing-small)*-1)}.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)}.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-on,a.ck.ck-button.ck-on{color:var(--ck-color-button-on-color)}.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)}.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}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/button/button.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/button.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/mixins/_button.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AAOA,6BAMC,kBAAmB,CADnB,mBAAoB,CAEpB,oBAAqB,CAHrB,iBAAkB,CCFlB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBDkBD,CAdC,iEACC,YACD,CAGC,yGACC,oBACD,CAID,iFACC,sBACD,CEjBD,6BCAC,oDD4ID,CCzIE,6EACC,0DACD,CAEA,+EACC,2DACD,CAID,qDACC,6DACD,CDfD,6BEDC,eF6ID,CA5IA,wIEGE,qCFyIF,CA5IA,6BA6BC,uBAAwB,CANxB,4BAA6B,CAjB7B,cAAe,CAcf,iBAAkB,CAHlB,aAAc,CAJd,4CAA6C,CAD7C,2CAA4C,CAJ5C,8BAA+B,CAC/B,iBAAkB,CAiBlB,4DAA8D,CAnB9D,qBAAsB,CAFtB,kBAuID,CA7GC,oFGhCA,2BAA2B,CCF3B,2CAA8B,CDC9B,YHqCA,CAIC,kJAEC,aACD,CAGD,iEAIC,aAAc,CACd,cAAe,CAHf,iBAAkB,CAClB,mBAAoB,CAMpB,qBASD,CAlBA,qFAYE,eAMF,CAlBA,qFAgBE,gBAEF,CAEA,yEACC,aAYD,CAbA,6FAIE,mCASF,CAbA,6FAQE,oCAKF,CAbA,yEAWC,eAAiB,CACjB,UACD,CAIC,oIIrFD,oDJyFC,CAOA,gLKhGD,kCLkGC,CAEA,iGACC,UACD,CAGD,qEACC,yDAcD,CAXC,2HAEE,4CAA+C,CAC/C,oCAOF,CAVA,2HAQE,mCAAoC,CADpC,6CAGF,CAKA,mHACC,WACD,CAID,yCC/HA,+CDmIA,CChIC,yFACC,qDACD,CAEA,2FACC,sDACD,CAID,iEACC,wDACD,CDgHA,yCAGC,qCACD,CAEA,2DACC,iCACD,CAEA,+DACC,mCACD,CAID,2CC/IC,mDDoJD,CCjJE,2FACC,yDACD,CAEA,6FACC,0DACD,CAID,mEACC,4DACD,CDgID,2CAIC,wCACD,CAEA,uCAEC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-button,\na.ck.ck-button {\n\t@mixin ck-unselectable;\n\n\tposition: relative;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: left;\n\n\t& .ck-button__label {\n\t\tdisplay: none;\n\t}\n\n\t&.ck-button_with-text {\n\t\t& .ck-button__label {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t}\n\n\t/* Center the icon horizontally in a button without text. */\n\t&:not(.ck-button_with-text) {\n\t\tjustify-content: center;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_focus.css";\n@import "../../../mixins/_shadow.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_rounded.css";\n@import "../../mixins/_button.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-button,\na.ck.ck-button {\n\t@mixin ck-button-colors --ck-color-button-default;\n\t@mixin ck-rounded-corners;\n\n\twhite-space: nowrap;\n\tcursor: default;\n\tvertical-align: middle;\n\tpadding: var(--ck-spacing-tiny);\n\ttext-align: center;\n\n\t/* A very important piece of styling. Go to variable declaration to learn more. */\n\tmin-width: var(--ck-ui-component-min-height);\n\tmin-height: var(--ck-ui-component-min-height);\n\n\t/* Normalize the height of the line. Removing this will break consistent height\n\tamong text and text-less buttons (with icons). */\n\tline-height: 1;\n\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t/* Avoid flickering when the foucs border shows up. */\n\tborder: 1px solid transparent;\n\n\t/* Apply some smooth transition to the box-shadow and border. */\n\ttransition: box-shadow .2s ease-in-out, border .2s ease-in-out;\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/189 */\n\t-webkit-appearance: none;\n\n\t&:active,\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t}\n\n\t/* Allow icon coloring using the text "color" property. */\n\t& .ck-button__icon {\n\t\t& use,\n\t\t& use * {\n\t\t\tcolor: inherit;\n\t\t}\n\t}\n\n\t& .ck-button__label {\n\t\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\t\tfont-size: inherit;\n\t\tfont-weight: inherit;\n\t\tcolor: inherit;\n\t\tcursor: inherit;\n\n\t\t/* Must be consistent with .ck-icon\'s vertical align. Otherwise, buttons with and\n\t\twithout labels (but with icons) have different sizes in Chrome */\n\t\tvertical-align: middle;\n\n\t\t@mixin ck-dir ltr {\n\t\t\ttext-align: left;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\ttext-align: right;\n\t\t}\n\t}\n\n\t& .ck-button__keystroke {\n\t\tcolor: inherit;\n\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-left: var(--ck-spacing-large);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-right: var(--ck-spacing-large);\n\t\t}\n\n\t\tfont-weight: bold;\n\t\topacity: .7;\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */\n\t&.ck-disabled {\n\t\t&:active,\n\t\t&:focus {\n\t\t\t/* The disabled button should have a slightly less visible shadow when focused. */\n\t\t\t@mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow);\n\t\t}\n\n\t\t& .ck-button__icon {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */\n\t\t& .ck-button__label {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t& .ck-button__keystroke {\n\t\t\topacity: .3;\n\t\t}\n\t}\n\n\t&.ck-button_with-text {\n\t\tpadding: var(--ck-spacing-tiny) var(--ck-spacing-standard);\n\n\t\t/* stylelint-disable-next-line no-descending-specificity */\n\t\t& .ck-button__icon {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: calc(-1 * var(--ck-spacing-small));\n\t\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: calc(-1 * var(--ck-spacing-small));\n\t\t\t\tmargin-left: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\t}\n\n\t&.ck-button_with-keystroke {\n\t\t/* stylelint-disable-next-line no-descending-specificity */\n\t\t& .ck-button__label {\n\t\t\tflex-grow: 1;\n\t\t}\n\t}\n\n\t/* A style of the button which is currently on, e.g. its feature is active. */\n\t&.ck-on {\n\t\t@mixin ck-button-colors --ck-color-button-on;\n\n\t\tcolor: var(--ck-color-button-on-color);\n\t}\n\n\t&.ck-button-save {\n\t\tcolor: var(--ck-color-button-save);\n\t}\n\n\t&.ck-button-cancel {\n\t\tcolor: var(--ck-color-button-cancel);\n\t}\n}\n\n/* A style of the button which handles the primary action. */\n.ck.ck-button-action,\na.ck.ck-button-action {\n\t@mixin ck-button-colors --ck-color-button-action;\n\n\tcolor: var(--ck-color-button-action-text);\n}\n\n.ck.ck-button-bold,\na.ck.ck-button-bold {\n\tfont-weight: bold;\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements a button of given background color.\n *\n * @param {String} $background - Background color of the button.\n * @param {String} $border - Border color of the button.\n */\n@define-mixin ck-button-colors $prefix {\n\tbackground: var($(prefix)-background);\n\n\t&:not(.ck-disabled) {\n\t\t&:hover {\n\t\t\tbackground: var($(prefix)-hover-background);\n\t\t}\n\n\t\t&:active {\n\t\t\tbackground: var($(prefix)-active-background);\n\t\t}\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */\n\t&.ck-disabled {\n\t\tbackground: var($(prefix)-disabled-background);\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n"],sourceRoot:""}]);const a=s},5332:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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:calc(1.07692em + 1px);--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2px);--ck-switch-button-inner-hover-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.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{background:var(--ck-color-switch-button-off-background);border:1px solid transparent;transition:background .4s ease,box-shadow .2s ease-in-out,outline .2s ease-in-out;width:var(--ck-switch-button-toggle-width)}.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(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}.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:var(--ck-switch-button-inner-hover-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton:focus{border-color:transparent;box-shadow:none;outline:none}.ck.ck-button.ck-switchbutton:focus .ck-button__toggle{box-shadow:0 0 0 1px var(--ck-color-base-background),0 0 0 5px var(--ck-color-focus-outer-shadow);outline:var(--ck-focus-ring);outline-offset:1px}.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(var( --ck-switch-button-translation )*-1))}.ck.ck-button.ck-switchbutton.ck-on:active,.ck.ck-button.ck-switchbutton:active{background:transparent}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/button/switchbutton.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/switchbutton.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AASE,4HACC,aACD,CCCF,MAEC,8CAA+C,CAE/C,0DAAgE,CAChE,2HAIC,CACD,0FACD,CAGC,0DAGE,4CAOF,CAVA,0DAQE,2CAEF,CAEA,iDC3BA,eDmEA,CAxCA,yICvBC,qCD+DD,CAxCA,2DAKE,gBAmCF,CAxCA,2DAUE,iBA8BF,CAxCA,iDAkBC,uDAAwD,CAFxD,4BAA6B,CAD7B,iFAAsF,CAEtF,0CAuBD,CApBC,2EC/CD,eD0DC,CAXA,6LC3CA,qCAAsC,CD6CpC,8CASF,CAXA,2EAOC,yDAA0D,CAD1D,gDAAiD,CAIjD,uBAA0B,CAL1B,+CAMD,CAEA,uDACC,6DAKD,CAHC,iFACC,qDACD,CAIF,6DEvEA,kCFyEA,CAGA,oCACC,wBAAyB,CAEzB,eAAgB,CADhB,YAQD,CALC,uDACC,iGAAmG,CAEnG,4BAA6B,CAD7B,kBAED,CAIA,uDACC,sDAkBD,CAhBC,6DACC,4DACD,CAEA,2FAKE,2DAMF,CAXA,2FASE,oEAEF,CAKF,gFACC,sBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-button.ck-switchbutton {\n\t& .ck-button__toggle {\n\t\tdisplay: block;\n\n\t\t& .ck-button__toggle__inner {\n\t\t\tdisplay: block;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n/* Note: To avoid rendering issues (aliasing) but to preserve the responsive nature\nof the component, floating–point numbers have been used which, for the default font size\n(see: --ck-font-size-base), will generate simple integers. */\n:root {\n\t/* 34px at 13px font-size */\n\t--ck-switch-button-toggle-width: 2.6153846154em;\n\t/* 14px at 13px font-size */\n\t--ck-switch-button-toggle-inner-size: calc(1.0769230769em + 1px);\n\t--ck-switch-button-translation: calc(\n\t\tvar(--ck-switch-button-toggle-width) -\n\t\tvar(--ck-switch-button-toggle-inner-size) -\n\t\t2px /* Border */\n\t);\n\t--ck-switch-button-inner-hover-shadow: 0 0 0 5px var(--ck-color-switch-button-inner-shadow);\n}\n\n.ck.ck-button.ck-switchbutton {\n\t& .ck-button__label {\n\t\t@mixin ck-dir ltr {\n\t\t\t/* Separate the label from the switch */\n\t\t\tmargin-right: calc(2 * var(--ck-spacing-large));\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t/* Separate the label from the switch */\n\t\t\tmargin-left: calc(2 * var(--ck-spacing-large));\n\t\t}\n\t}\n\n\t& .ck-button__toggle {\n\t\t@mixin ck-rounded-corners;\n\n\t\t@mixin ck-dir ltr {\n\t\t\t/* Make sure the toggle is always to the right as far as possible. */\n\t\t\tmargin-left: auto;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t/* Make sure the toggle is always to the left as far as possible. */\n\t\t\tmargin-right: auto;\n\t\t}\n\n\t\t/* Apply some smooth transition to the box-shadow and border. */\n\t\t/* Gently animate the background color of the toggle switch */\n\t\ttransition: background 400ms ease, box-shadow .2s ease-in-out, outline .2s ease-in-out;\n\t\tborder: 1px solid transparent;\n\t\twidth: var(--ck-switch-button-toggle-width);\n\t\tbackground: var(--ck-color-switch-button-off-background);\n\n\t\t& .ck-button__toggle__inner {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-radius: calc(.5 * var(--ck-border-radius));\n\t\t\t}\n\n\t\t\twidth: var(--ck-switch-button-toggle-inner-size);\n\t\t\theight: var(--ck-switch-button-toggle-inner-size);\n\t\t\tbackground: var(--ck-color-switch-button-inner-background);\n\n\t\t\t/* Gently animate the inner part of the toggle switch */\n\t\t\ttransition: all 300ms ease;\n\t\t}\n\n\t\t&:hover {\n\t\t\tbackground: var(--ck-color-switch-button-off-hover-background);\n\n\t\t\t& .ck-button__toggle__inner {\n\t\t\t\tbox-shadow: var(--ck-switch-button-inner-hover-shadow);\n\t\t\t}\n\t\t}\n\t}\n\n\t&.ck-disabled .ck-button__toggle {\n\t\t@mixin ck-disabled;\n\t}\n\n\t/* Overriding default .ck-button:focus styles + an outline around the toogle */\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t\tbox-shadow: none;\n\n\t\t& .ck-button__toggle {\n\t\t\tbox-shadow: 0 0 0 1px var(--ck-color-base-background), 0 0 0 5px var(--ck-color-focus-outer-shadow);\n\t\t\toutline-offset: 1px;\n\t\t\toutline: var(--ck-focus-ring);\n\t\t}\n\t}\n\n\t&.ck-on {\n\t\t& .ck-button__toggle {\n\t\t\tbackground: var(--ck-color-switch-button-on-background);\n\n\t\t\t&:hover {\n\t\t\t\tbackground: var(--ck-color-switch-button-on-hover-background);\n\t\t\t}\n\n\t\t\t& .ck-button__toggle__inner {\n\t\t\t\t/*\n\t\t\t\t* Move the toggle switch to the right. It will be animated.\n\t\t\t\t*/\n\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\ttransform: translateX( var( --ck-switch-button-translation ) );\n\t\t\t\t}\n\n\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\ttransform: translateX( calc( -1 * var( --ck-switch-button-translation ) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Regular buttons get a backgound when active. Switch buttons announce that through the switch toggle instead */\n\t&:active, &.ck-on:active {\n\t\tbackground: transparent;\n\t}\n\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n"],sourceRoot:""}]);const a=s},6781:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#166fd4}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-color-grid-tile-size)}.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{color:var(--ck-color-color-grid-check-icon);display:none}.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)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/colorgrid/colorgrid.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/colorgrid/colorgrid.css"],names:[],mappings:"AAKA,kBACC,YACD,CCAA,MACC,8BAA+B,CAK/B,wCACD,CAEA,kBACC,YAAa,CACb,WACD,CAEA,wBAOC,QAAS,CALT,qCAAsC,CAEtC,yCAA0C,CAD1C,wCAAyC,CAEzC,SAAU,CACV,8BAA+B,CAL/B,oCAyCD,CAjCC,oCACC,YAAa,CACb,gBACD,CAEA,4DACC,gDACD,CAEA,oCAEC,2CAA4C,CAD5C,YAED,CAEA,8BACC,8FAKD,CAHC,0CACC,aACD,CAGD,8HAIC,QACD,CAEA,gGAEC,iGACD,CAGD,yBACC,oCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-color-grid {\n\tdisplay: grid;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-color-grid-tile-size: 24px;\n\n\t/* Not using global colors here because these may change but some colors in a pallette\n\t * require special treatment. For instance, this ensures no matter what the UI text color is,\n\t * the check icon will look good on the black color tile. */\n\t--ck-color-color-grid-check-icon: hsl(212, 81%, 46%);\n}\n\n.ck.ck-color-grid {\n\tgrid-gap: 5px;\n\tpadding: 8px;\n}\n\n.ck.ck-color-grid__tile {\n\twidth: var(--ck-color-grid-tile-size);\n\theight: var(--ck-color-grid-tile-size);\n\tmin-width: var(--ck-color-grid-tile-size);\n\tmin-height: var(--ck-color-grid-tile-size);\n\tpadding: 0;\n\ttransition: .2s ease box-shadow;\n\tborder: 0;\n\n\t&.ck-disabled {\n\t\tcursor: unset;\n\t\ttransition: unset;\n\t}\n\n\t&.ck-color-table__color-tile_bordered {\n\t\tbox-shadow: 0 0 0 1px var(--ck-color-base-border);\n\t}\n\n\t& .ck.ck-icon {\n\t\tdisplay: none;\n\t\tcolor: var(--ck-color-color-grid-check-icon);\n\t}\n\n\t&.ck-on {\n\t\tbox-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-base-text);\n\n\t\t& .ck.ck-icon {\n\t\t\tdisplay: block;\n\t\t}\n\t}\n\n\t&.ck-on,\n\t&:focus:not( .ck-disabled ),\n\t&:hover:not( .ck-disabled ) {\n\t\t/* Disable the default .ck-button\'s border ring. */\n\t\tborder: 0;\n\t}\n\n\t&:focus:not( .ck-disabled ),\n\t&:hover:not( .ck-disabled ) {\n\t\tbox-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-focus-border);\n\t}\n}\n\n.ck.ck-color-grid__label {\n\tpadding: 0 var(--ck-spacing-standard);\n}\n'],sourceRoot:""}]);const a=s},5485:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-dropdown-max-width:75vw}.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-dropdown__panel{display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-modal)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.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-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.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{margin-left:var(--ck-spacing-standard);right: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{overflow:hidden;text-overflow:ellipsis;width:7em}.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 .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.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{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 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}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dropdown/dropdown.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/dropdown.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,MACC,4BACD,CAEA,gBACC,oBAAqB,CACrB,iBA2ED,CAzEC,oCACC,mBAAoB,CACpB,2BACD,CAGA,+CACC,UACD,CAEA,oCACC,YAAa,CAEb,sCAAuC,CAEvC,iBAAkB,CAHlB,yBA4DD,CAvDC,+DACC,oBACD,CAEA,mSAKC,WACD,CAEA,mSAUC,WAAY,CADZ,QAED,CAEA,oHAEC,MACD,CAEA,oHAEC,OACD,CAEA,kHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAQF,mCACC,mCACD,CCpFA,MACC,sDACD,CAEA,gBAEC,iBA2ED,CAzEC,oCACC,mCACD,CAGC,8CAIC,sCAAuC,CAHvC,gCAID,CAIA,8CACC,+BAAgC,CAGhC,oCACD,CAGD,gDC/BA,kCDiCA,CAIE,mFAEC,oCACD,CAIA,mFAEC,qCACD,CAID,iEAEC,eAAgB,CAChB,sBAAuB,CAFvB,SAGD,CAGA,6EC1DD,kCD4DC,CAGA,qDACC,2BAA4B,CAC5B,4BACD,CAEA,sGACC,UACD,CAGA,yHAEC,eAKD,CAHC,qIE7EF,2CF+EE,CAKH,uBGlFC,eH8GD,CA5BA,qFG9EE,qCH0GF,CA5BA,uBAIC,oDAAqD,CACrD,sDAAuD,CACvD,QAAS,CE1FT,oCAA8B,CF6F9B,cAmBD,CAfC,6CACC,wBACD,CAEA,6CACC,yBACD,CAEA,6CACC,2BACD,CAEA,6CACC,4BACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-dropdown-max-width: 75vw;\n}\n\n.ck.ck-dropdown {\n\tdisplay: inline-block;\n\tposition: relative;\n\n\t& .ck-dropdown__arrow {\n\t\tpointer-events: none;\n\t\tz-index: var(--ck-z-default);\n\t}\n\n\t/* Dropdown button should span horizontally, e.g. in vertical toolbars */\n\t& .ck-button.ck-dropdown__button {\n\t\twidth: 100%;\n\t}\n\n\t& .ck-dropdown__panel {\n\t\tdisplay: none;\n\t\tz-index: var(--ck-z-modal);\n\t\tmax-width: var(--ck-dropdown-max-width);\n\n\t\tposition: absolute;\n\n\t\t&.ck-dropdown__panel-visible {\n\t\t\tdisplay: inline-block;\n\t\t}\n\n\t\t&.ck-dropdown__panel_ne,\n\t\t&.ck-dropdown__panel_nw,\n\t\t&.ck-dropdown__panel_n,\n\t\t&.ck-dropdown__panel_nmw,\n\t\t&.ck-dropdown__panel_nme {\n\t\t\tbottom: 100%;\n\t\t}\n\n\t\t&.ck-dropdown__panel_se,\n\t\t&.ck-dropdown__panel_sw,\n\t\t&.ck-dropdown__panel_smw,\n\t\t&.ck-dropdown__panel_sme,\n\t\t&.ck-dropdown__panel_s {\n\t\t\t/*\n\t\t\t * Using transform: translate3d( 0, 100%, 0 ) causes blurry dropdown on Chrome 67-78+ on non-retina displays.\n\t\t\t * See https://github.com/ckeditor/ckeditor5/issues/1053.\n\t\t\t */\n\t\t\ttop: 100%;\n\t\t\tbottom: auto;\n\t\t}\n\n\t\t&.ck-dropdown__panel_ne,\n\t\t&.ck-dropdown__panel_se {\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t&.ck-dropdown__panel_nw,\n\t\t&.ck-dropdown__panel_sw {\n\t\t\tright: 0px;\n\t\t}\n\n\t\t&.ck-dropdown__panel_s,\n\t\t&.ck-dropdown__panel_n {\n\t\t\t/* Positioning panels relative to the center of the button */\n\t\t\tleft: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t}\n\n\t\t&.ck-dropdown__panel_nmw,\n\t\t&.ck-dropdown__panel_smw {\n\t\t\t/* Positioning panels relative to the middle-west of the button */\n\t\t\tleft: 75%;\n\t\t\ttransform: translateX(-75%);\n\t\t}\n\n\t\t&.ck-dropdown__panel_nme,\n\t\t&.ck-dropdown__panel_sme {\n\t\t\t/* Positioning panels relative to the middle-east of the button */\n\t\t\tleft: 25%;\n\t\t\ttransform: translateX(-25%);\n\t\t}\n\t}\n}\n\n/*\n * Toolbar dropdown panels should be always above the UI (eg. other dropdown panels) from the editor's content.\n * See https://github.com/ckeditor/ckeditor5/issues/7874\n */\n.ck.ck-toolbar .ck-dropdown__panel {\n\tz-index: calc( var(--ck-z-modal) + 1 );\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n:root {\n\t--ck-dropdown-arrow-size: calc(0.5 * var(--ck-icon-size));\n}\n\n.ck.ck-dropdown {\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t& .ck-dropdown__arrow {\n\t\twidth: var(--ck-dropdown-arrow-size);\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& .ck-dropdown__arrow {\n\t\t\tright: var(--ck-spacing-standard);\n\n\t\t\t/* A space to accommodate the triangle. */\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& .ck-dropdown__arrow {\n\t\t\tleft: var(--ck-spacing-standard);\n\n\t\t\t/* A space to accommodate the triangle. */\n\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t}\n\t}\n\n\t&.ck-disabled .ck-dropdown__arrow {\n\t\t@mixin ck-disabled;\n\t}\n\n\t& .ck-button.ck-dropdown__button {\n\t\t@mixin ck-dir ltr {\n\t\t\t&:not(.ck-button_with-text) {\n\t\t\t\t/* Make sure dropdowns with just an icon have the right inner spacing */\n\t\t\t\tpadding-left: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t&:not(.ck-button_with-text) {\n\t\t\t\t/* Make sure dropdowns with just an icon have the right inner spacing */\n\t\t\t\tpadding-right: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\n\t\t/* #23 */\n\t\t& .ck-button__label {\n\t\t\twidth: 7em;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */\n\t\t&.ck-disabled .ck-button__label {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/816 */\n\t\t&.ck-on {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t&.ck-dropdown__button_label-width_auto .ck-button__label {\n\t\t\twidth: auto;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/8699 */\n\t\t&.ck-off:active,\n\t\t&.ck-on:active {\n\t\t\tbox-shadow: none;\n\t\t\t\n\t\t\t&:focus {\n\t\t\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck.ck-dropdown__panel {\n\t@mixin ck-rounded-corners;\n\t@mixin ck-drop-shadow;\n\n\tbackground: var(--ck-color-dropdown-panel-background);\n\tborder: 1px solid var(--ck-color-dropdown-panel-border);\n\tbottom: 0;\n\n\t/* Make sure the panel is at least as wide as the drop-down\'s button. */\n\tmin-width: 100%;\n\n\t/* Disabled corner border radius to be consistent with the .dropdown__button\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t&.ck-dropdown__panel_se {\n\t\tborder-top-left-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_sw {\n\t\tborder-top-right-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_ne {\n\t\tborder-bottom-left-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_nw {\n\t\tborder-bottom-right-radius: 0;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},3949:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-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}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/listdropdown.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,6CCIC,eDqBD,CAzBA,iICQE,qCAAsC,CDJtC,wBAqBF,CAfE,mFCND,eDYC,CANA,6MCFA,qCAAsC,CDKpC,2BAA4B,CAC5B,4BAA6B,CAF7B,wBAIF,CAEA,kFCdD,eDmBC,CALA,2MCVA,qCAAsC,CDYpC,wBAAyB,CACzB,yBAEF",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n.ck.ck-dropdown .ck-dropdown__panel .ck-list {\n\t/* Disabled radius of top-left border to be consistent with .dropdown__button\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t@mixin ck-rounded-corners {\n\t\tborder-top-left-radius: 0;\n\t}\n\n\t/* Make sure the button belonging to the first/last child of the list goes well with the\n\tborder radius of the entire panel. */\n\t& .ck-list__item {\n\t\t&:first-child .ck-button {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t}\n\t\t}\n\n\t\t&:last-child .ck-button {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-top-right-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},7686:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,'.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-right-radius:unset;border-top-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-left-radius:unset;border-top-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-left-radius:unset;border-top-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-right-radius:unset;border-top-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)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{background-color:var(--ck-color-split-button-hover-border);content:"";height:100%;position:absolute;width:1px}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.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}',"",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dropdown/splitbutton.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/splitbutton.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,mBAEC,iBAKD,CAHC,iDACC,qCACD,CCJD,MACC,gDAAyD,CACzD,4CACD,CAMC,oIAKE,gCAAiC,CADjC,6BASF,CAbA,oIAWE,+BAAgC,CADhC,4BAGF,CAEA,0CAGC,eAiBD,CApBA,oDAQE,+BAAgC,CADhC,4BAaF,CApBA,oDAcE,gCAAiC,CADjC,6BAOF,CAHC,8CACC,mCACD,CASA,0KACC,wDACD,CAIA,8JAKC,0DAA2D,CAJ3D,UAAW,CAGX,WAAY,CAFZ,iBAAkB,CAClB,SAGD,CAGC,kLACC,SACD,CAIA,kLACC,UACD,CAMF,uCC7EA,eDuFA,CAVA,qHCzEC,qCDmFD,CARE,qKACC,2BACD,CAEA,mKACC,4BACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-splitbutton {\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t& .ck-splitbutton__action:focus {\n\t\tz-index: calc(var(--ck-z-default) + 1);\n\t}\n}\n\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-color-split-button-hover-background: hsl(0, 0%, 92%);\n\t--ck-color-split-button-hover-border: hsl(0, 0%, 70%);\n}\n\n.ck.ck-splitbutton {\n\t/*\n\t * Note: ck-rounded and ck-dir mixins don\'t go together (because they both use @nest).\n\t */\n\t&:hover > .ck-splitbutton__action,\n\t&.ck-splitbutton_open > .ck-splitbutton__action {\n\t\t@nest [dir="ltr"] & {\n\t\t\t/* Don\'t round the action button on the right side */\n\t\t\tborder-top-right-radius: unset;\n\t\t\tborder-bottom-right-radius: unset;\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t/* Don\'t round the action button on the left side */\n\t\t\tborder-top-left-radius: unset;\n\t\t\tborder-bottom-left-radius: unset;\n\t\t}\n\t}\n\n\t& > .ck-splitbutton__arrow {\n\t\t/* It\'s a text-less button and since the icon is positioned absolutely in such situation,\n\t\tit must get some arbitrary min-width. */\n\t\tmin-width: unset;\n\n\t\t@nest [dir="ltr"] & {\n\t\t\t/* Don\'t round the arrow button on the left side */\n\t\t\tborder-top-left-radius: unset;\n\t\t\tborder-bottom-left-radius: unset;\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t/* Don\'t round the arrow button on the right side */\n\t\t\tborder-top-right-radius: unset;\n\t\t\tborder-bottom-right-radius: unset;\n\t\t}\n\n\t\t& svg {\n\t\t\twidth: var(--ck-dropdown-arrow-size);\n\t\t}\n\t}\n\n\t/* When the split button is "open" (the arrow is on) or being hovered, it should get some styling\n\tas a whole. The background of both buttons should stand out and there should be a visual\n\tseparation between both buttons. */\n\t&.ck-splitbutton_open,\n\t&:hover {\n\t\t/* When the split button hovered as a whole, not as individual buttons. */\n\t\t& > .ck-button:not(.ck-on):not(.ck-disabled):not(:hover) {\n\t\t\tbackground: var(--ck-color-split-button-hover-background);\n\t\t}\n\n\t\t/* Splitbutton separator needs to be set with the ::after pseudoselector\n\t\tto display properly the borders on focus */\n\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\tcontent: \'\';\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t\theight: 100%;\n\t\t\tbackground-color: var(--ck-color-split-button-hover-border);\n\t\t}\n\n\t\t@nest [dir="ltr"] & {\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\t\tleft: -1px;\n\t\t\t}\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\t\tright: -1px;\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Don\'t round the bottom left and right corners of the buttons when "open"\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t&.ck-splitbutton_open {\n\t\t@mixin ck-rounded-corners {\n\t\t\t& > .ck-splitbutton__action {\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t}\n\n\t\t\t& > .ck-splitbutton__arrow {\n\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},7339:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:var(--ck-toolbar-dropdown-max-width);width:max-content}.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}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dropdown/toolbardropdown.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/toolbardropdown.css"],names:[],mappings:"AAKA,MACC,oCACD,CAEA,4CAGC,8CAA+C,CAD/C,iBAQD,CAJE,6DACC,qCACD,CCZF,oCACC,QACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-toolbar-dropdown-max-width: 60vw;\n}\n\n.ck.ck-toolbar-dropdown > .ck-dropdown__panel {\n\t/* https://github.com/ckeditor/ckeditor5/issues/5586 */\n\twidth: max-content;\n\tmax-width: var(--ck-toolbar-dropdown-max-width);\n\n\t& .ck-button {\n\t\t&:focus {\n\t\t\tz-index: calc(var(--ck-z-default) + 1);\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-toolbar-dropdown .ck-toolbar {\n\tborder: 0;\n}\n"],sourceRoot:""}]);const a=s},9688:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable.ck-rounded-corners:not(.ck-editor__nested-editable){border-radius:var(--ck-border-radius)}.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable){border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>: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)}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/editorui/editorui.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAWA,MACC,0CACD,CAEA,yDCJC,eDWD,CAPA,yJCAE,qCDOF,CAJC,oEEPA,2BAA2B,CCF3B,qCAA8B,CDC9B,YFWA,CAGD,+BAGC,4BAA6B,CAF7B,aAAc,CACd,oCA6BD,CA1BC,wCACC,eACD,CAEA,wCACC,gBACD,CAGA,4CACC,kCACD,CAGA,2CAKC,qCACD,CAGA,sDACC,kDACD,CAKA,gEACC,mDACD,CAIA,gEACC,gDACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_shadow.css";\n@import "../../../mixins/_focus.css";\n@import "../../mixins/_button.css";\n\n:root {\n\t--ck-color-editable-blur-selection: hsl(0, 0%, 85%);\n}\n\n.ck.ck-editor__editable:not(.ck-editor__nested-editable) {\n\t@mixin ck-rounded-corners;\n\n\t&.ck-focused {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-inner-shadow);\n\t}\n}\n\n.ck.ck-editor__editable_inline {\n\toverflow: auto;\n\tpadding: 0 var(--ck-spacing-standard);\n\tborder: 1px solid transparent;\n\n\t&[dir="ltr"] {\n\t\ttext-align: left;\n\t}\n\n\t&[dir="rtl"] {\n\t\ttext-align: right;\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/116 */\n\t& > *:first-child {\n\t\tmargin-top: var(--ck-spacing-large);\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5/issues/847 */\n\t& > *:last-child {\n\t\t/*\n\t\t * This value should match with the default margins of the block elements (like .media or .image)\n\t\t * to avoid a content jumping when the fake selection container shows up (See https://github.com/ckeditor/ckeditor5/issues/9825).\n\t\t */\n\t\tmargin-bottom: var(--ck-spacing-large);\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5/issues/6517 */\n\t&.ck-blurred ::selection {\n\t\tbackground: var(--ck-color-editable-blur-selection);\n\t}\n}\n\n/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/111 */\n.ck.ck-balloon-panel.ck-toolbar-container[class*="arrow_n"] {\n\t&::after {\n\t\tborder-bottom-color: var(--ck-color-base-foreground);\n\t}\n}\n\n.ck.ck-balloon-panel.ck-toolbar-container[class*="arrow_s"] {\n\t&::after {\n\t\tborder-top-color: var(--ck-color-base-foreground);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},8847:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-form__header .ck-form__header__label{font-weight:700}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/formheader/formheader.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/formheader/formheader.css"],names:[],mappings:"AAKA,oBAIC,kBAAmB,CAHnB,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CAEjB,6BACD,CCNA,MACC,4BACD,CAEA,oBAIC,mDAAoD,CAFpD,mCAAoC,CACpC,wCAAyC,CAFzC,uDAQD,CAHC,4CACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form__header {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\talign-items: center;\n\tjustify-content: space-between;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-form-header-height: 38px;\n}\n\n.ck.ck-form__header {\n\tpadding: var(--ck-spacing-small) var(--ck-spacing-large);\n\theight: var(--ck-form-header-height);\n\tline-height: var(--ck-form-header-height);\n\tborder-bottom: 1px solid var(--ck-color-base-border);\n\n\t& .ck-form__header__label {\n\t\tfont-weight: bold;\n\t}\n}\n"],sourceRoot:""}]);const a=s},6574:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{color:inherit;cursor:inherit}.ck.ck-icon :not([fill]){fill:currentColor}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/icon/icon.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/icon/icon.css"],names:[],mappings:"AAKA,YACC,qBACD,CCFA,MACC,0EACD,CAEA,YAKC,uBAAwB,CAHxB,0BAA2B,CAD3B,yBAA0B,CAY1B,qBAcD,CAZC,0BARA,aAAc,CAGd,cAgBA,CAJC,yBAEC,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-icon {\n\tvertical-align: middle;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-icon-size: calc(var(--ck-line-height-base) * var(--ck-font-size-normal));\n}\n\n.ck.ck-icon {\n\twidth: var(--ck-icon-size);\n\theight: var(--ck-icon-size);\n\n\t/* Multiplied by the height of the line in "px" should give SVG "viewport" dimensions */\n\tfont-size: .8333350694em;\n\n\tcolor: inherit;\n\n\t/* Inherit cursor style (#5). */\n\tcursor: inherit;\n\n\t/* This will prevent blurry icons on Firefox. See #340. */\n\twill-change: transform;\n\n\t& * {\n\t\t/* Inherit cursor style (#5). */\n\t\tcursor: inherit;\n\n\t\t/* Allows dynamic coloring of the icons. */\n\t\tcolor: inherit;\n\n\t\t&:not([fill]) {\n\t\t\t/* Needed by FF. */\n\t\t\tfill: currentColor;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},4879:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/input/input.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AASA,MACC,qBAAsB,CAGtB,2CACD,CAEA,aCLC,eD2CD,CAtCA,iECDE,qCDuCF,CAtCA,aAGC,2CAA4C,CAC5C,6CAA8C,CAK9C,4CAA6C,CAH7C,+BAAgC,CADhC,6DAA8D,CAO9D,4DA0BD,CAxBC,mBEnBA,2BAA2B,CCF3B,2CAA8B,CDC9B,YFuBA,CAEA,uBAEC,oDAAqD,CADrD,sDAAuD,CAEvD,yCAMD,CAJC,6BG/BD,oDHkCC,CAGD,sBAEC,sCAAuC,CADvC,+CAMD,CAHC,4BGzCD,iDH2CC,CAIF,0BACC,IACC,0BACD,CAEA,IACC,yBACD,CAEA,IACC,0BACD,CAEA,IACC,yBACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_focus.css";\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-input-width: 18em;\n\n\t/* Backward compatibility. */\n\t--ck-input-text-width: var(--ck-input-width);\n}\n\n.ck.ck-input {\n\t@mixin ck-rounded-corners;\n\n\tbackground: var(--ck-color-input-background);\n\tborder: 1px solid var(--ck-color-input-border);\n\tpadding: var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);\n\tmin-width: var(--ck-input-width);\n\n\t/* This is important to stay of the same height as surrounding buttons */\n\tmin-height: var(--ck-ui-component-min-height);\n\n\t/* Apply some smooth transition to the box-shadow and border. */\n\ttransition: box-shadow .1s ease-in-out, border .1s ease-in-out;\n\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t}\n\n\t&[readonly] {\n\t\tborder: 1px solid var(--ck-color-input-disabled-border);\n\t\tbackground: var(--ck-color-input-disabled-background);\n\t\tcolor: var(--ck-color-input-disabled-text);\n\n\t\t&:focus {\n\t\t\t/* The read-only input should have a slightly less visible shadow when focused. */\n\t\t\t@mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow);\n\t\t}\n\t}\n\n\t&.ck-error {\n\t\tborder-color: var(--ck-color-input-error-border);\n\t\tanimation: ck-input-shake .3s ease both;\n\n\t\t&:focus {\n\t\t\t@mixin ck-box-shadow var(--ck-focus-error-outer-shadow);\n\t\t}\n\t}\n}\n\n@keyframes ck-input-shake {\n\t20% {\n\t\ttransform: translateX(-2px);\n\t}\n\n\t40% {\n\t\ttransform: translateX(2px);\n\t}\n\n\t60% {\n\t\ttransform: translateX(-1px);\n\t}\n\n\t80% {\n\t\ttransform: translateX(1px);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},3662:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/label/label.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/label/label.css"],names:[],mappings:"AAKA,aACC,aACD,CAEA,mBACC,YACD,CCNA,aACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-label {\n\tdisplay: block;\n}\n\n.ck.ck-voice-label {\n\tdisplay: none;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-label {\n\tfont-weight: bold;\n}\n"],sourceRoot:""}]);const a=s},2577:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.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.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-spacing-medium),calc(var(--ck-font-size-base)*.6)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-spacing-medium)*-1),calc(var(--ck-font-size-base)*.6)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/labeledfield/labeledfieldview.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAMC,mEACC,YAAa,CACb,iBACD,CAEA,uCACC,aAAc,CACd,iBACD,CCND,MACC,kEAAsE,CACtE,gFAAiF,CACjF,yEACD,CAEA,0BCHC,eD4GD,CAzGA,2FCCE,qCDwGF,CAtGC,mEACC,UAmCD,CAjCC,gFACC,KA+BD,CAhCA,0FAIE,MA4BF,CAhCA,0FAQE,OAwBF,CAhCA,gFAiBC,yDAA0D,CAG1D,eAAmB,CADnB,kBAAoB,CAOpB,cAAe,CAFf,eAAgB,CANhB,2CAA8C,CAP9C,mBAAoB,CAYpB,sBAAuB,CARvB,6DAA+D,CAH/D,oBAAqB,CAgBrB,+JAID,CAQA,mKACC,gCACD,CAGD,yDACC,mCAAoC,CACpC,kCAAmC,CAInC,kBAKD,CAHC,6FACC,gCACD,CAID,4OAEC,yCACD,CAIA,oUAGE,wFAYF,CAfA,oUAOE,iGAQF,CAfA,gTAaC,sBAAuB,CAFvB,iEAAkE,CAGlE,SACD,CAKA,8FACC,sBACD,CAGA,yIACC,SACD,CAGA,kMACC,8HACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-labeled-field-view {\n\t& > .ck.ck-labeled-field-view__input-wrapper {\n\t\tdisplay: flex;\n\t\tposition: relative;\n\t}\n\n\t& .ck.ck-label {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-labeled-field-view-transition: .1s cubic-bezier(0, 0, 0.24, 0.95);\n\t--ck-labeled-field-empty-unfocused-max-width: 100% - 2 * var(--ck-spacing-medium);\n\t--ck-color-labeled-field-label-background: var(--ck-color-base-background);\n}\n\n.ck.ck-labeled-field-view {\n\t@mixin ck-rounded-corners;\n\n\t& > .ck.ck-labeled-field-view__input-wrapper {\n\t\twidth: 100%;\n\n\t\t& > .ck.ck-label {\n\t\t\ttop: 0px;\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tleft: 0px;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tright: 0px;\n\t\t\t}\n\n\t\t\tpointer-events: none;\n\t\t\ttransform-origin: 0 0;\n\n\t\t\t/* By default, display the label scaled down above the field. */\n\t\t\ttransform: translate(var(--ck-spacing-medium), -6px) scale(.75);\n\n\t\t\tbackground: var(--ck-color-labeled-field-label-background);\n\t\t\tpadding: 0 calc(.5 * var(--ck-font-size-tiny));\n\t\t\tline-height: initial;\n\t\t\tfont-weight: normal;\n\n\t\t\t/* Prevent overflow when the label is longer than the input */\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\n\t\t\tmax-width: 100%;\n\n\t\t\ttransition:\n\t\t\t\ttransform var(--ck-labeled-field-view-transition),\n\t\t\t\tpadding var(--ck-labeled-field-view-transition),\n\t\t\t\tbackground var(--ck-labeled-field-view-transition);\n\t\t}\n\t}\n\n\t&.ck-error {\n\t\t& > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\n\t\t& .ck-input:not([readonly]) + .ck.ck-label {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\t}\n\n\t& .ck-labeled-field-view__status {\n\t\tfont-size: var(--ck-font-size-small);\n\t\tmargin-top: var(--ck-spacing-small);\n\n\t\t/* Let the info wrap to the next line to avoid stretching the layout horizontally.\n\t\tThe status could be very long. */\n\t\twhite-space: normal;\n\n\t\t&.ck-labeled-field-view__status_error {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\t}\n\n\t/* Disabled fields and fields that have no focus should fade out. */\n\t&.ck-disabled > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label,\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\tcolor: var(--ck-color-input-disabled-text);\n\t}\n\n\t/* Fields that are disabled or not focused and without a placeholder should have full-sized labels. */\n\t/* stylelint-disable-next-line no-descending-specificity */\n\t&.ck-disabled.ck-labeled-field-view_empty > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label,\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\t@mixin ck-dir ltr {\n\t\t\ttransform: translate(var(--ck-spacing-medium), calc(0.6 * var(--ck-font-size-base))) scale(1);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\ttransform: translate(calc(-1 * var(--ck-spacing-medium)), calc(0.6 * var(--ck-font-size-base))) scale(1);\n\t\t}\n\n\t\t/* Compensate for the default translate position. */\n\t\tmax-width: calc(var(--ck-labeled-field-empty-unfocused-max-width));\n\n\t\tbackground: transparent;\n\t\tpadding: 0;\n\t}\n\n\t/*------ DropdownView integration ----------------------------------------------------------------------------------- */\n\n\t/* Make sure dropdown\' background color in any of dropdown\'s state does not collide with labeled field. */\n\t& > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck.ck-button {\n\t\tbackground: transparent;\n\t}\n\n\t/* When the dropdown is "empty", the labeled field label replaces its label. */\n\t&.ck-labeled-field-view_empty > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck-button > .ck-button__label {\n\t\topacity: 0;\n\t}\n\n\t/* Make sure the label of the empty, unfocused input does not cover the dropdown arrow. */\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown + .ck-label {\n\t\tmax-width: calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard));\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},2053:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-labeled-input .ck-labeled-input__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-input .ck-labeled-input__status_error{color:var(--ck-color-base-error)}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/labeledinput/labeledinput.css"],names:[],mappings:"AAKA,+CACC,mCAAoC,CACpC,kCAAmC,CAInC,kBACD,CAEA,qDACC,gCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-labeled-input .ck-labeled-input__status {\n\tfont-size: var(--ck-font-size-small);\n\tmargin-top: var(--ck-spacing-small);\n\n\t/* Let the info wrap to the next line to avoid stretching the layout horizontally.\n\tThe status could be very long. */\n\twhite-space: normal;\n}\n\n.ck.ck-labeled-input .ck-labeled-input__status_error {\n\tcolor: var(--ck-color-base-error);\n}\n"],sourceRoot:""}]);const a=s},1046:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-list{display:flex;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.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{background:var(--ck-color-list-background);list-style-type:none}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{border-radius:0;min-height:unset;padding:calc(var(--ck-line-height-base)*.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*.4*var(--ck-font-size-base));text-align:left;width:100%}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(var(--ck-line-height-base)*1.2*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-switchbutton):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{background:var(--ck-color-base-border);height:1px;width:100%}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/list/list.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/list/list.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,YAGC,YAAa,CACb,qBAAsB,CCFtB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBDaD,CAZC,2DAEC,aACD,CAKA,kCACC,iBAAkB,CAClB,2BACD,CEfD,YCEC,eDGD,CALA,+DCME,qCDDF,CALA,YAIC,0CAA2C,CAD3C,oBAED,CAEA,kBACC,cAAe,CACf,cA2DD,CAzDC,6BAIC,eAAgB,CAHhB,gBAAiB,CAQjB,iIAEiE,CARjE,eAAgB,CADhB,UAwCD,CA7BC,+CAEC,yEACD,CAEA,oCACC,eACD,CAEA,mCACC,oDAAqD,CACrD,yCAaD,CAXC,0CACC,eACD,CAEA,2DACC,0DACD,CAEA,iFACC,4CACD,CAGD,qDACC,uDACD,CAMA,yCACC,0CAA2C,CAC3C,aAMD,CAJC,iEACC,uDAAwD,CACxD,aACD,CAKH,uBAGC,sCAAuC,CAFvC,UAAW,CACX,UAED",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-list {\n\t@mixin ck-unselectable;\n\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t& .ck-list__item,\n\t& .ck-list__separator {\n\t\tdisplay: block;\n\t}\n\n\t/* Make sure that whatever child of the list item gets focus, it remains on the\n\ttop. Thanks to that, styles like box-shadow, outline, etc. are not masked by\n\tadjacent list items. */\n\t& .ck-list__item > *:focus {\n\t\tposition: relative;\n\t\tz-index: var(--ck-z-default);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_shadow.css";\n\n.ck.ck-list {\n\t@mixin ck-rounded-corners;\n\n\tlist-style-type: none;\n\tbackground: var(--ck-color-list-background);\n}\n\n.ck.ck-list__item {\n\tcursor: default;\n\tmin-width: 12em;\n\n\t& .ck-button {\n\t\tmin-height: unset;\n\t\twidth: 100%;\n\t\ttext-align: left;\n\t\tborder-radius: 0;\n\n\t\t/* List items should have the same height. Use absolute units to make sure it is so\n\t\t because e.g. different heading styles may have different height\n\t\t https://github.com/ckeditor/ckeditor5-heading/issues/63 */\n\t\tpadding:\n\t\t\tcalc(.2 * var(--ck-line-height-base) * var(--ck-font-size-base))\n\t\t\tcalc(.4 * var(--ck-line-height-base) * var(--ck-font-size-base));\n\n\t\t& .ck-button__label {\n\t\t\t/* https://github.com/ckeditor/ckeditor5-heading/issues/63 */\n\t\t\tline-height: calc(1.2 * var(--ck-line-height-base) * var(--ck-font-size-base));\n\t\t}\n\n\t\t&:active {\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t&.ck-on {\n\t\t\tbackground: var(--ck-color-list-button-on-background);\n\t\t\tcolor: var(--ck-color-list-button-on-text);\n\n\t\t\t&:active {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n\t\t\t&:hover:not(.ck-disabled) {\n\t\t\t\tbackground: var(--ck-color-list-button-on-background-focus);\n\t\t\t}\n\n\t\t\t&:focus:not(.ck-switchbutton):not(.ck-disabled) {\n\t\t\t\tborder-color: var(--ck-color-base-background);\n\t\t\t}\n\t\t}\n\n\t\t&:hover:not(.ck-disabled) {\n\t\t\tbackground: var(--ck-color-list-button-hover-background);\n\t\t}\n\t}\n\n\t/* It\'s unnecessary to change the background/text of a switch toggle; it has different ways\n\tof conveying its state (like the switcher) */\n\t& .ck-switchbutton {\n\t\t&.ck-on {\n\t\t\tbackground: var(--ck-color-list-background);\n\t\t\tcolor: inherit;\n\n\t\t\t&:hover:not(.ck-disabled) {\n\t\t\t\tbackground: var(--ck-color-list-button-hover-background);\n\t\t\t\tcolor: inherit;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck.ck-list__separator {\n\theight: 1px;\n\twidth: 100%;\n\tbackground: var(--ck-color-base-border);\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},8793:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,':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-border-width:1px;--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.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{background:var(--ck-color-panel-background);border:var(--ck-balloon-border-width) solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent;margin-top:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow));margin-bottom:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_e]:after,.ck.ck-balloon-panel[class*=arrow_e]:before{border-width:var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_e]:before{border-color:transparent transparent transparent var(--ck-color-panel-border);margin-right:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_e]:after{border-color:transparent transparent transparent var(--ck-color-panel-background);margin-right:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_w]:after,.ck.ck-balloon-panel[class*=arrow_w]:before{border-width:var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_w]:before{border-color:transparent var(--ck-color-panel-border) transparent transparent;margin-left:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_w]:after{border-color:transparent var(--ck-color-panel-background) transparent transparent;margin-left:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.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(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.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(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:before{margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);right:calc(var(--ck-balloon-arrow-height)*-1);top:50%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:before{left:calc(var(--ck-balloon-arrow-height)*-1);margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);top:50%}',"",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/balloonpanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonpanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,MAEC,8DACD,CAEA,qBACC,YAAa,CACb,iBAAkB,CAElB,yBAyCD,CAtCE,+GAEC,UAAW,CACX,iBACD,CAEA,wDACC,6CACD,CAEA,uDACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAGD,8CACC,aACD,CC9CD,MACC,6BAA8B,CAC9B,6BAA8B,CAC9B,8BAA+B,CAC/B,iCAAkC,CAClC,oEACD,CAEA,qBCLC,eDmMD,CA9LA,iFCDE,qCD+LF,CA9LA,qBAMC,2CAA4C,CAC5C,wEAAyE,CEdzE,oCAA8B,CFW9B,eA0LD,CApLE,+GAIC,kBAAmB,CADnB,QAAS,CADT,OAGD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,kDACD,CAEA,2CACC,iFAAkF,CAClF,gFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,iEAAkE,CAClE,uDAAwD,CACxD,qDACD,CAEA,2CACC,iFAAkF,CAClF,mFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,oDACD,CAEA,2CACC,iFAAkF,CAClF,kFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,mDACD,CAEA,2CACC,iFAAkF,CAClF,iFACD,CAIA,yGAEC,QAAS,CACT,uDAA0D,CAC1D,2CACD,CAIA,2GAEC,+CAAkD,CAClD,2CACD,CAIA,2GAEC,gDAAmD,CACnD,2CACD,CAIA,yGAIC,8CAAiD,CAFjD,QAAS,CACT,uDAED,CAIA,2GAGC,8CAAiD,CADjD,+CAED,CAIA,2GAGC,8CAAiD,CADjD,gDAED,CAIA,6GAIC,8CAAiD,CADjD,uDAA0D,CAD1D,SAGD,CAIA,6GAIC,8CAAiD,CAFjD,QAAS,CACT,sDAED,CAIA,6GAGC,uDAA0D,CAD1D,SAAU,CAEV,2CACD,CAIA,6GAEC,QAAS,CACT,sDAAyD,CACzD,2CACD,CAIA,yGAGC,sDAAyD,CADzD,6CAAgD,CAEhD,OACD,CAIA,yGAEC,4CAA+C,CAC/C,sDAAyD,CACzD,OACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/* Make sure the balloon arrow does not float over its children. */\n\t--ck-balloon-panel-arrow-z-index: calc(var(--ck-z-default) - 3);\n}\n\n.ck.ck-balloon-panel {\n\tdisplay: none;\n\tposition: absolute;\n\n\tz-index: var(--ck-z-modal);\n\n\t&.ck-balloon-panel_with-arrow {\n\t\t&::before,\n\t\t&::after {\n\t\t\tcontent: "";\n\t\t\tposition: absolute;\n\t\t}\n\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&[class*="arrow_n"] {\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&[class*="arrow_s"] {\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_visible {\n\t\tdisplay: block;\n\t}\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-balloon-border-width: 1px;\n\t--ck-balloon-arrow-offset: 2px;\n\t--ck-balloon-arrow-height: 10px;\n\t--ck-balloon-arrow-half-width: 8px;\n\t--ck-balloon-arrow-drop-shadow: 0 2px 2px var(--ck-color-shadow-drop);\n}\n\n.ck.ck-balloon-panel {\n\t@mixin ck-rounded-corners;\n\t@mixin ck-drop-shadow;\n\n\tmin-height: 15px;\n\n\tbackground: var(--ck-color-panel-background);\n\tborder: var(--ck-balloon-border-width) solid var(--ck-color-panel-border);\n\n\t&.ck-balloon-panel_with-arrow {\n\t\t&::before,\n\t\t&::after {\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t}\n\t}\n\n\t&[class*="arrow_n"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width);\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: transparent transparent var(--ck-color-panel-border) transparent;\n\t\t\tmargin-top: calc( -1 * var(--ck-balloon-border-width) );\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: transparent transparent var(--ck-color-panel-background) transparent;\n\t\t\tmargin-top: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n\t\t}\n\t}\n\n\t&[class*="arrow_s"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width);\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: var(--ck-color-panel-border) transparent transparent;\n\t\t\tfilter: drop-shadow(var(--ck-balloon-arrow-drop-shadow));\n\t\t\tmargin-bottom: calc( -1 * var(--ck-balloon-border-width) );\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: var(--ck-color-panel-background) transparent transparent transparent;\n\t\t\tmargin-bottom: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n\t\t}\n\t}\n\n\t&[class*="arrow_e"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height);\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: transparent transparent transparent var(--ck-color-panel-border);\n\t\t\tmargin-right: calc( -1 * var(--ck-balloon-border-width) );\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: transparent transparent transparent var(--ck-color-panel-background);\n\t\t\tmargin-right: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n\t\t}\n\t}\n\n\t&[class*="arrow_w"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0;\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: transparent var(--ck-color-panel-border) transparent transparent;\n\t\t\tmargin-left: calc( -1 * var(--ck-balloon-border-width) );\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: transparent var(--ck-color-panel-background) transparent transparent;\n\t\t\tmargin-left: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_n {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 50%;\n\t\t\tmargin-left: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_ne {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_s {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 50%;\n\t\t\tmargin-left: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_sw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_se {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_sme {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: 25%;\n\t\t\tmargin-right: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_smw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 25%;\n\t\t\tmargin-left: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nme {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: 25%;\n\t\t\tmargin-right: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nmw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 25%;\n\t\t\tmargin-left: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_e {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t\tmargin-top: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: 50%;\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_w {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t\tmargin-top: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},4650:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck .ck-balloon-rotator__navigation{align-items:center;display:flex;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-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/balloonrotator.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonrotator.css"],names:[],mappings:"AAKA,oCAEC,kBAAmB,CADnB,YAAa,CAEb,sBACD,CAKA,6CACC,sBACD,CCXA,oCACC,6CAA8C,CAC9C,sDAAuD,CACvD,iCAgBD,CAbC,sCAGC,qCAAsC,CAFtC,oCAAqC,CACrC,kCAED,CAGA,iEAIC,mCAAoC,CAHpC,uCAID,CAMA,2DACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-balloon-rotator__navigation {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Buttons inside a toolbar should be centered when rotator bar is wider.\n * See: https://github.com/ckeditor/ckeditor5-ui/issues/495\n */\n.ck .ck-balloon-rotator__content .ck-toolbar {\n\tjustify-content: center;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-balloon-rotator__navigation {\n\tbackground: var(--ck-color-toolbar-background);\n\tborder-bottom: 1px solid var(--ck-color-toolbar-border);\n\tpadding: 0 var(--ck-spacing-small);\n\n\t/* Let's keep similar appearance to `ck-toolbar`. */\n\t& > * {\n\t\tmargin-right: var(--ck-spacing-small);\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t/* Gives counter more breath than buttons. */\n\t& .ck-balloon-rotator__counter {\n\t\tmargin-right: var(--ck-spacing-standard);\n\n\t\t/* We need to use smaller margin because of previous button's right margin. */\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n}\n\n.ck .ck-balloon-rotator__content {\n\n\t/* Disable default annotation shadow inside rotator with fake panels. */\n\t& .ck.ck-annotation-wrapper {\n\t\tbox-shadow: none;\n\t}\n}\n"],sourceRoot:""}]);const a=s},7676:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width: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}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/fakepanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/fakepanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,mBACC,iBAAkB,CAGlB,mCACD,CAEA,uBACC,iBACD,CAEA,mCACC,SACD,CAEA,oCACC,SACD,CCfA,MACC,6CAA8C,CAC9C,2CACD,CAGA,uBAKC,2CAA4C,CAC5C,6CAA8C,CAC9C,qCAAsC,CCXtC,oCAA8B,CDc9B,WAAY,CAPZ,eAAgB,CAMhB,UAED,CAEA,mCACC,0DAA2D,CAC3D,uDACD,CAEA,oCACC,kEAAqE,CACrE,+DACD,CACA,oCACC,kEAAqE,CACrE,+DACD,CAGA,yIAGC,4CACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-fake-panel {\n\tposition: absolute;\n\n\t/* Fake panels should be placed under main balloon content. */\n\tz-index: calc(var(--ck-z-modal) - 1);\n}\n\n.ck .ck-fake-panel div {\n\tposition: absolute;\n}\n\n.ck .ck-fake-panel div:nth-child( 1 ) {\n\tz-index: 2;\n}\n\n.ck .ck-fake-panel div:nth-child( 2 ) {\n\tz-index: 1;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-balloon-fake-panel-offset-horizontal: 6px;\n\t--ck-balloon-fake-panel-offset-vertical: 6px;\n}\n\n/* Let\'s use `.ck-balloon-panel` appearance. See: balloonpanel.css. */\n.ck .ck-fake-panel div {\n\t@mixin ck-drop-shadow;\n\n\tmin-height: 15px;\n\n\tbackground: var(--ck-color-panel-background);\n\tborder: 1px solid var(--ck-color-panel-border);\n\tborder-radius: var(--ck-border-radius);\n\n\twidth: 100%;\n\theight: 100%;\n}\n\n.ck .ck-fake-panel div:nth-child( 1 ) {\n\tmargin-left: var(--ck-balloon-fake-panel-offset-horizontal);\n\tmargin-top: var(--ck-balloon-fake-panel-offset-vertical);\n}\n\n.ck .ck-fake-panel div:nth-child( 2 ) {\n\tmargin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 2);\n\tmargin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 2);\n}\n.ck .ck-fake-panel div:nth-child( 3 ) {\n\tmargin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 3);\n\tmargin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 3);\n}\n\n/* If balloon is positioned above element, we need to move fake panel to the top. */\n.ck .ck-balloon-panel_arrow_s + .ck-fake-panel,\n.ck .ck-balloon-panel_arrow_se + .ck-fake-panel,\n.ck .ck-balloon-panel_arrow_sw + .ck-fake-panel {\n\t--ck-balloon-fake-panel-offset-vertical: -6px;\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},5868:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-modal)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/stickypanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/stickypanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAMC,qDAEC,cAAe,CACf,KAAM,CAFN,yBAGD,CAEA,kEAEC,iBAAkB,CADlB,QAED,CCPA,qDAIC,wBAAyB,CACzB,yBAA0B,CAF1B,sBAAuB,CCFxB,oCDKA",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-sticky-panel {\n\t& .ck-sticky-panel__content_sticky {\n\t\tz-index: var(--ck-z-modal); /* #315 */\n\t\tposition: fixed;\n\t\ttop: 0;\n\t}\n\n\t& .ck-sticky-panel__content_sticky_bottom-limit {\n\t\ttop: auto;\n\t\tposition: absolute;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_shadow.css";\n\n.ck.ck-sticky-panel {\n\t& .ck-sticky-panel__content_sticky {\n\t\t@mixin ck-drop-shadow;\n\n\t\tborder-width: 0 1px 1px;\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},6764:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,'.ck-vertical-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck-vertical-form .ck-button:focus:after{display:none}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck.ck-responsive-form .ck-button:focus:after{display:none}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){border-radius:0;margin-top:var(--ck-spacing-large);padding:var(--ck-spacing-standard)}.ck.ck-responsive-form>.ck-button:last-child:not(:focus),.ck.ck-responsive-form>.ck-button:nth-last-child(2):not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}',"",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/responsive-form/responsiveform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/responsive-form/responsiveform.css"],names:[],mappings:"AAQC,mCAMC,WAAY,CALZ,UAAW,CAEX,iBAAkB,CAClB,UAAW,CACX,QAAS,CAHT,OAAQ,CAKR,SACD,CAEA,yCACC,YACD,CCdA,oCDoBE,wCAMC,WAAY,CALZ,UAAW,CAEX,iBAAkB,CAClB,UAAW,CACX,QAAS,CAHT,OAAQ,CAKR,SACD,CAEA,8CACC,YACD,CC9BF,CCAD,qDACC,kDACD,CAEA,uBACC,+BAmED,CAjEC,6BAEC,YACD,CASC,uGACC,sCACD,CDvBD,oCCMD,uBAqBE,SAAU,CACV,oCA8CF,CA5CE,8CACC,wDAWD,CATC,6DACC,WAAY,CACZ,UACD,CAGA,4EACC,kBACD,CAKA,0DACC,kDACD,CAGD,iGAIC,eAAgB,CADhB,kCAAmC,CADnC,kCAmBD,CAfC,yHACC,gDACD,CARD,0OAeE,aAMF,CAJE,+IACC,kDACD,CDpEH",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck-vertical-form .ck-button {\n\t&::after {\n\t\tcontent: "";\n\t\twidth: 0;\n\t\tposition: absolute;\n\t\tright: -1px;\n\t\ttop: -1px;\n\t\tbottom: -1px;\n\t\tz-index: 1;\n\t}\n\n\t&:focus::after {\n\t\tdisplay: none;\n\t}\n}\n\n.ck.ck-responsive-form {\n\t@mixin ck-media-phone {\n\t\t& .ck-button {\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\twidth: 0;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: -1px;\n\t\t\t\ttop: -1px;\n\t\t\t\tbottom: -1px;\n\t\t\t\tz-index: 1;\n\t\t\t}\n\n\t\t\t&:focus::after {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck-vertical-form > .ck-button:nth-last-child(2)::after {\n\tborder-right: 1px solid var(--ck-color-base-border);\n}\n\n.ck.ck-responsive-form {\n\tpadding: var(--ck-spacing-large);\n\n\t&:focus {\n\t\t/* See: https://github.com/ckeditor/ckeditor5/issues/4773 */\n\t\toutline: none;\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& > :not(:first-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& > :not(:last-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\tpadding: 0;\n\t\twidth: calc(.8 * var(--ck-input-width));\n\n\t\t& .ck-labeled-field-view {\n\t\t\tmargin: var(--ck-spacing-large) var(--ck-spacing-large) 0;\n\n\t\t\t& .ck-input-text {\n\t\t\t\tmin-width: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t/* Let the long error messages wrap in the narrow form. */\n\t\t\t& .ck-labeled-field-view__error {\n\t\t\t\twhite-space: normal;\n\t\t\t}\n\t\t}\n\n\t\t/* Styles for two last buttons in the form (save&cancel, edit&unlink, etc.). */\n\t\t& > .ck-button:nth-last-child(2) {\n\t\t\t&::after {\n\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\t\t}\n\n\t\t& > .ck-button:nth-last-child(1),\n\t\t& > .ck-button:nth-last-child(2) {\n\t\t\tpadding: var(--ck-spacing-standard);\n\t\t\tmargin-top: var(--ck-spacing-large);\n\t\t\tborder-radius: 0;\n\n\t\t\t&:not(:focus) {\n\t\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-left: 0;\n\n\t\t\t\t&:last-of-type {\n\t\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},9695:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/toolbar/blocktoolbar.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/blocktoolbar.css"],names:[],mappings:"AAKA,4BACC,iBAAkB,CAClB,2BACD,CCHA,MACC,oDAAqD,CACrD,yDACD,CAEA,4BACC,0CAA2C,CAC3C,sCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-block-toolbar-button {\n\tposition: absolute;\n\tz-index: var(--ck-z-default);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-block-toolbar-button: var(--ck-color-text);\n\t--ck-block-toolbar-button-size: var(--ck-font-size-normal);\n}\n\n.ck.ck-block-toolbar-button {\n\tcolor: var(--ck-color-block-toolbar-button);\n\tfont-size: var(--ck-block-toolbar-size);\n}\n"],sourceRoot:""}]);const a=s},5542:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;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__line-break{flex-basis:100%}.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);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;background:var(--ck-color-toolbar-border);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){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>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border-radius:0;margin:0;width:100%}.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.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=rtl]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{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.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=ltr]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/toolbar/toolbar.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/toolbar.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,eAKC,kBAAmB,CAFnB,YAAa,CACb,oBAAqB,CCFrB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBD6CD,CA3CC,kCAGC,kBAAmB,CAFnB,YAAa,CACb,kBAAmB,CAEnB,WAED,CAEA,yCACC,oBAWD,CAJC,yGAEC,YACD,CAGD,uCACC,eACD,CAEA,sDACC,gBACD,CAEA,sDACC,qBACD,CAEA,sDACC,gBACD,CAGC,yFACC,YACD,CE/CF,eCGC,eDuFD,CA1FA,qECOE,qCDmFF,CA1FA,eAGC,6CAA8C,CAE9C,+CAAgD,CADhD,iCAsFD,CAnFC,yCACC,kBAAmB,CAGnB,yCAA0C,CAO1C,qCAAsC,CADtC,kCAAmC,CAPnC,aAAc,CADd,SAUD,CAEA,uCACC,QACD,CAGC,gEAEC,oCACD,CAIA,kEACC,YACD,CAGD,gHAIC,qCAAsC,CADtC,kCAED,CAEA,mCAEC,SAaD,CAVC,0DAQC,eAAgB,CAHhB,QAAS,CAHT,UAOD,CAGD,kCAEC,SAWD,CATC,uDAEC,QAMD,CAHC,yFACC,eACD,CASD,kFACC,mCACD,CApFF,qCAwFE,QAEF,CAYC,+FACC,cACD,CAEA,iJAEC,mCACD,CAEA,qHACC,aACD,CAIC,6JAEC,2BAA4B,CAD5B,wBAED,CAGA,2JAEC,4BAA6B,CAD7B,yBAED,CASD,8RACC,mCACD,CAWA,qHACC,cACD,CAIC,6JAEC,4BAA6B,CAD7B,yBAED,CAGA,2JAEC,2BAA4B,CAD5B,wBAED,CASD,8RACC,oCACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-toolbar {\n\t@mixin ck-unselectable;\n\n\tdisplay: flex;\n\tflex-flow: row nowrap;\n\talign-items: center;\n\n\t& > .ck-toolbar__items {\n\t\tdisplay: flex;\n\t\tflex-flow: row wrap;\n\t\talign-items: center;\n\t\tflex-grow: 1;\n\n\t}\n\n\t& .ck.ck-toolbar__separator {\n\t\tdisplay: inline-block;\n\n\t\t/*\n\t\t * A leading or trailing separator makes no sense (separates from nothing on one side).\n\t\t * For instance, it can happen when toolbar items (also separators) are getting grouped one by one and\n\t\t * moved to another toolbar in the dropdown.\n\t\t */\n\t\t&:first-child,\n\t\t&:last-child {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& .ck-toolbar__line-break {\n\t\tflex-basis: 100%;\n\t}\n\n\t&.ck-toolbar_grouping > .ck-toolbar__items {\n\t\tflex-wrap: nowrap;\n\t}\n\n\t&.ck-toolbar_vertical > .ck-toolbar__items {\n\t\tflex-direction: column;\n\t}\n\n\t&.ck-toolbar_floating > .ck-toolbar__items {\n\t\tflex-wrap: nowrap;\n\t}\n\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t& > .ck-dropdown__button .ck-dropdown__arrow {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-toolbar {\n\t@mixin ck-rounded-corners;\n\n\tbackground: var(--ck-color-toolbar-background);\n\tpadding: 0 var(--ck-spacing-small);\n\tborder: 1px solid var(--ck-color-toolbar-border);\n\n\t& .ck.ck-toolbar__separator {\n\t\talign-self: stretch;\n\t\twidth: 1px;\n\t\tmin-width: 1px;\n\t\tbackground: var(--ck-color-toolbar-border);\n\n\t\t/*\n\t\t * These margins make the separators look better in balloon toolbars (when aligned with the "tip").\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/7493.\n\t\t */\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t& .ck-toolbar__line-break {\n\t\theight: 0;\n\t}\n\n\t& > .ck-toolbar__items {\n\t\t& > *:not(.ck-toolbar__line-break) {\n\t\t\t/* (#11) Separate toolbar items. */\n\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t}\n\n\t\t/* Don\'t display a separator after an empty items container, for instance,\n\t\twhen all items were grouped */\n\t\t&:empty + .ck.ck-toolbar__separator {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& > .ck-toolbar__items > *:not(.ck-toolbar__line-break),\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t/* Make sure items wrapped to the next line have v-spacing */\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t&.ck-toolbar_vertical {\n\t\t/* Items in a vertical toolbar span the entire width. */\n\t\tpadding: 0;\n\n\t\t/* Specificity matters here. See https://github.com/ckeditor/ckeditor5-theme-lark/issues/168. */\n\t\t& > .ck-toolbar__items > .ck {\n\t\t\t/* Items in a vertical toolbar should span the horizontal space. */\n\t\t\twidth: 100%;\n\n\t\t\t/* Items in a vertical toolbar should have no margin. */\n\t\t\tmargin: 0;\n\n\t\t\t/* Items in a vertical toolbar span the entire width so rounded corners are pointless. */\n\t\t\tborder-radius: 0;\n\t\t}\n\t}\n\n\t&.ck-toolbar_compact {\n\t\t/* No spacing around items. */\n\t\tpadding: 0;\n\n\t\t& > .ck-toolbar__items > * {\n\t\t\t/* Compact toolbar items have no spacing between them. */\n\t\t\tmargin: 0;\n\n\t\t\t/* "Middle" children should have no rounded corners. */\n\t\t\t&:not(:first-child):not(:last-child) {\n\t\t\t\tborder-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t/*\n\t\t * Dropdown button has asymmetric padding to fit the arrow.\n\t\t * This button has no arrow so let\'s revert that padding back to normal.\n\t\t */\n\t\t& > .ck.ck-button.ck-dropdown__button {\n\t\t\tpadding-left: var(--ck-spacing-tiny);\n\t\t}\n\t}\n\n\t@nest .ck-toolbar-container & {\n\t\tborder: 0;\n\t}\n}\n\n/* stylelint-disable */\n\n/*\n * Styles for RTL toolbars.\n *\n * Note: In some cases (e.g. a decoupled editor), the toolbar has its own "dir"\n * because its parent is not controlled by the editor framework.\n */\n[dir="rtl"] .ck.ck-toolbar,\n.ck.ck-toolbar[dir="rtl"] {\n\t& > .ck-toolbar__items > .ck {\n\t\tmargin-right: 0;\n\t}\n\n\t&:not(.ck-toolbar_compact) > .ck-toolbar__items > .ck {\n\t\t/* (#11) Separate toolbar items. */\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n\n\t& > .ck-toolbar__items > .ck:last-child {\n\t\tmargin-left: 0;\n\t}\n\n\t&.ck-toolbar_compact > .ck-toolbar__items > .ck {\n\t\t/* No rounded corners on the right side of the first child. */\n\t\t&:first-child {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\n\t\t/* No rounded corners on the left side of the last child. */\n\t\t&:last-child {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\t}\n\n\t/* Separate the the separator form the grouping dropdown when some items are grouped. */\n\t& > .ck.ck-toolbar__separator {\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n\n\t/* Some spacing between the items and the separator before the grouped items dropdown. */\n\t&.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) {\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n}\n\n/*\n * Styles for LTR toolbars.\n *\n * Note: In some cases (e.g. a decoupled editor), the toolbar has its own "dir"\n * because its parent is not controlled by the editor framework.\n */\n[dir="ltr"] .ck.ck-toolbar,\n.ck.ck-toolbar[dir="ltr"] {\n\t& > .ck-toolbar__items > .ck:last-child {\n\t\tmargin-right: 0;\n\t}\n\n\t&.ck-toolbar_compact > .ck-toolbar__items > .ck {\n\t\t/* No rounded corners on the right side of the first child. */\n\t\t&:first-child {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t/* No rounded corners on the left side of the last child. */\n\t\t&:last-child {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\t}\n\n\t/* Separate the the separator form the grouping dropdown when some items are grouped. */\n\t& > .ck.ck-toolbar__separator {\n\t\tmargin-right: var(--ck-spacing-small);\n\t}\n\n\t/* Some spacing between the items and the separator before the grouped items dropdown. */\n\t&.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) {\n\t\tmargin-right: var(--ck-spacing-small);\n\t}\n}\n\n/* stylelint-enable */\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},3332:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-balloon-panel.ck-tooltip{--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium);pointer-events:none;z-index:calc(var(--ck-z-modal) + 100)}.ck.ck-balloon-panel.ck-tooltip .ck-tooltip__text{color:var(--ck-color-tooltip-text);font-size:.9em;line-height:1.5}.ck.ck-balloon-panel.ck-tooltip{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/tooltip/tooltip.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/tooltip/tooltip.css"],names:[],mappings:"AAKA,gCCGC,6BAA8B,CAC9B,6BAA8B,CAC9B,iCAAkC,CAClC,6BAA8B,CAC9B,8DAA+D,CAE/D,kCAAmC,CDPnC,mBAAoB,CAEpB,qCACD,CCMC,kDAGC,kCAAmC,CAFnC,cAAe,CACf,eAED,CAbD,gCAgBC,eAMD,CAHC,uCACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-balloon-panel.ck-tooltip {\n\t/* Keep tooltips transparent for any interactions. */\n\tpointer-events: none;\n\n\tz-index: calc( var(--ck-z-modal) + 100 );\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n.ck.ck-balloon-panel.ck-tooltip {\n\t--ck-balloon-border-width: 0px;\n\t--ck-balloon-arrow-offset: 0px;\n\t--ck-balloon-arrow-half-width: 4px;\n\t--ck-balloon-arrow-height: 4px;\n\t--ck-color-panel-background: var(--ck-color-tooltip-background);\n\n\tpadding: 0 var(--ck-spacing-medium);\n\n\t& .ck-tooltip__text {\n\t\tfont-size: .9em;\n\t\tline-height: 1.5;\n\t\tcolor: var(--ck-color-tooltip-text);\n\t}\n\n\t/* Reset balloon panel styles */\n\tbox-shadow: none;\n\n\t/* Hide the default shadow of the .ck-balloon-panel tip */\n\t&::before {\n\t\tdisplay: none;\n\t}\n}\n'],sourceRoot:""}]);const a=s},4793:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-hidden{display:none!important}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{box-sizing:border-box;height:auto;position:static;width:auto}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#ccced1;--ck-color-base-action:#53a336;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#2977ff;--ck-color-base-active-focus:#0d65ff;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:218,81.8%,56.9%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#cae1fc;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#f0f0f0;--ck-color-button-default-active-background:#f0f0f0;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#f0f7ff;--ck-color-button-on-hover-background:#dbecff;--ck-color-button-on-active-background:#dbecff;--ck-color-button-on-disabled-background:#f0f2f4;--ck-color-button-on-color:#2977ff;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#4d9d30;--ck-color-button-action-active-background:#4d9d30;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#939393;--ck-color-switch-button-off-hover-background:#7d7d7d;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#4d9d30;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:var(--ck-color-base-border);--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:var(--ck-color-base-border);--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-button-on-color);--ck-color-list-button-on-background-focus:var(--ck-color-button-on-color);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-background);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{word-wrap:break-word;background:transparent;border:0;margin:0;padding:0;text-decoration:none;transition:none;vertical-align:middle}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/globals/_hidden.css","webpack://./../ckeditor5-ui/theme/globals/_reset.css","webpack://./../ckeditor5-ui/theme/globals/_zindex.css","webpack://./../ckeditor5-ui/theme/globals/_transition.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_colors.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_disabled.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_focus.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_fonts.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_reset.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_spacing.css"],names:[],mappings:"AAQA,WAGC,sBACD,CCPA,2EAGC,qBAAsB,CAEtB,WAAY,CACZ,eAAgB,CAFhB,UAGD,CCPA,MACC,gBAAiB,CACjB,4CACD,CCAA,oDAEC,yBACD,CCNA,MACC,kCAAmD,CACnD,+BAAoD,CACpD,8BAAkD,CAClD,8BAAuD,CACvD,6BAAmD,CACnD,yBAA+C,CAC/C,8BAAsD,CACtD,oCAA4D,CAC5D,6BAAkD,CAIlD,mDAA4D,CAC5D,qEAA+E,CAC/E,qCAA4D,CAC5D,qDAA8D,CAC9D,gDAAyD,CACzD,yCAAqD,CACrD,sCAAsD,CACtD,4CAA0D,CAC1D,sCAAsD,CAItD,gDAAuD,CACvD,kDAAiE,CACjE,mDAAkE,CAClE,yDAA8D,CAE9D,uCAA6D,CAC7D,6CAAoE,CACpE,8CAAoE,CACpE,gDAAiE,CACjE,kCAAyD,CAGzD,+DAAsE,CACtE,iDAAsE,CACtE,kDAAsE,CACtE,oDAAoE,CACpE,6DAAsE,CAEtE,8BAAoD,CACpD,gCAAqD,CAErD,+CAA8D,CAC9D,qDAAiE,CACjE,+EAAqF,CACrF,oDAAuE,CACvE,yEAA8E,CAC9E,oDAAgE,CAIhE,oEAA2E,CAC3E,4DAAoE,CAIpE,2DAAoE,CACpE,mDAA6D,CAC7D,wDAAgE,CAChE,+CAA0D,CAC1D,4CAA2D,CAC3D,4DAAoE,CACpE,sCAAsD,CAItD,0DAAmE,CACnE,uFAA6F,CAC7F,oEAA2E,CAC3E,0EAA+E,CAC/E,8DAAsE,CAItE,2DAAoE,CACpE,mDAA6D,CAI7D,6DAAsE,CACtE,qDAA+D,CAI/D,uDAAgE,CAChE,uDAAiE,CAIjE,0CAAyD,CAIzD,wCAA2D,CAI3D,+BAAoD,CACpD,uDAAmE,CACnE,kDAAgE,CCnGhE,wBAAyB,CCAzB,0CAA2C,CAK3C,gGAAiG,CAKjG,4GAA6G,CAK7G,sGAAuG,CAKvG,sDAAuD,CCvBvD,wBAAyB,CACzB,6BAA8B,CAC9B,wDAA6D,CAE7D,yBAA0B,CAC1B,2BAA4B,CAC5B,yBAA0B,CAC1B,wBAAyB,CACzB,0BAA2B,CCJ3B,kCJmGD,CI7FA,2EAaC,oBAAqB,CANrB,sBAAuB,CADvB,QAAS,CAFT,QAAS,CACT,SAAU,CAGV,oBAAqB,CAErB,eAAgB,CADhB,qBAKD,CAKA,8DAGC,wBAAyB,CAEzB,0BAA2B,CAG3B,WAAY,CACZ,UAAW,CALX,iGAAkG,CAElG,eAAgB,CAChB,kBAGD,CAGC,qDACC,gBACD,CAEA,mDAEC,sBACD,CAEA,qDACC,oBACD,CAEA,mLAGC,WACD,CAEA,iNAGC,cACD,CAEA,qDAEC,yBAAoC,CADpC,YAED,CAEA,qEAGC,QAAQ,CADR,SAED,CAMD,8BAEC,gBACD,CCnFA,MACC,sBAAuB,CCAvB,gEAAiE,CAKjE,0DAA2D,CAK3D,wEAAyE,CCbzE,uBAA8B,CAC9B,mDAA2D,CAC3D,4CAAkD,CAClD,oDAA4D,CAC5D,mDAA2D,CAC3D,kDAA2D,CAC3D,yDFFD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which hides an element in DOM.\n */\n.ck-hidden {\n\t/* Override selector specificity. Otherwise, all elements with some display\n\tstyle defined will override this one, which is not a desired result. */\n\tdisplay: none !important;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-reset,\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n\tbox-sizing: border-box;\n\twidth: auto;\n\theight: auto;\n\tposition: static;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-z-default: 1;\n\t--ck-z-modal: calc( var(--ck-z-default) + 999 );\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class that disables all transitions of the element and its children.\n */\n.ck-transitions-disabled,\n.ck-transitions-disabled * {\n\ttransition: none !important;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-base-foreground: \t\t\t\t\t\t\t\thsl(0, 0%, 98%);\n\t--ck-color-base-background: \t\t\t\t\t\t\t\thsl(0, 0%, 100%);\n\t--ck-color-base-border: \t\t\t\t\t\t\t\t\thsl(220, 6%, 81%);\n\t--ck-color-base-action: \t\t\t\t\t\t\t\t\thsl(104, 50.2%, 42.5%);\n\t--ck-color-base-focus: \t\t\t\t\t\t\t\t\t\thsl(209, 92%, 70%);\n\t--ck-color-base-text: \t\t\t\t\t\t\t\t\t\thsl(0, 0%, 20%);\n\t--ck-color-base-active: \t\t\t\t\t\t\t\t\thsl(218.1, 100%, 58%);\n\t--ck-color-base-active-focus:\t\t\t\t\t\t\t\thsl(218.2, 100%, 52.5%);\n\t--ck-color-base-error:\t\t\t\t\t\t\t\t\t\thsl(15, 100%, 43%);\n\n\t/* -- Generic colors ------------------------------------------------------------------------ */\n\n\t--ck-color-focus-border-coordinates: \t\t\t\t\t\t218, 81.8%, 56.9%;\n\t--ck-color-focus-border: \t\t\t\t\t\t\t\t\thsl(var(--ck-color-focus-border-coordinates));\n\t--ck-color-focus-outer-shadow:\t\t\t\t\t\t\t\thsl(212.4, 89.3%, 89%);\n\t--ck-color-focus-disabled-shadow:\t\t\t\t\t\t\thsla(209, 90%, 72%,.3);\n\t--ck-color-focus-error-shadow:\t\t\t\t\t\t\t\thsla(9,100%,56%,.3);\n\t--ck-color-text: \t\t\t\t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-shadow-drop: \t\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.15);\n\t--ck-color-shadow-drop-active:\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.2);\n\t--ck-color-shadow-inner: \t\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.1);\n\n\t/* -- Buttons ------------------------------------------------------------------------------- */\n\n\t--ck-color-button-default-background: \t\t\t\t\t\ttransparent;\n\t--ck-color-button-default-hover-background: \t\t\t\thsl(0, 0%, 94.1%);\n\t--ck-color-button-default-active-background: \t\t\t\thsl(0, 0%, 94.1%);\n\t--ck-color-button-default-disabled-background: \t\t\t\ttransparent;\n\n\t--ck-color-button-on-background: \t\t\t\t\t\t\thsl(212, 100%, 97.1%);\n\t--ck-color-button-on-hover-background: \t\t\t\t\t\thsl(211.7, 100%, 92.9%);\n\t--ck-color-button-on-active-background: \t\t\t\t\thsl(211.7, 100%, 92.9%);\n\t--ck-color-button-on-disabled-background: \t\t\t\t\thsl(211, 15%, 95%);\n\t--ck-color-button-on-color:\t\t\t\t\t\t\t\t\thsl(218.1, 100%, 58%);\n\n\n\t--ck-color-button-action-background: \t\t\t\t\t\tvar(--ck-color-base-action);\n\t--ck-color-button-action-hover-background: \t\t\t\t\thsl(104, 53.2%, 40.2%);\n\t--ck-color-button-action-active-background: \t\t\t\thsl(104, 53.2%, 40.2%);\n\t--ck-color-button-action-disabled-background: \t\t\t\thsl(104, 44%, 58%);\n\t--ck-color-button-action-text: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t--ck-color-button-save: \t\t\t\t\t\t\t\t\thsl(120, 100%, 27%);\n\t--ck-color-button-cancel: \t\t\t\t\t\t\t\t\thsl(15, 100%, 43%);\n\n\t--ck-color-switch-button-off-background:\t\t\t\t\thsl(0, 0%, 57.6%);\n\t--ck-color-switch-button-off-hover-background:\t\t\t\thsl(0, 0%, 49%);\n\t--ck-color-switch-button-on-background:\t\t\t\t\t\tvar(--ck-color-button-action-background);\n\t--ck-color-switch-button-on-hover-background:\t\t\t\thsl(104, 53.2%, 40.2%);\n\t--ck-color-switch-button-inner-background:\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-switch-button-inner-shadow:\t\t\t\t\t\thsla(0, 0%, 0%, 0.1);\n\n\t/* -- Dropdown ------------------------------------------------------------------------------ */\n\n\t--ck-color-dropdown-panel-background: \t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-dropdown-panel-border: \t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Input --------------------------------------------------------------------------------- */\n\n\t--ck-color-input-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-input-border: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-border);\n\t--ck-color-input-error-border:\t\t\t\t\t\t\t\tvar(--ck-color-base-error);\n\t--ck-color-input-text: \t\t\t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-input-disabled-background: \t\t\t\t\t\thsl(0, 0%, 95%);\n\t--ck-color-input-disabled-border: \t\t\t\t\t\t\tvar(--ck-color-base-border);\n\t--ck-color-input-disabled-text: \t\t\t\t\t\t\thsl(0, 0%, 46%);\n\n\t/* -- List ---------------------------------------------------------------------------------- */\n\n\t--ck-color-list-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-list-button-hover-background: \t\t\t\t\tvar(--ck-color-button-default-hover-background);\n\t--ck-color-list-button-on-background: \t\t\t\t\t\tvar(--ck-color-button-on-color);\n\t--ck-color-list-button-on-background-focus: \t\t\t\tvar(--ck-color-button-on-color);\n\t--ck-color-list-button-on-text:\t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t/* -- Panel --------------------------------------------------------------------------------- */\n\n\t--ck-color-panel-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-panel-border: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Toolbar ------------------------------------------------------------------------------- */\n\n\t--ck-color-toolbar-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-toolbar-border: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Tooltip ------------------------------------------------------------------------------- */\n\n\t--ck-color-tooltip-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-tooltip-text: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t/* -- Engine -------------------------------------------------------------------------------- */\n\n\t--ck-color-engine-placeholder-text: \t\t\t\t\t\thsl(0, 0%, 44%);\n\n\t/* -- Upload -------------------------------------------------------------------------------- */\n\n\t--ck-color-upload-bar-background:\t\t \t\t\t\t\thsl(209, 92%, 70%);\n\n\t/* -- Link -------------------------------------------------------------------------------- */\n\n\t--ck-color-link-default:\t\t\t\t\t\t\t\t\thsl(240, 100%, 47%);\n\t--ck-color-link-selected-background:\t\t\t\t\t\thsla(201, 100%, 56%, 0.1);\n\t--ck-color-link-fake-selection:\t\t\t\t\t\t\t\thsla(201, 100%, 56%, 0.3);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/**\n\t * An opacity value of disabled UI item.\n\t */\n\t--ck-disabled-opacity: .5;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/**\n\t * The geometry of the of focused element's outer shadow.\n\t */\n\t--ck-focus-outer-shadow-geometry: 0 0 0 3px;\n\n\t/**\n\t * A visual style of focused element's outer shadow.\n\t */\n\t--ck-focus-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);\n\n\t/**\n\t * A visual style of focused element's outer shadow (when disabled).\n\t */\n\t--ck-focus-disabled-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);\n\n\t/**\n\t * A visual style of focused element's outer shadow (when has errors).\n\t */\n\t--ck-focus-error-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);\n\n\t/**\n\t * A visual style of focused element's border or outline.\n\t */\n\t--ck-focus-ring: 1px solid var(--ck-color-focus-border);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-font-size-base: 13px;\n\t--ck-line-height-base: 1.84615;\n\t--ck-font-face: Helvetica, Arial, Tahoma, Verdana, Sans-Serif;\n\n\t--ck-font-size-tiny: 0.7em;\n\t--ck-font-size-small: 0.75em;\n\t--ck-font-size-normal: 1em;\n\t--ck-font-size-big: 1.4em;\n\t--ck-font-size-large: 1.8em;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/* This is super-important. This is **manually** adjusted so a button without an icon\n\tis never smaller than a button with icon, additionally making sure that text-less buttons\n\tare perfect squares. The value is also shared by other components which should stay "in-line"\n\twith buttons. */\n\t--ck-ui-component-min-height: 2.3em;\n}\n\n/**\n * Resets an element, ignoring its children.\n */\n.ck.ck-reset,\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n\t/* Do not include inheritable rules here. */\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tbackground: transparent;\n\ttext-decoration: none;\n\tvertical-align: middle;\n\ttransition: none;\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/105 */\n\tword-wrap: break-word;\n}\n\n/**\n * Resets an element AND its children.\n */\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n\t/* These are rule inherited by all children elements. */\n\tborder-collapse: collapse;\n\tfont: normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);\n\tcolor: var(--ck-color-text);\n\ttext-align: left;\n\twhite-space: nowrap;\n\tcursor: auto;\n\tfloat: none;\n}\n\n.ck-reset_all {\n\t& .ck-rtl *:not(.ck-reset_all-excluded *) {\n\t\ttext-align: right;\n\t}\n\n\t& iframe:not(.ck-reset_all-excluded *) {\n\t\t/* For IE */\n\t\tvertical-align: inherit;\n\t}\n\n\t& textarea:not(.ck-reset_all-excluded *) {\n\t\twhite-space: pre-wrap;\n\t}\n\n\t& textarea:not(.ck-reset_all-excluded *),\n\t& input[type="text"]:not(.ck-reset_all-excluded *),\n\t& input[type="password"]:not(.ck-reset_all-excluded *) {\n\t\tcursor: text;\n\t}\n\n\t& textarea[disabled]:not(.ck-reset_all-excluded *),\n\t& input[type="text"][disabled]:not(.ck-reset_all-excluded *),\n\t& input[type="password"][disabled]:not(.ck-reset_all-excluded *) {\n\t\tcursor: default;\n\t}\n\n\t& fieldset:not(.ck-reset_all-excluded *) {\n\t\tpadding: 10px;\n\t\tborder: 2px groove hsl(255, 7%, 88%);\n\t}\n\n\t& button:not(.ck-reset_all-excluded *)::-moz-focus-inner {\n\t\t/* See http://stackoverflow.com/questions/5517744/remove-extra-button-spacing-padding-in-firefox */\n\t\tpadding: 0;\n\t\tborder: 0\n\t}\n}\n\n/**\n * Default UI rules for RTL languages.\n */\n.ck[dir="rtl"],\n.ck[dir="rtl"] .ck {\n\ttext-align: right;\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Default border-radius value.\n */\n:root{\n\t--ck-border-radius: 2px;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/**\n\t * A visual style of element's inner shadow (i.e. input).\n\t */\n\t--ck-inner-shadow: 2px 2px 3px var(--ck-color-shadow-inner) inset;\n\n\t/**\n\t * A visual style of element's drop shadow (i.e. panel).\n\t */\n\t--ck-drop-shadow: 0 1px 2px 1px var(--ck-color-shadow-drop);\n\n\t/**\n\t * A visual style of element's active shadow (i.e. comment or suggestion).\n\t */\n\t--ck-drop-shadow-active: 0 3px 6px 1px var(--ck-color-shadow-drop-active);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-spacing-unit: \t\t\t\t\t\t0.6em;\n\t--ck-spacing-large: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 1.5);\n\t--ck-spacing-standard: \t\t\t\t\tvar(--ck-spacing-unit);\n\t--ck-spacing-medium: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.8);\n\t--ck-spacing-small: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.5);\n\t--ck-spacing-tiny: \t\t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.3);\n\t--ck-spacing-extra-tiny: \t\t\t\tcalc(var(--ck-spacing-unit) * 0.16);\n}\n"],sourceRoot:""}]);const a=s},3488:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.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);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.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{left:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:var(--ck-resizer-tooltip-offset);top: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)}.ck .ck-size-view.ck-orientation-above-center{left:50%;top:calc(var(--ck-resizer-tooltip-height)*-1);transform:translate(-50%)}: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-color:transparent;outline-style:solid;outline-width:var(--ck-widget-outline-thickness);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{background-color:var(--ck-color-widget-editable-focus-background);border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{background-color:transparent;border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;box-sizing:border-box;left:calc(0px - var(--ck-widget-outline-thickness));opacity:0;padding:4px;top:0;transform:translateY(-100%);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)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{color:var(--ck-color-widget-drag-handler-icon-color);height:var(--ck-widget-handler-icon-size);width:var(--ck-widget-handler-icon-size)}.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{background-color:var(--ck-color-widget-hover-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{background-color:var(--ck-color-focus-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.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:hover>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle:hover,.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{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}","",{version:3,sources:["webpack://./../ckeditor5-widget/theme/widget.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widget.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,MACC,+CAAgD,CAChD,6CAAsD,CACtD,uCAAgD,CAEhD,kDAAmD,CACnD,gCAAiC,CACjC,kEACD,CAOA,8DAEC,iBAqBD,CAnBC,4EACC,iBAOD,CALC,qFAGC,aACD,CASD,iLACC,kBACD,CAGD,kBACC,qDAAsD,CAEtD,qDAAsD,CACtD,6CAA8C,CAF9C,0CAA2C,CAI3C,aAAc,CADd,kCAAmC,CAGnC,uCAAwC,CACxC,4CAA6C,CAF7C,iCAsCD,CAlCC,8NAKC,iBACD,CAEA,0CAEC,qCAAsC,CADtC,oCAED,CAEA,2CAEC,sCAAuC,CADvC,oCAED,CAEA,8CACC,uCAAwC,CACxC,sCACD,CAEA,6CACC,uCAAwC,CACxC,qCACD,CAGA,8CAEC,QAAS,CADT,6CAAgD,CAEhD,yBACD,CCjFD,MACC,iCAAkC,CAClC,kCAAmC,CACnC,4CAA6C,CAC7C,wCAAyC,CAEzC,wCAAiD,CACjD,sCAAkD,CAClD,2EAA4E,CAC5E,yEACD,CAEA,eAGC,yBAA0B,CAD1B,mBAAoB,CADpB,gDAAiD,CAGjD,6GAUD,CARC,0EAEC,6EACD,CAEA,qBACC,iDACD,CAGD,gCACC,4BAWD,CAPC,yGAKC,iEAAkE,CCnCnE,2BAA2B,CCF3B,qCAA8B,CDC9B,YDqCA,CAIA,4EAKC,4BAA6B,CAa7B,iEAAkE,CAhBlE,qBAAsB,CAoBtB,mDAAoD,CAhBpD,SAAU,CALV,WAAY,CAsBZ,KAAM,CAFN,2BAA4B,CAT5B,6SAgCD,CAnBC,qFAIC,oDAAqD,CADrD,yCAA0C,CAD1C,wCAWD,CANC,kHACC,SAAU,CAGV,+DACD,CAID,wHACC,SACD,CAID,kFAEC,oDAAqD,CADrD,SAED,CAKC,oMAEC,6CAA8C,CAD9C,SAOD,CAHC,gRACC,SACD,CAOH,qFACC,SAAU,CACV,oDACD,CAGA,gDAEC,eAkBD,CAhBC,yEAOC,iCACD,CAGC,gOAEC,gDACD,CAOD,wIAEC,mDAQD,CALE,ghBAEC,gDACD,CAKH,yKAOC,yDACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-resizer: var(--ck-color-focus-border);\n\t--ck-color-resizer-tooltip-background: hsl(0, 0%, 15%);\n\t--ck-color-resizer-tooltip-text: hsl(0, 0%, 95%);\n\n\t--ck-resizer-border-radius: var(--ck-border-radius);\n\t--ck-resizer-tooltip-offset: 10px;\n\t--ck-resizer-tooltip-height: calc(var(--ck-spacing-small) * 2 + 10px);\n}\n\n.ck .ck-widget {\n\t/* This is neccessary for type around UI to be positioned properly. */\n\tposition: relative;\n}\n\n.ck .ck-widget.ck-widget_with-selection-handle {\n\t/* Make the widget wrapper a relative positioning container for the drag handle. */\n\tposition: relative;\n\n\t& .ck-widget__selection-handle {\n\t\tposition: absolute;\n\n\t\t& .ck-icon {\n\t\t\t/* Make sure the icon in not a subject to font-size or line-height to avoid\n\t\t\tunnecessary spacing around it. */\n\t\t\tdisplay: block;\n\t\t}\n\t}\n\n\t/* Show the selection handle on mouse hover over the widget, but not for nested widgets. */\n\t&:hover > .ck-widget__selection-handle {\n\t\tvisibility: visible;\n\t}\n\n\t/* Show the selection handle when the widget is selected, but not for nested widgets. */\n\t&.ck-widget_selected > .ck-widget__selection-handle {\n\t\tvisibility: visible;\n\t}\n}\n\n.ck .ck-size-view {\n\tbackground: var(--ck-color-resizer-tooltip-background);\n\tcolor: var(--ck-color-resizer-tooltip-text);\n\tborder: 1px solid var(--ck-color-resizer-tooltip-text);\n\tborder-radius: var(--ck-resizer-border-radius);\n\tfont-size: var(--ck-font-size-tiny);\n\tdisplay: block;\n\tpadding: 0 var(--ck-spacing-small);\n\theight: var(--ck-resizer-tooltip-height);\n\tline-height: var(--ck-resizer-tooltip-height);\n\n\t&.ck-orientation-top-left,\n\t&.ck-orientation-top-right,\n\t&.ck-orientation-bottom-right,\n\t&.ck-orientation-bottom-left,\n\t&.ck-orientation-above-center {\n\t\tposition: absolute;\n\t}\n\n\t&.ck-orientation-top-left {\n\t\ttop: var(--ck-resizer-tooltip-offset);\n\t\tleft: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-top-right {\n\t\ttop: var(--ck-resizer-tooltip-offset);\n\t\tright: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-bottom-right {\n\t\tbottom: var(--ck-resizer-tooltip-offset);\n\t\tright: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-bottom-left {\n\t\tbottom: var(--ck-resizer-tooltip-offset);\n\t\tleft: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t/* Class applied if the widget is too small to contain the size label */\n\t&.ck-orientation-above-center {\n\t\ttop: calc(var(--ck-resizer-tooltip-height) * -1);\n\t\tleft: 50%;\n\t\ttransform: translate(-50%);\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../mixins/_focus.css";\n@import "../mixins/_shadow.css";\n\n:root {\n\t--ck-widget-outline-thickness: 3px;\n\t--ck-widget-handler-icon-size: 16px;\n\t--ck-widget-handler-animation-duration: 200ms;\n\t--ck-widget-handler-animation-curve: ease;\n\n\t--ck-color-widget-blurred-border: hsl(0, 0%, 87%);\n\t--ck-color-widget-hover-border: hsl(43, 100%, 62%);\n\t--ck-color-widget-editable-focus-background: var(--ck-color-base-background);\n\t--ck-color-widget-drag-handler-icon-color: var(--ck-color-base-background);\n}\n\n.ck .ck-widget {\n\toutline-width: var(--ck-widget-outline-thickness);\n\toutline-style: solid;\n\toutline-color: transparent;\n\ttransition: outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border);\n\t}\n\n\t&:hover {\n\t\toutline-color: var(--ck-color-widget-hover-border);\n\t}\n}\n\n.ck .ck-editor__nested-editable {\n\tborder: 1px solid transparent;\n\n\t/* The :focus style is applied before .ck-editor__nested-editable_focused class is rendered in the view.\n\tThese styles show a different border for a blink of an eye, so `:focus` need to have same styles applied. */\n\t&.ck-editor__nested-editable_focused,\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-inner-shadow);\n\n\t\tbackground-color: var(--ck-color-widget-editable-focus-background);\n\t}\n}\n\n.ck .ck-widget.ck-widget_with-selection-handle {\n\t& .ck-widget__selection-handle {\n\t\tpadding: 4px;\n\t\tbox-sizing: border-box;\n\n\t\t/* Background and opacity will be animated as the handler shows up or the widget gets selected. */\n\t\tbackground-color: transparent;\n\t\topacity: 0;\n\n\t\t/* Transition:\n\t\t * background-color for the .ck-widget_selected state change,\n\t\t * visibility for hiding the handler,\n\t\t * opacity for the proper look of the icon when the handler disappears. */\n\t\ttransition:\n\t\t\tbackground-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),\n\t\t\tvisibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),\n\t\t\topacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n\t\t/* Make only top corners round. */\n\t\tborder-radius: var(--ck-border-radius) var(--ck-border-radius) 0 0;\n\n\t\t/* Place the drag handler outside the widget wrapper. */\n\t\ttransform: translateY(-100%);\n\t\tleft: calc(0px - var(--ck-widget-outline-thickness));\n\t\ttop: 0;\n\n\t\t& .ck-icon {\n\t\t\t/* Make sure the dimensions of the icon are independent of the fon-size of the content. */\n\t\t\twidth: var(--ck-widget-handler-icon-size);\n\t\t\theight: var(--ck-widget-handler-icon-size);\n\t\t\tcolor: var(--ck-color-widget-drag-handler-icon-color);\n\n\t\t\t/* The "selected" part of the icon is invisible by default */\n\t\t\t& .ck-icon__selected-indicator {\n\t\t\t\topacity: 0;\n\n\t\t\t\t/* Note: The animation is longer on purpose. Simply feels better. */\n\t\t\t\ttransition: opacity 300ms var(--ck-widget-handler-animation-curve);\n\t\t\t}\n\t\t}\n\n\t\t/* Advertise using the look of the icon that once clicked the handler, the widget will be selected. */\n\t\t&:hover .ck-icon .ck-icon__selected-indicator {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n\t/* Show the selection handler on mouse hover over the widget, but not for nested widgets. */\n\t&:hover > .ck-widget__selection-handle {\n\t\topacity: 1;\n\t\tbackground-color: var(--ck-color-widget-hover-border);\n\t}\n\n\t/* Show the selection handler when the widget is selected, but not for nested widgets. */\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\t& > .ck-widget__selection-handle {\n\t\t\topacity: 1;\n\t\t\tbackground-color: var(--ck-color-focus-border);\n\n\t\t\t/* When the widget is selected, notify the user using the proper look of the icon. */\n\t\t\t& .ck-icon .ck-icon__selected-indicator {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/* In a RTL environment, align the selection handler to the right side of the widget */\n/* stylelint-disable-next-line no-descending-specificity */\n.ck[dir="rtl"] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle {\n\tleft: auto;\n\tright: calc(0px - var(--ck-widget-outline-thickness));\n}\n\n/* https://github.com/ckeditor/ckeditor5/issues/6415 */\n.ck.ck-editor__editable.ck-read-only .ck-widget {\n\t/* Prevent the :hover outline from showing up because of the used outline-color transition. */\n\ttransition: none;\n\n\t&:not(.ck-widget_selected) {\n\t\t/* Disable visual effects of hover/active widget when CKEditor is in readOnly mode.\n\t\t * See: https://github.com/ckeditor/ckeditor5/issues/1261\n\t\t *\n\t\t * Leave the unit because this custom property is used in calc() by other features.\n\t\t * See: https://github.com/ckeditor/ckeditor5/issues/6775\n\t\t */\n\t\t--ck-widget-outline-thickness: 0px;\n\t}\n\n\t&.ck-widget_with-selection-handle {\n\t\t& .ck-widget__selection-handle,\n\t\t& .ck-widget__selection-handle:hover {\n\t\t\tbackground: var(--ck-color-widget-blurred-border);\n\t\t}\n\t}\n}\n\n/* Style the widget when it\'s selected but the editable it belongs to lost focus. */\n/* stylelint-disable-next-line no-descending-specificity */\n.ck.ck-editor__editable.ck-blurred .ck-widget {\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\toutline-color: var(--ck-color-widget-blurred-border);\n\n\t\t&.ck-widget_with-selection-handle {\n\t\t\t& > .ck-widget__selection-handle,\n\t\t\t& > .ck-widget__selection-handle:hover {\n\t\t\t\tbackground: var(--ck-color-widget-blurred-border);\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck.ck-editor__editable > .ck-widget.ck-widget_with-selection-handle:first-child,\n.ck.ck-editor__editable blockquote > .ck-widget.ck-widget_with-selection-handle:first-child {\n\t/* Do not crop selection handler if a widget is a first-child in the blockquote or in the root editable.\n\tIn fact, anything with overflow: hidden.\n\thttps://github.com/ckeditor/ckeditor5-block-quote/issues/28\n\thttps://github.com/ckeditor/ckeditor5-widget/issues/44\n\thttps://github.com/ckeditor/ckeditor5-widget/issues/66 */\n\tmargin-top: calc(1em + var(--ck-widget-handler-icon-size));\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},8506:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius);height:var(--ck-resizer-size);width:var(--ck-resizer-size)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{left:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{right:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}","",{version:3,sources:["webpack://./../ckeditor5-widget/theme/widgetresize.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widgetresize.css"],names:[],mappings:"AAKA,4BAEC,iBACD,CAEA,wBACC,YAAa,CAMb,MAAO,CAFP,mBAAoB,CAHpB,iBAAkB,CAMlB,KACD,CAGC,2EACC,aACD,CAGD,gCAIC,kBAAmB,CAHnB,iBAcD,CATC,4IAEC,kBACD,CAEA,4IAEC,kBACD,CCpCD,MACC,sBAAuB,CAGvB,yDAAiE,CACjE,6BACD,CAEA,wBACC,yCACD,CAEA,gCAGC,uCAAwC,CACxC,gDAA6D,CAC7D,6CAA8C,CAH9C,6BAA8B,CAD9B,4BAyBD,CAnBC,oEAEC,6BAA8B,CAD9B,4BAED,CAEA,qEAEC,8BAA+B,CAD/B,4BAED,CAEA,wEACC,+BAAgC,CAChC,8BACD,CAEA,uEACC,+BAAgC,CAChC,6BACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-widget_with-resizer {\n\t/* Make the widget wrapper a relative positioning container for the drag handle. */\n\tposition: relative;\n}\n\n.ck .ck-widget__resizer {\n\tdisplay: none;\n\tposition: absolute;\n\n\t/* The wrapper itself should not interfere with the pointer device, only the handles should. */\n\tpointer-events: none;\n\n\tleft: 0;\n\ttop: 0;\n}\n\n.ck-focused .ck-widget_with-resizer.ck-widget_selected {\n\t& > .ck-widget__resizer {\n\t\tdisplay: block;\n\t}\n}\n\n.ck .ck-widget__resizer__handle {\n\tposition: absolute;\n\n\t/* Resizers are the only UI elements that should interfere with a pointer device. */\n\tpointer-events: all;\n\n\t&.ck-widget__resizer__handle-top-left,\n\t&.ck-widget__resizer__handle-bottom-right {\n\t\tcursor: nwse-resize;\n\t}\n\n\t&.ck-widget__resizer__handle-top-right,\n\t&.ck-widget__resizer__handle-bottom-left {\n\t\tcursor: nesw-resize;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-resizer-size: 10px;\n\n\t/* Set the resizer with a 50% offset. */\n\t--ck-resizer-offset: calc( ( var(--ck-resizer-size) / -2 ) - 2px);\n\t--ck-resizer-border-width: 1px;\n}\n\n.ck .ck-widget__resizer {\n\toutline: 1px solid var(--ck-color-resizer);\n}\n\n.ck .ck-widget__resizer__handle {\n\twidth: var(--ck-resizer-size);\n\theight: var(--ck-resizer-size);\n\tbackground: var(--ck-color-focus-border);\n\tborder: var(--ck-resizer-border-width) solid hsl(0, 0%, 100%);\n\tborder-radius: var(--ck-resizer-border-radius);\n\n\t&.ck-widget__resizer__handle-top-left {\n\t\ttop: var(--ck-resizer-offset);\n\t\tleft: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-top-right {\n\t\ttop: var(--ck-resizer-offset);\n\t\tright: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-bottom-right {\n\t\tbottom: var(--ck-resizer-offset);\n\t\tright: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-bottom-left {\n\t\tbottom: var(--ck-resizer-offset);\n\t\tleft: var(--ck-resizer-offset);\n\t}\n}\n"],sourceRoot:""}]);const a=s},4921:(t,e,n)=>{n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);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;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 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{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;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);width:var(--ck-widget-type-around-button-size)}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}.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{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.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{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.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_selected.ck-widget_with-resizer>.ck-widget__resizer,.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_selected.ck-widget_with-resizer>.ck-widget__resizer,.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[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.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}}',"",{version:3,sources:["webpack://./../ckeditor5-widget/theme/widgettypearound.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widgettypearound.css"],names:[],mappings:"AASC,+CACC,aAAc,CAEd,eAAgB,CADhB,iBAAkB,CAElB,2BAwBD,CAtBC,mDAGC,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,qCACD,CAEA,qFAGC,kBAAoB,CADpB,gDAAoD,CAGpD,0BACD,CAEA,oFAEC,mDAAuD,CACvD,mBAAqB,CAErB,yBACD,CAUA,mLACC,UAAW,CACX,aAAc,CAGd,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,qCACD,CAMD,2EACC,YAAa,CAEb,MAAO,CADP,iBAAkB,CAElB,OACD,CAOA,iFACC,gDAAqD,CACrD,iDACD,CAKA,wHAEC,aAAc,CADd,qDAED,CAKA,uHACC,wDAA6D,CAC7D,aACD,CAoBD,mOACC,YACD,CC3GA,MACC,wCAAyC,CACzC,wEAAyE,CACzE,8EAA+E,CAC/E,2FAA4F,CAC5F,wDAAyD,CACzD,uDAAwD,CACxD,yEACD,CAgBC,+CAGC,oDAAqD,CACrD,mBAAoB,CAFpB,+CAAgD,CAVjD,SAAU,CACV,mBAAoB,CAYnB,uMAAyM,CAJzM,8CAkDD,CA1CC,mDAEC,UAAW,CAGX,cAAe,CAFf,8BAA+B,CAC/B,6BAA8B,CAH9B,UAoBD,CAdC,qDACC,mBAAoB,CACpB,mBAAoB,CAEpB,SAAU,CACV,qDAAsD,CACtD,kBAAmB,CACnB,oBAAqB,CACrB,qBACD,CAEA,wDACC,kBACD,CAGD,qDAIC,6DAcD,CARE,kEACC,oDACD,CAEA,8DACC,wDACD,CAUF,uKAvED,SAAU,CACV,mBAwEC,CAOD,gGACC,0DACD,CAOA,uKAEC,2DAQD,CANC,mLAIC,uEAAkF,CADlF,mBAAoB,CADpB,2DAA4D,CAD5D,0DAID,CAOD,8GACC,gBACD,CAKA,mDAGC,mFAAoF,CAOpF,oCAAqC,CARrC,UAAW,CAOX,oCAAwC,CARxC,mBAUD,CAOC,6JAEC,yBACD,CAUA,yKACC,iDACD,CAMA,uOAlJD,SAAU,CACV,mBAmJC,CAoBA,6yBACC,SACD,CASF,uHACC,aAAc,CACd,iBACD,CAYG,iRAlMF,SAAU,CACV,mBAmME,CAQH,kIACC,qEAKD,CAHC,wIACC,WACD,CAGD,4CACC,GACC,oBACD,CACA,OACC,mBACD,CACD,CAEA,gDACC,OACC,mBACD,CACA,OACC,mBACD,CACD,CAEA,8CACC,GACC,6HACD,CACA,IACC,6HACD,CACA,GACC,+HACD,CACD,CAEA,kDACC,GACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,GACC,SACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-widget {\n\t/*\n\t * Styles of the type around buttons\n\t */\n\t& .ck-widget__type-around__button {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\toverflow: hidden;\n\t\tz-index: var(--ck-z-default);\n\n\t\t& svg {\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: 50%;\n\t\t\tz-index: calc(var(--ck-z-default) + 2);\n\t\t}\n\n\t\t&.ck-widget__type-around__button_before {\n\t\t\t/* Place it in the middle of the outline */\n\t\t\ttop: calc(-0.5 * var(--ck-widget-outline-thickness));\n\t\t\tleft: min(10%, 30px);\n\n\t\t\ttransform: translateY(-50%);\n\t\t}\n\n\t\t&.ck-widget__type-around__button_after {\n\t\t\t/* Place it in the middle of the outline */\n\t\t\tbottom: calc(-0.5 * var(--ck-widget-outline-thickness));\n\t\t\tright: min(10%, 30px);\n\n\t\t\ttransform: translateY(50%);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the buttons when:\n\t * - the widget is selected,\n\t * - or the button is being hovered (regardless of the widget state).\n\t */\n\t&.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\n\t& > .ck-widget__type-around > .ck-widget__type-around__button:hover {\n\t\t&::after {\n\t\t\tcontent: "";\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\ttop: 1px;\n\t\t\tleft: 1px;\n\t\t\tz-index: calc(var(--ck-z-default) + 1);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard.\n\t */\n\t& > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tdisplay: none;\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t}\n\n\t/*\n\t * When the widget is hovered the "fake caret" would normally be narrower than the\n\t * extra outline displayed around the widget. Let\'s extend the "fake caret" to match\n\t * the full width of the widget.\n\t */\n\t&:hover > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tleft: calc( -1 * var(--ck-widget-outline-thickness) );\n\t\tright: calc( -1 * var(--ck-widget-outline-thickness) );\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" when it should be displayed before the widget (backward keyboard navigation).\n\t */\n\t&.ck-widget_type-around_show-fake-caret_before > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\ttop: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\n\t\tdisplay: block;\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" when it should be displayed after the widget (forward keyboard navigation).\n\t */\n\t&.ck-widget_type-around_show-fake-caret_after > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tbottom: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\n\t\tdisplay: block;\n\t}\n}\n\n/*\n * Integration with the read-only mode of the editor.\n */\n.ck.ck-editor__editable.ck-read-only .ck-widget__type-around {\n\tdisplay: none;\n}\n\n/*\n * Integration with the restricted editing mode (feature) of the editor.\n */\n.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around {\n\tdisplay: none;\n}\n\n/*\n * Integration with the #isEnabled property of the WidgetTypeAround plugin.\n */\n.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around {\n\tdisplay: none;\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-widget-type-around-button-size: 20px;\n\t--ck-color-widget-type-around-button-active: var(--ck-color-focus-border);\n\t--ck-color-widget-type-around-button-hover: var(--ck-color-widget-hover-border);\n\t--ck-color-widget-type-around-button-blurred-editable: var(--ck-color-widget-blurred-border);\n\t--ck-color-widget-type-around-button-radar-start-alpha: 0;\n\t--ck-color-widget-type-around-button-radar-end-alpha: .3;\n\t--ck-color-widget-type-around-button-icon: var(--ck-color-base-background);\n}\n\n@define-mixin ck-widget-type-around-button-visible {\n\topacity: 1;\n\tpointer-events: auto;\n}\n\n@define-mixin ck-widget-type-around-button-hidden {\n\topacity: 0;\n\tpointer-events: none;\n}\n\n.ck .ck-widget {\n\t/*\n\t * Styles of the type around buttons\n\t */\n\t& .ck-widget__type-around__button {\n\t\twidth: var(--ck-widget-type-around-button-size);\n\t\theight: var(--ck-widget-type-around-button-size);\n\t\tbackground: var(--ck-color-widget-type-around-button);\n\t\tborder-radius: 100px;\n\t\ttransition: 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);\n\n\t\t@mixin ck-widget-type-around-button-hidden;\n\n\t\t& svg {\n\t\t\twidth: 10px;\n\t\t\theight: 8px;\n\t\t\ttransform: translate(-50%,-50%);\n\t\t\ttransition: transform .5s ease;\n\t\t\tmargin-top: 1px;\n\n\t\t\t& * {\n\t\t\t\tstroke-dasharray: 10;\n\t\t\t\tstroke-dashoffset: 0;\n\n\t\t\t\tfill: none;\n\t\t\t\tstroke: var(--ck-color-widget-type-around-button-icon);\n\t\t\t\tstroke-width: 1.5px;\n\t\t\t\tstroke-linecap: round;\n\t\t\t\tstroke-linejoin: round;\n\t\t\t}\n\n\t\t\t& line {\n\t\t\t\tstroke-dasharray: 7;\n\t\t\t}\n\t\t}\n\n\t\t&:hover {\n\t\t\t/*\n\t\t\t * Display the "sonar" around the button when hovered.\n\t\t\t */\n\t\t\tanimation: ck-widget-type-around-button-sonar 1s ease infinite;\n\n\t\t\t/*\n\t\t\t * Animate active button\'s icon.\n\t\t\t */\n\t\t\t& svg {\n\t\t\t\t& polyline {\n\t\t\t\t\tanimation: ck-widget-type-around-arrow-dash 2s linear;\n\t\t\t\t}\n\n\t\t\t\t& line {\n\t\t\t\t\tanimation: ck-widget-type-around-arrow-tip-dash 2s linear;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Show type around buttons when the widget gets selected or being hovered.\n\t */\n\t&.ck-widget_selected,\n\t&:hover {\n\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t@mixin ck-widget-type-around-button-visible;\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the buttons when the widget is NOT selected (but the buttons are visible\n\t * and still can be hovered).\n\t */\n\t&:not(.ck-widget_selected) > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\tbackground: var(--ck-color-widget-type-around-button-hover);\n\t}\n\n\t/*\n\t * Styles for the buttons when:\n\t * - the widget is selected,\n\t * - or the button is being hovered (regardless of the widget state).\n\t */\n\t&.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\n\t& > .ck-widget__type-around > .ck-widget__type-around__button:hover {\n\t\tbackground: var(--ck-color-widget-type-around-button-active);\n\n\t\t&::after {\n\t\t\twidth: calc(var(--ck-widget-type-around-button-size) - 2px);\n\t\t\theight: calc(var(--ck-widget-type-around-button-size) - 2px);\n\t\t\tborder-radius: 100px;\n\t\t\tbackground: linear-gradient(135deg, hsla(0,0%,100%,0) 0%, hsla(0,0%,100%,.3) 100%);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the "before" button when the widget has a selection handle. Because some space\n\t * is consumed by the handle, the button must be moved slightly to the right to let it breathe.\n\t */\n\t&.ck-widget_with-selection-handle > .ck-widget__type-around > .ck-widget__type-around__button_before {\n\t\tmargin-left: 20px;\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard.\n\t */\n\t& .ck-widget__type-around__fake-caret {\n\t\tpointer-events: none;\n\t\theight: 1px;\n\t\tanimation: ck-widget-type-around-fake-caret-pulse linear 1s infinite normal forwards;\n\n\t\t/*\n\t\t * The semi-transparent-outline+background combo improves the contrast\n\t\t * when the background underneath the fake caret is dark.\n\t\t */\n\t\toutline: solid 1px hsla(0, 0%, 100%, .5);\n\t\tbackground: var(--ck-color-base-text);\n\t}\n\n\t/*\n\t * Styles of the widget when the "fake caret" is blinking (e.g. upon keyboard navigation).\n\t * Despite the widget being physically selected in the model, its outline should disappear.\n\t */\n\t&.ck-widget_selected {\n\t\t&.ck-widget_type-around_show-fake-caret_before,\n\t\t&.ck-widget_type-around_show-fake-caret_after {\n\t\t\toutline-color: transparent;\n\t\t}\n\t}\n\n\t&.ck-widget_type-around_show-fake-caret_before,\n\t&.ck-widget_type-around_show-fake-caret_after {\n\t\t/*\n\t\t * When the "fake caret" is visible we simulate that the widget is not selected\n\t\t * (despite being physically selected), so the outline color should be for the\n\t\t * unselected widget.\n\t\t */\n\t\t&.ck-widget_selected:hover {\n\t\t\toutline-color: var(--ck-color-widget-hover-border);\n\t\t}\n\n\t\t/*\n\t\t * Styles of the type around buttons when the "fake caret" is blinking (e.g. upon keyboard navigation).\n\t\t * In this state, the type around buttons would collide with the fake carets so they should disappear.\n\t\t */\n\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t@mixin ck-widget-type-around-button-hidden;\n\t\t}\n\n\t\t/*\n\t\t * Fake horizontal caret integration with the selection handle. When the caret is visible, simply\n\t\t * hide the handle because it intersects with the caret (and does not make much sense anyway).\n\t\t */\n\t\t&.ck-widget_with-selection-handle {\n\t\t\t&.ck-widget_selected,\n\t\t\t&.ck-widget_selected:hover {\n\t\t\t\t& > .ck-widget__selection-handle {\n\t\t\t\t\topacity: 0\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Fake horizontal caret integration with the resize UI. When the caret is visible, simply\n\t\t * hide the resize UI because it creates too much noise. It can be visible when the user\n\t\t * hovers the widget, though.\n\t\t */\n\t\t&.ck-widget_selected.ck-widget_with-resizer > .ck-widget__resizer {\n\t\t\topacity: 0\n\t\t}\n\t}\n}\n\n/*\n * Styles for the "before" button when the widget has a selection handle in an RTL environment.\n * The selection handler is aligned to the right side of the widget so there is no need to create\n * additional space for it next to the "before" button.\n */\n.ck[dir="rtl"] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around > .ck-widget__type-around__button_before {\n\tmargin-left: 0;\n\tmargin-right: 20px;\n}\n\n/*\n * Hide type around buttons when the widget is selected as a child of a selected\n * nested editable (e.g. mulit-cell table selection).\n *\n * See https://github.com/ckeditor/ckeditor5/issues/7263.\n */\n.ck-editor__nested-editable.ck-editor__editable_selected {\n\t& .ck-widget {\n\t\t&.ck-widget_selected,\n\t\t&:hover {\n\t\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t\t@mixin ck-widget-type-around-button-hidden;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/*\n * Styles for the buttons when the widget is selected but the user clicked outside of the editor (blurred the editor).\n */\n.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button:not(:hover) {\n\tbackground: var(--ck-color-widget-type-around-button-blurred-editable);\n\n\t& svg * {\n\t\tstroke: hsl(0,0%,60%);\n\t}\n}\n\n@keyframes ck-widget-type-around-arrow-dash {\n\t0% {\n\t\tstroke-dashoffset: 10;\n\t}\n\t20%, 100% {\n\t\tstroke-dashoffset: 0;\n\t}\n}\n\n@keyframes ck-widget-type-around-arrow-tip-dash {\n\t0%, 20% {\n\t\tstroke-dashoffset: 7;\n\t}\n\t40%, 100% {\n\t\tstroke-dashoffset: 0;\n\t}\n}\n\n@keyframes ck-widget-type-around-button-sonar {\n\t0% {\n\t\tbox-shadow: 0 0 0 0 hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));\n\t}\n\t50% {\n\t\tbox-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-end-alpha));\n\t}\n\t100% {\n\t\tbox-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));\n\t}\n}\n\n@keyframes ck-widget-type-around-fake-caret-pulse {\n\t0% {\n\t\topacity: 1;\n\t}\n\t49% {\n\t\topacity: 1;\n\t}\n\t50% {\n\t\topacity: 0;\n\t}\n\t99% {\n\t\topacity: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}\n'],sourceRoot:""}]);const a=s},2609:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,o){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(o)for(var r=0;r<this.length;r++){var s=this[r][0];null!=s&&(i[s]=!0)}for(var a=0;a<t.length;a++){var l=[].concat(t[a]);o&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},1799:t=>{function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var o,i,r=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(o=n.next()).done)&&(r.push(o.value),!e||r.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);"Object"===o&&t.constructor&&(o=t.constructor.name);if("Map"===o||"Set"===o)return Array.from(t);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return n(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}t.exports=function(t){var n=e(t,4),o=n[1],i=n[3];if(!i)return o;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),a="/*# ".concat(s," */"),l=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[o].concat(l).concat([a]).join("\n")}return[o].join("\n")}},6062:(t,e,n)=>{var o,i=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},r=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),s=[];function a(t){for(var e=-1,n=0;n<s.length;n++)if(s[n].identifier===t){e=n;break}return e}function l(t,e){for(var n={},o=[],i=0;i<t.length;i++){var r=t[i],l=e.base?r[0]+e.base:r[0],c=n[l]||0,d="".concat(l," ").concat(c);n[l]=c+1;var h=a(d),u={css:r[1],media:r[2],sourceMap:r[3]};-1!==h?(s[h].references++,s[h].updater(u)):s.push({identifier:d,updater:f(u,e),references:1}),o.push(d)}return o}function c(t){var e=document.createElement("style"),o=t.attributes||{};if(void 0===o.nonce){var i=n.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(t){e.setAttribute(t,o[t])})),"function"==typeof t.insert)t.insert(e);else{var s=r(t.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(e)}return e}var d,h=(d=[],function(t,e){return d[t]=e,d.filter(Boolean).join("\n")});function u(t,e,n,o){var i=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(t.styleSheet)t.styleSheet.cssText=h(e,i);else{var r=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}function g(t,e,n){var o=n.css,i=n.media,r=n.sourceMap;if(i?t.setAttribute("media",i):t.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}var m=null,p=0;function f(t,e){var n,o,i;if(e.singleton){var r=p++;n=m||(m=c(e)),o=u.bind(null,n,r,!1),i=u.bind(null,n,r,!0)}else n=c(e),o=g.bind(null,n,e),i=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=i());var n=l(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var o=0;o<n.length;o++){var i=a(n[o]);s[i].references--}for(var r=l(t,e),c=0;c<n.length;c++){var d=a(n[c]);0===s[d].references&&(s[d].updater(),s.splice(d,1))}n=r}}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={id:o,exports:{}};return t[o](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var o={};return(()=>{n.d(o,{default:()=>RT});const t=function(){return function t(){t.called=!0}};class e{constructor(e,n){this.source=e,this.name=n,this.path=[],this.stop=t(),this.off=t()}}const i=new Array(256).fill("").map(((t,e)=>("0"+e.toString(16)).slice(-2)));function r(){const t=4294967296*Math.random()>>>0,e=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0;return"e"+i[t>>0&255]+i[t>>8&255]+i[t>>16&255]+i[t>>24&255]+i[e>>0&255]+i[e>>8&255]+i[e>>16&255]+i[e>>24&255]+i[n>>0&255]+i[n>>8&255]+i[n>>16&255]+i[n>>24&255]+i[o>>0&255]+i[o>>8&255]+i[o>>16&255]+i[o>>24&255]}const s={get(t="normal"){return"number"!=typeof t?this[t]||this.normal:t},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function a(t,e){const n=s.get(e.priority);for(let o=0;o<t.length;o++)if(s.get(t[o].priority)<n)return void t.splice(o,0,e);t.push(e)}class l extends Error{constructor(t,e,n){super(function(t,e){const n=new WeakSet,o=(t,e)=>{if("object"==typeof e&&null!==e){if(n.has(e))return`[object ${e.constructor.name}]`;n.add(e)}return e},i=e?` ${JSON.stringify(e,o)}`:"",r=d(t);return t+i+r}(t,n)),this.name="CKEditorError",this.context=e,this.data=n}is(t){return"CKEditorError"===t}static rethrowUnexpectedError(t,e){if(t.is&&t.is("CKEditorError"))throw t;const n=new l(t.message,e);throw n.stack=t.stack,n}}function c(t,e){console.warn(...h(t,e))}function d(t){return`\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-${t}`}function h(t,e){const n=d(t);return e?[t,e,n]:[t,n]}const u="35.1.0",g="object"==typeof window?window:n.g;if(g.CKEDITOR_VERSION)throw new l("ckeditor-duplicated-modules",null);g.CKEDITOR_VERSION=u;const m=Symbol("listeningTo"),p=Symbol("emitterId"),f=Symbol("delegations");function b(t){return class extends t{on(t,e,n){this.listenTo(this,t,e,n)}once(t,e,n){let o=!1;this.listenTo(this,t,((t,...n)=>{o||(o=!0,t.off(),e.call(this,t,...n))}),n)}off(t,e){this.stopListening(this,t,e)}listenTo(t,e,n,o={}){let i,r;this[m]||(this[m]={});const s=this[m];_(t)||w(t);const a=_(t);(i=s[a])||(i=s[a]={emitter:t,callbacks:{}}),(r=i.callbacks[e])||(r=i.callbacks[e]=[]),r.push(n),function(t,e,n,o,i){e._addEventListener?e._addEventListener(n,o,i):t._addEventListener.call(e,n,o,i)}(this,t,e,n,o)}stopListening(t,e,n){const o=this[m];let i=t&&_(t);const r=o&&i?o[i]:void 0,s=r&&e?r.callbacks[e]:void 0;if(!(!o||t&&!r||e&&!s))if(n){x(this,t,e,n);-1!==s.indexOf(n)&&(1===s.length?delete r.callbacks[e]:x(this,t,e,n))}else if(s){for(;n=s.pop();)x(this,t,e,n);delete r.callbacks[e]}else if(r){for(e in r.callbacks)this.stopListening(t,e);delete o[i]}else{for(i in o)this.stopListening(o[i].emitter);delete this[m]}}fire(t,...n){try{const o=t instanceof e?t:new e(this,t),i=o.name;let r=v(this,i);if(o.path.push(this),r){const t=[o,...n];r=Array.from(r);for(let e=0;e<r.length&&(r[e].callback.apply(this,t),o.off.called&&(delete o.off.called,this._removeEventListener(i,r[e].callback)),!o.stop.called);e++);}const s=this[f];if(s){const t=s.get(i),e=s.get("*");t&&y(t,o,n),e&&y(e,o,n)}return o.return}catch(t){l.rethrowUnexpectedError(t,this)}}delegate(...t){return{to:(e,n)=>{this[f]||(this[f]=new Map),t.forEach((t=>{const o=this[f].get(t);o?o.set(e,n):this[f].set(t,new Map([[e,n]]))}))}}}stopDelegating(t,e){if(this[f])if(t)if(e){const n=this[f].get(t);n&&n.delete(e)}else this[f].delete(t);else this[f].clear()}_addEventListener(t,e,n){!function(t,e){const n=A(t);if(n[e])return;let o=e,i=null;const r=[];for(;""!==o&&!n[o];)n[o]={callbacks:[],childEvents:[]},r.push(n[o]),i&&n[o].childEvents.push(i),i=o,o=o.substr(0,o.lastIndexOf(":"));if(""!==o){for(const t of r)t.callbacks=n[o].callbacks.slice();n[o].childEvents.push(i)}}(this,t);const o=C(this,t),i={callback:e,priority:s.get(n.priority)};for(const t of o)a(t,i)}_removeEventListener(t,e){const n=C(this,t);for(const t of n)for(let n=0;n<t.length;n++)t[n].callback==e&&(t.splice(n,1),n--)}}}const k=b(Object);function w(t,e){t[p]||(t[p]=e||r())}function _(t){return t[p]}function A(t){return t._events||Object.defineProperty(t,"_events",{value:{}}),t._events}function C(t,e){const n=A(t)[e];if(!n)return[];let o=[n.callbacks];for(let e=0;e<n.childEvents.length;e++){const i=C(t,n.childEvents[e]);o=o.concat(i)}return o}function v(t,e){let n;return t._events&&(n=t._events[e])&&n.callbacks.length?n.callbacks:e.indexOf(":")>-1?v(t,e.substr(0,e.lastIndexOf(":"))):null}function y(t,n,o){for(let[i,r]of t){r?"function"==typeof r&&(r=r(n.name)):r=n.name;const t=new e(n.source,r);t.path=[...n.path],i.fire(t,...o)}}function x(t,e,n,o){e._removeEventListener?e._removeEventListener(n,o):t._removeEventListener.call(e,n,o)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((t=>{b[t]=k.prototype[t]}));const E=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},T=Symbol("observableProperties"),D=Symbol("boundObservables"),S=Symbol("boundProperties"),B=Symbol("decoratedMethods"),I=Symbol("decoratedOriginal");function P(t){return class extends t{set(t,e){if(E(t))return void Object.keys(t).forEach((e=>{this.set(e,t[e])}),this);z(this);const n=this[T];if(t in this&&!n.has(t))throw new l("observable-set-cannot-override",this);Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get:()=>n.get(t),set(e){const o=n.get(t);let i=this.fire(`set:${t}`,t,e,o);void 0===i&&(i=e),o===i&&n.has(t)||(n.set(t,i),this.fire(`change:${t}`,t,i,o))}}),this[t]=e}bind(...t){if(!t.length||!O(t))throw new l("observable-bind-wrong-properties",this);if(new Set(t).size!==t.length)throw new l("observable-bind-duplicate-properties",this);z(this);const e=this[S];t.forEach((t=>{if(e.has(t))throw new l("observable-bind-rebind",this)}));const n=new Map;return t.forEach((t=>{const o={property:t,to:[]};e.set(t,o),n.set(t,o)})),{to:V,toMany:F,_observable:this,_bindProperties:t,_to:[],_bindings:n}}unbind(...t){if(!this[T])return;const e=this[S],n=this[D];if(t.length){if(!O(t))throw new l("observable-unbind-wrong-properties",this);t.forEach((t=>{const o=e.get(t);o&&(o.to.forEach((([t,e])=>{const i=n.get(t),r=i[e];r.delete(o),r.size||delete i[e],Object.keys(i).length||(n.delete(t),this.stopListening(t,"change"))})),e.delete(t))}))}else n.forEach(((t,e)=>{this.stopListening(e,"change")})),n.clear(),e.clear()}decorate(t){z(this);const e=this[t];if(!e)throw new l("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:t});this.on(t,((t,n)=>{t.return=e.apply(this,n)})),this[t]=function(...e){return this.fire(t,e)},this[t][I]=e,this[B]||(this[B]=[]),this[B].push(t)}stopListening(t,e,n){if(!t&&this[B]){for(const t of this[B])this[t]=this[t][I];delete this[B]}k.prototype.stopListening.call(this,t,e,n)}}}const R=P(k);function z(t){t[T]||(Object.defineProperty(t,T,{value:new Map}),Object.defineProperty(t,D,{value:new Map}),Object.defineProperty(t,S,{value:new Map}))}function V(...t){const e=function(...t){if(!t.length)throw new l("observable-bind-to-parse-error",null);const e={to:[]};let n;"function"==typeof t[t.length-1]&&(e.callback=t.pop());return t.forEach((t=>{if("string"==typeof t)n.properties.push(t);else{if("object"!=typeof t)throw new l("observable-bind-to-parse-error",null);n={observable:t,properties:[]},e.to.push(n)}})),e}(...t),n=Array.from(this._bindings.keys()),o=n.length;if(!e.callback&&e.to.length>1)throw new l("observable-bind-to-no-callback",this);if(o>1&&e.callback)throw new l("observable-bind-to-extra-callback",this);var i;e.to.forEach((t=>{if(t.properties.length&&t.properties.length!==o)throw new l("observable-bind-to-properties-length",this);t.properties.length||(t.properties=this._bindProperties)})),this._to=e.to,e.callback&&(this._bindings.get(n[0]).callback=e.callback),i=this._observable,this._to.forEach((t=>{const e=i[D];let n;e.get(t.observable)||i.listenTo(t.observable,"change",((o,r)=>{n=e.get(t.observable)[r],n&&n.forEach((t=>{N(i,t.property)}))}))})),function(t){let e;t._bindings.forEach(((n,o)=>{t._to.forEach((i=>{e=i.properties[n.callback?0:t._bindProperties.indexOf(o)],n.to.push([i.observable,e]),function(t,e,n,o){const i=t[D],r=i.get(n),s=r||{};s[o]||(s[o]=new Set);s[o].add(e),r||i.set(n,s)}(t._observable,n,i.observable,e)}))}))}(this),this._bindProperties.forEach((t=>{N(this._observable,t)}))}function F(t,e,n){if(this._bindings.size>1)throw new l("observable-bind-to-many-not-one-binding",this);this.to(...function(t,e){const n=t.map((t=>[t,e]));return Array.prototype.concat.apply([],n)}(t,e),n)}function O(t){return t.every((t=>"string"==typeof t))}function N(t,e){const n=t[S].get(e);let o;n.callback?o=n.callback.apply(t,n.to.map((t=>t[0][t[1]]))):(o=n.to[0],o=o[0][o[1]]),Object.prototype.hasOwnProperty.call(t,e)?t[e]=o:t.set(e,o)}function M(t,...e){e.forEach((e=>{const n=Object.getOwnPropertyNames(e),o=Object.getOwnPropertySymbols(e);n.concat(o).forEach((n=>{if(n in t.prototype)return;if("function"==typeof e&&("length"==n||"name"==n||"prototype"==n))return;const o=Object.getOwnPropertyDescriptor(e,n);o.enumerable=!1,Object.defineProperty(t.prototype,n,o)}))}))}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((t=>{P[t]=R.prototype[t]}));class L{constructor(t){this.editor=t,this.set("isEnabled",!0),this._disableStack=new Set}forceDisabled(t){this._disableStack.add(t),1==this._disableStack.size&&(this.on("set:isEnabled",H,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),0==this._disableStack.size&&(this.off("set:isEnabled",H),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function H(t){t.return=!1,t.stop()}M(L,P);class q{constructor(t){this.editor=t,this.set("value",void 0),this.set("isEnabled",!1),this.affectsData=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",(()=>{this.refresh()})),this.on("execute",(t=>{this.isEnabled||t.stop()}),{priority:"high"}),this.listenTo(t,"change:isReadOnly",((t,e,n)=>{n&&this.affectsData?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}))}refresh(){this.isEnabled=!0}forceDisabled(t){this._disableStack.add(t),1==this._disableStack.size&&(this.on("set:isEnabled",W,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),0==this._disableStack.size&&(this.off("set:isEnabled",W),this.refresh())}execute(){}destroy(){this.stopListening()}}function W(t){t.return=!1,t.stop()}M(q,P);class j extends q{constructor(t){super(t),this._childCommandsDefinitions=[]}refresh(){}execute(...t){const e=this._getFirstEnabledCommand();return!!e&&e.execute(t)}registerChildCommand(t,e={priority:"normal"}){a(this._childCommandsDefinitions,{command:t,priority:e.priority}),t.on("change:isEnabled",(()=>this._checkEnabled())),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const t=this._childCommandsDefinitions.find((({command:t})=>t.isEnabled));return t&&t.command}}const U="object"==typeof global&&global&&global.Object===Object&&global;var G="object"==typeof self&&self&&self.Object===Object&&self;const K=U||G||Function("return this")();const Z=K.Symbol;var J=Object.prototype,Y=J.hasOwnProperty,Q=J.toString,X=Z?Z.toStringTag:void 0;const tt=function(t){var e=Y.call(t,X),n=t[X];try{t[X]=void 0;var o=!0}catch(t){}var i=Q.call(t);return o&&(e?t[X]=n:delete t[X]),i};var et=Object.prototype.toString;const nt=function(t){return et.call(t)};var ot=Z?Z.toStringTag:void 0;const it=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":ot&&ot in Object(t)?tt(t):nt(t)};const rt=function(t,e){return function(n){return t(e(n))}};const st=rt(Object.getPrototypeOf,Object);const at=function(t){return null!=t&&"object"==typeof t};var lt=Function.prototype,ct=Object.prototype,dt=lt.toString,ht=ct.hasOwnProperty,ut=dt.call(Object);const gt=function(t){if(!at(t)||"[object Object]"!=it(t))return!1;var e=st(t);if(null===e)return!0;var n=ht.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&dt.call(n)==ut};const mt=function(){this.__data__=[],this.size=0};const pt=function(t,e){return t===e||t!=t&&e!=e};const ft=function(t,e){for(var n=t.length;n--;)if(pt(t[n][0],e))return n;return-1};var bt=Array.prototype.splice;const kt=function(t){var e=this.__data__,n=ft(e,t);return!(n<0)&&(n==e.length-1?e.pop():bt.call(e,n,1),--this.size,!0)};const wt=function(t){var e=this.__data__,n=ft(e,t);return n<0?void 0:e[n][1]};const _t=function(t){return ft(this.__data__,t)>-1};const At=function(t,e){var n=this.__data__,o=ft(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this};function Ct(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}Ct.prototype.clear=mt,Ct.prototype.delete=kt,Ct.prototype.get=wt,Ct.prototype.has=_t,Ct.prototype.set=At;const vt=Ct;const yt=function(){this.__data__=new vt,this.size=0};const xt=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};const Et=function(t){return this.__data__.get(t)};const Tt=function(t){return this.__data__.has(t)};const Dt=function(t){if(!E(t))return!1;var e=it(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e};const St=K["__core-js_shared__"];var Bt=function(){var t=/[^.]+$/.exec(St&&St.keys&&St.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();const It=function(t){return!!Bt&&Bt in t};var Pt=Function.prototype.toString;const Rt=function(t){if(null!=t){try{return Pt.call(t)}catch(t){}try{return t+""}catch(t){}}return""};var zt=/^\[object .+?Constructor\]$/,Vt=Function.prototype,Ft=Object.prototype,Ot=Vt.toString,Nt=Ft.hasOwnProperty,Mt=RegExp("^"+Ot.call(Nt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Lt=function(t){return!(!E(t)||It(t))&&(Dt(t)?Mt:zt).test(Rt(t))};const Ht=function(t,e){return null==t?void 0:t[e]};const qt=function(t,e){var n=Ht(t,e);return Lt(n)?n:void 0};const Wt=qt(K,"Map");const jt=qt(Object,"create");const Ut=function(){this.__data__=jt?jt(null):{},this.size=0};const $t=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var Gt=Object.prototype.hasOwnProperty;const Kt=function(t){var e=this.__data__;if(jt){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Gt.call(e,t)?e[t]:void 0};var Zt=Object.prototype.hasOwnProperty;const Jt=function(t){var e=this.__data__;return jt?void 0!==e[t]:Zt.call(e,t)};const Yt=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=jt&&void 0===e?"__lodash_hash_undefined__":e,this};function Qt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}Qt.prototype.clear=Ut,Qt.prototype.delete=$t,Qt.prototype.get=Kt,Qt.prototype.has=Jt,Qt.prototype.set=Yt;const Xt=Qt;const te=function(){this.size=0,this.__data__={hash:new Xt,map:new(Wt||vt),string:new Xt}};const ee=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};const ne=function(t,e){var n=t.__data__;return ee(e)?n["string"==typeof e?"string":"hash"]:n.map};const oe=function(t){var e=ne(this,t).delete(t);return this.size-=e?1:0,e};const ie=function(t){return ne(this,t).get(t)};const re=function(t){return ne(this,t).has(t)};const se=function(t,e){var n=ne(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this};function ae(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}ae.prototype.clear=te,ae.prototype.delete=oe,ae.prototype.get=ie,ae.prototype.has=re,ae.prototype.set=se;const le=ae;const ce=function(t,e){var n=this.__data__;if(n instanceof vt){var o=n.__data__;if(!Wt||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new le(o)}return n.set(t,e),this.size=n.size,this};function de(t){var e=this.__data__=new vt(t);this.size=e.size}de.prototype.clear=yt,de.prototype.delete=xt,de.prototype.get=Et,de.prototype.has=Tt,de.prototype.set=ce;const he=de;const ue=function(t,e){for(var n=-1,o=null==t?0:t.length;++n<o&&!1!==e(t[n],n,t););return t};const ge=function(){try{var t=qt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();const me=function(t,e,n){"__proto__"==e&&ge?ge(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n};var pe=Object.prototype.hasOwnProperty;const fe=function(t,e,n){var o=t[e];pe.call(t,e)&&pt(o,n)&&(void 0!==n||e in t)||me(t,e,n)};const be=function(t,e,n,o){var i=!n;n||(n={});for(var r=-1,s=e.length;++r<s;){var a=e[r],l=o?o(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),i?me(n,a,l):fe(n,a,l)}return n};const ke=function(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o};const we=function(t){return at(t)&&"[object Arguments]"==it(t)};var _e=Object.prototype,Ae=_e.hasOwnProperty,Ce=_e.propertyIsEnumerable,ve=we(function(){return arguments}())?we:function(t){return at(t)&&Ae.call(t,"callee")&&!Ce.call(t,"callee")};const ye=ve;const xe=Array.isArray;const Ee=function(){return!1};var Te="object"==typeof exports&&exports&&!exports.nodeType&&exports,De=Te&&"object"==typeof module&&module&&!module.nodeType&&module,Se=De&&De.exports===Te?K.Buffer:void 0;const Be=(Se?Se.isBuffer:void 0)||Ee;var Ie=/^(?:0|[1-9]\d*)$/;const Pe=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Ie.test(t))&&t>-1&&t%1==0&&t<e};const Re=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var ze={};ze["[object Float32Array]"]=ze["[object Float64Array]"]=ze["[object Int8Array]"]=ze["[object Int16Array]"]=ze["[object Int32Array]"]=ze["[object Uint8Array]"]=ze["[object Uint8ClampedArray]"]=ze["[object Uint16Array]"]=ze["[object Uint32Array]"]=!0,ze["[object Arguments]"]=ze["[object Array]"]=ze["[object ArrayBuffer]"]=ze["[object Boolean]"]=ze["[object DataView]"]=ze["[object Date]"]=ze["[object Error]"]=ze["[object Function]"]=ze["[object Map]"]=ze["[object Number]"]=ze["[object Object]"]=ze["[object RegExp]"]=ze["[object Set]"]=ze["[object String]"]=ze["[object WeakMap]"]=!1;const Ve=function(t){return at(t)&&Re(t.length)&&!!ze[it(t)]};const Fe=function(t){return function(e){return t(e)}};var Oe="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ne=Oe&&"object"==typeof module&&module&&!module.nodeType&&module,Me=Ne&&Ne.exports===Oe&&U.process;const Le=function(){try{var t=Ne&&Ne.require&&Ne.require("util").types;return t||Me&&Me.binding&&Me.binding("util")}catch(t){}}();var He=Le&&Le.isTypedArray;const qe=He?Fe(He):Ve;var We=Object.prototype.hasOwnProperty;const je=function(t,e){var n=xe(t),o=!n&&ye(t),i=!n&&!o&&Be(t),r=!n&&!o&&!i&&qe(t),s=n||o||i||r,a=s?ke(t.length,String):[],l=a.length;for(var c in t)!e&&!We.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Pe(c,l))||a.push(c);return a};var Ue=Object.prototype;const $e=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ue)};const Ge=rt(Object.keys,Object);var Ke=Object.prototype.hasOwnProperty;const Ze=function(t){if(!$e(t))return Ge(t);var e=[];for(var n in Object(t))Ke.call(t,n)&&"constructor"!=n&&e.push(n);return e};const Je=function(t){return null!=t&&Re(t.length)&&!Dt(t)};const Ye=function(t){return Je(t)?je(t):Ze(t)};const Qe=function(t,e){return t&&be(e,Ye(e),t)};const Xe=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e};var tn=Object.prototype.hasOwnProperty;const en=function(t){if(!E(t))return Xe(t);var e=$e(t),n=[];for(var o in t)("constructor"!=o||!e&&tn.call(t,o))&&n.push(o);return n};const nn=function(t){return Je(t)?je(t,!0):en(t)};const on=function(t,e){return t&&be(e,nn(e),t)};var rn="object"==typeof exports&&exports&&!exports.nodeType&&exports,sn=rn&&"object"==typeof module&&module&&!module.nodeType&&module,an=sn&&sn.exports===rn?K.Buffer:void 0,ln=an?an.allocUnsafe:void 0;const cn=function(t,e){if(e)return t.slice();var n=t.length,o=ln?ln(n):new t.constructor(n);return t.copy(o),o};const dn=function(t,e){var n=-1,o=t.length;for(e||(e=Array(o));++n<o;)e[n]=t[n];return e};const hn=function(t,e){for(var n=-1,o=null==t?0:t.length,i=0,r=[];++n<o;){var s=t[n];e(s,n,t)&&(r[i++]=s)}return r};const un=function(){return[]};var gn=Object.prototype.propertyIsEnumerable,mn=Object.getOwnPropertySymbols;const pn=mn?function(t){return null==t?[]:(t=Object(t),hn(mn(t),(function(e){return gn.call(t,e)})))}:un;const fn=function(t,e){return be(t,pn(t),e)};const bn=function(t,e){for(var n=-1,o=e.length,i=t.length;++n<o;)t[i+n]=e[n];return t};const kn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)bn(e,pn(t)),t=st(t);return e}:un;const wn=function(t,e){return be(t,kn(t),e)};const _n=function(t,e,n){var o=e(t);return xe(t)?o:bn(o,n(t))};const An=function(t){return _n(t,Ye,pn)};const Cn=function(t){return _n(t,nn,kn)};const vn=qt(K,"DataView");const yn=qt(K,"Promise");const xn=qt(K,"Set");const En=qt(K,"WeakMap");var Tn="[object Map]",Dn="[object Promise]",Sn="[object Set]",Bn="[object WeakMap]",In="[object DataView]",Pn=Rt(vn),Rn=Rt(Wt),zn=Rt(yn),Vn=Rt(xn),Fn=Rt(En),On=it;(vn&&On(new vn(new ArrayBuffer(1)))!=In||Wt&&On(new Wt)!=Tn||yn&&On(yn.resolve())!=Dn||xn&&On(new xn)!=Sn||En&&On(new En)!=Bn)&&(On=function(t){var e=it(t),n="[object Object]"==e?t.constructor:void 0,o=n?Rt(n):"";if(o)switch(o){case Pn:return In;case Rn:return Tn;case zn:return Dn;case Vn:return Sn;case Fn:return Bn}return e});const Nn=On;var Mn=Object.prototype.hasOwnProperty;const Ln=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Mn.call(t,"index")&&(n.index=t.index,n.input=t.input),n};const Hn=K.Uint8Array;const qn=function(t){var e=new t.constructor(t.byteLength);return new Hn(e).set(new Hn(t)),e};const Wn=function(t,e){var n=e?qn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)};var jn=/\w*$/;const Un=function(t){var e=new t.constructor(t.source,jn.exec(t));return e.lastIndex=t.lastIndex,e};var $n=Z?Z.prototype:void 0,Gn=$n?$n.valueOf:void 0;const Kn=function(t){return Gn?Object(Gn.call(t)):{}};const Zn=function(t,e){var n=e?qn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)};const Jn=function(t,e,n){var o=t.constructor;switch(e){case"[object ArrayBuffer]":return qn(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return Wn(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Zn(t,n);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return Un(t);case"[object Symbol]":return Kn(t)}};var Yn=Object.create;const Qn=function(){function t(){}return function(e){if(!E(e))return{};if(Yn)return Yn(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();const Xn=function(t){return"function"!=typeof t.constructor||$e(t)?{}:Qn(st(t))};const to=function(t){return at(t)&&"[object Map]"==Nn(t)};var eo=Le&&Le.isMap;const no=eo?Fe(eo):to;const oo=function(t){return at(t)&&"[object Set]"==Nn(t)};var io=Le&&Le.isSet;const ro=io?Fe(io):oo;var so="[object Arguments]",ao="[object Function]",lo="[object Object]",co={};co[so]=co["[object Array]"]=co["[object ArrayBuffer]"]=co["[object DataView]"]=co["[object Boolean]"]=co["[object Date]"]=co["[object Float32Array]"]=co["[object Float64Array]"]=co["[object Int8Array]"]=co["[object Int16Array]"]=co["[object Int32Array]"]=co["[object Map]"]=co["[object Number]"]=co["[object Object]"]=co["[object RegExp]"]=co["[object Set]"]=co["[object String]"]=co["[object Symbol]"]=co["[object Uint8Array]"]=co["[object Uint8ClampedArray]"]=co["[object Uint16Array]"]=co["[object Uint32Array]"]=!0,co["[object Error]"]=co[ao]=co["[object WeakMap]"]=!1;const ho=function t(e,n,o,i,r,s){var a,l=1&n,c=2&n,d=4&n;if(o&&(a=r?o(e,i,r,s):o(e)),void 0!==a)return a;if(!E(e))return e;var h=xe(e);if(h){if(a=Ln(e),!l)return dn(e,a)}else{var u=Nn(e),g=u==ao||"[object GeneratorFunction]"==u;if(Be(e))return cn(e,l);if(u==lo||u==so||g&&!r){if(a=c||g?{}:Xn(e),!l)return c?wn(e,on(a,e)):fn(e,Qe(a,e))}else{if(!co[u])return r?e:{};a=Jn(e,u,l)}}s||(s=new he);var m=s.get(e);if(m)return m;s.set(e,a),ro(e)?e.forEach((function(i){a.add(t(i,n,o,i,e,s))})):no(e)&&e.forEach((function(i,r){a.set(r,t(i,n,o,r,e,s))}));var p=h?void 0:(d?c?Cn:An:c?nn:Ye)(e);return ue(p||e,(function(i,r){p&&(i=e[r=i]),fe(a,r,t(i,n,o,r,e,s))})),a};const uo=function(t,e){return ho(t,5,e="function"==typeof e?e:void 0)};const go=function(t){return at(t)&&1===t.nodeType&&!gt(t)};class mo{constructor(t,e){this._config={},e&&this.define(po(e)),t&&this._setObjectToTarget(this._config,t)}set(t,e){this._setToTarget(this._config,t,e)}define(t,e){this._setToTarget(this._config,t,e,!0)}get(t){return this._getFromSource(this._config,t)}*names(){for(const t of Object.keys(this._config))yield t}_setToTarget(t,e,n,o=!1){if(gt(e))return void this._setObjectToTarget(t,e,o);const i=e.split(".");e=i.pop();for(const e of i)gt(t[e])||(t[e]={}),t=t[e];if(gt(n))return gt(t[e])||(t[e]={}),t=t[e],void this._setObjectToTarget(t,n,o);o&&void 0!==t[e]||(t[e]=n)}_getFromSource(t,e){const n=e.split(".");e=n.pop();for(const e of n){if(!gt(t[e])){t=null;break}t=t[e]}return t?po(t[e]):void 0}_setObjectToTarget(t,e,n){Object.keys(e).forEach((o=>{this._setToTarget(t,o,e[o],n)}))}}function po(t){return uo(t,fo)}function fo(t){return go(t)?t:void 0}function bo(t){return!(!t||!t[Symbol.iterator])}class ko extends k{constructor(t={},e={}){super();const n=bo(t);if(n||(e=t),this._items=[],this._itemMap=new Map,this._idProperty=e.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],n)for(const e of t)this._items.push(e),this._itemMap.set(this._getItemIdBeforeAdding(e),e)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(t,e){return this.addMany([t],e)}addMany(t,e){if(void 0===e)e=this._items.length;else if(e>this._items.length||e<0)throw new l("collection-add-item-invalid-index",this);let n=0;for(const o of t){const t=this._getItemIdBeforeAdding(o),i=e+n;this._items.splice(i,0,o),this._itemMap.set(t,o),this.fire("add",o,i),n++}return this.fire("change",{added:t,removed:[],index:e}),this}get(t){let e;if("string"==typeof t)e=this._itemMap.get(t);else{if("number"!=typeof t)throw new l("collection-get-invalid-arg",this);e=this._items[t]}return e||null}has(t){if("string"==typeof t)return this._itemMap.has(t);{const e=t[this._idProperty];return e&&this._itemMap.has(e)}}getIndex(t){let e;return e="string"==typeof t?this._itemMap.get(t):t,e?this._items.indexOf(e):-1}remove(t){const[e,n]=this._remove(t);return this.fire("change",{added:[],removed:[e],index:n}),e}map(t,e){return this._items.map(t,e)}find(t,e){return this._items.find(t,e)}filter(t,e){return this._items.filter(t,e)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const t=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:t,index:0})}bindTo(t){if(this._bindToCollection)throw new l("collection-bind-to-rebind",this);return this._bindToCollection=t,{as:t=>{this._setUpBindToBinding((e=>new t(e)))},using:t=>{"function"==typeof t?this._setUpBindToBinding(t):this._setUpBindToBinding((e=>e[t]))}}}_setUpBindToBinding(t){const e=this._bindToCollection,n=(n,o,i)=>{const r=e._bindToCollection==this,s=e._bindToInternalToExternalMap.get(o);if(r&&s)this._bindToExternalToInternalMap.set(o,s),this._bindToInternalToExternalMap.set(s,o);else{const n=t(o);if(!n)return void this._skippedIndexesFromExternal.push(i);let r=i;for(const t of this._skippedIndexesFromExternal)i>t&&r--;for(const t of e._skippedIndexesFromExternal)r>=t&&r++;this._bindToExternalToInternalMap.set(o,n),this._bindToInternalToExternalMap.set(n,o),this.add(n,r);for(let t=0;t<e._skippedIndexesFromExternal.length;t++)r<=e._skippedIndexesFromExternal[t]&&e._skippedIndexesFromExternal[t]++}};for(const t of e)n(0,t,e.getIndex(t));this.listenTo(e,"add",n),this.listenTo(e,"remove",((t,e,n)=>{const o=this._bindToExternalToInternalMap.get(e);o&&this.remove(o),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((t,e)=>(n<e&&t.push(e-1),n>e&&t.push(e),t)),[])}))}_getItemIdBeforeAdding(t){const e=this._idProperty;let n;if(e in t){if(n=t[e],"string"!=typeof n)throw new l("collection-add-invalid-id",this);if(this.get(n))throw new l("collection-add-item-already-exists",this)}else t[e]=n=r();return n}_remove(t){let e,n,o,i=!1;const r=this._idProperty;if("string"==typeof t?(n=t,o=this._itemMap.get(n),i=!o,o&&(e=this._items.indexOf(o))):"number"==typeof t?(e=t,o=this._items[e],i=!o,o&&(n=o[r])):(o=t,n=o[r],e=this._items.indexOf(o),i=-1==e||!this._itemMap.get(n)),i)throw new l("collection-remove-404",this);this._items.splice(e,1),this._itemMap.delete(n);const s=this._bindToInternalToExternalMap.get(o);return this._bindToInternalToExternalMap.delete(o),this._bindToExternalToInternalMap.delete(s),this.fire("remove",o,e),[o,e]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}class wo{constructor(t,e=[],n=[]){this._context=t,this._plugins=new Map,this._availablePlugins=new Map;for(const t of e)t.pluginName&&this._availablePlugins.set(t.pluginName,t);this._contextPlugins=new Map;for(const[t,e]of n)this._contextPlugins.set(t,e),this._contextPlugins.set(e,t),t.pluginName&&this._availablePlugins.set(t.pluginName,t)}*[Symbol.iterator](){for(const t of this._plugins)"function"==typeof t[0]&&(yield t)}get(t){const e=this._plugins.get(t);if(!e){let e=t;throw"function"==typeof t&&(e=t.pluginName||t.name),new l("plugincollection-plugin-not-loaded",this._context,{plugin:e})}return e}has(t){return this._plugins.has(t)}init(t,e=[],n=[]){const o=this,i=this._context;!function t(e,n=new Set){e.forEach((e=>{a(e)&&(n.has(e)||(n.add(e),e.pluginName&&!o._availablePlugins.has(e.pluginName)&&o._availablePlugins.set(e.pluginName,e),e.requires&&t(e.requires,n)))}))}(t),u(t);const r=[...function t(e,n=new Set){return e.map((t=>a(t)?t:o._availablePlugins.get(t))).reduce(((e,o)=>n.has(o)?e:(n.add(o),o.requires&&(u(o.requires,o),t(o.requires,n).forEach((t=>e.add(t)))),e.add(o))),new Set)}(t.filter((t=>!d(t,e))))];!function(t,e){for(const n of e){if("function"!=typeof n)throw new l("plugincollection-replace-plugin-invalid-type",null,{pluginItem:n});const e=n.pluginName;if(!e)throw new l("plugincollection-replace-plugin-missing-name",null,{pluginItem:n});if(n.requires&&n.requires.length)throw new l("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:e});const i=o._availablePlugins.get(e);if(!i)throw new l("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:e});const r=t.indexOf(i);if(-1===r){if(o._contextPlugins.has(i))return;throw new l("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:e})}if(i.requires&&i.requires.length)throw new l("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:e});t.splice(r,1,n),o._availablePlugins.set(e,n)}}(r,n);const s=function(t){return t.map((t=>{const e=o._contextPlugins.get(t)||new t(i);return o._add(t,e),e}))}(r);return g(s,"init").then((()=>g(s,"afterInit"))).then((()=>s));function a(t){return"function"==typeof t}function c(t){return a(t)&&t.isContextPlugin}function d(t,e){return e.some((e=>e===t||(h(t)===e||h(e)===t)))}function h(t){return a(t)?t.pluginName||t.name:t}function u(t,n=null){t.map((t=>a(t)?t:o._availablePlugins.get(t)||t)).forEach((t=>{!function(t,e){if(a(t))return;if(e)throw new l("plugincollection-soft-required",i,{missingPlugin:t,requiredBy:h(e)});throw new l("plugincollection-plugin-not-found",i,{plugin:t})}(t,n),function(t,e){if(!c(e))return;if(c(t))return;throw new l("plugincollection-context-required",i,{plugin:h(t),requiredBy:h(e)})}(t,n),function(t,n){if(!n)return;if(!d(t,e))return;throw new l("plugincollection-required",i,{plugin:h(t),requiredBy:h(n)})}(t,n)}))}function g(t,e){return t.reduce(((t,n)=>n[e]?o._contextPlugins.has(n)?t:t.then(n[e].bind(n)):t),Promise.resolve())}}destroy(){const t=[];for(const[,e]of this)"function"!=typeof e.destroy||this._contextPlugins.has(e)||t.push(e.destroy());return Promise.all(t)}_add(t,e){this._plugins.set(t,e);const n=t.pluginName;if(n){if(this._plugins.has(n))throw new l("plugincollection-plugin-name-conflict",null,{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:t});this._plugins.set(n,e)}}}function _o(t){return Array.isArray(t)?t:[t]}let Ao;M(wo,b);try{Ao={window,document}}catch(t){Ao={window:{},document:{}}}const Co=Ao;function vo(t,e,n=1){if("number"!=typeof n)throw new l("translation-service-quantity-not-a-number",null,{quantity:n});const o=Object.keys(Co.window.CKEDITOR_TRANSLATIONS).length;1===o&&(t=Object.keys(Co.window.CKEDITOR_TRANSLATIONS)[0]);const i=e.id||e.string;if(0===o||!function(t,e){return!!Co.window.CKEDITOR_TRANSLATIONS[t]&&!!Co.window.CKEDITOR_TRANSLATIONS[t].dictionary[e]}(t,i))return 1!==n?e.plural:e.string;const r=Co.window.CKEDITOR_TRANSLATIONS[t].dictionary,s=Co.window.CKEDITOR_TRANSLATIONS[t].getPluralForm||(t=>1===t?0:1),a=r[i];if("string"==typeof a)return a;return a[Number(s(n))]}Co.window.CKEDITOR_TRANSLATIONS||(Co.window.CKEDITOR_TRANSLATIONS={});const yo=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function xo(t){return yo.includes(t)?"rtl":"ltr"}class Eo{constructor(t={}){this.uiLanguage=t.uiLanguage||"en",this.contentLanguage=t.contentLanguage||this.uiLanguage,this.uiLanguageDirection=xo(this.uiLanguage),this.contentLanguageDirection=xo(this.contentLanguage),this.t=(t,e)=>this._t(t,e)}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(t,e=[]){e=_o(e),"string"==typeof t&&(t={string:t});const n=!!t.plural?e[0]:1;return function(t,e){return t.replace(/%(\d+)/g,((t,n)=>n<e.length?e[n]:t))}(vo(this.uiLanguage,t,n),e)}}class To{constructor(t){this.config=new mo(t,this.constructor.defaultConfig);const e=this.constructor.builtinPlugins;this.config.define("plugins",e),this.plugins=new wo(this,e);const n=this.config.get("language")||{};this.locale=new Eo({uiLanguage:"string"==typeof n?n:n.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new ko,this._contextOwner=null}initPlugins(){const t=this.config.get("plugins")||[],e=this.config.get("substitutePlugins")||[];for(const n of t.concat(e)){if("function"!=typeof n)throw new l("context-initplugins-constructor-only",null,{Plugin:n});if(!0!==n.isContextPlugin)throw new l("context-initplugins-invalid-plugin",null,{Plugin:n})}return this.plugins.init(t,[],e)}destroy(){return Promise.all(Array.from(this.editors,(t=>t.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(t,e){if(this._contextOwner)throw new l("context-addeditor-private-context");this.editors.add(t),e&&(this._contextOwner=t)}_removeEditor(t){return this.editors.has(t)&&this.editors.remove(t),this._contextOwner===t?this.destroy():Promise.resolve()}_getEditorConfig(){const t={};for(const e of this.config.names())["plugins","removePlugins","extraPlugins"].includes(e)||(t[e]=this.config.get(e));return t}static create(t){return new Promise((e=>{const n=new this(t);e(n.initPlugins().then((()=>n)))}))}}class Do{constructor(t){this.context=t}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}M(Do,P);class So{is(){throw new Error("is() method is abstract")}}function Bo(t,e){const n=Math.min(t.length,e.length);for(let o=0;o<n;o++)if(t[o]!=e[o])return o;return t.length==e.length?"same":t.length<e.length?"prefix":"extension"}const Io=function(t){return ho(t,4)};class Po extends(b(So)){constructor(t){super(),this.document=t,this.parent=null}get index(){let t;if(!this.parent)return null;if(-1==(t=this.parent.getChildIndex(this)))throw new l("view-node-not-found-in-parent",this);return t}get nextSibling(){const t=this.index;return null!==t&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return null!==t&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}isAttached(){return this.root.is("rootElement")}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.index),e=e.parent;return t}getAncestors(t={}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}getCommonAncestor(t,e={}){const n=this.getAncestors(e),o=t.getAncestors(e);let i=0;for(;n[i]==o[i]&&n[i];)i++;return 0===i?null:n[i-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),n=t.getPath(),o=Bo(e,n);switch(o){case"prefix":return!0;case"extension":return!1;default:return e[o]<n[o]}}isAfter(t){return this!=t&&(this.root===t.root&&!this.isBefore(t))}_remove(){this.parent._removeChildren(this.index)}_fireChange(t,e){this.fire(`change:${t}`,e),this.parent&&this.parent._fireChange(t,e)}toJSON(){const t=Io(this);return delete t.parent,t}}Po.prototype.is=function(t){return"node"===t||"view:node"===t};class Ro extends Po{constructor(t,e){super(t),this._textData=e}get data(){return this._textData}get _data(){return this.data}set _data(t){this._fireChange("text",this),this._textData=t}isSimilar(t){return t instanceof Ro&&(this===t||this.data===t.data)}_clone(){return new Ro(this.document,this.data)}}Ro.prototype.is=function(t){return"$text"===t||"view:$text"===t||"text"===t||"view:text"===t||"node"===t||"view:node"===t};class zo extends So{constructor(t,e,n){if(super(),this.textNode=t,e<0||e>t.data.length)throw new l("view-textproxy-wrong-offsetintext",this);if(n<0||e+n>t.data.length)throw new l("view-textproxy-wrong-length",this);this.data=t.data.substring(e,e+n),this.offsetInText=e}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}getAncestors(t={}){const e=[];let n=t.includeSelf?this.textNode:this.parent;for(;null!==n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}}function Vo(t){return bo(t)?new Map(t):function(t){const e=new Map;for(const n in t)e.set(n,t[n]);return e}(t)}zo.prototype.is=function(t){return"$textProxy"===t||"view:$textProxy"===t||"textProxy"===t||"view:textProxy"===t};class Fo{constructor(...t){this._patterns=[],this.add(...t)}add(...t){for(let e of t)("string"==typeof e||e instanceof RegExp)&&(e={name:e}),this._patterns.push(e)}match(...t){for(const e of t)for(const t of this._patterns){const n=Oo(e,t);if(n)return{element:e,pattern:t,match:n}}return null}matchAll(...t){const e=[];for(const n of t)for(const t of this._patterns){const o=Oo(n,t);o&&e.push({element:n,pattern:t,match:o})}return e.length>0?e:null}getElementName(){if(1!==this._patterns.length)return null;const t=this._patterns[0],e=t.name;return"function"==typeof t||!e||e instanceof RegExp?null:e}}function Oo(t,e){if("function"==typeof e)return e(t);const n={};return e.name&&(n.name=function(t,e){if(t instanceof RegExp)return!!e.match(t);return t===e}(e.name,t.name),!n.name)||e.attributes&&(n.attributes=function(t,e){const n=new Set(e.getAttributeKeys());gt(t)?(void 0!==t.style&&c("matcher-pattern-deprecated-attributes-style-key",t),void 0!==t.class&&c("matcher-pattern-deprecated-attributes-class-key",t)):(n.delete("style"),n.delete("class"));return No(t,n,(t=>e.getAttribute(t)))}(e.attributes,t),!n.attributes)||e.classes&&(n.classes=function(t,e){return No(t,e.getClassNames(),(()=>{}))}(e.classes,t),!n.classes)||e.styles&&(n.styles=function(t,e){return No(t,e.getStyleNames(!0),(t=>e.getStyle(t)))}(e.styles,t),!n.styles)?null:n}function No(t,e,n){const o=function(t){if(Array.isArray(t))return t.map((t=>gt(t)?(void 0!==t.key&&void 0!==t.value||c("matcher-pattern-missing-key-or-value",t),[t.key,t.value]):[t,!0]));if(gt(t))return Object.entries(t);return[[t,!0]]}(t),i=Array.from(e),r=[];if(o.forEach((([t,e])=>{i.forEach((o=>{(function(t,e){return!0===t||t===e||t instanceof RegExp&&e.match(t)})(t,o)&&function(t,e,n){if(!0===t)return!0;const o=n(e);return t===o||t instanceof RegExp&&!!String(o).match(t)}(e,o,n)&&r.push(o)}))})),o.length&&!(r.length<o.length))return r}const Mo=function(t){return"symbol"==typeof t||at(t)&&"[object Symbol]"==it(t)};var Lo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ho=/^\w*$/;const qo=function(t,e){if(xe(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Mo(t))||(Ho.test(t)||!Lo.test(t)||null!=e&&t in Object(e))};function Wo(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var o=arguments,i=e?e.apply(this,o):o[0],r=n.cache;if(r.has(i))return r.get(i);var s=t.apply(this,o);return n.cache=r.set(i,s)||r,s};return n.cache=new(Wo.Cache||le),n}Wo.Cache=le;const jo=Wo;var Uo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$o=/\\(\\)?/g,Go=function(t){var e=jo(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Uo,(function(t,n,o,i){e.push(o?i.replace($o,"$1"):n||t)})),e}));const Ko=Go;const Zo=function(t,e){for(var n=-1,o=null==t?0:t.length,i=Array(o);++n<o;)i[n]=e(t[n],n,t);return i};var Jo=Z?Z.prototype:void 0,Yo=Jo?Jo.toString:void 0;const Qo=function t(e){if("string"==typeof e)return e;if(xe(e))return Zo(e,t)+"";if(Mo(e))return Yo?Yo.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n};const Xo=function(t){return null==t?"":Qo(t)};const ti=function(t,e){return xe(t)?t:qo(t,e)?[t]:Ko(Xo(t))};const ei=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0};const ni=function(t){if("string"==typeof t||Mo(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};const oi=function(t,e){for(var n=0,o=(e=ti(e,t)).length;null!=t&&n<o;)t=t[ni(e[n++])];return n&&n==o?t:void 0};const ii=function(t,e,n){var o=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var r=Array(i);++o<i;)r[o]=t[o+e];return r};const ri=function(t,e){return e.length<2?t:oi(t,ii(e,0,-1))};const si=function(t,e){return e=ti(e,t),null==(t=ri(t,e))||delete t[ni(ei(e))]};const ai=function(t,e){return null==t||si(t,e)};const li=function(t,e,n){var o=null==t?void 0:oi(t,e);return void 0===o?n:o};const ci=function(t,e,n){(void 0!==n&&!pt(t[e],n)||void 0===n&&!(e in t))&&me(t,e,n)};const di=function(t){return function(e,n,o){for(var i=-1,r=Object(e),s=o(e),a=s.length;a--;){var l=s[t?a:++i];if(!1===n(r[l],l,r))break}return e}}();const hi=function(t){return at(t)&&Je(t)};const ui=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};const gi=function(t){return be(t,nn(t))};const mi=function(t,e,n,o,i,r,s){var a=ui(t,n),l=ui(e,n),c=s.get(l);if(c)ci(t,n,c);else{var d=r?r(a,l,n+"",t,e,s):void 0,h=void 0===d;if(h){var u=xe(l),g=!u&&Be(l),m=!u&&!g&&qe(l);d=l,u||g||m?xe(a)?d=a:hi(a)?d=dn(a):g?(h=!1,d=cn(l,!0)):m?(h=!1,d=Zn(l,!0)):d=[]:gt(l)||ye(l)?(d=a,ye(a)?d=gi(a):E(a)&&!Dt(a)||(d=Xn(l))):h=!1}h&&(s.set(l,d),i(d,l,o,r,s),s.delete(l)),ci(t,n,d)}};const pi=function t(e,n,o,i,r){e!==n&&di(n,(function(s,a){if(r||(r=new he),E(s))mi(e,n,a,o,t,i,r);else{var l=i?i(ui(e,a),s,a+"",e,n,r):void 0;void 0===l&&(l=s),ci(e,a,l)}}),nn)};const fi=function(t){return t};const bi=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)};var ki=Math.max;const wi=function(t,e,n){return e=ki(void 0===e?t.length-1:e,0),function(){for(var o=arguments,i=-1,r=ki(o.length-e,0),s=Array(r);++i<r;)s[i]=o[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=o[i];return a[e]=n(s),bi(t,this,a)}};const _i=function(t){return function(){return t}};const Ai=ge?function(t,e){return ge(t,"toString",{configurable:!0,enumerable:!1,value:_i(e),writable:!0})}:fi;var Ci=Date.now;const vi=function(t){var e=0,n=0;return function(){var o=Ci(),i=16-(o-n);if(n=o,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}};const yi=vi(Ai);const xi=function(t,e){return yi(wi(t,e,fi),t+"")};const Ei=function(t,e,n){if(!E(n))return!1;var o=typeof e;return!!("number"==o?Je(n)&&Pe(e,n.length):"string"==o&&e in n)&&pt(n[e],t)};const Ti=function(t){return xi((function(e,n){var o=-1,i=n.length,r=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(r=t.length>3&&"function"==typeof r?(i--,r):void 0,s&&Ei(n[0],n[1],s)&&(r=i<3?void 0:r,i=1),e=Object(e);++o<i;){var a=n[o];a&&t(e,a,o,r)}return e}))};const Di=Ti((function(t,e,n){pi(t,e,n)}));const Si=function(t,e,n,o){if(!E(t))return t;for(var i=-1,r=(e=ti(e,t)).length,s=r-1,a=t;null!=a&&++i<r;){var l=ni(e[i]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(i!=s){var d=a[l];void 0===(c=o?o(d,l,a):void 0)&&(c=E(d)?d:Pe(e[i+1])?[]:{})}fe(a,l,c),a=a[l]}return t};const Bi=function(t,e,n){return null==t?t:Si(t,e,n)};class Ii{constructor(t){this._styles={},this._styleProcessor=t}get isEmpty(){const t=Object.entries(this._styles);return!Array.from(t).length}get size(){return this.isEmpty?0:this.getStyleNames().length}setTo(t){this.clear();const e=Array.from(function(t){let e=null,n=0,o=0,i=null;const r=new Map;if(""===t)return r;";"!=t.charAt(t.length-1)&&(t+=";");for(let s=0;s<t.length;s++){const a=t.charAt(s);if(null===e)switch(a){case":":i||(i=t.substr(n,s-n),o=s+1);break;case'"':case"'":e=a;break;case";":{const e=t.substr(o,s-o);i&&r.set(i.trim(),e.trim()),i=null,n=s+1;break}}else a===e&&(e=null)}return r}(t).entries());for(const[t,n]of e)this._styleProcessor.toNormalizedForm(t,n,this._styles)}has(t){if(this.isEmpty)return!1;const e=this._styleProcessor.getReducedForm(t,this._styles).find((([e])=>e===t));return Array.isArray(e)}set(t,e){if(E(t))for(const[e,n]of Object.entries(t))this._styleProcessor.toNormalizedForm(e,n,this._styles);else this._styleProcessor.toNormalizedForm(t,e,this._styles)}remove(t){const e=Ri(t);ai(this._styles,e),delete this._styles[t],this._cleanEmptyObjectsOnPath(e)}getNormalized(t){return this._styleProcessor.getNormalized(t,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map((t=>t.join(":"))).sort().join(";")+";"}getAsString(t){if(this.isEmpty)return;if(this._styles[t]&&!E(this._styles[t]))return this._styles[t];const e=this._styleProcessor.getReducedForm(t,this._styles).find((([e])=>e===t));return Array.isArray(e)?e[1]:void 0}getStyleNames(t=!1){if(this.isEmpty)return[];if(t)return this._styleProcessor.getStyleNames(this._styles);return this._getStylesEntries().map((([t])=>t))}clear(){this._styles={}}_getStylesEntries(){const t=[],e=Object.keys(this._styles);for(const n of e)t.push(...this._styleProcessor.getReducedForm(n,this._styles));return t}_cleanEmptyObjectsOnPath(t){const e=t.split(".");if(!(e.length>1))return;const n=e.splice(0,e.length-1).join("."),o=li(this._styles,n);if(!o)return;!Array.from(Object.keys(o)).length&&this.remove(n)}}class Pi{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(t,e,n){if(E(e))zi(n,Ri(t),e);else if(this._normalizers.has(t)){const o=this._normalizers.get(t),{path:i,value:r}=o(e);zi(n,i,r)}else zi(n,t,e)}getNormalized(t,e){if(!t)return Di({},e);if(void 0!==e[t])return e[t];if(this._extractors.has(t)){const n=this._extractors.get(t);if("string"==typeof n)return li(e,n);const o=n(t,e);if(o)return o}return li(e,Ri(t))}getReducedForm(t,e){const n=this.getNormalized(t,e);if(void 0===n)return[];if(this._reducers.has(t)){return this._reducers.get(t)(n)}return[[t,n]]}getStyleNames(t){const e=Array.from(this._consumables.keys()).filter((e=>{const n=this.getNormalized(e,t);return n&&"object"==typeof n?Object.keys(n).length:n})),n=new Set([...e,...Object.keys(t)]);return Array.from(n.values())}getRelatedStyles(t){return this._consumables.get(t)||[]}setNormalizer(t,e){this._normalizers.set(t,e)}setExtractor(t,e){this._extractors.set(t,e)}setReducer(t,e){this._reducers.set(t,e)}setStyleRelation(t,e){this._mapStyleNames(t,e);for(const n of e)this._mapStyleNames(n,[t])}_mapStyleNames(t,e){this._consumables.has(t)||this._consumables.set(t,[]),this._consumables.get(t).push(...e)}}function Ri(t){return t.replace("-",".")}function zi(t,e,n){let o=n;E(n)&&(o=Di({},li(t,e),n)),Bi(t,e,o)}class Vi extends Po{constructor(t,e,n,o){if(super(t),this.name=e,this._attrs=function(t){const e=Vo(t);for(const[t,n]of e)null===n?e.delete(t):"string"!=typeof n&&e.set(t,String(n));return e}(n),this._children=[],o&&this._insertChild(0,o),this._classes=new Set,this._attrs.has("class")){const t=this._attrs.get("class");Fi(this._classes,t),this._attrs.delete("class")}this._styles=new Ii(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map,this._unsafeAttributesToRender=[]}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}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(t){if("class"==t)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==t){const t=this._styles.toString();return""==t?void 0:t}return this._attrs.get(t)}hasAttribute(t){return"class"==t?this._classes.size>0:"style"==t?!this._styles.isEmpty:this._attrs.has(t)}isSimilar(t){if(!(t instanceof Vi))return!1;if(this===t)return!0;if(this.name!=t.name)return!1;if(this._attrs.size!==t._attrs.size||this._classes.size!==t._classes.size||this._styles.size!==t._styles.size)return!1;for(const[e,n]of this._attrs)if(!t._attrs.has(e)||t._attrs.get(e)!==n)return!1;for(const e of this._classes)if(!t._classes.has(e))return!1;for(const e of this._styles.getStyleNames())if(!t._styles.has(e)||t._styles.getAsString(e)!==this._styles.getAsString(e))return!1;return!0}hasClass(...t){for(const e of t)if(!this._classes.has(e))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(t){return this._styles.getAsString(t)}getNormalizedStyle(t){return this._styles.getNormalized(t)}getStyleNames(t){return this._styles.getStyleNames(t)}hasStyle(...t){for(const e of t)if(!this._styles.has(e))return!1;return!0}findAncestor(...t){const e=new Fo(...t);let n=this.parent;for(;n&&!n.is("documentFragment");){if(e.match(n))return n;n=n.parent}return null}getCustomProperty(t){return this._customProperties.get(t)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const t=Array.from(this._classes).sort().join(","),e=this._styles.toString(),n=Array.from(this._attrs).map((t=>`${t[0]}="${t[1]}"`)).sort().join(" ");return this.name+(""==t?"":` class="${t}"`)+(e?` style="${e}"`:"")+(""==n?"":` ${n}`)}shouldRenderUnsafeAttribute(t){return this._unsafeAttributesToRender.includes(t)}_clone(t=!1){const e=[];if(t)for(const n of this.getChildren())e.push(n._clone(t));const n=new this.constructor(this.document,this.name,this._attrs,e);return n._classes=new Set(this._classes),n._styles.set(this._styles.getNormalized()),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n._unsafeAttributesToRender=this._unsafeAttributesToRender,n}_appendChild(t){return this._insertChild(this.childCount,t)}_insertChild(t,e){this._fireChange("children",this);let n=0;const o=function(t,e){if("string"==typeof e)return[new Ro(t,e)];bo(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Ro(t,e):e instanceof zo?new Ro(t,e.data):e))}(this.document,e);for(const e of o)null!==e.parent&&e._remove(),e.parent=this,e.document=this.document,this._children.splice(t,0,e),t++,n++;return n}_removeChildren(t,e=1){this._fireChange("children",this);for(let n=t;n<t+e;n++)this._children[n].parent=null;return this._children.splice(t,e)}_setAttribute(t,e){e=String(e),this._fireChange("attributes",this),"class"==t?Fi(this._classes,e):"style"==t?this._styles.setTo(e):this._attrs.set(t,e)}_removeAttribute(t){return this._fireChange("attributes",this),"class"==t?this._classes.size>0&&(this._classes.clear(),!0):"style"==t?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(t)}_addClass(t){this._fireChange("attributes",this);for(const e of _o(t))this._classes.add(e)}_removeClass(t){this._fireChange("attributes",this);for(const e of _o(t))this._classes.delete(e)}_setStyle(t,e){this._fireChange("attributes",this),gt(t)?this._styles.set(t):this._styles.set(t,e)}_removeStyle(t){this._fireChange("attributes",this);for(const e of _o(t))this._styles.remove(e)}_setCustomProperty(t,e){this._customProperties.set(t,e)}_removeCustomProperty(t){return this._customProperties.delete(t)}}function Fi(t,e){const n=e.split(/\s+/);t.clear(),n.forEach((e=>t.add(e)))}Vi.prototype.is=function(t,e){return e?e===this.name&&("element"===t||"view:element"===t):"element"===t||"view:element"===t||"node"===t||"view:node"===t};class Oi extends Vi{constructor(...t){super(...t),this.getFillerOffset=Ni}}function Ni(){const t=[...this.getChildren()],e=t[this.childCount-1];if(e&&e.is("element","br"))return this.childCount;for(const e of t)if(!e.is("uiElement"))return null;return this.childCount}Oi.prototype.is=function(t,e){return e?e===this.name&&("containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class Mi extends(P(Oi)){constructor(...t){super(...t);const e=t[0];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}))}destroy(){this.stopListening()}}Mi.prototype.is=function(t,e){return e?e===this.name&&("editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};const Li=Symbol("rootName");class Hi extends Mi{constructor(t,e){super(t,e),this.rootName="main"}get rootName(){return this.getCustomProperty(Li)}set rootName(t){this._setCustomProperty(Li,t)}set _name(t){this.name=t}}Hi.prototype.is=function(t,e){return e?e===this.name&&("rootElement"===t||"view:rootElement"===t||"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"rootElement"===t||"view:rootElement"===t||"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class qi{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new l("view-tree-walker-no-start-position",null);if(t.direction&&"forward"!=t.direction&&"backward"!=t.direction)throw new l("view-tree-walker-unknown-direction",t.startPosition,{direction:t.direction});this.boundaries=t.boundaries||null,t.startPosition?this.position=Wi._createAt(t.startPosition):this.position=Wi._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}[Symbol.iterator](){return this}skip(t){let e,n,o;do{o=this.position,({done:e,value:n}=this.next())}while(!e&&t(n));e||(this.position=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let t=this.position.clone();const e=this.position,n=t.parent;if(null===n.parent&&t.offset===n.childCount)return{done:!0,value:void 0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let o;if(n instanceof Ro){if(t.isAtEnd)return this.position=Wi._createAfter(n),this._next();o=n.data[t.offset]}else o=n.getChild(t.offset);if(o instanceof Vi)return this.shallow?t.offset++:t=new Wi(o,0),this.position=t,this._formatReturnValue("elementStart",o,e,t,1);if(o instanceof Ro){if(this.singleCharacters)return t=new Wi(o,0),this.position=t,this._next();{let n,i=o.data.length;return o==this._boundaryEndParent?(i=this.boundaries.end.offset,n=new zo(o,0,i),t=Wi._createAfter(n)):(n=new zo(o,0,o.data.length),t.offset++),this.position=t,this._formatReturnValue("text",n,e,t,i)}}if("string"==typeof o){let o;if(this.singleCharacters)o=1;else{o=(n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length)-t.offset}const i=new zo(n,t.offset,o);return t.offset+=o,this.position=t,this._formatReturnValue("text",i,e,t,o)}return t=Wi._createAfter(n),this.position=t,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",n,e,t)}_previous(){let t=this.position.clone();const e=this.position,n=t.parent;if(null===n.parent&&0===t.offset)return{done:!0,value:void 0};if(n==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let o;if(n instanceof Ro){if(t.isAtStart)return this.position=Wi._createBefore(n),this._previous();o=n.data[t.offset-1]}else o=n.getChild(t.offset-1);if(o instanceof Vi)return this.shallow?(t.offset--,this.position=t,this._formatReturnValue("elementStart",o,e,t,1)):(t=new Wi(o,o.childCount),this.position=t,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",o,e,t));if(o instanceof Ro){if(this.singleCharacters)return t=new Wi(o,o.data.length),this.position=t,this._previous();{let n,i=o.data.length;if(o==this._boundaryStartParent){const e=this.boundaries.start.offset;n=new zo(o,e,o.data.length-e),i=n.data.length,t=Wi._createBefore(n)}else n=new zo(o,0,o.data.length),t.offset--;return this.position=t,this._formatReturnValue("text",n,e,t,i)}}if("string"==typeof o){let o;if(this.singleCharacters)o=1;else{const e=n===this._boundaryStartParent?this.boundaries.start.offset:0;o=t.offset-e}t.offset-=o;const i=new zo(n,t.offset,o);return this.position=t,this._formatReturnValue("text",i,e,t,o)}return t=Wi._createBefore(n),this.position=t,this._formatReturnValue("elementStart",n,e,t,1)}_formatReturnValue(t,e,n,o,i){return e instanceof zo&&(e.offsetInText+e.data.length==e.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=Wi._createAfter(e.textNode):(o=Wi._createAfter(e.textNode),this.position=o)),0===e.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=Wi._createBefore(e.textNode):(o=Wi._createBefore(e.textNode),this.position=o))),{done:!1,value:{type:t,item:e,previousPosition:n,nextPosition:o,length:i}}}}class Wi extends So{constructor(t,e){super(),this.parent=t,this.offset=e}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 t=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===t}get root(){return this.parent.root}get editableElement(){let t=this.parent;for(;!(t instanceof Mi);){if(!t.parent)return null;t=t.parent}return t}getShiftedBy(t){const e=Wi._createAt(this),n=e.offset+t;return e.offset=n<0?0:n,e}getLastMatchingPosition(t,e={}){e.startPosition=this;const n=new qi(e);return n.skip(t),n.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(t){const e=this.getAncestors(),n=t.getAncestors();let o=0;for(;e[o]==n[o]&&e[o];)o++;return 0===o?null:e[o-1]}isEqual(t){return this.parent==t.parent&&this.offset==t.offset}isBefore(t){return"before"==this.compareWith(t)}isAfter(t){return"after"==this.compareWith(t)}compareWith(t){if(this.root!==t.root)return"different";if(this.isEqual(t))return"same";const e=this.parent.is("node")?this.parent.getPath():[],n=t.parent.is("node")?t.parent.getPath():[];e.push(this.offset),n.push(t.offset);const o=Bo(e,n);switch(o){case"prefix":return"before";case"extension":return"after";default:return e[o]<n[o]?"before":"after"}}getWalker(t={}){return t.startPosition=this,new qi(t)}clone(){return new Wi(this.parent,this.offset)}static _createAt(t,e){if(t instanceof Wi)return new this(t.parent,t.offset);{const n=t;if("end"==e)e=n.is("$text")?n.data.length:n.childCount;else{if("before"==e)return this._createBefore(n);if("after"==e)return this._createAfter(n);if(0!==e&&!e)throw new l("view-createpositionat-offset-required",n)}return new Wi(n,e)}}static _createAfter(t){if(t.is("$textProxy"))return new Wi(t.textNode,t.offsetInText+t.data.length);if(!t.parent)throw new l("view-position-after-root",t,{root:t});return new Wi(t.parent,t.index+1)}static _createBefore(t){if(t.is("$textProxy"))return new Wi(t.textNode,t.offsetInText);if(!t.parent)throw new l("view-position-before-root",t,{root:t});return new Wi(t.parent,t.index)}}Wi.prototype.is=function(t){return"position"===t||"view:position"===t};class ji extends So{constructor(t,e=null){super(),this.start=t.clone(),this.end=e?e.clone():t.clone()}*[Symbol.iterator](){yield*new qi({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let t=this.start.getLastMatchingPosition(Ui,{direction:"backward"}),e=this.end.getLastMatchingPosition(Ui);return t.parent.is("$text")&&t.isAtStart&&(t=Wi._createBefore(t.parent)),e.parent.is("$text")&&e.isAtEnd&&(e=Wi._createAfter(e.parent)),new ji(t,e)}getTrimmed(){let t=this.start.getLastMatchingPosition(Ui);if(t.isAfter(this.end)||t.isEqual(this.end))return new ji(t,t);let e=this.end.getLastMatchingPosition(Ui,{direction:"backward"});const n=t.nodeAfter,o=e.nodeBefore;return n&&n.is("$text")&&(t=new Wi(n,0)),o&&o.is("$text")&&(e=new Wi(o,o.data.length)),new ji(t,e)}isEqual(t){return this==t||this.start.isEqual(t.start)&&this.end.isEqual(t.end)}containsPosition(t){return t.isAfter(this.start)&&t.isBefore(this.end)}containsRange(t,e=!1){t.isCollapsed&&(e=!1);const n=this.containsPosition(t.start)||e&&this.start.isEqual(t.start),o=this.containsPosition(t.end)||e&&this.end.isEqual(t.end);return n&&o}getDifference(t){const e=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&e.push(new ji(this.start,t.start)),this.containsPosition(t.end)&&e.push(new ji(t.end,this.end))):e.push(this.clone()),e}getIntersection(t){if(this.isIntersecting(t)){let e=this.start,n=this.end;return this.containsPosition(t.start)&&(e=t.start),this.containsPosition(t.end)&&(n=t.end),new ji(e,n)}return null}getWalker(t={}){return t.boundaries=this,new qi(t)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let t=this.start.nodeAfter,e=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(t=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(e=this.end.parent.previousSibling),t&&t.is("element")&&t===e?t:null}clone(){return new ji(this.start,this.end)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const e=new qi(t);for(const t of e)yield t.item}*getPositions(t={}){t.boundaries=this;const e=new qi(t);yield e.position;for(const t of e)yield t.nextPosition}isIntersecting(t){return this.start.isBefore(t.end)&&this.end.isAfter(t.start)}static _createFromParentsAndOffsets(t,e,n,o){return new this(new Wi(t,e),new Wi(n,o))}static _createFromPositionAndShift(t,e){const n=t,o=t.getShiftedBy(e);return e>0?new this(n,o):new this(o,n)}static _createIn(t){return this._createFromParentsAndOffsets(t,0,t,t.childCount)}static _createOn(t){const e=t.is("$textProxy")?t.offsetSize:1;return this._createFromPositionAndShift(Wi._createBefore(t),e)}}function Ui(t){return!(!t.item.is("attributeElement")&&!t.item.is("uiElement"))}function $i(t){let e=0;for(const n of t)e++;return e}ji.prototype.is=function(t){return"range"===t||"view:range"===t};class Gi extends(b(So)){constructor(...t){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",t.length&&this.setTo(...t)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.end:t.start).clone()}get focus(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.start:t.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 t of this._ranges)yield t.clone()}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?t.clone():null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?t.clone():null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}isEqual(t){if(this.isFake!=t.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=t.fakeSelectionLabel)return!1;if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let n=!1;for(const o of t._ranges)if(e.isEqual(o)){n=!0;break}if(!n)return!1}return!0}isSimilar(t){if(this.isBackward!=t.isBackward)return!1;const e=$i(this.getRanges());if(e!=$i(t.getRanges()))return!1;if(0==e)return!0;for(let e of this.getRanges()){e=e.getTrimmed();let n=!1;for(let o of t.getRanges())if(o=o.getTrimmed(),e.start.isEqual(o.start)&&e.end.isEqual(o.end)){n=!0;break}if(!n)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...t){let[e,n,o]=t;if("object"==typeof n&&(o=n,n=void 0),null===e)this._setRanges([]),this._setFakeOptions(o);else if(e instanceof Gi||e instanceof Ki)this._setRanges(e.getRanges(),e.isBackward),this._setFakeOptions({fake:e.isFake,label:e.fakeSelectionLabel});else if(e instanceof ji)this._setRanges([e],o&&o.backward),this._setFakeOptions(o);else if(e instanceof Wi)this._setRanges([new ji(e)]),this._setFakeOptions(o);else if(e instanceof Po){const t=!!o&&!!o.backward;let i;if(void 0===n)throw new l("view-selection-setto-required-second-parameter",this);i="in"==n?ji._createIn(e):"on"==n?ji._createOn(e):new ji(Wi._createAt(e,n)),this._setRanges([i],t),this._setFakeOptions(o)}else{if(!bo(e))throw new l("view-selection-setto-not-selectable",this);this._setRanges(e,o&&o.backward),this._setFakeOptions(o)}this.fire("change")}setFocus(t,e){if(null===this.anchor)throw new l("view-selection-setfocus-no-ranges",this);const n=Wi._createAt(t,e);if("same"==n.compareWith(this.focus))return;const o=this.anchor;this._ranges.pop(),"before"==n.compareWith(o)?this._addRange(new ji(n,o),!0):this._addRange(new ji(o,n)),this.fire("change")}_setRanges(t,e=!1){t=Array.from(t),this._ranges=[];for(const e of t)this._addRange(e);this._lastRangeBackward=!!e}_setFakeOptions(t={}){this._isFake=!!t.fake,this._fakeSelectionLabel=t.fake&&t.label||""}_addRange(t,e=!1){if(!(t instanceof ji))throw new l("view-selection-add-range-not-range",this);this._pushRange(t),this._lastRangeBackward=!!e}_pushRange(t){for(const e of this._ranges)if(t.isIntersecting(e))throw new l("view-selection-range-intersects",this,{addedRange:t,intersectingRange:e});this._ranges.push(new ji(t.start,t.end))}}Gi.prototype.is=function(t){return"selection"===t||"view:selection"===t};class Ki extends(b(So)){constructor(...t){super(),this._selection=new Gi,this._selection.delegate("change").to(this),t.length&&this._selection.setTo(...t)}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(t){return this._selection.isEqual(t)}isSimilar(t){return this._selection.isSimilar(t)}_setTo(...t){this._selection.setTo(...t)}_setFocus(t,e){this._selection.setFocus(t,e)}}Ki.prototype.is=function(t){return"selection"===t||"documentSelection"==t||"view:selection"==t||"view:documentSelection"==t};class Zi extends e{constructor(t,e,n){super(t,e),this.startRange=n,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const Ji=Symbol("bubbling contexts");function Yi(t){return class extends t{fire(t,...n){try{const o=t instanceof e?t:new e(this,t),i=er(this);if(!i.size)return;if(Qi(o,"capturing",this),Xi(i,"$capture",o,...n))return o.return;const r=o.startRange||this.selection.getFirstRange(),s=r?r.getContainedElement():null,a=!!s&&Boolean(tr(i,s));let l=s||function(t){if(!t)return null;const e=t.start.parent,n=t.end.parent,o=e.getPath(),i=n.getPath();return o.length>i.length?e:n}(r);if(Qi(o,"atTarget",l),!a){if(Xi(i,"$text",o,...n))return o.return;Qi(o,"bubbling",l)}for(;l;){if(l.is("rootElement")){if(Xi(i,"$root",o,...n))return o.return}else if(l.is("element")&&Xi(i,l.name,o,...n))return o.return;if(Xi(i,l,o,...n))return o.return;l=l.parent,Qi(o,"bubbling",l)}return Qi(o,"bubbling",this),Xi(i,"$document",o,...n),o.return}catch(t){l.rethrowUnexpectedError(t,this)}}_addEventListener(t,e,n){const o=_o(n.context||"$document"),i=er(this);for(const r of o){let o=i.get(r);o||(o=new k,i.set(r,o)),this.listenTo(o,t,e,n)}}_removeEventListener(t,e){const n=er(this);for(const o of n.values())this.stopListening(o,t,e)}}}{const t=Yi(Object);["fire","_addEventListener","_removeEventListener"].forEach((e=>{Yi[e]=t.prototype[e]}))}function Qi(t,e,n){t instanceof Zi&&(t._eventPhase=e,t._currentTarget=n)}function Xi(t,e,n,...o){const i="string"==typeof e?t.get(e):tr(t,e);return!!i&&(i.fire(n,...o),n.stop.called)}function tr(t,e){for(const[n,o]of t)if("function"==typeof n&&n(e))return o;return null}function er(t){return t[Ji]||(t[Ji]=new Map),t[Ji]}class nr extends(Yi(R)){constructor(t){super(),this.selection=new Ki,this.roots=new ko({idProperty:"rootName"}),this.stylesProcessor=t,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1),this._postFixers=new Set}getRoot(t="main"){return this.roots.get(t)}registerPostFixer(t){this._postFixers.add(t)}destroy(){this.roots.map((t=>t.destroy())),this.stopListening()}_callPostFixers(t){let e=!1;do{for(const n of this._postFixers)if(e=n(t),e)break}while(e)}}class or extends Vi{constructor(...t){super(...t),this.getFillerOffset=ir,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 l("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(t){return null!==this.id||null!==t.id?this.id===t.id:super.isSimilar(t)&&this.priority==t.priority}_clone(t=!1){const e=super._clone(t);return e._priority=this._priority,e._id=this._id,e}}function ir(){if(rr(this))return null;let t=this.parent;for(;t&&t.is("attributeElement");){if(rr(t)>1)return null;t=t.parent}return!t||rr(t)>1?null:this.childCount}function rr(t){return Array.from(t.getChildren()).filter((t=>!t.is("uiElement"))).length}or.DEFAULT_PRIORITY=10,or.prototype.is=function(t,e){return e?e===this.name&&("attributeElement"===t||"view:attributeElement"===t||"element"===t||"view:element"===t):"attributeElement"===t||"view:attributeElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class sr extends Vi{constructor(t,e,n,o){super(t,e,n,o),this.getFillerOffset=ar}_insertChild(t,e){if(e&&(e instanceof Po||Array.from(e).length>0))throw new l("view-emptyelement-cannot-add",[this,e]);return 0}}function ar(){return null}sr.prototype.is=function(t,e){return e?e===this.name&&("emptyElement"===t||"view:emptyElement"===t||"element"===t||"view:element"===t):"emptyElement"===t||"view:emptyElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};const lr=function(){try{return navigator.userAgent.toLowerCase()}catch(t){return""}}(),cr={isMac:hr(lr),isWindows:function(t){return t.indexOf("windows")>-1}(lr),isGecko:function(t){return!!t.match(/gecko\/\d+/)}(lr),isSafari:function(t){return t.indexOf(" applewebkit/")>-1&&-1===t.indexOf("chrome")}(lr),isiOS:function(t){return!!t.match(/iphone|ipad/i)||hr(t)&&navigator.maxTouchPoints>0}(lr),isAndroid:function(t){return t.indexOf("android")>-1}(lr),isBlink:function(t){return t.indexOf("chrome/")>-1&&t.indexOf("edge/")<0}(lr),features:{isRegExpUnicodePropertySupported:function(){let t=!1;try{t=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(t){}return t}()}},dr=cr;function hr(t){return t.indexOf("macintosh")>-1}const ur={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},gr={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},mr=function(){const t={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let e=65;e<=90;e++){const n=String.fromCharCode(e);t[n.toLowerCase()]=e}for(let e=48;e<=57;e++)t[e-48]=e;for(let e=112;e<=123;e++)t["f"+(e-111)]=e;for(const e of"`-=[];',./\\")t[e]=e.charCodeAt(0);return t}(),pr=Object.fromEntries(Object.entries(mr).map((([t,e])=>[e,t.charAt(0).toUpperCase()+t.slice(1)])));function fr(t){let e;if("string"==typeof t){if(e=mr[t.toLowerCase()],!e)throw new l("keyboard-unknown-key",null,{key:t})}else e=t.keyCode+(t.altKey?mr.alt:0)+(t.ctrlKey?mr.ctrl:0)+(t.shiftKey?mr.shift:0)+(t.metaKey?mr.cmd:0);return e}function br(t){return"string"==typeof t&&(t=function(t){return t.split("+").map((t=>t.trim()))}(t)),t.map((t=>"string"==typeof t?function(t){if(t.endsWith("!"))return fr(t.slice(0,-1));const e=fr(t);return dr.isMac&&e==mr.ctrl?mr.cmd:e}(t):t)).reduce(((t,e)=>e+t),0)}function kr(t){let e=br(t);return Object.entries(dr.isMac?ur:gr).reduce(((t,[n,o])=>(0!=(e&mr[n])&&(e&=~mr[n],t+=o),t)),"")+(e?pr[e]:"")}function wr(t,e){const n="ltr"===e;switch(t){case mr.arrowleft:return n?"left":"right";case mr.arrowright:return n?"right":"left";case mr.arrowup:return"up";case mr.arrowdown:return"down"}}class _r extends Vi{constructor(...t){super(...t),this.getFillerOffset=Cr}_insertChild(t,e){if(e&&(e instanceof Po||Array.from(e).length>0))throw new l("view-uielement-cannot-add",[this,e]);return 0}render(t,e){return this.toDomElement(t)}toDomElement(t){const e=t.createElement(this.name);for(const t of this.getAttributeKeys())e.setAttribute(t,this.getAttribute(t));return e}}function Ar(t){t.document.on("arrowKey",((e,n)=>function(t,e,n){if(e.keyCode==mr.arrowright){const t=e.domTarget.ownerDocument.defaultView.getSelection(),o=1==t.rangeCount&&t.getRangeAt(0).collapsed;if(o||e.shiftKey){const e=t.focusNode,i=t.focusOffset,r=n.domPositionToView(e,i);if(null===r)return;let s=!1;const a=r.getLastMatchingPosition((t=>(t.item.is("uiElement")&&(s=!0),!(!t.item.is("uiElement")&&!t.item.is("attributeElement")))));if(s){const e=n.viewPositionToDom(a);o?t.collapse(e.parent,e.offset):t.extend(e.parent,e.offset)}}}}(0,n,t.domConverter)),{priority:"low"})}function Cr(){return null}_r.prototype.is=function(t,e){return e?e===this.name&&("uiElement"===t||"view:uiElement"===t||"element"===t||"view:element"===t):"uiElement"===t||"view:uiElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class vr extends Vi{constructor(...t){super(...t),this.getFillerOffset=yr}_insertChild(t,e){if(e&&(e instanceof Po||Array.from(e).length>0))throw new l("view-rawelement-cannot-add",[this,e]);return 0}render(){}}function yr(){return null}vr.prototype.is=function(t,e){return e?e===this.name&&("rawElement"===t||"view:rawElement"===t||"element"===t||"view:element"===t):"rawElement"===t||"view:rawElement"===t||t===this.name||t==="view:"+this.name||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class xr extends(b(So)){constructor(t,e){super(),this.document=t,this._children=[],e&&this._insertChild(0,e)}[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}_appendChild(t){return this._insertChild(this.childCount,t)}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(t,e){this._fireChange("children",this);let n=0;const o=function(t,e){if("string"==typeof e)return[new Ro(t,e)];bo(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Ro(t,e):e instanceof zo?new Ro(t,e.data):e))}(this.document,e);for(const e of o)null!==e.parent&&e._remove(),e.parent=this,this._children.splice(t,0,e),t++,n++;return n}_removeChildren(t,e=1){this._fireChange("children",this);for(let n=t;n<t+e;n++)this._children[n].parent=null;return this._children.splice(t,e)}_fireChange(t,e){this.fire("change:"+t,e)}}xr.prototype.is=function(t){return"documentFragment"===t||"view:documentFragment"===t};class Er{constructor(t){this.document=t,this._cloneGroups=new Map,this._slotFactory=null}setSelection(...t){this.document.selection._setTo(...t)}setSelectionFocus(...t){this.document.selection._setFocus(...t)}createDocumentFragment(t){return new xr(this.document,t)}createText(t){return new Ro(this.document,t)}createAttributeElement(t,e,n={}){const o=new or(this.document,t,e);return"number"==typeof n.priority&&(o._priority=n.priority),n.id&&(o._id=n.id),n.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),o}createContainerElement(t,e,n={},o={}){let i=null;gt(n)?o=n:i=n;const r=new Oi(this.document,t,e,i);return o.renderUnsafeAttributes&&r._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),r}createEditableElement(t,e,n={}){const o=new Mi(this.document,t,e);return n.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),o}createEmptyElement(t,e,n={}){const o=new sr(this.document,t,e);return n.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),o}createUIElement(t,e,n){const o=new _r(this.document,t,e);return n&&(o.render=n),o}createRawElement(t,e,n,o={}){const i=new vr(this.document,t,e);return n&&(i.render=n),o.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),i}setAttribute(t,e,n){n._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,n){gt(t)&&void 0===n?e._setStyle(t):n._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,n){n._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}breakAttributes(t){return t instanceof Wi?this._breakAttributes(t):this._breakAttributesRange(t)}breakContainer(t){const e=t.parent;if(!e.is("containerElement"))throw new l("view-writer-break-non-container-element",this.document);if(!e.parent)throw new l("view-writer-break-root",this.document);if(t.isAtStart)return Wi._createBefore(e);if(!t.isAtEnd){const n=e._clone(!1);this.insert(Wi._createAfter(e),n);const o=new ji(t,Wi._createAt(e,"end")),i=new Wi(n,0);this.move(o,i)}return Wi._createAfter(e)}mergeAttributes(t){const e=t.offset,n=t.parent;if(n.is("$text"))return t;if(n.is("attributeElement")&&0===n.childCount){const t=n.parent,e=n.index;return n._remove(),this._removeFromClonedElementsGroup(n),this.mergeAttributes(new Wi(t,e))}const o=n.getChild(e-1),i=n.getChild(e);if(!o||!i)return t;if(o.is("$text")&&i.is("$text"))return Ir(o,i);if(o.is("attributeElement")&&i.is("attributeElement")&&o.isSimilar(i)){const t=o.childCount;return o._appendChild(i.getChildren()),i._remove(),this._removeFromClonedElementsGroup(i),this.mergeAttributes(new Wi(o,t))}return t}mergeContainers(t){const e=t.nodeBefore,n=t.nodeAfter;if(!(e&&n&&e.is("containerElement")&&n.is("containerElement")))throw new l("view-writer-merge-containers-invalid-position",this.document);const o=e.getChild(e.childCount-1),i=o instanceof Ro?Wi._createAt(o,"end"):Wi._createAt(e,"end");return this.move(ji._createIn(n),Wi._createAt(e,"end")),this.remove(ji._createOn(n)),i}insert(t,e){Rr(e=bo(e)?[...e]:[e],this.document);const n=e.reduce(((t,e)=>{const n=t[t.length-1],o=!e.is("uiElement");return n&&n.breakAttributes==o?n.nodes.push(e):t.push({breakAttributes:o,nodes:[e]}),t}),[]);let o=null,i=t;for(const{nodes:t,breakAttributes:e}of n){const n=this._insertNodes(i,t,e);o||(o=n.start),i=n.end}return o?new ji(o,i):new ji(t)}remove(t){const e=t instanceof ji?t:ji._createOn(t);if(Vr(e,this.document),e.isCollapsed)return new xr(this.document);const{start:n,end:o}=this._breakAttributesRange(e,!0),i=n.parent,r=o.offset-n.offset,s=i._removeChildren(n.offset,r);for(const t of s)this._removeFromClonedElementsGroup(t);const a=this.mergeAttributes(n);return e.start=a,e.end=a.clone(),new xr(this.document,s)}clear(t,e){Vr(t,this.document);const n=t.getWalker({direction:"backward",ignoreElementEnd:!0});for(const o of n){const n=o.item;let i;if(n.is("element")&&e.isSimilar(n))i=ji._createOn(n);else if(!o.nextPosition.isAfter(t.start)&&n.is("$textProxy")){const t=n.getAncestors().find((t=>t.is("element")&&e.isSimilar(t)));t&&(i=ji._createIn(t))}i&&(i.end.isAfter(t.end)&&(i.end=t.end),i.start.isBefore(t.start)&&(i.start=t.start),this.remove(i))}}move(t,e){let n;if(e.isAfter(t.end)){const o=(e=this._breakAttributes(e,!0)).parent,i=o.childCount;t=this._breakAttributesRange(t,!0),n=this.remove(t),e.offset+=o.childCount-i}else n=this.remove(t);return this.insert(e,n)}wrap(t,e){if(!(e instanceof or))throw new l("view-writer-wrap-invalid-attribute",this.document);if(Vr(t,this.document),t.isCollapsed){let o=t.start;o.parent.is("element")&&(n=o.parent,!Array.from(n.getChildren()).some((t=>!t.is("uiElement"))))&&(o=o.getLastMatchingPosition((t=>t.item.is("uiElement")))),o=this._wrapPosition(o,e);const i=this.document.selection;return i.isCollapsed&&i.getFirstPosition().isEqual(t.start)&&this.setSelection(o),new ji(o)}return this._wrapRange(t,e);var n}unwrap(t,e){if(!(e instanceof or))throw new l("view-writer-unwrap-invalid-attribute",this.document);if(Vr(t,this.document),t.isCollapsed)return t;const{start:n,end:o}=this._breakAttributesRange(t,!0),i=n.parent,r=this._unwrapChildren(i,n.offset,o.offset,e),s=this.mergeAttributes(r.start);s.isEqual(r.start)||r.end.offset--;const a=this.mergeAttributes(r.end);return new ji(s,a)}rename(t,e){const n=new Oi(this.document,t,e.getAttributes());return this.insert(Wi._createAfter(e),n),this.move(ji._createIn(e),Wi._createAt(n,0)),this.remove(ji._createOn(e)),n}clearClonedElementsGroup(t){this._cloneGroups.delete(t)}createPositionAt(t,e){return Wi._createAt(t,e)}createPositionAfter(t){return Wi._createAfter(t)}createPositionBefore(t){return Wi._createBefore(t)}createRange(...t){return new ji(...t)}createRangeOn(t){return ji._createOn(t)}createRangeIn(t){return ji._createIn(t)}createSelection(...t){return new Gi(...t)}createSlot(t){if(!this._slotFactory)throw new l("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,t)}_registerSlotFactory(t){this._slotFactory=t}_clearSlotFactory(){this._slotFactory=null}_insertNodes(t,e,n){let o,i;if(o=n?Tr(t):t.parent.is("$text")?t.parent.parent:t.parent,!o)throw new l("view-writer-invalid-position-container",this.document);i=n?this._breakAttributes(t,!0):t.parent.is("$text")?Br(t):t;const r=o._insertChild(i.offset,e);for(const t of e)this._addToClonedElementsGroup(t);const s=i.getShiftedBy(r),a=this.mergeAttributes(i);a.isEqual(i)||s.offset--;const c=this.mergeAttributes(s);return new ji(a,c)}_wrapChildren(t,e,n,o){let i=e;const r=[];for(;i<n;){const e=t.getChild(i),n=e.is("$text"),s=e.is("attributeElement");if(s&&this._wrapAttributeElement(o,e))r.push(new Wi(t,i));else if(n||!s||Dr(o,e)){const n=o._clone();e._remove(),n._appendChild(e),t._insertChild(i,n),this._addToClonedElementsGroup(n),r.push(new Wi(t,i))}else this._wrapChildren(e,0,e.childCount,o);i++}let s=0;for(const t of r){if(t.offset-=s,t.offset==e)continue;this.mergeAttributes(t).isEqual(t)||(s++,n--)}return ji._createFromParentsAndOffsets(t,e,t,n)}_unwrapChildren(t,e,n,o){let i=e;const r=[];for(;i<n;){const e=t.getChild(i);if(e.is("attributeElement"))if(e.isSimilar(o)){const o=e.getChildren(),s=e.childCount;e._remove(),t._insertChild(i,o),this._removeFromClonedElementsGroup(e),r.push(new Wi(t,i),new Wi(t,i+s)),i+=s,n+=s-1}else this._unwrapAttributeElement(o,e)?(r.push(new Wi(t,i),new Wi(t,i+1)),i++):(this._unwrapChildren(e,0,e.childCount,o),i++);else i++}let s=0;for(const t of r){if(t.offset-=s,t.offset==e||t.offset==n)continue;this.mergeAttributes(t).isEqual(t)||(s++,n--)}return ji._createFromParentsAndOffsets(t,e,t,n)}_wrapRange(t,e){const{start:n,end:o}=this._breakAttributesRange(t,!0),i=n.parent,r=this._wrapChildren(i,n.offset,o.offset,e),s=this.mergeAttributes(r.start);s.isEqual(r.start)||r.end.offset--;const a=this.mergeAttributes(r.end);return new ji(s,a)}_wrapPosition(t,e){if(e.isSimilar(t.parent))return Sr(t.clone());t.parent.is("$text")&&(t=Br(t));const n=this.createAttributeElement("_wrapPosition-fake-element");n._priority=Number.POSITIVE_INFINITY,n.isSimilar=()=>!1,t.parent._insertChild(t.offset,n);const o=new ji(t,t.getShiftedBy(1));this.wrap(o,e);const i=new Wi(n.parent,n.index);n._remove();const r=i.nodeBefore,s=i.nodeAfter;return r instanceof Ro&&s instanceof Ro?Ir(r,s):Sr(i)}_wrapAttributeElement(t,e){if(!Fr(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const n of t.getAttributeKeys())if("class"!==n&&"style"!==n&&e.hasAttribute(n)&&e.getAttribute(n)!==t.getAttribute(n))return!1;for(const n of t.getStyleNames())if(e.hasStyle(n)&&e.getStyle(n)!==t.getStyle(n))return!1;for(const n of t.getAttributeKeys())"class"!==n&&"style"!==n&&(e.hasAttribute(n)||this.setAttribute(n,t.getAttribute(n),e));for(const n of t.getStyleNames())e.hasStyle(n)||this.setStyle(n,t.getStyle(n),e);for(const n of t.getClassNames())e.hasClass(n)||this.addClass(n,e);return!0}_unwrapAttributeElement(t,e){if(!Fr(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const n of t.getAttributeKeys())if("class"!==n&&"style"!==n&&(!e.hasAttribute(n)||e.getAttribute(n)!==t.getAttribute(n)))return!1;if(!e.hasClass(...t.getClassNames()))return!1;for(const n of t.getStyleNames())if(!e.hasStyle(n)||e.getStyle(n)!==t.getStyle(n))return!1;for(const n of t.getAttributeKeys())"class"!==n&&"style"!==n&&this.removeAttribute(n,e);return this.removeClass(Array.from(t.getClassNames()),e),this.removeStyle(Array.from(t.getStyleNames()),e),!0}_breakAttributesRange(t,e=!1){const n=t.start,o=t.end;if(Vr(t,this.document),t.isCollapsed){const n=this._breakAttributes(t.start,e);return new ji(n,n)}const i=this._breakAttributes(o,e),r=i.parent.childCount,s=this._breakAttributes(n,e);return i.offset+=i.parent.childCount-r,new ji(s,i)}_breakAttributes(t,e=!1){const n=t.offset,o=t.parent;if(t.parent.is("emptyElement"))throw new l("view-writer-cannot-break-empty-element",this.document);if(t.parent.is("uiElement"))throw new l("view-writer-cannot-break-ui-element",this.document);if(t.parent.is("rawElement"))throw new l("view-writer-cannot-break-raw-element",this.document);if(!e&&o.is("$text")&&zr(o.parent))return t.clone();if(zr(o))return t.clone();if(o.is("$text"))return this._breakAttributes(Br(t),e);if(n==o.childCount){const t=new Wi(o.parent,o.index+1);return this._breakAttributes(t,e)}if(0===n){const t=new Wi(o.parent,o.index);return this._breakAttributes(t,e)}{const t=o.index+1,i=o._clone();o.parent._insertChild(t,i),this._addToClonedElementsGroup(i);const r=o.childCount-n,s=o._removeChildren(n,r);i._appendChild(s);const a=new Wi(o.parent,t);return this._breakAttributes(a,e)}}_addToClonedElementsGroup(t){if(!t.root.is("rootElement"))return;if(t.is("element"))for(const e of t.getChildren())this._addToClonedElementsGroup(e);const e=t.id;if(!e)return;let n=this._cloneGroups.get(e);n||(n=new Set,this._cloneGroups.set(e,n)),n.add(t),t._clonesGroup=n}_removeFromClonedElementsGroup(t){if(t.is("element"))for(const e of t.getChildren())this._removeFromClonedElementsGroup(e);const e=t.id;if(!e)return;const n=this._cloneGroups.get(e);n&&n.delete(t)}}function Tr(t){let e=t.parent;for(;!zr(e);){if(!e)return;e=e.parent}return e}function Dr(t,e){return t.priority<e.priority||!(t.priority>e.priority)&&t.getIdentity()<e.getIdentity()}function Sr(t){const e=t.nodeBefore;if(e&&e.is("$text"))return new Wi(e,e.data.length);const n=t.nodeAfter;return n&&n.is("$text")?new Wi(n,0):t}function Br(t){if(t.offset==t.parent.data.length)return new Wi(t.parent.parent,t.parent.index+1);if(0===t.offset)return new Wi(t.parent.parent,t.parent.index);const e=t.parent.data.slice(t.offset);return t.parent._data=t.parent.data.slice(0,t.offset),t.parent.parent._insertChild(t.parent.index+1,new Ro(t.root.document,e)),new Wi(t.parent.parent,t.parent.index+1)}function Ir(t,e){const n=t.data.length;return t._data+=e.data,e._remove(),new Wi(t,n)}const Pr=[Ro,or,Oi,sr,vr,_r];function Rr(t,e){for(const n of t){if(!Pr.some((t=>n instanceof t)))throw new l("view-writer-insert-invalid-node-type",e);n.is("$text")||Rr(n.getChildren(),e)}}function zr(t){return t&&(t.is("containerElement")||t.is("documentFragment"))}function Vr(t,e){const n=Tr(t.start),o=Tr(t.end);if(!n||!o||n!==o)throw new l("view-writer-invalid-range-container",e)}function Fr(t,e){return null===t.id&&null===e.id}function Or(t){return"[object Text]"==Object.prototype.toString.call(t)}const Nr=t=>t.createTextNode(" "),Mr=t=>{const e=t.createElement("span");return e.dataset.ckeFiller="true",e.innerText=" ",e},Lr=t=>{const e=t.createElement("br");return e.dataset.ckeFiller="true",e},Hr="⁠".repeat(7);function qr(t){return Or(t)&&t.data.substr(0,7)===Hr}function Wr(t){return 7==t.data.length&&qr(t)}function jr(t){return qr(t)?t.data.slice(7):t.data}function Ur(t,e){if(e.keyCode==mr.arrowleft){const t=e.domTarget.ownerDocument.defaultView.getSelection();if(1==t.rangeCount&&t.getRangeAt(0).collapsed){const e=t.getRangeAt(0).startContainer,n=t.getRangeAt(0).startOffset;qr(e)&&n<=7&&t.collapse(e,0)}}}function $r(t,e,n,o=!1){n=n||function(t,e){return t===e};const i=Array.isArray(t)?t:Array.prototype.slice.call(t),r=Array.isArray(e)?e:Array.prototype.slice.call(e),s=function(t,e,n){const o=Gr(t,e,n);if(-1===o)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const i=Kr(t,o),r=Kr(e,o),s=Gr(i,r,n),a=t.length-s,l=e.length-s;return{firstIndex:o,lastIndexOld:a,lastIndexNew:l}}(i,r,n);return o?function(t,e){const{firstIndex:n,lastIndexOld:o,lastIndexNew:i}=t;if(-1===n)return Array(e).fill("equal");let r=[];n>0&&(r=r.concat(Array(n).fill("equal")));i-n>0&&(r=r.concat(Array(i-n).fill("insert")));o-n>0&&(r=r.concat(Array(o-n).fill("delete")));i<e&&(r=r.concat(Array(e-i).fill("equal")));return r}(s,r.length):function(t,e){const n=[],{firstIndex:o,lastIndexOld:i,lastIndexNew:r}=e;r-o>0&&n.push({index:o,type:"insert",values:t.slice(o,r)});i-o>0&&n.push({index:o+(r-o),type:"delete",howMany:i-o});return n}(r,s)}function Gr(t,e,n){for(let o=0;o<Math.max(t.length,e.length);o++)if(void 0===t[o]||void 0===e[o]||!n(t[o],e[o]))return o;return-1}function Kr(t,e){return t.slice(e).reverse()}function Zr(t,e,n){n=n||function(t,e){return t===e};const o=t.length,i=e.length;if(o>200||i>200||o+i>300)return Zr.fastDiff(t,e,n,!0);let r,s;if(i<o){const n=t;t=e,e=n,r="delete",s="insert"}else r="insert",s="delete";const a=t.length,l=e.length,c=l-a,d={},h={};function u(o){const i=(void 0!==h[o-1]?h[o-1]:-1)+1,c=void 0!==h[o+1]?h[o+1]:-1,u=i>c?-1:1;d[o+u]&&(d[o]=d[o+u].slice(0)),d[o]||(d[o]=[]),d[o].push(i>c?r:s);let g=Math.max(i,c),m=g-o;for(;m<a&&g<l&&n(t[m],e[g]);)m++,g++,d[o].push("equal");return g}let g,m=0;do{for(g=-m;g<c;g++)h[g]=u(g);for(g=c+m;g>c;g--)h[g]=u(g);h[c]=u(c),m++}while(h[c]!==l);return d[c].slice(1)}function Jr(t,e,n){t.insertBefore(n,t.childNodes[e]||null)}function Yr(t){const e=t.parentNode;e&&e.removeChild(t)}function Qr(t){return t&&t.nodeType===Node.COMMENT_NODE}function Xr(t){if(t){if(t.defaultView)return t instanceof t.defaultView.Document;if(t.ownerDocument&&t.ownerDocument.defaultView)return t instanceof t.ownerDocument.defaultView.Node}return!1}Zr.fastDiff=$r;var ts=n(6062),es=n.n(ts),ns=n(9315),os={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(ns.Z,os);ns.Z.locals;class is extends R{constructor(t,e){super(),this.domDocuments=new Set,this.domConverter=t,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=e,this.set("isFocused",!1),this.set("isSelecting",!1),dr.isBlink&&!dr.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this._inlineFiller=null,this._fakeSelectionContainer=null}markToSync(t,e){if("text"===t)this.domConverter.mapViewToDom(e.parent)&&this.markedTexts.add(e);else{if(!this.domConverter.mapViewToDom(e))return;if("attributes"===t)this.markedAttributes.add(e);else{if("children"!==t)throw new l("view-renderer-unknown-type",this);this.markedChildren.add(e)}}}render(){let t=null;const e=!(dr.isBlink&&!dr.isAndroid)||!this.isSelecting;for(const t of this.markedChildren)this._updateChildrenMappings(t);e?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?t=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(t=this.selection.getFirstPosition(),this.markedChildren.add(t.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(t=this.domConverter.domPositionToView(this._inlineFiller),t&&t.parent.is("$text")&&(t=Wi._createBefore(t.parent)));for(const t of this.markedAttributes)this._updateAttrs(t);for(const e of this.markedChildren)this._updateChildren(e,{inlineFillerPosition:t});for(const e of this.markedTexts)!this.markedChildren.has(e.parent)&&this.domConverter.mapViewToDom(e.parent)&&this._updateText(e,{inlineFillerPosition:t});if(e)if(t){const e=this.domConverter.viewPositionToDom(t),n=e.parent.ownerDocument;qr(e.parent)?this._inlineFiller=e.parent:this._inlineFiller=rs(n,e.parent,e.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(t){if(!this.domConverter.mapViewToDom(t))return;const e=Array.from(this.domConverter.mapViewToDom(t).childNodes),n=Array.from(this.domConverter.viewChildrenToDom(t,{withChildren:!1})),o=this._diffNodeLists(e,n),i=this._findReplaceActions(o,e,n);if(-1!==i.indexOf("replace")){const o={equal:0,insert:0,delete:0};for(const r of i)if("replace"===r){const i=o.equal+o.insert,r=o.equal+o.delete,s=t.getChild(i);!s||s.is("uiElement")||s.is("rawElement")||this._updateElementMappings(s,e[r]),Yr(n[i]),o.equal++}else o[r]++}}_updateElementMappings(t,e){this.domConverter.unbindDomElement(e),this.domConverter.bindElements(e,t),this.markedChildren.add(t),this.markedAttributes.add(t)}_getInlineFillerPosition(){const t=this.selection.getFirstPosition();return t.parent.is("$text")?Wi._createBefore(t.parent):t}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=this.domConverter.viewPositionToDom(t);return!!(e&&Or(e.parent)&&qr(e.parent))}_removeInlineFiller(){const t=this._inlineFiller;if(!qr(t))throw new l("view-renderer-filler-was-lost",this);Wr(t)?t.remove():t.data=t.data.substr(7),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=t.parent,n=t.offset;if(!this.domConverter.mapViewToDom(e.root))return!1;if(!e.is("element"))return!1;if(!function(t){if("false"==t.getAttribute("contenteditable"))return!1;const e=t.findAncestor((t=>t.hasAttribute("contenteditable")));return!e||"true"==e.getAttribute("contenteditable")}(e))return!1;if(n===e.getFillerOffset())return!1;const o=t.nodeBefore,i=t.nodeAfter;return!(o instanceof Ro||i instanceof Ro)}_updateText(t,e){const n=this.domConverter.findCorrespondingDomText(t),o=this.domConverter.viewToDom(t),i=n.data;let r=o.data;const s=e.inlineFillerPosition;if(s&&s.parent==t.parent&&s.offset==t.index&&(r=Hr+r),i!=r){const t=$r(i,r);for(const e of t)"insert"===e.type?n.insertData(e.index,e.values.join("")):n.deleteData(e.index,e.howMany)}}_updateAttrs(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const n=Array.from(e.attributes).map((t=>t.name)),o=t.getAttributeKeys();for(const n of o)this.domConverter.setDomElementAttribute(e,n,t.getAttribute(n),t);for(const o of n)t.hasAttribute(o)||this.domConverter.removeDomElementAttribute(e,o)}_updateChildren(t,e){const n=this.domConverter.mapViewToDom(t);if(!n)return;const o=e.inlineFillerPosition,i=this.domConverter.mapViewToDom(t).childNodes,r=Array.from(this.domConverter.viewChildrenToDom(t,{bind:!0}));o&&o.parent===t&&rs(n.ownerDocument,r,o.offset);const s=this._diffNodeLists(i,r);let a=0;const l=new Set;for(const t of s)"delete"===t?(l.add(i[a]),Yr(i[a])):"equal"===t&&a++;a=0;for(const t of s)"insert"===t?(Jr(n,a,r[a]),a++):"equal"===t&&(this._markDescendantTextToSync(this.domConverter.domToView(r[a])),a++);for(const t of l)t.parentNode||this.domConverter.unbindDomElement(t)}_diffNodeLists(t,e){return Zr(t=function(t,e){const n=Array.from(t);if(0==n.length||!e)return n;n[n.length-1]==e&&n.pop();return n}(t,this._fakeSelectionContainer),e,as.bind(null,this.domConverter))}_findReplaceActions(t,e,n){if(-1===t.indexOf("insert")||-1===t.indexOf("delete"))return t;let o=[],i=[],r=[];const s={equal:0,insert:0,delete:0};for(const a of t)"insert"===a?r.push(n[s.equal+s.insert]):"delete"===a?i.push(e[s.equal+s.delete]):(o=o.concat(Zr(i,r,ss).map((t=>"equal"===t?"replace":t))),o.push("equal"),i=[],r=[]),s[a]++;return o.concat(Zr(i,r,ss).map((t=>"equal"===t?"replace":t)))}_markDescendantTextToSync(t){if(t)if(t.is("$text"))this.markedTexts.add(t);else if(t.is("element"))for(const e of t.getChildren())this._markDescendantTextToSync(e)}_updateSelection(){if(dr.isBlink&&!dr.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const t=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&t&&(this.selection.isFake?this._updateFakeSelection(t):(this._removeFakeSelection(),this._updateDomSelection(t)))}_updateFakeSelection(t){const e=t.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(t){const e=t.createElement("div");return e.className="ck-fake-selection-container",Object.assign(e.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),e.textContent=" ",e}(e));const n=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(n,this.selection),!this._fakeSelectionNeedsUpdate(t))return;n.parentElement&&n.parentElement==t||t.appendChild(n),n.textContent=this.selection.fakeSelectionLabel||" ";const o=e.getSelection(),i=e.createRange();o.removeAllRanges(),i.selectNodeContents(n),o.addRange(i)}_updateDomSelection(t){const e=t.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(e))return;const n=this.domConverter.viewPositionToDom(this.selection.anchor),o=this.domConverter.viewPositionToDom(this.selection.focus);e.collapse(n.parent,n.offset),e.extend(o.parent,o.offset),dr.isGecko&&function(t,e){const n=t.parent;if(n.nodeType!=Node.ELEMENT_NODE||t.offset!=n.childNodes.length-1)return;const o=n.childNodes[t.offset];o&&"BR"==o.tagName&&e.addRange(e.getRangeAt(0))}(o,e)}_domSelectionNeedsUpdate(t){if(!this.domConverter.isDomSelectionCorrect(t))return!0;const e=t&&this.domConverter.domSelectionToView(t);return(!e||!this.selection.isEqual(e))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(e))}_fakeSelectionNeedsUpdate(t){const e=this._fakeSelectionContainer,n=t.ownerDocument.getSelection();return!e||e.parentElement!==t||(n.anchorNode!==e&&!e.contains(n.anchorNode)||e.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const t of this.domDocuments){const e=t.getSelection();if(e.rangeCount){const n=t.activeElement,o=this.domConverter.mapDomToView(n);n&&o&&e.removeAllRanges()}}}_removeFakeSelection(){const t=this._fakeSelectionContainer;t&&t.remove()}_updateFocus(){if(this.isFocused){const t=this.selection.editableElement;t&&this.domConverter.focus(t)}}}function rs(t,e,n){const o=e instanceof Array?e:e.childNodes,i=o[n];if(Or(i))return i.data=Hr+i.data,i;{const i=t.createTextNode(Hr);return Array.isArray(e)?o.splice(n,0,i):Jr(e,n,i),i}}function ss(t,e){return Xr(t)&&Xr(e)&&!Or(t)&&!Or(e)&&!Qr(t)&&!Qr(e)&&t.tagName.toLowerCase()===e.tagName.toLowerCase()}function as(t,e,n){return e===n||(Or(e)&&Or(n)?e.data===n.data:!(!t.isBlockFiller(e)||!t.isBlockFiller(n)))}function ls(t){let e=0;for(;t.previousSibling;)t=t.previousSibling,e++;return e}function cs(t){const e=[];let n=t;for(;n&&n.nodeType!=Node.DOCUMENT_NODE;)e.unshift(n),n=n.parentNode;return e}const ds=Lr(Co.document),hs=Nr(Co.document),us=Mr(Co.document),gs="data-ck-unsafe-attribute-",ms="data-ck-unsafe-element";class ps{constructor(t,e={}){this.document=t,this.renderingMode=e.renderingMode||"editing",this.blockFillerMode=e.blockFillerMode||("editing"===this.renderingMode?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?Co.document:Co.document.implementation.createHTMLDocument(""),this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new Fo,this._encounteredRawContentDomNodes=new WeakSet}bindFakeSelection(t,e){this._fakeSelectionMapping.set(t,new Gi(e))}fakeSelectionToView(t){return this._fakeSelectionMapping.get(t)}bindElements(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}unbindDomElement(t){const e=this._domToViewMapping.get(t);if(e){this._domToViewMapping.delete(t),this._viewToDomMapping.delete(e);for(const e of Array.from(t.children))this.unbindDomElement(e)}}bindDocumentFragments(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}shouldRenderAttribute(t,e,n){return"data"===this.renderingMode||!(t=t.toLowerCase()).startsWith("on")&&(("srcdoc"!==t||!e.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===n&&("src"===t||"srcset"===t)||("source"===n&&"srcset"===t||!e.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))))}setContentOf(t,e){if("data"===this.renderingMode)return void(t.innerHTML=e);const n=(new DOMParser).parseFromString(e,"text/html"),o=n.createDocumentFragment(),i=n.body.childNodes;for(;i.length>0;)o.appendChild(i[0]);const r=n.createTreeWalker(o,NodeFilter.SHOW_ELEMENT),s=[];let a;for(;a=r.nextNode();)s.push(a);for(const t of s){for(const e of t.getAttributeNames())this.setDomElementAttribute(t,e,t.getAttribute(e));const e=t.tagName.toLowerCase();this._shouldRenameElement(e)&&(ks(e),t.replaceWith(this._createReplacementDomElement(e,t)))}for(;t.firstChild;)t.firstChild.remove();t.append(o)}viewToDom(t,e={}){if(t.is("$text")){const e=this._processDataFromViewText(t);return this._domDocument.createTextNode(e)}{if(this.mapViewToDom(t))return this.mapViewToDom(t);let n;if(t.is("documentFragment"))n=this._domDocument.createDocumentFragment(),e.bind&&this.bindDocumentFragments(n,t);else{if(t.is("uiElement"))return n="$comment"===t.name?this._domDocument.createComment(t.getCustomProperty("$rawContent")):t.render(this._domDocument,this),e.bind&&this.bindElements(n,t),n;this._shouldRenameElement(t.name)?(ks(t.name),n=this._createReplacementDomElement(t.name)):n=t.hasAttribute("xmlns")?this._domDocument.createElementNS(t.getAttribute("xmlns"),t.name):this._domDocument.createElement(t.name),t.is("rawElement")&&t.render(n,this),e.bind&&this.bindElements(n,t);for(const e of t.getAttributeKeys())this.setDomElementAttribute(n,e,t.getAttribute(e),t)}if(!1!==e.withChildren)for(const o of this.viewChildrenToDom(t,e))n.appendChild(o);return n}}setDomElementAttribute(t,e,n,o){const i=this.shouldRenderAttribute(e,n,t.tagName.toLowerCase())||o&&o.shouldRenderUnsafeAttribute(e);i||c("domconverter-unsafe-attribute-detected",{domElement:t,key:e,value:n}),t.hasAttribute(e)&&!i?t.removeAttribute(e):t.hasAttribute(gs+e)&&i&&t.removeAttribute(gs+e),t.setAttribute(i?e:gs+e,n)}removeDomElementAttribute(t,e){e!=ms&&(t.removeAttribute(e),t.removeAttribute(gs+e))}*viewChildrenToDom(t,e={}){const n=t.getFillerOffset&&t.getFillerOffset();let o=0;for(const i of t.getChildren()){n===o&&(yield this._getBlockFiller());const t=i.is("element")&&i.getCustomProperty("dataPipeline:transparentRendering");t&&"data"==this.renderingMode?yield*this.viewChildrenToDom(i,e):(t&&c("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:i}),yield this.viewToDom(i,e)),o++}n===o&&(yield this._getBlockFiller())}viewRangeToDom(t){const e=this.viewPositionToDom(t.start),n=this.viewPositionToDom(t.end),o=this._domDocument.createRange();return o.setStart(e.parent,e.offset),o.setEnd(n.parent,n.offset),o}viewPositionToDom(t){const e=t.parent;if(e.is("$text")){const n=this.findCorrespondingDomText(e);if(!n)return null;let o=t.offset;return qr(n)&&(o+=7),{parent:n,offset:o}}{let n,o,i;if(0===t.offset){if(n=this.mapViewToDom(e),!n)return null;i=n.childNodes[0]}else{const e=t.nodeBefore;if(o=e.is("$text")?this.findCorrespondingDomText(e):this.mapViewToDom(e),!o)return null;n=o.parentNode,i=o.nextSibling}if(Or(i)&&qr(i))return{parent:i,offset:7};return{parent:n,offset:o?ls(o)+1:0}}}domToView(t,e={}){if(this.isBlockFiller(t))return null;const n=this.getHostViewElement(t);if(n)return n;if(Qr(t)&&e.skipComments)return null;if(Or(t)){if(Wr(t))return null;{const e=this._processDataFromDomText(t);return""===e?null:new Ro(this.document,e)}}{if(this.mapDomToView(t))return this.mapDomToView(t);let n;if(this.isDocumentFragment(t))n=new xr(this.document),e.bind&&this.bindDocumentFragments(t,n);else{n=this._createViewElement(t,e),e.bind&&this.bindElements(t,n);const o=t.attributes;if(o)for(let t=o.length,e=0;e<t;e++)n._setAttribute(o[e].name,o[e].value);if(this._isViewElementWithRawContent(n,e)||Qr(t)){const e=Qr(t)?t.data:t.innerHTML;return n._setCustomProperty("$rawContent",e),this._encounteredRawContentDomNodes.add(t),n}}if(!1!==e.withChildren)for(const o of this.domChildrenToView(t,e))n._appendChild(o);return n}}*domChildrenToView(t,e){for(let n=0;n<t.childNodes.length;n++){const o=t.childNodes[n],i=this.domToView(o,e);null!==i&&(yield i)}}domSelectionToView(t){if(1===t.rangeCount){let e=t.getRangeAt(0).startContainer;Or(e)&&(e=e.parentNode);const n=this.fakeSelectionToView(e);if(n)return n}const e=this.isDomSelectionBackward(t),n=[];for(let e=0;e<t.rangeCount;e++){const o=t.getRangeAt(e),i=this.domRangeToView(o);i&&n.push(i)}return new Gi(n,{backward:e})}domRangeToView(t){const e=this.domPositionToView(t.startContainer,t.startOffset),n=this.domPositionToView(t.endContainer,t.endOffset);return e&&n?new ji(e,n):null}domPositionToView(t,e=0){if(this.isBlockFiller(t))return this.domPositionToView(t.parentNode,ls(t));const n=this.mapDomToView(t);if(n&&(n.is("uiElement")||n.is("rawElement")))return Wi._createBefore(n);if(Or(t)){if(Wr(t))return this.domPositionToView(t.parentNode,ls(t));const n=this.findCorrespondingViewText(t);let o=e;return n?(qr(t)&&(o-=7,o=o<0?0:o),new Wi(n,o)):null}if(0===e){const e=this.mapDomToView(t);if(e)return new Wi(e,0)}else{const n=t.childNodes[e-1],o=Or(n)?this.findCorrespondingViewText(n):this.mapDomToView(n);if(o&&o.parent)return new Wi(o.parent,o.index+1)}return null}mapDomToView(t){return this.getHostViewElement(t)||this._domToViewMapping.get(t)}findCorrespondingViewText(t){if(Wr(t))return null;const e=this.getHostViewElement(t);if(e)return e;const n=t.previousSibling;if(n){if(!this.isElement(n))return null;const t=this.mapDomToView(n);if(t){const e=t.nextSibling;return e instanceof Ro?e:null}}else{const e=this.mapDomToView(t.parentNode);if(e){const t=e.getChild(0);return t instanceof Ro?t:null}}return null}mapViewToDom(t){return this._viewToDomMapping.get(t)}findCorrespondingDomText(t){const e=t.previousSibling;return e&&this.mapViewToDom(e)?this.mapViewToDom(e).nextSibling:!e&&t.parent&&this.mapViewToDom(t.parent)?this.mapViewToDom(t.parent).childNodes[0]:null}focus(t){const e=this.mapViewToDom(t);if(e&&e.ownerDocument.activeElement!==e){const{scrollX:t,scrollY:n}=Co.window,o=[];fs(e,(t=>{const{scrollLeft:e,scrollTop:n}=t;o.push([e,n])})),e.focus(),fs(e,(t=>{const[e,n]=o.shift();t.scrollLeft=e,t.scrollTop=n})),Co.window.scrollTo(t,n)}}isElement(t){return t&&t.nodeType==Node.ELEMENT_NODE}isDocumentFragment(t){return t&&t.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(t){return"br"==this.blockFillerMode?t.isEqualNode(ds):!("BR"!==t.tagName||!bs(t,this.blockElements)||1!==t.parentNode.childNodes.length)||(t.isEqualNode(us)||function(t,e){return t.isEqualNode(hs)&&bs(t,e)&&1===t.parentNode.childNodes.length}(t,this.blockElements))}isDomSelectionBackward(t){if(t.isCollapsed)return!1;const e=this._domDocument.createRange();e.setStart(t.anchorNode,t.anchorOffset),e.setEnd(t.focusNode,t.focusOffset);const n=e.collapsed;return e.detach(),n}getHostViewElement(t){const e=cs(t);for(e.pop();e.length;){const t=e.pop(),n=this._domToViewMapping.get(t);if(n&&(n.is("uiElement")||n.is("rawElement")))return n}return null}isDomSelectionCorrect(t){return this._isDomSelectionPositionCorrect(t.anchorNode,t.anchorOffset)&&this._isDomSelectionPositionCorrect(t.focusNode,t.focusOffset)}registerRawContentMatcher(t){this._rawContentElementMatcher.add(t)}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return Nr(this._domDocument);case"markedNbsp":return Mr(this._domDocument);case"br":return Lr(this._domDocument)}}_isDomSelectionPositionCorrect(t,e){if(Or(t)&&qr(t)&&e<7)return!1;if(this.isElement(t)&&qr(t.childNodes[e]))return!1;const n=this.mapDomToView(t);return!n||!n.is("uiElement")&&!n.is("rawElement")}_processDataFromViewText(t){let e=t.data;if(t.getAncestors().some((t=>this.preElements.includes(t.name))))return e;if(" "==e.charAt(0)){const n=this._getTouchingInlineViewNode(t,!1);!(n&&n.is("$textProxy")&&this._nodeEndsWithSpace(n))&&n||(e=" "+e.substr(1))}if(" "==e.charAt(e.length-1)){const n=this._getTouchingInlineViewNode(t,!0),o=n&&n.is("$textProxy")&&" "==n.data.charAt(0);" "!=e.charAt(e.length-2)&&n&&!o||(e=e.substr(0,e.length-1)+" ")}return e.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(t){if(t.getAncestors().some((t=>this.preElements.includes(t.name))))return!1;const e=this._processDataFromViewText(t);return" "==e.charAt(e.length-1)}_processDataFromDomText(t){let e=t.data;if(function(t,e){return cs(t).some((t=>t.tagName&&e.includes(t.tagName.toLowerCase())))}(t,this.preElements))return jr(t);e=e.replace(/[ \n\t\r]{1,}/g," ");const n=this._getTouchingInlineDomNode(t,!1),o=this._getTouchingInlineDomNode(t,!0),i=this._checkShouldLeftTrimDomText(t,n),r=this._checkShouldRightTrimDomText(t,o);i&&(e=e.replace(/^ /,"")),r&&(e=e.replace(/ $/,"")),e=jr(new Text(e)),e=e.replace(/ \u00A0/g," ");const s=o&&this.isElement(o)&&"BR"!=o.tagName,a=o&&Or(o)&&" "==o.data.charAt(0);return(/( |\u00A0)\u00A0$/.test(e)||!o||s||a)&&(e=e.replace(/\u00A0$/," ")),(i||n&&this.isElement(n)&&"BR"!=n.tagName)&&(e=e.replace(/^\u00A0/," ")),e}_checkShouldLeftTrimDomText(t,e){return!e||(this.isElement(e)?"BR"===e.tagName:!this._encounteredRawContentDomNodes.has(t.previousSibling)&&/[^\S\u00A0]/.test(e.data.charAt(e.data.length-1)))}_checkShouldRightTrimDomText(t,e){return!e&&!qr(t)}_getTouchingInlineViewNode(t,e){const n=new qi({startPosition:e?Wi._createAfter(t):Wi._createBefore(t),direction:e?"forward":"backward"});for(const t of n){if(t.item.is("element")&&this.inlineObjectElements.includes(t.item.name))return t.item;if(t.item.is("containerElement"))return null;if(t.item.is("element","br"))return null;if(t.item.is("$textProxy"))return t.item}return null}_getTouchingInlineDomNode(t,e){if(!t.parentNode)return null;const n=e?"firstChild":"lastChild",o=e?"nextSibling":"previousSibling";let i=!0,r=t;do{if(!i&&r[n]?r=r[n]:r[o]?(r=r[o],i=!1):(r=r.parentNode,i=!0),!r||this._isBlockElement(r))return null}while(!Or(r)&&"BR"!=r.tagName&&!this._isInlineObjectElement(r));return r}_isBlockElement(t){return this.isElement(t)&&this.blockElements.includes(t.tagName.toLowerCase())}_isInlineObjectElement(t){return this.isElement(t)&&this.inlineObjectElements.includes(t.tagName.toLowerCase())}_createViewElement(t,e){if(Qr(t))return new _r(this.document,"$comment");const n=e.keepOriginalCase?t.tagName:t.tagName.toLowerCase();return new Vi(this.document,n)}_isViewElementWithRawContent(t,e){return!1!==e.withChildren&&!!this._rawContentElementMatcher.match(t)}_shouldRenameElement(t){const e=t.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(e)}_createReplacementDomElement(t,e){const n=this._domDocument.createElement("span");if(n.setAttribute(ms,t),e){for(;e.firstChild;)n.appendChild(e.firstChild);for(const t of e.getAttributeNames())n.setAttribute(t,e.getAttribute(t))}return n}}function fs(t,e){let n=t;for(;n;)e(n),n=n.parentElement}function bs(t,e){const n=t.parentNode;return!!n&&!!n.tagName&&e.includes(n.tagName.toLowerCase())}function ks(t){"script"===t&&c("domconverter-unsafe-script-element-detected"),"style"===t&&c("domconverter-unsafe-style-element-detected")}function ws(t){const e=Object.prototype.toString.apply(t);return"[object Window]"==e||"[object global]"==e}function _s(t){return class extends t{listenTo(t,e,n,o={}){if(Xr(t)||ws(t)){const i={capture:!!o.useCapture,passive:!!o.usePassive},r=this._getProxyEmitter(t,i)||new Cs(t,i);this.listenTo(r,e,n,o)}else k.prototype.listenTo.call(this,t,e,n,o)}stopListening(t,e,n){if(Xr(t)||ws(t)){const o=this._getAllProxyEmitters(t);for(const t of o)this.stopListening(t,e,n)}else k.prototype.stopListening.call(this,t,e,n)}_getProxyEmitter(t,e){return function(t,e){const n=t[m];return n&&n[e]?n[e].emitter:null}(this,vs(t,e))}_getAllProxyEmitters(t){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map((e=>this._getProxyEmitter(t,e))).filter((t=>!!t))}}}const As=_s(k);["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((t=>{_s[t]=As.prototype[t]}));class Cs extends k{constructor(t,e){super(),w(this,vs(t,e)),this._domNode=t,this._options=e}attach(t){if(this._domListeners&&this._domListeners[t])return;const e=this._createDomListener(t);this._domNode.addEventListener(t,e,this._options),this._domListeners||(this._domListeners={}),this._domListeners[t]=e}detach(t){let e;!this._domListeners[t]||(e=this._events[t])&&e.callbacks.length||this._domListeners[t].removeListener()}_addEventListener(t,e,n){this.attach(t),k.prototype._addEventListener.call(this,t,e,n)}_removeEventListener(t,e){k.prototype._removeEventListener.call(this,t,e),this.detach(t)}_createDomListener(t){const e=e=>{this.fire(t,e)};return e.removeListener=()=>{this._domNode.removeEventListener(t,e,this._options),delete this._domListeners[t]},e}}function vs(t,e){let n=function(t){return t["data-ck-expando"]||(t["data-ck-expando"]=r())}(t);for(const t of Object.keys(e).sort())e[t]&&(n+="-"+t);return n}class ys extends As{constructor(t){super(),this.view=t,this.document=t.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(t){return t&&3===t.nodeType&&(t=t.parentNode),!(!t||1!==t.nodeType)&&t.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}const xs=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const Es=function(t){return this.__data__.has(t)};function Ts(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new le;++e<n;)this.add(t[e])}Ts.prototype.add=Ts.prototype.push=xs,Ts.prototype.has=Es;const Ds=Ts;const Ss=function(t,e){for(var n=-1,o=null==t?0:t.length;++n<o;)if(e(t[n],n,t))return!0;return!1};const Bs=function(t,e){return t.has(e)};const Is=function(t,e,n,o,i,r){var s=1&n,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=r.get(t),d=r.get(e);if(c&&d)return c==e&&d==t;var h=-1,u=!0,g=2&n?new Ds:void 0;for(r.set(t,e),r.set(e,t);++h<a;){var m=t[h],p=e[h];if(o)var f=s?o(p,m,h,e,t,r):o(m,p,h,t,e,r);if(void 0!==f){if(f)continue;u=!1;break}if(g){if(!Ss(e,(function(t,e){if(!Bs(g,e)&&(m===t||i(m,t,n,o,r)))return g.push(e)}))){u=!1;break}}else if(m!==p&&!i(m,p,n,o,r)){u=!1;break}}return r.delete(t),r.delete(e),u};const Ps=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,o){n[++e]=[o,t]})),n};const Rs=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n};var zs=Z?Z.prototype:void 0,Vs=zs?zs.valueOf:void 0;const Fs=function(t,e,n,o,i,r,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!r(new Hn(t),new Hn(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return pt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=Ps;case"[object Set]":var l=1&o;if(a||(a=Rs),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;o|=2,s.set(t,e);var d=Is(a(t),a(e),o,i,r,s);return s.delete(t),d;case"[object Symbol]":if(Vs)return Vs.call(t)==Vs.call(e)}return!1};var Os=Object.prototype.hasOwnProperty;const Ns=function(t,e,n,o,i,r){var s=1&n,a=An(t),l=a.length;if(l!=An(e).length&&!s)return!1;for(var c=l;c--;){var d=a[c];if(!(s?d in e:Os.call(e,d)))return!1}var h=r.get(t),u=r.get(e);if(h&&u)return h==e&&u==t;var g=!0;r.set(t,e),r.set(e,t);for(var m=s;++c<l;){var p=t[d=a[c]],f=e[d];if(o)var b=s?o(f,p,d,e,t,r):o(p,f,d,t,e,r);if(!(void 0===b?p===f||i(p,f,n,o,r):b)){g=!1;break}m||(m="constructor"==d)}if(g&&!m){var k=t.constructor,w=e.constructor;k==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof k&&k instanceof k&&"function"==typeof w&&w instanceof w||(g=!1)}return r.delete(t),r.delete(e),g};var Ms="[object Arguments]",Ls="[object Array]",Hs="[object Object]",qs=Object.prototype.hasOwnProperty;const Ws=function(t,e,n,o,i,r){var s=xe(t),a=xe(e),l=s?Ls:Nn(t),c=a?Ls:Nn(e),d=(l=l==Ms?Hs:l)==Hs,h=(c=c==Ms?Hs:c)==Hs,u=l==c;if(u&&Be(t)){if(!Be(e))return!1;s=!0,d=!1}if(u&&!d)return r||(r=new he),s||qe(t)?Is(t,e,n,o,i,r):Fs(t,e,l,n,o,i,r);if(!(1&n)){var g=d&&qs.call(t,"__wrapped__"),m=h&&qs.call(e,"__wrapped__");if(g||m){var p=g?t.value():t,f=m?e.value():e;return r||(r=new he),i(p,f,n,o,r)}}return!!u&&(r||(r=new he),Ns(t,e,n,o,i,r))};const js=function t(e,n,o,i,r){return e===n||(null==e||null==n||!at(e)&&!at(n)?e!=e&&n!=n:Ws(e,n,o,i,t,r))};const Us=function(t,e,n){var o=(n="function"==typeof n?n:void 0)?n(t,e):void 0;return void 0===o?js(t,e,void 0,n):!!o};class $s extends ys{constructor(t){super(t),this._config={childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},this.domConverter=t.domConverter,this.renderer=t._renderer,this._domElements=[],this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(t){this._domElements.push(t),this.isEnabled&&this._mutationObserver.observe(t,this._config)}enable(){super.enable();for(const t of this._domElements)this._mutationObserver.observe(t,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(t){if(0===t.length)return;const e=this.domConverter,n=new Map,o=new Set;for(const n of t)if("childList"===n.type){const t=e.mapDomToView(n.target);if(t&&(t.is("uiElement")||t.is("rawElement")))continue;t&&!this._isBogusBrMutation(n)&&o.add(t)}for(const i of t){const t=e.mapDomToView(i.target);if((!t||!t.is("uiElement")&&!t.is("rawElement"))&&"characterData"===i.type){const t=e.findCorrespondingViewText(i.target);t&&!o.has(t.parent)?n.set(t,{type:"text",oldText:t.data,newText:jr(i.target),node:t}):!t&&qr(i.target)&&o.add(e.mapDomToView(i.target.parentNode))}}const i=[];for(const t of n.values())this.renderer.markToSync("text",t.node),i.push(t);for(const t of o){const n=e.mapViewToDom(t),o=Array.from(t.getChildren()),r=Array.from(e.domChildrenToView(n,{withChildren:!1}));Us(o,r,a)||(this.renderer.markToSync("children",t),i.push({type:"children",oldChildren:o,newChildren:r,node:t}))}const r=t[0].target.ownerDocument.getSelection();let s=null;if(r&&r.anchorNode){const t=e.domPositionToView(r.anchorNode,r.anchorOffset),n=e.domPositionToView(r.focusNode,r.focusOffset);t&&n&&(s=new Gi(t),s.setFocus(n))}function a(t,e){if(!Array.isArray(t))return t===e||!(!t.is("$text")||!e.is("$text"))&&t.data===e.data}i.length&&(this.document.fire("mutations",i,s),this.view.forceRender())}_isBogusBrMutation(t){let e=null;return null===t.nextSibling&&0===t.removedNodes.length&&1==t.addedNodes.length&&(e=this.domConverter.domToView(t.addedNodes[0],{withChildren:!1})),e&&e.is("element","br")}}const Gs=Ti((function(t,e){be(e,nn(e),t)}));class Ks{constructor(t,e,n){this.view=t,this.document=t.document,this.domEvent=e,this.domTarget=e.target,Gs(this,n)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Zs extends ys{constructor(t){super(t),this.useCapture=!1}observe(t){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((e=>{this.listenTo(t,e,((t,e)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(e.target)&&this.onDomEvent(e)}),{useCapture:this.useCapture})}))}fire(t,e,n){this.isEnabled&&this.document.fire(t,new Ks(this.view,e,n))}}class Js extends Zs{constructor(t){super(t),this.domEventType=["keydown","keyup"]}onDomEvent(t){const e={keyCode:t.keyCode,altKey:t.altKey,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,metaKey:t.metaKey,get keystroke(){return fr(this)}};this.fire(t.type,t,e)}}const Ys=function(){return K.Date.now()};var Qs=/\s/;const Xs=function(t){for(var e=t.length;e--&&Qs.test(t.charAt(e)););return e};var ta=/^\s+/;const ea=function(t){return t?t.slice(0,Xs(t)+1).replace(ta,""):t};var na=/^[-+]0x[0-9a-f]+$/i,oa=/^0b[01]+$/i,ia=/^0o[0-7]+$/i,ra=parseInt;const sa=function(t){if("number"==typeof t)return t;if(Mo(t))return NaN;if(E(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=E(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=ea(t);var n=oa.test(t);return n||ia.test(t)?ra(t.slice(2),n?2:8):na.test(t)?NaN:+t};var aa=Math.max,la=Math.min;const ca=function(t,e,n){var o,i,r,s,a,l,c=0,d=!1,h=!1,u=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var n=o,r=i;return o=i=void 0,c=e,s=t.apply(r,n)}function m(t){return c=t,a=setTimeout(f,e),d?g(t):s}function p(t){var n=t-l;return void 0===l||n>=e||n<0||h&&t-c>=r}function f(){var t=Ys();if(p(t))return b(t);a=setTimeout(f,function(t){var n=e-(t-l);return h?la(n,r-(t-c)):n}(t))}function b(t){return a=void 0,u&&o?g(t):(o=i=void 0,s)}function k(){var t=Ys(),n=p(t);if(o=arguments,i=this,l=t,n){if(void 0===a)return m(l);if(h)return clearTimeout(a),a=setTimeout(f,e),g(l)}return void 0===a&&(a=setTimeout(f,e)),s}return e=sa(e)||0,E(n)&&(d=!!n.leading,r=(h="maxWait"in n)?aa(sa(n.maxWait)||0,e):r,u="trailing"in n?!!n.trailing:u),k.cancel=function(){void 0!==a&&clearTimeout(a),c=0,o=l=i=a=void 0},k.flush=function(){return void 0===a?s:b(Ys())},k};class da extends ys{constructor(t){super(t),this._fireSelectionChangeDoneDebounced=ca((t=>{this.document.fire("selectionChangeDone",t)}),200)}observe(){const t=this.document;t.on("arrowKey",((e,n)=>{t.selection.isFake&&this.isEnabled&&n.preventDefault()}),{context:"$capture"}),t.on("arrowKey",((e,n)=>{t.selection.isFake&&this.isEnabled&&this._handleSelectionMove(n.keyCode)}),{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(t){const e=this.document.selection,n=new Gi(e.getRanges(),{backward:e.isBackward,fake:!1});t!=mr.arrowleft&&t!=mr.arrowup||n.setTo(n.getFirstPosition()),t!=mr.arrowright&&t!=mr.arrowdown||n.setTo(n.getLastPosition());const o={oldSelection:e,newSelection:n,domSelection:null};this.document.fire("selectionChange",o),this._fireSelectionChangeDoneDebounced(o)}}class ha extends ys{constructor(t){super(t),this.mutationObserver=t.getObserver($s),this.selection=this.document.selection,this.domConverter=t.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=ca((t=>{this.document.fire("selectionChangeDone",t)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=ca((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(t){const e=t.ownerDocument,n=()=>{this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel()};this.listenTo(t,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(t,"keydown",n,{priority:"highest"}),this.listenTo(t,"keyup",n,{priority:"highest"}),this._documents.has(e)||(this.listenTo(e,"mouseup",n,{priority:"highest"}),this.listenTo(e,"selectionchange",((t,n)=>{this._handleSelectionChange(n,e),this._documentIsSelectingInactivityTimeoutDebounced()})),this._documents.add(e))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_handleSelectionChange(t,e){if(!this.isEnabled)return;const n=e.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(n.anchorNode))return;this.mutationObserver.flush();const o=this.domConverter.domSelectionToView(n);if(0!=o.rangeCount){if(this.view.hasDomSelection=!0,!(this.selection.isEqual(o)&&this.domConverter.isDomSelectionCorrect(n)||++this._loopbackCounter>60))if(this.selection.isSimilar(o))this.view.forceRender();else{const t={oldSelection:this.selection,newSelection:o,domSelection:n};this.document.fire("selectionChange",t),this._fireSelectionChangeDoneDebounced(t)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class ua extends Zs{constructor(t){super(t),this.domEventType=["focus","blur"],this.useCapture=!0;const e=this.document;e.on("focus",(()=>{e.isFocused=!0,this._renderTimeoutId=setTimeout((()=>t.change((()=>{}))),50)})),e.on("blur",((n,o)=>{const i=e.selection.editableElement;null!==i&&i!==o.target||(e.isFocused=!1,t.change((()=>{})))}))}onDomEvent(t){this.fire(t.type,t)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class ga extends Zs{constructor(t){super(t),this.domEventType=["compositionstart","compositionupdate","compositionend"];const e=this.document;e.on("compositionstart",(()=>{e.isComposing=!0})),e.on("compositionend",(()=>{e.isComposing=!1}))}onDomEvent(t){this.fire(t.type,t)}}class ma extends Zs{constructor(t){super(t),this.domEventType=["beforeinput"]}onDomEvent(t){this.fire(t.type,t)}}const pa=function(t){return"string"==typeof t||!xe(t)&&at(t)&&"[object String]"==it(t)};function fa(t,e,n={},o=[]){const i=n&&n.xmlns,r=i?t.createElementNS(i,e):t.createElement(e);for(const t in n)r.setAttribute(t,n[t]);!pa(o)&&bo(o)||(o=[o]);for(let e of o)pa(e)&&(e=t.createTextNode(e)),r.appendChild(e);return r}function ba(t){return"[object Range]"==Object.prototype.toString.apply(t)}function ka(t){const e=t.ownerDocument.defaultView.getComputedStyle(t);return{top:parseInt(e.borderTopWidth,10),right:parseInt(e.borderRightWidth,10),bottom:parseInt(e.borderBottomWidth,10),left:parseInt(e.borderLeftWidth,10)}}const wa=["top","right","bottom","left","width","height"];class _a{constructor(t){const e=ba(t);if(Object.defineProperty(this,"_source",{value:t._source||t,writable:!0,enumerable:!1}),va(t)||e)if(e){const e=_a.getDomRangeRects(t);Aa(this,_a.getBoundingRect(e))}else Aa(this,t.getBoundingClientRect());else if(ws(t)){const{innerWidth:e,innerHeight:n}=t;Aa(this,{top:0,right:e,bottom:n,left:0,width:e,height:n})}else Aa(this,t)}clone(){return new _a(this)}moveTo(t,e){return this.top=e,this.right=t+this.width,this.bottom=e+this.height,this.left=t,this}moveBy(t,e){return this.top+=e,this.right+=t,this.left+=t,this.bottom+=e,this}getIntersection(t){const e={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),width:0,height:0};return e.width=e.right-e.left,e.height=e.bottom-e.top,e.width<0||e.height<0?null:new _a(e)}getIntersectionArea(t){const e=this.getIntersection(t);return e?e.getArea():0}getArea(){return this.width*this.height}getVisible(){const t=this._source;let e=this.clone();if(!Ca(t)){let n=t.parentNode||t.commonAncestorContainer;for(;n&&!Ca(n);){const t=new _a(n),o=e.getIntersection(t);if(!o)return null;o.getArea()<e.getArea()&&(e=o),n=n.parentNode}}return e}isEqual(t){for(const e of wa)if(this[e]!==t[e])return!1;return!0}contains(t){const e=this.getIntersection(t);return!(!e||!e.isEqual(t))}excludeScrollbarsAndBorders(){const t=this._source;let e,n,o;if(ws(t))e=t.innerWidth-t.document.documentElement.clientWidth,n=t.innerHeight-t.document.documentElement.clientHeight,o=t.getComputedStyle(t.document.documentElement).direction;else{const i=ka(t);e=t.offsetWidth-t.clientWidth-i.left-i.right,n=t.offsetHeight-t.clientHeight-i.top-i.bottom,o=t.ownerDocument.defaultView.getComputedStyle(t).direction,this.left+=i.left,this.top+=i.top,this.right-=i.right,this.bottom-=i.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=e,"ltr"===o?this.right-=e:this.left+=e,this.height-=n,this.bottom-=n,this}static getDomRangeRects(t){const e=[],n=Array.from(t.getClientRects());if(n.length)for(const t of n)e.push(new _a(t));else{let n=t.startContainer;Or(n)&&(n=n.parentNode);const o=new _a(n.getBoundingClientRect());o.right=o.left,o.width=0,e.push(o)}return e}static getBoundingRect(t){const e={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,width:0,height:0};let n=0;for(const o of t)n++,e.left=Math.min(e.left,o.left),e.top=Math.min(e.top,o.top),e.right=Math.max(e.right,o.right),e.bottom=Math.max(e.bottom,o.bottom);return 0==n?null:(e.width=e.right-e.left,e.height=e.bottom-e.top,new _a(e))}}function Aa(t,e){for(const n of wa)t[n]=e[n]}function Ca(t){return!!va(t)&&t===t.ownerDocument.body}function va(t){return go(t)}class ya{constructor(t,e){ya._observerInstance||ya._createObserver(),this._element=t,this._callback=e,ya._addElementCallback(t,e),ya._observerInstance.observe(t)}destroy(){ya._deleteElementCallback(this._element,this._callback)}static _addElementCallback(t,e){ya._elementCallbacks||(ya._elementCallbacks=new Map);let n=ya._elementCallbacks.get(t);n||(n=new Set,ya._elementCallbacks.set(t,n)),n.add(e)}static _deleteElementCallback(t,e){const n=ya._getElementCallbacks(t);n&&(n.delete(e),n.size||(ya._elementCallbacks.delete(t),ya._observerInstance.unobserve(t))),ya._elementCallbacks&&!ya._elementCallbacks.size&&(ya._observerInstance=null,ya._elementCallbacks=null)}static _getElementCallbacks(t){return ya._elementCallbacks?ya._elementCallbacks.get(t):null}static _createObserver(){ya._observerInstance=new Co.window.ResizeObserver((t=>{for(const e of t){const t=ya._getElementCallbacks(e.target);if(t)for(const n of t)n(e)}}))}}function xa(t){return!!(t&&t.getClientRects&&t.getClientRects().length)}function Ea(t){const e=t.next();return e.done?null:e.value}ya._observerInstance=null,ya._elementCallbacks=null;class Ta extends(_s(R)){constructor(){super(),this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}add(t){if(this._elements.has(t))throw new l("focustracker-add-element-already-exist",this);this.listenTo(t,"focus",(()=>this._focus(t)),{useCapture:!0}),this.listenTo(t,"blur",(()=>this._blur()),{useCapture:!0}),this._elements.add(t)}remove(t){t===this.focusedElement&&this._blur(),this._elements.has(t)&&(this.stopListening(t),this._elements.delete(t))}destroy(){this.stopListening()}_focus(t){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=t,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((()=>{this.focusedElement=null,this.isFocused=!1}),0)}}class Da{constructor(){this._listener=Object.create(_s)}listenTo(t){this._listener.listenTo(t,"keydown",((t,e)=>{this._listener.fire("_keydown:"+fr(e),e)}))}set(t,e,n={}){const o=br(t),i=n.priority;this._listener.listenTo(this._listener,"_keydown:"+o,((t,n)=>{e(n,(()=>{n.preventDefault(),n.stopPropagation(),t.stop()})),t.return=!0}),{priority:i})}press(t){return!!this._listener.fire("_keydown:"+fr(t),t)}destroy(){this._listener.stopListening()}}class Sa extends ys{constructor(t){super(t),this.document.on("keydown",((t,e)=>{if(this.isEnabled&&((n=e.keyCode)==mr.arrowright||n==mr.arrowleft||n==mr.arrowup||n==mr.arrowdown)){const n=new Zi(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(n,e),n.stop.called&&t.stop()}var n}))}observe(){}}class Ba extends ys{constructor(t){super(t);const e=this.document;e.on("keydown",((t,n)=>{if(!this.isEnabled||n.keyCode!=mr.tab||n.ctrlKey)return;const o=new Zi(e,"tab",e.selection.getFirstRange());e.fire(o,n),o.stop.called&&t.stop()}))}observe(){}}function Ia({target:t,viewportOffset:e=0}){const n=Na(t);let o=n,i=null;for(;o;){let r;r=Ma(o==n?t:i),Ra(r,(()=>La(t,o)));const s=La(t,o);if(Pa(o,s,e),o.parent!=o){if(i=o.frameElement,o=o.parent,!i)return}else o=null}}function Pa(t,e,n){const o=e.clone().moveBy(0,n),i=e.clone().moveBy(0,-n),r=new _a(t).excludeScrollbarsAndBorders();if(![i,o].every((t=>r.contains(t)))){let{scrollX:s,scrollY:a}=t;Va(i,r)?a-=r.top-e.top+n:za(o,r)&&(a+=e.bottom-r.bottom+n),Fa(e,r)?s-=r.left-e.left+n:Oa(e,r)&&(s+=e.right-r.right+n),t.scrollTo(s,a)}}function Ra(t,e){const n=Na(t);let o,i;for(;t!=n.document.body;)i=e(),o=new _a(t).excludeScrollbarsAndBorders(),o.contains(i)||(Va(i,o)?t.scrollTop-=o.top-i.top:za(i,o)&&(t.scrollTop+=i.bottom-o.bottom),Fa(i,o)?t.scrollLeft-=o.left-i.left:Oa(i,o)&&(t.scrollLeft+=i.right-o.right)),t=t.parentNode}function za(t,e){return t.bottom>e.bottom}function Va(t,e){return t.top<e.top}function Fa(t,e){return t.left<e.left}function Oa(t,e){return t.right>e.right}function Na(t){return ba(t)?t.startContainer.ownerDocument.defaultView:t.ownerDocument.defaultView}function Ma(t){if(ba(t)){let e=t.commonAncestorContainer;return Or(e)&&(e=e.parentNode),e}return t.parentNode}function La(t,e){const n=Na(t),o=new _a(t);if(n===e)return o;{let t=n;for(;t!=e;){const e=t.frameElement,n=new _a(e).excludeScrollbarsAndBorders();o.moveBy(n.left,n.top),t=t.parent}}return o}class Ha extends R{constructor(t){super(),this.document=new nr(t),this.domConverter=new ps(this.document),this.domRoots=new Map,this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new is(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting").to(this.document,"isFocused","isSelecting"),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new Er(this.document),this.addObserver($s),this.addObserver(ha),this.addObserver(ua),this.addObserver(Js),this.addObserver(da),this.addObserver(ga),this.addObserver(Sa),this.addObserver(Ba),dr.isAndroid&&this.addObserver(ma),this.document.on("arrowKey",Ur,{priority:"low"}),Ar(this),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0}))}attachDomRoot(t,e="main"){const n=this.document.getRoot(e);n._name=t.tagName.toLowerCase();const o={};for(const{name:e,value:i}of Array.from(t.attributes))o[e]=i,"class"===e?this._writer.addClass(i.split(" "),n):this._writer.setAttribute(e,i,n);this._initialDomRootAttributes.set(t,o);const i=()=>{this._writer.setAttribute("contenteditable",(!n.isReadOnly).toString(),n),n.isReadOnly?this._writer.addClass("ck-read-only",n):this._writer.removeClass("ck-read-only",n)};i(),this.domRoots.set(e,t),this.domConverter.bindElements(t,n),this._renderer.markToSync("children",n),this._renderer.markToSync("attributes",n),this._renderer.domDocuments.add(t.ownerDocument),n.on("change:children",((t,e)=>this._renderer.markToSync("children",e))),n.on("change:attributes",((t,e)=>this._renderer.markToSync("attributes",e))),n.on("change:text",((t,e)=>this._renderer.markToSync("text",e))),n.on("change:isReadOnly",(()=>this.change(i))),n.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const n of this._observers.values())n.observe(t,e)}detachDomRoot(t){const e=this.domRoots.get(t);Array.from(e.attributes).forEach((({name:t})=>e.removeAttribute(t)));const n=this._initialDomRootAttributes.get(e);for(const t in n)e.setAttribute(t,n[t]);this.domRoots.delete(t),this.domConverter.unbindDomElement(e)}getDomRoot(t="main"){return this.domRoots.get(t)}addObserver(t){let e=this._observers.get(t);if(e)return e;e=new t(this),this._observers.set(t,e);for(const[t,n]of this.domRoots)e.observe(n,t);return e.enable(),e}getObserver(t){return this._observers.get(t)}disableObservers(){for(const t of this._observers.values())t.disable()}enableObservers(){for(const t of this._observers.values())t.enable()}scrollToTheSelection(){const t=this.document.selection.getFirstRange();t&&Ia({target:this.domConverter.viewRangeToDom(t),viewportOffset:20})}focus(){if(!this.document.isFocused){const t=this.document.selection.editableElement;t&&(this.domConverter.focus(t),this.forceRender())}}change(t){if(this.isRenderingInProgress||this._postFixersInProgress)throw new l("cannot-change-view-tree",this);try{if(this._ongoingChange)return t(this._writer);this._ongoingChange=!0;const e=t(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),e}catch(t){l.rethrowUnexpectedError(t,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.change((()=>{}))}destroy(){for(const t of this._observers.values())t.destroy();this.document.destroy(),this.stopListening()}createPositionAt(t,e){return Wi._createAt(t,e)}createPositionAfter(t){return Wi._createAfter(t)}createPositionBefore(t){return Wi._createBefore(t)}createRange(...t){return new ji(...t)}createRangeOn(t){return ji._createOn(t)}createRangeIn(t){return ji._createIn(t)}createSelection(...t){return new Gi(...t)}_disableRendering(t){this._renderingDisabled=t,0==t&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class qa{is(){throw new Error("is() method is abstract")}}class Wa extends qa{constructor(t){super(),this.parent=null,this._attrs=Vo(t)}get document(){return null}get index(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildIndex(this)))throw new l("model-node-not-found-in-parent",this);return t}get startOffset(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildStartOffset(this)))throw new l("model-node-not-found-in-parent",this);return t}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const t=this.index;return null!==t&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return null!==t&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}isAttached(){return this.root.is("rootElement")}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.startOffset),e=e.parent;return t}getAncestors(t={}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}getCommonAncestor(t,e={}){const n=this.getAncestors(e),o=t.getAncestors(e);let i=0;for(;n[i]==o[i]&&n[i];)i++;return 0===i?null:n[i-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),n=t.getPath(),o=Bo(e,n);switch(o){case"prefix":return!0;case"extension":return!1;default:return e[o]<n[o]}}isAfter(t){return this!=t&&(this.root===t.root&&!this.isBefore(t))}hasAttribute(t){return this._attrs.has(t)}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const t={};return this._attrs.size&&(t.attributes=Array.from(this._attrs).reduce(((t,e)=>(t[e[0]]=e[1],t)),{})),t}_clone(t){return new Wa(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(t,e){this._attrs.set(t,e)}_setAttributesTo(t){this._attrs=Vo(t)}_removeAttribute(t){return this._attrs.delete(t)}_clearAttributes(){this._attrs.clear()}}Wa.prototype.is=function(t){return"node"===t||"model:node"===t};class ja{constructor(t){this._nodes=[],t&&this._insertNodes(0,t)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((t,e)=>t+e.offsetSize),0)}getNode(t){return this._nodes[t]||null}getNodeIndex(t){const e=this._nodes.indexOf(t);return-1==e?null:e}getNodeStartOffset(t){const e=this.getNodeIndex(t);return null===e?null:this._nodes.slice(0,e).reduce(((t,e)=>t+e.offsetSize),0)}indexToOffset(t){if(t==this._nodes.length)return this.maxOffset;const e=this._nodes[t];if(!e)throw new l("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(e)}offsetToIndex(t){let e=0;for(const n of this._nodes){if(t>=e&&t<e+n.offsetSize)return this.getNodeIndex(n);e+=n.offsetSize}if(e!=t)throw new l("model-nodelist-offset-out-of-bounds",this,{offset:t,nodeList:this});return this.length}_insertNodes(t,e){for(const t of e)if(!(t instanceof Wa))throw new l("model-nodelist-insertnodes-not-node",this);this._nodes.splice(t,0,...e)}_removeNodes(t,e=1){return this._nodes.splice(t,e)}toJSON(){return this._nodes.map((t=>t.toJSON()))}}class Ua extends Wa{constructor(t,e){super(e),this._data=t||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const t=super.toJSON();return t.data=this.data,t}_clone(){return new Ua(this.data,this.getAttributes())}static fromJSON(t){return new Ua(t.data,t.attributes)}}Ua.prototype.is=function(t){return"$text"===t||"model:$text"===t||"text"===t||"model:text"===t||"node"===t||"model:node"===t};class $a extends qa{constructor(t,e,n){if(super(),this.textNode=t,e<0||e>t.offsetSize)throw new l("model-textproxy-wrong-offsetintext",this);if(n<0||e+n>t.offsetSize)throw new l("model-textproxy-wrong-length",this);this.data=t.data.substring(e,e+n),this.offsetInText=e}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}getPath(){const t=this.textNode.getPath();return t.length>0&&(t[t.length-1]+=this.offsetInText),t}getAncestors(t={}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}hasAttribute(t){return this.textNode.hasAttribute(t)}getAttribute(t){return this.textNode.getAttribute(t)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}$a.prototype.is=function(t){return"$textProxy"===t||"model:$textProxy"===t||"textProxy"===t||"model:textProxy"===t};class Ga extends Wa{constructor(t,e,n){super(e),this.name=t,this._children=new ja,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}offsetToIndex(t){return this._children.offsetToIndex(t)}getNodeByPath(t){let e=this;for(const n of t)e=e.getChild(e.offsetToIndex(n));return e}findAncestor(t,e={}){let n=e.includeSelf?this:this.parent;for(;n;){if(n.name===t)return n;n=n.parent}return null}toJSON(){const t=super.toJSON();if(t.name=this.name,this._children.length>0){t.children=[];for(const e of this._children)t.children.push(e.toJSON())}return t}_clone(t=!1){const e=t?Array.from(this._children).map((t=>t._clone(!0))):void 0;return new Ga(this.name,this.getAttributes(),e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const n=function(t){if("string"==typeof t)return[new Ua(t)];bo(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new Ua(t):t instanceof $a?new Ua(t.data,t.getAttributes()):t))}(e);for(const t of n)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,n)}_removeChildren(t,e=1){const n=this._children._removeNodes(t,e);for(const t of n)t.parent=null;return n}static fromJSON(t){let e;if(t.children){e=[];for(const n of t.children)n.name?e.push(Ga.fromJSON(n)):e.push(Ua.fromJSON(n))}return new Ga(t.name,t.attributes,e)}}Ga.prototype.is=function(t,e){return e?e===this.name&&("element"===t||"model:element"===t):"element"===t||"model:element"===t||"node"===t||"model:node"===t};class Ka{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new l("model-tree-walker-no-start-position",null);const e=t.direction||"forward";if("forward"!=e&&"backward"!=e)throw new l("model-tree-walker-unknown-direction",t,{direction:e});this.direction=e,this.boundaries=t.boundaries||null,t.startPosition?this.position=t.startPosition.clone():this.position=Ja._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}[Symbol.iterator](){return this}skip(t){let e,n,o,i;do{o=this.position,i=this._visitedParent,({done:e,value:n}=this.next())}while(!e&&t(n));e||(this.position=o,this._visitedParent=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const t=this.position,e=this.position.clone(),n=this._visitedParent;if(null===n.parent&&e.offset===n.maxOffset)return{done:!0,value:void 0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const o=Ya(e,n),i=o||Qa(e,n,o);if(i instanceof Ga)return this.shallow?e.offset++:(e.path.push(0),this._visitedParent=i),this.position=e,Za("elementStart",i,t,e,1);if(i instanceof Ua){let o;if(this.singleCharacters)o=1;else{let t=i.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offset<t&&(t=this.boundaries.end.offset),o=t-e.offset}const r=e.offset-i.startOffset,s=new $a(i,r,o);return e.offset+=o,this.position=e,Za("text",s,t,e,o)}return e.path.pop(),e.offset++,this.position=e,this._visitedParent=n.parent,this.ignoreElementEnd?this._next():Za("elementEnd",n,t,e)}_previous(){const t=this.position,e=this.position.clone(),n=this._visitedParent;if(null===n.parent&&0===e.offset)return{done:!0,value:void 0};if(n==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};const o=e.parent,i=Ya(e,o),r=i||Xa(e,o,i);if(r instanceof Ga)return e.offset--,this.shallow?(this.position=e,Za("elementStart",r,t,e,1)):(e.path.push(r.maxOffset),this.position=e,this._visitedParent=r,this.ignoreElementEnd?this._previous():Za("elementEnd",r,t,e));if(r instanceof Ua){let o;if(this.singleCharacters)o=1;else{let t=r.startOffset;this._boundaryStartParent==n&&this.boundaries.start.offset>t&&(t=this.boundaries.start.offset),o=e.offset-t}const i=e.offset-r.startOffset,s=new $a(r,i-o,o);return e.offset-=o,this.position=e,Za("text",s,t,e,o)}return e.path.pop(),this.position=e,this._visitedParent=n.parent,Za("elementStart",n,t,e,1)}}function Za(t,e,n,o,i){return{done:!1,value:{type:t,item:e,previousPosition:n,nextPosition:o,length:i}}}class Ja extends qa{constructor(t,e,n="toNone"){if(super(),!t.is("element")&&!t.is("documentFragment"))throw new l("model-position-root-invalid",t);if(!(e instanceof Array)||0===e.length)throw new l("model-position-path-incorrect-format",t,{path:e});t.is("rootElement")?e=e.slice():(e=[...t.getPath(),...e],t=t.root),this.root=t,this.path=e,this.stickiness=n}get offset(){return this.path[this.path.length-1]}set offset(t){this.path[this.path.length-1]=t}get parent(){let t=this.root;for(let e=0;e<this.path.length-1;e++)if(t=t.getChild(t.offsetToIndex(this.path[e])),!t)throw new l("model-position-path-incorrect",this,{position:this});if(t.is("$text"))throw new l("model-position-path-incorrect",this,{position:this});return t}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){return Ya(this,this.parent)}get nodeAfter(){const t=this.parent;return Qa(this,t,Ya(this,t))}get nodeBefore(){const t=this.parent;return Xa(this,t,Ya(this,t))}get isAtStart(){return 0===this.offset}get isAtEnd(){return this.offset==this.parent.maxOffset}compareWith(t){if(this.root!=t.root)return"different";const e=Bo(this.path,t.path);switch(e){case"same":return"same";case"prefix":return"before";case"extension":return"after";default:return this.path[e]<t.path[e]?"before":"after"}}getLastMatchingPosition(t,e={}){e.startPosition=this;const n=new Ka(e);return n.skip(t),n.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){const t=this.parent;return t.is("documentFragment")?[t]:t.getAncestors({includeSelf:!0})}findAncestor(t){const e=this.parent;return e.is("element")?e.findAncestor(t,{includeSelf:!0}):null}getCommonPath(t){if(this.root!=t.root)return[];const e=Bo(this.path,t.path),n="string"==typeof e?Math.min(this.path.length,t.path.length):e;return this.path.slice(0,n)}getCommonAncestor(t){const e=this.getAncestors(),n=t.getAncestors();let o=0;for(;e[o]==n[o]&&e[o];)o++;return 0===o?null:e[o-1]}getShiftedBy(t){const e=this.clone(),n=e.offset+t;return e.offset=n<0?0:n,e}isAfter(t){return"after"==this.compareWith(t)}isBefore(t){return"before"==this.compareWith(t)}isEqual(t){return"same"==this.compareWith(t)}isTouching(t){let e=null,n=null;switch(this.compareWith(t)){case"same":return!0;case"before":e=Ja._createAt(this),n=Ja._createAt(t);break;case"after":e=Ja._createAt(t),n=Ja._createAt(this);break;default:return!1}let o=e.parent;for(;e.path.length+n.path.length;){if(e.isEqual(n))return!0;if(e.path.length>n.path.length){if(e.offset!==o.maxOffset)return!1;e.path=e.path.slice(0,-1),o=o.parent,e.offset++}else{if(0!==n.offset)return!1;n.path=n.path.slice(0,-1)}}throw new Error("unreachable code")}hasSameParentAs(t){if(this.root!==t.root)return!1;return"same"==Bo(this.getParentPath(),t.getParentPath())}getTransformedByOperation(t){let e;switch(t.type){case"insert":e=this._getTransformedByInsertOperation(t);break;case"move":case"remove":case"reinsert":e=this._getTransformedByMoveOperation(t);break;case"split":e=this._getTransformedBySplitOperation(t);break;case"merge":e=this._getTransformedByMergeOperation(t);break;default:e=Ja._createAt(this)}return e}_getTransformedByInsertOperation(t){return this._getTransformedByInsertion(t.position,t.howMany)}_getTransformedByMoveOperation(t){return this._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany)}_getTransformedBySplitOperation(t){const e=t.movedRange;return e.containsPosition(this)||e.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(t.splitPosition,t.moveTargetPosition):t.graveyardPosition?this._getTransformedByMove(t.graveyardPosition,t.insertionPosition,1):this._getTransformedByInsertion(t.insertionPosition,1)}_getTransformedByMergeOperation(t){const e=t.movedRange;let n;return e.containsPosition(this)||e.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)?Ja._createAt(t.deletionPosition):this._getTransformedByMove(t.deletionPosition,t.graveyardPosition,1),n}_getTransformedByDeletion(t,e){const n=Ja._createAt(this);if(this.root!=t.root)return n;if("same"==Bo(t.getParentPath(),this.getParentPath())){if(t.offset<this.offset){if(t.offset+e>this.offset)return null;n.offset-=e}}else if("prefix"==Bo(t.getParentPath(),this.getParentPath())){const o=t.path.length-1;if(t.offset<=this.path[o]){if(t.offset+e>this.path[o])return null;n.path[o]-=e}}return n}_getTransformedByInsertion(t,e){const n=Ja._createAt(this);if(this.root!=t.root)return n;if("same"==Bo(t.getParentPath(),this.getParentPath()))(t.offset<this.offset||t.offset==this.offset&&"toPrevious"!=this.stickiness)&&(n.offset+=e);else if("prefix"==Bo(t.getParentPath(),this.getParentPath())){const o=t.path.length-1;t.offset<=this.path[o]&&(n.path[o]+=e)}return n}_getTransformedByMove(t,e,n){if(e=e._getTransformedByDeletion(t,n),t.isEqual(e))return Ja._createAt(this);const o=this._getTransformedByDeletion(t,n);return null===o||t.isEqual(this)&&"toNext"==this.stickiness||t.getShiftedBy(n).isEqual(this)&&"toPrevious"==this.stickiness?this._getCombined(t,e):o._getTransformedByInsertion(e,n)}_getCombined(t,e){const n=t.path.length-1,o=Ja._createAt(e);return o.stickiness=this.stickiness,o.offset=o.offset+this.path[n]-t.offset,o.path=[...o.path,...this.path.slice(n+1)],o}toJSON(){return{root:this.root.toJSON(),path:Array.from(this.path),stickiness:this.stickiness}}clone(){return new this.constructor(this.root,this.path,this.stickiness)}static _createAt(t,e,n="toNone"){if(t instanceof Ja)return new Ja(t.root,t.path,t.stickiness);{const o=t;if("end"==e)e=o.maxOffset;else{if("before"==e)return this._createBefore(o,n);if("after"==e)return this._createAfter(o,n);if(0!==e&&!e)throw new l("model-createpositionat-offset-required",[this,t])}if(!o.is("element")&&!o.is("documentFragment"))throw new l("model-position-parent-incorrect",[this,t]);const i=o.getPath();return i.push(e),new this(o.root,i,n)}}static _createAfter(t,e){if(!t.parent)throw new l("model-position-after-root",[this,t],{root:t});return this._createAt(t.parent,t.endOffset,e)}static _createBefore(t,e){if(!t.parent)throw new l("model-position-before-root",t,{root:t});return this._createAt(t.parent,t.startOffset,e)}static fromJSON(t,e){if("$graveyard"===t.root){const n=new Ja(e.graveyard,t.path);return n.stickiness=t.stickiness,n}if(!e.getRoot(t.root))throw new l("model-position-fromjson-no-root",e,{rootName:t.root});return new Ja(e.getRoot(t.root),t.path,t.stickiness)}}function Ya(t,e){const n=e.getChild(e.offsetToIndex(t.offset));return n&&n.is("$text")&&n.startOffset<t.offset?n:null}function Qa(t,e,n){return null!==n?null:e.getChild(e.offsetToIndex(t.offset))}function Xa(t,e,n){return null!==n?null:e.getChild(e.offsetToIndex(t.offset)-1)}Ja.prototype.is=function(t){return"position"===t||"model:position"===t};class tl extends qa{constructor(t,e){super(),this.start=Ja._createAt(t),this.end=e?Ja._createAt(e):Ja._createAt(t),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new Ka({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return"same"==Bo(this.start.getParentPath(),this.end.getParentPath())}get root(){return this.start.root}containsPosition(t){return t.isAfter(this.start)&&t.isBefore(this.end)}containsRange(t,e=!1){t.isCollapsed&&(e=!1);const n=this.containsPosition(t.start)||e&&this.start.isEqual(t.start),o=this.containsPosition(t.end)||e&&this.end.isEqual(t.end);return n&&o}containsItem(t){const e=Ja._createBefore(t);return this.containsPosition(e)||this.start.isEqual(e)}isEqual(t){return this.start.isEqual(t.start)&&this.end.isEqual(t.end)}isIntersecting(t){return this.start.isBefore(t.end)&&this.end.isAfter(t.start)}getDifference(t){const e=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&e.push(new tl(this.start,t.start)),this.containsPosition(t.end)&&e.push(new tl(t.end,this.end))):e.push(new tl(this.start,this.end)),e}getIntersection(t){if(this.isIntersecting(t)){let e=this.start,n=this.end;return this.containsPosition(t.start)&&(e=t.start),this.containsPosition(t.end)&&(n=t.end),new tl(e,n)}return null}getJoined(t,e=!1){let n=this.isIntersecting(t);if(n||(n=this.start.isBefore(t.start)?e?this.end.isTouching(t.start):this.end.isEqual(t.start):e?t.end.isTouching(this.start):t.end.isEqual(this.start)),!n)return null;let o=this.start,i=this.end;return t.start.isBefore(o)&&(o=t.start),t.end.isAfter(i)&&(i=t.end),new tl(o,i)}getMinimalFlatRanges(){const t=[],e=this.start.getCommonPath(this.end).length,n=Ja._createAt(this.start);let o=n.parent;for(;n.path.length>e+1;){const e=o.maxOffset-n.offset;0!==e&&t.push(new tl(n,n.getShiftedBy(e))),n.path=n.path.slice(0,-1),n.offset++,o=o.parent}for(;n.path.length<=this.end.path.length;){const e=this.end.path[n.path.length-1],o=e-n.offset;0!==o&&t.push(new tl(n,n.getShiftedBy(o))),n.offset=e,n.path.push(0)}return t}getWalker(t={}){return t.boundaries=this,new Ka(t)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const e=new Ka(t);for(const t of e)yield t.item}*getPositions(t={}){t.boundaries=this;const e=new Ka(t);yield e.position;for(const t of e)yield t.nextPosition}getTransformedByOperation(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 tl(this.start,this.end)]}getTransformedByOperations(t){const e=[new tl(this.start,this.end)];for(const n of t)for(let t=0;t<e.length;t++){const o=e[t].getTransformedByOperation(n);e.splice(t,1,...o),t+=o.length-1}for(let t=0;t<e.length;t++){const n=e[t];for(let o=t+1;o<e.length;o++){const t=e[o];(n.containsRange(t)||t.containsRange(n)||n.isEqual(t))&&e.splice(o,1)}}return e}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;const t=this.start.nodeAfter,e=this.end.nodeBefore;return t&&t.is("element")&&t===e?t:null}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(t,e=!1){return this._getTransformedByInsertion(t.position,t.howMany,e)}_getTransformedByMoveOperation(t,e=!1){const n=t.sourcePosition,o=t.howMany,i=t.targetPosition;return this._getTransformedByMove(n,i,o,e)}_getTransformedBySplitOperation(t){const e=this.start._getTransformedBySplitOperation(t);let n=this.end._getTransformedBySplitOperation(t);return this.end.isEqual(t.insertionPosition)&&(n=this.end.getShiftedBy(1)),e.root!=n.root&&(n=this.end.getShiftedBy(-1)),new tl(e,n)}_getTransformedByMergeOperation(t){if(this.start.isEqual(t.targetPosition)&&this.end.isEqual(t.deletionPosition))return new tl(this.start);let e=this.start._getTransformedByMergeOperation(t),n=this.end._getTransformedByMergeOperation(t);return e.root!=n.root&&(n=this.end.getShiftedBy(-1)),e.isAfter(n)?(t.sourcePosition.isBefore(t.targetPosition)?(e=Ja._createAt(n),e.offset=0):(t.deletionPosition.isEqual(e)||(n=t.deletionPosition),e=t.targetPosition),new tl(e,n)):new tl(e,n)}_getTransformedByInsertion(t,e,n=!1){if(n&&this.containsPosition(t))return[new tl(this.start,t),new tl(t.getShiftedBy(e),this.end._getTransformedByInsertion(t,e))];{const n=new tl(this.start,this.end);return n.start=n.start._getTransformedByInsertion(t,e),n.end=n.end._getTransformedByInsertion(t,e),[n]}}_getTransformedByMove(t,e,n,o=!1){if(this.isCollapsed){const o=this.start._getTransformedByMove(t,e,n);return[new tl(o)]}const i=tl._createFromPositionAndShift(t,n),r=e._getTransformedByDeletion(t,n);if(this.containsPosition(e)&&!o&&(i.containsPosition(this.start)||i.containsPosition(this.end))){const o=this.start._getTransformedByMove(t,e,n),i=this.end._getTransformedByMove(t,e,n);return[new tl(o,i)]}let s;const a=this.getDifference(i);let l=null;const c=this.getIntersection(i);if(1==a.length?l=new tl(a[0].start._getTransformedByDeletion(t,n),a[0].end._getTransformedByDeletion(t,n)):2==a.length&&(l=new tl(this.start,this.end._getTransformedByDeletion(t,n))),s=l?l._getTransformedByInsertion(r,n,null!==c||o):[],c){const t=new tl(c.start._getCombined(i.start,r),c.end._getCombined(i.start,r));2==s.length?s.splice(1,0,t):s.push(t)}return s}_getTransformedByDeletion(t,e){let n=this.start._getTransformedByDeletion(t,e),o=this.end._getTransformedByDeletion(t,e);return null==n&&null==o?null:(null==n&&(n=t),null==o&&(o=t),new tl(n,o))}static _createFromPositionAndShift(t,e){const n=t,o=t.getShiftedBy(e);return e>0?new this(n,o):new this(o,n)}static _createIn(t){return new this(Ja._createAt(t,0),Ja._createAt(t,t.maxOffset))}static _createOn(t){return this._createFromPositionAndShift(Ja._createBefore(t),t.offsetSize)}static _createFromRanges(t){if(0===t.length)throw new l("range-create-from-ranges-empty-array",null);if(1==t.length)return t[0].clone();const e=t[0];t.sort(((t,e)=>t.start.isAfter(e.start)?1:-1));const n=t.indexOf(e),o=new this(e.start,e.end);if(n>0)for(let e=n-1;t[e].end.isEqual(o.start);e++)o.start=Ja._createAt(t[e].start);for(let e=n+1;e<t.length&&t[e].start.isEqual(o.end);e++)o.end=Ja._createAt(t[e].end);return o}static fromJSON(t,e){return new this(Ja.fromJSON(t.start,e),Ja.fromJSON(t.end,e))}}tl.prototype.is=function(t){return"range"===t||"model:range"===t};class el extends k{constructor(){super(),this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._deferredBindingRemovals=new Map,this._unboundMarkerNames=new Set,this.on("modelToViewPosition",((t,e)=>{if(e.viewPosition)return;const n=this._modelToViewMapping.get(e.modelPosition.parent);if(!n)throw new l("mapping-model-position-view-parent-not-found",this,{modelPosition:e.modelPosition});e.viewPosition=this.findPositionIn(n,e.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((t,e)=>{if(e.modelPosition)return;const n=this.findMappedViewAncestor(e.viewPosition),o=this._viewToModelMapping.get(n),i=this._toModelOffset(e.viewPosition.parent,e.viewPosition.offset,n);e.modelPosition=Ja._createAt(o,i)}),{priority:"low"})}bindElements(t,e){this._modelToViewMapping.set(t,e),this._viewToModelMapping.set(e,t)}unbindViewElement(t,e={}){const n=this.toModelElement(t);if(this._elementToMarkerNames.has(t))for(const e of this._elementToMarkerNames.get(t))this._unboundMarkerNames.add(e);e.defer?this._deferredBindingRemovals.set(t,t.root):(this._viewToModelMapping.delete(t),this._modelToViewMapping.get(n)==t&&this._modelToViewMapping.delete(n))}unbindModelElement(t){const e=this.toViewElement(t);this._modelToViewMapping.delete(t),this._viewToModelMapping.get(e)==t&&this._viewToModelMapping.delete(e)}bindElementToMarker(t,e){const n=this._markerNameToElements.get(e)||new Set;n.add(t);const o=this._elementToMarkerNames.get(t)||new Set;o.add(e),this._markerNameToElements.set(e,n),this._elementToMarkerNames.set(t,o)}unbindElementFromMarkerName(t,e){const n=this._markerNameToElements.get(e);n&&(n.delete(t),0==n.size&&this._markerNameToElements.delete(e));const o=this._elementToMarkerNames.get(t);o&&(o.delete(e),0==o.size&&this._elementToMarkerNames.delete(t))}flushUnboundMarkerNames(){const t=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),t}flushDeferredBindings(){for(const[t,e]of this._deferredBindingRemovals)t.root==e&&this.unbindViewElement(t);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(t){return this._viewToModelMapping.get(t)}toViewElement(t){return this._modelToViewMapping.get(t)}toModelRange(t){return new tl(this.toModelPosition(t.start),this.toModelPosition(t.end))}toViewRange(t){return new ji(this.toViewPosition(t.start),this.toViewPosition(t.end))}toModelPosition(t){const e={viewPosition:t,mapper:this};return this.fire("viewToModelPosition",e),e.modelPosition}toViewPosition(t,e={}){const n={modelPosition:t,mapper:this,isPhantom:e.isPhantom};return this.fire("modelToViewPosition",n),n.viewPosition}markerNameToElements(t){const e=this._markerNameToElements.get(t);if(!e)return null;const n=new Set;for(const t of e)if(t.is("attributeElement"))for(const e of t.getElementsWithSameId())n.add(e);else n.add(t);return n}registerViewToModelLength(t,e){this._viewToModelLengthCallbacks.set(t,e)}findMappedViewAncestor(t){let e=t.parent;for(;!this._viewToModelMapping.has(e);)e=e.parent;return e}_toModelOffset(t,e,n){if(n!=t){return this._toModelOffset(t.parent,t.index,n)+this._toModelOffset(t,e,t)}if(t.is("$text"))return e;let o=0;for(let n=0;n<e;n++)o+=this.getModelLength(t.getChild(n));return o}getModelLength(t){if(this._viewToModelLengthCallbacks.get(t.name)){return this._viewToModelLengthCallbacks.get(t.name)(t)}if(this._viewToModelMapping.has(t))return 1;if(t.is("$text"))return t.data.length;if(t.is("uiElement"))return 0;{let e=0;for(const n of t.getChildren())e+=this.getModelLength(n);return e}}findPositionIn(t,e){let n,o=0,i=0,r=0;if(t.is("$text"))return new Wi(t,e);for(;i<e;)n=t.getChild(r),o=this.getModelLength(n),i+=o,r++;return i==e?this._moveViewPositionToTextNode(new Wi(t,r)):this.findPositionIn(n,e-(i-o))}_moveViewPositionToTextNode(t){const e=t.nodeBefore,n=t.nodeAfter;return e instanceof Ro?new Wi(e,e.data.length):n instanceof Ro?new Wi(n,0):t}}class nl{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(t,e){e=ol(e),t instanceof $a&&(t=this._getSymbolForTextProxy(t)),this._consumable.has(t)||this._consumable.set(t,new Map),this._consumable.get(t).set(e,!0)}consume(t,e){return e=ol(e),t instanceof $a&&(t=this._getSymbolForTextProxy(t)),!!this.test(t,e)&&(this._consumable.get(t).set(e,!1),!0)}test(t,e){e=ol(e),t instanceof $a&&(t=this._getSymbolForTextProxy(t));const n=this._consumable.get(t);if(void 0===n)return null;const o=n.get(e);return void 0===o?null:o}revert(t,e){e=ol(e),t instanceof $a&&(t=this._getSymbolForTextProxy(t));const n=this.test(t,e);return!1===n?(this._consumable.get(t).set(e,!0),!0):!0!==n&&null}verifyAllConsumed(t){const e=[];for(const[n,o]of this._consumable)for(const[i,r]of o){const o=i.split(":")[0];r&&t==o&&e.push({event:i,item:n.name||n.description})}if(e.length)throw new l("conversion-model-consumable-not-consumed",null,{items:e})}_getSymbolForTextProxy(t){let e=null;const n=this._textProxyRegistry.get(t.startOffset);if(n){const o=n.get(t.endOffset);o&&(e=o.get(t.parent))}return e||(e=this._addSymbolForTextProxy(t)),e}_addSymbolForTextProxy(t){const e=t.startOffset,n=t.endOffset,o=t.parent,i=Symbol("$textProxy:"+t.data);let r,s;return r=this._textProxyRegistry.get(e),r||(r=new Map,this._textProxyRegistry.set(e,r)),s=r.get(n),s||(s=new Map,r.set(n,s)),s.set(o,i),i}}function ol(t){const e=t.split(":");return"insert"==e[0]?e[0]:"addMarker"==e[0]||"removeMarker"==e[0]?t:e.length>1?e[0]+":"+e[1]:e[0]}class il extends k{constructor(t){super(),this._conversionApi={dispatcher:this,...t},this._firedEventsMap=new WeakMap}convertChanges(t,e,n){const o=this._createConversionApi(n,t.getRefreshedItems());for(const e of t.getMarkersToRemove())this._convertMarkerRemove(e.name,e.range,o);const i=this._reduceChanges(t.getChanges());for(const t of i)"insert"===t.type?this._convertInsert(tl._createFromPositionAndShift(t.position,t.length),o):"reinsert"===t.type?this._convertReinsert(tl._createFromPositionAndShift(t.position,t.length),o):"remove"===t.type?this._convertRemove(t.position,t.length,t.name,o):this._convertAttribute(t.range,t.attributeKey,t.attributeOldValue,t.attributeNewValue,o);for(const t of o.mapper.flushUnboundMarkerNames()){const n=e.get(t).getRange();this._convertMarkerRemove(t,n,o),this._convertMarkerAdd(t,n,o)}for(const e of t.getMarkersToAdd())this._convertMarkerAdd(e.name,e.range,o);o.mapper.flushDeferredBindings(),o.consumable.verifyAllConsumed("insert")}convert(t,e,n,o={}){const i=this._createConversionApi(n,void 0,o);this._convertInsert(t,i);for(const[t,n]of e)this._convertMarkerAdd(t,n,i);i.consumable.verifyAllConsumed("insert")}convertSelection(t,e,n){const o=Array.from(e.getMarkersAtPosition(t.getFirstPosition())),i=this._createConversionApi(n);if(this._addConsumablesForSelection(i.consumable,t,o),this.fire("selection",{selection:t},i),t.isCollapsed){for(const e of o){const n=e.getRange();if(!rl(t.getFirstPosition(),e,i.mapper))continue;const o={item:t,markerName:e.name,markerRange:n};i.consumable.test(t,"addMarker:"+e.name)&&this.fire(`addMarker:${e.name}`,o,i)}for(const e of t.getAttributeKeys()){const n={item:t,range:t.getFirstRange(),attributeKey:e,attributeOldValue:null,attributeNewValue:t.getAttribute(e)};i.consumable.test(t,"attribute:"+n.attributeKey)&&this.fire(`attribute:${n.attributeKey}:$text`,n,i)}}}_convertInsert(t,e,n={}){n.doNotAddConsumables||this._addConsumablesForInsert(e.consumable,Array.from(t));for(const n of Array.from(t.getWalker({shallow:!0})).map(sl))this._testAndFire("insert",n,e)}_convertRemove(t,e,n,o){this.fire(`remove:${n}`,{position:t,length:e},o)}_convertAttribute(t,e,n,o,i){this._addConsumablesForRange(i.consumable,t,`attribute:${e}`);for(const r of t){const t={item:r.item,range:tl._createFromPositionAndShift(r.previousPosition,r.length),attributeKey:e,attributeOldValue:n,attributeNewValue:o};this._testAndFire(`attribute:${e}`,t,i)}}_convertReinsert(t,e){const n=Array.from(t.getWalker({shallow:!0}));this._addConsumablesForInsert(e.consumable,n);for(const t of n.map(sl))this._testAndFire("insert",{...t,reconversion:!0},e)}_convertMarkerAdd(t,e,n){if("$graveyard"==e.root.rootName)return;const o=`addMarker:${t}`;if(n.consumable.add(e,o),this.fire(o,{markerName:t,markerRange:e},n),n.consumable.consume(e,o)){this._addConsumablesForRange(n.consumable,e,o);for(const i of e.getItems()){if(!n.consumable.test(i,o))continue;const r={item:i,range:tl._createOn(i),markerName:t,markerRange:e};this.fire(o,r,n)}}}_convertMarkerRemove(t,e,n){"$graveyard"!=e.root.rootName&&this.fire(`removeMarker:${t}`,{markerName:t,markerRange:e},n)}_reduceChanges(t){const e={changes:t};return this.fire("reduceChanges",e),e.changes}_addConsumablesForInsert(t,e){for(const n of e){const e=n.item;if(null===t.test(e,"insert")){t.add(e,"insert");for(const n of e.getAttributeKeys())t.add(e,"attribute:"+n)}}return t}_addConsumablesForRange(t,e,n){for(const o of e.getItems())t.add(o,n);return t}_addConsumablesForSelection(t,e,n){t.add(e,"selection");for(const o of n)t.add(e,"addMarker:"+o.name);for(const n of e.getAttributeKeys())t.add(e,"attribute:"+n);return t}_testAndFire(t,e,n){const o=function(t,e){const n=e.item.is("element")?e.item.name:"$text";return`${t}:${n}`}(t,e),i=e.item.is("$textProxy")?n.consumable._getSymbolForTextProxy(e.item):e.item,r=this._firedEventsMap.get(n),s=r.get(i);if(s){if(s.has(o))return;s.add(o)}else r.set(i,new Set([o]));this.fire(o,e,n)}_testAndFireAddAttributes(t,e){const n={item:t,range:tl._createOn(t)};for(const t of n.item.getAttributeKeys())n.attributeKey=t,n.attributeOldValue=null,n.attributeNewValue=n.item.getAttribute(t),this._testAndFire(`attribute:${t}`,n,e)}_createConversionApi(t,e=new Set,n={}){const o={...this._conversionApi,consumable:new nl,writer:t,options:n,convertItem:t=>this._convertInsert(tl._createOn(t),o),convertChildren:t=>this._convertInsert(tl._createIn(t),o,{doNotAddConsumables:!0}),convertAttributes:t=>this._testAndFireAddAttributes(t,o),canReuseView:t=>!e.has(o.mapper.toModelElement(t))};return this._firedEventsMap.set(o,new Map),o}}function rl(t,e,n){const o=e.getRange(),i=Array.from(t.getAncestors());i.shift(),i.reverse();return!i.some((t=>{if(o.containsItem(t)){return!!n.toViewElement(t).getCustomProperty("addHighlight")}}))}function sl(t){return{item:t.item,range:tl._createFromPositionAndShift(t.previousPosition,t.length)}}class al extends(b(qa)){constructor(...t){super(),this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,t.length&&this.setTo(...t)}get anchor(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.end:t.start}return null}get focus(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.start:t.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(t){if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let n=!1;for(const o of t._ranges)if(e.isEqual(o)){n=!0;break}if(!n)return!1}return!0}*getRanges(){for(const t of this._ranges)yield new tl(t.start,t.end)}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?new tl(t.start,t.end):null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?new tl(t.start,t.end):null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}setTo(...t){let[e,n,o]=t;if("object"==typeof n&&(o=n,n=void 0),null===e)this._setRanges([]);else if(e instanceof al)this._setRanges(e.getRanges(),e.isBackward);else if(e&&"function"==typeof e.getRanges)this._setRanges(e.getRanges(),e.isBackward);else if(e instanceof tl)this._setRanges([e],!!o&&!!o.backward);else if(e instanceof Ja)this._setRanges([new tl(e)]);else if(e instanceof Wa){const t=!!o&&!!o.backward;let i;if("in"==n)i=tl._createIn(e);else if("on"==n)i=tl._createOn(e);else{if(void 0===n)throw new l("model-selection-setto-required-second-parameter",[this,e]);i=new tl(Ja._createAt(e,n))}this._setRanges([i],t)}else{if(!bo(e))throw new l("model-selection-setto-not-selectable",[this,e]);this._setRanges(e,o&&!!o.backward)}}_setRanges(t,e=!1){const n=Array.from(t),o=n.some((e=>{if(!(e instanceof tl))throw new l("model-selection-set-ranges-not-range",[this,t]);return this._ranges.every((t=>!t.isEqual(e)))}));(n.length!==this._ranges.length||o)&&(this._replaceAllRanges(n),this._lastRangeBackward=!!e,this.fire("change:range",{directChange:!0}))}setFocus(t,e){if(null===this.anchor)throw new l("model-selection-setfocus-no-ranges",[this,t]);const n=Ja._createAt(t,e);if("same"==n.compareWith(this.focus))return;const o=this.anchor;this._ranges.length&&this._popRange(),"before"==n.compareWith(o)?(this._pushRange(new tl(n,o)),this._lastRangeBackward=!0):(this._pushRange(new tl(o,n)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(t){return this._attrs.has(t)}removeAttribute(t){this.hasAttribute(t)&&(this._attrs.delete(t),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}setAttribute(t,e){this.getAttribute(t)!==e&&(this._attrs.set(t,e),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const t=new WeakSet;for(const e of this.getRanges()){const n=dl(e.start,t);n&&hl(n,e)&&(yield n);for(const n of e.getWalker()){const o=n.item;"elementEnd"==n.type&&cl(o,t,e)&&(yield o)}const o=dl(e.end,t);o&&!e.end.isTouching(Ja._createAt(o,0))&&hl(o,e)&&(yield o)}}containsEntireContent(t=this.anchor.root){const e=Ja._createAt(t,0),n=Ja._createAt(t,"end");return e.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}_pushRange(t){this._checkRange(t),this._ranges.push(new tl(t.start,t.end))}_checkRange(t){for(let e=0;e<this._ranges.length;e++)if(t.isIntersecting(this._ranges[e]))throw new l("model-selection-range-intersects",[this,t],{addedRange:t,intersectingRange:this._ranges[e]})}_replaceAllRanges(t){this._removeAllRanges();for(const e of t)this._pushRange(e)}_removeAllRanges(){for(;this._ranges.length>0;)this._popRange()}_popRange(){this._ranges.pop()}}function ll(t,e){return!e.has(t)&&(e.add(t),t.root.document.model.schema.isBlock(t)&&t.parent)}function cl(t,e,n){return ll(t,e)&&hl(t,n)}function dl(t,e){const n=t.parent.root.document.model.schema,o=t.parent.getAncestors({parentFirst:!0,includeSelf:!0});let i=!1;const r=o.find((t=>!i&&(i=n.isLimit(t),!i&&ll(t,e))));return o.forEach((t=>e.add(t))),r}function hl(t,e){const n=function(t){const e=t.root.document.model.schema;let n=t.parent;for(;n;){if(e.isBlock(n))return n;n=n.parent}}(t);if(!n)return!0;return!e.containsRange(tl._createOn(n),!0)}al.prototype.is=function(t){return"selection"===t||"model:selection"===t};class ul extends(b(tl)){constructor(t,e){super(t,e),gl.call(this)}detach(){this.stopListening()}toRange(){return new tl(this.start,this.end)}static fromRange(t){return new ul(t.start,t.end)}}function gl(){this.listenTo(this.root.document.model,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&ml.call(this,n)}),{priority:"low"})}function ml(t){const e=this.getTransformedByOperation(t),n=tl._createFromRanges(e),o=!n.isEqual(this),i=function(t,e){switch(e.type){case"insert":return t.containsPosition(e.position);case"move":case"remove":case"reinsert":case"merge":return t.containsPosition(e.sourcePosition)||t.start.isEqual(e.sourcePosition)||t.containsPosition(e.targetPosition);case"split":return t.containsPosition(e.splitPosition)||t.containsPosition(e.insertionPosition)}return!1}(this,t);let r=null;if(o){"$graveyard"==n.root.rootName&&(r="remove"==t.type?t.sourcePosition:t.deletionPosition);const e=this.toRange();this.start=n.start,this.end=n.end,this.fire("change:range",e,{deletionPosition:r})}else i&&this.fire("change:content",this.toRange(),{deletionPosition:r})}ul.prototype.is=function(t){return"liveRange"===t||"model:liveRange"===t||"range"==t||"model:range"===t};const pl="selection:";class fl extends(b(qa)){constructor(t){super(),this._selection=new bl(t),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(t){return this._selection.containsEntireContent(t)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(t){return this._selection.getAttribute(t)}hasAttribute(t){return this._selection.hasAttribute(t)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(t){this._selection.observeMarkers(t)}_setFocus(t,e){this._selection.setFocus(t,e)}_setTo(...t){this._selection.setTo(...t)}_setAttribute(t,e){this._selection.setAttribute(t,e)}_removeAttribute(t){this._selection.removeAttribute(t)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(t){this._selection.restoreGravity(t)}static _getStoreAttributeKey(t){return pl+t}static _isStoreAttributeKey(t){return t.startsWith(pl)}}fl.prototype.is=function(t){return"selection"===t||"model:selection"==t||"documentSelection"==t||"model:documentSelection"==t};class bl extends al{constructor(t){super(),this.markers=new ko({idProperty:"name"}),this._model=t.model,this._document=t,this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this.listenTo(this._model,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&"marker"!=n.type&&"rename"!=n.type&&"noop"!=n.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",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((t,e,n,o)=>{this._updateMarker(e,o)})),this.listenTo(this._document,"change",((t,e)=>{!function(t,e){const n=t.document.differ;for(const o of n.getChanges()){if("insert"!=o.type)continue;const n=o.position.parent;o.length===n.maxOffset&&t.enqueueChange(e,(t=>{const e=Array.from(n.getAttributeKeys()).filter((t=>t.startsWith(pl)));for(const o of e)t.removeAttribute(o,n)}))}}(this._model,e)}))}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 t=0;t<this._ranges.length;t++)this._ranges[t].detach();this.stopListening()}*getRanges(){this._ranges.length?yield*super.getRanges():yield this._document._getDefaultRange()}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(...t){super.setTo(...t),this._updateAttributes(!0),this.updateMarkers()}setFocus(t,e){super.setFocus(t,e),this._updateAttributes(!0),this.updateMarkers()}setAttribute(t,e){if(this._setAttribute(t,e)){const e=[t];this.fire("change:attribute",{attributeKeys:e,directChange:!0})}}removeAttribute(t){if(this._removeAttribute(t)){const e=[t];this.fire("change:attribute",{attributeKeys:e,directChange:!0})}}overrideGravity(){const t=r();return this._overriddenGravityRegister.add(t),1===this._overriddenGravityRegister.size&&this._updateAttributes(!0),t}restoreGravity(t){if(!this._overriddenGravityRegister.has(t))throw new l("document-selection-gravity-wrong-restore",this,{uid:t});this._overriddenGravityRegister.delete(t),this.isGravityOverridden||this._updateAttributes(!0)}observeMarkers(t){this._observedMarkers.add(t),this.updateMarkers()}_replaceAllRanges(t){this._validateSelectionRanges(t),super._replaceAllRanges(t)}_popRange(){this._ranges.pop().detach()}_pushRange(t){const e=this._prepareRange(t);e&&this._ranges.push(e)}_validateSelectionRanges(t){for(const e of t)if(!this._document._validateSelectionRange(e))throw new l("document-selection-wrong-position",this,{range:e})}_prepareRange(t){if(this._checkRange(t),t.root==this._document.graveyard)return;const e=ul.fromRange(t);return e.on("change:range",((t,n,o)=>{if(this._hasChangedRange=!0,e.root==this._document.graveyard){this._selectionRestorePosition=o.deletionPosition;const t=this._ranges.indexOf(e);this._ranges.splice(t,1),e.detach()}})),e}updateMarkers(){if(!this._observedMarkers.size)return;const t=[];let e=!1;for(const e of this._model.markers){const n=e.name.split(":",1)[0];if(!this._observedMarkers.has(n))continue;const o=e.getRange();for(const n of this.getRanges())o.containsRange(n,!n.isCollapsed)&&t.push(e)}const n=Array.from(this.markers);for(const n of t)this.markers.has(n)||(this.markers.add(n),e=!0);for(const n of Array.from(this.markers))t.includes(n)||(this.markers.remove(n),e=!0);e&&this.fire("change:marker",{oldMarkers:n,directChange:!1})}_updateMarker(t,e){const n=t.name.split(":",1)[0];if(!this._observedMarkers.has(n))return;let o=!1;const i=Array.from(this.markers),r=this.markers.has(t);if(e){let n=!1;for(const t of this.getRanges())if(e.containsRange(t,!t.isCollapsed)){n=!0;break}n&&!r?(this.markers.add(t),o=!0):!n&&r&&(this.markers.remove(t),o=!0)}else r&&(this.markers.remove(t),o=!0);o&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateAttributes(t){const e=Vo(this._getSurroundingAttributes()),n=Vo(this.getAttributes());if(t)this._attributePriority=new Map,this._attrs=new Map;else for(const[t,e]of this._attributePriority)"low"==e&&(this._attrs.delete(t),this._attributePriority.delete(t));this._setAttributesTo(e);const o=[];for(const[t,e]of this.getAttributes())n.has(t)&&n.get(t)===e||o.push(t);for(const[t]of n)this.hasAttribute(t)||o.push(t);o.length>0&&this.fire("change:attribute",{attributeKeys:o,directChange:!1})}_setAttribute(t,e,n=!0){const o=n?"normal":"low";if("low"==o&&"normal"==this._attributePriority.get(t))return!1;return super.getAttribute(t)!==e&&(this._attrs.set(t,e),this._attributePriority.set(t,o),!0)}_removeAttribute(t,e=!0){const n=e?"normal":"low";return("low"!=n||"normal"!=this._attributePriority.get(t))&&(this._attributePriority.set(t,n),!!super.hasAttribute(t)&&(this._attrs.delete(t),!0))}_setAttributesTo(t){const e=new Set;for(const[e,n]of this.getAttributes())t.get(e)!==n&&this._removeAttribute(e,!1);for(const[n,o]of t){this._setAttribute(n,o,!1)&&e.add(n)}return e}*getStoredAttributes(){const t=this.getFirstPosition().parent;if(this.isCollapsed&&t.isEmpty)for(const e of t.getAttributeKeys())if(e.startsWith(pl)){const n=e.substr(pl.length);yield[n,t.getAttribute(e)]}}_getSurroundingAttributes(){const t=this.getFirstPosition(),e=this._model.schema;let n=null;if(this.isCollapsed){const o=t.textNode?t.textNode:t.nodeBefore,i=t.textNode?t.textNode:t.nodeAfter;if(this.isGravityOverridden||(n=kl(o)),n||(n=kl(i)),!this.isGravityOverridden&&!n){let t=o;for(;t&&!e.isInline(t)&&!n;)t=t.previousSibling,n=kl(t)}if(!n){let t=i;for(;t&&!e.isInline(t)&&!n;)t=t.nextSibling,n=kl(t)}n||(n=this.getStoredAttributes())}else{const t=this.getFirstRange();for(const o of t){if(o.item.is("element")&&e.isObject(o.item))break;if("text"==o.type){n=o.item.getAttributes();break}}}return n}_fixGraveyardSelection(t){const e=this._model.schema.getNearestSelectionRange(t);e&&this._pushRange(e)}}function kl(t){return t instanceof $a||t instanceof Ua?t.getAttributes():null}class wl{constructor(t){this._dispatchers=t}add(t){for(const e of this._dispatchers)t(e);return this}}const _l=function(t){return ho(t,5)};class Al extends wl{elementToElement(t){return this.add(function(t){const e=yl(t.model),n=xl(t.view,"container");e.attributes.length&&(e.children=!0);return o=>{o.on(`insert:${e.name}`,function(t,e=Rl){return(n,o,i)=>{if(!e(o.item,i.consumable,{preflight:!0}))return;const r=t(o.item,i,o);if(!r)return;e(o.item,i.consumable);const s=i.mapper.toViewPosition(o.range.start);i.mapper.bindElements(o.item,r),i.writer.insert(s,r),i.convertAttributes(o.item),Il(r,o.item.getChildren(),i,{reconversion:o.reconversion})}}(n,Bl(e)),{priority:t.converterPriority||"normal"}),(e.children||e.attributes.length)&&o.on("reduceChanges",Sl(e),{priority:"low"})}}(t))}elementToStructure(t){return this.add(function(t){const e=yl(t.model),n=xl(t.view,"container");return e.children=!0,o=>{if(o._conversionApi.schema.checkChild(e.name,"$text"))throw new l("conversion-element-to-structure-disallowed-text",o,{elementName:e.name});var i,r;o.on(`insert:${e.name}`,(i=n,r=Bl(e),(t,e,n)=>{if(!r(e.item,n.consumable,{preflight:!0}))return;const o=new Map;n.writer._registerSlotFactory(function(t,e,n){return(o,i="children")=>{const r=o.createContainerElement("$slot");let s=null;if("children"===i)s=Array.from(t.getChildren());else{if("function"!=typeof i)throw new l("conversion-slot-mode-unknown",n.dispatcher,{modeOrFilter:i});s=Array.from(t.getChildren()).filter((t=>i(t)))}return e.set(r,s),r}}(e.item,o,n));const s=i(e.item,n,e);if(n.writer._clearSlotFactory(),!s)return;!function(t,e,n){const o=Array.from(e.values()).flat(),i=new Set(o);if(i.size!=o.length)throw new l("conversion-slot-filter-overlap",n.dispatcher,{element:t});if(i.size!=t.childCount)throw new l("conversion-slot-filter-incomplete",n.dispatcher,{element:t})}(e.item,o,n),r(e.item,n.consumable);const a=n.mapper.toViewPosition(e.range.start);n.mapper.bindElements(e.item,s),n.writer.insert(a,s),n.convertAttributes(e.item),function(t,e,n,o){n.mapper.on("modelToViewPosition",s,{priority:"highest"});let i=null,r=null;for([i,r]of e)Il(t,r,n,o),n.writer.move(n.writer.createRangeIn(i),n.writer.createPositionBefore(i)),n.writer.remove(i);function s(t,e){const n=e.modelPosition.nodeAfter,o=r.indexOf(n);o<0||(e.viewPosition=e.mapper.findPositionIn(i,o))}n.mapper.off("modelToViewPosition",s)}(s,o,n,{reconversion:e.reconversion})}),{priority:t.converterPriority||"normal"}),o.on("reduceChanges",Sl(e),{priority:"low"})}}(t))}attributeToElement(t){return this.add(function(t){let e=(t=_l(t)).model;"string"==typeof e&&(e={key:e});let n=`attribute:${e.key}`;e.name&&(n+=":"+e.name);if(e.values)for(const n of e.values)t.view[n]=xl(t.view[n],"attribute");else t.view=xl(t.view,"attribute");const o=El(t);return e=>{e.on(n,function(t){return(e,n,o)=>{if(!o.consumable.test(n.item,e.name))return;const i=t(n.attributeOldValue,o,n),r=t(n.attributeNewValue,o,n);if(!i&&!r)return;o.consumable.consume(n.item,e.name);const s=o.writer,a=s.document.selection;if(n.item instanceof al||n.item instanceof fl)s.wrap(a.getFirstRange(),r);else{let t=o.mapper.toViewRange(n.range);null!==n.attributeOldValue&&i&&(t=s.unwrap(t,i)),null!==n.attributeNewValue&&r&&s.wrap(t,r)}}}(o),{priority:t.converterPriority||"normal"})}}(t))}attributeToAttribute(t){return this.add(function(t){let e=(t=_l(t)).model;"string"==typeof e&&(e={key:e});let n=`attribute:${e.key}`;e.name&&(n+=":"+e.name);if(e.values)for(const n of e.values)t.view[n]=Tl(t.view[n]);else t.view=Tl(t.view);const o=El(t);return e=>{var i;e.on(n,(i=o,(t,e,n)=>{if(!n.consumable.test(e.item,t.name))return;const o=i(e.attributeOldValue,n,e),r=i(e.attributeNewValue,n,e);if(!o&&!r)return;n.consumable.consume(e.item,t.name);const s=n.mapper.toViewElement(e.item),a=n.writer;if(!s)throw new l("conversion-attribute-to-attribute-on-text",n.dispatcher,e);if(null!==e.attributeOldValue&&o)if("class"==o.key){const t=_o(o.value);for(const e of t)a.removeClass(e,s)}else if("style"==o.key){const t=Object.keys(o.value);for(const e of t)a.removeStyle(e,s)}else a.removeAttribute(o.key,s);if(null!==e.attributeNewValue&&r)if("class"==r.key){const t=_o(r.value);for(const e of t)a.addClass(e,s)}else if("style"==r.key){const t=Object.keys(r.value);for(const e of t)a.setStyle(e,r.value[e],s)}else a.setAttribute(r.key,r.value,s)}),{priority:t.converterPriority||"normal"})}}(t))}markerToElement(t){return this.add(function(t){const e=xl(t.view,"ui");return n=>{var o;n.on(`addMarker:${t.model}`,(o=e,(t,e,n)=>{e.isOpening=!0;const i=o(e,n);e.isOpening=!1;const r=o(e,n);if(!i||!r)return;const s=e.markerRange;if(s.isCollapsed&&!n.consumable.consume(s,t.name))return;for(const e of s)if(!n.consumable.consume(e.item,t.name))return;const a=n.mapper,l=n.writer;l.insert(a.toViewPosition(s.start),i),n.mapper.bindElementToMarker(i,e.markerName),s.isCollapsed||(l.insert(a.toViewPosition(s.end),r),n.mapper.bindElementToMarker(r,e.markerName)),t.stop()}),{priority:t.converterPriority||"normal"}),n.on(`removeMarker:${t.model}`,((t,e,n)=>{const o=n.mapper.markerNameToElements(e.markerName);if(o){for(const t of o)n.mapper.unbindElementFromMarkerName(t,e.markerName),n.writer.clear(n.writer.createRangeOn(t),t);n.writer.clearClonedElementsGroup(e.markerName),t.stop()}}),{priority:t.converterPriority||"normal"})}}(t))}markerToHighlight(t){return this.add(function(t){return e=>{var n;e.on(`addMarker:${t.model}`,(n=t.view,(t,e,o)=>{if(!e.item)return;if(!(e.item instanceof al||e.item instanceof fl||e.item.is("$textProxy")))return;const i=Dl(n,e,o);if(!i)return;if(!o.consumable.consume(e.item,t.name))return;const r=o.writer,s=Cl(r,i),a=r.document.selection;if(e.item instanceof al||e.item instanceof fl)r.wrap(a.getFirstRange(),s);else{const t=o.mapper.toViewRange(e.range),n=r.wrap(t,s);for(const t of n.getItems())if(t.is("attributeElement")&&t.isSimilar(s)){o.mapper.bindElementToMarker(t,e.markerName);break}}}),{priority:t.converterPriority||"normal"}),e.on(`addMarker:${t.model}`,function(t){return(e,n,o)=>{if(!n.item)return;if(!(n.item instanceof Ga))return;const i=Dl(t,n,o);if(!i)return;if(!o.consumable.test(n.item,e.name))return;const r=o.mapper.toViewElement(n.item);if(r&&r.getCustomProperty("addHighlight")){o.consumable.consume(n.item,e.name);for(const t of tl._createIn(n.item))o.consumable.consume(t.item,e.name);r.getCustomProperty("addHighlight")(r,i,o.writer),o.mapper.bindElementToMarker(r,n.markerName)}}}(t.view),{priority:t.converterPriority||"normal"}),e.on(`removeMarker:${t.model}`,function(t){return(e,n,o)=>{if(n.markerRange.isCollapsed)return;const i=Dl(t,n,o);if(!i)return;const r=Cl(o.writer,i),s=o.mapper.markerNameToElements(n.markerName);if(s){for(const t of s)if(o.mapper.unbindElementFromMarkerName(t,n.markerName),t.is("attributeElement"))o.writer.unwrap(o.writer.createRangeOn(t),r);else{t.getCustomProperty("removeHighlight")(t,i.id,o.writer)}o.writer.clearClonedElementsGroup(n.markerName),e.stop()}}}(t.view),{priority:t.converterPriority||"normal"})}}(t))}markerToData(t){return this.add(function(t){const e=(t=_l(t)).model;let n=t.view;n||(n=n=>({group:e,name:n.substr(t.model.length+1)}));return o=>{var i;o.on(`addMarker:${e}`,(i=n,(t,e,n)=>{const o=i(e.markerName,n);if(!o)return;const r=e.markerRange;n.consumable.consume(r,t.name)&&(vl(r,!1,n,e,o),vl(r,!0,n,e,o),t.stop())}),{priority:t.converterPriority||"normal"}),o.on(`removeMarker:${e}`,function(t){return(e,n,o)=>{const i=t(n.markerName,o);if(!i)return;const r=o.mapper.markerNameToElements(n.markerName);if(r){for(const t of r)o.mapper.unbindElementFromMarkerName(t,n.markerName),t.is("containerElement")?(s(`data-${i.group}-start-before`,t),s(`data-${i.group}-start-after`,t),s(`data-${i.group}-end-before`,t),s(`data-${i.group}-end-after`,t)):o.writer.clear(o.writer.createRangeOn(t),t);o.writer.clearClonedElementsGroup(n.markerName),e.stop()}function s(t,e){if(e.hasAttribute(t)){const n=new Set(e.getAttribute(t).split(","));n.delete(i.name),0==n.size?o.writer.removeAttribute(t,e):o.writer.setAttribute(t,Array.from(n).join(","),e)}}}}(n),{priority:t.converterPriority||"normal"})}}(t))}}function Cl(t,e){const n=t.createAttributeElement("span",e.attributes);return e.classes&&n._addClass(e.classes),"number"==typeof e.priority&&(n._priority=e.priority),n._id=e.id,n}function vl(t,e,n,o,i){const r=e?t.start:t.end,s=r.nodeAfter&&r.nodeAfter.is("element")?r.nodeAfter:null,a=r.nodeBefore&&r.nodeBefore.is("element")?r.nodeBefore:null;if(s||a){let t,r;e&&s||!e&&!a?(t=s,r=!0):(t=a,r=!1);const l=n.mapper.toViewElement(t);if(l)return void function(t,e,n,o,i,r){const s=`data-${r.group}-${e?"start":"end"}-${n?"before":"after"}`,a=t.hasAttribute(s)?t.getAttribute(s).split(","):[];a.unshift(r.name),o.writer.setAttribute(s,a.join(","),t),o.mapper.bindElementToMarker(t,i.markerName)}(l,e,r,n,o,i)}!function(t,e,n,o,i){const r=`${i.group}-${e?"start":"end"}`,s=i.name?{name:i.name}:null,a=n.writer.createUIElement(r,s);n.writer.insert(t,a),n.mapper.bindElementToMarker(a,o.markerName)}(n.mapper.toViewPosition(r),e,n,o,i)}function yl(t){return"string"==typeof t&&(t={name:t}),t.attributes?Array.isArray(t.attributes)||(t.attributes=[t.attributes]):t.attributes=[],t.children=!!t.children,t}function xl(t,e){return"function"==typeof t?t:(n,o)=>function(t,e,n){"string"==typeof t&&(t={name:t});let o;const i=e.writer,r=Object.assign({},t.attributes);if("container"==n)o=i.createContainerElement(t.name,r);else if("attribute"==n){const e={priority:t.priority||or.DEFAULT_PRIORITY};o=i.createAttributeElement(t.name,r,e)}else o=i.createUIElement(t.name,r);if(t.styles){const e=Object.keys(t.styles);for(const n of e)i.setStyle(n,t.styles[n],o)}if(t.classes){const e=t.classes;if("string"==typeof e)i.addClass(e,o);else for(const t of e)i.addClass(t,o)}return o}(t,o,e)}function El(t){return t.model.values?(e,n,o)=>{const i=t.view[e];return i?i(e,n,o):null}:t.view}function Tl(t){return"string"==typeof t?e=>({key:t,value:e}):"object"==typeof t?t.value?()=>t:e=>({key:t.key,value:e}):t}function Dl(t,e,n){const o="function"==typeof t?t(e,n):t;return o?(o.priority||(o.priority=10),o.id||(o.id=e.markerName),o):null}function Sl(t){const e=function(t){return(e,n)=>{if(!e.is("element",t.name))return!1;if("attribute"==n.type){if(t.attributes.includes(n.attributeKey))return!0}else if(t.children)return!0;return!1}}(t);return(t,n)=>{const o=[];n.reconvertedElements||(n.reconvertedElements=new Set);for(const t of n.changes){const i="attribute"==t.type?t.range.start.nodeAfter:t.position.parent;if(i&&e(i,t)){if(!n.reconvertedElements.has(i)){n.reconvertedElements.add(i);const t=Ja._createBefore(i);o.push({type:"remove",name:i.name,position:t,length:1},{type:"reinsert",name:i.name,position:t,length:1})}}else o.push(t)}n.changes=o}}function Bl(t){return(e,n,o={})=>{const i=["insert"];for(const n of t.attributes)e.hasAttribute(n)&&i.push(`attribute:${n}`);return!!i.every((t=>n.test(e,t)))&&(o.preflight||i.forEach((t=>n.consume(e,t))),!0)}}function Il(t,e,n,o){for(const i of e)Pl(t.root,i,n,o)||n.convertItem(i)}function Pl(t,e,n,o){const{writer:i,mapper:r}=n;if(!o.reconversion)return!1;const s=r.toViewElement(e);return!(!s||s.root==t)&&(!!n.canReuseView(s)&&(i.move(i.createRangeOn(s),r.toViewPosition(Ja._createBefore(e))),!0))}function Rl(t,e,{preflight:n}={}){return n?e.test(t,"insert"):e.consume(t,"insert")}function zl(t){const{schema:e,document:n}=t.model;for(const o of n.getRootNames()){const i=n.getRoot(o);if(i.isEmpty&&!e.checkChild(i,"$text")&&e.checkChild(i,"paragraph"))return t.insertElement("paragraph",i),!0}return!1}function Vl(t,e,n){const o=n.createContext(t);return!!n.checkChild(o,"paragraph")&&!!n.checkChild(o.push("paragraph"),e)}function Fl(t,e){const n=e.createElement("paragraph");return e.insert(n,t),e.createPositionAt(n,0)}class Ol extends wl{elementToElement(t){return this.add(Nl(t))}elementToAttribute(t){return this.add(function(t){Hl(t=_l(t));const e=ql(t,!1),n=Ml(t.view),o=n?`element:${n}`:"element";return n=>{n.on(o,e,{priority:t.converterPriority||"low"})}}(t))}attributeToAttribute(t){return this.add(function(t){t=_l(t);let e=null;("string"==typeof t.view||t.view.key)&&(e=function(t){"string"==typeof t.view&&(t.view={key:t.view});const e=t.view.key;let n;if("class"==e||"style"==e){n={["class"==e?"classes":"styles"]:t.view.value}}else{n={attributes:{[e]:void 0===t.view.value?/[\s\S]*/:t.view.value}}}t.view.name&&(n.name=t.view.name);return t.view=n,e}(t));Hl(t,e);const n=ql(t,!0);return e=>{e.on("element",n,{priority:t.converterPriority||"low"})}}(t))}elementToMarker(t){return this.add(function(t){const e=function(t){return(e,n)=>{const o="string"==typeof t?t:t(e,n);return n.writer.createElement("$marker",{"data-name":o})}}(t.model);return Nl({...t,model:e})}(t))}dataToMarker(t){return this.add(function(t){(t=_l(t)).model||(t.model=e=>e?t.view+":"+e:t.view);const e={view:t.view,model:t.model},n=Ll(Wl(e,"start")),o=Ll(Wl(e,"end"));return i=>{i.on(`element:${t.view}-start`,n,{priority:t.converterPriority||"normal"}),i.on(`element:${t.view}-end`,o,{priority:t.converterPriority||"normal"});const r=s.get("low"),a=s.get("highest"),l=s.get(t.converterPriority)/a;i.on("element",function(t){return(e,n,o)=>{const i=`data-${t.view}`;function r(e,i){for(const r of i){const i=t.model(r,o),s=o.writer.createElement("$marker",{"data-name":i});o.writer.insert(s,e),n.modelCursor.isEqual(e)?n.modelCursor=n.modelCursor.getShiftedBy(1):n.modelCursor=n.modelCursor._getTransformedByInsertion(e,1),n.modelRange=n.modelRange._getTransformedByInsertion(e,1)[0]}}(o.consumable.test(n.viewItem,{attributes:i+"-end-after"})||o.consumable.test(n.viewItem,{attributes:i+"-start-after"})||o.consumable.test(n.viewItem,{attributes:i+"-end-before"})||o.consumable.test(n.viewItem,{attributes:i+"-start-before"}))&&(n.modelRange||Object.assign(n,o.convertChildren(n.viewItem,n.modelCursor)),o.consumable.consume(n.viewItem,{attributes:i+"-end-after"})&&r(n.modelRange.end,n.viewItem.getAttribute(i+"-end-after").split(",")),o.consumable.consume(n.viewItem,{attributes:i+"-start-after"})&&r(n.modelRange.end,n.viewItem.getAttribute(i+"-start-after").split(",")),o.consumable.consume(n.viewItem,{attributes:i+"-end-before"})&&r(n.modelRange.start,n.viewItem.getAttribute(i+"-end-before").split(",")),o.consumable.consume(n.viewItem,{attributes:i+"-start-before"})&&r(n.modelRange.start,n.viewItem.getAttribute(i+"-start-before").split(",")))}}(e),{priority:r+l})}}(t))}}function Nl(t){const e=Ll(t=_l(t)),n=Ml(t.view),o=n?`element:${n}`:"element";return n=>{n.on(o,e,{priority:t.converterPriority||"normal"})}}function Ml(t){return"string"==typeof t?t:"object"==typeof t&&"string"==typeof t.name?t.name:null}function Ll(t){const e=new Fo(t.view);return(n,o,i)=>{const r=e.match(o.viewItem);if(!r)return;const s=r.match;if(s.name=!0,!i.consumable.test(o.viewItem,s))return;const a=function(t,e,n){return t instanceof Function?t(e,n):n.writer.createElement(t)}(t.model,o.viewItem,i);a&&i.safeInsert(a,o.modelCursor)&&(i.consumable.consume(o.viewItem,s),i.convertChildren(o.viewItem,a),i.updateConversionResult(a,o))}}function Hl(t,e=null){const n=null===e||(t=>t.getAttribute(e)),o="object"!=typeof t.model?t.model:t.model.key,i="object"!=typeof t.model||void 0===t.model.value?n:t.model.value;t.model={key:o,value:i}}function ql(t,e){const n=new Fo(t.view);return(o,i,r)=>{if(!i.modelRange&&e)return;const s=n.match(i.viewItem);if(!s)return;if(!function(t,e){const n="function"==typeof t?t(e):t;if("object"==typeof n&&!Ml(n))return!1;return!n.classes&&!n.attributes&&!n.styles}(t.view,i.viewItem)?delete s.match.name:s.match.name=!0,!r.consumable.test(i.viewItem,s.match))return;const a=t.model.key,l="function"==typeof t.model.value?t.model.value(i.viewItem,r):t.model.value;if(null===l)return;i.modelRange||Object.assign(i,r.convertChildren(i.viewItem,i.modelCursor));const c=function(t,e,n,o){let i=!1;for(const r of Array.from(t.getItems({shallow:n})))o.schema.checkAttribute(r,e.key)&&(i=!0,r.hasAttribute(e.key)||o.writer.setAttribute(e.key,e.value,r));return i}(i.modelRange,{key:a,value:l},e,r);c&&(r.consumable.test(i.viewItem,{name:!0})&&(s.match.name=!0),r.consumable.consume(i.viewItem,s.match))}}function Wl(t,e){return{view:`${t.view}-${e}`,model:(e,n)=>{const o=e.getAttribute("name"),i=t.model(o,n);return n.writer.createElement("$marker",{"data-name":i})}}}class jl extends R{constructor(t,e){super(),this.model=t,this.view=new Ha(e),this.mapper=new el,this.downcastDispatcher=new il({mapper:this.mapper,schema:t.schema});const n=this.model.document,o=n.selection,i=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(n,"change",(()=>{this.view.change((t=>{this.downcastDispatcher.convertChanges(n.differ,i,t),this.downcastDispatcher.convertSelection(o,i,t)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(t,e){return(n,o)=>{const i=o.newSelection,r=[];for(const t of i.getRanges())r.push(e.toModelRange(t));const s=t.createSelection(r,{backward:i.isBackward});s.isEqual(t.document.selection)||t.change((t=>{t.setSelection(s)}))}}(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",((t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const o=n.writer,i=n.mapper.toViewPosition(e.range.start),r=o.createText(e.item.data);o.insert(i,r)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((t,e,n)=>{n.convertAttributes(e.item),e.reconversion||!e.item.is("element")||e.item.isEmpty||n.convertChildren(e.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((t,e,n)=>{const o=n.mapper.toViewPosition(e.position),i=e.position.getShiftedBy(e.length),r=n.mapper.toViewPosition(i,{isPhantom:!0}),s=n.writer.createRange(o,r),a=n.writer.remove(s.getTrimmed());for(const t of n.writer.createRangeIn(a).getItems())n.mapper.unbindViewElement(t,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("selection",((t,e,n)=>{const o=n.writer,i=o.document.selection;for(const t of i.getRanges())t.isCollapsed&&t.end.parent.isAttached()&&n.writer.mergeAttributes(t.start);o.setSelection(null)}),{priority:"high"}),this.downcastDispatcher.on("selection",((t,e,n)=>{const o=e.selection;if(o.isCollapsed)return;if(!n.consumable.consume(o,"selection"))return;const i=[];for(const t of o.getRanges())i.push(n.mapper.toViewRange(t));n.writer.setSelection(i,{backward:o.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((t,e,n)=>{const o=e.selection;if(!o.isCollapsed)return;if(!n.consumable.consume(o,"selection"))return;const i=n.writer,r=o.getFirstPosition(),s=n.mapper.toViewPosition(r),a=i.breakAttributes(s);i.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((t=>{if("$graveyard"==t.rootName)return null;const e=new Hi(this.view.document,t.name);return e.rootName=t.rootName,this.mapper.bindElements(t,e),e}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(t){const e="string"==typeof t?t:t.name,n=this.model.markers.get(e);if(!n)throw new l("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:e});this.model.change((()=>{this.model.markers._refresh(n)}))}reconvertItem(t){this.model.change((()=>{this.model.document.differ._refreshItem(t)}))}}class Ul{constructor(){this._commands=new Map}add(t,e){this._commands.set(t,e)}get(t){return this._commands.get(t)}execute(t,...e){const n=this.get(t);if(!n)throw new l("commandcollection-command-not-found",this,{commandName:t});return n.execute(...e)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const t of this.commands())t.destroy()}}class $l{constructor(){this._consumables=new Map}add(t,e){let n;t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!0):(this._consumables.has(t)?n=this._consumables.get(t):(n=new Kl(t),this._consumables.set(t,n)),n.add(e))}test(t,e){const n=this._consumables.get(t);return void 0===n?null:t.is("$text")||t.is("documentFragment")?n:n.test(e)}consume(t,e){return!!this.test(t,e)&&(t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!1):this._consumables.get(t).consume(e),!0)}revert(t,e){const n=this._consumables.get(t);void 0!==n&&(t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!0):n.revert(e))}static consumablesFromElement(t){const e={element:t,name:!0,attributes:[],classes:[],styles:[]},n=t.getAttributeKeys();for(const t of n)"style"!=t&&"class"!=t&&e.attributes.push(t);const o=t.getClassNames();for(const t of o)e.classes.push(t);const i=t.getStyleNames();for(const t of i)e.styles.push(t);return e}static createFrom(t,e){if(e||(e=new $l),t.is("$text"))return e.add(t),e;t.is("element")&&e.add(t,$l.consumablesFromElement(t)),t.is("documentFragment")&&e.add(t);for(const n of t.getChildren())e=$l.createFrom(n,e);return e}}const Gl=["attributes","classes","styles"];class Kl{constructor(t){this.element=t,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(t){t.name&&(this._canConsumeName=!0);for(const e of Gl)e in t&&this._add(e,t[e])}test(t){if(t.name&&!this._canConsumeName)return this._canConsumeName;for(const e of Gl)if(e in t){const n=this._test(e,t[e]);if(!0!==n)return n}return!0}consume(t){t.name&&(this._canConsumeName=!1);for(const e of Gl)e in t&&this._consume(e,t[e])}revert(t){t.name&&(this._canConsumeName=!0);for(const e of Gl)e in t&&this._revert(e,t[e])}_add(t,e){const n=xe(e)?e:[e],o=this._consumables[t];for(const e of n){if("attributes"===t&&("class"===e||"style"===e))throw new l("viewconsumable-invalid-attribute",this);if(o.set(e,!0),"styles"===t)for(const t of this.element.document.stylesProcessor.getRelatedStyles(e))o.set(t,!0)}}_test(t,e){const n=xe(e)?e:[e],o=this._consumables[t];for(const e of n)if("attributes"!==t||"class"!==e&&"style"!==e){const t=o.get(e);if(void 0===t)return null;if(!t)return!1}else{const t="class"==e?"classes":"styles",n=this._test(t,[...this._consumables[t].keys()]);if(!0!==n)return n}return!0}_consume(t,e){const n=xe(e)?e:[e],o=this._consumables[t];for(const e of n)if("attributes"!==t||"class"!==e&&"style"!==e){if(o.set(e,!1),"styles"==t)for(const t of this.element.document.stylesProcessor.getRelatedStyles(e))o.set(t,!1)}else{const t="class"==e?"classes":"styles";this._consume(t,[...this._consumables[t].keys()])}}_revert(t,e){const n=xe(e)?e:[e],o=this._consumables[t];for(const e of n)if("attributes"!==t||"class"!==e&&"style"!==e){!1===o.get(e)&&o.set(e,!0)}else{const t="class"==e?"classes":"styles";this._revert(t,[...this._consumables[t].keys()])}}}class Zl extends R{constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((t,e)=>{e[0]=new Jl(e[0])}),{priority:"highest"}),this.on("checkChild",((t,e)=>{e[0]=new Jl(e[0]),e[1]=this.getDefinition(e[1])}),{priority:"highest"})}register(t,e){if(this._sourceDefinitions[t])throw new l("schema-cannot-register-item-twice",this,{itemName:t});this._sourceDefinitions[t]=[Object.assign({},e)],this._clearCache()}extend(t,e){if(!this._sourceDefinitions[t])throw new l("schema-cannot-extend-missing-item",this,{itemName:t});this._sourceDefinitions[t].push(Object.assign({},e)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(t){let e;return e="string"==typeof t?t:"is"in t&&(t.is("$text")||t.is("$textProxy"))?"$text":t.name,this.getDefinitions()[e]}isRegistered(t){return!!this.getDefinition(t)}isBlock(t){const e=this.getDefinition(t);return!(!e||!e.isBlock)}isLimit(t){const e=this.getDefinition(t);return!!e&&!(!e.isLimit&&!e.isObject)}isObject(t){const e=this.getDefinition(t);return!!e&&!!(e.isObject||e.isLimit&&e.isSelectable&&e.isContent)}isInline(t){const e=this.getDefinition(t);return!(!e||!e.isInline)}isSelectable(t){const e=this.getDefinition(t);return!!e&&!(!e.isSelectable&&!e.isObject)}isContent(t){const e=this.getDefinition(t);return!!e&&!(!e.isContent&&!e.isObject)}checkChild(t,e){return!!e&&this._checkContextMatch(e,t)}checkAttribute(t,e){const n=this.getDefinition(t.last);return!!n&&n.allowAttributes.includes(e)}checkMerge(t,e){if(t instanceof Ja){const e=t.nodeBefore,n=t.nodeAfter;if(!(e instanceof Ga))throw new l("schema-check-merge-no-element-before",this);if(!(n instanceof Ga))throw new l("schema-check-merge-no-element-after",this);return this.checkMerge(e,n)}for(const n of e.getChildren())if(!this.checkChild(t,n))return!1;return!0}addChildCheck(t){this.on("checkChild",((e,[n,o])=>{if(!o)return;const i=t(n,o);"boolean"==typeof i&&(e.stop(),e.return=i)}),{priority:"high"})}addAttributeCheck(t){this.on("checkAttribute",((e,[n,o])=>{const i=t(n,o);"boolean"==typeof i&&(e.stop(),e.return=i)}),{priority:"high"})}setAttributeProperties(t,e){this._attributeProperties[t]=Object.assign(this.getAttributeProperties(t),e)}getAttributeProperties(t){return this._attributeProperties[t]||{}}getLimitElement(t){let e;if(t instanceof Ja)e=t.parent;else{e=(t instanceof tl?[t]:Array.from(t.getRanges())).reduce(((t,e)=>{const n=e.getCommonAncestor();return t?t.getCommonAncestor(n,{includeSelf:!0}):n}),null)}for(;!this.isLimit(e)&&e.parent;)e=e.parent;return e}checkAttributeInSelection(t,e){if(t.isCollapsed){const n=[...t.getFirstPosition().getAncestors(),new Ua("",t.getAttributes())];return this.checkAttribute(n,e)}{const n=t.getRanges();for(const t of n)for(const n of t)if(this.checkAttribute(n.item,e))return!0}return!1}*getValidRanges(t,e){t=function*(t){for(const e of t)yield*e.getMinimalFlatRanges()}(t);for(const n of t)yield*this._getValidRangesForRange(n,e)}getNearestSelectionRange(t,e="both"){if(this.checkChild(t,"$text"))return new tl(t);let n,o;const i=t.getAncestors().reverse().find((t=>this.isLimit(t)))||t.root;"both"!=e&&"backward"!=e||(n=new Ka({boundaries:tl._createIn(i),startPosition:t,direction:"backward"})),"both"!=e&&"forward"!=e||(o=new Ka({boundaries:tl._createIn(i),startPosition:t}));for(const t of function*(t,e){let n=!1;for(;!n;){if(n=!0,t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}if(e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}}}(n,o)){const e=t.walker==n?"elementEnd":"elementStart",o=t.value;if(o.type==e&&this.isObject(o.item))return tl._createOn(o.item);if(this.checkChild(o.nextPosition,"$text"))return new tl(o.nextPosition)}return null}findAllowedParent(t,e){let n=t.parent;for(;n;){if(this.checkChild(n,e))return n;if(this.isLimit(n))return null;n=n.parent}return null}setAllowedAttributes(t,e,n){const o=n.model;for(const[i,r]of Object.entries(e))o.schema.checkAttribute(t,i)&&n.setAttribute(i,r,t)}removeDisallowedAttributes(t,e){for(const n of t)if(n.is("$text"))cc(this,n,e);else{const t=tl._createIn(n).getPositions();for(const n of t){cc(this,n.nodeBefore||n.parent,e)}}}getAttributesWithProperty(t,e,n){const o={};for(const[i,r]of t.getAttributes()){const t=this.getAttributeProperties(i);void 0!==t[e]&&(void 0!==n&&n!==t[e]||(o[i]=r))}return o}createContext(t){return new Jl(t)}_clearCache(){this._compiledDefinitions=null}_compile(){const t={},e=this._sourceDefinitions,n=Object.keys(e);for(const o of n)t[o]=Yl(e[o],o);for(const e of n)Ql(t,e);for(const e of n)Xl(t,e);for(const e of n)tc(t,e);for(const e of n)ec(t,e),nc(t,e);for(const e of n)oc(t,e),ic(t,e),rc(t,e);this._compiledDefinitions=t}_checkContextMatch(t,e,n=e.length-1){const o=e.getItem(n);if(t.allowIn.includes(o.name)){if(0==n)return!0;{const t=this.getDefinition(o);return this._checkContextMatch(t,e,n-1)}}return!1}*_getValidRangesForRange(t,e){let n=t.start,o=t.start;for(const i of t.getItems({shallow:!0}))i.is("element")&&(yield*this._getValidRangesForRange(tl._createIn(i),e)),this.checkAttribute(i,e)||(n.isEqual(o)||(yield new tl(n,o)),n=Ja._createAfter(i)),o=Ja._createAfter(i);n.isEqual(o)||(yield new tl(n,o))}}class Jl{constructor(t){if(t instanceof Jl)return t;let e;e="string"==typeof t?[t]:Array.isArray(t)?t:t.getAncestors({includeSelf:!0}),this._items=e.map(lc)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(t){const e=new Jl([t]);return e._items=[...this._items,...e._items],e}getItem(t){return this._items[t]}*getNames(){yield*this._items.map((t=>t.name))}endsWith(t){return Array.from(this.getNames()).join(" ").endsWith(t)}startsWith(t){return Array.from(this.getNames()).join(" ").startsWith(t)}}function Yl(t,e){const n={name:e,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(t,e){for(const n of t){const t=Object.keys(n).filter((t=>t.startsWith("is")));for(const o of t)e[o]=!!n[o]}}(t,n),sc(t,n,"allowIn"),sc(t,n,"allowContentOf"),sc(t,n,"allowWhere"),sc(t,n,"allowAttributes"),sc(t,n,"allowAttributesOf"),sc(t,n,"allowChildren"),sc(t,n,"inheritTypesFrom"),function(t,e){for(const n of t){const t=n.inheritAllFrom;t&&(e.allowContentOf.push(t),e.allowWhere.push(t),e.allowAttributesOf.push(t),e.inheritTypesFrom.push(t))}}(t,n),n}function Ql(t,e){const n=t[e];for(const o of n.allowChildren){const n=t[o];n&&n.allowIn.push(e)}n.allowChildren.length=0}function Xl(t,e){for(const n of t[e].allowContentOf)if(t[n]){ac(t,n).forEach((t=>{t.allowIn.push(e)}))}delete t[e].allowContentOf}function tc(t,e){for(const n of t[e].allowWhere){const o=t[n];if(o){const n=o.allowIn;t[e].allowIn.push(...n)}}delete t[e].allowWhere}function ec(t,e){for(const n of t[e].allowAttributesOf){const o=t[n];if(o){const n=o.allowAttributes;t[e].allowAttributes.push(...n)}}delete t[e].allowAttributesOf}function nc(t,e){const n=t[e];for(const e of n.inheritTypesFrom){const o=t[e];if(o){const t=Object.keys(o).filter((t=>t.startsWith("is")));for(const e of t)e in n||(n[e]=o[e])}}delete n.inheritTypesFrom}function oc(t,e){const n=t[e],o=n.allowIn.filter((e=>t[e]));n.allowIn=Array.from(new Set(o))}function ic(t,e){const n=t[e];for(const o of n.allowIn){t[o].allowChildren.push(e)}}function rc(t,e){const n=t[e];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function sc(t,e,n){for(const o of t){const t=o[n];"string"==typeof t?e[n].push(t):Array.isArray(t)&&e[n].push(...t)}}function ac(t,e){const n=t[e];return(o=t,Object.keys(o).map((t=>o[t]))).filter((t=>t.allowIn.includes(n.name)));var o}function lc(t){return"string"==typeof t||t.is("documentFragment")?{name:"string"==typeof t?t:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:t.is("element")?t.name:"$text",*getAttributeKeys(){yield*t.getAttributeKeys()},getAttribute:e=>t.getAttribute(e)}}function cc(t,e,n){for(const o of e.getAttributeKeys())t.checkAttribute(e,o)||n.removeAttribute(o,e)}class dc extends k{constructor(t){super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi={...t,consumable:null,writer:null,store:null,convertItem:(t,e)=>this._convertItem(t,e),convertChildren:(t,e)=>this._convertChildren(t,e),safeInsert:(t,e)=>this._safeInsert(t,e),updateConversionResult:(t,e)=>this._updateConversionResult(t,e),splitToAllowedParent:(t,e)=>this._splitToAllowedParent(t,e),getSplitParts:t=>this._getSplitParts(t),keepEmptyElement:t=>this._keepEmptyElement(t)}}convert(t,e,n=["$root"]){this.fire("viewCleanup",t),this._modelCursor=function(t,e){let n;for(const o of new Jl(t)){const t={};for(const e of o.getAttributeKeys())t[e]=o.getAttribute(e);const i=e.createElement(o.name,t);n&&e.insert(i,n),n=Ja._createAt(i,0)}return n}(n,e),this.conversionApi.writer=e,this.conversionApi.consumable=$l.createFrom(t),this.conversionApi.store={};const{modelRange:o}=this._convertItem(t,this._modelCursor),i=e.createDocumentFragment();if(o){this._removeEmptyElements();for(const t of Array.from(this._modelCursor.parent.getChildren()))e.append(t,i);i.markers=function(t,e){const n=new Set,o=new Map,i=tl._createIn(t).getItems();for(const t of i)t.is("element","$marker")&&n.add(t);for(const t of n){const n=t.getAttribute("data-name"),i=e.createPositionBefore(t);o.has(n)?o.get(n).end=i.clone():o.set(n,new tl(i.clone())),e.remove(t)}return o}(i,e)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,i}_convertItem(t,e){const n={viewItem:t,modelCursor:e,modelRange:null};if(t.is("element")?this.fire(`element:${t.name}`,n,this.conversionApi):t.is("$text")?this.fire("text",n,this.conversionApi):this.fire("documentFragment",n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof tl))throw new l("view-conversion-dispatcher-incorrect-result",this);return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(t,e){let n=e.is("position")?e:Ja._createAt(e,0);const o=new tl(n);for(const e of Array.from(t.getChildren())){const t=this._convertItem(e,n);t.modelRange instanceof tl&&(o.end=t.modelRange.end,n=t.modelCursor)}return{modelRange:o,modelCursor:n}}_safeInsert(t,e){const n=this._splitToAllowedParent(t,e);return!!n&&(this.conversionApi.writer.insert(t,n.position),!0)}_updateConversionResult(t,e){const n=this._getSplitParts(t),o=this.conversionApi.writer;e.modelRange||(e.modelRange=o.createRange(o.createPositionBefore(t),o.createPositionAfter(n[n.length-1])));const i=this._cursorParents.get(t);e.modelCursor=i?o.createPositionAt(i,0):e.modelRange.end}_splitToAllowedParent(t,e){const{schema:n,writer:o}=this.conversionApi;let i=n.findAllowedParent(e,t);if(i){if(i===e.parent)return{position:e};this._modelCursor.parent.getAncestors().includes(i)&&(i=null)}if(!i)return Vl(e,t,n)?{position:Fl(e,o)}:null;const r=this.conversionApi.writer.split(e,i),s=[];for(const t of r.range.getWalker())if("elementEnd"==t.type)s.push(t.item);else{const e=s.pop(),n=t.item;this._registerSplitPair(e,n)}const a=r.range.end.parent;return this._cursorParents.set(t,a),{position:r.position,cursorParent:a}}_registerSplitPair(t,e){this._splitParts.has(t)||this._splitParts.set(t,[t]);const n=this._splitParts.get(t);this._splitParts.set(e,n),n.push(e)}_getSplitParts(t){let e;return e=this._splitParts.has(t)?this._splitParts.get(t):[t],e}_keepEmptyElement(t){this._emptyElementsToKeep.add(t)}_removeEmptyElements(){let t=!1;for(const e of this._splitParts.keys())e.isEmpty&&!this._emptyElementsToKeep.has(e)&&(this.conversionApi.writer.remove(e),this._splitParts.delete(e),t=!0);t&&this._removeEmptyElements()}}class hc{getHtml(t){const e=document.implementation.createHTMLDocument("").createElement("div");return e.appendChild(t),e.innerHTML}}class uc{constructor(t){this.domParser=new DOMParser,this.domConverter=new ps(t,{renderingMode:"data"}),this.htmlWriter=new hc}toData(t){const e=this.domConverter.viewToDom(t);return this.htmlWriter.getHtml(e)}toView(t){const e=this._toDom(t);return this.domConverter.domToView(e)}registerRawContentMatcher(t){this.domConverter.registerRawContentMatcher(t)}useFillerType(t){this.domConverter.blockFillerMode="marked"==t?"markedNbsp":"nbsp"}_toDom(t){t.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(t=`<body>${t}</body>`);const e=this.domParser.parseFromString(t,"text/html"),n=e.createDocumentFragment(),o=e.body.childNodes;for(;o.length>0;)n.appendChild(o[0]);return n}}class gc extends k{constructor(t,e){super(),this.model=t,this.mapper=new el,this.downcastDispatcher=new il({mapper:this.mapper,schema:t.schema}),this.downcastDispatcher.on("insert:$text",((t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const o=n.writer,i=n.mapper.toViewPosition(e.range.start),r=o.createText(e.item.data);o.insert(i,r)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((t,e,n)=>{n.convertAttributes(e.item),e.reconversion||!e.item.is("element")||e.item.isEmpty||n.convertChildren(e.item)}),{priority:"lowest"}),this.upcastDispatcher=new dc({schema:t.schema}),this.viewDocument=new nr(e),this.stylesProcessor=e,this.htmlProcessor=new uc(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new Er(this.viewDocument),this.upcastDispatcher.on("text",((t,e,{schema:n,consumable:o,writer:i})=>{let r=e.modelCursor;if(!o.test(e.viewItem))return;if(!n.checkChild(r,"$text")){if(!Vl(r,"$text",n))return;if(0==e.viewItem.data.trim().length)return;r=Fl(r,i)}o.consume(e.viewItem);const s=i.createText(e.viewItem.data);i.insert(s,r),e.modelRange=i.createRange(r,r.getShiftedBy(s.offsetSize)),e.modelCursor=e.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((t,e,n)=>{if(!e.modelRange&&n.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:o}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=o}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((t,e,n)=>{if(!e.modelRange&&n.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:o}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=o}}),{priority:"lowest"}),R.prototype.decorate.call(this,"init"),R.prototype.decorate.call(this,"set"),R.prototype.decorate.call(this,"get"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},zl)}),{priority:"lowest"})}get(t={}){const{rootName:e="main",trim:n="empty"}=t;if(!this._checkIfRootsExists([e]))throw new l("datacontroller-get-non-existent-root",this);const o=this.model.document.getRoot(e);return"empty"!==n||this.model.hasContent(o,{ignoreWhitespaces:!0})?this.stringify(o,t):""}stringify(t,e={}){const n=this.toView(t,e);return this.processor.toData(n)}toView(t,e={}){const n=this.viewDocument,o=this._viewWriter;this.mapper.clearBindings();const i=tl._createIn(t),r=new xr(n);this.mapper.bindElements(t,r);const s=t.is("documentFragment")?t.markers:function(t){const e=[],n=t.root.document;if(!n)return new Map;const o=tl._createIn(t);for(const t of n.model.markers){const n=t.getRange(),i=n.isCollapsed,r=n.start.isEqual(o.start)||n.end.isEqual(o.end);if(i&&r)e.push([t.name,n]);else{const i=o.getIntersection(n);i&&e.push([t.name,i])}}return e.sort((([t,e],[n,o])=>{if("after"!==e.end.compareWith(o.start))return 1;if("before"!==e.start.compareWith(o.end))return-1;switch(e.start.compareWith(o.start)){case"before":return 1;case"after":return-1;default:switch(e.end.compareWith(o.end)){case"before":return 1;case"after":return-1;default:return n.localeCompare(t)}}})),new Map(e)}(t);return this.downcastDispatcher.convert(i,s,o,e),r}init(t){if(this.model.document.version)throw new l("datacontroller-init-document-not-empty",this);let e={};if("string"==typeof t?e.main=t:e=t,!this._checkIfRootsExists(Object.keys(e)))throw new l("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(t=>{for(const n of Object.keys(e)){const o=this.model.document.getRoot(n);t.insert(this.parse(e[n],o),o,0)}})),Promise.resolve()}set(t,e={}){let n={};if("string"==typeof t?n.main=t:n=t,!this._checkIfRootsExists(Object.keys(n)))throw new l("datacontroller-set-non-existent-root",this);this.model.enqueueChange(e.batchType||{},(t=>{t.setSelection(null),t.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const e of Object.keys(n)){const o=this.model.document.getRoot(e);t.remove(t.createRangeIn(o)),t.insert(this.parse(n[e],o),o,0)}}))}parse(t,e="$root"){const n=this.processor.toView(t);return this.toModel(n,e)}toModel(t,e="$root"){return this.model.change((n=>this.upcastDispatcher.convert(t,n,e)))}addStyleProcessorRules(t){t(this.stylesProcessor)}registerRawContentMatcher(t){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(t),this.htmlProcessor.registerRawContentMatcher(t)}destroy(){this.stopListening()}_checkIfRootsExists(t){for(const e of t)if(!this.model.document.getRootNames().includes(e))return!1;return!0}}class mc{constructor(t,e){this._helpers=new Map,this._downcast=_o(t),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=_o(e),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(t,e){const n=this._downcast.includes(e);if(!this._upcast.includes(e)&&!n)throw new l("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:t,dispatchers:[e],isDowncast:n})}for(t){if(!this._helpers.has(t))throw new l("conversion-for-unknown-group",this);return this._helpers.get(t)}elementToElement(t){this.for("downcast").elementToElement(t);for(const{model:e,view:n}of pc(t))this.for("upcast").elementToElement({model:e,view:n,converterPriority:t.converterPriority})}attributeToElement(t){this.for("downcast").attributeToElement(t);for(const{model:e,view:n}of pc(t))this.for("upcast").elementToAttribute({view:n,model:e,converterPriority:t.converterPriority})}attributeToAttribute(t){this.for("downcast").attributeToAttribute(t);for(const{model:e,view:n}of pc(t))this.for("upcast").attributeToAttribute({view:n,model:e})}_createConversionHelpers({name:t,dispatchers:e,isDowncast:n}){if(this._helpers.has(t))throw new l("conversion-group-exists",this);const o=n?new Al(e):new Ol(e);this._helpers.set(t,o)}}function*pc(t){if(t.model.values)for(const e of t.model.values){const n={key:t.model.key,value:e},o=t.view[e],i=t.upcastAlso?t.upcastAlso[e]:void 0;yield*fc(n,o,i)}else yield*fc(t.model,t.view,t.upcastAlso)}function*fc(t,e,n){if(yield{model:t,view:e},n)for(const e of _o(n))yield{model:t,view:e}}class bc{constructor(t={}){"string"==typeof t&&(t="transparent"===t?{isUndoable:!1}:{},c("batch-constructor-deprecated-string-type"));const{isUndoable:e=!0,isLocal:n=!0,isUndo:o=!1,isTyping:i=!1}=t;this.operations=[],this.isUndoable=e,this.isLocal=n,this.isUndo=o,this.isTyping=i}get type(){return c("batch-type-deprecated"),"default"}get baseVersion(){for(const t of this.operations)if(null!==t.baseVersion)return t.baseVersion;return null}addOperation(t){return t.batch=this,this.operations.push(t),t}}class kc{constructor(t){this._markerCollection=t,this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}bufferOperation(t){const e=t;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),n=this._isInInsertedElement(e.targetPosition.parent);t||this._markRemove(e.sourcePosition.parent,e.sourcePosition.offset,e.howMany),n||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=tl._createFromPositionAndShift(e.position,1);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}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 n=e.graveyardPosition.parent;this._markInsert(n,e.graveyardPosition.offset,1);const o=e.targetPosition.parent;this._isInInsertedElement(o)||this._markInsert(o,e.targetPosition.offset,t.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(t,e,n){const o=this._changedMarkers.get(t);o?(o.newMarkerData=n,null==o.oldMarkerData.range&&null==n.range&&this._changedMarkers.delete(t)):this._changedMarkers.set(t,{newMarkerData:n,oldMarkerData:e})}getMarkersToRemove(){const t=[];for(const[e,n]of this._changedMarkers)null!=n.oldMarkerData.range&&t.push({name:e,range:n.oldMarkerData.range});return t}getMarkersToAdd(){const t=[];for(const[e,n]of this._changedMarkers)null!=n.newMarkerData.range&&t.push({name:e,range:n.newMarkerData.range});return t}getChangedMarkers(){return Array.from(this._changedMarkers).map((([t,e])=>({name:t,data:{oldRange:e.oldMarkerData.range,newRange:e.newMarkerData.range}})))}hasDataChanges(){if(this._changesInElement.size>0)return!0;for(const{newMarkerData:t,oldMarkerData:e}of this._changedMarkers.values()){if(t.affectsData!==e.affectsData)return!0;if(t.affectsData){const n=t.range&&!e.range,o=!t.range&&e.range,i=t.range&&e.range&&!t.range.isEqual(e.range);if(n||o||i)return!0}}return!1}getChanges(t={}){if(this._cachedChanges)return t.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let e=[];for(const t of this._changesInElement.keys()){const n=this._changesInElement.get(t).sort(((t,e)=>t.offset===e.offset?t.type!=e.type?"remove"==t.type?-1:1:0:t.offset<e.offset?-1:1)),o=this._elementSnapshots.get(t),i=wc(t.getChildren()),r=_c(o.length,n);let s=0,a=0;for(const n of r)if("i"===n)e.push(this._getInsertDiff(t,s,i[s])),s++;else if("r"===n)e.push(this._getRemoveDiff(t,s,o[a])),a++;else if("a"===n){const n=i[s].attributes,r=o[a].attributes;let l;if("$text"==i[s].name)l=new tl(Ja._createAt(t,s),Ja._createAt(t,s+1));else{const e=t.offsetToIndex(s);l=new tl(Ja._createAt(t,s),Ja._createAt(t.getChild(e),0))}e.push(...this._getAttributesDiff(l,r,n)),s++,a++}else s++,a++}e.sort(((t,e)=>t.position.root!=e.position.root?t.position.root.rootName<e.position.root.rootName?-1:1:t.position.isEqual(e.position)?t.changeCount-e.changeCount:t.position.isBefore(e.position)?-1:1));for(let t=1,n=0;t<e.length;t++){const o=e[n],i=e[t],r="remove"==o.type&&"remove"==i.type&&"$text"==o.name&&"$text"==i.name&&o.position.isEqual(i.position),s="insert"==o.type&&"insert"==i.type&&"$text"==o.name&&"$text"==i.name&&o.position.parent==i.position.parent&&o.position.offset+o.length==i.position.offset,a="attribute"==o.type&&"attribute"==i.type&&o.position.parent==i.position.parent&&o.range.isFlat&&i.range.isFlat&&o.position.offset+o.length==i.position.offset&&o.attributeKey==i.attributeKey&&o.attributeOldValue==i.attributeOldValue&&o.attributeNewValue==i.attributeNewValue;r||s||a?(o.length++,a&&(o.range.end=o.range.end.getShiftedBy(1)),e[t]=null):n=t}e=e.filter((t=>t));for(const t of e)delete t.changeCount,"attribute"==t.type&&(delete t.position,delete t.length);return this._changeCount=0,this._cachedChangesWithGraveyard=e,this._cachedChanges=e.filter(Ac),t.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_refreshItem(t){if(this._isInInsertedElement(t.parent))return;this._markRemove(t.parent,t.startOffset,t.offsetSize),this._markInsert(t.parent,t.startOffset,t.offsetSize),this._refreshedItems.add(t);const e=tl._createOn(t);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}this._cachedChanges=null}_markInsert(t,e,n){const o={type:"insert",offset:e,howMany:n,count:this._changeCount++};this._markChange(t,o)}_markRemove(t,e,n){const o={type:"remove",offset:e,howMany:n,count:this._changeCount++};this._markChange(t,o),this._removeAllNestedChanges(t,e,n)}_markAttribute(t){const e={type:"attribute",offset:t.startOffset,howMany:t.offsetSize,count:this._changeCount++};this._markChange(t.parent,e)}_markChange(t,e){this._makeSnapshot(t);const n=this._getChangesForElement(t);this._handleChange(e,n),n.push(e);for(let t=0;t<n.length;t++)n[t].howMany<1&&(n.splice(t,1),t--)}_getChangesForElement(t){let e;return this._changesInElement.has(t)?e=this._changesInElement.get(t):(e=[],this._changesInElement.set(t,e)),e}_makeSnapshot(t){this._elementSnapshots.has(t)||this._elementSnapshots.set(t,wc(t.getChildren()))}_handleChange(t,e){t.nodesToHandle=t.howMany;for(const n of e){const o=t.offset+t.howMany,i=n.offset+n.howMany;if("insert"==t.type&&("insert"==n.type&&(t.offset<=n.offset?n.offset+=t.howMany:t.offset<i&&(n.howMany+=t.nodesToHandle,t.nodesToHandle=0)),"remove"==n.type&&t.offset<n.offset&&(n.offset+=t.howMany),"attribute"==n.type))if(t.offset<=n.offset)n.offset+=t.howMany;else if(t.offset<i){const i=n.howMany;n.howMany=t.offset-n.offset,e.unshift({type:"attribute",offset:o,howMany:i-n.howMany,count:this._changeCount++})}if("remove"==t.type){if("insert"==n.type)if(o<=n.offset)n.offset-=t.howMany;else if(o<=i)if(t.offset<n.offset){const e=o-n.offset;n.offset=t.offset,n.howMany-=e,t.nodesToHandle-=e}else n.howMany-=t.nodesToHandle,t.nodesToHandle=0;else if(t.offset<=n.offset)t.nodesToHandle-=n.howMany,n.howMany=0;else if(t.offset<i){const e=i-t.offset;n.howMany-=e,t.nodesToHandle-=e}if("remove"==n.type&&(o<=n.offset?n.offset-=t.howMany:t.offset<n.offset&&(t.nodesToHandle+=n.howMany,n.howMany=0)),"attribute"==n.type)if(o<=n.offset)n.offset-=t.howMany;else if(t.offset<n.offset){const e=o-n.offset;n.offset=t.offset,n.howMany-=e}else if(t.offset<i)if(o<=i){const o=n.howMany;n.howMany=t.offset-n.offset;const i=o-n.howMany-t.nodesToHandle;e.unshift({type:"attribute",offset:t.offset,howMany:i,count:this._changeCount++})}else n.howMany-=i-t.offset}if("attribute"==t.type){if("insert"==n.type)if(t.offset<n.offset&&o>n.offset){if(o>i){const t={type:"attribute",offset:i,howMany:o-i,count:this._changeCount++};this._handleChange(t,e),e.push(t)}t.nodesToHandle=n.offset-t.offset,t.howMany=t.nodesToHandle}else t.offset>=n.offset&&t.offset<i&&(o>i?(t.nodesToHandle=o-i,t.offset=i):t.nodesToHandle=0);if("remove"==n.type&&t.offset<n.offset&&o>n.offset){const i={type:"attribute",offset:n.offset,howMany:o-n.offset,count:this._changeCount++};this._handleChange(i,e),e.push(i),t.nodesToHandle=n.offset-t.offset,t.howMany=t.nodesToHandle}"attribute"==n.type&&(t.offset>=n.offset&&o<=i?(t.nodesToHandle=0,t.howMany=0,t.offset=0):t.offset<=n.offset&&o>=i&&(n.howMany=0))}}t.howMany=t.nodesToHandle,delete t.nodesToHandle}_getInsertDiff(t,e,n){return{type:"insert",position:Ja._createAt(t,e),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++}}_getRemoveDiff(t,e,n){return{type:"remove",position:Ja._createAt(t,e),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(t,e,n){const o=[];n=new Map(n);for(const[i,r]of e){const e=n.has(i)?n.get(i):null;e!==r&&o.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:i,attributeOldValue:r,attributeNewValue:e,changeCount:this._changeCount++}),n.delete(i)}for(const[e,i]of n)o.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:e,attributeOldValue:null,attributeNewValue:i,changeCount:this._changeCount++});return o}_isInInsertedElement(t){const e=t.parent;if(!e)return!1;const n=this._changesInElement.get(e),o=t.startOffset;if(n)for(const t of n)if("insert"==t.type&&o>=t.offset&&o<t.offset+t.howMany)return!0;return this._isInInsertedElement(e)}_removeAllNestedChanges(t,e,n){const o=new tl(Ja._createAt(t,e),Ja._createAt(t,e+n));for(const t of o.getItems({shallow:!0}))t.is("element")&&(this._elementSnapshots.delete(t),this._changesInElement.delete(t),this._removeAllNestedChanges(t,0,t.maxOffset))}}function wc(t){const e=[];for(const n of t)if(n.is("$text"))for(let t=0;t<n.data.length;t++)e.push({name:"$text",attributes:new Map(n.getAttributes())});else e.push({name:n.name,attributes:new Map(n.getAttributes())});return e}function _c(t,e){const n=[];let o=0,i=0;for(const t of e){if(t.offset>o){for(let e=0;e<t.offset-o;e++)n.push("e");i+=t.offset-o}if("insert"==t.type){for(let e=0;e<t.howMany;e++)n.push("i");o=t.offset+t.howMany}else if("remove"==t.type){for(let e=0;e<t.howMany;e++)n.push("r");o=t.offset,i+=t.howMany}else n.push(..."a".repeat(t.howMany).split("")),o=t.offset+t.howMany,i+=t.howMany}if(i<t)for(let e=0;e<t-i-o;e++)n.push("e");return n}function Ac(t){const e="position"in t&&"$graveyard"==t.position.root.rootName,n="range"in t&&"$graveyard"==t.range.root.rootName;return!e&&!n}class Cc{constructor(){this._operations=[],this._undoPairs=new Map,this._undoneOperations=new Set,this._baseVersionToOperationIndex=new Map,this._version=0,this._gaps=new Map}get version(){return this._version}set version(t){this._operations.length&&t>this._version+1&&this._gaps.set(this._version,t),this._version=t}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(t){if(t.baseVersion!==this.version)throw new l("model-document-history-addoperation-incorrect-version",this,{operation:t,historyVersion:this.version});this._operations.push(t),this._version++,this._baseVersionToOperationIndex.set(t.baseVersion,this._operations.length-1)}getOperations(t,e=this.version){if(!this._operations.length)return[];const n=this._operations[0];void 0===t&&(t=n.baseVersion);let o=e-1;for(const[e,n]of this._gaps)t>e&&t<n&&(t=n),o>e&&o<n&&(o=e-1);if(o<n.baseVersion||t>this.lastOperation.baseVersion)return[];let i=this._baseVersionToOperationIndex.get(t);void 0===i&&(i=0);let r=this._baseVersionToOperationIndex.get(o);return void 0===r&&(r=this._operations.length-1),this._operations.slice(i,r+1)}getOperation(t){const e=this._baseVersionToOperationIndex.get(t);if(void 0!==e)return this._operations[e]}setOperationAsUndone(t,e){this._undoPairs.set(e,t),this._undoneOperations.add(t)}isUndoingOperation(t){return this._undoPairs.has(t)}isUndoneOperation(t){return this._undoneOperations.has(t)}getUndoneOperation(t){return this._undoPairs.get(t)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class vc extends Ga{constructor(t,e,n="main"){super(e),this._document=t,this.rootName=n}get document(){return this._document}toJSON(){return this.rootName}}function yc(t,e){return!!(n=t.charAt(e-1))&&1==n.length&&/[\ud800-\udbff]/.test(n)&&function(t){return!!t&&1==t.length&&/[\udc00-\udfff]/.test(t)}(t.charAt(e));var n}function xc(t,e){return!!(n=t.charAt(e))&&1==n.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(n);var n}vc.prototype.is=function(t,e){return e?e===this.name&&("rootElement"===t||"model:rootElement"===t||"element"===t||"model:element"===t):"rootElement"===t||"model:rootElement"===t||"element"===t||"model:element"===t||"node"===t||"model:node"===t};const Ec=function(){const t=/\p{Regional_Indicator}{2}/u.source,e="(?:"+[/\p{Emoji}[\u{E0020}-\u{E007E}]+\u{E007F}/u,/\p{Emoji}\u{FE0F}?\u{20E3}/u,/\p{Emoji}\u{FE0F}/u,/(?=\p{General_Category=Other_Symbol})\p{Emoji}\p{Emoji_Modifier}*/u].map((t=>t.source)).join("|")+")";return new RegExp(`${t}|${e}(?:‍${e})*`,"ug")}();function Tc(t,e){const n=String(t).matchAll(Ec);return Array.from(n).some((t=>t.index<e&&e<t.index+t[0].length))}const Dc="$graveyard";class Sc extends k{constructor(t){super(),this.model=t,this.history=new Cc,this.selection=new fl(this),this.roots=new ko({idProperty:"rootName"}),this.differ=new kc(t.markers),this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",Dc),this.listenTo(t,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&this.differ.bufferOperation(n)}),{priority:"high"}),this.listenTo(t,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&this.history.addOperation(n)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(t.markers,"update",((t,e,n,o,i)=>{const r={...e.getData(),range:o};this.differ.bufferMarkerChange(e.name,i,r),null===n&&e.on("change",((t,n)=>{const o=e.getData();this.differ.bufferMarkerChange(e.name,{...o,range:n},o)}))}))}get version(){return this.history.version}set version(t){this.history.version=t}get graveyard(){return this.getRoot(Dc)}createRoot(t="$root",e="main"){if(this.roots.get(e))throw new l("model-document-createroot-name-exists",this,{name:e});const n=new vc(this,t,e);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(t="main"){return this.roots.get(t)}getRootNames(){return Array.from(this.roots,(t=>t.rootName)).filter((t=>t!=Dc))}registerPostFixer(t){this._postFixers.add(t)}toJSON(){const t=Io(this);return t.selection="[engine.model.DocumentSelection]",t.model="[engine.model.Model]",t}_handleChangeBlock(t){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(t),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",t.batch):this.fire("change",t.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const t of this.roots)if(t!==this.graveyard)return t;return this.graveyard}_getDefaultRange(){const t=this._getDefaultRoot(),e=this.model,n=e.schema,o=e.createPositionFromPath(t,[0]);return n.getNearestSelectionRange(o)||e.createRange(o)}_validateSelectionRange(t){return Bc(t.start)&&Bc(t.end)}_callPostFixers(t){let e=!1;do{for(const n of this._postFixers)if(this.selection.refresh(),e=n(t),e)break}while(e)}}function Bc(t){const e=t.textNode;if(e){const n=e.data,o=t.offset-e.startOffset;return!yc(n,o)&&!xc(n,o)}return!0}class Ic extends k{constructor(){super(),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(t){const e=t instanceof Pc?t.name:t;return this._markers.has(e)}get(t){return this._markers.get(t)||null}_set(t,e,n=!1,o=!1){const i=t instanceof Pc?t.name:t;if(i.includes(","))throw new l("markercollection-incorrect-marker-name",this);const r=this._markers.get(i);if(r){const t=r.getData(),s=r.getRange();let a=!1;return s.isEqual(e)||(r._attachLiveRange(ul.fromRange(e)),a=!0),n!=r.managedUsingOperations&&(r._managedUsingOperations=n,a=!0),"boolean"==typeof o&&o!=r.affectsData&&(r._affectsData=o,a=!0),a&&this.fire(`update:${i}`,r,s,e,t),r}const s=ul.fromRange(e),a=new Pc(i,s,n,o);return this._markers.set(i,a),this.fire(`update:${i}`,a,null,e,{...a.getData(),range:null}),a}_remove(t){const e=t instanceof Pc?t.name:t,n=this._markers.get(e);return!!n&&(this._markers.delete(e),this.fire(`update:${e}`,n,n.getRange(),null,n.getData()),this._destroyMarker(n),!0)}_refresh(t){const e=t instanceof Pc?t.name:t,n=this._markers.get(e);if(!n)throw new l("markercollection-refresh-marker-not-exists",this);const o=n.getRange();this.fire(`update:${e}`,n,o,o,n.getData())}*getMarkersAtPosition(t){for(const e of this)e.getRange().containsPosition(t)&&(yield e)}*getMarkersIntersectingRange(t){for(const e of this)null!==e.getRange().getIntersection(t)&&(yield e)}destroy(){for(const t of this._markers.values())this._destroyMarker(t);this._markers=null,this.stopListening()}*getMarkersGroup(t){for(const e of this._markers.values())e.name.startsWith(t+":")&&(yield e)}_destroyMarker(t){t.stopListening(),t._detachLiveRange()}}class Pc extends(b(qa)){constructor(t,e,n,o){super(),this.name=t,this._liveRange=this._attachLiveRange(e),this._managedUsingOperations=n,this._affectsData=o}get managedUsingOperations(){if(!this._liveRange)throw new l("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new l("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new l("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new l("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new l("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(t){return this._liveRange&&this._detachLiveRange(),t.delegate("change:range").to(this),t.delegate("change:content").to(this),this._liveRange=t,t}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}Pc.prototype.is=function(t){return"marker"===t||"model:marker"===t};class Rc{constructor(t){this.baseVersion=t,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const t=Object.assign({},this);return t.__className=this.constructor.className,delete t.batch,delete t.isDocumentOperation,t}static get className(){return"Operation"}static fromJSON(t,e){return new this(t.baseVersion)}}function zc(t,e){const n=Oc(e),o=n.reduce(((t,e)=>t+e.offsetSize),0),i=t.parent;Mc(t);const r=t.index;return i._insertChild(r,n),Nc(i,r+n.length),Nc(i,r),new tl(t,t.getShiftedBy(o))}function Vc(t){if(!t.isFlat)throw new l("operation-utils-remove-range-not-flat",this);const e=t.start.parent;Mc(t.start),Mc(t.end);const n=e._removeChildren(t.start.index,t.end.index-t.start.index);return Nc(e,t.start.index),n}function Fc(t,e){if(!t.isFlat)throw new l("operation-utils-move-range-not-flat",this);const n=Vc(t);return zc(e=e._getTransformedByDeletion(t.start,t.end.offset-t.start.offset),n)}function Oc(t){const e=[];!function t(n){if("string"==typeof n)e.push(new Ua(n));else if(n instanceof $a)e.push(new Ua(n.data,n.getAttributes()));else if(n instanceof Wa)e.push(n);else if(bo(n))for(const e of n)t(e)}(t);for(let t=1;t<e.length;t++){const n=e[t],o=e[t-1];n instanceof Ua&&o instanceof Ua&&Lc(n,o)&&(e.splice(t-1,2,new Ua(o.data+n.data,o.getAttributes())),t--)}return e}function Nc(t,e){const n=t.getChild(e-1),o=t.getChild(e);if(n&&o&&n.is("$text")&&o.is("$text")&&Lc(n,o)){const i=new Ua(n.data+o.data,n.getAttributes());t._removeChildren(e-1,2),t._insertChild(e-1,i)}}function Mc(t){const e=t.textNode,n=t.parent;if(e){const o=t.offset-e.startOffset,i=e.index;n._removeChildren(i,1);const r=new Ua(e.data.substr(0,o),e.getAttributes()),s=new Ua(e.data.substr(o),e.getAttributes());n._insertChild(i,[r,s])}}function Lc(t,e){const n=t.getAttributes(),o=e.getAttributes();for(const t of n){if(t[1]!==e.getAttribute(t[0]))return!1;o.next()}return o.next().done}const Hc=function(t,e){return js(t,e)};class qc extends Rc{constructor(t,e,n,o,i){super(i),this.range=t.clone(),this.key=e,this.oldValue=void 0===n?null:n,this.newValue=void 0===o?null:o}get type(){return null===this.oldValue?"addAttribute":null===this.newValue?"removeAttribute":"changeAttribute"}clone(){return new qc(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new qc(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const t=super.toJSON();return t.range=this.range.toJSON(),t}_validate(){if(!this.range.isFlat)throw new l("attribute-operation-range-not-flat",this);for(const t of this.range.getItems({shallow:!0})){if(null!==this.oldValue&&!Hc(t.getAttribute(this.key),this.oldValue))throw new l("attribute-operation-wrong-old-value",this,{item:t,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&t.hasAttribute(this.key))throw new l("attribute-operation-attribute-exists",this,{node:t,key:this.key})}}_execute(){Hc(this.oldValue,this.newValue)||function(t,e,n){Mc(t.start),Mc(t.end);for(const o of t.getItems({shallow:!0})){const t=o.is("$textProxy")?o.textNode:o;null!==n?t._setAttribute(e,n):t._removeAttribute(e),Nc(t.parent,t.index)}Nc(t.end.parent,t.end.index)}(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(t,e){return new qc(tl.fromJSON(t.range,e),t.key,t.oldValue,t.newValue,t.baseVersion)}}class Wc extends Rc{constructor(t,e,n,o){super(o),this.sourcePosition=t.clone(),this.sourcePosition.stickiness="toNext",this.howMany=e,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNone"}get type(){return"$graveyard"==this.targetPosition.root.rootName?"remove":"$graveyard"==this.sourcePosition.root.rootName?"reinsert":"move"}clone(){return new Wc(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const t=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new Wc(this.getMovedRangeStart(),this.howMany,t,this.baseVersion+1)}_validate(){const t=this.sourcePosition.parent,e=this.targetPosition.parent,n=this.sourcePosition.offset,o=this.targetPosition.offset;if(n+this.howMany>t.maxOffset)throw new l("move-operation-nodes-do-not-exist",this);if(t===e&&n<o&&o<n+this.howMany)throw new l("move-operation-range-into-itself",this);if(this.sourcePosition.root==this.targetPosition.root&&"prefix"==Bo(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())){const t=this.sourcePosition.path.length-1;if(this.targetPosition.path[t]>=n&&this.targetPosition.path[t]<n+this.howMany)throw new l("move-operation-node-into-itself",this)}}_execute(){Fc(tl._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const t=super.toJSON();return t.sourcePosition=this.sourcePosition.toJSON(),t.targetPosition=this.targetPosition.toJSON(),t}static get className(){return"MoveOperation"}static fromJSON(t,e){const n=Ja.fromJSON(t.sourcePosition,e),o=Ja.fromJSON(t.targetPosition,e);return new this(n,t.howMany,o,t.baseVersion)}}class jc extends Rc{constructor(t,e,n){super(n),this.position=t.clone(),this.position.stickiness="toNone",this.nodes=new ja(Oc(e)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}clone(){const t=new ja([...this.nodes].map((t=>t._clone(!0)))),e=new jc(this.position,t,this.baseVersion);return e.shouldReceiveAttributes=this.shouldReceiveAttributes,e}getReversed(){const t=this.position.root.document.graveyard,e=new Ja(t,[0]);return new Wc(this.position,this.nodes.maxOffset,e,this.baseVersion+1)}_validate(){const t=this.position.parent;if(!t||t.maxOffset<this.position.offset)throw new l("insert-operation-position-invalid",this)}_execute(){const t=this.nodes;this.nodes=new ja([...t].map((t=>t._clone(!0)))),zc(this.position,t)}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t.nodes=this.nodes.toJSON(),t}static get className(){return"InsertOperation"}static fromJSON(t,e){const n=[];for(const e of t.nodes)e.name?n.push(Ga.fromJSON(e)):n.push(Ua.fromJSON(e));const o=new jc(Ja.fromJSON(t.position,e),n,t.baseVersion);return o.shouldReceiveAttributes=t.shouldReceiveAttributes,o}}class Uc extends Rc{constructor(t,e,n,o,i,r){super(r),this.name=t,this.oldRange=e?e.clone():null,this.newRange=n?n.clone():null,this.affectsData=i,this._markers=o}get type(){return"marker"}clone(){return new Uc(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new Uc(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){this.newRange?this._markers._set(this.name,this.newRange,!0,this.affectsData):this._markers._remove(this.name)}toJSON(){const t=super.toJSON();return this.oldRange&&(t.oldRange=this.oldRange.toJSON()),this.newRange&&(t.newRange=this.newRange.toJSON()),delete t._markers,t}static get className(){return"MarkerOperation"}static fromJSON(t,e){return new Uc(t.name,t.oldRange?tl.fromJSON(t.oldRange,e):null,t.newRange?tl.fromJSON(t.newRange,e):null,e.model.markers,t.affectsData,t.baseVersion)}}class $c extends Rc{get type(){return"noop"}clone(){return new $c(this.baseVersion)}getReversed(){return new $c(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}class Gc extends Rc{constructor(t,e,n,o){super(o),this.position=t,this.position.stickiness="toNext",this.oldName=e,this.newName=n}get type(){return"rename"}clone(){return new Gc(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new Gc(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const t=this.position.nodeAfter;if(!(t instanceof Ga))throw new l("rename-operation-wrong-position",this);if(t.name!==this.oldName)throw new l("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t}static get className(){return"RenameOperation"}static fromJSON(t,e){return new Gc(Ja.fromJSON(t.position,e),t.oldName,t.newName,t.baseVersion)}}class Kc extends Rc{constructor(t,e,n,o,i){super(i),this.root=t,this.key=e,this.oldValue=n,this.newValue=o}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new Kc(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Kc(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new l("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new l("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new l("rootattribute-operation-attribute-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 t=super.toJSON();return t.root=this.root.toJSON(),t}static get className(){return"RootAttributeOperation"}static fromJSON(t,e){if(!e.getRoot(t.root))throw new l("rootattribute-operation-fromjson-no-root",this,{rootName:t.root});return new Kc(e.getRoot(t.root),t.key,t.oldValue,t.newValue,t.baseVersion)}}class Zc extends Rc{constructor(t,e,n,o,i){super(i),this.sourcePosition=t.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=e,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=o.clone()}get type(){return"merge"}get deletionPosition(){return new Ja(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const t=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new tl(this.sourcePosition,t)}clone(){return new Zc(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.targetPosition._getTransformedByMergeOperation(this),e=this.sourcePosition.path.slice(0,-1),n=new Ja(this.sourcePosition.root,e)._getTransformedByMergeOperation(this);return new Jc(t,this.howMany,n,this.graveyardPosition,this.baseVersion+1)}_validate(){const t=this.sourcePosition.parent,e=this.targetPosition.parent;if(!t.parent)throw new l("merge-operation-source-position-invalid",this);if(!e.parent)throw new l("merge-operation-target-position-invalid",this);if(this.howMany!=t.maxOffset)throw new l("merge-operation-how-many-invalid",this)}_execute(){const t=this.sourcePosition.parent;Fc(tl._createIn(t),this.targetPosition),Fc(tl._createOn(t),this.graveyardPosition)}toJSON(){const t=super.toJSON();return t.sourcePosition=t.sourcePosition.toJSON(),t.targetPosition=t.targetPosition.toJSON(),t.graveyardPosition=t.graveyardPosition.toJSON(),t}static get className(){return"MergeOperation"}static fromJSON(t,e){const n=Ja.fromJSON(t.sourcePosition,e),o=Ja.fromJSON(t.targetPosition,e),i=Ja.fromJSON(t.graveyardPosition,e);return new this(n,t.howMany,o,i,t.baseVersion)}}class Jc extends Rc{constructor(t,e,n,o,i){super(i),this.splitPosition=t.clone(),this.splitPosition.stickiness="toNext",this.howMany=e,this.insertionPosition=n,this.graveyardPosition=o?o.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const t=this.insertionPosition.path.slice();return t.push(0),new Ja(this.insertionPosition.root,t)}get movedRange(){const t=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new tl(this.splitPosition,t)}clone(){return new Jc(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.splitPosition.root.document.graveyard,e=new Ja(t,[0]);return new Zc(this.moveTargetPosition,this.howMany,this.splitPosition,e,this.baseVersion+1)}_validate(){const t=this.splitPosition.parent,e=this.splitPosition.offset;if(!t||t.maxOffset<e)throw new l("split-operation-position-invalid",this);if(!t.parent)throw new l("split-operation-split-in-root",this);if(this.howMany!=t.maxOffset-this.splitPosition.offset)throw new l("split-operation-how-many-invalid",this);if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter)throw new l("split-operation-graveyard-position-invalid",this)}_execute(){const t=this.splitPosition.parent;if(this.graveyardPosition)Fc(tl._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition);else{const e=t._clone();zc(this.insertionPosition,e)}Fc(new tl(Ja._createAt(t,this.splitPosition.offset),Ja._createAt(t,t.maxOffset)),this.moveTargetPosition)}toJSON(){const t=super.toJSON();return t.splitPosition=this.splitPosition.toJSON(),t.insertionPosition=this.insertionPosition.toJSON(),this.graveyardPosition&&(t.graveyardPosition=this.graveyardPosition.toJSON()),t}static get className(){return"SplitOperation"}static getInsertionPosition(t){const e=t.path.slice(0,-1);return e[e.length-1]++,new Ja(t.root,e,"toPrevious")}static fromJSON(t,e){const n=Ja.fromJSON(t.splitPosition,e),o=Ja.fromJSON(t.insertionPosition,e),i=t.graveyardPosition?Ja.fromJSON(t.graveyardPosition,e):null;return new this(n,t.howMany,o,i,t.baseVersion)}}const Yc={};Yc[qc.className]=qc,Yc[jc.className]=jc,Yc[Uc.className]=Uc,Yc[Wc.className]=Wc,Yc[$c.className]=$c,Yc[Rc.className]=Rc,Yc[Gc.className]=Gc,Yc[Kc.className]=Kc,Yc[Jc.className]=Jc,Yc[Zc.className]=Zc;class Qc extends Rc{constructor(t,e){super(null),this.sourcePosition=t.clone(),this.howMany=e}get type(){return"detach"}toJSON(){const t=super.toJSON();return t.sourcePosition=this.sourcePosition.toJSON(),t}_validate(){if(this.sourcePosition.root.document)throw new l("detach-operation-on-document-node",this)}_execute(){Vc(tl._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class Xc extends qa{constructor(t){super(),this.markers=new Map,this._children=new ja,t&&this._insertChild(0,t)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}getAncestors(){return[]}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}getPath(){return[]}getNodeByPath(t){let e=this;for(const n of t)e=e.getChild(e.offsetToIndex(n));return e}offsetToIndex(t){return this._children.offsetToIndex(t)}toJSON(){const t=[];for(const e of this._children)t.push(e.toJSON());return t}static fromJSON(t){const e=[];for(const n of t)n.name?e.push(Ga.fromJSON(n)):e.push(Ua.fromJSON(n));return new Xc(e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const n=function(t){if("string"==typeof t)return[new Ua(t)];bo(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new Ua(t):t instanceof $a?new Ua(t.data,t.getAttributes()):t))}(e);for(const t of n)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,n)}_removeChildren(t,e=1){const n=this._children._removeNodes(t,e);for(const t of n)t.parent=null;return n}}Xc.prototype.is=function(t){return"documentFragment"===t||"model:documentFragment"===t};class td{constructor(t,e){this.model=t,this.batch=e}createText(t,e){return new Ua(t,e)}createElement(t,e){return new Ga(t,e)}createDocumentFragment(){return new Xc}cloneElement(t,e=!0){return t._clone(e)}insert(t,e,n=0){if(this._assertWriterUsedCorrectly(),t instanceof Ua&&""==t.data)return;const o=Ja._createAt(e,n);if(t.parent){if(rd(t.root,o.root))return void this.move(tl._createOn(t),o);if(t.root.document)throw new l("model-writer-insert-forbidden-move",this);this.remove(t)}const i=o.root.document?o.root.document.version:null,r=new jc(o,t,i);if(t instanceof Ua&&(r.shouldReceiveAttributes=!0),this.batch.addOperation(r),this.model.applyOperation(r),t instanceof Xc)for(const[e,n]of t.markers){const t=Ja._createAt(n.root,0),i={range:new tl(n.start._getCombined(t,o),n.end._getCombined(t,o)),usingOperation:!0,affectsData:!0};this.model.markers.has(e)?this.updateMarker(e,i):this.addMarker(e,i)}}insertText(t,e,n,o){e instanceof Xc||e instanceof Ga||e instanceof Ja?this.insert(this.createText(t),e,n):this.insert(this.createText(t,e),n,o)}insertElement(t,e,n,o){e instanceof Xc||e instanceof Ga||e instanceof Ja?this.insert(this.createElement(t),e,n):this.insert(this.createElement(t,e),n,o)}append(t,e){this.insert(t,e,"end")}appendText(t,e,n){e instanceof Xc||e instanceof Ga?this.insert(this.createText(t),e,"end"):this.insert(this.createText(t,e),n,"end")}appendElement(t,e,n){e instanceof Xc||e instanceof Ga?this.insert(this.createElement(t),e,"end"):this.insert(this.createElement(t,e),n,"end")}setAttribute(t,e,n){if(this._assertWriterUsedCorrectly(),n instanceof tl){const o=n.getMinimalFlatRanges();for(const n of o)ed(this,t,e,n)}else nd(this,t,e,n)}setAttributes(t,e){for(const[n,o]of Vo(t))this.setAttribute(n,o,e)}removeAttribute(t,e){if(this._assertWriterUsedCorrectly(),e instanceof tl){const n=e.getMinimalFlatRanges();for(const e of n)ed(this,t,null,e)}else nd(this,t,null,e)}clearAttributes(t){this._assertWriterUsedCorrectly();const e=t=>{for(const e of t.getAttributeKeys())this.removeAttribute(e,t)};if(t instanceof tl)for(const n of t.getItems())e(n);else e(t)}move(t,e,n){if(this._assertWriterUsedCorrectly(),!(t instanceof tl))throw new l("writer-move-invalid-range",this);if(!t.isFlat)throw new l("writer-move-range-not-flat",this);const o=Ja._createAt(e,n);if(o.isEqual(t.start))return;if(this._addOperationForAffectedMarkers("move",t),!rd(t.root,o.root))throw new l("writer-move-different-document",this);const i=t.root.document?t.root.document.version:null,r=new Wc(t.start,t.end.offset-t.start.offset,o,i);this.batch.addOperation(r),this.model.applyOperation(r)}remove(t){this._assertWriterUsedCorrectly();const e=(t instanceof tl?t:tl._createOn(t)).getMinimalFlatRanges().reverse();for(const t of e)this._addOperationForAffectedMarkers("move",t),id(t.start,t.end.offset-t.start.offset,this.batch,this.model)}merge(t){this._assertWriterUsedCorrectly();const e=t.nodeBefore,n=t.nodeAfter;if(this._addOperationForAffectedMarkers("merge",t),!(e instanceof Ga))throw new l("writer-merge-no-element-before",this);if(!(n instanceof Ga))throw new l("writer-merge-no-element-after",this);t.root.document?this._merge(t):this._mergeDetached(t)}createPositionFromPath(t,e,n){return this.model.createPositionFromPath(t,e,n)}createPositionAt(t,e){return this.model.createPositionAt(t,e)}createPositionAfter(t){return this.model.createPositionAfter(t)}createPositionBefore(t){return this.model.createPositionBefore(t)}createRange(t,e){return this.model.createRange(t,e)}createRangeIn(t){return this.model.createRangeIn(t)}createRangeOn(t){return this.model.createRangeOn(t)}createSelection(...t){return this.model.createSelection(...t)}_mergeDetached(t){const e=t.nodeBefore,n=t.nodeAfter;this.move(tl._createIn(n),Ja._createAt(e,"end")),this.remove(n)}_merge(t){const e=Ja._createAt(t.nodeBefore,"end"),n=Ja._createAt(t.nodeAfter,0),o=t.root.document.graveyard,i=new Ja(o,[0]),r=t.root.document.version,s=new Zc(n,t.nodeAfter.maxOffset,e,i,r);this.batch.addOperation(s),this.model.applyOperation(s)}rename(t,e){if(this._assertWriterUsedCorrectly(),!(t instanceof Ga))throw new l("writer-rename-not-element-instance",this);const n=t.root.document?t.root.document.version:null,o=new Gc(Ja._createBefore(t),t.name,e,n);this.batch.addOperation(o),this.model.applyOperation(o)}split(t,e){this._assertWriterUsedCorrectly();let n,o,i=t.parent;if(!i.parent)throw new l("writer-split-element-no-parent",this);if(e||(e=i.parent),!t.parent.getAncestors({includeSelf:!0}).includes(e))throw new l("writer-split-invalid-limit-element",this);do{const e=i.root.document?i.root.document.version:null,r=i.maxOffset-t.offset,s=Jc.getInsertionPosition(t),a=new Jc(t,r,s,null,e);this.batch.addOperation(a),this.model.applyOperation(a),n||o||(n=i,o=t.parent.nextSibling),i=(t=this.createPositionAfter(t.parent)).parent}while(i!==e);return{position:t,range:new tl(Ja._createAt(n,"end"),Ja._createAt(o,0))}}wrap(t,e){if(this._assertWriterUsedCorrectly(),!t.isFlat)throw new l("writer-wrap-range-not-flat",this);const n=e instanceof Ga?e:new Ga(e);if(n.childCount>0)throw new l("writer-wrap-element-not-empty",this);if(null!==n.parent)throw new l("writer-wrap-element-attached",this);this.insert(n,t.start);const o=new tl(t.start.getShiftedBy(1),t.end.getShiftedBy(1));this.move(o,Ja._createAt(n,0))}unwrap(t){if(this._assertWriterUsedCorrectly(),null===t.parent)throw new l("writer-unwrap-element-no-parent",this);this.move(tl._createIn(t),this.createPositionAfter(t)),this.remove(t)}addMarker(t,e){if(this._assertWriterUsedCorrectly(),!e||"boolean"!=typeof e.usingOperation)throw new l("writer-addmarker-no-usingoperation",this);const n=e.usingOperation,o=e.range,i=void 0!==e.affectsData&&e.affectsData;if(this.model.markers.has(t))throw new l("writer-addmarker-marker-exists",this);if(!o)throw new l("writer-addmarker-no-range",this);return n?(od(this,t,null,o,i),this.model.markers.get(t)):this.model.markers._set(t,o,n,i)}updateMarker(t,e){this._assertWriterUsedCorrectly();const n="string"==typeof t?t:t.name,o=this.model.markers.get(n);if(!o)throw new l("writer-updatemarker-marker-not-exists",this);if(!e)return c("writer-updatemarker-reconvert-using-editingcontroller",{markerName:n}),void this.model.markers._refresh(o);const i="boolean"==typeof e.usingOperation,r="boolean"==typeof e.affectsData,s=r?e.affectsData:o.affectsData;if(!i&&!e.range&&!r)throw new l("writer-updatemarker-wrong-options",this);const a=o.getRange(),d=e.range?e.range:a;i&&e.usingOperation!==o.managedUsingOperations?e.usingOperation?od(this,n,null,d,s):(od(this,n,a,null,s),this.model.markers._set(n,d,void 0,s)):o.managedUsingOperations?od(this,n,a,d,s):this.model.markers._set(n,d,void 0,s)}removeMarker(t){this._assertWriterUsedCorrectly();const e="string"==typeof t?t:t.name;if(!this.model.markers.has(e))throw new l("writer-removemarker-no-marker",this);const n=this.model.markers.get(e);if(!n.managedUsingOperations)return void this.model.markers._remove(e);od(this,e,n.getRange(),null,n.affectsData)}setSelection(...t){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...t)}setSelectionFocus(t,e){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(t,e)}setSelectionAttribute(t,e){if(this._assertWriterUsedCorrectly(),"string"==typeof t)this._setSelectionAttribute(t,e);else for(const[e,n]of Vo(t))this._setSelectionAttribute(e,n)}removeSelectionAttribute(t){if(this._assertWriterUsedCorrectly(),"string"==typeof t)this._removeSelectionAttribute(t);else for(const e of t)this._removeSelectionAttribute(e)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(t){this.model.document.selection._restoreGravity(t)}_setSelectionAttribute(t,e){const n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){const o=fl._getStoreAttributeKey(t);this.setAttribute(o,e,n.anchor.parent)}n._setAttribute(t,e)}_removeSelectionAttribute(t){const e=this.model.document.selection;if(e.isCollapsed&&e.anchor.parent.isEmpty){const n=fl._getStoreAttributeKey(t);this.removeAttribute(n,e.anchor.parent)}e._removeAttribute(t)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new l("writer-incorrect-use",this)}_addOperationForAffectedMarkers(t,e){for(const n of this.model.markers){if(!n.managedUsingOperations)continue;const o=n.getRange();let i=!1;if("move"===t){const t=e;i=t.containsPosition(o.start)||t.start.isEqual(o.start)||t.containsPosition(o.end)||t.end.isEqual(o.end)}else{const t=e,n=t.nodeBefore,r=t.nodeAfter,s=o.start.parent==n&&o.start.isAtEnd,a=o.end.parent==r&&0==o.end.offset,l=o.end.nodeAfter==r,c=o.start.nodeAfter==r;i=s||a||l||c}i&&this.updateMarker(n.name,{range:o})}}}function ed(t,e,n,o){const i=t.model,r=i.document;let s,a,l,c=o.start;for(const t of o.getWalker({shallow:!0}))l=t.item.getAttribute(e),s&&a!=l&&(a!=n&&d(),c=s),s=t.nextPosition,a=l;function d(){const o=new tl(c,s),l=o.root.document?r.version:null,d=new qc(o,e,a,n,l);t.batch.addOperation(d),i.applyOperation(d)}s instanceof Ja&&s!=c&&a!=n&&d()}function nd(t,e,n,o){const i=t.model,r=i.document,s=o.getAttribute(e);let a,l;if(s!=n){if(o.root===o){const t=o.document?r.version:null;l=new Kc(o,e,s,n,t)}else{a=new tl(Ja._createBefore(o),t.createPositionAfter(o));const i=a.root.document?r.version:null;l=new qc(a,e,s,n,i)}t.batch.addOperation(l),i.applyOperation(l)}}function od(t,e,n,o,i){const r=t.model,s=r.document,a=new Uc(e,n,o,r.markers,!!i,s.version);t.batch.addOperation(a),r.applyOperation(a)}function id(t,e,n,o){let i;if(t.root.document){const n=o.document,r=new Ja(n.graveyard,[0]);i=new Wc(t,e,r,n.version)}else i=new Qc(t,e);n.addOperation(i),o.applyOperation(i)}function rd(t,e){return t===e||t instanceof vc&&e instanceof vc}function sd(t){t.document.registerPostFixer((e=>function(t,e){const n=e.document.selection,o=e.schema,i=[];let r=!1;for(const t of n.getRanges()){const e=ad(t,o);e&&!e.isEqual(t)?(i.push(e),r=!0):i.push(t)}r&&t.setSelection(function(t){const e=[...t],n=new Set;let o=1;for(;o<e.length;){const t=e[o],i=e.slice(0,o);for(const[r,s]of i.entries())if(!n.has(r))if(t.isEqual(s))n.add(r);else if(t.isIntersecting(s)){n.add(r),n.add(o);const i=t.getJoined(s);e.push(i)}o++}return e.filter(((t,e)=>!n.has(e)))}(i),{backward:n.isBackward});return!1}(e,t)))}function ad(t,e){return t.isCollapsed?function(t,e){const n=t.start,o=e.getNearestSelectionRange(n);if(!o){const t=n.getAncestors().reverse().find((t=>e.isObject(t)));return t?tl._createOn(t):null}if(!o.isCollapsed)return o;const i=o.start;if(n.isEqual(i))return null;return new tl(i)}(t,e):function(t,e){const{start:n,end:o}=t,i=e.checkChild(n,"$text"),r=e.checkChild(o,"$text"),s=e.getLimitElement(n),a=e.getLimitElement(o);if(s===a){if(i&&r)return null;if(function(t,e,n){const o=t.nodeAfter&&!n.isLimit(t.nodeAfter)||n.checkChild(t,"$text"),i=e.nodeBefore&&!n.isLimit(e.nodeBefore)||n.checkChild(e,"$text");return o||i}(n,o,e)){const t=n.nodeAfter&&e.isSelectable(n.nodeAfter)?null:e.getNearestSelectionRange(n,"forward"),i=o.nodeBefore&&e.isSelectable(o.nodeBefore)?null:e.getNearestSelectionRange(o,"backward"),r=t?t.start:n,s=i?i.end:o;return new tl(r,s)}}const l=s&&!s.is("rootElement"),c=a&&!a.is("rootElement");if(l||c){const t=n.nodeAfter&&o.nodeBefore&&n.nodeAfter.parent===o.nodeBefore.parent,i=l&&(!t||!cd(n.nodeAfter,e)),r=c&&(!t||!cd(o.nodeBefore,e));let d=n,h=o;return i&&(d=Ja._createBefore(ld(s,e))),r&&(h=Ja._createAfter(ld(a,e))),new tl(d,h)}return null}(t,e)}function ld(t,e){let n=t,o=n;for(;e.isLimit(o)&&o.parent;)n=o,o=o.parent;return n}function cd(t,e){return t&&e.isSelectable(t)}class dd extends(b(Ja)){constructor(t,e,n="toNone"){if(super(t,e,n),!this.root.is("rootElement"))throw new l("model-liveposition-root-not-rootelement",t);hd.call(this)}detach(){this.stopListening()}toPosition(){return new Ja(this.root,this.path.slice(),this.stickiness)}static fromPosition(t,e){return new this(t.root,t.path.slice(),e||t.stickiness)}}function hd(){this.listenTo(this.root.document.model,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&ud.call(this,n)}),{priority:"low"})}function ud(t){const e=this.getTransformedByOperation(t);if(!this.isEqual(e)){const t=this.toPosition();this.path=e.path,this.root=e.root,this.fire("change",t)}}function gd(t,e,n={}){if(e.isCollapsed)return;const o=e.getFirstRange();if("$graveyard"==o.root.rootName)return;const i=t.schema;t.change((t=>{if(!n.doNotResetEntireContent&&function(t,e){const n=t.getLimitElement(e);if(!e.containsEntireContent(n))return!1;const o=e.getFirstRange();if(o.start.parent==o.end.parent)return!1;return t.checkChild(n,"paragraph")}(i,e))return void function(t,e){const n=t.model.schema.getLimitElement(e);t.remove(t.createRangeIn(n)),bd(t,t.createPositionAt(n,0),e)}(t,e);const r={};if(!n.doNotAutoparagraph){const t=e.getSelectedElement();t&&Object.assign(r,i.getAttributesWithProperty(t,"copyOnReplace",!0))}const[s,a]=function(t){const e=t.root.document.model,n=t.start;let o=t.end;if(e.hasContent(t,{ignoreMarkers:!0})){const n=function(t){const e=t.parent,n=e.root.document.model.schema,o=e.getAncestors({parentFirst:!0,includeSelf:!0});for(const t of o){if(n.isLimit(t))return null;if(n.isBlock(t))return t}}(o);if(n&&o.isTouching(e.createPositionAt(n,0))){const n=e.createSelection(t);e.modifySelection(n,{direction:"backward"});const i=n.getLastPosition(),r=e.createRange(i,o);e.hasContent(r,{ignoreMarkers:!0})||(o=i)}}return[dd.fromPosition(n,"toPrevious"),dd.fromPosition(o,"toNext")]}(o);s.isTouching(a)||t.remove(t.createRange(s,a)),n.leaveUnmerged||(!function(t,e,n){const o=t.model;if(!fd(t.model.schema,e,n))return;const[i,r]=function(t,e){const n=t.getAncestors(),o=e.getAncestors();let i=0;for(;n[i]&&n[i]==o[i];)i++;return[n[i],o[i]]}(e,n);if(!i||!r)return;!o.hasContent(i,{ignoreMarkers:!0})&&o.hasContent(r,{ignoreMarkers:!0})?pd(t,e,n,i.parent):md(t,e,n,i.parent)}(t,s,a),i.removeDisallowedAttributes(s.parent.getChildren(),t)),kd(t,e,s),!n.doNotAutoparagraph&&function(t,e){const n=t.checkChild(e,"$text"),o=t.checkChild(e,"paragraph");return!n&&o}(i,s)&&bd(t,s,e,r),s.detach(),a.detach()}))}function md(t,e,n,o){const i=e.parent,r=n.parent;if(i!=o&&r!=o){for(e=t.createPositionAfter(i),(n=t.createPositionBefore(r)).isEqual(e)||t.insert(r,e),t.merge(e);n.parent.isEmpty;){const e=n.parent;n=t.createPositionBefore(e),t.remove(e)}fd(t.model.schema,e,n)&&md(t,e,n,o)}}function pd(t,e,n,o){const i=e.parent,r=n.parent;if(i!=o&&r!=o){for(e=t.createPositionAfter(i),(n=t.createPositionBefore(r)).isEqual(e)||t.insert(i,n);e.parent.isEmpty;){const n=e.parent;e=t.createPositionBefore(n),t.remove(n)}n=t.createPositionBefore(r),function(t,e){const n=e.nodeBefore,o=e.nodeAfter;n.name!=o.name&&t.rename(n,o.name);t.clearAttributes(n),t.setAttributes(Object.fromEntries(o.getAttributes()),n),t.merge(e)}(t,n),fd(t.model.schema,e,n)&&pd(t,e,n,o)}}function fd(t,e,n){const o=e.parent,i=n.parent;return o!=i&&(!t.isLimit(o)&&!t.isLimit(i)&&function(t,e,n){const o=new tl(t,e);for(const t of o.getWalker())if(n.isLimit(t.item))return!1;return!0}(e,n,t))}function bd(t,e,n,o={}){const i=t.createElement("paragraph");t.model.schema.setAllowedAttributes(i,o,t),t.insert(i,e),kd(t,n,t.createPositionAt(i,0))}function kd(t,e,n){e instanceof fl?t.setSelection(n):e.setTo(n)}function wd(t,e){const n=[];Array.from(t.getItems({direction:"backward"})).map((t=>e.createRangeOn(t))).filter((e=>(e.start.isAfter(t.start)||e.start.isEqual(t.start))&&(e.end.isBefore(t.end)||e.end.isEqual(t.end)))).forEach((t=>{n.push(t.start.parent),e.remove(t)})),n.forEach((t=>{let n=t;for(;n.parent&&n.isEmpty;){const t=e.createRangeOn(n);n=n.parent,e.remove(t)}}))}dd.prototype.is=function(t){return"livePosition"===t||"model:livePosition"===t||"position"==t||"model:position"===t};class _d{constructor(t,e,n){this.model=t,this.writer=e,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=t.schema,this._documentFragment=e.createDocumentFragment(),this._documentFragmentPosition=e.createPositionAt(this._documentFragment,0),this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}handleNodes(t){for(const e of Array.from(t))this._handleNode(e);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(t){const e=this.writer.createPositionAfter(this._lastNode),n=this.writer.createPositionAfter(t);if(n.isAfter(e)){if(this._lastNode=t,this.position.parent!=t||!this.position.isAtEnd)throw new l("insertcontent-invalid-insertion-position",this);this.position=n,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?tl._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new tl(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(t){if(this.schema.isObject(t))return void this._handleObject(t);let e=this._checkAndAutoParagraphToAllowedPosition(t);e||(e=this._checkAndSplitToAllowedPosition(t),e)?(this._appendToFragment(t),this._firstNode||(this._firstNode=t),this._lastNode=t):this._handleDisallowedNode(t)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const t=dd.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=t.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=t.toPosition(),t.detach()}_handleObject(t){this._checkAndSplitToAllowedPosition(t)?this._appendToFragment(t):this._tryAutoparagraphing(t)}_handleDisallowedNode(t){t.is("element")?this.handleNodes(t.getChildren()):this._tryAutoparagraphing(t)}_appendToFragment(t){if(!this.schema.checkChild(this.position,t))throw new l("insertcontent-wrong-position",this,{node:t,position:this.position});this.writer.insert(t,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(t.offsetSize),this.schema.isObject(t)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=t:this._nodeToSelect=null,this._filterAttributesOf.push(t)}_setAffectedBoundaries(t){this._affectedStart||(this._affectedStart=dd.fromPosition(t,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(t)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=dd.fromPosition(t,"toNext"))}_mergeOnLeft(){const t=this._firstNode;if(!(t instanceof Ga))return;if(!this._canMergeLeft(t))return;const e=dd._createBefore(t);e.stickiness="toNext";const n=dd.fromPosition(this.position,"toNext");this._affectedStart.isEqual(e)&&(this._affectedStart.detach(),this._affectedStart=dd._createAt(e.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=e.nodeBefore,this._lastNode=e.nodeBefore),this.writer.merge(e),e.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=dd._createAt(e.nodeBefore,"end","toNext")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),e.detach()}_mergeOnRight(){const t=this._lastNode;if(!(t instanceof Ga))return;if(!this._canMergeRight(t))return;const e=dd._createAfter(t);if(e.stickiness="toNext",!this.position.isEqual(e))throw new l("insertcontent-invalid-insertion-position",this);this.position=Ja._createAt(e.nodeBefore,"end");const n=dd.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(e)&&(this._affectedEnd.detach(),this._affectedEnd=dd._createAt(e.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=e.nodeBefore,this._lastNode=e.nodeBefore),this.writer.merge(e),e.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=dd._createAt(e.nodeBefore,0,"toPrevious")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),e.detach()}_canMergeLeft(t){const e=t.previousSibling;return e instanceof Ga&&this.canMergeWith.has(e)&&this.model.schema.checkMerge(e,t)}_canMergeRight(t){const e=t.nextSibling;return e instanceof Ga&&this.canMergeWith.has(e)&&this.model.schema.checkMerge(t,e)}_tryAutoparagraphing(t){const e=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,e)&&this.schema.checkChild(e,t)&&(e._appendChild(t),this._handleNode(e))}_checkAndAutoParagraphToAllowedPosition(t){if(this.schema.checkChild(this.position.parent,t))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",t))return!1;this._insertPartialFragment();const e=this.writer.createElement("paragraph");return this.writer.insert(e,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=e,this.position=this.writer.createPositionAt(e,0),!0}_checkAndSplitToAllowedPosition(t){const e=this._getAllowedIn(this.position.parent,t);if(!e)return!1;for(e!=this.position.parent&&this._insertPartialFragment();e!=this.position.parent;)if(this.position.isAtStart){const t=this.position.parent;this.position=this.writer.createPositionBefore(t),t.isEmpty&&t.parent===e&&this.writer.remove(t)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const t=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=t,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(t,e){return this.schema.checkChild(t,e)?t:this.schema.isLimit(t)?null:this._getAllowedIn(t.parent,e)}}function Ad(t,e,n="auto"){const o=t.getSelectedElement();if(o&&e.schema.isObject(o)&&!e.schema.isInline(o))return"before"==n||"after"==n?e.createRange(e.createPositionAt(o,n)):e.createRangeOn(o);const i=Ea(t.getSelectedBlocks());if(!i)return e.createRange(t.focus);if(i.isEmpty)return e.createRange(e.createPositionAt(i,0));const r=e.createPositionAfter(i);return t.focus.isTouching(r)?e.createRange(r):e.createRange(e.createPositionBefore(i))}function Cd(t,e,n,o,i={}){if(!t.schema.isObject(e))throw new l("insertobject-element-not-an-object",t,{object:e});let r;r=n?n instanceof al||n instanceof fl?n:t.createSelection(n,o):t.document.selection;let s=r;i.findOptimalPosition&&t.schema.isBlock(e)&&(s=t.createSelection(Ad(r,t,i.findOptimalPosition)));const a=Ea(r.getSelectedBlocks()),c={};return a&&Object.assign(c,t.schema.getAttributesWithProperty(a,"copyOnReplace",!0)),t.change((n=>{s.isCollapsed||t.deleteContent(s,{doNotAutoparagraph:!0});let o=e;const r=s.anchor.parent;!t.schema.checkChild(r,e)&&t.schema.checkChild(r,"paragraph")&&t.schema.checkChild("paragraph",e)&&(o=n.createElement("paragraph"),n.insert(e,o)),t.schema.setAllowedAttributes(o,c,n);const a=t.insertContent(o,s);return a.isCollapsed||i.setSelection&&function(t,e,n,o){const i=t.model;if("after"==n){let n=e.nextSibling;!(n&&i.schema.checkChild(n,"$text"))&&i.schema.checkChild(e.parent,"paragraph")&&(n=t.createElement("paragraph"),i.schema.setAllowedAttributes(n,o,t),i.insertContent(n,t.createPositionAfter(e))),n&&t.setSelection(n,0)}else{if("on"!=n)throw new l("insertobject-invalid-place-parameter-value",i);t.setSelection(e,"on")}}(n,e,i.setSelection,c),a}))}const vd=' ,.?!:;"-()';function yd(t,e){const{isForward:n,walker:o,unit:i,schema:r,treatEmojiAsSingleUnit:s}=t,{type:a,item:l,nextPosition:c}=e;if("text"==a)return"word"===t.unit?function(t,e){let n=t.position.textNode;if(n){let o=t.position.offset-n.startOffset;for(;!Ed(n.data,o,e)&&!Td(n,o,e);){t.next();const i=e?t.position.nodeAfter:t.position.nodeBefore;if(i&&i.is("$text")){const o=i.data.charAt(e?0:i.data.length-1);vd.includes(o)||(t.next(),n=t.position.textNode)}o=t.position.offset-n.startOffset}}return t.position}(o,n):function(t,e,n){const o=t.position.textNode;if(o){const i=o.data;let r=t.position.offset-o.startOffset;for(;yc(i,r)||"character"==e&&xc(i,r)||n&&Tc(i,r);)t.next(),r=t.position.offset-o.startOffset}return t.position}(o,i,s);if(a==(n?"elementStart":"elementEnd")){if(r.isSelectable(l))return Ja._createAt(l,n?"after":"before");if(r.checkChild(c,"$text"))return c}else{if(r.isLimit(l))return void o.skip((()=>!0));if(r.checkChild(c,"$text"))return c}}function xd(t,e){const n=t.root,o=Ja._createAt(n,e?"end":0);return e?new tl(t,o):new tl(o,t)}function Ed(t,e,n){const o=e+(n?0:-1);return vd.includes(t.charAt(o))}function Td(t,e,n){return e===(n?t.endOffset:0)}class Dd extends R{constructor(){super(),this.markers=new Ic,this.document=new Sc(this),this.schema=new Zl,this._pendingChanges=[],this._currentWriter=null,["insertContent","insertObject","deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((t=>this.decorate(t))),this.on("applyOperation",((t,e)=>{e[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(((t,e)=>{if("$marker"===e.name)return!0})),sd(this),this.document.registerPostFixer(zl)}change(t){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new bc,callback:t}),this._runPendingChanges()[0]):t(this._currentWriter)}catch(t){l.rethrowUnexpectedError(t,this)}}enqueueChange(t,e){try{t?"function"==typeof t?(e=t,t=new bc):t instanceof bc||(t=new bc(t)):t=new bc,this._pendingChanges.push({batch:t,callback:e}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(t){l.rethrowUnexpectedError(t,this)}}applyOperation(t){t._execute()}insertContent(t,e,n){return function(t,e,n,o){return t.change((i=>{let r;r=n?n instanceof al||n instanceof fl?n:i.createSelection(n,o):t.document.selection,r.isCollapsed||t.deleteContent(r,{doNotAutoparagraph:!0});const s=new _d(t,i,r.anchor);let a;a=e.is("documentFragment")?e.getChildren():[e],s.handleNodes(a);const l=s.getSelectionRange();l&&(r instanceof fl?i.setSelection(l):r.setTo(l));const c=s.getAffectedRange()||t.createRange(r.anchor);return s.destroy(),c}))}(this,t,e,n)}insertObject(t,e,n,o){return Cd(this,t,e,n,o)}deleteContent(t,e){gd(this,t,e)}modifySelection(t,e){!function(t,e,n={}){const o=t.schema,i="backward"!=n.direction,r=n.unit?n.unit:"character",s=!!n.treatEmojiAsSingleUnit,a=e.focus,l=new Ka({boundaries:xd(a,i),singleCharacters:!0,direction:i?"forward":"backward"}),c={walker:l,schema:o,isForward:i,unit:r,treatEmojiAsSingleUnit:s};let d;for(;d=l.next();){if(d.done)return;const n=yd(c,d.value);if(n)return void(e instanceof fl?t.change((t=>{t.setSelectionFocus(n)})):e.setFocus(n))}}(this,t,e)}getSelectedContent(t){return function(t,e){return t.change((t=>{const n=t.createDocumentFragment(),o=e.getFirstRange();if(!o||o.isCollapsed)return n;const i=o.start.root,r=o.start.getCommonPath(o.end),s=i.getNodeByPath(r);let a;a=o.start.parent==o.end.parent?o:t.createRange(t.createPositionAt(s,o.start.path[r.length]),t.createPositionAt(s,o.end.path[r.length]+1));const l=a.end.offset-a.start.offset;for(const e of a.getItems({shallow:!0}))e.is("$textProxy")?t.appendText(e.data,e.getAttributes(),n):t.append(t.cloneElement(e,!0),n);if(a!=o){const e=o._getTransformedByMove(a.start,t.createPositionAt(n,0),l)[0],i=t.createRange(t.createPositionAt(n,0),e.start);wd(t.createRange(e.end,t.createPositionAt(n,"end")),t),wd(i,t)}return n}))}(this,t)}hasContent(t,e={}){const n=t instanceof tl?t:tl._createIn(t);if(n.isCollapsed)return!1;const{ignoreWhitespaces:o=!1,ignoreMarkers:i=!1}=e;if(!i)for(const t of this.markers.getMarkersIntersectingRange(n))if(t.affectsData)return!0;for(const t of n.getItems())if(this.schema.isContent(t)){if(!t.is("$textProxy"))return!0;if(!o)return!0;if(-1!==t.data.search(/\S/))return!0}return!1}createPositionFromPath(t,e,n){return new Ja(t,e,n)}createPositionAt(t,e){return Ja._createAt(t,e)}createPositionAfter(t){return Ja._createAfter(t)}createPositionBefore(t){return Ja._createBefore(t)}createRange(t,e){return new tl(t,e)}createRangeIn(t){return tl._createIn(t)}createRangeOn(t){return tl._createOn(t)}createSelection(...t){return new al(...t)}createBatch(t){return new bc(t)}createOperationFromJSON(t){return class{static fromJSON(t,e){return Yc[t.__className].fromJSON(t,e)}}.fromJSON(t,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const t=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const e=this._pendingChanges[0].batch;this._currentWriter=new td(this,e);const n=this._pendingChanges[0].callback(this._currentWriter);t.push(n),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return t}}class Sd extends Da{constructor(t){super(),this.editor=t}set(t,e,n={}){if("string"==typeof e){const t=e;e=(e,n)=>{this.editor.execute(t),n()}}super.set(t,e,n)}}class Bd{constructor(t={}){const e=t.language||this.constructor.defaultConfig&&this.constructor.defaultConfig.language;this._context=t.context||new To({language:e}),this._context._addEditor(this,!t.context);const n=Array.from(this.constructor.builtinPlugins||[]);this.config=new mo(t,this.constructor.defaultConfig),this.config.define("plugins",n),this.config.define(this._context._getEditorConfig()),this.plugins=new wo(this,n,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new Ul,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new Dd;const o=new Pi;this.data=new gc(this.model,o),this.editing=new jl(this.model,o),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new mc([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 Sd(this),this.keystrokes.listenTo(this.editing.view.document)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(t){throw new l("editor-isreadonly-has-no-setter")}enableReadOnlyMode(t){if("string"!=typeof t&&"symbol"!=typeof t)throw new l("editor-read-only-lock-id-invalid",null,{lockId:t});this._readOnlyLocks.has(t)||(this._readOnlyLocks.add(t),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(t){if("string"!=typeof t&&"symbol"!=typeof t)throw new l("editor-read-only-lock-id-invalid",null,{lockId:t});this._readOnlyLocks.has(t)&&(this._readOnlyLocks.delete(t),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}initPlugins(){const t=this.config,e=t.get("plugins"),n=t.get("removePlugins")||[],o=t.get("extraPlugins")||[],i=t.get("substitutePlugins")||[];return this.plugins.init(e.concat(o),n,i)}destroy(){let t=Promise.resolve();return"initializing"==this.state&&(t=new Promise((t=>this.once("ready",t)))),t.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(...t){try{return this.commands.execute(...t)}catch(t){l.rethrowUnexpectedError(t,this)}}focus(){this.editing.view.focus()}}M(Bd,P);class Id{constructor(t){this.editor=t,this._components=new Map}*names(){for(const t of this._components.values())yield t.originalName}add(t,e){this._components.set(Pd(t),{callback:e,originalName:t})}create(t){if(!this.has(t))throw new l("componentfactory-item-missing",this,{name:t});return this._components.get(Pd(t)).callback(this.editor.locale)}has(t){return this._components.has(Pd(t))}}function Pd(t){return String(t).toLowerCase()}class Rd extends ko{constructor(t=[]){super(t,{idProperty:"viewUid"}),this.on("add",((t,e,n)=>{this._renderViewIntoCollectionParent(e,n)})),this.on("remove",((t,e)=>{e.element&&this._parentElement&&e.element.remove()})),this._parentElement=null}destroy(){this.map((t=>t.destroy()))}setParent(t){this._parentElement=t;for(const t of this)this._renderViewIntoCollectionParent(t)}delegate(...t){if(!t.length||!t.every((t=>"string"==typeof t)))throw new l("ui-viewcollection-delegate-wrong-events",this);return{to:e=>{for(const n of this)for(const o of t)n.delegate(o).to(e);this.on("add",((n,o)=>{for(const n of t)o.delegate(n).to(e)})),this.on("remove",((n,o)=>{for(const n of t)o.stopDelegating(n,e)}))}}}_renderViewIntoCollectionParent(t,e){t.isRendered||t.render(),t.element&&this._parentElement&&this._parentElement.insertBefore(t.element,this._parentElement.children[e])}}class zd{constructor(t){Object.assign(this,jd(Wd(t))),this._isRendered=!1,this._revertData=null}render(){const t=this._renderNode({intoFragment:!0});return this._isRendered=!0,t}apply(t){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:t,isApplying:!0,revertData:this._revertData}),t}revert(t){if(!this._revertData)throw new l("ui-template-revert-not-applied",[this,t]);this._revertTemplateFromNode(t,this._revertData)}*getViews(){yield*function*t(e){if(e.children)for(const n of e.children)Jd(n)?yield n:Yd(n)&&(yield*t(n))}(this)}static bind(t,e){return{to:(n,o)=>new Fd({eventNameOrFunction:n,attribute:n,observable:t,emitter:e,callback:o}),if:(n,o,i)=>new Od({observable:t,emitter:e,attribute:n,valueIfTrue:o,callback:i})}}static extend(t,e){if(t._isRendered)throw new l("template-extend-render",[this,t]);Kd(t,jd(Wd(e)))}_renderNode(t){let e;if(e=t.node?this.tag&&this.text:this.tag?this.text:!this.text,e)throw new l("ui-template-wrong-syntax",this);return this.text?this._renderText(t):this._renderElement(t)}_renderElement(t){let e=t.node;return e||(e=t.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(t),this._renderElementChildren(t),this._setUpListeners(t),e}_renderText(t){let e=t.node;return e?t.revertData.text=e.textContent:e=t.node=document.createTextNode(""),Nd(this.text)?this._bindToObservable({schema:this.text,updater:Ld(e),data:t}):e.textContent=this.text.join(""),e}_renderAttributes(t){let e,n,o,i;if(!this.attributes)return;const r=t.node,s=t.revertData;for(e in this.attributes)if(o=r.getAttribute(e),n=this.attributes[e],s&&(s.attributes[e]=o),i=E(n[0])&&n[0].ns?n[0].ns:null,Nd(n)){const a=i?n[0].value:n;s&&Xd(e)&&a.unshift(o),this._bindToObservable({schema:a,updater:Hd(r,e,i),data:t})}else"style"==e&&"string"!=typeof n[0]?this._renderStyleAttribute(n[0],t):(s&&o&&Xd(e)&&n.unshift(o),n=n.map((t=>t&&t.value||t)).reduce(((t,e)=>t.concat(e)),[]).reduce($d,""),Zd(n)||r.setAttributeNS(i,e,n))}_renderStyleAttribute(t,e){const n=e.node;for(const o in t){const i=t[o];Nd(i)?this._bindToObservable({schema:[i],updater:qd(n,o),data:e}):n.style[o]=i}}_renderElementChildren(t){const e=t.node,n=t.intoFragment?document.createDocumentFragment():e,o=t.isApplying;let i=0;for(const r of this.children)if(Qd(r)){if(!o){r.setParent(e);for(const t of r)n.appendChild(t.element)}}else if(Jd(r))o||(r.isRendered||r.render(),n.appendChild(r.element));else if(Xr(r))n.appendChild(r);else if(o){const e={children:[],bindings:[],attributes:{}};t.revertData.children.push(e),r._renderNode({node:n.childNodes[i++],isApplying:!0,revertData:e})}else n.appendChild(r.render());t.intoFragment&&e.appendChild(n)}_setUpListeners(t){if(this.eventListeners)for(const e in this.eventListeners){const n=this.eventListeners[e].map((n=>{const[o,i]=e.split("@");return n.activateDomEventListener(o,i,t)}));t.revertData&&t.revertData.bindings.push(n)}}_bindToObservable({schema:t,updater:e,data:n}){const o=n.revertData;Md(t,e,n);const i=t.filter((t=>!Zd(t))).filter((t=>t.observable)).map((o=>o.activateAttributeListener(t,e,n)));o&&o.bindings.push(i)}_revertTemplateFromNode(t,e){for(const t of e.bindings)for(const e of t)e();if(e.text)t.textContent=e.text;else{for(const n in e.attributes){const o=e.attributes[n];null===o?t.removeAttribute(n):t.setAttribute(n,o)}for(let n=0;n<e.children.length;++n)this._revertTemplateFromNode(t.childNodes[n],e.children[n])}}}M(zd,b);class Vd{constructor(t){Object.assign(this,t)}getValue(t){const e=this.observable[this.attribute];return this.callback?this.callback(e,t):e}activateAttributeListener(t,e,n){const o=()=>Md(t,e,n);return this.emitter.listenTo(this.observable,"change:"+this.attribute,o),()=>{this.emitter.stopListening(this.observable,"change:"+this.attribute,o)}}}class Fd extends Vd{activateDomEventListener(t,e,n){const o=(t,n)=>{e&&!n.target.matches(e)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,t,o),()=>{this.emitter.stopListening(n.node,t,o)}}}class Od extends Vd{getValue(t){return!Zd(super.getValue(t))&&(this.valueIfTrue||!0)}}function Nd(t){return!!t&&(t.value&&(t=t.value),Array.isArray(t)?t.some(Nd):t instanceof Vd)}function Md(t,e,{node:n}){let o=function(t,e){return t.map((t=>t instanceof Vd?t.getValue(e):t))}(t,n);o=1==t.length&&t[0]instanceof Od?o[0]:o.reduce($d,""),Zd(o)?e.remove():e.set(o)}function Ld(t){return{set(e){t.textContent=e},remove(){t.textContent=""}}}function Hd(t,e,n){return{set(o){t.setAttributeNS(n,e,o)},remove(){t.removeAttributeNS(n,e)}}}function qd(t,e){return{set(n){t.style[e]=n},remove(){t.style[e]=null}}}function Wd(t){return uo(t,(t=>{if(t&&(t instanceof Vd||Yd(t)||Jd(t)||Qd(t)))return t}))}function jd(t){if("string"==typeof t?t=function(t){return{text:[t]}}(t):t.text&&function(t){t.text=_o(t.text)}(t),t.on&&(t.eventListeners=function(t){for(const e in t)Ud(t,e);return t}(t.on),delete t.on),!t.text){t.attributes&&function(t){for(const e in t)t[e].value&&(t[e].value=_o(t[e].value)),Ud(t,e)}(t.attributes);const e=[];if(t.children)if(Qd(t.children))e.push(t.children);else for(const n of t.children)Yd(n)||Jd(n)||Xr(n)?e.push(n):e.push(new zd(n));t.children=e}return t}function Ud(t,e){t[e]=_o(t[e])}function $d(t,e){return Zd(e)?t:Zd(t)?e:`${t} ${e}`}function Gd(t,e){for(const n in e)t[n]?t[n].push(...e[n]):t[n]=e[n]}function Kd(t,e){if(e.attributes&&(t.attributes||(t.attributes={}),Gd(t.attributes,e.attributes)),e.eventListeners&&(t.eventListeners||(t.eventListeners={}),Gd(t.eventListeners,e.eventListeners)),e.text&&t.text.push(...e.text),e.children&&e.children.length){if(t.children.length!=e.children.length)throw new l("ui-template-extend-children-mismatch",t);let n=0;for(const o of e.children)Kd(t.children[n++],o)}}function Zd(t){return!t&&0!==t}function Jd(t){return t instanceof nh}function Yd(t){return t instanceof zd}function Qd(t){return t instanceof Rd}function Xd(t){return"class"==t||"style"==t}var th=n(4793),eh={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(th.Z,eh);th.Z.locals;class nh{constructor(t){this.element=null,this.isRendered=!1,this.locale=t,this.t=t&&t.t,this._viewCollections=new ko,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((e,n)=>{n.locale=t})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=zd.bind(this,this)}createCollection(t){const e=new Rd(t);return this._viewCollections.add(e),e}registerChild(t){bo(t)||(t=[t]);for(const e of t)this._unboundChildren.add(e)}deregisterChild(t){bo(t)||(t=[t]);for(const e of t)this._unboundChildren.remove(e)}setTemplate(t){this.template=new zd(t)}extendTemplate(t){zd.extend(this.template,t)}render(){if(this.isRendered)throw new l("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((t=>t.destroy())),this.template&&this.template._revertData&&this.template.revert(this.element)}}function oh({element:t,target:e,positions:n,limiter:o,fitInViewport:i,viewportOffsetConfig:r}){Dt(e)&&(e=e()),Dt(o)&&(o=o());const s=function(t){return t&&t.parentNode?t.offsetParent===Co.document.body?null:t.offsetParent:null}(t),a=new _a(t),l=new _a(e);let c;const d=i&&function(t){t=Object.assign({top:0,bottom:0,left:0,right:0},t);const e=new _a(Co.window);return e.top+=t.top,e.height-=t.top,e.bottom-=t.bottom,e.height-=t.bottom,e}(r)||null,h={targetRect:l,elementRect:a,positionedElementAncestor:s,viewportRect:d};if(o||i){const t=o&&new _a(o).getVisible();Object.assign(h,{limiterRect:t,viewportRect:d}),c=function(t,e){const{elementRect:n}=e,o=n.getArea(),i=t.map((t=>new rh(t,e))).filter((t=>!!t.name));let r=0,s=null;for(const t of i){const{limiterIntersectionArea:e,viewportIntersectionArea:n}=t;if(e===o)return t;const i=n**2+e**2;i>r&&(r=i,s=t)}return s}(n,h)||new rh(n[0],h)}else c=new rh(n[0],h);return c}function ih(t){const{scrollX:e,scrollY:n}=Co.window;return t.clone().moveBy(e,n)}M(nh,_s),M(nh,P);class rh{constructor(t,e){const n=t(e.targetRect,e.elementRect,e.viewportRect);if(!n)return;const{left:o,top:i,name:r,config:s}=n;this.name=r,this.config=s,this._positioningFunctionCorrdinates={left:o,top:i},this._options=e}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const t=this._options.limiterRect;if(t){const e=this._options.viewportRect;if(!e)return t.getIntersectionArea(this._rect);{const n=t.getIntersection(e);if(n)return n.getIntersectionArea(this._rect)}}return 0}get viewportIntersectionArea(){const t=this._options.viewportRect;return t?t.getIntersectionArea(this._rect):0}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCorrdinates.left,this._positioningFunctionCorrdinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=ih(this._rect),this._options.positionedElementAncestor&&function(t,e){const n=ih(new _a(e)),o=ka(e);let i=0,r=0;i-=n.left,r-=n.top,i+=e.scrollLeft,r+=e.scrollTop,i-=o.left,r-=o.top,t.moveBy(i,r)}(this._cachedAbsoluteRect,this._options.positionedElementAncestor)),this._cachedAbsoluteRect}}function sh(t){return e=>e+t}var ah=n(8793),lh={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(ah.Z,lh);ah.Z.locals;const ch=sh("px"),dh=Co.document.body;class hh extends nh{constructor(t){super(t);const e=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",e.to("position",(t=>`ck-balloon-panel_${t}`)),e.if("isVisible","ck-balloon-panel_visible"),e.if("withArrow","ck-balloon-panel_with-arrow"),e.to("class")],style:{top:e.to("top",ch),left:e.to("left",ch)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(t){this.show();const e=hh.defaultPositions,n=Object.assign({},{element:this.element,positions:[e.southArrowNorth,e.southArrowNorthMiddleWest,e.southArrowNorthMiddleEast,e.southArrowNorthWest,e.southArrowNorthEast,e.northArrowSouth,e.northArrowSouthMiddleWest,e.northArrowSouthMiddleEast,e.northArrowSouthWest,e.northArrowSouthEast,e.viewportStickyNorth],limiter:dh,fitInViewport:!0},t),o=hh._getOptimalPosition(n),i=parseInt(o.left),r=parseInt(o.top),{name:s,config:a={}}=o,{withArrow:l=!0}=a;Object.assign(this,{top:r,left:i,position:s,withArrow:l})}pin(t){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(t):this._stopPinning()},this._startPinning(t),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(t){this.attachTo(t);const e=uh(t.target),n=t.limiter?uh(t.limiter):dh;this.listenTo(Co.document,"scroll",((o,i)=>{const r=i.target,s=e&&r.contains(e),a=n&&r.contains(n);!s&&!a&&e&&n||this.attachTo(t)}),{useCapture:!0}),this.listenTo(Co.window,"resize",(()=>{this.attachTo(t)}))}_stopPinning(){this.stopListening(Co.document,"scroll"),this.stopListening(Co.window,"resize")}}function uh(t){return go(t)?t:ba(t)?t.commonAncestorContainer:"function"==typeof t?uh(t()):null}function gh({sideOffset:t=hh.arrowSideOffset,heightOffset:e=hh.arrowHeightOffset,stickyVerticalOffset:n=hh.stickyVerticalOffset,config:o}={}){return{northWestArrowSouthWest:(e,n)=>({top:i(e,n),left:e.left-t,name:"arrow_sw",...o&&{config:o}}),northWestArrowSouthMiddleWest:(e,n)=>({top:i(e,n),left:e.left-.25*n.width-t,name:"arrow_smw",...o&&{config:o}}),northWestArrowSouth:(t,e)=>({top:i(t,e),left:t.left-e.width/2,name:"arrow_s",...o&&{config:o}}),northWestArrowSouthMiddleEast:(e,n)=>({top:i(e,n),left:e.left-.75*n.width+t,name:"arrow_sme",...o&&{config:o}}),northWestArrowSouthEast:(e,n)=>({top:i(e,n),left:e.left-n.width+t,name:"arrow_se",...o&&{config:o}}),northArrowSouthWest:(e,n)=>({top:i(e,n),left:e.left+e.width/2-t,name:"arrow_sw",...o&&{config:o}}),northArrowSouthMiddleWest:(e,n)=>({top:i(e,n),left:e.left+e.width/2-.25*n.width-t,name:"arrow_smw",...o&&{config:o}}),northArrowSouth:(t,e)=>({top:i(t,e),left:t.left+t.width/2-e.width/2,name:"arrow_s",...o&&{config:o}}),northArrowSouthMiddleEast:(e,n)=>({top:i(e,n),left:e.left+e.width/2-.75*n.width+t,name:"arrow_sme",...o&&{config:o}}),northArrowSouthEast:(e,n)=>({top:i(e,n),left:e.left+e.width/2-n.width+t,name:"arrow_se",...o&&{config:o}}),northEastArrowSouthWest:(e,n)=>({top:i(e,n),left:e.right-t,name:"arrow_sw",...o&&{config:o}}),northEastArrowSouthMiddleWest:(e,n)=>({top:i(e,n),left:e.right-.25*n.width-t,name:"arrow_smw",...o&&{config:o}}),northEastArrowSouth:(t,e)=>({top:i(t,e),left:t.right-e.width/2,name:"arrow_s",...o&&{config:o}}),northEastArrowSouthMiddleEast:(e,n)=>({top:i(e,n),left:e.right-.75*n.width+t,name:"arrow_sme",...o&&{config:o}}),northEastArrowSouthEast:(e,n)=>({top:i(e,n),left:e.right-n.width+t,name:"arrow_se",...o&&{config:o}}),southWestArrowNorthWest:(e,n)=>({top:r(e),left:e.left-t,name:"arrow_nw",...o&&{config:o}}),southWestArrowNorthMiddleWest:(e,n)=>({top:r(e),left:e.left-.25*n.width-t,name:"arrow_nmw",...o&&{config:o}}),southWestArrowNorth:(t,e)=>({top:r(t),left:t.left-e.width/2,name:"arrow_n",...o&&{config:o}}),southWestArrowNorthMiddleEast:(e,n)=>({top:r(e),left:e.left-.75*n.width+t,name:"arrow_nme",...o&&{config:o}}),southWestArrowNorthEast:(e,n)=>({top:r(e),left:e.left-n.width+t,name:"arrow_ne",...o&&{config:o}}),southArrowNorthWest:(e,n)=>({top:r(e),left:e.left+e.width/2-t,name:"arrow_nw",...o&&{config:o}}),southArrowNorthMiddleWest:(e,n)=>({top:r(e),left:e.left+e.width/2-.25*n.width-t,name:"arrow_nmw",...o&&{config:o}}),southArrowNorth:(t,e)=>({top:r(t),left:t.left+t.width/2-e.width/2,name:"arrow_n",...o&&{config:o}}),southArrowNorthMiddleEast:(e,n)=>({top:r(e),left:e.left+e.width/2-.75*n.width+t,name:"arrow_nme",...o&&{config:o}}),southArrowNorthEast:(e,n)=>({top:r(e),left:e.left+e.width/2-n.width+t,name:"arrow_ne",...o&&{config:o}}),southEastArrowNorthWest:(e,n)=>({top:r(e),left:e.right-t,name:"arrow_nw",...o&&{config:o}}),southEastArrowNorthMiddleWest:(e,n)=>({top:r(e),left:e.right-.25*n.width-t,name:"arrow_nmw",...o&&{config:o}}),southEastArrowNorth:(t,e)=>({top:r(t),left:t.right-e.width/2,name:"arrow_n",...o&&{config:o}}),southEastArrowNorthMiddleEast:(e,n)=>({top:r(e),left:e.right-.75*n.width+t,name:"arrow_nme",...o&&{config:o}}),southEastArrowNorthEast:(e,n)=>({top:r(e),left:e.right-n.width+t,name:"arrow_ne",...o&&{config:o}}),westArrowEast:(t,n)=>({top:t.top+t.height/2-n.height/2,left:t.left-n.width-e,name:"arrow_e",...o&&{config:o}}),eastArrowWest:(t,n)=>({top:t.top+t.height/2-n.height/2,left:t.right+e,name:"arrow_w",...o&&{config:o}}),viewportStickyNorth:(t,e,i)=>t.getIntersection(i)?{top:i.top+n,left:t.left+t.width/2-e.width/2,name:"arrowless",config:{withArrow:!1,...o}}:null};function i(t,n){return t.top-n.height-e}function r(t){return t.bottom+e}}hh.arrowSideOffset=25,hh.arrowHeightOffset=10,hh.stickyVerticalOffset=20,hh._getOptimalPosition=oh,hh.defaultPositions=gh();var mh=n(3332),ph={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(mh.Z,ph);mh.Z.locals;const fh="ck-tooltip";class bh{constructor(t){if(bh._editors.add(t),bh._instance)return bh._instance;bh._instance=this,this.tooltipTextView=new nh(t.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new hh(t.locale),this.balloonPanelView.class=fh,this.balloonPanelView.content.add(this.tooltipTextView),this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._pinTooltipDebounced=ca(this._pinTooltip,600),this.listenTo(Co.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(Co.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(Co.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(Co.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(Co.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(t){bh._editors.delete(t),this.stopListening(t.ui),bh._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),bh._instance=null)}_onEnterOrFocus(t,{target:e}){const n=kh(e);var o;n&&(n!==this._currentElementWithTooltip&&(this._unpinTooltip(),this._pinTooltipDebounced(n,{text:(o=n).dataset.ckeTooltipText,position:o.dataset.ckeTooltipPosition||"s",cssClass:o.dataset.ckeTooltipClass||""})))}_onLeaveOrBlur(t,{target:e,relatedTarget:n}){if("mouseleave"===t.name){if(!go(e))return;if(this._currentElementWithTooltip&&e!==this._currentElementWithTooltip)return;const t=kh(e),o=kh(n);t&&t!==o&&this._unpinTooltip()}else{if(this._currentElementWithTooltip&&e!==this._currentElementWithTooltip)return;this._unpinTooltip()}}_onScroll(t,{target:e}){this._currentElementWithTooltip&&(e.contains(this.balloonPanelView.element)&&e.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(t,{text:e,position:n,cssClass:o}){const i=Ea(bh._editors.values()).ui.view.body;i.has(this.balloonPanelView)||i.add(this.balloonPanelView),this.tooltipTextView.text=e,this.balloonPanelView.pin({target:t,positions:bh.getPositioningFunctions(n)}),this.balloonPanelView.class=[fh,o].filter((t=>t)).join(" ");for(const t of bh._editors)this.listenTo(t.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=t,this._currentTooltipPosition=n}_unpinTooltip(){this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const t of bh._editors)this.stopListening(t.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null}_updateTooltipPosition(){xa(this._currentElementWithTooltip)?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:bh.getPositioningFunctions(this._currentTooltipPosition)}):this._unpinTooltip()}static getPositioningFunctions(t){const e=bh.defaultBalloonPositions;return{s:[e.southArrowNorth,e.southArrowNorthEast,e.southArrowNorthWest],n:[e.northArrowSouth],e:[e.eastArrowWest],w:[e.westArrowEast],sw:[e.southArrowNorthEast],se:[e.southArrowNorthWest]}[t]}}function kh(t){return go(t)?t.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}M(bh,_s),bh.defaultBalloonPositions=gh({heightOffset:5,sideOffset:13}),bh._instance=null,bh._editors=new Set;class wh{constructor(t){this.editor=t,this.componentFactory=new Id(t),this.focusTracker=new Ta,this.tooltipManager=new bh(t),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.isReady=!1,this.once("ready",(()=>{this.isReady=!0})),this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[],this.listenTo(t.editing.view.document,"layoutChanged",(()=>this.update())),this._initFocusTracking()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor);for(const t of this._editableElementsMap.values())t.ckeditorInstance=null;this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(t,e){this._editableElementsMap.set(t,e),e.ckeditorInstance||(e.ckeditorInstance=this.editor),this.focusTracker.add(e);const n=()=>{this.editor.editing.view.getDomRoot(t)||this.editor.keystrokes.listenTo(e)};this.isReady?n():this.once("ready",n)}getEditableElement(t="main"){return this._editableElementsMap.get(t)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(t,e={}){t.isRendered?(this.focusTracker.add(t.element),this.editor.keystrokes.listenTo(t.element)):t.once("render",(()=>{this.focusTracker.add(t.element),this.editor.keystrokes.listenTo(t.element)})),this._focusableToolbarDefinitions.push({toolbarView:t,options:e})}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}_readViewportOffsetFromConfig(){const t=this.editor,e=t.config.get("ui.viewportOffset");if(e)return e;const n=t.config.get("toolbar.viewportTopOffset");return n?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:n}):{top:0}}_initFocusTracking(){const t=this.editor,e=t.editing.view;let n,o;t.keystrokes.set("Alt+F10",((t,i)=>{const r=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(r)&&!Array.from(e.domRoots.values()).includes(r)&&(n=r);const s=this._getCurrentFocusedToolbarDefinition();s&&o||(o=this._getFocusableCandidateToolbarDefinitions(s));for(let t=0;t<o.length;t++){const t=o.shift();if(o.push(t),t!==s&&this._focusFocusableCandidateToolbar(t)){s&&s.options.afterBlur&&s.options.afterBlur();break}}i()})),t.keystrokes.set("Esc",((e,o)=>{const i=this._getCurrentFocusedToolbarDefinition();i&&(n?(n.focus(),n=null):t.editing.view.focus(),i.options.afterBlur&&i.options.afterBlur(),o())}))}_getFocusableCandidateToolbarDefinitions(){const t=[];for(const e of this._focusableToolbarDefinitions){const{toolbarView:n,options:o}=e;(xa(n.element)||o.beforeFocus)&&t.push(e)}return t.sort(((t,e)=>_h(t)-_h(e))),t}_getCurrentFocusedToolbarDefinition(){for(const t of this._focusableToolbarDefinitions)if(t.toolbarView.element&&t.toolbarView.element.contains(this.focusTracker.focusedElement))return t;return null}_focusFocusableCandidateToolbar(t){const{toolbarView:e,options:{beforeFocus:n}}=t;return n&&n(),!!xa(e.element)&&(e.focus(),!0)}}function _h(t){const{toolbarView:e,options:n}=t;let o=10;return xa(e.element)&&o--,n.isContextual&&o--,o}M(wh,P);const Ah={setData(t){this.data.set(t)},getData(t){return this.data.get(t)}},Ch=Ah;function vh(t,e){t instanceof HTMLTextAreaElement&&(t.value=e),t.innerHTML=e}const yh={updateSourceElement(t=this.data.get()){if(!this.sourceElement)throw new l("editor-missing-sourceelement",this);const e=this.config.get("updateSourceElementOnDestroy"),n=this.sourceElement instanceof HTMLTextAreaElement;vh(this.sourceElement,e||n?t:"")}};class xh extends Do{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new ko({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(t){if("string"!=typeof t)throw new l("pendingactions-add-invalid-message",this);const e=Object.create(P);return e.set("message",t),this._actions.add(e),this.hasAny=!0,e}remove(t){this._actions.remove(t),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const Eh='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.591 10.177 4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414l-4.243 4.243z"/></svg>',Th='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.972 16.615a.997.997 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a.997.997 0 0 1-.745.292z"/></svg>',Dh='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.999 2H15a1 1 0 0 1 0 2h-1.004v13a1 1 0 1 1-2 0V4H8.999v13a1 1 0 1 1-2 0v-7A4 4 0 0 1 3 6a4 4 0 0 1 3.999-4z"/></svg>',Sh='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="9.5" cy="4.5" r="1.5"/><circle cx="9.5" cy="10.5" r="1.5"/><circle cx="9.5" cy="16.5" r="1.5"/></svg>',Bh={cancel:Eh,caption:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 16h9a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2z"/><path d="M17 1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14zm0 1.5H3a.5.5 0 0 0-.492.41L2.5 3v9a.5.5 0 0 0 .41.492L3 12.5h14a.5.5 0 0 0 .492-.41L17.5 12V3a.5.5 0 0 0-.41-.492L17 2.5z" fill-opacity=".6"/></svg>',check:Th,cog:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.333 2 .19 2.263a5.899 5.899 0 0 1 1.458.604L14.714 3.4 16.6 5.286l-1.467 1.733c.263.452.468.942.605 1.46L18 8.666v2.666l-2.263.19a5.899 5.899 0 0 1-.604 1.458l1.467 1.733-1.886 1.886-1.733-1.467a5.899 5.899 0 0 1-1.46.605L11.334 18H8.667l-.19-2.263a5.899 5.899 0 0 1-1.458-.604L5.286 16.6 3.4 14.714l1.467-1.733a5.899 5.899 0 0 1-.604-1.458L2 11.333V8.667l2.262-.189a5.899 5.899 0 0 1 .605-1.459L3.4 5.286 5.286 3.4l1.733 1.467a5.899 5.899 0 0 1 1.46-.605L8.666 2h2.666zM10 6.267a3.733 3.733 0 1 0 0 7.466 3.733 3.733 0 0 0 0-7.466z"/></svg>',eraser:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m8.636 9.531-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053-2.147-.066z"/><path d="M4 18h5.523v-1H4zm-2 0h1v-1H2z"/></svg>',lowVision:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.085 6.22 2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.094 11.094 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.488.488 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304c-.258.11-.51.233-.757.365l6.239 6.24-.006.005.78.78c-.388.094-.78.166-1.174.215l-1.11-1.11h.011L4.55 8.197a7.2 7.2 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10.164 10.164 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a2.563 2.563 0 0 0-.124.2c-.043.077-.08.158-.108.241a.534.534 0 0 0-.028.133.29.29 0 0 0 .008.072.927.927 0 0 0 .082.226c.067.133.145.26.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93zm7.07.531a4.632 4.632 0 0 1 1.108 5.992l.345.344.046-.018a9.313 9.313 0 0 0 2-1.112c.256-.187.5-.392.727-.613.137-.134.27-.277.392-.431.072-.091.141-.185.203-.286.057-.093.107-.19.148-.292a.72.72 0 0 0 .036-.12.29.29 0 0 0 .008-.072.492.492 0 0 0-.028-.133.999.999 0 0 0-.036-.096 2.165 2.165 0 0 0-.071-.145 2.917 2.917 0 0 0-.125-.2 3.592 3.592 0 0 0-.263-.335 5.444 5.444 0 0 0-.53-.523 7.955 7.955 0 0 0-1.054-.768 9.766 9.766 0 0 0-1.879-.891c-.337-.118-.68-.219-1.027-.301zm-2.85.21-.069.002a.508.508 0 0 0-.254.097.496.496 0 0 0-.104.679.498.498 0 0 0 .326.199l.045.005c.091.003.181.003.272.012a2.45 2.45 0 0 1 2.017 1.513c.024.061.043.125.069.185a.494.494 0 0 0 .45.287h.008a.496.496 0 0 0 .35-.158.482.482 0 0 0 .13-.335.638.638 0 0 0-.048-.219 3.379 3.379 0 0 0-.36-.723 3.438 3.438 0 0 0-2.791-1.543l-.028-.001h-.013z"/></svg>',image:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.91 10.54c.26-.23.64-.21.88.03l3.36 3.14 2.23-2.06a.64.64 0 0 1 .87 0l2.52 2.97V4.5H3.2v10.12l3.71-4.08zm10.27-7.51c.6 0 1.09.47 1.09 1.05v11.84c0 .59-.49 1.06-1.09 1.06H2.79c-.6 0-1.09-.47-1.09-1.06V4.08c0-.58.49-1.05 1.1-1.05h14.38zm-5.22 5.56a1.96 1.96 0 1 1 3.4-1.96 1.96 1.96 0 0 1-3.4 1.96z"/></svg>',alignBottom:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.239 13.938-2.88-1.663a.75.75 0 0 1 .75-1.3L9 12.067V4.75a.75.75 0 1 1 1.5 0v7.318l1.89-1.093a.75.75 0 0 1 .75 1.3l-2.879 1.663a.752.752 0 0 1-.511.187.752.752 0 0 1-.511-.187zM4.25 17a.75.75 0 1 1 0-1.5h10.5a.75.75 0 0 1 0 1.5H4.25z"/></svg>',alignMiddle:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.75 11.875a.752.752 0 0 1 .508.184l2.883 1.666a.75.75 0 0 1-.659 1.344l-.091-.044-1.892-1.093.001 4.318a.75.75 0 1 1-1.5 0v-4.317l-1.89 1.092a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .51-.187zM15.25 9a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM9.75.375a.75.75 0 0 1 .75.75v4.318l1.89-1.093.092-.045a.75.75 0 0 1 .659 1.344l-2.883 1.667a.752.752 0 0 1-.508.184.752.752 0 0 1-.511-.187L6.359 5.65a.75.75 0 0 1 .75-1.299L9 5.442V1.125a.75.75 0 0 1 .75-.75z"/></svg>',alignTop:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m10.261 7.062 2.88 1.663a.75.75 0 0 1-.75 1.3L10.5 8.933v7.317a.75.75 0 1 1-1.5 0V8.932l-1.89 1.093a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .511-.187.752.752 0 0 1 .511.187zM15.25 4a.75.75 0 1 1 0 1.5H4.75a.75.75 0 0 1 0-1.5h10.5z"/></svg>',alignLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',alignCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm2.286 4c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75z"/></svg>',alignRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M18 3.75a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 4a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75zm0-8a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75z"/></svg>',alignJustify:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',objectLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zm0-3H18v1.5h-4.5zm0-3H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M15.003 7v5.5a1 1 0 0 1-1 1H5.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H6.5V12h6.997V7.5z"/></svg>',objectRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2zm0-9h5v1.5H2zm0 3h5v1.5H2zm0 3h5v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectFullWidth:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18 7v5.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1zm-1.505.5H3.504V12h12.991V7.5z"/></svg>',objectInline:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectSizeFull:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M18.095 2H1.905C.853 2 0 2.895 0 4v12c0 1.105.853 2 1.905 2h16.19C19.147 18 20 17.105 20 16V4c0-1.105-.853-2-1.905-2zm0 1.5c.263 0 .476.224.476.5v12c0 .276-.213.5-.476.5H1.905a.489.489 0 0 1-.476-.5V4c0-.276.213-.5.476-.5h16.19z"/></svg>',objectSizeLarge:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M13 6H2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5h11z"/></svg>',objectSizeSmall:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1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0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M10 8H2a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-6a.5.5 0 0 1 .5-.5h8z"/></svg>',pencil:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m7.3 17.37-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5 9.375 17H19v1.5H8z"/></svg>',pilcrow:Dh,quote:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574z"/></svg>',threeVerticalDots:Sh};function Ih({emitter:t,activator:e,callback:n,contextElements:o}){t.listenTo(document,"mousedown",((t,i)=>{if(!e())return;const r="function"==typeof i.composedPath?i.composedPath():[];for(const t of o)if(t.contains(i.target)||r.includes(t))return;n()}))}function Ph(t){t.set("_isCssTransitionsDisabled",!1),t.disableCssTransitions=()=>{t._isCssTransitionsDisabled=!0},t.enableCssTransitions=()=>{t._isCssTransitionsDisabled=!1},t.extendTemplate({attributes:{class:[t.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}function Rh({view:t}){t.listenTo(t.element,"submit",((e,n)=>{n.preventDefault(),t.fire("submit")}),{useCapture:!0})}function zh({keystrokeHandler:t,focusTracker:e,gridItems:n,numberOfColumns:o}){const i="number"==typeof o?()=>o:o;function r(t){return o=>{const i=n.find((t=>t.element===e.focusedElement)),r=n.getIndex(i),s=t(r,n);n.get(s).focus(),o.stopPropagation(),o.preventDefault()}}t.set("arrowright",r(((t,e)=>t===e.length-1?0:t+1))),t.set("arrowleft",r(((t,e)=>0===t?e.length-1:t-1))),t.set("arrowup",r(((t,e)=>{let n=t-i();return n<0&&(n=t+i()*Math.floor(e.length/i()),n>e.length-1&&(n-=i())),n}))),t.set("arrowdown",r(((t,e)=>{let n=t+i();return n>e.length-1&&(n=t%i()),n})))}class Vh extends Rd{constructor(t,e=[]){super(e),this.locale=t}attachToDom(){this._bodyCollectionContainer=new zd({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let t=document.querySelector(".ck-body-wrapper");t||(t=fa(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(t)),t.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const t=document.querySelector(".ck-body-wrapper");t&&0==t.childElementCount&&t.remove()}}var Fh=n(6574),Oh={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(Fh.Z,Oh);Fh.Z.locals;class Nh extends nh{constructor(){super();const t=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:t.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 t=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),e=t.getAttribute("viewBox");for(e&&(this.viewBox=e);this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;t.childNodes.length>0;)this.element.appendChild(t.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach((t=>{t.style.fill=this.fillColor}))}}var Mh=n(4906),Lh={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(Mh.Z,Lh);Mh.Z.locals;class Hh extends nh{constructor(t){super(t);const e=this.bindTemplate,n=r();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.labelView=this._createLabelView(n),this.iconView=new Nh,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));const o={tag:"button",attributes:{class:["ck","ck-button",e.to("class"),e.if("isEnabled","ck-disabled",(t=>!t)),e.if("isVisible","ck-hidden",(t=>!t)),e.to("isOn",(t=>t?"ck-on":"ck-off")),e.if("withText","ck-button_with-text"),e.if("withKeystroke","ck-button_with-keystroke")],type:e.to("type",(t=>t||"button")),tabindex:e.to("tabindex"),"aria-labelledby":`ck-editor__aria-label_${n}`,"aria-disabled":e.if("isEnabled",!0,(t=>!t)),"aria-pressed":e.to("isOn",(t=>!!this.isToggleable&&String(!!t))),"data-cke-tooltip-text":e.to("_tooltipString"),"data-cke-tooltip-position":e.to("tooltipPosition")},children:this.children,on:{click:e.to((t=>{this.isEnabled?this.fire("execute"):t.preventDefault()}))}};dr.isSafari&&(o.on.mousedown=e.to((t=>{this.focus(),t.preventDefault()}))),this.setTemplate(o)}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}_createLabelView(t){const e=new nh,n=this.bindTemplate;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:n.to("labelStyle"),id:`ck-editor__aria-label_${t}`},children:[{text:this.bindTemplate.to("label")}]}),e}_createKeystrokeView(){const t=new nh;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(t=>kr(t)))}]}),t}_getTooltipString(t,e,n){return t?"string"==typeof t?t:(n&&(n=kr(n)),t instanceof Function?t(e,n):`${e}${n?` (${n})`:""}`):""}}var qh=n(5332),Wh={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(qh.Z,Wh);qh.Z.locals;class jh extends Hh{constructor(t){super(t),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const t=new nh;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),t}}function Uh(t,e){const n=t.t,o={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 e.map((t=>{const e=o[t.label];return e&&e!=t.label&&(t.label=e),t}))}function $h(t){return t.map(Gh).filter((t=>!!t))}function Gh(t){return"string"==typeof t?{model:t,label:t,hasBorder:!1,view:{name:"span",styles:{color:t}}}:{model:t.color,label:t.label||t.color,hasBorder:void 0!==t.hasBorder&&t.hasBorder,view:{name:"span",styles:{color:`${t.color}`}}}}class Kh extends Hh{constructor(t){super(t);const e=this.bindTemplate;this.set("color"),this.set("hasBorder"),this.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0z"/><path d="M14.814 6.035 8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z"/></svg>',this.extendTemplate({attributes:{style:{backgroundColor:e.to("color")},class:["ck","ck-color-grid__tile",e.if("hasBorder","ck-color-table__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}var Zh=n(6781),Jh={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(Zh.Z,Jh);Zh.Z.locals;class Yh extends nh{constructor(t,e){super(t);const n=e&&e.colorDefinitions||[],o={};this.columns=e&&e.columns?e.columns:5,o.gridTemplateColumns=`repeat( ${this.columns}, 1fr)`,this.set("selectedColor"),this.items=this.createCollection(),this.focusTracker=new Ta,this.keystrokes=new Da,this.items.on("add",((t,e)=>{e.isOn=e.color===this.selectedColor})),n.forEach((t=>{const e=new Kh;e.set({color:t.color,label:t.label,tooltip:!0,hasBorder:t.options.hasBorder}),e.on("execute",(()=>{this.fire("execute",{value:t.color,hasBorder:t.options.hasBorder,label:t.label})})),this.items.add(e)})),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:o}}),this.on("change:selectedColor",((t,e,n)=>{for(const t of this.items)t.isOn=t.color===n}))}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",((t,e)=>{this.focusTracker.add(e.element)})),this.items.on("remove",((t,e)=>{this.focusTracker.remove(e.element)})),this.keystrokes.listenTo(this.element),zh({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}const Qh='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/></svg>';class Xh extends Hh{constructor(t){super(t),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(t=>String(t)))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const t=new Nh;return t.content=Qh,t.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),t}}var tu=n(7686),eu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(tu.Z,eu);tu.Z.locals;class nu extends nh{constructor(t){super(t);const e=this.bindTemplate;this.set("class"),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 Da,this.focusTracker=new Ta,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",e.to("class"),e.if("isVisible","ck-hidden",(t=>!t)),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",((t,e)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),e())})),this.keystrokes.set("arrowleft",((t,e)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),e())}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(){const t=new Hh;return t.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),t.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),t.delegate("execute").to(this),t}_createArrowView(){const t=new Hh,e=t.bindTemplate;return t.icon=Qh,t.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":e.to("isOn"),"aria-haspopup":!0,"aria-expanded":e.to("isOn",(t=>String(t)))}}),t.bind("isEnabled").to(this),t.bind("label").to(this),t.bind("tooltip").to(this),t.delegate("execute").to(this,"open"),t}}class ou extends nh{constructor(t){super(t);const e=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",e.to("position",(t=>`ck-dropdown__panel_${t}`)),e.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:e.to((t=>t.preventDefault()))}})}focus(){this.children.length&&("function"==typeof this.children.first.focus?this.children.first.focus():c("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this}))}focusLast(){if(this.children.length){const t=this.children.last;"function"==typeof t.focusLast?t.focusLast():t.focus()}}}var iu=n(5485),ru={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(iu.Z,ru);iu.Z.locals;class su extends nh{constructor(t,e,n){super(t);const o=this.bindTemplate;this.buttonView=e,this.panelView=n,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class"),this.set("id"),this.set("panelPosition","auto"),this.keystrokes=new Da,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",o.to("class"),o.if("isEnabled","ck-disabled",(t=>!t))],id:o.to("id"),"aria-describedby":o.to("ariaDescribedById")},children:[e,n]}),e.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":o.to("isOpen")}})}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=su._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition,this.panelView.focus()):this.focus()})),this.keystrokes.listenTo(this.element);const t=(t,e)=>{this.isOpen&&(this.isOpen=!1,e())};this.keystrokes.set("arrowdown",((t,e)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,e())})),this.keystrokes.set("arrowright",((t,e)=>{this.isOpen&&e()})),this.keystrokes.set("arrowleft",t),this.keystrokes.set("esc",t)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:t,north:e,southEast:n,southWest:o,northEast:i,northWest:r,southMiddleEast:s,southMiddleWest:a,northMiddleEast:l,northMiddleWest:c}=su.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[n,o,s,a,t,i,r,l,c,e]:[o,n,a,s,t,r,i,c,l,e]}}su.defaultPanelPositions={south:(t,e)=>({top:t.bottom,left:t.left-(e.width-t.width)/2,name:"s"}),southEast:t=>({top:t.bottom,left:t.left,name:"se"}),southWest:(t,e)=>({top:t.bottom,left:t.left-e.width+t.width,name:"sw"}),southMiddleEast:(t,e)=>({top:t.bottom,left:t.left-(e.width-t.width)/4,name:"sme"}),southMiddleWest:(t,e)=>({top:t.bottom,left:t.left-3*(e.width-t.width)/4,name:"smw"}),north:(t,e)=>({top:t.top-e.height,left:t.left-(e.width-t.width)/2,name:"n"}),northEast:(t,e)=>({top:t.top-e.height,left:t.left,name:"ne"}),northWest:(t,e)=>({top:t.top-e.height,left:t.left-e.width+t.width,name:"nw"}),northMiddleEast:(t,e)=>({top:t.top-e.height,left:t.left-(e.width-t.width)/4,name:"nme"}),northMiddleWest:(t,e)=>({top:t.top-e.height,left:t.left-3*(e.width-t.width)/4,name:"nmw"})},su._getOptimalPosition=oh;class au{constructor(t){if(Object.assign(this,t),t.actions&&t.keystrokeHandler)for(const e in t.actions){let n=t.actions[e];"string"==typeof n&&(n=[n]);for(const o of n)t.keystrokeHandler.set(o,((t,n)=>{this[e](),n()}))}}get first(){return this.focusables.find(lu)||null}get last(){return this.focusables.filter(lu).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let t=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((e,n)=>{const o=e.element===this.focusTracker.focusedElement;return o&&(t=n),o})),t)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(t){t&&t.focus()}_getFocusableItem(t){const e=this.current,n=this.focusables.length;if(!n)return null;if(null===e)return this[1===t?"first":"last"];let o=(e+n+t)%n;do{const e=this.focusables.get(o);if(lu(e))return e;o=(o+n+t)%n}while(o!==e);return null}}function lu(t){return!(!t.focus||!xa(t.element))}class cu extends nh{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class du extends nh{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function hu(t){return Array.isArray(t)?{items:t,removeItems:[]}:t?Object.assign({items:[],removeItems:[]},t):{items:[],removeItems:[]}}var uu=n(5542),gu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(uu.Z,gu);uu.Z.locals;class mu extends nh{constructor(t,e){super(t);const n=this.bindTemplate,o=this.t;this.options=e||{},this.set("ariaLabel",o("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new Ta,this.keystrokes=new Da,this.set("class"),this.set("isCompact",!1),this.itemsView=new pu(t),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const i="rtl"===t.uiLanguageDirection;this._focusCycler=new au({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[i?"arrowright":"arrowleft","arrowup"],focusNext:[i?"arrowleft":"arrowright","arrowdown"]}});const r=["ck","ck-toolbar",n.to("class"),n.if("isCompact","ck-toolbar_compact")];var s;this.options.shouldGroupWhenFull&&this.options.isFloating&&r.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:r,role:"toolbar","aria-label":n.to("ariaLabel"),style:{maxWidth:n.to("maxWidth")}},children:this.children,on:{mousedown:(s=this,s.bindTemplate.to((t=>{t.target===s.element&&t.preventDefault()})))}}),this._behavior=this.options.shouldGroupWhenFull?new bu(this):new fu(this)}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",((t,e)=>{this.focusTracker.add(e.element)})),this.items.on("remove",((t,e)=>{this.focusTracker.remove(e.element)})),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(t,e){const n=hu(t),o=n.items.filter(((t,o,i)=>"|"===t||-1===n.removeItems.indexOf(t)&&("-"===t?!this.options.shouldGroupWhenFull||(c("toolbarview-line-break-ignored-when-grouping-items",i),!1):!!e.has(t)||(c("toolbarview-item-unavailable",{name:t}),!1)))),i=this._cleanSeparators(o).map((t=>"|"===t?new cu:"-"===t?new du:e.create(t)));this.items.addMany(i)}_cleanSeparators(t){const e=t=>"-"!==t&&"|"!==t,n=t.length,o=t.findIndex(e),i=n-t.slice().reverse().findIndex(e);return t.slice(o,i).filter(((t,n,o)=>{if(e(t))return!0;return!(n>0&&o[n-1]===t)}))}}class pu extends nh{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class fu{constructor(t){const e=t.bindTemplate;t.set("isVertical",!1),t.itemsView.children.bindTo(t.items).using((t=>t)),t.focusables.bindTo(t.items).using((t=>t)),t.extendTemplate({attributes:{class:[e.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class bu{constructor(t){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((t=>t)),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",((t,e)=>{const n=e.index;for(const t of e.removed)n>=this.ungroupedItems.length?this.groupedItems.remove(t):this.ungroupedItems.remove(t);for(let t=n;t<n+e.added.length;t++){const o=e.added[t-n];t>this.ungroupedItems.length?this.groupedItems.add(o,t-this.ungroupedItems.length):this.ungroupedItems.add(o,t)}this._updateGrouping()})),t.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(t){this.viewElement=t.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(t)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!xa(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const t=this.groupedItems.length;let e;for(;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")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const t=this.viewElement,e=this.viewLocale.uiLanguageDirection,n=new _a(t.lastChild),o=new _a(t);if(!this.cachedPadding){const n=Co.window.getComputedStyle(t),o="ltr"===e?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(n[o])}return"ltr"===e?n.right>o.right-this.cachedPadding:n.left<o.left+this.cachedPadding}_enableGroupingOnResize(){let t;this.resizeObserver=new ya(this.viewElement,(e=>{t&&t===e.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),t=e.contentRect.width)})),this._updateGrouping()}_enableGroupingOnMaxWidthChange(t){t.on("change:maxWidth",(()=>{this._updateGrouping()}))}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new cu),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 t=this.viewLocale,e=t.t,n=Tu(t);return n.class="ck-toolbar__grouped-dropdown",n.panelPosition="ltr"===t.uiLanguageDirection?"sw":"se",Du(n,[]),n.buttonView.set({label:e("Show more items"),tooltip:!0,tooltipPosition:"rtl"===t.uiLanguageDirection?"se":"sw",icon:Sh}),n.toolbarView.items.bindTo(this.groupedItems).using((t=>t)),n}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((t=>{this.viewFocusables.add(t)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}var ku=n(1046),wu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(ku.Z,wu);ku.Z.locals;class _u extends nh{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new Ta,this.keystrokes=new Da,this._focusCycler=new au({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 t of this.items)this.focusTracker.add(t.element);this.items.on("add",((t,e)=>{this.focusTracker.add(e.element)})),this.items.on("remove",((t,e)=>{this.focusTracker.remove(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class Au extends nh{constructor(t){super(t);const e=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",e.if("isVisible","ck-hidden",(t=>!t))]},children:this.children})}focus(){this.children.first.focus()}}class Cu extends nh{constructor(t){super(t),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}var vu=n(7339),yu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(vu.Z,yu);vu.Z.locals;var xu=n(3949),Eu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(xu.Z,Eu);xu.Z.locals;function Tu(t,e=Xh){const n=new e(t),o=new ou(t),i=new su(t,n,o);return n.bind("isEnabled").to(i),n instanceof Xh?n.bind("isOn").to(i,"isOpen"):n.arrowView.bind("isOn").to(i,"isOpen"),function(t){(function(t){t.on("render",(()=>{Ih({emitter:t,activator:()=>t.isOpen,callback:()=>{t.isOpen=!1},contextElements:[t.element]})}))})(t),function(t){t.on("execute",(e=>{e.source instanceof jh||(t.isOpen=!1)}))}(t),function(t){t.keystrokes.set("arrowdown",((e,n)=>{t.isOpen&&(t.panelView.focus(),n())})),t.keystrokes.set("arrowup",((e,n)=>{t.isOpen&&(t.panelView.focusLast(),n())}))}(t)}(i),i}function Du(t,e,n={}){const o=t.locale,i=o.t,r=t.toolbarView=new mu(o);r.set("ariaLabel",i("Dropdown toolbar")),t.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),e.map((t=>r.items.add(t))),n.enableActiveItemFocusOnDropdownOpen&&Bu(t,(()=>r.items.find((t=>t.isOn)))),t.panelView.children.add(r),r.items.delegate("execute").to(t)}function Su(t,e){const n=t.locale,o=t.listView=new _u(n);o.items.bindTo(e).using((({type:t,model:e})=>{if("separator"===t)return new Cu(n);if("button"===t||"switchbutton"===t){const o=new Au(n);let i;return i="button"===t?new Hh(n):new jh(n),i.bind(...Object.keys(e)).to(e),i.delegate("execute").to(o),o.children.add(i),o}})),t.panelView.children.add(o),o.items.delegate("execute").to(t),Bu(t,(()=>o.items.find((t=>t instanceof Au&&t.children.first.isOn))))}function Bu(t,e){t.on("change:isOpen",(()=>{if(!t.isOpen)return;const n=e();n&&("function"==typeof n.focus?n.focus():c("ui-dropdown-focus-child-on-open-child-missing-focus",{view:n}))}),{priority:"low"})}var Iu=n(9688),Pu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(Iu.Z,Pu);Iu.Z.locals;class Ru extends nh{constructor(t){super(t),this.body=new Vh(t)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}var zu=n(3662),Vu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(zu.Z,Vu);zu.Z.locals;class Fu extends nh{constructor(t){super(t),this.set("text"),this.set("for"),this.id=`ck-editor__label_${r()}`;const e=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:e.to("for")},children:[{text:e.to("text")}]})}}class Ou extends nh{constructor(t,e,n){super(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:t.contentLanguage,dir:t.contentLanguageDirection}}),this.name=null,this.set("isFocused",!1),this._editableElement=n,this._hasExternalElement=!!this._editableElement,this._editingView=e}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 t=this._editingView;function e(e){t.change((n=>{const o=t.document.getRoot(e.name);n.addClass(e.isFocused?"ck-focused":"ck-blurred",o),n.removeClass(e.isFocused?"ck-blurred":"ck-focused",o)}))}t.isRenderingInProgress?function n(o){t.once("change:isRenderingInProgress",((t,i,r)=>{r?n(o):e(o)}))}(this):e(this)}}class Nu extends Ou{constructor(t,e,n,o={}){super(t,e,n);const i=t.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=o.label||(()=>i("Editor editing area: %0",this.name))}render(){super.render();const t=this._editingView;t.change((e=>{const n=t.document.getRoot(this.name);e.setAttribute("aria-label",this._generateLabel(this),n)}))}}var Mu=n(8847),Lu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(Mu.Z,Lu);Mu.Z.locals;class Hu extends nh{constructor(t,e={}){super(t);const n=this.bindTemplate;this.set("label",e.label||""),this.set("class",e.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",n.to("class")]},children:this.children});const o=new nh(t);o.setTemplate({tag:"span",attributes:{class:["ck","ck-form__header__label"]},children:[{text:n.to("label")}]}),this.children.add(o)}}var qu=n(4879),Wu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(qu.Z,Wu);qu.Z.locals;class ju extends nh{constructor(t){super(t),this.set("value"),this.set("id"),this.set("placeholder"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById"),this.focusTracker=new Ta,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0),this.set("inputMode","text");const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",e.if("isFocused","ck-input_focused"),e.if("isEmpty","ck-input-text_empty"),e.if("hasError","ck-error")],id:e.to("id"),placeholder:e.to("placeholder"),readonly:e.to("isReadOnly"),inputmode:e.to("inputMode"),"aria-invalid":e.if("hasError",!0),"aria-describedby":e.to("ariaDescribedById")},on:{input:e.to(((...t)=>{this.fire("input",...t),this._updateIsEmpty()})),change:e.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",((t,e,n)=>{this._setDomElementValue(n),this._updateIsEmpty()}))}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(t){this.element.value=t||0===t?t:""}}class Uu extends ju{constructor(t){super(t),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class $u extends ju{constructor(t,{min:e,max:n,step:o}={}){super(t);const i=this.bindTemplate;this.set("min",e),this.set("max",n),this.set("step",o),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:i.to("min"),max:i.to("max"),step:i.to("step")}})}}var Gu=n(2577),Ku={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(Gu.Z,Ku);Gu.Z.locals;class Zu extends nh{constructor(t,e){super(t);const n=`ck-labeled-field-view-${r()}`,o=`ck-labeled-field-view-status-${r()}`;this.fieldView=e(this,n,o),this.set("label"),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class"),this.set("placeholder"),this.labelView=this._createLabelView(n),this.statusView=this._createStatusView(o),this.bind("_statusText").to(this,"errorText",this,"infoText",((t,e)=>t||e));const i=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",i.to("class"),i.if("isEnabled","ck-disabled",(t=>!t)),i.if("isEmpty","ck-labeled-field-view_empty"),i.if("isFocused","ck-labeled-field-view_focused"),i.if("placeholder","ck-labeled-field-view_placeholder"),i.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:[this.fieldView,this.labelView]},this.statusView]})}_createLabelView(t){const e=new Fu(this.locale);return e.for=t,e.bind("text").to(this,"label"),e}_createStatusView(t){const e=new nh(this.locale),n=this.bindTemplate;return e.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",(t=>!t))],id:t,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),e}focus(){this.fieldView.focus()}}function Ju(t,e,n){const o=new Uu(t.locale);return o.set({id:e,ariaDescribedById:n}),o.bind("isReadOnly").to(t,"isEnabled",(t=>!t)),o.bind("hasError").to(t,"errorText",(t=>!!t)),o.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused","placeholder").to(o),o}function Yu(t,e,n){const o=new $u(t.locale);return o.set({id:e,ariaDescribedById:n,inputMode:"numeric"}),o.bind("isReadOnly").to(t,"isEnabled",(t=>!t)),o.bind("hasError").to(t,"errorText",(t=>!!t)),o.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused","placeholder").to(o),o}function Qu(t,e,n){const o=Tu(t.locale);return o.set({id:e,ariaDescribedById:n}),o.bind("isEnabled").to(t),o}class Xu extends Do{static get pluginName(){return"Notification"}init(){this.on("show:warning",((t,e)=>{window.alert(e.message)}),{priority:"lowest"})}showSuccess(t,e={}){this._showNotification({message:t,type:"success",namespace:e.namespace,title:e.title})}showInfo(t,e={}){this._showNotification({message:t,type:"info",namespace:e.namespace,title:e.title})}showWarning(t,e={}){this._showNotification({message:t,type:"warning",namespace:e.namespace,title:e.title})}_showNotification(t){const e=`show:${t.type}`+(t.namespace?`:${t.namespace}`:"");this.fire(e,{message:t.message,type:t.type,title:t.title||""})}}class tg{constructor(t,e){e&&Gs(this,e),t&&this.set(t)}}M(tg,P);const eg='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z"/></svg>';var ng=n(4650),og={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(ng.Z,og);ng.Z.locals;var ig=n(7676),rg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(ig.Z,rg);ig.Z.locals;const sg=sh("px");class ag extends L{static get pluginName(){return"ContextualBalloon"}constructor(t){super(t),this.positionLimiter=()=>{const t=this.editor.editing.view,e=t.document.selection.editableElement;return e?t.domConverter.mapViewToDom(e.root):null},this.set("visibleView",null),this.view=new hh(t.locale),t.ui.view.body.add(this.view),t.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()}destroy(){super.destroy(),this.view.destroy(),this._rotatorView.destroy(),this._fakePanelsView.destroy()}hasView(t){return Array.from(this._viewToStack.keys()).includes(t)}add(t){if(this.hasView(t.view))throw new l("contextualballoon-add-view-exist",[this,t]);const e=t.stackId||"main";if(!this._idToStack.has(e))return this._idToStack.set(e,new Map([[t.view,t]])),this._viewToStack.set(t.view,this._idToStack.get(e)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!t.singleViewMode||this.showStack(e));const n=this._idToStack.get(e);t.singleViewMode&&this.showStack(e),n.set(t.view,t),this._viewToStack.set(t.view,n),n===this._visibleStack&&this._showView(t)}remove(t){if(!this.hasView(t))throw new l("contextualballoon-remove-view-not-exist",[this,t]);const e=this._viewToStack.get(t);this._singleViewMode&&this.visibleView===t&&(this._singleViewMode=!1),this.visibleView===t&&(1===e.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(e.values())[e.size-2])),1===e.size?(this._idToStack.delete(this._getStackId(e)),this._numberOfStacks=this._idToStack.size):e.delete(t),this._viewToStack.delete(t)}updatePosition(t){t&&(this._visibleStack.get(this.visibleView).position=t),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(t){this.visibleStack=t;const e=this._idToStack.get(t);if(!e)throw new l("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==e&&this._showView(Array.from(e.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(t){return Array.from(this._idToStack.entries()).find((e=>e[1]===t))[0]}_showNextStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)+1;t[e]||(e=0),this.showStack(this._getStackId(t[e]))}_showPrevStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)-1;t[e]||(e=t.length-1),this.showStack(this._getStackId(t[e]))}_createRotatorView(){const t=new lg(this.editor.locale),e=this.editor.locale.t;return this.view.content.add(t),t.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",((t,e)=>!e&&t>1)),t.on("change:isNavigationVisible",(()=>this.updatePosition()),{priority:"low"}),t.bind("counter").to(this,"visibleView",this,"_numberOfStacks",((t,n)=>{if(n<2)return"";const o=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return e("%0 of %1",[o,n])})),t.buttonNextView.on("execute",(()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()})),t.buttonPrevView.on("execute",(()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()})),t}_createFakePanelsView(){const t=new cg(this.editor.locale,this.view);return t.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",((t,e)=>!e&&t>=2?Math.min(t-1,2):0)),t.listenTo(this.view,"change:top",(()=>t.updatePosition())),t.listenTo(this.view,"change:left",(()=>t.updatePosition())),this.editor.ui.view.body.add(t),t}_showView({view:t,balloonClassName:e="",withArrow:n=!0,singleViewMode:o=!1}){this.view.class=e,this.view.withArrow=n,this._rotatorView.showView(t),this.visibleView=t,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),o&&(this._singleViewMode=!0)}_getBalloonPosition(){let t=Array.from(this._visibleStack.values()).pop().position;return t&&(t.limiter||(t=Object.assign({},t,{limiter:this.positionLimiter})),t=Object.assign({},t,{viewportOffsetConfig:this.editor.ui.viewportOffset})),t}}class lg extends nh{constructor(t){super(t);const e=t.t,n=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new Ta,this.buttonPrevView=this._createButtonView(e("Previous"),eg),this.buttonNextView=this._createButtonView(e("Next"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382l-4.043 4.042z"/></svg>'),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",n.to("isNavigationVisible",(t=>t?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:n.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(t){this.hideView(),this.content.add(t)}hideView(){this.content.clear()}_createButtonView(t,e){const n=new Hh(this.locale);return n.set({label:t,icon:e,tooltip:!0}),n}}class cg extends nh{constructor(t,e){super(t);const n=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=e,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",n.to("numberOfPanels",(t=>t?"":"ck-hidden"))],style:{top:n.to("top",sg),left:n.to("left",sg),width:n.to("width",sg),height:n.to("height",sg)}},children:this.content}),this.on("change:numberOfPanels",((t,e,n,o)=>{n>o?this._addPanels(n-o):this._removePanels(o-n),this.updatePosition()}))}_addPanels(t){for(;t--;){const t=new nh;t.setTemplate({tag:"div"}),this.content.add(t),this.registerChild(t)}}_removePanels(t){for(;t--;){const t=this.content.last;this.content.remove(t),this.deregisterChild(t),t.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:t,left:e}=this._balloonPanelView,{width:n,height:o}=new _a(this._balloonPanelView.element);Object.assign(this,{top:t,left:e,width:n,height:o})}}}var dg=n(5868),hg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(dg.Z,hg);dg.Z.locals,sh("px");const ug=sh("px");class gg extends L{static get pluginName(){return"BalloonToolbar"}static get requires(){return[ag]}constructor(t){super(t),this._balloonConfig=hu(t.config.get("balloonToolbar")),this.toolbarView=this._createToolbarView(),this.focusTracker=new Ta,t.ui.once("ready",(()=>{this.focusTracker.add(t.ui.getEditableElement()),this.focusTracker.add(this.toolbarView.element)})),t.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this.show(!0),afterBlur:()=>this.hide(),isContextual:!0}),this._resizeObserver=null,this._balloon=t.plugins.get(ag),this._fireSelectionChangeDebounced=ca((()=>this.fire("_selectionChangeDebounced")),200),this.decorate("show")}init(){const t=this.editor,e=t.model.document.selection;this.listenTo(this.focusTracker,"change:isFocused",((t,e,n)=>{const o=this._balloon.visibleView===this.toolbarView;!n&&o?this.hide():n&&this.show()})),this.listenTo(e,"change:range",((t,n)=>{(n.directChange||e.isCollapsed)&&this.hide(),this._fireSelectionChangeDebounced()})),this.listenTo(this,"_selectionChangeDebounced",(()=>{this.editor.editing.view.document.isFocused&&this.show()})),this._balloonConfig.shouldNotGroupWhenFull||this.listenTo(t,"ready",(()=>{const e=t.ui.view.editable.element;this._resizeObserver=new ya(e,(()=>{this.toolbarView.maxWidth=ug(.9*new _a(e).width)}))})),this.listenTo(this.toolbarView,"groupedItemsUpdate",(()=>{this._updatePosition()}))}afterInit(){const t=this.editor.ui.componentFactory;this.toolbarView.fillFromConfig(this._balloonConfig,t)}_createToolbarView(){const t=this.editor.locale.t,e=!this._balloonConfig.shouldNotGroupWhenFull,n=new mu(this.editor.locale,{shouldGroupWhenFull:e,isFloating:!0});return n.ariaLabel=t("Editor contextual toolbar"),n.render(),n}show(t=!1){const e=this.editor,n=e.model.document.selection,o=e.model.schema;this._balloon.hasView(this.toolbarView)||n.isCollapsed&&!t||function(t,e){if(1===t.rangeCount)return!1;return[...t.getRanges()].every((t=>{const n=t.getContainedElement();return n&&e.isSelectable(n)}))}(n,o)||Array.from(this.toolbarView.items).every((t=>void 0!==t.isEnabled&&!t.isEnabled))||(this.listenTo(this.editor.ui,"update",(()=>{this._updatePosition()})),this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:"ck-toolbar-container"}))}hide(){this._balloon.hasView(this.toolbarView)&&(this.stopListening(this.editor.ui,"update"),this._balloon.remove(this.toolbarView))}_getBalloonPositionData(){const t=this.editor.editing.view,e=t.document,n=e.selection,o=e.selection.isBackward;return{target:()=>{const e=o?n.getFirstRange():n.getLastRange(),i=_a.getDomRangeRects(t.domConverter.viewRangeToDom(e));return o?i[0]:(i.length>1&&0===i[i.length-1].width&&i.pop(),i[i.length-1])},positions:this._getBalloonPositions(o)}}_updatePosition(){this._balloon.updatePosition(this._getBalloonPositionData())}destroy(){super.destroy(),this.stopListening(),this._fireSelectionChangeDebounced.cancel(),this.toolbarView.destroy(),this.focusTracker.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getBalloonPositions(t){const e=dr.isSafari&&dr.isiOS?gh({heightOffset:Math.max(hh.arrowHeightOffset,Math.round(20/Co.window.visualViewport.scale))}):hh.defaultPositions;return t?[e.northWestArrowSouth,e.northWestArrowSouthWest,e.northWestArrowSouthEast,e.northWestArrowSouthMiddleEast,e.northWestArrowSouthMiddleWest,e.southWestArrowNorth,e.southWestArrowNorthWest,e.southWestArrowNorthEast,e.southWestArrowNorthMiddleWest,e.southWestArrowNorthMiddleEast]:[e.southEastArrowNorth,e.southEastArrowNorthEast,e.southEastArrowNorthWest,e.southEastArrowNorthMiddleEast,e.southEastArrowNorthMiddleWest,e.northEastArrowSouth,e.northEastArrowSouthEast,e.northEastArrowSouthWest,e.northEastArrowSouthMiddleEast,e.northEastArrowSouthMiddleWest]}}var mg=n(9695),pg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(mg.Z,pg);mg.Z.locals;const fg=sh("px");class bg extends Hh{constructor(t){super(t);const e=this.bindTemplate;this.isVisible=!1,this.isToggleable=!0,this.set("top",0),this.set("left",0),this.extendTemplate({attributes:{class:"ck-block-toolbar-button",style:{top:e.to("top",(t=>fg(t))),left:e.to("left",(t=>fg(t)))}}})}}const kg=sh("px");var wg=n(4717),_g={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(wg.Z,_g);wg.Z.locals;const Ag=new WeakMap;function Cg(t){const{view:e,element:n,text:o,isDirectHost:i=!0,keepOnFocus:r=!1}=t,s=e.document;Ag.has(s)||(Ag.set(s,new Map),s.registerPostFixer((t=>yg(s,t)))),Ag.get(s).set(n,{text:o,isDirectHost:i,keepOnFocus:r,hostElement:i?n:null}),e.change((t=>yg(s,t)))}function vg(t,e){return!!e.hasClass("ck-placeholder")&&(t.removeClass("ck-placeholder",e),!0)}function yg(t,e){const n=Ag.get(t),o=[];let i=!1;for(const[t,r]of n)r.isDirectHost&&(o.push(t),xg(e,t,r)&&(i=!0));for(const[t,r]of n){if(r.isDirectHost)continue;const n=Eg(t);n&&(o.includes(n)||(r.hostElement=n,xg(e,t,r)&&(i=!0)))}return i}function xg(t,e,n){const{text:o,isDirectHost:i,hostElement:r}=n;let s=!1;r.getAttribute("data-placeholder")!==o&&(t.setAttribute("data-placeholder",o,r),s=!0);return(i||1==e.childCount)&&function(t,e){if(!t.isAttached())return!1;const n=Array.from(t.getChildren()).some((t=>!t.is("uiElement")));if(n)return!1;if(e)return!0;const o=t.document;if(!o.isFocused)return!0;const i=o.selection.anchor;return!!i&&i.parent!==t}(r,n.keepOnFocus)?function(t,e){return!e.hasClass("ck-placeholder")&&(t.addClass("ck-placeholder",e),!0)}(t,r)&&(s=!0):vg(t,r)&&(s=!0),s}function Eg(t){if(t.childCount){const e=t.getChild(0);if(e.is("element")&&!e.is("uiElement")&&!e.is("attributeElement"))return e}return null}const Tg=new Map;function Dg(t,e,n){let o=Tg.get(t);o||(o=new Map,Tg.set(t,o)),o.set(e,n)}function Sg(t){return[t]}function Bg(t,e,n={}){const o=function(t,e){const n=Tg.get(t);return n&&n.has(e)?n.get(e):Sg}(t.constructor,e.constructor);try{return o(t=t.clone(),e,n)}catch(t){throw t}}function Ig(t,e,n){t=t.slice(),e=e.slice();const o=new Pg(n.document,n.useRelations,n.forceWeakRemove);o.setOriginalOperations(t),o.setOriginalOperations(e);const i=o.originalOperations;if(0==t.length||0==e.length)return{operationsA:t,operationsB:e,originalOperations:i};const r=new WeakMap;for(const e of t)r.set(e,0);const s={nextBaseVersionA:t[t.length-1].baseVersion+1,nextBaseVersionB:e[e.length-1].baseVersion+1,originalOperationsACount:t.length,originalOperationsBCount:e.length};let a=0;for(;a<t.length;){const n=t[a],i=r.get(n);if(i==e.length){a++;continue}const s=e[i],l=Bg(n,s,o.getContext(n,s,!0)),c=Bg(s,n,o.getContext(s,n,!1));o.updateRelation(n,s),o.setOriginalOperations(l,n),o.setOriginalOperations(c,s);for(const t of l)r.set(t,i+c.length);t.splice(a,1,...l),e.splice(i,1,...c)}if(n.padWithNoOps){const n=t.length-s.originalOperationsACount,o=e.length-s.originalOperationsBCount;zg(t,o-n),zg(e,n-o)}return Rg(t,s.nextBaseVersionB),Rg(e,s.nextBaseVersionA),{operationsA:t,operationsB:e,originalOperations:i}}class Pg{constructor(t,e,n=!1){this.originalOperations=new Map,this._history=t.history,this._useRelations=e,this._forceWeakRemove=!!n,this._relations=new Map}setOriginalOperations(t,e=null){const n=e?this.originalOperations.get(e):null;for(const e of t)this.originalOperations.set(e,n||e)}updateRelation(t,e){if(t instanceof Wc)e instanceof Zc?t.targetPosition.isEqual(e.sourcePosition)||e.movedRange.containsPosition(t.targetPosition)?this._setRelation(t,e,"insertAtSource"):t.targetPosition.isEqual(e.deletionPosition)?this._setRelation(t,e,"insertBetween"):t.targetPosition.isAfter(e.sourcePosition)&&this._setRelation(t,e,"moveTargetAfter"):e instanceof Wc&&(t.targetPosition.isEqual(e.sourcePosition)||t.targetPosition.isBefore(e.sourcePosition)?this._setRelation(t,e,"insertBefore"):this._setRelation(t,e,"insertAfter"));else if(t instanceof Jc){if(e instanceof Zc)t.splitPosition.isBefore(e.sourcePosition)&&this._setRelation(t,e,"splitBefore");else if(e instanceof Wc)if(t.splitPosition.isEqual(e.sourcePosition)||t.splitPosition.isBefore(e.sourcePosition))this._setRelation(t,e,"splitBefore");else{const n=tl._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.splitPosition)){const o=n.end.offset-t.splitPosition.offset,i=t.splitPosition.offset-n.start.offset;this._setRelation(t,e,{howMany:o,offset:i})}}}else if(t instanceof Zc)e instanceof Zc?(t.targetPosition.isEqual(e.sourcePosition)||this._setRelation(t,e,"mergeTargetNotMoved"),t.sourcePosition.isEqual(e.targetPosition)&&this._setRelation(t,e,"mergeSourceNotMoved"),t.sourcePosition.isEqual(e.sourcePosition)&&this._setRelation(t,e,"mergeSameElement")):e instanceof Jc&&t.sourcePosition.isEqual(e.splitPosition)&&this._setRelation(t,e,"splitAtSource");else if(t instanceof Uc){const n=t.newRange;if(!n)return;if(e instanceof Wc){const o=tl._createFromPositionAndShift(e.sourcePosition,e.howMany),i=o.containsPosition(n.start)||o.start.isEqual(n.start),r=o.containsPosition(n.end)||o.end.isEqual(n.end);!i&&!r||o.containsRange(n)||this._setRelation(t,e,{side:i?"left":"right",path:i?n.start.path.slice():n.end.path.slice()})}else if(e instanceof Zc){const o=n.start.isEqual(e.targetPosition),i=n.start.isEqual(e.deletionPosition),r=n.end.isEqual(e.deletionPosition),s=n.end.isEqual(e.sourcePosition);(o||i||r||s)&&this._setRelation(t,e,{wasInLeftElement:o,wasStartBeforeMergedElement:i,wasEndBeforeMergedElement:r,wasInRightElement:s})}}}getContext(t,e,n){return{aIsStrong:n,aWasUndone:this._wasUndone(t),bWasUndone:this._wasUndone(e),abRelation:this._useRelations?this._getRelation(t,e):null,baRelation:this._useRelations?this._getRelation(e,t):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(t){const e=this.originalOperations.get(t);return e.wasUndone||this._history.isUndoneOperation(e)}_getRelation(t,e){const n=this.originalOperations.get(e),o=this._history.getUndoneOperation(n);if(!o)return null;const i=this.originalOperations.get(t),r=this._relations.get(i);return r&&r.get(o)||null}_setRelation(t,e,n){const o=this.originalOperations.get(t),i=this.originalOperations.get(e);let r=this._relations.get(o);r||(r=new Map,this._relations.set(o,r)),r.set(i,n)}}function Rg(t,e){for(const n of t)n.baseVersion=e++}function zg(t,e){for(let n=0;n<e;n++)t.push(new $c(0))}function Vg(t,e,n){const o=t.nodes.getNode(0).getAttribute(e);if(o==n)return null;const i=new tl(t.position,t.position.getShiftedBy(t.howMany));return new qc(i,e,o,n,0)}function Fg(t,e){return null===t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany)}function Og(t,e){const n=[];for(let o=0;o<t.length;o++){const i=t[o],r=new Wc(i.start,i.end.offset-i.start.offset,e,0);n.push(r);for(let e=o+1;e<t.length;e++)t[e]=t[e]._getTransformedByMove(r.sourcePosition,r.targetPosition,r.howMany)[0];e=e._getTransformedByMove(r.sourcePosition,r.targetPosition,r.howMany)}return n}Dg(qc,qc,((t,e,n)=>{if(t.key===e.key&&t.range.start.hasSameParentAs(e.range.start)){const o=t.range.getDifference(e.range).map((e=>new qc(e,t.key,t.oldValue,t.newValue,0))),i=t.range.getIntersection(e.range);return i&&n.aIsStrong&&o.push(new qc(i,e.key,e.newValue,t.newValue,0)),0==o.length?[new $c(0)]:o}return[t]})),Dg(qc,jc,((t,e)=>{if(t.range.start.hasSameParentAs(e.position)&&t.range.containsPosition(e.position)){const n=t.range._getTransformedByInsertion(e.position,e.howMany,!e.shouldReceiveAttributes).map((e=>new qc(e,t.key,t.oldValue,t.newValue,t.baseVersion)));if(e.shouldReceiveAttributes){const o=Vg(e,t.key,t.oldValue);o&&n.unshift(o)}return n}return t.range=t.range._getTransformedByInsertion(e.position,e.howMany,!1)[0],[t]})),Dg(qc,Zc,((t,e)=>{const n=[];t.range.start.hasSameParentAs(e.deletionPosition)&&(t.range.containsPosition(e.deletionPosition)||t.range.start.isEqual(e.deletionPosition))&&n.push(tl._createFromPositionAndShift(e.graveyardPosition,1));const o=t.range._getTransformedByMergeOperation(e);return o.isCollapsed||n.push(o),n.map((e=>new qc(e,t.key,t.oldValue,t.newValue,t.baseVersion)))})),Dg(qc,Wc,((t,e)=>{const n=function(t,e){const n=tl._createFromPositionAndShift(e.sourcePosition,e.howMany);let o=null,i=[];n.containsRange(t,!0)?o=t:t.start.hasSameParentAs(n.start)?(i=t.getDifference(n),o=t.getIntersection(n)):i=[t];const r=[];for(let t of i){t=t._getTransformedByDeletion(e.sourcePosition,e.howMany);const n=e.getMovedRangeStart(),o=t.start.hasSameParentAs(n),i=t._getTransformedByInsertion(n,e.howMany,o);r.push(...i)}o&&r.push(o._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany,!1)[0]);return r}(t.range,e);return n.map((e=>new qc(e,t.key,t.oldValue,t.newValue,t.baseVersion)))})),Dg(qc,Jc,((t,e)=>{if(t.range.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.range.end.offset++,[t];if(t.range.start.hasSameParentAs(e.splitPosition)&&t.range.containsPosition(e.splitPosition)){const n=t.clone();return n.range=new tl(e.moveTargetPosition.clone(),t.range.end._getCombined(e.splitPosition,e.moveTargetPosition)),t.range.end=e.splitPosition.clone(),t.range.end.stickiness="toPrevious",[t,n]}return t.range=t.range._getTransformedBySplitOperation(e),[t]})),Dg(jc,qc,((t,e)=>{const n=[t];if(t.shouldReceiveAttributes&&t.position.hasSameParentAs(e.range.start)&&e.range.containsPosition(t.position)){const o=Vg(t,e.key,e.newValue);o&&n.push(o)}return n})),Dg(jc,jc,((t,e,n)=>(t.position.isEqual(e.position)&&n.aIsStrong||(t.position=t.position._getTransformedByInsertOperation(e)),[t]))),Dg(jc,Wc,((t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t]))),Dg(jc,Jc,((t,e)=>(t.position=t.position._getTransformedBySplitOperation(e),[t]))),Dg(jc,Zc,((t,e)=>(t.position=t.position._getTransformedByMergeOperation(e),[t]))),Dg(Uc,jc,((t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByInsertOperation(e)[0]),t.newRange&&(t.newRange=t.newRange._getTransformedByInsertOperation(e)[0]),[t]))),Dg(Uc,Uc,((t,e,n)=>{if(t.name==e.name){if(!n.aIsStrong)return[new $c(0)];t.oldRange=e.newRange?e.newRange.clone():null}return[t]})),Dg(Uc,Zc,((t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByMergeOperation(e)),t.newRange&&(t.newRange=t.newRange._getTransformedByMergeOperation(e)),[t]))),Dg(Uc,Wc,((t,e,n)=>{if(t.oldRange&&(t.oldRange=tl._createFromRanges(t.oldRange._getTransformedByMoveOperation(e))),t.newRange){if(n.abRelation){const o=tl._createFromRanges(t.newRange._getTransformedByMoveOperation(e));if("left"==n.abRelation.side&&e.targetPosition.isEqual(t.newRange.start))return t.newRange.end=o.end,t.newRange.start.path=n.abRelation.path,[t];if("right"==n.abRelation.side&&e.targetPosition.isEqual(t.newRange.end))return t.newRange.start=o.start,t.newRange.end.path=n.abRelation.path,[t]}t.newRange=tl._createFromRanges(t.newRange._getTransformedByMoveOperation(e))}return[t]})),Dg(Uc,Jc,((t,e,n)=>{if(t.oldRange&&(t.oldRange=t.oldRange._getTransformedBySplitOperation(e)),t.newRange){if(n.abRelation){const o=t.newRange._getTransformedBySplitOperation(e);return t.newRange.start.isEqual(e.splitPosition)&&n.abRelation.wasStartBeforeMergedElement?t.newRange.start=Ja._createAt(e.insertionPosition):t.newRange.start.isEqual(e.splitPosition)&&!n.abRelation.wasInLeftElement&&(t.newRange.start=Ja._createAt(e.moveTargetPosition)),t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasInRightElement?t.newRange.end=Ja._createAt(e.moveTargetPosition):t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasEndBeforeMergedElement?t.newRange.end=Ja._createAt(e.insertionPosition):t.newRange.end=o.end,[t]}t.newRange=t.newRange._getTransformedBySplitOperation(e)}return[t]})),Dg(Zc,jc,((t,e)=>(t.sourcePosition.hasSameParentAs(e.position)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByInsertOperation(e),t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e),[t]))),Dg(Zc,Zc,((t,e,n)=>{if(t.sourcePosition.isEqual(e.sourcePosition)&&t.targetPosition.isEqual(e.targetPosition)){if(n.bWasUndone){const n=e.graveyardPosition.path.slice();return n.push(0),t.sourcePosition=new Ja(e.graveyardPosition.root,n),t.howMany=0,[t]}return[new $c(0)]}if(t.sourcePosition.isEqual(e.sourcePosition)&&!t.targetPosition.isEqual(e.targetPosition)&&!n.bWasUndone&&"splitAtSource"!=n.abRelation){const o="$graveyard"==t.targetPosition.root.rootName,i="$graveyard"==e.targetPosition.root.rootName,r=o&&!i;if(i&&!o||!r&&n.aIsStrong){const n=e.targetPosition._getTransformedByMergeOperation(e),o=t.targetPosition._getTransformedByMergeOperation(e);return[new Wc(n,t.howMany,o,0)]}return[new $c(0)]}return t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMergeOperation(e),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),t.graveyardPosition.isEqual(e.graveyardPosition)&&n.aIsStrong||(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]})),Dg(Zc,Wc,((t,e,n)=>{const o=tl._createFromPositionAndShift(e.sourcePosition,e.howMany);return"remove"==e.type&&!n.bWasUndone&&!n.forceWeakRemove&&t.deletionPosition.hasSameParentAs(e.sourcePosition)&&o.containsPosition(t.sourcePosition)?[new $c(0)]:(t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition.hasSameParentAs(e.sourcePosition)&&(t.howMany-=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMoveOperation(e),t.targetPosition=t.targetPosition._getTransformedByMoveOperation(e),t.graveyardPosition.isEqual(e.targetPosition)||(t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)),[t])})),Dg(Zc,Jc,((t,e,n)=>{if(e.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByDeletion(e.graveyardPosition,1),t.deletionPosition.isEqual(e.graveyardPosition)&&(t.howMany=e.howMany)),t.targetPosition.isEqual(e.splitPosition)){const o=0!=e.howMany,i=e.graveyardPosition&&t.deletionPosition.isEqual(e.graveyardPosition);if(o||i||"mergeTargetNotMoved"==n.abRelation)return t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),[t]}if(t.sourcePosition.isEqual(e.splitPosition)){if("mergeSourceNotMoved"==n.abRelation)return t.howMany=0,t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t];if("mergeSameElement"==n.abRelation||t.sourcePosition.offset>0)return t.sourcePosition=e.moveTargetPosition.clone(),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]}return t.sourcePosition.hasSameParentAs(e.splitPosition)&&(t.howMany=e.splitPosition.offset),t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]})),Dg(Wc,jc,((t,e)=>{const n=tl._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByInsertOperation(e,!1)[0];return t.sourcePosition=n.start,t.howMany=n.end.offset-n.start.offset,t.targetPosition.isEqual(e.position)||(t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e)),[t]})),Dg(Wc,Wc,((t,e,n)=>{const o=tl._createFromPositionAndShift(t.sourcePosition,t.howMany),i=tl._createFromPositionAndShift(e.sourcePosition,e.howMany);let r,s=n.aIsStrong,a=!n.aIsStrong;if("insertBefore"==n.abRelation||"insertAfter"==n.baRelation?a=!0:"insertAfter"!=n.abRelation&&"insertBefore"!=n.baRelation||(a=!1),r=t.targetPosition.isEqual(e.targetPosition)&&a?t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany):t.targetPosition._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),Fg(t,e)&&Fg(e,t))return[e.getReversed()];if(o.containsPosition(e.targetPosition)&&o.containsRange(i,!0))return o.start=o.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),o.end=o.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),Og([o],r);if(i.containsPosition(t.targetPosition)&&i.containsRange(o,!0))return o.start=o.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),o.end=o.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),Og([o],r);const l=Bo(t.sourcePosition.getParentPath(),e.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return o.start=o.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),o.end=o.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),Og([o],r);"remove"!=t.type||"remove"==e.type||n.aWasUndone||n.forceWeakRemove?"remove"==t.type||"remove"!=e.type||n.bWasUndone||n.forceWeakRemove||(s=!1):s=!0;const c=[],d=o.getDifference(i);for(const t of d){t.start=t.start._getTransformedByDeletion(e.sourcePosition,e.howMany),t.end=t.end._getTransformedByDeletion(e.sourcePosition,e.howMany);const n="same"==Bo(t.start.getParentPath(),e.getMovedRangeStart().getParentPath()),o=t._getTransformedByInsertion(e.getMovedRangeStart(),e.howMany,n);c.push(...o)}const h=o.getIntersection(i);return null!==h&&s&&(h.start=h.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),h.end=h.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),0===c.length?c.push(h):1==c.length?i.start.isBefore(o.start)||i.start.isEqual(o.start)?c.unshift(h):c.push(h):c.splice(1,0,h)),0===c.length?[new $c(t.baseVersion)]:Og(c,r)})),Dg(Wc,Jc,((t,e,n)=>{let o=t.targetPosition.clone();t.targetPosition.isEqual(e.insertionPosition)&&e.graveyardPosition&&"moveTargetAfter"!=n.abRelation||(o=t.targetPosition._getTransformedBySplitOperation(e));const i=tl._createFromPositionAndShift(t.sourcePosition,t.howMany);if(i.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.howMany++,t.targetPosition=o,[t];if(i.start.hasSameParentAs(e.splitPosition)&&i.containsPosition(e.splitPosition)){let t=new tl(e.splitPosition,i.end);t=t._getTransformedBySplitOperation(e);return Og([new tl(i.start,e.splitPosition),t],o)}t.targetPosition.isEqual(e.splitPosition)&&"insertAtSource"==n.abRelation&&(o=e.moveTargetPosition),t.targetPosition.isEqual(e.insertionPosition)&&"insertBetween"==n.abRelation&&(o=t.targetPosition);const r=[i._getTransformedBySplitOperation(e)];if(e.graveyardPosition){const o=i.start.isEqual(e.graveyardPosition)||i.containsPosition(e.graveyardPosition);t.howMany>1&&o&&!n.aWasUndone&&r.push(tl._createFromPositionAndShift(e.insertionPosition,1))}return Og(r,o)})),Dg(Wc,Zc,((t,e,n)=>{const o=tl._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.deletionPosition.hasSameParentAs(t.sourcePosition)&&o.containsPosition(e.sourcePosition))if("remove"!=t.type||n.forceWeakRemove){if(1==t.howMany)return n.bWasUndone?(t.sourcePosition=e.graveyardPosition.clone(),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]):[new $c(0)]}else if(!n.aWasUndone){const n=[];let o=e.graveyardPosition.clone(),i=e.targetPosition._getTransformedByMergeOperation(e);t.howMany>1&&(n.push(new Wc(t.sourcePosition,t.howMany-1,t.targetPosition,0)),o=o._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1),i=i._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1));const r=e.deletionPosition._getCombined(t.sourcePosition,t.targetPosition),s=new Wc(o,1,r,0),a=s.getMovedRangeStart().path.slice();a.push(0);const l=new Ja(s.targetPosition.root,a);i=i._getTransformedByMove(o,r,1);const c=new Wc(i,e.howMany,l,0);return n.push(s),n.push(c),n}const i=tl._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByMergeOperation(e);return t.sourcePosition=i.start,t.howMany=i.end.offset-i.start.offset,t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]})),Dg(Gc,jc,((t,e)=>(t.position=t.position._getTransformedByInsertOperation(e),[t]))),Dg(Gc,Zc,((t,e)=>t.position.isEqual(e.deletionPosition)?(t.position=e.graveyardPosition.clone(),t.position.stickiness="toNext",[t]):(t.position=t.position._getTransformedByMergeOperation(e),[t]))),Dg(Gc,Wc,((t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t]))),Dg(Gc,Gc,((t,e,n)=>{if(t.position.isEqual(e.position)){if(!n.aIsStrong)return[new $c(0)];t.oldName=e.newName}return[t]})),Dg(Gc,Jc,((t,e)=>{if("same"==Bo(t.position.path,e.splitPosition.getParentPath())&&!e.graveyardPosition){const e=new Gc(t.position.getShiftedBy(1),t.oldName,t.newName,0);return[t,e]}return t.position=t.position._getTransformedBySplitOperation(e),[t]})),Dg(Kc,Kc,((t,e,n)=>{if(t.root===e.root&&t.key===e.key){if(!n.aIsStrong||t.newValue===e.newValue)return[new $c(0)];t.oldValue=e.newValue}return[t]})),Dg(Jc,jc,((t,e)=>(t.splitPosition.hasSameParentAs(e.position)&&t.splitPosition.offset<e.position.offset&&(t.howMany+=e.howMany),t.splitPosition=t.splitPosition._getTransformedByInsertOperation(e),t.insertionPosition=t.insertionPosition._getTransformedByInsertOperation(e),[t]))),Dg(Jc,Zc,((t,e,n)=>{if(!t.graveyardPosition&&!n.bWasUndone&&t.splitPosition.hasSameParentAs(e.sourcePosition)){const n=e.graveyardPosition.path.slice();n.push(0);const o=new Ja(e.graveyardPosition.root,n),i=Jc.getInsertionPosition(new Ja(e.graveyardPosition.root,n)),r=new Jc(o,0,i,null,0);return t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=Jc.getInsertionPosition(t.splitPosition),t.graveyardPosition=r.insertionPosition.clone(),t.graveyardPosition.stickiness="toNext",[r,t]}return t.splitPosition.hasSameParentAs(e.deletionPosition)&&!t.splitPosition.isAfter(e.deletionPosition)&&t.howMany--,t.splitPosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=Jc.getInsertionPosition(t.splitPosition),t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]})),Dg(Jc,Wc,((t,e,n)=>{const o=tl._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.graveyardPosition){const i=o.start.isEqual(t.graveyardPosition)||o.containsPosition(t.graveyardPosition);if(!n.bWasUndone&&i){const n=t.splitPosition._getTransformedByMoveOperation(e),o=t.graveyardPosition._getTransformedByMoveOperation(e),i=o.path.slice();i.push(0);const r=new Ja(o.root,i);return[new Wc(n,t.howMany,r,0)]}t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}const i=t.splitPosition.isEqual(e.targetPosition);if(i&&("insertAtSource"==n.baRelation||"splitBefore"==n.abRelation))return t.howMany+=e.howMany,t.splitPosition=t.splitPosition._getTransformedByDeletion(e.sourcePosition,e.howMany),t.insertionPosition=Jc.getInsertionPosition(t.splitPosition),[t];if(i&&n.abRelation&&n.abRelation.howMany){const{howMany:e,offset:o}=n.abRelation;return t.howMany+=e,t.splitPosition=t.splitPosition.getShiftedBy(o),[t]}if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&o.containsPosition(t.splitPosition)){const n=e.howMany-(t.splitPosition.offset-e.sourcePosition.offset);return t.howMany-=n,t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset<e.targetPosition.offset&&(t.howMany+=e.howMany),t.splitPosition=e.sourcePosition.clone(),t.insertionPosition=Jc.getInsertionPosition(t.splitPosition),[t]}return e.sourcePosition.isEqual(e.targetPosition)||(t.splitPosition.hasSameParentAs(e.sourcePosition)&&t.splitPosition.offset<=e.sourcePosition.offset&&(t.howMany-=e.howMany),t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset<e.targetPosition.offset&&(t.howMany+=e.howMany)),t.splitPosition.stickiness="toNone",t.splitPosition=t.splitPosition._getTransformedByMoveOperation(e),t.splitPosition.stickiness="toNext",t.graveyardPosition?t.insertionPosition=t.insertionPosition._getTransformedByMoveOperation(e):t.insertionPosition=Jc.getInsertionPosition(t.splitPosition),[t]})),Dg(Jc,Jc,((t,e,n)=>{if(t.splitPosition.isEqual(e.splitPosition)){if(!t.graveyardPosition&&!e.graveyardPosition)return[new $c(0)];if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition))return[new $c(0)];if("splitBefore"==n.abRelation)return t.howMany=0,t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e),[t]}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){const o="$graveyard"==t.splitPosition.root.rootName,i="$graveyard"==e.splitPosition.root.rootName,r=o&&!i;if(i&&!o||!r&&n.aIsStrong){const n=[];return e.howMany&&n.push(new Wc(e.moveTargetPosition,e.howMany,e.splitPosition,0)),t.howMany&&n.push(new Wc(t.splitPosition,t.howMany,t.moveTargetPosition,0)),n}return[new $c(0)]}if(t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e)),t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==n.abRelation)return t.howMany++,[t];if(e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==n.baRelation){const n=e.insertionPosition.path.slice();n.push(0);const o=new Ja(e.insertionPosition.root,n);return[t,new Wc(t.insertionPosition,1,o,0)]}return t.splitPosition.hasSameParentAs(e.splitPosition)&&t.splitPosition.offset<e.splitPosition.offset&&(t.howMany-=e.howMany),t.splitPosition=t.splitPosition._getTransformedBySplitOperation(e),t.insertionPosition=Jc.getInsertionPosition(t.splitPosition),[t]}));class Ng extends Zs{constructor(t){super(t),this.domEventType="click"}onDomEvent(t){this.fire(t.type,t)}}class Mg extends Zs{constructor(t){super(t),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(t){this.fire(t.type,t)}}class Lg{constructor(t){this.document=t}createDocumentFragment(t){return new xr(this.document,t)}createElement(t,e,n){return new Vi(this.document,t,e,n)}createText(t){return new Ro(this.document,t)}clone(t,e=!1){return t._clone(e)}appendChild(t,e){return e._appendChild(t)}insertChild(t,e,n){return n._insertChild(t,e)}removeChildren(t,e,n){return n._removeChildren(t,e)}remove(t){const e=t.parent;return e?this.removeChildren(e.getChildIndex(t),1,e):[]}replace(t,e){const n=t.parent;if(n){const o=n.getChildIndex(t);return this.removeChildren(o,1,n),this.insertChild(o,e,n),!0}return!1}unwrapElement(t){const e=t.parent;if(e){const n=e.getChildIndex(t);this.remove(t),this.insertChild(n,t.getChildren(),e)}}rename(t,e){const n=new Vi(this.document,t,e.getAttributes(),e.getChildren());return this.replace(e,n)?n:null}setAttribute(t,e,n){n._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,n){gt(t)&&void 0===n?e._setStyle(t):n._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,n){n._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}createPositionAt(t,e){return Wi._createAt(t,e)}createPositionAfter(t){return Wi._createAfter(t)}createPositionBefore(t){return Wi._createBefore(t)}createRange(t,e){return new ji(t,e)}createRangeOn(t){return ji._createOn(t)}createRangeIn(t){return ji._createIn(t)}createSelection(...t){return new Gi(...t)}}const Hg=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,qg=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,Wg=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,jg=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,Ug=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,$g=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function Gg(t){return t.startsWith("#")?Hg.test(t):t.startsWith("rgb")?qg.test(t)||Wg.test(t):t.startsWith("hsl")?jg.test(t)||Ug.test(t):$g.has(t.toLowerCase())}const Kg=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function Zg(t){return Kg.includes(t)}const Jg=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function Yg(t){return Jg.test(t)}const Qg=/^[+-]?[0-9]*([.][0-9]+)?%$/;function Xg(t){return Qg.test(t)}const tm=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function em(t){return tm.includes(t)}const nm=["center","top","bottom","left","right"];function om(t){return nm.includes(t)}const im=["fixed","scroll","local"];function rm(t){return im.includes(t)}const sm=/^url\(/;function am(t){return sm.test(t)}function lm(t=""){if(""===t)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const e=um(t),n=e[0],o=e[2]||n,i=e[1]||n;return{top:n,bottom:o,right:i,left:e[3]||i}}function cm(t){return e=>{const{top:n,right:o,bottom:i,left:r}=e,s=[];return[n,o,r,i].every((t=>!!t))?s.push([t,dm(e)]):(n&&s.push([t+"-top",n]),o&&s.push([t+"-right",o]),i&&s.push([t+"-bottom",i]),r&&s.push([t+"-left",r])),s}}function dm({top:t,right:e,bottom:n,left:o}){const i=[];return o!==e?i.push(t,e,n,o):n!==t?i.push(t,e,n):e!==t?i.push(t,e):i.push(t),i.join(" ")}function hm(t){return e=>({path:t,value:lm(e)})}function um(t){return t.replace(/, /g,",").split(" ").map((t=>t.replace(/,/g,", ")))}function gm(t){t.setNormalizer("background",(t=>{const e={},n=um(t);for(const t of n)em(t)?(e.repeat=e.repeat||[],e.repeat.push(t)):om(t)?(e.position=e.position||[],e.position.push(t)):rm(t)?e.attachment=t:Gg(t)?e.color=t:am(t)&&(e.image=t);return{path:"background",value:e}})),t.setNormalizer("background-color",(t=>({path:"background.color",value:t}))),t.setReducer("background",(t=>{const e=[];return e.push(["background-color",t.color]),e})),t.setStyleRelation("background",["background-color"])}function mm(t){t.setNormalizer("border",(t=>{const{color:e,style:n,width:o}=Am(t);return{path:"border",value:{color:lm(e),style:lm(n),width:lm(o)}}})),t.setNormalizer("border-top",pm("top")),t.setNormalizer("border-right",pm("right")),t.setNormalizer("border-bottom",pm("bottom")),t.setNormalizer("border-left",pm("left")),t.setNormalizer("border-color",fm("color")),t.setNormalizer("border-width",fm("width")),t.setNormalizer("border-style",fm("style")),t.setNormalizer("border-top-color",km("color","top")),t.setNormalizer("border-top-style",km("style","top")),t.setNormalizer("border-top-width",km("width","top")),t.setNormalizer("border-right-color",km("color","right")),t.setNormalizer("border-right-style",km("style","right")),t.setNormalizer("border-right-width",km("width","right")),t.setNormalizer("border-bottom-color",km("color","bottom")),t.setNormalizer("border-bottom-style",km("style","bottom")),t.setNormalizer("border-bottom-width",km("width","bottom")),t.setNormalizer("border-left-color",km("color","left")),t.setNormalizer("border-left-style",km("style","left")),t.setNormalizer("border-left-width",km("width","left")),t.setExtractor("border-top",wm("top")),t.setExtractor("border-right",wm("right")),t.setExtractor("border-bottom",wm("bottom")),t.setExtractor("border-left",wm("left")),t.setExtractor("border-top-color","border.color.top"),t.setExtractor("border-right-color","border.color.right"),t.setExtractor("border-bottom-color","border.color.bottom"),t.setExtractor("border-left-color","border.color.left"),t.setExtractor("border-top-width","border.width.top"),t.setExtractor("border-right-width","border.width.right"),t.setExtractor("border-bottom-width","border.width.bottom"),t.setExtractor("border-left-width","border.width.left"),t.setExtractor("border-top-style","border.style.top"),t.setExtractor("border-right-style","border.style.right"),t.setExtractor("border-bottom-style","border.style.bottom"),t.setExtractor("border-left-style","border.style.left"),t.setReducer("border-color",cm("border-color")),t.setReducer("border-style",cm("border-style")),t.setReducer("border-width",cm("border-width")),t.setReducer("border-top",Cm("top")),t.setReducer("border-right",Cm("right")),t.setReducer("border-bottom",Cm("bottom")),t.setReducer("border-left",Cm("left")),t.setReducer("border",function(){return e=>{const n=_m(e,"top"),o=_m(e,"right"),i=_m(e,"bottom"),r=_m(e,"left"),s=[n,o,i,r],a={width:t(s,"width"),style:t(s,"style"),color:t(s,"color")},l=vm(a,"all");if(l.length)return l;const c=Object.entries(a).reduce(((t,[e,n])=>(n&&(t.push([`border-${e}`,n]),s.forEach((t=>delete t[e]))),t)),[]);return[...c,...vm(n,"top"),...vm(o,"right"),...vm(i,"bottom"),...vm(r,"left")]};function t(t,e){return t.map((t=>t[e])).reduce(((t,e)=>t==e?t:null))}}()),t.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),t.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),t.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),t.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),t.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),t.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),t.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),t.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function pm(t){return e=>{const{color:n,style:o,width:i}=Am(e),r={};return void 0!==n&&(r.color={[t]:n}),void 0!==o&&(r.style={[t]:o}),void 0!==i&&(r.width={[t]:i}),{path:"border",value:r}}}function fm(t){return e=>({path:"border",value:bm(e,t)})}function bm(t,e){return{[e]:lm(t)}}function km(t,e){return n=>({path:"border",value:{[t]:{[e]:n}}})}function wm(t){return(e,n)=>{if(n.border)return _m(n.border,t)}}function _m(t,e){const n={};return t.width&&t.width[e]&&(n.width=t.width[e]),t.style&&t.style[e]&&(n.style=t.style[e]),t.color&&t.color[e]&&(n.color=t.color[e]),n}function Am(t){const e={},n=um(t);for(const t of n)Yg(t)||/thin|medium|thick/.test(t)?e.width=t:Zg(t)?e.style=t:e.color=t;return e}function Cm(t){return e=>vm(e,t)}function vm(t,e){const n=[];if(t&&t.width&&n.push("width"),t&&t.style&&n.push("style"),t&&t.color&&n.push("color"),3==n.length){const o=n.map((e=>t[e])).join(" ");return["all"==e?["border",o]:[`border-${e}`,o]]}return"all"==e?[]:n.map((n=>[`border-${e}-${n}`,t[n]]))}function ym(t){t.setNormalizer("margin",hm("margin")),t.setNormalizer("margin-top",(t=>({path:"margin.top",value:t}))),t.setNormalizer("margin-right",(t=>({path:"margin.right",value:t}))),t.setNormalizer("margin-bottom",(t=>({path:"margin.bottom",value:t}))),t.setNormalizer("margin-left",(t=>({path:"margin.left",value:t}))),t.setReducer("margin",cm("margin")),t.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}function xm(t){t.setNormalizer("padding",hm("padding")),t.setNormalizer("padding-top",(t=>({path:"padding.top",value:t}))),t.setNormalizer("padding-right",(t=>({path:"padding.right",value:t}))),t.setNormalizer("padding-bottom",(t=>({path:"padding.bottom",value:t}))),t.setNormalizer("padding-left",(t=>({path:"padding.left",value:t}))),t.setReducer("padding",cm("padding")),t.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}class Em extends wh{constructor(t,e){super(t),this.view=e}get element(){return this.view.editable.element}init(){const t=this.editor,e=this.view,n=t.editing.view,o=e.editable,i=n.document.getRoot();o.name=i.rootName,e.render();const r=o.element;this.setEditableElement(o.name,r),o.bind("isFocused").to(this.focusTracker),n.attachDomRoot(r),this._initPlaceholder(),this.fire("ready")}destroy(){const t=this.view;this.editor.editing.view.detachDomRoot(t.editable.name),t.destroy(),super.destroy()}_initPlaceholder(){const t=this.editor,e=t.editing.view,n=e.document.getRoot(),o=t.sourceElement,i=t.config.get("placeholder")||o&&"textarea"===o.tagName.toLowerCase()&&o.getAttribute("placeholder");i&&Cg({view:e,element:n,text:i,isDirectHost:!1,keepOnFocus:!0})}}class Tm extends Ru{constructor(t,e,n){super(t);const o=t.t;this.editable=new Nu(t,e,n,{label:t=>o("Rich Text Editor. Editing area: %0",t.name)})}render(){super.render(),this.registerChild(this.editable)}}class Dm extends Bd{constructor(t,e={}){if(!go(t)&&void 0!==e.initialData)throw new l("editor-create-initial-data",null);super(e),void 0===this.config.get("initialData")&&this.config.set("initialData",function(t){return go(t)?(e=t,e instanceof HTMLTextAreaElement?e.value:e.innerHTML):t;var e}(t)),go(t)&&(this.sourceElement=t,function(t){const e=t.sourceElement;if(e){if(e.ckeditorInstance)throw new l("editor-source-element-already-used",t);e.ckeditorInstance=t,t.once("destroy",(()=>{delete e.ckeditorInstance}))}}(this));const n=this.config.get("plugins");n.push(gg),this.config.set("plugins",n),this.config.define("balloonToolbar",this.config.get("toolbar")),this.model.document.createRoot();const o=new Tm(this.locale,this.editing.view,this.sourceElement);this.ui=new Em(this,o),function(t){if(!Dt(t.updateSourceElement))throw new l("attachtoform-missing-elementapi-interface",t);const e=t.sourceElement;if(e&&"textarea"===e.tagName.toLowerCase()&&e.form){let n;const o=e.form,i=()=>t.updateSourceElement();Dt(o.submit)&&(n=o.submit,o.submit=()=>{i(),n.apply(o)}),o.addEventListener("submit",i),t.on("destroy",(()=>{o.removeEventListener("submit",i),n&&(o.submit=n)}))}}(this)}destroy(){const t=this.getData();return this.ui.destroy(),super.destroy().then((()=>{this.sourceElement&&this.updateSourceElement(t)}))}static create(t,e={}){return new Promise((n=>{if(go(t)&&"TEXTAREA"===t.tagName)throw new l("editor-wrong-element",null);const o=new this(t,e);n(o.initPlugins().then((()=>o.ui.init())).then((()=>o.data.init(o.config.get("initialData")))).then((()=>o.fire("ready"))).then((()=>o)))}))}}M(Dm,Ch),M(Dm,yh);var Sm=n(6764),Bm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(Sm.Z,Bm);Sm.Z.locals;var Im=n(2822),Pm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(Im.Z,Pm);Im.Z.locals;class Rm extends nh{constructor(t){super(t);const e=t.t;this.set("matchCount",0),this.set("highlightOffset",0),this.set("isDirty",!1),this.set("_areCommandsEnabled",{}),this.set("_resultsCounterText",""),this.set("_matchCase",!1),this.set("_wholeWordsOnly",!1),this.bind("_searchResultsFound").to(this,"matchCount",this,"isDirty",((t,e)=>t>0&&!e)),this._findInputView=this._createInputField(e("Find in text…")),this._replaceInputView=this._createInputField(e("Replace with…")),this._findButtonView=this._createButton({label:e("Find"),class:"ck-button-find ck-button-action",withText:!0}),this._findPrevButtonView=this._createButton({label:e("Previous result"),class:"ck-button-prev",icon:eg,keystroke:"Shift+F3",tooltip:!0}),this._findNextButtonView=this._createButton({label:e("Next result"),class:"ck-button-next",icon:eg,keystroke:"F3",tooltip:!0}),this._optionsDropdown=this._createOptionsDropdown(),this._replaceButtonView=this._createButton({label:e("Replace"),class:"ck-button-replace",withText:!0}),this._replaceAllButtonView=this._createButton({label:e("Replace all"),class:"ck-button-replaceall",withText:!0}),this._findFieldsetView=this._createFindFieldset(),this._replaceFieldsetView=this._createReplaceFieldset(),this._focusTracker=new Ta,this._keystrokes=new Da,this._focusables=new Rd,this._focusCycler=new au({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this._keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-find-and-replace-form"],tabindex:"-1"},children:[new Hu(t,{label:e("Find and replace")}),this._findFieldsetView,this._replaceFieldsetView]}),Ph(this)}render(){super.render(),Rh({view:this}),this._initFocusCycling(),this._initKeystrokeHandling()}destroy(){super.destroy(),this._focusTracker.destroy(),this._keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}reset(){this._findInputView.errorText=null,this.isDirty=!0}get _textToFind(){return this._findInputView.fieldView.element.value}get _textToReplace(){return this._replaceInputView.fieldView.element.value}_createFindFieldset(){const t=this.locale,e=new nh(t);return this._findInputView.fieldView.on("input",(()=>{this.isDirty=!0})),this._findButtonView.on("execute",this._onFindButtonExecute.bind(this)),this._findPrevButtonView.delegate("execute").to(this,"findPrevious"),this._findNextButtonView.delegate("execute").to(this,"findNext"),this._findPrevButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",(({findPrevious:t})=>t)),this._findNextButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",(({findNext:t})=>t)),this._injectFindResultsCounter(),e.setTemplate({tag:"fieldset",attributes:{class:["ck","ck-find-and-replace-form__find"]},children:[this._findInputView,this._findButtonView,this._findPrevButtonView,this._findNextButtonView]}),e}_onFindButtonExecute(){if(this._textToFind)this.isDirty=!1,this.fire("findNext",{searchText:this._textToFind,matchCase:this._matchCase,wholeWords:this._wholeWordsOnly});else{const t=this.t;this._findInputView.errorText=t("Text to find must not be empty.")}}_injectFindResultsCounter(){const t=this.locale,e=t.t,n=this.bindTemplate,o=new nh(t);this.bind("_resultsCounterText").to(this,"highlightOffset",this,"matchCount",((t,n)=>e("%0 of %1",[t,n]))),o.setTemplate({tag:"span",attributes:{class:["ck","ck-results-counter",n.if("isDirty","ck-hidden")]},children:[{text:n.to("_resultsCounterText")}]});const i=()=>{const e=this._findInputView.fieldView.element;if(!e||!xa(e))return;const n=new _a(o.element).width,i="ltr"===t.uiLanguageDirection?"paddingRight":"paddingLeft";e.style[i]=n?`calc( 2 * var(--ck-spacing-standard) + ${n}px )`:null};this.on("change:_resultsCounterText",i,{priority:"low"}),this.on("change:isDirty",i,{priority:"low"}),this._findInputView.template.children[0].children.push(o)}_createReplaceFieldset(){const t=this.locale,e=t.t,n=new nh(t);return this._replaceButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replace:t},e)=>t&&e)),this._replaceAllButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replaceAll:t},e)=>t&&e)),this._replaceInputView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replace:t},e)=>t&&e)),this._replaceInputView.bind("infoText").to(this._replaceInputView,"isEnabled",this._replaceInputView,"isFocused",((t,n)=>t||!n?"":e("Tip: Find some text first in order to replace it."))),this._replaceButtonView.on("execute",(()=>{this.fire("replace",{searchText:this._textToFind,replaceText:this._textToReplace})})),this._replaceAllButtonView.on("execute",(()=>{this.fire("replaceAll",{searchText:this._textToFind,replaceText:this._textToReplace}),this.focus()})),n.setTemplate({tag:"fieldset",attributes:{class:["ck","ck-find-and-replace-form__replace"]},children:[this._replaceInputView,this._optionsDropdown,this._replaceButtonView,this._replaceAllButtonView]}),n}_createOptionsDropdown(){const t=this.locale,e=t.t,n=Tu(t);n.class="ck-options-dropdown",n.buttonView.set({withText:!1,label:e("Show options"),icon:Bh.cog,tooltip:!0});const o=new tg({withText:!0,label:e("Match case"),_isMatchCaseSwitch:!0}),i=new tg({withText:!0,label:e("Whole words only")});return o.bind("isOn").to(this,"_matchCase"),i.bind("isOn").to(this,"_wholeWordsOnly"),n.on("execute",(t=>{t.source._isMatchCaseSwitch?this._matchCase=!this._matchCase:this._wholeWordsOnly=!this._wholeWordsOnly,this.isDirty=!0})),Su(n,new ko([{type:"switchbutton",model:o},{type:"switchbutton",model:i}])),n}_initFocusCycling(){[this._findInputView,this._findButtonView,this._findPrevButtonView,this._findNextButtonView,this._replaceInputView,this._optionsDropdown,this._replaceButtonView,this._replaceAllButtonView].forEach((t=>{this._focusables.add(t),this._focusTracker.add(t.element)}))}_initKeystrokeHandling(){const t=t=>t.stopPropagation(),e=t=>{t.stopPropagation(),t.preventDefault()};this._keystrokes.listenTo(this.element),this._keystrokes.set("f3",(t=>{e(t),this._findNextButtonView.fire("execute")})),this._keystrokes.set("shift+f3",(t=>{e(t),this._findPrevButtonView.fire("execute")})),this._keystrokes.set("enter",(t=>{const n=t.target;n===this._findInputView.fieldView.element?(this._areCommandsEnabled.findNext?this._findNextButtonView.fire("execute"):this._findButtonView.fire("execute"),e(t)):n!==this._replaceInputView.fieldView.element||this.isDirty||(this._replaceButtonView.fire("execute"),e(t))})),this._keystrokes.set("shift+enter",(t=>{t.target===this._findInputView.fieldView.element&&(this._areCommandsEnabled.findPrevious?this._findPrevButtonView.fire("execute"):this._findButtonView.fire("execute"),e(t))})),this._keystrokes.set("arrowright",t),this._keystrokes.set("arrowleft",t),this._keystrokes.set("arrowup",t),this._keystrokes.set("arrowdown",t),this.listenTo(this._findInputView.element,"selectstart",((t,e)=>{e.stopPropagation()}),{priority:"high"}),this.listenTo(this._replaceInputView.element,"selectstart",((t,e)=>{e.stopPropagation()}),{priority:"high"})}_createButton(t){const e=new Hh(this.locale);return e.set(t),e}_createInputField(t){const e=new Zu(this.locale,Ju);return e.label=t,e}}class zm extends L{static get pluginName(){return"FindAndReplaceUI"}constructor(t){super(t),this.formView=null}init(){const t=this.editor;t.ui.componentFactory.add("findAndReplace",(e=>{const n=Tu(e),o=this.formView=new Rm(t.locale);return n.bind("isEnabled").to(t.commands.get("find")),n.panelView.children.add(o),n.on("change:isOpen",((t,e,n)=>{n?(o.disableCssTransitions(),o.reset(),o._findInputView.fieldView.select(),o.focus(),o.enableCssTransitions()):(o.focus(),this.fire("searchReseted"))}),{priority:"low"}),this._setupDropdownButton(n),this._setupFormView(o),n}))}_setupDropdownButton(t){const e=this.editor.locale.t;t.buttonView.set({icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12.87 13.786 1.532-1.286 3.857 4.596a1 1 0 1 1-1.532 1.286l-3.857-4.596z"/><path d="M16.004 8.5a6.5 6.5 0 0 1-9.216 5.905c-1.154-.53-.863-1.415-.663-1.615.194-.194.564-.592 1.635-.141a4.5 4.5 0 0 0 5.89-5.904l-.104-.227 1.332-1.331c.045-.046.196-.041.224.007a6.47 6.47 0 0 1 .902 3.306zm-3.4-5.715c.562.305.742 1.106.354 1.494-.388.388-.995.414-1.476.178a4.5 4.5 0 0 0-6.086 5.882l.114.236-1.348 1.349c-.038.037-.17.022-.198-.023a6.5 6.5 0 0 1 5.54-9.9 6.469 6.469 0 0 1 3.1.784z"/><path d="M4.001 11.93.948 8.877a.2.2 0 0 1 .141-.341h6.106a.2.2 0 0 1 .141.341L4.283 11.93a.2.2 0 0 1-.282 0zm11.083-6.789 3.053 3.053a.2.2 0 0 1-.14.342H11.89a.2.2 0 0 1-.14-.342l3.052-3.053a.2.2 0 0 1 .282 0z"/></svg>',label:e("Find and replace"),tooltip:!0})}_setupFormView(t){const e=this.editor.commands,n=this.editor.plugins.get("FindAndReplaceEditing").state,o={before:-1,same:0,after:1};t.bind("highlightOffset").to(n,"highlightedResult",(t=>t?Array.from(n.results).sort(((t,e)=>o[t.marker.getStart().compareWith(e.marker.getStart())])).indexOf(t)+1:0)),t.listenTo(n.results,"change",(()=>{t.matchCount=n.results.length})),t.bind("_areCommandsEnabled").to(e.get("findNext"),"isEnabled",e.get("findPrevious"),"isEnabled",e.get("replace"),"isEnabled",e.get("replaceAll"),"isEnabled",((t,e,n,o)=>({findNext:t,findPrevious:e,replace:n,replaceAll:o}))),t.delegate("findNext","findPrevious","replace","replaceAll").to(this),t.on("change:isDirty",((t,e,n)=>{n&&this.fire("searchReseted")}))}}var Vm=/[\\^$.*+?()[\]{}|]/g,Fm=RegExp(Vm.source);const Om=function(t){return(t=Xo(t))&&Fm.test(t)?t.replace(Vm,"\\$&"):t};function Nm(t,e,n,o){const i=o||new ko;return e.change((o=>{[...t].forEach((({type:t,item:s})=>{if("elementStart"===t&&e.schema.checkChild(s,"$text")){const t=n({item:s,text:Mm(e.createRangeIn(s))});if(!t)return;t.forEach((t=>{const e=`findResult:${r()}`,n=o.addMarker(e,{usingOperation:!1,affectsData:!1,range:o.createRange(o.createPositionAt(s,t.start),o.createPositionAt(s,t.end))}),a=function(t,e){const n=t.find((({marker:t})=>e.getStart().isBefore(t.getStart())));return n?t.getIndex(n):t.length}(i,n);i.add({id:e,label:t.label,marker:n},a)}))}}))})),i}function Mm(t){return Array.from(t.getItems()).reduce(((t,e)=>e.is("text")||e.is("textProxy")?t+e.data:`${t}\n`),"")}function Lm(t){const e=t.length-1;let n=t.index;return 3===t.length&&(n+=t[1].length),{label:t[e],start:n,end:n+t[e].length}}function Hm(t,e){let n="gu";e.matchCase||(n+="i");let o=`(${Om(t)})`;if(e.wholeWords){const e="[^a-zA-ZÀ-ɏḀ-ỿ]";new RegExp("^"+e).test(t)||(o=`(^|${e}|_)${o}`),new RegExp(e+"$").test(t)||(o=`${o}(?=_|${e}|$)`)}const i=new RegExp(o,n);return function({text:t}){return[...t.matchAll(i)].map(Lm)}}class qm extends q{constructor(t,e){super(t),this.isEnabled=!0,this.affectsData=!1,this._state=e}execute(t,{matchCase:e,wholeWords:n}={}){const{editor:o}=this,{model:i}=o;let r;"string"==typeof t?(r=Hm(t,{matchCase:e,wholeWords:n}),this._state.searchText=t):r=t;const s=i.document.getRootNames().reduce(((t,e)=>Nm(i.createRangeIn(i.document.getRoot(e)),i,r,t)),null);return this._state.clear(i),this._state.results.addMany(Array.from(s)),this._state.highlightedResult=s.get(0),"string"==typeof t&&(this._state.searchText=t),this._state.matchCase=!!e,this._state.matchWholeWords=!!n,{results:s,findCallback:r}}}class Wm extends q{constructor(t,e){super(t),this.isEnabled=!0,this._state=e}execute(t,e){const{model:n}=this.editor;n.change((o=>{const i=e.marker.getRange();if("$graveyard"===i.root.rootName)return void this._state.results.remove(e);let r={};for(const t of i.getItems())if(t.is("$text")||t.is("$textProxy")){r=t.getAttributes();break}n.insertContent(o.createText(t,r),i),this._state.results.has(e)&&this._state.results.remove(e)}))}}class jm extends Wm{execute(t,e){const{editor:n}=this,{model:o}=n,i=e instanceof ko?e:o.document.getRootNames().reduce(((t,n)=>Nm(o.createRangeIn(o.document.getRoot(n)),o,Hm(e,this._state),t)),null);i.length&&o.change((()=>{[...i].forEach((e=>{super.execute(t,e)}))}))}}class Um extends q{constructor(t,e){super(t),this.affectsData=!1,this._state=e,this.isEnabled=!1,this.listenTo(this._state.results,"change",(()=>{this.isEnabled=this._state.results.length>1}))}refresh(){this.isEnabled=this._state.results.length>1}execute(){const t=this._state.results,e=t.getIndex(this._state.highlightedResult),n=e+1>=t.length?0:e+1;this._state.highlightedResult=this._state.results.get(n)}}class $m extends Um{execute(){const t=this._state.results.getIndex(this._state.highlightedResult),e=t-1<0?this._state.results.length-1:t-1;this._state.highlightedResult=this._state.results.get(e)}}class Gm{constructor(t){this.set("results",new ko),this.set("highlightedResult",null),this.set("searchText",""),this.set("replaceText",""),this.set("matchCase",!1),this.set("matchWholeWords",!1),this.results.on("change",((e,{removed:n,index:o})=>{if((n=Array.from(n)).length){let e=!1;if(t.change((o=>{for(const i of n)this.highlightedResult===i&&(e=!0),t.markers.has(i.marker.name)&&o.removeMarker(i.marker)})),e){const t=o>=this.results.length?0:o;this.highlightedResult=this.results.get(t)}}}))}clear(t){this.searchText="",t.change((e=>{if(this.highlightedResult){const n=this.highlightedResult.marker.name.split(":")[1],o=t.markers.get(`findResultHighlighted:${n}`);o&&e.removeMarker(o)}[...this.results].forEach((({marker:t})=>{e.removeMarker(t)}))})),this.results.clear()}}M(Gm,P);var Km=n(9932),Zm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(Km.Z,Zm);Km.Z.locals;class Jm extends L{static get pluginName(){return"FindAndReplaceEditing"}init(){this._activeResults=null,this.state=new Gm(this.editor.model),this._defineConverters(),this._defineCommands(),this.listenTo(this.state,"change:highlightedResult",((t,e,n,o)=>{const{model:i}=this.editor;i.change((t=>{if(o){const e=o.marker.name.split(":")[1],n=i.markers.get(`findResultHighlighted:${e}`);n&&t.removeMarker(n)}if(n){const e=n.marker.name.split(":")[1];t.addMarker(`findResultHighlighted:${e}`,{usingOperation:!1,affectsData:!1,range:n.marker.getRange()})}}))}));const t=ca(function(t,e,n){if(n){const t=this.editor.editing.view.domConverter,e=this.editor.editing.mapper.toViewRange(n.marker.getRange());Ia({target:t.viewRangeToDom(e),viewportOffset:40})}}.bind(this),32);this.listenTo(this.state,"change:highlightedResult",t,{priority:"low"}),this.listenTo(this.editor,"destroy",t.cancel)}find(t){const{editor:e}=this,{model:n}=e,{findCallback:o,results:i}=e.execute("find",t);return this._activeResults=i,this.listenTo(n.document,"change:data",(()=>function(t,e,n){const o=new Set,i=new Set;e.document.differ.getChanges().forEach((t=>{"$text"===t.name||e.schema.isInline(t.position.nodeAfter)?(o.add(t.position.parent),[...e.markers.getMarkersAtPosition(t.position)].forEach((t=>{i.add(t.name)}))):"insert"===t.type&&o.add(t.position.nodeAfter)})),e.document.differ.getChangedMarkers().forEach((({name:t,data:{newRange:e}})=>{e&&"$graveyard"===e.start.root.rootName&&i.add(t)})),o.forEach((t=>{[...e.markers.getMarkersIntersectingRange(e.createRangeIn(t))].forEach((t=>i.add(t.name)))})),e.change((e=>{i.forEach((n=>{t.has(n)&&t.remove(n),e.removeMarker(n)}))})),o.forEach((o=>{Nm(e.createRangeOn(o),e,n,t)}))}(this._activeResults,n,o))),this._activeResults}stop(){this._activeResults&&(this.stopListening(this.editor.model.document),this.state.clear(this.editor.model),this._activeResults=null)}_defineCommands(){this.editor.commands.add("find",new qm(this.editor,this.state)),this.editor.commands.add("findNext",new Um(this.editor,this.state)),this.editor.commands.add("findPrevious",new $m(this.editor,this.state)),this.editor.commands.add("replace",new Wm(this.editor,this.state)),this.editor.commands.add("replaceAll",new jm(this.editor,this.state))}_defineConverters(){const{editor:t}=this;t.conversion.for("editingDowncast").markerToHighlight({model:"findResult",view:({markerName:t})=>{const[,e]=t.split(":");return{name:"span",classes:["ck-find-result"],attributes:{"data-find-result":e}}}}),t.conversion.for("editingDowncast").markerToHighlight({model:"findResultHighlighted",view:({markerName:t})=>{const[,e]=t.split(":");return{name:"span",classes:["ck-find-result_selected"],attributes:{"data-find-result":e}}}})}}class Ym{constructor(){const t=new window.FileReader;this._reader=t,this._data=void 0,this.set("loaded",0),t.onprogress=t=>{this.loaded=t.loaded}}get error(){return this._reader.error}get data(){return this._data}read(t){const e=this._reader;return this.total=t.size,new Promise(((n,o)=>{e.onload=()=>{const t=e.result;this._data=t,n(t)},e.onerror=()=>{o("error")},e.onabort=()=>{o("aborted")},this._reader.readAsDataURL(t)}))}abort(){this._reader.abort()}}M(Ym,P);class Qm extends L{static get pluginName(){return"FileRepository"}static get requires(){return[xh]}init(){this.loaders=new ko,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",((t,e)=>e?t/e*100:0))}getLoader(t){return this._loadersMap.get(t)||null}createLoader(t){if(!this.createUploadAdapter)return c("filerepository-no-upload-adapter"),null;const e=new Xm(Promise.resolve(t),this.createUploadAdapter);return this.loaders.add(e),this._loadersMap.set(t,e),t instanceof Promise&&e.file.then((t=>{this._loadersMap.set(t,e)})).catch((()=>{})),e.on("change:uploaded",(()=>{let t=0;for(const e of this.loaders)t+=e.uploaded;this.uploaded=t})),e.on("change:uploadTotal",(()=>{let t=0;for(const e of this.loaders)e.uploadTotal&&(t+=e.uploadTotal);this.uploadTotal=t})),e}destroyLoader(t){const e=t instanceof Xm?t:this.getLoader(t);e._destroy(),this.loaders.remove(e),this._loadersMap.forEach(((t,n)=>{t===e&&this._loadersMap.delete(n)}))}_updatePendingAction(){const t=this.editor.plugins.get(xh);if(this.loaders.length){if(!this._pendingAction){const e=this.editor.t,n=t=>`${e("Upload in progress")} ${parseInt(t)}%.`;this._pendingAction=t.add(n(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",n)}}else t.remove(this._pendingAction),this._pendingAction=null}}M(Qm,P);class Xm{constructor(t,e){this.id=r(),this._filePromiseWrapper=this._createFilePromiseWrapper(t),this._adapter=e(this),this._reader=new Ym,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((t,e)=>e?t/e*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((t=>this._filePromiseWrapper?t:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new l("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((t=>this._reader.read(t))).then((t=>{if("reading"!==this.status)throw this.status;return this.status="idle",t})).catch((t=>{if("aborted"===t)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:t}))}upload(){if("idle"!=this.status)throw new l("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((t=>(this.uploadResponse=t,this.status="idle",t))).catch((t=>{if("aborted"===this.status)throw"aborted";throw this.status="error",t}))}abort(){const t=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==t?this._reader.abort():"uploading"==t&&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(t){const e={};return e.promise=new Promise(((n,o)=>{e.rejecter=o,e.isFulfilled=!1,t.then((t=>{e.isFulfilled=!0,n(t)})).catch((t=>{e.isFulfilled=!0,o(t)}))})),e}}M(Xm,P);class tp extends nh{constructor(t){super(t),this.buttonView=new Hh(t),this._fileInputView=new ep(t),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 ep extends nh{constructor(t){super(t),this.set("acceptedType"),this.set("allowMultipleFiles",!1);const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:e.to("acceptedType"),multiple:e.to("allowMultipleFiles")},on:{change:e.to((()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""}))}})}open(){this.element.click()}}const np="ckCsrfToken",op="abcdefghijklmnopqrstuvwxyz0123456789";function ip(){let t=function(t){t=t.toLowerCase();const e=document.cookie.split(";");for(const n of e){const e=n.split("=");if(decodeURIComponent(e[0].trim().toLowerCase())===t)return decodeURIComponent(e[1])}return null}(np);var e,n;return t&&40==t.length||(t=function(t){let e="";const n=new Uint8Array(t);window.crypto.getRandomValues(n);for(let t=0;t<n.length;t++){const o=op.charAt(n[t]%op.length);e+=Math.random()>.5?o.toUpperCase():o}return e}(40),e=np,n=t,document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(n)+";path=/"),t}class rp{constructor(t,e,n){this.loader=t,this.url=e,this.t=n}upload(){return this.loader.file.then((t=>new Promise(((e,n)=>{this._initRequest(),this._initListeners(e,n,t),this._sendRequest(t)}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const t=this.xhr=new XMLHttpRequest;t.open("POST",this.url,!0),t.responseType="json"}_initListeners(t,e,n){const o=this.xhr,i=this.loader,r=(0,this.t)("Cannot upload file:")+` ${n.name}.`;o.addEventListener("error",(()=>e(r))),o.addEventListener("abort",(()=>e())),o.addEventListener("load",(()=>{const n=o.response;if(!n||!n.uploaded)return e(n&&n.error&&n.error.message?n.error.message:r);t({default:n.url})})),o.upload&&o.upload.addEventListener("progress",(t=>{t.lengthComputable&&(i.uploadTotal=t.total,i.uploaded=t.loaded)}))}_sendRequest(t){const e=new FormData;e.append("upload",t),e.append("ckCsrfToken",ip()),this.xhr.send(e)}}class sp{constructor(t,e=20){this.model=t,this.size=0,this.limit=e,this.isLocked=!1,this._changeCallback=(t,e)=>{e.isLocal&&e.isUndoable&&e!==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({isTyping:!0})),this._batch}input(t){this.size+=t,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(t){this.isLocked&&!t||(this._batch=null,this.size=0)}}class ap extends q{constructor(t,e){super(t),this._buffer=new sp(t.model,e)}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(t={}){const e=this.editor.model,n=e.document,o=t.text||"",i=o.length,r=t.range?e.createSelection(t.range):n.selection,s=t.resultRange;e.enqueueChange(this._buffer.batch,(t=>{this._buffer.lock(),e.deleteContent(r),o&&e.insertContent(t.createText(o,n.selection.getAttributes()),r),s?t.setSelection(s):r.is("documentSelection")||t.setSelection(r),this._buffer.unlock(),this._buffer.input(i)}))}}function lp(t){if(t.newChildren.length-t.oldChildren.length!=1)return;const e=function(t,e){const n=[];let o=0,i=null;return t.forEach((t=>{"equal"==t?(r(),o++):"insert"==t?(i&&"insert"==i.type?i.values.push(e[o]):(r(),i={type:"insert",index:o,values:[e[o]]}),o++):i&&"delete"==i.type?i.howMany++:(r(),i={type:"delete",index:o,howMany:1})})),r(),n;function r(){i&&(n.push(i),i=null)}}(Zr(t.oldChildren,t.newChildren,cp),t.newChildren);if(e.length>1)return;const n=e[0];return n.values[0]&&n.values[0].is("$text")?n:void 0}function cp(t,e){return t&&t.is("$text")&&e&&e.is("$text")?t.data===e.data:t===e}function dp(t,e){const n=e.selection,o=t.shiftKey&&t.keyCode===mr.delete,i=!n.isCollapsed;return o&&i}const hp=[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];for(let t=112;t<=135;t++)hp.push(t);function up(t){return!(!t.ctrlKey&&!t.metaKey)||hp.includes(t.keyCode)}class gp{constructor(t){this.editor=t,this.editing=this.editor.editing}handle(t,e){if(function(t){if(0==t.length)return!1;for(const e of t)if("children"===e.type&&!lp(e))return!0;return!1}(t))this._handleContainerChildrenMutations(t,e);else for(const n of t)this._handleTextMutation(n,e),this._handleTextNodeInsertion(n)}_handleContainerChildrenMutations(t,e){const n=function(t){const e=t.map((t=>t.node)).reduce(((t,e)=>t.getCommonAncestor(e,{includeSelf:!0})));if(!e)return;return e.getAncestors({includeSelf:!0,parentFirst:!0}).find((t=>t.is("containerElement")||t.is("rootElement")))}(t);if(!n)return;const o=this.editor.editing.view.domConverter.mapViewToDom(n),i=new ps(this.editor.editing.view.document),r=this.editor.data.toModel(i.domToView(o)).getChild(0),s=this.editor.editing.mapper.toModelElement(n);if(!s)return;const a=Array.from(r.getChildren()),l=Array.from(s.getChildren()),c=a[a.length-1],d=l[l.length-1],h=c&&c.is("element","softBreak"),u=d&&!d.is("element","softBreak");h&&u&&a.pop();const g=this.editor.model.schema;if(!mp(a,g)||!mp(l,g))return;const m=a.map((t=>t.is("$text")?t.data:"@")).join("").replace(/\u00A0/g," "),p=l.map((t=>t.is("$text")?t.data:"@")).join("").replace(/\u00A0/g," ");if(p===m)return;const f=Zr(p,m),{firstChangeAt:b,insertions:k,deletions:w}=pp(f);let _=null;e&&(_=this.editing.mapper.toModelRange(e.getFirstRange()));const A=m.substr(b,k),C=this.editor.model.createRange(this.editor.model.createPositionAt(s,b),this.editor.model.createPositionAt(s,b+w));this.editor.execute("input",{text:A,range:C,resultRange:_})}_handleTextMutation(t,e){if("text"!=t.type)return;const n=t.newText.replace(/\u00A0/g," "),o=t.oldText.replace(/\u00A0/g," ");if(o===n)return;const i=Zr(o,n),{firstChangeAt:r,insertions:s,deletions:a}=pp(i);let l=null;e&&(l=this.editing.mapper.toModelRange(e.getFirstRange()));const c=this.editing.view.createPositionAt(t.node,r),d=this.editing.mapper.toModelPosition(c),h=this.editor.model.createRange(d,d.getShiftedBy(a)),u=n.substr(r,s);this.editor.execute("input",{text:u,range:h,resultRange:l})}_handleTextNodeInsertion(t){if("children"!=t.type)return;const e=lp(t),n=this.editing.view.createPositionAt(t.node,e.index),o=this.editing.mapper.toModelPosition(n),i=e.values[0].data;this.editor.execute("input",{text:i.replace(/\u00A0/g," "),range:this.editor.model.createRange(o)})}}function mp(t,e){return t.every((t=>e.isInline(t)))}function pp(t){let e=null,n=null;for(let o=0;o<t.length;o++){"equal"!=t[o]&&(e=null===e?o:e,n=o)}let o=0,i=0;for(let r=e;r<=n;r++)"insert"!=t[r]&&o++,"delete"!=t[r]&&i++;return{insertions:i,deletions:o,firstChangeAt:e}}class fp extends L{static get pluginName(){return"Input"}init(){const t=this.editor,e=new ap(t,t.config.get("typing.undoStep")||20);t.commands.add("input",e),function(t){let e=null;const n=t.model,o=t.editing.view,i=t.commands.get("input");function r(t){if(dr.isWindows&&dp(t,o.document))return;const r=n.document,a=o.document.isComposing,l=e&&e.isEqual(r.selection);e=null,i.isEnabled&&(up(t)||r.selection.isCollapsed||a&&229===t.keyCode||!a&&229===t.keyCode&&l||s())}function s(){const t=i.buffer;t.lock();const e=t.batch;n.enqueueChange(e,(()=>{n.deleteContent(n.document.selection)})),t.unlock()}dr.isAndroid?o.document.on("beforeinput",((t,e)=>r(e)),{priority:"lowest"}):o.document.on("keydown",((t,e)=>r(e)),{priority:"lowest"}),o.document.on("compositionstart",(function(){const t=n.document,e=1!==t.selection.rangeCount||t.selection.getFirstRange().isFlat;t.selection.isCollapsed||e||s()}),{priority:"lowest"}),o.document.on("compositionend",(()=>{e=n.createSelection(n.document.selection)}),{priority:"lowest"})}(t),function(t){t.editing.view.document.on("mutations",((e,n,o)=>{new gp(t).handle(n,o)}))}(t)}}class bp extends q{constructor(t,e){super(t),this.direction=e,this._buffer=new sp(t.model,t.config.get("typing.undoStep"))}get buffer(){return this._buffer}execute(t={}){const e=this.editor.model,n=e.document;e.enqueueChange(this._buffer.batch,(o=>{this._buffer.lock();const i=o.createSelection(t.selection||n.selection),r=t.sequence||1,s=i.isCollapsed;if(i.isCollapsed&&e.modifySelection(i,{direction:this.direction,unit:t.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(r))return void this._replaceEntireContentWithParagraph(o);if(this._shouldReplaceFirstBlockWithParagraph(i,r))return void this.editor.execute("paragraph",{selection:i});if(i.isCollapsed)return;let a=0;i.getFirstRange().getMinimalFlatRanges().forEach((t=>{a+=$i(t.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),e.deleteContent(i,{doNotResetEntireContent:s,direction:this.direction}),this._buffer.input(a),o.setSelection(i),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(t){if(t>1)return!1;const e=this.editor.model,n=e.document.selection,o=e.schema.getLimitElement(n);if(!(n.isCollapsed&&n.containsEntireContent(o)))return!1;if(!e.schema.checkChild(o,"paragraph"))return!1;const i=o.getChild(0);return!i||"paragraph"!==i.name}_replaceEntireContentWithParagraph(t){const e=this.editor.model,n=e.document.selection,o=e.schema.getLimitElement(n),i=t.createElement("paragraph");t.remove(t.createRangeIn(o)),t.insert(i,o),t.setSelection(i,0)}_shouldReplaceFirstBlockWithParagraph(t,e){const n=this.editor.model;if(e>1||"backward"!=this.direction)return!1;if(!t.isCollapsed)return!1;const o=t.getFirstPosition(),i=n.schema.getLimitElement(o),r=i.getChild(0);return o.parent==r&&(!!t.containsEntireContent(r)&&(!!n.schema.checkChild(i,"paragraph")&&"paragraph"!=r.name))}}class kp extends ys{constructor(t){super(t);const e=t.document;let n=0;function o(t,n,o){const i=new Zi(e,"delete",e.selection.getFirstRange());e.fire(i,new Ks(e,n,o)),i.stop.called&&t.stop()}e.on("keyup",((t,e)=>{e.keyCode!=mr.delete&&e.keyCode!=mr.backspace||(n=0)})),e.on("keydown",((t,i)=>{if(dr.isWindows&&dp(i,e))return;const r={};if(i.keyCode==mr.delete)r.direction="forward",r.unit="character";else{if(i.keyCode!=mr.backspace)return;r.direction="backward",r.unit="codePoint"}const s=dr.isMac?i.altKey:i.ctrlKey;r.unit=s?"word":r.unit,r.sequence=++n,o(t,i.domEvent,r)})),dr.isAndroid&&e.on("beforeinput",((e,n)=>{if("deleteContentBackward"!=n.domEvent.inputType)return;const i={unit:"codepoint",direction:"backward",sequence:1},r=n.domTarget.ownerDocument.defaultView.getSelection();r.anchorNode==r.focusNode&&r.anchorOffset+1!=r.focusOffset&&(i.selectionToRemove=t.domConverter.domSelectionToView(r)),o(e,n.domEvent,i)}))}observe(){}}class wp extends L{static get pluginName(){return"Delete"}init(){const t=this.editor,e=t.editing.view,n=e.document,o=t.model.document;e.addObserver(kp),this._undoOnBackspace=!1;const i=new bp(t,"forward");if(t.commands.add("deleteForward",i),t.commands.add("forwardDelete",i),t.commands.add("delete",new bp(t,"backward")),this.listenTo(n,"delete",((n,o)=>{const i={unit:o.unit,sequence:o.sequence};if(o.selectionToRemove){const e=t.model.createSelection(),n=[];for(const e of o.selectionToRemove.getRanges())n.push(t.editing.mapper.toModelRange(e));e.setTo(n),i.selection=e}t.execute("forward"==o.direction?"deleteForward":"delete",i),o.preventDefault(),e.scrollToTheSelection()}),{priority:"low"}),dr.isAndroid){let t=null;this.listenTo(n,"delete",((e,n)=>{const o=n.domTarget.ownerDocument.defaultView.getSelection();t={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}}),{priority:"lowest"}),this.listenTo(n,"keyup",((e,n)=>{if(t){const e=n.domTarget.ownerDocument.defaultView.getSelection();e.collapse(t.anchorNode,t.anchorOffset),e.extend(t.focusNode,t.focusOffset),t=null}}))}this.editor.plugins.has("UndoEditing")&&(this.listenTo(n,"delete",((e,n)=>{this._undoOnBackspace&&"backward"==n.direction&&1==n.sequence&&"codePoint"==n.unit&&(this._undoOnBackspace=!1,t.execute("undo"),n.preventDefault(),e.stop())}),{context:"$capture"}),this.listenTo(o,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}function _p(t,e){let n=t.start;return{text:Array.from(t.getItems()).reduce(((t,o)=>o.is("$text")||o.is("$textProxy")?t+o.data:(n=e.createPositionAfter(o),"")),""),range:e.createRange(n,t.end)}}class Ap{constructor(t,e){this.model=t,this.testCallback=e,this.hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(t.document.selection),this.stopListening(t.document))})),this._startListening()}_startListening(){const t=this.model.document;this.listenTo(t.selection,"change:range",((e,{directChange:n})=>{n&&(t.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this.hasMatch=!1))})),this.listenTo(t,"change:data",((t,e)=>{!e.isUndo&&e.isLocal&&this._evaluateTextBeforeSelection("data",{batch:e})}))}_evaluateTextBeforeSelection(t,e={}){const n=this.model,o=n.document.selection,i=n.createRange(n.createPositionAt(o.focus.parent,0),o.focus),{text:r,range:s}=_p(i,n),a=this.testCallback(r);if(!a&&this.hasMatch&&this.fire("unmatched"),this.hasMatch=!!a,a){const n=Object.assign(e,{text:r,range:s});"object"==typeof a&&Object.assign(n,a),this.fire(`matched:${t}`,n)}}}M(Ap,P);class Cp extends L{static get pluginName(){return"TwoStepCaretMovement"}constructor(t){super(t),this.attributes=new Set,this._overrideUid=null}init(){const t=this.editor,e=t.model,n=t.editing.view,o=t.locale,i=e.document.selection;this.listenTo(n.document,"arrowKey",((t,e)=>{if(!i.isCollapsed)return;if(e.shiftKey||e.altKey||e.ctrlKey)return;const n=e.keyCode==mr.arrowright,r=e.keyCode==mr.arrowleft;if(!n&&!r)return;const s=o.contentLanguageDirection;let a=!1;a="ltr"===s&&n||"rtl"===s&&r?this._handleForwardMovement(e):this._handleBackwardMovement(e),!0===a&&t.stop()}),{context:"$text",priority:"highest"}),this._isNextGravityRestorationSkipped=!1,this.listenTo(i,"change:range",((t,e)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!e.directChange&&Ep(i.getFirstPosition(),this.attributes)||this._restoreGravity())}))}registerAttribute(t){this.attributes.add(t)}_handleForwardMovement(t){const e=this.attributes,n=this.editor.model.document.selection,o=n.getFirstPosition();return!this._isGravityOverridden&&((!o.isAtStart||!vp(n,e))&&(Ep(o,e)?(xp(t),this._overrideGravity(),!0):void 0))}_handleBackwardMovement(t){const e=this.attributes,n=this.editor.model,o=n.document.selection,i=o.getFirstPosition();return this._isGravityOverridden?(xp(t),this._restoreGravity(),yp(n,e,i),!0):i.isAtStart?!!vp(o,e)&&(xp(t),yp(n,e,i),!0):function(t,e){return Ep(t.getShiftedBy(-1),e)}(i,e)?i.isAtEnd&&!vp(o,e)&&Ep(i,e)?(xp(t),yp(n,e,i),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):void 0}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((t=>t.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((t=>{t.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function vp(t,e){for(const n of e)if(t.hasAttribute(n))return!0;return!1}function yp(t,e,n){const o=n.nodeBefore;t.change((t=>{o?t.setSelectionAttribute(o.getAttributes()):t.removeSelectionAttribute(e)}))}function xp(t){t.preventDefault()}function Ep(t,e){const{nodeBefore:n,nodeAfter:o}=t;for(const t of e){const e=n?n.getAttribute(t):void 0;if((o?o.getAttribute(t):void 0)!==e)return!0}return!1}const Tp={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"⅓",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"⅔",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},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:Rp('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:Rp("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:Rp("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:Rp('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:Rp('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:Rp("'"),to:[null,"‚",null,"’"]}},Dp={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},Sp=["symbols","mathematical","typography","quotes"];function Bp(t){return"string"==typeof t?new RegExp(`(${Om(t)})$`):t}function Ip(t){return"string"==typeof t?()=>[t]:t instanceof Array?()=>t:t}function Pp(t){return(t.textNode?t.textNode:t.nodeAfter).getAttributes()}function Rp(t){return new RegExp(`(^|\\s)(${t})([^${t}]*)(${t})$`)}function zp(t,e,n,o){return o.createRange(Vp(t,e,n,!0,o),Vp(t,e,n,!1,o))}function Vp(t,e,n,o,i){let r=t.textNode||(o?t.nodeBefore:t.nodeAfter),s=null;for(;r&&r.getAttribute(e)==n;)s=r,r=o?r.previousSibling:r.nextSibling;return s?i.createPositionAt(s,o?"before":"after"):t}function Fp(t,e,n,o){const i=t.editing.view,r=new Set;i.document.registerPostFixer((i=>{const s=t.model.document.selection;let a=!1;if(s.hasAttribute(e)){const l=zp(s.getFirstPosition(),e,s.getAttribute(e),t.model),c=t.editing.mapper.toViewRange(l);for(const t of c.getItems())t.is("element",n)&&!t.hasClass(o)&&(i.addClass(o,t),r.add(t),a=!0)}return a})),t.conversion.for("editingDowncast").add((t=>{function e(){i.change((t=>{for(const e of r.values())t.removeClass(o,e),r.delete(e)}))}t.on("insert",e,{priority:"highest"}),t.on("remove",e,{priority:"highest"}),t.on("attribute",e,{priority:"highest"}),t.on("selection",e,{priority:"highest"})}))}function Op(t,e,n,o){let i,r=null;"function"==typeof o?i=o:(r=t.commands.get(o),i=()=>{t.execute(o)}),t.model.document.on("change:data",((s,a)=>{if(r&&!r.isEnabled||!e.isEnabled)return;const l=Ea(t.model.document.selection.getRanges());if(!l.isCollapsed)return;if(a.isUndo||!a.isLocal)return;const c=Array.from(t.model.document.differ.getChanges()),d=c[0];if(1!=c.length||"insert"!==d.type||"$text"!=d.name||1!=d.length)return;const h=d.position.parent;if(h.is("element","codeBlock"))return;if(h.is("element","listItem")&&"function"!=typeof o&&!["numberedList","bulletedList","todoList"].includes(o))return;if(r&&!0===r.value)return;const u=h.getChild(0),g=t.model.createRangeOn(u);if(!g.containsRange(l)&&!l.end.isEqual(g.end))return;const m=n.exec(u.data.substr(0,l.end.offset));m&&t.model.enqueueChange((e=>{const n=e.createPositionAt(h,0),o=e.createPositionAt(h,m[0].length),r=new ul(n,o);if(!1!==i({match:m})){e.remove(r);const n=t.model.document.selection.getFirstRange(),o=e.createRangeIn(h);!h.isEmpty||o.isEqual(n)||o.containsRange(n,!0)||e.remove(h)}r.detach(),t.model.enqueueChange((()=>{t.plugins.get("Delete").requestUndoOnBackspace()}))}))}))}function Np(t,e,n,o){let i,r;n instanceof RegExp?i=n:r=n,r=r||(t=>{let e;const n=[],o=[];for(;null!==(e=i.exec(t))&&!(e&&e.length<4);){let{index:t,1:i,2:r,3:s}=e;const a=i+r+s;t+=e[0].length-a.length;const l=[t,t+i.length],c=[t+i.length+r.length,t+i.length+r.length+s.length];n.push(l),n.push(c),o.push([t+i.length,t+i.length+r.length])}return{remove:n,format:o}}),t.model.document.on("change:data",((n,i)=>{if(i.isUndo||!i.isLocal||!e.isEnabled)return;const s=t.model,a=s.document.selection;if(!a.isCollapsed)return;const l=Array.from(s.document.differ.getChanges()),c=l[0];if(1!=l.length||"insert"!==c.type||"$text"!=c.name||1!=c.length)return;const d=a.focus,h=d.parent,{text:u,range:g}=function(t,e){let n=t.start;return{text:Array.from(t.getItems()).reduce(((t,o)=>!o.is("$text")&&!o.is("$textProxy")||o.getAttribute("code")?(n=e.createPositionAfter(o),""):t+o.data),""),range:e.createRange(n,t.end)}}(s.createRange(s.createPositionAt(h,0),d),s),m=r(u),p=Mp(g.start,m.format,s),f=Mp(g.start,m.remove,s);p.length&&f.length&&s.enqueueChange((e=>{if(!1!==o(e,p)){for(const t of f.reverse())e.remove(t);s.enqueueChange((()=>{t.plugins.get("Delete").requestUndoOnBackspace()}))}}))}))}function Mp(t,e,n){return e.filter((t=>void 0!==t[0]&&void 0!==t[1])).map((e=>n.createRange(t.getShiftedBy(e[0]),t.getShiftedBy(e[1]))))}class Lp extends L{static get requires(){return[wp]}static get pluginName(){return"Autoformat"}afterInit(){this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats(),this._addCodeBlockAutoformats(),this._addHorizontalLineAutoformats()}_addListAutoformats(){const t=this.editor.commands;t.get("bulletedList")&&Op(this.editor,this,/^[*-]\s$/,"bulletedList"),t.get("numberedList")&&Op(this.editor,this,/^1[.|)]\s$/,"numberedList"),t.get("todoList")&&Op(this.editor,this,/^\[\s?\]\s$/,"todoList"),t.get("checkTodoList")&&Op(this.editor,this,/^\[\s?x\s?\]\s$/,(()=>{this.editor.execute("todoList"),this.editor.execute("checkTodoList")}))}_addBasicStylesAutoformats(){const t=this.editor.commands;if(t.get("bold")){const t=Hp(this.editor,"bold");Np(this.editor,this,/(?:^|\s)(\*\*)([^*]+)(\*\*)$/g,t),Np(this.editor,this,/(?:^|\s)(__)([^_]+)(__)$/g,t)}if(t.get("italic")){const t=Hp(this.editor,"italic");Np(this.editor,this,/(?:^|\s)(\*)([^*_]+)(\*)$/g,t),Np(this.editor,this,/(?:^|\s)(_)([^_]+)(_)$/g,t)}if(t.get("code")){const t=Hp(this.editor,"code");Np(this.editor,this,/(`)([^`]+)(`)$/g,t)}if(t.get("strikethrough")){const t=Hp(this.editor,"strikethrough");Np(this.editor,this,/(~~)([^~]+)(~~)$/g,t)}}_addHeadingAutoformats(){const t=this.editor.commands.get("heading");t&&t.modelElements.filter((t=>t.match(/^heading[1-6]$/))).forEach((e=>{const n=e[7],o=new RegExp(`^(#{${n}})\\s$`);Op(this.editor,this,o,(()=>{if(!t.isEnabled||t.value===e)return!1;this.editor.execute("heading",{value:e})}))}))}_addBlockQuoteAutoformats(){this.editor.commands.get("blockQuote")&&Op(this.editor,this,/^>\s$/,"blockQuote")}_addCodeBlockAutoformats(){const t=this.editor,e=t.model.document.selection;t.commands.get("codeBlock")&&Op(t,this,/^```$/,(()=>{if(e.getFirstPosition().parent.is("element","listItem"))return!1;this.editor.execute("codeBlock",{usePreviousLanguageChoice:!0})}))}_addHorizontalLineAutoformats(){this.editor.commands.get("horizontalLine")&&Op(this.editor,this,/^---$/,"horizontalLine")}}function Hp(t,e){return(n,o)=>{if(!t.commands.get(e).isEnabled)return!1;const i=t.model.schema.getValidRanges(o,e);for(const t of i)n.setAttribute(e,!0,t);n.removeSelectionAttribute(e)}}class qp extends q{constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model,n=e.document.selection,o=void 0===t.forceValue?!this.value:t.forceValue;e.change((t=>{if(n.isCollapsed)o?t.setSelectionAttribute(this.attributeKey,!0):t.removeSelectionAttribute(this.attributeKey);else{const i=e.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const e of i)o?t.setAttribute(this.attributeKey,o,e):t.removeAttribute(this.attributeKey,e)}}))}_getValueFromFirstAllowedNode(){const t=this.editor.model,e=t.schema,n=t.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);for(const t of n.getRanges())for(const n of t.getItems())if(e.checkAttribute(n,this.attributeKey))return n.hasAttribute(this.attributeKey);return!1}}const Wp="bold";class jp extends L{static get pluginName(){return"BoldEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Wp}),t.model.schema.setAttributeProperties(Wp,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Wp,view:"strong",upcastAlso:["b",t=>{const e=t.getStyle("font-weight");return e?"bold"==e||Number(e)>=600?{name:!0,styles:["font-weight"]}:void 0:null}]}),t.commands.add(Wp,new qp(t,Wp)),t.keystrokes.set("CTRL+B",Wp)}}const Up="bold";class $p extends L{static get pluginName(){return"BoldUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(Up,(n=>{const o=t.commands.get(Up),i=new Hh(n);return i.set({label:e("Bold"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.6 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z"/></svg>',keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(Up),t.editing.view.focus()})),i}))}}const Gp="italic";class Kp extends L{static get pluginName(){return"ItalicEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Gp}),t.model.schema.setAttributeProperties(Gp,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Gp,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),t.commands.add(Gp,new qp(t,Gp)),t.keystrokes.set("CTRL+I",Gp)}}const Zp="italic";class Jp extends L{static get pluginName(){return"ItalicUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(Zp,(n=>{const o=t.commands.get(Zp),i=new Hh(n);return i.set({label:e("Italic"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.586 14.633.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z"/></svg>',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(Zp),t.editing.view.focus()})),i}))}}const Yp="superscript";class Qp extends L{static get pluginName(){return"SuperscriptEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Yp}),t.model.schema.setAttributeProperties(Yp,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Yp,view:"sup",upcastAlso:[{styles:{"vertical-align":"super"}}]}),t.commands.add(Yp,new qp(t,Yp))}}const Xp="superscript";class tf extends L{static get pluginName(){return"SuperscriptUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(Xp,(n=>{const o=t.commands.get(Xp),i=new Hh(n);return i.set({label:e("Superscript"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.677 8.678h2.549c.254 0 .447.05.58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393c-.105.108-.266.162-.48.162h-3.594c-.245 0-.435-.066-.572-.197a.621.621 0 0 1-.205-.463c0-.114.044-.265.132-.453a1.62 1.62 0 0 1 .288-.444c.433-.436.824-.81 1.172-1.122.348-.312.597-.517.747-.615.267-.183.49-.368.667-.553.177-.185.312-.375.405-.57.093-.194.139-.384.139-.57a1.008 1.008 0 0 0-.554-.917 1.197 1.197 0 0 0-.56-.133c-.426 0-.761.182-1.005.546a2.332 2.332 0 0 0-.164.39 1.609 1.609 0 0 1-.258.488c-.096.114-.237.17-.423.17a.558.558 0 0 1-.405-.156.568.568 0 0 1-.161-.427c0-.218.05-.446.151-.683.101-.238.252-.453.452-.646s.454-.349.762-.467a2.998 2.998 0 0 1 1.081-.178c.498 0 .923.076 1.274.228a1.916 1.916 0 0 1 1.004 1.032 1.984 1.984 0 0 1-.156 1.794c-.2.32-.405.572-.613.754-.208.182-.558.468-1.048.857-.49.39-.826.691-1.008.906a2.703 2.703 0 0 0-.24.309zM7.03 10.349l3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53l3.818 3.82z"/></svg>',tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(Xp),t.editing.view.focus()})),i}))}}const ef="subscript";class nf extends L{static get pluginName(){return"SubscriptEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:ef}),t.model.schema.setAttributeProperties(ef,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:ef,view:"sub",upcastAlso:[{styles:{"vertical-align":"sub"}}]}),t.commands.add(ef,new qp(t,ef))}}const of="subscript";class rf extends L{static get pluginName(){return"SubscriptUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(of,(n=>{const o=t.commands.get(of),i=new Hh(n);return i.set({label:e("Subscript"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m7.03 10.349 3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53l3.818 3.82zm8.147 7.829h2.549c.254 0 .447.05.58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393c-.105.108-.266.162-.48.162h-3.594c-.245 0-.435-.066-.572-.197a.621.621 0 0 1-.205-.463c0-.114.044-.265.132-.453a1.62 1.62 0 0 1 .288-.444c.433-.436.824-.81 1.172-1.122.348-.312.597-.517.747-.615.267-.183.49-.368.667-.553.177-.185.312-.375.405-.57.093-.194.139-.384.139-.57a1.008 1.008 0 0 0-.554-.917 1.197 1.197 0 0 0-.56-.133c-.426 0-.761.182-1.005.546a2.332 2.332 0 0 0-.164.39 1.609 1.609 0 0 1-.258.488c-.096.114-.237.17-.423.17a.558.558 0 0 1-.405-.156.568.568 0 0 1-.161-.427c0-.218.05-.446.151-.683.101-.238.252-.453.452-.646s.454-.349.762-.467a2.998 2.998 0 0 1 1.081-.178c.498 0 .923.076 1.274.228a1.916 1.916 0 0 1 1.004 1.032 1.984 1.984 0 0 1-.156 1.794c-.2.32-.405.572-.613.754-.208.182-.558.468-1.048.857-.49.39-.826.691-1.008.906a2.703 2.703 0 0 0-.24.309z"/></svg>',tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(of),t.editing.view.focus()})),i}))}}const sf="underline";class af extends L{static get pluginName(){return"UnderlineEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:sf}),t.model.schema.setAttributeProperties(sf,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:sf,view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),t.commands.add(sf,new qp(t,sf)),t.keystrokes.set("CTRL+U","underline")}}const lf="underline";class cf extends L{static get pluginName(){return"UnderlineUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(lf,(n=>{const o=t.commands.get(lf),i=new Hh(n);return i.set({label:e("Underline"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 18v-1.5h14V18zm2.2-8V3.6c0-.4.4-.6.8-.6.3 0 .7.2.7.6v6.2c0 2 1.3 2.8 3.2 2.8 1.9 0 3.4-.9 3.4-2.9V3.6c0-.3.4-.5.8-.5.3 0 .7.2.7.5V10c0 2.7-2.2 4-4.9 4-2.6 0-4.7-1.2-4.7-4z"/></svg>',keystroke:"CTRL+U",tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(lf),t.editing.view.focus()})),i}))}}const df="strikethrough";class hf extends L{static get pluginName(){return"StrikethroughEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:df}),t.model.schema.setAttributeProperties(df,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:df,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),t.commands.add(df,new qp(t,df)),t.keystrokes.set("CTRL+SHIFT+X","strikethrough")}}const uf="strikethrough";class gf extends L{static get pluginName(){return"StrikethroughUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(uf,(n=>{const o=t.commands.get(uf),i=new Hh(n);return i.set({label:e("Strikethrough"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.1 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6zM6.8 9 6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z"/><path d="M3 10.5V9h14v1.5z"/></svg>',keystroke:"CTRL+SHIFT+X",tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(uf),t.editing.view.focus()})),i}))}}const mf="code";class pf extends L{static get pluginName(){return"CodeEditing"}static get requires(){return[Cp]}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:mf}),t.model.schema.setAttributeProperties(mf,{isFormatting:!0,copyOnEnter:!1}),t.conversion.attributeToElement({model:mf,view:"code",upcastAlso:{styles:{"word-wrap":"break-word"}}}),t.commands.add(mf,new qp(t,mf)),t.plugins.get(Cp).registerAttribute(mf),Fp(t,mf,"code","ck-code_selected")}}var ff=n(8603),bf={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(ff.Z,bf);ff.Z.locals;const kf="code";class wf extends L{static get pluginName(){return"CodeUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(kf,(n=>{const o=t.commands.get(kf),i=new Hh(n);return i.set({label:e("Code"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12.5 5.7 5.2 3.9v1.3l-5.6 4c-.1.2-.3.2-.5.2-.3-.1-.6-.7-.6-1l.3-.4 4.7-3.5L11.5 7l-.2-.2c-.1-.3-.1-.6 0-.8.2-.2.5-.4.8-.4a.8.8 0 0 1 .4.1zm-5.2 0L2 9.6v1.3l5.6 4c.1.2.3.2.5.2.3-.1.7-.7.6-1 0-.1 0-.3-.2-.4l-5-3.5L8.2 7l.2-.2c.1-.3.1-.6 0-.8-.2-.2-.5-.4-.8-.4a.8.8 0 0 0-.3.1z"/></svg>',tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(kf),t.editing.view.focus()})),i}))}}function*_f(t,e){for(const n of e)n&&t.getAttributeProperties(n[0]).copyOnEnter&&(yield n)}class Af extends q{execute(){const t=this.editor.model,e=t.document;t.change((n=>{!function(t,e,n,o){const i=n.isCollapsed,r=n.getFirstRange(),s=r.start.parent,a=r.end.parent;if(o.isLimit(s)||o.isLimit(a))return void(i||s!=a||t.deleteContent(n));if(i){const t=_f(e.model.schema,n.getAttributes());Cf(e,r.start),e.setSelectionAttribute(t)}else{const o=!(r.start.isAtStart&&r.end.isAtEnd),i=s==a;t.deleteContent(n,{leaveUnmerged:o}),o&&(i?Cf(e,n.focus):e.setSelection(a,0))}}(this.editor.model,n,e.selection,t.schema),this.fire("afterExecute",{writer:n})}))}}function Cf(t,e){t.split(e),t.setSelection(e.parent.nextSibling,0)}class vf extends ys{constructor(t){super(t);const e=this.document;e.on("keydown",((t,n)=>{if(this.isEnabled&&n.keyCode==mr.enter){const o=new Zi(e,"enter",e.selection.getFirstRange());e.fire(o,new Ks(e,n.domEvent,{isSoft:n.shiftKey})),o.stop.called&&t.stop()}}))}observe(){}}class yf extends L{static get pluginName(){return"Enter"}init(){const t=this.editor,e=t.editing.view,n=e.document;e.addObserver(vf),t.commands.add("enter",new Af(t)),this.listenTo(n,"enter",((n,o)=>{o.preventDefault(),o.isSoft||(t.execute("enter"),e.scrollToTheSelection())}),{priority:"low"})}}class xf extends q{execute(){const t=this.editor.model,e=t.document;t.change((n=>{!function(t,e,n){const o=n.isCollapsed,i=n.getFirstRange(),r=i.start.parent,s=i.end.parent,a=r==s;if(o){const o=_f(t.schema,n.getAttributes());Ef(t,e,i.end),e.removeSelectionAttribute(n.getAttributeKeys()),e.setSelectionAttribute(o)}else{const o=!(i.start.isAtStart&&i.end.isAtEnd);t.deleteContent(n,{leaveUnmerged:o}),a?Ef(t,e,n.focus):o&&e.setSelection(s,0)}}(t,n,e.selection),this.fire("afterExecute",{writer:n})}))}refresh(){const t=this.editor.model,e=t.document;this.isEnabled=function(t,e){if(e.rangeCount>1)return!1;const n=e.anchor;if(!n||!t.checkChild(n,"softBreak"))return!1;const o=e.getFirstRange(),i=o.start.parent,r=o.end.parent;if((Tf(i,t)||Tf(r,t))&&i!==r)return!1;return!0}(t.schema,e.selection)}}function Ef(t,e,n){const o=e.createElement("softBreak");t.insertContent(o,n),e.setSelection(o,"after")}function Tf(t,e){return!t.is("rootElement")&&(e.isLimit(t)||Tf(t.parent,e))}class Df extends L{static get pluginName(){return"ShiftEnter"}init(){const t=this.editor,e=t.model.schema,n=t.conversion,o=t.editing.view,i=o.document;e.register("softBreak",{allowWhere:"$text",isInline:!0}),n.for("upcast").elementToElement({model:"softBreak",view:"br"}),n.for("downcast").elementToElement({model:"softBreak",view:(t,{writer:e})=>e.createEmptyElement("br")}),o.addObserver(vf),t.commands.add("shiftEnter",new xf(t)),this.listenTo(i,"enter",((e,n)=>{n.preventDefault(),n.isSoft&&(t.execute("shiftEnter"),o.scrollToTheSelection())}),{priority:"low"})}}class Sf extends q{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,n=e.schema,o=e.document.selection,i=Array.from(o.getSelectedBlocks()),r=void 0===t.forceValue?!this.value:t.forceValue;e.change((t=>{if(r){const e=i.filter((t=>Bf(t)||Pf(n,t)));this._applyQuote(t,e)}else this._removeQuote(t,i.filter(Bf))}))}_getValue(){const t=Ea(this.editor.model.document.selection.getSelectedBlocks());return!(!t||!Bf(t))}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,n=Ea(t.getSelectedBlocks());return!!n&&Pf(e,n)}_removeQuote(t,e){If(t,e).reverse().forEach((e=>{if(e.start.isAtStart&&e.end.isAtEnd)return void t.unwrap(e.start.parent);if(e.start.isAtStart){const n=t.createPositionBefore(e.start.parent);return void t.move(e,n)}e.end.isAtEnd||t.split(e.end);const n=t.createPositionAfter(e.end.parent);t.move(e,n)}))}_applyQuote(t,e){const n=[];If(t,e).reverse().forEach((e=>{let o=Bf(e.start);o||(o=t.createElement("blockQuote"),t.wrap(e,o)),n.push(o)})),n.reverse().reduce(((e,n)=>e.nextSibling==n?(t.merge(t.createPositionAfter(e)),e):n))}}function Bf(t){return"blockQuote"==t.parent.name?t.parent:null}function If(t,e){let n,o=0;const i=[];for(;o<e.length;){const r=e[o],s=e[o+1];n||(n=t.createPositionBefore(r)),s&&r.nextSibling==s||(i.push(t.createRange(n,t.createPositionAfter(r))),n=null),o++}return i}function Pf(t,e){const n=t.checkChild(e.parent,"blockQuote"),o=t.checkChild(["$root","blockQuote"],e);return n&&o}class Rf extends L{static get pluginName(){return"BlockQuoteEditing"}static get requires(){return[yf,wp]}init(){const t=this.editor,e=t.model.schema;t.commands.add("blockQuote",new Sf(t)),e.register("blockQuote",{inheritAllFrom:"$container"}),t.conversion.elementToElement({model:"blockQuote",view:"blockquote"}),t.model.document.registerPostFixer((n=>{const o=t.model.document.differ.getChanges();for(const t of o)if("insert"==t.type){const o=t.position.nodeAfter;if(!o)continue;if(o.is("element","blockQuote")&&o.isEmpty)return n.remove(o),!0;if(o.is("element","blockQuote")&&!e.checkChild(t.position,o))return n.unwrap(o),!0;if(o.is("element")){const t=n.createRangeIn(o);for(const o of t.getItems())if(o.is("element","blockQuote")&&!e.checkChild(n.createPositionBefore(o),o))return n.unwrap(o),!0}}else if("remove"==t.type){const e=t.position.parent;if(e.is("element","blockQuote")&&e.isEmpty)return n.remove(e),!0}return!1}));const n=this.editor.editing.view.document,o=t.model.document.selection,i=t.commands.get("blockQuote");this.listenTo(n,"enter",((e,n)=>{if(!o.isCollapsed||!i.value)return;o.getLastPosition().parent.isEmpty&&(t.execute("blockQuote"),t.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())}),{context:"blockquote"}),this.listenTo(n,"delete",((e,n)=>{if("backward"!=n.direction||!o.isCollapsed||!i.value)return;const r=o.getLastPosition().parent;r.isEmpty&&!r.previousSibling&&(t.execute("blockQuote"),t.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())}),{context:"blockquote"})}}var zf=n(3062),Vf={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(zf.Z,Vf);zf.Z.locals;class Ff extends L{static get pluginName(){return"BlockQuoteUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("blockQuote",(n=>{const o=t.commands.get("blockQuote"),i=new Hh(n);return i.set({label:e("Block quote"),icon:Bh.quote,tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute("blockQuote"),t.editing.view.focus()})),i}))}}class Of extends q{refresh(){const t=this.editor.model,e=Ea(t.document.selection.getSelectedBlocks());this.value=!!e&&e.is("element","paragraph"),this.isEnabled=!!e&&Nf(e,t.schema)}execute(t={}){const e=this.editor.model,n=e.document;e.change((o=>{const i=(t.selection||n.selection).getSelectedBlocks();for(const t of i)!t.is("element","paragraph")&&Nf(t,e.schema)&&o.rename(t,"paragraph")}))}}function Nf(t,e){return e.checkChild(t.parent,"paragraph")&&!e.isObject(t)}class Mf extends q{execute(t){const e=this.editor.model,n=t.attributes;let o=t.position;e.change((t=>{const i=t.createElement("paragraph");if(n&&e.schema.setAllowedAttributes(i,n,t),!e.schema.checkChild(o.parent,i)){const n=e.schema.findAllowedParent(o,i);if(!n)return;o=t.split(o,n).position}e.insertContent(i,o),t.setSelection(i,"in")}))}}class Lf extends L{static get pluginName(){return"Paragraph"}init(){const t=this.editor,e=t.model;t.commands.add("paragraph",new Of(t)),t.commands.add("insertParagraph",new Mf(t)),e.schema.register("paragraph",{inheritAllFrom:"$block"}),t.conversion.elementToElement({model:"paragraph",view:"p"}),t.conversion.for("upcast").elementToElement({model:(t,{writer:e})=>Lf.paragraphLikeElements.has(t.name)?t.isEmpty?null:e.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}Lf.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);class Hf extends q{constructor(t,e){super(t),this.modelElements=e}refresh(){const t=Ea(this.editor.model.document.selection.getSelectedBlocks());this.value=!!t&&this.modelElements.includes(t.name)&&t.name,this.isEnabled=!!t&&this.modelElements.some((e=>qf(t,e,this.editor.model.schema)))}execute(t){const e=this.editor.model,n=e.document,o=t.value;e.change((t=>{const i=Array.from(n.selection.getSelectedBlocks()).filter((t=>qf(t,o,e.schema)));for(const e of i)e.is("element",o)||t.rename(e,o)}))}}function qf(t,e,n){return n.checkChild(t.parent,e)&&!n.isObject(t)}const Wf="paragraph";class jf extends L{static get pluginName(){return"HeadingEditing"}constructor(t){super(t),t.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[Lf]}init(){const t=this.editor,e=t.config.get("heading.options"),n=[];for(const o of e)o.model!==Wf&&(t.model.schema.register(o.model,{inheritAllFrom:"$block"}),t.conversion.elementToElement(o),n.push(o.model));this._addDefaultH1Conversion(t),t.commands.add("heading",new Hf(t,n))}afterInit(){const t=this.editor,e=t.commands.get("enter"),n=t.config.get("heading.options");e&&this.listenTo(e,"afterExecute",((e,o)=>{const i=t.model.document.selection.getFirstPosition().parent;n.some((t=>i.is("element",t.model)))&&!i.is("element",Wf)&&0===i.childCount&&o.writer.rename(i,Wf)}))}_addDefaultH1Conversion(t){t.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:s.get("low")+1})}}function Uf(t){const e=t.t,n={Paragraph:e("Paragraph"),"Heading 1":e("Heading 1"),"Heading 2":e("Heading 2"),"Heading 3":e("Heading 3"),"Heading 4":e("Heading 4"),"Heading 5":e("Heading 5"),"Heading 6":e("Heading 6")};return t.config.get("heading.options").map((t=>{const e=n[t.title];return e&&e!=t.title&&(t.title=e),t}))}var $f=n(8733),Gf={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()($f.Z,Gf);$f.Z.locals;class Kf extends L{static get pluginName(){return"HeadingUI"}init(){const t=this.editor,e=t.t,n=Uf(t),o=e("Choose heading"),i=e("Heading");t.ui.componentFactory.add("heading",(e=>{const r={},s=new ko,a=t.commands.get("heading"),l=t.commands.get("paragraph"),c=[a];for(const t of n){const e={type:"button",model:new tg({label:t.title,class:t.class,withText:!0})};"paragraph"===t.model?(e.model.bind("isOn").to(l,"value"),e.model.set("commandName","paragraph"),c.push(l)):(e.model.bind("isOn").to(a,"value",(e=>e===t.model)),e.model.set({commandName:"heading",commandValue:t.model})),s.add(e),r[t.model]=t.title}const d=Tu(e);return Su(d,s),d.buttonView.set({isOn:!1,withText:!0,tooltip:i}),d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),d.bind("isEnabled").toMany(c,"isEnabled",((...t)=>t.some((t=>t)))),d.buttonView.bind("label").to(a,"value",l,"value",((t,e)=>{const n=t||e&&"paragraph";return r[n]?r[n]:o})),this.listenTo(d,"execute",(e=>{t.execute(e.source.commandName,e.source.commandValue?{value:e.source.commandValue}:void 0),t.editing.view.focus()})),d}))}}class Zf{constructor(){this._stack=[]}add(t,e){const n=this._stack,o=n[0];this._insertDescriptor(t);const i=n[0];o===i||Jf(o,i)||this.fire("change:top",{oldDescriptor:o,newDescriptor:i,writer:e})}remove(t,e){const n=this._stack,o=n[0];this._removeDescriptor(t);const i=n[0];o===i||Jf(o,i)||this.fire("change:top",{oldDescriptor:o,newDescriptor:i,writer:e})}_insertDescriptor(t){const e=this._stack,n=e.findIndex((e=>e.id===t.id));if(Jf(t,e[n]))return;n>-1&&e.splice(n,1);let o=0;for(;e[o]&&Yf(e[o],t);)o++;e.splice(o,0,t)}_removeDescriptor(t){const e=this._stack,n=e.findIndex((e=>e.id===t));n>-1&&e.splice(n,1)}}function Jf(t,e){return t&&e&&t.priority==e.priority&&Qf(t.classes)==Qf(e.classes)}function Yf(t,e){return t.priority>e.priority||!(t.priority<e.priority)&&Qf(t.classes)>Qf(e.classes)}function Qf(t){return Array.isArray(t)?t.sort().join(","):t}M(Zf,b);const Xf='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z"/><path fill-opacity=".256" d="M1 1h14v14H1z"/><g class="ck-icon__selected-indicator"><path d="M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z"/><path fill-opacity=".254" d="M1 1h14v14H1z"/></g></svg>',tb="ck-widget_selected";function eb(t){return!!t.is("element")&&!!t.getCustomProperty("widget")}function nb(t,e,n={}){if(!t.is("containerElement"))throw new l("widget-to-widget-wrong-element-type",null,{element:t});return e.setAttribute("contenteditable","false",t),e.addClass("ck-widget",t),e.setCustomProperty("widget",!0,t),t.getFillerOffset=db,n.label&&function(t,e,n){n.setCustomProperty("widgetLabel",e,t)}(t,n.label,e),n.hasSelectionHandle&&function(t,e){const n=e.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(t){const e=this.toDomElement(t),n=new Nh;return n.set("content",Xf),n.render(),e.appendChild(n.element),e}));e.insert(e.createPositionAt(t,0),n),e.addClass(["ck-widget_with-selection-handle"],t)}(t,e),rb(t,e),t}function ob(t,e,n){if(e.classes&&n.addClass(_o(e.classes),t),e.attributes)for(const o in e.attributes)n.setAttribute(o,e.attributes[o],t)}function ib(t,e,n){if(e.classes&&n.removeClass(_o(e.classes),t),e.attributes)for(const o in e.attributes)n.removeAttribute(o,t)}function rb(t,e,n=ob,o=ib){const i=new Zf;i.on("change:top",((e,i)=>{i.oldDescriptor&&o(t,i.oldDescriptor,i.writer),i.newDescriptor&&n(t,i.newDescriptor,i.writer)})),e.setCustomProperty("addHighlight",((t,e,n)=>i.add(e,n)),t),e.setCustomProperty("removeHighlight",((t,e,n)=>i.remove(e,n)),t)}function sb(t){const e=t.getCustomProperty("widgetLabel");return e?"function"==typeof e?e():e:""}function ab(t,e,n={}){return e.addClass(["ck-editor__editable","ck-editor__nested-editable"],t),e.setAttribute("role","textbox",t),n.label&&e.setAttribute("aria-label",n.label,t),e.setAttribute("contenteditable",t.isReadOnly?"false":"true",t),t.on("change:isReadOnly",((n,o,i)=>{e.setAttribute("contenteditable",i?"false":"true",t)})),t.on("change:isFocused",((n,o,i)=>{i?e.addClass("ck-editor__nested-editable_focused",t):e.removeClass("ck-editor__nested-editable_focused",t)})),rb(t,e),t}function lb(t,e){const n=t.getSelectedElement();if(n){const o=gb(t);if(o)return e.createRange(e.createPositionAt(n,o))}return Ad(t,e)}function cb(t,e){return(n,o)=>{const{mapper:i,viewPosition:r}=o,s=i.findMappedViewAncestor(r);if(!e(s))return;const a=i.toModelElement(s);o.modelPosition=t.createPositionAt(a,r.isAtStart?"before":"after")}}function db(){return null}const hb="widget-type-around";function ub(t,e,n){return t&&eb(t)&&!n.isInline(e)}function gb(t){return t.getAttribute(hb)}var mb=n(4921),pb={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(mb.Z,pb);mb.Z.locals;const fb=["before","after"],bb=(new DOMParser).parseFromString('<svg viewBox="0 0 10 8" xmlns="http://www.w3.org/2000/svg"><path d="M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038"/></svg>',"image/svg+xml").firstChild,kb="ck-widget__type-around_disabled";class wb extends L{static get pluginName(){return"WidgetTypeAround"}static get requires(){return[yf,wp]}constructor(t){super(t),this._currentFakeCaretModelElement=null}init(){const t=this.editor,e=t.editing.view;this.on("change:isEnabled",((n,o,i)=>{e.change((t=>{for(const n of e.document.roots)i?t.removeClass(kb,n):t.addClass(kb,n)})),i||t.model.change((t=>{t.removeSelectionAttribute(hb)}))})),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){this._currentFakeCaretModelElement=null}_insertParagraph(t,e){const n=this.editor,o=n.editing.view,i=n.model.schema.getAttributesWithProperty(t,"copyOnReplace",!0);n.execute("insertParagraph",{position:n.model.createPositionAt(t,e),attributes:i}),o.focus(),o.scrollToTheSelection()}_listenToIfEnabled(t,e,n,o){this.listenTo(t,e,((...t)=>{this.isEnabled&&n(...t)}),o)}_insertParagraphAccordingToFakeCaretPosition(){const t=this.editor.model.document.selection,e=gb(t);if(!e)return!1;const n=t.getSelectedElement();return this._insertParagraph(n,e),!0}_enableTypeAroundUIInjection(){const t=this.editor,e=t.model.schema,n=t.locale.t,o={before:n("Insert paragraph before block"),after:n("Insert paragraph after block")};t.editing.downcastDispatcher.on("insert",((t,n,i)=>{const r=i.mapper.toViewElement(n.item);ub(r,n.item,e)&&function(t,e,n){const o=t.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(t){const n=this.toDomElement(t);return function(t,e){for(const n of fb){const o=new zd({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${n}`],title:e[n]},children:[t.ownerDocument.importNode(bb,!0)]});t.appendChild(o.render())}}(n,e),function(t){const e=new zd({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});t.appendChild(e.render())}(n),n}));t.insert(t.createPositionAt(n,"end"),o)}(i.writer,o,r)}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const t=this.editor,e=t.model,n=e.document.selection,o=e.schema,i=t.editing.view;function r(t){return`ck-widget_type-around_show-fake-caret_${t}`}this._listenToIfEnabled(i.document,"arrowKey",((t,e)=>{this._handleArrowKeyPress(t,e)}),{context:[eb,"$text"],priority:"high"}),this._listenToIfEnabled(n,"change:range",((e,n)=>{n.directChange&&t.model.change((t=>{t.removeSelectionAttribute(hb)}))})),this._listenToIfEnabled(e.document,"change:data",(()=>{const e=n.getSelectedElement();if(e){if(ub(t.editing.mapper.toViewElement(e),e,o))return}t.model.change((t=>{t.removeSelectionAttribute(hb)}))})),this._listenToIfEnabled(t.editing.downcastDispatcher,"selection",((t,e,n)=>{const i=n.writer;if(this._currentFakeCaretModelElement){const t=n.mapper.toViewElement(this._currentFakeCaretModelElement);t&&(i.removeClass(fb.map(r),t),this._currentFakeCaretModelElement=null)}const s=e.selection.getSelectedElement();if(!s)return;const a=n.mapper.toViewElement(s);if(!ub(a,s,o))return;const l=gb(e.selection);l&&(i.addClass(r(l),a),this._currentFakeCaretModelElement=s)})),this._listenToIfEnabled(t.ui.focusTracker,"change:isFocused",((e,n,o)=>{o||t.model.change((t=>{t.removeSelectionAttribute(hb)}))}))}_handleArrowKeyPress(t,e){const n=this.editor,o=n.model,i=o.document.selection,r=o.schema,s=n.editing.view,a=function(t,e){const n=wr(t,e);return"down"===n||"right"===n}(e.keyCode,n.locale.contentLanguageDirection),l=s.document.selection.getSelectedElement();let c;ub(l,n.editing.mapper.toModelElement(l),r)?c=this._handleArrowKeyPressOnSelectedWidget(a):i.isCollapsed?c=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):e.shiftKey||(c=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),c&&(e.preventDefault(),t.stop())}_handleArrowKeyPressOnSelectedWidget(t){const e=this.editor.model,n=gb(e.document.selection);return e.change((e=>{if(!n)return e.setSelectionAttribute(hb,t?"after":"before"),!0;if(!(n===(t?"after":"before")))return e.removeSelectionAttribute(hb),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(t){const e=this.editor,n=e.model,o=n.schema,i=e.plugins.get("Widget"),r=i._getObjectElementNextToSelection(t);return!!ub(e.editing.mapper.toViewElement(r),r,o)&&(n.change((e=>{i._setSelectionOverElement(r),e.setSelectionAttribute(hb,t?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(t){const e=this.editor,n=e.model,o=n.schema,i=e.editing.mapper,r=n.document.selection,s=t?r.getLastPosition().nodeBefore:r.getFirstPosition().nodeAfter;return!!ub(i.toViewElement(s),s,o)&&(n.change((e=>{e.setSelection(s,"on"),e.setSelectionAttribute(hb,t?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const t=this.editor,e=t.editing.view;this._listenToIfEnabled(e.document,"mousedown",((n,o)=>{const i=o.domTarget.closest(".ck-widget__type-around__button");if(!i)return;const r=function(t){return t.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(i),s=function(t,e){const n=t.closest(".ck-widget");return e.mapDomToView(n)}(i,e.domConverter),a=t.editing.mapper.toModelElement(s);this._insertParagraph(a,r),o.preventDefault(),n.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const t=this.editor,e=t.model.document.selection,n=t.editing.view;this._listenToIfEnabled(n.document,"enter",((n,o)=>{if("atTarget"!=n.eventPhase)return;const i=e.getSelectedElement(),r=t.editing.mapper.toViewElement(i),s=t.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:ub(r,i,s)&&(this._insertParagraph(i,o.isSoft?"before":"after"),a=!0),a&&(o.preventDefault(),n.stop())}),{context:eb})}_enableInsertingParagraphsOnTypingKeystroke(){const t=this.editor.editing.view,e=[mr.enter,mr.delete,mr.backspace];this._listenToIfEnabled(t.document,"keydown",((t,n)=>{e.includes(n.keyCode)||up(n)||this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const t=this.editor,e=t.editing.view,n=t.model,o=n.schema;this._listenToIfEnabled(e.document,"delete",((e,i)=>{if("atTarget"!=e.eventPhase)return;const r=gb(n.document.selection);if(!r)return;const s=i.direction,a=n.document.selection.getSelectedElement(),l="forward"==s;if("before"===r===l)t.execute("delete",{selection:n.createSelection(a,"on")});else{const e=o.getNearestSelectionRange(n.createPositionAt(a,r),s);if(e)if(e.isCollapsed){const i=n.createSelection(e.start);if(n.modifySelection(i,{direction:s}),i.focus.isEqual(e.start)){const t=function(t,e){let n=e;for(const o of e.getAncestors({parentFirst:!0})){if(o.childCount>1||t.isLimit(o))break;n=o}return n}(o,e.start.parent);n.deleteContent(n.createSelection(t,"on"),{doNotAutoparagraph:!0})}else n.change((n=>{n.setSelection(e),t.execute(l?"deleteForward":"delete")}))}else n.change((n=>{n.setSelection(e),t.execute(l?"deleteForward":"delete")}))}i.preventDefault(),e.stop()}),{context:eb})}_enableInsertContentIntegration(){const t=this.editor,e=this.editor.model,n=e.document.selection;this._listenToIfEnabled(t.model,"insertContent",((t,[o,i])=>{if(i&&!i.is("documentSelection"))return;const r=gb(n);return r?(t.stop(),e.change((t=>{const i=n.getSelectedElement(),s=e.createPositionAt(i,r),a=t.createSelection(s),l=e.insertContent(o,a);return t.setSelection(a),l}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const t=this.editor,e=this.editor.model.document.selection;this._listenToIfEnabled(t.model,"insertObject",((t,n)=>{const[,o,,i={}]=n;if(o&&!o.is("documentSelection"))return;const r=gb(e);r&&(i.findOptimalPosition=r,n[3]=i)}),{priority:"high"})}_enableDeleteContentIntegration(){const t=this.editor,e=this.editor.model.document.selection;this._listenToIfEnabled(t.model,"deleteContent",((t,[n])=>{if(n&&!n.is("documentSelection"))return;gb(e)&&t.stop()}),{priority:"high"})}}function _b(t){const e=t.model;return(n,o)=>{const i=o.keyCode==mr.arrowup,r=o.keyCode==mr.arrowdown,s=o.shiftKey,a=e.document.selection;if(!i&&!r)return;const l=r;if(s&&function(t,e){return!t.isCollapsed&&t.isBackward==e}(a,l))return;const c=function(t,e,n){const o=t.model;if(n){const t=e.isCollapsed?e.focus:e.getLastPosition(),n=Ab(o,t,"forward");if(!n)return null;const i=o.createRange(t,n),r=Cb(o.schema,i,"backward");return r?o.createRange(t,r):null}{const t=e.isCollapsed?e.focus:e.getFirstPosition(),n=Ab(o,t,"backward");if(!n)return null;const i=o.createRange(n,t),r=Cb(o.schema,i,"forward");return r?o.createRange(r,t):null}}(t,a,l);if(c){if(c.isCollapsed){if(a.isCollapsed)return;if(s)return}(c.isCollapsed||function(t,e,n){const o=t.model,i=t.view.domConverter;if(n){const t=o.createSelection(e.start);o.modifySelection(t),t.focus.isAtEnd||e.start.isEqual(t.focus)||(e=o.createRange(t.focus,e.end))}const r=t.mapper.toViewRange(e),s=i.viewRangeToDom(r),a=_a.getDomRangeRects(s);let l;for(const t of a)if(void 0!==l){if(Math.round(t.top)>=l)return!1;l=Math.max(l,Math.round(t.bottom))}else l=Math.round(t.bottom);return!0}(t,c,l))&&(e.change((t=>{const n=l?c.end:c.start;if(s){const o=e.createSelection(a.anchor);o.setFocus(n),t.setSelection(o)}else t.setSelection(n)})),n.stop(),o.preventDefault(),o.stopPropagation())}}}function Ab(t,e,n){const o=t.schema,i=t.createRangeIn(e.root),r="forward"==n?"elementStart":"elementEnd";for(const{previousPosition:t,item:s,type:a}of i.getWalker({startPosition:e,direction:n})){if(o.isLimit(s)&&!o.isInline(s))return t;if(a==r&&o.isBlock(s))return null}return null}function Cb(t,e,n){const o="backward"==n?e.end:e.start;if(t.checkChild(o,"$text"))return o;for(const{nextPosition:o}of e.getWalker({direction:n}))if(t.checkChild(o,"$text"))return o;return null}var vb=n(3488),yb={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(vb.Z,yb);vb.Z.locals;class xb extends L{static get pluginName(){return"Widget"}static get requires(){return[wb,wp]}init(){const t=this.editor,e=t.editing.view,n=e.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",((e,n,o)=>{const i=o.writer,r=n.selection;if(r.isCollapsed)return;const s=r.getSelectedElement();if(!s)return;const a=t.editing.mapper.toViewElement(s);eb(a)&&o.consumable.consume(r,"selection")&&i.setSelection(i.createRangeOn(a),{fake:!0,label:sb(a)})})),this.editor.editing.downcastDispatcher.on("selection",((t,e,n)=>{this._clearPreviouslySelectedWidgets(n.writer);const o=n.writer,i=o.document.selection;let r=null;for(const t of i.getRanges())for(const e of t){const t=e.item;eb(t)&&!Eb(t,r)&&(o.addClass(tb,t),this._previouslySelected.add(t),r=t)}}),{priority:"low"}),e.addObserver(Mg),this.listenTo(n,"mousedown",((...t)=>this._onMousedown(...t))),this.listenTo(n,"arrowKey",((...t)=>{this._handleSelectionChangeOnArrowKeyPress(...t)}),{context:[eb,"$text"]}),this.listenTo(n,"arrowKey",((...t)=>{this._preventDefaultOnArrowKeyPress(...t)}),{context:"$root"}),this.listenTo(n,"arrowKey",_b(this.editor.editing),{context:"$text"}),this.listenTo(n,"delete",((t,e)=>{this._handleDelete("forward"==e.direction)&&(e.preventDefault(),t.stop())}),{context:"$root"})}_onMousedown(t,e){const n=this.editor,o=n.editing.view,i=o.document;let r=e.target;if(function(t){for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if(eb(t))return!1;t=t.parent}return!1}(r)){if((dr.isSafari||dr.isGecko)&&e.domEvent.detail>=3){const t=n.editing.mapper,o=r.is("attributeElement")?r.findAncestor((t=>!t.is("attributeElement"))):r,i=t.toModelElement(o);e.preventDefault(),this.editor.model.change((t=>{t.setSelection(i,"in")}))}return}if(!eb(r)&&(r=r.findAncestor(eb),!r))return;dr.isAndroid&&e.preventDefault(),i.isFocused||o.focus();const s=n.editing.mapper.toModelElement(r);this._setSelectionOverElement(s)}_handleSelectionChangeOnArrowKeyPress(t,e){const n=e.keyCode,o=this.editor.model,i=o.schema,r=o.document.selection,s=r.getSelectedElement(),a=wr(n,this.editor.locale.contentLanguageDirection),l="down"==a||"right"==a,c="up"==a||"down"==a;if(s&&i.isObject(s)){const n=l?r.getLastPosition():r.getFirstPosition(),s=i.getNearestSelectionRange(n,l?"forward":"backward");return void(s&&(o.change((t=>{t.setSelection(s)})),e.preventDefault(),t.stop()))}if(!r.isCollapsed&&!e.shiftKey){const n=r.getFirstPosition(),s=r.getLastPosition(),a=n.nodeAfter,c=s.nodeBefore;return void((a&&i.isObject(a)||c&&i.isObject(c))&&(o.change((t=>{t.setSelection(l?s:n)})),e.preventDefault(),t.stop()))}if(!r.isCollapsed)return;const d=this._getObjectElementNextToSelection(l);if(d&&i.isObject(d)){if(i.isInline(d)&&c)return;this._setSelectionOverElement(d),e.preventDefault(),t.stop()}}_preventDefaultOnArrowKeyPress(t,e){const n=this.editor.model,o=n.schema,i=n.document.selection.getSelectedElement();i&&o.isObject(i)&&(e.preventDefault(),t.stop())}_handleDelete(t){if(this.editor.isReadOnly)return;const e=this.editor.model.document.selection;if(!e.isCollapsed)return;const n=this._getObjectElementNextToSelection(t);return n?(this.editor.model.change((t=>{let o=e.anchor.parent;for(;o.isEmpty;){const e=o;o=e.parent,t.remove(e)}this._setSelectionOverElement(n)})),!0):void 0}_setSelectionOverElement(t){this.editor.model.change((e=>{e.setSelection(e.createRangeOn(t))}))}_getObjectElementNextToSelection(t){const e=this.editor.model,n=e.schema,o=e.document.selection,i=e.createSelection(o);if(e.modifySelection(i,{direction:t?"forward":"backward"}),i.isEqual(o))return null;const r=t?i.focus.nodeBefore:i.focus.nodeAfter;return r&&n.isObject(r)?r:null}_clearPreviouslySelectedWidgets(t){for(const e of this._previouslySelected)t.removeClass(tb,e);this._previouslySelected.clear()}}function Eb(t,e){return!!e&&Array.from(t.getAncestors()).includes(e)}class Tb extends L{static get requires(){return[ag]}static get pluginName(){return"WidgetToolbarRepository"}init(){const t=this.editor;if(t.plugins.has("BalloonToolbar")){const e=t.plugins.get("BalloonToolbar");this.listenTo(e,"show",(e=>{(function(t){const e=t.getSelectedElement();return!(!e||!eb(e))})(t.editing.view.document.selection)&&e.stop()}),{priority:"high"})}this._toolbarDefinitions=new Map,this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(()=>{this._updateToolbarsVisibility()})),this.listenTo(t.ui,"update",(()=>{this._updateToolbarsVisibility()})),this.listenTo(t.ui.focusTracker,"change:isFocused",(()=>{this._updateToolbarsVisibility()}),{priority:"low"})}destroy(){super.destroy();for(const t of this._toolbarDefinitions.values())t.view.destroy()}register(t,{ariaLabel:e,items:n,getRelatedElement:o,balloonClassName:i="ck-toolbar-container"}){if(!n.length)return void c("widget-toolbar-no-items",{toolbarId:t});const r=this.editor,s=r.t,a=new mu(r.locale);if(a.ariaLabel=e||s("Widget toolbar"),this._toolbarDefinitions.has(t))throw new l("widget-toolbar-duplicated",this,{toolbarId:t});a.fillFromConfig(n,r.ui.componentFactory);const d={view:a,getRelatedElement:o,balloonClassName:i};r.ui.addToolbar(a,{isContextual:!0,beforeFocus:()=>{const t=o(r.editing.view.document.selection);t&&this._showToolbar(d,t)},afterBlur:()=>{this._hideToolbar(d)}}),this._toolbarDefinitions.set(t,d)}_updateToolbarsVisibility(){let t=0,e=null,n=null;for(const o of this._toolbarDefinitions.values()){const i=o.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&i)if(this.editor.ui.focusTracker.isFocused){const r=i.getAncestors().length;r>t&&(t=r,e=i,n=o)}else this._isToolbarVisible(o)&&this._hideToolbar(o);else this._isToolbarInBalloon(o)&&this._hideToolbar(o)}n&&this._showToolbar(n,e)}_hideToolbar(t){this._balloon.remove(t.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(t,e){this._isToolbarVisible(t)?Db(this.editor,e):this._isToolbarInBalloon(t)||(this._balloon.add({view:t.view,position:Sb(this.editor,e),balloonClassName:t.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const t of this._toolbarDefinitions.values())if(this._isToolbarVisible(t)){const e=t.getRelatedElement(this.editor.editing.view.document.selection);Db(this.editor,e)}})))}_isToolbarVisible(t){return this._balloon.visibleView===t.view}_isToolbarInBalloon(t){return this._balloon.hasView(t.view)}}function Db(t,e){const n=t.plugins.get("ContextualBalloon"),o=Sb(t,e);n.updatePosition(o)}function Sb(t,e){const n=t.editing.view,o=hh.defaultPositions;return{target:n.domConverter.mapViewToDom(e),positions:[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast,o.viewportStickyNorth]}}class Bb{constructor(t){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}begin(t,e,n){const o=new _a(e);this.activeHandlePosition=function(t){const e=["top-left","top-right","bottom-right","bottom-left"];for(const n of e)if(t.classList.contains(Ib(n)))return n}(t),this._referenceCoordinates=function(t,e){const n=new _a(t),o=e.split("-"),i={x:"right"==o[1]?n.right:n.left,y:"bottom"==o[0]?n.bottom:n.top};return i.x+=t.ownerDocument.defaultView.scrollX,i.y+=t.ownerDocument.defaultView.scrollY,i}(e,function(t){const e=t.split("-"),n={top:"bottom",bottom:"top",left:"right",right:"left"};return`${n[e[0]]}-${n[e[1]]}`}(this.activeHandlePosition)),this.originalWidth=o.width,this.originalHeight=o.height,this.aspectRatio=o.width/o.height;const i=n.style.width;i&&i.match(/^\d+(\.\d*)?%$/)?this.originalWidthPercents=parseFloat(i):this.originalWidthPercents=function(t,e){const n=t.parentElement,o=parseFloat(n.ownerDocument.defaultView.getComputedStyle(n).width);return e.width/o*100}(n,o)}update(t){this.proposedWidth=t.width,this.proposedHeight=t.height,this.proposedWidthPercents=t.widthPercents,this.proposedHandleHostWidth=t.handleHostWidth,this.proposedHandleHostHeight=t.handleHostHeight}}function Ib(t){return`ck-widget__resizer__handle-${t}`}M(Bb,P);class Pb extends nh{constructor(){super();const t=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",t.to("_viewPosition",(t=>t?`ck-orientation-${t}`:""))],style:{display:t.if("_isVisible","none",(t=>!t))}},children:[{text:t.to("_label")}]})}_bindToState(t,e){this.bind("_isVisible").to(e,"proposedWidth",e,"proposedHeight",((t,e)=>null!==t&&null!==e)),this.bind("_label").to(e,"proposedHandleHostWidth",e,"proposedHandleHostHeight",e,"proposedWidthPercents",((e,n,o)=>"px"===t.unit?`${e}×${n}`:`${o}%`)),this.bind("_viewPosition").to(e,"activeHandlePosition",e,"proposedHandleHostWidth",e,"proposedHandleHostHeight",((t,e,n)=>e<50||n<50?"above-center":t))}_dismiss(){this.unbind(),this._isVisible=!1}}class Rb{constructor(t){this._options=t,this._viewResizerWrapper=null,this.set("isEnabled",!0),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",(t=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),t.stop())}),{priority:"high"}),this.on("change:isEnabled",(()=>{this.isEnabled&&this.redraw()}))}attach(){const t=this,e=this._options.viewElement;this._options.editor.editing.view.change((n=>{const o=n.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(e){const n=this.toDomElement(e);return t._appendHandles(n),t._appendSizeUI(n),t.on("change:isEnabled",((t,e,o)=>{n.style.display=o?"":"none"})),n.style.display=t.isEnabled?"":"none",n}));n.insert(n.createPositionAt(e,"end"),o),n.addClass("ck-widget_with-resizer",e),this._viewResizerWrapper=o}))}begin(t){this.state=new Bb(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(t,this._getHandleHost(),this._getResizeHost())}updateSize(t){const e=this._proposeNewSize(t);this._options.editor.editing.view.change((t=>{const n=this._options.unit||"%",o=("%"===n?e.widthPercents:e.width)+n;t.setStyle("width",o,this._options.viewElement)}));const n=this._getHandleHost(),o=new _a(n);e.handleHostWidth=Math.round(o.width),e.handleHostHeight=Math.round(o.height);const i=new _a(n);e.width=Math.round(i.width),e.height=Math.round(i.height),this.redraw(o),this.state.update(e)}commit(){const t=this._options.unit||"%",e=("%"===t?this.state.proposedWidthPercents:this.state.proposedWidth)+t;this._options.editor.editing.view.change((()=>{this._cleanup(),this._options.onCommit(e)}))}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(t){const e=this._domResizerWrapper;if(!((n=e)&&n.ownerDocument&&n.ownerDocument.contains(n)))return;var n;const o=e.parentElement,i=this._getHandleHost(),r=this._viewResizerWrapper,s=[r.getStyle("width"),r.getStyle("height"),r.getStyle("left"),r.getStyle("top")];let a;if(o.isSameNode(i)){const e=t||new _a(i);a=[e.width+"px",e.height+"px",void 0,void 0]}else a=[i.offsetWidth+"px",i.offsetHeight+"px",i.offsetLeft+"px",i.offsetTop+"px"];"same"!==Bo(s,a)&&this._options.editor.editing.view.change((t=>{t.setStyle({width:a[0],height:a[1],left:a[2],top:a[3]},r)}))}containsHandle(t){return this._domResizerWrapper.contains(t)}static isResizeHandle(t){return t.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss();this._options.editor.editing.view.change((t=>{t.setStyle("width",this._initialViewWidth,this._options.viewElement)}))}_proposeNewSize(t){const e=this.state,n={x:(o=t).pageX,y:o.pageY};var o;const i=!this._options.isCentered||this._options.isCentered(this),r={x:e._referenceCoordinates.x-(n.x+e.originalWidth),y:n.y-e.originalHeight-e._referenceCoordinates.y};i&&e.activeHandlePosition.endsWith("-right")&&(r.x=n.x-(e._referenceCoordinates.x+e.originalWidth)),i&&(r.x*=2);const s={width:Math.abs(e.originalWidth+r.x),height:Math.abs(e.originalHeight+r.y)};s.dominant=s.width/e.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/e.aspectRatio:a.width=a.height*e.aspectRatio,{width:Math.round(a.width),height:Math.round(a.height),widthPercents:Math.min(Math.round(e.originalWidthPercents/e.originalWidth*a.width*100)/100,100)}}_getResizeHost(){const t=this._domResizerWrapper.parentElement;return this._options.getResizeHost(t)}_getHandleHost(){const t=this._domResizerWrapper.parentElement;return this._options.getHandleHost(t)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(t){const e=["top-left","top-right","bottom-right","bottom-left"];for(const o of e)t.appendChild(new zd({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(n=o,`ck-widget__resizer__handle-${n}`)}}).render());var n}_appendSizeUI(t){this._sizeView=new Pb,this._sizeView.render(),t.appendChild(this._sizeView.element)}}M(Rb,P);const zb=function(t,e,n){var o=!0,i=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return E(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),ca(t,e,{leading:o,maxWait:e,trailing:i})};var Vb=n(8506),Fb={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(Vb.Z,Fb);Vb.Z.locals;class Ob extends L{static get pluginName(){return"WidgetResize"}init(){const t=this.editor.editing,e=Co.window.document;this.set("visibleResizer",null),this.set("_activeResizer",null),this._resizers=new Map,t.view.addObserver(Mg),this._observer=Object.create(_s),this.listenTo(t.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 n=()=>{this.visibleResizer&&this.visibleResizer.redraw()};this._redrawFocusedResizerThrottled=zb(n,200),this.on("change:visibleResizer",n),this.editor.ui.on("update",this._redrawFocusedResizerThrottled),this.editor.model.document.on("change",(()=>{for(const[t,e]of this._resizers)t.isAttached()||(this._resizers.delete(t),e.destroy())}),{priority:"lowest"}),this._observer.listenTo(Co.window,"resize",this._redrawFocusedResizerThrottled);const o=this.editor.editing.view.document.selection;o.on("change",(()=>{const t=o.getSelectedElement();this.visibleResizer=this.getResizerByViewElement(t)||null}))}destroy(){this._observer.stopListening();for(const t of this._resizers.values())t.destroy();this._redrawFocusedResizerThrottled.cancel()}attachTo(t){const e=new Rb(t),n=this.editor.plugins;if(e.attach(),n.has("WidgetToolbarRepository")){const t=n.get("WidgetToolbarRepository");e.on("begin",(()=>{t.forceDisabled("resize")}),{priority:"lowest"}),e.on("cancel",(()=>{t.clearForceDisabled("resize")}),{priority:"highest"}),e.on("commit",(()=>{t.clearForceDisabled("resize")}),{priority:"highest"})}this._resizers.set(t.viewElement,e);const o=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(o)==e&&(this.visibleResizer=e),e}getResizerByViewElement(t){return this._resizers.get(t)}_getResizerByHandle(t){for(const e of this._resizers.values())if(e.containsHandle(t))return e}_mouseDownListener(t,e){const n=e.domTarget;Rb.isResizeHandle(n)&&(this._activeResizer=this._getResizerByHandle(n),this._activeResizer&&(this._activeResizer.begin(n),t.stop(),e.preventDefault()))}_mouseMoveListener(t,e){this._activeResizer&&this._activeResizer.updateSize(e)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}M(Ob,P);class Nb extends q{refresh(){const t=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!t,this.isEnabled&&t.hasAttribute("alt")?this.value=t.getAttribute("alt"):this.value=!1}execute(t){const e=this.editor,n=e.plugins.get("ImageUtils"),o=e.model,i=n.getClosestSelectedImageElement(o.document.selection);o.change((e=>{e.setAttribute("alt",t.newValue,i)}))}}function Mb(t){return t.createContainerElement("figure",{class:"image"},[t.createEmptyElement("img"),t.createSlot()])}function Lb(t,e){const n=t.plugins.get("ImageUtils"),o=t.plugins.has("ImageInlineEditing")&&t.plugins.has("ImageBlockEditing");return t=>{if(!n.isInlineImageView(t))return null;if(!o)return i(t);return(t.findAncestor(n.isBlockImageView)?"imageBlock":"imageInline")!==e?null:i(t)};function i(t){const e={name:!0};return t.hasAttribute("src")&&(e.attributes=["src"]),e}}function Hb(t,e){const n=Ea(e.getSelectedBlocks());return!n||t.isObject(n)||n.isEmpty&&"listItem"!=n.name?"imageBlock":"imageInline"}class qb extends L{static get pluginName(){return"ImageUtils"}isImage(t){return this.isInlineImage(t)||this.isBlockImage(t)}isInlineImageView(t){return!!t&&t.is("element","img")}isBlockImageView(t){return!!t&&t.is("element","figure")&&t.hasClass("image")}insertImage(t={},e=null,n=null){const o=this.editor,i=o.model,r=i.document.selection;n=Wb(o,e||r,n),t={...Object.fromEntries(r.getAttributes()),...t};for(const e in t)i.schema.checkAttribute(n,e)||delete t[e];return i.change((o=>{const r=o.createElement(n,t);return i.insertObject(r,e,null,{setSelection:"on",findOptimalPosition:!e&&"imageInline"!=n}),r.parent?r:null}))}getClosestSelectedImageWidget(t){const e=t.getFirstPosition();if(!e)return null;const n=t.getSelectedElement();if(n&&this.isImageWidget(n))return n;let o=e.parent;for(;o;){if(o.is("element")&&this.isImageWidget(o))return o;o=o.parent}return null}getClosestSelectedImageElement(t){const e=t.getSelectedElement();return this.isImage(e)?e:t.getFirstPosition().findAncestor("imageBlock")}isImageAllowed(){const t=this.editor.model.document.selection;return function(t,e){if("imageBlock"==Wb(t,e)){const n=function(t,e){const n=lb(t,e).start.parent;if(n.isEmpty&&!n.is("element","$root"))return n.parent;return n}(e,t.model);if(t.model.schema.checkChild(n,"imageBlock"))return!0}else if(t.model.schema.checkChild(e.focus,"imageInline"))return!0;return!1}(this.editor,t)&&function(t){return[...t.focus.getAncestors()].every((t=>!t.is("element","imageBlock")))}(t)}toImageWidget(t,e,n){e.setCustomProperty("image",!0,t);return nb(t,e,{label:()=>{const e=this.findViewImgElement(t).getAttribute("alt");return e?`${e} ${n}`:n}})}isImageWidget(t){return!!t.getCustomProperty("image")&&eb(t)}isBlockImage(t){return!!t&&t.is("element","imageBlock")}isInlineImage(t){return!!t&&t.is("element","imageInline")}findViewImgElement(t){if(this.isInlineImageView(t))return t;const e=this.editor.editing.view;for(const{item:n}of e.createRangeIn(t))if(this.isInlineImageView(n))return n}}function Wb(t,e,n){const o=t.model.schema,i=t.config.get("image.insert.type");return t.plugins.has("ImageBlockEditing")?t.plugins.has("ImageInlineEditing")?n||("inline"===i?"imageInline":"block"===i?"imageBlock":e.is("selection")?Hb(o,e):o.checkChild(e,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}class jb extends L{static get requires(){return[qb]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new Nb(this.editor))}}var Ub=n(1905),$b={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(Ub.Z,$b);Ub.Z.locals;class Gb extends nh{constructor(t){super(t);const e=this.locale.t;this.focusTracker=new Ta,this.keystrokes=new Da,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(e("Save"),Bh.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(e("Cancel"),Bh.cancel,"ck-button-cancel","cancel"),this._focusables=new Rd,this._focusCycler=new au({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","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]}),Ph(this)}render(){super.render(),this.keystrokes.listenTo(this.element),Rh({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(t,e,n,o){const i=new Hh(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i.extendTemplate({attributes:{class:n}}),o&&i.delegate("execute").to(this,o),i}_createLabeledInputView(){const t=this.locale.t,e=new Zu(this.locale,Ju);return e.label=t("Text alternative"),e}}function Kb(t){const e=t.editing.view,n=hh.defaultPositions,o=t.plugins.get("ImageUtils");return{target:e.domConverter.mapViewToDom(o.getClosestSelectedImageWidget(e.document.selection)),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}class Zb extends L{static get requires(){return[ag]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton(),this._createForm()}destroy(){super.destroy(),this._form.destroy()}_createButton(){const t=this.editor,e=t.t;t.ui.componentFactory.add("imageTextAlternative",(n=>{const o=t.commands.get("imageTextAlternative"),i=new Hh(n);return i.set({label:e("Change image text alternative"),icon:Bh.lowVision,tooltip:!0}),i.bind("isEnabled").to(o,"isEnabled"),this.listenTo(i,"execute",(()=>{this._showForm()})),i}))}_createForm(){const t=this.editor,e=t.editing.view.document,n=t.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new Gb(t.locale),this._form.render(),this.listenTo(this._form,"submit",(()=>{t.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",((t,e)=>{this._hideForm(!0),e()})),this.listenTo(t.ui,"update",(()=>{n.getClosestSelectedImageWidget(e.selection)?this._isVisible&&function(t){const e=t.plugins.get("ContextualBalloon");if(t.plugins.get("ImageUtils").getClosestSelectedImageWidget(t.editing.view.document.selection)){const n=Kb(t);e.updatePosition(n)}}(t):this._hideForm(!0)})),Ih({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;const t=this.editor,e=t.commands.get("imageTextAlternative"),n=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:Kb(t)}),n.fieldView.value=n.fieldView.element.value=e.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(t){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),t&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView===this._form}get _isInBalloon(){return this._balloon.hasView(this._form)}}class Jb extends L{static get requires(){return[jb,Zb]}static get pluginName(){return"ImageTextAlternative"}}class Yb{constructor(t){this.files=function(t){const e=Array.from(t.files||[]),n=Array.from(t.items||[]);if(e.length)return e;return n.filter((t=>"file"===t.kind)).map((t=>t.getAsFile()))}(t),this._native=t}get types(){return this._native.types}getData(t){return this._native.getData(t)}setData(t,e){this._native.setData(t,e)}set effectAllowed(t){this._native.effectAllowed=t}get effectAllowed(){return this._native.effectAllowed}set dropEffect(t){this._native.dropEffect=t}get dropEffect(){return this._native.dropEffect}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}class Qb extends Zs{constructor(t){super(t);const n=this.document;function o(t){return(o,i)=>{i.preventDefault();const r=i.dropRange?[i.dropRange]:null,s=new e(n,t);n.fire(s,{dataTransfer:i.dataTransfer,method:o.name,targetRanges:r,target:i.target}),s.stop.called&&i.stopPropagation()}}this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"],this.listenTo(n,"paste",o("clipboardInput"),{priority:"low"}),this.listenTo(n,"drop",o("clipboardInput"),{priority:"low"}),this.listenTo(n,"dragover",o("dragging"),{priority:"low"})}onDomEvent(t){const e={dataTransfer:new Yb(t.clipboardData?t.clipboardData:t.dataTransfer)};"drop"!=t.type&&"dragover"!=t.type||(e.dropRange=function(t,e){const n=e.target.ownerDocument,o=e.clientX,i=e.clientY;let r;n.caretRangeFromPoint&&n.caretRangeFromPoint(o,i)?r=n.caretRangeFromPoint(o,i):e.rangeParent&&(r=n.createRange(),r.setStart(e.rangeParent,e.rangeOffset),r.collapse(!0));if(r)return t.domConverter.domRangeToView(r);return null}(this.view,t)),this.fire(t.type,t,e)}}const Xb=["figcaption","li"];function tk(t){let e="";if(t.is("$text")||t.is("$textProxy"))e=t.data;else if(t.is("element","img")&&t.hasAttribute("alt"))e=t.getAttribute("alt");else if(t.is("element","br"))e="\n";else{let n=null;for(const o of t.getChildren()){const t=tk(o);n&&(n.is("containerElement")||o.is("containerElement"))&&(Xb.includes(n.name)||Xb.includes(o.name)?e+="\n":e+="\n\n"),e+=t,n=o}}return e}class ek extends L{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(Qb),this._setupPasteDrop(),this._setupCopyCut()}_setupPasteDrop(){const t=this.editor,n=t.model,o=t.editing.view,i=o.document;this.listenTo(i,"clipboardInput",(e=>{t.isReadOnly&&e.stop()}),{priority:"highest"}),this.listenTo(i,"clipboardInput",((t,n)=>{const i=n.dataTransfer;let r=n.content||"";var s;r||(i.getData("text/html")?r=function(t){return t.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,((t,e)=>1==e.length?" ":e)).replace(/<!--[\s\S]*?-->/g,"")}(i.getData("text/html")):i.getData("text/plain")&&(((s=(s=i.getData("text/plain")).replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br>").replace(/^\s/,"&nbsp;").replace(/\s$/,"&nbsp;").replace(/\s\s/g," &nbsp;")).includes("</p><p>")||s.includes("<br>"))&&(s=`<p>${s}</p>`),r=s),r=this.editor.data.htmlProcessor.toView(r));const a=new e(this,"inputTransformation");this.fire(a,{content:r,dataTransfer:i,targetRanges:n.targetRanges,method:n.method}),a.stop.called&&t.stop(),o.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((t,e)=>{if(e.content.isEmpty)return;const o=this.editor.data.toModel(e.content,"$clipboardHolder");0!=o.childCount&&(t.stop(),n.change((()=>{this.fire("contentInsertion",{content:o,method:e.method,dataTransfer:e.dataTransfer,targetRanges:e.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((t,e)=>{e.resultRange=n.insertContent(e.content)}),{priority:"low"})}_setupCopyCut(){const t=this.editor,e=t.model.document,n=t.editing.view.document;function o(o,i){const r=i.dataTransfer;i.preventDefault();const s=t.data.toView(t.model.getSelectedContent(e.selection));n.fire("clipboardOutput",{dataTransfer:r,content:s,method:o.name})}this.listenTo(n,"copy",o,{priority:"low"}),this.listenTo(n,"cut",((e,n)=>{t.isReadOnly?n.preventDefault():o(e,n)}),{priority:"low"}),this.listenTo(n,"clipboardOutput",((n,o)=>{o.content.isEmpty||(o.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(o.content)),o.dataTransfer.setData("text/plain",tk(o.content))),"cut"==o.method&&t.model.deleteContent(e.selection)}),{priority:"low"})}}var nk=n(903),ok={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(nk.Z,ok);nk.Z.locals;class ik extends L{static get pluginName(){return"DragDrop"}static get requires(){return[ek,xb]}init(){const t=this.editor,e=t.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=zb((t=>this._updateDropMarker(t)),40),this._removeDropMarkerDelayed=ak((()=>this._removeDropMarker()),40),this._clearDraggableAttributesDelayed=ak((()=>this._clearDraggableAttributes()),40),e.addObserver(Qb),e.addObserver(Mg),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(t,"change:isReadOnly",((t,e,n)=>{n?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((t,e,n)=>{n||this._finalizeDragging(!1)})),dr.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._updateDropMarkerThrottled.cancel(),this._removeDropMarkerDelayed.cancel(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const t=this.editor,e=t.model,n=e.document,o=t.editing.view,i=o.document;this.listenTo(i,"dragstart",((o,s)=>{const a=n.selection;if(s.target&&s.target.is("editableElement"))return void s.preventDefault();const l=s.target?lk(s.target):null;if(l){const n=t.editing.mapper.toModelElement(l);this._draggedRange=ul.fromRange(e.createRangeOn(n)),t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}else if(!i.selection.isCollapsed){const t=i.selection.getSelectedElement();t&&eb(t)||(this._draggedRange=ul.fromRange(a.getFirstRange()))}if(!this._draggedRange)return void s.preventDefault();this._draggingUid=r(),s.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",s.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const c=e.createSelection(this._draggedRange.toRange()),d=t.data.toView(e.getSelectedContent(c));i.fire("clipboardOutput",{dataTransfer:s.dataTransfer,content:d,method:o.name}),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(i,"dragend",((t,e)=>{this._finalizeDragging(!e.dataTransfer.isCanceled&&"move"==e.dataTransfer.dropEffect)}),{priority:"low"}),this.listenTo(i,"dragenter",(()=>{this.isEnabled&&o.focus()})),this.listenTo(i,"dragleave",(()=>{this._removeDropMarkerDelayed()})),this.listenTo(i,"dragging",((e,n)=>{if(!this.isEnabled)return void(n.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const o=rk(t,n.targetRanges,n.target);this._draggedRange||(n.dataTransfer.dropEffect="copy"),dr.isGecko||("copy"==n.dataTransfer.effectAllowed?n.dataTransfer.dropEffect="copy":["all","copyMove"].includes(n.dataTransfer.effectAllowed)&&(n.dataTransfer.dropEffect="move")),o&&this._updateDropMarkerThrottled(o)}),{priority:"low"})}_setupClipboardInputIntegration(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"clipboardInput",((e,n)=>{if("drop"!=n.method)return;const o=rk(t,n.targetRanges,n.target);if(this._removeDropMarker(),!o)return this._finalizeDragging(!1),void e.stop();this._draggedRange&&this._draggingUid!=n.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==sk(n.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(o,!0))return this._finalizeDragging(!1),void e.stop();n.targetRanges=[t.editing.mapper.toViewRange(o)]}),{priority:"high"})}_setupContentInsertionIntegration(){const t=this.editor.plugins.get(ek);t.on("contentInsertion",((t,e)=>{if(!this.isEnabled||"drop"!==e.method)return;const n=e.targetRanges.map((t=>this.editor.editing.mapper.toModelRange(t)));this.editor.model.change((t=>t.setSelection(n)))}),{priority:"high"}),t.on("contentInsertion",((t,e)=>{if(!this.isEnabled||"drop"!==e.method)return;const n="move"==sk(e.dataTransfer),o=!e.resultRange||!e.resultRange.isCollapsed;this._finalizeDragging(o&&n)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const t=this.editor,e=t.editing.view,n=e.document;this.listenTo(n,"mousedown",((o,i)=>{if(dr.isAndroid||!i)return;this._clearDraggableAttributesDelayed.cancel();let r=lk(i.target);if(dr.isBlink&&!t.isReadOnly&&!r&&!n.selection.isCollapsed){const t=n.selection.getSelectedElement();t&&eb(t)||(r=n.selection.editableElement)}r&&(e.change((t=>{t.setAttribute("draggable","true",r)})),this._draggableElement=t.editing.mapper.toModelElement(r))})),this.listenTo(n,"mouseup",(()=>{dr.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const t=this.editor.editing;t.view.change((e=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&e.removeAttribute("draggable",t.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_setupDropMarker(){const t=this.editor;t.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),t.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(e,{writer:n})=>{if(t.model.schema.checkChild(e.markerRange.start,"$text"))return n.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(t){const e=this.toDomElement(t);return e.append("⁠",t.createElement("span"),"⁠"),e}))}})}_updateDropMarker(t){const e=this.editor,n=e.model.markers;e.model.change((e=>{n.has("drop-target")?n.get("drop-target").getRange().isEqual(t)||e.updateMarker("drop-target",{range:t}):e.addMarker("drop-target",{range:t,usingOperation:!1,affectsData:!1})}))}_removeDropMarker(){const t=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),t.markers.has("drop-target")&&t.change((t=>{t.removeMarker("drop-target")}))}_finalizeDragging(t){const e=this.editor,n=e.model;this._removeDropMarker(),this._clearDraggableAttributes(),e.plugins.has("WidgetToolbarRepository")&&e.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._draggedRange&&(t&&this.isEnabled&&n.deleteContent(n.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function rk(t,e,n){const o=t.model,i=t.editing.mapper;let r=null;const s=e?e[0].start:null;if(n.is("uiElement")&&(n=n.parent),r=function(t,e){const n=t.model,o=t.editing.mapper;if(eb(e))return n.createRangeOn(o.toModelElement(e));if(!e.is("editableElement")){const t=e.findAncestor((t=>eb(t)||t.is("editableElement")));if(eb(t))return n.createRangeOn(o.toModelElement(t))}return null}(t,n),r)return r;const a=function(t,e){const n=t.editing.mapper,o=t.editing.view,i=n.toModelElement(e);if(i)return i;const r=o.createPositionBefore(e),s=n.findMappedViewAncestor(r);return n.toModelElement(s)}(t,n),l=s?i.toModelPosition(s):null;return l?(r=function(t,e,n){const o=t.model;if(!o.schema.checkChild(n,"$block"))return null;const i=o.createPositionAt(n,0),r=e.path.slice(0,i.path.length),s=o.createPositionFromPath(e.root,r).nodeAfter;if(s&&o.schema.isObject(s))return o.createRangeOn(s);return null}(t,l,a),r||(r=o.schema.getNearestSelectionRange(l,dr.isGecko?"forward":"backward"),r||function(t,e){const n=t.model;for(;e;){if(n.schema.isObject(e))return n.createRangeOn(e);e=e.parent}}(t,l.parent))):function(t,e){const n=t.model,o=n.schema,i=n.createPositionAt(e,0);return o.getNearestSelectionRange(i,"forward")}(t,a)}function sk(t){return dr.isGecko?t.dropEffect:["all","copyMove"].includes(t.effectAllowed)?"move":"copy"}function ak(t,e){let n;function o(...i){o.cancel(),n=setTimeout((()=>t(...i)),e)}return o.cancel=()=>{clearTimeout(n)},o}function lk(t){if(t.is("editableElement"))return null;if(t.hasClass("ck-widget__selection-handle"))return t.findAncestor(eb);if(eb(t))return t;const e=t.findAncestor((t=>eb(t)||t.is("editableElement")));return eb(e)?e:null}class ck extends L{static get pluginName(){return"PastePlainText"}static get requires(){return[ek]}init(){const t=this.editor,e=t.model,n=t.editing.view,o=n.document,i=e.document.selection;let r=!1;n.addObserver(Qb),this.listenTo(o,"keydown",((t,e)=>{r=e.shiftKey})),t.plugins.get(ek).on("contentInsertion",((t,n)=>{(r||function(t,e){if(t.childCount>1)return!1;const n=t.getChild(0);if(e.isObject(n))return!1;return 0==[...n.getAttributeKeys()].length}(n.content,e.schema))&&e.change((t=>{const o=Array.from(i.getAttributes()).filter((([t])=>e.schema.getAttributeProperties(t).isFormatting));i.isCollapsed||e.deleteContent(i,{doNotAutoparagraph:!0}),o.push(...i.getAttributes());const r=t.createRangeIn(n.content);for(const e of r.getItems())e.is("$textProxy")&&t.setAttributes(o,e)}))}))}}class dk extends L{static get pluginName(){return"Clipboard"}static get requires(){return[ek,ik,ck]}}function hk(t,e){return t=>{t.on(`attribute:srcset:${e}`,n)};function n(e,n,o){if(!o.consumable.consume(n.item,e.name))return;const i=o.writer,r=o.mapper.toViewElement(n.item),s=t.findViewImgElement(r);if(null===n.attributeNewValue){const t=n.attributeOldValue;t.data&&(i.removeAttribute("srcset",s),i.removeAttribute("sizes",s),t.width&&i.removeAttribute("width",s))}else{const t=n.attributeNewValue;t.data&&(i.setAttribute("srcset",t.data,s),i.setAttribute("sizes","100vw",s),t.width&&i.setAttribute("width",t.width,s))}}}function uk(t,e,n){return t=>{t.on(`attribute:${n}:${e}`,o)};function o(e,n,o){if(!o.consumable.consume(n.item,e.name))return;const i=o.writer,r=o.mapper.toViewElement(n.item),s=t.findViewImgElement(r);i.setAttribute(n.attributeKey,n.attributeNewValue||"",s)}}class gk extends ys{observe(t){this.listenTo(t,"load",((t,e)=>{const n=e.target;this.checkShouldIgnoreEventFromTarget(n)||"IMG"==n.tagName&&this._fireEvents(e)}),{useCapture:!0})}_fireEvents(t){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",t))}}class mk extends q{constructor(t){super(t);const e=t.config.get("image.insert.type");t.plugins.has("ImageBlockEditing")||"block"===e&&c("image-block-plugin-required"),t.plugins.has("ImageInlineEditing")||"inline"===e&&c("image-inline-plugin-required")}refresh(){this.isEnabled=this.editor.plugins.get("ImageUtils").isImageAllowed()}execute(t){const e=_o(t.source),n=this.editor.model.document.selection,o=this.editor.plugins.get("ImageUtils"),i=Object.fromEntries(n.getAttributes());e.forEach(((t,e)=>{const r=n.getSelectedElement();if("string"==typeof t&&(t={src:t}),e&&r&&o.isImage(r)){const e=this.editor.model.createPositionAfter(r);o.insertImage({...t,...i},e)}else o.insertImage({...t,...i})}))}}class pk extends L{static get requires(){return[qb]}static get pluginName(){return"ImageEditing"}init(){const t=this.editor,e=t.conversion;t.editing.view.addObserver(gk),e.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:t=>{const e={data:t.getAttribute("srcset")};return t.hasAttribute("width")&&(e.width=t.getAttribute("width")),e}}});const n=new mk(t);t.commands.add("insertImage",n),t.commands.add("imageInsert",n)}}class fk extends q{constructor(t,e){super(t),this._modelElementName=e}refresh(){const t=this.editor.plugins.get("ImageUtils"),e=t.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=t.isInlineImage(e):this.isEnabled=t.isBlockImage(e)}execute(){const t=this.editor,e=this.editor.model,n=t.plugins.get("ImageUtils"),o=n.getClosestSelectedImageElement(e.document.selection),i=Object.fromEntries(o.getAttributes());return i.src||i.uploadId?e.change((t=>{const r=Array.from(e.markers).filter((t=>t.getRange().containsItem(o))),s=n.insertImage(i,e.createSelection(o,"on"),this._modelElementName);if(!s)return null;const a=t.createRangeOn(s);for(const e of r){const n=e.getRange(),o="$graveyard"!=n.root.rootName?n.getJoined(a,!0):a;t.updateMarker(e,{range:o})}return{oldElement:o,newElement:s}})):null}}class bk extends L{static get requires(){return[pk,qb,ek]}static get pluginName(){return"ImageBlockEditing"}init(){const t=this.editor;t.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),t.plugins.has("ImageInlineEditing")&&(t.commands.add("imageTypeBlock",new fk(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const t=this.editor,e=t.t,n=t.conversion,o=t.plugins.get("ImageUtils");n.for("dataDowncast").elementToStructure({model:"imageBlock",view:(t,{writer:e})=>Mb(e)}),n.for("editingDowncast").elementToStructure({model:"imageBlock",view:(t,{writer:n})=>o.toImageWidget(Mb(n),n,e("image widget"))}),n.for("downcast").add(uk(o,"imageBlock","src")).add(uk(o,"imageBlock","alt")).add(hk(o,"imageBlock")),n.for("upcast").elementToElement({view:Lb(t,"imageBlock"),model:(t,{writer:e})=>e.createElement("imageBlock",t.hasAttribute("src")?{src:t.getAttribute("src")}:null)}).add(function(t){return t=>{t.on("element:figure",e)};function e(e,n,o){if(!o.consumable.test(n.viewItem,{name:!0,classes:"image"}))return;const i=t.findViewImgElement(n.viewItem);if(!i||!o.consumable.test(i,{name:!0}))return;o.consumable.consume(n.viewItem,{name:!0,classes:"image"});const r=Ea(o.convertItem(i,n.modelCursor).modelRange.getItems());r?(o.convertChildren(n.viewItem,r),o.updateConversionResult(r,n)):o.consumable.revert(n.viewItem,{name:!0,classes:"image"})}}(o))}_setupClipboardIntegration(){const t=this.editor,e=t.model,n=t.editing.view,o=t.plugins.get("ImageUtils");this.listenTo(t.plugins.get("ClipboardPipeline"),"inputTransformation",((i,r)=>{const s=Array.from(r.content.getChildren());let a;if(!s.every(o.isInlineImageView))return;a=r.targetRanges?t.editing.mapper.toModelRange(r.targetRanges[0]):e.document.selection.getFirstRange();const l=e.createSelection(a);if("imageBlock"===Hb(e.schema,l)){const t=new Lg(n.document),e=s.map((e=>t.createElement("figure",{class:"image"},e)));r.content=t.createDocumentFragment(e)}}))}}var kk=n(3508),wk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(kk.Z,wk);kk.Z.locals;class _k extends L{static get requires(){return[bk,xb,Jb]}static get pluginName(){return"ImageBlock"}}class Ak extends L{static get requires(){return[pk,qb,ek]}static get pluginName(){return"ImageInlineEditing"}init(){const t=this.editor,e=t.model.schema;e.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"]}),e.addChildCheck(((t,e)=>{if(t.endsWith("caption")&&"imageInline"===e.name)return!1})),this._setupConversion(),t.plugins.has("ImageBlockEditing")&&(t.commands.add("imageTypeInline",new fk(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const t=this.editor,e=t.t,n=t.conversion,o=t.plugins.get("ImageUtils");n.for("dataDowncast").elementToElement({model:"imageInline",view:(t,{writer:e})=>e.createEmptyElement("img")}),n.for("editingDowncast").elementToStructure({model:"imageInline",view:(t,{writer:n})=>o.toImageWidget(function(t){return t.createContainerElement("span",{class:"image-inline"},t.createEmptyElement("img"))}(n),n,e("image widget"))}),n.for("downcast").add(uk(o,"imageInline","src")).add(uk(o,"imageInline","alt")).add(hk(o,"imageInline")),n.for("upcast").elementToElement({view:Lb(t,"imageInline"),model:(t,{writer:e})=>e.createElement("imageInline",t.hasAttribute("src")?{src:t.getAttribute("src")}:null)})}_setupClipboardIntegration(){const t=this.editor,e=t.model,n=t.editing.view,o=t.plugins.get("ImageUtils");this.listenTo(t.plugins.get("ClipboardPipeline"),"inputTransformation",((i,r)=>{const s=Array.from(r.content.getChildren());let a;if(!s.every(o.isBlockImageView))return;a=r.targetRanges?t.editing.mapper.toModelRange(r.targetRanges[0]):e.document.selection.getFirstRange();const l=e.createSelection(a);if("imageInline"===Hb(e.schema,l)){const t=new Lg(n.document),e=s.map((e=>1===e.childCount?(Array.from(e.getAttributes()).forEach((n=>t.setAttribute(...n,o.findViewImgElement(e)))),e.getChild(0)):e));r.content=t.createDocumentFragment(e)}}))}}class Ck extends L{static get requires(){return[Ak,xb,Jb]}static get pluginName(){return"ImageInline"}}class vk extends q{refresh(){const t=this.editor,e=t.plugins.get("ImageCaptionUtils");if(!t.plugins.has(bk))return this.isEnabled=!1,void(this.value=!1);const n=t.model.document.selection,o=n.getSelectedElement();if(!o){const t=e.getCaptionFromModelSelection(n);return this.isEnabled=!!t,void(this.value=!!t)}this.isEnabled=this.editor.plugins.get("ImageUtils").isImage(o),this.isEnabled?this.value=!!e.getCaptionFromImageModelElement(o):this.value=!1}execute(t={}){const{focusCaptionOnShow:e}=t;this.editor.model.change((t=>{this.value?this._hideImageCaption(t):this._showImageCaption(t,e)}))}_showImageCaption(t,e){const n=this.editor.model.document.selection,o=this.editor.plugins.get("ImageCaptionEditing");let i=n.getSelectedElement();const r=o._getSavedCaption(i);this.editor.plugins.get("ImageUtils").isInlineImage(i)&&(this.editor.execute("imageTypeBlock"),i=n.getSelectedElement());const s=r||t.createElement("caption");t.append(s,i),e&&t.setSelection(s,"in")}_hideImageCaption(t){const e=this.editor,n=e.model.document.selection,o=e.plugins.get("ImageCaptionEditing"),i=e.plugins.get("ImageCaptionUtils");let r,s=n.getSelectedElement();s?r=i.getCaptionFromImageModelElement(s):(r=i.getCaptionFromModelSelection(n),s=r.parent),o._saveCaption(s,r),t.setSelection(s,"on"),t.remove(r)}}class yk extends L{static get pluginName(){return"ImageCaptionUtils"}static get requires(){return[qb]}getCaptionFromImageModelElement(t){for(const e of t.getChildren())if(e&&e.is("element","caption"))return e;return null}getCaptionFromModelSelection(t){const e=this.editor.plugins.get("ImageUtils"),n=t.getFirstPosition().findAncestor("caption");return n&&e.isBlockImage(n.parent)?n:null}matchImageCaptionViewElement(t){const e=this.editor.plugins.get("ImageUtils");return"figcaption"==t.name&&e.isBlockImageView(t.parent)?{name:!0}:null}}class xk extends L{static get requires(){return[qb,yk]}static get pluginName(){return"ImageCaptionEditing"}constructor(t){super(t),this._savedCaptionsMap=new WeakMap}init(){const t=this.editor,e=t.model.schema;e.isRegistered("caption")?e.extend("caption",{allowIn:"imageBlock"}):e.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),t.commands.add("toggleImageCaption",new vk(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const t=this.editor,e=t.editing.view,n=t.plugins.get("ImageUtils"),o=t.plugins.get("ImageCaptionUtils"),i=t.t;t.conversion.for("upcast").elementToElement({view:t=>o.matchImageCaptionViewElement(t),model:"caption"}),t.conversion.for("dataDowncast").elementToElement({model:"caption",view:(t,{writer:e})=>n.isBlockImage(t.parent)?e.createContainerElement("figcaption"):null}),t.conversion.for("editingDowncast").elementToElement({model:"caption",view:(t,{writer:o})=>{if(!n.isBlockImage(t.parent))return null;const r=o.createEditableElement("figcaption");o.setCustomProperty("imageCaption",!0,r),Cg({view:e,element:r,text:i("Enter image caption"),keepOnFocus:!0});const s=t.parent.getAttribute("alt");return ab(r,o,{label:s?i("Caption for image: %0",[s]):i("Caption for the image")})}})}_setupImageTypeCommandsIntegration(){const t=this.editor,e=t.plugins.get("ImageUtils"),n=t.plugins.get("ImageCaptionUtils"),o=t.commands.get("imageTypeInline"),i=t.commands.get("imageTypeBlock"),r=t=>{if(!t.return)return;const{oldElement:o,newElement:i}=t.return;if(!o)return;if(e.isBlockImage(o)){const t=n.getCaptionFromImageModelElement(o);if(t)return void this._saveCaption(i,t)}const r=this._getSavedCaption(o);r&&this._saveCaption(i,r)};o&&this.listenTo(o,"execute",r,{priority:"low"}),i&&this.listenTo(i,"execute",r,{priority:"low"})}_getSavedCaption(t){const e=this._savedCaptionsMap.get(t);return e?Ga.fromJSON(e):null}_saveCaption(t,e){this._savedCaptionsMap.set(t,e.toJSON())}_registerCaptionReconversion(){const t=this.editor,e=t.model,n=t.plugins.get("ImageUtils"),o=t.plugins.get("ImageCaptionUtils");e.document.on("change:data",(()=>{const i=e.document.differ.getChanges();for(const e of i){if("alt"!==e.attributeKey)continue;const i=e.range.start.nodeAfter;if(n.isBlockImage(i)){const e=o.getCaptionFromImageModelElement(i);if(!e)return;t.editing.reconvertItem(e)}}}))}}class Ek extends L{static get requires(){return[yk]}static get pluginName(){return"ImageCaptionUI"}init(){const t=this.editor,e=t.editing.view,n=t.plugins.get("ImageCaptionUtils"),o=t.t;t.ui.componentFactory.add("toggleImageCaption",(i=>{const r=t.commands.get("toggleImageCaption"),s=new Hh(i);return s.set({icon:Bh.caption,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.bind("label").to(r,"value",(t=>o(t?"Toggle caption off":"Toggle caption on"))),this.listenTo(s,"execute",(()=>{t.execute("toggleImageCaption",{focusCaptionOnShow:!0});const o=n.getCaptionFromModelSelection(t.model.document.selection);if(o){const n=t.editing.mapper.toViewElement(o);e.scrollToTheSelection(),e.change((t=>{t.addClass("image__caption_highlighted",n)}))}t.editing.view.focus()})),s}))}}var Tk=n(2640),Dk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(Tk.Z,Dk);Tk.Z.locals;class Sk extends q{constructor(t,e){super(t),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(e.map((t=>{if(t.isDefault)for(const e of t.modelElements)this._defaultStyles[e]=t.name;return[t.name,t]})))}refresh(){const t=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!t,this.isEnabled?t.hasAttribute("imageStyle")?this.value=t.getAttribute("imageStyle"):this.value=this._defaultStyles[t.name]:this.value=!1}execute(t={}){const e=this.editor,n=e.model,o=e.plugins.get("ImageUtils");n.change((e=>{const i=t.value;let r=o.getClosestSelectedImageElement(n.document.selection);i&&this.shouldConvertImageType(i,r)&&(this.editor.execute(o.isBlockImage(r)?"imageTypeInline":"imageTypeBlock"),r=o.getClosestSelectedImageElement(n.document.selection)),!i||this._styles.get(i).isDefault?e.removeAttribute("imageStyle",r):e.setAttribute("imageStyle",i,r)}))}shouldConvertImageType(t,e){return!this._styles.get(t).modelElements.includes(e.name)}}const{objectFullWidth:Bk,objectInline:Ik,objectLeft:Pk,objectRight:Rk,objectCenter:zk,objectBlockLeft:Vk,objectBlockRight:Fk}=Bh,Ok={get inline(){return{name:"inline",title:"In line",icon:Ik,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:Pk,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:Vk,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:zk,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:Rk,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:Fk,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:zk,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:Rk,modelElements:["imageBlock"],className:"image-style-side"}}},Nk={full:Bk,left:Vk,right:Fk,center:zk,inlineLeft:Pk,inlineRight:Rk,inline:Ik},Mk=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function Lk(t){c("image-style-configuration-definition-invalid",t)}const Hk={normalizeStyles:function(t){return(t.configuredStyles.options||[]).map((t=>function(t){t="string"==typeof t?Ok[t]?{...Ok[t]}:{name:t}:function(t,e){const n={...e};for(const o in t)Object.prototype.hasOwnProperty.call(e,o)||(n[o]=t[o]);return n}(Ok[t.name],t);"string"==typeof t.icon&&(t.icon=Nk[t.icon]||t.icon);return t}(t))).filter((e=>function(t,{isBlockPluginLoaded:e,isInlinePluginLoaded:n}){const{modelElements:o,name:i}=t;if(!(o&&o.length&&i))return Lk({style:t}),!1;{const i=[e?"imageBlock":null,n?"imageInline":null];if(!o.some((t=>i.includes(t))))return c("image-style-missing-dependency",{style:t,missingPlugins:o.map((t=>"imageBlock"===t?"ImageBlockEditing":"ImageInlineEditing"))}),!1}return!0}(e,t)))},getDefaultStylesConfiguration:function(t,e){return t&&e?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:t?{options:["block","side"]}:e?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(t){return t.has("ImageBlockEditing")&&t.has("ImageInlineEditing")?[...Mk]:[]},warnInvalidStyle:Lk,DEFAULT_OPTIONS:Ok,DEFAULT_ICONS:Nk,DEFAULT_DROPDOWN_DEFINITIONS:Mk};function qk(t,e){for(const n of e)if(n.name===t)return n}class Wk extends L{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[qb]}init(){const{normalizeStyles:t,getDefaultStylesConfiguration:e}=Hk,n=this.editor,o=n.plugins.has("ImageBlockEditing"),i=n.plugins.has("ImageInlineEditing");n.config.define("image.styles",e(o,i)),this.normalizedStyles=t({configuredStyles:n.config.get("image.styles"),isBlockPluginLoaded:o,isInlinePluginLoaded:i}),this._setupConversion(o,i),this._setupPostFixer(),n.commands.add("imageStyle",new Sk(n,this.normalizedStyles))}_setupConversion(t,e){const n=this.editor,o=n.model.schema,i=(r=this.normalizedStyles,(t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const o=qk(e.attributeNewValue,r),i=qk(e.attributeOldValue,r),s=n.mapper.toViewElement(e.item),a=n.writer;i&&a.removeClass(i.className,s),o&&a.addClass(o.className,s)});var r;const s=function(t){const e={imageInline:t.filter((t=>!t.isDefault&&t.modelElements.includes("imageInline"))),imageBlock:t.filter((t=>!t.isDefault&&t.modelElements.includes("imageBlock")))};return(t,n,o)=>{if(!n.modelRange)return;const i=n.viewItem,r=Ea(n.modelRange.getItems());if(r&&o.schema.checkAttribute(r,"imageStyle"))for(const t of e[r.name])o.consumable.consume(i,{classes:t.className})&&o.writer.setAttribute("imageStyle",t.name,r)}}(this.normalizedStyles);n.editing.downcastDispatcher.on("attribute:imageStyle",i),n.data.downcastDispatcher.on("attribute:imageStyle",i),t&&(o.extend("imageBlock",{allowAttributes:"imageStyle"}),n.data.upcastDispatcher.on("element:figure",s,{priority:"low"})),e&&(o.extend("imageInline",{allowAttributes:"imageStyle"}),n.data.upcastDispatcher.on("element:img",s,{priority:"low"}))}_setupPostFixer(){const t=this.editor,e=t.model.document,n=t.plugins.get(qb),o=new Map(this.normalizedStyles.map((t=>[t.name,t])));e.registerPostFixer((t=>{let i=!1;for(const r of e.differ.getChanges())if("insert"==r.type||"attribute"==r.type&&"imageStyle"==r.attributeKey){let e="insert"==r.type?r.position.nodeAfter:r.range.start.nodeAfter;if(e&&e.is("element","paragraph")&&e.childCount>0&&(e=e.getChild(0)),!n.isImage(e))continue;const s=e.getAttribute("imageStyle");if(!s)continue;const a=o.get(s);a&&a.modelElements.includes(e.name)||(t.removeAttribute("imageStyle",e),i=!0)}return i}))}}var jk=n(5083),Uk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(jk.Z,Uk);jk.Z.locals;class $k extends L{static get requires(){return[Wk]}static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const t=this.editor.t;return{"Wrap text":t("Wrap text"),"Break text":t("Break text"),"In line":t("In line"),"Full size image":t("Full size image"),"Side image":t("Side image"),"Left aligned image":t("Left aligned image"),"Centered image":t("Centered image"),"Right aligned image":t("Right aligned image")}}init(){const t=this.editor.plugins,e=this.editor.config.get("image.toolbar")||[],n=Gk(t.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const t of n)this._createButton(t);const o=Gk([...e.filter(E),...Hk.getDefaultDropdownDefinitions(t)],this.localizedDefaultStylesTitles);for(const t of o)this._createDropdown(t,n)}_createDropdown(t,e){const n=this.editor.ui.componentFactory;n.add(t.name,(o=>{let i;const{defaultItem:r,items:s,title:a}=t,l=s.filter((t=>e.find((({name:e})=>Kk(e)===t)))).map((t=>{const e=n.create(t);return t===r&&(i=e),e}));s.length!==l.length&&Hk.warnInvalidStyle({dropdown:t});const c=Tu(o,nu),d=c.buttonView,h=d.arrowView;return Du(c,l,{enableActiveItemFocusOnDropdownOpen:!0}),d.set({label:Zk(a,i.label),class:null,tooltip:!0}),h.unbind("label"),h.set({label:a}),d.bind("icon").toMany(l,"isOn",((...t)=>{const e=t.findIndex(fi);return e<0?i.icon:l[e].icon})),d.bind("label").toMany(l,"isOn",((...t)=>{const e=t.findIndex(fi);return Zk(a,e<0?i.label:l[e].label)})),d.bind("isOn").toMany(l,"isOn",((...t)=>t.some(fi))),d.bind("class").toMany(l,"isOn",((...t)=>t.some(fi)?"ck-splitbutton_flatten":null)),d.on("execute",(()=>{l.some((({isOn:t})=>t))?c.isOpen=!c.isOpen:i.fire("execute")})),c.bind("isEnabled").toMany(l,"isEnabled",((...t)=>t.some(fi))),this.listenTo(c,"execute",(()=>{this.editor.editing.view.focus()})),c}))}_createButton(t){const e=t.name;this.editor.ui.componentFactory.add(Kk(e),(n=>{const o=this.editor.commands.get("imageStyle"),i=new Hh(n);return i.set({label:t.title,icon:t.icon,tooltip:!0,isToggleable:!0}),i.bind("isEnabled").to(o,"isEnabled"),i.bind("isOn").to(o,"value",(t=>t===e)),i.on("execute",this._executeCommand.bind(this,e)),i}))}_executeCommand(t){this.editor.execute("imageStyle",{value:t}),this.editor.editing.view.focus()}}function Gk(t,e){for(const n of t)e[n.title]&&(n.title=e[n.title]);return t}function Kk(t){return`imageStyle:${t}`}function Zk(t,e){return(t?t+": ":"")+e}function Jk(t){const e=t.map((t=>t.replace("+","\\+")));return new RegExp(`^image\\/(${e.join("|")})$`)}function Yk(t){return new Promise(((e,n)=>{const o=t.getAttribute("src");fetch(o).then((t=>t.blob())).then((t=>{const n=Qk(t,o),i=n.replace("image/",""),r=new File([t],`image.${i}`,{type:n});e(r)})).catch((t=>t&&"TypeError"===t.name?function(t){return function(t){return new Promise(((e,n)=>{const o=Co.document.createElement("img");o.addEventListener("load",(()=>{const t=Co.document.createElement("canvas");t.width=o.width,t.height=o.height;t.getContext("2d").drawImage(o,0,0),t.toBlob((t=>t?e(t):n()))})),o.addEventListener("error",(()=>n())),o.src=t}))}(t).then((e=>{const n=Qk(e,t),o=n.replace("image/","");return new File([e],`image.${o}`,{type:n})}))}(o).then(e).catch(n):n(t)))}))}function Qk(t,e){return t.type?t.type:e.match(/data:(image\/\w+);base64/)?e.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class Xk extends L{static get pluginName(){return"ImageUploadUI"}init(){const t=this.editor,e=t.t,n=n=>{const o=new tp(n),i=t.commands.get("uploadImage"),r=t.config.get("image.upload.types"),s=Jk(r);return o.set({acceptedType:r.map((t=>`image/${t}`)).join(","),allowMultipleFiles:!0}),o.buttonView.set({label:e("Insert image"),icon:Bh.image,tooltip:!0}),o.buttonView.bind("isEnabled").to(i),o.on("done",((e,n)=>{const o=Array.from(n).filter((t=>s.test(t.type)));o.length&&(t.execute("uploadImage",{file:o}),t.editing.view.focus())})),o};t.ui.componentFactory.add("uploadImage",n),t.ui.componentFactory.add("imageUpload",n)}}var tw=n(3689),ew={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(tw.Z,ew);tw.Z.locals;var nw=n(4036),ow={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(nw.Z,ow);nw.Z.locals;var iw=n(3773),rw={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(iw.Z,rw);iw.Z.locals;class sw extends L{static get pluginName(){return"ImageUploadProgress"}constructor(t){super(t),this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const t=this.editor;t.plugins.has("ImageBlockEditing")&&t.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",((...t)=>this.uploadStatusChange(...t))),t.plugins.has("ImageInlineEditing")&&t.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",((...t)=>this.uploadStatusChange(...t)))}uploadStatusChange(t,e,n){const o=this.editor,i=e.item,r=i.getAttribute("uploadId");if(!n.consumable.consume(e.item,t.name))return;const s=o.plugins.get("ImageUtils"),a=o.plugins.get(Qm),l=r?e.attributeNewValue:null,c=this.placeholder,d=o.editing.mapper.toViewElement(i),h=n.writer;if("reading"==l)return aw(d,h),void lw(s,c,d,h);if("uploading"==l){const t=a.loaders.get(r);return aw(d,h),void(t?(cw(d,h),function(t,e,n,o){const i=function(t){const e=t.createUIElement("div",{class:"ck-progress-bar"});return t.setCustomProperty("progressBar",!0,e),e}(e);e.insert(e.createPositionAt(t,"end"),i),n.on("change:uploadedPercent",((t,e,n)=>{o.change((t=>{t.setStyle("width",n+"%",i)}))}))}(d,h,t,o.editing.view),function(t,e,n,o){if(o.data){const i=t.findViewImgElement(e);n.setAttribute("src",o.data,i)}}(s,d,h,t)):lw(s,c,d,h))}"complete"==l&&a.loaders.get(r)&&function(t,e,n){const o=e.createUIElement("div",{class:"ck-image-upload-complete-icon"});e.insert(e.createPositionAt(t,"end"),o),setTimeout((()=>{n.change((t=>t.remove(t.createRangeOn(o))))}),3e3)}(d,h,o.editing.view),function(t,e){hw(t,e,"progressBar")}(d,h),cw(d,h),function(t,e){e.removeClass("ck-appear",t)}(d,h)}}function aw(t,e){t.hasClass("ck-appear")||e.addClass("ck-appear",t)}function lw(t,e,n,o){n.hasClass("ck-image-upload-placeholder")||o.addClass("ck-image-upload-placeholder",n);const i=t.findViewImgElement(n);i.getAttribute("src")!==e&&o.setAttribute("src",e,i),dw(n,"placeholder")||o.insert(o.createPositionAfter(i),function(t){const e=t.createUIElement("div",{class:"ck-upload-placeholder-loader"});return t.setCustomProperty("placeholder",!0,e),e}(o))}function cw(t,e){t.hasClass("ck-image-upload-placeholder")&&e.removeClass("ck-image-upload-placeholder",t),hw(t,e,"placeholder")}function dw(t,e){for(const n of t.getChildren())if(n.getCustomProperty(e))return n}function hw(t,e,n){const o=dw(t,n);o&&e.remove(e.createRangeOn(o))}class uw extends q{refresh(){const t=this.editor,e=t.plugins.get("ImageUtils"),n=t.model.document.selection.getSelectedElement();this.isEnabled=e.isImageAllowed()||e.isImage(n)}execute(t){const e=_o(t.file),n=this.editor.model.document.selection,o=this.editor.plugins.get("ImageUtils"),i=Object.fromEntries(n.getAttributes());e.forEach(((t,e)=>{const r=n.getSelectedElement();if(e&&r&&o.isImage(r)){const e=this.editor.model.createPositionAfter(r);this._uploadImage(t,i,e)}else this._uploadImage(t,i)}))}_uploadImage(t,e,n){const o=this.editor,i=o.plugins.get(Qm).createLoader(t),r=o.plugins.get("ImageUtils");i&&r.insertImage({...e,uploadId:i.id},n)}}class gw extends L{static get requires(){return[Qm,Xu,ek,qb]}static get pluginName(){return"ImageUploadEditing"}constructor(t){super(t),t.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const t=this.editor,e=t.model.document,n=t.conversion,o=t.plugins.get(Qm),i=t.plugins.get("ImageUtils"),r=Jk(t.config.get("image.upload.types")),s=new uw(t);t.commands.add("uploadImage",s),t.commands.add("imageUpload",s),n.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(t.editing.view.document,"clipboardInput",((e,n)=>{if(o=n.dataTransfer,Array.from(o.types).includes("text/html")&&""!==o.getData("text/html"))return;var o;const i=Array.from(n.dataTransfer.files).filter((t=>!!t&&r.test(t.type)));i.length&&(e.stop(),t.model.change((e=>{n.targetRanges&&e.setSelection(n.targetRanges.map((e=>t.editing.mapper.toModelRange(e)))),t.model.enqueueChange((()=>{t.execute("uploadImage",{file:i})}))})))})),this.listenTo(t.plugins.get("ClipboardPipeline"),"inputTransformation",((e,n)=>{const r=Array.from(t.editing.view.createRangeIn(n.content)).filter((t=>function(t,e){return!(!t.isInlineImageView(e)||!e.getAttribute("src"))&&(e.getAttribute("src").match(/^data:image\/\w+;base64,/g)||e.getAttribute("src").match(/^blob:/g))}(i,t.item)&&!t.item.getAttribute("uploadProcessed"))).map((t=>({promise:Yk(t.item),imageElement:t.item})));if(!r.length)return;const s=new Lg(t.editing.view.document);for(const t of r){s.setAttribute("uploadProcessed",!0,t.imageElement);const e=o.createLoader(t.promise);e&&(s.setAttribute("src","",t.imageElement),s.setAttribute("uploadId",e.id,t.imageElement))}})),t.editing.view.document.on("dragover",((t,e)=>{e.preventDefault()})),e.on("change",(()=>{const n=e.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),i=new Set;for(const e of n)if("insert"==e.type&&"$text"!=e.name){const n=e.position.nodeAfter,r="$graveyard"==e.position.root.rootName;for(const e of mw(t,n)){const t=e.getAttribute("uploadId");if(!t)continue;const n=o.loaders.get(t);n&&(r?i.has(t)||n.abort():(i.add(t),this._uploadImageElements.set(t,e),"idle"==n.status&&this._readAndUpload(n)))}}})),this.on("uploadComplete",((t,{imageElement:e,data:n})=>{const o=n.urls?n.urls:n;this.editor.model.change((t=>{t.setAttribute("src",o.default,e),this._parseAndSetSrcsetAttributeOnImage(o,e,t)}))}),{priority:"low"})}afterInit(){const t=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&t.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&t.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(t){const e=this.editor,n=e.model,o=e.locale.t,i=e.plugins.get(Qm),r=e.plugins.get(Xu),s=e.plugins.get("ImageUtils"),a=this._uploadImageElements;return n.enqueueChange({isUndoable:!1},(e=>{e.setAttribute("uploadStatus","reading",a.get(t.id))})),t.read().then((()=>{const o=t.upload(),i=a.get(t.id);if(dr.isSafari){const t=e.editing.mapper.toViewElement(i),n=s.findViewImgElement(t);e.editing.view.once("render",(()=>{if(!n.parent)return;const t=e.editing.view.domConverter.mapViewToDom(n.parent);if(!t)return;const o=t.style.display;t.style.display="none",t._ckHack=t.offsetHeight,t.style.display=o}))}return n.enqueueChange({isUndoable:!1},(t=>{t.setAttribute("uploadStatus","uploading",i)})),o})).then((e=>{n.enqueueChange({isUndoable:!1},(n=>{const o=a.get(t.id);n.setAttribute("uploadStatus","complete",o),this.fire("uploadComplete",{data:e,imageElement:o})})),l()})).catch((e=>{if("error"!==t.status&&"aborted"!==t.status)throw e;"error"==t.status&&e&&r.showWarning(e,{title:o("Upload failed"),namespace:"upload"}),n.enqueueChange({isUndoable:!1},(e=>{e.remove(a.get(t.id))})),l()}));function l(){n.enqueueChange({isUndoable:!1},(e=>{const n=a.get(t.id);e.removeAttribute("uploadId",n),e.removeAttribute("uploadStatus",n),a.delete(t.id)})),i.destroyLoader(t)}}_parseAndSetSrcsetAttributeOnImage(t,e,n){let o=0;const i=Object.keys(t).filter((t=>{const e=parseInt(t,10);if(!isNaN(e))return o=Math.max(o,e),!0})).map((e=>`${t[e]} ${e}w`)).join(", ");""!=i&&n.setAttribute("srcset",{data:i,width:o},e)}}function mw(t,e){const n=t.plugins.get("ImageUtils");return Array.from(t.model.createRangeOn(e)).filter((t=>n.isImage(t.item))).map((t=>t.item))}class pw extends q{refresh(){const t=this.editor,e=t.plugins.get("ImageUtils").getClosestSelectedImageElement(t.model.document.selection);this.isEnabled=!!e,e&&e.hasAttribute("width")?this.value={width:e.getAttribute("width"),height:null}:this.value=null}execute(t){const e=this.editor,n=e.model,o=e.plugins.get("ImageUtils").getClosestSelectedImageElement(n.document.selection);this.value={width:t.width,height:null},o&&n.change((e=>{e.setAttribute("width",t.width,o)}))}}class fw extends L{static get requires(){return[qb]}static get pluginName(){return"ImageResizeEditing"}constructor(t){super(t),t.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const t=this.editor,e=new pw(t);this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline"),t.commands.add("resizeImage",e),t.commands.add("imageResize",e)}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:"width"}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:"width"})}_registerConverters(t){const e=this.editor;e.conversion.for("downcast").add((e=>e.on(`attribute:width:${t}`,((t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const o=n.writer,i=n.mapper.toViewElement(e.item);null!==e.attributeNewValue?(o.setStyle("width",e.attributeNewValue,i),o.addClass("image_resized",i)):(o.removeStyle("width",i),o.removeClass("image_resized",i))})))),e.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===t?"figure":"img",styles:{width:/.+/}},model:{key:"width",value:t=>t.getStyle("width")}})}}const bw={small:Bh.objectSizeSmall,medium:Bh.objectSizeMedium,large:Bh.objectSizeLarge,original:Bh.objectSizeFull};class kw extends L{static get requires(){return[fw]}static get pluginName(){return"ImageResizeButtons"}constructor(t){super(t),this._resizeUnit=t.config.get("image.resizeUnit")}init(){const t=this.editor,e=t.config.get("image.resizeOptions"),n=t.commands.get("resizeImage");this.bind("isEnabled").to(n);for(const t of e)this._registerImageResizeButton(t);this._registerImageResizeDropdown(e)}_registerImageResizeButton(t){const e=this.editor,{name:n,value:o,icon:i}=t,r=o?o+this._resizeUnit:null;e.ui.componentFactory.add(n,(n=>{const o=new Hh(n),s=e.commands.get("resizeImage"),a=this._getOptionLabelValue(t,!0);if(!bw[i])throw new l("imageresizebuttons-missing-icon",e,t);return o.set({label:a,icon:bw[i],tooltip:a,isToggleable:!0}),o.bind("isEnabled").to(this),o.bind("isOn").to(s,"value",ww(r)),this.listenTo(o,"execute",(()=>{e.execute("resizeImage",{width:r})})),o}))}_registerImageResizeDropdown(t){const e=this.editor,n=e.t,o=t.find((t=>!t.value)),i=i=>{const r=e.commands.get("resizeImage"),s=Tu(i,Xh),a=s.buttonView;return a.set({tooltip:n("Resize image"),commandValue:o.value,icon:bw.medium,isToggleable:!0,label:this._getOptionLabelValue(o),withText:!0,class:"ck-resize-image-button"}),a.bind("label").to(r,"value",(t=>t&&t.width?t.width:this._getOptionLabelValue(o))),s.bind("isOn").to(r),s.bind("isEnabled").to(this),Su(s,this._getResizeDropdownListItemDefinitions(t,r)),s.listView.ariaLabel=n("Image resize list"),this.listenTo(s,"execute",(t=>{e.execute(t.source.commandName,{width:t.source.commandValue}),e.editing.view.focus()})),s};e.ui.componentFactory.add("resizeImage",i),e.ui.componentFactory.add("imageResize",i)}_getOptionLabelValue(t,e){const n=this.editor.t;return t.label?t.label:e?t.value?n("Resize image to %0",t.value+this._resizeUnit):n("Resize image to the original size"):t.value?t.value+this._resizeUnit:n("Original")}_getResizeDropdownListItemDefinitions(t,e){const n=new ko;return t.map((t=>{const o=t.value?t.value+this._resizeUnit:null,i={type:"button",model:new tg({commandName:"resizeImage",commandValue:o,label:this._getOptionLabelValue(t),withText:!0,icon:null})};i.model.bind("isOn").to(e,"value",ww(o)),n.add(i)})),n}}function ww(t){return e=>null===t&&e===t||e&&e.width===t}const _w=/(image|image-inline)/,Aw="image_resized";class Cw extends L{static get requires(){return[Ob]}static get pluginName(){return"ImageResizeHandles"}init(){const t=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(t),this._setupResizerCreator()}_setupResizerCreator(){const t=this.editor,e=t.editing.view;e.addObserver(gk),this.listenTo(e.document,"imageLoaded",((n,o)=>{if(!o.target.matches("figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img"))return;const i=t.editing.view.domConverter,r=i.domToView(o.target).findAncestor({classes:_w});let s=this.editor.plugins.get(Ob).getResizerByViewElement(r);if(s)return void s.redraw();const a=t.editing.mapper,l=a.toModelElement(r);s=t.plugins.get(Ob).attachTo({unit:t.config.get("image.resizeUnit"),modelElement:l,viewElement:r,editor:t,getHandleHost:t=>t.querySelector("img"),getResizeHost:()=>i.mapViewToDom(a.toViewElement(l.parent)),isCentered(){const t=l.getAttribute("imageStyle");return!t||"block"==t||"alignCenter"==t},onCommit(n){e.change((t=>{t.removeClass(Aw,r)})),t.execute("resizeImage",{width:n})}}),s.on("updateSize",(()=>{r.hasClass(Aw)||e.change((t=>{t.addClass(Aw,r)}))})),s.bind("isEnabled").to(this)}))}}var vw=n(6270),yw={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(vw.Z,yw);vw.Z.locals;class xw{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(t){Array.isArray(t)?t.forEach((t=>this._definitions.add(t))):this._definitions.add(t)}getDispatcher(){return t=>{t.on("attribute:linkHref",((t,e,n)=>{if(!n.consumable.test(e.item,"attribute:linkHref"))return;if(!e.item.is("selection")&&!n.schema.isInline(e.item))return;const o=n.writer,i=o.document.selection;for(const t of this._definitions){const r=o.createAttributeElement("a",t.attributes,{priority:5});t.classes&&o.addClass(t.classes,r);for(const e in t.styles)o.setStyle(e,t.styles[e],r);o.setCustomProperty("link",!0,r),t.callback(e.attributeNewValue)?e.item.is("selection")?o.wrap(i.getFirstRange(),r):o.wrap(n.mapper.toViewRange(e.range),r):o.unwrap(n.mapper.toViewRange(e.range),r)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return t=>{t.on("attribute:linkHref:imageBlock",((t,e,{writer:n,mapper:o})=>{const i=o.toViewElement(e.item),r=Array.from(i.getChildren()).find((t=>"a"===t.name));for(const t of this._definitions){const o=Vo(t.attributes);if(t.callback(e.attributeNewValue)){for(const[t,e]of o)"class"===t?n.addClass(e,r):n.setAttribute(t,e,r);t.classes&&n.addClass(t.classes,r);for(const e in t.styles)n.setStyle(e,t.styles[e],r)}else{for(const[t,e]of o)"class"===t?n.removeClass(e,r):n.removeAttribute(t,r);t.classes&&n.removeClass(t.classes,r);for(const e in t.styles)n.removeStyle(e,r)}}}))}}}const Ew=function(t,e,n){var o=t.length;return n=void 0===n?o:n,!e&&n>=o?t:ii(t,e,n)};var Tw=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const Dw=function(t){return Tw.test(t)};const Sw=function(t){return t.split("")};var Bw="[\\ud800-\\udfff]",Iw="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Pw="\\ud83c[\\udffb-\\udfff]",Rw="[^\\ud800-\\udfff]",zw="(?:\\ud83c[\\udde6-\\uddff]){2}",Vw="[\\ud800-\\udbff][\\udc00-\\udfff]",Fw="(?:"+Iw+"|"+Pw+")"+"?",Ow="[\\ufe0e\\ufe0f]?",Nw=Ow+Fw+("(?:\\u200d(?:"+[Rw,zw,Vw].join("|")+")"+Ow+Fw+")*"),Mw="(?:"+[Rw+Iw+"?",Iw,zw,Vw,Bw].join("|")+")",Lw=RegExp(Pw+"(?="+Pw+")|"+Mw+Nw,"g");const Hw=function(t){return t.match(Lw)||[]};const qw=function(t){return Dw(t)?Hw(t):Sw(t)};const Ww=function(t){return function(e){e=Xo(e);var n=Dw(e)?qw(e):void 0,o=n?n[0]:e.charAt(0),i=n?Ew(n,1).join(""):e.slice(1);return o[t]()+i}}("toUpperCase"),jw=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Uw=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,$w=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,Gw=/^((\w+:(\/{2,})?)|(\W))/i,Kw="Ctrl+K";function Zw(t,{writer:e}){const n=e.createAttributeElement("a",{href:t},{priority:5});return e.setCustomProperty("link",!0,n),n}function Jw(t){return function(t){return t.replace(jw,"").match(Uw)}(t=String(t))?t:"#"}function Yw(t,e){return!!t&&e.checkAttribute(t.name,"linkHref")}function Qw(t,e){const n=(o=t,$w.test(o)?"mailto:":e);var o;const i=!!n&&!Gw.test(t);return t&&i?n+t:t}function Xw(t){window.open(t,"_blank","noopener")}class t_ extends q{constructor(t){super(t),this.manualDecorators=new ko,this.automaticDecorators=new xw}restoreManualDecoratorStates(){for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}refresh(){const t=this.editor.model,e=t.document.selection,n=e.getSelectedElement()||Ea(e.getSelectedBlocks());Yw(n,t.schema)?(this.value=n.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttribute(n,"linkHref")):(this.value=e.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttributeInSelection(e,"linkHref"));for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}execute(t,e={}){const n=this.editor.model,o=n.document.selection,i=[],r=[];for(const t in e)e[t]?i.push(t):r.push(t);n.change((e=>{if(o.isCollapsed){const s=o.getFirstPosition();if(o.hasAttribute("linkHref")){const a=zp(s,"linkHref",o.getAttribute("linkHref"),n);e.setAttribute("linkHref",t,a),i.forEach((t=>{e.setAttribute(t,!0,a)})),r.forEach((t=>{e.removeAttribute(t,a)})),e.setSelection(e.createPositionAfter(a.end.nodeBefore))}else if(""!==t){const r=Vo(o.getAttributes());r.set("linkHref",t),i.forEach((t=>{r.set(t,!0)}));const{end:a}=n.insertContent(e.createText(t,r),s);e.setSelection(a)}["linkHref",...i,...r].forEach((t=>{e.removeSelectionAttribute(t)}))}else{const s=n.schema.getValidRanges(o.getRanges(),"linkHref"),a=[];for(const t of o.getSelectedBlocks())n.schema.checkAttribute(t,"linkHref")&&a.push(e.createRangeOn(t));const l=a.slice();for(const t of s)this._isRangeToUpdate(t,a)&&l.push(t);for(const n of l)e.setAttribute("linkHref",t,n),i.forEach((t=>{e.setAttribute(t,!0,n)})),r.forEach((t=>{e.removeAttribute(t,n)}))}}))}_getDecoratorStateFromModel(t){const e=this.editor.model,n=e.document.selection,o=n.getSelectedElement();return Yw(o,e.schema)?o.getAttribute(t):n.getAttribute(t)}_isRangeToUpdate(t,e){for(const n of e)if(n.containsRange(t))return!1;return!0}}class e_ extends q{refresh(){const t=this.editor.model,e=t.document.selection,n=e.getSelectedElement();Yw(n,t.schema)?this.isEnabled=t.schema.checkAttribute(n,"linkHref"):this.isEnabled=t.schema.checkAttributeInSelection(e,"linkHref")}execute(){const t=this.editor,e=this.editor.model,n=e.document.selection,o=t.commands.get("link");e.change((t=>{const i=n.isCollapsed?[zp(n.getFirstPosition(),"linkHref",n.getAttribute("linkHref"),e)]:e.schema.getValidRanges(n.getRanges(),"linkHref");for(const e of i)if(t.removeAttribute("linkHref",e),o)for(const n of o.manualDecorators)t.removeAttribute(n.id,e)}))}}class n_{constructor({id:t,label:e,attributes:n,classes:o,styles:i,defaultValue:r}){this.id=t,this.set("value"),this.defaultValue=r,this.label=e,this.attributes=n,this.classes=o,this.styles=i}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}M(n_,P);var o_=n(9773),i_={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(o_.Z,i_);o_.Z.locals;const r_="automatic",s_=/^(https?:)?\/\//;class a_ extends L{static get pluginName(){return"LinkEditing"}static get requires(){return[Cp,fp,ek]}constructor(t){super(t),t.config.define("link",{addTargetToExternalLinks:!1})}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:"linkHref"}),t.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:Zw}),t.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(t,e)=>Zw(Jw(t),e)}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:t=>t.getAttribute("href")}}),t.commands.add("link",new t_(t)),t.commands.add("unlink",new e_(t));const e=function(t,e){const n={"Open in a new tab":t("Open in a new tab"),Downloadable:t("Downloadable")};return e.forEach((t=>(t.label&&n[t.label]&&(t.label=n[t.label]),t))),e}(t.t,function(t){const e=[];if(t)for(const[n,o]of Object.entries(t)){const t=Object.assign({},o,{id:`link${Ww(n)}`});e.push(t)}return e}(t.config.get("link.decorators")));this._enableAutomaticDecorators(e.filter((t=>t.mode===r_))),this._enableManualDecorators(e.filter((t=>"manual"===t.mode)));t.plugins.get(Cp).registerAttribute("linkHref"),Fp(t,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink()}_enableAutomaticDecorators(t){const e=this.editor,n=e.commands.get("link").automaticDecorators;e.config.get("link.addTargetToExternalLinks")&&n.add({id:"linkIsExternal",mode:r_,callback:t=>s_.test(t),attributes:{target:"_blank",rel:"noopener noreferrer"}}),n.add(t),n.length&&e.conversion.for("downcast").add(n.getDispatcher())}_enableManualDecorators(t){if(!t.length)return;const e=this.editor,n=e.commands.get("link").manualDecorators;t.forEach((t=>{e.model.schema.extend("$text",{allowAttributes:t.id}),t=new n_(t),n.add(t),e.conversion.for("downcast").attributeToElement({model:t.id,view:(e,{writer:n,schema:o},{item:i})=>{if((i.is("selection")||o.isInline(i))&&e){const e=n.createAttributeElement("a",t.attributes,{priority:5});t.classes&&n.addClass(t.classes,e);for(const o in t.styles)n.setStyle(o,t.styles[o],e);return n.setCustomProperty("link",!0,e),e}}}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",...t._createPattern()},model:{key:t.id}})}))}_enableLinkOpen(){const t=this.editor,e=t.editing.view.document,n=t.model.document;this.listenTo(e,"click",((t,e)=>{if(!(dr.isMac?e.domEvent.metaKey:e.domEvent.ctrlKey))return;let n=e.domTarget;if("a"!=n.tagName.toLowerCase()&&(n=n.closest("a")),!n)return;const o=n.getAttribute("href");o&&(t.stop(),e.preventDefault(),Xw(o))}),{context:"$capture"}),this.listenTo(e,"enter",((t,e)=>{const o=n.selection,i=o.getSelectedElement(),r=i?i.getAttribute("linkHref"):o.getAttribute("linkHref");r&&e.domEvent.altKey&&(t.stop(),Xw(r))}),{context:"a"})}_enableInsertContentSelectionAttributesFixer(){const t=this.editor.model,e=t.document.selection;this.listenTo(t,"insertContent",(()=>{const n=e.anchor.nodeBefore,o=e.anchor.nodeAfter;e.hasAttribute("linkHref")&&n&&n.hasAttribute("linkHref")&&(o&&o.hasAttribute("linkHref")||t.change((e=>{l_(e,d_(t.schema))})))}),{priority:"low"})}_enableClickingAfterLink(){const t=this.editor,e=t.model;t.editing.view.addObserver(Mg);let n=!1;this.listenTo(t.editing.view.document,"mousedown",(()=>{n=!0})),this.listenTo(t.editing.view.document,"selectionChange",(()=>{if(!n)return;n=!1;const t=e.document.selection;if(!t.isCollapsed)return;if(!t.hasAttribute("linkHref"))return;const o=t.getFirstPosition(),i=zp(o,"linkHref",t.getAttribute("linkHref"),e);(o.isTouching(i.start)||o.isTouching(i.end))&&e.change((t=>{l_(t,d_(e.schema))}))}))}_enableTypingOverLink(){const t=this.editor,e=t.editing.view;let n,o;this.listenTo(e.document,"delete",(()=>{o=!0}),{priority:"high"}),this.listenTo(t.model,"deleteContent",(()=>{const e=t.model.document.selection;e.isCollapsed||(o?o=!1:c_(t)&&function(t){const e=t.document.selection,n=e.getFirstPosition(),o=e.getLastPosition(),i=n.nodeAfter;if(!i)return!1;if(!i.is("$text"))return!1;if(!i.hasAttribute("linkHref"))return!1;const r=o.textNode||o.nodeBefore;if(i===r)return!0;return zp(n,"linkHref",i.getAttribute("linkHref"),t).containsRange(t.createRange(n,o),!0)}(t.model)&&(n=e.getAttributes()))}),{priority:"high"}),this.listenTo(t.model,"insertContent",((e,[i])=>{o=!1,c_(t)&&n&&(t.model.change((t=>{for(const[e,o]of n)t.setAttribute(e,o,i)})),n=null)}),{priority:"high"})}_handleDeleteContentAfterLink(){const t=this.editor,e=t.model,n=e.document.selection,o=t.editing.view;let i=!1,r=!1;this.listenTo(o.document,"delete",((t,e)=>{r=e.domEvent.keyCode===mr.backspace}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{i=!1;const t=n.getFirstPosition(),o=n.getAttribute("linkHref");if(!o)return;const r=zp(t,"linkHref",o,e);i=r.containsPosition(t)||r.end.isEqual(t)}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{r&&(r=!1,i||t.model.enqueueChange((t=>{l_(t,d_(e.schema))})))}),{priority:"low"})}}function l_(t,e){t.removeSelectionAttribute("linkHref");for(const n of e)t.removeSelectionAttribute(n)}function c_(t){return t.model.change((t=>t.batch)).isTyping}function d_(t){return t.getDefinition("$text").allowAttributes.filter((t=>t.startsWith("link")))}var h_=n(7754),u_={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(h_.Z,u_);h_.Z.locals;class g_ extends nh{constructor(t,e){super(t);const n=t.t;this.focusTracker=new Ta,this.keystrokes=new Da,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),Bh.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),Bh.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(e),this.children=this._createFormChildren(e.manualDecorators),this._focusables=new Rd,this._focusCycler=new au({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const o=["ck","ck-link-form","ck-responsive-form"];e.manualDecorators.length&&o.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:o,tabindex:"-1"},children:this.children}),Ph(this)}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce(((t,e)=>(t[e.name]=e.isOn,t)),{})}render(){super.render(),Rh({view:this});[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const t=this.locale.t,e=new Zu(this.locale,Ju);return e.label=t("Link URL"),e}_createButton(t,e,n,o){const i=new Hh(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i.extendTemplate({attributes:{class:n}}),o&&i.delegate("execute").to(this,o),i}_createManualDecoratorSwitches(t){const e=this.createCollection();for(const n of t.manualDecorators){const o=new jh(this.locale);o.set({name:n.id,label:n.label,withText:!0}),o.bind("isOn").toMany([n,t],"value",((t,e)=>void 0===e&&void 0===t?n.defaultValue:t)),o.on("execute",(()=>{n.set("value",!o.isOn)})),e.add(o)}return e}_createFormChildren(t){const e=this.createCollection();if(e.add(this.urlInputView),t.length){const t=new nh;t.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map((t=>({tag:"li",children:[t],attributes:{class:["ck","ck-list__item"]}}))),attributes:{class:["ck","ck-reset","ck-list"]}}),e.add(t)}return e.add(this.saveButtonView),e.add(this.cancelButtonView),e}}var m_=n(2347),p_={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(m_.Z,p_);m_.Z.locals;class f_ extends nh{constructor(t){super(t);const e=t.t;this.focusTracker=new Ta,this.keystrokes=new Da,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(e("Unlink"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184zm4.919 10.562-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z"/></svg>',"unlink"),this.editButtonView=this._createButton(e("Edit link"),Bh.pencil,"edit"),this.set("href"),this._focusables=new Rd,this._focusCycler=new au({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","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(t,e,n){const o=new Hh(this.locale);return o.set({label:t,icon:e,tooltip:!0}),o.delegate("execute").to(this,n),o}_createPreviewButton(){const t=new Hh(this.locale),e=this.bindTemplate,n=this.t;return t.set({withText:!0,tooltip:n("Open link in new tab")}),t.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:e.to("href",(t=>t&&Jw(t))),target:"_blank",rel:"noopener noreferrer"}}),t.bind("label").to(this,"href",(t=>t||n("This link has no URL"))),t.bind("isEnabled").to(this,"href",(t=>!!t)),t.template.tag="a",t.template.eventListeners={},t}}const b_="link-ui";class k_ extends L{static get requires(){return[ag]}static get pluginName(){return"LinkUI"}init(){const t=this.editor;t.editing.view.addObserver(Ng),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=t.plugins.get(ag),this._createToolbarLinkButton(),this._enableUserBalloonInteractions(),t.conversion.for("editingDowncast").markerToHighlight({model:b_,view:{classes:["ck-fake-link-selection"]}}),t.conversion.for("editingDowncast").markerToElement({model:b_,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView.destroy()}_createActionsView(){const t=this.editor,e=new f_(t.locale),n=t.commands.get("link"),o=t.commands.get("unlink");return e.bind("href").to(n,"value"),e.editButtonView.bind("isEnabled").to(n),e.unlinkButtonView.bind("isEnabled").to(o),this.listenTo(e,"edit",(()=>{this._addFormView()})),this.listenTo(e,"unlink",(()=>{t.execute("unlink"),this._hideUI()})),e.keystrokes.set("Esc",((t,e)=>{this._hideUI(),e()})),e.keystrokes.set(Kw,((t,e)=>{this._addFormView(),e()})),e}_createFormView(){const t=this.editor,e=t.commands.get("link"),n=t.config.get("link.defaultProtocol"),o=new g_(t.locale,e);return o.urlInputView.fieldView.bind("value").to(e,"value"),o.urlInputView.bind("isReadOnly").to(e,"isEnabled",(t=>!t)),o.saveButtonView.bind("isEnabled").to(e),this.listenTo(o,"submit",(()=>{const{value:e}=o.urlInputView.fieldView.element,i=Qw(e,n);t.execute("link",i,o.getDecoratorSwitchesState()),this._closeFormView()})),this.listenTo(o,"cancel",(()=>{this._closeFormView()})),o.keystrokes.set("Esc",((t,e)=>{this._closeFormView(),e()})),o}_createToolbarLinkButton(){const t=this.editor,e=t.commands.get("link"),n=t.t;t.keystrokes.set(Kw,((t,n)=>{n(),e.isEnabled&&this._showUI(!0)})),t.ui.componentFactory.add("link",(t=>{const o=new Hh(t);return o.isEnabled=!0,o.label=n("Link"),o.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184z"/></svg>',o.keystroke=Kw,o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(e,"isEnabled"),o.bind("isOn").to(e,"value",(t=>!!t)),this.listenTo(o,"execute",(()=>this._showUI(!0))),o}))}_enableUserBalloonInteractions(){const t=this.editor.editing.view.document;this.listenTo(t,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),this.editor.keystrokes.set("Tab",((t,e)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),e())}),{priority:"high"}),this.editor.keystrokes.set("Esc",((t,e)=>{this._isUIVisible&&(this._hideUI(),e())})),Ih({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 t=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions(),this.formView.urlInputView.fieldView.element.value=t.value||""}_closeFormView(){const t=this.editor.commands.get("link");t.restoreManualDecoratorStates(),void 0!==t.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(t=!1){this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),t&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),t&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const t=this.editor;this.stopListening(t.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),t.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const t=this.editor,e=t.editing.view.document;let n=this._getSelectedLinkElement(),o=r();const i=()=>{const t=this._getSelectedLinkElement(),e=r();n&&!t||!n&&e!==o?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),n=t,o=e};function r(){return e.selection.focus.getAncestors().reverse().find((t=>t.is("element")))}this.listenTo(t.ui,"update",i),this.listenTo(this._balloon,"change:visibleView",i)}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 t=this.editor.editing.view,e=this.editor.model,n=t.document;let o=null;if(e.markers.has(b_)){const e=Array.from(this.editor.editing.mapper.markerNameToElements(b_)),n=t.createRange(t.createPositionBefore(e[0]),t.createPositionAfter(e[e.length-1]));o=t.domConverter.viewRangeToDom(n)}else o=()=>{const e=this._getSelectedLinkElement();return e?t.domConverter.mapViewToDom(e):t.domConverter.viewRangeToDom(n.selection.getFirstRange())};return{target:o}}_getSelectedLinkElement(){const t=this.editor.editing.view,e=t.document.selection,n=e.getSelectedElement();if(e.isCollapsed||n&&eb(n))return w_(e.getFirstPosition());{const n=e.getFirstRange().getTrimmed(),o=w_(n.start),i=w_(n.end);return o&&o==i&&t.createRangeIn(o).getTrimmed().isEqual(n)?o:null}}_showFakeVisualSelection(){const t=this.editor.model;t.change((e=>{const n=t.document.selection.getFirstRange();if(t.markers.has(b_))e.updateMarker(b_,{range:n});else if(n.start.isAtEnd){const o=n.start.getLastMatchingPosition((({item:e})=>!t.schema.isContent(e)),{boundaries:n});e.addMarker(b_,{usingOperation:!1,affectsData:!1,range:e.createRange(o,n.end)})}else e.addMarker(b_,{usingOperation:!1,affectsData:!1,range:n})}))}_hideFakeVisualSelection(){const t=this.editor.model;t.markers.has(b_)&&t.change((t=>{t.removeMarker(b_)}))}}function w_(t){return t.getAncestors().find((t=>{return(e=t).is("attributeElement")&&!!e.getCustomProperty("link");var e}))}const __=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class A_ extends L{static get requires(){return[wp]}static get pluginName(){return"AutoLink"}init(){const t=this.editor.model.document.selection;t.on("change:range",(()=>{this.isEnabled=!t.anchor.parent.is("element","codeBlock")})),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){const t=this.editor,e=new Ap(t.model,(t=>{if(!function(t){return t.length>4&&" "===t[t.length-1]&&" "!==t[t.length-2]}(t))return;const e=C_(t.substr(0,t.length-1));return e?{url:e}:void 0}));e.on("matched:data",((e,n)=>{const{batch:o,range:i,url:r}=n;if(!o.isTyping)return;const s=i.end.getShiftedBy(-1),a=s.getShiftedBy(-r.length),l=t.model.createRange(a,s);this._applyAutoLink(r,l)})),e.bind("isEnabled").to(this)}_enableEnterHandling(){const t=this.editor,e=t.model,n=t.commands.get("enter");n&&n.on("execute",(()=>{const t=e.document.selection.getFirstPosition();if(!t.parent.previousSibling)return;const n=e.createRangeIn(t.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(n)}))}_enableShiftEnterHandling(){const t=this.editor,e=t.model,n=t.commands.get("shiftEnter");n&&n.on("execute",(()=>{const t=e.document.selection.getFirstPosition(),n=e.createRange(e.createPositionAt(t.parent,0),t.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(n)}))}_checkAndApplyAutoLinkOnRange(t){const e=this.editor.model,{text:n,range:o}=_p(t,e),i=C_(n);if(i){const t=e.createRange(o.end.getShiftedBy(-i.length),o.end);this._applyAutoLink(i,t)}}_applyAutoLink(t,e){const n=this.editor.model,o=this.editor.plugins.get("Delete");this.isEnabled&&function(t,e){return e.schema.checkAttributeInSelection(e.createSelection(t),"linkHref")}(e,n)&&n.enqueueChange((i=>{const r=this.editor.config.get("link.defaultProtocol"),s=Qw(t,r);i.setAttribute("linkHref",s,e),n.enqueueChange((()=>{o.requestUndoOnBackspace()}))}))}}function C_(t){const e=__.exec(t);return e?e[2]:null}class v_ extends q{constructor(t,e){super(t),this.type=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,n=e.document,o=Array.from(n.selection.getSelectedBlocks()).filter((t=>x_(t,e.schema))),i=void 0!==t.forceValue?!t.forceValue:this.value;e.change((t=>{if(i){let e=o[o.length-1].nextSibling,n=Number.POSITIVE_INFINITY,i=[];for(;e&&"listItem"==e.name&&0!==e.getAttribute("listIndent");){const t=e.getAttribute("listIndent");t<n&&(n=t);const o=t-n;i.push({element:e,listIndent:o}),e=e.nextSibling}i=i.reverse();for(const e of i)t.setAttribute("listIndent",e.listIndent,e.element)}if(!i){let t=Number.POSITIVE_INFINITY;for(const e of o)e.is("element","listItem")&&e.getAttribute("listIndent")<t&&(t=e.getAttribute("listIndent"));t=0===t?1:t,y_(o,!0,t),y_(o,!1,t)}for(const e of o.reverse())i&&"listItem"==e.name?t.rename(e,"paragraph"):i||"listItem"==e.name?i||"listItem"!=e.name||e.getAttribute("listType")==this.type||t.setAttribute("listType",this.type,e):(t.setAttributes({listType:this.type,listIndent:0},e),t.rename(e,"listItem"));this.fire("_executeCleanup",o)}))}_getValue(){const t=Ea(this.editor.model.document.selection.getSelectedBlocks());return!!t&&t.is("element","listItem")&&t.getAttribute("listType")==this.type}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,n=Ea(t.getSelectedBlocks());return!!n&&x_(n,e)}}function y_(t,e,n){const o=e?t[0]:t[t.length-1];if(o.is("element","listItem")){let i=o[e?"previousSibling":"nextSibling"],r=o.getAttribute("listIndent");for(;i&&i.is("element","listItem")&&i.getAttribute("listIndent")>=n;)r>i.getAttribute("listIndent")&&(r=i.getAttribute("listIndent")),i.getAttribute("listIndent")==r&&t[e?"unshift":"push"](i),i=i[e?"previousSibling":"nextSibling"]}}function x_(t,e){return e.checkChild(t.parent,"listItem")&&!e.isObject(t)}class E_ extends q{constructor(t,e){super(t),this._indentBy="forward"==e?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=t.document;let n=Array.from(e.selection.getSelectedBlocks());t.change((t=>{const e=n[n.length-1];let o=e.nextSibling;for(;o&&"listItem"==o.name&&o.getAttribute("listIndent")>e.getAttribute("listIndent");)n.push(o),o=o.nextSibling;this._indentBy<0&&(n=n.reverse());for(const e of n){const n=e.getAttribute("listIndent")+this._indentBy;n<0?t.rename(e,"paragraph"):t.setAttribute("listIndent",n,e)}this.fire("_executeCleanup",n)}))}_checkEnabled(){const t=Ea(this.editor.model.document.selection.getSelectedBlocks());if(!t||!t.is("element","listItem"))return!1;if(this._indentBy>0){const e=t.getAttribute("listIndent"),n=t.getAttribute("listType");let o=t.previousSibling;for(;o&&o.is("element","listItem")&&o.getAttribute("listIndent")>=e;){if(o.getAttribute("listIndent")==e)return o.getAttribute("listType")==n;o=o.previousSibling}return!1}return!0}}function T_(t,e){const n=e.mapper,o=e.writer,i="numbered"==t.getAttribute("listType")?"ol":"ul",r=function(t){const e=t.createContainerElement("li");return e.getFillerOffset=N_,e}(o),s=o.createContainerElement(i,null);return o.insert(o.createPositionAt(s,0),r),n.bindElements(t,r),r}function D_(t,e,n,o){const i=e.parent,r=n.mapper,s=n.writer;let a=r.toViewPosition(o.createPositionBefore(t));const l=I_(t.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:t.getAttribute("listIndent")}),c=t.previousSibling;if(l&&l.getAttribute("listIndent")==t.getAttribute("listIndent")){const t=r.toViewElement(l);a=s.breakContainer(s.createPositionAfter(t))}else if(c&&"listItem"==c.name){a=r.toViewPosition(o.createPositionAt(c,"end"));const t=r.findMappedViewAncestor(a),e=R_(t);a=e?s.createPositionBefore(e):s.createPositionAt(t,"end")}else a=r.toViewPosition(o.createPositionBefore(t));if(a=B_(a),s.insert(a,i),c&&"listItem"==c.name){const t=r.toViewElement(c),n=s.createRange(s.createPositionAt(t,0),a).getWalker({ignoreElementEnd:!0});for(const t of n)if(t.item.is("element","li")){const o=s.breakContainer(s.createPositionBefore(t.item)),i=t.item.parent,r=s.createPositionAt(e,"end");S_(s,r.nodeBefore,r.nodeAfter),s.move(s.createRangeOn(i),r),n.position=o}}else{const n=i.nextSibling;if(n&&(n.is("element","ul")||n.is("element","ol"))){let o=null;for(const e of n.getChildren()){const n=r.toModelElement(e);if(!(n&&n.getAttribute("listIndent")>t.getAttribute("listIndent")))break;o=e}o&&(s.breakContainer(s.createPositionAfter(o)),s.move(s.createRangeOn(o.parent),s.createPositionAt(e,"end")))}}S_(s,i,i.nextSibling),S_(s,i.previousSibling,i)}function S_(t,e,n){return!e||!n||"ul"!=e.name&&"ol"!=e.name||e.name!=n.name||e.getAttribute("class")!==n.getAttribute("class")?null:t.mergeContainers(t.createPositionAfter(e))}function B_(t){return t.getLastMatchingPosition((t=>t.item.is("uiElement")))}function I_(t,e){const n=!!e.sameIndent,o=!!e.smallerIndent,i=e.listIndent;let r=t;for(;r&&"listItem"==r.name;){const t=r.getAttribute("listIndent");if(n&&i==t||o&&i>t)return r;r="forward"===e.direction?r.nextSibling:r.previousSibling}return null}function P_(t,e,n,o){t.ui.componentFactory.add(e,(i=>{const r=t.commands.get(e),s=new Hh(i);return s.set({label:n,icon:o,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.on("execute",(()=>{t.execute(e),t.editing.view.focus()})),s}))}function R_(t){for(const e of t.getChildren())if("ul"==e.name||"ol"==e.name)return e;return null}function z_(t,e){const n=[],o=t.parent,i={ignoreElementEnd:!0,startPosition:t,shallow:!0,direction:e},r=o.getAttribute("listIndent"),s=[...new Ka(i)].filter((t=>t.item.is("element"))).map((t=>t.item));for(const t of s){if(!t.is("element","listItem"))break;if(t.getAttribute("listIndent")<r)break;if(!(t.getAttribute("listIndent")>r)){if(t.getAttribute("listType")!==o.getAttribute("listType"))break;if(t.getAttribute("listStyle")!==o.getAttribute("listStyle"))break;if(t.getAttribute("listReversed")!==o.getAttribute("listReversed"))break;if(t.getAttribute("listStart")!==o.getAttribute("listStart"))break;"backward"===e?n.unshift(t):n.push(t)}}return n}function V_(t){let e=[...t.document.selection.getSelectedBlocks()].filter((t=>t.is("element","listItem"))).map((e=>{const n=t.change((t=>t.createPositionAt(e,0)));return[...z_(n,"backward"),...z_(n,"forward")]})).flat();return e=[...new Set(e)],e}const F_=["disc","circle","square"],O_=["decimal","decimal-leading-zero","lower-roman","upper-roman","lower-latin","upper-latin"];function N_(){const t=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||t?0:Ni.call(this)}function M_(t){return(e,n,o)=>{const i=o.consumable;if(!i.test(n.item,"insert")||!i.test(n.item,"attribute:listType")||!i.test(n.item,"attribute:listIndent"))return;i.consume(n.item,"insert"),i.consume(n.item,"attribute:listType"),i.consume(n.item,"attribute:listIndent");const r=n.item;D_(r,T_(r,o),o,t)}}function L_(t,e,n){if(!n.consumable.test(e.item,t.name))return;const o=n.mapper.toViewElement(e.item),i=n.writer;i.breakContainer(i.createPositionBefore(o)),i.breakContainer(i.createPositionAfter(o));const r=o.parent,s="numbered"==e.attributeNewValue?"ol":"ul";i.rename(s,r)}function H_(t,e,n){n.consumable.consume(e.item,t.name);const o=n.mapper.toViewElement(e.item).parent,i=n.writer;S_(i,o,o.nextSibling),S_(i,o.previousSibling,o)}function q_(t,e,n){if(n.consumable.test(e.item,t.name)&&"listItem"!=e.item.name){let t=n.mapper.toViewPosition(e.range.start);const o=n.writer,i=[];for(;("ul"==t.parent.name||"ol"==t.parent.name)&&(t=o.breakContainer(t),"li"==t.parent.name);){const e=t,n=o.createPositionAt(t.parent,"end");if(!e.isEqual(n)){const t=o.remove(o.createRange(e,n));i.push(t)}t=o.createPositionAfter(t.parent)}if(i.length>0){for(let e=0;e<i.length;e++){const n=t.nodeBefore;if(t=o.insert(t,i[e]).end,e>0){const e=S_(o,n,n.nextSibling);e&&e.parent==n&&t.offset--}}S_(o,t.nodeBefore,t.nodeAfter)}}}function W_(t,e,n){const o=n.mapper.toViewPosition(e.position),i=o.nodeBefore,r=o.nodeAfter;S_(n.writer,i,r)}function j_(t,e,n){if(n.consumable.consume(e.viewItem,{name:!0})){const t=n.writer,o=t.createElement("listItem"),i=function(t){let e=0,n=t.parent;for(;n;){if(n.is("element","li"))e++;else{const t=n.previousSibling;t&&t.is("element","li")&&e++}n=n.parent}return e}(e.viewItem);t.setAttribute("listIndent",i,o);const r=e.viewItem.parent&&"ol"==e.viewItem.parent.name?"numbered":"bulleted";if(t.setAttribute("listType",r,o),!n.safeInsert(o,e.modelCursor))return;const s=function(t,e,n){const{writer:o,schema:i}=n;let r=o.createPositionAfter(t);for(const s of e)if("ul"==s.name||"ol"==s.name)r=n.convertItem(s,r).modelCursor;else{const e=n.convertItem(s,o.createPositionAt(t,"end")),a=e.modelRange.start.nodeAfter;a&&a.is("element")&&!i.checkChild(t,a.name)&&(t=e.modelCursor.parent.is("element","listItem")?e.modelCursor.parent:Z_(e.modelCursor),r=o.createPositionAfter(t))}return r}(o,e.viewItem.getChildren(),n);e.modelRange=t.createRange(e.modelCursor,s),n.updateConversionResult(o,e)}}function U_(t,e,n){if(n.consumable.test(e.viewItem,{name:!0})){const t=Array.from(e.viewItem.getChildren());for(const e of t){!(e.is("element","li")||Y_(e))&&e._remove()}}}function $_(t,e,n){if(n.consumable.test(e.viewItem,{name:!0})){if(0===e.viewItem.childCount)return;const t=[...e.viewItem.getChildren()];let n=!1;for(const e of t)n&&!Y_(e)&&e._remove(),Y_(e)&&(n=!0)}}function G_(t){return(e,n)=>{if(n.isPhantom)return;const o=n.modelPosition.nodeBefore;if(o&&o.is("element","listItem")){const e=n.mapper.toViewElement(o),i=e.getAncestors().find(Y_),r=t.createPositionAt(e,0).getWalker();for(const t of r){if("elementStart"==t.type&&t.item.is("element","li")){n.viewPosition=t.previousPosition;break}if("elementEnd"==t.type&&t.item==i){n.viewPosition=t.nextPosition;break}}}}}function K_(t,[e,n]){let o,i=e.is("documentFragment")?e.getChild(0):e;if(o=n?this.createSelection(n):this.document.selection,i&&i.is("element","listItem")){const t=o.getFirstPosition();let e=null;if(t.parent.is("element","listItem")?e=t.parent:t.nodeBefore&&t.nodeBefore.is("element","listItem")&&(e=t.nodeBefore),e){const t=e.getAttribute("listIndent");if(t>0)for(;i&&i.is("element","listItem");)i._setAttribute("listIndent",i.getAttribute("listIndent")+t),i=i.nextSibling}}}function Z_(t){const e=new Ka({startPosition:t});let n;do{n=e.next()}while(!n.value.item.is("element","listItem"));return n.value.item}function J_(t,e,n,o,i,r){const s=I_(e.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:t,foo:"b"}),a=i.mapper,l=i.writer,c=s?s.getAttribute("listIndent"):null;let d;if(s)if(c==t){const t=a.toViewElement(s).parent;d=l.createPositionAfter(t)}else{const t=r.createPositionAt(s,"end");d=a.toViewPosition(t)}else d=n;d=B_(d);for(const t of[...o.getChildren()])Y_(t)&&(d=l.move(l.createRangeOn(t),d).end,S_(l,t,t.nextSibling),S_(l,t.previousSibling,t))}function Y_(t){return t.is("element","ol")||t.is("element","ul")}class Q_ extends L{static get pluginName(){return"ListEditing"}static get requires(){return[yf,wp]}init(){const t=this.editor;t.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const e=t.data,n=t.editing;var o;t.model.document.registerPostFixer((e=>function(t,e){const n=t.document.differ.getChanges(),o=new Map;let i=!1;for(const o of n)if("insert"==o.type&&"listItem"==o.name)r(o.position);else if("insert"==o.type&&"listItem"!=o.name){if("$text"!=o.name){const n=o.position.nodeAfter;n.hasAttribute("listIndent")&&(e.removeAttribute("listIndent",n),i=!0),n.hasAttribute("listType")&&(e.removeAttribute("listType",n),i=!0),n.hasAttribute("listStyle")&&(e.removeAttribute("listStyle",n),i=!0),n.hasAttribute("listReversed")&&(e.removeAttribute("listReversed",n),i=!0),n.hasAttribute("listStart")&&(e.removeAttribute("listStart",n),i=!0);for(const e of Array.from(t.createRangeIn(n)).filter((t=>t.item.is("element","listItem"))))r(e.previousPosition)}r(o.position.getShiftedBy(o.length))}else"remove"==o.type&&"listItem"==o.name?r(o.position):("attribute"==o.type&&"listIndent"==o.attributeKey||"attribute"==o.type&&"listType"==o.attributeKey)&&r(o.range.start);for(const t of o.values())s(t),a(t);return i;function r(t){const e=t.nodeBefore;if(e&&e.is("element","listItem")){let t=e;if(o.has(t))return;for(let e=t.previousSibling;e&&e.is("element","listItem");e=t.previousSibling)if(t=e,o.has(t))return;o.set(e,t)}else{const e=t.nodeAfter;e&&e.is("element","listItem")&&o.set(e,e)}}function s(t){let n=0,o=null;for(;t&&t.is("element","listItem");){const r=t.getAttribute("listIndent");if(r>n){let s;null===o?(o=r-n,s=n):(o>r&&(o=r),s=r-o),e.setAttribute("listIndent",s,t),i=!0}else o=null,n=t.getAttribute("listIndent")+1;t=t.nextSibling}}function a(t){let n=[],o=null;for(;t&&t.is("element","listItem");){const r=t.getAttribute("listIndent");if(o&&o.getAttribute("listIndent")>r&&(n=n.slice(0,r+1)),0!=r)if(n[r]){const o=n[r];t.getAttribute("listType")!=o&&(e.setAttribute("listType",o,t),i=!0)}else n[r]=t.getAttribute("listType");o=t,t=t.nextSibling}}}(t.model,e))),n.mapper.registerViewToModelLength("li",X_),e.mapper.registerViewToModelLength("li",X_),n.mapper.on("modelToViewPosition",G_(n.view)),n.mapper.on("viewToModelPosition",(o=t.model,(t,e)=>{const n=e.viewPosition,i=n.parent,r=e.mapper;if("ul"==i.name||"ol"==i.name){if(n.isAtEnd){const t=r.toModelElement(n.nodeBefore),i=r.getModelLength(n.nodeBefore);e.modelPosition=o.createPositionBefore(t).getShiftedBy(i)}else{const t=r.toModelElement(n.nodeAfter);e.modelPosition=o.createPositionBefore(t)}t.stop()}else if("li"==i.name&&n.nodeBefore&&("ul"==n.nodeBefore.name||"ol"==n.nodeBefore.name)){const s=r.toModelElement(i);let a=1,l=n.nodeBefore;for(;l&&Y_(l);)a+=r.getModelLength(l),l=l.previousSibling;e.modelPosition=o.createPositionBefore(s).getShiftedBy(a),t.stop()}})),e.mapper.on("modelToViewPosition",G_(n.view)),t.conversion.for("editingDowncast").add((e=>{e.on("insert",q_,{priority:"high"}),e.on("insert:listItem",M_(t.model)),e.on("attribute:listType:listItem",L_,{priority:"high"}),e.on("attribute:listType:listItem",H_,{priority:"low"}),e.on("attribute:listIndent:listItem",function(t){return(e,n,o)=>{if(!o.consumable.consume(n.item,"attribute:listIndent"))return;const i=o.mapper.toViewElement(n.item),r=o.writer;r.breakContainer(r.createPositionBefore(i)),r.breakContainer(r.createPositionAfter(i));const s=i.parent,a=s.previousSibling,l=r.createRangeOn(s);r.remove(l),a&&a.nextSibling&&S_(r,a,a.nextSibling),J_(n.attributeOldValue+1,n.range.start,l.start,i,o,t),D_(n.item,i,o,t);for(const t of n.item.getChildren())o.consumable.consume(t,"insert")}}(t.model)),e.on("remove:listItem",function(t){return(e,n,o)=>{const i=o.mapper.toViewPosition(n.position).getLastMatchingPosition((t=>!t.item.is("element","li"))).nodeAfter,r=o.writer;r.breakContainer(r.createPositionBefore(i)),r.breakContainer(r.createPositionAfter(i));const s=i.parent,a=s.previousSibling,l=r.createRangeOn(s),c=r.remove(l);a&&a.nextSibling&&S_(r,a,a.nextSibling),J_(o.mapper.toModelElement(i).getAttribute("listIndent")+1,n.position,l.start,i,o,t);for(const t of r.createRangeIn(c).getItems())o.mapper.unbindViewElement(t);e.stop()}}(t.model)),e.on("remove",W_,{priority:"low"})})),t.conversion.for("dataDowncast").add((e=>{e.on("insert",q_,{priority:"high"}),e.on("insert:listItem",M_(t.model))})),t.conversion.for("upcast").add((t=>{t.on("element:ul",U_,{priority:"high"}),t.on("element:ol",U_,{priority:"high"}),t.on("element:li",$_,{priority:"high"}),t.on("element:li",j_)})),t.model.on("insertContent",K_,{priority:"high"}),t.commands.add("numberedList",new v_(t,"numbered")),t.commands.add("bulletedList",new v_(t,"bulleted")),t.commands.add("indentList",new E_(t,"forward")),t.commands.add("outdentList",new E_(t,"backward"));const i=n.view.document;this.listenTo(i,"enter",((t,e)=>{const n=this.editor.model.document,o=n.selection.getLastPosition().parent;n.selection.isCollapsed&&"listItem"==o.name&&o.isEmpty&&(this.editor.execute("outdentList"),e.preventDefault(),t.stop())}),{context:"li"}),this.listenTo(i,"delete",((t,e)=>{if("backward"!==e.direction)return;const n=this.editor.model.document.selection;if(!n.isCollapsed)return;const o=n.getFirstPosition();if(!o.isAtStart)return;const i=o.parent;if("listItem"!==i.name)return;i.previousSibling&&"listItem"===i.previousSibling.name||(this.editor.execute("outdentList"),e.preventDefault(),t.stop())}),{context:"li"}),this.listenTo(t.editing.view.document,"tab",((e,n)=>{const o=n.shiftKey?"outdentList":"indentList";this.editor.commands.get(o).isEnabled&&(t.execute(o),n.stopPropagation(),n.preventDefault(),e.stop())}),{context:"li"})}afterInit(){const t=this.editor.commands,e=t.get("indent"),n=t.get("outdent");e&&e.registerChildCommand(t.get("indentList")),n&&n.registerChildCommand(t.get("outdentList"))}}function X_(t){let e=1;for(const n of t.getChildren())if("ul"==n.name||"ol"==n.name)for(const t of n.getChildren())e+=X_(t);return e}const tA='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM3.5 3v5H2V3.7H1v-1h2.5V3zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001c-.048.405-.16.734-.333.988-.175.254-.59.692-1.244 1.312H4.3v1h-4l.043-.043zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>',eA='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75zm6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75z"/></svg>';class nA extends L{static get pluginName(){return"ListUI"}init(){const t=this.editor.t;P_(this.editor,"numberedList",t("Numbered List"),tA),P_(this.editor,"bulletedList",t("Bulleted List"),eA)}}class oA extends q{constructor(t,e){super(t),this._defaultType=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){this._tryToConvertItemsToList(t);const e=this.editor.model,n=V_(e);n.length&&e.change((e=>{for(const o of n)e.setAttribute("listStyle",t.type||this._defaultType,o)}))}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")?t.getAttribute("listStyle"):null}_checkEnabled(){const t=this.editor,e=t.commands.get("numberedList"),n=t.commands.get("bulletedList");return e.isEnabled||n.isEnabled}_tryToConvertItemsToList(t){if(!t.type)return;const e=(n=t.type,F_.includes(n)?"bulleted":O_.includes(n)?"numbered":null);var n;if(!e)return;const o=this.editor,i=e+"List";o.commands.get(i).value||o.execute(i)}}class iA extends q{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute(t={}){const e=this.editor.model,n=V_(e).filter((t=>"numbered"==t.getAttribute("listType")));e.change((e=>{for(const o of n)e.setAttribute("listReversed",!!t.reversed,o)}))}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")&&"numbered"==t.getAttribute("listType")?t.getAttribute("listReversed"):null}}class rA extends q{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute(t={}){const e=this.editor.model,n=V_(e).filter((t=>"numbered"==t.getAttribute("listType")));e.change((e=>{for(const o of n)e.setAttribute("listStart",t.startIndex||1,o)}))}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")&&"numbered"==t.getAttribute("listType")?t.getAttribute("listStart"):null}}const sA="default";class aA extends L{static get requires(){return[Q_]}static get pluginName(){return"ListPropertiesEditing"}constructor(t){super(t),t.config.define("list",{properties:{styles:!0,startIndex:!1,reversed:!1}})}init(){const t=this.editor,e=t.model,n=function(t){const e=[];t.styles&&e.push({attributeName:"listStyle",defaultValue:sA,addCommand(t){t.commands.add("listStyle",new oA(t,sA))},appliesToListItem:()=>!0,setAttributeOnDowncast(t,e,n){e&&e!==sA?t.setStyle("list-style-type",e,n):t.removeStyle("list-style-type",n)},getAttributeOnUpcast:t=>t.getStyle("list-style-type")||sA});t.reversed&&e.push({attributeName:"listReversed",defaultValue:!1,addCommand(t){t.commands.add("listReversed",new iA(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),setAttributeOnDowncast(t,e,n){e?t.setAttribute("reversed","reversed",n):t.removeAttribute("reversed",n)},getAttributeOnUpcast:t=>t.hasAttribute("reversed")});t.startIndex&&e.push({attributeName:"listStart",defaultValue:1,addCommand(t){t.commands.add("listStart",new rA(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),setAttributeOnDowncast(t,e,n){1!=e?t.setAttribute("start",e,n):t.removeAttribute("start",n)},getAttributeOnUpcast:t=>t.getAttribute("start")||1});return e}(t.config.get("list.properties"));e.schema.extend("listItem",{allowAttributes:n.map((t=>t.attributeName))});for(const e of n)e.addCommand(t);var o;this.listenTo(t.commands.get("indentList"),"_executeCleanup",function(t,e){return(n,o)=>{const i=o[0],r=i.getAttribute("listIndent"),s=o.filter((t=>t.getAttribute("listIndent")===r));let a=null;i.previousSibling.getAttribute("listIndent")+1!==r&&(a=I_(i.previousSibling,{sameIndent:!0,direction:"backward",listIndent:r})),t.model.change((t=>{for(const n of s)for(const o of e)if(o.appliesToListItem(n)){const e=null==a?o.defaultValue:a.getAttribute(o.attributeName);t.setAttribute(o.attributeName,e,n)}}))}}(t,n)),this.listenTo(t.commands.get("outdentList"),"_executeCleanup",function(t,e){return(n,o)=>{if(!(o=o.reverse().filter((t=>t.is("element","listItem")))).length)return;const i=o[0].getAttribute("listIndent"),r=o[0].getAttribute("listType");let s=o[0].previousSibling;if(s.is("element","listItem"))for(;s.getAttribute("listIndent")!==i;)s=s.previousSibling;else s=null;s||(s=o[o.length-1].nextSibling),s&&s.is("element","listItem")&&s.getAttribute("listType")===r&&t.model.change((t=>{const n=o.filter((t=>t.getAttribute("listIndent")===i));for(const o of n)for(const n of e)if(n.appliesToListItem(o)){const e=n.attributeName,i=s.getAttribute(e);t.setAttribute(e,i,o)}}))}}(t,n)),this.listenTo(t.commands.get("bulletedList"),"_executeCleanup",dA(t)),this.listenTo(t.commands.get("numberedList"),"_executeCleanup",dA(t)),e.document.registerPostFixer(function(t,e){return n=>{let o=!1;const i=hA(t.model.document.differ.getChanges()).filter((t=>"todo"!==t.getAttribute("listType")));if(!i.length)return o;let r=i[i.length-1].nextSibling;if((!r||!r.is("element","listItem"))&&(r=i[0].previousSibling,r)){const t=i[0].getAttribute("listIndent");for(;r.is("element","listItem")&&r.getAttribute("listIndent")!==t&&(r=r.previousSibling,r););}for(const t of e){const e=t.attributeName;for(const s of i)if(t.appliesToListItem(s))if(s.hasAttribute(e)){const i=s.previousSibling;cA(i,s,t.attributeName)&&(n.setAttribute(e,i.getAttribute(e),s),o=!0)}else lA(r,s,t)?n.setAttribute(e,r.getAttribute(e),s):n.setAttribute(e,t.defaultValue,s),o=!0;else n.removeAttribute(e,s)}return o}}(t,n)),t.conversion.for("upcast").add((o=n,t=>{t.on("element:li",((t,e,n)=>{const i=e.viewItem.parent;if(!i)return;const r=e.modelRange.start.nodeAfter||e.modelRange.end.nodeBefore;for(const t of o)if(t.appliesToListItem(r)){const e=t.getAttributeOnUpcast(i);n.writer.setAttribute(t.attributeName,e,r)}}),{priority:"low"})})),t.conversion.for("downcast").add(function(t){return n=>{for(const o of t)n.on(`attribute:${o.attributeName}:listItem`,((t,n,i)=>{const r=i.writer,s=n.item,a=I_(s.previousSibling,{sameIndent:!0,listIndent:s.getAttribute("listIndent"),direction:"backward"}),l=i.mapper.toViewElement(s);e(s,a)||r.breakContainer(r.createPositionBefore(l)),o.setAttributeOnDowncast(r,n.attributeNewValue,l.parent)}),{priority:"low"})};function e(t,e){return e&&t.getAttribute("listType")===e.getAttribute("listType")&&t.getAttribute("listIndent")===e.getAttribute("listIndent")&&t.getAttribute("listStyle")===e.getAttribute("listStyle")&&t.getAttribute("listReversed")===e.getAttribute("listReversed")&&t.getAttribute("listStart")===e.getAttribute("listStart")}}(n)),this._mergeListAttributesWhileMergingLists(n)}afterInit(){const t=this.editor;t.commands.get("todoList")&&t.model.document.registerPostFixer(function(t){return e=>{const n=hA(t.model.document.differ.getChanges()).filter((t=>"todo"===t.getAttribute("listType")&&(t.hasAttribute("listStyle")||t.hasAttribute("listReversed")||t.hasAttribute("listStart"))));if(!n.length)return!1;for(const t of n)e.removeAttribute("listStyle",t),e.removeAttribute("listReversed",t),e.removeAttribute("listStart",t);return!0}}(t))}_mergeListAttributesWhileMergingLists(t){const e=this.editor.model;let n;this.listenTo(e,"deleteContent",((t,[e])=>{const o=e.getFirstPosition(),i=e.getLastPosition();if(o.parent===i.parent)return;if(!o.parent.is("element","listItem"))return;const r=i.parent.nextSibling;if(!r||!r.is("element","listItem"))return;const s=I_(o.parent,{sameIndent:!0,listIndent:r.getAttribute("listIndent")});s&&s.getAttribute("listType")===r.getAttribute("listType")&&(n=s)}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{n&&(e.change((e=>{const o=I_(n.nextSibling,{sameIndent:!0,listIndent:n.getAttribute("listIndent"),direction:"forward"});if(!o)return void(n=null);const i=[o,...z_(e.createPositionAt(o,0),"forward")];for(const o of i)for(const i of t)if(i.appliesToListItem(o)){const t=i.attributeName,r=n.getAttribute(t);e.setAttribute(t,r,o)}})),n=null)}),{priority:"low"})}}function lA(t,e,n){if(!t)return!1;const o=t.getAttribute(n.attributeName);return!!o&&(o!=n.defaultValue&&t.getAttribute("listType")===e.getAttribute("listType"))}function cA(t,e,n){if(!t||!t.is("element","listItem"))return!1;if(e.getAttribute("listType")!==t.getAttribute("listType"))return!1;const o=t.getAttribute("listIndent");if(o<1||o!==e.getAttribute("listIndent"))return!1;const i=t.getAttribute(n);return!(!i||i===e.getAttribute(n))}function dA(t){return(e,n)=>{n=n.filter((t=>t.is("element","listItem"))),t.model.change((t=>{for(const e of n)t.removeAttribute("listStyle",e)}))}}function hA(t){const e=[];for(const n of t){const t=uA(n);t&&t.is("element","listItem")&&e.push(t)}return e}function uA(t){return"attribute"===t.type?t.range.start.nodeAfter:"insert"===t.type?t.position.nodeAfter:null}var gA=n(4721),mA={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(gA.Z,mA);gA.Z.locals;class pA extends nh{constructor(t,e){super(t);const n=this.bindTemplate;this.set("isCollapsed",!1),this.set("label",""),this.buttonView=this._createButtonView(),this.children=this.createCollection(),this.set("_collapsibleAriaLabelUid"),e&&this.children.addMany(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-collapsible",n.if("isCollapsed","ck-collapsible_collapsed")]},children:[this.buttonView,{tag:"div",attributes:{class:["ck","ck-collapsible__children"],role:"region",hidden:n.if("isCollapsed","hidden"),"aria-labelledby":n.to("_collapsibleAriaLabelUid")},children:this.children}]})}render(){super.render(),this._collapsibleAriaLabelUid=this.buttonView.labelView.element.id}_createButtonView(){const t=new Hh(this.locale),e=t.bindTemplate;return t.set({withText:!0,icon:Qh}),t.extendTemplate({attributes:{"aria-expanded":e.to("isOn",(t=>String(t)))}}),t.bind("label").to(this),t.bind("isOn").to(this,"isCollapsed",(t=>!t)),t.on("execute",(()=>{this.isCollapsed=!this.isCollapsed})),t}}var fA=n(6082),bA={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(fA.Z,bA);fA.Z.locals;class kA extends nh{constructor(t,{enabledProperties:e,styleButtonViews:n,styleGridAriaLabel:o}){super(t);const i=["ck","ck-list-properties"];this.children=this.createCollection(),this.stylesView=null,this.additionalPropertiesCollapsibleView=null,this.startIndexFieldView=null,this.reversedSwitchButtonView=null,this.focusTracker=new Ta,this.keystrokes=new Da,this.focusables=new Rd,this.focusCycler=new au({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),e.styles?(this.stylesView=this._createStylesView(n,o),this.children.add(this.stylesView)):i.push("ck-list-properties_without-styles"),(e.startIndex||e.reversed)&&(this._addNumberedListPropertyViews(e,n),i.push("ck-list-properties_with-numbered-properties")),this.setTemplate({tag:"div",attributes:{class:i},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element),(this.startIndexFieldView||this.reversedSwitchButtonView)&&(this.focusables.add(this.children.last.buttonView),this.focusTracker.add(this.children.last.buttonView.element));for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);zh({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>Co.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element),this.listenTo(this.startIndexFieldView.element,"selectstart",((t,e)=>{e.stopPropagation()}),{priority:"high"});const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.reversedSwitchButtonView&&(this.focusables.add(this.reversedSwitchButtonView),this.focusTracker.add(this.reversedSwitchButtonView.element)),this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createStylesView(t,e){const n=new nh(this.locale);return n.children=n.createCollection(this.locale),n.children.addMany(t),n.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-list-styles-list"]},children:n.children}),n.children.delegate("execute").to(this),n.focus=function(){this.children.first.focus()},n.focusTracker=new Ta,n.keystrokes=new Da,n.render(),n.keystrokes.listenTo(n.element),n}_addNumberedListPropertyViews(t){const e=this.locale.t,n=[];t.startIndex&&(this.startIndexFieldView=this._createStartIndexField(),n.push(this.startIndexFieldView)),t.reversed&&(this.reversedSwitchButtonView=this._createReversedSwitchButton(),n.push(this.reversedSwitchButtonView)),t.styles?(this.additionalPropertiesCollapsibleView=new pA(this.locale,n),this.additionalPropertiesCollapsibleView.set({label:e("List properties"),isCollapsed:!0}),this.additionalPropertiesCollapsibleView.buttonView.bind("isEnabled").toMany(n,"isEnabled",((...t)=>t.some((t=>t)))),this.additionalPropertiesCollapsibleView.buttonView.on("change:isEnabled",((t,e,n)=>{n||(this.additionalPropertiesCollapsibleView.isCollapsed=!0)})),this.children.add(this.additionalPropertiesCollapsibleView)):this.children.addMany(n)}_createStartIndexField(){const t=this.locale.t,e=new Zu(this.locale,Yu);return e.set({label:t("Start at"),class:"ck-numbered-list-properties__start-index"}),e.fieldView.set({min:1,step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",(()=>{const n=e.fieldView.element,o=n.valueAsNumber;Number.isNaN(o)||(n.checkValidity()?this.fire("listStart",{startIndex:o}):e.errorText=t("Start index must be greater than 0."))})),e}_createReversedSwitchButton(){const t=this.locale.t,e=new jh(this.locale);return e.set({withText:!0,label:t("Reversed order"),class:"ck-numbered-list-properties__reversed-order"}),e.delegate("execute").to(this,"listReversed"),e}}var wA=n(2417),_A={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(wA.Z,_A);wA.Z.locals;class AA extends L{static get pluginName(){return"ListPropertiesUI"}init(){const t=this.editor,e=t.locale.t,n=t.config.get("list.properties");n.styles&&t.ui.componentFactory.add("bulletedList",CA({editor:t,parentCommandName:"bulletedList",buttonLabel:e("Bulleted List"),buttonIcon:eA,styleGridAriaLabel:e("Bulleted list styles toolbar"),styleDefinitions:[{label:e("Toggle the disc list style"),tooltip:e("Disc"),type:"disc",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6z"/></svg>'},{label:e("Toggle the circle list style"),tooltip:e("Circle"),type:"circle",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4z"/></svg>'},{label:e("Toggle the square list style"),tooltip:e("Square"),type:"square",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M14 27v6H8v-6h6zm0-9v6H8v-6h6zm0-9v6H8V9h6z"/></svg>'}]})),(n.styles||n.startIndex||n.reversed)&&t.ui.componentFactory.add("numberedList",CA({editor:t,parentCommandName:"numberedList",buttonLabel:e("Numbered List"),buttonIcon:tA,styleGridAriaLabel:e("Numbered list styles toolbar"),styleDefinitions:[{label:e("Toggle the decimal list style"),tooltip:e("Decimal"),type:"decimal",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M10.29 15V8.531H9.286c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.343 0v-1.235h-1.235V15h1.235zM11.3 24v-1.147H8.848c.064-.111.148-.226.252-.343.104-.117.351-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.494-.824.104-.263.156-.539.156-.829 0-.51-.182-.936-.545-1.279-.363-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.153-.155.358-.233.616-.233.26 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.468.536-1.024 1.055-.692.641-1.155 1.156-1.389 1.544-.234.389-.375.8-.422 1.233H11.3zm2.333 0v-1.235h-1.235V24h1.235zM9.204 34.11c.615 0 1.129-.2 1.542-.598.413-.398.62-.88.62-1.446 0-.39-.11-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.619-.337.928-.788.928-1.353 0-.399-.151-.756-.453-1.073-.366-.386-.852-.58-1.459-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.668.55c-.16.232-.28.544-.358.933l1.138.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.215 0 .386.065.515.194s.193.302.193.518c0 .255-.087.46-.263.613-.176.154-.43.227-.765.218l-.136 1.006c.22-.061.409-.092.567-.092.24 0 .444.09.61.272.168.182.251.428.251.739 0 .328-.087.589-.261.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.307-.698l-1.196.145c.062.542.285.98.668 1.316.384.335.868.503 1.45.503zm4.43-.11v-1.235h-1.236V34h1.235z"/></svg>'},{label:e("Toggle the decimal with leading zero list style"),tooltip:e("Decimal with leading zero"),type:"decimal-leading-zero",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M5.714 15.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm6.078.914V8.531H10.79c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.344 0v-1.235h-1.235V15h1.235zm-9.422 9.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm7.088.914v-1.147H10.35c.065-.111.149-.226.253-.343.104-.117.35-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.493-.824.104-.263.156-.539.156-.829 0-.51-.181-.936-.544-1.279-.364-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.152-.155.357-.233.615-.233.261 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.467.536-1.024 1.055-.691.641-1.154 1.156-1.388 1.544-.235.389-.375.8-.422 1.233h4.328zm2.334 0v-1.235h-1.235V24h1.235zM5.714 34.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm4.992 1.024c.616 0 1.13-.2 1.543-.598.413-.398.62-.88.62-1.446 0-.39-.111-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.618-.337.927-.788.927-1.353 0-.399-.15-.756-.452-1.073-.366-.386-.853-.58-1.46-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.667.55c-.16.232-.28.544-.359.933l1.139.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.214 0 .386.065.515.194s.193.302.193.518c0 .255-.088.46-.264.613-.175.154-.43.227-.764.218l-.136 1.006c.22-.061.408-.092.566-.092.24 0 .444.09.611.272.167.182.25.428.25.739 0 .328-.086.589-.26.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.308-.698l-1.195.145c.062.542.284.98.668 1.316.384.335.867.503 1.45.503zm4.43-.11v-1.235h-1.235V34h1.235z"/></svg>'},{label:e("Toggle the lower–roman list style"),tooltip:e("Lower–roman"),type:"lower-roman",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11.88 8.7V7.558h-1.234V8.7h1.234zm0 5.3V9.333h-1.234V14h1.234zm2.5 0v-1.235h-1.234V14h1.235zm-4.75 4.7v-1.142H8.395V18.7H9.63zm0 5.3v-4.667H8.395V24H9.63zm2.5-5.3v-1.142h-1.234V18.7h1.235zm0 5.3v-4.667h-1.234V24h1.235zm2.501 0v-1.235h-1.235V24h1.235zM7.38 28.7v-1.142H6.145V28.7H7.38zm0 5.3v-4.667H6.145V34H7.38zm2.5-5.3v-1.142H8.646V28.7H9.88zm0 5.3v-4.667H8.646V34H9.88zm2.5-5.3v-1.142h-1.234V28.7h1.235zm0 5.3v-4.667h-1.234V34h1.235zm2.501 0v-1.235h-1.235V34h1.235z"/></svg>'},{label:e("Toggle the upper–roman list style"),tooltip:e("Upper-roman"),type:"upper-roman",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11.916 15V8.558h-1.301V15h1.3zm2.465 0v-1.235h-1.235V15h1.235zM9.665 25v-6.442h-1.3V25h1.3zm2.5 0v-6.442h-1.3V25h1.3zm2.466 0v-1.235h-1.235V25h1.235zm-7.216 9v-6.442h-1.3V34h1.3zm2.5 0v-6.442h-1.3V34h1.3zm2.501 0v-6.442h-1.3V34h1.3zm2.465 0v-1.235h-1.235V34h1.235z"/></svg>'},{label:e("Toggle the lower–latin list style"),tooltip:e("Lower-latin"),type:"lower-latin",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M9.62 14.105c.272 0 .528-.05.768-.153s.466-.257.677-.462c.009.024.023.072.044.145.047.161.086.283.119.365h1.221a2.649 2.649 0 0 1-.222-.626c-.04-.195-.059-.498-.059-.908l.013-1.441c0-.536-.055-.905-.165-1.105-.11-.201-.3-.367-.569-.497-.27-.13-.68-.195-1.23-.195-.607 0-1.064.108-1.371.325-.308.217-.525.55-.65 1.002l1.12.202c.076-.217.176-.369.299-.455.123-.086.294-.13.514-.13.325 0 .546.05.663.152.118.101.176.27.176.508v.123c-.222.093-.622.194-1.2.303-.427.082-.755.178-.982.288-.227.11-.403.268-.53.474a1.327 1.327 0 0 0-.188.706c0 .398.138.728.415.988.277.261.656.391 1.136.391zm.368-.87a.675.675 0 0 1-.492-.189.606.606 0 0 1-.193-.448c0-.176.08-.32.241-.435.106-.07.33-.142.673-.215a7.19 7.19 0 0 0 .751-.19v.247c0 .296-.016.496-.048.602a.773.773 0 0 1-.295.409 1.07 1.07 0 0 1-.637.22zm4.645.765v-1.235h-1.235V14h1.235zM10.2 25.105c.542 0 1.003-.215 1.382-.646.38-.43.57-1.044.57-1.84 0-.771-.187-1.362-.559-1.774a1.82 1.82 0 0 0-1.41-.617c-.522 0-.973.216-1.354.65v-2.32H7.594V25h1.147v-.686a1.9 1.9 0 0 0 .67.592c.26.133.523.2.79.2zm-.299-.975c-.354 0-.638-.164-.852-.492-.153-.232-.229-.59-.229-1.073 0-.468.098-.818.295-1.048a.93.93 0 0 1 .738-.345c.302 0 .55.118.743.354.193.236.29.62.29 1.154 0 .5-.096.868-.288 1.1-.192.233-.424.35-.697.35zm4.478.87v-1.235h-1.234V25h1.234zm-4.017 9.105c.6 0 1.08-.142 1.437-.426.357-.284.599-.704.725-1.261l-1.213-.207c-.061.326-.167.555-.316.688a.832.832 0 0 1-.576.2.916.916 0 0 1-.75-.343c-.185-.228-.278-.62-.278-1.173 0-.498.091-.853.274-1.066.183-.212.429-.318.736-.318.232 0 .42.061.565.184.145.123.238.306.28.55l1.216-.22c-.146-.501-.387-.874-.722-1.119-.336-.244-.788-.366-1.356-.366-.695 0-1.245.214-1.653.643-.407.43-.61 1.03-.61 1.8 0 .762.202 1.358.608 1.788.406.431.95.646 1.633.646zM14.633 34v-1.235h-1.235V34h1.235z"/></svg>'},{label:e("Toggle the upper–latin list style"),tooltip:e("Upper-latin"),type:"upper-latin",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="m7.88 15 .532-1.463h2.575L11.549 15h1.415l-2.58-6.442H9.01L6.5 15h1.38zm2.69-2.549H8.811l.87-2.39.887 2.39zM14.88 15v-1.235h-1.234V15h1.234zM9.352 25c.83-.006 1.352-.02 1.569-.044.346-.038.636-.14.872-.305.236-.166.422-.387.558-.664.137-.277.205-.562.205-.855 0-.372-.106-.695-.317-.97-.21-.276-.512-.471-.905-.585a1.51 1.51 0 0 0 .661-.567 1.5 1.5 0 0 0 .244-.83c0-.28-.066-.53-.197-.754a1.654 1.654 0 0 0-.495-.539 1.676 1.676 0 0 0-.672-.266c-.25-.042-.63-.063-1.14-.063H7.158V25h2.193zm.142-3.88H8.46v-1.49h.747c.612 0 .983.007 1.112.022.217.026.38.102.49.226.11.125.165.287.165.486a.68.68 0 0 1-.192.503.86.86 0 0 1-.525.23 11.47 11.47 0 0 1-.944.023h.18zm.17 2.795H8.46v-1.723h1.05c.592 0 .977.03 1.154.092.177.062.313.16.406.295a.84.84 0 0 1 .14.492c0 .228-.06.41-.181.547a.806.806 0 0 1-.473.257c-.126.026-.423.04-.892.04zM14.88 25v-1.235h-1.234V25h1.234zm-5.018 9.11c.691 0 1.262-.17 1.711-.512.45-.341.772-.864.965-1.567l-1.261-.4c-.109.472-.287.818-.536 1.037-.25.22-.547.33-.892.33-.47 0-.85-.173-1.143-.519-.293-.345-.44-.925-.44-1.74 0-.767.15-1.322.447-1.665.297-.343.684-.514 1.162-.514.346 0 .64.096.881.29.242.193.4.457.477.79l1.288-.307c-.147-.516-.367-.911-.66-1.187-.492-.465-1.132-.698-1.92-.698-.902 0-1.63.296-2.184.89-.554.593-.83 1.426-.83 2.498 0 1.014.275 1.813.825 2.397.551.585 1.254.877 2.11.877zM14.88 34v-1.235h-1.234V34h1.234z"/></svg>'}]}))}}function CA({editor:t,parentCommandName:e,buttonLabel:n,buttonIcon:o,styleGridAriaLabel:i,styleDefinitions:r}){const s=t.commands.get(e);return a=>{const l=Tu(a,nu),c=l.buttonView;l.bind("isEnabled").to(s),l.class="ck-list-styles-dropdown",c.on("execute",(()=>{t.execute(e),t.editing.view.focus()})),c.set({label:n,icon:o,tooltip:!0,isToggleable:!0}),c.bind("isOn").to(s,"value",(t=>!!t));const d=function({editor:t,dropdownView:e,parentCommandName:n,styleDefinitions:o,styleGridAriaLabel:i}){const r=t.locale,s=t.config.get("list.properties");let a;"numberedList"!=n&&(s.startIndex=!1,s.reversed=!1);if(s.styles){const e=t.commands.get("listStyle"),i=function({editor:t,listStyleCommand:e,parentCommandName:n}){const o=t.locale,i=t.commands.get(n);return({label:n,type:r,icon:s,tooltip:a})=>{const l=new Hh(o);return l.set({label:n,icon:s,tooltip:a}),e.on("change:value",(()=>{l.isOn=e.value===r})),l.on("execute",(()=>{i.value?e.value!==r?t.execute("listStyle",{type:r}):t.execute("listStyle",{type:e._defaultType}):t.model.change((()=>{t.execute("listStyle",{type:r})}))})),l}}({editor:t,parentCommandName:n,listStyleCommand:e}),r="function"==typeof e.isStyleTypeSupported?t=>e.isStyleTypeSupported(t.type):()=>!0;a=o.filter(r).map(i)}const l=new kA(r,{styleGridAriaLabel:i,enabledProperties:s,styleButtonViews:a});s.styles&&Bu(e,(()=>l.stylesView.children.find((t=>t.isOn))));if(s.startIndex){const e=t.commands.get("listStart");l.startIndexFieldView.bind("isEnabled").to(e),l.startIndexFieldView.fieldView.bind("value").to(e),l.on("listStart",((e,n)=>t.execute("listStart",n)))}if(s.reversed){const e=t.commands.get("listReversed");l.reversedSwitchButtonView.bind("isEnabled").to(e),l.reversedSwitchButtonView.bind("isOn").to(e,"value"),l.on("listReversed",(()=>{const n=e.value;t.execute("listReversed",{reversed:!n})}))}return l.delegate("execute").to(e),l}({editor:t,dropdownView:l,parentCommandName:e,styleGridAriaLabel:i,styleDefinitions:r});return l.panelView.children.add(d),l.on("execute",(()=>{t.editing.view.focus()})),l}}class vA extends L{static get requires(){return[aA,AA]}static get pluginName(){return"ListProperties"}}const yA="todoListChecked";class xA extends q{constructor(t){super(t),this._selectedElements=[],this.on("execute",(()=>{this.refresh()}),{priority:"highest"})}refresh(){this._selectedElements=this._getSelectedItems(),this.value=this._selectedElements.every((t=>!!t.getAttribute("todoListChecked"))),this.isEnabled=!!this._selectedElements.length}_getSelectedItems(){const t=this.editor.model,e=t.schema,n=t.document.selection.getFirstRange(),o=n.start.parent,i=[];e.checkAttribute(o,yA)&&i.push(o);for(const t of n.getItems())e.checkAttribute(t,yA)&&!i.includes(t)&&i.push(t);return i}execute(t={}){this.editor.model.change((e=>{for(const n of this._selectedElements){(void 0===t.forceValue?!this.value:t.forceValue)?e.setAttribute(yA,!0,n):e.removeAttribute(yA,n)}}))}}function EA(t,e,n){const o=e.modelCursor,i=o.parent,r=e.viewItem;if("checkbox"!=r.getAttribute("type")||"listItem"!=i.name||!o.isAtStart)return;if(!n.consumable.consume(r,{name:!0}))return;const s=n.writer;s.setAttribute("listType","todo",i),e.viewItem.hasAttribute("checked")&&s.setAttribute("todoListChecked",!0,i),e.modelRange=s.createRange(o)}function TA(t){return(e,n)=>{const o=n.modelPosition,i=o.parent;if(!i.is("element","listItem")||"todo"!=i.getAttribute("listType"))return;const r=SA(n.mapper.toViewElement(i),t);r&&(n.viewPosition=n.mapper.findPositionIn(r,o.offset))}}function DA(t,e,n,o){return e.createUIElement("label",{class:"todo-list__label",contenteditable:!1},(function(e){const i=fa(document,"input",{type:"checkbox"});n&&i.setAttribute("checked","checked"),i.addEventListener("change",(()=>o(t)));const r=this.toDomElement(e);return r.appendChild(i),r}))}function SA(t,e){const n=e.createRangeIn(t);for(const t of n)if(t.item.is("containerElement","span")&&t.item.hasClass("todo-list__label__description"))return t.item}const BA=br("Ctrl+Enter");class IA extends L{static get pluginName(){return"TodoListEditing"}static get requires(){return[Q_]}init(){const t=this.editor,{editing:e,data:n,model:o}=t;o.schema.extend("listItem",{allowAttributes:["todoListChecked"]}),o.schema.addAttributeCheck(((t,e)=>{const n=t.last;if("todoListChecked"==e&&"listItem"==n.name&&"todo"!=n.getAttribute("listType"))return!1})),t.commands.add("todoList",new v_(t,"todo"));const i=new xA(t);var r,s;t.commands.add("checkTodoList",i),t.commands.add("todoListCheck",i),n.downcastDispatcher.on("insert:listItem",function(t){return(e,n,o)=>{const i=o.consumable;if(!i.test(n.item,"insert")||!i.test(n.item,"attribute:listType")||!i.test(n.item,"attribute:listIndent"))return;if("todo"!=n.item.getAttribute("listType"))return;const r=n.item;i.consume(r,"insert"),i.consume(r,"attribute:listType"),i.consume(r,"attribute:listIndent"),i.consume(r,"attribute:todoListChecked");const s=o.writer,a=T_(r,o);s.addClass("todo-list",a.parent);const l=s.createContainerElement("label",{class:"todo-list__label"}),c=s.createEmptyElement("input",{type:"checkbox",disabled:"disabled"}),d=s.createContainerElement("span",{class:"todo-list__label__description"});r.getAttribute("todoListChecked")&&s.setAttribute("checked","checked",c),s.insert(s.createPositionAt(a,0),l),s.insert(s.createPositionAt(l,0),c),s.insert(s.createPositionAfter(c),d),D_(r,a,o,t)}}(o),{priority:"high"}),n.upcastDispatcher.on("element:input",EA,{priority:"high"}),e.downcastDispatcher.on("insert:listItem",function(t,e){return(n,o,i)=>{const r=i.consumable;if(!r.test(o.item,"insert")||!r.test(o.item,"attribute:listType")||!r.test(o.item,"attribute:listIndent"))return;if("todo"!=o.item.getAttribute("listType"))return;const s=o.item;r.consume(s,"insert"),r.consume(s,"attribute:listType"),r.consume(s,"attribute:listIndent"),r.consume(s,"attribute:todoListChecked");const a=i.writer,l=T_(s,i),c=!!s.getAttribute("todoListChecked"),d=DA(s,a,c,e),h=a.createContainerElement("span",{class:"todo-list__label__description"});a.addClass("todo-list",l.parent),a.insert(a.createPositionAt(l,0),d),a.insert(a.createPositionAfter(d),h),D_(s,l,i,t)}}(o,(t=>this._handleCheckmarkChange(t))),{priority:"high"}),e.downcastDispatcher.on("attribute:listType:listItem",(r=t=>this._handleCheckmarkChange(t),s=e.view,(t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const o=n.mapper.toViewElement(e.item),i=n.writer,a=function(t,e){const n=e.createRangeIn(t);for(const t of n)if(t.item.is("uiElement","label"))return t.item}(o,s);if("todo"==e.attributeNewValue){const t=!!e.item.getAttribute("todoListChecked"),n=DA(e.item,i,t,r),s=i.createContainerElement("span",{class:"todo-list__label__description"}),a=i.createRangeIn(o),l=R_(o),c=B_(a.start),d=l?i.createPositionBefore(l):a.end,h=i.createRange(c,d);i.addClass("todo-list",o.parent),i.move(h,i.createPositionAt(s,0)),i.insert(i.createPositionAt(o,0),n),i.insert(i.createPositionAfter(n),s)}else if("todo"==e.attributeOldValue){const t=SA(o,s);i.removeClass("todo-list",o.parent),i.remove(a),i.move(i.createRangeIn(t),i.createPositionBefore(t)),i.remove(t)}})),e.downcastDispatcher.on("attribute:todoListChecked:listItem",function(t){return(e,n,o)=>{if("todo"!=n.item.getAttribute("listType"))return;if(!o.consumable.consume(n.item,"attribute:todoListChecked"))return;const{mapper:i,writer:r}=o,s=!!n.item.getAttribute("todoListChecked"),a=i.toViewElement(n.item).getChild(0),l=DA(n.item,r,s,t);r.insert(r.createPositionAfter(a),l),r.remove(a)}}((t=>this._handleCheckmarkChange(t)))),e.mapper.on("modelToViewPosition",TA(e.view)),n.mapper.on("modelToViewPosition",TA(e.view)),this.listenTo(e.view.document,"arrowKey",function(t,e){return(n,o)=>{if("left"!=wr(o.keyCode,e.contentLanguageDirection))return;const i=t.schema,r=t.document.selection;if(!r.isCollapsed)return;const s=r.getFirstPosition(),a=s.parent;if("listItem"===a.name&&"todo"==a.getAttribute("listType")&&s.isAtStart){const e=i.getNearestSelectionRange(t.createPositionBefore(a),"backward");e&&t.change((t=>t.setSelection(e))),o.preventDefault(),o.stopPropagation(),n.stop()}}}(o,t.locale),{context:"li"}),this.listenTo(e.view.document,"keydown",((e,n)=>{fr(n)===BA&&(t.execute("checkTodoList"),e.stop())}),{priority:"high"});const a=new Set;this.listenTo(o,"applyOperation",((t,e)=>{const n=e[0];if("rename"==n.type&&"listItem"==n.oldName){const t=n.position.nodeAfter;t.hasAttribute("todoListChecked")&&a.add(t)}else if("changeAttribute"==n.type&&"listType"==n.key&&"todo"===n.oldValue)for(const t of n.range.getItems())t.hasAttribute("todoListChecked")&&"todo"!==t.getAttribute("listType")&&a.add(t)})),o.document.registerPostFixer((t=>{let e=!1;for(const n of a)t.removeAttribute("todoListChecked",n),e=!0;return a.clear(),e}))}_handleCheckmarkChange(t){const e=this.editor,n=e.model,o=Array.from(n.document.selection.getRanges());n.change((n=>{n.setSelection(t,"end"),e.execute("checkTodoList"),n.setSelection(o)}))}}class PA extends L{static get pluginName(){return"TodoListUI"}init(){const t=this.editor.t;P_(this.editor,"todoList",t("To-do List"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m2.315 14.705 2.224-2.24a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .949L2.865 16.07a.682.682 0 0 1-.112.089.647.647 0 0 1-.852-.051L.688 14.886a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.717.722zm5.185.045a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75zM2.329 5.745l2.21-2.226a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .95L2.865 7.125a.685.685 0 0 1-.496.196.644.644 0 0 1-.468-.187L.688 5.912a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.73.736zM7.5 5.75A.75.75 0 0 1 8.25 5h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>')}}var RA=n(1199),zA={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(RA.Z,zA);RA.Z.locals;function VA(t,e){if(!t.childCount)return;const n=new Lg(t.document),o=function(t,e){const n=e.createRangeIn(t),o=new Fo({name:/^p|h\d+$/,styles:{"mso-list":/.*/}}),i=[];for(const t of n)if("elementStart"===t.type&&o.match(t.item)){const e=NA(t.item);i.push({element:t.item,id:e.id,order:e.order,indent:e.indent})}return i}(t,n);if(!o.length)return;let i=null,r=1;o.forEach(((t,s)=>{const a=function(t,e){if(!t)return!0;if(t.id!==e.id)return e.indent-t.indent!=1;const n=e.element.previousSibling;if(!n)return!0;return o=n,!(o.is("element","ol")||o.is("element","ul"));var o}(o[s-1],t),l=a?null:o[s-1],c=(h=t,(d=l)?h.indent-d.indent:h.indent-1);var d,h;if(a&&(i=null,r=1),!i||0!==c){const o=function(t,e){const n=new RegExp(`@list l${t.id}:level${t.indent}\\s*({[^}]*)`,"gi"),o=/mso-level-number-format:([^;]{0,100});/gi,i=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,r=n.exec(e);let s="decimal",a="ol",l=null;if(r&&r[1]){const e=o.exec(r[1]);if(e&&e[1]&&(s=e[1].trim(),a="bullet"!==s&&"image"!==s?"ol":"ul"),"bullet"===s){const e=function(t){const e=function(t){if(t.getChild(0).is("$text"))return null;for(const e of t.getChildren()){if(!e.is("element","span"))continue;const t=e.getChild(0);return t.is("$text")?t:t.getChild(0)}}(t);if(!e)return null;const n=e._data;if("o"===n)return"circle";if("·"===n)return"disc";if("§"===n)return"square";return null}(t.element);e&&(s=e)}else{const t=i.exec(r[1]);t&&t[1]&&(l=parseInt(t[1]))}}return{type:a,startIndex:l,style:FA(s)}}(t,e);if(i){if(t.indent>r){const t=i.getChild(i.childCount-1),e=t.getChild(t.childCount-1);i=OA(o,e,n),r+=1}else if(t.indent<r){const e=r-t.indent;i=function(t,e){const n=t.getAncestors({parentFirst:!0});let o=null,i=0;for(const t of n)if("ul"!==t.name&&"ol"!==t.name||i++,i===e){o=t;break}return o}(i,e),r=parseInt(t.indent)}}else i=OA(o,t.element,n);t.indent<=r&&(i.is("element",o.type)||(i=n.rename(o.type,i)))}const u=function(t,e){return function(t,e){const n=new Fo({name:"span",styles:{"mso-list":"Ignore"}}),o=e.createRangeIn(t);for(const t of o)"elementStart"===t.type&&n.match(t.item)&&e.remove(t.item)}(t,e),e.rename("li",t)}(t.element,n);n.appendChild(u,i)}))}function FA(t){if(t.startsWith("arabic-leading-zero"))return"decimal-leading-zero";switch(t){case"alpha-upper":return"upper-alpha";case"alpha-lower":return"lower-alpha";case"roman-upper":return"upper-roman";case"roman-lower":return"lower-roman";case"circle":case"disc":case"square":return t;default:return null}}function OA(t,e,n){const o=e.parent,i=n.createElement(t.type),r=o.getChildIndex(e)+1;return n.insertChild(r,i,o),t.style&&n.setStyle("list-style-type",t.style,i),t.startIndex&&t.startIndex>1&&n.setAttribute("start",t.startIndex,i),i}function NA(t){const e={},n=t.getStyle("mso-list");if(n){const t=n.match(/(^|\s{1,100})l(\d+)/i),o=n.match(/\s{0,100}lfo(\d+)/i),i=n.match(/\s{0,100}level(\d+)/i);t&&o&&i&&(e.id=t[2],e.order=o[1],e.indent=i[1])}return e}const MA=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class LA{constructor(t){this.document=t}isActive(t){return MA.test(t)}execute(t){const e=new Lg(this.document),{body:n}=t._parsedData;!function(t,e){for(const n of t.getChildren())if(n.is("element","b")&&"normal"===n.getStyle("font-weight")){const o=t.getChildIndex(n);e.remove(n),e.insertChild(o,n.getChildren(),t)}}(n,e),function(t,e){for(const n of e.createRangeIn(t)){const t=n.item;if(t.is("element","li")){const n=t.getChild(0);n&&n.is("element","p")&&e.unwrapElement(n)}}}(n,e),t.content=n}}function HA(t,e){if(!t.childCount)return;const n=new Lg,o=function(t,e){const n=e.createRangeIn(t),o=new Fo({name:/v:(.+)/}),i=[];for(const t of n){if("elementStart"!=t.type)continue;const e=t.item,n=e.previousSibling&&e.previousSibling.name||null;o.match(e)&&e.getAttribute("o:gfxdata")&&"v:shapetype"!==n&&i.push(t.item.getAttribute("id"))}return i}(t,n);!function(t,e,n){const o=n.createRangeIn(e),i=new Fo({name:"img"}),r=[];for(const e of o)if(i.match(e.item)){const n=e.item,o=n.getAttribute("v:shapes")?n.getAttribute("v:shapes").split(" "):[];o.length&&o.every((e=>t.indexOf(e)>-1))?r.push(n):n.getAttribute("src")||r.push(n)}for(const t of r)n.remove(t)}(o,t,n),function(t,e){const n=e.createRangeIn(t),o=new Fo({name:/v:(.+)/}),i=[];for(const t of n)"elementStart"==t.type&&o.match(t.item)&&i.push(t.item);for(const t of i)e.remove(t)}(t,n);const i=function(t,e){const n=e.createRangeIn(t),o=new Fo({name:"img"}),i=[];for(const t of n)o.match(t.item)&&t.item.getAttribute("src").startsWith("file://")&&i.push(t.item);return i}(t,n);i.length&&function(t,e,n){if(t.length===e.length)for(let o=0;o<t.length;o++){const i=`data:${e[o].type};base64,${qA(e[o].hex)}`;n.setAttribute("src",i,t[o])}}(i,function(t){if(!t)return[];const e=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,n=new RegExp("(?:("+e.source+"))([\\da-fA-F\\s]+)\\}","g"),o=t.match(n),i=[];if(o)for(const t of o){let n=!1;t.includes("\\pngblip")?n="image/png":t.includes("\\jpegblip")&&(n="image/jpeg"),n&&i.push({hex:t.replace(e,"").replace(/[^\da-fA-F]/g,""),type:n})}return i}(e),n)}function qA(t){return btoa(t.match(/\w{2}/g).map((t=>String.fromCharCode(parseInt(t,16)))).join(""))}const WA=/<meta\s*name="?generator"?\s*content="?microsoft\s*word\s*\d+"?\/?>/i,jA=/xmlns:o="urn:schemas-microsoft-com/i;class UA{constructor(t){this.document=t}isActive(t){return WA.test(t)||jA.test(t)}execute(t){const{body:e,stylesString:n}=t._parsedData;VA(e,n),HA(e,t.dataTransfer.getData("text/rtf")),t.content=e}}function $A(t){return t.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,((t,e)=>1===e.length?" ":Array(e.length+1).join("  ").substr(0,e.length)))}function GA(t,e){const n=new DOMParser,o=function(t){return $A($A(t)).replace(/(<span\s+style=['"]mso-spacerun:yes['"]>[^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g,"$1$2").replace(/<span\s+style=['"]mso-spacerun:yes['"]><\/span>/g,"").replace(/ <\//g," </").replace(/ <o:p><\/o:p>/g," <o:p></o:p>").replace(/<o:p>(&nbsp;|\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)</g,"><")}(function(t){const e="</body>",n="</html>",o=t.indexOf(e);if(o<0)return t;const i=t.indexOf(n,o+e.length);return t.substring(0,o+e.length)+(i>=0?t.substring(i):"")}(t=t.replace(/<!--\[if gte vml 1]>/g,""))),i=n.parseFromString(o,"text/html");!function(t){t.querySelectorAll("span[style*=spacerun]").forEach((t=>{const e=t.innerText.length||0;t.innerText=Array(e+1).join("  ").substr(0,e)}))}(i);const r=i.body.innerHTML,s=function(t,e){const n=new nr(e),o=new ps(n,{renderingMode:"data"}),i=t.createDocumentFragment(),r=t.body.childNodes;for(;r.length>0;)i.appendChild(r[0]);return o.domToView(i,{skipComments:!0})}(i,e),a=function(t){const e=[],n=[],o=Array.from(t.getElementsByTagName("style"));for(const t of o)t.sheet&&t.sheet.cssRules&&t.sheet.cssRules.length&&(e.push(t.sheet),n.push(t.innerHTML));return{styles:e,stylesString:n.join(" ")}}(i);return{body:s,bodyString:r,styles:a.styles,stylesString:a.stylesString}}function KA(t,e,n,o,i=1){e>i?o.setAttribute(t,e,n):o.removeAttribute(t,n)}function ZA(t,e,n={}){const o=t.createElement("tableCell",n);return t.insertElement("paragraph",o),t.insert(o,e),o}function JA(t,e){const n=e.parent.parent,o=parseInt(n.getAttribute("headingColumns")||0),{column:i}=t.getCellLocation(e);return!!o&&i<o}function YA(){return t=>{t.on("element:table",((t,e,n)=>{const o=e.viewItem;if(!n.consumable.test(o,{name:!0}))return;const{rows:i,headingRows:r,headingColumns:s}=function(t){const e={headingRows:0,headingColumns:0},n=[],o=[];let i;for(const r of Array.from(t.getChildren()))if("tbody"===r.name||"thead"===r.name||"tfoot"===r.name){"thead"!==r.name||i||(i=r);const t=Array.from(r.getChildren()).filter((t=>t.is("element","tr")));for(const r of t)if("thead"===r.parent.name&&r.parent===i)e.headingRows++,n.push(r);else{o.push(r);const t=XA(r);t>e.headingColumns&&(e.headingColumns=t)}}return e.rows=[...n,...o],e}(o),a={};s&&(a.headingColumns=s),r&&(a.headingRows=r);const l=n.writer.createElement("table",a);if(n.safeInsert(l,e.modelCursor)){if(n.consumable.consume(o,{name:!0}),i.forEach((t=>n.convertItem(t,n.writer.createPositionAt(l,"end")))),n.convertChildren(o,n.writer.createPositionAt(l,"end")),l.isEmpty){const t=n.writer.createElement("tableRow");n.writer.insert(t,n.writer.createPositionAt(l,"end")),ZA(n.writer,n.writer.createPositionAt(t,"end"))}n.updateConversionResult(l,e)}}))}}function QA(t){return e=>{e.on(`element:${t}`,((t,e,n)=>{if(e.modelRange&&e.viewItem.isEmpty){const t=e.modelRange.start.nodeAfter,o=n.writer.createPositionAt(t,0);n.writer.insertElement("paragraph",o)}}),{priority:"low"})}}function XA(t){let e=0,n=0;const o=Array.from(t.getChildren()).filter((t=>"th"===t.name||"td"===t.name));for(;n<o.length&&"th"===o[n].name;){const t=o[n];e+=parseInt(t.getAttribute("colspan")||1),n++}return e}class tC{constructor(t,e={}){this._table=t,this._startRow=void 0!==e.row?e.row:e.startRow||0,this._endRow=void 0!==e.row?e.row:e.endRow,this._startColumn=void 0!==e.column?e.column:e.startColumn||0,this._endColumn=void 0!==e.column?e.column:e.endColumn,this._includeAllSlots=!!e.includeAllSlots,this._skipRows=new Set,this._row=0,this._rowIndex=0,this._column=0,this._cellIndex=0,this._spannedCells=new Map,this._nextCellAtColumn=-1}[Symbol.iterator](){return this}next(){const t=this._table.getChild(this._rowIndex);if(!t||this._isOverEndRow())return{done:!0};if(!t.is("element","tableRow"))return this._rowIndex++,this.next();if(this._isOverEndColumn())return this._advanceToNextRow();let e=null;const n=this._getSpanned();if(n)this._includeAllSlots&&!this._shouldSkipSlot()&&(e=this._formatOutValue(n.cell,n.row,n.column));else{const n=t.getChild(this._cellIndex);if(!n)return this._advanceToNextRow();const o=parseInt(n.getAttribute("colspan")||1),i=parseInt(n.getAttribute("rowspan")||1);(o>1||i>1)&&this._recordSpans(n,i,o),this._shouldSkipSlot()||(e=this._formatOutValue(n)),this._nextCellAtColumn=this._column+o}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,e||this.next()}skipRow(t){this._skipRows.add(t)}_advanceToNextRow(){return this._row++,this._rowIndex++,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(t,e=this._row,n=this._column){return{done:!1,value:new eC(this,t,e,n)}}_shouldSkipSlot(){const t=this._skipRows.has(this._row),e=this._row<this._startRow,n=this._column<this._startColumn,o=void 0!==this._endColumn&&this._column>this._endColumn;return t||e||n||o}_getSpanned(){const t=this._spannedCells.get(this._row);return t&&t.get(this._column)||null}_recordSpans(t,e,n){const o={cell:t,row:this._row,column:this._column};for(let t=this._row;t<this._row+e;t++)for(let e=this._column;e<this._column+n;e++)t==this._row&&e==this._column||this._markSpannedCell(t,e,o)}_markSpannedCell(t,e,n){this._spannedCells.has(t)||this._spannedCells.set(t,new Map);this._spannedCells.get(t).set(e,n)}}class eC{constructor(t,e,n,o){this.cell=e,this.row=t._row,this.column=t._column,this.cellAnchorRow=n,this.cellAnchorColumn=o,this._cellIndex=t._cellIndex,this._rowIndex=t._rowIndex,this._table=t._table}get isAnchor(){return this.row===this.cellAnchorRow&&this.column===this.cellAnchorColumn}get cellWidth(){return parseInt(this.cell.getAttribute("colspan")||1)}get cellHeight(){return parseInt(this.cell.getAttribute("rowspan")||1)}get rowIndex(){return this._rowIndex}getPositionBefore(){return this._table.root.document.model.createPositionAt(this._table.getChild(this.row),this._cellIndex)}}function nC(t,e={}){return(n,{writer:o})=>{const i=n.getAttribute("headingRows")||0,r=[];i>0&&r.push(o.createContainerElement("thead",null,o.createSlot((t=>t.is("element","tableRow")&&t.index<i)))),i<t.getRows(n)&&r.push(o.createContainerElement("tbody",null,o.createSlot((t=>t.is("element","tableRow")&&t.index>=i))));const s=o.createContainerElement("figure",{class:"table"},[o.createContainerElement("table",null,r),o.createSlot((t=>!t.is("element","tableRow")))]);return e.asWidget?function(t,e){return e.setCustomProperty("table",!0,t),nb(t,e,{hasSelectionHandle:!0})}(s,o):s}}function oC(t={}){return(e,{writer:n})=>{const o=e.parent,i=o.parent,r=i.getChildIndex(o),s=new tC(i,{row:r}),a=i.getAttribute("headingRows")||0,l=i.getAttribute("headingColumns")||0;for(const o of s)if(o.cell==e){const e=o.row<a||o.column<l?"th":"td";return t.asWidget?ab(n.createEditableElement(e),n):n.createContainerElement(e)}}}function iC(t={}){return(e,{writer:n,consumable:o,mapper:i})=>{if(e.parent.is("element","tableCell")&&rC(e))return t.asWidget?n.createContainerElement("span",{class:"ck-table-bogus-paragraph"}):(o.consume(e,"insert"),void i.bindElements(e,i.toViewElement(e.parent)))}}function rC(t){return 1==t.parent.childCount&&![...t.getAttributeKeys()].length}class sC extends q{refresh(){const t=this.editor.model,e=t.document.selection,n=t.schema;this.isEnabled=function(t,e){const n=t.getFirstPosition().parent,o=n===n.root?n:n.parent;return e.checkChild(o,"table")}(e,n)}execute(t={}){const e=this.editor.model,n=this.editor.plugins.get("TableUtils"),o=this.editor.config.get("table"),i=o.defaultHeadings.rows,r=o.defaultHeadings.columns;void 0===t.headingRows&&i&&(t.headingRows=i),void 0===t.headingColumns&&r&&(t.headingColumns=r),e.change((o=>{const i=n.createTable(o,t);e.insertObject(i,null,null,{findOptimalPosition:"auto"}),o.setSelection(o.createPositionAt(i.getNodeByPath([0,0,0]),0))}))}}class aC extends q{constructor(t,e={}){super(t),this.order=e.order||"below"}refresh(){const t=this.editor.model.document.selection,e=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(t).length;this.isEnabled=e}execute(){const t=this.editor,e=t.model.document.selection,n=t.plugins.get("TableUtils"),o="above"===this.order,i=n.getSelectionAffectedTableCells(e),r=n.getRowIndexes(i),s=o?r.first:r.last,a=i[0].findAncestor("table");n.insertRows(a,{at:o?s:s+1,copyStructureFromAbove:!o})}}class lC extends q{constructor(t,e={}){super(t),this.order=e.order||"right"}refresh(){const t=this.editor.model.document.selection,e=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(t).length;this.isEnabled=e}execute(){const t=this.editor,e=t.model.document.selection,n=t.plugins.get("TableUtils"),o="left"===this.order,i=n.getSelectionAffectedTableCells(e),r=n.getColumnIndexes(i),s=o?r.first:r.last,a=i[0].findAncestor("table");n.insertColumns(a,{columns:1,at:o?s:s+1})}}class cC extends q{constructor(t,e={}){super(t),this.direction=e.direction||"horizontally"}refresh(){const t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=1===t.length}execute(){const t=this.editor.plugins.get("TableUtils"),e=t.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];"horizontally"===this.direction?t.splitCellHorizontally(e,2):t.splitCellVertically(e,2)}}function dC(t,e,n){const{startRow:o,startColumn:i,endRow:r,endColumn:s}=e,a=n.createElement("table"),l=r-o+1;for(let t=0;t<l;t++)n.insertElement("tableRow",a,"end");const c=[...new tC(t,{startRow:o,endRow:r,startColumn:i,endColumn:s,includeAllSlots:!0})];for(const{row:t,column:e,cell:l,isAnchor:d,cellAnchorRow:h,cellAnchorColumn:u}of c){const c=t-o,g=a.getChild(c);if(d){const o=n.cloneElement(l);n.append(o,g),pC(o,t,e,r,s,n)}else(h<o||u<i)&&ZA(n,n.createPositionAt(g,"end"))}return function(t,e,n,o,i){const r=parseInt(e.getAttribute("headingRows")||0);if(r>0){KA("headingRows",r-n,t,i,0)}const s=parseInt(e.getAttribute("headingColumns")||0);if(s>0){KA("headingColumns",s-o,t,i,0)}}(a,t,o,i,n),a}function hC(t,e,n=0){const o=[],i=new tC(t,{startRow:n,endRow:e-1});for(const t of i){const{row:n,cellHeight:i}=t,r=n+i-1;n<e&&e<=r&&o.push(t)}return o}function uC(t,e,n){const o=t.parent,i=o.parent,r=o.index,s=e-r,a={},l=parseInt(t.getAttribute("rowspan"))-s;l>1&&(a.rowspan=l);const c=parseInt(t.getAttribute("colspan")||1);c>1&&(a.colspan=c);const d=r+s,h=[...new tC(i,{startRow:r,endRow:d,includeAllSlots:!0})];let u,g=null;for(const e of h){const{row:o,column:i,cell:r}=e;r===t&&void 0===u&&(u=i),void 0!==u&&u===i&&o===d&&(g=ZA(n,e.getPositionBefore(),a))}return KA("rowspan",s,t,n),g}function gC(t,e){const n=[],o=new tC(t);for(const t of o){const{column:o,cellWidth:i}=t,r=o+i-1;o<e&&e<=r&&n.push(t)}return n}function mC(t,e,n,o){const i=n-e,r={},s=parseInt(t.getAttribute("colspan"))-i;s>1&&(r.colspan=s);const a=parseInt(t.getAttribute("rowspan")||1);a>1&&(r.rowspan=a);const l=ZA(o,o.createPositionAfter(t),r);return KA("colspan",i,t,o),l}function pC(t,e,n,o,i,r){const s=parseInt(t.getAttribute("colspan")||1),a=parseInt(t.getAttribute("rowspan")||1);if(n+s-1>i){KA("colspan",i-n+1,t,r,1)}if(e+a-1>o){KA("rowspan",o-e+1,t,r,1)}}function fC(t,e){const n=e.getColumns(t),o=new Array(n).fill(0);for(const{column:e}of new tC(t))o[e]++;const i=o.reduce(((t,e,n)=>e?t:[...t,n]),[]);if(i.length>0){const n=i[i.length-1];return e.removeColumns(t,{at:n}),!0}return!1}function bC(t,e){const n=[],o=e.getRows(t);for(let e=0;e<o;e++){t.getChild(e).isEmpty&&n.push(e)}if(n.length>0){const o=n[n.length-1];return e.removeRows(t,{at:o}),!0}return!1}function kC(t,e){fC(t,e)||bC(t,e)}function wC(t,e){const n=Array.from(new tC(t,{startColumn:e.firstColumn,endColumn:e.lastColumn,row:e.lastRow}));if(n.every((({cellHeight:t})=>1===t)))return e.lastRow;const o=n[0].cellHeight-1;return e.lastRow+o}function _C(t,e){const n=Array.from(new tC(t,{startRow:e.firstRow,endRow:e.lastRow,column:e.lastColumn}));if(n.every((({cellWidth:t})=>1===t)))return e.lastColumn;const o=n[0].cellWidth-1;return e.lastColumn+o}class AC extends q{constructor(t,e){super(t),this.direction=e.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}refresh(){const t=this._getMergeableCell();this.value=t,this.isEnabled=!!t}execute(){const t=this.editor.model,e=t.document,n=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(e.selection)[0],o=this.value,i=this.direction;t.change((t=>{const e="right"==i||"down"==i,r=e?n:o,s=e?o:n,a=s.parent;!function(t,e,n){CC(t)||(CC(e)&&n.remove(n.createRangeIn(e)),n.move(n.createRangeIn(t),n.createPositionAt(e,"end")));n.remove(t)}(s,r,t);const l=this.isHorizontal?"colspan":"rowspan",c=parseInt(n.getAttribute(l)||1),d=parseInt(o.getAttribute(l)||1);t.setAttribute(l,c+d,r),t.setSelection(t.createRangeIn(r));const h=this.editor.plugins.get("TableUtils");kC(a.findAncestor("table"),h)}))}_getMergeableCell(){const t=this.editor.model.document,e=this.editor.plugins.get("TableUtils"),n=e.getTableCellsContainingSelection(t.selection)[0];if(!n)return;const o=this.isHorizontal?function(t,e,n){const o=t.parent.parent,i="right"==e?t.nextSibling:t.previousSibling,r=(o.getAttribute("headingColumns")||0)>0;if(!i)return;const s="right"==e?t:i,a="right"==e?i:t,{column:l}=n.getCellLocation(s),{column:c}=n.getCellLocation(a),d=parseInt(s.getAttribute("colspan")||1),h=JA(n,s),u=JA(n,a);if(r&&h!=u)return;return l+d===c?i:void 0}(n,this.direction,e):function(t,e,n){const o=t.parent,i=o.parent,r=i.getChildIndex(o);if("down"==e&&r===n.getRows(i)-1||"up"==e&&0===r)return;const s=parseInt(t.getAttribute("rowspan")||1),a=i.getAttribute("headingRows")||0,l="down"==e&&r+s===a,c="up"==e&&r===a;if(a&&(l||c))return;const d=parseInt(t.getAttribute("rowspan")||1),h="down"==e?r+d:r,u=[...new tC(i,{endRow:h})],g=u.find((e=>e.cell===t)).column,m=u.find((({row:t,cellHeight:n,column:o})=>o===g&&("down"==e?t===h:h===t+n)));return m&&m.cell}(n,this.direction,e);if(!o)return;const i=this.isHorizontal?"rowspan":"colspan",r=parseInt(n.getAttribute(i)||1);return parseInt(o.getAttribute(i)||1)===r?o:void 0}}function CC(t){return 1==t.childCount&&t.getChild(0).is("element","paragraph")&&t.getChild(0).isEmpty}class vC extends q{refresh(){const t=this.editor.plugins.get("TableUtils"),e=t.getSelectionAffectedTableCells(this.editor.model.document.selection),n=e[0];if(n){const o=n.findAncestor("table"),i=this.editor.plugins.get("TableUtils").getRows(o)-1,r=t.getRowIndexes(e),s=0===r.first&&r.last===i;this.isEnabled=!s}else this.isEnabled=!1}execute(){const t=this.editor.model,e=this.editor.plugins.get("TableUtils"),n=e.getSelectionAffectedTableCells(t.document.selection),o=e.getRowIndexes(n),i=n[0],r=i.findAncestor("table"),s=e.getCellLocation(i).column;t.change((t=>{const n=o.last-o.first+1;e.removeRows(r,{at:o.first,rows:n});const i=function(t,e,n,o){const i=t.getChild(Math.min(e,o-1));let r=i.getChild(0),s=0;for(const t of i.getChildren()){if(s>n)return r;r=t,s+=parseInt(t.getAttribute("colspan")||1)}return r}(r,o.first,s,e.getRows(r));t.setSelection(t.createPositionAt(i,0))}))}}class yC extends q{refresh(){const t=this.editor.plugins.get("TableUtils"),e=t.getSelectionAffectedTableCells(this.editor.model.document.selection),n=e[0];if(n){const o=n.findAncestor("table"),i=t.getColumns(o),{first:r,last:s}=t.getColumnIndexes(e);this.isEnabled=s-r<i-1}else this.isEnabled=!1}execute(){const t=this.editor.plugins.get("TableUtils"),[e,n]=function(t,e){const n=e.getSelectionAffectedTableCells(t),o=n[0],i=n.pop(),r=[o,i];return o.isBefore(i)?r:r.reverse()}(this.editor.model.document.selection,t),o=e.parent.parent,i=[...new tC(o)],r={first:i.find((t=>t.cell===e)).column,last:i.find((t=>t.cell===n)).column},s=function(t,e,n,o){return parseInt(n.getAttribute("colspan")||1)>1?n:e.previousSibling||n.nextSibling?n.nextSibling||e.previousSibling:o.first?t.reverse().find((({column:t})=>t<o.first)).cell:t.reverse().find((({column:t})=>t>o.last)).cell}(i,e,n,r);this.editor.model.change((t=>{const e=r.last-r.first+1;this.editor.plugins.get("TableUtils").removeColumns(o,{at:r.first,columns:e}),t.setSelection(t.createPositionAt(s,0))}))}}class xC extends q{refresh(){const t=this.editor.plugins.get("TableUtils"),e=this.editor.model,n=t.getSelectionAffectedTableCells(e.document.selection),o=n.length>0;this.isEnabled=o,this.value=o&&n.every((t=>this._isInHeading(t,t.parent.parent)))}execute(t={}){if(t.forceValue===this.value)return;const e=this.editor.plugins.get("TableUtils"),n=this.editor.model,o=e.getSelectionAffectedTableCells(n.document.selection),i=o[0].findAncestor("table"),{first:r,last:s}=e.getRowIndexes(o),a=this.value?r:s+1,l=i.getAttribute("headingRows")||0;n.change((t=>{if(a){const e=hC(i,a,a>l?l:0);for(const{cell:n}of e)uC(n,a,t)}KA("headingRows",a,i,t,0)}))}_isInHeading(t,e){const n=parseInt(e.getAttribute("headingRows")||0);return!!n&&t.parent.index<n}}class EC extends q{refresh(){const t=this.editor.model,e=this.editor.plugins.get("TableUtils"),n=e.getSelectionAffectedTableCells(t.document.selection),o=n.length>0;this.isEnabled=o,this.value=o&&n.every((t=>JA(e,t)))}execute(t={}){if(t.forceValue===this.value)return;const e=this.editor.plugins.get("TableUtils"),n=this.editor.model,o=e.getSelectionAffectedTableCells(n.document.selection),i=o[0].findAncestor("table"),{first:r,last:s}=e.getColumnIndexes(o),a=this.value?r:s+1;n.change((t=>{if(a){const e=gC(i,a);for(const{cell:n,column:o}of e)mC(n,o,a,t)}KA("headingColumns",a,i,t,0)}))}}class TC extends L{static get pluginName(){return"TableUtils"}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(t){const e=t.parent,n=e.parent,o=n.getChildIndex(e),i=new tC(n,{row:o});for(const{cell:e,row:n,column:o}of i)if(e===t)return{row:n,column:o}}createTable(t,e){const n=t.createElement("table"),o=parseInt(e.rows)||2,i=parseInt(e.columns)||2;return DC(t,n,0,o,i),e.headingRows&&KA("headingRows",Math.min(e.headingRows,o),n,t,0),e.headingColumns&&KA("headingColumns",Math.min(e.headingColumns,i),n,t,0),n}insertRows(t,e={}){const n=this.editor.model,o=e.at||0,i=e.rows||1,r=void 0!==e.copyStructureFromAbove,s=e.copyStructureFromAbove?o-1:o,a=this.getRows(t),c=this.getColumns(t);if(o>a)throw new l("tableutils-insertrows-insert-out-of-range",this,{options:e});n.change((e=>{const n=t.getAttribute("headingRows")||0;if(n>o&&KA("headingRows",n+i,t,e,0),!r&&(0===o||o===a))return void DC(e,t,o,i,c);const l=r?Math.max(o,s):o,d=new tC(t,{endRow:l}),h=new Array(c).fill(1);for(const{row:t,column:n,cellHeight:a,cellWidth:l,cell:c}of d){const d=t+a-1,u=t<=s&&s<=d;t<o&&o<=d?(e.setAttribute("rowspan",a+i,c),h[n]=-l):r&&u&&(h[n]=l)}for(let n=0;n<i;n++){const n=e.createElement("tableRow");e.insert(n,t,o);for(let t=0;t<h.length;t++){const o=h[t],i=e.createPositionAt(n,"end");o>0&&ZA(e,i,o>1?{colspan:o}:null),t+=Math.abs(o)-1}}}))}insertColumns(t,e={}){const n=this.editor.model,o=e.at||0,i=e.columns||1;n.change((e=>{const n=t.getAttribute("headingColumns");o<n&&e.setAttribute("headingColumns",n+i,t);const r=this.getColumns(t);if(0===o||r===o){for(const n of t.getChildren())n.is("element","tableRow")&&SC(i,e,e.createPositionAt(n,o?"end":0));return}const s=new tC(t,{column:o,includeAllSlots:!0});for(const t of s){const{row:n,cell:r,cellAnchorColumn:a,cellAnchorRow:l,cellWidth:c,cellHeight:d}=t;if(a<o){e.setAttribute("colspan",c+i,r);const t=l+d-1;for(let e=n;e<=t;e++)s.skipRow(e)}else SC(i,e,t.getPositionBefore())}}))}removeRows(t,e){const n=this.editor.model,o=e.rows||1,i=this.getRows(t),r=e.at,s=r+o-1;if(s>i-1)throw new l("tableutils-removerows-row-index-out-of-range",this,{table:t,options:e});n.change((e=>{const{cellsToMove:n,cellsToTrim:o}=function(t,e,n){const o=new Map,i=[];for(const{row:r,column:s,cellHeight:a,cell:l}of new tC(t,{endRow:n})){const t=r+a-1;if(r>=e&&r<=n&&t>n){const t=a-(n-r+1);o.set(s,{cell:l,rowspan:t})}if(r<e&&t>=e){let o;o=t>=n?n-e+1:t-e+1,i.push({cell:l,rowspan:a-o})}}return{cellsToMove:o,cellsToTrim:i}}(t,r,s);if(n.size){!function(t,e,n,o){const i=[...new tC(t,{includeAllSlots:!0,row:e})],r=t.getChild(e);let s;for(const{column:t,cell:e,isAnchor:a}of i)if(n.has(t)){const{cell:e,rowspan:i}=n.get(t),a=s?o.createPositionAfter(s):o.createPositionAt(r,0);o.move(o.createRangeOn(e),a),KA("rowspan",i,e,o),s=e}else a&&(s=e)}(t,s+1,n,e)}for(let n=s;n>=r;n--)e.remove(t.getChild(n));for(const{rowspan:t,cell:n}of o)KA("rowspan",t,n,e);!function(t,e,n,o){const i=t.getAttribute("headingRows")||0;if(e<i){KA("headingRows",n<i?i-(n-e+1):e,t,o,0)}}(t,r,s,e),fC(t,this)||bC(t,this)}))}removeColumns(t,e){const n=this.editor.model,o=e.at,i=e.columns||1,r=e.at+i-1;n.change((e=>{!function(t,e,n){const o=t.getAttribute("headingColumns")||0;if(o&&e.first<o){const i=Math.min(o-1,e.last)-e.first+1;n.setAttribute("headingColumns",o-i,t)}}(t,{first:o,last:r},e);for(let n=r;n>=o;n--)for(const{cell:o,column:i,cellWidth:r}of[...new tC(t)])i<=n&&r>1&&i+r>n?KA("colspan",r-1,o,e):i===n&&e.remove(o);bC(t,this)||fC(t,this)}))}splitCellVertically(t,e=2){const n=this.editor.model,o=t.parent.parent,i=parseInt(t.getAttribute("rowspan")||1),r=parseInt(t.getAttribute("colspan")||1);n.change((n=>{if(r>1){const{newCellsSpan:o,updatedSpan:s}=BC(r,e);KA("colspan",s,t,n);const a={};o>1&&(a.colspan=o),i>1&&(a.rowspan=i);SC(r>e?e-1:r-1,n,n.createPositionAfter(t),a)}if(r<e){const s=e-r,a=[...new tC(o)],{column:l}=a.find((({cell:e})=>e===t)),c=a.filter((({cell:e,cellWidth:n,column:o})=>e!==t&&o===l||o<l&&o+n>l));for(const{cell:t,cellWidth:e}of c)n.setAttribute("colspan",e+s,t);const d={};i>1&&(d.rowspan=i),SC(s,n,n.createPositionAfter(t),d);const h=o.getAttribute("headingColumns")||0;h>l&&KA("headingColumns",h+s,o,n)}}))}splitCellHorizontally(t,e=2){const n=this.editor.model,o=t.parent,i=o.parent,r=i.getChildIndex(o),s=parseInt(t.getAttribute("rowspan")||1),a=parseInt(t.getAttribute("colspan")||1);n.change((n=>{if(s>1){const o=[...new tC(i,{startRow:r,endRow:r+s-1,includeAllSlots:!0})],{newCellsSpan:l,updatedSpan:c}=BC(s,e);KA("rowspan",c,t,n);const{column:d}=o.find((({cell:e})=>e===t)),h={};l>1&&(h.rowspan=l),a>1&&(h.colspan=a);for(const t of o){const{column:e,row:o}=t,i=e===d,s=(o+r+c)%l==0;o>=r+c&&i&&s&&SC(1,n,t.getPositionBefore(),h)}}if(s<e){const o=e-s,l=[...new tC(i,{startRow:0,endRow:r})];for(const{cell:e,cellHeight:i,row:s}of l)if(e!==t&&s+i>r){const t=i+o;n.setAttribute("rowspan",t,e)}const c={};a>1&&(c.colspan=a),DC(n,i,r+1,o,1,c);const d=i.getAttribute("headingRows")||0;d>r&&KA("headingRows",d+o,i,n)}}))}getColumns(t){return[...t.getChild(0).getChildren()].reduce(((t,e)=>t+parseInt(e.getAttribute("colspan")||1)),0)}getRows(t){return Array.from(t.getChildren()).reduce(((t,e)=>e.is("element","tableRow")?t+1:t),0)}createTableWalker(t,e={}){return new tC(t,e)}getSelectedTableCells(t){const e=[];for(const n of this.sortRanges(t.getRanges())){const t=n.getContainedElement();t&&t.is("element","tableCell")&&e.push(t)}return e}getTableCellsContainingSelection(t){const e=[];for(const n of t.getRanges()){const t=n.start.findAncestor("tableCell");t&&e.push(t)}return e}getSelectionAffectedTableCells(t){const e=this.getSelectedTableCells(t);return e.length?e:this.getTableCellsContainingSelection(t)}getRowIndexes(t){const e=t.map((t=>t.parent.index));return this._getFirstLastIndexesObject(e)}getColumnIndexes(t){const e=t[0].findAncestor("table"),n=[...new tC(e)].filter((e=>t.includes(e.cell))).map((t=>t.column));return this._getFirstLastIndexesObject(n)}isSelectionRectangular(t){if(t.length<2||!this._areCellInTheSameTableSection(t))return!1;const e=new Set,n=new Set;let o=0;for(const i of t){const{row:t,column:r}=this.getCellLocation(i),s=parseInt(i.getAttribute("rowspan")||1),a=parseInt(i.getAttribute("colspan")||1);e.add(t),n.add(r),s>1&&e.add(t+s-1),a>1&&n.add(r+a-1),o+=s*a}const i=function(t,e){const n=Array.from(t.values()),o=Array.from(e.values()),i=Math.max(...n),r=Math.min(...n),s=Math.max(...o),a=Math.min(...o);return(i-r+1)*(s-a+1)}(e,n);return i==o}sortRanges(t){return Array.from(t).sort(IC)}_getFirstLastIndexesObject(t){const e=t.sort(((t,e)=>t-e));return{first:e[0],last:e[e.length-1]}}_areCellInTheSameTableSection(t){const e=t[0].findAncestor("table"),n=this.getRowIndexes(t),o=parseInt(e.getAttribute("headingRows")||0);if(!this._areIndexesInSameSection(n,o))return!1;const i=parseInt(e.getAttribute("headingColumns")||0),r=this.getColumnIndexes(t);return this._areIndexesInSameSection(r,i)}_areIndexesInSameSection({first:t,last:e},n){return t<n===e<n}}function DC(t,e,n,o,i,r={}){for(let s=0;s<o;s++){const o=t.createElement("tableRow");t.insert(o,e,n),SC(i,t,t.createPositionAt(o,"end"),r)}}function SC(t,e,n,o={}){for(let i=0;i<t;i++)ZA(e,n,o)}function BC(t,e){if(t<e)return{newCellsSpan:1,updatedSpan:1};const n=Math.floor(t/e);return{newCellsSpan:n,updatedSpan:t-n*e+n}}function IC(t,e){const n=t.start,o=e.start;return n.isBefore(o)?-1:1}class PC extends q{refresh(){const t=this.editor.plugins.get(TC),e=t.getSelectedTableCells(this.editor.model.document.selection);this.isEnabled=t.isSelectionRectangular(e,this.editor.plugins.get(TC))}execute(){const t=this.editor.model,e=this.editor.plugins.get(TC);t.change((n=>{const o=e.getSelectedTableCells(t.document.selection),i=o.shift(),{mergeWidth:r,mergeHeight:s}=function(t,e,n){let o=0,i=0;for(const t of e){const{row:e,column:r}=n.getCellLocation(t);o=VC(t,r,o,"colspan"),i=VC(t,e,i,"rowspan")}const{row:r,column:s}=n.getCellLocation(t);return{mergeWidth:o-s,mergeHeight:i-r}}(i,o,e);KA("colspan",r,i,n),KA("rowspan",s,i,n);for(const t of o)RC(t,i,n);kC(i.findAncestor("table"),e),n.setSelection(i,"in")}))}}function RC(t,e,n){zC(t)||(zC(e)&&n.remove(n.createRangeIn(e)),n.move(n.createRangeIn(t),n.createPositionAt(e,"end"))),n.remove(t)}function zC(t){return 1==t.childCount&&t.getChild(0).is("element","paragraph")&&t.getChild(0).isEmpty}function VC(t,e,n,o){const i=parseInt(t.getAttribute(o)||1);return Math.max(n,e+i)}class FC extends q{constructor(t){super(t),this.affectsData=!1}refresh(){const t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=t.length>0}execute(){const t=this.editor.model,e=this.editor.plugins.get("TableUtils"),n=e.getSelectionAffectedTableCells(t.document.selection),o=e.getRowIndexes(n),i=n[0].findAncestor("table"),r=[];for(let e=o.first;e<=o.last;e++)for(const n of i.getChild(e).getChildren())r.push(t.createRangeOn(n));t.change((t=>{t.setSelection(r)}))}}class OC extends q{constructor(t){super(t),this.affectsData=!1}refresh(){const t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=t.length>0}execute(){const t=this.editor.plugins.get("TableUtils"),e=this.editor.model,n=t.getSelectionAffectedTableCells(e.document.selection),o=n[0],i=n.pop(),r=o.findAncestor("table"),s=t.getCellLocation(o),a=t.getCellLocation(i),l=Math.min(s.column,a.column),c=Math.max(s.column,a.column),d=[];for(const t of new tC(r,{startColumn:l,endColumn:c}))d.push(e.createRangeOn(t.cell));e.change((t=>{t.setSelection(d)}))}}function NC(t){t.document.registerPostFixer((e=>function(t,e){const n=e.document.differ.getChanges();let o=!1;const i=new Set;for(const e of n){let n;"table"==e.name&&"insert"==e.type&&(n=e.position.nodeAfter),"tableRow"!=e.name&&"tableCell"!=e.name||(n=e.position.findAncestor("table")),HC(e)&&(n=e.range.start.findAncestor("table")),n&&!i.has(n)&&(o=MC(n,t)||o,o=LC(n,t)||o,i.add(n))}return o}(e,t)))}function MC(t,e){let n=!1;const o=function(t){const e=parseInt(t.getAttribute("headingRows")||0),n=Array.from(t.getChildren()).reduce(((t,e)=>e.is("element","tableRow")?t+1:t),0),o=[];for(const{row:i,cell:r,cellHeight:s}of new tC(t)){if(s<2)continue;const t=i<e?e:n;if(i+s>t){const e=t-i;o.push({cell:r,rowspan:e})}}return o}(t);if(o.length){n=!0;for(const t of o)KA("rowspan",t.rowspan,t.cell,e,1)}return n}function LC(t,e){let n=!1;const o=function(t){const e=new Array(t.childCount).fill(0);for(const{rowIndex:n}of new tC(t,{includeAllSlots:!0}))e[n]++;return e}(t),i=[];for(const[e,n]of o.entries())!n&&t.getChild(e).is("element","tableRow")&&i.push(e);if(i.length){n=!0;for(const n of i.reverse())e.remove(t.getChild(n)),o.splice(n,1)}const r=o.filter(((e,n)=>t.getChild(n).is("element","tableRow"))),s=r[0];if(!r.every((t=>t===s))){const o=r.reduce(((t,e)=>e>t?e:t),0);for(const[i,s]of r.entries()){const r=o-s;if(r){for(let n=0;n<r;n++)ZA(e,e.createPositionAt(t.getChild(i),"end"));n=!0}}}return n}function HC(t){const e="attribute"===t.type,n=t.attributeKey;return e&&("headingRows"===n||"colspan"===n||"rowspan"===n)}function qC(t){t.document.registerPostFixer((e=>function(t,e){const n=e.document.differ.getChanges();let o=!1;for(const e of n)"insert"==e.type&&"table"==e.name&&(o=WC(e.position.nodeAfter,t)||o),"insert"==e.type&&"tableRow"==e.name&&(o=jC(e.position.nodeAfter,t)||o),"insert"==e.type&&"tableCell"==e.name&&(o=UC(e.position.nodeAfter,t)||o),$C(e)&&(o=UC(e.position.parent,t)||o);return o}(e,t)))}function WC(t,e){let n=!1;for(const o of t.getChildren())o.is("element","tableRow")&&(n=jC(o,e)||n);return n}function jC(t,e){let n=!1;for(const o of t.getChildren())n=UC(o,e)||n;return n}function UC(t,e){if(0==t.childCount)return e.insertElement("paragraph",t),!0;const n=Array.from(t.getChildren()).filter((t=>t.is("$text")));for(const t of n)e.wrap(e.createRangeOn(t),"paragraph");return!!n.length}function $C(t){return!(!t.position||!t.position.parent.is("element","tableCell"))&&("insert"==t.type&&"$text"==t.name||"remove"==t.type)}function GC(t,e){if(!t.is("element","paragraph"))return!1;const n=e.toViewElement(t);return!!n&&rC(t)!==n.is("element","span")}var KC=n(3881),ZC={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(KC.Z,ZC);KC.Z.locals;class JC extends L{static get pluginName(){return"TableEditing"}static get requires(){return[TC]}init(){const t=this.editor,e=t.model,n=e.schema,o=t.conversion,i=t.plugins.get(TC);n.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),n.register("tableRow",{allowIn:"table",isLimit:!0}),n.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),o.for("upcast").add((t=>{t.on("element:figure",((t,e,n)=>{if(!n.consumable.test(e.viewItem,{name:!0,classes:"table"}))return;const o=function(t){for(const e of t.getChildren())if(e.is("element","table"))return e}(e.viewItem);if(!o||!n.consumable.test(o,{name:!0}))return;n.consumable.consume(e.viewItem,{name:!0,classes:"table"});const i=Ea(n.convertItem(o,e.modelCursor).modelRange.getItems());i?(n.convertChildren(e.viewItem,n.writer.createPositionAt(i,"end")),n.updateConversionResult(i,e)):n.consumable.revert(e.viewItem,{name:!0,classes:"table"})}))})),o.for("upcast").add(YA()),o.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:nC(i,{asWidget:!0})}),o.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:nC(i)}),o.for("upcast").elementToElement({model:"tableRow",view:"tr"}),o.for("upcast").add((t=>{t.on("element:tr",((t,e)=>{e.viewItem.isEmpty&&0==e.modelCursor.index&&t.stop()}),{priority:"high"})})),o.for("downcast").elementToElement({model:"tableRow",view:(t,{writer:e})=>t.isEmpty?e.createEmptyElement("tr"):e.createContainerElement("tr")}),o.for("upcast").elementToElement({model:"tableCell",view:"td"}),o.for("upcast").elementToElement({model:"tableCell",view:"th"}),o.for("upcast").add(QA("td")),o.for("upcast").add(QA("th")),o.for("editingDowncast").elementToElement({model:"tableCell",view:oC({asWidget:!0})}),o.for("dataDowncast").elementToElement({model:"tableCell",view:oC()}),o.for("editingDowncast").elementToElement({model:"paragraph",view:iC({asWidget:!0}),converterPriority:"high"}),o.for("dataDowncast").elementToElement({model:"paragraph",view:iC(),converterPriority:"high"}),o.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),o.for("upcast").attributeToAttribute({model:{key:"colspan",value:YC("colspan")},view:"colspan"}),o.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),o.for("upcast").attributeToAttribute({model:{key:"rowspan",value:YC("rowspan")},view:"rowspan"}),t.data.mapper.on("modelToViewPosition",((t,e)=>{const n=e.modelPosition.parent,o=e.modelPosition.nodeBefore;if(!n.is("element","tableCell"))return;if(!o||!o.is("element","paragraph"))return;const i=e.mapper.toViewElement(o),r=e.mapper.toViewElement(n);i===r&&(e.viewPosition=e.mapper.findPositionIn(r,o.maxOffset))})),t.config.define("table.defaultHeadings.rows",0),t.config.define("table.defaultHeadings.columns",0),t.commands.add("insertTable",new sC(t)),t.commands.add("insertTableRowAbove",new aC(t,{order:"above"})),t.commands.add("insertTableRowBelow",new aC(t,{order:"below"})),t.commands.add("insertTableColumnLeft",new lC(t,{order:"left"})),t.commands.add("insertTableColumnRight",new lC(t,{order:"right"})),t.commands.add("removeTableRow",new vC(t)),t.commands.add("removeTableColumn",new yC(t)),t.commands.add("splitTableCellVertically",new cC(t,{direction:"vertically"})),t.commands.add("splitTableCellHorizontally",new cC(t,{direction:"horizontally"})),t.commands.add("mergeTableCells",new PC(t)),t.commands.add("mergeTableCellRight",new AC(t,{direction:"right"})),t.commands.add("mergeTableCellLeft",new AC(t,{direction:"left"})),t.commands.add("mergeTableCellDown",new AC(t,{direction:"down"})),t.commands.add("mergeTableCellUp",new AC(t,{direction:"up"})),t.commands.add("setTableColumnHeader",new EC(t)),t.commands.add("setTableRowHeader",new xC(t)),t.commands.add("selectTableRow",new FC(t)),t.commands.add("selectTableColumn",new OC(t)),NC(e),qC(e),this.listenTo(e.document,"change:data",(()=>{!function(t,e){const n=t.document.differ;for(const t of n.getChanges()){let n,o=!1;if("attribute"==t.type){const e=t.range.start.nodeAfter;if(!e||!e.is("element","table"))continue;if("headingRows"!=t.attributeKey&&"headingColumns"!=t.attributeKey)continue;n=e,o="headingRows"==t.attributeKey}else"tableRow"!=t.name&&"tableCell"!=t.name||(n=t.position.findAncestor("table"),o="tableRow"==t.name);if(!n)continue;const i=n.getAttribute("headingRows")||0,r=n.getAttribute("headingColumns")||0,s=new tC(n);for(const t of s){const n=t.row<i||t.column<r?"th":"td",s=e.mapper.toViewElement(t.cell);s&&s.is("element")&&s.name!=n&&e.reconvertItem(o?t.cell.parent:t.cell)}}}(e,t.editing),function(t,e){const n=t.document.differ,o=new Set;for(const t of n.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","tableCell")&&o.add(e)}for(const t of o.values()){const n=Array.from(t.getChildren()).filter((t=>GC(t,e.mapper)));for(const t of n)e.reconvertItem(t)}}(e,t.editing)}))}}function YC(t){return e=>{const n=parseInt(e.getAttribute(t));return Number.isNaN(n)||n<=0?null:n}}var QC=n(1613),XC={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(QC.Z,XC);QC.Z.locals;class tv extends nh{constructor(t){super(t);const e=this.bindTemplate;this._geometryLabelId=`ck-editor__label_${r()}`,this.items=this._createGridCollection(),this.keystrokes=new Da,this.focusTracker=new Ta,this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",((t,e)=>`${e} × ${t}`)),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"[email protected]":e.to("boxover")},children:this.items},{tag:"div",attributes:{id:this._geometryLabelId,class:["ck","ck-insert-table-dropdown__label"]},children:[{text:e.to("label")}]}],on:{mousedown:e.to((t=>{t.preventDefault()})),click:e.to((()=>{this.fire("execute")})),keydown:e.to((t=>{"Enter"===t.key&&(this.fire("execute"),t.preventDefault())}))}}),this.on("boxover",((t,e)=>{const{row:n,column:o}=e.target.dataset;this.items.get(10*(n-1)+(o-1)).focus()})),this.focusTracker.on("change:focusedElement",((t,e,n)=>{if(!n)return;const{row:o,column:i}=n.dataset;this.set({rows:parseInt(o),columns:parseInt(i)})})),this.on("change:columns",(()=>this._highlightGridBoxes())),this.on("change:rows",(()=>this._highlightGridBoxes()))}render(){super.render(),zh({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:10});for(const t of this.items)this.focusTracker.add(t.element);this.keystrokes.listenTo(this.element)}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){const t=this.rows,e=this.columns;this.items.map(((n,o)=>{const i=Math.floor(o/10)<t&&o%10<e;n.set("isOn",i)}))}_createGridCollection(){const t=[];for(let e=0;e<100;e++){const n=Math.floor(e/10),o=e%10;t.push(new ev(this.locale,n+1,o+1,this._geometryLabelId))}return this.createCollection(t)}}class ev extends nh{constructor(t,e,n,o){super(t);const i=this.bindTemplate;this.set("isOn",!1),this.setTemplate({tag:"div",attributes:{class:["ck","ck-insert-table-dropdown-grid-box",i.if("isOn","ck-on")],"data-row":e,"data-column":n,tabindex:-1,"aria-labelledby":o}})}focus(){this.element.focus()}}class nv extends L{static get pluginName(){return"TableUI"}init(){const t=this.editor,e=this.editor.t,n="ltr"===t.locale.contentLanguageDirection;t.ui.componentFactory.add("insertTable",(n=>{const o=t.commands.get("insertTable"),i=Tu(n);let r;return i.bind("isEnabled").to(o),i.buttonView.set({icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 6v3h4V6H3zm0 4v3h4v-3H3zm0 4v3h4v-3H3zm5 3h4v-3H8v3zm5 0h4v-3h-4v3zm4-4v-3h-4v3h4zm0-4V6h-4v3h4zm1.5 8a1.5 1.5 0 0 1-1.5 1.5H3A1.5 1.5 0 0 1 1.5 17V4c.222-.863 1.068-1.5 2-1.5h13c.932 0 1.778.637 2 1.5v13zM12 13v-3H8v3h4zm0-4V6H8v3h4z"/></svg>',label:e("Insert table"),tooltip:!0}),i.on("change:isOpen",(()=>{r||(r=new tv(n),i.panelView.children.add(r),r.delegate("execute").to(i),i.on("execute",(()=>{t.execute("insertTable",{rows:r.rows,columns:r.columns}),t.editing.view.focus()})))})),i})),t.ui.componentFactory.add("tableColumn",(t=>{const o=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:e("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:n?"insertTableColumnLeft":"insertTableColumnRight",label:e("Insert column left")}},{type:"button",model:{commandName:n?"insertTableColumnRight":"insertTableColumnLeft",label:e("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:e("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:e("Select column")}}];return this._prepareDropdown(e("Column"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M18 7v1H2V7h16zm0 5v1H2v-1h16z" opacity=".6"/><path d="M14 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1zm-2 1H8v4h4V2zm0 6H8v4h4V8zm0 6H8v4h4v-4z"/></svg>',o,t)})),t.ui.componentFactory.add("tableRow",(t=>{const n=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:e("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:e("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:e("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:e("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:e("Select row")}}];return this._prepareDropdown(e("Row"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v16h-1V2z" opacity=".6"/><path d="M1 6h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm1 2v4h4V8H2zm6 0v4h4V8H8zm6 0v4h4V8h-4z"/></svg>',n,t)})),t.ui.componentFactory.add("mergeTableCells",(t=>{const o=[{type:"button",model:{commandName:"mergeTableCellUp",label:e("Merge cell up")}},{type:"button",model:{commandName:n?"mergeTableCellRight":"mergeTableCellLeft",label:e("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:e("Merge cell down")}},{type:"button",model:{commandName:n?"mergeTableCellLeft":"mergeTableCellRight",label:e("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:e("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:e("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(e("Merge cells"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v7h-1V2zm6 5v1H2V7h16zM8 12v1H2v-1h6z" opacity=".6"/><path d="M7 7h12a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm1 2v9h10V9H8z"/></svg>',o,t)}))}_prepareDropdown(t,e,n,o){const i=this.editor,r=Tu(o),s=this._fillDropdownWithListOptions(r,n);return r.buttonView.set({label:t,icon:e,tooltip:!0}),r.bind("isEnabled").toMany(s,"isEnabled",((...t)=>t.some((t=>t)))),this.listenTo(r,"execute",(t=>{i.execute(t.source.commandName),t.source instanceof jh||i.editing.view.focus()})),r}_prepareMergeSplitButtonDropdown(t,e,n,o){const i=this.editor,r=Tu(o,nu),s="mergeTableCells",a=i.commands.get(s),l=this._fillDropdownWithListOptions(r,n);return r.buttonView.set({label:t,icon:e,tooltip:!0,isEnabled:!0}),r.bind("isEnabled").toMany([a,...l],"isEnabled",((...t)=>t.some((t=>t)))),this.listenTo(r.buttonView,"execute",(()=>{i.execute(s),i.editing.view.focus()})),this.listenTo(r,"execute",(t=>{i.execute(t.source.commandName),i.editing.view.focus()})),r}_fillDropdownWithListOptions(t,e){const n=this.editor,o=[],i=new ko;for(const t of e)ov(t,n,o,i);return Su(t,i,n.ui.componentFactory),o}}function ov(t,e,n,o){const i=t.model=new tg(t.model),{commandName:r,bindIsOn:s}=t.model;if("button"===t.type||"switchbutton"===t.type){const t=e.commands.get(r);n.push(t),i.set({commandName:r}),i.bind("isEnabled").to(t),s&&i.bind("isOn").to(t,"value")}i.set({withText:!0}),o.add(t)}var iv=n(6945),rv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(iv.Z,rv);iv.Z.locals;class sv extends L{static get pluginName(){return"TableSelection"}static get requires(){return[TC,TC]}init(){const t=this.editor.model;this.listenTo(t,"deleteContent",((t,e)=>this._handleDeleteContent(t,e)),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const t=this.editor.plugins.get(TC),e=this.editor.model.document.selection,n=t.getSelectedTableCells(e);return 0==n.length?null:n}getSelectionAsFragment(){const t=this.editor.plugins.get(TC),e=this.getSelectedTableCells();return e?this.editor.model.change((n=>{const o=n.createDocumentFragment(),{first:i,last:r}=t.getColumnIndexes(e),{first:s,last:a}=t.getRowIndexes(e),l=e[0].findAncestor("table");let c=a,d=r;if(t.isSelectionRectangular(e)){const t={firstColumn:i,lastColumn:r,firstRow:s,lastRow:a};c=wC(l,t),d=_C(l,t)}const h=dC(l,{startRow:s,startColumn:i,endRow:c,endColumn:d},n);return n.insert(h,o,0),o})):null}setCellSelection(t,e){const n=this._getCellsToSelect(t,e);this.editor.model.change((t=>{t.setSelection(n.cells.map((e=>t.createRangeOn(e))),{backward:n.backward})}))}getFocusCell(){const t=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return t&&t.is("element","tableCell")?t:null}getAnchorCell(){const t=Ea(this.editor.model.document.selection.getRanges()).getContainedElement();return t&&t.is("element","tableCell")?t:null}_defineSelectionConverter(){const t=this.editor,e=new Set;t.conversion.for("editingDowncast").add((t=>t.on("selection",((t,n,o)=>{const i=o.writer;!function(t){for(const n of e)t.removeClass("ck-editor__editable_selected",n);e.clear()}(i);const r=this.getSelectedTableCells();if(!r)return;for(const t of r){const n=o.mapper.toViewElement(t);i.addClass("ck-editor__editable_selected",n),e.add(n)}const s=o.mapper.toViewElement(r[r.length-1]);i.setSelection(s,0)}),{priority:"lowest"})))}_enablePluginDisabling(){const t=this.editor;this.on("change:isEnabled",(()=>{if(!this.isEnabled){const e=this.getSelectedTableCells();if(!e)return;t.model.change((n=>{const o=n.createPositionAt(e[0],0),i=t.model.schema.getNearestSelectionRange(o);n.setSelection(i)}))}}))}_handleDeleteContent(t,e){const n=this.editor.plugins.get(TC),[o,i]=e,r=this.editor.model,s=!i||"backward"==i.direction,a=n.getSelectedTableCells(o);a.length&&(t.stop(),r.change((t=>{const e=a[s?a.length-1:0];r.change((t=>{for(const e of a)r.deleteContent(t.createSelection(e,"in"))}));const n=r.schema.getNearestSelectionRange(t.createPositionAt(e,0));o.is("documentSelection")?t.setSelection(n):o.setTo(n)})))}_getCellsToSelect(t,e){const n=this.editor.plugins.get("TableUtils"),o=n.getCellLocation(t),i=n.getCellLocation(e),r=Math.min(o.row,i.row),s=Math.max(o.row,i.row),a=Math.min(o.column,i.column),l=Math.max(o.column,i.column),c=new Array(s-r+1).fill(null).map((()=>[])),d={startRow:r,endRow:s,startColumn:a,endColumn:l};for(const{row:e,cell:n}of new tC(t.findAncestor("table"),d))c[e-r].push(n);const h=i.row<o.row,u=i.column<o.column;return h&&c.reverse(),u&&c.forEach((t=>t.reverse())),{cells:c.flat(),backward:h||u}}}class av extends L{static get pluginName(){return"TableClipboard"}static get requires(){return[sv,TC]}init(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"copy",((t,e)=>this._onCopyCut(t,e))),this.listenTo(e,"cut",((t,e)=>this._onCopyCut(t,e))),this.listenTo(t.model,"insertContent",((t,e)=>this._onInsertContent(t,...e)),{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(t,e){const n=this.editor.plugins.get(sv);if(!n.getSelectedTableCells())return;if("cut"==t.name&&this.editor.isReadOnly)return;e.preventDefault(),t.stop();const o=this.editor.data,i=this.editor.editing.view.document,r=o.toView(n.getSelectionAsFragment());i.fire("clipboardOutput",{dataTransfer:e.dataTransfer,content:r,method:t.name})}_onInsertContent(t,e,n){if(n&&!n.is("documentSelection"))return;const o=this.editor.model,i=this.editor.plugins.get(TC);let r=lv(e,o);if(!r)return;const s=i.getSelectionAffectedTableCells(o.document.selection);s.length?(t.stop(),o.change((t=>{const e={width:i.getColumns(r),height:i.getRows(r)},n=function(t,e,n,o){const i=t[0].findAncestor("table"),r=o.getColumnIndexes(t),s=o.getRowIndexes(t),a={firstColumn:r.first,lastColumn:r.last,firstRow:s.first,lastRow:s.last},l=1===t.length;l&&(a.lastRow+=e.height-1,a.lastColumn+=e.width-1,function(t,e,n,o){const i=o.getColumns(t),r=o.getRows(t);n>i&&o.insertColumns(t,{at:i,columns:n-i});e>r&&o.insertRows(t,{at:r,rows:e-r})}(i,a.lastRow+1,a.lastColumn+1,o));l||!o.isSelectionRectangular(t)?function(t,e,n){const{firstRow:o,lastRow:i,firstColumn:r,lastColumn:s}=e,a={first:o,last:i},l={first:r,last:s};dv(t,r,a,n),dv(t,s+1,a,n),cv(t,o,l,n),cv(t,i+1,l,n,o)}(i,a,n):(a.lastRow=wC(i,a),a.lastColumn=_C(i,a));return a}(s,e,t,i),o=n.lastRow-n.firstRow+1,a=n.lastColumn-n.firstColumn+1,l={startRow:0,startColumn:0,endRow:Math.min(o,e.height)-1,endColumn:Math.min(a,e.width)-1};r=dC(r,l,t);const c=s[0].findAncestor("table"),d=this._replaceSelectedCellsWithPasted(r,e,c,n,t);if(this.editor.plugins.get("TableSelection").isEnabled){const e=i.sortRanges(d.map((e=>t.createRangeOn(e))));t.setSelection(e)}else t.setSelection(d[0],0)}))):kC(r,i)}_replaceSelectedCellsWithPasted(t,e,n,o,i){const{width:r,height:s}=e,a=function(t,e,n){const o=new Array(n).fill(null).map((()=>new Array(e).fill(null)));for(const{column:e,row:n,cell:i}of new tC(t))o[n][e]=i;return o}(t,r,s),l=[...new tC(n,{startRow:o.firstRow,endRow:o.lastRow,startColumn:o.firstColumn,endColumn:o.lastColumn,includeAllSlots:!0})],c=[];let d;for(const t of l){const{row:e,column:n}=t;n===o.firstColumn&&(d=t.getPositionBefore());const l=e-o.firstRow,h=n-o.firstColumn,u=a[l%s][h%r],g=u?i.cloneElement(u):null,m=this._replaceTableSlotCell(t,g,d,i);m&&(pC(m,e,n,o.lastRow,o.lastColumn,i),c.push(m),d=i.createPositionAfter(m))}const h=parseInt(n.getAttribute("headingRows")||0),u=parseInt(n.getAttribute("headingColumns")||0),g=o.firstRow<h&&h<=o.lastRow,m=o.firstColumn<u&&u<=o.lastColumn;if(g){const t=cv(n,h,{first:o.firstColumn,last:o.lastColumn},i,o.firstRow);c.push(...t)}if(m){const t=dv(n,u,{first:o.firstRow,last:o.lastRow},i);c.push(...t)}return c}_replaceTableSlotCell(t,e,n,o){const{cell:i,isAnchor:r}=t;return r&&o.remove(i),e?(o.insert(e,n),e):null}getTableIfOnlyTableInContent(t,e){return lv(t,e)}}function lv(t,e){if(!t.is("documentFragment")&&!t.is("element"))return null;if(t.is("element","table"))return t;if(1==t.childCount&&t.getChild(0).is("element","table"))return t.getChild(0);const n=e.createRangeIn(t);for(const t of n.getItems())if(t.is("element","table")){const o=e.createRange(n.start,e.createPositionBefore(t));if(e.hasContent(o,{ignoreWhitespaces:!0}))return null;const i=e.createRange(e.createPositionAfter(t),n.end);return e.hasContent(i,{ignoreWhitespaces:!0})?null:t}return null}function cv(t,e,n,o,i=0){if(e<1)return;return hC(t,e,i).filter((({column:t,cellWidth:e})=>hv(t,e,n))).map((({cell:t})=>uC(t,e,o)))}function dv(t,e,n,o){if(e<1)return;return gC(t,e).filter((({row:t,cellHeight:e})=>hv(t,e,n))).map((({cell:t,column:n})=>mC(t,n,e,o)))}function hv(t,e,n){const o=t+e-1,{first:i,last:r}=n;return t>=i&&t<=r||t<i&&o>=i}class uv extends L{static get pluginName(){return"TableKeyboard"}static get requires(){return[sv,TC]}init(){const t=this.editor.editing.view.document;this.listenTo(t,"arrowKey",((...t)=>this._onArrowKey(...t)),{context:"table"}),this.listenTo(t,"tab",((...t)=>this._handleTabOnSelectedTable(...t)),{context:"figure"}),this.listenTo(t,"tab",((...t)=>this._handleTab(...t)),{context:["th","td"]})}_handleTabOnSelectedTable(t,e){const n=this.editor,o=n.model.document.selection.getSelectedElement();o&&o.is("element","table")&&(e.preventDefault(),e.stopPropagation(),t.stop(),n.model.change((t=>{t.setSelection(t.createRangeIn(o.getChild(0).getChild(0)))})))}_handleTab(t,e){const n=this.editor,o=this.editor.plugins.get(TC),i=n.model.document.selection,r=!e.shiftKey;let s=o.getTableCellsContainingSelection(i)[0];if(s||(s=this.editor.plugins.get("TableSelection").getFocusCell()),!s)return;e.preventDefault(),e.stopPropagation(),t.stop();const a=s.parent,l=a.parent,c=l.getChildIndex(a),d=a.getChildIndex(s),h=0===d;if(!r&&h&&0===c)return void n.model.change((t=>{t.setSelection(t.createRangeOn(l))}));const u=d===a.childCount-1,g=c===o.getRows(l)-1;if(r&&g&&u&&(n.execute("insertTableRowBelow"),c===o.getRows(l)-1))return void n.model.change((t=>{t.setSelection(t.createRangeOn(l))}));let m;if(r&&u){const t=l.getChild(c+1);m=t.getChild(0)}else if(!r&&h){const t=l.getChild(c-1);m=t.getChild(t.childCount-1)}else m=a.getChild(d+(r?1:-1));n.model.change((t=>{t.setSelection(t.createRangeIn(m))}))}_onArrowKey(t,e){const n=this.editor,o=wr(e.keyCode,n.locale.contentLanguageDirection);this._handleArrowKeys(o,e.shiftKey)&&(e.preventDefault(),e.stopPropagation(),t.stop())}_handleArrowKeys(t,e){const n=this.editor.plugins.get(TC),o=this.editor.model,i=o.document.selection,r=["right","down"].includes(t),s=n.getSelectedTableCells(i);if(s.length){let n;return n=e?this.editor.plugins.get("TableSelection").getFocusCell():r?s[s.length-1]:s[0],this._navigateFromCellInDirection(n,t,e),!0}const a=i.focus.findAncestor("tableCell");if(!a)return!1;if(!i.isCollapsed)if(e){if(i.isBackward==r&&!i.containsEntireContent(a))return!1}else{const t=i.getSelectedElement();if(!t||!o.schema.isObject(t))return!1}return!!this._isSelectionAtCellEdge(i,a,r)&&(this._navigateFromCellInDirection(a,t,e),!0)}_isSelectionAtCellEdge(t,e,n){const o=this.editor.model,i=this.editor.model.schema,r=n?t.getLastPosition():t.getFirstPosition();if(!i.getLimitElement(r).is("element","tableCell")){return o.createPositionAt(e,n?"end":0).isTouching(r)}const s=o.createSelection(r);return o.modifySelection(s,{direction:n?"forward":"backward"}),r.isEqual(s.focus)}_navigateFromCellInDirection(t,e,n=!1){const o=this.editor.model,i=t.findAncestor("table"),r=[...new tC(i,{includeAllSlots:!0})],{row:s,column:a}=r[r.length-1],l=r.find((({cell:e})=>e==t));let{row:c,column:d}=l;switch(e){case"left":d--;break;case"up":c--;break;case"right":d+=l.cellWidth;break;case"down":c+=l.cellHeight}if(c<0||c>s||d<0&&c<=0||d>a&&c>=s)return void o.change((t=>{t.setSelection(t.createRangeOn(i))}));d<0?(d=n?0:a,c--):d>a&&(d=n?a:0,c++);const h=r.find((t=>t.row==c&&t.column==d)).cell,u=["right","down"].includes(e),g=this.editor.plugins.get("TableSelection");if(n&&g.isEnabled){const e=g.getAnchorCell()||t;g.setCellSelection(e,h)}else{const t=o.createPositionAt(h,u?0:"end");o.change((e=>{e.setSelection(t)}))}}}class gv extends Zs{constructor(t){super(t),this.domEventType=["mousemove","mouseleave"]}onDomEvent(t){this.fire(t.type,t)}}class mv extends L{static get pluginName(){return"TableMouse"}static get requires(){return[sv,TC]}init(){this.editor.editing.view.addObserver(gv),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const t=this.editor,e=t.plugins.get(TC);let n=!1;const o=t.plugins.get(sv);this.listenTo(t.editing.view.document,"mousedown",((i,r)=>{const s=t.model.document.selection;if(!this.isEnabled||!o.isEnabled)return;if(!r.domEvent.shiftKey)return;const a=o.getAnchorCell()||e.getTableCellsContainingSelection(s)[0];if(!a)return;const l=this._getModelTableCellFromDomEvent(r);l&&pv(a,l)&&(n=!0,o.setCellSelection(a,l),r.preventDefault())})),this.listenTo(t.editing.view.document,"mouseup",(()=>{n=!1})),this.listenTo(t.editing.view.document,"selectionChange",(t=>{n&&t.stop()}),{priority:"highest"})}_enableMouseDragSelection(){const t=this.editor;let e,n,o=!1,i=!1;const r=t.plugins.get(sv);this.listenTo(t.editing.view.document,"mousedown",((t,n)=>{this.isEnabled&&r.isEnabled&&(n.domEvent.shiftKey||n.domEvent.ctrlKey||n.domEvent.altKey||(e=this._getModelTableCellFromDomEvent(n)))})),this.listenTo(t.editing.view.document,"mousemove",((t,s)=>{if(!s.domEvent.buttons)return;if(!e)return;const a=this._getModelTableCellFromDomEvent(s);a&&pv(e,a)&&(n=a,o||n==e||(o=!0)),o&&(i=!0,r.setCellSelection(e,n),s.preventDefault())})),this.listenTo(t.editing.view.document,"mouseup",(()=>{o=!1,i=!1,e=null,n=null})),this.listenTo(t.editing.view.document,"selectionChange",(t=>{i&&t.stop()}),{priority:"highest"})}_getModelTableCellFromDomEvent(t){const e=t.target,n=this.editor.editing.view.createPositionAt(e,0);return this.editor.editing.mapper.toModelPosition(n).parent.findAncestor("tableCell",{includeSelf:!0})}}function pv(t,e){return t.parent.parent==e.parent.parent}var fv=n(6306),bv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(fv.Z,bv);fv.Z.locals;function kv(t){const e=t.getSelectedElement();return e&&_v(e)?e:null}function wv(t){const e=t.getFirstPosition();if(!e)return null;let n=e.parent;for(;n;){if(n.is("element")&&_v(n))return n;n=n.parent}return null}function _v(t){return!!t.getCustomProperty("table")&&eb(t)}function Av(t,e){const{viewElement:n,defaultValue:o,modelAttribute:i,styleName:r,reduceBoxSides:s=!1}=e;t.for("upcast").attributeToAttribute({view:{name:n,styles:{[r]:/[\s\S]+/}},model:{key:i,value:t=>{const e=t.getNormalizedStyle(r),n=s?xv(e):e;if(o!==n)return n}}})}function Cv(t,e,n,o){t.for("upcast").add((t=>t.on("element:"+e,((t,e,i)=>{if(!e.modelRange)return;const r=["border-top-width","border-top-color","border-top-style","border-bottom-width","border-bottom-color","border-bottom-style","border-right-width","border-right-color","border-right-style","border-left-width","border-left-color","border-left-style"].filter((t=>e.viewItem.hasStyle(t)));if(!r.length)return;const s={styles:r};if(!i.consumable.test(e.viewItem,s))return;const a=[...e.modelRange.getItems({shallow:!0})].pop();i.consumable.consume(e.viewItem,s);const l={style:e.viewItem.getNormalizedStyle("border-style"),color:e.viewItem.getNormalizedStyle("border-color"),width:e.viewItem.getNormalizedStyle("border-width")},c={style:xv(l.style),color:xv(l.color),width:xv(l.width)};c.style!==o.style&&i.writer.setAttribute(n.style,c.style,a),c.color!==o.color&&i.writer.setAttribute(n.color,c.color,a),c.width!==o.width&&i.writer.setAttribute(n.width,c.width,a)}))))}function vv(t,{modelElement:e,modelAttribute:n,styleName:o}){t.for("downcast").attributeToAttribute({model:{name:e,key:n},view:t=>({key:"style",value:{[o]:t}})})}function yv(t,{modelAttribute:e,styleName:n}){t.for("downcast").add((t=>t.on(`attribute:${e}:table`,((t,e,o)=>{const{item:i,attributeNewValue:r}=e,{mapper:s,writer:a}=o;if(!o.consumable.consume(e.item,t.name))return;const l=[...s.toViewElement(i).getChildren()].find((t=>t.is("element","table")));r?a.setStyle(n,r,l):a.removeStyle(n,l)}))))}function xv(t){if(!t)return;return["top","right","bottom","left"].map((e=>t[e])).reduce(((t,e)=>t==e?t:null))||t}class Ev extends q{constructor(t,e,n){super(t),this.attributeName=e,this._defaultValue=n}refresh(){const t=this.editor.model.document.selection.getFirstPosition().findAncestor("table");this.isEnabled=!!t,this.value=this._getValue(t)}execute(t={}){const e=this.editor.model,n=e.document.selection,{value:o,batch:i}=t,r=n.getFirstPosition().findAncestor("table"),s=this._getValueToSet(o);e.enqueueChange(i,(t=>{s?t.setAttribute(this.attributeName,s,r):t.removeAttribute(this.attributeName,r)}))}_getValue(t){if(!t)return;const e=t.getAttribute(this.attributeName);return e!==this._defaultValue?e:void 0}_getValueToSet(t){if(t!==this._defaultValue)return t}}class Tv extends Ev{constructor(t,e){super(t,"tableBackgroundColor",e)}}function Dv(t){if(!t||!E(t))return t;const{top:e,right:n,bottom:o,left:i}=t;return e==n&&n==o&&o==i?e:void 0}function Sv(t,e){const n=parseFloat(t);return Number.isNaN(n)||String(n)!==String(t)?t:`${n}${e}`}function Bv(t,e={}){const n=Object.assign({borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:""},t);return e.includeAlignmentProperty&&!n.alignment&&(n.alignment="center"),e.includePaddingProperty&&!n.padding&&(n.padding=""),e.includeVerticalAlignmentProperty&&!n.verticalAlignment&&(n.verticalAlignment="middle"),e.includeHorizontalAlignmentProperty&&!n.horizontalAlignment&&(n.horizontalAlignment=e.isRightToLeftContent?"right":"left"),n}class Iv extends Ev{constructor(t,e){super(t,"tableBorderColor",e)}_getValue(t){if(!t)return;const e=Dv(t.getAttribute(this.attributeName));return e!==this._defaultValue?e:void 0}}class Pv extends Ev{constructor(t,e){super(t,"tableBorderStyle",e)}_getValue(t){if(!t)return;const e=Dv(t.getAttribute(this.attributeName));return e!==this._defaultValue?e:void 0}}class Rv extends Ev{constructor(t,e){super(t,"tableBorderWidth",e)}_getValue(t){if(!t)return;const e=Dv(t.getAttribute(this.attributeName));return e!==this._defaultValue?e:void 0}_getValueToSet(t){if((t=Sv(t,"px"))!==this._defaultValue)return t}}class zv extends Ev{constructor(t,e){super(t,"tableWidth",e)}_getValueToSet(t){if((t=Sv(t,"px"))!==this._defaultValue)return t}}class Vv extends Ev{constructor(t,e){super(t,"tableHeight",e)}_getValueToSet(t){return(t=Sv(t,"px"))===this._defaultValue?null:t}}class Fv extends Ev{constructor(t,e){super(t,"tableAlignment",e)}}const Ov=/^(left|center|right)$/,Nv=/^(left|none|right)$/;class Mv extends L{static get pluginName(){return"TablePropertiesEditing"}static get requires(){return[JC]}init(){const t=this.editor,e=t.model.schema,n=t.conversion;t.config.define("table.tableProperties.defaultProperties",{});const o=Bv(t.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0});t.data.addStyleProcessorRules(mm),function(t,e,n){const o={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};t.extend("table",{allowAttributes:Object.values(o)}),Cv(e,"table",o,n),yv(e,{modelAttribute:o.color,styleName:"border-color"}),yv(e,{modelAttribute:o.style,styleName:"border-style"}),yv(e,{modelAttribute:o.width,styleName:"border-width"})}(e,n,{color:o.borderColor,style:o.borderStyle,width:o.borderWidth}),t.commands.add("tableBorderColor",new Iv(t,o.borderColor)),t.commands.add("tableBorderStyle",new Pv(t,o.borderStyle)),t.commands.add("tableBorderWidth",new Rv(t,o.borderWidth)),function(t,e,n){t.extend("table",{allowAttributes:["tableAlignment"]}),e.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment"},view:t=>({key:"style",value:{float:"center"===t?"none":t}}),converterPriority:"high"}),e.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:Nv}},model:{key:"tableAlignment",value:t=>{let e=t.getStyle("float");return"none"===e&&(e="center"),e===n?null:e}}}).attributeToAttribute({view:{attributes:{align:Ov}},model:{name:"table",key:"tableAlignment",value:t=>{const e=t.getAttribute("align");return e===n?null:e}}})}(e,n,o.alignment),t.commands.add("tableAlignment",new Fv(t,o.alignment)),Lv(e,n,{modelAttribute:"tableWidth",styleName:"width",defaultValue:o.width}),t.commands.add("tableWidth",new zv(t,o.width)),Lv(e,n,{modelAttribute:"tableHeight",styleName:"height",defaultValue:o.height}),t.commands.add("tableHeight",new Vv(t,o.height)),t.data.addStyleProcessorRules(gm),function(t,e,n){const{modelAttribute:o}=n;t.extend("table",{allowAttributes:[o]}),Av(e,{viewElement:"table",...n}),yv(e,n)}(e,n,{modelAttribute:"tableBackgroundColor",styleName:"background-color",defaultValue:o.backgroundColor}),t.commands.add("tableBackgroundColor",new Tv(t,o.backgroundColor))}}function Lv(t,e,n){const{modelAttribute:o}=n;t.extend("table",{allowAttributes:[o]}),Av(e,{viewElement:/^(table|figure)$/,...n}),vv(e,{modelElement:"table",...n})}var Hv=n(7368),qv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(Hv.Z,qv);Hv.Z.locals;class Wv extends nh{constructor(t,e){super(t);const n=this.bindTemplate;this.set("value",""),this.set("id"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("isFocused",!1),this.set("isEmpty",!0),this.set("ariaDescribedById"),this.options=e,this._dropdownView=this._createDropdownView(),this._inputView=this._createInputTextView(),this._stillTyping=!1,this.setTemplate({tag:"div",attributes:{class:["ck","ck-input-color",n.if("hasError","ck-error")],id:n.to("id"),"aria-invalid":n.if("hasError",!0),"aria-describedby":n.to("ariaDescribedById")},children:[this._dropdownView,this._inputView]}),this.on("change:value",((t,e,n)=>this._setInputValue(n)))}focus(){this._inputView.focus()}_createDropdownView(){const t=this.locale,e=t.t,n=this.bindTemplate,o=this._createColorGrid(t),i=Tu(t),r=new nh,s=this._createRemoveColorButton();return r.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:n.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",n.if("value","ck-hidden",(t=>""!=t))]}}]}),i.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),i.buttonView.children.add(r),i.buttonView.label=e("Color picker"),i.buttonView.tooltip=!0,i.panelPosition="rtl"===t.uiLanguageDirection?"se":"sw",i.panelView.children.add(s),i.panelView.children.add(o),i.bind("isEnabled").to(this,"isReadOnly",(t=>!t)),i}_createInputTextView(){const t=this.locale,e=new Uu(t);return e.extendTemplate({on:{blur:e.bindTemplate.to("blur")}}),e.value=this.value,e.bind("isReadOnly","hasError").to(this),this.bind("isFocused","isEmpty").to(e),e.on("input",(()=>{const t=e.element.value,n=this.options.colorDefinitions.find((e=>t===e.label));this._stillTyping=!0,this.value=n&&n.color||t})),e.on("blur",(()=>{this._stillTyping=!1,this._setInputValue(e.element.value)})),e.delegate("input").to(this),e}_createRemoveColorButton(){const t=this.locale,e=t.t,n=new Hh(t),o=this.options.defaultColorValue||"",i=e(o?"Restore default":"Remove color");return n.class="ck-input-color__remove-color",n.withText=!0,n.icon=Bh.eraser,n.label=i,n.on("execute",(()=>{this.value=o,this._dropdownView.isOpen=!1,this.fire("input")})),n}_createColorGrid(t){const e=new Yh(t,{colorDefinitions:this.options.colorDefinitions,columns:this.options.columns});return e.on("execute",((t,e)=>{this.value=e.value,this._dropdownView.isOpen=!1,this.fire("input")})),e.bind("selectedColor").to(this,"value"),e}_setInputValue(t){if(!this._stillTyping){const e=jv(t),n=this.options.colorDefinitions.find((t=>e===jv(t.color)));this._inputView.value=n?n.label:t||""}}}function jv(t){return t.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const Uv=t=>""===t;function $v(t){return{none:t("None"),solid:t("Solid"),dotted:t("Dotted"),dashed:t("Dashed"),double:t("Double"),groove:t("Groove"),ridge:t("Ridge"),inset:t("Inset"),outset:t("Outset")}}function Gv(t){return t('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function Kv(t){return t('The value is invalid. Try "10px" or "2em" or simply "2".')}function Zv(t){return t=t.trim(),Uv(t)||Gg(t)}function Jv(t){return t=t.trim(),Uv(t)||ny(t)||Yg(t)||Xg(t)}function Yv(t){return t=t.trim(),Uv(t)||ny(t)||Yg(t)}function Qv(t,e){const n=new ko,o=$v(t.t);for(const i in o){const r={type:"button",model:new tg({_borderStyleValue:i,label:o[i],withText:!0})};"none"===i?r.model.bind("isOn").to(t,"borderStyle",(t=>"none"===e?!t:t===i)):r.model.bind("isOn").to(t,"borderStyle",(t=>t===i)),n.add(r)}return n}function Xv(t){const{view:e,icons:n,toolbar:o,labels:i,propertyName:r,nameToValue:s,defaultValue:a}=t;for(const t in i){const l=new Hh(e.locale);l.set({label:i[t],icon:n[t],tooltip:i[t]});const c=s?s(t):t;l.bind("isOn").to(e,r,(t=>{let e=t;return""===t&&a&&(e=a),c===e})),l.on("execute",(()=>{e[r]=c})),o.items.add(l)}}const ty=[{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"}];function ey(t){return(e,n,o)=>{const i=new Wv(e.locale,{colorDefinitions:(r=t.colorConfig,r.map((t=>({color:t.model,label:t.label,options:{hasBorder:t.hasBorder}})))),columns:t.columns,defaultColorValue:t.defaultColorValue});var r;return i.set({id:n,ariaDescribedById:o}),i.bind("isReadOnly").to(e,"isEnabled",(t=>!t)),i.bind("hasError").to(e,"errorText",(t=>!!t)),i.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused").to(i),i}}function ny(t){const e=parseFloat(t);return!Number.isNaN(e)&&t===String(e)}var oy=n(9247),iy={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(oy.Z,iy);oy.Z.locals;class ry extends nh{constructor(t,e={}){super(t);const n=this.bindTemplate;this.set("class",e.class||null),this.children=this.createCollection(),e.children&&e.children.forEach((t=>this.children.add(t))),this.set("_role",null),this.set("_ariaLabelledBy",null),e.labelView&&this.set({_role:"group",_ariaLabelledBy:e.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",n.to("class")],role:n.to("_role"),"aria-labelledby":n.to("_ariaLabelledBy")},children:this.children})}}var sy=n(4070),ay={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(sy.Z,ay);sy.Z.locals;var ly=n(6237),cy={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(ly.Z,cy);ly.Z.locals;var dy=n(7341),hy={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(dy.Z,hy);dy.Z.locals;const uy={left:Bh.objectLeft,center:Bh.objectCenter,right:Bh.objectRight};class gy extends nh{constructor(t,e){super(t),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=e;const{borderStyleDropdown:n,borderWidthInput:o,borderColorInput:i,borderRowLabel:r}=this._createBorderFields(),{backgroundRowLabel:s,backgroundInput:a}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:d,dimensionsLabel:h}=this._createDimensionFields(),{alignmentToolbar:u,alignmentLabel:g}=this._createAlignmentFields();this.focusTracker=new Ta,this.keystrokes=new Da,this.children=this.createCollection(),this.borderStyleDropdown=n,this.borderWidthInput=o,this.borderColorInput=i,this.backgroundInput=a,this.widthInput=l,this.heightInput=d,this.alignmentToolbar=u;const{saveButtonView:m,cancelButtonView:p}=this._createActionButtons();this.saveButtonView=m,this.cancelButtonView=p,this._focusables=new Rd,this._focusCycler=new au({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Hu(t,{label:this.t("Table properties")})),this.children.add(new ry(t,{labelView:r,children:[r,n,i,o],class:"ck-table-form__border-row"})),this.children.add(new ry(t,{labelView:s,children:[s,a],class:"ck-table-form__background-row"})),this.children.add(new ry(t,{children:[new ry(t,{labelView:h,children:[h,l,c,d],class:"ck-table-form__dimensions-row"}),new ry(t,{labelView:g,children:[g,u],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new ry(t,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Rh({view:this}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.alignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const t=this.options.defaultTableProperties,e={style:t.borderStyle,width:t.borderWidth,color:t.borderColor},n=ey({colorConfig:this.options.borderColors,columns:5,defaultColorValue:e.color}),o=this.locale,i=this.t,r=new Fu(o);r.text=i("Border");const s=$v(this.t),a=new Zu(o,Qu);a.set({label:i("Style"),class:"ck-table-form__border-style"}),a.fieldView.buttonView.set({isOn:!1,withText:!0,tooltip:i("Style")}),a.fieldView.buttonView.bind("label").to(this,"borderStyle",(t=>s[t||"none"])),a.fieldView.on("execute",(t=>{this.borderStyle=t.source._borderStyleValue})),a.bind("isEmpty").to(this,"borderStyle",(t=>!t)),Su(a.fieldView,Qv(this,e.style));const l=new Zu(o,Ju);l.set({label:i("Width"),class:"ck-table-form__border-width"}),l.fieldView.bind("value").to(this,"borderWidth"),l.bind("isEnabled").to(this,"borderStyle",my),l.fieldView.on("input",(()=>{this.borderWidth=l.fieldView.element.value}));const c=new Zu(o,n);return c.set({label:i("Color"),class:"ck-table-form__border-color"}),c.fieldView.bind("value").to(this,"borderColor"),c.bind("isEnabled").to(this,"borderStyle",my),c.fieldView.on("input",(()=>{this.borderColor=c.fieldView.value})),this.on("change:borderStyle",((t,n,o,i)=>{my(o)||(this.borderColor="",this.borderWidth=""),my(i)||(this.borderColor=e.color,this.borderWidth=e.width)})),{borderRowLabel:r,borderStyleDropdown:a,borderColorInput:c,borderWidthInput:l}}_createBackgroundFields(){const t=this.locale,e=this.t,n=new Fu(t);n.text=e("Background");const o=ey({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor}),i=new Zu(t,o);return i.set({label:e("Color"),class:"ck-table-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",(()=>{this.backgroundColor=i.fieldView.value})),{backgroundRowLabel:n,backgroundInput:i}}_createDimensionFields(){const t=this.locale,e=this.t,n=new Fu(t);n.text=e("Dimensions");const o=new Zu(t,Ju);o.set({label:e("Width"),class:"ck-table-form__dimensions-row__width"}),o.fieldView.bind("value").to(this,"width"),o.fieldView.on("input",(()=>{this.width=o.fieldView.element.value}));const i=new nh(t);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const r=new Zu(t,Ju);return r.set({label:e("Height"),class:"ck-table-form__dimensions-row__height"}),r.fieldView.bind("value").to(this,"height"),r.fieldView.on("input",(()=>{this.height=r.fieldView.element.value})),{dimensionsLabel:n,widthInput:o,operatorLabel:i,heightInput:r}}_createAlignmentFields(){const t=this.locale,e=this.t,n=new Fu(t);n.text=e("Alignment");const o=new mu(t);return o.set({isCompact:!0,ariaLabel:e("Table alignment toolbar")}),Xv({view:this,icons:uy,toolbar:o,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:n,alignmentToolbar:o}}_createActionButtons(){const t=this.locale,e=this.t,n=new Hh(t),o=new Hh(t),i=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return n.set({label:e("Save"),icon:Bh.check,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(i,"errorText",((...t)=>t.every((t=>!t)))),o.set({label:e("Cancel"),icon:Bh.cancel,class:"ck-button-cancel",withText:!0}),o.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:o}}get _alignmentLabels(){const t=this.locale,e=this.t,n=e("Align table to the left"),o=e("Center table"),i=e("Align table to the right");return"rtl"===t.uiLanguageDirection?{right:i,center:o,left:n}:{left:n,center:o,right:i}}}function my(t){return"none"!==t}const py=hh.defaultPositions,fy=[py.northArrowSouth,py.northArrowSouthWest,py.northArrowSouthEast,py.southArrowNorth,py.southArrowNorthWest,py.southArrowNorthEast,py.viewportStickyNorth];function by(t,e){const n=t.plugins.get("ContextualBalloon");if(wv(t.editing.view.document.selection)){let o;o="cell"===e?wy(t):ky(t),n.updatePosition(o)}}function ky(t){const e=t.model.document.selection.getFirstPosition().findAncestor("table"),n=t.editing.mapper.toViewElement(e);return{target:t.editing.view.domConverter.mapViewToDom(n),positions:fy}}function wy(t){const e=t.editing.mapper,n=t.editing.view.domConverter,o=t.model.document.selection;if(o.rangeCount>1)return{target:()=>function(t,e){const n=e.editing.mapper,o=e.editing.view.domConverter,i=Array.from(t).map((t=>{const e=_y(t.start),i=n.toViewElement(e);return new _a(o.mapViewToDom(i))}));return _a.getBoundingRect(i)}(o.getRanges(),t),positions:fy};const i=_y(o.getFirstPosition()),r=e.toViewElement(i);return{target:n.mapViewToDom(r),positions:fy}}function _y(t){return t.nodeAfter&&t.nodeAfter.is("element","tableCell")?t.nodeAfter:t.findAncestor("tableCell")}const Ay={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class Cy extends L{static get requires(){return[ag]}static get pluginName(){return"TablePropertiesUI"}constructor(t){super(t),t.config.define("table.tableProperties",{borderColors:ty,backgroundColors:ty})}init(){const t=this.editor,e=t.t;this._defaultTableProperties=Bv(t.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._balloon=t.plugins.get(ag),this.view=this._createPropertiesView(),this._undoStepBatch=null,t.ui.componentFactory.add("tableProperties",(n=>{const o=new Hh(n);o.set({label:e("Table properties"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z"/></svg>',tooltip:!0}),this.listenTo(o,"execute",(()=>this._showView()));const i=Object.values(Ay).map((e=>t.commands.get(e)));return o.bind("isEnabled").toMany(i,"isEnabled",((...t)=>t.some((t=>t)))),o}))}destroy(){super.destroy(),this.view.destroy()}_createPropertiesView(){const t=this.editor,e=t.config.get("table.tableProperties"),n=$h(e.borderColors),o=Uh(t.locale,n),i=$h(e.backgroundColors),r=Uh(t.locale,i),s=new gy(t.locale,{borderColors:o,backgroundColors:r,defaultTableProperties:this._defaultTableProperties}),a=t.t;s.render(),this.listenTo(s,"submit",(()=>{this._hideView()})),this.listenTo(s,"cancel",(()=>{this._undoStepBatch.operations.length&&t.execute("undo",this._undoStepBatch),this._hideView()})),s.keystrokes.set("Esc",((t,e)=>{this._hideView(),e()})),Ih({emitter:s,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const l=Gv(a),c=Kv(a);return s.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle",this._defaultTableProperties.borderStyle)),s.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:s.borderColorInput,commandName:"tableBorderColor",errorText:l,validator:Zv,defaultValue:this._defaultTableProperties.borderColor})),s.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:s.borderWidthInput,commandName:"tableBorderWidth",errorText:c,validator:Yv,defaultValue:this._defaultTableProperties.borderWidth})),s.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:s.backgroundInput,commandName:"tableBackgroundColor",errorText:l,validator:Zv,defaultValue:this._defaultTableProperties.backgroundColor})),s.on("change:width",this._getValidatedPropertyChangeCallback({viewField:s.widthInput,commandName:"tableWidth",errorText:c,validator:Jv,defaultValue:this._defaultTableProperties.width})),s.on("change:height",this._getValidatedPropertyChangeCallback({viewField:s.heightInput,commandName:"tableHeight",errorText:c,validator:Jv,defaultValue:this._defaultTableProperties.height})),s.on("change:alignment",this._getPropertyChangeCallback("tableAlignment",this._defaultTableProperties.alignment)),s}_fillViewFormFromCommandValues(){const t=this.editor.commands,e=t.get("tableBorderStyle");Object.entries(Ay).map((([e,n])=>{const o=this._defaultTableProperties[e]||"";return[e,t.get(n).value||o]})).forEach((([t,n])=>{("borderColor"!==t&&"borderWidth"!==t||"none"!==e.value)&&this.view.set(t,n)}))}_showView(){const t=this.editor;this.listenTo(t.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:ky(t)}),this._undoStepBatch=t.model.createBatch(),this.view.focus()}_hideView(){const t=this.editor;this.stopListening(t.ui,"update"),this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const t=this.editor;wv(t.editing.view.document.selection)?this._isViewVisible&&by(t,"table"):this._hideView()}get _isViewVisible(){return this._balloon.visibleView===this.view}get _isViewInBalloon(){return this._balloon.hasView(this.view)}_getPropertyChangeCallback(t,e){return(n,o,i,r)=>{(r||e!==i)&&this.editor.execute(t,{value:i,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(t){const{commandName:e,viewField:n,validator:o,errorText:i,defaultValue:r}=t,s=ca((()=>{n.errorText=i}),500);return(t,i,a,l)=>{s.cancel(),(l||r!==a)&&(o(a)?(this.editor.execute(e,{value:a,batch:this._undoStepBatch}),n.errorText=null):s())}}}var vy=n(5087),yy={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(vy.Z,yy);vy.Z.locals;const xy={left:Bh.alignLeft,center:Bh.alignCenter,right:Bh.alignRight,justify:Bh.alignJustify,top:Bh.alignTop,middle:Bh.alignMiddle,bottom:Bh.alignBottom};class Ey extends nh{constructor(t,e){super(t),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=e;const{borderStyleDropdown:n,borderWidthInput:o,borderColorInput:i,borderRowLabel:r}=this._createBorderFields(),{backgroundRowLabel:s,backgroundInput:a}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:d,dimensionsLabel:h}=this._createDimensionFields(),{horizontalAlignmentToolbar:u,verticalAlignmentToolbar:g,alignmentLabel:m}=this._createAlignmentFields();this.focusTracker=new Ta,this.keystrokes=new Da,this.children=this.createCollection(),this.borderStyleDropdown=n,this.borderWidthInput=o,this.borderColorInput=i,this.backgroundInput=a,this.paddingInput=this._createPaddingField(),this.widthInput=l,this.heightInput=d,this.horizontalAlignmentToolbar=u,this.verticalAlignmentToolbar=g;const{saveButtonView:p,cancelButtonView:f}=this._createActionButtons();this.saveButtonView=p,this.cancelButtonView=f,this._focusables=new Rd,this._focusCycler=new au({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Hu(t,{label:this.t("Cell properties")})),this.children.add(new ry(t,{labelView:r,children:[r,n,i,o],class:"ck-table-form__border-row"})),this.children.add(new ry(t,{labelView:s,children:[s,a],class:"ck-table-form__background-row"})),this.children.add(new ry(t,{children:[new ry(t,{labelView:h,children:[h,l,c,d],class:"ck-table-form__dimensions-row"}),new ry(t,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new ry(t,{labelView:m,children:[m,u,g],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new ry(t,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-cell-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Rh({view:this}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const t=this.options.defaultTableCellProperties,e={style:t.borderStyle,width:t.borderWidth,color:t.borderColor},n=ey({colorConfig:this.options.borderColors,columns:5,defaultColorValue:e.color}),o=this.locale,i=this.t,r=new Fu(o);r.text=i("Border");const s=$v(i),a=new Zu(o,Qu);a.set({label:i("Style"),class:"ck-table-form__border-style"}),a.fieldView.buttonView.set({isOn:!1,withText:!0,tooltip:i("Style")}),a.fieldView.buttonView.bind("label").to(this,"borderStyle",(t=>s[t||"none"])),a.fieldView.on("execute",(t=>{this.borderStyle=t.source._borderStyleValue})),a.bind("isEmpty").to(this,"borderStyle",(t=>!t)),Su(a.fieldView,Qv(this,e.style));const l=new Zu(o,Ju);l.set({label:i("Width"),class:"ck-table-form__border-width"}),l.fieldView.bind("value").to(this,"borderWidth"),l.bind("isEnabled").to(this,"borderStyle",Ty),l.fieldView.on("input",(()=>{this.borderWidth=l.fieldView.element.value}));const c=new Zu(o,n);return c.set({label:i("Color"),class:"ck-table-form__border-color"}),c.fieldView.bind("value").to(this,"borderColor"),c.bind("isEnabled").to(this,"borderStyle",Ty),c.fieldView.on("input",(()=>{this.borderColor=c.fieldView.value})),this.on("change:borderStyle",((t,n,o,i)=>{Ty(o)||(this.borderColor="",this.borderWidth=""),Ty(i)||(this.borderColor=e.color,this.borderWidth=e.width)})),{borderRowLabel:r,borderStyleDropdown:a,borderColorInput:c,borderWidthInput:l}}_createBackgroundFields(){const t=this.locale,e=this.t,n=new Fu(t);n.text=e("Background");const o=ey({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor}),i=new Zu(t,o);return i.set({label:e("Color"),class:"ck-table-cell-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",(()=>{this.backgroundColor=i.fieldView.value})),{backgroundRowLabel:n,backgroundInput:i}}_createDimensionFields(){const t=this.locale,e=this.t,n=new Fu(t);n.text=e("Dimensions");const o=new Zu(t,Ju);o.set({label:e("Width"),class:"ck-table-form__dimensions-row__width"}),o.fieldView.bind("value").to(this,"width"),o.fieldView.on("input",(()=>{this.width=o.fieldView.element.value}));const i=new nh(t);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const r=new Zu(t,Ju);return r.set({label:e("Height"),class:"ck-table-form__dimensions-row__height"}),r.fieldView.bind("value").to(this,"height"),r.fieldView.on("input",(()=>{this.height=r.fieldView.element.value})),{dimensionsLabel:n,widthInput:o,operatorLabel:i,heightInput:r}}_createPaddingField(){const t=this.locale,e=this.t,n=new Zu(t,Ju);return n.set({label:e("Padding"),class:"ck-table-cell-properties-form__padding"}),n.fieldView.bind("value").to(this,"padding"),n.fieldView.on("input",(()=>{this.padding=n.fieldView.element.value})),n}_createAlignmentFields(){const t=this.locale,e=this.t,n=new Fu(t);n.text=e("Table cell text alignment");const o=new mu(t),i="rtl"===this.locale.contentLanguageDirection;o.set({isCompact:!0,ariaLabel:e("Horizontal text alignment toolbar")}),Xv({view:this,icons:xy,toolbar:o,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:t=>{if(i){if("left"===t)return"right";if("right"===t)return"left"}return t},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const r=new mu(t);return r.set({isCompact:!0,ariaLabel:e("Vertical text alignment toolbar")}),Xv({view:this,icons:xy,toolbar:r,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:o,verticalAlignmentToolbar:r,alignmentLabel:n}}_createActionButtons(){const t=this.locale,e=this.t,n=new Hh(t),o=new Hh(t),i=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return n.set({label:e("Save"),icon:Bh.check,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(i,"errorText",((...t)=>t.every((t=>!t)))),o.set({label:e("Cancel"),icon:Bh.cancel,class:"ck-button-cancel",withText:!0}),o.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:o}}get _horizontalAlignmentLabels(){const t=this.locale,e=this.t,n=e("Align cell text to the left"),o=e("Align cell text to the center"),i=e("Align cell text to the right"),r=e("Justify cell text");return"rtl"===t.uiLanguageDirection?{right:i,center:o,left:n,justify:r}:{left:n,center:o,right:i,justify:r}}get _verticalAlignmentLabels(){const t=this.t;return{top:t("Align cell text to the top"),middle:t("Align cell text to the middle"),bottom:t("Align cell text to the bottom")}}}function Ty(t){return"none"!==t}const Dy={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",width:"tableCellWidth",height:"tableCellHeight",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class Sy extends L{static get requires(){return[ag]}static get pluginName(){return"TableCellPropertiesUI"}constructor(t){super(t),t.config.define("table.tableCellProperties",{borderColors:ty,backgroundColors:ty})}init(){const t=this.editor,e=t.t;this._defaultTableCellProperties=Bv(t.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===t.locale.contentLanguageDirection}),this._balloon=t.plugins.get(ag),this.view=this._createPropertiesView(),this._undoStepBatch=null,t.ui.componentFactory.add("tableCellProperties",(n=>{const o=new Hh(n);o.set({label:e("Cell properties"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z"/></svg>',tooltip:!0}),this.listenTo(o,"execute",(()=>this._showView()));const i=Object.values(Dy).map((e=>t.commands.get(e)));return o.bind("isEnabled").toMany(i,"isEnabled",((...t)=>t.some((t=>t)))),o}))}destroy(){super.destroy(),this.view.destroy()}_createPropertiesView(){const t=this.editor,e=t.editing.view.document,n=t.config.get("table.tableCellProperties"),o=$h(n.borderColors),i=Uh(t.locale,o),r=$h(n.backgroundColors),s=Uh(t.locale,r),a=new Ey(t.locale,{borderColors:i,backgroundColors:s,defaultTableCellProperties:this._defaultTableCellProperties}),l=t.t;a.render(),this.listenTo(a,"submit",(()=>{this._hideView()})),this.listenTo(a,"cancel",(()=>{this._undoStepBatch.operations.length&&t.execute("undo",this._undoStepBatch),this._hideView()})),a.keystrokes.set("Esc",((t,e)=>{this._hideView(),e()})),this.listenTo(t.ui,"update",(()=>{wv(e.selection)?this._isViewVisible&&by(t,"cell"):this._hideView()})),Ih({emitter:a,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const c=Gv(l),d=Kv(l);return a.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle",this._defaultTableCellProperties.borderStyle)),a.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:a.borderColorInput,commandName:"tableCellBorderColor",errorText:c,validator:Zv,defaultValue:this._defaultTableCellProperties.borderColor})),a.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:a.borderWidthInput,commandName:"tableCellBorderWidth",errorText:d,validator:Yv,defaultValue:this._defaultTableCellProperties.borderWidth})),a.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:a.paddingInput,commandName:"tableCellPadding",errorText:d,validator:Jv,defaultValue:this._defaultTableCellProperties.padding})),a.on("change:width",this._getValidatedPropertyChangeCallback({viewField:a.widthInput,commandName:"tableCellWidth",errorText:d,validator:Jv,defaultValue:this._defaultTableCellProperties.width})),a.on("change:height",this._getValidatedPropertyChangeCallback({viewField:a.heightInput,commandName:"tableCellHeight",errorText:d,validator:Jv,defaultValue:this._defaultTableCellProperties.height})),a.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:a.backgroundInput,commandName:"tableCellBackgroundColor",errorText:c,validator:Zv,defaultValue:this._defaultTableCellProperties.backgroundColor})),a.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment",this._defaultTableCellProperties.horizontalAlignment)),a.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment",this._defaultTableCellProperties.verticalAlignment)),a}_fillViewFormFromCommandValues(){const t=this.editor.commands,e=t.get("tableCellBorderStyle");Object.entries(Dy).map((([e,n])=>{const o=this._defaultTableCellProperties[e]||"";return[e,t.get(n).value||o]})).forEach((([t,n])=>{("borderColor"!==t&&"borderWidth"!==t||"none"!==e.value)&&this.view.set(t,n)}))}_showView(){const t=this.editor;this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:wy(t)}),this._undoStepBatch=t.model.createBatch(),this.view.focus()}_hideView(){if(!this._isViewInBalloon)return;const t=this.editor;this.stopListening(t.ui,"update"),this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}get _isViewVisible(){return this._balloon.visibleView===this.view}get _isViewInBalloon(){return this._balloon.hasView(this.view)}_getPropertyChangeCallback(t,e){return(n,o,i,r)=>{(r||e!==i)&&this.editor.execute(t,{value:i,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(t){const{commandName:e,viewField:n,validator:o,errorText:i,defaultValue:r}=t,s=ca((()=>{n.errorText=i}),500);return(t,i,a,l)=>{s.cancel(),(l||r!==a)&&(o(a)?(this.editor.execute(e,{value:a,batch:this._undoStepBatch}),n.errorText=null):s())}}}class By extends q{constructor(t,e,n){super(t),this.attributeName=e,this._defaultValue=n}refresh(){const t=this.editor,e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(t.model.document.selection);this.isEnabled=!!e.length,this.value=this._getSingleValue(e)}execute(t={}){const{value:e,batch:n}=t,o=this.editor.model,i=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(o.document.selection),r=this._getValueToSet(e);o.enqueueChange(n,(t=>{r?i.forEach((e=>t.setAttribute(this.attributeName,r,e))):i.forEach((e=>t.removeAttribute(this.attributeName,e)))}))}_getAttribute(t){if(!t)return;const e=t.getAttribute(this.attributeName);return e!==this._defaultValue?e:void 0}_getValueToSet(t){if(t!==this._defaultValue)return t}_getSingleValue(t){const e=this._getAttribute(t[0]);return t.every((t=>this._getAttribute(t)===e))?e:void 0}}class Iy extends By{constructor(t,e){super(t,"tableCellPadding",e)}_getAttribute(t){if(!t)return;const e=Dv(t.getAttribute(this.attributeName));return e!==this._defaultValue?e:void 0}_getValueToSet(t){if((t=Sv(t,"px"))!==this._defaultValue)return t}}class Py extends By{constructor(t,e){super(t,"tableCellWidth",e)}_getValueToSet(t){if((t=Sv(t,"px"))!==this._defaultValue)return t}}class Ry extends By{constructor(t,e){super(t,"tableCellHeight",e)}_getValueToSet(t){return(t=Sv(t,"px"))===this._defaultValue?null:t}}class zy extends By{constructor(t,e){super(t,"tableCellBackgroundColor",e)}}class Vy extends By{constructor(t,e){super(t,"tableCellVerticalAlignment",e)}}class Fy extends By{constructor(t,e){super(t,"tableCellHorizontalAlignment",e)}}class Oy extends By{constructor(t,e){super(t,"tableCellBorderStyle",e)}_getAttribute(t){if(!t)return;const e=Dv(t.getAttribute(this.attributeName));return e!==this._defaultValue?e:void 0}}class Ny extends By{constructor(t,e){super(t,"tableCellBorderColor",e)}_getAttribute(t){if(!t)return;const e=Dv(t.getAttribute(this.attributeName));return e!==this._defaultValue?e:void 0}}class My extends By{constructor(t,e){super(t,"tableCellBorderWidth",e)}_getAttribute(t){if(!t)return;const e=Dv(t.getAttribute(this.attributeName));return e!==this._defaultValue?e:void 0}_getValueToSet(t){if((t=Sv(t,"px"))!==this._defaultValue)return t}}const Ly=/^(top|middle|bottom)$/,Hy=/^(left|center|right|justify)$/;class qy extends L{static get pluginName(){return"TableCellPropertiesEditing"}static get requires(){return[JC]}init(){const t=this.editor,e=t.model.schema,n=t.conversion;t.config.define("table.tableCellProperties.defaultProperties",{});const o=Bv(t.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===t.locale.contentLanguageDirection});t.data.addStyleProcessorRules(mm),function(t,e,n){const o={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};t.extend("tableCell",{allowAttributes:Object.values(o)}),Cv(e,"td",o,n),Cv(e,"th",o,n),vv(e,{modelElement:"tableCell",modelAttribute:o.style,styleName:"border-style"}),vv(e,{modelElement:"tableCell",modelAttribute:o.color,styleName:"border-color"}),vv(e,{modelElement:"tableCell",modelAttribute:o.width,styleName:"border-width"})}(e,n,{color:o.borderColor,style:o.borderStyle,width:o.borderWidth}),t.commands.add("tableCellBorderStyle",new Oy(t,o.borderStyle)),t.commands.add("tableCellBorderColor",new Ny(t,o.borderColor)),t.commands.add("tableCellBorderWidth",new My(t,o.borderWidth)),Wy(e,n,{modelAttribute:"tableCellWidth",styleName:"width",defaultValue:o.width}),t.commands.add("tableCellWidth",new Py(t,o.width)),Wy(e,n,{modelAttribute:"tableCellHeight",styleName:"height",defaultValue:o.height}),t.commands.add("tableCellHeight",new Ry(t,o.height)),t.data.addStyleProcessorRules(xm),Wy(e,n,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:o.padding}),t.commands.add("tableCellPadding",new Iy(t,o.padding)),t.data.addStyleProcessorRules(gm),Wy(e,n,{modelAttribute:"tableCellBackgroundColor",styleName:"background-color",defaultValue:o.backgroundColor}),t.commands.add("tableCellBackgroundColor",new zy(t,o.backgroundColor)),function(t,e,n){t.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),e.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellHorizontalAlignment"},view:t=>({key:"style",value:{"text-align":t}})}),e.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"text-align":Hy}},model:{key:"tableCellHorizontalAlignment",value:t=>{const e=t.getStyle("text-align");return e===n?null:e}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:Hy}},model:{key:"tableCellHorizontalAlignment",value:t=>{const e=t.getAttribute("align");return e===n?null:e}}})}(e,n,o.horizontalAlignment),t.commands.add("tableCellHorizontalAlignment",new Fy(t,o.horizontalAlignment)),function(t,e,n){t.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),e.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellVerticalAlignment"},view:t=>({key:"style",value:{"vertical-align":t}})}),e.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"vertical-align":Ly}},model:{key:"tableCellVerticalAlignment",value:t=>{const e=t.getStyle("vertical-align");return e===n?null:e}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:Ly}},model:{key:"tableCellVerticalAlignment",value:t=>{const e=t.getAttribute("valign");return e===n?null:e}}})}(e,n,o.verticalAlignment),t.commands.add("tableCellVerticalAlignment",new Vy(t,o.verticalAlignment))}}function Wy(t,e,n){const{modelAttribute:o}=n;t.extend("tableCell",{allowAttributes:[o]}),Av(e,{viewElement:/^(td|th)$/,...n}),vv(e,{modelElement:"tableCell",...n})}function jy(t){t.document.registerPostFixer((e=>function(t,e){const n=e.document.differ.getChanges();let o=!1;for(const e of n){if("insert"!=e.type)continue;if(e.position.parent.is("element","table")||"table"==e.name){const n="table"==e.name?e.position.nodeAfter:e.position.parent,i=Array.from(n.getChildren()).filter((t=>t.is("element","caption"))),r=i.shift();if(!r)continue;for(const e of i)t.move(t.createRangeIn(e),r,"end"),t.remove(e);r.nextSibling&&(t.move(t.createRangeOn(r),n,"end"),o=!0),o=!!i.length||o}}return o}(e,t)))}function Uy(t){return!!t&&t.is("element","table")}function $y(t){for(const e of t.getChildren())if(e.is("element","caption"))return e;return null}function Gy(t){const e=t.parent;return"figcaption"==t.name&&e&&"figure"==e.name&&e.hasClass("table")||"caption"==t.name&&e&&"table"==e.name?{name:!0}:null}function Ky(t){const e=t.getSelectedElement();return e&&e.is("element","table")?e:t.getFirstPosition().findAncestor("table")}class Zy extends q{refresh(){const t=Ky(this.editor.model.document.selection);this.isEnabled=!!t,this.isEnabled?this.value=!!$y(t):this.value=!1}execute(t={}){const{focusCaptionOnShow:e}=t;this.editor.model.change((t=>{this.value?this._hideTableCaption(t):this._showTableCaption(t,e)}))}_showTableCaption(t,e){const n=Ky(this.editor.model.document.selection),o=this.editor.plugins.get("TableCaptionEditing")._getSavedCaption(n)||t.createElement("caption");t.append(o,n),e&&t.setSelection(o,"in")}_hideTableCaption(t){const e=Ky(this.editor.model.document.selection),n=this.editor.plugins.get("TableCaptionEditing"),o=$y(e);n._saveCaption(e,o),t.setSelection(t.createRangeIn(e.getChild(0).getChild(0))),t.remove(o)}}class Jy extends L{static get pluginName(){return"TableCaptionEditing"}constructor(t){super(t),this._savedCaptionsMap=new WeakMap}init(){const t=this.editor,e=t.model.schema,n=t.editing.view,o=t.t;e.isRegistered("caption")?e.extend("caption",{allowIn:"table"}):e.register("caption",{allowIn:"table",allowContentOf:"$block",isLimit:!0}),t.commands.add("toggleTableCaption",new Zy(this.editor)),t.conversion.for("upcast").elementToElement({view:Gy,model:"caption"}),t.conversion.for("dataDowncast").elementToElement({model:"caption",view:(t,{writer:e})=>Uy(t.parent)?e.createContainerElement("figcaption"):null}),t.conversion.for("editingDowncast").elementToElement({model:"caption",view:(t,{writer:e})=>{if(!Uy(t.parent))return null;const i=e.createEditableElement("figcaption");return e.setCustomProperty("tableCaption",!0,i),Cg({view:n,element:i,text:o("Enter table caption"),keepOnFocus:!0}),ab(i,e)}}),jy(t.model)}_getSavedCaption(t){const e=this._savedCaptionsMap.get(t);return e?Ga.fromJSON(e):null}_saveCaption(t,e){this._savedCaptionsMap.set(t,e.toJSON())}}class Yy extends L{static get pluginName(){return"TableCaptionUI"}init(){const t=this.editor,e=t.editing.view,n=t.t;t.ui.componentFactory.add("toggleTableCaption",(o=>{const i=t.commands.get("toggleTableCaption"),r=new Hh(o);return r.set({icon:Bh.caption,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(i,"value","isEnabled"),r.bind("label").to(i,"value",(t=>n(t?"Toggle caption off":"Toggle caption on"))),this.listenTo(r,"execute",(()=>{if(t.execute("toggleTableCaption",{focusCaptionOnShow:!0}),i.value){const n=function(t){const e=Ky(t);return e?$y(e):null}(t.model.document.selection),o=t.editing.mapper.toViewElement(n);if(!o)return;e.scrollToTheSelection(),e.change((t=>{t.addClass("table__caption_highlighted",o)}))}t.editing.view.focus()})),r}))}}var Qy=n(2128),Xy={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(Qy.Z,Xy);Qy.Z.locals;const tx={heading1:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M19 9v10h-2v-8h-2V9h4zM4 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H10a1 1 0 0 1-1-1V11H4v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v4.5z"/></svg>',heading2:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1v4.5zm16.076 8.343V18.5h-6.252c.067-.626.27-1.22.61-1.78.338-.561 1.006-1.305 2.005-2.232.804-.749 1.297-1.257 1.479-1.523.245-.368.368-.732.368-1.092 0-.398-.107-.703-.32-.917-.214-.214-.51-.32-.886-.32-.372 0-.669.111-.889.336-.22.224-.347.596-.38 1.117l-1.778-.178c.106-.982.438-1.686.997-2.114.558-.427 1.257-.64 2.095-.64.918 0 1.64.247 2.164.742.525.495.787 1.11.787 1.847 0 .419-.075.818-.225 1.197-.15.378-.388.775-.714 1.19-.216.275-.605.67-1.168 1.187-.563.516-.92.859-1.07 1.028a3.11 3.11 0 0 0-.365.495h3.542z"/></svg>',heading3:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1v4.5zm9.989 7.53 1.726-.209c.055.44.203.777.445 1.01.24.232.533.349.876.349.368 0 .678-.14.93-.42.251-.279.377-.655.377-1.13 0-.448-.12-.803-.362-1.066a1.153 1.153 0 0 0-.882-.393c-.228 0-.501.044-.819.133l.197-1.453c.482.012.85-.092 1.105-.315.253-.222.38-.517.38-.885 0-.313-.093-.563-.279-.75-.186-.185-.434-.278-.743-.278a1.07 1.07 0 0 0-.78.317c-.216.212-.347.52-.394.927l-1.644-.28c.114-.562.287-1.012.517-1.348.231-.337.553-.601.965-.794a3.24 3.24 0 0 1 1.387-.289c.876 0 1.579.28 2.108.838.436.457.653.973.653 1.549 0 .817-.446 1.468-1.339 1.955.533.114.96.37 1.28.768.319.398.478.878.478 1.441 0 .817-.298 1.513-.895 2.088-.596.576-1.339.864-2.228.864-.842 0-1.54-.243-2.094-.727-.555-.485-.876-1.118-.965-1.901z"/></svg>',heading4:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm13.55 10v-1.873h-3.81v-1.561l4.037-5.91h1.498v5.904h1.156v1.567h-1.156V18.5H17.05zm0-3.44v-3.18l-2.14 3.18h2.14z"/></svg>',heading5:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm9.578 7.607 1.777-.184c.05.402.201.72.45.955a1.223 1.223 0 0 0 1.81-.101c.258-.303.387-.759.387-1.368 0-.572-.128-1-.384-1.286-.256-.285-.59-.428-1-.428-.512 0-.971.226-1.377.679l-1.448-.21.915-4.843h4.716v1.67H15.56l-.28 1.58a2.697 2.697 0 0 1 1.219-.298 2.68 2.68 0 0 1 2.012.863c.55.576.825 1.323.825 2.241a3.36 3.36 0 0 1-.666 2.05c-.605.821-1.445 1.232-2.52 1.232-.86 0-1.56-.23-2.101-.692-.542-.461-.866-1.081-.971-1.86z"/></svg>',heading6:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm15.595 2.973-1.726.19c-.043-.355-.153-.617-.33-.787-.178-.169-.409-.253-.692-.253-.377 0-.695.169-.956.507-.26.339-.424 1.043-.492 2.114.445-.525.997-.787 1.657-.787.745 0 1.383.284 1.914.85.531.568.797 1.3.797 2.197 0 .952-.28 1.716-.838 2.291-.559.576-1.276.864-2.152.864-.94 0-1.712-.365-2.317-1.095-.605-.73-.908-1.927-.908-3.59 0-1.705.316-2.935.946-3.688.63-.753 1.45-1.13 2.457-1.13.706 0 1.291.198 1.755.594.463.395.758.97.885 1.723zm-4.043 3.891c0 .58.133 1.028.4 1.343.266.315.57.473.914.473.33 0 .605-.13.825-.388.22-.258.33-.68.33-1.27 0-.604-.118-1.047-.355-1.329a1.115 1.115 0 0 0-.89-.422c-.342 0-.632.134-.869.403s-.355.666-.355 1.19z"/></svg>'};class ex extends q{constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=e.selection.getAttribute(this.attributeKey),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model,n=e.document.selection,o=t.value;e.change((t=>{if(n.isCollapsed)o?t.setSelectionAttribute(this.attributeKey,o):t.removeSelectionAttribute(this.attributeKey);else{const i=e.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const e of i)o?t.setAttribute(this.attributeKey,o,e):t.removeAttribute(this.attributeKey,e)}}))}}class nx extends ko{constructor(t){super(t),this.set("isEmpty",!0),this.on("change",(()=>{this.set("isEmpty",0===this.length)}))}add(t,e){this.find((e=>e.color===t.color))||super.add(t,e)}hasColor(t){return!!this.find((e=>e.color===t))}}M(nx,P);var ox=n(1896),ix={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(ox.Z,ix);ox.Z.locals;class rx extends nh{constructor(t,{colors:e,columns:n,removeButtonLabel:o,documentColorsLabel:i,documentColorsCount:r}){super(t),this.items=this.createCollection(),this.colorDefinitions=e,this.focusTracker=new Ta,this.keystrokes=new Da,this.set("selectedColor"),this.removeButtonLabel=o,this.columns=n,this.documentColors=new nx,this.documentColorsCount=r,this._focusables=new Rd,this._focusCycler=new au({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._documentColorsLabel=i,this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-table"]},children:this.items}),this.items.add(this._createRemoveColorButton())}updateDocumentColors(t,e){const n=t.document,o=this.documentColorsCount;this.documentColors.clear();for(const i of n.getRootNames()){const r=n.getRoot(i),s=t.createRangeIn(r);for(const t of s.getItems())if(t.is("$textProxy")&&t.hasAttribute(e)&&(this._addColorToDocumentColors(t.getAttribute(e)),this.documentColors.length>=o))return}}updateSelectedColors(){const t=this.documentColorsGrid,e=this.staticColorsGrid,n=this.selectedColor;e.selectedColor=n,t&&(t.selectedColor=n)}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendGrids(){if(!this.staticColorsGrid&&(this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.focusTracker.add(this.staticColorsGrid.element),this._focusables.add(this.staticColorsGrid),this.documentColorsCount)){const t=zd.bind(this.documentColors,this.documentColors),e=new Fu(this.locale);e.text=this._documentColorsLabel,e.extendTemplate({attributes:{class:["ck","ck-color-grid__label",t.if("isEmpty","ck-hidden")]}}),this.items.add(e),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid),this.focusTracker.add(this.documentColorsGrid.element),this._focusables.add(this.documentColorsGrid)}}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_createRemoveColorButton(){const t=new Hh;return t.set({withText:!0,icon:Bh.eraser,label:this.removeButtonLabel}),t.class="ck-color-table__remove-color",t.on("execute",(()=>{this.fire("execute",{value:null})})),t.render(),this.focusTracker.add(t.element),this._focusables.add(t),t}_createStaticColorsGrid(){const t=new Yh(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return t.delegate("execute").to(this),t}_createDocumentColorsGrid(){const t=zd.bind(this.documentColors,this.documentColors),e=new Yh(this.locale,{columns:this.columns});return e.delegate("execute").to(this),e.extendTemplate({attributes:{class:t.if("isEmpty","ck-hidden")}}),e.items.bindTo(this.documentColors).using((t=>{const e=new Kh;return e.set({color:t.color,hasBorder:t.options&&t.options.hasBorder}),t.label&&e.set({label:t.label,tooltip:!0}),e.on("execute",(()=>{this.fire("execute",{value:t.color})})),e})),this.documentColors.on("change:isEmpty",((t,n,o)=>{o&&(e.selectedColor=null)})),e}_addColorToDocumentColors(t){const e=this.colorDefinitions.find((e=>e.color===t));e?this.documentColors.add(Object.assign({},e)):this.documentColors.add({color:t,label:t,options:{hasBorder:!1}})}}const sx="fontSize",ax="fontFamily",lx="fontColor",cx="fontBackgroundColor";function dx(t,e){const n={model:{key:t,values:[]},view:{},upcastAlso:{}};for(const t of e)n.model.values.push(t.model),n.view[t.model]=t.view,t.upcastAlso&&(n.upcastAlso[t.model]=t.upcastAlso);return n}function hx(t){return e=>e.getStyle(t).replace(/\s/g,"")}function ux(t){return(e,{writer:n})=>n.createAttributeElement("span",{style:`${t}:${e}`},{priority:7})}class gx extends ex{constructor(t){super(t,ax)}}function mx(t){return t.map(px).filter((t=>!!t))}function px(t){return"object"==typeof t?t:"default"===t?{title:"Default",model:void 0}:"string"==typeof t?function(t){const e=t.replace(/"|'/g,"").split(","),n=e[0],o=e.map(fx).join(", ");return{title:n,model:o,view:{name:"span",styles:{"font-family":o},priority:7}}}(t):void 0}function fx(t){return(t=t.trim()).indexOf(" ")>0&&(t=`'${t}'`),t}class bx extends L{static get pluginName(){return"FontFamilyEditing"}constructor(t){super(t),t.config.define(ax,{options:["default","Arial, Helvetica, sans-serif","Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif","Trebuchet MS, Helvetica, sans-serif","Verdana, Geneva, sans-serif"],supportAllValues:!1})}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:ax}),t.model.schema.setAttributeProperties(ax,{isFormatting:!0,copyOnEnter:!0});const e=mx(t.config.get("fontFamily.options")).filter((t=>t.model)),n=dx(ax,e);t.config.get("fontFamily.supportAllValues")?(this._prepareAnyValueConverters(),this._prepareCompatibilityConverter()):t.conversion.attributeToElement(n),t.commands.add(ax,new gx(t))}_prepareAnyValueConverters(){const t=this.editor;t.conversion.for("downcast").attributeToElement({model:ax,view:(t,{writer:e})=>e.createAttributeElement("span",{style:"font-family:"+t},{priority:7})}),t.conversion.for("upcast").elementToAttribute({model:{key:ax,value:t=>t.getStyle("font-family")},view:{name:"span",styles:{"font-family":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{face:/.*/}},model:{key:ax,value:t=>t.getAttribute("face")}})}}class kx extends L{static get pluginName(){return"FontFamilyUI"}init(){const t=this.editor,e=t.t,n=this._getLocalizedOptions(),o=t.commands.get(ax);t.ui.componentFactory.add(ax,(i=>{const r=Tu(i);return Su(r,function(t,e){const n=new ko;for(const o of t){const t={type:"button",model:new tg({commandName:ax,commandParam:o.model,label:o.title,withText:!0})};t.model.bind("isOn").to(e,"value",(t=>t===o.model||!(!t||!o.model)&&t.split(",")[0].replace(/'/g,"").toLowerCase()===o.model.toLowerCase())),o.view&&o.view.styles&&t.model.set("labelStyle",`font-family: ${o.view.styles["font-family"]}`),n.add(t)}return n}(n,o)),r.buttonView.set({label:e("Font Family"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.03 3h6.149a.75.75 0 1 1 0 1.5h-5.514L11.03 3zm1.27 3h4.879a.75.75 0 1 1 0 1.5h-4.244L12.3 6zm1.27 3h3.609a.75.75 0 1 1 0 1.5h-2.973L13.57 9zm-2.754 2.5L8.038 4.785 5.261 11.5h5.555zm.62 1.5H4.641l-1.666 4.028H1.312l5.789-14h1.875l5.789 14h-1.663L11.436 13z"/></svg>',tooltip:!0}),r.extendTemplate({attributes:{class:"ck-font-family-dropdown"}}),r.bind("isEnabled").to(o),this.listenTo(r,"execute",(e=>{t.execute(e.source.commandName,{value:e.source.commandParam}),t.editing.view.focus()})),r}))}_getLocalizedOptions(){const t=this.editor,e=t.t;return mx(t.config.get(ax).options).map((t=>("Default"===t.title&&(t.title=e("Default")),t)))}}class wx extends L{static get requires(){return[bx,kx]}static get pluginName(){return"FontFamily"}}class _x extends ex{constructor(t){super(t,sx)}}function Ax(t){return t.map((t=>function(t){if(e=t,"object"==typeof e&&e.title&&e.model&&e.view)return vx(t);var e;const n=function(t){return Cx[t]||Cx[t.model]}(t);if(n)return vx(n);if("default"===t)return{model:void 0,title:"Default"};if(function(t){let e;if("object"==typeof t){if(!t.model)throw new l("font-size-invalid-definition",null,t);e=parseFloat(t.model)}else e=parseFloat(t);return isNaN(e)}(t))return;return function(t){"number"!=typeof t&&"string"!=typeof t||(t={title:String(t),model:`${parseFloat(t)}px`});return t.view={name:"span",styles:{"font-size":t.model}},vx(t)}(t)}(t))).filter((t=>!!t))}const Cx={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 vx(t){return t.view.priority||(t.view.priority=7),t}const yx=["x-small","x-small","small","medium","large","x-large","xx-large","xxx-large"];class xx extends L{static get pluginName(){return"FontSizeEditing"}constructor(t){super(t),t.config.define(sx,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:sx}),t.model.schema.setAttributeProperties(sx,{isFormatting:!0,copyOnEnter:!0});const e=t.config.get("fontSize.supportAllValues"),n=Ax(this.editor.config.get("fontSize.options")).filter((t=>t.model)),o=dx(sx,n);e?(this._prepareAnyValueConverters(o),this._prepareCompatibilityConverter()):t.conversion.attributeToElement(o),t.commands.add(sx,new _x(t))}_prepareAnyValueConverters(t){const e=this.editor,n=t.model.values.filter((t=>!Yg(String(t))&&!Xg(String(t))));if(n.length)throw new l("font-size-invalid-use-of-named-presets",null,{presets:n});e.conversion.for("downcast").attributeToElement({model:sx,view:(t,{writer:e})=>{if(t)return e.createAttributeElement("span",{style:"font-size:"+t},{priority:7})}}),e.conversion.for("upcast").elementToAttribute({model:{key:sx,value:t=>t.getStyle("font-size")},view:{name:"span",styles:{"font-size":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{size:/^[+-]?\d{1,3}$/}},model:{key:sx,value:t=>{const e=t.getAttribute("size"),n="-"===e[0]||"+"===e[0];let o=parseInt(e,10);n&&(o=3+o);const i=yx.length-1,r=Math.min(Math.max(o,0),i);return yx[r]}}})}}var Ex=n(6007),Tx={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(Ex.Z,Tx);Ex.Z.locals;class Dx extends L{static get pluginName(){return"FontSizeUI"}init(){const t=this.editor,e=t.t,n=this._getLocalizedOptions(),o=t.commands.get(sx);t.ui.componentFactory.add(sx,(i=>{const r=Tu(i);return Su(r,function(t,e){const n=new ko;for(const o of t){const t={type:"button",model:new tg({commandName:sx,commandParam:o.model,label:o.title,class:"ck-fontsize-option",withText:!0})};o.view&&o.view.styles&&t.model.set("labelStyle",`font-size:${o.view.styles["font-size"]}`),o.view&&o.view.classes&&t.model.set("class",`${t.model.class} ${o.view.classes}`),t.model.bind("isOn").to(e,"value",(t=>t===o.model)),n.add(t)}return n}(n,o)),r.buttonView.set({label:e("Font Size"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13zm7.55 2.279.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825c0-.042 0-.083.002-.123l-.77.77-.707-.707L17.207 2.5l2.265 2.265-.707.707-.782-.782c.002.043.003.089.003.135v10.454z"/></svg>',tooltip:!0}),r.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),r.bind("isEnabled").to(o),this.listenTo(r,"execute",(e=>{t.execute(e.source.commandName,{value:e.source.commandParam}),t.editing.view.focus()})),r}))}_getLocalizedOptions(){const t=this.editor,e=t.t,n={Default:e("Default"),Tiny:e("Tiny"),Small:e("Small"),Big:e("Big"),Huge:e("Huge")};return Ax(t.config.get(sx).options).map((t=>{const e=n[t.title];return e&&e!=t.title&&(t=Object.assign({},t,{title:e})),t}))}}class Sx extends L{static get requires(){return[xx,Dx]}static get pluginName(){return"FontSize"}normalizeSizeOptions(t){return Ax(t)}}class Bx extends ex{constructor(t){super(t,lx)}}class Ix extends L{static get pluginName(){return"FontColorEditing"}constructor(t){super(t),t.config.define(lx,{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}),t.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:lx,value:hx("color")}}),t.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:lx,value:t=>t.getAttribute("color")}}),t.conversion.for("downcast").attributeToElement({model:lx,view:ux("color")}),t.commands.add(lx,new Bx(t)),t.model.schema.extend("$text",{allowAttributes:lx}),t.model.schema.setAttributeProperties(lx,{isFormatting:!0,copyOnEnter:!0})}}class Px extends L{constructor(t,{commandName:e,icon:n,componentName:o,dropdownLabel:i}){super(t),this.commandName=e,this.componentName=o,this.icon=n,this.dropdownLabel=i,this.columns=t.config.get(`${this.componentName}.columns`),this.colorTableView=void 0}init(){const t=this.editor,e=t.locale,n=e.t,o=t.commands.get(this.commandName),i=Uh(e,$h(t.config.get(this.componentName).colors)),r=t.config.get(`${this.componentName}.documentColors`);t.ui.componentFactory.add(this.componentName,(e=>{const s=Tu(e);return this.colorTableView=function({dropdownView:t,colors:e,columns:n,removeButtonLabel:o,documentColorsLabel:i,documentColorsCount:r}){const s=t.locale,a=new rx(s,{colors:e,columns:n,removeButtonLabel:o,documentColorsLabel:i,documentColorsCount:r});return t.colorTableView=a,t.panelView.children.add(a),a.delegate("execute").to(t,"execute"),a}({dropdownView:s,colors:i.map((t=>({label:t.label,color:t.model,options:{hasBorder:t.hasBorder}}))),columns:this.columns,removeButtonLabel:n("Remove color"),documentColorsLabel:0!==r?n("Document colors"):void 0,documentColorsCount:void 0===r?this.columns:r}),this.colorTableView.bind("selectedColor").to(o,"value"),s.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),s.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),s.bind("isEnabled").to(o),s.on("execute",((e,n)=>{t.execute(this.commandName,n),t.editing.view.focus()})),s.on("change:isOpen",((e,n,o)=>{s.colorTableView.appendGrids(),o&&(0!==r&&this.colorTableView.updateDocumentColors(t.model,this.componentName),this.colorTableView.updateSelectedColors())})),Bu(s,(()=>s.colorTableView.staticColorsGrid.items.find((t=>t.isOn)))),s}))}}class Rx extends Px{constructor(t){const e=t.locale.t;super(t,{commandName:lx,componentName:lx,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.4 10.3 10 4.5l-2.4 5.8h4.8zm.5 1.2H7.1L5.7 15H4.2l5-12h1.6l5 12h-1.5L13 11.5zm3.1 7H4a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2z"/></svg>',dropdownLabel:e("Font Color")})}static get pluginName(){return"FontColorUI"}}class zx extends L{static get requires(){return[Ix,Rx]}static get pluginName(){return"FontColor"}}class Vx extends ex{constructor(t){super(t,cx)}}class Fx extends L{static get pluginName(){return"FontBackgroundColorEditing"}constructor(t){super(t),t.config.define(cx,{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}),t.data.addStyleProcessorRules(gm),t.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{"background-color":/[\s\S]+/}},model:{key:cx,value:hx("background-color")}}),t.conversion.for("downcast").attributeToElement({model:cx,view:ux("background-color")}),t.commands.add(cx,new Vx(t)),t.model.schema.extend("$text",{allowAttributes:cx}),t.model.schema.setAttributeProperties(cx,{isFormatting:!0,copyOnEnter:!0})}}class Ox extends Px{constructor(t){const e=t.locale.t;super(t,{commandName:cx,componentName:cx,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M4 2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm8.38 9.262H7.62L10 5.506l2.38 5.756zm.532 1.285L14.34 16h1.426L10.804 4H9.196L4.234 16H5.66l1.428-3.453h5.824z"/></svg>',dropdownLabel:e("Font Background Color")})}static get pluginName(){return"FontBackgroundColorUI"}}class Nx extends L{static get requires(){return[Fx,Ox]}static get pluginName(){return"FontBackgroundColor"}}function Mx(t){const e=t.t,n=t.config.get("codeBlock.languages");for(const t of n)"Plain text"===t.label&&(t.label=e("Plain text")),void 0===t.class&&(t.class=`language-${t.language}`);return n}function Lx(t,e,n){const o={};for(const i of t)"class"===e?o[i[e].split(" ").shift()]=i[n]:o[i[e]]=i[n];return o}function Hx(t){return t.data.match(/^(\s*)/)[0]}function qx(t){const e=t.document.selection,n=[];if(e.isCollapsed)n.push(e.anchor);else{const o=e.getFirstRange().getWalker({ignoreElementEnd:!0,direction:"backward"});for(const{item:e}of o)if(e.is("$textProxy")&&e.parent.is("element","codeBlock")){const o=Hx(e.textNode),{parent:i,startOffset:r}=e.textNode,s=t.createPositionAt(i,r+o.length);n.push(s)}}return n}function Wx(t){const e=Ea(t.getSelectedBlocks());return e&&e.is("element","codeBlock")}function jx(t,e){return!e.is("rootElement")&&!t.isLimit(e)&&t.checkChild(e.parent,"codeBlock")}class Ux extends q{constructor(t){super(t),this._lastLanguage=null}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor,n=e.model,o=n.document.selection,i=Mx(e)[0],r=Array.from(o.getSelectedBlocks()),s=void 0===t.forceValue?!this.value:t.forceValue,a=function(t,e,n){if(t.language)return t.language;if(t.usePreviousLanguageChoice&&e)return e;return n}(t,this._lastLanguage,i.language);n.change((t=>{s?this._applyCodeBlock(t,r,a):this._removeCodeBlock(t,r)}))}_getValue(){const t=Ea(this.editor.model.document.selection.getSelectedBlocks());return!!!(!t||!t.is("element","codeBlock"))&&t.getAttribute("language")}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,n=Ea(t.getSelectedBlocks());return!!n&&jx(e,n)}_applyCodeBlock(t,e,n){this._lastLanguage=n;const o=this.editor.model.schema,i=e.filter((t=>jx(o,t)));for(const e of i)t.rename(e,"codeBlock"),t.setAttribute("language",n,e),o.removeDisallowedAttributes([e],t),Array.from(e.getChildren()).filter((t=>!o.checkChild(e,t))).forEach((e=>t.remove(e)));i.reverse().forEach(((e,n)=>{const o=i[n+1];e.previousSibling===o&&(t.appendElement("softBreak",o),t.merge(t.createPositionBefore(e)))}))}_removeCodeBlock(t,e){const n=e.filter((t=>t.is("element","codeBlock")));for(const e of n){const n=t.createRangeOn(e);for(const e of Array.from(n.getItems()).reverse())if(e.is("element","softBreak")&&e.parent.is("element","codeBlock")){const{position:n}=t.split(t.createPositionBefore(e));t.rename(n.nodeAfter,"paragraph"),t.removeAttribute("language",n.nodeAfter),t.remove(e)}t.rename(e,"paragraph"),t.removeAttribute("language",e)}}}class $x extends q{constructor(t){super(t),this._indentSequence=t.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model;t.change((e=>{const n=qx(t);for(const o of n){const n=e.createText(this._indentSequence);t.insertContent(n,o)}}))}_checkEnabled(){return!!this._indentSequence&&Wx(this.editor.model.document.selection)}}class Gx extends q{constructor(t){super(t),this._indentSequence=t.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model;t.change((()=>{const e=qx(t);for(const n of e){const e=Kx(t,n,this._indentSequence);e&&t.deleteContent(t.createSelection(e))}}))}_checkEnabled(){if(!this._indentSequence)return!1;const t=this.editor.model;return!!Wx(t.document.selection)&&qx(t).some((e=>Kx(t,e,this._indentSequence)))}}function Kx(t,e,n){const o=function(t){let e=t.parent.getChild(t.index);e&&!e.is("element","softBreak")||(e=t.nodeBefore);if(!e||e.is("element","softBreak"))return null;return e}(e);if(!o)return null;const i=Hx(o),r=i.lastIndexOf(n);if(r+n.length!==i.length)return null;if(-1===r)return null;const{parent:s,startOffset:a}=o;return t.createRange(t.createPositionAt(s,a+r),t.createPositionAt(s,a+r+n.length))}function Zx(t,e,n=!1){const o=Lx(e,"language","class"),i=Lx(e,"language","label");return(e,r,s)=>{const{writer:a,mapper:l,consumable:c}=s;if(!c.consume(r.item,"insert"))return;const d=r.item.getAttribute("language"),h=l.toViewPosition(t.createPositionBefore(r.item)),u={};n&&(u["data-language"]=i[d],u.spellcheck="false");const g=a.createContainerElement("code",{class:o[d]||null}),m=a.createContainerElement("pre",u,g);a.insert(h,m),l.bindElements(r.item,g)}}const Jx="paragraph";class Yx extends L{static get pluginName(){return"CodeBlockEditing"}static get requires(){return[Df]}constructor(t){super(t),t.config.define("codeBlock",{languages:[{language:"plaintext",label:"Plain text"},{language:"c",label:"C"},{language:"cs",label:"C#"},{language:"cpp",label:"C++"},{language:"css",label:"CSS"},{language:"diff",label:"Diff"},{language:"html",label:"HTML"},{language:"java",label:"Java"},{language:"javascript",label:"JavaScript"},{language:"php",label:"PHP"},{language:"python",label:"Python"},{language:"ruby",label:"Ruby"},{language:"typescript",label:"TypeScript"},{language:"xml",label:"XML"}],indentSequence:"\t"})}init(){const t=this.editor,e=t.model.schema,n=t.model,o=t.editing.view,i=t.plugins.has("DocumentListEditing"),r=Mx(t);t.commands.add("codeBlock",new Ux(t)),t.commands.add("indentCodeBlock",new $x(t)),t.commands.add("outdentCodeBlock",new Gx(t)),this.listenTo(o.document,"tab",((e,n)=>{const o=n.shiftKey?"outdentCodeBlock":"indentCodeBlock";t.commands.get(o).isEnabled&&(t.execute(o),n.stopPropagation(),n.preventDefault(),e.stop())}),{context:"pre"}),e.register("codeBlock",{allowWhere:"$block",allowChildren:"$text",isBlock:!0,allowAttributes:["language"]}),e.addAttributeCheck(((t,e)=>{const n=t.endsWith("codeBlock")&&e.startsWith("list")&&"list"!==e;return!(!i||!n)||!t.endsWith("codeBlock $text")&&void 0})),t.model.schema.addChildCheck(((t,e)=>{if(t.endsWith("codeBlock")&&e.isObject)return!1})),t.editing.downcastDispatcher.on("insert:codeBlock",Zx(n,r,!0)),t.data.downcastDispatcher.on("insert:codeBlock",Zx(n,r)),t.data.downcastDispatcher.on("insert:softBreak",function(t){return(e,n,o)=>{if("codeBlock"!==n.item.parent.name)return;const{writer:i,mapper:r,consumable:s}=o;if(!s.consume(n.item,"insert"))return;const a=r.toViewPosition(t.createPositionBefore(n.item));i.insert(a,i.createText("\n"))}}(n),{priority:"high"}),t.data.upcastDispatcher.on("element:code",function(t,e){const n=Lx(e,"class","language"),o=e[0].language;return(t,e,i)=>{const r=e.viewItem,s=r.parent;if(!s||!s.is("element","pre"))return;if(e.modelCursor.findAncestor("codeBlock"))return;const{consumable:a,writer:l}=i;if(!a.test(r,{name:!0}))return;const c=l.createElement("codeBlock"),d=[...r.getClassNames()];d.length||d.push("");for(const t of d){const e=n[t];if(e){l.setAttribute("language",e,c);break}}c.hasAttribute("language")||l.setAttribute("language",o,c),i.convertChildren(r,c),i.safeInsert(c,e.modelCursor)&&(a.consume(r,{name:!0}),i.updateConversionResult(c,e))}}(0,r)),t.data.upcastDispatcher.on("text",((t,e,{consumable:n,writer:o})=>{let i=e.modelCursor;if(!n.test(e.viewItem))return;if(!i.findAncestor("codeBlock"))return;n.consume(e.viewItem);const r=e.viewItem.data.split("\n").map((t=>o.createText(t))),s=r[r.length-1];for(const t of r)if(o.insert(t,i),i=i.getShiftedBy(t.offsetSize),t!==s){const t=o.createElement("softBreak");o.insert(t,i),i=o.createPositionAfter(t)}e.modelRange=o.createRange(e.modelCursor,i),e.modelCursor=i})),t.data.upcastDispatcher.on("element:pre",((t,e,{consumable:n})=>{const o=e.viewItem;if(o.findAncestor("pre"))return;const i=Array.from(o.getChildren()),r=i.find((t=>t.is("element","code")));if(r)for(const t of i)t!==r&&t.is("$text")&&n.consume(t,{name:!0})}),{priority:"high"}),this.listenTo(t.editing.view.document,"clipboardInput",((e,o)=>{let i=n.createRange(n.document.selection.anchor);if(o.targetRanges&&(i=t.editing.mapper.toModelRange(o.targetRanges[0])),!i.start.parent.is("element","codeBlock"))return;const r=o.dataTransfer.getData("text/plain"),s=new Lg(t.editing.view.document);o.content=function(t,e){const n=t.createDocumentFragment(),o=e.split("\n"),i=o.reduce(((e,n,i)=>(e.push(n),i<o.length-1&&e.push(t.createElement("br")),e)),[]);return t.appendChild(i,n),n}(s,r)})),this.listenTo(n,"getSelectedContent",((t,[o])=>{const i=o.anchor;!o.isCollapsed&&i.parent.is("element","codeBlock")&&i.hasSameParentAs(o.focus)&&n.change((n=>{const r=t.return;if(r.childCount>1||o.containsEntireContent(i.parent)){const e=n.createElement("codeBlock",i.parent.getAttributes());n.append(r,e);const o=n.createDocumentFragment();n.append(e,o),t.return=o}else{const t=r.getChild(0);e.checkAttribute(t,"code")&&n.setAttribute("code",!0,t)}}))}))}afterInit(){const t=this.editor,e=t.commands,n=e.get("indent"),o=e.get("outdent");n&&n.registerChildCommand(e.get("indentCodeBlock"),{priority:"highest"}),o&&o.registerChildCommand(e.get("outdentCodeBlock")),this.listenTo(t.editing.view.document,"enter",((e,n)=>{t.model.document.selection.getLastPosition().parent.is("element","codeBlock")&&(function(t,e){const n=t.model.document,o=t.editing.view,i=n.selection.getLastPosition(),r=i.nodeAfter;if(e||!n.selection.isCollapsed||!i.isAtStart)return!1;if(!Xx(r))return!1;return t.model.change((e=>{t.execute("enter");const o=n.selection.anchor.parent.previousSibling;e.rename(o,Jx),e.setSelection(o,"in"),t.model.schema.removeDisallowedAttributes([o],e),e.remove(r)})),o.scrollToTheSelection(),!0}(t,n.isSoft)||function(t,e){const n=t.model,o=n.document,i=t.editing.view,r=o.selection.getLastPosition(),s=r.nodeBefore;let a;if(e||!o.selection.isCollapsed||!r.isAtEnd||!s||!s.previousSibling)return!1;if(Xx(s)&&Xx(s.previousSibling))a=n.createRange(n.createPositionBefore(s.previousSibling),n.createPositionAfter(s));else if(Qx(s)&&Xx(s.previousSibling)&&Xx(s.previousSibling.previousSibling))a=n.createRange(n.createPositionBefore(s.previousSibling.previousSibling),n.createPositionAfter(s));else{if(!(Qx(s)&&Xx(s.previousSibling)&&Qx(s.previousSibling.previousSibling)&&Xx(s.previousSibling.previousSibling.previousSibling)))return!1;a=n.createRange(n.createPositionBefore(s.previousSibling.previousSibling.previousSibling),n.createPositionAfter(s))}return t.model.change((e=>{e.remove(a),t.execute("enter");const n=o.selection.anchor.parent;e.rename(n,Jx),t.model.schema.removeDisallowedAttributes([n],e)})),i.scrollToTheSelection(),!0}(t,n.isSoft)||function(t){const e=t.model.document,n=e.selection.getLastPosition(),o=n.nodeBefore||n.textNode;let i;o&&o.is("$text")&&(i=Hx(o));t.model.change((n=>{t.execute("shiftEnter"),i&&n.insertText(i,e.selection.anchor)}))}(t),n.preventDefault(),e.stop())}),{context:"pre"})}}function Qx(t){return t&&t.is("$text")&&!t.data.match(/\S/)}function Xx(t){return t&&t.is("element","softBreak")}var tE=n(8343),eE={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(tE.Z,eE);tE.Z.locals;class nE extends L{static get pluginName(){return"CodeBlockUI"}init(){const t=this.editor,e=t.t,n=t.ui.componentFactory,o=Mx(t);n.add("codeBlock",(n=>{const i=t.commands.get("codeBlock"),r=Tu(n,nu),s=r.buttonView;return s.set({label:e("Insert code block"),tooltip:!0,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.87 12.61a.75.75 0 0 1-.089.976l-.085.07-3.154 2.254 3.412 2.414a.75.75 0 0 1 .237.95l-.057.095a.75.75 0 0 1-.95.237l-.096-.058-4.272-3.022-.003-1.223 4.01-2.867a.75.75 0 0 1 1.047.174zm2.795-.231.095.057 4.011 2.867-.003 1.223-4.272 3.022-.095.058a.75.75 0 0 1-.88-.151l-.07-.086-.058-.095a.75.75 0 0 1 .15-.88l.087-.07 3.412-2.414-3.154-2.253-.085-.071a.75.75 0 0 1 .862-1.207zM16 0a2 2 0 0 1 2 2v9.354l-.663-.492-.837-.001V2a.5.5 0 0 0-.5-.5H2a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3.118L7.156 19H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h14zM5.009 15l.003 1H3v-1h2.009zm2.188-2-1.471 1H5v-1h2.197zM10 11v.095L8.668 12H7v-1h3zm4-2v1H7V9h7zm0-2v1H7V7h7zm-4-2v1H5V5h5zM6 3v1H3V3h3z"/></svg>',isToggleable:!0}),s.bind("isOn").to(i,"value",(t=>!!t)),s.on("execute",(()=>{t.execute("codeBlock",{usePreviousLanguageChoice:!0}),t.editing.view.focus()})),r.on("execute",(e=>{t.execute("codeBlock",{language:e.source._codeBlockLanguage,forceValue:!0}),t.editing.view.focus()})),r.class="ck-code-block-dropdown",r.bind("isEnabled").to(i),Su(r,this._getLanguageListItemDefinitions(o)),r}))}_getLanguageListItemDefinitions(t){const e=this.editor.commands.get("codeBlock"),n=new ko;for(const o of t){const t={type:"button",model:new tg({_codeBlockLanguage:o.language,label:o.label,withText:!0})};t.model.bind("isOn").to(e,"value",(e=>e===t.model._codeBlockLanguage)),n.add(t)}return n}}class oE extends q{refresh(){const t=this.editor.model,e=t.document;this.isEnabled=t.schema.checkAttributeInSelection(e.selection,"mention")}execute(t){const e=this.editor.model,n=e.document.selection,o="string"==typeof t.mention?{id:t.mention}:t.mention,i=o.id,r=t.range||n.getFirstRange(),s=t.text||i,a=rE({_text:s,id:i},o);if(1!=t.marker.length)throw new l("mentioncommand-incorrect-marker",this);if(i.charAt(0)!=t.marker)throw new l("mentioncommand-incorrect-id",this);e.change((t=>{const o=Vo(n.getAttributes()),i=new Map(o.entries());i.set("mention",a),e.insertContent(t.createText(s,i),r),e.insertContent(t.createText(" ",o),r.start.getShiftedBy(s.length))}))}}class iE extends L{static get pluginName(){return"MentionEditing"}init(){const t=this.editor,e=t.model,n=e.document;e.schema.extend("$text",{allowAttributes:"mention"}),t.conversion.for("upcast").elementToAttribute({view:{name:"span",key:"data-mention",classes:"mention"},model:{key:"mention",value:t=>sE(t)}}),t.conversion.for("downcast").attributeToElement({model:"mention",view:lE}),t.conversion.for("downcast").add(aE),n.registerPostFixer((t=>function(t,e,n){const o=e.differ.getChanges();let i=!1;for(const e of o){const o=e.position;if("$text"==e.name){const e=o.textNode&&o.textNode.nextSibling;i=dE(o.textNode,t)||i,i=dE(e,t)||i,i=dE(o.nodeBefore,t)||i,i=dE(o.nodeAfter,t)||i}if("$text"!=e.name&&"insert"==e.type){const e=o.nodeAfter;for(const n of t.createRangeIn(e).getItems())i=dE(n,t)||i}if("insert"==e.type&&n.isInline(e.name)){const e=o.nodeAfter&&o.nodeAfter.nextSibling;i=dE(o.nodeBefore,t)||i,i=dE(e,t)||i}}return i}(t,n,e.schema))),n.registerPostFixer((t=>function(t,e){const n=e.differ.getChanges();let o=!1;for(const e of n)if("attribute"===e.type&&"mention"!=e.attributeKey){const n=e.range.start.nodeBefore,i=e.range.end.nodeAfter;for(const r of[n,i])cE(r)&&r.getAttribute(e.attributeKey)!=e.attributeNewValue&&(t.setAttribute(e.attributeKey,e.attributeNewValue,r),o=!0)}return o}(t,n))),n.registerPostFixer((t=>function(t,e){const n=e.selection,o=n.focus;if(n.isCollapsed&&n.hasAttribute("mention")&&function(t){const e=t.isAtStart;return t.nodeBefore&&t.nodeBefore.is("$text")||e}(o))return t.removeSelectionAttribute("mention"),!0}(t,n))),t.commands.add("mention",new oE(t))}}function rE(t,e){return Object.assign({uid:r()},t,e||{})}function sE(t,e){const n=t.getAttribute("data-mention"),o=t.getChild(0);if(!o)return;return rE({id:n,_text:o.data},e)}function aE(t){t.on("attribute:mention",((t,e,n)=>{const o=e.attributeNewValue;if(!e.item.is("$textProxy")||!o)return;const i=e.range.start;(i.textNode||i.nodeAfter).data!=o._text&&n.consumable.consume(e.item,t.name)}),{priority:"highest"})}function lE(t,{writer:e}){if(!t)return;const n={class:"mention","data-mention":t.id},o={id:t.uid,priority:20};return e.createAttributeElement("span",n,o)}function cE(t){if(!t||!t.is("$text")&&!t.is("$textProxy")||!t.hasAttribute("mention"))return!1;return t.data!=t.getAttribute("mention")._text}function dE(t,e){return!!cE(t)&&(e.removeAttribute("mention",t),!0)}var hE=n(7640),uE={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(hE.Z,uE);hE.Z.locals;class gE extends _u{constructor(t){super(t),this.extendTemplate({attributes:{class:["ck-mentions"],tabindex:"-1"}})}selectFirst(){this.select(0)}selectNext(){const t=this.selected,e=this.items.getIndex(t);this.select(e+1)}selectPrevious(){const t=this.selected,e=this.items.getIndex(t);this.select(e-1)}select(t){let e=0;t>0&&t<this.items.length?e=t:t<0&&(e=this.items.length-1);const n=this.items.get(e);this.selected!==n&&(this.selected&&this.selected.removeHighlight(),n.highlight(),this.selected=n,this._isItemVisibleInScrolledArea(n)||(this.element.scrollTop=n.element.offsetTop))}executeSelected(){this.selected.fire("execute")}_isItemVisibleInScrolledArea(t){return new _a(this.element).contains(new _a(t.element))}}class mE extends nh{constructor(t,e){super(t),this.template=!1,this.domElement=e,this.domElement.classList.add("ck-button"),this.set("isOn",!1),this.on("change:isOn",((t,e,n)=>{n?(this.domElement.classList.add("ck-on"),this.domElement.classList.remove("ck-off")):(this.domElement.classList.add("ck-off"),this.domElement.classList.remove("ck-on"))})),this.listenTo(this.domElement,"click",(()=>{this.fire("execute")}))}render(){super.render(),this.element=this.domElement}}class pE extends Au{highlight(){this.children.first.isOn=!0}removeHighlight(){this.children.first.isOn=!1}}const fE=[mr.arrowup,mr.arrowdown,mr.esc],bE=[mr.enter,mr.tab];class kE extends L{static get pluginName(){return"MentionUI"}static get requires(){return[ag]}constructor(t){super(t),this._mentionsView=this._createMentionView(),this._mentionsConfigurations=new Map,this._requestFeedDebounced=ca(this._requestFeed,100),t.config.define("mention",{feeds:[]})}init(){const t=this.editor,e=t.config.get("mention.commitKeys")||bE,n=fE.concat(e);this._balloon=t.plugins.get(ag),t.editing.view.document.on("keydown",((t,o)=>{if(i=o.keyCode,n.includes(i)&&this._isUIVisible){if(o.keyCode==mr.space)return void this._hideUIAndRemoveMarker();o.preventDefault(),t.stop(),o.keyCode==mr.arrowdown&&this._mentionsView.selectNext(),o.keyCode==mr.arrowup&&this._mentionsView.selectPrevious(),e.includes(o.keyCode)&&this._mentionsView.executeSelected(),o.keyCode==mr.esc&&this._hideUIAndRemoveMarker()}var i}),{priority:"highest"}),Ih({emitter:this._mentionsView,activator:()=>this._isUIVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideUIAndRemoveMarker()});const o=t.config.get("mention.feeds");for(const t of o){const e=t.feed,n=t.marker;if(!vE(n))throw new l("mentionconfig-incorrect-marker",null,{marker:n});const o={marker:n,feedCallback:"function"==typeof e?e.bind(this.editor):CE(e),itemRenderer:t.itemRenderer};this._mentionsConfigurations.set(n,o)}this._setupTextWatcher(o),this.listenTo(t,"change:isReadOnly",(()=>{this._hideUIAndRemoveMarker()})),this.on("requestFeed:response",((t,e)=>this._handleFeedResponse(e))),this.on("requestFeed:error",(()=>this._hideUIAndRemoveMarker()))}destroy(){super.destroy(),this._mentionsView.destroy()}get _isUIVisible(){return this._balloon.visibleView===this._mentionsView}_createMentionView(){const t=this.editor.locale,e=new gE(t);return this._items=new ko,e.items.bindTo(this._items).using((n=>{const{item:o,marker:i}=n,r=this.editor.config.get("mention.dropdownLimit")||10;if(e.items.length>=r)return;const s=new pE(t),a=this._renderItem(o,i);return a.delegate("execute").to(s),s.children.add(a),s.item=o,s.marker=i,s.on("execute",(()=>{e.fire("execute",{item:o,marker:i})})),s})),e.on("execute",((t,e)=>{const n=this.editor,o=n.model,i=e.item,r=e.marker,s=n.model.markers.get("mention"),a=o.createPositionAt(o.document.selection.focus),l=o.createPositionAt(s.getStart()),c=o.createRange(l,a);this._hideUIAndRemoveMarker(),n.execute("mention",{mention:i,text:i.text,marker:r,range:c}),n.editing.view.focus()})),e}_getItemRenderer(t){const{itemRenderer:e}=this._mentionsConfigurations.get(t);return e}_requestFeed(t,e){this._lastRequested=e;const{feedCallback:n}=this._mentionsConfigurations.get(t),o=n(e);o instanceof Promise?o.then((n=>{this._lastRequested==e?this.fire("requestFeed:response",{feed:n,marker:t,feedText:e}):this.fire("requestFeed:discarded",{feed:n,marker:t,feedText:e})})).catch((e=>{this.fire("requestFeed:error",{error:e}),c("mention-feed-callback-error",{marker:t})})):this.fire("requestFeed:response",{feed:o,marker:t,feedText:e})}_setupTextWatcher(t){const e=this.editor,n=t.map((t=>({...t,pattern:AE(t.marker,t.minimumCharacters||0)}))),o=new Ap(e.model,function(t){return e=>{const n=_E(t,e);if(!n)return!1;let o=0;0!==n.position&&(o=n.position-1);const i=e.substring(o);return n.pattern.test(i)}}(n));o.on("matched:data",((t,o)=>{const i=_E(n,o.text),r=e.model.document.selection.focus,s=e.model.createPositionAt(r.parent,i.position);if(function(t){const e=t.textNode&&t.textNode.hasAttribute("mention"),n=t.nodeBefore;return e||n&&n.is("$text")&&n.hasAttribute("mention")}(r)||function(t){const e=t.nodeAfter;return e&&e.is("$text")&&e.hasAttribute("mention")}(s))return void this._hideUIAndRemoveMarker();const a=function(t,e){let n=0;0!==t.position&&(n=t.position-1);const o=AE(t.marker,0),i=e.substring(n);return i.match(o)[2]}(i,o.text),l=i.marker.length+a.length,c=r.getShiftedBy(-l),d=r.getShiftedBy(-a.length),h=e.model.createRange(c,d);if(yE(e)){const t=e.model.markers.get("mention");e.model.change((e=>{e.updateMarker(t,{range:h})}))}else e.model.change((t=>{t.addMarker("mention",{range:h,usingOperation:!1,affectsData:!1})}));this._requestFeedDebounced(i.marker,a)})),o.on("unmatched",(()=>{this._hideUIAndRemoveMarker()}));const i=e.commands.get("mention");return o.bind("isEnabled").to(i),o}_handleFeedResponse(t){const{feed:e,marker:n}=t;if(!yE(this.editor))return;this._items.clear();for(const t of e){const e="object"!=typeof t?{id:t,text:t}:t;this._items.add({item:e,marker:n})}const o=this.editor.model.markers.get("mention");this._items.length?this._showOrUpdateUI(o):this._hideUIAndRemoveMarker()}_showOrUpdateUI(t){this._isUIVisible?this._balloon.updatePosition(this._getBalloonPanelPositionData(t,this._mentionsView.position)):this._balloon.add({view:this._mentionsView,position:this._getBalloonPanelPositionData(t,this._mentionsView.position),singleViewMode:!0}),this._mentionsView.position=this._balloon.view.position,this._mentionsView.selectFirst()}_hideUIAndRemoveMarker(){this._balloon.hasView(this._mentionsView)&&this._balloon.remove(this._mentionsView),yE(this.editor)&&this.editor.model.change((t=>t.removeMarker("mention"))),this._mentionsView.position=void 0}_renderItem(t,e){const n=this.editor;let o,i=t.id;const r=this._getItemRenderer(e);if(r){const e=r(t);"string"!=typeof e?o=new mE(n.locale,e):i=e}if(!o){const t=new Hh(n.locale);t.label=i,t.withText=!0,o=t}return o}_getBalloonPanelPositionData(t,e){const n=this.editor,o=n.editing,i=o.view.domConverter,r=o.mapper;return{target:()=>{let e=t.getRange();"$graveyard"==e.start.root.rootName&&(e=n.model.document.selection.getFirstRange());const o=r.toViewRange(e);return _a.getDomRangeRects(i.viewRangeToDom(o)).pop()},limiter:()=>{const t=this.editor.editing.view,e=t.document.selection.editableElement;return e?t.domConverter.mapViewToDom(e.root):null},positions:wE(e)}}}function wE(t){const e={caret_se:t=>({top:t.bottom+3,left:t.right,name:"caret_se",config:{withArrow:!1}}),caret_ne:(t,e)=>({top:t.top-e.height-3,left:t.right,name:"caret_ne",config:{withArrow:!1}}),caret_sw:(t,e)=>({top:t.bottom+3,left:t.right-e.width,name:"caret_sw",config:{withArrow:!1}}),caret_nw:(t,e)=>({top:t.top-e.height-3,left:t.right-e.width,name:"caret_nw",config:{withArrow:!1}})};return Object.prototype.hasOwnProperty.call(e,t)?[e[t]]:[e.caret_se,e.caret_sw,e.caret_ne,e.caret_nw]}function _E(t,e){let n;for(const o of t){const t=e.lastIndexOf(o.marker);t>0&&!e.substring(t-1).match(o.pattern)||(!n||t>=n.position)&&(n={marker:o.marker,position:t,minimumCharacters:o.minimumCharacters,pattern:o.pattern})}return n}function AE(t,e){const n=0==e?"*":`{${e},}`,o=dr.features.isRegExpUnicodePropertySupported?"\\p{Ps}\\p{Pi}\"'":"\\(\\[{\"'";return new RegExp(`(?:^|[= ${o}])([${t}])([^=]${n})$`,"u")}function CE(t){return e=>t.filter((t=>("string"==typeof t?t:String(t.id)).toLowerCase().includes(e.toLowerCase())))}function vE(t){return t&&1==t.length}function yE(t){return t.model.markers.has("mention")}var xE=n(5023),EE={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(xE.Z,EE);xE.Z.locals;class TE extends L{static get pluginName(){return"IndentEditing"}init(){const t=this.editor;t.commands.add("indent",new j(t)),t.commands.add("outdent",new j(t))}}const DE='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zM1.632 6.95 5.02 9.358a.4.4 0 0 1-.013.661l-3.39 2.207A.4.4 0 0 1 1 11.892V7.275a.4.4 0 0 1 .632-.326z"/></svg>',SE='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zm1.618-9.55L.98 9.358a.4.4 0 0 0 .013.661l3.39 2.207A.4.4 0 0 0 5 11.892V7.275a.4.4 0 0 0-.632-.326z"/></svg>';class BE extends L{static get pluginName(){return"IndentUI"}init(){const t=this.editor,e=t.locale,n=t.t,o="ltr"==e.uiLanguageDirection?DE:SE,i="ltr"==e.uiLanguageDirection?SE:DE;this._defineButton("indent",n("Increase indent"),o),this._defineButton("outdent",n("Decrease indent"),i)}_defineButton(t,e,n){const o=this.editor;o.ui.componentFactory.add(t,(i=>{const r=o.commands.get(t),s=new Hh(i);return s.set({label:e,icon:n,tooltip:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(s,"execute",(()=>{o.execute(t),o.editing.view.focus()})),s}))}}class IE extends q{constructor(t,e){super(t),this._indentBehavior=e}refresh(){const t=this.editor.model,e=Ea(t.document.selection.getSelectedBlocks());e&&t.schema.checkAttribute(e,"blockIndent")?this.isEnabled=this._indentBehavior.checkEnabled(e.getAttribute("blockIndent")):this.isEnabled=!1}execute(){const t=this.editor.model,e=function(t){const e=t.document.selection,n=t.schema;return Array.from(e.getSelectedBlocks()).filter((t=>n.checkAttribute(t,"blockIndent")))}(t);t.change((t=>{for(const n of e){const e=n.getAttribute("blockIndent"),o=this._indentBehavior.getNextIndent(e);o?t.setAttribute("blockIndent",o,n):t.removeAttribute("blockIndent",n)}}))}}class PE{constructor(t){this.isForward="forward"===t.direction,this.offset=t.offset,this.unit=t.unit}checkEnabled(t){const e=parseFloat(t||0);return this.isForward||e>0}getNextIndent(t){const e=parseFloat(t||0);if(!(!t||t.endsWith(this.unit)))return this.isForward?this.offset+this.unit:void 0;const n=e+(this.isForward?this.offset:-this.offset);return n>0?n+this.unit:void 0}}class RE{constructor(t){this.isForward="forward"===t.direction,this.classes=t.classes}checkEnabled(t){const e=this.classes.indexOf(t);return this.isForward?e<this.classes.length-1:e>=0}getNextIndent(t){const e=this.classes.indexOf(t),n=this.isForward?1:-1;return this.classes[e+n]}}const zE=["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"];class VE extends q{constructor(t){super(t),this.affectsData=!1}execute(){const t=this.editor.model,e=t.document.selection;let n=t.schema.getLimitElement(e);if(e.containsEntireContent(n)||!FE(t.schema,n))do{if(n=n.parent,!n)return}while(!FE(t.schema,n));t.change((t=>{t.setSelection(n,"in")}))}}function FE(t,e){return t.isLimit(e)&&(t.checkChild(e,"$text")||t.checkChild(e,"paragraph"))}const OE=br("Ctrl+A");class NE extends L{static get pluginName(){return"SelectAllEditing"}init(){const t=this.editor,e=t.editing.view.document;t.commands.add("selectAll",new VE(t)),this.listenTo(e,"keydown",((e,n)=>{fr(n)===OE&&(t.execute("selectAll"),n.preventDefault())}))}}class ME extends L{static get pluginName(){return"SelectAllUI"}init(){const t=this.editor;t.ui.componentFactory.add("selectAll",(e=>{const n=t.commands.get("selectAll"),o=new Hh(e),i=e.t;return o.set({label:i("Select all"),icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75zm18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75zm-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5h8.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5h2.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5h5.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0h2.25zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5h2.25zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6z"/></svg>',keystroke:"Ctrl+A",tooltip:!0}),o.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(o,"execute",(()=>{t.execute("selectAll"),t.editing.view.focus()})),o}))}}class LE extends L{static get requires(){return[NE,ME]}static get pluginName(){return"SelectAll"}}class HE extends q{refresh(){const t=this.editor.model,e=t.schema,n=t.document.selection;this.isEnabled=function(t,e,n){const o=function(t,e){const n=lb(t,e).start.parent;if(n.isEmpty&&!n.is("element","$root"))return n.parent;return n}(t,n);return e.checkChild(o,"horizontalLine")}(n,e,t)}execute(){const t=this.editor.model;t.change((e=>{const n=e.createElement("horizontalLine");t.insertObject(n,null,null,{setSelection:"after"})}))}}var qE=n(2974),WE={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(qE.Z,WE);qE.Z.locals;class jE extends L{static get pluginName(){return"HorizontalLineEditing"}init(){const t=this.editor,e=t.model.schema,n=t.t,o=t.conversion;e.register("horizontalLine",{inheritAllFrom:"$blockObject"}),o.for("dataDowncast").elementToElement({model:"horizontalLine",view:(t,{writer:e})=>e.createEmptyElement("hr")}),o.for("editingDowncast").elementToStructure({model:"horizontalLine",view:(t,{writer:e})=>{const o=n("Horizontal line"),i=e.createContainerElement("div",null,e.createEmptyElement("hr"));return e.addClass("ck-horizontal-line",i),e.setCustomProperty("hr",!0,i),function(t,e,n){return e.setCustomProperty("horizontalLine",!0,t),nb(t,e,{label:n})}(i,e,o)}}),o.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),t.commands.add("horizontalLine",new HE(t))}}class UE extends L{static get pluginName(){return"HorizontalLineUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("horizontalLine",(n=>{const o=t.commands.get("horizontalLine"),i=new Hh(n);return i.set({label:e("Horizontal line"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 9h16v2H2z"/></svg>',tooltip:!0}),i.bind("isEnabled").to(o,"isEnabled"),this.listenTo(i,"execute",(()=>{t.execute("horizontalLine"),t.editing.view.focus()})),i}))}}class $E extends q{constructor(t){super(t),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this.listenTo(t.data,"set",((t,e)=>{e[1]={...e[1]};const n=e[1];n.batchType||(n.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(t.data,"set",((t,e)=>{e[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}addBatch(t){const e=this.editor.model.document.selection,n={ranges:e.hasOwnRange?Array.from(e.getRanges()):[],isBackward:e.isBackward};this._stack.push({batch:t,selection:n}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(t,e,n){const o=this.editor.model,i=o.document,r=[],s=t.map((t=>t.getTransformedByOperations(n))),a=s.flat();for(const t of s){const e=t.filter((t=>t.root!=i.graveyard)).filter((t=>!KE(t,a)));e.length&&(GE(e),r.push(e[0]))}r.length&&o.change((t=>{t.setSelection(r,{backward:e})}))}_undo(t,e){const n=this.editor.model,o=n.document;this._createdBatches.add(e);const i=t.operations.slice().filter((t=>t.isDocumentOperation));i.reverse();for(const t of i){const i=t.baseVersion+1,r=Array.from(o.history.getOperations(i)),s=Ig([t.getReversed()],r,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(const i of s)e.addOperation(i),n.applyOperation(i),o.history.setOperationAsUndone(t,i)}}}function GE(t){t.sort(((t,e)=>t.start.isBefore(e.start)?-1:1));for(let e=1;e<t.length;e++){const n=t[e-1].getJoined(t[e],!0);n&&(e--,t.splice(e,2,n))}}function KE(t,e){return e.some((e=>e!==t&&e.containsRange(t,!0)))}class ZE extends $E{execute(t=null){const e=t?this._stack.findIndex((e=>e.batch==t)):this._stack.length-1,n=this._stack.splice(e,1)[0],o=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(o,(()=>{this._undo(n.batch,o);const t=this.editor.model.document.history.getOperations(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,t),this.fire("revert",n.batch,o)})),this.refresh()}}class JE extends $E{execute(){const t=this._stack.pop(),e=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(e,(()=>{const n=t.batch.operations[t.batch.operations.length-1].baseVersion+1,o=this.editor.model.document.history.getOperations(n);this._restoreSelection(t.selection.ranges,t.selection.isBackward,o),this._undo(t.batch,e)})),this.refresh()}}class YE extends L{static get pluginName(){return"UndoEditing"}constructor(t){super(t),this._batchRegistry=new WeakSet}init(){const t=this.editor;this._undoCommand=new ZE(t),this._redoCommand=new JE(t),t.commands.add("undo",this._undoCommand),t.commands.add("redo",this._redoCommand),this.listenTo(t.model,"applyOperation",((t,e)=>{const n=e[0];if(!n.isDocumentOperation)return;const o=n.batch,i=this._redoCommand._createdBatches.has(o),r=this._undoCommand._createdBatches.has(o);this._batchRegistry.has(o)||(this._batchRegistry.add(o),o.isUndoable&&(i?this._undoCommand.addBatch(o):r||(this._undoCommand.addBatch(o),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((t,e,n)=>{this._redoCommand.addBatch(n)})),t.keystrokes.set("CTRL+Z","undo"),t.keystrokes.set("CTRL+Y","redo"),t.keystrokes.set("CTRL+SHIFT+Z","redo")}}const QE='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.75.75 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032H5.042z"/></svg>',XE='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z"/></svg>';class tT extends L{static get pluginName(){return"UndoUI"}init(){const t=this.editor,e=t.locale,n=t.t,o="ltr"==e.uiLanguageDirection?QE:XE,i="ltr"==e.uiLanguageDirection?XE:QE;this._addButton("undo",n("Undo"),"CTRL+Z",o),this._addButton("redo",n("Redo"),"CTRL+Y",i)}_addButton(t,e,n,o){const i=this.editor;i.ui.componentFactory.add(t,(r=>{const s=i.commands.get(t),a=new Hh(r);return a.set({label:e,icon:o,keystroke:n,tooltip:!0}),a.bind("isEnabled").to(s,"isEnabled"),this.listenTo(a,"execute",(()=>{i.execute(t),i.editing.view.focus()})),a}))}}class eT extends L{static get requires(){return[YE,tT]}static get pluginName(){return"Undo"}}const nT="removeFormat";class oT extends L{static get pluginName(){return"RemoveFormatUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(nT,(n=>{const o=t.commands.get(nT),i=new Hh(n);return i.set({label:e("Remove Format"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.69 14.915c.053.052.173.083.36.093a.366.366 0 0 1 .345.485l-.003.01a.738.738 0 0 1-.697.497h-2.67a.374.374 0 0 1-.353-.496l.013-.038a.681.681 0 0 1 .644-.458c.197-.012.325-.043.386-.093a.28.28 0 0 0 .072-.11L9.592 4.5H6.269c-.359-.017-.609.013-.75.09-.142.078-.289.265-.442.563-.192.29-.516.464-.864.464H4.17a.43.43 0 0 1-.407-.569L4.46 3h13.08l-.62 2.043a.81.81 0 0 1-.775.574h-.114a.486.486 0 0 1-.486-.486c.001-.284-.054-.464-.167-.54-.112-.076-.367-.106-.766-.091h-3.28l-2.68 10.257c-.006.074.007.127.038.158zM3 17h8a.5.5 0 1 1 0 1H3a.5.5 0 1 1 0-1zm11.299 1.17a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.06-1.06l1.415 1.414 1.414-1.415a.75.75 0 1 1 1.06 1.06l-1.413 1.415 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414-1.414 1.414z"/></svg>',tooltip:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(nT),t.editing.view.focus()})),i}))}}class iT extends q{refresh(){const t=this.editor.model;this.isEnabled=!!Ea(this._getFormattingItems(t.document.selection,t.schema))}execute(){const t=this.editor.model,e=t.schema;t.change((n=>{for(const o of this._getFormattingItems(t.document.selection,e))if(o.is("selection"))for(const t of this._getFormattingAttributes(o,e))n.removeSelectionAttribute(t);else{const t=n.createRangeOn(o);for(const i of this._getFormattingAttributes(o,e))n.removeAttribute(i,t)}}))}*_getFormattingItems(t,e){const n=t=>!!Ea(this._getFormattingAttributes(t,e));for(const o of t.getRanges())for(const t of o.getItems())!e.isBlock(t)&&n(t)&&(yield t);for(const e of t.getSelectedBlocks())n(e)&&(yield e);n(t)&&(yield t)}*_getFormattingAttributes(t,e){for(const[n]of t.getAttributes()){const t=e.getAttributeProperties(n);t&&t.isFormatting&&(yield n)}}}class rT extends L{static get pluginName(){return"RemoveFormatEditing"}init(){const t=this.editor;t.commands.add("removeFormat",new iT(t))}}class sT extends q{execute(t){const{model:e}=this.editor,{document:n}=e,{selection:o}=n,{mention:i}=t,r=t.range||o.getFirstRange();if(i.id.startsWith("#")||i.id.startsWith("~"))e.change((t=>{e.insertContent(t.createText(i.id,{}),r)}));else if("create-note"===i.action){const t=this.editor.editing.view.getDomRoot();glob.getComponentByEl(t).createNoteForReferenceLink(i.noteTitle).then((t=>{this.insertReference(r,t)}))}else this.insertReference(r,t.mention.notePath)}insertReference(t,e){const{model:n}=this.editor;n.change((o=>{n.insertContent(o.createText("",{}),t),this.editor.execute("referenceLink",{notePath:e})}))}}class aT{constructor(t){this.loader=t}upload(){return this.loader.file.then((t=>new Promise(((e,n)=>{this._initRequest().then((()=>{this._initListeners(e,n,t),this._sendRequest(t)}))}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){return glob.getHeaders().then((t=>{const e=this.xhr=new XMLHttpRequest,{noteId:n}=glob.getActiveTabNote(),o="api/images?noteId="+n;e.open("POST",o,!0),e.responseType="json";for(const n in t)e.setRequestHeader(n,t[n])}))}async _initListeners(t,e){const n=this.xhr,o=this.loader,i=`Cannot upload file: ${(await o.file).name}.`;n.addEventListener("error",(()=>e(i))),n.addEventListener("abort",(()=>e())),n.addEventListener("load",(()=>{const o=n.response;if(!o||!o.uploaded)return e(o&&o.error&&o.error.message?o.error.message:i);t({default:o.url})})),n.upload&&n.upload.addEventListener("progress",(t=>{t.lengthComputable&&(o.uploadTotal=t.total,o.uploaded=t.loaded)}))}async _sendRequest(){const t=new FormData;t.append("upload",await this.loader.file),this.xhr.send(t)}}class lT extends L{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("includeNote",(n=>{const o=t.commands.get("insertIncludeNote"),i=new Hh(n);return i.set({label:e("Include note"),icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19,3H5C3.897,3,3,3.897,3,5v14c0,1.103,0.897,2,2,2h8c0.131,0,0.26-0.026,0.381-0.076s0.232-0.123,0.326-0.217l7-7 c0.086-0.086,0.147-0.187,0.196-0.293c0.014-0.03,0.022-0.061,0.033-0.093c0.028-0.084,0.046-0.17,0.051-0.259 C20.989,13.041,21,13.021,21,13V5C21,3.897,20.103,3,19,3z M5,5h14v7h-6c-0.553,0-1,0.448-1,1v6H5V5z M14,17.586V14h3.586 L14,17.586z"/></svg>',tooltip:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>t.execute("insertIncludeNote"))),i}))}}class cT extends L{static get requires(){return[xb]}init(){this._defineSchema(),this._defineConverters(),this.editor.commands.add("insertIncludeNote",new dT(this.editor))}_defineSchema(){this.editor.model.schema.register("includeNote",{isObject:!0,allowAttributes:["noteId","boxSize"],allowWhere:"$block"})}_defineConverters(){const t=this.editor,e=t.conversion;e.for("upcast").elementToElement({model:(t,{writer:e})=>e.createElement("includeNote",{noteId:t.getAttribute("data-note-id"),boxSize:t.getAttribute("data-box-size")}),view:{name:"section",classes:"include-note"}}),e.for("dataDowncast").elementToElement({model:"includeNote",view:(t,{writer:e})=>e.createContainerElement("section",{class:"include-note","data-note-id":t.getAttribute("noteId"),"data-box-size":t.getAttribute("boxSize")})}),e.for("editingDowncast").elementToElement({model:"includeNote",view:(e,{writer:n})=>{const o=e.getAttribute("noteId"),i=e.getAttribute("boxSize"),r=n.createContainerElement("section",{class:"include-note box-size-"+i,"data-note-id":o,"data-box-size":i}),s=n.createUIElement("div",{class:"include-note-wrapper"},(function(e){const n=this.toDomElement(e),i=t.editing.view.getDomRoot();return glob.getComponentByEl(i).loadIncludedNote(o,$(n)),function(t,e){function n(t){t.stopPropagation(),e.editing.view._renderer.isFocused=!1}t.addEventListener("mousedown",n,{capture:!0}),t.addEventListener("focus",n,{capture:!0}),t.addEventListener("keydown",n,{capture:!0})}(n,t),n}));return n.insert(n.createPositionAt(r,0),s),nb(r,n,{label:"include note widget"})}})}}class dT extends q{execute(){const t=this.editor.editing.view.getDomRoot();glob.getComponentByEl(t).triggerCommand("addIncludeNoteToText")}refresh(){const t=this.editor.model,e=t.document.selection,n=t.schema.findAllowedParent(e.getFirstPosition(),"includeNote");this.isEnabled=null!==n}}class hT extends q{execute({notePath:t}){if(!t||!t.trim())return;const e=this.editor,n=t.split("/").pop();glob.treeCache.getNote(n,!0).then((()=>{e.model.change((n=>{const o=n.createElement("reference",{notePath:t});e.model.insertContent(o),n.setSelection(o,"after")}))}))}refresh(){const t=this.editor.model,e=t.document.selection;this.isEnabled=t.schema.checkChild(e.focus.parent,"reference")}}class uT extends L{static get requires(){return[xb]}init(){this._defineSchema(),this._defineConverters(),this.editor.commands.add("referenceLink",new hT(this.editor)),this.editor.editing.mapper.on("viewToModelPosition",cb(this.editor.model,(t=>t.hasClass("reference-link"))))}_defineSchema(){this.editor.model.schema.register("reference",{allowWhere:"$text",isInline:!0,isObject:!0,allowAttributes:["notePath"]})}_defineConverters(){const t=this.editor,e=t.conversion;e.for("upcast").elementToElement({view:{name:"a",classes:["reference-link"]},model:(t,{writer:e})=>{let n=t.getAttribute("data-note-path");return n||(n=t.getAttribute("href")),e.createElement("reference",{notePath:n})}}),e.for("editingDowncast").elementToElement({model:"reference",view:(e,{writer:n})=>{let o=e.getAttribute("notePath");o||(o=e.getAttribute("href"));const i=n.createContainerElement("a",{href:"javascript:",class:"reference-link","data-note-path":o}),r=n.createUIElement("span",{},(function(e){const n=this.toDomElement(e),i=o.split("/").pop(),r=t.editing.view.getDomRoot();return glob.getComponentByEl(r).loadReferenceLinkTitle(i,$(n)),n}));return n.insert(n.createPositionAt(i,0),r),nb(i,n)}}),e.for("dataDowncast").elementToElement({model:"reference",view:(t,{writer:e})=>{let n=t.getAttribute("notePath");n||(n=t.getAttribute("href"));const o=e.createContainerElement("a",{href:"#"+n,class:"reference-link","data-note-path":n}),i=n.split("/").pop(),r=glob.treeCache.getNoteFromCache(i);if(r){const t=e.createText(r.title);e.insert(e.createPositionAt(o,0),t)}return o}})}}function gT(t){return t.match(/^(\\\[.*?\\\]|\\\(.*?\\\))$/)}function mT(t){const e=(t=t.trim()).includes("\\(")&&t.includes("\\)"),n=t.includes("\\[")&&t.includes("\\]");return(e||n)&&(t=t.substring(2,t.length-2).trim()),{equation:t,display:n}}async function pT(t,e,n="katex",o,i=!1,r=!1,s,a=[],l={}){if("mathjax"===n&&"undefined"!=typeof MathJax)!function(t){return t&&"string"==typeof t&&3===t.split(".").length&&"3"===t.split(".")[0]}(MathJax.version)?bT(e,r,s,a,(n=>{Co.window.setTimeout((()=>{!function(t,e,n){e.innerHTML=n?"\\["+t+"\\]":"\\("+t+"\\)";MathJax.Hub.Queue(["Typeset",MathJax.Hub,e])}(t,n,i),r&&MathJax.Hub.Queue((()=>{kT(e,n),n.style.visibility="visible"}))}))})):bT(e,r,s,a,(n=>{!function(t,e,n,o){let i;void 0!==MathJax.tex2chtmlPromise?i=MathJax.tex2chtmlPromise:void 0!==MathJax.tex2svgPromise&&(i=MathJax.tex2svgPromise);void 0!==i&&i(t,{display:n}).then((t=>{e.firstChild&&e.removeChild(e.firstChild),e.appendChild(t),o()}))}(t,n,i,(()=>{r&&(kT(e,n),n.style.visibility="visible")}))}));else if("katex"===n&&"undefined"!=typeof katex)bT(e,r,s,a,(n=>{katex.render(t,n,{throwOnError:!1,displayMode:i,...l}),r&&(kT(e,n),n.style.visibility="visible")}));else if("function"==typeof n)n(t,e,i);else if(void 0!==o)try{Co.window.CKEDITOR_MATH_LAZY_LOAD||(Co.window.CKEDITOR_MATH_LAZY_LOAD=o()),e.innerHTML=t,await Co.window.CKEDITOR_MATH_LAZY_LOAD,pT(t,e,n,void 0,i,r,s,a,l)}catch(n){e.innerHTML=t,console.error(`math-tex-typesetting-lazy-load-failed: Lazy load failed: ${n}`)}else e.innerHTML=t,console.warn(`math-tex-typesetting-missing: Missing the mathematical typesetting engine (${n}) for tex.`)}function fT(t){const e=t.editing.view,n=hh.defaultPositions,o=e.document.selection.getSelectedElement();if(o)return{target:e.domConverter.viewToDom(o),positions:[n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast]};{const t=e.document;return{target:e.domConverter.viewRangeToDom(t.selection.getFirstRange()),positions:[n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast]}}}function bT(t,e,n,o,i){e?function(t,e,n,o){const i=function(t,e,n){let o=Co.document.getElementById(e);if(!o){o=Co.document.createElement("div"),o.setAttribute("id",e),o.classList.add(...n),o.style.visibility="hidden",Co.document.body.appendChild(o);let i=!1;const r=()=>{i||(Co.window.requestAnimationFrame((()=>{wT(t,o),i=!1})),i=!0)};Co.window.addEventListener("resize",r),Co.window.addEventListener("scroll",r)}return o}(t,e,n);o(i)}(t,n,o,(t=>{i(t)})):i(t)}function kT(t,e){wT(t,e);const n=e.getBoundingClientRect();t.style.width=n.width+"px",t.style.height=n.height+"px"}function wT(t,e){const n=t.getBoundingClientRect(),o=Co.window.scrollX+n.left,i=Co.window.scrollY+n.top;e.style.position="absolute",e.style.left=o+"px",e.style.top=i+"px",e.style.zIndex="var(--ck-z-modal)",e.style.pointerEvents="none"}var _T=n(2053),AT={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(_T.Z,AT);_T.Z.locals;class CT extends nh{constructor(t,e){super(t);const n=`ck-input-${r()}`,o=`ck-status-${r()}`;this.set("label"),this.set("value"),this.set("isReadOnly",!1),this.set("errorText",null),this.set("infoText",null),this.labelView=this._createLabelView(n),this.inputView=this._createInputView(e,n,o),this.statusView=this._createStatusView(o),this.bind("_statusText").to(this,"errorText",this,"infoText",((t,e)=>t||e));const i=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-input",i.if("isReadOnly","ck-disabled")]},children:[this.labelView,this.inputView,this.statusView]})}_createLabelView(t){const e=new Fu(this.locale);return e.for=t,e.bind("text").to(this,"label"),e}_createInputView(t,e,n){const o=new t(this.locale,n);return o.id=e,o.ariaDescribedById=n,o.bind("value").to(this),o.bind("isReadOnly").to(this),o.bind("hasError").to(this,"errorText",(t=>!!t)),o.on("input",(()=>{this.errorText=null})),o}_createStatusView(t){const e=new nh(this.locale),n=this.bindTemplate;return e.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-input__status",n.if("errorText","ck-labeled-input__status_error"),n.if("_statusText","ck-hidden",(t=>!t))],id:t,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),e}select(){this.inputView.select()}focus(){this.inputView.focus()}}class vT extends nh{constructor(t,e,n,o,i,r){super(n),this.engine=t,this.lazyLoad=e,this.previewUid=o,this.katexRenderOptions=r,this.set("value",""),this.set("display",!1),this.on("change",(()=>{this.isRendered&&this.updateMath()})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-math-preview"]}})}updateMath(){pT(this.value,this.element,this.engine,this.lazyLoad,this.display,!0,this.previewUid,this.previewClassName,this.katexRenderOptions)}render(){super.render(),this.updateMath()}}var yT=n(4722),xT={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};es()(yT.Z,xT);yT.Z.locals;class ET extends nh{constructor(t,e,n,o,i,r,s,a){super(t);const l=t.t;this._createKeyAndFocusTrackers(),this.saveButtonView=this._createButton(l("Save"),Th,"ck-button-save",null),this.saveButtonView.type="submit",this.mathInputView=this._createMathInput(),this.displayButtonView=this._createDisplayButton(),this.cancelButtonView=this._createButton(l("Cancel"),Eh,"ck-button-cancel","cancel"),this.previewEnabled=o;let c=[];this.previewEnabled?(this.previewLabel=new Fu(t),this.previewLabel.text=l("Equation preview"),this.mathView=new vT(e,n,t,i,r,a),this.mathView.bind("display").to(this.displayButtonView,"isOn"),c=[this.mathInputView,this.displayButtonView,this.previewLabel,this.mathView]):c=[this.mathInputView,this.displayButtonView],this.setTemplate({tag:"form",attributes:{class:["ck","ck-math-form",...s],tabindex:"-1",spellcheck:"false"},children:[{tag:"div",attributes:{class:["ck-math-view"]},children:c},this.saveButtonView,this.cancelButtonView]})}render(){super.render(),Rh({view:this});[this.mathInputView,this.displayButtonView,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}get equation(){return this.mathInputView.inputView.element.value}set equation(t){this.mathInputView.inputView.element.value=t,this.previewEnabled&&(this.mathView.value=t)}_createKeyAndFocusTrackers(){this.focusTracker=new Ta,this.keystrokes=new Da,this._focusables=new Rd,this._focusCycler=new au({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}})}_createMathInput(){const t=this.locale.t,e=new CT(this.locale,Uu),n=e.inputView;e.infoText=t("Insert equation in TeX format.");const o=()=>{if(null!=n.element){let t=n.element.value.trim();if(gT(t)){const e=mT(t);n.element.value=e.equation,t=e.equation,this.displayButtonView.isOn=e.display}this.previewEnabled&&(this.mathView.value=t),this.saveButtonView.isEnabled=!!t}};return n.on("render",o),n.on("input",o),e}_createButton(t,e,n,o){const i=new Hh(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i.extendTemplate({attributes:{class:n}}),o&&i.delegate("execute").to(this,o),i}_createDisplayButton(){const t=this.locale.t,e=new jh(this.locale);return e.set({label:t("Display mode"),withText:!0}),e.extendTemplate({attributes:{class:"ck-button-display-toggle"}}),e.on("execute",(()=>{e.isOn=!e.isOn,this.previewEnabled&&(this.mathView.display=e.isOn)})),e}}class TT extends q{execute(t,e,n,o){const i=this.editor.model,r=i.document.selection.getSelectedElement();i.change((s=>{let a;if(r&&(r.is("element","mathtex-inline")||r.is("element","mathtex-display"))){const i=r.getAttribute("type"),l=o?n:i||n;a=s.createElement(e?"mathtex-display":"mathtex-inline",{equation:t,type:l,display:e})}else a=s.createElement(e?"mathtex-display":"mathtex-inline",{equation:t,type:n,display:e});i.insertContent(a)}))}refresh(){const t=this.editor.model.document.selection,e=t.getSelectedElement();this.isEnabled=null===e||e.is("element","mathtex-inline")||e.is("element","mathtex-display");const n=function(t){const e=t.getSelectedElement();return e&&(e.is("element","mathtex-inline")||e.is("element","mathtex-display"))?e:null}(t);this.value=n?n.getAttribute("equation"):null,this.display=n?n.getAttribute("display"):null}}class DT extends L{static get requires(){return[xb]}static get pluginName(){return"MathEditing"}init(){const t=this.editor;t.commands.add("math",new TT(t)),this._defineSchema(),this._defineConverters(),t.editing.mapper.on("viewToModelPosition",cb(t.model,(t=>t.hasClass("math")))),t.config.define("math",{engine:"mathjax",outputType:"script",forceOutputType:!1,enablePreview:!0,previewClassName:[],popupClassName:[],katexRenderOptions:{}})}_defineSchema(){const t=this.editor.model.schema;t.register("mathtex-inline",{allowWhere:"$text",isInline:!0,isObject:!0,allowAttributes:["equation","type","display"]}),t.register("mathtex-display",{allowWhere:"$block",isInline:!1,isObject:!0,allowAttributes:["equation","type","display"]})}_defineConverters(){const t=this.editor.conversion,e=this.editor.config.get("math");function n(t,n){const o=t.getAttribute("equation"),i=t.getAttribute("display"),r="user-select: none; "+(i?"":"display: inline-block;"),s="ck-math-tex "+(i?"ck-math-tex-display":"ck-math-tex-inline"),a=n.createContainerElement(i?"div":"span",{style:r,class:s}),l=n.createUIElement("div",null,(function(t){const n=this.toDomElement(t);return pT(o,n,e.engine,e.lazyLoad,i,!1,e.previewClassName,null,e.katexRenderOptions),n}));return n.insert(n.createPositionAt(a,0),l),a}function o(t,{writer:e}){const n=t.getAttribute("equation"),o=t.getAttribute("type"),i=t.getAttribute("display");if("span"===o){const t=e.createContainerElement("span",{class:"math-tex"});return i?e.insert(e.createPositionAt(t,0),e.createText("\\["+n+"\\]")):e.insert(e.createPositionAt(t,0),e.createText("\\("+n+"\\)")),t}{const t=e.createContainerElement("script",{type:i?"math/tex; mode=display":"math/tex"});return e.insert(e.createPositionAt(t,0),e.createText(n)),t}}t.for("upcast").elementToElement({view:{name:"script",attributes:{type:"math/tex"}},model:(t,{writer:n})=>{const o=t.getChild(0).data.trim();return n.createElement("mathtex-inline",{equation:o,type:e.forceOutputType?e.outputType:"script",display:!1})}}).elementToElement({view:{name:"script",attributes:{type:"math/tex; mode=display"}},model:(t,{writer:n})=>{const o=t.getChild(0).data.trim();return n.createElement("mathtex-display",{equation:o,type:e.forceOutputType?e.outputType:"script",display:!0})}}).elementToElement({view:{name:"span",classes:["math-tex"]},model:(t,{writer:n})=>{const o=t.getChild(0).data.trim(),i=Object.assign(mT(o),{type:e.forceOutputType?e.outputType:"span"});return n.createElement(i.display?"mathtex-display":"mathtex-inline",i)}}).elementToElement({view:{name:"span",classes:["ql-formula"]},model:(t,{writer:n})=>{const o=t.getAttribute("data-value").trim();return n.createElement("mathtex-inline",{equation:o,type:e.forceOutputType?e.outputType:"script",display:!1})}}),t.for("editingDowncast").elementToElement({model:"mathtex-inline",view:(t,{writer:e})=>nb(n(t,e),e,"span")}).elementToElement({model:"mathtex-display",view:(t,{writer:e})=>nb(n(t,e),e,"div")}),t.for("dataDowncast").elementToElement({model:"mathtex-inline",view:o}).elementToElement({model:"mathtex-display",view:o})}}const ST="Ctrl+M";class BT extends L{static get requires(){return[ag,DT]}static get pluginName(){return"MathUI"}init(){const t=this.editor;t.editing.view.addObserver(Ng),this._previewUid=`math-preview-${r()}`,this.formView=this._createFormView(),this._balloon=t.plugins.get(ag),this._createToolbarMathButton(),this._enableUserBalloonInteractions()}destroy(){super.destroy(),this.formView.destroy();const t=Co.document.getElementById(this._previewUid);t&&t.parentNode.removeChild(t)}_showUI(){this.editor.commands.get("math").isEnabled&&(this._addFormView(),this._balloon.showStack("main"))}_createFormView(){const t=this.editor,e=t.commands.get("math"),n=t.config.get("math"),o=new ET(t.locale,n.engine,n.lazyLoad,n.enablePreview,this._previewUid,n.previewClassName,n.popupClassName,n.katexRenderOptions);return o.mathInputView.bind("value").to(e,"value"),o.displayButtonView.bind("isOn").to(e,"display"),o.mathInputView.bind("isReadOnly").to(e,"isEnabled",(t=>!t)),o.saveButtonView.bind("isEnabled").to(e),o.displayButtonView.bind("isEnabled").to(e),this.listenTo(o,"submit",(()=>{t.execute("math",o.equation,o.displayButtonView.isOn,n.outputType,n.forceOutputType),this._closeFormView()})),this.listenTo(o,"cancel",(()=>{this._closeFormView()})),o.keystrokes.set("esc",((t,e)=>{this._closeFormView(),e()})),o}_addFormView(){if(this._isFormInPanel)return;const t=this.editor,e=t.commands.get("math");this._balloon.add({view:this.formView,position:fT(t)}),this._balloon.visibleView===this.formView&&this.formView.mathInputView.select();Co.document.getElementById(this._previewUid)&&this.formView.previewEnabled&&this.formView.mathView.updateMath(),this.formView.equation=e.value||"",this.formView.displayButtonView.isOn=e.display||!1}_hideUI(){if(!this._isFormInPanel)return;const t=this.editor;this.stopListening(t.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),t.editing.view.focus(),this._removeFormView()}_closeFormView(){void 0!==this.editor.commands.get("math").value?this._removeFormView():this._hideUI()}_removeFormView(){if(this._isFormInPanel){this.formView.saveButtonView.focus(),this._balloon.remove(this.formView);const t=Co.document.getElementById(this._previewUid);t&&(t.style.visibility="hidden"),this.editor.editing.view.focus()}}_createToolbarMathButton(){const t=this.editor,e=t.commands.get("math"),n=t.t;t.keystrokes.set(ST,((t,n)=>{n(),e.isEnabled&&this._showUI()})),this.editor.ui.componentFactory.add("math",(t=>{const o=new Hh(t);return o.isEnabled=!0,o.label=n("Insert math"),o.icon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.44 10.78" height="40.74" width="58.35"><path d="M8.15 0c-.06 0-.1.02-.11.03a.12.12 0 0 0-.02.01 6.81 6.81 0 0 0-2.32 4.9v.9a6.82 6.82 0 0 0 2.32 4.9.12.12 0 0 0 .02 0c.02.02.06.04.11.04.07 0 .12-.03.16-.07a.22.22 0 0 0 0-.32.12.12 0 0 0-.02-.02A4.4 4.4 0 0 1 7 8.44a7.62 7.62 0 0 1-.5-2.6v-.9c0-.82.19-1.76.5-2.6A4.4 4.4 0 0 1 8.3.42.12.12 0 0 0 8.3.39a.22.22 0 0 0 .08-.16.22.22 0 0 0-.07-.16.22.22 0 0 0-.16-.07zm4.83 0a.22.22 0 0 0-.16.07.22.22 0 0 0-.07.16c0 .08.05.13.08.16a.12.12 0 0 0 .01.02c.52.39.98 1.1 1.3 1.94.3.83.49 1.77.49 2.6v.88c0 .83-.18 1.78-.5 2.6a4.4 4.4 0 0 1-1.29 1.95.22.22 0 0 0-.01.33c.03.04.08.07.15.07.05 0 .09-.02.12-.03a.12.12 0 0 0 .02-.01 6.82 6.82 0 0 0 2.32-4.9v-.9a6.81 6.81 0 0 0-2.32-4.9.12.12 0 0 0-.02 0c-.03-.02-.06-.04-.12-.04zm-8.5.46c-.4 0-1.13.23-1.46 1.32-.06.2-.11.45-.33 1.58h-.64c-.1 0-.19-.01-.28.03a.25.25 0 0 0-.12.12.38.38 0 0 0-.03.17c0 .04 0 .1.04.14.03.04.07.07.11.08.09.03.16.02.26.02h.56l-.77 4.04c-.1.51-.19 1-.32 1.36-.06.18-.14.32-.22.4-.08.1-.16.13-.26.13-.03 0-.1 0-.2-.03.11-.05.2-.13.26-.2a.7.7 0 0 0 .13-.4.48.48 0 0 0-.16-.38.53.53 0 0 0-.35-.12c-.34 0-.7.3-.7.76 0 .27.14.5.34.64s.44.2.68.2c.33 0 .61-.17.83-.4.21-.21.37-.48.47-.69.18-.35.32-.84.43-1.25a14.17 14.17 0 0 0 .18-.8l.61-3.26h.81c.1 0 .2.01.3-.03.04-.03.09-.07.11-.13.02-.05.03-.1.03-.17 0-.05-.01-.1-.05-.14a.23.23 0 0 0-.11-.07c-.08-.03-.16-.02-.25-.02h-.73l.2-1.07a26.3 26.3 0 0 1 .24-1.07c.08-.17.22-.3.39-.3l.21.05a.7.7 0 0 0-.25.2.7.7 0 0 0-.13.4c0 .15.06.28.16.37.1.08.22.12.35.12.34 0 .7-.3.7-.76 0-.28-.15-.5-.35-.64-.2-.14-.45-.2-.7-.2zm5.4 2.78c-.6 0-1.06.37-1.36.76-.16.2-.27.4-.35.57-.07.18-.12.3-.12.42 0 .1.08.18.14.2.06.03.1.02.1.02.06 0 .12 0 .18-.04.05-.05.07-.1.08-.17v.02c.35-1.09 1-1.3 1.3-1.3.09 0 .2.01.29.09.09.07.17.2.17.5 0 .27-.18 1-.57 2.48a1.8 1.8 0 0 1-.37.75.7.7 0 0 1-.52.26c-.04 0-.13 0-.22-.03a.68.68 0 0 0 .3-.56.47.47 0 0 0-.18-.39.55.55 0 0 0-.32-.1c-.4 0-.7.33-.7.74 0 .28.16.5.38.63.21.13.48.18.73.18.39 0 .69-.2.89-.41.09-.1.15-.19.2-.27.2.36.59.68 1.16.68.6 0 1.05-.37 1.35-.76.15-.2.27-.4.34-.57.08-.18.12-.3.12-.42a.24.24 0 0 0-.11-.2c-.06-.03-.12-.02-.13-.02a.26.26 0 0 0-.18.06c-.05.05-.06.1-.07.14-.34 1.1-1.02 1.3-1.3 1.3-.17 0-.27-.06-.35-.17a.72.72 0 0 1-.11-.4c0-.22.06-.45.18-.91l.36-1.45c.03-.14.1-.44.25-.7.15-.25.36-.46.68-.46.03 0 .12 0 .22.03a.7.7 0 0 0-.32.56c0 .11.04.23.13.33.08.1.22.16.4.16.14 0 .3-.06.44-.18a.73.73 0 0 0 .24-.55c0-.32-.2-.54-.42-.66a1.52 1.52 0 0 0-.68-.16c-.34 0-.62.16-.82.34a1.8 1.8 0 0 0-.3.35 1.32 1.32 0 0 0-.5-.54 1.37 1.37 0 0 0-.63-.15z" style="line-height:1.25;-inkscape-font-specification:\'Latin Modern Math\'" font-weight="400" font-size="10.58" font-family="Latin Modern Math" letter-spacing="-1.06" word-spacing="0"/></svg>\n',o.keystroke=ST,o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(e,"isEnabled"),this.listenTo(o,"execute",(()=>this._showUI())),o}))}_enableUserBalloonInteractions(){const t=this.editor,e=this.editor.editing.view.document;this.listenTo(e,"click",(()=>{const e=t.commands.get("math");e.value&&e.isEnabled&&this._showUI()})),t.keystrokes.set("Esc",((t,e)=>{this._isUIVisible&&(this._hideUI(),e())})),Ih({emitter:this.formView,activator:()=>this._isFormInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}get _isUIVisible(){return this._balloon.visibleView==this.formView}get _isFormInPanel(){return this._balloon.hasView(this.formView)}}class IT extends L{static get requires(){return[dk,eT]}static get pluginName(){return"AutoMath"}constructor(t){super(t),this._timeoutId=null,this._positionToInsert=null}init(){const t=this.editor,e=t.model.document;this.listenTo(t.plugins.get(dk),"inputTransformation",(()=>{const t=e.selection.getFirstRange(),n=dd.fromPosition(t.start);n.stickiness="toPrevious";const o=dd.fromPosition(t.end);o.stickiness="toNext",e.once("change:data",(()=>{this._mathBetweenPositions(n,o),n.detach(),o.detach()}),{priority:"high"})})),t.commands.get("undo").on("execute",(()=>{this._timeoutId&&(Co.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)}),{priority:"high"})}_mathBetweenPositions(t,e){const n=this.editor,o=this.editor.config.get("math"),i=new ul(t,e),r=i.getWalker({ignoreElementEnd:!0});let s="";for(const t of r)t.item.is("$textProxy")&&(s+=t.item.data);if(s=s.trim(),!gT(s)||2!==function(t){return t.match(/(\\\[|\\\]|\\\(|\\\))/g).length}(s))return;n.commands.get("math").isEnabled&&(this._positionToInsert=dd.fromPosition(t),this._timeoutId=Co.window.setTimeout((()=>{n.model.change((t=>{let e;this._timeoutId=null,t.remove(i),"$graveyard"!==this._positionToInsert.root.rootName&&(e=this._positionToInsert),n.model.change((t=>{const i=Object.assign(mT(s),{type:o.outputType}),r=t.createElement(i.display?"mathtex-display":"mathtex-inline",i);n.model.insertContent(r,e),t.setSelection(r,"on")})),this._positionToInsert.detach(),this._positionToInsert=null}))}),100))}}class PT extends L{static get requires(){return[DT,BT,IT,xb]}static get pluginName(){return"Math"}}class RT extends Dm{}RT.builtinPlugins=[dk,yf,LE,Df,class extends L{static get requires(){return[fp,wp]}static get pluginName(){return"Typing"}},eT,class extends L{static get requires(){return[Qm]}static get pluginName(){return"CKFinderUploadAdapter"}init(){const t=this.editor.config.get("ckfinder.uploadUrl");t&&(this.editor.plugins.get(Qm).createUploadAdapter=e=>new rp(e,t,this.editor.t))}},Lp,class extends L{static get requires(){return[jp,$p]}static get pluginName(){return"Bold"}},class extends L{static get requires(){return[Kp,Jp]}static get pluginName(){return"Italic"}},class extends L{static get requires(){return[af,cf]}static get pluginName(){return"Underline"}},class extends L{static get requires(){return[hf,gf]}static get pluginName(){return"Strikethrough"}},class extends L{static get requires(){return[pf,wf]}static get pluginName(){return"Code"}},class extends L{static get requires(){return[Qp,tf]}static get pluginName(){return"Superscript"}},class extends L{static get requires(){return[nf,rf]}static get pluginName(){return"Subscript"}},class extends L{static get requires(){return[Rf,Ff]}static get pluginName(){return"BlockQuote"}},class extends L{static get requires(){return[jf,Kf]}static get pluginName(){return"Heading"}},class extends L{static get requires(){return[_k,Ck]}static get pluginName(){return"Image"}},class extends L{static get requires(){return[xk,Ek]}static get pluginName(){return"ImageCaption"}},class extends L{static get requires(){return[Wk,$k]}static get pluginName(){return"ImageStyle"}},class extends L{static get requires(){return[Tb,qb]}static get pluginName(){return"ImageToolbar"}afterInit(){const t=this.editor,e=t.t,n=t.plugins.get(Tb),o=t.plugins.get("ImageUtils");var i;n.register("image",{ariaLabel:e("Image toolbar"),items:(i=t.config.get("image.toolbar")||[],i.map((t=>E(t)?t.name:t))),getRelatedElement:t=>o.getClosestSelectedImageWidget(t)})}},class extends L{static get pluginName(){return"ImageUpload"}static get requires(){return[gw,Xk,sw]}},class extends L{static get requires(){return[fw,Cw,kw]}static get pluginName(){return"ImageResize"}},class extends L{static get requires(){return[a_,k_,A_]}static get pluginName(){return"Link"}},A_,class extends L{static get requires(){return[Q_,nA]}static get pluginName(){return"List"}},class extends L{static get requires(){return[vA]}static get pluginName(){return"ListStyle"}constructor(t){super(t),c("The `ListStyle` plugin is obsolete. Use `ListProperties` instead.")}},class extends L{static get requires(){return[IA,PA]}static get pluginName(){return"TodoList"}},Lf,class extends L{static get pluginName(){return"PasteFromOffice"}static get requires(){return[ek]}init(){const t=this.editor,e=t.editing.view.document,n=[];n.push(new UA(e)),n.push(new LA(e)),t.plugins.get("ClipboardPipeline").on("inputTransformation",((o,i)=>{if(i._isTransformedWithPasteFromOffice)return;if(t.model.document.selection.getFirstPosition().parent.is("element","codeBlock"))return;const r=i.dataTransfer.getData("text/html"),s=n.find((t=>t.isActive(r)));s&&(i._parsedData=GA(r,e.stylesProcessor),s.execute(i),i._isTransformedWithPasteFromOffice=!0)}),{priority:"high"})}},class extends L{static get requires(){return[pk,qb]}static get pluginName(){return"PictureEditing"}afterInit(){const t=this.editor;t.plugins.has("ImageBlockEditing")&&t.model.schema.extend("imageBlock",{allowAttributes:["sources"]}),t.plugins.has("ImageInlineEditing")&&t.model.schema.extend("imageInline",{allowAttributes:["sources"]}),this._setupConversion(),this._setupImageUploadEditingIntegration()}_setupConversion(){const t=this.editor,e=t.conversion,n=t.plugins.get("ImageUtils");e.for("upcast").add(function(t){const e=["srcset","media","type","sizes"];return t=>{t.on("element:picture",n)};function n(n,o,i){const r=o.viewItem;if(!i.consumable.test(r,{name:!0}))return;const s=new Map;for(const t of r.getChildren())if(t.is("element","source")){const n={};for(const o of e)t.hasAttribute(o)&&i.consumable.test(t,{attributes:o})&&(n[o]=t.getAttribute(o));Object.keys(n).length&&s.set(t,n)}const a=t.findViewImgElement(r);if(!a)return;let l=o.modelCursor.parent;if(!l.is("element","imageBlock")){const t=i.convertItem(a,o.modelCursor);o.modelRange=t.modelRange,o.modelCursor=t.modelCursor,l=Ea(t.modelRange.getItems())}i.consumable.consume(r,{name:!0});for(const[t,e]of s)i.consumable.consume(t,{attributes:Object.keys(e)});s.size&&i.writer.setAttribute("sources",Array.from(s.values()),l),i.convertChildren(r,l)}}(n)),e.for("downcast").add(function(t){return t=>{t.on("attribute:sources:imageBlock",e),t.on("attribute:sources:imageInline",e)};function e(e,n,o){if(!o.consumable.consume(n.item,e.name))return;const i=o.writer,r=o.mapper.toViewElement(n.item),s=t.findViewImgElement(r);if(n.attributeNewValue&&n.attributeNewValue.length){const t=i.createContainerElement("picture",null,n.attributeNewValue.map((t=>i.createEmptyElement("source",t)))),e=[];let o=s.parent;for(;o&&o.is("attributeElement");){const t=o.parent;i.unwrap(i.createRangeOn(s),o),e.unshift(o),o=t}i.insert(i.createPositionBefore(s),t),i.move(i.createRangeOn(s),i.createPositionAt(t,"end"));for(const n of e)i.wrap(i.createRangeOn(t),n)}else if(s.parent.is("element","picture")){const t=s.parent;i.move(i.createRangeOn(s),i.createPositionBefore(t)),i.remove(t)}}}(n))}_setupImageUploadEditingIntegration(){const t=this.editor;t.plugins.has("ImageUploadEditing")&&this.listenTo(t.plugins.get("ImageUploadEditing"),"uploadComplete",((e,{imageElement:n,data:o})=>{const i=o.sources;i&&t.model.change((t=>{t.setAttributes({sources:i},n)}))}))}},class extends L{static get requires(){return[JC,nv,sv,mv,uv,av,xb]}static get pluginName(){return"Table"}},class extends L{static get requires(){return[Tb]}static get pluginName(){return"TableToolbar"}afterInit(){const t=this.editor,e=t.t,n=t.plugins.get(Tb),o=t.config.get("table.contentToolbar"),i=t.config.get("table.tableToolbar");o&&n.register("tableContent",{ariaLabel:e("Table toolbar"),items:o,getRelatedElement:wv}),i&&n.register("table",{ariaLabel:e("Table toolbar"),items:i,getRelatedElement:kv})}},class extends L{static get pluginName(){return"TableProperties"}static get requires(){return[Mv,Cy]}},class extends L{static get pluginName(){return"TableCellProperties"}static get requires(){return[qy,Sy]}},sv,class extends L{static get pluginName(){return"TableCaption"}static get requires(){return[Jy,Yy]}},class extends L{static get pluginName(){return"Indent"}static get requires(){return[TE,BE]}},class extends L{constructor(t){super(t),t.config.define("indentBlock",{offset:40,unit:"px"})}static get pluginName(){return"IndentBlock"}init(){const t=this.editor,e=t.config.get("indentBlock"),n=!e.classes||!e.classes.length,o=Object.assign({direction:"forward"},e),i=Object.assign({direction:"backward"},e);n?(t.data.addStyleProcessorRules(ym),this._setupConversionUsingOffset(t.conversion),t.commands.add("indentBlock",new IE(t,new PE(o))),t.commands.add("outdentBlock",new IE(t,new PE(i)))):(this._setupConversionUsingClasses(e.classes),t.commands.add("indentBlock",new IE(t,new RE(o))),t.commands.add("outdentBlock",new IE(t,new RE(i))))}afterInit(){const t=this.editor,e=t.model.schema,n=t.commands.get("indent"),o=t.commands.get("outdent"),i=t.config.get("heading.options");(i&&i.map((t=>t.model))||zE).forEach((t=>{e.isRegistered(t)&&e.extend(t,{allowAttributes:"blockIndent"})})),e.setAttributeProperties("blockIndent",{isFormatting:!0}),n.registerChildCommand(t.commands.get("indentBlock")),o.registerChildCommand(t.commands.get("outdentBlock"))}_setupConversionUsingOffset(){const t=this.editor.conversion,e="rtl"===this.editor.locale.contentLanguageDirection?"margin-right":"margin-left";t.for("upcast").attributeToAttribute({view:{styles:{[e]:/[\s\S]+/}},model:{key:"blockIndent",value:t=>t.getStyle(e)}}),t.for("downcast").attributeToAttribute({model:"blockIndent",view:t=>({key:"style",value:{[e]:t}})})}_setupConversionUsingClasses(t){const e={model:{key:"blockIndent",values:[]},view:{}};for(const n of t)e.model.values.push(n),e.view[n]={key:"class",value:[n]};this.editor.conversion.attributeToAttribute(e)}},class extends L{static get pluginName(){return"BlockToolbar"}constructor(t){super(t),this._blockToolbarConfig=hu(this.editor.config.get("blockToolbar")),this.toolbarView=this._createToolbarView(),this.panelView=this._createPanelView(),this.buttonView=this._createButtonView(),this._resizeObserver=null,Ih({emitter:this.panelView,contextElements:[this.panelView.element,this.buttonView.element],activator:()=>this.panelView.isVisible,callback:()=>this._hidePanel()})}init(){const t=this.editor;this.listenTo(t.model.document.selection,"change:range",((t,e)=>{e.directChange&&this._hidePanel()})),this.listenTo(t.ui,"update",(()=>this._updateButton())),this.listenTo(t,"change:isReadOnly",(()=>this._updateButton()),{priority:"low"}),this.listenTo(t.ui.focusTracker,"change:isFocused",(()=>this._updateButton())),this.listenTo(this.buttonView,"change:isVisible",((t,e,n)=>{n?this.buttonView.listenTo(window,"resize",(()=>this._updateButton())):(this.buttonView.stopListening(window,"resize"),this._hidePanel())})),t.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this._showPanel(),afterBlur:()=>this._hidePanel()})}afterInit(){const t=this.editor.ui.componentFactory,e=this._blockToolbarConfig;this.toolbarView.fillFromConfig(e,t);for(const t of this.toolbarView.items)t.on("execute",(()=>this._hidePanel(!0)),{priority:"high"});e.shouldNotGroupWhenFull||this.listenTo(this.editor,"ready",(()=>{const t=this.editor.ui.view.editable.element;this._resizeObserver=new ya(t,(()=>{this.toolbarView.maxWidth=this._getToolbarMaxWidth()}))}))}destroy(){super.destroy(),this.panelView.destroy(),this.buttonView.destroy(),this.toolbarView.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_createToolbarView(){const t=this.editor.locale.t,e=!this._blockToolbarConfig.shouldNotGroupWhenFull,n=new mu(this.editor.locale,{shouldGroupWhenFull:e,isFloating:!0});return n.ariaLabel=t("Editor block content toolbar"),n.focusTracker.on("change:isFocused",((t,e,n)=>{n||this._hidePanel()})),n}_createPanelView(){const t=this.editor,e=new hh(t.locale);return e.content.add(this.toolbarView),e.class="ck-toolbar-container",t.ui.view.body.add(e),t.ui.focusTracker.add(e.element),this.toolbarView.keystrokes.set("Esc",((t,e)=>{this._hidePanel(!0),e()})),e}_createButtonView(){const t=this.editor,e=t.t,n=new bg(t.locale);return n.set({label:e("Edit block"),icon:Dh,withText:!1}),n.bind("isOn").to(this.panelView,"isVisible"),n.bind("tooltip").to(this.panelView,"isVisible",(t=>!t)),this.listenTo(n,"execute",(()=>{this.panelView.isVisible?this._hidePanel(!0):this._showPanel()})),t.ui.view.body.add(n),t.ui.focusTracker.add(n.element),n}_updateButton(){const t=this.editor,e=t.model,n=t.editing.view;if(!t.ui.focusTracker.isFocused)return void this._hideButton();if(t.isReadOnly)return void this._hideButton();const o=Array.from(e.document.selection.getSelectedBlocks())[0];if(!o||Array.from(this.toolbarView.items).every((t=>!t.isEnabled)))return void this._hideButton();const i=n.domConverter.mapViewToDom(t.editing.mapper.toViewElement(o));this.buttonView.isVisible=!0,this._attachButtonToElement(i),this.panelView.isVisible&&this._showPanel()}_hideButton(){this.buttonView.isVisible=!1}_showPanel(){if(!this.buttonView.isVisible)return;const t=this.panelView.isVisible;this.panelView.show(),this.toolbarView.maxWidth=this._getToolbarMaxWidth(),this.panelView.pin({target:this.buttonView.element,limiter:this.editor.ui.getEditableElement()}),t||this.toolbarView.items.get(0).focus()}_hidePanel(t){this.panelView.isVisible=!1,t&&this.editor.editing.view.focus()}_attachButtonToElement(t){const e=window.getComputedStyle(t),n=new _a(this.editor.ui.getEditableElement()),o=parseInt(e.paddingTop,10),i=parseInt(e.lineHeight,10)||1.2*parseInt(e.fontSize,10),r=oh({element:this.buttonView.element,target:t,positions:[(t,e)=>{let r;return r="ltr"===this.editor.locale.uiLanguageDirection?n.left-e.width:n.right,{top:t.top+o+(i-e.height)/2,left:r}}]});this.buttonView.top=r.top,this.buttonView.left=r.left}_getToolbarMaxWidth(){const t=this.editor.ui.view.editable.element,e=new _a(t),n=new _a(this.buttonView.element),o="rtl"===this.editor.locale.uiLanguageDirection?n.left-e.right+n.width:e.left-n.left;return kg(e.width+o)}},class extends L{init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("paragraph",(n=>{const o=new Hh(n),i=t.commands.get("paragraph");return o.label=e("Paragraph"),o.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.5 5.5H7v5h3.5a2.5 2.5 0 1 0 0-5zM5 3h6.5v.025a5 5 0 0 1 0 9.95V13H7v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/></svg>',o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(i),o.bind("isOn").to(i,"value"),o.on("execute",(()=>{t.execute("paragraph")})),o}))}},class extends L{init(){Uf(this.editor).filter((t=>"paragraph"!==t.model)).map((t=>this._createButton(t)))}_createButton(t){const e=this.editor;e.ui.componentFactory.add(t.model,(n=>{const o=new Hh(n),i=e.commands.get("heading");return o.label=t.title,o.icon=t.icon||tx[t.model],o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(i),o.bind("isOn").to(i,"value",(e=>e==t.model)),o.on("execute",(()=>{e.execute("heading",{value:t.model}),e.editing.view.focus()})),o}))}},class extends L{static get requires(){return[Qm]}static get pluginName(){return"UploadimagePlugin"}init(){this.editor.plugins.get("FileRepository").createUploadAdapter=t=>new aT(t)}},class extends L{init(){const t=this.editor;t.ui.componentFactory.add("internalLink",(e=>{const n=new Hh(e);return n.set({label:"Internal Trilium link (CTRL-L)",icon:'<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n xmlns:dc="http://purl.org/dc/elements/1.1/"\n xmlns:cc="http://creativecommons.org/ns#"\n xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n xmlns:svg="http://www.w3.org/2000/svg"\n xmlns="http://www.w3.org/2000/svg"\n xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"\n xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"\n version="1.1"\n x="0px"\n y="0px"\n viewBox="0 0 67.008179 71.908997"\n enable-background="new 0 0 100 100"\n xml:space="preserve"\n id="svg4"\n sodipodi:docname="trilium.svg"\n width="67.008179"\n height="71.908997"\n inkscape:version="0.92.3 (2405546, 2018-03-11)"><metadata\n id="metadata10"><rdf:RDF><cc:Work\n rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type\n rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs\n id="defs8" /><sodipodi:namedview\n pagecolor="#ffffff"\n bordercolor="#666666"\n borderopacity="1"\n objecttolerance="10"\n gridtolerance="10"\n guidetolerance="10"\n inkscape:pageopacity="0"\n inkscape:pageshadow="2"\n inkscape:window-width="1857"\n inkscape:window-height="1053"\n id="namedview6"\n showgrid="false"\n fit-margin-top="0"\n fit-margin-left="0"\n fit-margin-right="0"\n fit-margin-bottom="0"\n inkscape:zoom="2.36"\n inkscape:cx="33.504176"\n inkscape:cy="35.954"\n inkscape:window-x="63"\n inkscape:window-y="27"\n inkscape:window-maximized="1"\n inkscape:current-layer="svg4" /><path\n d="m 47.470176,30.998 c 0.008,-0.009 0.021,-0.021 0.027,-0.029 0.938,-1.156 -0.823,-13.453 -5.063,-20.125 -1.389,-2.186 -2.239,-3.423 -3.219,-4.719 -3.907,-5.166 -6,-6.125 -6,-6.125 0,0 -13.979,10.735 -13.562,30.27 -1.754,0.065 -11.2179997,7.528 -14.8259997,14.388 -1.206,2.291 -1.856,3.645 -2.493,5.141 -2.53899996,5.957 -2.32999996,8.25 -2.32999996,8.25 0,0 16.27099966,6.79 33.01399966,-3.294 0.007,0.021 0.013,0.046 0.02,0.063 0.537,1.389 12.08,5.979 19.976,5.621 2.587,-0.116 4.084,-0.238 5.696,-0.444 6.424,-0.818 8.298,-2.157 8.298,-2.157 0,0 -2.36,-17.487 -19.538,-26.84 z m -13.179,20.3 c 1.059,-1.183 4.648,-5.853 0.995,-11.315 -0.253,-0.377 -0.496,-0.236 -0.496,-0.236 0,0 0.063,10.822 -5.162,12.359 -5.225,1.537 -13.886,4.4 -20.4269997,0.455 -0.697,-0.42 1.2269997,-13 12.8469997,-19.377 0.546,1.599 2.836,6.854 9.292,6.409 0.453,-0.031 0.453,-0.313 0.453,-0.313 0,0 -9.422,-5.328 -8.156,-10.625 1.266,-5.297 3.089,-14.236 9.766,-17.948 0.714,-0.397 10.746,7.593 10.417,20.94 -1.606,-0.319 -7.377,-1.004 -10.226,4.864 -0.198,0.409 0.046,0.549 0.046,0.549 0,0 9.31,-5.521 13.275,-1.789 3.965,3.733 10.813,9.763 10.71,17.4 -0.01,0.817 -11.924,5.542 -23.334,-1.373 z M 19.117176,21.1 c 0,0 -0.991,3.241 -0.603,7.524 L 5.1211763,21.1 c 10e-4,0 6.2209997,-4.214 13.9959997,0 z M 4.6971763,21.985 18.041176,29.597 c -3.872,1.872 -6.142,4.388 -6.142,4.388 -7.6149997,-4.499 -7.2019997,-12 -7.2019997,-12 z M 55.791176,35.019 c 0,0 -2.321,-2.471 -6.23,-4.263 l 13.187,-7.881 c -10e-4,0 0.564,7.493 -6.957,12.144 z m 6.4,-12.951 -13.237,7.794 c 0.3,-4.291 -0.754,-7.511 -0.754,-7.511 7.687,-4.371 13.991,-0.283 13.991,-0.283 z m -36.611,37.665 c 0,0 3.309,-0.737 6.845,-3.185 l 0.056,15.361 c 0,10e-4 -6.733,-3.333 -6.901,-12.176 z m 7.88,12.11 0.044,-15.362 c 3.539,2.445 6.846,3.181 6.846,3.181 -0.16,8.844 -6.89,12.181 -6.89,12.181 z"\n id="path2"\n inkscape:connector-curvature="0" /></svg>',tooltip:!0}),n.bind("isEnabled").to(t,"isReadOnly",(t=>!t)),n.on("execute",(()=>{const e=t.editing.view.getDomRoot();glob.getComponentByEl(e).triggerCommand("addLinkToText")})),n}))}},class extends L{init(){this.editor.ui.componentFactory.add("markdownImport",(t=>{const e=new Hh(t);return e.set({label:"Markdown import from clipboard",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="208" height="128" viewBox="0 0 208 128"><rect width="198" height="118" x="5" y="5" ry="10" stroke="#000" stroke-width="10" fill="none"/><path d="M30 98V30h20l20 25 20-25h20v68H90V59L70 84 50 59v39zm125 0l-30-33h20V30h20v35h20z"/></svg>',tooltip:!0}),e.on("execute",(()=>{glob.importMarkdownInline()})),e}))}},class extends L{init(){this.htmlDataProcessor=new uc,this.editor.ui.componentFactory.add("cutToNote",(t=>{const e=new Hh(t);return e.set({label:"Cut & paste selection to sub-note",icon:'<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon --\x3e\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">\n<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>\n<g><g><path d="M853.9,754.9c-26-45.4-66.5-76.2-109.1-87.8c-33.7-9.2-68.7-6.4-98.9,10.7l-90-157.3C611.6,409.5,736.5,160.5,759,121.2C788,70.4,736,10,736,10L500,422.8L264,10c0,0-52,60.4-22.9,111.2c22.5,39.3,147.5,288.3,203.1,399.3l-89.9,157.3c-30.2-17.1-65.3-19.9-98.9-10.7c-42.7,11.6-83.1,42.3-109.1,87.8c-46.8,81.7-28.9,179.7,39.7,219c30.4,17.5,65.7,20.3,99.6,11.1c42.6-11.6,83.1-42.4,109.1-87.7c11.4-20,18.9-41,22.8-61.8v0c0-0.2,0-0.3,0.2-0.5c0.2-1.7,0.5-3.5,0.7-5.4c19.3-129.5,55.8-195.7,81.6-227.8c25.9,32.1,62.4,98.3,81.7,227.8c0.2,1.9,0.5,3.6,0.7,5.4c0.1,0.2,0.1,0.3,0.2,0.5v0c3.9,20.8,11.4,41.8,22.7,61.8c26,45.3,66.5,76.1,109.2,87.7c34,9.2,69.2,6.4,99.7-11.1C882.8,934.5,900.6,836.5,853.9,754.9z M327.9,858.9c-14.8,25.8-38.1,45.2-62.5,51.8c-10.8,3-26.7,4.7-41.3-3.6c-31.1-17.8-36.2-70.1-11.1-114c15-26,37.8-45,62.5-51.8c10.7-2.9,26.7-4.7,41.3,3.6C347.9,762.7,353,814.9,327.9,858.9z M775.9,907.1c-14.6,8.4-30.4,6.6-41.3,3.6c-24.4-6.6-47.7-26-62.5-51.8c-25.1-44-20-96.2,11.1-114c14.7-8.3,30.6-6.5,41.3-3.6C749.3,748,772.1,767,787,793C812.1,837,807.1,889.3,775.9,907.1z"/><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></g>\n</svg>',tooltip:!0}),e.on("execute",(()=>{const t=this.editor.editing.view.getDomRoot();glob.getComponentByEl(t).triggerCommand("cutIntoNote")})),e})),this.editor.getSelectedHtml=()=>this.getSelectedHtml(),this.editor.removeSelection=()=>this.removeSelection()}getSelectedHtml(){const t=this.editor.model,e=t.document,n=this.editor.data.toView(t.getSelectedContent(e.selection));return this.htmlDataProcessor.toData(n)}async removeSelection(){const t=this.editor.model;t.deleteContent(t.document.selection);const e=this.getComponent();await e.triggerCommand("saveNoteDetailNow")}getComponent(){const t=this.editor.editing.view.getDomRoot();return glob.getComponentByEl(t)}},class extends L{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}constructor(t){super(t),t.config.define("typing",{transformations:{include:Sp}})}init(){const t=this.editor.model.document.selection;t.on("change:range",(()=>{this.isEnabled=!t.anchor.parent.is("element","codeBlock")})),this._enableTransformationWatchers()}_enableTransformationWatchers(){const t=this.editor,e=t.model,n=t.plugins.get("Delete"),o=function(t){const e=t.extra||[],n=t.remove||[],o=t=>!n.includes(t);return function(t){const e=new Set;for(const n of t)if(Dp[n])for(const t of Dp[n])e.add(t);else e.add(n);return Array.from(e)}(t.include.concat(e).filter(o)).filter(o).map((t=>Tp[t]||t)).filter((t=>"object"==typeof t)).map((t=>({from:Bp(t.from),to:Ip(t.to)})))}(t.config.get("typing.transformations")),i=new Ap(t.model,(t=>{for(const e of o){if(e.from.test(t))return{normalizedTransformation:e}}}));i.on("matched:data",((t,o)=>{if(!o.batch.isTyping)return;const{from:i,to:r}=o.normalizedTransformation,s=i.exec(o.text),a=r(s.slice(1)),l=o.range;let c=s.index;e.enqueueChange((t=>{for(let n=1;n<s.length;n++){const o=s[n],i=a[n-1];if(null==i){c+=o.length;continue}const r=l.start.getShiftedBy(c),d=e.createRange(r,r.getShiftedBy(o.length)),h=Pp(r);e.insertContent(t.createText(i,h),d),c+=i.length}e.enqueueChange((()=>{n.requestUndoOnBackspace()}))}))})),i.bind("isEnabled").to(this)}},class extends L{static get requires(){return[wx,Sx,zx,Nx]}static get pluginName(){return"Font"}},zx,Nx,class extends L{static get requires(){return[Yx,nE]}static get pluginName(){return"CodeBlock"}},LE,class extends L{static get requires(){return[jE,UE,xb]}static get pluginName(){return"HorizontalLine"}},class extends L{static get requires(){return[rT,oT]}static get pluginName(){return"RemoveFormat"}},class extends L{static get requires(){return[Jm,zm]}static get pluginName(){return"FindAndReplace"}init(){const t=this.editor.plugins.get("FindAndReplaceUI"),e=this.editor.plugins.get("FindAndReplaceEditing"),n=e.state;t.on("findNext",((t,e)=>{e?(n.searchText=e.searchText,this.editor.execute("find",e.searchText,e)):this.editor.execute("findNext")})),t.on("findPrevious",((t,e)=>{e&&n.searchText!==e.searchText?this.editor.execute("find",e.searchText):this.editor.execute("findPrevious")})),t.on("replace",((t,e)=>{n.searchText!==e.searchText&&this.editor.execute("find",e.searchText);const o=n.highlightedResult;o&&this.editor.execute("replace",e.replaceText,o)})),t.on("replaceAll",((t,e)=>{n.searchText!==e.searchText&&this.editor.execute("find",e.searchText),this.editor.execute("replaceAll",e.replaceText,n.results)})),t.on("searchReseted",(()=>{n.clear(this.editor.model),e.stop()}))}},class extends L{toMentionAttribute(t,e){return sE(t,e)}static get pluginName(){return"Mention"}static get requires(){return[iE,kE]}},class extends L{afterInit(){const t=this.editor;t.commands.add("mention",new sT(t))}},class extends L{static get requires(){return[cT,lT]}},class extends L{static get requires(){return[uT]}},function(t){function e(){let e=t.model.document.selection.getFirstPosition();for(;e;){if("tableCell"===e.name)return!0;e=e.parent}return!1}t.keystrokes.set("Tab",((n,o)=>{const i=t.commands.get("indentBlock");i.isEnabled&&!e()&&(i.execute(),o())})),t.keystrokes.set("Shift+Tab",((n,o)=>{const i=t.commands.get("outdentBlock");i.isEnabled&&!e()&&(i.execute(),o())}))},function(t){t.model.schema.setAttributeProperties("linkHref",{isFormatting:!0})},PT,class extends L{static get requires(){return[PT,Lp]}afterInit(){const t=this.editor,e=t.commands.get("math");if(e){const n=function(t,e){return()=>{if(!e.isEnabled)return!1;e.display=!0,t.plugins.get("MathUI")._showUI()}}(t,e);Op(t,this,/^\\\[$/,n),Op(t,this,/^\$\$$/,n)}}static get pluginName(){return"AutoformatMath"}}],RT.defaultConfig={toolbar:{items:["fontSize","bold","italic","underline","strikethrough","superscript","subscript","fontColor","fontBackgroundColor","code","link","removeFormat","internallink","cuttonote"]},image:{styles:["alignLeft","alignCenter","alignRight","full","side"],resizeOptions:[{name:"imageResize:original",value:null,icon:"original"},{name:"imageResize:25",value:"25",icon:"small"},{name:"imageResize:50",value:"50",icon:"medium"}],toolbar:["imageStyle:inline","imageStyle:alignLeft","imageStyle:alignCenter","imageStyle:alignRight","|","imageResize:25","imageResize:50","imageResize:original","|","toggleImageCaption"]},heading:{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading2",view:"h2",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h3",title:"Heading 3",class:"ck-heading_heading3"},{model:"heading4",view:"h4",title:"Heading 4",class:"ck-heading_heading4"},{model:"heading5",view:"h5",title:"Heading 5",class:"ck-heading_heading5"},{model:"heading6",view:"h6",title:"Heading 6",class:"ck-heading_heading6"}]},blockToolbar:["heading","|","bulletedList","numberedList","todoList","|","blockQuote","codeBlock","insertTable","includeNote","math","|","outdent","indent","horizontalLine","|","imageUpload","markdownImport","findAndReplace"],table:{contentToolbar:["tableColumn","tableRow","mergeTableCells","tableProperties","tableCellProperties","toggleTableCaption"]},link:{defaultProtocol:"https://"},language:"en"}})(),o=o.default})()}));
//# sourceMappingURL=libraries/ckeditor/ckeditor.js.map
\ No newline at end of file
diff --git a/libraries/ckeditor/ckeditor.js.map b/libraries/ckeditor/ckeditor.js.map
index 7fa8afd8b8..470b2efaf7 100644
--- a/libraries/ckeditor/ckeditor.js.map
+++ b/libraries/ckeditor/ckeditor.js.map
@@ -1 +1 @@
-{"version":3,"file":"ckeditor.js","mappings":";;;;;AAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAuB,cAAID,IAE3BD,EAAoB,cAAIC,IAR1B,CASGK,MAAM,WACT,Y,qFCPIC,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACL,EAAOM,GAAI,4iDAA6iD,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,mEAA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WACA,kBACA,kBACA,sBACA,uBAGFzoD,KAAM,CACLC,gBAAiB,YAGlBr9H,SAAU,O,gBx5B3NX","sources":["webpack://BalloonEditor/webpack/universalModuleDefinition","webpack://BalloonEditor/../node_modules/css-loader/dist/node_modules/postcss-loader/dist/node_modules/ckeditor5-math/theme/mathform.css","webpack://BalloonEditor/../ckeditor5-basic-styles/theme/code.css","webpack://BalloonEditor/../ckeditor5-block-quote/theme/blockquote.css","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-find-and-replace/theme/findandreplace.css","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-find-and-replace/theme/findandreplaceform.css","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-mention/theme/mention.css","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-mention/theme/mentionui.css","webpack://BalloonEditor/../ckeditor5-clipboard/theme/clipboard.css","webpack://BalloonEditor/../ckeditor5-code-block/theme/codeblock.css","webpack://BalloonEditor/../ckeditor5-engine/theme/placeholder.css","webpack://BalloonEditor/../ckeditor5-engine/theme/renderer.css","webpack://BalloonEditor/../ckeditor5-font/theme/fontcolor.css","webpack://BalloonEditor/../ckeditor5-font/theme/fontsize.css","webpack://BalloonEditor/../ckeditor5-heading/theme/heading.css","webpack://BalloonEditor/../ckeditor5-horizontal-line/theme/horizontalline.css","webpack://BalloonEditor/../ckeditor5-image/theme/image.css","webpack://BalloonEditor/../ckeditor5-image/theme/imagecaption.css","webpack://BalloonEditor/../ckeditor5-image/theme/imageresize.css","webpack://BalloonEditor/../ckeditor5-image/theme/imagestyle.css","webpack://BalloonEditor/../ckeditor5-image/theme/imageuploadicon.css","webpack://BalloonEditor/../ckeditor5-image/theme/imageuploadloader.css","webpack://BalloonEditor/../ckeditor5-image/theme/imageuploadprogress.css","webpack://BalloonEditor/../ckeditor5-image/theme/textalternativeform.css","webpack://BalloonEditor/../ckeditor5-link/theme/link.css","webpack://BalloonEditor/../ckeditor5-link/theme/linkactions.css","webpack://BalloonEditor/../ckeditor5-link/theme/linkform.css","webpack://BalloonEditor/../ckeditor5-list/theme/collapsible.css","webpack://BalloonEditor/../ckeditor5-list/theme/listproperties.css","webpack://BalloonEditor/../ckeditor5-list/theme/liststyles.css","webpack://BalloonEditor/../ckeditor5-list/theme/todolist.css","webpack://BalloonEditor/../ckeditor5-table/theme/colorinput.css","webpack://BalloonEditor/../ckeditor5-table/theme/form.css","webpack://BalloonEditor/../ckeditor5-table/theme/formrow.css","webpack://BalloonEditor/../ckeditor5-table/theme/inserttable.css","webpack://BalloonEditor/../ckeditor5-table/theme/table.css","webpack://BalloonEditor/../ckeditor5-table/theme/tablecaption.css","webpack://BalloonEditor/../ckeditor5-table/theme/tablecellproperties.css","webpack://BalloonEditor/../ckeditor5-table/theme/tableediting.css","webpack://BalloonEditor/../ckeditor5-table/theme/tableform.css","webpack://BalloonEditor/../ckeditor5-table/theme/tableproperties.css","webpack://BalloonEditor/../ckeditor5-table/theme/tableselection.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/button/button.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/button/switchbutton.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/colorgrid/colorgrid.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/dropdown/dropdown.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/dropdown/listdropdown.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/dropdown/splitbutton.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/dropdown/toolbardropdown.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/editorui/editorui.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/formheader/formheader.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/icon/icon.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/input/input.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/label/label.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/labeledinput/labeledinput.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/list/list.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/panel/balloonpanel.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/panel/balloonrotator.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/panel/fakepanel.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/panel/stickypanel.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/responsive-form/responsiveform.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/toolbar/blocktoolbar.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/toolbar/toolbar.css","webpack://BalloonEditor/../ckeditor5-ui/theme/components/tooltip/tooltip.css","webpack://BalloonEditor/../ckeditor5-ui/theme/globals/globals.css","webpack://BalloonEditor/../ckeditor5-widget/theme/widget.css","webpack://BalloonEditor/../ckeditor5-widget/theme/widgetresize.css","webpack://BalloonEditor/../ckeditor5-widget/theme/widgettypearound.css","webpack://BalloonEditor/../node_modules/css-loader/dist/runtime/api.js","webpack://BalloonEditor/../node_modules/css-loader/dist/runtime/cssWithMappingToString.js","webpack://BalloonEditor/../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://BalloonEditor/webpack/bootstrap","webpack://BalloonEditor/webpack/runtime/compat get default export","webpack://BalloonEditor/webpack/runtime/define property getters","webpack://BalloonEditor/webpack/runtime/global","webpack://BalloonEditor/webpack/runtime/hasOwnProperty shorthand","webpack://BalloonEditor/../ckeditor5-utils/src/spy.js","webpack://BalloonEditor/../ckeditor5-utils/src/eventinfo.js","webpack://BalloonEditor/../ckeditor5-utils/src/uid.js","webpack://BalloonEditor/../ckeditor5-utils/src/priorities.js","webpack://BalloonEditor/../ckeditor5-utils/src/ckeditorerror.js","webpack://BalloonEditor/../ckeditor5-utils/src/version.js","webpack://BalloonEditor/../ckeditor5-utils/src/emittermixin.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isObject.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_freeGlobal.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_root.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_Symbol.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_getRawTag.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_objectToString.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseGetTag.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isFunction.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_coreJsData.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_isMasked.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_toSource.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseIsNative.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_getValue.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_getNative.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_defineProperty.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseAssignValue.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/eq.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_assignValue.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_copyObject.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/identity.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_apply.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_overRest.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/constant.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseSetToString.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_shortOut.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_setToString.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseRest.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isLength.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isArrayLike.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_isIndex.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_isIterateeCall.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_createAssigner.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseTimes.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isObjectLike.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseIsArguments.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isArguments.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isArray.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/stubFalse.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isBuffer.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseIsTypedArray.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseUnary.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_nodeUtil.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isTypedArray.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_arrayLikeKeys.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_isPrototype.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_nativeKeysIn.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseKeysIn.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/keysIn.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/assignIn.js","webpack://BalloonEditor/../ckeditor5-utils/src/observablemixin.js","webpack://BalloonEditor/../ckeditor5-utils/src/mix.js","webpack://BalloonEditor/../ckeditor5-core/src/plugin.js","webpack://BalloonEditor/../ckeditor5-core/src/command.js","webpack://BalloonEditor/../ckeditor5-core/src/multicommand.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_overArg.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_getPrototype.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isPlainObject.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_listCacheClear.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_assocIndexOf.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_listCacheDelete.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_listCacheGet.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_listCacheHas.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_listCacheSet.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_ListCache.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_stackClear.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_stackDelete.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_stackGet.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_stackHas.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_Map.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_nativeCreate.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_hashClear.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_hashDelete.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_hashGet.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_hashHas.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_hashSet.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_Hash.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_mapCacheClear.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_isKeyable.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_getMapData.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_mapCacheDelete.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_mapCacheGet.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_mapCacheHas.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_mapCacheSet.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_MapCache.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_stackSet.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_Stack.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_arrayEach.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_nativeKeys.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseKeys.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/keys.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseAssign.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseAssignIn.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_cloneBuffer.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_copyArray.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_arrayFilter.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/stubArray.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_getSymbols.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_copySymbols.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_arrayPush.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_getSymbolsIn.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_copySymbolsIn.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseGetAllKeys.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_getAllKeys.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_getAllKeysIn.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_DataView.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_Promise.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_Set.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_WeakMap.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_getTag.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_initCloneArray.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_Uint8Array.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_cloneArrayBuffer.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_cloneDataView.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_cloneRegExp.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_cloneSymbol.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_cloneTypedArray.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_initCloneByTag.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseCreate.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_initCloneObject.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseIsMap.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isMap.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseIsSet.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isSet.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseClone.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/cloneDeepWith.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isElement.js","webpack://BalloonEditor/../ckeditor5-utils/src/config.js","webpack://BalloonEditor/../ckeditor5-utils/src/isiterable.js","webpack://BalloonEditor/../ckeditor5-utils/src/collection.js","webpack://BalloonEditor/../ckeditor5-core/src/plugincollection.js","webpack://BalloonEditor/../ckeditor5-utils/src/toarray.js","webpack://BalloonEditor/../ckeditor5-utils/src/translation-service.js","webpack://BalloonEditor/../ckeditor5-utils/src/language.js","webpack://BalloonEditor/../ckeditor5-utils/src/locale.js","webpack://BalloonEditor/../ckeditor5-core/src/context.js","webpack://BalloonEditor/../ckeditor5-core/src/contextplugin.js","webpack://BalloonEditor/../ckeditor5-utils/src/comparearrays.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/clone.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/node.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/text.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/textproxy.js","webpack://BalloonEditor/../ckeditor5-utils/src/tomap.js","webpack://BalloonEditor/../ckeditor5-utils/src/objecttomap.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/matcher.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isSymbol.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_isKey.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/memoize.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_stringToPath.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_memoizeCapped.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_arrayMap.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseToString.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/toString.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_castPath.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/last.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_toKey.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseGet.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseSlice.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_parent.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseUnset.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/unset.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/get.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_assignMergeValue.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseFor.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_createBaseFor.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isArrayLikeObject.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_safeGet.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/toPlainObject.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseMergeDeep.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseMerge.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/merge.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseSet.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/set.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/stylesmap.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/element.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/containerelement.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/editableelement.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/rooteditableelement.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/treewalker.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/position.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/range.js","webpack://BalloonEditor/../ckeditor5-utils/src/count.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/selection.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/documentselection.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/observer/bubblingeventinfo.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/observer/bubblingemittermixin.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/document.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/attributeelement.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/emptyelement.js","webpack://BalloonEditor/../ckeditor5-utils/src/env.js","webpack://BalloonEditor/../ckeditor5-utils/src/keyboard.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/uielement.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/rawelement.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/documentfragment.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/downcastwriter.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/istext.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/filler.js","webpack://BalloonEditor/../ckeditor5-utils/src/fastdiff.js","webpack://BalloonEditor/../ckeditor5-utils/src/diff.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/insertat.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/remove.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/iscomment.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/isnode.js","webpack://BalloonEditor/../ckeditor5-engine/theme/renderer.css?dd62","webpack://BalloonEditor/../ckeditor5-engine/src/view/renderer.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/global.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/indexof.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/getancestors.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/domconverter.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/iswindow.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/emittermixin.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/observer/observer.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_setCacheAdd.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_setCacheHas.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_SetCache.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_arraySome.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_cacheHas.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_equalArrays.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_mapToArray.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_setToArray.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_equalByTag.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_equalObjects.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseIsEqualDeep.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseIsEqual.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isEqualWith.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/observer/mutationobserver.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/observer/domeventdata.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/observer/domeventobserver.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/observer/keyobserver.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/now.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_trimmedEndIndex.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_baseTrim.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/toNumber.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/debounce.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/observer/fakeselectionobserver.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/observer/selectionobserver.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/observer/focusobserver.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/observer/compositionobserver.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/observer/inputobserver.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isString.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/createelement.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/isrange.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/getborderwidths.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/rect.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/resizeobserver.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/setdatainelement.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/isvisible.js","webpack://BalloonEditor/../ckeditor5-utils/src/first.js","webpack://BalloonEditor/../ckeditor5-utils/src/focustracker.js","webpack://BalloonEditor/../ckeditor5-utils/src/keystrokehandler.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/observer/arrowkeysobserver.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/scroll.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/view.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/node.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/text.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/textproxy.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/nodelist.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/element.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/treewalker.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/position.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/range.js","webpack://BalloonEditor/../ckeditor5-engine/src/conversion/mapper.js","webpack://BalloonEditor/../ckeditor5-engine/src/conversion/modelconsumable.js","webpack://BalloonEditor/../ckeditor5-engine/src/conversion/downcastdispatcher.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/selection.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/liverange.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/documentselection.js","webpack://BalloonEditor/../ckeditor5-engine/src/conversion/conversionhelpers.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/cloneDeep.js","webpack://BalloonEditor/../ckeditor5-engine/src/conversion/downcasthelpers.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/utils/autoparagraphing.js","webpack://BalloonEditor/../ckeditor5-engine/src/conversion/upcasthelpers.js","webpack://BalloonEditor/../ckeditor5-engine/src/controller/editingcontroller.js","webpack://BalloonEditor/../ckeditor5-core/src/commandcollection.js","webpack://BalloonEditor/../ckeditor5-engine/src/conversion/viewconsumable.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/schema.js","webpack://BalloonEditor/../ckeditor5-engine/src/conversion/upcastdispatcher.js","webpack://BalloonEditor/../ckeditor5-engine/src/dataprocessor/basichtmlwriter.js","webpack://BalloonEditor/../ckeditor5-engine/src/dataprocessor/htmldataprocessor.js","webpack://BalloonEditor/../ckeditor5-engine/src/controller/datacontroller.js","webpack://BalloonEditor/../ckeditor5-engine/src/conversion/conversion.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/batch.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/operation/operation.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/documentfragment.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/operation/utils.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/isEqual.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/operation/attributeoperation.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/operation/detachoperation.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/operation/moveoperation.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/operation/insertoperation.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/operation/markeroperation.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/operation/renameoperation.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/operation/rootattributeoperation.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/operation/mergeoperation.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/operation/splitoperation.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/rootelement.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/writer.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/differ.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/history.js","webpack://BalloonEditor/../ckeditor5-utils/src/unicode.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/document.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/markercollection.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/operation/nooperation.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/operation/operationfactory.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/liveposition.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/utils/insertcontent.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/utils/deletecontent.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/utils/modifyselection.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/utils/getselectedcontent.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/utils/selection-post-fixer.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/model.js","webpack://BalloonEditor/../ckeditor5-core/src/editingkeystrokehandler.js","webpack://BalloonEditor/../ckeditor5-core/src/editor/editor.js","webpack://BalloonEditor/../ckeditor5-ui/src/componentfactory.js","webpack://BalloonEditor/../ckeditor5-core/src/editor/editorui.js","webpack://BalloonEditor/../ckeditor5-core/src/editor/utils/dataapimixin.js","webpack://BalloonEditor/../ckeditor5-core/src/editor/utils/elementapimixin.js","webpack://BalloonEditor/../ckeditor5-core/src/pendingactions.js","webpack://BalloonEditor/../ckeditor5-core/theme/icons/cancel.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/check.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/pilcrow.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/three-vertical-dots.svg","webpack://BalloonEditor/../ckeditor5-core/src/index.js","webpack://BalloonEditor/../ckeditor5-core/theme/icons/caption.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/cog.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/eraser.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/low-vision.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/image.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/align-bottom.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/align-middle.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/align-top.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/align-left.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/align-center.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/align-right.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/align-justify.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/object-inline-left.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/object-center.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/object-inline-right.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/object-full-width.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/object-inline.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/object-left.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/object-right.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/object-size-full.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/object-size-large.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/object-size-small.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/object-size-medium.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/pencil.svg","webpack://BalloonEditor/../ckeditor5-core/theme/icons/quote.svg","webpack://BalloonEditor/../ckeditor5-ui/src/bindings/clickoutsidehandler.js","webpack://BalloonEditor/../ckeditor5-ui/src/bindings/injectcsstransitiondisabler.js","webpack://BalloonEditor/../ckeditor5-ui/src/bindings/submithandler.js","webpack://BalloonEditor/../ckeditor5-ui/src/viewcollection.js","webpack://BalloonEditor/../ckeditor5-ui/theme/globals/globals.css?236e","webpack://BalloonEditor/../ckeditor5-ui/src/view.js","webpack://BalloonEditor/../ckeditor5-ui/src/template.js","webpack://BalloonEditor/../ckeditor5-ui/src/editorui/bodycollection.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/icon/icon.css?00c8","webpack://BalloonEditor/../ckeditor5-ui/src/icon/iconview.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/tooltip/tooltip.css?c7bf","webpack://BalloonEditor/../ckeditor5-ui/src/tooltip/tooltipview.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/button/button.css?de94","webpack://BalloonEditor/../ckeditor5-ui/src/button/buttonview.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/button/switchbutton.css?7bcd","webpack://BalloonEditor/../ckeditor5-ui/src/button/switchbuttonview.js","webpack://BalloonEditor/../ckeditor5-ui/src/colorgrid/utils.js","webpack://BalloonEditor/../ckeditor5-ui/src/colorgrid/colortileview.js","webpack://BalloonEditor/../ckeditor5-ui/theme/icons/color-tile-check.svg","webpack://BalloonEditor/../ckeditor5-ui/src/focuscycler.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/colorgrid/colorgrid.css?94cc","webpack://BalloonEditor/../ckeditor5-ui/src/colorgrid/colorgridview.js","webpack://BalloonEditor/../ckeditor5-ui/theme/icons/dropdown-arrow.svg","webpack://BalloonEditor/../ckeditor5-ui/src/dropdown/button/dropdownbuttonview.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/dropdown/splitbutton.css?a37f","webpack://BalloonEditor/../ckeditor5-ui/src/dropdown/button/splitbuttonview.js","webpack://BalloonEditor/../ckeditor5-ui/src/dropdown/dropdownpanelview.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/dropdown/dropdown.css?a927","webpack://BalloonEditor/../ckeditor5-utils/src/dom/position.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/getpositionedancestor.js","webpack://BalloonEditor/../ckeditor5-ui/src/dropdown/dropdownview.js","webpack://BalloonEditor/../ckeditor5-ui/src/toolbar/toolbarseparatorview.js","webpack://BalloonEditor/../ckeditor5-ui/src/toolbar/toolbarlinebreakview.js","webpack://BalloonEditor/../ckeditor5-ui/src/toolbar/normalizetoolbarconfig.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/toolbar/toolbar.css?10d7","webpack://BalloonEditor/../ckeditor5-ui/src/toolbar/toolbarview.js","webpack://BalloonEditor/../ckeditor5-ui/src/bindings/preventdefault.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/list/list.css?fdbc","webpack://BalloonEditor/../ckeditor5-ui/src/list/listview.js","webpack://BalloonEditor/../ckeditor5-ui/src/list/listitemview.js","webpack://BalloonEditor/../ckeditor5-ui/src/list/listseparatorview.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/dropdown/toolbardropdown.css?31da","webpack://BalloonEditor/../ckeditor5-ui/theme/components/dropdown/listdropdown.css?ae60","webpack://BalloonEditor/../ckeditor5-ui/src/dropdown/utils.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/editorui/editorui.css?e51b","webpack://BalloonEditor/../ckeditor5-ui/src/editorui/editoruiview.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/label/label.css?fd5a","webpack://BalloonEditor/../ckeditor5-ui/src/label/labelview.js","webpack://BalloonEditor/../ckeditor5-ui/src/editableui/editableuiview.js","webpack://BalloonEditor/../ckeditor5-ui/src/editableui/inline/inlineeditableuiview.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/formheader/formheader.css?322e","webpack://BalloonEditor/../ckeditor5-ui/src/formheader/formheaderview.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/input/input.css?d15d","webpack://BalloonEditor/../ckeditor5-ui/src/input/inputview.js","webpack://BalloonEditor/../ckeditor5-ui/src/inputtext/inputtextview.js","webpack://BalloonEditor/../ckeditor5-ui/src/inputnumber/inputnumberview.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css?dcc2","webpack://BalloonEditor/../ckeditor5-ui/src/labeledfield/labeledfieldview.js","webpack://BalloonEditor/../ckeditor5-ui/src/labeledfield/utils.js","webpack://BalloonEditor/../ckeditor5-ui/src/notification/notification.js","webpack://BalloonEditor/../ckeditor5-ui/src/model.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/tounit.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/panel/balloonpanel.css?69dc","webpack://BalloonEditor/../ckeditor5-ui/src/panel/balloon/balloonpanelview.js","webpack://BalloonEditor/../ckeditor5-ui/theme/icons/previous-arrow.svg","webpack://BalloonEditor/../ckeditor5-ui/theme/components/panel/balloonrotator.css?580a","webpack://BalloonEditor/../ckeditor5-ui/theme/components/panel/fakepanel.css?9740","webpack://BalloonEditor/../ckeditor5-ui/src/panel/balloon/contextualballoon.js","webpack://BalloonEditor/../ckeditor5-ui/theme/icons/next-arrow.svg","webpack://BalloonEditor/../ckeditor5-ui/theme/components/panel/stickypanel.css?4553","webpack://BalloonEditor/../ckeditor5-ui/src/panel/sticky/stickypanelview.js","webpack://BalloonEditor/../ckeditor5-ui/src/toolbar/balloon/balloontoolbar.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/toolbar/blocktoolbar.css?edd0","webpack://BalloonEditor/../ckeditor5-ui/src/toolbar/block/blockbuttonview.js","webpack://BalloonEditor/../ckeditor5-ui/src/toolbar/block/blocktoolbar.js","webpack://BalloonEditor/../ckeditor5-engine/theme/placeholder.css?e2af","webpack://BalloonEditor/../ckeditor5-engine/src/view/placeholder.js","webpack://BalloonEditor/../ckeditor5-engine/src/model/operation/transform.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/observer/clickobserver.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/observer/mouseobserver.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/upcastwriter.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/styles/utils.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/styles/background.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/styles/border.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/styles/margin.js","webpack://BalloonEditor/../ckeditor5-engine/src/view/styles/padding.js","webpack://BalloonEditor/../ckeditor5-editor-balloon/src/ballooneditorui.js","webpack://BalloonEditor/../ckeditor5-ui/src/toolbar/enabletoolbarkeyboardfocus.js","webpack://BalloonEditor/../ckeditor5-editor-balloon/src/ballooneditoruiview.js","webpack://BalloonEditor/../ckeditor5-editor-balloon/src/ballooneditor.js","webpack://BalloonEditor/../ckeditor5-utils/src/dom/getdatafromelement.js","webpack://BalloonEditor/../ckeditor5-core/src/editor/utils/securesourceelement.js","webpack://BalloonEditor/../ckeditor5-core/src/editor/utils/attachtoform.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/responsive-form/responsiveform.css?643e","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-find-and-replace/theme/findandreplaceform.css?ffac","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-find-and-replace/src/ui/findandreplaceformview.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-find-and-replace/src/findandreplaceui.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-find-and-replace/theme/icons/find-replace.svg","webpack://BalloonEditor/javascript/node_modules/lodash-es/escapeRegExp.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-find-and-replace/src/utils.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-find-and-replace/src/findcommand.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-find-and-replace/src/replacecommand.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-find-and-replace/src/replaceallcommand.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-find-and-replace/src/findnextcommand.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-find-and-replace/src/findpreviouscommand.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-find-and-replace/src/findandreplacestate.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-find-and-replace/theme/findandreplace.css?a571","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-find-and-replace/src/findandreplaceediting.js","webpack://BalloonEditor/../ckeditor5-upload/src/filereader.js","webpack://BalloonEditor/../ckeditor5-upload/src/filerepository.js","webpack://BalloonEditor/../ckeditor5-upload/src/ui/filedialogbuttonview.js","webpack://BalloonEditor/../ckeditor5-adapter-ckfinder/src/utils.js","webpack://BalloonEditor/../ckeditor5-adapter-ckfinder/src/uploadadapter.js","webpack://BalloonEditor/../ckeditor5-typing/src/utils/changebuffer.js","webpack://BalloonEditor/../ckeditor5-typing/src/inputcommand.js","webpack://BalloonEditor/../ckeditor5-typing/src/utils/utils.js","webpack://BalloonEditor/../ckeditor5-utils/src/difftochanges.js","webpack://BalloonEditor/../ckeditor5-typing/src/utils/injectunsafekeystrokeshandling.js","webpack://BalloonEditor/../ckeditor5-typing/src/utils/injecttypingmutationshandling.js","webpack://BalloonEditor/../ckeditor5-typing/src/input.js","webpack://BalloonEditor/../ckeditor5-typing/src/deletecommand.js","webpack://BalloonEditor/../ckeditor5-typing/src/deleteobserver.js","webpack://BalloonEditor/../ckeditor5-typing/src/delete.js","webpack://BalloonEditor/../ckeditor5-typing/src/utils/getlasttextline.js","webpack://BalloonEditor/../ckeditor5-typing/src/textwatcher.js","webpack://BalloonEditor/../ckeditor5-typing/src/twostepcaretmovement.js","webpack://BalloonEditor/../ckeditor5-typing/src/texttransformation.js","webpack://BalloonEditor/../ckeditor5-typing/src/utils/findattributerange.js","webpack://BalloonEditor/../ckeditor5-typing/src/utils/inlinehighlight.js","webpack://BalloonEditor/../ckeditor5-autoformat/src/blockautoformatediting.js","webpack://BalloonEditor/../ckeditor5-autoformat/src/inlineautoformatediting.js","webpack://BalloonEditor/../ckeditor5-autoformat/src/autoformat.js","webpack://BalloonEditor/../ckeditor5-basic-styles/src/attributecommand.js","webpack://BalloonEditor/../ckeditor5-basic-styles/src/bold/boldediting.js","webpack://BalloonEditor/../ckeditor5-basic-styles/theme/icons/bold.svg","webpack://BalloonEditor/../ckeditor5-basic-styles/src/bold/boldui.js","webpack://BalloonEditor/../ckeditor5-basic-styles/src/italic/italicediting.js","webpack://BalloonEditor/../ckeditor5-basic-styles/theme/icons/italic.svg","webpack://BalloonEditor/../ckeditor5-basic-styles/src/italic/italicui.js","webpack://BalloonEditor/../ckeditor5-basic-styles/src/superscript/superscriptediting.js","webpack://BalloonEditor/../ckeditor5-basic-styles/theme/icons/superscript.svg","webpack://BalloonEditor/../ckeditor5-basic-styles/src/superscript/superscriptui.js","webpack://BalloonEditor/../ckeditor5-basic-styles/src/subscript/subscriptediting.js","webpack://BalloonEditor/../ckeditor5-basic-styles/theme/icons/subscript.svg","webpack://BalloonEditor/../ckeditor5-basic-styles/src/subscript/subscriptui.js","webpack://BalloonEditor/../ckeditor5-basic-styles/src/underline/underlineediting.js","webpack://BalloonEditor/../ckeditor5-basic-styles/theme/icons/underline.svg","webpack://BalloonEditor/../ckeditor5-basic-styles/src/underline/underlineui.js","webpack://BalloonEditor/../ckeditor5-basic-styles/src/strikethrough/strikethroughediting.js","webpack://BalloonEditor/../ckeditor5-basic-styles/theme/icons/strikethrough.svg","webpack://BalloonEditor/../ckeditor5-basic-styles/src/strikethrough/strikethroughui.js","webpack://BalloonEditor/../ckeditor5-basic-styles/src/code/codeediting.js","webpack://BalloonEditor/../ckeditor5-basic-styles/theme/code.css?985e","webpack://BalloonEditor/../ckeditor5-basic-styles/src/code/codeui.js","webpack://BalloonEditor/../ckeditor5-basic-styles/theme/icons/code.svg","webpack://BalloonEditor/../ckeditor5-enter/src/utils.js","webpack://BalloonEditor/../ckeditor5-enter/src/entercommand.js","webpack://BalloonEditor/../ckeditor5-enter/src/enterobserver.js","webpack://BalloonEditor/../ckeditor5-enter/src/enter.js","webpack://BalloonEditor/../ckeditor5-enter/src/shiftentercommand.js","webpack://BalloonEditor/../ckeditor5-enter/src/shiftenter.js","webpack://BalloonEditor/../ckeditor5-block-quote/src/blockquotecommand.js","webpack://BalloonEditor/../ckeditor5-block-quote/src/blockquoteediting.js","webpack://BalloonEditor/../ckeditor5-block-quote/theme/blockquote.css?5a6d","webpack://BalloonEditor/../ckeditor5-block-quote/src/blockquoteui.js","webpack://BalloonEditor/../ckeditor5-paragraph/src/paragraphcommand.js","webpack://BalloonEditor/../ckeditor5-paragraph/src/insertparagraphcommand.js","webpack://BalloonEditor/../ckeditor5-paragraph/src/paragraph.js","webpack://BalloonEditor/../ckeditor5-heading/src/headingcommand.js","webpack://BalloonEditor/../ckeditor5-heading/src/headingediting.js","webpack://BalloonEditor/../ckeditor5-heading/src/utils.js","webpack://BalloonEditor/../ckeditor5-heading/theme/heading.css?c486","webpack://BalloonEditor/../ckeditor5-heading/src/headingui.js","webpack://BalloonEditor/../ckeditor5-widget/src/highlightstack.js","webpack://BalloonEditor/../ckeditor5-widget/theme/icons/drag-handle.svg","webpack://BalloonEditor/../ckeditor5-widget/src/utils.js","webpack://BalloonEditor/../ckeditor5-widget/src/widgettypearound/utils.js","webpack://BalloonEditor/../ckeditor5-widget/theme/widgettypearound.css?6f95","webpack://BalloonEditor/../ckeditor5-widget/src/widgettypearound/widgettypearound.js","webpack://BalloonEditor/../ckeditor5-widget/theme/icons/return-arrow.svg","webpack://BalloonEditor/../ckeditor5-widget/src/verticalnavigation.js","webpack://BalloonEditor/../ckeditor5-widget/theme/widget.css?85b1","webpack://BalloonEditor/../ckeditor5-widget/src/widget.js","webpack://BalloonEditor/../ckeditor5-widget/src/widgettoolbarrepository.js","webpack://BalloonEditor/../ckeditor5-widget/src/widgetresize/resizerstate.js","webpack://BalloonEditor/../ckeditor5-widget/src/widgetresize/sizeview.js","webpack://BalloonEditor/../ckeditor5-widget/src/widgetresize/resizer.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/throttle.js","webpack://BalloonEditor/../ckeditor5-widget/theme/widgetresize.css?8599","webpack://BalloonEditor/../ckeditor5-widget/src/widgetresize.js","webpack://BalloonEditor/../ckeditor5-image/src/imagetextalternative/imagetextalternativecommand.js","webpack://BalloonEditor/../ckeditor5-image/src/image/utils.js","webpack://BalloonEditor/../ckeditor5-image/src/imageutils.js","webpack://BalloonEditor/../ckeditor5-image/src/imagetextalternative/imagetextalternativeediting.js","webpack://BalloonEditor/../ckeditor5-image/theme/textalternativeform.css?1540","webpack://BalloonEditor/../ckeditor5-image/src/imagetextalternative/ui/textalternativeformview.js","webpack://BalloonEditor/../ckeditor5-image/src/image/ui/utils.js","webpack://BalloonEditor/../ckeditor5-image/src/imagetextalternative/imagetextalternativeui.js","webpack://BalloonEditor/../ckeditor5-image/src/imagetextalternative.js","webpack://BalloonEditor/../ckeditor5-clipboard/src/datatransfer.js","webpack://BalloonEditor/../ckeditor5-clipboard/src/clipboardobserver.js","webpack://BalloonEditor/../ckeditor5-clipboard/src/utils/viewtoplaintext.js","webpack://BalloonEditor/../ckeditor5-clipboard/src/clipboardpipeline.js","webpack://BalloonEditor/../ckeditor5-clipboard/src/utils/plaintexttohtml.js","webpack://BalloonEditor/../ckeditor5-clipboard/src/utils/normalizeclipboarddata.js","webpack://BalloonEditor/../ckeditor5-clipboard/theme/clipboard.css?ab7a","webpack://BalloonEditor/../ckeditor5-clipboard/src/dragdrop.js","webpack://BalloonEditor/../ckeditor5-clipboard/src/pasteplaintext.js","webpack://BalloonEditor/../ckeditor5-clipboard/src/clipboard.js","webpack://BalloonEditor/../ckeditor5-image/src/image/converters.js","webpack://BalloonEditor/../ckeditor5-image/src/image/imageloadobserver.js","webpack://BalloonEditor/../ckeditor5-image/src/image/insertimagecommand.js","webpack://BalloonEditor/../ckeditor5-image/src/image/imageediting.js","webpack://BalloonEditor/../ckeditor5-image/src/image/imagetypecommand.js","webpack://BalloonEditor/../ckeditor5-image/src/image/imageblockediting.js","webpack://BalloonEditor/../ckeditor5-image/theme/image.css?c23e","webpack://BalloonEditor/../ckeditor5-image/src/imageblock.js","webpack://BalloonEditor/../ckeditor5-image/src/image/imageinlineediting.js","webpack://BalloonEditor/../ckeditor5-image/src/imageinline.js","webpack://BalloonEditor/../ckeditor5-image/src/imagecaption/toggleimagecaptioncommand.js","webpack://BalloonEditor/../ckeditor5-image/src/imagecaption/imagecaptionutils.js","webpack://BalloonEditor/../ckeditor5-image/src/imagecaption/imagecaptionediting.js","webpack://BalloonEditor/../ckeditor5-image/src/imagecaption/imagecaptionui.js","webpack://BalloonEditor/../ckeditor5-image/theme/imagecaption.css?fbd1","webpack://BalloonEditor/../ckeditor5-image/src/imagestyle/imagestylecommand.js","webpack://BalloonEditor/../ckeditor5-image/src/imagestyle/utils.js","webpack://BalloonEditor/../ckeditor5-image/src/imagestyle/converters.js","webpack://BalloonEditor/../ckeditor5-image/src/imagestyle/imagestyleediting.js","webpack://BalloonEditor/../ckeditor5-image/theme/imagestyle.css?bc8e","webpack://BalloonEditor/../ckeditor5-image/src/imagestyle/imagestyleui.js","webpack://BalloonEditor/../ckeditor5-image/src/imageupload/utils.js","webpack://BalloonEditor/../ckeditor5-image/src/imageupload/imageuploadui.js","webpack://BalloonEditor/../ckeditor5-image/theme/imageuploadprogress.css?3fdd","webpack://BalloonEditor/../ckeditor5-image/theme/imageuploadicon.css?e799","webpack://BalloonEditor/../ckeditor5-image/theme/imageuploadloader.css?4493","webpack://BalloonEditor/../ckeditor5-image/src/imageupload/imageuploadprogress.js","webpack://BalloonEditor/../ckeditor5-image/src/imageupload/uploadimagecommand.js","webpack://BalloonEditor/../ckeditor5-image/src/imageupload/imageuploadediting.js","webpack://BalloonEditor/../ckeditor5-image/src/imageresize/resizeimagecommand.js","webpack://BalloonEditor/../ckeditor5-image/src/imageresize/imageresizeediting.js","webpack://BalloonEditor/../ckeditor5-image/src/imageresize/imageresizebuttons.js","webpack://BalloonEditor/../ckeditor5-image/src/imageresize/imageresizehandles.js","webpack://BalloonEditor/../ckeditor5-image/theme/imageresize.css?f537","webpack://BalloonEditor/../ckeditor5-link/src/utils/automaticdecorators.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_castSlice.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_hasUnicode.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_asciiToArray.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_unicodeToArray.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_stringToArray.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/upperFirst.js","webpack://BalloonEditor/javascript/node_modules/lodash-es/_createCaseFirst.js","webpack://BalloonEditor/../ckeditor5-link/src/utils.js","webpack://BalloonEditor/../ckeditor5-link/src/linkcommand.js","webpack://BalloonEditor/../ckeditor5-link/src/unlinkcommand.js","webpack://BalloonEditor/../ckeditor5-link/src/utils/manualdecorator.js","webpack://BalloonEditor/../ckeditor5-link/theme/link.css?2bbb","webpack://BalloonEditor/../ckeditor5-link/src/linkediting.js","webpack://BalloonEditor/../ckeditor5-link/theme/linkform.css?91e4","webpack://BalloonEditor/../ckeditor5-link/src/ui/linkformview.js","webpack://BalloonEditor/../ckeditor5-link/theme/linkactions.css?bbc6","webpack://BalloonEditor/../ckeditor5-link/src/ui/linkactionsview.js","webpack://BalloonEditor/../ckeditor5-link/theme/icons/unlink.svg","webpack://BalloonEditor/../ckeditor5-link/theme/icons/link.svg","webpack://BalloonEditor/../ckeditor5-link/src/linkui.js","webpack://BalloonEditor/../ckeditor5-link/src/autolink.js","webpack://BalloonEditor/../ckeditor5-list/src/list/listcommand.js","webpack://BalloonEditor/../ckeditor5-list/src/list/indentcommand.js","webpack://BalloonEditor/../ckeditor5-list/src/list/utils.js","webpack://BalloonEditor/../ckeditor5-list/src/list/converters.js","webpack://BalloonEditor/../ckeditor5-list/src/list/listediting.js","webpack://BalloonEditor/../ckeditor5-list/theme/icons/numberedlist.svg","webpack://BalloonEditor/../ckeditor5-list/theme/icons/bulletedlist.svg","webpack://BalloonEditor/../ckeditor5-list/src/list/listui.js","webpack://BalloonEditor/../ckeditor5-list/src/listproperties/liststylecommand.js","webpack://BalloonEditor/../ckeditor5-list/src/listproperties/listreversedcommand.js","webpack://BalloonEditor/../ckeditor5-list/src/listproperties/liststartcommand.js","webpack://BalloonEditor/../ckeditor5-list/src/listproperties/listpropertiesediting.js","webpack://BalloonEditor/../ckeditor5-list/theme/collapsible.css?bc89","webpack://BalloonEditor/../ckeditor5-list/src/listproperties/ui/collapsibleview.js","webpack://BalloonEditor/../ckeditor5-list/theme/listproperties.css?617f","webpack://BalloonEditor/../ckeditor5-list/src/listproperties/ui/listpropertiesview.js","webpack://BalloonEditor/../ckeditor5-list/theme/liststyles.css?4e4d","webpack://BalloonEditor/../ckeditor5-list/src/listproperties/listpropertiesui.js","webpack://BalloonEditor/../ckeditor5-list/theme/icons/liststyledisc.svg","webpack://BalloonEditor/../ckeditor5-list/theme/icons/liststylecircle.svg","webpack://BalloonEditor/../ckeditor5-list/theme/icons/liststylesquare.svg","webpack://BalloonEditor/../ckeditor5-list/theme/icons/liststyledecimal.svg","webpack://BalloonEditor/../ckeditor5-list/theme/icons/liststyledecimalleadingzero.svg","webpack://BalloonEditor/../ckeditor5-list/theme/icons/liststylelowerroman.svg","webpack://BalloonEditor/../ckeditor5-list/theme/icons/liststyleupperroman.svg","webpack://BalloonEditor/../ckeditor5-list/theme/icons/liststylelowerlatin.svg","webpack://BalloonEditor/../ckeditor5-list/theme/icons/liststyleupperlatin.svg","webpack://BalloonEditor/../ckeditor5-list/src/listproperties.js","webpack://BalloonEditor/../ckeditor5-list/src/todolist/checktodolistcommand.js","webpack://BalloonEditor/../ckeditor5-list/src/todolist/todolistconverters.js","webpack://BalloonEditor/../ckeditor5-list/src/todolist/todolistediting.js","webpack://BalloonEditor/../ckeditor5-list/src/todolist/todolistui.js","webpack://BalloonEditor/../ckeditor5-list/theme/icons/todolist.svg","webpack://BalloonEditor/../ckeditor5-list/theme/todolist.css?b9a9","webpack://BalloonEditor/../ckeditor5-paste-from-office/src/filters/list.js","webpack://BalloonEditor/../ckeditor5-paste-from-office/src/normalizers/googledocsnormalizer.js","webpack://BalloonEditor/../ckeditor5-paste-from-office/src/filters/removeboldwrapper.js","webpack://BalloonEditor/../ckeditor5-paste-from-office/src/filters/image.js","webpack://BalloonEditor/../ckeditor5-paste-from-office/src/normalizers/mswordnormalizer.js","webpack://BalloonEditor/../ckeditor5-paste-from-office/src/filters/space.js","webpack://BalloonEditor/../ckeditor5-paste-from-office/src/filters/parse.js","webpack://BalloonEditor/../ckeditor5-table/src/utils/common.js","webpack://BalloonEditor/../ckeditor5-table/src/converters/upcasttable.js","webpack://BalloonEditor/../ckeditor5-table/src/tablewalker.js","webpack://BalloonEditor/../ckeditor5-table/src/converters/downcast.js","webpack://BalloonEditor/../ckeditor5-table/src/commands/inserttablecommand.js","webpack://BalloonEditor/../ckeditor5-table/src/commands/insertrowcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/commands/insertcolumncommand.js","webpack://BalloonEditor/../ckeditor5-table/src/commands/splitcellcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/utils/structure.js","webpack://BalloonEditor/../ckeditor5-table/src/commands/mergecellcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/commands/removerowcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/commands/removecolumncommand.js","webpack://BalloonEditor/../ckeditor5-table/src/commands/setheaderrowcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/commands/setheadercolumncommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tableutils.js","webpack://BalloonEditor/../ckeditor5-table/src/commands/mergecellscommand.js","webpack://BalloonEditor/../ckeditor5-table/src/commands/selectrowcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/commands/selectcolumncommand.js","webpack://BalloonEditor/../ckeditor5-table/src/converters/table-layout-post-fixer.js","webpack://BalloonEditor/../ckeditor5-table/src/converters/table-cell-paragraph-post-fixer.js","webpack://BalloonEditor/../ckeditor5-table/src/converters/table-cell-refresh-handler.js","webpack://BalloonEditor/../ckeditor5-table/theme/tableediting.css?f65e","webpack://BalloonEditor/../ckeditor5-table/src/tableediting.js","webpack://BalloonEditor/../ckeditor5-table/src/converters/table-headings-refresh-handler.js","webpack://BalloonEditor/../ckeditor5-table/theme/inserttable.css?466f","webpack://BalloonEditor/../ckeditor5-table/src/ui/inserttableview.js","webpack://BalloonEditor/../ckeditor5-table/src/tableui.js","webpack://BalloonEditor/../ckeditor5-table/theme/icons/table.svg","webpack://BalloonEditor/../ckeditor5-table/theme/icons/table-column.svg","webpack://BalloonEditor/../ckeditor5-table/theme/icons/table-row.svg","webpack://BalloonEditor/../ckeditor5-table/theme/icons/table-merge-cell.svg","webpack://BalloonEditor/../ckeditor5-table/theme/tableselection.css?ee02","webpack://BalloonEditor/../ckeditor5-table/src/tableselection.js","webpack://BalloonEditor/../ckeditor5-table/src/tableclipboard.js","webpack://BalloonEditor/../ckeditor5-table/src/tablekeyboard.js","webpack://BalloonEditor/../ckeditor5-table/src/tablemouse/mouseeventsobserver.js","webpack://BalloonEditor/../ckeditor5-table/src/tablemouse.js","webpack://BalloonEditor/../ckeditor5-table/theme/table.css?fded","webpack://BalloonEditor/../ckeditor5-table/src/utils/ui/widget.js","webpack://BalloonEditor/../ckeditor5-table/src/converters/tableproperties.js","webpack://BalloonEditor/../ckeditor5-table/src/tableproperties/commands/tablepropertycommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tableproperties/commands/tablebackgroundcolorcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/utils/table-properties.js","webpack://BalloonEditor/../ckeditor5-table/src/tableproperties/commands/tablebordercolorcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tableproperties/commands/tableborderstylecommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tableproperties/commands/tableborderwidthcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tableproperties/commands/tablewidthcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tableproperties/commands/tableheightcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tableproperties/commands/tablealignmentcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tableproperties/tablepropertiesediting.js","webpack://BalloonEditor/../ckeditor5-table/theme/colorinput.css?2edd","webpack://BalloonEditor/../ckeditor5-table/src/ui/colorinputview.js","webpack://BalloonEditor/../ckeditor5-table/src/utils/ui/table-properties.js","webpack://BalloonEditor/../ckeditor5-table/theme/formrow.css?813a","webpack://BalloonEditor/../ckeditor5-table/src/ui/formrowview.js","webpack://BalloonEditor/../ckeditor5-table/theme/form.css?6b23","webpack://BalloonEditor/../ckeditor5-table/theme/tableform.css?6102","webpack://BalloonEditor/../ckeditor5-table/theme/tableproperties.css?fbdb","webpack://BalloonEditor/../ckeditor5-table/src/tableproperties/ui/tablepropertiesview.js","webpack://BalloonEditor/../ckeditor5-table/theme/icons/table-properties.svg","webpack://BalloonEditor/../ckeditor5-table/src/utils/ui/contextualballoon.js","webpack://BalloonEditor/../ckeditor5-table/src/tableproperties/tablepropertiesui.js","webpack://BalloonEditor/../ckeditor5-table/theme/tablecellproperties.css?e7e9","webpack://BalloonEditor/../ckeditor5-table/src/tablecellproperties/ui/tablecellpropertiesview.js","webpack://BalloonEditor/../ckeditor5-table/theme/icons/table-cell-properties.svg","webpack://BalloonEditor/../ckeditor5-table/src/tablecellproperties/tablecellpropertiesui.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecellproperties/commands/tablecellpropertycommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecellproperties/commands/tablecellpaddingcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecellproperties/commands/tablecellwidthcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecellproperties/commands/tablecellheightcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecellproperties/commands/tablecellbackgroundcolorcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecellproperties/commands/tablecellverticalalignmentcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecellproperties/commands/tablecellhorizontalalignmentcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecellproperties/commands/tablecellborderstylecommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecellproperties/commands/tablecellbordercolorcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecellproperties/commands/tablecellborderwidthcommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecellproperties/tablecellpropertiesediting.js","webpack://BalloonEditor/../ckeditor5-table/src/converters/table-caption-post-fixer.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecaption/utils.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecaption/toggletablecaptioncommand.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecaption/tablecaptionediting.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecaption/tablecaptionui.js","webpack://BalloonEditor/../ckeditor5-table/theme/tablecaption.css?327b","webpack://BalloonEditor/../ckeditor5-heading/theme/icons/heading1.svg","webpack://BalloonEditor/../ckeditor5-heading/src/headingbuttonsui.js","webpack://BalloonEditor/../ckeditor5-heading/theme/icons/heading2.svg","webpack://BalloonEditor/../ckeditor5-heading/theme/icons/heading3.svg","webpack://BalloonEditor/../ckeditor5-heading/theme/icons/heading4.svg","webpack://BalloonEditor/../ckeditor5-heading/theme/icons/heading5.svg","webpack://BalloonEditor/../ckeditor5-heading/theme/icons/heading6.svg","webpack://BalloonEditor/../ckeditor5-font/src/fontcommand.js","webpack://BalloonEditor/../ckeditor5-font/src/documentcolorcollection.js","webpack://BalloonEditor/../ckeditor5-font/theme/fontcolor.css?7321","webpack://BalloonEditor/../ckeditor5-font/src/ui/colortableview.js","webpack://BalloonEditor/../ckeditor5-font/src/utils.js","webpack://BalloonEditor/../ckeditor5-font/src/fontfamily/fontfamilycommand.js","webpack://BalloonEditor/../ckeditor5-font/src/fontfamily/utils.js","webpack://BalloonEditor/../ckeditor5-font/src/fontfamily/fontfamilyediting.js","webpack://BalloonEditor/../ckeditor5-font/src/fontfamily/fontfamilyui.js","webpack://BalloonEditor/../ckeditor5-font/theme/icons/font-family.svg","webpack://BalloonEditor/../ckeditor5-font/src/fontfamily.js","webpack://BalloonEditor/../ckeditor5-font/src/fontsize/fontsizecommand.js","webpack://BalloonEditor/../ckeditor5-font/src/fontsize/utils.js","webpack://BalloonEditor/../ckeditor5-font/src/fontsize/fontsizeediting.js","webpack://BalloonEditor/../ckeditor5-font/theme/fontsize.css?2aea","webpack://BalloonEditor/../ckeditor5-font/src/fontsize/fontsizeui.js","webpack://BalloonEditor/../ckeditor5-font/theme/icons/font-size.svg","webpack://BalloonEditor/../ckeditor5-font/src/fontsize.js","webpack://BalloonEditor/../ckeditor5-font/src/fontcolor/fontcolorcommand.js","webpack://BalloonEditor/../ckeditor5-font/src/fontcolor/fontcolorediting.js","webpack://BalloonEditor/../ckeditor5-font/src/ui/colorui.js","webpack://BalloonEditor/../ckeditor5-font/src/fontcolor/fontcolorui.js","webpack://BalloonEditor/../ckeditor5-font/theme/icons/font-color.svg","webpack://BalloonEditor/../ckeditor5-font/src/fontcolor.js","webpack://BalloonEditor/../ckeditor5-font/src/fontbackgroundcolor/fontbackgroundcolorcommand.js","webpack://BalloonEditor/../ckeditor5-font/src/fontbackgroundcolor/fontbackgroundcolorediting.js","webpack://BalloonEditor/../ckeditor5-font/src/fontbackgroundcolor/fontbackgroundcolorui.js","webpack://BalloonEditor/../ckeditor5-font/theme/icons/font-background.svg","webpack://BalloonEditor/../ckeditor5-font/src/fontbackgroundcolor.js","webpack://BalloonEditor/../ckeditor5-code-block/src/utils.js","webpack://BalloonEditor/../ckeditor5-code-block/src/codeblockcommand.js","webpack://BalloonEditor/../ckeditor5-code-block/src/indentcodeblockcommand.js","webpack://BalloonEditor/../ckeditor5-code-block/src/outdentcodeblockcommand.js","webpack://BalloonEditor/../ckeditor5-code-block/src/converters.js","webpack://BalloonEditor/../ckeditor5-code-block/src/codeblockediting.js","webpack://BalloonEditor/../ckeditor5-code-block/theme/codeblock.css?3d7d","webpack://BalloonEditor/../ckeditor5-code-block/src/codeblockui.js","webpack://BalloonEditor/../ckeditor5-code-block/theme/icons/codeblock.svg","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-mention/src/mentioncommand.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-mention/src/mentionediting.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-mention/theme/mentionui.css?f535","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-mention/src/ui/mentionsview.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-mention/src/ui/domwrapperview.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-mention/src/ui/mentionlistitemview.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-mention/src/mentionui.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-mention/theme/mention.css?a68b","webpack://BalloonEditor/../ckeditor5-indent/src/indentediting.js","webpack://BalloonEditor/../ckeditor5-indent/theme/icons/indent.svg","webpack://BalloonEditor/../ckeditor5-indent/theme/icons/outdent.svg","webpack://BalloonEditor/../ckeditor5-indent/src/indentui.js","webpack://BalloonEditor/../ckeditor5-indent/src/indentblockcommand.js","webpack://BalloonEditor/../ckeditor5-indent/src/indentcommandbehavior/indentusingoffset.js","webpack://BalloonEditor/../ckeditor5-indent/src/indentcommandbehavior/indentusingclasses.js","webpack://BalloonEditor/../ckeditor5-indent/src/indentblock.js","webpack://BalloonEditor/../ckeditor5-select-all/src/selectallcommand.js","webpack://BalloonEditor/../ckeditor5-select-all/src/selectallediting.js","webpack://BalloonEditor/../ckeditor5-select-all/src/selectallui.js","webpack://BalloonEditor/../ckeditor5-select-all/theme/icons/select-all.svg","webpack://BalloonEditor/../ckeditor5-select-all/src/selectall.js","webpack://BalloonEditor/../ckeditor5-horizontal-line/src/horizontallinecommand.js","webpack://BalloonEditor/../ckeditor5-horizontal-line/theme/horizontalline.css?12f5","webpack://BalloonEditor/../ckeditor5-horizontal-line/src/horizontallineediting.js","webpack://BalloonEditor/../ckeditor5-horizontal-line/src/horizontallineui.js","webpack://BalloonEditor/../ckeditor5-horizontal-line/theme/icons/horizontalline.svg","webpack://BalloonEditor/../ckeditor5-undo/src/basecommand.js","webpack://BalloonEditor/../ckeditor5-undo/src/undocommand.js","webpack://BalloonEditor/../ckeditor5-undo/src/redocommand.js","webpack://BalloonEditor/../ckeditor5-undo/src/undoediting.js","webpack://BalloonEditor/../ckeditor5-undo/theme/icons/undo.svg","webpack://BalloonEditor/../ckeditor5-undo/theme/icons/redo.svg","webpack://BalloonEditor/../ckeditor5-undo/src/undoui.js","webpack://BalloonEditor/../ckeditor5-undo/src/undo.js","webpack://BalloonEditor/../ckeditor5-remove-format/theme/icons/remove-format.svg","webpack://BalloonEditor/../ckeditor5-remove-format/src/removeformatui.js","webpack://BalloonEditor/../ckeditor5-remove-format/src/removeformatcommand.js","webpack://BalloonEditor/../ckeditor5-remove-format/src/removeformatediting.js","webpack://BalloonEditor/./src/mention_customization.js","webpack://BalloonEditor/./src/uploadimage.js","webpack://BalloonEditor/./src/includenote.js","webpack://BalloonEditor/./src/icons/note.svg","webpack://BalloonEditor/./src/referencelink.js","webpack://BalloonEditor/../node_modules/ckeditor5-math/src/utils.js","webpack://BalloonEditor/../ckeditor5-ui/theme/components/labeledinput/labeledinput.css?c390","webpack://BalloonEditor/../ckeditor5-ui/src/labeledinput/labeledinputview.js","webpack://BalloonEditor/../node_modules/ckeditor5-math/src/ui/mathview.js","webpack://BalloonEditor/../node_modules/style-loader/dist/node_modules/css-loader/dist/node_modules/postcss-loader/dist/node_modules/ckeditor5-math/theme/mathform.css","webpack://BalloonEditor/../node_modules/ckeditor5-math/src/ui/mainformview.js","webpack://BalloonEditor/../node_modules/ckeditor5-math/src/mathcommand.js","webpack://BalloonEditor/../node_modules/ckeditor5-math/src/mathediting.js","webpack://BalloonEditor/../node_modules/raw-loader/dist/node_modules/ckeditor5-math/theme/icons/math.svg","webpack://BalloonEditor/../node_modules/ckeditor5-math/src/mathui.js","webpack://BalloonEditor/../node_modules/ckeditor5-math/src/automath.js","webpack://BalloonEditor/../node_modules/ckeditor5-math/src/math.js","webpack://BalloonEditor/./src/ckeditor.js","webpack://BalloonEditor/../ckeditor5-typing/src/typing.js","webpack://BalloonEditor/../ckeditor5-basic-styles/src/bold.js","webpack://BalloonEditor/../ckeditor5-basic-styles/src/italic.js","webpack://BalloonEditor/../ckeditor5-basic-styles/src/underline.js","webpack://BalloonEditor/../ckeditor5-basic-styles/src/strikethrough.js","webpack://BalloonEditor/../ckeditor5-basic-styles/src/code.js","webpack://BalloonEditor/../ckeditor5-basic-styles/src/superscript.js","webpack://BalloonEditor/../ckeditor5-basic-styles/src/subscript.js","webpack://BalloonEditor/../ckeditor5-block-quote/src/blockquote.js","webpack://BalloonEditor/../ckeditor5-heading/src/heading.js","webpack://BalloonEditor/../ckeditor5-image/src/image.js","webpack://BalloonEditor/../ckeditor5-image/src/imagecaption.js","webpack://BalloonEditor/../ckeditor5-image/src/imagestyle.js","webpack://BalloonEditor/../ckeditor5-image/src/imagetoolbar.js","webpack://BalloonEditor/../ckeditor5-image/src/imageupload.js","webpack://BalloonEditor/../ckeditor5-image/src/imageresize.js","webpack://BalloonEditor/../ckeditor5-link/src/link.js","webpack://BalloonEditor/../ckeditor5-list/src/list.js","webpack://BalloonEditor/../ckeditor5-list/src/liststyle.js","webpack://BalloonEditor/../ckeditor5-list/src/todolist.js","webpack://BalloonEditor/../ckeditor5-paste-from-office/src/pastefromoffice.js","webpack://BalloonEditor/../ckeditor5-table/src/table.js","webpack://BalloonEditor/../ckeditor5-table/src/tabletoolbar.js","webpack://BalloonEditor/../ckeditor5-table/src/tableproperties.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecellproperties.js","webpack://BalloonEditor/../ckeditor5-table/src/tablecaption.js","webpack://BalloonEditor/../ckeditor5-indent/src/indent.js","webpack://BalloonEditor/../ckeditor5-paragraph/src/paragraphbuttonui.js","webpack://BalloonEditor/../ckeditor5-paragraph/theme/icons/paragraph.svg","webpack://BalloonEditor/./src/internallink.js","webpack://BalloonEditor/./src/icons/trilium.svg","webpack://BalloonEditor/./src/markdownimport.js","webpack://BalloonEditor/./src/icons/markdown-mark.svg","webpack://BalloonEditor/./src/cuttonote.js","webpack://BalloonEditor/./src/icons/scissors.svg","webpack://BalloonEditor/../ckeditor5-font/src/font.js","webpack://BalloonEditor/../ckeditor5-code-block/src/codeblock.js","webpack://BalloonEditor/../ckeditor5-horizontal-line/src/horizontalline.js","webpack://BalloonEditor/../ckeditor5-remove-format/src/removeformat.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-find-and-replace/src/findandreplace.js","webpack://BalloonEditor/./node_modules/@ckeditor/ckeditor5-mention/src/mention.js","webpack://BalloonEditor/./src/indent_block_shortcut.js","webpack://BalloonEditor/./src/remove_format_links.js","webpack://BalloonEditor/../node_modules/ckeditor5-math/src/autoformatmath.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"BalloonEditor\"] = factory();\n\telse\n\t\troot[\"BalloonEditor\"] = factory();\n})(self, function() {\nreturn ","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-math-form{display:flex;align-items:flex-start;flex-direction:row;flex-wrap:nowrap}@media screen and (max-width:600px){.ck.ck-math-form{flex-wrap:wrap}.ck.ck-math-form .ck-math-view,.ck.ck-math-form .ck-math-view .ck-label,.ck.ck-math-form .ck-math-view .ck-labeled-input{flex-basis:100%}.ck.ck-math-form .ck-button{flex-basis:50%}}.ck-math-tex.ck-placeholder:before{display:none!important}.ck.ck-toolbar-container{z-index:calc(var(--ck-z-modal) + 2)}.ck.ck-math-form{padding:var(--ck-spacing-standard)}.ck.ck-math-form:focus{outline:none}[dir=ltr] .ck.ck-math-form>:not(:first-child),[dir=rtl] .ck.ck-math-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-math-form{padding:0}.ck.ck-math-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-math-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-math-form .ck-label,.ck.ck-math-form .ck-math-view .ck-button,.ck.ck-math-form .ck-math-view .ck.ck-math-preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-math-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-math-form>.ck-button{margin-left:0}[dir=ltr] .ck.ck-math-form>.ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-math-form>.ck-button{margin-left:0}[dir=rtl] .ck.ck-math-form>.ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../../node_modules/ckeditor5-math/theme/mathform.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-math/mathform.css\",\"webpack://./../ckeditor5-ui/theme/mixins/_rwd.css\"],\"names\":[],\"mappings\":\"AAAA,iBACC,YAAa,CACb,sBAAuB,CACvB,kBAAmB,CACnB,gBAqBD,CAnBC,oCAND,iBAOE,cAkBF,CATG,yHACC,eACD,CAGD,4BACC,cACD,CACD,CAGD,mCACC,sBACD,CAEA,yBACC,mCACD,CC9BA,iBACI,kCAsEJ,CApEI,uBAEF,YACD,CASC,2FACC,sCACD,CCdD,oCDHD,iBAqBE,SAkDF,CAhDE,mCACC,8DAMD,CAJC,kDACC,WAAY,CACZ,UACD,CAYA,wHACC,8DACD,CAGD,4BACC,kCAAmC,CACnC,qCAAsC,CAEtC,eAAgB,CAChB,QAAS,CACT,gDAiBD,CAvBA,sCASE,aAcF,CAZE,oDACC,kDACD,CAbF,sCAiBE,aAMF,CAJE,mDACC,kDACD,CC9DH\",\"sourcesContent\":[\".ck.ck-math-form {\\n\\tdisplay: flex;\\n\\talign-items: flex-start;\\n\\tflex-direction: row;\\n\\tflex-wrap: nowrap;\\n\\n\\t@media screen and (max-width: 600px) {\\n\\t\\tflex-wrap: wrap;\\n\\n\\t\\t& .ck-math-view {\\n\\t\\t\\tflex-basis: 100%;\\n\\n\\t\\t\\t& .ck-labeled-input {\\n\\t\\t\\t\\tflex-basis: 100%;\\n\\t\\t\\t}\\n\\n\\t\\t\\t& .ck-label {\\n\\t\\t\\t\\tflex-basis: 100%;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t& .ck-button {\\n\\t\\t\\tflex-basis: 50%;\\n\\t\\t}\\n\\t}\\n}\\n\\n.ck-math-tex.ck-placeholder::before {\\n\\tdisplay: none !important;\\n}\\n\\n.ck.ck-toolbar-container {\\n\\tz-index: calc(var(--ck-z-modal) + 2);\\n}\\n\",\"@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css\\\";\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_dir.css\\\";\\n\\n.ck.ck-math-form {\\n padding: var(--ck-spacing-standard);\\n\\n &:focus {\\n\\t\\t/* https://github.com/ckeditor/ckeditor5-link/issues/90 */\\n\\t\\toutline: none;\\n\\t}\\n\\n @mixin ck-dir ltr {\\n\\t\\t& > :not(:first-child) {\\n\\t\\t\\tmargin-left: var(--ck-spacing-standard);\\n\\t\\t}\\n\\t}\\n\\n\\t@mixin ck-dir rtl {\\n\\t\\t& > :not(:last-child) {\\n\\t\\t\\tmargin-left: var(--ck-spacing-standard);\\n\\t\\t}\\n\\t}\\n\\n\\t@mixin ck-media-phone {\\n\\t\\tpadding: 0;\\n\\n\\t\\t& .ck-labeled-input {\\n\\t\\t\\tmargin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\\n\\n\\t\\t\\t& .ck-input-text {\\n\\t\\t\\t\\tmin-width: 0;\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n & .ck-label {\\n margin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\\n }\\n\\n\\t\\t& .ck-math-view {\\n\\t\\t\\t& .ck-button {\\n\\t\\t\\t\\tmargin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\\n\\t\\t\\t}\\n\\n\\t\\t\\t& .ck.ck-math-preview {\\n\\t\\t\\t\\tmargin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t& > .ck-button {\\n\\t\\t\\tpadding: var(--ck-spacing-standard);\\n\\t\\t\\tmargin-top: var(--ck-spacing-standard);\\n\\n\\t\\t\\tborder-radius: 0;\\n\\t\\t\\tborder: 0;\\n\\t\\t\\tborder-top: 1px solid var(--ck-color-base-border);\\n\\n\\t\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\t\\tmargin-left: 0;\\n\\n\\t\\t\\t\\t&:first-of-type {\\n\\t\\t\\t\\t\\tborder-right: 1px solid var(--ck-color-base-border);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\t\\tmargin-left: 0;\\n\\n\\t\\t\\t\\t&:last-of-type {\\n\\t\\t\\t\\t\\tborder-right: 1px solid var(--ck-color-base-border);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@define-mixin ck-media-phone {\\n\\t@media screen and (max-width: 600px) {\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck-content code{background-color:hsla(0,0%,78%,.3);padding:.15em;border-radius:2px}.ck.ck-editor__editable .ck-code_selected{background-color:hsla(0,0%,78%,.5)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-basic-styles/theme/code.css\"],\"names\":[],\"mappings\":\"AAKA,iBACC,kCAAuC,CACvC,aAAc,CACd,iBACD,CAEA,0CACC,kCACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck-content code {\\n\\tbackground-color: hsla(0, 0%, 78%, 0.3);\\n\\tpadding: .15em;\\n\\tborder-radius: 2px;\\n}\\n\\n.ck.ck-editor__editable .ck-code_selected {\\n\\tbackground-color: hsla(0, 0%, 78%, 0.5);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck-content blockquote{overflow:hidden;padding-right:1.5em;padding-left:1.5em;margin-left:0;margin-right:0;font-style:italic;border-left:5px solid #ccc}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-block-quote/theme/blockquote.css\"],\"names\":[],\"mappings\":\"AAKA,uBAEC,eAAgB,CAGhB,mBAAoB,CACpB,kBAAmB,CAEnB,aAAc,CACd,cAAe,CACf,iBAAkB,CAClB,0BACD,CAEA,gCACC,aAAc,CACd,2BACD\",\"sourcesContent\":[\"/**\\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck-content blockquote {\\n\\t/* See #12 */\\n\\toverflow: hidden;\\n\\n\\t/* https://github.com/ckeditor/ckeditor5-block-quote/issues/15 */\\n\\tpadding-right: 1.5em;\\n\\tpadding-left: 1.5em;\\n\\n\\tmargin-left: 0;\\n\\tmargin-right: 0;\\n\\tfont-style: italic;\\n\\tborder-left: solid 5px hsl(0, 0%, 80%);\\n}\\n\\n.ck-content[dir=\\\"rtl\\\"] blockquote {\\n\\tborder-left: 0;\\n\\tborder-right: solid 5px hsl(0, 0%, 80%);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck-find-result{background:#ff0;color:var(--ck-color-text)}.ck-find-result_selected{background:#ff9633}\", \"\",{\"version\":3,\"sources\":[\"webpack://./node_modules/@ckeditor/ckeditor5-find-and-replace/theme/findandreplace.css\"],\"names\":[],\"mappings\":\"AAKA,gBACC,eAA8B,CAC9B,0BACD,CAEA,yBACC,kBACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck-find-result {\\n\\tbackground: hsl(60, 100%, 50%);\\n\\tcolor: var(--ck-color-text);\\n}\\n\\n.ck-find-result_selected {\\n\\tbackground: hsl(29, 100%, 60%);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-find-and-replace-form{max-width:100%}.ck.ck-find-and-replace-form fieldset{display:flex}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{position:absolute}.ck.ck-find-and-replace-form{width:400px}.ck.ck-find-and-replace-form:focus{outline:none}.ck.ck-find-and-replace-form fieldset{flex-direction:row;flex-wrap:nowrap;align-items:center;align-content:stretch;padding:var(--ck-spacing-large);border:0;margin:0}.ck.ck-find-and-replace-form fieldset>.ck-button{flex:0 0 auto}[dir=ltr] .ck.ck-find-and-replace-form fieldset>*+*{margin-left:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-find-and-replace-form fieldset>*+*{margin-right:var(--ck-spacing-standard)}.ck.ck-find-and-replace-form fieldset .ck-labeled-field-view{flex:1 1 auto}.ck.ck-find-and-replace-form fieldset .ck-labeled-field-view .ck-input{width:100%;min-width:50px}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find{align-items:flex-start}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-find{font-weight:700}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-find .ck-button__label{padding-left:var(--ck-spacing-large);padding-right:var(--ck-spacing-large)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-prev>.ck-icon{transform:rotate(90deg)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button-next>.ck-icon{transform:rotate(-90deg)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{top:50%;transform:translateY(-50%)}[dir=ltr] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{left:var(--ck-spacing-standard)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-results-counter{color:var(--ck-color-base-border)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace{flex-wrap:wrap;justify-content:flex-end;margin-top:calc(var(--ck-spacing-large)*-1)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-labeled-field-view{margin-bottom:var(--ck-spacing-large)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-options-dropdown{margin-right:auto;margin-left:0}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-labeled-field-view,.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>.ck-labeled-field-view .ck-input{width:100%}@media screen and (max-width:600px){.ck.ck-find-and-replace-form{width:300px}.ck.ck-find-and-replace-form fieldset{flex-wrap:wrap}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find .ck-labeled-field-view{flex:1 0 auto;width:100%;margin-bottom:var(--ck-spacing-standard)}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button{text-align:center}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type{flex:1 1 auto}[dir=ltr] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type{margin-left:0}[dir=rtl] .ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type{margin-right:0}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__find>.ck-button:first-of-type .ck-button__label{width:100%;text-align:center}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>:not(.ck-labeled-field-view){flex:1 1 auto}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>:not(.ck-labeled-field-view).ck-dropdown{flex-grow:0}.ck.ck-find-and-replace-form fieldset.ck-find-and-replace-form__replace>:not(.ck-labeled-field-view).ck-button>.ck-button__label{width:100%;text-align:center}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./node_modules/@ckeditor/ckeditor5-find-and-replace/theme/findandreplaceform.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-find-and-replace/findandreplaceform.css\",\"webpack://./../ckeditor5-ui/theme/mixins/_rwd.css\"],\"names\":[],\"mappings\":\"AAKA,6BACC,cAUD,CARC,sCACC,YAMD,CAHC,yFACC,iBACD,CCNF,6BACC,WAyGD,CAnGC,mCACC,YACD,CAEA,sCACC,kBAAmB,CACnB,gBAAiB,CACjB,kBAAmB,CACnB,qBAAsB,CAEtB,+BAAgC,CAChC,QAAS,CACT,QAsFD,CApFC,iDACC,aACD,CAGC,oDACC,sCACD,CAIA,oDACC,uCACD,CAGD,6DACC,aAMD,CAJC,uEACC,UAAW,CACX,cACD,CAID,qEAEC,sBAkCD,CAhCC,qFACC,eAOD,CAJC,uGACC,oCAAqC,CACrC,qCACD,CAGD,8FACC,uBACD,CAEA,8FACC,wBACD,CAEA,yFACC,OAAQ,CACR,0BAWD,CAbA,mGAKE,gCAQF,CAbA,mGASE,+BAIF,CAbA,yFAYC,iCACD,CAID,wEACC,cAAe,CACf,wBAAyB,CACzB,2CAeD,CAbC,+FACC,qCACD,CAEA,6FACC,iBAAkB,CAClB,aACD,CAEA,wMAEC,UACD,CCzGF,oCD+GA,6BACC,WAiDD,CA/CC,sCACC,cA6CD,CAzCE,4FACC,aAAc,CACd,UAAW,CACX,wCACD,CAEA,gFACC,iBAkBD,CAhBC,8FACC,aAcD,CAfA,wGAIE,aAWF,CAfA,wGAQE,cAOF,CAJC,gHACC,UAAW,CACX,iBACD,CAMH,qGACC,aAUD,CARC,iHACC,WACD,CAEA,iIACC,UAAW,CACX,iBACD,CC5JH\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-find-and-replace-form {\\n\\tmax-width: 100%;\\n\\n\\t& fieldset {\\n\\t\\tdisplay: flex;\\n\\n\\t\\t/* The find fieldset */\\n\\t\\t&.ck-find-and-replace-form__find .ck-results-counter {\\n\\t\\t\\tposition: absolute;\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css\\\";\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_dir.css\\\";\\n\\n.ck.ck-find-and-replace-form {\\n\\twidth: 400px;\\n\\n\\t/*\\n\\t * The <form> needs tabindex=\\\"-1\\\" for proper Esc handling after being clicked\\n\\t * but the side effect is that this creates a nasty focus outline in some browsers.\\n\\t */\\n\\t&:focus {\\n\\t\\toutline: none;\\n\\t}\\n\\n\\t& fieldset {\\n\\t\\tflex-direction: row;\\n\\t\\tflex-wrap: nowrap;\\n\\t\\talign-items: center;\\n\\t\\talign-content: stretch;\\n\\n\\t\\tpadding: var(--ck-spacing-large);\\n\\t\\tborder: 0;\\n\\t\\tmargin: 0;\\n\\n\\t\\t& > .ck-button {\\n\\t\\t\\tflex: 0 0 auto;\\n\\t\\t}\\n\\n\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\t& > * + * {\\n\\t\\t\\t\\tmargin-left: var(--ck-spacing-standard);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\t& > * + * {\\n\\t\\t\\t\\tmargin-right: var(--ck-spacing-standard);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t& .ck-labeled-field-view {\\n\\t\\t\\tflex: 1 1 auto;\\n\\n\\t\\t\\t& .ck-input {\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\tmin-width: 50px;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t/* The find fieldset */\\n\\t\\t&.ck-find-and-replace-form__find {\\n\\t\\t\\t/* To display all controls in line when there's an error under the input */\\n\\t\\t\\talign-items: flex-start;\\n\\n\\t\\t\\t& > .ck-button-find {\\n\\t\\t\\t\\tfont-weight: bold;\\n\\n\\t\\t\\t\\t/* Beef the find button up a little. It's the main action button in the form */\\n\\t\\t\\t\\t& .ck-button__label {\\n\\t\\t\\t\\t\\tpadding-left: var(--ck-spacing-large);\\n\\t\\t\\t\\t\\tpadding-right: var(--ck-spacing-large);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t& > .ck-button-prev > .ck-icon {\\n\\t\\t\\t\\ttransform: rotate(90deg);\\n\\t\\t\\t}\\n\\n\\t\\t\\t& > .ck-button-next > .ck-icon {\\n\\t\\t\\t\\ttransform: rotate(-90deg);\\n\\t\\t\\t}\\n\\n\\t\\t\\t& .ck-results-counter {\\n\\t\\t\\t\\ttop: 50%;\\n\\t\\t\\t\\ttransform: translateY(-50%);\\n\\n\\t\\t\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\t\\t\\tright: var(--ck-spacing-standard);\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\t\\t\\tleft: var(--ck-spacing-standard);\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tcolor: var(--ck-color-base-border);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t/* The replace fieldset */\\n\\t\\t&.ck-find-and-replace-form__replace {\\n\\t\\t\\tflex-wrap: wrap;\\n\\t\\t\\tjustify-content: flex-end;\\n\\t\\t\\tmargin-top: calc( -1 * var(--ck-spacing-large) );\\n\\n\\t\\t\\t& > .ck-labeled-field-view {\\n\\t\\t\\t\\tmargin-bottom: var(--ck-spacing-large);\\n\\t\\t\\t}\\n\\n\\t\\t\\t& > .ck-options-dropdown {\\n\\t\\t\\t\\tmargin-right: auto;\\n\\t\\t\\t\\tmargin-left: 0;\\n\\t\\t\\t}\\n\\n\\t\\t\\t& > .ck-labeled-field-view,\\n\\t\\t\\t& > .ck-labeled-field-view .ck-input {\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\\n@mixin ck-media-phone {\\n\\t.ck.ck-find-and-replace-form {\\n\\t\\twidth: 300px;\\n\\n\\t\\t& fieldset {\\n\\t\\t\\tflex-wrap: wrap;\\n\\n\\t\\t\\t/* The find fieldset */\\n\\t\\t\\t&.ck-find-and-replace-form__find {\\n\\t\\t\\t\\t& .ck-labeled-field-view {\\n\\t\\t\\t\\t\\tflex: 1 0 auto;\\n\\t\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\t\\tmargin-bottom: var(--ck-spacing-standard);\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t& > .ck-button {\\n\\t\\t\\t\\t\\ttext-align: center;\\n\\n\\t\\t\\t\\t\\t&:first-of-type {\\n\\t\\t\\t\\t\\t\\tflex: 1 1 auto;\\n\\n\\t\\t\\t\\t\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\t\\t\\t\\t\\tmargin-left: 0;\\n\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\t\\t\\t\\t\\tmargin-right: 0;\\n\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t& .ck-button__label {\\n\\t\\t\\t\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\t\\t\\t\\ttext-align: center;\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t/* The replace fieldset */\\n\\t\\t\\t&.ck-find-and-replace-form__replace > :not(.ck-labeled-field-view) {\\n\\t\\t\\t\\tflex: 1 1 auto;\\n\\n\\t\\t\\t\\t&.ck-dropdown {\\n\\t\\t\\t\\t\\tflex-grow: 0;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t&.ck-button > .ck-button__label {\\n\\t\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\t\\ttext-align: center;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@define-mixin ck-media-phone {\\n\\t@media screen and (max-width: 600px) {\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":root{--ck-color-mention-background:rgba(153,0,48,0.1);--ck-color-mention-text:#990030}.ck-content .mention{background:var(--ck-color-mention-background);color:var(--ck-color-mention-text)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-mention/mention.css\"],\"names\":[],\"mappings\":\"AAKA,MACC,gDAAwD,CACxD,+BACD,CAEA,qBACC,6CAA8C,CAC9C,kCACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-color-mention-background: hsla(341, 100%, 30%, 0.1);\\n\\t--ck-color-mention-text: hsl(341, 100%, 30%);\\n}\\n\\n.ck-content .mention {\\n\\tbackground: var(--ck-color-mention-background);\\n\\tcolor: var(--ck-color-mention-text);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":root{--ck-mention-list-max-height:300px}.ck.ck-mentions{max-height:var(--ck-mention-list-max-height);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}.ck.ck-mentions>.ck-list__item{overflow:hidden;flex-shrink:0}\", \"\",{\"version\":3,\"sources\":[\"webpack://./node_modules/@ckeditor/ckeditor5-mention/theme/mentionui.css\"],\"names\":[],\"mappings\":\"AAKA,MACC,kCACD,CAEA,gBACC,4CAA6C,CAE7C,eAAgB,CAIhB,iBAAkB,CAElB,2BAQD,CAJC,+BACC,eAAgB,CAChB,aACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-mention-list-max-height: 300px;\\n}\\n\\n.ck.ck-mentions {\\n\\tmax-height: var(--ck-mention-list-max-height);\\n\\n\\toverflow-y: auto;\\n\\n\\t/* Prevent unnecessary horizontal scrollbar in Safari\\n\\thttps://github.com/ckeditor/ckeditor5-mention/issues/41 */\\n\\toverflow-x: hidden;\\n\\n\\toverscroll-behavior: contain;\\n\\n\\t/* Prevent unnecessary vertical scrollbar in Safari\\n\\thttps://github.com/ckeditor/ckeditor5-mention/issues/41 */\\n\\t& > .ck-list__item {\\n\\t\\toverflow: hidden;\\n\\t\\tflex-shrink: 0;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;position:relative;pointer-events:none}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);top:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);border:1px solid var(--ck-clipboard-drop-target-color);background:var(--ck-clipboard-drop-target-color);margin-left:-1px}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{content:\\\"\\\";width:0;height:0;display:block;position:absolute;left:50%;top:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);transform:translateX(-50%);border-left:calc(var(--ck-clipboard-drop-target-dot-width)*0.5) solid transparent;border-bottom:0 solid transparent;border-right:calc(var(--ck-clipboard-drop-target-dot-width)*0.5) solid transparent;border-top:calc(var(--ck-clipboard-drop-target-dot-height)) solid var(--ck-clipboard-drop-target-color)}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-clipboard/theme/clipboard.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-clipboard/clipboard.css\"],\"names\":[],\"mappings\":\"AASC,8DACC,cAAe,CACf,iBAAkB,CAClB,mBAMD,CAJC,mEACC,iBAAkB,CAClB,OACD,CAWA,qJACC,YACD,CCzBF,MACC,yCAA0C,CAC1C,yCAA0C,CAC1C,6DACD,CAOE,mEACC,4DAA8D,CAC9D,yDAA2D,CAC3D,sDAAuD,CACvD,gDAAiD,CACjD,gBAkBD,CAfC,yEACC,UAAW,CACX,OAAQ,CACR,QAAS,CAET,aAAc,CACd,iBAAkB,CAClB,QAAS,CACT,yDAA2D,CAE3D,0BAA2B,CAG3B,iFAAmB,CAAnB,iCAAmB,CAAnB,kFAAmB,CAAnB,uGACD,CA2DF,kEACC,gGACD,CAKA,gDACC,OAAS,CACT,sBACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-editor__editable {\\n\\t/*\\n\\t * Vertical drop target (in text).\\n\\t */\\n\\t& .ck.ck-clipboard-drop-target-position {\\n\\t\\tdisplay: inline;\\n\\t\\tposition: relative;\\n\\t\\tpointer-events: none;\\n\\n\\t\\t& span {\\n\\t\\t\\tposition: absolute;\\n\\t\\t\\twidth: 0;\\n\\t\\t}\\n\\t}\\n\\n\\t/*\\n\\t * Styles of the widget being dragged (its preview).\\n\\t */\\n\\t& .ck-widget:-webkit-drag {\\n\\t\\t& > .ck-widget__selection-handle {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\n\\t\\t& > .ck-widget__type-around {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-clipboard-drop-target-dot-width: 12px;\\n\\t--ck-clipboard-drop-target-dot-height: 8px;\\n\\t--ck-clipboard-drop-target-color: var(--ck-color-focus-border)\\n}\\n\\n.ck.ck-editor__editable {\\n\\t/*\\n\\t * Vertical drop target (in text).\\n\\t */\\n\\t& .ck.ck-clipboard-drop-target-position {\\n\\t\\t& span {\\n\\t\\t\\tbottom: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\\n\\t\\t\\ttop: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\\n\\t\\t\\tborder: 1px solid var(--ck-clipboard-drop-target-color);\\n\\t\\t\\tbackground: var(--ck-clipboard-drop-target-color);\\n\\t\\t\\tmargin-left: -1px;\\n\\n\\t\\t\\t/* The triangle above the marker */\\n\\t\\t\\t&::after {\\n\\t\\t\\t\\tcontent: \\\"\\\";\\n\\t\\t\\t\\twidth: 0;\\n\\t\\t\\t\\theight: 0;\\n\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\tposition: absolute;\\n\\t\\t\\t\\tleft: 50%;\\n\\t\\t\\t\\ttop: calc(var(--ck-clipboard-drop-target-dot-height) * -.5);\\n\\n\\t\\t\\t\\ttransform: translateX(-50%);\\n\\t\\t\\t\\tborder-color: var(--ck-clipboard-drop-target-color) transparent transparent transparent;\\n\\t\\t\\t\\tborder-width: calc(var(--ck-clipboard-drop-target-dot-height)) calc(.5 * var(--ck-clipboard-drop-target-dot-width)) 0 calc(.5 * var(--ck-clipboard-drop-target-dot-width));\\n\\t\\t\\t\\tborder-style: solid;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t/*\\n\\t// Horizontal drop target (between blocks).\\n\\t& .ck.ck-clipboard-drop-target-position {\\n\\t\\tdisplay: block;\\n\\t\\tposition: relative;\\n\\t\\twidth: 100%;\\n\\t\\theight: 0;\\n\\t\\tmargin: 0;\\n\\t\\ttext-align: initial;\\n\\n\\t\\t& .ck-clipboard-drop-target__line {\\n\\t\\t\\tposition: absolute;\\n\\t\\t\\twidth: 100%;\\n\\t\\t\\theight: 0;\\n\\t\\t\\tborder: 1px solid var(--ck-clipboard-drop-target-color);\\n\\t\\t\\tmargin-top: -1px;\\n\\n\\t\\t\\t&::before {\\n\\t\\t\\t\\tcontent: \\\"\\\";\\n\\t\\t\\t\\twidth: 0;\\n\\t\\t\\t\\theight: 0;\\n\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\tposition: absolute;\\n\\t\\t\\t\\tleft: calc(-1 * var(--ck-clipboard-drop-target-dot-size));\\n\\t\\t\\t\\ttop: 0;\\n\\n\\t\\t\\t\\ttransform: translateY(-50%);\\n\\t\\t\\t\\tborder-color: transparent transparent transparent var(--ck-clipboard-drop-target-color);\\n\\t\\t\\t\\tborder-width: var(--ck-clipboard-drop-target-dot-size) 0 var(--ck-clipboard-drop-target-dot-size) calc(2 * var(--ck-clipboard-drop-target-dot-size));\\n\\t\\t\\t\\tborder-style: solid;\\n\\t\\t\\t}\\n\\n\\t\\t\\t&::after {\\n\\t\\t\\t\\tcontent: \\\"\\\";\\n\\t\\t\\t\\twidth: 0;\\n\\t\\t\\t\\theight: 0;\\n\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\tposition: absolute;\\n\\t\\t\\t\\tright: calc(-1 * var(--ck-clipboard-drop-target-dot-size));\\n\\t\\t\\t\\ttop: 0;\\n\\n\\t\\t\\t\\ttransform: translateY(-50%);\\n\\t\\t\\t\\tborder-color: transparent var(--ck-clipboard-drop-target-color) transparent transparent;\\n\\t\\t\\t\\tborder-width: var(--ck-clipboard-drop-target-dot-size) calc(2 * var(--ck-clipboard-drop-target-dot-size)) var(--ck-clipboard-drop-target-dot-size) 0;\\n\\t\\t\\t\\tborder-style: solid;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\t*/\\n\\n\\t/*\\n\\t * Styles of the widget that it a drop target.\\n\\t */\\n\\t& .ck-widget.ck-clipboard-drop-target-range {\\n\\t\\toutline: var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color) !important;\\n\\t}\\n\\n\\t/*\\n\\t * Styles of the widget being dragged (its preview).\\n\\t */\\n\\t& .ck-widget:-webkit-drag {\\n\\t\\tzoom: 0.6;\\n\\t\\toutline: none !important;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck-content pre{padding:1em;color:#353535;background:hsla(0,0%,78%,.3);border:1px solid #c4c4c4;border-radius:2px;text-align:left;direction:ltr;tab-size:4;white-space:pre-wrap;font-style:normal;min-width:200px}.ck-content pre code{background:unset;padding:0;border-radius:0}.ck.ck-editor__editable pre{position:relative}.ck.ck-editor__editable pre[data-language]:after{content:attr(data-language);position:absolute}:root{--ck-color-code-block-label-background:#757575}.ck.ck-editor__editable pre[data-language]:after{top:-1px;right:10px;background:var(--ck-color-code-block-label-background);font-size:10px;font-family:var(--ck-font-face);line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);color:#fff;white-space:nowrap}.ck.ck-code-block-dropdown .ck-dropdown__panel{max-height:250px;overflow-y:auto;overflow-x:hidden}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-code-block/theme/codeblock.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-code-block/codeblock.css\"],\"names\":[],\"mappings\":\"AAKA,gBACC,WAAY,CACZ,aAAwB,CACxB,4BAAiC,CACjC,wBAAiC,CACjC,iBAAkB,CAGlB,eAAgB,CAChB,aAAc,CAEd,UAAW,CACX,oBAAqB,CAGrB,iBAAkB,CAGlB,eAOD,CALC,qBACC,gBAAiB,CACjB,SAAU,CACV,eACD,CAGD,4BACC,iBAMD,CAJC,iDACC,2BAA4B,CAC5B,iBACD,CCjCD,MACC,8CACD,CAEA,iDACC,QAAS,CACT,UAAW,CACX,sDAAuD,CAEvD,cAAe,CACf,+BAAgC,CAChC,gBAAiB,CACjB,uDAAwD,CACxD,UAAuB,CACvB,kBACD,CAEA,+CAEC,gBAAiB,CACjB,eAAgB,CAChB,iBACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck-content pre {\\n\\tpadding: 1em;\\n\\tcolor: hsl(0, 0%, 20.8%);\\n\\tbackground: hsla(0, 0%, 78%, 0.3);\\n\\tborder: 1px solid hsl(0, 0%, 77%);\\n\\tborder-radius: 2px;\\n\\n\\t/* Code block are language direction–agnostic. */\\n\\ttext-align: left;\\n\\tdirection: ltr;\\n\\n\\ttab-size: 4;\\n\\twhite-space: pre-wrap;\\n\\n\\t/* Don't inherit the style, e.g. when in a block quote. */\\n\\tfont-style: normal;\\n\\n\\t/* Don't let the code be squashed e.g. when in a table cell. */\\n\\tmin-width: 200px;\\n\\n\\t& code {\\n\\t\\tbackground: unset;\\n\\t\\tpadding: 0;\\n\\t\\tborder-radius: 0;\\n\\t}\\n}\\n\\n.ck.ck-editor__editable pre {\\n\\tposition: relative;\\n\\n\\t&[data-language]::after {\\n\\t\\tcontent: attr(data-language);\\n\\t\\tposition: absolute;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-color-code-block-label-background: hsl(0, 0%, 46%);\\n}\\n\\n.ck.ck-editor__editable pre[data-language]::after {\\n\\ttop: -1px;\\n\\tright: 10px;\\n\\tbackground: var(--ck-color-code-block-label-background);\\n\\n\\tfont-size: 10px;\\n\\tfont-family: var(--ck-font-face);\\n\\tline-height: 16px;\\n\\tpadding: var(--ck-spacing-tiny) var(--ck-spacing-medium);\\n\\tcolor: hsl(0, 0%, 100%);\\n\\twhite-space: nowrap;\\n}\\n\\n.ck.ck-code-block-dropdown .ck-dropdown__panel {\\n\\t/* There could be dozens of languages available. Use scroll to prevent a 10e6px dropdown. */\\n\\tmax-height: 250px;\\n\\toverflow-y: auto;\\n\\toverflow-x: hidden;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-placeholder,.ck .ck-placeholder{position:relative}.ck.ck-placeholder:before,.ck .ck-placeholder:before{position:absolute;left:0;right:0;content:attr(data-placeholder);pointer-events:none}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}.ck.ck-placeholder:before,.ck .ck-placeholder:before{cursor:text;color:var(--ck-color-engine-placeholder-text)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-engine/theme/placeholder.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-engine/placeholder.css\"],\"names\":[],\"mappings\":\"AAMA,uCAEC,iBAWD,CATC,qDACC,iBAAkB,CAClB,MAAO,CACP,OAAQ,CACR,8BAA+B,CAG/B,mBACD,CAKA,wCACC,YACD,CAQD,iCACC,iBACD,CC5BC,qDACC,WAAY,CACZ,6CACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/* See ckeditor/ckeditor5#936. */\\n.ck.ck-placeholder,\\n.ck .ck-placeholder {\\n\\tposition: relative;\\n\\n\\t&::before {\\n\\t\\tposition: absolute;\\n\\t\\tleft: 0;\\n\\t\\tright: 0;\\n\\t\\tcontent: attr(data-placeholder);\\n\\n\\t\\t/* See ckeditor/ckeditor5#469. */\\n\\t\\tpointer-events: none;\\n\\t}\\n}\\n\\n/* See ckeditor/ckeditor5#1987. */\\n.ck.ck-read-only .ck-placeholder {\\n\\t&::before {\\n\\t\\tdisplay: none;\\n\\t}\\n}\\n\\n/*\\n * Rules for the `ck-placeholder` are loaded before the rules for `ck-reset_all` in the base CKEditor 5 DLL build.\\n * This fix overwrites the incorrectly set `position: static` from `ck-reset_all`.\\n * See https://github.com/ckeditor/ckeditor5/issues/11418.\\n */\\n.ck.ck-reset_all .ck-placeholder {\\n\\tposition: relative;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/* See ckeditor/ckeditor5#936. */\\n.ck.ck-placeholder, .ck .ck-placeholder {\\n\\t&::before {\\n\\t\\tcursor: text;\\n\\t\\tcolor: var(--ck-color-engine-placeholder-text);\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-engine/theme/renderer.css\"],\"names\":[],\"mappings\":\"AAMA,qDACC,YACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/* Elements marked by the Renderer as hidden should be invisible in the editor. */\\n.ck.ck-editor__editable span[data-ck-unsafe-element] {\\n\\tdisplay: none;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-font/theme/fontcolor.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-font/fontcolor.css\"],\"names\":[],\"mappings\":\"AAKA,4CACC,YAAa,CACb,kBAAmB,CACnB,UACD,CAEA,8BACC,iBACD,CCNA,4CACC,qEAAyE,CACzE,2BAA4B,CAC5B,4BAeD,CAbC,wDACC,mDACD,CAEA,kEAEE,uCAMF,CARA,kEAME,sCAEF\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck .ck-button.ck-color-table__remove-color {\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\twidth: 100%;\\n}\\n\\nlabel.ck.ck-color-grid__label {\\n\\tfont-weight: unset;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_dir.css\\\";\\n\\n.ck .ck-button.ck-color-table__remove-color {\\n\\tpadding: calc(var(--ck-spacing-standard) / 2 ) var(--ck-spacing-standard);\\n\\tborder-bottom-left-radius: 0;\\n\\tborder-bottom-right-radius: 0;\\n\\n\\t&:not(:focus) {\\n\\t\\tborder-bottom: 1px solid var(--ck-color-base-border);\\n\\t}\\n\\n\\t& .ck.ck-icon {\\n\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\tmargin-right: var(--ck-spacing-standard);\\n\\t\\t}\\n\\n\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\tmargin-left: var(--ck-spacing-standard);\\n\\t\\t}\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-font/theme/fontsize.css\"],\"names\":[],\"mappings\":\"AAUC,uBACC,cACD,CAEA,wBACC,eACD,CAEA,sBACC,eACD,CAEA,uBACC,eACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/* The values should be synchronized with the \\\"FONT_SIZE_PRESET_UNITS\\\" object in the \\\"/src/fontsize/utils.js\\\" file. */\\n\\n/* Styles should be prefixed with the `.ck-content` class.\\nSee https://github.com/ckeditor/ckeditor5/issues/6636 */\\n.ck-content {\\n\\t& .text-tiny {\\n\\t\\tfont-size: .7em;\\n\\t}\\n\\n\\t& .text-small {\\n\\t\\tfont-size: .85em;\\n\\t}\\n\\n\\t& .text-big {\\n\\t\\tfont-size: 1.4em;\\n\\t}\\n\\n\\t& .text-huge {\\n\\t\\tfont-size: 1.8em;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-heading/theme/heading.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-heading/heading.css\"],\"names\":[],\"mappings\":\"AAKA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,+BACC,eACD,CCZC,2EACC,SACD,CAEA,uEACC,cACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-heading_heading1 {\\n\\tfont-size: 20px;\\n}\\n\\n.ck.ck-heading_heading2 {\\n\\tfont-size: 17px;\\n}\\n\\n.ck.ck-heading_heading3 {\\n\\tfont-size: 14px;\\n}\\n\\n.ck[class*=\\\"ck-heading_heading\\\"] {\\n\\tfont-weight: bold;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/* Resize dropdown's button label. */\\n.ck.ck-dropdown.ck-heading-dropdown {\\n\\t& .ck-dropdown__button .ck-button__label {\\n\\t\\twidth: 8em;\\n\\t}\\n\\n\\t& .ck-dropdown__panel .ck-list__item {\\n\\t\\tmin-width: 18em;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck-editor__editable .ck-horizontal-line{display:flow-root}.ck-content hr{margin:15px 0;height:4px;background:#dedede;border:0}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-horizontal-line/theme/horizontalline.css\"],\"names\":[],\"mappings\":\"AAMA,yCAEC,iBACD,CAEA,eACC,aAAc,CACd,UAAW,CACX,kBAA2B,CAC3B,QACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n\\n.ck-editor__editable .ck-horizontal-line {\\n\\t/* Necessary to render properly next to floated objects, e.g. side image case. */\\n\\tdisplay: flow-root;\\n}\\n\\n.ck-content hr {\\n\\tmargin: 15px 0;\\n\\theight: 4px;\\n\\tbackground: hsl(0, 0%, 87%);\\n\\tborder: 0;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck-content .image{display:table;clear:both;text-align:center;margin:.9em auto;min-width:50px}.ck-content .image img{display:block;margin:0 auto;max-width:100%;min-width:100%}.ck-content .image-inline{display:inline-flex;max-width:100%;align-items:flex-start}.ck-content .image-inline picture{display:flex}.ck-content .image-inline img,.ck-content .image-inline picture{flex-grow:1;flex-shrink:1;max-width:100%}.ck.ck-editor__editable .image>figcaption.ck-placeholder:before{padding-left:inherit;padding-right:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ck.ck-editor__editable .image-inline.ck-widget_selected,.ck.ck-editor__editable .image.ck-widget_selected{z-index:1}.ck.ck-editor__editable .image-inline.ck-widget_selected ::selection{display:none}.ck.ck-editor__editable td .image-inline img,.ck.ck-editor__editable th .image-inline img{max-width:none}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-image/theme/image.css\"],\"names\":[],\"mappings\":\"AAMC,mBACC,aAAc,CACd,UAAW,CACX,iBAAkB,CAKlB,gBAAkB,CAGlB,cAeD,CAbC,uBAEC,aAAc,CAGd,aAAc,CAGd,cAAe,CAGf,cACD,CAGD,0BAMC,mBAAoB,CAGpB,cAAe,CAGf,sBAiBD,CAdC,kCACC,YACD,CAGA,gEAGC,WAAY,CACZ,aAAc,CAGd,cACD,CAUD,gEACC,oBAAqB,CACrB,qBAAsB,CAMtB,kBAAmB,CACnB,eAAgB,CAChB,sBACD,CAWA,2GACC,SAUD,CAHC,qEACC,YACD,CAOA,0FACC,cACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck-content {\\n\\t& .image {\\n\\t\\tdisplay: table;\\n\\t\\tclear: both;\\n\\t\\ttext-align: center;\\n\\n\\t\\t/* Make sure there is some space between the content and the image. Center image by default. */\\n\\t\\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\\n\\t \\tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\\n\\t\\tmargin: 0.9em auto;\\n\\n\\t\\t/* Make sure the caption will be displayed properly (See: https://github.com/ckeditor/ckeditor5/issues/1870). */\\n\\t\\tmin-width: 50px;\\n\\n\\t\\t& img {\\n\\t\\t\\t/* Prevent unnecessary margins caused by line-height (see #44). */\\n\\t\\t\\tdisplay: block;\\n\\n\\t\\t\\t/* Center the image if its width is smaller than the content's width. */\\n\\t\\t\\tmargin: 0 auto;\\n\\n\\t\\t\\t/* Make sure the image never exceeds the size of the parent container (ckeditor/ckeditor5-ui#67). */\\n\\t\\t\\tmax-width: 100%;\\n\\n\\t\\t\\t/* Make sure the image is never smaller than the parent container (See: https://github.com/ckeditor/ckeditor5/issues/9300). */\\n\\t\\t\\tmin-width: 100%\\n\\t\\t}\\n\\t}\\n\\n\\t& .image-inline {\\n\\t\\t/*\\n\\t\\t * Normally, the .image-inline would have \\\"display: inline-block\\\" and \\\"img { width: 100% }\\\" (to follow the wrapper while resizing).\\n\\t\\t * Unfortunately, together with \\\"srcset\\\", it gets automatically stretched up to the width of the editing root.\\n\\t\\t * This strange behavior does not happen with inline-flex.\\n\\t\\t */\\n\\t\\tdisplay: inline-flex;\\n\\n\\t\\t/* While being resized, don't allow the image to exceed the width of the editing root. */\\n\\t\\tmax-width: 100%;\\n\\n\\t\\t/* This is required by Safari to resize images in a sensible way. Without this, the browser breaks the ratio. */\\n\\t\\talign-items: flex-start;\\n\\n\\t\\t/* When the picture is present it must act as a flex container to let the img resize properly */\\n\\t\\t& picture {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t}\\n\\n\\t\\t/* When the picture is present, it must act like a resizable img. */\\n\\t\\t& picture,\\n\\t\\t& img {\\n\\t\\t\\t/* This is necessary for the img to span the entire .image-inline wrapper and to resize properly. */\\n\\t\\t\\tflex-grow: 1;\\n\\t\\t\\tflex-shrink: 1;\\n\\n\\t\\t\\t/* Prevents overflowing the editing root boundaries when an inline image is very wide. */\\n\\t\\t\\tmax-width: 100%;\\n\\t\\t}\\n\\t}\\n}\\n\\n.ck.ck-editor__editable {\\n\\t/*\\n\\t * Inhertit the content styles padding of the <figcaption> in case the integration overrides `text-align: center`\\n\\t * of `.image` (e.g. to the left/right). This ensures the placeholder stays at the padding just like the native\\n\\t * caret does, and not at the edge of <figcaption>.\\n\\t */\\n\\t& .image > figcaption.ck-placeholder::before {\\n\\t\\tpadding-left: inherit;\\n\\t\\tpadding-right: inherit;\\n\\n\\t\\t/*\\n\\t\\t * Make sure the image caption placeholder doesn't overflow the placeholder area.\\n\\t\\t * See https://github.com/ckeditor/ckeditor5/issues/9162.\\n\\t\\t */\\n\\t\\twhite-space: nowrap;\\n\\t\\toverflow: hidden;\\n\\t\\ttext-overflow: ellipsis;\\n\\t}\\n\\n\\n\\t/*\\n\\t * Make sure the selected inline image always stays on top of its siblings.\\n\\t * See https://github.com/ckeditor/ckeditor5/issues/9108.\\n\\t */\\n\\t& .image.ck-widget_selected {\\n\\t\\tz-index: 1;\\n\\t}\\n\\n\\t& .image-inline.ck-widget_selected {\\n\\t\\tz-index: 1;\\n\\n\\t\\t/*\\n\\t\\t * Make sure the native browser selection style is not displayed.\\n\\t\\t * Inline image widgets have their own styles for the selected state and\\n\\t\\t * leaving this up to the browser is asking for a visual collision.\\n\\t\\t */\\n\\t\\t& ::selection {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t}\\n\\n\\t/* The inline image nested in the table should have its original size if not resized.\\n\\tSee https://github.com/ckeditor/ckeditor5/issues/9117. */\\n\\t& td,\\n\\t& th {\\n\\t\\t& .image-inline img {\\n\\t\\t\\tmax-width: none;\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":root{--ck-color-image-caption-background:#f7f7f7;--ck-color-image-caption-text:#333;--ck-color-image-caption-highligted-background:hsl(52deg 100% 50%)}.ck-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:var(--ck-color-image-caption-text);background-color:var(--ck-color-image-caption-background);padding:.6em;font-size:.75em;outline-offset:-1px}.ck.ck-editor__editable .image>figcaption.image__caption_highlighted{animation:ck-image-caption-highlight .6s ease-out}@keyframes ck-image-caption-highlight{0%{background-color:var(--ck-color-image-caption-highligted-background)}to{background-color:var(--ck-color-image-caption-background)}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-image/theme/imagecaption.css\"],\"names\":[],\"mappings\":\"AAKA,MACC,2CAAoD,CACpD,kCAA8C,CAC9C,kEACD,CAGA,8BACC,qBAAsB,CACtB,mBAAoB,CACpB,qBAAsB,CACtB,wCAAyC,CACzC,yDAA0D,CAC1D,YAAa,CACb,eAAgB,CAChB,mBACD,CAGA,qEACC,iDACD,CAEA,sCACC,GACC,oEACD,CAEA,GACC,yDACD,CACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-color-image-caption-background: hsl(0, 0%, 97%);\\n\\t--ck-color-image-caption-text: hsl(0, 0%, 20%);\\n\\t--ck-color-image-caption-highligted-background: hsl(52deg 100% 50%);\\n}\\n\\n/* Content styles */\\n.ck-content .image > figcaption {\\n\\tdisplay: table-caption;\\n\\tcaption-side: bottom;\\n\\tword-break: break-word;\\n\\tcolor: var(--ck-color-image-caption-text);\\n\\tbackground-color: var(--ck-color-image-caption-background);\\n\\tpadding: .6em;\\n\\tfont-size: .75em;\\n\\toutline-offset: -1px;\\n}\\n\\n/* Editing styles */\\n.ck.ck-editor__editable .image > figcaption.image__caption_highlighted {\\n\\tanimation: ck-image-caption-highlight .6s ease-out;\\n}\\n\\n@keyframes ck-image-caption-highlight {\\n\\t0% {\\n\\t\\tbackground-color: var(--ck-color-image-caption-highligted-background);\\n\\t}\\n\\n\\t100% {\\n\\t\\tbackground-color: var(--ck-color-image-caption-background);\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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}.ck.ck-editor__editable td .image-inline.image_resized img,.ck.ck-editor__editable th .image-inline.image_resized img{max-width:100%}[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}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-image/theme/imageresize.css\"],\"names\":[],\"mappings\":\"AAKA,iCACC,cAAe,CAMf,aAAc,CACd,qBAWD,CATC,qCAEC,UACD,CAEA,4CAEC,aACD,CAQC,sHACC,cACD,CAIF,oFACC,uCACD,CAEA,oFACC,sCACD,CAEA,oEACC,SACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck-content .image.image_resized {\\n\\tmax-width: 100%;\\n\\t/*\\n\\tThe `<figure>` element for resized images must not use `display:table` as browsers do not support `max-width` for it well.\\n\\tSee https://stackoverflow.com/questions/4019604/chrome-safari-ignoring-max-width-in-table/14420691#14420691 for more.\\n\\tFortunately, since we control the width, there is no risk that the image will look bad.\\n\\t*/\\n\\tdisplay: block;\\n\\tbox-sizing: border-box;\\n\\n\\t& img {\\n\\t\\t/* For resized images it is the `<figure>` element that determines the image width. */\\n\\t\\twidth: 100%;\\n\\t}\\n\\n\\t& > figcaption {\\n\\t\\t/* The `<figure>` element uses `display:block`, so `<figcaption>` also has to. */\\n\\t\\tdisplay: block;\\n\\t}\\n}\\n\\n.ck.ck-editor__editable {\\n\\t/* The resized inline image nested in the table should respect its parent size.\\n\\tSee https://github.com/ckeditor/ckeditor5/issues/9117. */\\n\\t& td,\\n\\t& th {\\n\\t\\t& .image-inline.image_resized img {\\n\\t\\t\\tmax-width: 100%;\\n\\t\\t}\\n\\t}\\n}\\n\\n[dir=\\\"ltr\\\"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {\\n\\tmargin-right: var(--ck-spacing-standard);\\n}\\n\\n[dir=\\\"rtl\\\"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {\\n\\tmargin-left: var(--ck-spacing-standard);\\n}\\n\\n.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label {\\n\\twidth: 4em;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":root{--ck-image-style-spacing:1.5em;--ck-inline-image-style-spacing:calc(var(--ck-image-style-spacing)/2)}.ck-content .image-style-block-align-left,.ck-content .image-style-block-align-right{max-width:calc(100% - var(--ck-image-style-spacing))}.ck-content .image-style-align-left,.ck-content .image-style-align-right{clear:none}.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)}.ck-content .image-style-block-align-right{margin-right:0;margin-left:auto}.ck-content .image-style-block-align-left{margin-left:0;margin-right:auto}.ck-content p+.image-style-align-left,.ck-content p+.image-style-align-right,.ck-content p+.image-style-side{margin-top:0}.ck-content .image-inline.image-style-align-left,.ck-content .image-inline.image-style-align-right{margin-top:var(--ck-inline-image-style-spacing);margin-bottom:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-left{margin-right:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-right{margin-left:var(--ck-inline-image-style-spacing)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-background)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after{display:none}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-hover-background)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-image/theme/imagestyle.css\"],\"names\":[],\"mappings\":\"AAKA,MACC,8BAA+B,CAC/B,qEACD,CAMC,qFAEC,oDACD,CAIA,yEAEC,UACD,CAEA,8BACC,WAAY,CACZ,yCAA0C,CAC1C,aACD,CAEA,oCACC,UAAW,CACX,0CACD,CAEA,sCACC,gBAAiB,CACjB,iBACD,CAEA,qCACC,WAAY,CACZ,yCACD,CAEA,2CACC,cAAe,CACf,gBACD,CAEA,0CACC,aAAc,CACd,iBACD,CAGA,6GAGC,YACD,CAGC,mGAEC,+CAAgD,CAChD,kDACD,CAEA,iDACC,iDACD,CAEA,kDACC,gDACD,CAUC,0lBAGC,qDAKD,CAHC,8nBACC,YACD,CAKD,oVAGC,2DACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-image-style-spacing: 1.5em;\\n\\t--ck-inline-image-style-spacing: calc(var(--ck-image-style-spacing) / 2);\\n}\\n\\n.ck-content {\\n\\t/* Provides a minimal side margin for the left and right aligned images, so that the user has a visual feedback\\n\\tconfirming successful application of the style if image width exceeds the editor's size.\\n\\tSee https://github.com/ckeditor/ckeditor5/issues/9342 */\\n\\t& .image-style-block-align-left,\\n\\t& .image-style-block-align-right {\\n\\t\\tmax-width: calc(100% - var(--ck-image-style-spacing));\\n\\t}\\n\\n\\t/* Allows displaying multiple floating images in the same line.\\n\\tSee https://github.com/ckeditor/ckeditor5/issues/9183#issuecomment-804988132 */\\n\\t& .image-style-align-left,\\n\\t& .image-style-align-right {\\n\\t\\tclear: none;\\n\\t}\\n\\n\\t& .image-style-side {\\n\\t\\tfloat: right;\\n\\t\\tmargin-left: var(--ck-image-style-spacing);\\n\\t\\tmax-width: 50%;\\n\\t}\\n\\n\\t& .image-style-align-left {\\n\\t\\tfloat: left;\\n\\t\\tmargin-right: var(--ck-image-style-spacing);\\n\\t}\\n\\n\\t& .image-style-align-center {\\n\\t\\tmargin-left: auto;\\n\\t\\tmargin-right: auto;\\n\\t}\\n\\n\\t& .image-style-align-right {\\n\\t\\tfloat: right;\\n\\t\\tmargin-left: var(--ck-image-style-spacing);\\n\\t}\\n\\n\\t& .image-style-block-align-right {\\n\\t\\tmargin-right: 0;\\n\\t\\tmargin-left: auto;\\n\\t}\\n\\n\\t& .image-style-block-align-left {\\n\\t\\tmargin-left: 0;\\n\\t\\tmargin-right: auto;\\n\\t}\\n\\n\\t/* Simulates margin collapsing with the preceding paragraph, which does not work for the floating elements. */\\n\\t& p + .image-style-align-left,\\n\\t& p + .image-style-align-right,\\n\\t& p + .image-style-side {\\n\\t\\tmargin-top: 0;\\n\\t}\\n\\n\\t& .image-inline {\\n\\t\\t&.image-style-align-left,\\n\\t\\t&.image-style-align-right {\\n\\t\\t\\tmargin-top: var(--ck-inline-image-style-spacing);\\n\\t\\t\\tmargin-bottom: var(--ck-inline-image-style-spacing);\\n\\t\\t}\\n\\n\\t\\t&.image-style-align-left {\\n\\t\\t\\tmargin-right: var(--ck-inline-image-style-spacing);\\n\\t\\t}\\n\\n\\t\\t&.image-style-align-right {\\n\\t\\t\\tmargin-left: var(--ck-inline-image-style-spacing);\\n\\t\\t}\\n\\t}\\n}\\n\\n.ck.ck-splitbutton {\\n\\t/* The button should display as a regular drop-down if the action button\\n\\tis forced to fire the same action as the arrow button. */\\n\\t&.ck-splitbutton_flatten {\\n\\t\\t&:hover,\\n\\t\\t&.ck-splitbutton_open {\\n\\t\\t\\t& > .ck-splitbutton__action:not(.ck-disabled),\\n\\t\\t\\t& > .ck-splitbutton__arrow:not(.ck-disabled),\\n\\t\\t\\t& > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {\\n\\t\\t\\t\\tbackground-color: var(--ck-color-button-on-background);\\n\\n\\t\\t\\t\\t&::after {\\n\\t\\t\\t\\t\\tdisplay: none;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t&.ck-splitbutton_open:hover {\\n\\t\\t\\t& > .ck-splitbutton__action:not(.ck-disabled),\\n\\t\\t\\t& > .ck-splitbutton__arrow:not(.ck-disabled),\\n\\t\\t\\t& > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {\\n\\t\\t\\t\\tbackground-color: var(--ck-color-button-on-hover-background);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck-image-upload-complete-icon{display:block;position:absolute;top:min(var(--ck-spacing-medium),6%);right:min(var(--ck-spacing-medium),6%);border-radius:50%;z-index:1}.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:20;--ck-image-upload-icon-width:2px;--ck-image-upload-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck-image-upload-complete-icon{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:calc(1px*var(--ck-image-upload-icon-size));animation-delay:0ms,3s;overflow:hidden;width:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size));height:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size))}.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}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-image/theme/imageuploadicon.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadicon.css\"],\"names\":[],\"mappings\":\"AAKA,+BACC,aAAc,CACd,iBAAkB,CAMlB,oCAAsC,CACtC,sCAAwC,CACxC,iBAAkB,CAClB,SAMD,CAJC,qCACC,UAAW,CACX,iBACD,CChBD,MACC,iCAA8C,CAC9C,+CAA4D,CAG5D,8BAA+B,CAC/B,gCAAiC,CACjC,4DACD,CAEA,+BACC,SAAU,CACV,uDAAwD,CACxD,wEAA0E,CAC1E,qCAAuC,CACvC,0BAAgC,CAGhC,oDAAuD,CAGvD,sBAA4B,CAM5B,eAAgB,CAChB,mFAAsF,CACtF,oFAyBD,CAtBC,qCAEC,QAAS,CAET,OAAQ,CACR,SAAU,CACV,QAAS,CACT,OAAQ,CAER,mCAAoC,CACpC,yBAA0B,CAC1B,oFAAqF,CACrF,sFAAuF,CAEvF,4CAA6C,CAC7C,sBAAyB,CACzB,mBAAsB,CACtB,4BAA6B,CAG7B,qBACD,CAGD,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,yCACC,GACC,SAAU,CACV,OAAQ,CACR,QACD,CACA,IACC,UAAY,CACZ,QACD,CACA,GACC,SAAU,CACV,UAAY,CACZ,YACD,CACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck-image-upload-complete-icon {\\n\\tdisplay: block;\\n\\tposition: absolute;\\n\\n\\t/*\\n\\t * Smaller images should have the icon closer to the border.\\n\\t * Match the icon position with the linked image indicator brought by the link image feature.\\n\\t */\\n\\ttop: min(var(--ck-spacing-medium), 6%);\\n\\tright: min(var(--ck-spacing-medium), 6%);\\n\\tborder-radius: 50%;\\n\\tz-index: 1;\\n\\n\\t&::after {\\n\\t\\tcontent: \\\"\\\";\\n\\t\\tposition: absolute;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-color-image-upload-icon: hsl(0, 0%, 100%);\\n\\t--ck-color-image-upload-icon-background: hsl(120, 100%, 27%);\\n\\n\\t/* Match the icon size with the linked image indicator brought by the link image feature. */\\n\\t--ck-image-upload-icon-size: 20;\\n\\t--ck-image-upload-icon-width: 2px;\\n\\t--ck-image-upload-icon-is-visible: clamp(0px, 100% - 50px, 1px);\\n}\\n\\n.ck-image-upload-complete-icon {\\n\\topacity: 0;\\n\\tbackground: var(--ck-color-image-upload-icon-background);\\n\\tanimation-name: ck-upload-complete-icon-show, ck-upload-complete-icon-hide;\\n\\tanimation-fill-mode: forwards, forwards;\\n\\tanimation-duration: 500ms, 500ms;\\n\\n\\t/* To make animation scalable. */\\n\\tfont-size: calc(1px * var(--ck-image-upload-icon-size));\\n\\n\\t/* Hide completed upload icon after 3 seconds. */\\n\\tanimation-delay: 0ms, 3000ms;\\n\\n\\t/*\\n\\t * Use CSS math to simulate container queries.\\n\\t * https://css-tricks.com/the-raven-technique-one-step-closer-to-container-queries/#what-about-showing-and-hiding-things\\n\\t */\\n\\toverflow: hidden;\\n\\twidth: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size));\\n\\theight: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size));\\n\\n\\t/* This is check icon element made from border-width mixed with animations. */\\n\\t&::after {\\n\\t\\t/* Because of border transformation we need to \\\"hard code\\\" left position. */\\n\\t\\tleft: 25%;\\n\\n\\t\\ttop: 50%;\\n\\t\\topacity: 0;\\n\\t\\theight: 0;\\n\\t\\twidth: 0;\\n\\n\\t\\ttransform: scaleX(-1) rotate(135deg);\\n\\t\\ttransform-origin: left top;\\n\\t\\tborder-top: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);\\n\\t\\tborder-right: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);\\n\\n\\t\\tanimation-name: ck-upload-complete-icon-check;\\n\\t\\tanimation-duration: 500ms;\\n\\t\\tanimation-delay: 500ms;\\n\\t\\tanimation-fill-mode: forwards;\\n\\n\\t\\t/* #1095. While reset is not providing proper box-sizing for pseudoelements, we need to handle it. */\\n\\t\\tbox-sizing: border-box;\\n\\t}\\n}\\n\\n@keyframes ck-upload-complete-icon-show {\\n\\tfrom {\\n\\t\\topacity: 0;\\n\\t}\\n\\n\\tto {\\n\\t\\topacity: 1;\\n\\t}\\n}\\n\\n@keyframes ck-upload-complete-icon-hide {\\n\\tfrom {\\n\\t\\topacity: 1;\\n\\t}\\n\\n\\tto {\\n\\t\\topacity: 0;\\n\\t}\\n}\\n\\n@keyframes ck-upload-complete-icon-check {\\n\\t0% {\\n\\t\\topacity: 1;\\n\\t\\twidth: 0;\\n\\t\\theight: 0;\\n\\t}\\n\\t33% {\\n\\t\\twidth: 0.3em;\\n\\t\\theight: 0;\\n\\t}\\n\\t100% {\\n\\t\\topacity: 1;\\n\\t\\twidth: 0.3em;\\n\\t\\theight: 0.45em;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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-upload-placeholder-image-aspect-ratio:2.8}.ck .ck-image-upload-placeholder{width:100%;margin:0}.ck .ck-image-upload-placeholder.image-inline{width:calc(var(--ck-upload-placeholder-loader-size)*2*var(--ck-upload-placeholder-image-aspect-ratio))}.ck .ck-image-upload-placeholder img{aspect-ratio:var(--ck-upload-placeholder-image-aspect-ratio)}.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)}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-image/theme/imageuploadloader.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadloader.css\"],\"names\":[],\"mappings\":\"AAKA,kCACC,iBAAkB,CAClB,YAAa,CACb,kBAAmB,CACnB,sBAAuB,CACvB,KAAM,CACN,MAMD,CAJC,yCACC,UAAW,CACX,iBACD,CCXD,MACC,4CAAqD,CACrD,wCAAyC,CACzC,8CACD,CAEA,iCAEC,UAAW,CACX,QAeD,CAbC,8CACC,sGACD,CAEA,qCAOC,4DACD,CAGD,kCACC,UAAW,CACX,WAUD,CARC,yCACC,8CAA+C,CAC/C,+CAAgD,CAChD,iBAAkB,CAClB,8DAA+D,CAC/D,kCAAmC,CACnC,yDACD,CAGD,wCACC,GACC,uBACD,CACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck .ck-upload-placeholder-loader {\\n\\tposition: absolute;\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\tjustify-content: center;\\n\\ttop: 0;\\n\\tleft: 0;\\n\\n\\t&::before {\\n\\t\\tcontent: '';\\n\\t\\tposition: relative;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-color-upload-placeholder-loader: hsl(0, 0%, 70%);\\n\\t--ck-upload-placeholder-loader-size: 32px;\\n\\t--ck-upload-placeholder-image-aspect-ratio: 2.8;\\n}\\n\\n.ck .ck-image-upload-placeholder {\\n\\t/* We need to control the full width of the SVG gray background. */\\n\\twidth: 100%;\\n\\tmargin: 0;\\n\\n\\t&.image-inline {\\n\\t\\twidth: calc( 2 * var(--ck-upload-placeholder-loader-size) * var(--ck-upload-placeholder-image-aspect-ratio) );\\n\\t}\\n\\n\\t& img {\\n\\t\\t/*\\n\\t\\t * This is an arbitrary aspect for a 1x1 px GIF to display to the user. Not too tall, not too short.\\n\\t\\t * There's nothing special about this number except that it should make the image placeholder look like\\n\\t\\t * a real image during this short period after the upload started and before the image was read from the\\n\\t\\t * file system (and a rich preview was loaded).\\n\\t\\t */\\n\\t\\taspect-ratio: var(--ck-upload-placeholder-image-aspect-ratio);\\n\\t}\\n}\\n\\n.ck .ck-upload-placeholder-loader {\\n\\twidth: 100%;\\n\\theight: 100%;\\n\\n\\t&::before {\\n\\t\\twidth: var(--ck-upload-placeholder-loader-size);\\n\\t\\theight: var(--ck-upload-placeholder-loader-size);\\n\\t\\tborder-radius: 50%;\\n\\t\\tborder-top: 3px solid var(--ck-color-upload-placeholder-loader);\\n\\t\\tborder-right: 2px solid transparent;\\n\\t\\tanimation: ck-upload-placeholder-loader 1s linear infinite;\\n\\t}\\n}\\n\\n@keyframes ck-upload-placeholder-loader {\\n\\tto {\\n\\t\\ttransform: rotate( 360deg );\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-editor__editable .image,.ck.ck-editor__editable .image-inline{position:relative}.ck.ck-editor__editable .image-inline .ck-progress-bar,.ck.ck-editor__editable .image .ck-progress-bar{position:absolute;top:0;left:0}.ck.ck-editor__editable .image-inline.ck-appear,.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image-inline .ck-progress-bar,.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}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-image/theme/imageuploadprogress.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadprogress.css\"],\"names\":[],\"mappings\":\"AAMC,qEAEC,iBACD,CAGA,uGAEC,iBAAkB,CAClB,KAAM,CACN,MACD,CCRC,yFACC,oBACD,CAID,uGAEC,UAAW,CACX,OAAQ,CACR,gDAAiD,CACjD,oBACD,CAGD,kBACC,GAAO,SAAY,CACnB,GAAO,SAAY,CACpB\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-editor__editable {\\n\\t& .image,\\n\\t& .image-inline {\\n\\t\\tposition: relative;\\n\\t}\\n\\n\\t/* Upload progress bar. */\\n\\t& .image .ck-progress-bar,\\n\\t& .image-inline .ck-progress-bar {\\n\\t\\tposition: absolute;\\n\\t\\ttop: 0;\\n\\t\\tleft: 0;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-editor__editable {\\n\\t& .image,\\n\\t& .image-inline {\\n\\t\\t/* Showing animation. */\\n\\t\\t&.ck-appear {\\n\\t\\t\\tanimation: fadeIn 700ms;\\n\\t\\t}\\n\\t}\\n\\n\\t/* Upload progress bar. */\\n\\t& .image .ck-progress-bar,\\n\\t& .image-inline .ck-progress-bar {\\n\\t\\theight: 2px;\\n\\t\\twidth: 0;\\n\\t\\tbackground: var(--ck-color-upload-bar-background);\\n\\t\\ttransition: width 100ms;\\n\\t}\\n}\\n\\n@keyframes fadeIn {\\n\\tfrom { opacity: 0; }\\n\\tto { opacity: 1; }\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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%}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-image/theme/textalternativeform.css\",\"webpack://./../ckeditor5-ui/theme/mixins/_rwd.css\"],\"names\":[],\"mappings\":\"AAOA,6BACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,oDACC,oBACD,CAEA,uCACC,YACD,CCZA,oCDCD,6BAcE,cAUF,CARE,oDACC,eACD,CAEA,wCACC,cACD,CCrBD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css\\\";\\n\\n.ck.ck-text-alternative-form {\\n\\tdisplay: flex;\\n\\tflex-direction: row;\\n\\tflex-wrap: nowrap;\\n\\n\\t& .ck-labeled-field-view {\\n\\t\\tdisplay: inline-block;\\n\\t}\\n\\n\\t& .ck-label {\\n\\t\\tdisplay: none;\\n\\t}\\n\\n\\t@mixin ck-media-phone {\\n\\t\\tflex-wrap: wrap;\\n\\n\\t\\t& .ck-labeled-field-view {\\n\\t\\t\\tflex-basis: 100%;\\n\\t\\t}\\n\\n\\t\\t& .ck-button {\\n\\t\\t\\tflex-basis: 50%;\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@define-mixin ck-media-phone {\\n\\t@media screen and (max-width: 600px) {\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid 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)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/link.css\"],\"names\":[],\"mappings\":\"AAMA,sBACC,mDAMD,CAHC,wCACC,yFACD,CAOD,4BACC,8CACD,CAGA,sCACC,WAAY,CACZ,gDAAiD,CACjD,iBAAkB,CAClB,oCACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/* Class added to span element surrounding currently selected link. */\\n.ck .ck-link_selected {\\n\\tbackground: var(--ck-color-link-selected-background);\\n\\n\\t/* Give linked inline images some outline to let the user know they are also part of the link. */\\n\\t& span.image-inline {\\n\\t\\toutline: var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background);\\n\\t}\\n}\\n\\n/*\\n * Classes used by the \\\"fake visual selection\\\" displayed in the content when an input\\n * in the link UI has focus (the browser does not render the native selection in this state).\\n */\\n.ck .ck-fake-link-selection {\\n\\tbackground: var(--ck-color-link-fake-selection);\\n}\\n\\n/* A collapsed fake visual selection. */\\n.ck .ck-fake-link-selection_collapsed {\\n\\theight: 100%;\\n\\tborder-right: 1px solid var(--ck-color-base-text);\\n\\tmargin-right: -1px;\\n\\toutline: solid 1px hsla(0, 0%, 100%, .5);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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 .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-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}[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 .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%}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview),[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-link/theme/linkactions.css\",\"webpack://./../ckeditor5-ui/theme/mixins/_rwd.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/linkactions.css\"],\"names\":[],\"mappings\":\"AAOA,oBACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,8CACC,oBAKD,CAHC,gEACC,eACD,CCXD,oCDCD,oBAcE,cAUF,CARE,8CACC,eACD,CAEA,8DACC,cACD,CCrBD,CCKA,wDACC,cAAe,CACf,eAmCD,CAjCC,0EACC,kCAAmC,CACnC,kCAAmC,CACnC,sBAAuB,CACvB,cAAe,CAIf,+BAAgC,CAChC,aAAc,CACd,iBAKD,CAHC,gFACC,yBACD,CAGD,mPAIC,eACD,CAEA,+DACC,eACD,CAGC,gFACC,yBACD,CAWD,qHACC,sCACD,CDvDD,oCC2DC,wDACC,8DAMD,CAJC,0EACC,WAAY,CACZ,cACD,CAGD,gJAME,aAEF,CD1ED\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css\\\";\\n\\n.ck.ck-link-actions {\\n\\tdisplay: flex;\\n\\tflex-direction: row;\\n\\tflex-wrap: nowrap;\\n\\n\\t& .ck-link-actions__preview {\\n\\t\\tdisplay: inline-block;\\n\\n\\t\\t& .ck-button__label {\\n\\t\\t\\toverflow: hidden;\\n\\t\\t}\\n\\t}\\n\\n\\t@mixin ck-media-phone {\\n\\t\\tflex-wrap: wrap;\\n\\n\\t\\t& .ck-link-actions__preview {\\n\\t\\t\\tflex-basis: 100%;\\n\\t\\t}\\n\\n\\t\\t& .ck-button:not(.ck-link-actions__preview) {\\n\\t\\t\\tflex-basis: 50%;\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@define-mixin ck-media-phone {\\n\\t@media screen and (max-width: 600px) {\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"@ckeditor/ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css\\\";\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css\\\";\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_dir.css\\\";\\n@import \\\"../mixins/_focus.css\\\";\\n@import \\\"../mixins/_shadow.css\\\";\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css\\\";\\n\\n.ck.ck-link-actions {\\n\\t& .ck-button.ck-link-actions__preview {\\n\\t\\tpadding-left: 0;\\n\\t\\tpadding-right: 0;\\n\\n\\t\\t& .ck-button__label {\\n\\t\\t\\tpadding: 0 var(--ck-spacing-medium);\\n\\t\\t\\tcolor: var(--ck-color-link-default);\\n\\t\\t\\ttext-overflow: ellipsis;\\n\\t\\t\\tcursor: pointer;\\n\\n\\t\\t\\t/* Match the box model of the link editor form's input so the balloon\\n\\t\\t\\tdoes not change width when moving between actions and the form. */\\n\\t\\t\\tmax-width: var(--ck-input-width);\\n\\t\\t\\tmin-width: 3em;\\n\\t\\t\\ttext-align: center;\\n\\n\\t\\t\\t&:hover {\\n\\t\\t\\t\\ttext-decoration: underline;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t&,\\n\\t\\t&:hover,\\n\\t\\t&:focus,\\n\\t\\t&:active {\\n\\t\\t\\tbackground: none;\\n\\t\\t}\\n\\n\\t\\t&:active {\\n\\t\\t\\tbox-shadow: none;\\n\\t\\t}\\n\\n\\t\\t&:focus {\\n\\t\\t\\t& .ck-button__label {\\n\\t\\t\\t\\ttext-decoration: underline;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t@mixin ck-dir ltr {\\n\\t\\t& .ck-button:not(:first-child) {\\n\\t\\t\\tmargin-left: var(--ck-spacing-standard);\\n\\t\\t}\\n\\t}\\n\\n\\t@mixin ck-dir rtl {\\n\\t\\t& .ck-button:not(:last-child) {\\n\\t\\t\\tmargin-left: var(--ck-spacing-standard);\\n\\t\\t}\\n\\t}\\n\\n\\t@mixin ck-media-phone {\\n\\t\\t& .ck-button.ck-link-actions__preview {\\n\\t\\t\\tmargin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\\n\\n\\t\\t\\t& .ck-button__label {\\n\\t\\t\\t\\tmin-width: 0;\\n\\t\\t\\t\\tmax-width: 100%;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t& .ck-button:not(.ck-link-actions__preview) {\\n\\t\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\t\\tmargin-left: 0;\\n\\t\\t\\t}\\n\\n\\t\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\t\\tmargin-left: 0;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{padding:0;min-width:var(--ck-input-width)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 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,[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:var(--ck-spacing-standard) var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{border:0;padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-link/theme/linkform.css\",\"webpack://./../ckeditor5-ui/theme/mixins/_rwd.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/linkform.css\"],\"names\":[],\"mappings\":\"AAOA,iBACC,YAiBD,CAfC,2BACC,YACD,CCNA,oCDCD,iBAQE,cAUF,CARE,wCACC,eACD,CAEA,4BACC,cACD,CCfD,CDuBD,iCACC,aAYD,CALE,wHAEC,mCACD,CE/BF,iCACC,SAAU,CACV,+BA8CD,CA5CC,wDACC,8EAMD,CAJC,uEACC,WAAY,CACZ,UACD,CAGD,4CACC,kCAAmC,CACnC,QAAS,CACT,eAAgB,CAChB,QAAS,CACT,gDAAiD,CACjD,SAaD,CAnBA,4GAaE,aAMF,CAJE,mEACC,kDACD,CAKF,6CACC,yDAWD,CATC,wEACC,QAAS,CACT,SAAU,CACV,UAKD,CAHC,8EACC,eACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css\\\";\\n\\n.ck.ck-link-form {\\n\\tdisplay: flex;\\n\\n\\t& .ck-label {\\n\\t\\tdisplay: none;\\n\\t}\\n\\n\\t@mixin ck-media-phone {\\n\\t\\tflex-wrap: wrap;\\n\\n\\t\\t& .ck-labeled-field-view {\\n\\t\\t\\tflex-basis: 100%;\\n\\t\\t}\\n\\n\\t\\t& .ck-button {\\n\\t\\t\\tflex-basis: 50%;\\n\\t\\t}\\n\\t}\\n}\\n\\n/*\\n * Style link form differently when manual decorators are available.\\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\\n */\\n.ck.ck-link-form_layout-vertical {\\n\\tdisplay: block;\\n\\n\\t/*\\n\\t * Whether the form is in the responsive mode or not, if there are decorator buttons\\n\\t * keep the top margin of action buttons medium.\\n\\t */\\n\\t& .ck-button {\\n\\t\\t&.ck-button-save,\\n\\t\\t&.ck-button-cancel {\\n\\t\\t\\tmargin-top: var(--ck-spacing-medium);\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@define-mixin ck-media-phone {\\n\\t@media screen and (max-width: 600px) {\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_dir.css\\\";\\n\\n/*\\n * Style link form differently when manual decorators are available.\\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\\n */\\n.ck.ck-link-form_layout-vertical {\\n\\tpadding: 0;\\n\\tmin-width: var(--ck-input-width);\\n\\n\\t& .ck-labeled-field-view {\\n\\t\\tmargin: var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small);\\n\\n\\t\\t& .ck-input-text {\\n\\t\\t\\tmin-width: 0;\\n\\t\\t\\twidth: 100%;\\n\\t\\t}\\n\\t}\\n\\n\\t& .ck-button {\\n\\t\\tpadding: var(--ck-spacing-standard);\\n\\t\\tmargin: 0;\\n\\t\\tborder-radius: 0;\\n\\t\\tborder: 0;\\n\\t\\tborder-top: 1px solid var(--ck-color-base-border);\\n\\t\\twidth: 50%;\\n\\n\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\tmargin-left: 0;\\n\\t\\t}\\n\\n\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\tmargin-left: 0;\\n\\n\\t\\t\\t&:last-of-type {\\n\\t\\t\\t\\tborder-right: 1px solid var(--ck-color-base-border);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t/* Using additional `.ck` class for stronger CSS specificity than `.ck.ck-link-form > :not(:first-child)`. */\\n\\t& .ck.ck-list {\\n\\t\\tmargin: var(--ck-spacing-standard) var(--ck-spacing-large);\\n\\n\\t\\t& .ck-button.ck-switchbutton {\\n\\t\\t\\tborder: 0;\\n\\t\\t\\tpadding: 0;\\n\\t\\t\\twidth: 100%;\\n\\n\\t\\t\\t&:hover {\\n\\t\\t\\t\\tbackground: none;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-collapsible.ck-collapsible_collapsed>.ck-collapsible__children{display:none}:root{--ck-collapsible-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-collapsible>.ck.ck-button{width:100%;font-weight:700;padding:var(--ck-spacing-medium) var(--ck-spacing-large);border-radius:0}.ck.ck-collapsible>.ck.ck-button:focus{background:transparent}.ck.ck-collapsible>.ck.ck-button:active,.ck.ck-collapsible>.ck.ck-button:hover:not(:focus),.ck.ck-collapsible>.ck.ck-button:not(:focus){background:transparent;border-color:transparent;box-shadow:none}.ck.ck-collapsible>.ck.ck-button>.ck-icon{margin-right:var(--ck-spacing-medium);width:var(--ck-collapsible-arrow-size)}.ck.ck-collapsible>.ck-collapsible__children{padding:0 var(--ck-spacing-large) var(--ck-spacing-large)}.ck.ck-collapsible.ck-collapsible_collapsed>.ck.ck-button .ck-icon{transform:rotate(-90deg)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-list/theme/collapsible.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-list/collapsible.css\"],\"names\":[],\"mappings\":\"AAMC,sEACC,YACD,CCHD,MACC,yDACD,CAGC,iCACC,UAAW,CACX,eAAiB,CACjB,wDAAyD,CACzD,eAgBD,CAdC,uCACC,sBACD,CAEA,wIACC,sBAAuB,CACvB,wBAAyB,CACzB,eACD,CAEA,0CACC,qCAAsC,CACtC,sCACD,CAGD,6CACC,yDACD,CAGC,mEACC,wBACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-collapsible.ck-collapsible_collapsed {\\n\\t& > .ck-collapsible__children {\\n\\t\\tdisplay: none;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-collapsible-arrow-size: calc(0.5 * var(--ck-icon-size));\\n}\\n\\n.ck.ck-collapsible {\\n\\t& > .ck.ck-button {\\n\\t\\twidth: 100%;\\n\\t\\tfont-weight: bold;\\n\\t\\tpadding: var(--ck-spacing-medium) var(--ck-spacing-large);\\n\\t\\tborder-radius: 0;\\n\\n\\t\\t&:focus {\\n\\t\\t\\tbackground: transparent;\\n\\t\\t}\\n\\n\\t\\t&:active, &:not(:focus), &:hover:not(:focus) {\\n\\t\\t\\tbackground: transparent;\\n\\t\\t\\tborder-color: transparent;\\n\\t\\t\\tbox-shadow: none;\\n\\t\\t}\\n\\n\\t\\t& > .ck-icon {\\n\\t\\t\\tmargin-right: var(--ck-spacing-medium);\\n\\t\\t\\twidth: var(--ck-collapsible-arrow-size);\\n\\t\\t}\\n\\t}\\n\\n\\t& > .ck-collapsible__children {\\n\\t\\tpadding: 0 var(--ck-spacing-large) var(--ck-spacing-large);\\n\\t}\\n\\n\\t&.ck-collapsible_collapsed {\\n\\t\\t& > .ck.ck-button .ck-icon {\\n\\t\\t\\ttransform: rotate(-90deg);\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-list-properties.ck-list-properties_without-styles{padding:var(--ck-spacing-large)}.ck.ck-list-properties.ck-list-properties_without-styles>*{min-width:14em}.ck.ck-list-properties.ck-list-properties_without-styles>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-list-styles-list{grid-template-columns:repeat(4,auto)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*{width:100%}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties .ck.ck-numbered-list-properties__start-index .ck-input{min-width:auto;width:100%}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order{background:transparent;padding-left:0;padding-right:0;margin-bottom:calc(var(--ck-spacing-tiny)*-1)}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:active,.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:hover{box-shadow:none;border-color:transparent;background:none}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-list/listproperties.css\"],\"names\":[],\"mappings\":\"AAOC,yDACC,+BASD,CAPC,2DACC,cAKD,CAHC,6DACC,qCACD,CASD,wFACC,oCACD,CAGA,mFACC,gDAWD,CARE,+GACC,UAKD,CAHC,iHACC,qCACD,CAMJ,8EACC,cAAe,CACf,UACD,CAEA,uEACC,sBAAuB,CACvB,cAAe,CACf,eAAgB,CAChB,6CAOD,CALC,2JACC,eAAgB,CAChB,wBAAyB,CACzB,eACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-list-properties {\\n\\t/* When there are no list styles and there is no collapsible. */\\n\\t&.ck-list-properties_without-styles {\\n\\t\\tpadding: var(--ck-spacing-large);\\n\\n\\t\\t& > * {\\n\\t\\t\\tmin-width: 14em;\\n\\n\\t\\t\\t& + * {\\n\\t\\t\\t\\tmargin-top: var(--ck-spacing-standard);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t/*\\n\\t * When the numbered list property fields (start at, reversed) should be displayed,\\n\\t * more horizontal space is needed. Reconfigure the style grid to create that space.\\n\\t */\\n\\t&.ck-list-properties_with-numbered-properties {\\n\\t\\t& > .ck-list-styles-list {\\n\\t\\t\\tgrid-template-columns: repeat( 4, auto );\\n\\t\\t}\\n\\n\\t\\t/* When list styles are rendered and property fields are in a collapsible. */\\n\\t\\t& > .ck-collapsible {\\n\\t\\t\\tborder-top: 1px solid var(--ck-color-base-border);\\n\\n\\t\\t\\t& > .ck-collapsible__children {\\n\\t\\t\\t\\t& > * {\\n\\t\\t\\t\\t\\twidth: 100%;\\n\\n\\t\\t\\t\\t\\t& + * {\\n\\t\\t\\t\\t\\t\\tmargin-top: var(--ck-spacing-standard);\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t& .ck.ck-numbered-list-properties__start-index .ck-input {\\n\\t\\tmin-width: auto;\\n\\t\\twidth: 100%;\\n\\t}\\n\\n\\t& .ck.ck-numbered-list-properties__reversed-order {\\n\\t\\tbackground: transparent;\\n\\t\\tpadding-left: 0;\\n\\t\\tpadding-right: 0;\\n\\t\\tmargin-bottom: calc(-1 * var(--ck-spacing-tiny));\\n\\n\\t\\t&:active, &:hover {\\n\\t\\t\\tbox-shadow: none;\\n\\t\\t\\tborder-color: transparent;\\n\\t\\t\\tbackground: none;\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-list-styles-list{display:grid}:root{--ck-list-style-button-size:44px}.ck.ck-list-styles-list{grid-template-columns:repeat(3,auto);row-gap:var(--ck-spacing-medium);column-gap:var(--ck-spacing-medium);padding:var(--ck-spacing-large)}.ck.ck-list-styles-list .ck-button{padding:0;margin:0;box-sizing:content-box}.ck.ck-list-styles-list .ck-button,.ck.ck-list-styles-list .ck-button .ck-icon{width:var(--ck-list-style-button-size);height:var(--ck-list-style-button-size)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-list/theme/liststyles.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-list/liststyles.css\"],\"names\":[],\"mappings\":\"AAKA,wBACC,YACD,CCFA,MACC,gCACD,CAEA,wBACC,oCAAwC,CACxC,gCAAiC,CACjC,mCAAoC,CACpC,+BA0BD,CAxBC,mCAIC,SAAU,CAMV,QAAS,CAOT,sBAMD,CAJC,+EAjBA,sCAAuC,CACvC,uCAmBA\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-list-styles-list {\\n\\tdisplay: grid;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-list-style-button-size: 44px;\\n}\\n\\n.ck.ck-list-styles-list {\\n\\tgrid-template-columns: repeat( 3, auto );\\n\\trow-gap: var(--ck-spacing-medium);\\n\\tcolumn-gap: var(--ck-spacing-medium);\\n\\tpadding: var(--ck-spacing-large);\\n\\n\\t& .ck-button {\\n\\t\\t/* Make the button look like a thumbnail (the icon \\\"takes it all\\\"). */\\n\\t\\twidth: var(--ck-list-style-button-size);\\n\\t\\theight: var(--ck-list-style-button-size);\\n\\t\\tpadding: 0;\\n\\n\\t\\t/*\\n\\t\\t * Buttons are aligned by the grid so disable default button margins to not collide with the\\n\\t\\t * gaps in the grid.\\n\\t\\t */\\n\\t\\tmargin: 0;\\n\\n\\t\\t/*\\n\\t\\t * Make sure the button border (which is displayed on focus, BTW) does not steal pixels\\n\\t\\t * from the button dimensions and, as a result, decrease the size of the icon\\n\\t\\t * (which becomes blurry as it scales down).\\n\\t\\t */\\n\\t\\tbox-sizing: content-box;\\n\\n\\t\\t& .ck-icon {\\n\\t\\t\\twidth: var(--ck-list-style-button-size);\\n\\t\\t\\theight: var(--ck-list-style-button-size);\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":root{--ck-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px}.ck-content .todo-list li .todo-list{margin-top:5px}.ck-content .todo-list .todo-list__label>input{-webkit-appearance:none;display:inline-block;position:relative;width:var(--ck-todo-list-checkmark-size);height:var(--ck-todo-list-checkmark-size);vertical-align:middle;border:0;left:-25px;margin-right:-15px;right:0;margin-left:0}.ck-content .todo-list .todo-list__label>input:before{display:block;position:absolute;box-sizing:border-box;content:\\\"\\\";width:100%;height:100%;border:1px solid #333;border-radius:2px;transition:box-shadow .25s ease-in-out,background .25s ease-in-out,border .25s ease-in-out}.ck-content .todo-list .todo-list__label>input:after{display:block;position:absolute;box-sizing:content-box;pointer-events:none;content:\\\"\\\";left:calc(var(--ck-todo-list-checkmark-size)/3);top:calc(var(--ck-todo-list-checkmark-size)/5.3);width:calc(var(--ck-todo-list-checkmark-size)/5.3);height:calc(var(--ck-todo-list-checkmark-size)/2.6);border-left:0 solid transparent;border-bottom:calc(var(--ck-todo-list-checkmark-size)/8) solid transparent;border-right:calc(var(--ck-todo-list-checkmark-size)/8) solid transparent;border-top:0 solid transparent;transform:rotate(45deg)}.ck-content .todo-list .todo-list__label>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-content .todo-list .todo-list__label>input[checked]:after{border-color:#fff}.ck-content .todo-list .todo-list__label .todo-list__label__description{vertical-align:middle}[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-right:0;right:-25px;margin-left:-15px}.ck-editor__editable .todo-list .todo-list__label>input{cursor:pointer}.ck-editor__editable .todo-list .todo-list__label>input:hover:before{box-shadow:0 0 0 5px rgba(0,0,0,.1)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-list/theme/todolist.css\"],\"names\":[],\"mappings\":\"AAKA,MACC,kCACD,CAEA,uBACC,eA0ED,CAxEC,0BACC,iBAKD,CAHC,qCACC,cACD,CAIA,+CACC,uBAAwB,CACxB,oBAAqB,CACrB,iBAAkB,CAClB,wCAAyC,CACzC,yCAA0C,CAC1C,qBAAsB,CAGtB,QAAS,CAGT,UAAW,CACX,kBAAmB,CACnB,OAAQ,CACR,aA0CD,CAxCC,sDACC,aAAc,CACd,iBAAkB,CAClB,qBAAsB,CACtB,UAAW,CACX,UAAW,CACX,WAAY,CACZ,qBAAiC,CACjC,iBAAkB,CAClB,0FACD,CAEA,qDACC,aAAc,CACd,iBAAkB,CAClB,sBAAuB,CACvB,mBAAoB,CACpB,UAAW,CAGX,+CAAoD,CACpD,gDAAqD,CACrD,kDAAuD,CACvD,mDAAwD,CAGxD,+BAA+G,CAA/G,0EAA+G,CAA/G,yEAA+G,CAA/G,8BAA+G,CAC/G,uBACD,CAGC,+DACC,kBAA8B,CAC9B,oBACD,CAEA,8DACC,iBACD,CAIF,wEACC,qBACD,CAKF,6CACC,MAAO,CACP,cAAe,CACf,WAAY,CACZ,iBACD,CAMA,wDACC,cAKD,CAHC,qEACC,mCACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-todo-list-checkmark-size: 16px;\\n}\\n\\n.ck-content .todo-list {\\n\\tlist-style: none;\\n\\n\\t& li {\\n\\t\\tmargin-bottom: 5px;\\n\\n\\t\\t& .todo-list {\\n\\t\\t\\tmargin-top: 5px;\\n\\t\\t}\\n\\t}\\n\\n\\t& .todo-list__label {\\n\\t\\t& > input {\\n\\t\\t\\t-webkit-appearance: none;\\n\\t\\t\\tdisplay: inline-block;\\n\\t\\t\\tposition: relative;\\n\\t\\t\\twidth: var(--ck-todo-list-checkmark-size);\\n\\t\\t\\theight: var(--ck-todo-list-checkmark-size);\\n\\t\\t\\tvertical-align: middle;\\n\\n\\t\\t\\t/* Needed on iOS */\\n\\t\\t\\tborder: 0;\\n\\n\\t\\t\\t/* LTR styles */\\n\\t\\t\\tleft: -25px;\\n\\t\\t\\tmargin-right: -15px;\\n\\t\\t\\tright: 0;\\n\\t\\t\\tmargin-left: 0;\\n\\n\\t\\t\\t&::before {\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\tposition: absolute;\\n\\t\\t\\t\\tbox-sizing: border-box;\\n\\t\\t\\t\\tcontent: '';\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\theight: 100%;\\n\\t\\t\\t\\tborder: 1px solid hsl(0, 0%, 20%);\\n\\t\\t\\t\\tborder-radius: 2px;\\n\\t\\t\\t\\ttransition: 250ms ease-in-out box-shadow, 250ms ease-in-out background, 250ms ease-in-out border;\\n\\t\\t\\t}\\n\\n\\t\\t\\t&::after {\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\tposition: absolute;\\n\\t\\t\\t\\tbox-sizing: content-box;\\n\\t\\t\\t\\tpointer-events: none;\\n\\t\\t\\t\\tcontent: '';\\n\\n\\t\\t\\t\\t/* Calculate tick position, size and border-width proportional to the checkmark size. */\\n\\t\\t\\t\\tleft: calc( var(--ck-todo-list-checkmark-size) / 3 );\\n\\t\\t\\t\\ttop: calc( var(--ck-todo-list-checkmark-size) / 5.3 );\\n\\t\\t\\t\\twidth: calc( var(--ck-todo-list-checkmark-size) / 5.3 );\\n\\t\\t\\t\\theight: calc( var(--ck-todo-list-checkmark-size) / 2.6 );\\n\\t\\t\\t\\tborder-style: solid;\\n\\t\\t\\t\\tborder-color: transparent;\\n\\t\\t\\t\\tborder-width: 0 calc( var(--ck-todo-list-checkmark-size) / 8 ) calc( var(--ck-todo-list-checkmark-size) / 8 ) 0;\\n\\t\\t\\t\\ttransform: rotate(45deg);\\n\\t\\t\\t}\\n\\n\\t\\t\\t&[checked] {\\n\\t\\t\\t\\t&::before {\\n\\t\\t\\t\\t\\tbackground: hsl(126, 64%, 41%);\\n\\t\\t\\t\\t\\tborder-color: hsl(126, 64%, 41%);\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t&::after {\\n\\t\\t\\t\\t\\tborder-color: hsl(0, 0%, 100%);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t& .todo-list__label__description {\\n\\t\\t\\tvertical-align: middle;\\n\\t\\t}\\n\\t}\\n}\\n\\n/* RTL styles */\\n[dir=\\\"rtl\\\"] .todo-list .todo-list__label > input {\\n\\tleft: 0;\\n\\tmargin-right: 0;\\n\\tright: -25px;\\n\\tmargin-left: -15px;\\n}\\n\\n/*\\n * To-do list should be interactive only during the editing\\n * (https://github.com/ckeditor/ckeditor5/issues/2090).\\n */\\n.ck-editor__editable .todo-list .todo-list__label > input {\\n\\tcursor: pointer;\\n\\n\\t&:hover::before {\\n\\t\\tbox-shadow: 0 0 0 5px hsla(0, 0%, 0%, 0.1);\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-input-color{width:100%;display:flex;flex-direction:row-reverse}.ck.ck-input-color>input.ck.ck-input-text{min-width:auto;flex-grow:1}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button{display:flex}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{position:relative;overflow:hidden}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{position:absolute;display:block}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-left-width:0;border-top-left-radius:0;border-bottom-left-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-right-width:0;border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border-radius:0}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{width:20px;height:20px;border:1px solid var(--ck-color-input-border)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{top:-30%;left:50%;height:150%;width:8%;background:red;border-radius:2px;transform:rotate(45deg);transform-origin:50%}.ck.ck-input-color .ck.ck-input-color__remove-color{width:100%;border-bottom:1px solid var(--ck-color-input-border);padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);border-bottom-left-radius:0;border-bottom-right-radius:0}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:0;margin-left:var(--ck-spacing-standard)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-table/theme/colorinput.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/colorinput.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css\"],\"names\":[],\"mappings\":\"AAKA,mBACC,UAAW,CACX,YAAa,CACb,0BA8BD,CA5BC,0CACC,cAAe,CACf,WACD,CAEA,sCACC,cAMD,CAHC,kFACC,YACD,CAGD,8CAEC,YAWD,CATC,kFACC,iBAAkB,CAClB,eAMD,CAJC,0IACC,iBAAkB,CAClB,aACD,CC1BF,+CAEE,yBAA0B,CAC1B,4BAOF,CAVA,+CAOE,wBAAyB,CACzB,2BAEF,CAGC,wEACC,SAoCD,CArCA,kFAIE,mBAAoB,CACpB,wBAAyB,CACzB,2BA+BF,CArCA,kFAUE,oBAAqB,CACrB,yBAA0B,CAC1B,4BAyBF,CAtBC,oFACC,oDACD,CAEA,4GC9BF,eD+CE,CAjBA,+PC1BD,qCD2CC,CAjBA,4GAGC,UAAW,CACX,WAAY,CACZ,6CAYD,CAVC,oKACC,QAAS,CACT,QAAS,CACT,WAAY,CACZ,QAAS,CACT,cAA6B,CAC7B,iBAAkB,CAClB,uBAAwB,CACxB,oBACD,CAKH,oDACC,UAAW,CACX,oDAAqD,CACrD,qEAAwE,CAExE,2BAA4B,CAC5B,4BAkBD,CAxBA,8DASE,yBAeF,CAxBA,8DAaE,wBAWF,CARC,gEACC,uCAMD,CAPA,0EAIE,cAAe,CACf,sCAEF\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-input-color {\\n\\twidth: 100%;\\n\\tdisplay: flex;\\n\\tflex-direction: row-reverse;\\n\\n\\t& > input.ck.ck-input-text {\\n\\t\\tmin-width: auto;\\n\\t\\tflex-grow: 1;\\n\\t}\\n\\n\\t& > div.ck.ck-dropdown {\\n\\t\\tmin-width: auto;\\n\\n\\t\\t/* This dropdown has no arrow but a color preview instead. */\\n\\t\\t& > .ck-input-color__button .ck-dropdown__arrow {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t}\\n\\n\\t& .ck.ck-input-color__button {\\n\\t\\t/* Resolving issue with misaligned buttons on Safari (see #10589) */\\n\\t\\tdisplay: flex;\\n\\n\\t\\t& .ck.ck-input-color__button__preview {\\n\\t\\t\\tposition: relative;\\n\\t\\t\\toverflow: hidden;\\n\\n\\t\\t\\t& > .ck.ck-input-color__button__preview__no-color-indicator {\\n\\t\\t\\t\\tposition: absolute;\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_dir.css\\\";\\n@import \\\"../mixins/_rounded.css\\\";\\n\\n.ck.ck-input-color {\\n\\t& > .ck.ck-input-text {\\n\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\tborder-top-right-radius: 0;\\n\\t\\t\\tborder-bottom-right-radius: 0;\\n\\t\\t}\\n\\n\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\tborder-top-left-radius: 0;\\n\\t\\t\\tborder-bottom-left-radius: 0;\\n\\t\\t}\\n\\t}\\n\\n\\t& > .ck.ck-dropdown {\\n\\t\\t& > .ck.ck-button.ck-input-color__button {\\n\\t\\t\\tpadding: 0;\\n\\n\\t\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\t\\tborder-left-width: 0;\\n\\t\\t\\t\\tborder-top-left-radius: 0;\\n\\t\\t\\t\\tborder-bottom-left-radius: 0;\\n\\t\\t\\t}\\n\\n\\t\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\t\\tborder-right-width: 0;\\n\\t\\t\\t\\tborder-top-right-radius: 0;\\n\\t\\t\\t\\tborder-bottom-right-radius: 0;\\n\\t\\t\\t}\\n\\n\\t\\t\\t&.ck-disabled {\\n\\t\\t\\t\\tbackground: var(--ck-color-input-disabled-background);\\n\\t\\t\\t}\\n\\n\\t\\t\\t& > .ck.ck-input-color__button__preview {\\n\\t\\t\\t\\t@mixin ck-rounded-corners;\\n\\n\\t\\t\\t\\twidth: 20px;\\n\\t\\t\\t\\theight: 20px;\\n\\t\\t\\t\\tborder: 1px solid var(--ck-color-input-border);\\n\\n\\t\\t\\t\\t& > .ck.ck-input-color__button__preview__no-color-indicator {\\n\\t\\t\\t\\t\\ttop: -30%;\\n\\t\\t\\t\\t\\tleft: 50%;\\n\\t\\t\\t\\t\\theight: 150%;\\n\\t\\t\\t\\t\\twidth: 8%;\\n\\t\\t\\t\\t\\tbackground: hsl(0, 100%, 50%);\\n\\t\\t\\t\\t\\tborder-radius: 2px;\\n\\t\\t\\t\\t\\ttransform: rotate(45deg);\\n\\t\\t\\t\\t\\ttransform-origin: 50%;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t& .ck.ck-input-color__remove-color {\\n\\t\\twidth: 100%;\\n\\t\\tborder-bottom: 1px solid var(--ck-color-input-border);\\n\\t\\tpadding: calc(var(--ck-spacing-standard) / 2) var(--ck-spacing-standard);\\n\\n\\t\\tborder-bottom-left-radius: 0;\\n\\t\\tborder-bottom-right-radius: 0;\\n\\n\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\tborder-top-right-radius: 0;\\n\\t\\t}\\n\\n\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\tborder-top-left-radius: 0;\\n\\t\\t}\\n\\n\\t\\t& .ck.ck-icon {\\n\\t\\t\\tmargin-right: var(--ck-spacing-standard);\\n\\n\\t\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\t\\tmargin-right: 0;\\n\\t\\t\\t\\tmargin-left: var(--ck-spacing-standard);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Implements rounded corner interface for .ck-rounded-corners class.\\n *\\n * @see $ck-border-radius\\n */\\n@define-mixin ck-rounded-corners {\\n\\tborder-radius: 0;\\n\\n\\t@nest .ck-rounded-corners &,\\n\\t&.ck-rounded-corners {\\n\\t\\tborder-radius: var(--ck-border-radius);\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/form.css\"],\"names\":[],\"mappings\":\"AAKA,YACC,mCAyBD,CAvBC,kBAEC,YACD,CAEA,8BACC,cAAe,CACf,OACD,CAEA,4BACC,cAWD,CARE,6DACC,4CACD,CAEA,mEACC,UACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-form {\\n\\tpadding: 0 0 var(--ck-spacing-large);\\n\\n\\t&:focus {\\n\\t\\t/* See: https://github.com/ckeditor/ckeditor5/issues/4773 */\\n\\t\\toutline: none;\\n\\t}\\n\\n\\t& .ck.ck-input-text {\\n\\t\\tmin-width: 100%;\\n\\t\\twidth: 0;\\n\\t}\\n\\n\\t& .ck.ck-dropdown {\\n\\t\\tmin-width: 100%;\\n\\n\\t\\t& .ck-dropdown__button {\\n\\t\\t\\t&:not(:focus) {\\n\\t\\t\\t\\tborder: 1px solid var(--ck-color-base-border);\\n\\t\\t\\t}\\n\\n\\t\\t\\t& .ck-button__label {\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}[dir=ltr] .ck.ck-form__row>:not(.ck-label)+*{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-form__row>:not(.ck-label)+*{margin-right:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{width:100%;min-width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-table/theme/formrow.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/formrow.css\"],\"names\":[],\"mappings\":\"AAKA,iBACC,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,6BAaD,CAVC,iCACC,WACD,CAGC,wHAEC,sBACD,CCbF,iBACC,4DA2BD,CAvBE,6CAEE,mCAMF,CARA,6CAME,oCAEF,CAGD,2BACC,UAAW,CACX,cACD,CAEA,2CACC,kCAKD,CAHC,wEACC,0BACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-form__row {\\n\\tdisplay: flex;\\n\\tflex-direction: row;\\n\\tflex-wrap: nowrap;\\n\\tjustify-content: space-between;\\n\\n\\t/* Ignore labels that work as fieldset legends */\\n\\t& > *:not(.ck-label) {\\n\\t\\tflex-grow: 1;\\n\\t}\\n\\n\\t&.ck-table-form__action-row {\\n\\t\\t& .ck-button-save,\\n\\t\\t& .ck-button-cancel {\\n\\t\\t\\tjustify-content: center;\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_dir.css\\\";\\n\\n.ck.ck-form__row {\\n\\tpadding: var(--ck-spacing-standard) var(--ck-spacing-large) 0;\\n\\n\\t/* Ignore labels that work as fieldset legends */\\n\\t& > *:not(.ck-label) {\\n\\t\\t& + * {\\n\\t\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\t\\tmargin-left: var(--ck-spacing-large);\\n\\t\\t\\t}\\n\\n\\t\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\t\\tmargin-right: var(--ck-spacing-large);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t& > .ck-label {\\n\\t\\twidth: 100%;\\n\\t\\tmin-width: 100%;\\n\\t}\\n\\n\\t&.ck-table-form__action-row {\\n\\t\\tmargin-top: var(--ck-spacing-large);\\n\\n\\t\\t& .ck-button .ck-button__label {\\n\\t\\t\\tcolor: var(--ck-color-text);\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-table/theme/inserttable.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/inserttable.css\"],\"names\":[],\"mappings\":\"AAKA,oCACC,YAAa,CACb,kBAAmB,CACnB,cACD,CCJA,MACC,uCAAwC,CACxC,0CAA2C,CAC3C,yCAA0C,CAC1C,yCACD,CAEA,oCAEC,oJAA2J,CAC3J,yFACD,CAEA,qCACC,iBACD,CAEA,uCACC,+CAAgD,CAChD,iDAAkD,CAClD,iDAAkD,CAClD,4CAA6C,CAC7C,iBAMD,CAJC,6CACC,yCAA0C,CAC1C,6CACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck .ck-insert-table-dropdown__grid {\\n\\tdisplay: flex;\\n\\tflex-direction: row;\\n\\tflex-wrap: wrap;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-insert-table-dropdown-padding: 10px;\\n\\t--ck-insert-table-dropdown-box-height: 11px;\\n\\t--ck-insert-table-dropdown-box-width: 12px;\\n\\t--ck-insert-table-dropdown-box-margin: 1px;\\n}\\n\\n.ck .ck-insert-table-dropdown__grid {\\n\\t/* The width of a container should match 10 items in a row so there will be a 10x10 grid. */\\n\\twidth: calc(var(--ck-insert-table-dropdown-box-width) * 10 + var(--ck-insert-table-dropdown-box-margin) * 20 + var(--ck-insert-table-dropdown-padding) * 2);\\n\\tpadding: var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;\\n}\\n\\n.ck .ck-insert-table-dropdown__label {\\n\\ttext-align: center;\\n}\\n\\n.ck .ck-insert-table-dropdown-grid-box {\\n\\twidth: var(--ck-insert-table-dropdown-box-width);\\n\\theight: var(--ck-insert-table-dropdown-box-height);\\n\\tmargin: var(--ck-insert-table-dropdown-box-margin);\\n\\tborder: 1px solid var(--ck-color-base-border);\\n\\tborder-radius: 1px;\\n\\n\\t&.ck-on {\\n\\t\\tborder-color: var(--ck-color-focus-border);\\n\\t\\tbackground: var(--ck-color-focus-outer-shadow);\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck-content .table{margin:.9em 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}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-table/theme/table.css\"],\"names\":[],\"mappings\":\"AAKA,mBAIC,gBAAkB,CAClB,aAgCD,CA9BC,yBAEC,wBAAyB,CACzB,gBAAiB,CAIjB,UAAW,CACX,WAAY,CAIZ,yBAiBD,CAfC,wDAEC,aAAc,CACd,YAAa,CAKb,wBACD,CAEA,4BACC,eAAiB,CACjB,2BACD,CAMF,+BACC,gBACD,CAEA,+BACC,eACD,CAEA,+CAKC,oBAAqB,CAMrB,UACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck-content .table {\\n\\t/* Give the table widget some air and center it horizontally */\\n\\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\\n\\tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\\n\\tmargin: 0.9em auto;\\n\\tdisplay: table;\\n\\n\\t& table {\\n\\t\\t/* The table cells should have slight borders */\\n\\t\\tborder-collapse: collapse;\\n\\t\\tborder-spacing: 0;\\n\\n\\t\\t/* Table width and height are set on the parent <figure>. Make sure the table inside stretches\\n\\t\\tto the full dimensions of the container (https://github.com/ckeditor/ckeditor5/issues/6186). */\\n\\t\\twidth: 100%;\\n\\t\\theight: 100%;\\n\\n\\t\\t/* The outer border of the table should be slightly darker than the inner lines.\\n\\t\\tAlso see https://github.com/ckeditor/ckeditor5-table/issues/50. */\\n\\t\\tborder: 1px double hsl(0, 0%, 70%);\\n\\n\\t\\t& td,\\n\\t\\t& th {\\n\\t\\t\\tmin-width: 2em;\\n\\t\\t\\tpadding: .4em;\\n\\n\\t\\t\\t/* The border is inherited from .ck-editor__nested-editable styles, so theoretically it's not necessary here.\\n\\t\\t\\tHowever, the border is a content style, so it should use .ck-content (so it works outside the editor).\\n\\t\\t\\tHence, the duplication. See https://github.com/ckeditor/ckeditor5/issues/6314 */\\n\\t\\t\\tborder: 1px solid hsl(0, 0%, 75%);\\n\\t\\t}\\n\\n\\t\\t& th {\\n\\t\\t\\tfont-weight: bold;\\n\\t\\t\\tbackground: hsla(0, 0%, 0%, 5%);\\n\\t\\t}\\n\\t}\\n}\\n\\n/* Text alignment of the table header should match the editor settings and override the native browser styling,\\nwhen content is available outside the editor. See https://github.com/ckeditor/ckeditor5/issues/6638 */\\n.ck-content[dir=\\\"rtl\\\"] .table th {\\n\\ttext-align: right;\\n}\\n\\n.ck-content[dir=\\\"ltr\\\"] .table th {\\n\\ttext-align: left;\\n}\\n\\n.ck-editor__editable .ck-table-bogus-paragraph {\\n\\t/*\\n\\t * Use display:inline-block to force Chrome/Safari to limit text mutations to this element.\\n\\t * See https://github.com/ckeditor/ckeditor5/issues/6062.\\n\\t */\\n\\tdisplay: inline-block;\\n\\n\\t/*\\n\\t * Inline HTML elements nested in the span should always be dimensioned in relation to the whole cell width.\\n\\t * See https://github.com/ckeditor/ckeditor5/issues/9117.\\n\\t */\\n\\twidth: 100%;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":root{--ck-color-table-caption-background:#f7f7f7;--ck-color-table-caption-text:#333;--ck-color-table-caption-highlighted-background:hsl(52deg 100% 50%)}.ck-content .table>figcaption{display:table-caption;caption-side:top;word-break:break-word;text-align:center;color:var(--ck-color-table-caption-text);background-color:var(--ck-color-table-caption-background);padding:.6em;font-size:.75em;outline-offset:-1px}.ck.ck-editor__editable .table>figcaption.table__caption_highlighted{animation:ck-table-caption-highlight .6s ease-out}.ck.ck-editor__editable .table>figcaption.ck-placeholder:before{padding-left:inherit;padding-right:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@keyframes ck-table-caption-highlight{0%{background-color:var(--ck-color-table-caption-highlighted-background)}to{background-color:var(--ck-color-table-caption-background)}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-table/theme/tablecaption.css\"],\"names\":[],\"mappings\":\"AAKA,MACC,2CAAoD,CACpD,kCAA8C,CAC9C,mEACD,CAGA,8BACC,qBAAsB,CACtB,gBAAiB,CACjB,qBAAsB,CACtB,iBAAkB,CAClB,wCAAyC,CACzC,yDAA0D,CAC1D,YAAa,CACb,eAAgB,CAChB,mBACD,CAIC,qEACC,iDACD,CAEA,gEACC,oBAAqB,CACrB,qBAAsB,CAMtB,kBAAmB,CACnB,eAAgB,CAChB,sBACD,CAGD,sCACC,GACC,qEACD,CAEA,GACC,yDACD,CACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-color-table-caption-background: hsl(0, 0%, 97%);\\n\\t--ck-color-table-caption-text: hsl(0, 0%, 20%);\\n\\t--ck-color-table-caption-highlighted-background: hsl(52deg 100% 50%);\\n}\\n\\n/* Content styles */\\n.ck-content .table > figcaption {\\n\\tdisplay: table-caption;\\n\\tcaption-side: top;\\n\\tword-break: break-word;\\n\\ttext-align: center;\\n\\tcolor: var(--ck-color-table-caption-text);\\n\\tbackground-color: var(--ck-color-table-caption-background);\\n\\tpadding: .6em;\\n\\tfont-size: .75em;\\n\\toutline-offset: -1px;\\n}\\n\\n/* Editing styles */\\n.ck.ck-editor__editable .table > figcaption {\\n\\t&.table__caption_highlighted {\\n\\t\\tanimation: ck-table-caption-highlight .6s ease-out;\\n\\t}\\n\\n\\t&.ck-placeholder::before {\\n\\t\\tpadding-left: inherit;\\n\\t\\tpadding-right: inherit;\\n\\n\\t\\t/*\\n\\t\\t * Make sure the table caption placeholder doesn't overflow the placeholder area.\\n\\t\\t * See https://github.com/ckeditor/ckeditor5/issues/9162.\\n\\t\\t */\\n\\t\\twhite-space: nowrap;\\n\\t\\toverflow: hidden;\\n\\t\\ttext-overflow: ellipsis;\\n\\t}\\n}\\n\\n@keyframes ck-table-caption-highlight {\\n\\t0% {\\n\\t\\tbackground-color: var(--ck-color-table-caption-highlighted-background);\\n\\t}\\n\\n\\t100% {\\n\\t\\tbackground-color: var(--ck-color-table-caption-background);\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:first-of-type{flex-grow:0.57}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:last-of-type{flex-grow:0.43}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar .ck-button{flex-grow:1}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{align-self:flex-end;padding:0;width:25%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-table/theme/tablecellproperties.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tablecellproperties.css\"],\"names\":[],\"mappings\":\"AAOE,6FACC,cAiBD,CAdE,0HAEC,cACD,CAEA,yHAEC,cACD,CAEA,uHACC,WACD,CClBJ,kCACC,WAkBD,CAfE,2FACC,mBAAoB,CACpB,SAAU,CACV,SACD,CAGC,4GACC,eAAgB,CAGhB,qCACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-table-cell-properties-form {\\n\\t& .ck-form__row {\\n\\t\\t&.ck-table-cell-properties-form__alignment-row {\\n\\t\\t\\tflex-wrap: wrap;\\n\\n\\t\\t\\t& .ck.ck-toolbar {\\n\\t\\t\\t\\t&:first-of-type {\\n\\t\\t\\t\\t\\t/* 4 buttons out of 7 (h-alignment + v-alignment) = 0.57 */\\n\\t\\t\\t\\t\\tflex-grow: 0.57;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t&:last-of-type {\\n\\t\\t\\t\\t\\t/* 3 buttons out of 7 (h-alignment + v-alignment) = 0.43 */\\n\\t\\t\\t\\t\\tflex-grow: 0.43;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t& .ck-button {\\n\\t\\t\\t\\t\\tflex-grow: 1;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-table-cell-properties-form {\\n\\twidth: 320px;\\n\\n\\t& .ck-form__row {\\n\\t\\t&.ck-table-cell-properties-form__padding-row {\\n\\t\\t\\talign-self: flex-end;\\n\\t\\t\\tpadding: 0;\\n\\t\\t\\twidth: 25%;\\n\\t\\t}\\n\\n\\t\\t&.ck-table-cell-properties-form__alignment-row {\\n\\t\\t\\t& .ck.ck-toolbar {\\n\\t\\t\\t\\tbackground: none;\\n\\n\\t\\t\\t\\t/* Compensate for missing input label that would push the margin (toolbar has no inputs). */\\n\\t\\t\\t\\tmargin-top: var(--ck-spacing-standard);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":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}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableediting.css\"],\"names\":[],\"mappings\":\"AAKA,MACC,8DACD,CAKE,8QAGC,wDAAyD,CAKzD,iBAAkB,CAClB,8CAA+C,CAC/C,mBACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-color-table-focused-cell-background: hsla(208, 90%, 80%, .3);\\n}\\n\\n.ck-widget.table {\\n\\t& td,\\n\\t& th {\\n\\t\\t&.ck-editor__nested-editable.ck-editor__nested-editable_focused,\\n\\t\\t&.ck-editor__nested-editable:focus {\\n\\t\\t\\t/* A very slight background to highlight the focused cell */\\n\\t\\t\\tbackground: var(--ck-color-table-focused-cell-background);\\n\\n\\t\\t\\t/* Fixes the problem where surrounding cells cover the focused cell's border.\\n\\t\\t\\tIt does not fix the problem in all places but the UX is improved.\\n\\t\\t\\tSee https://github.com/ckeditor/ckeditor5-table/issues/29. */\\n\\t\\t\\tborder-style: none;\\n\\t\\t\\toutline: 1px solid var(--ck-color-focus-border);\\n\\t\\t\\toutline-offset: -1px; /* progressive enhancement - no IE support */\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-table-form .ck-form__row.ck-table-form__background-row,.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{flex-wrap:wrap;align-items:center}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view{display:flex;flex-direction:column-reverse;align-items:center}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck.ck-labeled-field-view{position:relative}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{position:absolute;left:50%;bottom:calc(var(--ck-table-properties-error-arrow-size)*-1);transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{content:\\\"\\\";position:absolute;top:calc(var(--ck-table-properties-error-arrow-size)*-1);left:50%;transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{width:80px;min-width:80px;max-width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-field-view{padding-top:var(--ck-spacing-standard)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{border-radius:0}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status,.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{background:var(--ck-color-base-error);color:var(--ck-color-base-background);padding:var(--ck-spacing-small) var(--ck-spacing-medium);min-width:var(--ck-table-properties-min-error-width);text-align:center}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-left:var(--ck-table-properties-error-arrow-size) solid transparent;border-bottom:var(--ck-table-properties-error-arrow-size) solid var(--ck-color-base-error);border-right:var(--ck-table-properties-error-arrow-size) solid transparent;border-top:0 solid transparent}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both}.ck.ck-table-form .ck.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-table/theme/tableform.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableform.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css\"],\"names\":[],\"mappings\":\"AAWE,wHACC,cACD,CAEA,8DACC,cAAe,CACf,kBAeD,CAbC,qFACC,YAAa,CACb,6BAA8B,CAC9B,kBAKD,CAEA,sMACC,WACD,CAIF,4CAEC,iBAoBD,CAlBC,8EACC,iBAAkB,CAClB,QAAS,CACT,2DAAgE,CAChE,8BAA+B,CAG/B,SAUD,CAPC,oFACC,UAAW,CACX,iBAAkB,CAClB,wDAA6D,CAC7D,QAAS,CACT,0BACD,CChDH,MACC,0CAA2C,CAC3C,2CACD,CAMI,2FACC,kCAAmC,CACnC,iBACD,CAGD,8KAEC,UAAW,CACX,cAAe,CACf,cACD,CAGD,8DACC,SAcD,CAZC,yMAEC,QACD,CAEA,iGACC,mBAAoB,CACpB,oBAAqB,CACrB,wCAAyC,CACzC,6CAA8C,CAC9C,gCACD,CAIF,4CACC,sCAyBD,CAvBC,8ECxCD,eDyDC,CAjBA,mMCpCA,qCDqDA,CAjBA,8EAGC,qCAAsC,CACtC,qCAAsC,CACtC,wDAAyD,CACzD,oDAAqD,CACrD,iBAUD,CAPC,oFAGC,yEAAmB,CAAnB,0FAAmB,CAAnB,0EAAmB,CAAnB,8BACD,CAdD,8EAgBC,iEACD,CAGA,6GACC,YACD,CAIF,oDACC,GACC,SACD,CAEA,GACC,SACD,CACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-table-form {\\n\\t& .ck-form__row {\\n\\t\\t&.ck-table-form__border-row {\\n\\t\\t\\tflex-wrap: wrap;\\n\\t\\t}\\n\\n\\t\\t&.ck-table-form__background-row {\\n\\t\\t\\tflex-wrap: wrap;\\n\\t\\t}\\n\\n\\t\\t&.ck-table-form__dimensions-row {\\n\\t\\t\\tflex-wrap: wrap;\\n\\t\\t\\talign-items: center;\\n\\n\\t\\t\\t& .ck-labeled-field-view {\\n\\t\\t\\t\\tdisplay: flex;\\n\\t\\t\\t\\tflex-direction: column-reverse;\\n\\t\\t\\t\\talign-items: center;\\n\\n\\t\\t\\t\\t& .ck.ck-dropdown {\\n\\t\\t\\t\\t\\tflex-grow: 0;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t& .ck-table-form__dimension-operator {\\n\\t\\t\\t\\tflex-grow: 0;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t& .ck.ck-labeled-field-view {\\n\\t\\t/* Allow absolute positioning of the status (error) balloons. */\\n\\t\\tposition: relative;\\n\\n\\t\\t& .ck.ck-labeled-field-view__status {\\n\\t\\t\\tposition: absolute;\\n\\t\\t\\tleft: 50%;\\n\\t\\t\\tbottom: calc( -1 * var(--ck-table-properties-error-arrow-size) );\\n\\t\\t\\ttransform: translate(-50%,100%);\\n\\n\\t\\t\\t/* Make sure the balloon status stays on top of other form elements. */\\n\\t\\t\\tz-index: 1;\\n\\n\\t\\t\\t/* The arrow pointing towards the field. */\\n\\t\\t\\t&::after {\\n\\t\\t\\t\\tcontent: \\\"\\\";\\n\\t\\t\\t\\tposition: absolute;\\n\\t\\t\\t\\ttop: calc( -1 * var(--ck-table-properties-error-arrow-size) );\\n\\t\\t\\t\\tleft: 50%;\\n\\t\\t\\t\\ttransform: translateX( -50% );\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../mixins/_rounded.css\\\";\\n\\n:root {\\n\\t--ck-table-properties-error-arrow-size: 6px;\\n\\t--ck-table-properties-min-error-width: 150px;\\n}\\n\\n.ck.ck-table-form {\\n\\t& .ck-form__row {\\n\\t\\t&.ck-table-form__border-row {\\n\\t\\t\\t& .ck-labeled-field-view {\\n\\t\\t\\t\\t& > .ck-label {\\n\\t\\t\\t\\t\\tfont-size: var(--ck-font-size-tiny);\\n\\t\\t\\t\\t\\ttext-align: center;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t& .ck-table-form__border-style,\\n\\t\\t\\t& .ck-table-form__border-width {\\n\\t\\t\\t\\twidth: 80px;\\n\\t\\t\\t\\tmin-width: 80px;\\n\\t\\t\\t\\tmax-width: 80px;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t&.ck-table-form__dimensions-row {\\n\\t\\t\\tpadding: 0;\\n\\n\\t\\t\\t& .ck-table-form__dimensions-row__width,\\n\\t\\t\\t& .ck-table-form__dimensions-row__height {\\n\\t\\t\\t\\tmargin: 0\\n\\t\\t\\t}\\n\\n\\t\\t\\t& .ck-table-form__dimension-operator {\\n\\t\\t\\t\\talign-self: flex-end;\\n\\t\\t\\t\\tdisplay: inline-block;\\n\\t\\t\\t\\theight: var(--ck-ui-component-min-height);\\n\\t\\t\\t\\tline-height: var(--ck-ui-component-min-height);\\n\\t\\t\\t\\tmargin: 0 var(--ck-spacing-small);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t& .ck.ck-labeled-field-view {\\n\\t\\tpadding-top: var(--ck-spacing-standard);\\n\\n\\t\\t& .ck.ck-labeled-field-view__status {\\n\\t\\t\\t@mixin ck-rounded-corners;\\n\\n\\t\\t\\tbackground: var(--ck-color-base-error);\\n\\t\\t\\tcolor: var(--ck-color-base-background);\\n\\t\\t\\tpadding: var(--ck-spacing-small) var(--ck-spacing-medium);\\n\\t\\t\\tmin-width: var(--ck-table-properties-min-error-width);\\n\\t\\t\\ttext-align: center;\\n\\n\\t\\t\\t/* The arrow pointing towards the field. */\\n\\t\\t\\t&::after {\\n\\t\\t\\t\\tborder-color: transparent transparent var(--ck-color-base-error) transparent;\\n\\t\\t\\t\\tborder-width: 0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size);\\n\\t\\t\\t\\tborder-style: solid;\\n\\t\\t\\t}\\n\\n\\t\\t\\tanimation: ck-table-form-labeled-view-status-appear .15s ease both;\\n\\t\\t}\\n\\n\\t\\t/* Hide the error balloon when the field is blurred. Makes the experience much more clear. */\\n\\t\\t& .ck-input.ck-error:not(:focus) + .ck.ck-labeled-field-view__status {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t}\\n}\\n\\n@keyframes ck-table-form-labeled-view-status-appear {\\n\\t0% {\\n\\t\\topacity: 0;\\n\\t}\\n\\n\\t100% {\\n\\t\\topacity: 1;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Implements rounded corner interface for .ck-rounded-corners class.\\n *\\n * @see $ck-border-radius\\n */\\n@define-mixin ck-rounded-corners {\\n\\tborder-radius: 0;\\n\\n\\t@nest .ck-rounded-corners &,\\n\\t&.ck-rounded-corners {\\n\\t\\tborder-radius: var(--ck-border-radius);\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{flex-wrap:wrap;flex-basis:0;align-content:baseline}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-self:flex-end;padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-table/theme/tableproperties.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableproperties.css\"],\"names\":[],\"mappings\":\"AAOE,mFACC,cAAe,CACf,YAAa,CACb,sBAKD,CAHC,qHACC,gBACD,CCTH,6BACC,WAmBD,CAhBE,mFACC,mBAAoB,CACpB,SAYD,CAVC,kGACC,eAAgB,CAGhB,qCAKD,CAHC,uHACC,UACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-table-properties-form {\\n\\t& .ck-form__row {\\n\\t\\t&.ck-table-properties-form__alignment-row {\\n\\t\\t\\tflex-wrap: wrap;\\n\\t\\t\\tflex-basis: 0;\\n\\t\\t\\talign-content: baseline;\\n\\n\\t\\t\\t& .ck.ck-toolbar .ck-toolbar__items {\\n\\t\\t\\t\\tflex-wrap: nowrap;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-table-properties-form {\\n\\twidth: 320px;\\n\\n\\t& .ck-form__row {\\n\\t\\t&.ck-table-properties-form__alignment-row {\\n\\t\\t\\talign-self: flex-end;\\n\\t\\t\\tpadding: 0;\\n\\n\\t\\t\\t& .ck.ck-toolbar {\\n\\t\\t\\t\\tbackground: none;\\n\\n\\t\\t\\t\\t/* Compensate for missing input label that would push the margin (toolbar has no inputs). */\\n\\t\\t\\t\\tmargin-top: var(--ck-spacing-standard);\\n\\n\\t\\t\\t\\t& .ck-toolbar__items > * {\\n\\t\\t\\t\\t\\twidth: 40px;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":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,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableselection.css\"],\"names\":[],\"mappings\":\"AAKA,MACC,yDACD,CAGC,0IAEC,iBAAkB,CAClB,uBAAwB,CACxB,aAAc,CACd,gBA8BD,CA3BC,sJACC,UAAW,CACX,mBAAoB,CACpB,yDAA0D,CAC1D,iBAAkB,CAClB,KAAM,CACN,MAAO,CACP,OAAQ,CACR,QACD,CAEA,wTAEC,4BACD,CAMA,gKACC,aAKD,CAHC,0NACC,YACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-table-selected-cell-background: hsla(208, 90%, 80%, .3);\\n}\\n\\n.ck.ck-editor__editable .table table {\\n\\t& td.ck-editor__editable_selected,\\n\\t& th.ck-editor__editable_selected {\\n\\t\\tposition: relative;\\n\\t\\tcaret-color: transparent;\\n\\t\\toutline: unset;\\n\\t\\tbox-shadow: unset;\\n\\n\\t\\t/* https://github.com/ckeditor/ckeditor5/issues/6446 */\\n\\t\\t&:after {\\n\\t\\t\\tcontent: '';\\n\\t\\t\\tpointer-events: none;\\n\\t\\t\\tbackground-color: var(--ck-table-selected-cell-background);\\n\\t\\t\\tposition: absolute;\\n\\t\\t\\ttop: 0;\\n\\t\\t\\tleft: 0;\\n\\t\\t\\tright: 0;\\n\\t\\t\\tbottom: 0;\\n\\t\\t}\\n\\n\\t\\t& ::selection,\\n\\t\\t&:focus {\\n\\t\\t\\tbackground-color: transparent;\\n\\t\\t}\\n\\n\\t\\t/*\\n\\t\\t * To reduce the amount of noise, all widgets in the table selection have no outline and no selection handle.\\n\\t\\t * See https://github.com/ckeditor/ckeditor5/issues/9491.\\n\\t\\t */\\n\\t\\t& .ck-widget {\\n\\t\\t\\toutline: unset;\\n\\n\\t\\t\\t& > .ck-widget__selection-handle {\\n\\t\\t\\t\\tdisplay: none;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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(var(--ck-spacing-small)*-1);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(var(--ck-spacing-small)*-1);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}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/button/button.css\",\"webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css\",\"webpack://./../ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/button.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/mixins/_button.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css\"],\"names\":[],\"mappings\":\"AAQA,6BCCC,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBD6BD,CE/BC,qDACC,aAqBD,CAHC,oBAnBD,qDAoBE,YAEF,CADC,CFvBF,6BAKC,i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003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../mixins/_unselectable.css\\\";\\n@import \\\"../tooltip/mixins/_tooltip.css\\\";\\n\\n.ck.ck-button,\\na.ck.ck-button {\\n\\t@mixin ck-unselectable;\\n\\t@mixin ck-tooltip_enabled;\\n\\n\\tposition: relative;\\n\\tdisplay: inline-flex;\\n\\talign-items: center;\\n\\tjustify-content: left;\\n\\n\\t& .ck-button__label {\\n\\t\\tdisplay: none;\\n\\t}\\n\\n\\t&.ck-button_with-text {\\n\\t\\t& .ck-button__label {\\n\\t\\t\\tdisplay: inline-block;\\n\\t\\t}\\n\\t}\\n\\n\\t/* Center the icon horizontally in a button without text. */\\n\\t&:not(.ck-button_with-text) {\\n\\t\\tjustify-content: center;\\n\\t}\\n\\n\\t&:hover {\\n\\t\\t@mixin ck-tooltip_visible;\\n\\t}\\n\\n\\t/* Get rid of the native focus outline around the tooltip when focused (but not :hover). */\\n\\t&:focus:not(:hover) {\\n\\t\\t@mixin ck-tooltip_disabled;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Makes element unselectable.\\n */\\n@define-mixin ck-unselectable {\\n\\t-moz-user-select: none;\\n\\t-webkit-user-select: none;\\n\\t-ms-user-select: none;\\n\\tuser-select: none\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Enables the tooltip, which is the tooltip is in DOM but\\n * not yet displayed.\\n */\\n@define-mixin ck-tooltip_enabled {\\n\\t& .ck-tooltip {\\n\\t\\tdisplay: block;\\n\\n\\t\\t/*\\n\\t\\t * Don't display tooltips in devices which don't support :hover.\\n\\t\\t * In fact, it's all about iOS, which forces user to click UI elements twice to execute\\n\\t\\t * the primary action, when tooltips are enabled.\\n\\t\\t *\\n\\t\\t * Q: OK, but why not the following query?\\n\\t\\t *\\n\\t\\t * @media (hover) {\\n\\t\\t * display: block;\\n\\t\\t * }\\n\\t\\t *\\n\\t\\t * A: Because FF does not support it and it would completely disable tooltips\\n\\t\\t * in that browser.\\n\\t\\t *\\n\\t\\t * More in https://github.com/ckeditor/ckeditor5/issues/920.\\n\\t\\t */\\n\\t\\t@media (hover:none) {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t}\\n}\\n\\n/**\\n * Disables the tooltip making it disappear from DOM.\\n */\\n@define-mixin ck-tooltip_disabled {\\n\\t& .ck-tooltip {\\n\\t\\tdisplay: none;\\n\\t}\\n}\\n\\n/**\\n * Shows the tooltip, which is already in DOM.\\n * Requires `ck-tooltip_enabled` first.\\n */\\n@define-mixin ck-tooltip_visible {\\n\\t& .ck-tooltip {\\n\\t\\tvisibility: visible;\\n\\t\\topacity: 1;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../../mixins/_focus.css\\\";\\n@import \\\"../../../mixins/_shadow.css\\\";\\n@import \\\"../../../mixins/_disabled.css\\\";\\n@import \\\"../../../mixins/_rounded.css\\\";\\n@import \\\"../../mixins/_button.css\\\";\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_dir.css\\\";\\n\\n.ck.ck-button,\\na.ck.ck-button {\\n\\t@mixin ck-button-colors --ck-color-button-default;\\n\\t@mixin ck-rounded-corners;\\n\\n\\twhite-space: nowrap;\\n\\tcursor: default;\\n\\tvertical-align: middle;\\n\\tpadding: var(--ck-spacing-tiny);\\n\\ttext-align: center;\\n\\n\\t/* A very important piece of styling. Go to variable declaration to learn more. */\\n\\tmin-width: var(--ck-ui-component-min-height);\\n\\tmin-height: var(--ck-ui-component-min-height);\\n\\n\\t/* Normalize the height of the line. Removing this will break consistent height\\n\\tamong text and text-less buttons (with icons). */\\n\\tline-height: 1;\\n\\n\\t/* Enable font size inheritance, which allows fluid UI scaling. */\\n\\tfont-size: inherit;\\n\\n\\t/* Avoid flickering when the foucs border shows up. */\\n\\tborder: 1px solid transparent;\\n\\n\\t/* Apply some smooth transition to the box-shadow and border. */\\n\\ttransition: box-shadow .2s ease-in-out, border .2s ease-in-out;\\n\\n\\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/189 */\\n\\t-webkit-appearance: none;\\n\\n\\t&:active,\\n\\t&:focus {\\n\\t\\t@mixin ck-focus-ring;\\n\\t\\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\\n\\t}\\n\\n\\t/* Allow icon coloring using the text \\\"color\\\" property. */\\n\\t& .ck-button__icon {\\n\\t\\t& use,\\n\\t\\t& use * {\\n\\t\\t\\tcolor: inherit;\\n\\t\\t}\\n\\t}\\n\\n\\t& .ck-button__label {\\n\\t\\t/* Enable font size inheritance, which allows fluid UI scaling. */\\n\\t\\tfont-size: inherit;\\n\\t\\tfont-weight: inherit;\\n\\t\\tcolor: inherit;\\n\\t\\tcursor: inherit;\\n\\n\\t\\t/* Must be consistent with .ck-icon's vertical align. Otherwise, buttons with and\\n\\t\\twithout labels (but with icons) have different sizes in Chrome */\\n\\t\\tvertical-align: middle;\\n\\n\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\ttext-align: left;\\n\\t\\t}\\n\\n\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\ttext-align: right;\\n\\t\\t}\\n\\t}\\n\\n\\t& .ck-button__keystroke {\\n\\t\\tcolor: inherit;\\n\\n\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\tmargin-left: var(--ck-spacing-large);\\n\\t\\t}\\n\\n\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\tmargin-right: var(--ck-spacing-large);\\n\\t\\t}\\n\\n\\t\\tfont-weight: bold;\\n\\t\\topacity: .7;\\n\\t}\\n\\n\\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */\\n\\t&.ck-disabled {\\n\\t\\t&:active,\\n\\t\\t&:focus {\\n\\t\\t\\t/* The disabled button should have a slightly less visible shadow when focused. */\\n\\t\\t\\t@mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow);\\n\\t\\t}\\n\\n\\t\\t& .ck-button__icon {\\n\\t\\t\\t@mixin ck-disabled;\\n\\t\\t}\\n\\n\\t\\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */\\n\\t\\t& .ck-button__label {\\n\\t\\t\\t@mixin ck-disabled;\\n\\t\\t}\\n\\n\\t\\t& .ck-button__keystroke {\\n\\t\\t\\topacity: .3;\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-button_with-text {\\n\\t\\tpadding: var(--ck-spacing-tiny) var(--ck-spacing-standard);\\n\\n\\t\\t/* stylelint-disable-next-line no-descending-specificity */\\n\\t\\t& .ck-button__icon {\\n\\t\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\t\\tmargin-left: calc(-1 * var(--ck-spacing-small));\\n\\t\\t\\t\\tmargin-right: var(--ck-spacing-small);\\n\\t\\t\\t}\\n\\n\\t\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\t\\tmargin-right: calc(-1 * var(--ck-spacing-small));\\n\\t\\t\\t\\tmargin-left: var(--ck-spacing-small);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-button_with-keystroke {\\n\\t\\t/* stylelint-disable-next-line no-descending-specificity */\\n\\t\\t& .ck-button__label {\\n\\t\\t\\tflex-grow: 1;\\n\\t\\t}\\n\\t}\\n\\n\\t/* A style of the button which is currently on, e.g. its feature is active. */\\n\\t&.ck-on {\\n\\t\\t@mixin ck-button-colors --ck-color-button-on;\\n\\t}\\n\\n\\t&.ck-button-save {\\n\\t\\tcolor: var(--ck-color-button-save);\\n\\t}\\n\\n\\t&.ck-button-cancel {\\n\\t\\tcolor: var(--ck-color-button-cancel);\\n\\t}\\n}\\n\\n/* A style of the button which handles the primary action. */\\n.ck.ck-button-action,\\na.ck.ck-button-action {\\n\\t@mixin ck-button-colors --ck-color-button-action;\\n\\n\\tcolor: var(--ck-color-button-action-text);\\n}\\n\\n.ck.ck-button-bold,\\na.ck.ck-button-bold {\\n\\tfont-weight: bold;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Implements a button of given background color.\\n *\\n * @param {String} $background - Background color of the button.\\n * @param {String} $border - Border color of the button.\\n */\\n@define-mixin ck-button-colors $prefix {\\n\\tbackground: var($(prefix)-background);\\n\\n\\t&:not(.ck-disabled) {\\n\\t\\t&:hover {\\n\\t\\t\\tbackground: var($(prefix)-hover-background);\\n\\t\\t}\\n\\n\\t\\t&:active {\\n\\t\\t\\tbackground: var($(prefix)-active-background);\\n\\t\\t\\tbox-shadow: inset 0 2px 2px var($(prefix)-active-shadow);\\n\\t\\t}\\n\\t}\\n\\n\\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */\\n\\t&.ck-disabled {\\n\\t\\tbackground: var($(prefix)-disabled-background);\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Implements rounded corner interface for .ck-rounded-corners class.\\n *\\n * @see $ck-border-radius\\n */\\n@define-mixin ck-rounded-corners {\\n\\tborder-radius: 0;\\n\\n\\t@nest .ck-rounded-corners &,\\n\\t&.ck-rounded-corners {\\n\\t\\tborder-radius: var(--ck-border-radius);\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A visual style of focused element's border.\\n */\\n@define-mixin ck-focus-ring {\\n\\t/* Disable native outline. */\\n\\toutline: none;\\n\\tborder: var(--ck-focus-ring)\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A helper to combine multiple shadows.\\n */\\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\\n\\tbox-shadow: $shadowA, $shadowB;\\n}\\n\\n/**\\n * Gives an element a drop shadow so it looks like a floating panel.\\n */\\n@define-mixin ck-drop-shadow {\\n\\t@mixin ck-box-shadow var(--ck-drop-shadow);\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A class which indicates that an element holding it is disabled.\\n */\\n@define-mixin ck-disabled {\\n\\topacity: var(--ck-disabled-opacity);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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) - var(--ck-switch-button-toggle-spacing)*2)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.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(var(--ck-border-radius)*0.5)}.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(var(--ck-switch-button-translation)*-1))}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/button/switchbutton.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/switchbutton.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css\"],\"names\":[],\"mappings\":\"AASE,4HACC,aACD,CCCF,MAEC,8CAA+C,CAE/C,mDAAoD,CACpD,qCAAsC,CACtC,gKAKD,CAGC,0DAGE,4CAOF,CAVA,0DAQE,2CAEF,CAEA,iDC3BA,eDoEA,CAzCA,yICvBC,qCDgED,CAzCA,2DAKE,gBAoCF,CAzCA,2DAUE,iBA+BF,CAzCA,iDAcC,8BAAiC,CAEjC,0CAA2C,CAC3C,uDAwBD,CAtBC,2EC9CD,eD2DC,CAbA,6LC1CA,qCAAsC,CD4CpC,+CAWF,CAbA,2EAMC,6CAA8C,CAC9C,+CAAgD,CAChD,gDAAiD,CACjD,yDAA0D,CAG1D,uBACD,CAEA,uDACC,6DAKD,CAHC,iFACC,+DACD,CAIF,6DExEA,kCF0EA,CAEA,uDACC,sDAkBD,CAhBC,6DACC,4DACD,CAEA,2FAKE,yDAMF,CAXA,2FASE,kEAEF\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-button.ck-switchbutton {\\n\\t& .ck-button__toggle {\\n\\t\\tdisplay: block;\\n\\n\\t\\t& .ck-button__toggle__inner {\\n\\t\\t\\tdisplay: block;\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../../mixins/_rounded.css\\\";\\n@import \\\"../../../mixins/_disabled.css\\\";\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_dir.css\\\";\\n\\n/* Note: To avoid rendering issues (aliasing) but to preserve the responsive nature\\nof the component, floating–point numbers have been used which, for the default font size\\n(see: --ck-font-size-base), will generate simple integers. */\\n:root {\\n\\t/* 34px at 13px font-size */\\n\\t--ck-switch-button-toggle-width: 2.6153846154em;\\n\\t/* 14px at 13px font-size */\\n\\t--ck-switch-button-toggle-inner-size: 1.0769230769em;\\n\\t--ck-switch-button-toggle-spacing: 1px;\\n\\t--ck-switch-button-translation: calc(\\n\\t\\tvar(--ck-switch-button-toggle-width) -\\n\\t\\tvar(--ck-switch-button-toggle-inner-size) -\\n\\t\\t2 * var(--ck-switch-button-toggle-spacing)\\n\\t);\\n}\\n\\n.ck.ck-button.ck-switchbutton {\\n\\t& .ck-button__label {\\n\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\t/* Separate the label from the switch */\\n\\t\\t\\tmargin-right: calc(2 * var(--ck-spacing-large));\\n\\t\\t}\\n\\n\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\t/* Separate the label from the switch */\\n\\t\\t\\tmargin-left: calc(2 * var(--ck-spacing-large));\\n\\t\\t}\\n\\t}\\n\\n\\t& .ck-button__toggle {\\n\\t\\t@mixin ck-rounded-corners;\\n\\n\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\t/* Make sure the toggle is always to the right as far as possible. */\\n\\t\\t\\tmargin-left: auto;\\n\\t\\t}\\n\\n\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\t/* Make sure the toggle is always to the left as far as possible. */\\n\\t\\t\\tmargin-right: auto;\\n\\t\\t}\\n\\n\\t\\t/* Gently animate the background color of the toggle switch */\\n\\t\\ttransition: background 400ms ease;\\n\\n\\t\\twidth: var(--ck-switch-button-toggle-width);\\n\\t\\tbackground: var(--ck-color-switch-button-off-background);\\n\\n\\t\\t& .ck-button__toggle__inner {\\n\\t\\t\\t@mixin ck-rounded-corners {\\n\\t\\t\\t\\tborder-radius: calc(.5 * var(--ck-border-radius));\\n\\t\\t\\t}\\n\\n\\t\\t\\t/* Leave some tiny bit of space around the inner part of the switch */\\n\\t\\t\\tmargin: var(--ck-switch-button-toggle-spacing);\\n\\t\\t\\twidth: var(--ck-switch-button-toggle-inner-size);\\n\\t\\t\\theight: var(--ck-switch-button-toggle-inner-size);\\n\\t\\t\\tbackground: var(--ck-color-switch-button-inner-background);\\n\\n\\t\\t\\t/* Gently animate the inner part of the toggle switch */\\n\\t\\t\\ttransition: all 300ms ease;\\n\\t\\t}\\n\\n\\t\\t&:hover {\\n\\t\\t\\tbackground: var(--ck-color-switch-button-off-hover-background);\\n\\n\\t\\t\\t& .ck-button__toggle__inner {\\n\\t\\t\\t\\tbox-shadow: 0 0 0 5px var(--ck-color-switch-button-inner-shadow);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-disabled .ck-button__toggle {\\n\\t\\t@mixin ck-disabled;\\n\\t}\\n\\n\\t&.ck-on .ck-button__toggle {\\n\\t\\tbackground: var(--ck-color-switch-button-on-background);\\n\\n\\t\\t&:hover {\\n\\t\\t\\tbackground: var(--ck-color-switch-button-on-hover-background);\\n\\t\\t}\\n\\n\\t\\t& .ck-button__toggle__inner {\\n\\t\\t\\t/*\\n\\t\\t\\t * Move the toggle switch to the right. It will be animated.\\n\\t\\t\\t */\\n\\t\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\t\\ttransform: translateX( var( --ck-switch-button-translation ) );\\n\\t\\t\\t}\\n\\n\\t\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\t\\ttransform: translateX( calc( -1 * var( --ck-switch-button-translation ) ) );\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Implements rounded corner interface for .ck-rounded-corners class.\\n *\\n * @see $ck-border-radius\\n */\\n@define-mixin ck-rounded-corners {\\n\\tborder-radius: 0;\\n\\n\\t@nest .ck-rounded-corners &,\\n\\t&.ck-rounded-corners {\\n\\t\\tborder-radius: var(--ck-border-radius);\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A class which indicates that an element holding it is disabled.\\n */\\n@define-mixin ck-disabled {\\n\\topacity: var(--ck-disabled-opacity);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/colorgrid/colorgrid.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/colorgrid/colorgrid.css\"],\"names\":[],\"mappings\":\"AAKA,kBACC,YACD,CCAA,MACC,8BAA+B,CAK/B,qCACD,CAEA,kBACC,YAAa,CACb,WACD,CAEA,wBACC,oCAAqC,CACrC,qCAAsC,CACtC,wCAAyC,CACzC,yCAA0C,CAC1C,SAAU,CACV,8BAA+B,CAC/B,QAmCD,CAjCC,oCACC,YAAa,CACb,gBACD,CAEA,4DACC,gDACD,CAEA,oCACC,YAAa,CACb,2CACD,CAEA,8BACC,8FAKD,CAHC,0CACC,aACD,CAGD,8HAIC,QACD,CAEA,gGAEC,iGACD,CAGD,yBACC,oCACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-color-grid {\\n\\tdisplay: grid;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../../mixins/_rounded.css\\\";\\n\\n:root {\\n\\t--ck-color-grid-tile-size: 24px;\\n\\n\\t/* Not using global colors here because these may change but some colors in a pallette\\n\\t * require special treatment. For instance, this ensures no matter what the UI text color is,\\n\\t * the check icon will look good on the black color tile. */\\n\\t--ck-color-color-grid-check-icon: hsl(0, 0%, 0%);\\n}\\n\\n.ck.ck-color-grid {\\n\\tgrid-gap: 5px;\\n\\tpadding: 8px;\\n}\\n\\n.ck.ck-color-grid__tile {\\n\\twidth: var(--ck-color-grid-tile-size);\\n\\theight: var(--ck-color-grid-tile-size);\\n\\tmin-width: var(--ck-color-grid-tile-size);\\n\\tmin-height: var(--ck-color-grid-tile-size);\\n\\tpadding: 0;\\n\\ttransition: .2s ease box-shadow;\\n\\tborder: 0;\\n\\n\\t&.ck-disabled {\\n\\t\\tcursor: unset;\\n\\t\\ttransition: unset;\\n\\t}\\n\\n\\t&.ck-color-table__color-tile_bordered {\\n\\t\\tbox-shadow: 0 0 0 1px var(--ck-color-base-border);\\n\\t}\\n\\n\\t& .ck.ck-icon {\\n\\t\\tdisplay: none;\\n\\t\\tcolor: var(--ck-color-color-grid-check-icon);\\n\\t}\\n\\n\\t&.ck-on {\\n\\t\\tbox-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-base-text);\\n\\n\\t\\t& .ck.ck-icon {\\n\\t\\t\\tdisplay: block;\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-on,\\n\\t&:focus:not( .ck-disabled ),\\n\\t&:hover:not( .ck-disabled ) {\\n\\t\\t/* Disable the default .ck-button's border ring. */\\n\\t\\tborder: 0;\\n\\t}\\n\\n\\t&:focus:not( .ck-disabled ),\\n\\t&:hover:not( .ck-disabled ) {\\n\\t\\tbox-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-focus-border);\\n\\t}\\n}\\n\\n.ck.ck-color-grid__label {\\n\\tpadding: 0 var(--ck-spacing-standard);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":root{--ck-dropdown-max-width:75vw}.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);max-width:var(--ck-dropdown-max-width);position:absolute}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.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-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.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 .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.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}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/dropdown/dropdown.css\",\"webpack://./../ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/dropdown.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css\"],\"names\":[],\"mappings\":\"AAOA,MACC,4BACD,CAEA,gBACC,oBAAqB,CACrB,iBAqFD,CAnFC,oCACC,mBAAoB,CACpB,2BACD,CAGA,+CACC,UAOD,CCUA,iEACC,YACD,CDVA,oCAGC,kCAAmC,CAEnC,YAAa,CACb,yBAA0B,CAC1B,sCAAuC,CAEvC,iBAyDD,CAvDC,+DACC,oBACD,CAEA,mSAKC,WACD,CAEA,mSASC,QAAS,CACT,WACD,CAEA,oHAEC,MACD,CAEA,oHAEC,OACD,CAEA,kHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAQF,mCACC,mCACD,CEhGA,MACC,sDACD,CAEA,gBAEC,iBA2ED,CAzEC,oCACC,mCACD,CAGC,8CACC,gCAAiC,CAGjC,sCACD,CAIA,8CACC,+BAAgC,CAGhC,oCACD,CAGD,gDC/BA,kCDiCA,CAIE,mFAEC,oCACD,CAIA,mFAEC,qCACD,CAID,iEACC,SAAU,CACV,eAAgB,CAChB,sBACD,CAGA,6EC1DD,kCD4DC,CAGA,qDACC,2BAA4B,CAC5B,4BACD,CAEA,sGACC,UACD,CAGA,yHAEC,eAKD,CAHC,qIE7EF,2CF+EE,CAKH,uBGlFC,eH8GD,CA5BA,qFG9EE,qCH0GF,CA5BA,uBEpFC,oCAA8B,CFwF9B,oDAAqD,CACrD,sDAAuD,CACvD,QAAS,CAGT,cAmBD,CAfC,6CACC,wBACD,CAEA,6CACC,yBACD,CAEA,6CACC,2BACD,CAEA,6CACC,4BACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../tooltip/mixins/_tooltip.css\\\";\\n\\n:root {\\n\\t--ck-dropdown-max-width: 75vw;\\n}\\n\\n.ck.ck-dropdown {\\n\\tdisplay: inline-block;\\n\\tposition: relative;\\n\\n\\t& .ck-dropdown__arrow {\\n\\t\\tpointer-events: none;\\n\\t\\tz-index: var(--ck-z-default);\\n\\t}\\n\\n\\t/* Dropdown button should span horizontally, e.g. in vertical toolbars */\\n\\t& .ck-button.ck-dropdown__button {\\n\\t\\twidth: 100%;\\n\\n\\t\\t/* Disable main button's tooltip when the dropdown is open. Otherwise the panel may\\n\\t\\tpartially cover the tooltip */\\n\\t\\t&.ck-on {\\n\\t\\t\\t@mixin ck-tooltip_disabled;\\n\\t\\t}\\n\\t}\\n\\n\\t& .ck-dropdown__panel {\\n\\t\\t/* This is to get rid of flickering when the tooltip is shown under the panel,\\n\\t\\twhich looks like the panel moves vertically a pixel down and up. */\\n\\t\\t-webkit-backface-visibility: hidden;\\n\\n\\t\\tdisplay: none;\\n\\t\\tz-index: var(--ck-z-modal);\\n\\t\\tmax-width: var(--ck-dropdown-max-width);\\n\\n\\t\\tposition: absolute;\\n\\n\\t\\t&.ck-dropdown__panel-visible {\\n\\t\\t\\tdisplay: inline-block;\\n\\t\\t}\\n\\n\\t\\t&.ck-dropdown__panel_ne,\\n\\t\\t&.ck-dropdown__panel_nw,\\n\\t\\t&.ck-dropdown__panel_n,\\n\\t\\t&.ck-dropdown__panel_nmw,\\n\\t\\t&.ck-dropdown__panel_nme {\\n\\t\\t\\tbottom: 100%;\\n\\t\\t}\\n\\n\\t\\t&.ck-dropdown__panel_se,\\n\\t\\t&.ck-dropdown__panel_sw,\\n\\t\\t&.ck-dropdown__panel_smw,\\n\\t\\t&.ck-dropdown__panel_sme,\\n\\t\\t&.ck-dropdown__panel_s {\\n\\t\\t\\t/*\\n\\t\\t\\t * Using transform: translate3d( 0, 100%, 0 ) causes blurry dropdown on Chrome 67-78+ on non-retina displays.\\n\\t\\t\\t * See https://github.com/ckeditor/ckeditor5/issues/1053.\\n\\t\\t\\t */\\n\\t\\t\\ttop: 100%;\\n\\t\\t\\tbottom: auto;\\n\\t\\t}\\n\\n\\t\\t&.ck-dropdown__panel_ne,\\n\\t\\t&.ck-dropdown__panel_se {\\n\\t\\t\\tleft: 0px;\\n\\t\\t}\\n\\n\\t\\t&.ck-dropdown__panel_nw,\\n\\t\\t&.ck-dropdown__panel_sw {\\n\\t\\t\\tright: 0px;\\n\\t\\t}\\n\\n\\t\\t&.ck-dropdown__panel_s,\\n\\t\\t&.ck-dropdown__panel_n {\\n\\t\\t\\t/* Positioning panels relative to the center of the button */\\n\\t\\t\\tleft: 50%;\\n\\t\\t\\ttransform: translateX(-50%);\\n\\t\\t}\\n\\n\\t\\t&.ck-dropdown__panel_nmw,\\n\\t\\t&.ck-dropdown__panel_smw {\\n\\t\\t\\t/* Positioning panels relative to the middle-west of the button */\\n\\t\\t\\tleft: 75%;\\n\\t\\t\\ttransform: translateX(-75%);\\n\\t\\t}\\n\\n\\t\\t&.ck-dropdown__panel_nme,\\n\\t\\t&.ck-dropdown__panel_sme {\\n\\t\\t\\t/* Positioning panels relative to the middle-east of the button */\\n\\t\\t\\tleft: 25%;\\n\\t\\t\\ttransform: translateX(-25%);\\n\\t\\t}\\n\\t}\\n}\\n\\n/*\\n * Toolbar dropdown panels should be always above the UI (eg. other dropdown panels) from the editor's content.\\n * See https://github.com/ckeditor/ckeditor5/issues/7874\\n */\\n.ck.ck-toolbar .ck-dropdown__panel {\\n\\tz-index: calc( var(--ck-z-modal) + 1 );\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Enables the tooltip, which is the tooltip is in DOM but\\n * not yet displayed.\\n */\\n@define-mixin ck-tooltip_enabled {\\n\\t& .ck-tooltip {\\n\\t\\tdisplay: block;\\n\\n\\t\\t/*\\n\\t\\t * Don't display tooltips in devices which don't support :hover.\\n\\t\\t * In fact, it's all about iOS, which forces user to click UI elements twice to execute\\n\\t\\t * the primary action, when tooltips are enabled.\\n\\t\\t *\\n\\t\\t * Q: OK, but why not the following query?\\n\\t\\t *\\n\\t\\t * @media (hover) {\\n\\t\\t * display: block;\\n\\t\\t * }\\n\\t\\t *\\n\\t\\t * A: Because FF does not support it and it would completely disable tooltips\\n\\t\\t * in that browser.\\n\\t\\t *\\n\\t\\t * More in https://github.com/ckeditor/ckeditor5/issues/920.\\n\\t\\t */\\n\\t\\t@media (hover:none) {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t}\\n}\\n\\n/**\\n * Disables the tooltip making it disappear from DOM.\\n */\\n@define-mixin ck-tooltip_disabled {\\n\\t& .ck-tooltip {\\n\\t\\tdisplay: none;\\n\\t}\\n}\\n\\n/**\\n * Shows the tooltip, which is already in DOM.\\n * Requires `ck-tooltip_enabled` first.\\n */\\n@define-mixin ck-tooltip_visible {\\n\\t& .ck-tooltip {\\n\\t\\tvisibility: visible;\\n\\t\\topacity: 1;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../../mixins/_rounded.css\\\";\\n@import \\\"../../../mixins/_disabled.css\\\";\\n@import \\\"../../../mixins/_shadow.css\\\";\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_dir.css\\\";\\n\\n:root {\\n\\t--ck-dropdown-arrow-size: calc(0.5 * var(--ck-icon-size));\\n}\\n\\n.ck.ck-dropdown {\\n\\t/* Enable font size inheritance, which allows fluid UI scaling. */\\n\\tfont-size: inherit;\\n\\n\\t& .ck-dropdown__arrow {\\n\\t\\twidth: var(--ck-dropdown-arrow-size);\\n\\t}\\n\\n\\t@mixin ck-dir ltr {\\n\\t\\t& .ck-dropdown__arrow {\\n\\t\\t\\tright: var(--ck-spacing-standard);\\n\\n\\t\\t\\t/* A space to accommodate the triangle. */\\n\\t\\t\\tmargin-left: var(--ck-spacing-standard);\\n\\t\\t}\\n\\t}\\n\\n\\t@mixin ck-dir rtl {\\n\\t\\t& .ck-dropdown__arrow {\\n\\t\\t\\tleft: var(--ck-spacing-standard);\\n\\n\\t\\t\\t/* A space to accommodate the triangle. */\\n\\t\\t\\tmargin-right: var(--ck-spacing-small);\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-disabled .ck-dropdown__arrow {\\n\\t\\t@mixin ck-disabled;\\n\\t}\\n\\n\\t& .ck-button.ck-dropdown__button {\\n\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\t&:not(.ck-button_with-text) {\\n\\t\\t\\t\\t/* Make sure dropdowns with just an icon have the right inner spacing */\\n\\t\\t\\t\\tpadding-left: var(--ck-spacing-small);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\t&:not(.ck-button_with-text) {\\n\\t\\t\\t\\t/* Make sure dropdowns with just an icon have the right inner spacing */\\n\\t\\t\\t\\tpadding-right: var(--ck-spacing-small);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t/* #23 */\\n\\t\\t& .ck-button__label {\\n\\t\\t\\twidth: 7em;\\n\\t\\t\\toverflow: hidden;\\n\\t\\t\\ttext-overflow: ellipsis;\\n\\t\\t}\\n\\n\\t\\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */\\n\\t\\t&.ck-disabled .ck-button__label {\\n\\t\\t\\t@mixin ck-disabled;\\n\\t\\t}\\n\\n\\t\\t/* https://github.com/ckeditor/ckeditor5/issues/816 */\\n\\t\\t&.ck-on {\\n\\t\\t\\tborder-bottom-left-radius: 0;\\n\\t\\t\\tborder-bottom-right-radius: 0;\\n\\t\\t}\\n\\n\\t\\t&.ck-dropdown__button_label-width_auto .ck-button__label {\\n\\t\\t\\twidth: auto;\\n\\t\\t}\\n\\n\\t\\t/* https://github.com/ckeditor/ckeditor5/issues/8699 */\\n\\t\\t&.ck-off:active,\\n\\t\\t&.ck-on:active {\\n\\t\\t\\tbox-shadow: none;\\n\\t\\t\\t\\n\\t\\t\\t&:focus {\\n\\t\\t\\t\\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\\n.ck.ck-dropdown__panel {\\n\\t@mixin ck-rounded-corners;\\n\\t@mixin ck-drop-shadow;\\n\\n\\tbackground: var(--ck-color-dropdown-panel-background);\\n\\tborder: 1px solid var(--ck-color-dropdown-panel-border);\\n\\tbottom: 0;\\n\\n\\t/* Make sure the panel is at least as wide as the drop-down's button. */\\n\\tmin-width: 100%;\\n\\n\\t/* Disabled corner border radius to be consistent with the .dropdown__button\\n\\thttps://github.com/ckeditor/ckeditor5/issues/816 */\\n\\t&.ck-dropdown__panel_se {\\n\\t\\tborder-top-left-radius: 0;\\n\\t}\\n\\n\\t&.ck-dropdown__panel_sw {\\n\\t\\tborder-top-right-radius: 0;\\n\\t}\\n\\n\\t&.ck-dropdown__panel_ne {\\n\\t\\tborder-bottom-left-radius: 0;\\n\\t}\\n\\n\\t&.ck-dropdown__panel_nw {\\n\\t\\tborder-bottom-right-radius: 0;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A class which indicates that an element holding it is disabled.\\n */\\n@define-mixin ck-disabled {\\n\\topacity: var(--ck-disabled-opacity);\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A helper to combine multiple shadows.\\n */\\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\\n\\tbox-shadow: $shadowA, $shadowB;\\n}\\n\\n/**\\n * Gives an element a drop shadow so it looks like a floating panel.\\n */\\n@define-mixin ck-drop-shadow {\\n\\t@mixin ck-box-shadow var(--ck-drop-shadow);\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Implements rounded corner interface for .ck-rounded-corners class.\\n *\\n * @see $ck-border-radius\\n */\\n@define-mixin ck-rounded-corners {\\n\\tborder-radius: 0;\\n\\n\\t@nest .ck-rounded-corners &,\\n\\t&.ck-rounded-corners {\\n\\t\\tborder-radius: var(--ck-border-radius);\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/listdropdown.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css\"],\"names\":[],\"mappings\":\"AAOA,6CCIC,eDqBD,CAzBA,iICQE,qCAAsC,CDJtC,wBAqBF,CAfE,mFCND,eDYC,CANA,6MCFA,qCAAsC,CDIpC,wBAAyB,CACzB,2BAA4B,CAC5B,4BAEF,CAEA,kFCdD,eDmBC,CALA,2MCVA,qCAAsC,CDYpC,wBAAyB,CACzB,yBAEF\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../../mixins/_rounded.css\\\";\\n\\n.ck.ck-dropdown .ck-dropdown__panel .ck-list {\\n\\t/* Disabled radius of top-left border to be consistent with .dropdown__button\\n\\thttps://github.com/ckeditor/ckeditor5/issues/816 */\\n\\t@mixin ck-rounded-corners {\\n\\t\\tborder-top-left-radius: 0;\\n\\t}\\n\\n\\t/* Make sure the button belonging to the first/last child of the list goes well with the\\n\\tborder radius of the entire panel. */\\n\\t& .ck-list__item {\\n\\t\\t&:first-child .ck-button {\\n\\t\\t\\t@mixin ck-rounded-corners {\\n\\t\\t\\t\\tborder-top-left-radius: 0;\\n\\t\\t\\t\\tborder-bottom-left-radius: 0;\\n\\t\\t\\t\\tborder-bottom-right-radius: 0;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t&:last-child .ck-button {\\n\\t\\t\\t@mixin ck-rounded-corners {\\n\\t\\t\\t\\tborder-top-left-radius: 0;\\n\\t\\t\\t\\tborder-top-right-radius: 0;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Implements rounded corner interface for .ck-rounded-corners class.\\n *\\n * @see $ck-border-radius\\n */\\n@define-mixin ck-rounded-corners {\\n\\tborder-radius: 0;\\n\\n\\t@nest .ck-rounded-corners &,\\n\\t&.ck-rounded-corners {\\n\\t\\tborder-radius: var(--ck-border-radius);\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-top-right-radius:unset;border-bottom-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.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-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)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{content:\\\"\\\";position:absolute;width:1px;height:100%;background-color:var(--ck-color-split-button-hover-border)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.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}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/dropdown/splitbutton.css\",\"webpack://./../ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/splitbutton.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css\"],\"names\":[],\"mappings\":\"AAOA,mBAEC,iBAUD,CARC,iDACC,qCACD,CC0BA,8DACC,YACD,CClCD,MACC,gDAAyD,CACzD,4CACD,CAMC,oIAIE,6BAA8B,CAC9B,gCAQF,CAbA,oIAUE,4BAA6B,CAC7B,+BAEF,CAEA,0CAGC,eAiBD,CApBA,oDAOE,4BAA6B,CAC7B,+BAYF,CApBA,oDAaE,6BAA8B,CAC9B,gCAMF,CAHC,8CACC,mCACD,CASA,0KACC,wDACD,CAIA,8JACC,UAAW,CACX,iBAAkB,CAClB,SAAU,CACV,WAAY,CACZ,0DACD,CAGC,kLACC,SACD,CAIA,kLACC,UACD,CAMF,uCC7EA,eDuFA,CAVA,qHCzEC,qCDmFD,CARE,qKACC,2BACD,CAEA,mKACC,4BACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../tooltip/mixins/_tooltip.css\\\";\\n\\n.ck.ck-splitbutton {\\n\\t/* Enable font size inheritance, which allows fluid UI scaling. */\\n\\tfont-size: inherit;\\n\\n\\t& .ck-splitbutton__action:focus {\\n\\t\\tz-index: calc(var(--ck-z-default) + 1);\\n\\t}\\n\\n\\t/* Disable tooltips for the buttons when the button is \\\"open\\\" */\\n\\t&.ck-splitbutton_open > .ck-button {\\n\\t\\t@mixin ck-tooltip_disabled;\\n\\t}\\n}\\n\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Enables the tooltip, which is the tooltip is in DOM but\\n * not yet displayed.\\n */\\n@define-mixin ck-tooltip_enabled {\\n\\t& .ck-tooltip {\\n\\t\\tdisplay: block;\\n\\n\\t\\t/*\\n\\t\\t * Don't display tooltips in devices which don't support :hover.\\n\\t\\t * In fact, it's all about iOS, which forces user to click UI elements twice to execute\\n\\t\\t * the primary action, when tooltips are enabled.\\n\\t\\t *\\n\\t\\t * Q: OK, but why not the following query?\\n\\t\\t *\\n\\t\\t * @media (hover) {\\n\\t\\t * display: block;\\n\\t\\t * }\\n\\t\\t *\\n\\t\\t * A: Because FF does not support it and it would completely disable tooltips\\n\\t\\t * in that browser.\\n\\t\\t *\\n\\t\\t * More in https://github.com/ckeditor/ckeditor5/issues/920.\\n\\t\\t */\\n\\t\\t@media (hover:none) {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t}\\n}\\n\\n/**\\n * Disables the tooltip making it disappear from DOM.\\n */\\n@define-mixin ck-tooltip_disabled {\\n\\t& .ck-tooltip {\\n\\t\\tdisplay: none;\\n\\t}\\n}\\n\\n/**\\n * Shows the tooltip, which is already in DOM.\\n * Requires `ck-tooltip_enabled` first.\\n */\\n@define-mixin ck-tooltip_visible {\\n\\t& .ck-tooltip {\\n\\t\\tvisibility: visible;\\n\\t\\topacity: 1;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../../mixins/_rounded.css\\\";\\n\\n:root {\\n\\t--ck-color-split-button-hover-background: hsl(0, 0%, 92%);\\n\\t--ck-color-split-button-hover-border: hsl(0, 0%, 70%);\\n}\\n\\n.ck.ck-splitbutton {\\n\\t/*\\n\\t * Note: ck-rounded and ck-dir mixins don't go together (because they both use @nest).\\n\\t */\\n\\t&:hover > .ck-splitbutton__action,\\n\\t&.ck-splitbutton_open > .ck-splitbutton__action {\\n\\t\\t@nest [dir=\\\"ltr\\\"] & {\\n\\t\\t\\t/* Don't round the action button on the right side */\\n\\t\\t\\tborder-top-right-radius: unset;\\n\\t\\t\\tborder-bottom-right-radius: unset;\\n\\t\\t}\\n\\n\\t\\t@nest [dir=\\\"rtl\\\"] & {\\n\\t\\t\\t/* Don't round the action button on the left side */\\n\\t\\t\\tborder-top-left-radius: unset;\\n\\t\\t\\tborder-bottom-left-radius: unset;\\n\\t\\t}\\n\\t}\\n\\n\\t& > .ck-splitbutton__arrow {\\n\\t\\t/* It's a text-less button and since the icon is positioned absolutely in such situation,\\n\\t\\tit must get some arbitrary min-width. */\\n\\t\\tmin-width: unset;\\n\\n\\t\\t@nest [dir=\\\"ltr\\\"] & {\\n\\t\\t\\t/* Don't round the arrow button on the left side */\\n\\t\\t\\tborder-top-left-radius: unset;\\n\\t\\t\\tborder-bottom-left-radius: unset;\\n\\t\\t}\\n\\n\\t\\t@nest [dir=\\\"rtl\\\"] & {\\n\\t\\t\\t/* Don't round the arrow button on the right side */\\n\\t\\t\\tborder-top-right-radius: unset;\\n\\t\\t\\tborder-bottom-right-radius: unset;\\n\\t\\t}\\n\\n\\t\\t& svg {\\n\\t\\t\\twidth: var(--ck-dropdown-arrow-size);\\n\\t\\t}\\n\\t}\\n\\n\\t/* When the split button is \\\"open\\\" (the arrow is on) or being hovered, it should get some styling\\n\\tas a whole. The background of both buttons should stand out and there should be a visual\\n\\tseparation between both buttons. */\\n\\t&.ck-splitbutton_open,\\n\\t&:hover {\\n\\t\\t/* When the split button hovered as a whole, not as individual buttons. */\\n\\t\\t& > .ck-button:not(.ck-on):not(.ck-disabled):not(:hover) {\\n\\t\\t\\tbackground: var(--ck-color-split-button-hover-background);\\n\\t\\t}\\n\\n\\t\\t/* Splitbutton separator needs to be set with the ::after pseudoselector\\n\\t\\tto display properly the borders on focus */\\n\\t\\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\\n\\t\\t\\tcontent: '';\\n\\t\\t\\tposition: absolute;\\n\\t\\t\\twidth: 1px;\\n\\t\\t\\theight: 100%;\\n\\t\\t\\tbackground-color: var(--ck-color-split-button-hover-border);\\n\\t\\t}\\n\\n\\t\\t@nest [dir=\\\"ltr\\\"] & {\\n\\t\\t\\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\\n\\t\\t\\t\\tleft: -1px;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t@nest [dir=\\\"rtl\\\"] & {\\n\\t\\t\\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\\n\\t\\t\\t\\tright: -1px;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t/* Don't round the bottom left and right corners of the buttons when \\\"open\\\"\\n\\thttps://github.com/ckeditor/ckeditor5/issues/816 */\\n\\t&.ck-splitbutton_open {\\n\\t\\t@mixin ck-rounded-corners {\\n\\t\\t\\t& > .ck-splitbutton__action {\\n\\t\\t\\t\\tborder-bottom-left-radius: 0;\\n\\t\\t\\t}\\n\\n\\t\\t\\t& > .ck-splitbutton__arrow {\\n\\t\\t\\t\\tborder-bottom-right-radius: 0;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Implements rounded corner interface for .ck-rounded-corners class.\\n *\\n * @see $ck-border-radius\\n */\\n@define-mixin ck-rounded-corners {\\n\\tborder-radius: 0;\\n\\n\\t@nest .ck-rounded-corners &,\\n\\t&.ck-rounded-corners {\\n\\t\\tborder-radius: var(--ck-border-radius);\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{width:max-content;max-width:var(--ck-toolbar-dropdown-max-width)}.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}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/dropdown/toolbardropdown.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/toolbardropdown.css\"],\"names\":[],\"mappings\":\"AAKA,MACC,oCACD,CAEA,4CAEC,iBAAkB,CAClB,8CAOD,CAJE,6DACC,qCACD,CCZF,oCACC,QACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-toolbar-dropdown-max-width: 60vw;\\n}\\n\\n.ck.ck-toolbar-dropdown > .ck-dropdown__panel {\\n\\t/* https://github.com/ckeditor/ckeditor5/issues/5586 */\\n\\twidth: max-content;\\n\\tmax-width: var(--ck-toolbar-dropdown-max-width);\\n\\n\\t& .ck-button {\\n\\t\\t&:focus {\\n\\t\\t\\tz-index: calc(var(--ck-z-default) + 1);\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-toolbar-dropdown .ck-toolbar {\\n\\tborder: 0;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-focused{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0}.ck.ck-editor__editable_inline{overflow:auto;padding:0 var(--ck-spacing-standard);border:1px solid transparent}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>: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)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/editorui/editorui.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css\"],\"names\":[],\"mappings\":\"AAWA,MACC,0CACD,CAEA,yDCJC,eDWD,CAPA,yJCAE,qCDOF,CAJC,oEERA,YAAa,CACb,2BAA2B,CCF3B,qCHYA,CAGD,+BACC,aAAc,CACd,oCAAqC,CACrC,4BA4BD,CA1BC,wCACC,eACD,CAEA,wCACC,gBACD,CAGA,4CACC,kCACD,CAGA,2CAKC,qCACD,CAGA,sDACC,kDACD,CAKA,gEACC,mDACD,CAIA,gEACC,gDACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../../mixins/_rounded.css\\\";\\n@import \\\"../../../mixins/_disabled.css\\\";\\n@import \\\"../../../mixins/_shadow.css\\\";\\n@import \\\"../../../mixins/_focus.css\\\";\\n@import \\\"../../mixins/_button.css\\\";\\n\\n:root {\\n\\t--ck-color-editable-blur-selection: hsl(0, 0%, 85%);\\n}\\n\\n.ck.ck-editor__editable:not(.ck-editor__nested-editable) {\\n\\t@mixin ck-rounded-corners;\\n\\n\\t&.ck-focused {\\n\\t\\t@mixin ck-focus-ring;\\n\\t\\t@mixin ck-box-shadow var(--ck-inner-shadow);\\n\\t}\\n}\\n\\n.ck.ck-editor__editable_inline {\\n\\toverflow: auto;\\n\\tpadding: 0 var(--ck-spacing-standard);\\n\\tborder: 1px solid transparent;\\n\\n\\t&[dir=\\\"ltr\\\"] {\\n\\t\\ttext-align: left;\\n\\t}\\n\\n\\t&[dir=\\\"rtl\\\"] {\\n\\t\\ttext-align: right;\\n\\t}\\n\\n\\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/116 */\\n\\t& > *:first-child {\\n\\t\\tmargin-top: var(--ck-spacing-large);\\n\\t}\\n\\n\\t/* https://github.com/ckeditor/ckeditor5/issues/847 */\\n\\t& > *:last-child {\\n\\t\\t/*\\n\\t\\t * This value should match with the default margins of the block elements (like .media or .image)\\n\\t\\t * to avoid a content jumping when the fake selection container shows up (See https://github.com/ckeditor/ckeditor5/issues/9825).\\n\\t\\t */\\n\\t\\tmargin-bottom: var(--ck-spacing-large);\\n\\t}\\n\\n\\t/* https://github.com/ckeditor/ckeditor5/issues/6517 */\\n\\t&.ck-blurred ::selection {\\n\\t\\tbackground: var(--ck-color-editable-blur-selection);\\n\\t}\\n}\\n\\n/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/111 */\\n.ck.ck-balloon-panel.ck-toolbar-container[class*=\\\"arrow_n\\\"] {\\n\\t&::after {\\n\\t\\tborder-bottom-color: var(--ck-color-base-foreground);\\n\\t}\\n}\\n\\n.ck.ck-balloon-panel.ck-toolbar-container[class*=\\\"arrow_s\\\"] {\\n\\t&::after {\\n\\t\\tborder-top-color: var(--ck-color-base-foreground);\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Implements rounded corner interface for .ck-rounded-corners class.\\n *\\n * @see $ck-border-radius\\n */\\n@define-mixin ck-rounded-corners {\\n\\tborder-radius: 0;\\n\\n\\t@nest .ck-rounded-corners &,\\n\\t&.ck-rounded-corners {\\n\\t\\tborder-radius: var(--ck-border-radius);\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A visual style of focused element's border.\\n */\\n@define-mixin ck-focus-ring {\\n\\t/* Disable native outline. */\\n\\toutline: none;\\n\\tborder: var(--ck-focus-ring)\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A helper to combine multiple shadows.\\n */\\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\\n\\tbox-shadow: $shadowA, $shadowB;\\n}\\n\\n/**\\n * Gives an element a drop shadow so it looks like a floating panel.\\n */\\n@define-mixin ck-drop-shadow {\\n\\t@mixin ck-box-shadow var(--ck-drop-shadow);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-form__header{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{padding:var(--ck-spacing-small) var(--ck-spacing-large);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);border-bottom:1px solid var(--ck-color-base-border)}.ck.ck-form__header .ck-form__header__label{font-weight:700}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/formheader/formheader.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/formheader/formheader.css\"],\"names\":[],\"mappings\":\"AAKA,oBACC,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,kBAAmB,CACnB,6BACD,CCNA,MACC,4BACD,CAEA,oBACC,uDAAwD,CACxD,mCAAoC,CACpC,wCAAyC,CACzC,mDAKD,CAHC,4CACC,eACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-form__header {\\n\\tdisplay: flex;\\n\\tflex-direction: row;\\n\\tflex-wrap: nowrap;\\n\\talign-items: center;\\n\\tjustify-content: space-between;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-form-header-height: 38px;\\n}\\n\\n.ck.ck-form__header {\\n\\tpadding: var(--ck-spacing-small) var(--ck-spacing-large);\\n\\theight: var(--ck-form-header-height);\\n\\tline-height: var(--ck-form-header-height);\\n\\tborder-bottom: 1px solid var(--ck-color-base-border);\\n\\n\\t& .ck-form__header__label {\\n\\t\\tfont-weight: bold;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/icon/icon.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/icon/icon.css\"],\"names\":[],\"mappings\":\"AAKA,YACC,qBACD,CCFA,MACC,0EACD,CAEA,YACC,yBAA0B,CAC1B,0BAA2B,CAG3B,uBAAwB,CAQxB,qBAcD,CAZC,0BARA,aAAc,CAGd,cAgBA,CAJC,yBAEC,iBACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-icon {\\n\\tvertical-align: middle;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-icon-size: calc(var(--ck-line-height-base) * var(--ck-font-size-normal));\\n}\\n\\n.ck.ck-icon {\\n\\twidth: var(--ck-icon-size);\\n\\theight: var(--ck-icon-size);\\n\\n\\t/* Multiplied by the height of the line in \\\"px\\\" should give SVG \\\"viewport\\\" dimensions */\\n\\tfont-size: .8333350694em;\\n\\n\\tcolor: inherit;\\n\\n\\t/* Inherit cursor style (#5). */\\n\\tcursor: inherit;\\n\\n\\t/* This will prevent blurry icons on Firefox. See #340. */\\n\\twill-change: transform;\\n\\n\\t& * {\\n\\t\\t/* Inherit cursor style (#5). */\\n\\t\\tcursor: inherit;\\n\\n\\t\\t/* Allows dynamic coloring of the icons. */\\n\\t\\tcolor: inherit;\\n\\n\\t\\t&:not([fill]) {\\n\\t\\t\\t/* Needed by FF. */\\n\\t\\t\\tfill: currentColor;\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{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-width);min-height:var(--ck-ui-component-min-height);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-input[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[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{border-color:var(--ck-color-input-error-border);animation:ck-input-shake .3s ease both}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/input/input.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css\"],\"names\":[],\"mappings\":\"AASA,MACC,qBAAsB,CAGtB,2CACD,CAEA,aCLC,eD2CD,CAtCA,iECDE,qCDuCF,CAtCA,aAGC,2CAA4C,CAC5C,6CAA8C,CAC9C,6DAA8D,CAC9D,+BAAgC,CAGhC,4CAA6C,CAG7C,4DA0BD,CAxBC,mBEpBA,YAAa,CACb,2BAA2B,CCF3B,2CHwBA,CAEA,uBACC,sDAAuD,CACvD,oDAAqD,CACrD,yCAMD,CAJC,6BG/BD,oDHkCC,CAGD,sBACC,+CAAgD,CAChD,sCAKD,CAHC,4BGzCD,iDH2CC,CAIF,0BACC,IACC,0BACD,CAEA,IACC,yBACD,CAEA,IACC,0BACD,CAEA,IACC,yBACD,CACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../../mixins/_rounded.css\\\";\\n@import \\\"../../../mixins/_focus.css\\\";\\n@import \\\"../../../mixins/_shadow.css\\\";\\n\\n:root {\\n\\t--ck-input-width: 18em;\\n\\n\\t/* Backward compatibility. */\\n\\t--ck-input-text-width: var(--ck-input-width);\\n}\\n\\n.ck.ck-input {\\n\\t@mixin ck-rounded-corners;\\n\\n\\tbackground: var(--ck-color-input-background);\\n\\tborder: 1px solid var(--ck-color-input-border);\\n\\tpadding: var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);\\n\\tmin-width: var(--ck-input-width);\\n\\n\\t/* This is important to stay of the same height as surrounding buttons */\\n\\tmin-height: var(--ck-ui-component-min-height);\\n\\n\\t/* Apply some smooth transition to the box-shadow and border. */\\n\\ttransition: box-shadow .1s ease-in-out, border .1s ease-in-out;\\n\\n\\t&:focus {\\n\\t\\t@mixin ck-focus-ring;\\n\\t\\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\\n\\t}\\n\\n\\t&[readonly] {\\n\\t\\tborder: 1px solid var(--ck-color-input-disabled-border);\\n\\t\\tbackground: var(--ck-color-input-disabled-background);\\n\\t\\tcolor: var(--ck-color-input-disabled-text);\\n\\n\\t\\t&:focus {\\n\\t\\t\\t/* The read-only input should have a slightly less visible shadow when focused. */\\n\\t\\t\\t@mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow);\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-error {\\n\\t\\tborder-color: var(--ck-color-input-error-border);\\n\\t\\tanimation: ck-input-shake .3s ease both;\\n\\n\\t\\t&:focus {\\n\\t\\t\\t@mixin ck-box-shadow var(--ck-focus-error-outer-shadow);\\n\\t\\t}\\n\\t}\\n}\\n\\n@keyframes ck-input-shake {\\n\\t20% {\\n\\t\\ttransform: translateX(-2px);\\n\\t}\\n\\n\\t40% {\\n\\t\\ttransform: translateX(2px);\\n\\t}\\n\\n\\t60% {\\n\\t\\ttransform: translateX(-1px);\\n\\t}\\n\\n\\t80% {\\n\\t\\ttransform: translateX(1px);\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Implements rounded corner interface for .ck-rounded-corners class.\\n *\\n * @see $ck-border-radius\\n */\\n@define-mixin ck-rounded-corners {\\n\\tborder-radius: 0;\\n\\n\\t@nest .ck-rounded-corners &,\\n\\t&.ck-rounded-corners {\\n\\t\\tborder-radius: var(--ck-border-radius);\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A visual style of focused element's border.\\n */\\n@define-mixin ck-focus-ring {\\n\\t/* Disable native outline. */\\n\\toutline: none;\\n\\tborder: var(--ck-focus-ring)\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A helper to combine multiple shadows.\\n */\\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\\n\\tbox-shadow: $shadowA, $shadowB;\\n}\\n\\n/**\\n * Gives an element a drop shadow so it looks like a floating panel.\\n */\\n@define-mixin ck-drop-shadow {\\n\\t@mixin ck-box-shadow var(--ck-drop-shadow);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/label/label.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/label/label.css\"],\"names\":[],\"mappings\":\"AAKA,aACC,aACD,CAEA,mBACC,YACD,CCNA,aACC,eACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-label {\\n\\tdisplay: block;\\n}\\n\\n.ck.ck-voice-label {\\n\\tdisplay: none;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-label {\\n\\tfont-weight: bold;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{pointer-events:none;transform-origin:0 0;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);background:var(--ck-color-labeled-field-label-background);padding:0 calc(var(--ck-font-size-tiny)*0.5);line-height:normal;font-weight:400;text-overflow:ellipsis;overflow:hidden;max-width:100%;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.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.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-spacing-medium),calc(var(--ck-font-size-base)*0.6)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-spacing-medium)*-1),calc(var(--ck-font-size-base)*0.6)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));background:transparent;padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/labeledfield/labeledfieldview.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css\"],\"names\":[],\"mappings\":\"AAMC,mEACC,YAAa,CACb,iBACD,CAEA,uCACC,aAAc,CACd,iBACD,CCND,MACC,kEAAsE,CACtE,gFAAiF,CACjF,yEACD,CAEA,0BCHC,eD4GD,CAzGA,2FCCE,qCDwGF,CAtGC,mEACC,UAmCD,CAjCC,gFACC,KA+BD,CAhCA,0FAIE,MA4BF,CAhCA,0FAQE,OAwBF,CAhCA,gFAWC,mBAAoB,CACpB,oBAAqB,CAGrB,6DAA+D,CAE/D,yDAA0D,CAC1D,4CAA8C,CAC9C,kBAAoB,CACpB,eAAmB,CAGnB,sBAAuB,CACvB,eAAgB,CAEhB,cAAe,CAEf,+JAID,CAQA,mKACC,gCACD,CAGD,yDACC,mCAAoC,CACpC,kCAAmC,CAInC,kBAKD,CAHC,6FACC,gCACD,CAID,4OAEC,yCACD,CAIA,oUAGE,yFAYF,CAfA,oUAOE,kGAQF,CAfA,gTAWC,iEAAkE,CAElE,sBAAuB,CACvB,SACD,CAKA,8FACC,sBACD,CAGA,yIACC,SACD,CAGA,kMACC,8HACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-labeled-field-view {\\n\\t& > .ck.ck-labeled-field-view__input-wrapper {\\n\\t\\tdisplay: flex;\\n\\t\\tposition: relative;\\n\\t}\\n\\n\\t& .ck.ck-label {\\n\\t\\tdisplay: block;\\n\\t\\tposition: absolute;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_dir.css\\\";\\n@import \\\"../../../mixins/_rounded.css\\\";\\n\\n:root {\\n\\t--ck-labeled-field-view-transition: .1s cubic-bezier(0, 0, 0.24, 0.95);\\n\\t--ck-labeled-field-empty-unfocused-max-width: 100% - 2 * var(--ck-spacing-medium);\\n\\t--ck-color-labeled-field-label-background: var(--ck-color-base-background);\\n}\\n\\n.ck.ck-labeled-field-view {\\n\\t@mixin ck-rounded-corners;\\n\\n\\t& > .ck.ck-labeled-field-view__input-wrapper {\\n\\t\\twidth: 100%;\\n\\n\\t\\t& > .ck.ck-label {\\n\\t\\t\\ttop: 0px;\\n\\n\\t\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\t\\tleft: 0px;\\n\\t\\t\\t}\\n\\n\\t\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\t\\tright: 0px;\\n\\t\\t\\t}\\n\\n\\t\\t\\tpointer-events: none;\\n\\t\\t\\ttransform-origin: 0 0;\\n\\n\\t\\t\\t/* By default, display the label scaled down above the field. */\\n\\t\\t\\ttransform: translate(var(--ck-spacing-medium), -6px) scale(.75);\\n\\n\\t\\t\\tbackground: var(--ck-color-labeled-field-label-background);\\n\\t\\t\\tpadding: 0 calc(.5 * var(--ck-font-size-tiny));\\n\\t\\t\\tline-height: initial;\\n\\t\\t\\tfont-weight: normal;\\n\\n\\t\\t\\t/* Prevent overflow when the label is longer than the input */\\n\\t\\t\\ttext-overflow: ellipsis;\\n\\t\\t\\toverflow: hidden;\\n\\n\\t\\t\\tmax-width: 100%;\\n\\n\\t\\t\\ttransition:\\n\\t\\t\\t\\ttransform var(--ck-labeled-field-view-transition),\\n\\t\\t\\t\\tpadding var(--ck-labeled-field-view-transition),\\n\\t\\t\\t\\tbackground var(--ck-labeled-field-view-transition);\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-error {\\n\\t\\t& > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\\n\\t\\t\\tcolor: var(--ck-color-base-error);\\n\\t\\t}\\n\\n\\t\\t& .ck-input:not([readonly]) + .ck.ck-label {\\n\\t\\t\\tcolor: var(--ck-color-base-error);\\n\\t\\t}\\n\\t}\\n\\n\\t& .ck-labeled-field-view__status {\\n\\t\\tfont-size: var(--ck-font-size-small);\\n\\t\\tmargin-top: var(--ck-spacing-small);\\n\\n\\t\\t/* Let the info wrap to the next line to avoid stretching the layout horizontally.\\n\\t\\tThe status could be very long. */\\n\\t\\twhite-space: normal;\\n\\n\\t\\t&.ck-labeled-field-view__status_error {\\n\\t\\t\\tcolor: var(--ck-color-base-error);\\n\\t\\t}\\n\\t}\\n\\n\\t/* Disabled fields and fields that have no focus should fade out. */\\n\\t&.ck-disabled > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label,\\n\\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\\n\\t\\tcolor: var(--ck-color-input-disabled-text);\\n\\t}\\n\\n\\t/* Fields that are disabled or not focused and without a placeholder should have full-sized labels. */\\n\\t/* stylelint-disable-next-line no-descending-specificity */\\n\\t&.ck-disabled.ck-labeled-field-view_empty > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label,\\n\\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\\n\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\ttransform: translate(var(--ck-spacing-medium), calc(0.6 * var(--ck-font-size-base))) scale(1);\\n\\t\\t}\\n\\n\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\ttransform: translate(calc(-1 * var(--ck-spacing-medium)), calc(0.6 * var(--ck-font-size-base))) scale(1);\\n\\t\\t}\\n\\n\\t\\t/* Compensate for the default translate position. */\\n\\t\\tmax-width: calc(var(--ck-labeled-field-empty-unfocused-max-width));\\n\\n\\t\\tbackground: transparent;\\n\\t\\tpadding: 0;\\n\\t}\\n\\n\\t/*------ DropdownView integration ----------------------------------------------------------------------------------- */\\n\\n\\t/* Make sure dropdown' background color in any of dropdown's state does not collide with labeled field. */\\n\\t& > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck.ck-button {\\n\\t\\tbackground: transparent;\\n\\t}\\n\\n\\t/* When the dropdown is \\\"empty\\\", the labeled field label replaces its label. */\\n\\t&.ck-labeled-field-view_empty > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck-button > .ck-button__label {\\n\\t\\topacity: 0;\\n\\t}\\n\\n\\t/* Make sure the label of the empty, unfocused input does not cover the dropdown arrow. */\\n\\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown + .ck-label {\\n\\t\\tmax-width: calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard));\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Implements rounded corner interface for .ck-rounded-corners class.\\n *\\n * @see $ck-border-radius\\n */\\n@define-mixin ck-rounded-corners {\\n\\tborder-radius: 0;\\n\\n\\t@nest .ck-rounded-corners &,\\n\\t&.ck-rounded-corners {\\n\\t\\tborder-radius: var(--ck-border-radius);\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-labeled-input .ck-labeled-input__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-input .ck-labeled-input__status_error{color:var(--ck-color-base-error)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/labeledinput/labeledinput.css\"],\"names\":[],\"mappings\":\"AAKA,+CACC,mCAAoC,CACpC,kCAAmC,CAInC,kBACD,CAEA,qDACC,gCACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-labeled-input .ck-labeled-input__status {\\n\\tfont-size: var(--ck-font-size-small);\\n\\tmargin-top: var(--ck-spacing-small);\\n\\n\\t/* Let the info wrap to the next line to avoid stretching the layout horizontally.\\n\\tThe status could be very long. */\\n\\twhite-space: normal;\\n}\\n\\n.ck.ck-labeled-input .ck-labeled-input__status_error {\\n\\tcolor: var(--ck-color-base-error);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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(var(--ck-line-height-base)*0.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*0.4*var(--ck-font-size-base))}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(var(--ck-line-height-base)*1.2*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)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/list/list.css\",\"webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/list/list.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css\"],\"names\":[],\"mappings\":\"AAOA,YCEC,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBAAgB,CDFhB,YAAa,CACb,qBAcD,CAZC,2DAEC,aACD,CAKA,kCACC,iBAAkB,CAClB,2BACD,CEfD,YCEC,eDGD,CALA,+DCME,qCDDF,CALA,YAGC,oBAAqB,CACrB,0CACD,CAEA,kBACC,cAAe,CACf,cA2DD,CAzDC,6BACC,gBAAiB,CACjB,UAAW,CACX,eAAgB,CAChB,eAAgB,CAKhB,mIAiCD,CA7BC,+CAEC,yEACD,CAEA,oCACC,eACD,CAEA,mCACC,oDAAqD,CACrD,yCAaD,CAXC,0CACC,eACD,CAEA,2DACC,0DACD,CAEA,2DACC,4CACD,CAGD,qDACC,uDACD,CAMA,yCACC,0CAA2C,CAC3C,aAMD,CAJC,iEACC,uDAAwD,CACxD,aACD,CAKH,uBACC,UAAW,CACX,UAAW,CACX,sCACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../mixins/_unselectable.css\\\";\\n\\n.ck.ck-list {\\n\\t@mixin ck-unselectable;\\n\\n\\tdisplay: flex;\\n\\tflex-direction: column;\\n\\n\\t& .ck-list__item,\\n\\t& .ck-list__separator {\\n\\t\\tdisplay: block;\\n\\t}\\n\\n\\t/* Make sure that whatever child of the list item gets focus, it remains on the\\n\\ttop. Thanks to that, styles like box-shadow, outline, etc. are not masked by\\n\\tadjacent list items. */\\n\\t& .ck-list__item > *:focus {\\n\\t\\tposition: relative;\\n\\t\\tz-index: var(--ck-z-default);\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Makes element unselectable.\\n */\\n@define-mixin ck-unselectable {\\n\\t-moz-user-select: none;\\n\\t-webkit-user-select: none;\\n\\t-ms-user-select: none;\\n\\tuser-select: none\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../../mixins/_disabled.css\\\";\\n@import \\\"../../../mixins/_rounded.css\\\";\\n@import \\\"../../../mixins/_shadow.css\\\";\\n\\n.ck.ck-list {\\n\\t@mixin ck-rounded-corners;\\n\\n\\tlist-style-type: none;\\n\\tbackground: var(--ck-color-list-background);\\n}\\n\\n.ck.ck-list__item {\\n\\tcursor: default;\\n\\tmin-width: 12em;\\n\\n\\t& .ck-button {\\n\\t\\tmin-height: unset;\\n\\t\\twidth: 100%;\\n\\t\\ttext-align: left;\\n\\t\\tborder-radius: 0;\\n\\n\\t\\t/* List items should have the same height. Use absolute units to make sure it is so\\n\\t\\t because e.g. different heading styles may have different height\\n\\t\\t https://github.com/ckeditor/ckeditor5-heading/issues/63 */\\n\\t\\tpadding:\\n\\t\\t\\tcalc(.2 * var(--ck-line-height-base) * var(--ck-font-size-base))\\n\\t\\t\\tcalc(.4 * var(--ck-line-height-base) * var(--ck-font-size-base));\\n\\n\\t\\t& .ck-button__label {\\n\\t\\t\\t/* https://github.com/ckeditor/ckeditor5-heading/issues/63 */\\n\\t\\t\\tline-height: calc(1.2 * var(--ck-line-height-base) * var(--ck-font-size-base));\\n\\t\\t}\\n\\n\\t\\t&:active {\\n\\t\\t\\tbox-shadow: none;\\n\\t\\t}\\n\\n\\t\\t&.ck-on {\\n\\t\\t\\tbackground: var(--ck-color-list-button-on-background);\\n\\t\\t\\tcolor: var(--ck-color-list-button-on-text);\\n\\n\\t\\t\\t&:active {\\n\\t\\t\\t\\tbox-shadow: none;\\n\\t\\t\\t}\\n\\n\\t\\t\\t&:hover:not(.ck-disabled) {\\n\\t\\t\\t\\tbackground: var(--ck-color-list-button-on-background-focus);\\n\\t\\t\\t}\\n\\n\\t\\t\\t&:focus:not(.ck-disabled) {\\n\\t\\t\\t\\tborder-color: var(--ck-color-base-background);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t&:hover:not(.ck-disabled) {\\n\\t\\t\\tbackground: var(--ck-color-list-button-hover-background);\\n\\t\\t}\\n\\t}\\n\\n\\t/* It's unnecessary to change the background/text of a switch toggle; it has different ways\\n\\tof conveying its state (like the switcher) */\\n\\t& .ck-switchbutton {\\n\\t\\t&.ck-on {\\n\\t\\t\\tbackground: var(--ck-color-list-background);\\n\\t\\t\\tcolor: inherit;\\n\\n\\t\\t\\t&:hover:not(.ck-disabled) {\\n\\t\\t\\t\\tbackground: var(--ck-color-list-button-hover-background);\\n\\t\\t\\t\\tcolor: inherit;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\\n.ck.ck-list__separator {\\n\\theight: 1px;\\n\\twidth: 100%;\\n\\tbackground: var(--ck-color-base-border);\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Implements rounded corner interface for .ck-rounded-corners class.\\n *\\n * @see $ck-border-radius\\n */\\n@define-mixin ck-rounded-corners {\\n\\tborder-radius: 0;\\n\\n\\t@nest .ck-rounded-corners &,\\n\\t&.ck-rounded-corners {\\n\\t\\tborder-radius: var(--ck-border-radius);\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":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-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.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);filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow))}.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(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.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(var(--ck-balloon-arrow-half-width)*-1);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.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(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.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(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.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(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.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(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/panel/balloonpanel.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonpanel.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css\"],\"names\":[],\"mappings\":\"AAKA,MAEC,8DACD,CAEA,qBACC,YAAa,CACb,iBAAkB,CAElB,yBAyCD,CAtCE,+GAEC,UAAW,CACX,iBACD,CAEA,wDACC,6CACD,CAEA,uDACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAGD,8CACC,aACD,CC9CD,MACC,6BAA8B,CAC9B,8BAA+B,CAC/B,iCAAkC,CAClC,oEACD,CAEA,qBCJC,eD4ID,CAxIA,iFCAE,qCDwIF,CAxIA,qBENC,oCAA8B,CFU9B,eAAgB,CAEhB,2CAA4C,CAC5C,6CAiID,CA9HE,+GAEC,OAAQ,CACR,QAAS,CACT,kBACD,CAIA,uFAEC,oDAAoH,CAApH,kDAAoH,CAApH,qDAAoH,CAApH,kBACD,CAEA,4CACC,gDACD,CAEA,uFAHC,6BAA8E,CAA9E,8BAA8E,CAA9E,4BAMD,CAHA,2CACC,oDAAkF,CAClF,yCACD,CAIA,uFAEC,oDAAoH,CAApH,qBAAoH,CAApH,qDAAoH,CAApH,+CACD,CAEA,4CACC,6CAAkE,CAClE,uDACD,CAEA,uFAJC,6BAAkE,CAAlE,+BAAkE,CAAlE,8BAOD,CAHA,2CACC,iDAAkF,CAClF,4CACD,CAIA,yGAEC,QAAS,CACT,uDAA0D,CAC1D,2CACD,CAIA,2GAEC,+CAAkD,CAClD,2CACD,CAIA,2GAEC,gDAAmD,CACnD,2CACD,CAIA,yGAEC,QAAS,CACT,uDAA0D,CAC1D,8CACD,CAIA,2GAEC,+CAAkD,CAClD,8CACD,CAIA,2GAEC,gDAAmD,CACnD,8CACD,CAIA,6GAEC,SAAU,CACV,uDAA0D,CAC1D,8CACD,CAIA,6GAEC,QAAS,CACT,sDAAyD,CACzD,8CACD,CAIA,6GAEC,SAAU,CACV,uDAA0D,CAC1D,2CACD,CAIA,6GAEC,QAAS,CACT,sDAAyD,CACzD,2CACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t/* Make sure the balloon arrow does not float over its children. */\\n\\t--ck-balloon-panel-arrow-z-index: calc(var(--ck-z-default) - 3);\\n}\\n\\n.ck.ck-balloon-panel {\\n\\tdisplay: none;\\n\\tposition: absolute;\\n\\n\\tz-index: var(--ck-z-modal);\\n\\n\\t&.ck-balloon-panel_with-arrow {\\n\\t\\t&::before,\\n\\t\\t&::after {\\n\\t\\t\\tcontent: \\\"\\\";\\n\\t\\t\\tposition: absolute;\\n\\t\\t}\\n\\n\\t\\t&::before {\\n\\t\\t\\tz-index: var(--ck-balloon-panel-arrow-z-index);\\n\\t\\t}\\n\\n\\t\\t&::after {\\n\\t\\t\\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\\n\\t\\t}\\n\\t}\\n\\n\\t&[class*=\\\"arrow_n\\\"] {\\n\\t\\t&::before {\\n\\t\\t\\tz-index: var(--ck-balloon-panel-arrow-z-index);\\n\\t\\t}\\n\\n\\t\\t&::after {\\n\\t\\t\\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\\n\\t\\t}\\n\\t}\\n\\n\\t&[class*=\\\"arrow_s\\\"] {\\n\\t\\t&::before {\\n\\t\\t\\tz-index: var(--ck-balloon-panel-arrow-z-index);\\n\\t\\t}\\n\\n\\t\\t&::after {\\n\\t\\t\\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-balloon-panel_visible {\\n\\t\\tdisplay: block;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../../mixins/_rounded.css\\\";\\n@import \\\"../../../mixins/_shadow.css\\\";\\n\\n:root {\\n\\t--ck-balloon-arrow-offset: 2px;\\n\\t--ck-balloon-arrow-height: 10px;\\n\\t--ck-balloon-arrow-half-width: 8px;\\n\\t--ck-balloon-arrow-drop-shadow: 0 2px 2px var(--ck-color-shadow-drop);\\n}\\n\\n.ck.ck-balloon-panel {\\n\\t@mixin ck-rounded-corners;\\n\\t@mixin ck-drop-shadow;\\n\\n\\tmin-height: 15px;\\n\\n\\tbackground: var(--ck-color-panel-background);\\n\\tborder: 1px solid var(--ck-color-panel-border);\\n\\n\\t&.ck-balloon-panel_with-arrow {\\n\\t\\t&::before,\\n\\t\\t&::after {\\n\\t\\t\\twidth: 0;\\n\\t\\t\\theight: 0;\\n\\t\\t\\tborder-style: solid;\\n\\t\\t}\\n\\t}\\n\\n\\t&[class*=\\\"arrow_n\\\"] {\\n\\t\\t&::before,\\n\\t\\t&::after {\\n\\t\\t\\tborder-width: 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width);\\n\\t\\t}\\n\\n\\t\\t&::before {\\n\\t\\t\\tborder-color: transparent transparent var(--ck-color-panel-border) transparent;\\n\\t\\t}\\n\\n\\t\\t&::after {\\n\\t\\t\\tborder-color: transparent transparent var(--ck-color-panel-background) transparent;\\n\\t\\t\\tmargin-top: var(--ck-balloon-arrow-offset);\\n\\t\\t}\\n\\t}\\n\\n\\t&[class*=\\\"arrow_s\\\"] {\\n\\t\\t&::before,\\n\\t\\t&::after {\\n\\t\\t\\tborder-width: var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width);\\n\\t\\t}\\n\\n\\t\\t&::before {\\n\\t\\t\\tborder-color: var(--ck-color-panel-border) transparent transparent;\\n\\t\\t\\tfilter: drop-shadow(var(--ck-balloon-arrow-drop-shadow));\\n\\t\\t}\\n\\n\\t\\t&::after {\\n\\t\\t\\tborder-color: var(--ck-color-panel-background) transparent transparent transparent;\\n\\t\\t\\tmargin-bottom: var(--ck-balloon-arrow-offset);\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-balloon-panel_arrow_n {\\n\\t\\t&::before,\\n\\t\\t&::after {\\n\\t\\t\\tleft: 50%;\\n\\t\\t\\tmargin-left: calc(-1 * var(--ck-balloon-arrow-half-width));\\n\\t\\t\\ttop: calc(-1 * var(--ck-balloon-arrow-height));\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-balloon-panel_arrow_nw {\\n\\t\\t&::before,\\n\\t\\t&::after {\\n\\t\\t\\tleft: calc(2 * var(--ck-balloon-arrow-half-width));\\n\\t\\t\\ttop: calc(-1 * var(--ck-balloon-arrow-height));\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-balloon-panel_arrow_ne {\\n\\t\\t&::before,\\n\\t\\t&::after {\\n\\t\\t\\tright: calc(2 * var(--ck-balloon-arrow-half-width));\\n\\t\\t\\ttop: calc(-1 * var(--ck-balloon-arrow-height));\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-balloon-panel_arrow_s {\\n\\t\\t&::before,\\n\\t\\t&::after {\\n\\t\\t\\tleft: 50%;\\n\\t\\t\\tmargin-left: calc(-1 * var(--ck-balloon-arrow-half-width));\\n\\t\\t\\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-balloon-panel_arrow_sw {\\n\\t\\t&::before,\\n\\t\\t&::after {\\n\\t\\t\\tleft: calc(2 * var(--ck-balloon-arrow-half-width));\\n\\t\\t\\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-balloon-panel_arrow_se {\\n\\t\\t&::before,\\n\\t\\t&::after {\\n\\t\\t\\tright: calc(2 * var(--ck-balloon-arrow-half-width));\\n\\t\\t\\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-balloon-panel_arrow_sme {\\n\\t\\t&::before,\\n\\t\\t&::after {\\n\\t\\t\\tright: 25%;\\n\\t\\t\\tmargin-right: calc(2 * var(--ck-balloon-arrow-half-width));\\n\\t\\t\\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-balloon-panel_arrow_smw {\\n\\t\\t&::before,\\n\\t\\t&::after {\\n\\t\\t\\tleft: 25%;\\n\\t\\t\\tmargin-left: calc(2 * var(--ck-balloon-arrow-half-width));\\n\\t\\t\\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-balloon-panel_arrow_nme {\\n\\t\\t&::before,\\n\\t\\t&::after {\\n\\t\\t\\tright: 25%;\\n\\t\\t\\tmargin-right: calc(2 * var(--ck-balloon-arrow-half-width));\\n\\t\\t\\ttop: calc(-1 * var(--ck-balloon-arrow-height));\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-balloon-panel_arrow_nmw {\\n\\t\\t&::before,\\n\\t\\t&::after {\\n\\t\\t\\tleft: 25%;\\n\\t\\t\\tmargin-left: calc(2 * var(--ck-balloon-arrow-half-width));\\n\\t\\t\\ttop: calc(-1 * var(--ck-balloon-arrow-height));\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Implements rounded corner interface for .ck-rounded-corners class.\\n *\\n * @see $ck-border-radius\\n */\\n@define-mixin ck-rounded-corners {\\n\\tborder-radius: 0;\\n\\n\\t@nest .ck-rounded-corners &,\\n\\t&.ck-rounded-corners {\\n\\t\\tborder-radius: var(--ck-border-radius);\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A helper to combine multiple shadows.\\n */\\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\\n\\tbox-shadow: $shadowA, $shadowB;\\n}\\n\\n/**\\n * Gives an element a drop shadow so it looks like a floating panel.\\n */\\n@define-mixin ck-drop-shadow {\\n\\t@mixin ck-box-shadow var(--ck-drop-shadow);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/panel/balloonrotator.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonrotator.css\"],\"names\":[],\"mappings\":\"AAKA,oCACC,YAAa,CACb,kBAAmB,CACnB,sBACD,CAKA,6CACC,sBACD,CCXA,oCACC,6CAA8C,CAC9C,sDAAuD,CACvD,iCAgBD,CAbC,sCACC,oCAAqC,CACrC,kCAAmC,CACnC,qCACD,CAGA,iEACC,uCAAwC,CAGxC,mCACD,CAMA,2DACC,eACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck .ck-balloon-rotator__navigation {\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\tjustify-content: center;\\n}\\n\\n/* Buttons inside a toolbar should be centered when rotator bar is wider.\\n * See: https://github.com/ckeditor/ckeditor5-ui/issues/495\\n */\\n.ck .ck-balloon-rotator__content .ck-toolbar {\\n\\tjustify-content: center;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck .ck-balloon-rotator__navigation {\\n\\tbackground: var(--ck-color-toolbar-background);\\n\\tborder-bottom: 1px solid var(--ck-color-toolbar-border);\\n\\tpadding: 0 var(--ck-spacing-small);\\n\\n\\t/* Let's keep similar appearance to `ck-toolbar`. */\\n\\t& > * {\\n\\t\\tmargin-right: var(--ck-spacing-small);\\n\\t\\tmargin-top: var(--ck-spacing-small);\\n\\t\\tmargin-bottom: var(--ck-spacing-small);\\n\\t}\\n\\n\\t/* Gives counter more breath than buttons. */\\n\\t& .ck-balloon-rotator__counter {\\n\\t\\tmargin-right: var(--ck-spacing-standard);\\n\\n\\t\\t/* We need to use smaller margin because of previous button's right margin. */\\n\\t\\tmargin-left: var(--ck-spacing-small);\\n\\t}\\n}\\n\\n.ck .ck-balloon-rotator__content {\\n\\n\\t/* Disable default annotation shadow inside rotator with fake panels. */\\n\\t& .ck.ck-annotation-wrapper {\\n\\t\\tbox-shadow: none;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/panel/fakepanel.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/fakepanel.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css\"],\"names\":[],\"mappings\":\"AAKA,mBACC,iBAAkB,CAGlB,mCACD,CAEA,uBACC,iBACD,CAEA,mCACC,SACD,CAEA,oCACC,SACD,CCfA,MACC,6CAA8C,CAC9C,2CACD,CAGA,uBCJC,oCAA8B,CDO9B,eAAgB,CAEhB,2CAA4C,CAC5C,6CAA8C,CAC9C,qCAAsC,CAEtC,UAAW,CACX,WACD,CAEA,mCACC,0DAA2D,CAC3D,uDACD,CAEA,oCACC,kEAAqE,CACrE,+DACD,CACA,oCACC,kEAAqE,CACrE,+DACD,CAGA,yIAGC,4CACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck .ck-fake-panel {\\n\\tposition: absolute;\\n\\n\\t/* Fake panels should be placed under main balloon content. */\\n\\tz-index: calc(var(--ck-z-modal) - 1);\\n}\\n\\n.ck .ck-fake-panel div {\\n\\tposition: absolute;\\n}\\n\\n.ck .ck-fake-panel div:nth-child( 1 ) {\\n\\tz-index: 2;\\n}\\n\\n.ck .ck-fake-panel div:nth-child( 2 ) {\\n\\tz-index: 1;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../../mixins/_shadow.css\\\";\\n\\n:root {\\n\\t--ck-balloon-fake-panel-offset-horizontal: 6px;\\n\\t--ck-balloon-fake-panel-offset-vertical: 6px;\\n}\\n\\n/* Let's use `.ck-balloon-panel` appearance. See: balloonpanel.css. */\\n.ck .ck-fake-panel div {\\n\\t@mixin ck-drop-shadow;\\n\\n\\tmin-height: 15px;\\n\\n\\tbackground: var(--ck-color-panel-background);\\n\\tborder: 1px solid var(--ck-color-panel-border);\\n\\tborder-radius: var(--ck-border-radius);\\n\\n\\twidth: 100%;\\n\\theight: 100%;\\n}\\n\\n.ck .ck-fake-panel div:nth-child( 1 ) {\\n\\tmargin-left: var(--ck-balloon-fake-panel-offset-horizontal);\\n\\tmargin-top: var(--ck-balloon-fake-panel-offset-vertical);\\n}\\n\\n.ck .ck-fake-panel div:nth-child( 2 ) {\\n\\tmargin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 2);\\n\\tmargin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 2);\\n}\\n.ck .ck-fake-panel div:nth-child( 3 ) {\\n\\tmargin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 3);\\n\\tmargin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 3);\\n}\\n\\n/* If balloon is positioned above element, we need to move fake panel to the top. */\\n.ck .ck-balloon-panel_arrow_s + .ck-fake-panel,\\n.ck .ck-balloon-panel_arrow_se + .ck-fake-panel,\\n.ck .ck-balloon-panel_arrow_sw + .ck-fake-panel {\\n\\t--ck-balloon-fake-panel-offset-vertical: -6px;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A helper to combine multiple shadows.\\n */\\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\\n\\tbox-shadow: $shadowA, $shadowB;\\n}\\n\\n/**\\n * Gives an element a drop shadow so it looks like a floating panel.\\n */\\n@define-mixin ck-drop-shadow {\\n\\t@mixin ck-box-shadow var(--ck-drop-shadow);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/panel/stickypanel.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/stickypanel.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css\"],\"names\":[],\"mappings\":\"AAMC,qDACC,yBAA0B,CAC1B,cAAe,CACf,KACD,CAEA,kEACC,QAAS,CACT,iBACD,CCPA,qDCCA,oCAA8B,CDE7B,sBAAuB,CACvB,wBAAyB,CACzB,yBACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-sticky-panel {\\n\\t& .ck-sticky-panel__content_sticky {\\n\\t\\tz-index: var(--ck-z-modal); /* #315 */\\n\\t\\tposition: fixed;\\n\\t\\ttop: 0;\\n\\t}\\n\\n\\t& .ck-sticky-panel__content_sticky_bottom-limit {\\n\\t\\ttop: auto;\\n\\t\\tposition: absolute;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../../mixins/_shadow.css\\\";\\n\\n.ck.ck-sticky-panel {\\n\\t& .ck-sticky-panel__content_sticky {\\n\\t\\t@mixin ck-drop-shadow;\\n\\n\\t\\tborder-width: 0 1px 1px;\\n\\t\\tborder-top-left-radius: 0;\\n\\t\\tborder-top-right-radius: 0;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A helper to combine multiple shadows.\\n */\\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\\n\\tbox-shadow: $shadowA, $shadowB;\\n}\\n\\n/**\\n * Gives an element a drop shadow so it looks like a floating panel.\\n */\\n@define-mixin ck-drop-shadow {\\n\\t@mixin ck-box-shadow var(--ck-drop-shadow);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck-vertical-form .ck-button:after{content:\\\"\\\";width:0;position:absolute;right:-1px;top:var(--ck-spacing-small);bottom:var(--ck-spacing-small);z-index:1}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{content:\\\"\\\";width:0;position:absolute;right:-1px;top:var(--ck-spacing-small);bottom:var(--ck-spacing-small);z-index:1}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*0.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-large);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after,[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/responsive-form/responsiveform.css\",\"webpack://./../ckeditor5-ui/theme/mixins/_rwd.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/responsive-form/responsiveform.css\"],\"names\":[],\"mappings\":\"AAOA,mCACC,UAAW,CACX,OAAQ,CACR,iBAAkB,CAClB,UAAW,CACX,2BAA4B,CAC5B,8BAA+B,CAC/B,SACD,CCTC,oCDaC,wCACC,UAAW,CACX,OAAQ,CACR,iBAAkB,CAClB,UAAW,CACX,2BAA4B,CAC5B,8BAA+B,CAC/B,SACD,CCnBD,CCAD,qDACC,kDACD,CAEA,uBACC,+BAkED,CAhEC,6BAEC,YACD,CASC,uGACC,sCACD,CDvBD,oCCMD,uBAqBE,SAAU,CACV,qCA6CF,CA3CE,8CACC,wDAWD,CATC,6DACC,WAAY,CACZ,UACD,CAGA,4EACC,kBACD,CAID,iGAEC,kCAAmC,CACnC,kCAAmC,CAEnC,eAAgB,CAChB,QAAS,CACT,gDAaD,CApBA,0OAcE,aAMF,CAGC,yMACC,kDACD,CDpEF\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css\\\";\\n\\n.ck-vertical-form .ck-button::after {\\n\\tcontent: \\\"\\\";\\n\\twidth: 0;\\n\\tposition: absolute;\\n\\tright: -1px;\\n\\ttop: var(--ck-spacing-small);\\n\\tbottom: var(--ck-spacing-small);\\n\\tz-index: 1;\\n}\\n\\n.ck.ck-responsive-form {\\n\\t@mixin ck-media-phone {\\n\\t\\t& .ck-button::after {\\n\\t\\t\\tcontent: \\\"\\\";\\n\\t\\t\\twidth: 0;\\n\\t\\t\\tposition: absolute;\\n\\t\\t\\tright: -1px;\\n\\t\\t\\ttop: var(--ck-spacing-small);\\n\\t\\t\\tbottom: var(--ck-spacing-small);\\n\\t\\t\\tz-index: 1;\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@define-mixin ck-media-phone {\\n\\t@media screen and (max-width: 600px) {\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css\\\";\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_dir.css\\\";\\n\\n.ck-vertical-form > .ck-button:nth-last-child(2)::after {\\n\\tborder-right: 1px solid var(--ck-color-base-border);\\n}\\n\\n.ck.ck-responsive-form {\\n\\tpadding: var(--ck-spacing-large);\\n\\n\\t&:focus {\\n\\t\\t/* See: https://github.com/ckeditor/ckeditor5/issues/4773 */\\n\\t\\toutline: none;\\n\\t}\\n\\n\\t@mixin ck-dir ltr {\\n\\t\\t& > :not(:first-child) {\\n\\t\\t\\tmargin-left: var(--ck-spacing-standard);\\n\\t\\t}\\n\\t}\\n\\n\\t@mixin ck-dir rtl {\\n\\t\\t& > :not(:last-child) {\\n\\t\\t\\tmargin-left: var(--ck-spacing-standard);\\n\\t\\t}\\n\\t}\\n\\n\\t@mixin ck-media-phone {\\n\\t\\tpadding: 0;\\n\\t\\twidth: calc(.8 * var(--ck-input-width));\\n\\n\\t\\t& .ck-labeled-field-view {\\n\\t\\t\\tmargin: var(--ck-spacing-large) var(--ck-spacing-large) 0;\\n\\n\\t\\t\\t& .ck-input-text {\\n\\t\\t\\t\\tmin-width: 0;\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t}\\n\\n\\t\\t\\t/* Let the long error messages wrap in the narrow form. */\\n\\t\\t\\t& .ck-labeled-field-view__error {\\n\\t\\t\\t\\twhite-space: normal;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t/* Styles for two last buttons in the form (save&cancel, edit&unlink, etc.). */\\n\\t\\t& > .ck-button:nth-last-child(1),\\n\\t\\t& > .ck-button:nth-last-child(2) {\\n\\t\\t\\tpadding: var(--ck-spacing-standard);\\n\\t\\t\\tmargin-top: var(--ck-spacing-large);\\n\\n\\t\\t\\tborder-radius: 0;\\n\\t\\t\\tborder: 0;\\n\\t\\t\\tborder-top: 1px solid var(--ck-color-base-border);\\n\\n\\t\\t\\t@mixin ck-dir ltr {\\n\\t\\t\\t\\tmargin-left: 0;\\n\\t\\t\\t}\\n\\n\\t\\t\\t@mixin ck-dir rtl {\\n\\t\\t\\t\\tmargin-left: 0;\\n\\n\\t\\t\\t\\t&:last-of-type {\\n\\t\\t\\t\\t\\tborder-right: 1px solid var(--ck-color-base-border);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t& > .ck-button:nth-last-child(2) {\\n\\t\\t\\t&::after {\\n\\t\\t\\t\\tborder-right: 1px solid var(--ck-color-base-border);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/toolbar/blocktoolbar.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/blocktoolbar.css\"],\"names\":[],\"mappings\":\"AAKA,4BACC,iBAAkB,CAClB,2BACD,CCHA,MACC,oDAAqD,CACrD,yDACD,CAEA,4BACC,0CAA2C,CAC3C,sCACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-block-toolbar-button {\\n\\tposition: absolute;\\n\\tz-index: var(--ck-z-default);\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-color-block-toolbar-button: var(--ck-color-text);\\n\\t--ck-block-toolbar-button-size: var(--ck-font-size-normal);\\n}\\n\\n.ck.ck-block-toolbar-button {\\n\\tcolor: var(--ck-color-block-toolbar-button);\\n\\tfont-size: var(--ck-block-toolbar-size);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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__line-break{flex-basis:100%}.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__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){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>:not(.ck-toolbar__line-break),.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)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/toolbar/toolbar.css\",\"webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/toolbar.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css\"],\"names\":[],\"mappings\":\"AAOA,eCEC,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBAAgB,CDFhB,YAAa,CACb,oBAAqB,CACrB,kBA6CD,CA3CC,kCACC,YAAa,CACb,kBAAmB,CACnB,kBAAmB,CACnB,WAED,CAEA,yCACC,oBAWD,CAJC,yGAEC,YACD,CAGD,uCACC,eACD,CAEA,sDACC,gBACD,CAEA,sDACC,qBACD,CAEA,sDACC,gBACD,CAGC,yFACC,YACD,CE/CF,eCGC,eD0FD,CA7FA,qECOE,qCDsFF,CA7FA,eAGC,6CAA8C,CAC9C,iCAAkC,CAClC,+CAwFD,CAtFC,yCACC,kBAAmB,CACnB,SAAU,CACV,aAAc,CACd,yCAA0C,CAM1C,kCAAmC,CACnC,qCACD,CAEA,uCACC,QACD,CAGC,gEAEC,oCACD,CAIA,kEACC,YACD,CAGD,gHAGC,kCAAmC,CACnC,qCACD,CAEA,mCAEC,SAgBD,CAbC,0DAEC,UAAW,CAGX,QAAS,CAGT,eAAgB,CAGhB,QACD,CAGD,kCAEC,SAWD,CATC,uDAEC,QAMD,CAHC,yFACC,eACD,CASD,kFACC,mCACD,CAvFF,qCA2FE,QAEF,CAYC,+FACC,cACD,CAEA,iJAEC,mCACD,CAEA,qHACC,aACD,CAIC,6JACC,wBAAyB,CACzB,2BACD,CAGA,2JACC,yBAA0B,CAC1B,4BACD,CAID,qGACC,mCACD,CAGA,yLACC,mCACD,CAWA,qHACC,cACD,CAIC,6JACC,yBAA0B,CAC1B,4BACD,CAGA,2JACC,wBAAyB,CACzB,2BACD,CAID,qGACC,oCACD,CAGA,yLACC,oCACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../mixins/_unselectable.css\\\";\\n\\n.ck.ck-toolbar {\\n\\t@mixin ck-unselectable;\\n\\n\\tdisplay: flex;\\n\\tflex-flow: row nowrap;\\n\\talign-items: center;\\n\\n\\t& > .ck-toolbar__items {\\n\\t\\tdisplay: flex;\\n\\t\\tflex-flow: row wrap;\\n\\t\\talign-items: center;\\n\\t\\tflex-grow: 1;\\n\\n\\t}\\n\\n\\t& .ck.ck-toolbar__separator {\\n\\t\\tdisplay: inline-block;\\n\\n\\t\\t/*\\n\\t\\t * A leading or trailing separator makes no sense (separates from nothing on one side).\\n\\t\\t * For instance, it can happen when toolbar items (also separators) are getting grouped one by one and\\n\\t\\t * moved to another toolbar in the dropdown.\\n\\t\\t */\\n\\t\\t&:first-child,\\n\\t\\t&:last-child {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t}\\n\\n\\t& .ck-toolbar__line-break {\\n\\t\\tflex-basis: 100%;\\n\\t}\\n\\n\\t&.ck-toolbar_grouping > .ck-toolbar__items {\\n\\t\\tflex-wrap: nowrap;\\n\\t}\\n\\n\\t&.ck-toolbar_vertical > .ck-toolbar__items {\\n\\t\\tflex-direction: column;\\n\\t}\\n\\n\\t&.ck-toolbar_floating > .ck-toolbar__items {\\n\\t\\tflex-wrap: nowrap;\\n\\t}\\n\\n\\t& > .ck.ck-toolbar__grouped-dropdown {\\n\\t\\t& > .ck-dropdown__button .ck-dropdown__arrow {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Makes element unselectable.\\n */\\n@define-mixin ck-unselectable {\\n\\t-moz-user-select: none;\\n\\t-webkit-user-select: none;\\n\\t-ms-user-select: none;\\n\\tuser-select: none\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../../mixins/_rounded.css\\\";\\n@import \\\"@ckeditor/ckeditor5-ui/theme/mixins/_dir.css\\\";\\n\\n.ck.ck-toolbar {\\n\\t@mixin ck-rounded-corners;\\n\\n\\tbackground: var(--ck-color-toolbar-background);\\n\\tpadding: 0 var(--ck-spacing-small);\\n\\tborder: 1px solid var(--ck-color-toolbar-border);\\n\\n\\t& .ck.ck-toolbar__separator {\\n\\t\\talign-self: stretch;\\n\\t\\twidth: 1px;\\n\\t\\tmin-width: 1px;\\n\\t\\tbackground: var(--ck-color-toolbar-border);\\n\\n\\t\\t/*\\n\\t\\t * These margins make the separators look better in balloon toolbars (when aligned with the \\\"tip\\\").\\n\\t\\t * See https://github.com/ckeditor/ckeditor5/issues/7493.\\n\\t\\t */\\n\\t\\tmargin-top: var(--ck-spacing-small);\\n\\t\\tmargin-bottom: var(--ck-spacing-small);\\n\\t}\\n\\n\\t& .ck-toolbar__line-break {\\n\\t\\theight: 0;\\n\\t}\\n\\n\\t& > .ck-toolbar__items {\\n\\t\\t& > *:not(.ck-toolbar__line-break) {\\n\\t\\t\\t/* (#11) Separate toolbar items. */\\n\\t\\t\\tmargin-right: var(--ck-spacing-small);\\n\\t\\t}\\n\\n\\t\\t/* Don't display a separator after an empty items container, for instance,\\n\\t\\twhen all items were grouped */\\n\\t\\t&:empty + .ck.ck-toolbar__separator {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t}\\n\\n\\t& > .ck-toolbar__items > *:not(.ck-toolbar__line-break),\\n\\t& > .ck.ck-toolbar__grouped-dropdown {\\n\\t\\t/* Make sure items wrapped to the next line have v-spacing */\\n\\t\\tmargin-top: var(--ck-spacing-small);\\n\\t\\tmargin-bottom: var(--ck-spacing-small);\\n\\t}\\n\\n\\t&.ck-toolbar_vertical {\\n\\t\\t/* Items in a vertical toolbar span the entire width. */\\n\\t\\tpadding: 0;\\n\\n\\t\\t/* Specificity matters here. See https://github.com/ckeditor/ckeditor5-theme-lark/issues/168. */\\n\\t\\t& > .ck-toolbar__items > .ck {\\n\\t\\t\\t/* Items in a vertical toolbar should span the horizontal space. */\\n\\t\\t\\twidth: 100%;\\n\\n\\t\\t\\t/* Items in a vertical toolbar should have no margin. */\\n\\t\\t\\tmargin: 0;\\n\\n\\t\\t\\t/* Items in a vertical toolbar span the entire width so rounded corners are pointless. */\\n\\t\\t\\tborder-radius: 0;\\n\\n\\t\\t\\t/* Items in a vertical toolbar span the entire width so any border is pointless. */\\n\\t\\t\\tborder: 0;\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-toolbar_compact {\\n\\t\\t/* No spacing around items. */\\n\\t\\tpadding: 0;\\n\\n\\t\\t& > .ck-toolbar__items > * {\\n\\t\\t\\t/* Compact toolbar items have no spacing between them. */\\n\\t\\t\\tmargin: 0;\\n\\n\\t\\t\\t/* \\\"Middle\\\" children should have no rounded corners. */\\n\\t\\t\\t&:not(:first-child):not(:last-child) {\\n\\t\\t\\t\\tborder-radius: 0;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t& > .ck.ck-toolbar__grouped-dropdown {\\n\\t\\t/*\\n\\t\\t * Dropdown button has asymmetric padding to fit the arrow.\\n\\t\\t * This button has no arrow so let's revert that padding back to normal.\\n\\t\\t */\\n\\t\\t& > .ck.ck-button.ck-dropdown__button {\\n\\t\\t\\tpadding-left: var(--ck-spacing-tiny);\\n\\t\\t}\\n\\t}\\n\\n\\t@nest .ck-toolbar-container & {\\n\\t\\tborder: 0;\\n\\t}\\n}\\n\\n/* stylelint-disable */\\n\\n/*\\n * Styles for RTL toolbars.\\n *\\n * Note: In some cases (e.g. a decoupled editor), the toolbar has its own \\\"dir\\\"\\n * because its parent is not controlled by the editor framework.\\n */\\n[dir=\\\"rtl\\\"] .ck.ck-toolbar,\\n.ck.ck-toolbar[dir=\\\"rtl\\\"] {\\n\\t& > .ck-toolbar__items > .ck {\\n\\t\\tmargin-right: 0;\\n\\t}\\n\\n\\t&:not(.ck-toolbar_compact) > .ck-toolbar__items > .ck {\\n\\t\\t/* (#11) Separate toolbar items. */\\n\\t\\tmargin-left: var(--ck-spacing-small);\\n\\t}\\n\\n\\t& > .ck-toolbar__items > .ck:last-child {\\n\\t\\tmargin-left: 0;\\n\\t}\\n\\n\\t&.ck-toolbar_compact > .ck-toolbar__items > .ck {\\n\\t\\t/* No rounded corners on the right side of the first child. */\\n\\t\\t&:first-child {\\n\\t\\t\\tborder-top-left-radius: 0;\\n\\t\\t\\tborder-bottom-left-radius: 0;\\n\\t\\t}\\n\\n\\t\\t/* No rounded corners on the left side of the last child. */\\n\\t\\t&:last-child {\\n\\t\\t\\tborder-top-right-radius: 0;\\n\\t\\t\\tborder-bottom-right-radius: 0;\\n\\t\\t}\\n\\t}\\n\\n\\t/* Separate the the separator form the grouping dropdown when some items are grouped. */\\n\\t& > .ck.ck-toolbar__separator {\\n\\t\\tmargin-left: var(--ck-spacing-small);\\n\\t}\\n\\n\\t/* Some spacing between the items and the separator before the grouped items dropdown. */\\n\\t&.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) {\\n\\t\\tmargin-left: var(--ck-spacing-small);\\n\\t}\\n}\\n\\n/*\\n * Styles for LTR toolbars.\\n *\\n * Note: In some cases (e.g. a decoupled editor), the toolbar has its own \\\"dir\\\"\\n * because its parent is not controlled by the editor framework.\\n */\\n[dir=\\\"ltr\\\"] .ck.ck-toolbar,\\n.ck.ck-toolbar[dir=\\\"ltr\\\"] {\\n\\t& > .ck-toolbar__items > .ck:last-child {\\n\\t\\tmargin-right: 0;\\n\\t}\\n\\n\\t&.ck-toolbar_compact > .ck-toolbar__items > .ck {\\n\\t\\t/* No rounded corners on the right side of the first child. */\\n\\t\\t&:first-child {\\n\\t\\t\\tborder-top-right-radius: 0;\\n\\t\\t\\tborder-bottom-right-radius: 0;\\n\\t\\t}\\n\\n\\t\\t/* No rounded corners on the left side of the last child. */\\n\\t\\t&:last-child {\\n\\t\\t\\tborder-top-left-radius: 0;\\n\\t\\t\\tborder-bottom-left-radius: 0;\\n\\t\\t}\\n\\t}\\n\\n\\t/* Separate the the separator form the grouping dropdown when some items are grouped. */\\n\\t& > .ck.ck-toolbar__separator {\\n\\t\\tmargin-right: var(--ck-spacing-small);\\n\\t}\\n\\n\\t/* Some spacing between the items and the separator before the grouped items dropdown. */\\n\\t&.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) {\\n\\t\\tmargin-right: var(--ck-spacing-small);\\n\\t}\\n}\\n\\n/* stylelint-enable */\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Implements rounded corner interface for .ck-rounded-corners class.\\n *\\n * @see $ck-border-radius\\n */\\n@define-mixin ck-rounded-corners {\\n\\tborder-radius: 0;\\n\\n\\t@nest .ck-rounded-corners &,\\n\\t&.ck-rounded-corners {\\n\\t\\tborder-radius: var(--ck-border-radius);\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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,.ck.ck-tooltip.ck-tooltip_se,.ck.ck-tooltip.ck-tooltip_sw{bottom:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after,.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text:after,.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text:after{top:calc(var(--ck-tooltip-arrow-size)*-1 + 1px);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_sw{right:50%;left:auto}.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text{left:auto;right:calc(var(--ck-tooltip-arrow-size)*-2)}.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text:after{left:auto;right:0}.ck.ck-tooltip.ck-tooltip_se{left:50%;right:auto}.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text{right:auto;left:calc(var(--ck-tooltip-arrow-size)*-2)}.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text:after{right:auto;left:0;transform:translateX(50%)}.ck.ck-tooltip.ck-tooltip_n{top:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:calc(var(--ck-tooltip-arrow-size)*-1);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)}.ck.ck-tooltip.ck-tooltip_e{left:calc(100% + var(--ck-tooltip-arrow-size));top:50%}.ck.ck-tooltip.ck-tooltip_e .ck-tooltip__text{left:0;transform:translateY(-50%)}.ck.ck-tooltip.ck-tooltip_e .ck-tooltip__text:after{left:calc(var(--ck-tooltip-arrow-size)*-1);top:calc(50% - var(--ck-tooltip-arrow-size)*1);border-left-color:transparent;border-bottom-color:transparent;border-right-color:var(--ck-color-tooltip-background);border-top-color:transparent;border-left-width:0;border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:var(--ck-tooltip-arrow-size);border-top-width:var(--ck-tooltip-arrow-size)}.ck.ck-tooltip.ck-tooltip_w{right:calc(100% + var(--ck-tooltip-arrow-size));left:auto;top:50%}.ck.ck-tooltip.ck-tooltip_w .ck-tooltip__text{left:0;transform:translateY(-50%)}.ck.ck-tooltip.ck-tooltip_w .ck-tooltip__text:after{left:100%;top:calc(50% - var(--ck-tooltip-arrow-size)*1);border-left-color:var(--ck-color-tooltip-background);border-bottom-color:transparent;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:0;border-top-width:var(--ck-tooltip-arrow-size)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/components/tooltip/tooltip.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/tooltip/tooltip.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css\"],\"names\":[],\"mappings\":\"AAKA,sDAEC,iBAAkB,CAGlB,mBAAoB,CAIpB,kCACD,CAEA,eAEC,iBAAkB,CAClB,SAAU,CACV,YAAa,CACb,yBAWD,CATC,iCACC,oBAOD,CALC,uCACC,UAAW,CACX,OAAQ,CACR,QACD,CCxBF,MACC,2BACD,CAEA,eACC,QAAS,CAMT,KAAM,CAON,sCAwKD,CAtKC,iCChBA,eDqCA,CArBA,yGCZC,qCDiCD,CArBA,iCAGC,cAAe,CACf,eAAgB,CAChB,kCAAmC,CACnC,wDAAyD,CACzD,6CAA8C,CAC9C,iBAAkB,CAClB,SAYD,CAVC,uCAMC,sCAAuC,CACvC,kBAAmB,CACnB,QACD,CAYD,sFAGC,4CAA+C,CAC/C,0BASD,CAPC,8JAEC,+CAAkD,CAClD,0BAA6B,CAC7B,6BAAoF,CAApF,sDAAoF,CAApF,8BAAoF,CAApF,4BAAoF,CACpF,8CAAsG,CAAtG,gDAAsG,CAAtG,+CAAsG,CAAtG,kBACD,CAaD,6BACC,SAAU,CACV,SAWD,CATC,+CACC,SAAU,CACV,2CACD,CAEA,qDACC,SAAU,CACV,OACD,CAYD,6BACC,QAAS,CACT,UAYD,CAVC,+CACC,UAAW,CACX,0CACD,CAEA,qDACC,UAAW,CACX,MAAO,CACP,yBACD,CAYD,4BACC,yCAA4C,CAC5C,2BAQD,CANC,oDACC,4CAA+C,CAC/C,0BAA6B,CAC7B,6BAAoF,CAApF,+BAAoF,CAApF,8BAAoF,CAApF,mDAAoF,CACpF,8CAAsG,CAAtG,qBAAsG,CAAtG,+CAAsG,CAAtG,6CACD,CAUD,4BACC,8CAA+C,CAC/C,OAaD,CAXC,8CACC,MAAO,CACP,0BAQD,CANC,oDACC,0CAA6C,CAC7C,8CAAiD,CACjD,6BAAoF,CAApF,+BAAoF,CAApF,qDAAoF,CAApF,4BAAoF,CACpF,mBAAsG,CAAtG,gDAAsG,CAAtG,+CAAsG,CAAtG,6CACD,CAWF,4BACC,+CAAgD,CAChD,SAAU,CACV,OAaD,CAXC,8CACC,MAAO,CACP,0BAQD,CANC,oDACC,SAAU,CACV,8CAAiD,CACjD,oDAAoF,CAApF,+BAAoF,CAApF,8BAAoF,CAApF,4BAAoF,CACpF,8CAAsG,CAAtG,gDAAsG,CAAtG,oBAAsG,CAAtG,6CACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-tooltip,\\n.ck.ck-tooltip .ck-tooltip__text::after {\\n\\tposition: absolute;\\n\\n\\t/* Without this, hovering the tooltip could keep it visible. */\\n\\tpointer-events: none;\\n\\n\\t/* This is to get rid of flickering when transitioning opacity in Chrome.\\n\\tIt's weird but it works. */\\n\\t-webkit-backface-visibility: hidden;\\n}\\n\\n.ck.ck-tooltip {\\n\\t/* Tooltip is hidden by default. */\\n\\tvisibility: hidden;\\n\\topacity: 0;\\n\\tdisplay: none;\\n\\tz-index: var(--ck-z-modal);\\n\\n\\t& .ck-tooltip__text {\\n\\t\\tdisplay: inline-block;\\n\\n\\t\\t&::after {\\n\\t\\t\\tcontent: \\\"\\\";\\n\\t\\t\\twidth: 0;\\n\\t\\t\\theight: 0;\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../../../mixins/_rounded.css\\\";\\n\\n:root {\\n\\t--ck-tooltip-arrow-size: 5px;\\n}\\n\\n.ck.ck-tooltip {\\n\\tleft: 50%;\\n\\n\\t/*\\n\\t * Prevent blurry tooltips in LoDPI environments.\\n\\t * See https://github.com/ckeditor/ckeditor5/issues/1802.\\n\\t */\\n\\ttop: 0;\\n\\n\\t/*\\n\\t * For the transition to work, the tooltip must be controlled\\n\\t * using visibility+opacity. A delay prevents a \\\"tooltip avalanche\\\"\\n\\t * i.e. when scanning the toolbar with mouse cursor.\\n\\t */\\n\\ttransition: opacity .2s ease-in-out .2s;\\n\\n\\t& .ck-tooltip__text {\\n\\t\\t@mixin ck-rounded-corners;\\n\\n\\t\\tfont-size: .9em;\\n\\t\\tline-height: 1.5;\\n\\t\\tcolor: var(--ck-color-tooltip-text);\\n\\t\\tpadding: var(--ck-spacing-small) var(--ck-spacing-medium);\\n\\t\\tbackground: var(--ck-color-tooltip-background);\\n\\t\\tposition: relative;\\n\\t\\tleft: -50%;\\n\\n\\t\\t&::after {\\n\\t\\t\\t/*\\n\\t\\t\\t * For the transition to work, the tooltip must be controlled\\n\\t\\t\\t * using visibility+opacity. A delay prevents a \\\"tooltip avalanche\\\"\\n\\t\\t\\t * i.e. when scanning the toolbar with mouse cursor.\\n\\t\\t\\t */\\n\\t\\t\\ttransition: opacity .2s ease-in-out .2s;\\n\\t\\t\\tborder-style: solid;\\n\\t\\t\\tleft: 50%;\\n\\t\\t}\\n\\t}\\n\\n\\t/**\\n\\t * A class that displays the tooltip south of the element.\\n\\t *\\n\\t * [element]\\n\\t * ^\\n\\t * +-----------+\\n\\t * | Tooltip |\\n\\t * +-----------+\\n\\t */\\n\\t&.ck-tooltip_s,\\n\\t&.ck-tooltip_sw,\\n\\t&.ck-tooltip_se {\\n\\t\\tbottom: calc(-1 * var(--ck-tooltip-arrow-size));\\n\\t\\ttransform: translateY( 100% );\\n\\n\\t\\t& .ck-tooltip__text::after {\\n\\t\\t\\t/* 1px addresses gliches in rendering causing gap between the triangle and the text */\\n\\t\\t\\ttop: calc(-1 * var(--ck-tooltip-arrow-size) + 1px);\\n\\t\\t\\ttransform: translateX( -50% );\\n\\t\\t\\tborder-color: transparent transparent var(--ck-color-tooltip-background) transparent;\\n\\t\\t\\tborder-width: 0 var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size);\\n\\t\\t}\\n\\t}\\n\\n\\t/**\\n\\t * A class that displays the tooltip south-west of the element.\\n\\t *\\n\\t * [element]\\n\\t * ^\\n\\t * +-----------+\\n\\t * | Tooltip |\\n\\t * +-----------+\\n\\t */\\n\\n\\t&.ck-tooltip_sw {\\n\\t\\tright: 50%;\\n\\t\\tleft: auto;\\n\\n\\t\\t& .ck-tooltip__text {\\n\\t\\t\\tleft: auto;\\n\\t\\t\\tright: calc( -2 * var(--ck-tooltip-arrow-size));\\n\\t\\t}\\n\\n\\t\\t& .ck-tooltip__text::after {\\n\\t\\t\\tleft: auto;\\n\\t\\t\\tright: 0;\\n\\t\\t}\\n\\t}\\n\\n\\t/**\\n\\t * A class that displays the tooltip south-east of the element.\\n\\t *\\n\\t * [element]\\n\\t * ^\\n\\t * +-----------+\\n\\t * | Tooltip |\\n\\t * +-----------+\\n\\t */\\n\\t&.ck-tooltip_se {\\n\\t\\tleft: 50%;\\n\\t\\tright: auto;\\n\\n\\t\\t& .ck-tooltip__text {\\n\\t\\t\\tright: auto;\\n\\t\\t\\tleft: calc( -2 * var(--ck-tooltip-arrow-size));\\n\\t\\t}\\n\\n\\t\\t& .ck-tooltip__text::after {\\n\\t\\t\\tright: auto;\\n\\t\\t\\tleft: 0;\\n\\t\\t\\ttransform: translateX( 50% );\\n\\t\\t}\\n\\t}\\n\\n\\t/**\\n\\t * A class that displays the tooltip north of the element.\\n\\t *\\n\\t * +-----------+\\n\\t * | Tooltip |\\n\\t * +-----------+\\n\\t * V\\n\\t * [element]\\n\\t */\\n\\t&.ck-tooltip_n {\\n\\t\\ttop: calc(-1 * var(--ck-tooltip-arrow-size));\\n\\t\\ttransform: translateY( -100% );\\n\\n\\t\\t& .ck-tooltip__text::after {\\n\\t\\t\\tbottom: calc(-1 * var(--ck-tooltip-arrow-size));\\n\\t\\t\\ttransform: translateX( -50% );\\n\\t\\t\\tborder-color: var(--ck-color-tooltip-background) transparent transparent transparent;\\n\\t\\t\\tborder-width: var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) 0 var(--ck-tooltip-arrow-size);\\n\\t\\t}\\n\\t}\\n\\n\\t/**\\n\\t * A class that displays the tooltip east of the element.\\n\\t *\\n\\t * +----------+\\n\\t * [element] < | east |\\n\\t * +----------+\\n\\t */\\n\\t&.ck-tooltip_e {\\n\\t\\tleft: calc(100% + var(--ck-tooltip-arrow-size));\\n\\t\\ttop: 50%;\\n\\n\\t\\t& .ck-tooltip__text {\\n\\t\\t\\tleft: 0;\\n\\t\\t\\ttransform: translateY( -50% );\\n\\n\\t\\t\\t&::after {\\n\\t\\t\\t\\tleft: calc(-1 * var(--ck-tooltip-arrow-size));\\n\\t\\t\\t\\ttop: calc(50% - 1 * var(--ck-tooltip-arrow-size));\\n\\t\\t\\t\\tborder-color: transparent var(--ck-color-tooltip-background) transparent transparent;\\n\\t\\t\\t\\tborder-width: var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) 0;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t/**\\n\\t * A class that displays the tooltip west of the element.\\n\\t *\\n\\t * +----------+\\n\\t * | west | > [element]\\n\\t * +----------+\\n\\t */\\n\\t&.ck-tooltip_w {\\n\\t\\tright: calc(100% + var(--ck-tooltip-arrow-size));\\n\\t\\tleft: auto;\\n\\t\\ttop: 50%;\\n\\n\\t\\t& .ck-tooltip__text {\\n\\t\\t\\tleft: 0;\\n\\t\\t\\ttransform: translateY( -50% );\\n\\n\\t\\t\\t&::after {\\n\\t\\t\\t\\tleft: 100%;\\n\\t\\t\\t\\ttop: calc(50% - 1 * var(--ck-tooltip-arrow-size));\\n\\t\\t\\t\\tborder-color: transparent transparent transparent var(--ck-color-tooltip-background);\\n\\t\\t\\t\\tborder-width: var(--ck-tooltip-arrow-size) 0 var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Implements rounded corner interface for .ck-rounded-corners class.\\n *\\n * @see $ck-border-radius\\n */\\n@define-mixin ck-rounded-corners {\\n\\tborder-radius: 0;\\n\\n\\t@nest .ck-rounded-corners &,\\n\\t&.ck-rounded-corners {\\n\\t\\tborder-radius: var(--ck-border-radius);\\n\\t\\t@mixin-content;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck-hidden{display:none!important}.ck.ck-reset,.ck.ck-reset_all,.ck.ck-reset_all *{box-sizing:border-box;width:auto;height:auto;position:static}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#c4c4c4;--ck-color-base-action:#61b045;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#198cf0;--ck-color-base-active-focus:#0e7fe1;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:208,79%,51%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#bcdefb;--ck-color-focus-disabled-shadow:rgba(119,186,248,0.3);--ck-color-focus-error-shadow:rgba(255,64,31,0.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,0.15);--ck-color-shadow-drop-active:rgba(0,0,0,0.2);--ck-color-shadow-inner:rgba(0,0,0,0.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#e6e6e6;--ck-color-button-default-active-background:#d9d9d9;--ck-color-button-default-active-shadow:#bfbfbf;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#dedede;--ck-color-button-on-hover-background:#c4c4c4;--ck-color-button-on-active-background:#bababa;--ck-color-button-on-active-shadow:#a1a1a1;--ck-color-button-on-disabled-background:#dedede;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#579e3d;--ck-color-button-action-active-background:#53973b;--ck-color-button-action-active-shadow:#498433;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#b0b0b0;--ck-color-switch-button-off-hover-background:#a3a3a3;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#579e3d;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,0.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:#c7c7c7;--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:#c7c7c7;--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-base-active);--ck-color-list-button-on-background-focus:var(--ck-color-base-active-focus);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-foreground);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,177,255,0.1);--ck-color-link-fake-selection:rgba(31,177,255,0.3);--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck.ck-reset,.ck.ck-reset_all,.ck.ck-reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;vertical-align:middle;transition:none;word-wrap:break-word}.ck.ck-reset_all,.ck.ck-reset_all *{border-collapse:collapse;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);color:var(--ck-color-text);text-align:left;white-space:nowrap;cursor:auto;float:none}.ck.ck-reset_all .ck-rtl *{text-align:right}.ck.ck-reset_all iframe{vertical-align:inherit}.ck.ck-reset_all textarea{white-space:pre-wrap}.ck.ck-reset_all input[type=password],.ck.ck-reset_all input[type=text],.ck.ck-reset_all textarea{cursor:text}.ck.ck-reset_all input[type=password][disabled],.ck.ck-reset_all input[type=text][disabled],.ck.ck-reset_all textarea[disabled]{cursor:default}.ck.ck-reset_all fieldset{padding:10px;border:2px groove #dfdee3}.ck.ck-reset_all button::-moz-focus-inner{padding:0;border:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-ui/theme/globals/_hidden.css\",\"webpack://./../ckeditor5-ui/theme/globals/_reset.css\",\"webpack://./../ckeditor5-ui/theme/globals/_zindex.css\",\"webpack://./../ckeditor5-ui/theme/globals/_transition.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_colors.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_disabled.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_focus.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_fonts.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_reset.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_rounded.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_shadow.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_spacing.css\"],\"names\":[],\"mappings\":\"AAQA,WAGC,sBACD,CCPA,iDAGC,qBAAsB,CACtB,UAAW,CACX,WAAY,CACZ,eACD,CCPA,MACC,gBAAiB,CACjB,4CACD,CCAA,oDAEC,yBACD,CCNA,MACC,kCAAmD,CACnD,+BAAoD,CACpD,8BAAgD,CAChD,8BAAmD,CACnD,6BAAmD,CACnD,yBAA+C,CAC/C,8BAAmD,CACnD,oCAAuD,CACvD,6BAAkD,CAIlD,+CAAwD,CACxD,qEAA+E,CAC/E,qCAAwD,CACxD,sDAA8D,CAC9D,iDAAyD,CACzD,yCAAqD,CACrD,uCAAsD,CACtD,6CAA0D,CAC1D,uCAAsD,CAItD,gDAAuD,CACvD,kDAA+D,CAC/D,mDAAgE,CAChE,+CAA6D,CAC7D,yDAA8D,CAE9D,uCAAuD,CACvD,6CAA4D,CAC5D,8CAA4D,CAC5D,0CAAyD,CACzD,gDAA8D,CAE9D,+DAAsE,CACtE,iDAAkE,CAClE,kDAAkE,CAClE,8CAA+D,CA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A2D,CAC3D,4CAAkD,CAClD,oDAA4D,CAC5D,mDAA2D,CAC3D,kDAA2D,CAC3D,yDFFD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A class which hides an element in DOM.\\n */\\n.ck-hidden {\\n\\t/* Override selector specificity. Otherwise, all elements with some display\\n\\tstyle defined will override this one, which is not a desired result. */\\n\\tdisplay: none !important;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck.ck-reset,\\n.ck.ck-reset_all,\\n.ck.ck-reset_all * {\\n\\tbox-sizing: border-box;\\n\\twidth: auto;\\n\\theight: auto;\\n\\tposition: static;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-z-default: 1;\\n\\t--ck-z-modal: calc( var(--ck-z-default) + 999 );\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A class that disables all transitions of the element and its children.\\n */\\n.ck-transitions-disabled,\\n.ck-transitions-disabled * {\\n\\ttransition: none !important;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-color-base-foreground: \\t\\t\\t\\t\\t\\t\\t\\thsl(0, 0%, 98%);\\n\\t--ck-color-base-background: \\t\\t\\t\\t\\t\\t\\t\\thsl(0, 0%, 100%);\\n\\t--ck-color-base-border: \\t\\t\\t\\t\\t\\t\\t\\t\\thsl(0, 0%, 77%);\\n\\t--ck-color-base-action: \\t\\t\\t\\t\\t\\t\\t\\t\\thsl(104, 44%, 48%);\\n\\t--ck-color-base-focus: \\t\\t\\t\\t\\t\\t\\t\\t\\t\\thsl(209, 92%, 70%);\\n\\t--ck-color-base-text: \\t\\t\\t\\t\\t\\t\\t\\t\\t\\thsl(0, 0%, 20%);\\n\\t--ck-color-base-active: \\t\\t\\t\\t\\t\\t\\t\\t\\thsl(208, 88%, 52%);\\n\\t--ck-color-base-active-focus:\\t\\t\\t\\t\\t\\t\\t\\thsl(208, 88%, 47%);\\n\\t--ck-color-base-error:\\t\\t\\t\\t\\t\\t\\t\\t\\t\\thsl(15, 100%, 43%);\\n\\n\\t/* -- Generic colors ------------------------------------------------------------------------ */\\n\\n\\t--ck-color-focus-border-coordinates: \\t\\t\\t\\t\\t\\t208, 79%, 51%;\\n\\t--ck-color-focus-border: \\t\\t\\t\\t\\t\\t\\t\\t\\thsl(var(--ck-color-focus-border-coordinates));\\n\\t--ck-color-focus-outer-shadow:\\t\\t\\t\\t\\t\\t\\t\\thsl(207, 89%, 86%);\\n\\t--ck-color-focus-disabled-shadow:\\t\\t\\t\\t\\t\\t\\thsla(209, 90%, 72%,.3);\\n\\t--ck-color-focus-error-shadow:\\t\\t\\t\\t\\t\\t\\t\\thsla(9,100%,56%,.3);\\n\\t--ck-color-text: \\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar(--ck-color-base-text);\\n\\t--ck-color-shadow-drop: \\t\\t\\t\\t\\t\\t\\t\\t\\thsla(0, 0%, 0%, 0.15);\\n\\t--ck-color-shadow-drop-active:\\t\\t\\t\\t\\t\\t\\t\\thsla(0, 0%, 0%, 0.2);\\n\\t--ck-color-shadow-inner: \\t\\t\\t\\t\\t\\t\\t\\t\\thsla(0, 0%, 0%, 0.1);\\n\\n\\t/* -- Buttons ------------------------------------------------------------------------------- */\\n\\n\\t--ck-color-button-default-background: \\t\\t\\t\\t\\t\\ttransparent;\\n\\t--ck-color-button-default-hover-background: \\t\\t\\t\\thsl(0, 0%, 90%);\\n\\t--ck-color-button-default-active-background: \\t\\t\\t\\thsl(0, 0%, 85%);\\n\\t--ck-color-button-default-active-shadow: \\t\\t\\t\\t\\thsl(0, 0%, 75%);\\n\\t--ck-color-button-default-disabled-background: \\t\\t\\t\\ttransparent;\\n\\n\\t--ck-color-button-on-background: \\t\\t\\t\\t\\t\\t\\thsl(0, 0%, 87%);\\n\\t--ck-color-button-on-hover-background: \\t\\t\\t\\t\\t\\thsl(0, 0%, 77%);\\n\\t--ck-color-button-on-active-background: \\t\\t\\t\\t\\thsl(0, 0%, 73%);\\n\\t--ck-color-button-on-active-shadow: \\t\\t\\t\\t\\t\\thsl(0, 0%, 63%);\\n\\t--ck-color-button-on-disabled-background: \\t\\t\\t\\t\\thsl(0, 0%, 87%);\\n\\n\\t--ck-color-button-action-background: \\t\\t\\t\\t\\t\\tvar(--ck-color-base-action);\\n\\t--ck-color-button-action-hover-background: \\t\\t\\t\\t\\thsl(104, 44%, 43%);\\n\\t--ck-color-button-action-active-background: \\t\\t\\t\\thsl(104, 44%, 41%);\\n\\t--ck-color-button-action-active-shadow: \\t\\t\\t\\t\\thsl(104, 44%, 36%);\\n\\t--ck-color-button-action-disabled-background: \\t\\t\\t\\thsl(104, 44%, 58%);\\n\\t--ck-color-button-action-text: \\t\\t\\t\\t\\t\\t\\t\\tvar(--ck-color-base-background);\\n\\n\\t--ck-color-button-save: \\t\\t\\t\\t\\t\\t\\t\\t\\thsl(120, 100%, 27%);\\n\\t--ck-color-button-cancel: \\t\\t\\t\\t\\t\\t\\t\\t\\thsl(15, 100%, 43%);\\n\\n\\t--ck-color-switch-button-off-background:\\t\\t\\t\\t\\thsl(0, 0%, 69%);\\n\\t--ck-color-switch-button-off-hover-background:\\t\\t\\t\\thsl(0, 0%, 64%);\\n\\t--ck-color-switch-button-on-background:\\t\\t\\t\\t\\t\\tvar(--ck-color-button-action-background);\\n\\t--ck-color-switch-button-on-hover-background:\\t\\t\\t\\thsl(104, 44%, 43%);\\n\\t--ck-color-switch-button-inner-background:\\t\\t\\t\\t\\tvar(--ck-color-base-background);\\n\\t--ck-color-switch-button-inner-shadow:\\t\\t\\t\\t\\t\\thsla(0, 0%, 0%, 0.1);\\n\\n\\t/* -- Dropdown ------------------------------------------------------------------------------ */\\n\\n\\t--ck-color-dropdown-panel-background: \\t\\t\\t\\t\\t\\tvar(--ck-color-base-background);\\n\\t--ck-color-dropdown-panel-border: \\t\\t\\t\\t\\t\\t\\tvar(--ck-color-base-border);\\n\\n\\t/* -- Input --------------------------------------------------------------------------------- */\\n\\n\\t--ck-color-input-background: \\t\\t\\t\\t\\t\\t\\t\\tvar(--ck-color-base-background);\\n\\t--ck-color-input-border: \\t\\t\\t\\t\\t\\t\\t\\t\\thsl(0, 0%, 78%);\\n\\t--ck-color-input-error-border:\\t\\t\\t\\t\\t\\t\\t\\tvar(--ck-color-base-error);\\n\\t--ck-color-input-text: \\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar(--ck-color-base-text);\\n\\t--ck-color-input-disabled-background: \\t\\t\\t\\t\\t\\thsl(0, 0%, 95%);\\n\\t--ck-color-input-disabled-border: \\t\\t\\t\\t\\t\\t\\thsl(0, 0%, 78%);\\n\\t--ck-color-input-disabled-text: \\t\\t\\t\\t\\t\\t\\thsl(0, 0%, 46%);\\n\\n\\t/* -- List ---------------------------------------------------------------------------------- */\\n\\n\\t--ck-color-list-background: \\t\\t\\t\\t\\t\\t\\t\\tvar(--ck-color-base-background);\\n\\t--ck-color-list-button-hover-background: \\t\\t\\t\\t\\tvar(--ck-color-button-default-hover-background);\\n\\t--ck-color-list-button-on-background: \\t\\t\\t\\t\\t\\tvar(--ck-color-base-active);\\n\\t--ck-color-list-button-on-background-focus: \\t\\t\\t\\tvar(--ck-color-base-active-focus);\\n\\t--ck-color-list-button-on-text:\\t\\t\\t\\t\\t\\t\\t\\tvar(--ck-color-base-background);\\n\\n\\t/* -- Panel --------------------------------------------------------------------------------- */\\n\\n\\t--ck-color-panel-background: \\t\\t\\t\\t\\t\\t\\t\\tvar(--ck-color-base-background);\\n\\t--ck-color-panel-border: \\t\\t\\t\\t\\t\\t\\t\\t\\tvar(--ck-color-base-border);\\n\\n\\t/* -- Toolbar ------------------------------------------------------------------------------- */\\n\\n\\t--ck-color-toolbar-background: \\t\\t\\t\\t\\t\\t\\t\\tvar(--ck-color-base-foreground);\\n\\t--ck-color-toolbar-border: \\t\\t\\t\\t\\t\\t\\t\\t\\tvar(--ck-color-base-border);\\n\\n\\t/* -- Tooltip ------------------------------------------------------------------------------- */\\n\\n\\t--ck-color-tooltip-background: \\t\\t\\t\\t\\t\\t\\t\\tvar(--ck-color-base-text);\\n\\t--ck-color-tooltip-text: \\t\\t\\t\\t\\t\\t\\t\\t\\tvar(--ck-color-base-background);\\n\\n\\t/* -- Engine -------------------------------------------------------------------------------- */\\n\\n\\t--ck-color-engine-placeholder-text: \\t\\t\\t\\t\\t\\thsl(0, 0%, 44%);\\n\\n\\t/* -- Upload -------------------------------------------------------------------------------- */\\n\\n\\t--ck-color-upload-bar-background:\\t\\t \\t\\t\\t\\t\\thsl(209, 92%, 70%);\\n\\n\\t/* -- Link -------------------------------------------------------------------------------- */\\n\\n\\t--ck-color-link-default:\\t\\t\\t\\t\\t\\t\\t\\t\\thsl(240, 100%, 47%);\\n\\t--ck-color-link-selected-background:\\t\\t\\t\\t\\t\\thsla(201, 100%, 56%, 0.1);\\n\\t--ck-color-link-fake-selection:\\t\\t\\t\\t\\t\\t\\t\\thsla(201, 100%, 56%, 0.3);\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t/**\\n\\t * An opacity value of disabled UI item.\\n\\t */\\n\\t--ck-disabled-opacity: .5;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t/**\\n\\t * The geometry of the of focused element's outer shadow.\\n\\t */\\n\\t--ck-focus-outer-shadow-geometry: 0 0 0 3px;\\n\\n\\t/**\\n\\t * A visual style of focused element's outer shadow.\\n\\t */\\n\\t--ck-focus-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);\\n\\n\\t/**\\n\\t * A visual style of focused element's outer shadow (when disabled).\\n\\t */\\n\\t--ck-focus-disabled-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);\\n\\n\\t/**\\n\\t * A visual style of focused element's outer shadow (when has errors).\\n\\t */\\n\\t--ck-focus-error-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);\\n\\n\\t/**\\n\\t * A visual style of focused element's border or outline.\\n\\t */\\n\\t--ck-focus-ring: 1px solid var(--ck-color-focus-border);\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-font-size-base: 13px;\\n\\t--ck-line-height-base: 1.84615;\\n\\t--ck-font-face: Helvetica, Arial, Tahoma, Verdana, Sans-Serif;\\n\\n\\t--ck-font-size-tiny: 0.7em;\\n\\t--ck-font-size-small: 0.75em;\\n\\t--ck-font-size-normal: 1em;\\n\\t--ck-font-size-big: 1.4em;\\n\\t--ck-font-size-large: 1.8em;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t/* This is super-important. This is **manually** adjusted so a button without an icon\\n\\tis never smaller than a button with icon, additionally making sure that text-less buttons\\n\\tare perfect squares. The value is also shared by other components which should stay \\\"in-line\\\"\\n\\twith buttons. */\\n\\t--ck-ui-component-min-height: 2.3em;\\n}\\n\\n/**\\n * Resets an element, ignoring its children.\\n */\\n.ck.ck-reset,\\n.ck.ck-reset_all,\\n.ck.ck-reset_all * {\\n\\t/* Do not include inheritable rules here. */\\n\\tmargin: 0;\\n\\tpadding: 0;\\n\\tborder: 0;\\n\\tbackground: transparent;\\n\\ttext-decoration: none;\\n\\tvertical-align: middle;\\n\\ttransition: none;\\n\\n\\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/105 */\\n\\tword-wrap: break-word;\\n}\\n\\n/**\\n * Resets an element AND its children.\\n */\\n.ck.ck-reset_all,\\n.ck.ck-reset_all * {\\n\\t/* These are rule inherited by all children elements. */\\n\\tborder-collapse: collapse;\\n\\tfont: normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);\\n\\tcolor: var(--ck-color-text);\\n\\ttext-align: left;\\n\\twhite-space: nowrap;\\n\\tcursor: auto;\\n\\tfloat: none;\\n}\\n\\n.ck.ck-reset_all {\\n\\t& .ck-rtl * {\\n\\t\\ttext-align: right;\\n\\t}\\n\\n\\t& iframe {\\n\\t\\t/* For IE */\\n\\t\\tvertical-align: inherit;\\n\\t}\\n\\n\\t& textarea {\\n\\t\\twhite-space: pre-wrap;\\n\\t}\\n\\n\\t& textarea,\\n\\t& input[type=\\\"text\\\"],\\n\\t& input[type=\\\"password\\\"] {\\n\\t\\tcursor: text;\\n\\t}\\n\\n\\t& textarea[disabled],\\n\\t& input[type=\\\"text\\\"][disabled],\\n\\t& input[type=\\\"password\\\"][disabled] {\\n\\t\\tcursor: default;\\n\\t}\\n\\n\\t& fieldset {\\n\\t\\tpadding: 10px;\\n\\t\\tborder: 2px groove hsl(255, 7%, 88%);\\n\\t}\\n\\n\\t& button::-moz-focus-inner {\\n\\t\\t/* See http://stackoverflow.com/questions/5517744/remove-extra-button-spacing-padding-in-firefox */\\n\\t\\tpadding: 0;\\n\\t\\tborder: 0\\n\\t}\\n}\\n\\n/**\\n * Default UI rules for RTL languages.\\n */\\n.ck[dir=\\\"rtl\\\"],\\n.ck[dir=\\\"rtl\\\"] .ck {\\n\\ttext-align: right;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * Default border-radius value.\\n */\\n:root{\\n\\t--ck-border-radius: 2px;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t/**\\n\\t * A visual style of element's inner shadow (i.e. input).\\n\\t */\\n\\t--ck-inner-shadow: 2px 2px 3px var(--ck-color-shadow-inner) inset;\\n\\n\\t/**\\n\\t * A visual style of element's drop shadow (i.e. panel).\\n\\t */\\n\\t--ck-drop-shadow: 0 1px 2px 1px var(--ck-color-shadow-drop);\\n\\n\\t/**\\n\\t * A visual style of element's active shadow (i.e. comment or suggestion).\\n\\t */\\n\\t--ck-drop-shadow-active: 0 3px 6px 1px var(--ck-color-shadow-drop-active);\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-spacing-unit: \\t\\t\\t\\t\\t\\t0.6em;\\n\\t--ck-spacing-large: \\t\\t\\t\\t\\tcalc(var(--ck-spacing-unit) * 1.5);\\n\\t--ck-spacing-standard: \\t\\t\\t\\t\\tvar(--ck-spacing-unit);\\n\\t--ck-spacing-medium: \\t\\t\\t\\t\\tcalc(var(--ck-spacing-unit) * 0.8);\\n\\t--ck-spacing-small: \\t\\t\\t\\t\\tcalc(var(--ck-spacing-unit) * 0.5);\\n\\t--ck-spacing-tiny: \\t\\t\\t\\t\\t\\tcalc(var(--ck-spacing-unit) * 0.3);\\n\\t--ck-spacing-extra-tiny: \\t\\t\\t\\tcalc(var(--ck-spacing-unit) * 0.16);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.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:0 var(--ck-spacing-small);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height)}.ck .ck-size-view.ck-orientation-above-center,.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)}.ck .ck-size-view.ck-orientation-above-center{top:calc(var(--ck-resizer-tooltip-height)*-1);left:50%;transform:translate(-50%)}: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));top:0}.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:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-focus-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.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))}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-widget/theme/widget.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widget.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css\",\"webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css\"],\"names\":[],\"mappings\":\"AAKA,MACC,+CAAgD,CAChD,6CAAsD,CACtD,uCAAgD,CAEhD,kDAAmD,CACnD,gCAAiC,CACjC,kEACD,CAOA,8DAEC,iBAqBD,CAnBC,4EACC,iBAOD,CALC,qFAGC,aACD,CASD,iLACC,kBACD,CAGD,kBACC,qDAAsD,CACtD,0CAA2C,CAC3C,qDAAsD,CACtD,6CAA8C,CAC9C,kCAAmC,CACnC,aAAc,CACd,iCAAkC,CAClC,uCAAwC,CACxC,4CAoCD,CAlCC,8NAKC,iBACD,CAEA,0CACC,oCAAqC,CACrC,qCACD,CAEA,2CACC,oCAAqC,CACrC,sCACD,CAEA,8CACC,uCAAwC,CACxC,sCACD,CAEA,6CACC,uCAAwC,CACxC,qCACD,CAGA,8CACC,6CAAgD,CAChD,QAAS,CACT,yBACD,CCjFD,MACC,iCAAkC,CAClC,kCAAmC,CACnC,4CAA6C,CAC7C,wCAAyC,CAEzC,wCAAiD,CACjD,sCAAkD,CAClD,2EAA4E,CAC5E,yEACD,CAEA,eACC,gDAAiD,CACjD,mBAAoB,CACpB,yBAA0B,CAC1B,6GAUD,CARC,0EAEC,6EACD,CAEA,qBACC,iDACD,CAGD,gCACC,4BAWD,CAPC,yGC/BA,YAAa,CACb,2BAA2B,CCF3B,qCAA8B,CFqC7B,iEACD,CAIA,4EACC,WAAY,CACZ,qBAAsB,CAGtB,4BAA6B,CAC7B,SAAU,CAMV,6SAG6F,CAG7F,iEAAkE,CAGlE,2BAA4B,CAC5B,mDAAoD,CACpD,KAqBD,CAnBC,qFAEC,wCAAyC,CACzC,yCAA0C,CAC1C,oDASD,CANC,kHACC,SAAU,CAGV,+DACD,CAID,wHACC,SACD,CAID,kFACC,SAAU,CACV,oDACD,CAKC,oMACC,SAAU,CACV,6CAMD,CAHC,gRACC,SACD,CAOH,qFACC,SAAU,CACV,oDACD,CAGA,gDAEC,eAkBD,CAhBC,yEAOC,iCACD,CAGC,gOAEC,gDACD,CAOD,wIAEC,mDAQD,CALE,ghBAEC,gDACD,CAKH,yKAOC,yDACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-color-resizer: var(--ck-color-focus-border);\\n\\t--ck-color-resizer-tooltip-background: hsl(0, 0%, 15%);\\n\\t--ck-color-resizer-tooltip-text: hsl(0, 0%, 95%);\\n\\n\\t--ck-resizer-border-radius: var(--ck-border-radius);\\n\\t--ck-resizer-tooltip-offset: 10px;\\n\\t--ck-resizer-tooltip-height: calc(var(--ck-spacing-small) * 2 + 10px);\\n}\\n\\n.ck .ck-widget {\\n\\t/* This is neccessary for type around UI to be positioned properly. */\\n\\tposition: relative;\\n}\\n\\n.ck .ck-widget.ck-widget_with-selection-handle {\\n\\t/* Make the widget wrapper a relative positioning container for the drag handle. */\\n\\tposition: relative;\\n\\n\\t& .ck-widget__selection-handle {\\n\\t\\tposition: absolute;\\n\\n\\t\\t& .ck-icon {\\n\\t\\t\\t/* Make sure the icon in not a subject to font-size or line-height to avoid\\n\\t\\t\\tunnecessary spacing around it. */\\n\\t\\t\\tdisplay: block;\\n\\t\\t}\\n\\t}\\n\\n\\t/* Show the selection handle on mouse hover over the widget, but not for nested widgets. */\\n\\t&:hover > .ck-widget__selection-handle {\\n\\t\\tvisibility: visible;\\n\\t}\\n\\n\\t/* Show the selection handle when the widget is selected, but not for nested widgets. */\\n\\t&.ck-widget_selected > .ck-widget__selection-handle {\\n\\t\\tvisibility: visible;\\n\\t}\\n}\\n\\n.ck .ck-size-view {\\n\\tbackground: var(--ck-color-resizer-tooltip-background);\\n\\tcolor: var(--ck-color-resizer-tooltip-text);\\n\\tborder: 1px solid var(--ck-color-resizer-tooltip-text);\\n\\tborder-radius: var(--ck-resizer-border-radius);\\n\\tfont-size: var(--ck-font-size-tiny);\\n\\tdisplay: block;\\n\\tpadding: 0 var(--ck-spacing-small);\\n\\theight: var(--ck-resizer-tooltip-height);\\n\\tline-height: var(--ck-resizer-tooltip-height);\\n\\n\\t&.ck-orientation-top-left,\\n\\t&.ck-orientation-top-right,\\n\\t&.ck-orientation-bottom-right,\\n\\t&.ck-orientation-bottom-left,\\n\\t&.ck-orientation-above-center {\\n\\t\\tposition: absolute;\\n\\t}\\n\\n\\t&.ck-orientation-top-left {\\n\\t\\ttop: var(--ck-resizer-tooltip-offset);\\n\\t\\tleft: var(--ck-resizer-tooltip-offset);\\n\\t}\\n\\n\\t&.ck-orientation-top-right {\\n\\t\\ttop: var(--ck-resizer-tooltip-offset);\\n\\t\\tright: var(--ck-resizer-tooltip-offset);\\n\\t}\\n\\n\\t&.ck-orientation-bottom-right {\\n\\t\\tbottom: var(--ck-resizer-tooltip-offset);\\n\\t\\tright: var(--ck-resizer-tooltip-offset);\\n\\t}\\n\\n\\t&.ck-orientation-bottom-left {\\n\\t\\tbottom: var(--ck-resizer-tooltip-offset);\\n\\t\\tleft: var(--ck-resizer-tooltip-offset);\\n\\t}\\n\\n\\t/* Class applied if the widget is too small to contain the size label */\\n\\t&.ck-orientation-above-center {\\n\\t\\ttop: calc(var(--ck-resizer-tooltip-height) * -1);\\n\\t\\tleft: 50%;\\n\\t\\ttransform: translate(-50%);\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n@import \\\"../mixins/_focus.css\\\";\\n@import \\\"../mixins/_shadow.css\\\";\\n\\n:root {\\n\\t--ck-widget-outline-thickness: 3px;\\n\\t--ck-widget-handler-icon-size: 16px;\\n\\t--ck-widget-handler-animation-duration: 200ms;\\n\\t--ck-widget-handler-animation-curve: ease;\\n\\n\\t--ck-color-widget-blurred-border: hsl(0, 0%, 87%);\\n\\t--ck-color-widget-hover-border: hsl(43, 100%, 62%);\\n\\t--ck-color-widget-editable-focus-background: var(--ck-color-base-background);\\n\\t--ck-color-widget-drag-handler-icon-color: var(--ck-color-base-background);\\n}\\n\\n.ck .ck-widget {\\n\\toutline-width: var(--ck-widget-outline-thickness);\\n\\toutline-style: solid;\\n\\toutline-color: transparent;\\n\\ttransition: outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\\n\\n\\t&.ck-widget_selected,\\n\\t&.ck-widget_selected:hover {\\n\\t\\toutline: var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border);\\n\\t}\\n\\n\\t&:hover {\\n\\t\\toutline-color: var(--ck-color-widget-hover-border);\\n\\t}\\n}\\n\\n.ck .ck-editor__nested-editable {\\n\\tborder: 1px solid transparent;\\n\\n\\t/* The :focus style is applied before .ck-editor__nested-editable_focused class is rendered in the view.\\n\\tThese styles show a different border for a blink of an eye, so `:focus` need to have same styles applied. */\\n\\t&.ck-editor__nested-editable_focused,\\n\\t&:focus {\\n\\t\\t@mixin ck-focus-ring;\\n\\t\\t@mixin ck-box-shadow var(--ck-inner-shadow);\\n\\n\\t\\tbackground-color: var(--ck-color-widget-editable-focus-background);\\n\\t}\\n}\\n\\n.ck .ck-widget.ck-widget_with-selection-handle {\\n\\t& .ck-widget__selection-handle {\\n\\t\\tpadding: 4px;\\n\\t\\tbox-sizing: border-box;\\n\\n\\t\\t/* Background and opacity will be animated as the handler shows up or the widget gets selected. */\\n\\t\\tbackground-color: transparent;\\n\\t\\topacity: 0;\\n\\n\\t\\t/* Transition:\\n\\t\\t * background-color for the .ck-widget_selected state change,\\n\\t\\t * visibility for hiding the handler,\\n\\t\\t * opacity for the proper look of the icon when the handler disappears. */\\n\\t\\ttransition:\\n\\t\\t\\tbackground-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),\\n\\t\\t\\tvisibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),\\n\\t\\t\\topacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\\n\\n\\t\\t/* Make only top corners round. */\\n\\t\\tborder-radius: var(--ck-border-radius) var(--ck-border-radius) 0 0;\\n\\n\\t\\t/* Place the drag handler outside the widget wrapper. */\\n\\t\\ttransform: translateY(-100%);\\n\\t\\tleft: calc(0px - var(--ck-widget-outline-thickness));\\n\\t\\ttop: 0;\\n\\n\\t\\t& .ck-icon {\\n\\t\\t\\t/* Make sure the dimensions of the icon are independent of the fon-size of the content. */\\n\\t\\t\\twidth: var(--ck-widget-handler-icon-size);\\n\\t\\t\\theight: var(--ck-widget-handler-icon-size);\\n\\t\\t\\tcolor: var(--ck-color-widget-drag-handler-icon-color);\\n\\n\\t\\t\\t/* The \\\"selected\\\" part of the icon is invisible by default */\\n\\t\\t\\t& .ck-icon__selected-indicator {\\n\\t\\t\\t\\topacity: 0;\\n\\n\\t\\t\\t\\t/* Note: The animation is longer on purpose. Simply feels better. */\\n\\t\\t\\t\\ttransition: opacity 300ms var(--ck-widget-handler-animation-curve);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t/* Advertise using the look of the icon that once clicked the handler, the widget will be selected. */\\n\\t\\t&:hover .ck-icon .ck-icon__selected-indicator {\\n\\t\\t\\topacity: 1;\\n\\t\\t}\\n\\t}\\n\\n\\t/* Show the selection handler on mouse hover over the widget, but not for nested widgets. */\\n\\t&:hover > .ck-widget__selection-handle {\\n\\t\\topacity: 1;\\n\\t\\tbackground-color: var(--ck-color-widget-hover-border);\\n\\t}\\n\\n\\t/* Show the selection handler when the widget is selected, but not for nested widgets. */\\n\\t&.ck-widget_selected,\\n\\t&.ck-widget_selected:hover {\\n\\t\\t& > .ck-widget__selection-handle {\\n\\t\\t\\topacity: 1;\\n\\t\\t\\tbackground-color: var(--ck-color-focus-border);\\n\\n\\t\\t\\t/* When the widget is selected, notify the user using the proper look of the icon. */\\n\\t\\t\\t& .ck-icon .ck-icon__selected-indicator {\\n\\t\\t\\t\\topacity: 1;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\\n/* In a RTL environment, align the selection handler to the right side of the widget */\\n/* stylelint-disable-next-line no-descending-specificity */\\n.ck[dir=\\\"rtl\\\"] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle {\\n\\tleft: auto;\\n\\tright: calc(0px - var(--ck-widget-outline-thickness));\\n}\\n\\n/* https://github.com/ckeditor/ckeditor5/issues/6415 */\\n.ck.ck-editor__editable.ck-read-only .ck-widget {\\n\\t/* Prevent the :hover outline from showing up because of the used outline-color transition. */\\n\\ttransition: none;\\n\\n\\t&:not(.ck-widget_selected) {\\n\\t\\t/* Disable visual effects of hover/active widget when CKEditor is in readOnly mode.\\n\\t\\t * See: https://github.com/ckeditor/ckeditor5/issues/1261\\n\\t\\t *\\n\\t\\t * Leave the unit because this custom property is used in calc() by other features.\\n\\t\\t * See: https://github.com/ckeditor/ckeditor5/issues/6775\\n\\t\\t */\\n\\t\\t--ck-widget-outline-thickness: 0px;\\n\\t}\\n\\n\\t&.ck-widget_with-selection-handle {\\n\\t\\t& .ck-widget__selection-handle,\\n\\t\\t& .ck-widget__selection-handle:hover {\\n\\t\\t\\tbackground: var(--ck-color-widget-blurred-border);\\n\\t\\t}\\n\\t}\\n}\\n\\n/* Style the widget when it's selected but the editable it belongs to lost focus. */\\n/* stylelint-disable-next-line no-descending-specificity */\\n.ck.ck-editor__editable.ck-blurred .ck-widget {\\n\\t&.ck-widget_selected,\\n\\t&.ck-widget_selected:hover {\\n\\t\\toutline-color: var(--ck-color-widget-blurred-border);\\n\\n\\t\\t&.ck-widget_with-selection-handle {\\n\\t\\t\\t& > .ck-widget__selection-handle,\\n\\t\\t\\t& > .ck-widget__selection-handle:hover {\\n\\t\\t\\t\\tbackground: var(--ck-color-widget-blurred-border);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\\n.ck.ck-editor__editable > .ck-widget.ck-widget_with-selection-handle:first-child,\\n.ck.ck-editor__editable blockquote > .ck-widget.ck-widget_with-selection-handle:first-child {\\n\\t/* Do not crop selection handler if a widget is a first-child in the blockquote or in the root editable.\\n\\tIn fact, anything with overflow: hidden.\\n\\thttps://github.com/ckeditor/ckeditor5-block-quote/issues/28\\n\\thttps://github.com/ckeditor/ckeditor5-widget/issues/44\\n\\thttps://github.com/ckeditor/ckeditor5-widget/issues/66 */\\n\\tmargin-top: calc(1em + var(--ck-widget-handler-icon-size));\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A visual style of focused element's border.\\n */\\n@define-mixin ck-focus-ring {\\n\\t/* Disable native outline. */\\n\\toutline: none;\\n\\tborder: var(--ck-focus-ring)\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n/**\\n * A helper to combine multiple shadows.\\n */\\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\\n\\tbox-shadow: $shadowA, $shadowB;\\n}\\n\\n/**\\n * Gives an element a drop shadow so it looks like a floating panel.\\n */\\n@define-mixin ck-drop-shadow {\\n\\t@mixin ck-box-shadow var(--ck-drop-shadow);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;position:absolute;pointer-events:none;left:0;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{position:absolute;pointer-events:all}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{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)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{top:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-widget/theme/widgetresize.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widgetresize.css\"],\"names\":[],\"mappings\":\"AAKA,4BAEC,iBACD,CAEA,wBACC,YAAa,CACb,iBAAkB,CAGlB,mBAAoB,CAEpB,MAAO,CACP,KACD,CAGC,2EACC,aACD,CAGD,gCACC,iBAAkB,CAGlB,kBAWD,CATC,4IAEC,kBACD,CAEA,4IAEC,kBACD,CCpCD,MACC,sBAAuB,CAGvB,yDAAiE,CACjE,6BACD,CAEA,wBACC,yCACD,CAEA,gCACC,4BAA6B,CAC7B,6BAA8B,CAC9B,uCAAwC,CACxC,gDAA6D,CAC7D,6CAqBD,CAnBC,oEACC,4BAA6B,CAC7B,6BACD,CAEA,qEACC,4BAA6B,CAC7B,8BACD,CAEA,wEACC,+BAAgC,CAChC,8BACD,CAEA,uEACC,+BAAgC,CAChC,6BACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck .ck-widget_with-resizer {\\n\\t/* Make the widget wrapper a relative positioning container for the drag handle. */\\n\\tposition: relative;\\n}\\n\\n.ck .ck-widget__resizer {\\n\\tdisplay: none;\\n\\tposition: absolute;\\n\\n\\t/* The wrapper itself should not interfere with the pointer device, only the handles should. */\\n\\tpointer-events: none;\\n\\n\\tleft: 0;\\n\\ttop: 0;\\n}\\n\\n.ck-focused .ck-widget_with-resizer.ck-widget_selected {\\n\\t& > .ck-widget__resizer {\\n\\t\\tdisplay: block;\\n\\t}\\n}\\n\\n.ck .ck-widget__resizer__handle {\\n\\tposition: absolute;\\n\\n\\t/* Resizers are the only UI elements that should interfere with a pointer device. */\\n\\tpointer-events: all;\\n\\n\\t&.ck-widget__resizer__handle-top-left,\\n\\t&.ck-widget__resizer__handle-bottom-right {\\n\\t\\tcursor: nwse-resize;\\n\\t}\\n\\n\\t&.ck-widget__resizer__handle-top-right,\\n\\t&.ck-widget__resizer__handle-bottom-left {\\n\\t\\tcursor: nesw-resize;\\n\\t}\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-resizer-size: 10px;\\n\\n\\t/* Set the resizer with a 50% offset. */\\n\\t--ck-resizer-offset: calc( ( var(--ck-resizer-size) / -2 ) - 2px);\\n\\t--ck-resizer-border-width: 1px;\\n}\\n\\n.ck .ck-widget__resizer {\\n\\toutline: 1px solid var(--ck-color-resizer);\\n}\\n\\n.ck .ck-widget__resizer__handle {\\n\\twidth: var(--ck-resizer-size);\\n\\theight: var(--ck-resizer-size);\\n\\tbackground: var(--ck-color-focus-border);\\n\\tborder: var(--ck-resizer-border-width) solid hsl(0, 0%, 100%);\\n\\tborder-radius: var(--ck-resizer-border-radius);\\n\\n\\t&.ck-widget__resizer__handle-top-left {\\n\\t\\ttop: var(--ck-resizer-offset);\\n\\t\\tleft: var(--ck-resizer-offset);\\n\\t}\\n\\n\\t&.ck-widget__resizer__handle-top-right {\\n\\t\\ttop: var(--ck-resizer-offset);\\n\\t\\tright: var(--ck-resizer-offset);\\n\\t}\\n\\n\\t&.ck-widget__resizer__handle-bottom-right {\\n\\t\\tbottom: var(--ck-resizer-offset);\\n\\t\\tright: var(--ck-resizer-offset);\\n\\t}\\n\\n\\t&.ck-widget__resizer__handle-bottom-left {\\n\\t\\tbottom: var(--ck-resizer-offset);\\n\\t\\tleft: var(--ck-resizer-offset);\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".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(var(--ck-widget-outline-thickness)*-0.5);left:min(10%,30px);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-0.5);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(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{top:calc(var(--ck-widget-outline-thickness)*-1 - 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(var(--ck-widget-outline-thickness)*-1 - 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[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.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}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../ckeditor5-widget/theme/widgettypearound.css\",\"webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widgettypearound.css\"],\"names\":[],\"mappings\":\"AASC,+CACC,aAAc,CACd,iBAAkB,CAClB,eAAgB,CAChB,2BAwBD,CAtBC,mDACC,iBAAkB,CAClB,OAAQ,CACR,QAAS,CACT,qCACD,CAEA,qFAEC,iDAAoD,CACpD,kBAAoB,CAEpB,0BACD,CAEA,oFAEC,oDAAuD,CACvD,mBAAqB,CAErB,yBACD,CAUA,mLACC,UAAW,CACX,aAAc,CACd,iBAAkB,CAClB,OAAQ,CACR,QAAS,CACT,qCACD,CAMD,2EACC,YAAa,CACb,iBAAkB,CAClB,MAAO,CACP,OACD,CAOA,iFACC,gDAAqD,CACrD,iDACD,CAKA,wHACC,qDAA0D,CAC1D,aACD,CAKA,uHACC,wDAA6D,CAC7D,aACD,CAoBD,mOACC,YACD,CC3GA,MACC,wCAAyC,CACzC,wEAAyE,CACzE,8EAA+E,CAC/E,2FAA4F,CAC5F,wDAAyD,CACzD,uDAAwD,CACxD,yEACD,CAgBC,+CACC,8CAA+C,CAC/C,+CAAgD,CAChD,oDAAqD,CACrD,mBAAoB,CACpB,uMAAyM,CAb1M,SAAU,CACV,mBA0DA,CA1CC,mDACC,UAAW,CACX,UAAW,CACX,8BAA+B,CAC/B,6BAA8B,CAC9B,cAgBD,CAdC,qDACC,mBAAoB,CACpB,mBAAoB,CAEpB,SAAU,CACV,qDAAsD,CACtD,kBAAmB,CACnB,oBAAqB,CACrB,qBACD,CAEA,wDACC,kBACD,CAGD,qDAIC,6DAcD,CARE,kEACC,oDACD,CAEA,8DACC,wDACD,CAUF,uKAvED,SAAU,CACV,mBAwEC,CAOD,gGACC,0DACD,CAOA,uKAEC,2DAQD,CANC,mLACC,0DAA2D,CAC3D,2DAA4D,CAC5D,mBAAoB,CACpB,uEACD,CAOD,8GACC,gBACD,CAKA,mDACC,mBAAoB,CACpB,UAAW,CACX,mFAAoF,CAMpF,oCAAwC,CACxC,oCACD,CAOC,6JAEC,yBACD,CAUA,yKACC,iDACD,CAMA,uOAlJD,SAAU,CACV,mBAmJC,CASE,0jBACC,SACD,CASF,mPACC,SACD,CASF,uHACC,aAAc,CACd,iBACD,CAYG,iRAlMF,SAAU,CACV,mBAmME,CAQH,kIACC,qEAKD,CAHC,wIACC,WACD,CAGD,4CACC,GACC,oBACD,CACA,OACC,mBACD,CACD,CAEA,gDACC,OACC,mBACD,CACA,OACC,mBACD,CACD,CAEA,8CACC,GACC,6HACD,CACA,IACC,6HACD,CACA,GACC,+HACD,CACD,CAEA,kDACC,GACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,GACC,SACD,CACD\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n.ck .ck-widget {\\n\\t/*\\n\\t * Styles of the type around buttons\\n\\t */\\n\\t& .ck-widget__type-around__button {\\n\\t\\tdisplay: block;\\n\\t\\tposition: absolute;\\n\\t\\toverflow: hidden;\\n\\t\\tz-index: var(--ck-z-default);\\n\\n\\t\\t& svg {\\n\\t\\t\\tposition: absolute;\\n\\t\\t\\ttop: 50%;\\n\\t\\t\\tleft: 50%;\\n\\t\\t\\tz-index: calc(var(--ck-z-default) + 2);\\n\\t\\t}\\n\\n\\t\\t&.ck-widget__type-around__button_before {\\n\\t\\t\\t/* Place it in the middle of the outline */\\n\\t\\t\\ttop: calc(-0.5 * var(--ck-widget-outline-thickness));\\n\\t\\t\\tleft: min(10%, 30px);\\n\\n\\t\\t\\ttransform: translateY(-50%);\\n\\t\\t}\\n\\n\\t\\t&.ck-widget__type-around__button_after {\\n\\t\\t\\t/* Place it in the middle of the outline */\\n\\t\\t\\tbottom: calc(-0.5 * var(--ck-widget-outline-thickness));\\n\\t\\t\\tright: min(10%, 30px);\\n\\n\\t\\t\\ttransform: translateY(50%);\\n\\t\\t}\\n\\t}\\n\\n\\t/*\\n\\t * Styles for the buttons when:\\n\\t * - the widget is selected,\\n\\t * - or the button is being hovered (regardless of the widget state).\\n\\t */\\n\\t&.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\\n\\t& > .ck-widget__type-around > .ck-widget__type-around__button:hover {\\n\\t\\t&::after {\\n\\t\\t\\tcontent: \\\"\\\";\\n\\t\\t\\tdisplay: block;\\n\\t\\t\\tposition: absolute;\\n\\t\\t\\ttop: 1px;\\n\\t\\t\\tleft: 1px;\\n\\t\\t\\tz-index: calc(var(--ck-z-default) + 1);\\n\\t\\t}\\n\\t}\\n\\n\\t/*\\n\\t * Styles for the horizontal \\\"fake caret\\\" which is displayed when the user navigates using the keyboard.\\n\\t */\\n\\t& > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\\n\\t\\tdisplay: none;\\n\\t\\tposition: absolute;\\n\\t\\tleft: 0;\\n\\t\\tright: 0;\\n\\t}\\n\\n\\t/*\\n\\t * When the widget is hovered the \\\"fake caret\\\" would normally be narrower than the\\n\\t * extra outline displayed around the widget. Let's extend the \\\"fake caret\\\" to match\\n\\t * the full width of the widget.\\n\\t */\\n\\t&:hover > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\\n\\t\\tleft: calc( -1 * var(--ck-widget-outline-thickness) );\\n\\t\\tright: calc( -1 * var(--ck-widget-outline-thickness) );\\n\\t}\\n\\n\\t/*\\n\\t * Styles for the horizontal \\\"fake caret\\\" when it should be displayed before the widget (backward keyboard navigation).\\n\\t */\\n\\t&.ck-widget_type-around_show-fake-caret_before > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\\n\\t\\ttop: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\\n\\t\\tdisplay: block;\\n\\t}\\n\\n\\t/*\\n\\t * Styles for the horizontal \\\"fake caret\\\" when it should be displayed after the widget (forward keyboard navigation).\\n\\t */\\n\\t&.ck-widget_type-around_show-fake-caret_after > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\\n\\t\\tbottom: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\\n\\t\\tdisplay: block;\\n\\t}\\n}\\n\\n/*\\n * Integration with the read-only mode of the editor.\\n */\\n.ck.ck-editor__editable.ck-read-only .ck-widget__type-around {\\n\\tdisplay: none;\\n}\\n\\n/*\\n * Integration with the restricted editing mode (feature) of the editor.\\n */\\n.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around {\\n\\tdisplay: none;\\n}\\n\\n/*\\n * Integration with the #isEnabled property of the WidgetTypeAround plugin.\\n */\\n.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around {\\n\\tdisplay: none;\\n}\\n\",\"/*\\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\\n */\\n\\n:root {\\n\\t--ck-widget-type-around-button-size: 20px;\\n\\t--ck-color-widget-type-around-button-active: var(--ck-color-focus-border);\\n\\t--ck-color-widget-type-around-button-hover: var(--ck-color-widget-hover-border);\\n\\t--ck-color-widget-type-around-button-blurred-editable: var(--ck-color-widget-blurred-border);\\n\\t--ck-color-widget-type-around-button-radar-start-alpha: 0;\\n\\t--ck-color-widget-type-around-button-radar-end-alpha: .3;\\n\\t--ck-color-widget-type-around-button-icon: var(--ck-color-base-background);\\n}\\n\\n@define-mixin ck-widget-type-around-button-visible {\\n\\topacity: 1;\\n\\tpointer-events: auto;\\n}\\n\\n@define-mixin ck-widget-type-around-button-hidden {\\n\\topacity: 0;\\n\\tpointer-events: none;\\n}\\n\\n.ck .ck-widget {\\n\\t/*\\n\\t * Styles of the type around buttons\\n\\t */\\n\\t& .ck-widget__type-around__button {\\n\\t\\twidth: var(--ck-widget-type-around-button-size);\\n\\t\\theight: var(--ck-widget-type-around-button-size);\\n\\t\\tbackground: var(--ck-color-widget-type-around-button);\\n\\t\\tborder-radius: 100px;\\n\\t\\ttransition: 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);\\n\\n\\t\\t@mixin ck-widget-type-around-button-hidden;\\n\\n\\t\\t& svg {\\n\\t\\t\\twidth: 10px;\\n\\t\\t\\theight: 8px;\\n\\t\\t\\ttransform: translate(-50%,-50%);\\n\\t\\t\\ttransition: transform .5s ease;\\n\\t\\t\\tmargin-top: 1px;\\n\\n\\t\\t\\t& * {\\n\\t\\t\\t\\tstroke-dasharray: 10;\\n\\t\\t\\t\\tstroke-dashoffset: 0;\\n\\n\\t\\t\\t\\tfill: none;\\n\\t\\t\\t\\tstroke: var(--ck-color-widget-type-around-button-icon);\\n\\t\\t\\t\\tstroke-width: 1.5px;\\n\\t\\t\\t\\tstroke-linecap: round;\\n\\t\\t\\t\\tstroke-linejoin: round;\\n\\t\\t\\t}\\n\\n\\t\\t\\t& line {\\n\\t\\t\\t\\tstroke-dasharray: 7;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t&:hover {\\n\\t\\t\\t/*\\n\\t\\t\\t * Display the \\\"sonar\\\" around the button when hovered.\\n\\t\\t\\t */\\n\\t\\t\\tanimation: ck-widget-type-around-button-sonar 1s ease infinite;\\n\\n\\t\\t\\t/*\\n\\t\\t\\t * Animate active button's icon.\\n\\t\\t\\t */\\n\\t\\t\\t& svg {\\n\\t\\t\\t\\t& polyline {\\n\\t\\t\\t\\t\\tanimation: ck-widget-type-around-arrow-dash 2s linear;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t& line {\\n\\t\\t\\t\\t\\tanimation: ck-widget-type-around-arrow-tip-dash 2s linear;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t/*\\n\\t * Show type around buttons when the widget gets selected or being hovered.\\n\\t */\\n\\t&.ck-widget_selected,\\n\\t&:hover {\\n\\t\\t& > .ck-widget__type-around > .ck-widget__type-around__button {\\n\\t\\t\\t@mixin ck-widget-type-around-button-visible;\\n\\t\\t}\\n\\t}\\n\\n\\t/*\\n\\t * Styles for the buttons when the widget is NOT selected (but the buttons are visible\\n\\t * and still can be hovered).\\n\\t */\\n\\t&:not(.ck-widget_selected) > .ck-widget__type-around > .ck-widget__type-around__button {\\n\\t\\tbackground: var(--ck-color-widget-type-around-button-hover);\\n\\t}\\n\\n\\t/*\\n\\t * Styles for the buttons when:\\n\\t * - the widget is selected,\\n\\t * - or the button is being hovered (regardless of the widget state).\\n\\t */\\n\\t&.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\\n\\t& > .ck-widget__type-around > .ck-widget__type-around__button:hover {\\n\\t\\tbackground: var(--ck-color-widget-type-around-button-active);\\n\\n\\t\\t&::after {\\n\\t\\t\\twidth: calc(var(--ck-widget-type-around-button-size) - 2px);\\n\\t\\t\\theight: calc(var(--ck-widget-type-around-button-size) - 2px);\\n\\t\\t\\tborder-radius: 100px;\\n\\t\\t\\tbackground: linear-gradient(135deg, hsla(0,0%,100%,0) 0%, hsla(0,0%,100%,.3) 100%);\\n\\t\\t}\\n\\t}\\n\\n\\t/*\\n\\t * Styles for the \\\"before\\\" button when the widget has a selection handle. Because some space\\n\\t * is consumed by the handle, the button must be moved slightly to the right to let it breathe.\\n\\t */\\n\\t&.ck-widget_with-selection-handle > .ck-widget__type-around > .ck-widget__type-around__button_before {\\n\\t\\tmargin-left: 20px;\\n\\t}\\n\\n\\t/*\\n\\t * Styles for the horizontal \\\"fake caret\\\" which is displayed when the user navigates using the keyboard.\\n\\t */\\n\\t& .ck-widget__type-around__fake-caret {\\n\\t\\tpointer-events: none;\\n\\t\\theight: 1px;\\n\\t\\tanimation: ck-widget-type-around-fake-caret-pulse linear 1s infinite normal forwards;\\n\\n\\t\\t/*\\n\\t\\t * The semi-transparent-outline+background combo improves the contrast\\n\\t\\t * when the background underneath the fake caret is dark.\\n\\t\\t */\\n\\t\\toutline: solid 1px hsla(0, 0%, 100%, .5);\\n\\t\\tbackground: var(--ck-color-base-text);\\n\\t}\\n\\n\\t/*\\n\\t * Styles of the widget when the \\\"fake caret\\\" is blinking (e.g. upon keyboard navigation).\\n\\t * Despite the widget being physically selected in the model, its outline should disappear.\\n\\t */\\n\\t&.ck-widget_selected {\\n\\t\\t&.ck-widget_type-around_show-fake-caret_before,\\n\\t\\t&.ck-widget_type-around_show-fake-caret_after {\\n\\t\\t\\toutline-color: transparent;\\n\\t\\t}\\n\\t}\\n\\n\\t&.ck-widget_type-around_show-fake-caret_before,\\n\\t&.ck-widget_type-around_show-fake-caret_after {\\n\\t\\t/*\\n\\t\\t * When the \\\"fake caret\\\" is visible we simulate that the widget is not selected\\n\\t\\t * (despite being physically selected), so the outline color should be for the\\n\\t\\t * unselected widget.\\n\\t\\t */\\n\\t\\t&.ck-widget_selected:hover {\\n\\t\\t\\toutline-color: var(--ck-color-widget-hover-border);\\n\\t\\t}\\n\\n\\t\\t/*\\n\\t\\t * Styles of the type around buttons when the \\\"fake caret\\\" is blinking (e.g. upon keyboard navigation).\\n\\t\\t * In this state, the type around buttons would collide with the fake carets so they should disappear.\\n\\t\\t */\\n\\t\\t& > .ck-widget__type-around > .ck-widget__type-around__button {\\n\\t\\t\\t@mixin ck-widget-type-around-button-hidden;\\n\\t\\t}\\n\\n\\t\\t/*\\n\\t\\t * Fake horizontal caret integration with the selection handle. When the caret is visible, simply\\n\\t\\t * hide the handle because it intersects with the caret (and does not make much sense anyway).\\n\\t\\t */\\n\\t\\t&.ck-widget_with-selection-handle {\\n\\t\\t\\t&.ck-widget_selected,\\n\\t\\t\\t&.ck-widget_selected:hover {\\n\\t\\t\\t\\t& > .ck-widget__selection-handle {\\n\\t\\t\\t\\t\\topacity: 0\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t/*\\n\\t\\t * Fake horizontal caret integration with the resize UI. When the caret is visible, simply\\n\\t\\t * hide the resize UI because it creates too much noise. It can be visible when the user\\n\\t\\t * hovers the widget, though.\\n\\t\\t */\\n\\t\\t&.ck-widget_selected.ck-widget_with-resizer > .ck-widget__resizer {\\n\\t\\t\\topacity: 0\\n\\t\\t}\\n\\t}\\n}\\n\\n/*\\n * Styles for the \\\"before\\\" button when the widget has a selection handle in an RTL environment.\\n * The selection handler is aligned to the right side of the widget so there is no need to create\\n * additional space for it next to the \\\"before\\\" button.\\n */\\n.ck[dir=\\\"rtl\\\"] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around > .ck-widget__type-around__button_before {\\n\\tmargin-left: 0;\\n\\tmargin-right: 20px;\\n}\\n\\n/*\\n * Hide type around buttons when the widget is selected as a child of a selected\\n * nested editable (e.g. mulit-cell table selection).\\n *\\n * See https://github.com/ckeditor/ckeditor5/issues/7263.\\n */\\n.ck-editor__nested-editable.ck-editor__editable_selected {\\n\\t& .ck-widget {\\n\\t\\t&.ck-widget_selected,\\n\\t\\t&:hover {\\n\\t\\t\\t& > .ck-widget__type-around > .ck-widget__type-around__button {\\n\\t\\t\\t\\t@mixin ck-widget-type-around-button-hidden;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\\n/*\\n * Styles for the buttons when the widget is selected but the user clicked outside of the editor (blurred the editor).\\n */\\n.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button:not(:hover) {\\n\\tbackground: var(--ck-color-widget-type-around-button-blurred-editable);\\n\\n\\t& svg * {\\n\\t\\tstroke: hsl(0,0%,60%);\\n\\t}\\n}\\n\\n@keyframes ck-widget-type-around-arrow-dash {\\n\\t0% {\\n\\t\\tstroke-dashoffset: 10;\\n\\t}\\n\\t20%, 100% {\\n\\t\\tstroke-dashoffset: 0;\\n\\t}\\n}\\n\\n@keyframes ck-widget-type-around-arrow-tip-dash {\\n\\t0%, 20% {\\n\\t\\tstroke-dashoffset: 7;\\n\\t}\\n\\t40%, 100% {\\n\\t\\tstroke-dashoffset: 0;\\n\\t}\\n}\\n\\n@keyframes ck-widget-type-around-button-sonar {\\n\\t0% {\\n\\t\\tbox-shadow: 0 0 0 0 hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));\\n\\t}\\n\\t50% {\\n\\t\\tbox-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-end-alpha));\\n\\t}\\n\\t100% {\\n\\t\\tbox-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));\\n\\t}\\n}\\n\\n@keyframes ck-widget-type-around-fake-caret-pulse {\\n\\t0% {\\n\\t\\topacity: 1;\\n\\t}\\n\\t49% {\\n\\t\\topacity: 1;\\n\\t}\\n\\t50% {\\n\\t\\topacity: 0;\\n\\t}\\n\\t99% {\\n\\t\\topacity: 0;\\n\\t}\\n\\t100% {\\n\\t\\topacity: 1;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join(\"\");\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === \"string\") {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, \"\"]];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\"use strict\";\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nmodule.exports = function cssWithMappingToString(item) {\n var _item = _slicedToArray(item, 4),\n content = _item[1],\n cssMapping = _item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (typeof btoa === \"function\") {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || \"\").concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join(\"\\n\");\n }\n\n return [content].join(\"\\n\");\n};","\"use strict\";\n\nvar isOldIE = function isOldIE() {\n var memo;\n return function memorize() {\n if (typeof memo === 'undefined') {\n // Test for IE <= 9 as proposed by Browserhacks\n // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n // Tests for existence of standard globals is to allow style-loader\n // to operate correctly into non-standard environments\n // @see https://github.com/webpack-contrib/style-loader/issues/177\n memo = Boolean(window && document && document.all && !window.atob);\n }\n\n return memo;\n };\n}();\n\nvar getTarget = function getTarget() {\n var memo = {};\n return function memorize(target) {\n if (typeof memo[target] === 'undefined') {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n };\n}();\n\nvar stylesInDom = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDom.length; i++) {\n if (stylesInDom[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var index = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3]\n };\n\n if (index !== -1) {\n stylesInDom[index].references++;\n stylesInDom[index].updater(obj);\n } else {\n stylesInDom.push({\n identifier: identifier,\n updater: addStyle(obj, options),\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction insertStyleElement(options) {\n var style = document.createElement('style');\n var attributes = options.attributes || {};\n\n if (typeof attributes.nonce === 'undefined') {\n var nonce = typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null;\n\n if (nonce) {\n attributes.nonce = nonce;\n }\n }\n\n Object.keys(attributes).forEach(function (key) {\n style.setAttribute(key, attributes[key]);\n });\n\n if (typeof options.insert === 'function') {\n options.insert(style);\n } else {\n var target = getTarget(options.insert || 'head');\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n }\n\n return style;\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join('\\n');\n };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n var css = remove ? '' : obj.media ? \"@media \".concat(obj.media, \" {\").concat(obj.css, \"}\") : obj.css; // For old IE\n\n /* istanbul ignore if */\n\n if (style.styleSheet) {\n style.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = style.childNodes;\n\n if (childNodes[index]) {\n style.removeChild(childNodes[index]);\n }\n\n if (childNodes.length) {\n style.insertBefore(cssNode, childNodes[index]);\n } else {\n style.appendChild(cssNode);\n }\n }\n}\n\nfunction applyToTag(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute('media', media);\n } else {\n style.removeAttribute('media');\n }\n\n if (sourceMap && typeof btoa !== 'undefined') {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n var style;\n var update;\n var remove;\n\n if (options.singleton) {\n var styleIndex = singletonCounter++;\n style = singleton || (singleton = insertStyleElement(options));\n update = applyToSingletonTag.bind(null, style, styleIndex, false);\n remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n } else {\n style = insertStyleElement(options);\n update = applyToTag.bind(null, style, options);\n\n remove = function remove() {\n removeStyleElement(style);\n };\n }\n\n update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n update(obj = newObj);\n } else {\n remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n // tags it will allow on a page\n\n if (!options.singleton && typeof options.singleton !== 'boolean') {\n options.singleton = isOldIE();\n }\n\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n if (Object.prototype.toString.call(newList) !== '[object Array]') {\n return;\n }\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDom[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDom[_index].references === 0) {\n stylesInDom[_index].updater();\n\n stylesInDom.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/spy\n */\n\n/**\n * Creates a spy function (ala Sinon.js) that can be used to inspect call to it.\n *\n * The following are the present features:\n *\n * * spy.called: property set to `true` if the function has been called at least once.\n *\n * @returns {Function} The spy function.\n */\nfunction spy() {\n\treturn function spy() {\n\t\tspy.called = true;\n\t};\n}\n\nexport default spy;\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/eventinfo\n */\n\nimport spy from './spy';\n\n/**\n * The event object passed to event callbacks. It is used to provide information about the event as well as a tool to\n * manipulate it.\n */\nexport default class EventInfo {\n\t/**\n\t * @param {Object} source The emitter.\n\t * @param {String} name The event name.\n\t */\n\tconstructor( source, name ) {\n\t\t/**\n\t\t * The object that fired the event.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Object}\n\t\t */\n\t\tthis.source = source;\n\n\t\t/**\n\t\t * The event name.\n\t\t *\n\t\t * @readonly\n\t\t * @member {String}\n\t\t */\n\t\tthis.name = name;\n\n\t\t/**\n\t\t * Path this event has followed. See {@link module:utils/emittermixin~EmitterMixin#delegate}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Array.<Object>}\n\t\t */\n\t\tthis.path = [];\n\n\t\t// The following methods are defined in the constructor because they must be re-created per instance.\n\n\t\t/**\n\t\t * Stops the event emitter to call further callbacks for this event interaction.\n\t\t *\n\t\t * @method #stop\n\t\t */\n\t\tthis.stop = spy();\n\n\t\t/**\n\t\t * Removes the current callback from future interactions of this event.\n\t\t *\n\t\t * @method #off\n\t\t */\n\t\tthis.off = spy();\n\n\t\t/**\n\t\t * The value which will be returned by {@link module:utils/emittermixin~EmitterMixin#fire}.\n\t\t *\n\t\t * It's `undefined` by default and can be changed by an event listener:\n\t\t *\n\t\t *\t\tdataController.fire( 'getSelectedContent', ( evt ) => {\n\t\t *\t\t\t// This listener will make `dataController.fire( 'getSelectedContent' )`\n\t\t *\t\t\t// always return an empty DocumentFragment.\n\t\t *\t\t\tevt.return = new DocumentFragment();\n\t\t *\n\t\t *\t\t\t// Make sure no other listeners are executed.\n\t\t *\t\t\tevt.stop();\n\t\t *\t\t} );\n\t\t *\n\t\t * @member #return\n\t\t */\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/uid\n */\n\n// A hash table of hex numbers to avoid using toString() in uid() which is costly.\n// [ '00', '01', '02', ..., 'fe', 'ff' ]\nconst HEX_NUMBERS = new Array( 256 ).fill()\n\t.map( ( val, index ) => ( '0' + ( index ).toString( 16 ) ).slice( -2 ) );\n\n/**\n * Returns a unique id. The id starts with an \"e\" character and a randomly generated string of\n * 32 alphanumeric characters.\n *\n * **Note**: The characters the unique id is built from correspond to the hex number notation\n * (from \"0\" to \"9\", from \"a\" to \"f\"). In other words, each id corresponds to an \"e\" followed\n * by 16 8-bit numbers next to each other.\n *\n * @returns {String} An unique id string.\n */\nexport default function uid() {\n\t// Let's create some positive random 32bit integers first.\n\t//\n\t// 1. Math.random() is a float between 0 and 1.\n\t// 2. 0x100000000 is 2^32 = 4294967296.\n\t// 3. >>> 0 enforces integer (in JS all numbers are floating point).\n\t//\n\t// For instance:\n\t//\t\tMath.random() * 0x100000000 = 3366450031.853859\n\t// but\n\t//\t\tMath.random() * 0x100000000 >>> 0 = 3366450031.\n\tconst r1 = Math.random() * 0x100000000 >>> 0;\n\tconst r2 = Math.random() * 0x100000000 >>> 0;\n\tconst r3 = Math.random() * 0x100000000 >>> 0;\n\tconst r4 = Math.random() * 0x100000000 >>> 0;\n\n\t// Make sure that id does not start with number.\n\treturn 'e' +\n\t\tHEX_NUMBERS[ r1 >> 0 & 0xFF ] +\n\t\tHEX_NUMBERS[ r1 >> 8 & 0xFF ] +\n\t\tHEX_NUMBERS[ r1 >> 16 & 0xFF ] +\n\t\tHEX_NUMBERS[ r1 >> 24 & 0xFF ] +\n\t\tHEX_NUMBERS[ r2 >> 0 & 0xFF ] +\n\t\tHEX_NUMBERS[ r2 >> 8 & 0xFF ] +\n\t\tHEX_NUMBERS[ r2 >> 16 & 0xFF ] +\n\t\tHEX_NUMBERS[ r2 >> 24 & 0xFF ] +\n\t\tHEX_NUMBERS[ r3 >> 0 & 0xFF ] +\n\t\tHEX_NUMBERS[ r3 >> 8 & 0xFF ] +\n\t\tHEX_NUMBERS[ r3 >> 16 & 0xFF ] +\n\t\tHEX_NUMBERS[ r3 >> 24 & 0xFF ] +\n\t\tHEX_NUMBERS[ r4 >> 0 & 0xFF ] +\n\t\tHEX_NUMBERS[ r4 >> 8 & 0xFF ] +\n\t\tHEX_NUMBERS[ r4 >> 16 & 0xFF ] +\n\t\tHEX_NUMBERS[ r4 >> 24 & 0xFF ];\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/priorities\n */\n\n/**\n * String representing a priority value.\n *\n * @typedef {'highest'|'high'|'normal'|'low'|'lowest'} module:utils/priorities~PriorityString\n */\n\n/**\n * Provides group of constants to use instead of hardcoding numeric priority values.\n *\n * @namespace\n */\nconst priorities = {\n\t/**\n\t * Converts a string with priority name to it's numeric value. If `Number` is given, it just returns it.\n\t *\n\t * @static\n\t * @param {module:utils/priorities~PriorityString|Number} priority Priority to convert.\n\t * @returns {Number} Converted priority.\n\t */\n\tget( priority ) {\n\t\tif ( typeof priority != 'number' ) {\n\t\t\treturn this[ priority ] || this.normal;\n\t\t} else {\n\t\t\treturn priority;\n\t\t}\n\t},\n\n\thighest: 100000,\n\thigh: 1000,\n\tnormal: 0,\n\tlow: -1000,\n\tlowest: -100000\n};\n\nexport default priorities;\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/ckeditorerror\n */\n\n/* globals console */\n\n/**\n * URL to the documentation with error codes.\n */\nexport const DOCUMENTATION_URL =\n\t'https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html';\n\n/**\n * The CKEditor error class.\n *\n * You should throw `CKEditorError` when:\n *\n * * An unexpected situation occurred and the editor (most probably) will not work properly. Such exception will be handled\n * by the {@link module:watchdog/watchdog~Watchdog watchdog} (if it is integrated),\n * * If the editor is incorrectly integrated or the editor API is used in the wrong way. This way you will give\n * feedback to the developer as soon as possible. Keep in mind that for common integration issues which should not\n * stop editor initialization (like missing upload adapter, wrong name of a toolbar component) we use\n * {@link module:utils/ckeditorerror~logWarning `logWarning()`} and\n * {@link module:utils/ckeditorerror~logError `logError()`}\n * to improve developers experience and let them see the a working editor as soon as possible.\n *\n *\t\t/**\n *\t\t * Error thrown when a plugin cannot be loaded due to JavaScript errors, lack of plugins with a given name, etc.\n *\t\t *\n *\t\t * @error plugin-load\n *\t\t * @param pluginName The name of the plugin that could not be loaded.\n *\t\t * @param moduleName The name of the module which tried to load this plugin.\n *\t\t * /\n *\t\tthrow new CKEditorError( 'plugin-load', {\n *\t\t\tpluginName: 'foo',\n *\t\t\tmoduleName: 'bar'\n *\t\t} );\n *\n * @extends Error\n */\nexport default class CKEditorError extends Error {\n\t/**\n\t * Creates an instance of the CKEditorError class.\n\t *\n\t * @param {String} errorName The error id in an `error-name` format. A link to this error documentation page will be added\n\t * to the thrown error's `message`.\n\t * @param {Object|null} context A context of the error by which the {@link module:watchdog/watchdog~Watchdog watchdog}\n\t * is able to determine which editor crashed. It should be an editor instance or a property connected to it. It can be also\n\t * a `null` value if the editor should not be restarted in case of the error (e.g. during the editor initialization).\n\t * The error context should be checked using the `areConnectedThroughProperties( editor, context )` utility\n\t * to check if the object works as the context.\n\t * @param {Object} [data] Additional data describing the error. A stringified version of this object\n\t * will be appended to the error message, so the data are quickly visible in the console. The original\n\t * data object will also be later available under the {@link #data} property.\n\t */\n\tconstructor( errorName, context, data ) {\n\t\tsuper( getErrorMessage( errorName, data ) );\n\n\t\t/**\n\t\t * @type {String}\n\t\t */\n\t\tthis.name = 'CKEditorError';\n\n\t\t/**\n\t\t * A context of the error by which the Watchdog is able to determine which editor crashed.\n\t\t *\n\t\t * @type {Object|null}\n\t\t */\n\t\tthis.context = context;\n\n\t\t/**\n\t\t * The additional error data passed to the constructor. Undefined if none was passed.\n\t\t *\n\t\t * @type {Object|undefined}\n\t\t */\n\t\tthis.data = data;\n\t}\n\n\t/**\n\t * Checks if the error is of the `CKEditorError` type.\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === 'CKEditorError';\n\t}\n\n\t/**\n\t * A utility that ensures that the thrown error is a {@link module:utils/ckeditorerror~CKEditorError} one.\n\t * It is useful when combined with the {@link module:watchdog/watchdog~Watchdog} feature, which can restart the editor in case\n\t * of a {@link module:utils/ckeditorerror~CKEditorError} error.\n\t *\n\t * @static\n\t * @param {Error} err The error to rethrow.\n\t * @param {Object} context An object connected through properties with the editor instance. This context will be used\n\t * by the watchdog to verify which editor should be restarted.\n\t */\n\tstatic rethrowUnexpectedError( err, context ) {\n\t\tif ( err.is && err.is( 'CKEditorError' ) ) {\n\t\t\tthrow err;\n\t\t}\n\n\t\t/**\n\t\t * An unexpected error occurred inside the CKEditor 5 codebase. This error will look like the original one\n\t\t * to make the debugging easier.\n\t\t *\n\t\t * This error is only useful when the editor is initialized using the {@link module:watchdog/watchdog~Watchdog} feature.\n\t\t * In case of such error (or any {@link module:utils/ckeditorerror~CKEditorError} error) the watchdog should restart the editor.\n\t\t *\n\t\t * @error unexpected-error\n\t\t */\n\t\tconst error = new CKEditorError( err.message, context );\n\n\t\t// Restore the original stack trace to make the error look like the original one.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/5595 for more details.\n\t\terror.stack = err.stack;\n\n\t\tthrow error;\n\t}\n}\n\n/**\n * Logs a warning to the console with a properly formatted message and adds a link to the documentation.\n * Use whenever you want to log a warning to the console.\n *\n *\t\t/**\n *\t\t * There was a problem processing the configuration of the toolbar. The item with the given\n *\t\t * name does not exist, so it was omitted when rendering the toolbar.\n *\t\t *\n *\t\t * @error toolbarview-item-unavailable\n *\t\t * @param {String} name The name of the component.\n *\t\t * /\n *\t\tlogWarning( 'toolbarview-item-unavailable', { name } );\n *\n * See also {@link module:utils/ckeditorerror~CKEditorError} for an explanation when to throw an error and when to log\n * a warning or an error to the console.\n *\n * @param {String} errorName The error name to be logged.\n * @param {Object} [data] Additional data to be logged.\n */\nexport function logWarning( errorName, data ) {\n\tconsole.warn( ...formatConsoleArguments( errorName, data ) );\n}\n\n/**\n * Logs an error to the console with a properly formatted message and adds a link to the documentation.\n * Use whenever you want to log an error to the console.\n *\n *\t\t/**\n *\t\t * There was a problem processing the configuration of the toolbar. The item with the given\n *\t\t * name does not exist, so it was omitted when rendering the toolbar.\n *\t\t *\n *\t\t * @error toolbarview-item-unavailable\n *\t\t * @param {String} name The name of the component.\n *\t\t * /\n *\t\t logError( 'toolbarview-item-unavailable', { name } );\n *\n * **Note**: In most cases logging a warning using {@link module:utils/ckeditorerror~logWarning} is enough.\n *\n * See also {@link module:utils/ckeditorerror~CKEditorError} for an explanation when to use each method.\n *\n * @param {String} errorName The error name to be logged.\n * @param {Object} [data] Additional data to be logged.\n */\nexport function logError( errorName, data ) {\n\tconsole.error( ...formatConsoleArguments( errorName, data ) );\n}\n\n// Returns formatted link to documentation message.\n//\n// @private\n// @param {String} errorName\n// @returns {string}\nfunction getLinkToDocumentationMessage( errorName ) {\n\treturn `\\nRead more: ${ DOCUMENTATION_URL }#error-${ errorName }`;\n}\n\n// Returns formatted error message.\n//\n// @private\n// @param {String} errorName\n// @param {Object} [data]\n// @returns {string}\nfunction getErrorMessage( errorName, data ) {\n\tconst processedObjects = new WeakSet();\n\tconst circularReferencesReplacer = ( key, value ) => {\n\t\tif ( typeof value === 'object' && value !== null ) {\n\t\t\tif ( processedObjects.has( value ) ) {\n\t\t\t\treturn `[object ${ value.constructor.name }]`;\n\t\t\t}\n\n\t\t\tprocessedObjects.add( value );\n\t\t}\n\n\t\treturn value;\n\t};\n\n\tconst stringifiedData = data ? ` ${ JSON.stringify( data, circularReferencesReplacer ) }` : '';\n\tconst documentationLink = getLinkToDocumentationMessage( errorName );\n\n\treturn errorName + stringifiedData + documentationLink;\n}\n\n// Returns formatted console error arguments.\n//\n// @private\n// @param {String} errorName\n// @param {Object} [data]\n// @returns {Array}\nfunction formatConsoleArguments( errorName, data ) {\n\tconst documentationMessage = getLinkToDocumentationMessage( errorName );\n\n\treturn data ? [ errorName, data, documentationMessage ] : [ errorName, documentationMessage ];\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/version\n */\n\n/* globals window, global */\n\nimport CKEditorError from './ckeditorerror';\n\nconst version = '33.0.0';\n\nexport default version;\n\n/* istanbul ignore next */\nconst windowOrGlobal = typeof window === 'object' ? window : global;\n\n/* istanbul ignore next */\nif ( windowOrGlobal.CKEDITOR_VERSION ) {\n\t/**\n\t * This error is thrown when due to a mistake in how CKEditor 5 was installed or initialized, some\n\t * of its modules were duplicated (evaluated and executed twice). Module duplication leads to inevitable runtime\n\t * errors.\n\t *\n\t * There are many situations in which some modules can be loaded twice. In the worst case scenario,\n\t * you may need to check your project for each of these issues and fix them all.\n\t *\n\t * # Trying to add a plugin to an existing build\n\t *\n\t * If you import an existing CKEditor 5 build and a plugin like this:\n\t *\n\t *\t\timport ClassicEditor from '@ckeditor/ckeditor5-build-classic';\n\t *\t\timport Highlight from '@ckeditor/ckeditor5-highlight/src/highlight';\n\t *\n\t * Then your project loads some CKEditor 5 packages twice. How does it happen?\n\t *\n\t * The build package contains a file which is already compiled with webpack. This means\n\t * that it contains all the necessary code from e.g. `@ckeditor/ckeditor5-engine` and `@ckeditor/ckeditor5-utils`.\n\t *\n\t * However, the `Highlight` plugin imports some of the modules from these packages, too. If you ask webpack to\n\t * build such a project, you will end up with the modules being included (and run) twice &mdash; first, because they are\n\t * included inside the build package, and second, because they are required by the `Highlight` plugin.\n\t *\n\t * Therefore, **you must never add plugins to an existing build** unless your plugin has no dependencies.\n\t *\n\t * Adding plugins to a build is done by taking the source version of this build (so, before it was built with webpack)\n\t * and adding plugins there. In this situation, webpack will know that it only needs to load each plugin once.\n\t *\n\t * Read more in the {@glink installation/getting-started/installing-plugins \"Installing plugins\"} guide.\n\t *\n\t * # Confused an editor build with an editor implementation\n\t *\n\t * This scenario is very similar to the previous one, but has a different origin.\n\t *\n\t * Let's assume that you wanted to use CKEditor 5 from source, as explained in the\n\t * {@glink installation/advanced/alternative-setups/integrating-from-source \"Building from source\"} section\n\t * or in the {@glink framework/guides/quick-start \"Quick start\"} guide of CKEditor 5 Framework.\n\t *\n\t * The correct way to do so is to import an editor and plugins and run them together like this:\n\t *\n\t *\t\timport ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';\n\t *\t\timport Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';\n\t *\t\timport Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';\n\t *\t\timport Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';\n\t *\t\timport Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';\n\t *\n\t *\t\tClassicEditor\n\t *\t\t\t.create( document.querySelector( '#editor' ), {\n\t *\t\t\t\tplugins: [ Essentials, Paragraph, Bold, Italic ],\n\t *\t\t\t\ttoolbar: [ 'bold', 'italic' ]\n\t *\t\t\t} )\n\t *\t\t\t.then( editor => {\n\t *\t\t\t\tconsole.log( 'Editor was initialized', editor );\n\t *\t\t\t} )\n\t *\t\t\t.catch( error => {\n\t *\t\t\t\tconsole.error( error.stack );\n\t *\t\t\t} );\n\t *\n\t * However, you might have mistakenly imported a build instead of the source `ClassicEditor`. In this case\n\t * your imports will look like this:\n\t *\n\t *\t\timport ClassicEditor from '@ckeditor/ckeditor5-build-classic';\n\t *\t\timport Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';\n\t *\t\timport Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';\n\t *\t\timport Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';\n\t *\t\timport Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';\n\t *\n\t * This creates the same situation as in the previous section because you use a build together with source plugins.\n\t *\n\t * Remember: `@ckeditor/ckeditor5-build-*` packages contain editor builds and `@ckeditor/ckeditor5-editor-*` contain source editors.\n\t *\n\t * # Loading two or more builds on one page\n\t *\n\t * If you use CKEditor 5 builds, you might have loaded two (or more) `ckeditor.js` files on one web page.\n\t * Check your web page for duplicated `<script>` elements or make sure your page builder/bundler includes CKEditor only once.\n\t *\n\t * If you want to use two different types of editors at once, see the\n\t * {@glink installation/advanced/using-two-editors \"Using two different editors\"}\n\t * section.\n\t *\n\t * # Using outdated packages\n\t *\n\t * Building CKEditor 5 from source requires using multiple npm packages. These packages have their dependencies\n\t * to other packages. If you use the latest version of, for example, `@ckeditor/ckeditor5-editor-classic` with\n\t * an outdated version of `@ckeditor/ckeditor5-image`, npm or yarn will need to install two different versions of\n\t * `@ckeditor/ckeditor5-core` because `@ckeditor/ckeditor5-editor-classic` and `@ckeditor/ckeditor5-image` may require\n\t * different versions of the core package.\n\t *\n\t * The solution to this issue is to update all packages to their latest version. We recommend\n\t * using tools like [`npm-check-updates`](https://www.npmjs.com/package/npm-check-updates) which simplify this process.\n\t *\n\t * # Conflicting version of dependencies\n\t *\n\t * This is a special case of the previous scenario. If you use CKEditor 5 with some third-party plugins,\n\t * it may happen that even if you use the latest versions of the official packages and the latest version of\n\t * these third-party packages, there will be a conflict between some of their dependencies.\n\t *\n\t * Such a problem can be resolved by either downgrading CKEditor 5 packages (which we do not recommend) or\n\t * asking the author of the third-party package to upgrade its depdendencies (or forking their project and doing this yourself).\n\t *\n\t * **Note:** All official CKEditor 5 packages (excluding integrations and `ckeditor5-dev-*` packages) are released in the\n\t * same major version. This is &mdash; in the `x.y.z`, the `x` is the same for all packages. This is the simplest way to check\n\t * whether you use packages coming from the same CKEditor 5 version. You can read more about versioning in the\n\t * {@glink support/versioning-policy Versioning policy} guide.\n\t *\n\t * # Packages were duplicated in `node_modules`\n\t *\n\t * In some situations, especially when calling `npm install` multiple times, it may happen\n\t * that npm will not correctly \"deduplicate\" packages.\n\t *\n\t * Normally, npm deduplicates all packages so, for example, `@ckeditor/ckeditor5-core` is installed only once in `node_modules/`.\n\t * However, it is known to fail to do so from time to time.\n\t *\n\t * We recommend checking if any of the steps listed below help:\n\t *\n\t * * `rm -rf node_modules && npm install` to make sure you have a clean `node_modules/` directory. This step\n\t * is known to help in most cases.\n\t * * If you use `yarn.lock` or `package-lock.json`, remove it before `npm install`.\n\t * * Check whether all CKEditor 5 packages are up to date and reinstall them\n\t * if you changed anything (`rm -rf node_modules && npm install`).\n\t *\n\t * If all packages are correct and compatible with each other, the steps above are known to help. If not, you may\n\t * try to check with `npm ls` how many times packages like `@ckeditor/ckeditor5-core`, `@ckeditor/ckeditor5-engine` and\n\t *`@ckeditor/ckeditor5-utils` are installed. If more than once, verify which package causes that.\n\t *\n\t * @error ckeditor-duplicated-modules\n\t */\n\tthrow new CKEditorError(\n\t\t'ckeditor-duplicated-modules',\n\t\tnull\n\t);\n} else {\n\twindowOrGlobal.CKEDITOR_VERSION = version;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/emittermixin\n */\n\nimport EventInfo from './eventinfo';\nimport uid from './uid';\nimport priorities from './priorities';\n\n// To check if component is loaded more than once.\nimport './version';\nimport CKEditorError from './ckeditorerror';\n\nconst _listeningTo = Symbol( 'listeningTo' );\nconst _emitterId = Symbol( 'emitterId' );\n\n/**\n * Mixin that injects the {@link ~Emitter events API} into its host.\n *\n * Read more about the concept of emitters in the:\n * * {@glink framework/guides/architecture/core-editor-architecture#event-system-and-observables Event system and observables}\n * section of the {@glink framework/guides/architecture/core-editor-architecture Core editor architecture} guide.\n * * {@glink framework/guides/deep-dive/event-system Event system} deep dive guide.\n *\n * @mixin EmitterMixin\n * @implements module:utils/emittermixin~Emitter\n */\nconst EmitterMixin = {\n\t/**\n\t * @inheritDoc\n\t */\n\ton( event, callback, options = {} ) {\n\t\tthis.listenTo( this, event, callback, options );\n\t},\n\n\t/**\n\t * @inheritDoc\n\t */\n\tonce( event, callback, options ) {\n\t\tlet wasFired = false;\n\n\t\tconst onceCallback = function( event, ...args ) {\n\t\t\t// Ensure the callback is called only once even if the callback itself leads to re-firing the event\n\t\t\t// (which would call the callback again).\n\t\t\tif ( !wasFired ) {\n\t\t\t\twasFired = true;\n\n\t\t\t\t// Go off() at the first call.\n\t\t\t\tevent.off();\n\n\t\t\t\t// Go with the original callback.\n\t\t\t\tcallback.call( this, event, ...args );\n\t\t\t}\n\t\t};\n\n\t\t// Make a similar on() call, simply replacing the callback.\n\t\tthis.listenTo( this, event, onceCallback, options );\n\t},\n\n\t/**\n\t * @inheritDoc\n\t */\n\toff( event, callback ) {\n\t\tthis.stopListening( this, event, callback );\n\t},\n\n\t/**\n\t * @inheritDoc\n\t */\n\tlistenTo( emitter, event, callback, options = {} ) {\n\t\tlet emitterInfo, eventCallbacks;\n\n\t\t// _listeningTo contains a list of emitters that this object is listening to.\n\t\t// This list has the following format:\n\t\t//\n\t\t// _listeningTo: {\n\t\t// emitterId: {\n\t\t// emitter: emitter,\n\t\t// callbacks: {\n\t\t// event1: [ callback1, callback2, ... ]\n\t\t// ....\n\t\t// }\n\t\t// },\n\t\t// ...\n\t\t// }\n\n\t\tif ( !this[ _listeningTo ] ) {\n\t\t\tthis[ _listeningTo ] = {};\n\t\t}\n\n\t\tconst emitters = this[ _listeningTo ];\n\n\t\tif ( !_getEmitterId( emitter ) ) {\n\t\t\t_setEmitterId( emitter );\n\t\t}\n\n\t\tconst emitterId = _getEmitterId( emitter );\n\n\t\tif ( !( emitterInfo = emitters[ emitterId ] ) ) {\n\t\t\temitterInfo = emitters[ emitterId ] = {\n\t\t\t\temitter,\n\t\t\t\tcallbacks: {}\n\t\t\t};\n\t\t}\n\n\t\tif ( !( eventCallbacks = emitterInfo.callbacks[ event ] ) ) {\n\t\t\teventCallbacks = emitterInfo.callbacks[ event ] = [];\n\t\t}\n\n\t\teventCallbacks.push( callback );\n\n\t\t// Finally register the callback to the event.\n\t\taddEventListener( this, emitter, event, callback, options );\n\t},\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstopListening( emitter, event, callback ) {\n\t\tconst emitters = this[ _listeningTo ];\n\t\tlet emitterId = emitter && _getEmitterId( emitter );\n\t\tconst emitterInfo = emitters && emitterId && emitters[ emitterId ];\n\t\tconst eventCallbacks = emitterInfo && event && emitterInfo.callbacks[ event ];\n\n\t\t// Stop if nothing has been listened.\n\t\tif ( !emitters || ( emitter && !emitterInfo ) || ( event && !eventCallbacks ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// All params provided. off() that single callback.\n\t\tif ( callback ) {\n\t\t\tremoveEventListener( this, emitter, event, callback );\n\n\t\t\t// We must remove callbacks as well in order to prevent memory leaks.\n\t\t\t// See https://github.com/ckeditor/ckeditor5/pull/8480\n\t\t\tconst index = eventCallbacks.indexOf( callback );\n\n\t\t\tif ( index !== -1 ) {\n\t\t\t\tif ( eventCallbacks.length === 1 ) {\n\t\t\t\t\tdelete emitterInfo.callbacks[ event ];\n\t\t\t\t} else {\n\t\t\t\t\tremoveEventListener( this, emitter, event, callback );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Only `emitter` and `event` provided. off() all callbacks for that event.\n\t\telse if ( eventCallbacks ) {\n\t\t\twhile ( ( callback = eventCallbacks.pop() ) ) {\n\t\t\t\tremoveEventListener( this, emitter, event, callback );\n\t\t\t}\n\n\t\t\tdelete emitterInfo.callbacks[ event ];\n\t\t}\n\t\t// Only `emitter` provided. off() all events for that emitter.\n\t\telse if ( emitterInfo ) {\n\t\t\tfor ( event in emitterInfo.callbacks ) {\n\t\t\t\tthis.stopListening( emitter, event );\n\t\t\t}\n\t\t\tdelete emitters[ emitterId ];\n\t\t}\n\t\t// No params provided. off() all emitters.\n\t\telse {\n\t\t\tfor ( emitterId in emitters ) {\n\t\t\t\tthis.stopListening( emitters[ emitterId ].emitter );\n\t\t\t}\n\t\t\tdelete this[ _listeningTo ];\n\t\t}\n\t},\n\n\t/**\n\t * @inheritDoc\n\t */\n\tfire( eventOrInfo, ...args ) {\n\t\ttry {\n\t\t\tconst eventInfo = eventOrInfo instanceof EventInfo ? eventOrInfo : new EventInfo( this, eventOrInfo );\n\t\t\tconst event = eventInfo.name;\n\t\t\tlet callbacks = getCallbacksForEvent( this, event );\n\n\t\t\t// Record that the event passed this emitter on its path.\n\t\t\teventInfo.path.push( this );\n\n\t\t\t// Handle event listener callbacks first.\n\t\t\tif ( callbacks ) {\n\t\t\t\t// Arguments passed to each callback.\n\t\t\t\tconst callbackArgs = [ eventInfo, ...args ];\n\n\t\t\t\t// Copying callbacks array is the easiest and most secure way of preventing infinite loops, when event callbacks\n\t\t\t\t// are added while processing other callbacks. Previous solution involved adding counters (unique ids) but\n\t\t\t\t// failed if callbacks were added to the queue before currently processed callback.\n\t\t\t\t// If this proves to be too inefficient, another method is to change `.on()` so callbacks are stored if same\n\t\t\t\t// event is currently processed. Then, `.fire()` at the end, would have to add all stored events.\n\t\t\t\tcallbacks = Array.from( callbacks );\n\n\t\t\t\tfor ( let i = 0; i < callbacks.length; i++ ) {\n\t\t\t\t\tcallbacks[ i ].callback.apply( this, callbackArgs );\n\n\t\t\t\t\t// Remove the callback from future requests if off() has been called.\n\t\t\t\t\tif ( eventInfo.off.called ) {\n\t\t\t\t\t\t// Remove the called mark for the next calls.\n\t\t\t\t\t\tdelete eventInfo.off.called;\n\n\t\t\t\t\t\tthis._removeEventListener( event, callbacks[ i ].callback );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Do not execute next callbacks if stop() was called.\n\t\t\t\t\tif ( eventInfo.stop.called ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Delegate event to other emitters if needed.\n\t\t\tif ( this._delegations ) {\n\t\t\t\tconst destinations = this._delegations.get( event );\n\t\t\t\tconst passAllDestinations = this._delegations.get( '*' );\n\n\t\t\t\tif ( destinations ) {\n\t\t\t\t\tfireDelegatedEvents( destinations, eventInfo, args );\n\t\t\t\t}\n\n\t\t\t\tif ( passAllDestinations ) {\n\t\t\t\t\tfireDelegatedEvents( passAllDestinations, eventInfo, args );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn eventInfo.return;\n\t\t} catch ( err ) {\n\t\t\t// @if CK_DEBUG // throw err;\n\t\t\t/* istanbul ignore next */\n\t\t\tCKEditorError.rethrowUnexpectedError( err, this );\n\t\t}\n\t},\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdelegate( ...events ) {\n\t\treturn {\n\t\t\tto: ( emitter, nameOrFunction ) => {\n\t\t\t\tif ( !this._delegations ) {\n\t\t\t\t\tthis._delegations = new Map();\n\t\t\t\t}\n\n\t\t\t\t// Originally there was a for..of loop which unfortunately caused an error in Babel that didn't allow\n\t\t\t\t// build an application. See: https://github.com/ckeditor/ckeditor5-react/issues/40.\n\t\t\t\tevents.forEach( eventName => {\n\t\t\t\t\tconst destinations = this._delegations.get( eventName );\n\n\t\t\t\t\tif ( !destinations ) {\n\t\t\t\t\t\tthis._delegations.set( eventName, new Map( [ [ emitter, nameOrFunction ] ] ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdestinations.set( emitter, nameOrFunction );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t};\n\t},\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstopDelegating( event, emitter ) {\n\t\tif ( !this._delegations ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !event ) {\n\t\t\tthis._delegations.clear();\n\t\t} else if ( !emitter ) {\n\t\t\tthis._delegations.delete( event );\n\t\t} else {\n\t\t\tconst destinations = this._delegations.get( event );\n\n\t\t\tif ( destinations ) {\n\t\t\t\tdestinations.delete( emitter );\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_addEventListener( event, callback, options ) {\n\t\tcreateEventNamespace( this, event );\n\n\t\tconst lists = getCallbacksListsForNamespace( this, event );\n\t\tconst priority = priorities.get( options.priority );\n\n\t\tconst callbackDefinition = {\n\t\t\tcallback,\n\t\t\tpriority\n\t\t};\n\n\t\t// Add the callback to all callbacks list.\n\t\tfor ( const callbacks of lists ) {\n\t\t\t// Add the callback to the list in the right priority position.\n\t\t\tlet added = false;\n\n\t\t\tfor ( let i = 0; i < callbacks.length; i++ ) {\n\t\t\t\tif ( callbacks[ i ].priority < priority ) {\n\t\t\t\t\tcallbacks.splice( i, 0, callbackDefinition );\n\t\t\t\t\tadded = true;\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add at the end, if right place was not found.\n\t\t\tif ( !added ) {\n\t\t\t\tcallbacks.push( callbackDefinition );\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_removeEventListener( event, callback ) {\n\t\tconst lists = getCallbacksListsForNamespace( this, event );\n\n\t\tfor ( const callbacks of lists ) {\n\t\t\tfor ( let i = 0; i < callbacks.length; i++ ) {\n\t\t\t\tif ( callbacks[ i ].callback == callback ) {\n\t\t\t\t\t// Remove the callback from the list (fixing the next index).\n\t\t\t\t\tcallbacks.splice( i, 1 );\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nexport default EmitterMixin;\n\n/**\n * Emitter/listener interface.\n *\n * Can be easily implemented by a class by mixing the {@link module:utils/emittermixin~EmitterMixin} mixin.\n *\n * Read more about the usage of this interface in the:\n * * {@glink framework/guides/architecture/core-editor-architecture#event-system-and-observables Event system and observables}\n * section of the {@glink framework/guides/architecture/core-editor-architecture Core editor architecture} guide.\n * * {@glink framework/guides/deep-dive/event-system Event system} deep dive guide.\n *\n * @interface Emitter\n */\n\n/**\n * Registers a callback function to be executed when an event is fired.\n *\n * Shorthand for {@link #listenTo `this.listenTo( this, event, callback, options )`} (it makes the emitter\n * listen on itself).\n *\n * @method #on\n * @param {String} event The name of the event.\n * @param {Function} callback The function to be called on event.\n * @param {Object} [options={}] Additional options.\n * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of this event callback. The higher\n * the priority value the sooner the callback will be fired. Events having the same priority are called in the\n * order they were added.\n */\n\n/**\n * Registers a callback function to be executed on the next time the event is fired only. This is similar to\n * calling {@link #on} followed by {@link #off} in the callback.\n *\n * @method #once\n * @param {String} event The name of the event.\n * @param {Function} callback The function to be called on event.\n * @param {Object} [options={}] Additional options.\n * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of this event callback. The higher\n * the priority value the sooner the callback will be fired. Events having the same priority are called in the\n * order they were added.\n */\n\n/**\n * Stops executing the callback on the given event.\n * Shorthand for {@link #stopListening `this.stopListening( this, event, callback )`}.\n *\n * @method #off\n * @param {String} event The name of the event.\n * @param {Function} callback The function to stop being called.\n */\n\n/**\n * Registers a callback function to be executed when an event is fired in a specific (emitter) object.\n *\n * Events can be grouped in namespaces using `:`.\n * When namespaced event is fired, it additionally fires all callbacks for that namespace.\n *\n *\t\t// myEmitter.on( ... ) is a shorthand for myEmitter.listenTo( myEmitter, ... ).\n *\t\tmyEmitter.on( 'myGroup', genericCallback );\n *\t\tmyEmitter.on( 'myGroup:myEvent', specificCallback );\n *\n *\t\t// genericCallback is fired.\n *\t\tmyEmitter.fire( 'myGroup' );\n *\t\t// both genericCallback and specificCallback are fired.\n *\t\tmyEmitter.fire( 'myGroup:myEvent' );\n *\t\t// genericCallback is fired even though there are no callbacks for \"foo\".\n *\t\tmyEmitter.fire( 'myGroup:foo' );\n *\n * An event callback can {@link module:utils/eventinfo~EventInfo#stop stop the event} and\n * set the {@link module:utils/eventinfo~EventInfo#return return value} of the {@link #fire} method.\n *\n * @method #listenTo\n * @param {module:utils/emittermixin~Emitter} emitter The object that fires the event.\n * @param {String} event The name of the event.\n * @param {Function} callback The function to be called on event.\n * @param {Object} [options={}] Additional options.\n * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of this event callback. The higher\n * the priority value the sooner the callback will be fired. Events having the same priority are called in the\n * order they were added.\n */\n\n/**\n * Stops listening for events. It can be used at different levels:\n *\n * * To stop listening to a specific callback.\n * * To stop listening to a specific event.\n * * To stop listening to all events fired by a specific object.\n * * To stop listening to all events fired by all objects.\n *\n * @method #stopListening\n * @param {module:utils/emittermixin~Emitter} [emitter] The object to stop listening to. If omitted, stops it for all objects.\n * @param {String} [event] (Requires the `emitter`) The name of the event to stop listening to. If omitted, stops it\n * for all events from `emitter`.\n * @param {Function} [callback] (Requires the `event`) The function to be removed from the call list for the given\n * `event`.\n */\n\n/**\n * Fires an event, executing all callbacks registered for it.\n *\n * The first parameter passed to callbacks is an {@link module:utils/eventinfo~EventInfo} object,\n * followed by the optional `args` provided in the `fire()` method call.\n *\n * @method #fire\n * @param {String|module:utils/eventinfo~EventInfo} eventOrInfo The name of the event or `EventInfo` object if event is delegated.\n * @param {...*} [args] Additional arguments to be passed to the callbacks.\n * @returns {*} By default the method returns `undefined`. However, the return value can be changed by listeners\n * through modification of the {@link module:utils/eventinfo~EventInfo#return `evt.return`}'s property (the event info\n * is the first param of every callback).\n */\n\n/**\n * Delegates selected events to another {@link module:utils/emittermixin~Emitter}. For instance:\n *\n *\t\temitterA.delegate( 'eventX' ).to( emitterB );\n *\t\temitterA.delegate( 'eventX', 'eventY' ).to( emitterC );\n *\n * then `eventX` is delegated (fired by) `emitterB` and `emitterC` along with `data`:\n *\n *\t\temitterA.fire( 'eventX', data );\n *\n * and `eventY` is delegated (fired by) `emitterC` along with `data`:\n *\n *\t\temitterA.fire( 'eventY', data );\n *\n * @method #delegate\n * @param {...String} events Event names that will be delegated to another emitter.\n * @returns {module:utils/emittermixin~EmitterMixinDelegateChain}\n */\n\n/**\n * Stops delegating events. It can be used at different levels:\n *\n * * To stop delegating all events.\n * * To stop delegating a specific event to all emitters.\n * * To stop delegating a specific event to a specific emitter.\n *\n * @method #stopDelegating\n * @param {String} [event] The name of the event to stop delegating. If omitted, stops it all delegations.\n * @param {module:utils/emittermixin~Emitter} [emitter] (requires `event`) The object to stop delegating a particular event to.\n * If omitted, stops delegation of `event` to all emitters.\n */\n\n/**\n * Adds callback to emitter for given event.\n *\n * @protected\n * @method #_addEventListener\n * @param {String} event The name of the event.\n * @param {Function} callback The function to be called on event.\n * @param {Object} [options={}] Additional options.\n * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of this event callback. The higher\n * the priority value the sooner the callback will be fired. Events having the same priority are called in the\n * order they were added.\n */\n\n/**\n * Removes callback from emitter for given event.\n *\n * @protected\n * @method #_removeEventListener\n * @param {String} event The name of the event.\n * @param {Function} callback The function to stop being called.\n */\n\n/**\n * Checks if `listeningEmitter` listens to an emitter with given `listenedToEmitterId` and if so, returns that emitter.\n * If not, returns `null`.\n *\n * @protected\n * @param {module:utils/emittermixin~Emitter} listeningEmitter An emitter that listens.\n * @param {String} listenedToEmitterId Unique emitter id of emitter listened to.\n * @returns {module:utils/emittermixin~Emitter|null}\n */\nexport function _getEmitterListenedTo( listeningEmitter, listenedToEmitterId ) {\n\tif ( listeningEmitter[ _listeningTo ] && listeningEmitter[ _listeningTo ][ listenedToEmitterId ] ) {\n\t\treturn listeningEmitter[ _listeningTo ][ listenedToEmitterId ].emitter;\n\t}\n\n\treturn null;\n}\n\n/**\n * Sets emitter's unique id.\n *\n * **Note:** `_emitterId` can be set only once.\n *\n * @protected\n * @param {module:utils/emittermixin~Emitter} emitter An emitter for which id will be set.\n * @param {String} [id] Unique id to set. If not passed, random unique id will be set.\n */\nexport function _setEmitterId( emitter, id ) {\n\tif ( !emitter[ _emitterId ] ) {\n\t\temitter[ _emitterId ] = id || uid();\n\t}\n}\n\n/**\n * Returns emitter's unique id.\n *\n * @protected\n * @param {module:utils/emittermixin~Emitter} emitter An emitter which id will be returned.\n */\nexport function _getEmitterId( emitter ) {\n\treturn emitter[ _emitterId ];\n}\n\n// Gets the internal `_events` property of the given object.\n// `_events` property store all lists with callbacks for registered event names.\n// If there were no events registered on the object, empty `_events` object is created.\nfunction getEvents( source ) {\n\tif ( !source._events ) {\n\t\tObject.defineProperty( source, '_events', {\n\t\t\tvalue: {}\n\t\t} );\n\t}\n\n\treturn source._events;\n}\n\n// Creates event node for generic-specific events relation architecture.\nfunction makeEventNode() {\n\treturn {\n\t\tcallbacks: [],\n\t\tchildEvents: []\n\t};\n}\n\n// Creates an architecture for generic-specific events relation.\n// If needed, creates all events for given eventName, i.e. if the first registered event\n// is foo:bar:abc, it will create foo:bar:abc, foo:bar and foo event and tie them together.\n// It also copies callbacks from more generic events to more specific events when\n// specific events are created.\nfunction createEventNamespace( source, eventName ) {\n\tconst events = getEvents( source );\n\n\t// First, check if the event we want to add to the structure already exists.\n\tif ( events[ eventName ] ) {\n\t\t// If it exists, we don't have to do anything.\n\t\treturn;\n\t}\n\n\t// In other case, we have to create the structure for the event.\n\t// Note, that we might need to create intermediate events too.\n\t// I.e. if foo:bar:abc is being registered and we only have foo in the structure,\n\t// we need to also register foo:bar.\n\n\t// Currently processed event name.\n\tlet name = eventName;\n\t// Name of the event that is a child event for currently processed event.\n\tlet childEventName = null;\n\n\t// Array containing all newly created specific events.\n\tconst newEventNodes = [];\n\n\t// While loop can't check for ':' index because we have to handle generic events too.\n\t// In each loop, we truncate event name, going from the most specific name to the generic one.\n\t// I.e. foo:bar:abc -> foo:bar -> foo.\n\twhile ( name !== '' ) {\n\t\tif ( events[ name ] ) {\n\t\t\t// If the currently processed event name is already registered, we can be sure\n\t\t\t// that it already has all the structure created, so we can break the loop here\n\t\t\t// as no more events need to be registered.\n\t\t\tbreak;\n\t\t}\n\n\t\t// If this event is not yet registered, create a new object for it.\n\t\tevents[ name ] = makeEventNode();\n\t\t// Add it to the array with newly created events.\n\t\tnewEventNodes.push( events[ name ] );\n\n\t\t// Add previously processed event name as a child of this event.\n\t\tif ( childEventName ) {\n\t\t\tevents[ name ].childEvents.push( childEventName );\n\t\t}\n\n\t\tchildEventName = name;\n\t\t// If `.lastIndexOf()` returns -1, `.substr()` will return '' which will break the loop.\n\t\tname = name.substr( 0, name.lastIndexOf( ':' ) );\n\t}\n\n\tif ( name !== '' ) {\n\t\t// If name is not empty, we found an already registered event that was a parent of the\n\t\t// event we wanted to register.\n\n\t\t// Copy that event's callbacks to newly registered events.\n\t\tfor ( const node of newEventNodes ) {\n\t\t\tnode.callbacks = events[ name ].callbacks.slice();\n\t\t}\n\n\t\t// Add last newly created event to the already registered event.\n\t\tevents[ name ].childEvents.push( childEventName );\n\t}\n}\n\n// Gets an array containing callbacks list for a given event and it's more specific events.\n// I.e. if given event is foo:bar and there is also foo:bar:abc event registered, this will\n// return callback list of foo:bar and foo:bar:abc (but not foo).\nfunction getCallbacksListsForNamespace( source, eventName ) {\n\tconst eventNode = getEvents( source )[ eventName ];\n\n\tif ( !eventNode ) {\n\t\treturn [];\n\t}\n\n\tlet callbacksLists = [ eventNode.callbacks ];\n\n\tfor ( let i = 0; i < eventNode.childEvents.length; i++ ) {\n\t\tconst childCallbacksLists = getCallbacksListsForNamespace( source, eventNode.childEvents[ i ] );\n\n\t\tcallbacksLists = callbacksLists.concat( childCallbacksLists );\n\t}\n\n\treturn callbacksLists;\n}\n\n// Get the list of callbacks for a given event, but only if there any callbacks have been registered.\n// If there are no callbacks registered for given event, it checks if this is a specific event and looks\n// for callbacks for it's more generic version.\nfunction getCallbacksForEvent( source, eventName ) {\n\tlet event;\n\n\tif ( !source._events || !( event = source._events[ eventName ] ) || !event.callbacks.length ) {\n\t\t// There are no callbacks registered for specified eventName.\n\t\t// But this could be a specific-type event that is in a namespace.\n\t\tif ( eventName.indexOf( ':' ) > -1 ) {\n\t\t\t// If the eventName is specific, try to find callback lists for more generic event.\n\t\t\treturn getCallbacksForEvent( source, eventName.substr( 0, eventName.lastIndexOf( ':' ) ) );\n\t\t} else {\n\t\t\t// If this is a top-level generic event, return null;\n\t\t\treturn null;\n\t\t}\n\t}\n\n\treturn event.callbacks;\n}\n\n// Fires delegated events for given map of destinations.\n//\n// @private\n// * @param {Map.<utils.Emitter>} destinations A map containing\n// `[ {@link module:utils/emittermixin~Emitter}, \"event name\" ]` pair destinations.\n// * @param {utils.EventInfo} eventInfo The original event info object.\n// * @param {Array.<*>} fireArgs Arguments the original event was fired with.\nfunction fireDelegatedEvents( destinations, eventInfo, fireArgs ) {\n\tfor ( let [ emitter, name ] of destinations ) {\n\t\tif ( !name ) {\n\t\t\tname = eventInfo.name;\n\t\t} else if ( typeof name == 'function' ) {\n\t\t\tname = name( eventInfo.name );\n\t\t}\n\n\t\tconst delegatedInfo = new EventInfo( eventInfo.source, name );\n\n\t\tdelegatedInfo.path = [ ...eventInfo.path ];\n\n\t\temitter.fire( delegatedInfo, ...fireArgs );\n\t}\n}\n\n// Helper for registering event callback on the emitter.\nfunction addEventListener( listener, emitter, event, callback, options ) {\n\tif ( emitter._addEventListener ) {\n\t\temitter._addEventListener( event, callback, options );\n\t} else {\n\t\t// Allow listening on objects that do not implement Emitter interface.\n\t\t// This is needed in some tests that are using mocks instead of the real objects with EmitterMixin mixed.\n\t\tlistener._addEventListener.call( emitter, event, callback, options );\n\t}\n}\n\n// Helper for removing event callback from the emitter.\nfunction removeEventListener( listener, emitter, event, callback ) {\n\tif ( emitter._removeEventListener ) {\n\t\temitter._removeEventListener( event, callback );\n\t} else {\n\t\t// Allow listening on objects that do not implement Emitter interface.\n\t\t// This is needed in some tests that are using mocks instead of the real objects with EmitterMixin mixed.\n\t\tlistener._removeEventListener.call( emitter, event, callback );\n\t}\n}\n\n/**\n * The return value of {@link ~EmitterMixin#delegate}.\n *\n * @interface module:utils/emittermixin~EmitterMixinDelegateChain\n */\n\n/**\n * Selects destination for {@link module:utils/emittermixin~EmitterMixin#delegate} events.\n *\n * @method #to\n * @param {module:utils/emittermixin~Emitter} emitter An `EmitterMixin` instance which is the destination for delegated events.\n * @param {String|Function} [nameOrFunction] A custom event name or function which converts the original name string.\n */\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n","import baseGetTag from './_baseGetTag.js';\nimport isObject from './isObject.js';\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nexport default isFunction;\n","import root from './_root.js';\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nexport default coreJsData;\n","import coreJsData from './_coreJsData.js';\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nexport default isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nexport default toSource;\n","import isFunction from './isFunction.js';\nimport isMasked from './_isMasked.js';\nimport isObject from './isObject.js';\nimport toSource from './_toSource.js';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nexport default baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nexport default getValue;\n","import baseIsNative from './_baseIsNative.js';\nimport getValue from './_getValue.js';\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nexport default getNative;\n","import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nexport default defineProperty;\n","import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nexport default baseAssignValue;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nexport default eq;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignValue;\n","import assignValue from './_assignValue.js';\nimport baseAssignValue from './_baseAssignValue.js';\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nexport default copyObject;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nexport default identity;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nexport default apply;\n","import apply from './_apply.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nexport default overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nexport default constant;\n","import constant from './constant.js';\nimport defineProperty from './_defineProperty.js';\nimport identity from './identity.js';\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nexport default baseSetToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nexport default shortOut;\n","import baseSetToString from './_baseSetToString.js';\nimport shortOut from './_shortOut.js';\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nexport default setToString;\n","import identity from './identity.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nexport default baseRest;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nexport default isLength;\n","import isFunction from './isFunction.js';\nimport isLength from './isLength.js';\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nexport default isArrayLike;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nexport default isIndex;\n","import eq from './eq.js';\nimport isArrayLike from './isArrayLike.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nexport default isIterateeCall;\n","import baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nexport default createAssigner;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nexport default baseTimes;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nexport default baseIsArguments;\n","import baseIsArguments from './_baseIsArguments.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nexport default isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nexport default isArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nexport default stubFalse;\n","import root from './_root.js';\nimport stubFalse from './stubFalse.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nexport default isBuffer;\n","import baseGetTag from './_baseGetTag.js';\nimport isLength from './isLength.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nexport default baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nexport default baseUnary;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nexport default nodeUtil;\n","import baseIsTypedArray from './_baseIsTypedArray.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nexport default isTypedArray;\n","import baseTimes from './_baseTimes.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isIndex from './_isIndex.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default arrayLikeKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nexport default isPrototype;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default nativeKeysIn;\n","import isObject from './isObject.js';\nimport isPrototype from './_isPrototype.js';\nimport nativeKeysIn from './_nativeKeysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeysIn;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeysIn from './_baseKeysIn.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nexport default keysIn;\n","import copyObject from './_copyObject.js';\nimport createAssigner from './_createAssigner.js';\nimport keysIn from './keysIn.js';\n\n/**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\nvar assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n});\n\nexport default assignIn;\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/observablemixin\n */\n\nimport EmitterMixin from './emittermixin';\nimport CKEditorError from './ckeditorerror';\nimport { extend, isObject } from 'lodash-es';\n\nconst observablePropertiesSymbol = Symbol( 'observableProperties' );\nconst boundObservablesSymbol = Symbol( 'boundObservables' );\nconst boundPropertiesSymbol = Symbol( 'boundProperties' );\n\nconst _decoratedMethods = Symbol( 'decoratedMethods' );\nconst _decoratedOriginal = Symbol( 'decoratedOriginal' );\n\n/**\n * A mixin that injects the \"observable properties\" and data binding functionality described in the\n * {@link ~Observable} interface.\n *\n * Read more about the concept of observables in the:\n * * {@glink framework/guides/architecture/core-editor-architecture#event-system-and-observables Event system and observables}\n * section of the {@glink framework/guides/architecture/core-editor-architecture Core editor architecture} guide,\n * * {@glink framework/guides/deep-dive/observables Observables deep dive} guide.\n *\n * @mixin ObservableMixin\n * @mixes module:utils/emittermixin~EmitterMixin\n * @implements module:utils/observablemixin~Observable\n */\nconst ObservableMixin = {\n\t/**\n\t * @inheritDoc\n\t */\n\tset( name, value ) {\n\t\t// If the first parameter is an Object, iterate over its properties.\n\t\tif ( isObject( name ) ) {\n\t\t\tObject.keys( name ).forEach( property => {\n\t\t\t\tthis.set( property, name[ property ] );\n\t\t\t}, this );\n\n\t\t\treturn;\n\t\t}\n\n\t\tinitObservable( this );\n\n\t\tconst properties = this[ observablePropertiesSymbol ];\n\n\t\tif ( ( name in this ) && !properties.has( name ) ) {\n\t\t\t/**\n\t\t\t * Cannot override an existing property.\n\t\t\t *\n\t\t\t * This error is thrown when trying to {@link ~Observable#set set} a property with\n\t\t\t * a name of an already existing property. For example:\n\t\t\t *\n\t\t\t *\t\tlet observable = new Model();\n\t\t\t *\t\tobservable.property = 1;\n\t\t\t *\t\tobservable.set( 'property', 2 );\t\t\t// throws\n\t\t\t *\n\t\t\t *\t\tobservable.set( 'property', 1 );\n\t\t\t *\t\tobservable.set( 'property', 2 );\t\t\t// ok, because this is an existing property.\n\t\t\t *\n\t\t\t * @error observable-set-cannot-override\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'observable-set-cannot-override', this );\n\t\t}\n\n\t\tObject.defineProperty( this, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget() {\n\t\t\t\treturn properties.get( name );\n\t\t\t},\n\n\t\t\tset( value ) {\n\t\t\t\tconst oldValue = properties.get( name );\n\n\t\t\t\t// Fire `set` event before the new value will be set to make it possible\n\t\t\t\t// to override observable property without affecting `change` event.\n\t\t\t\t// See https://github.com/ckeditor/ckeditor5-utils/issues/171.\n\t\t\t\tlet newValue = this.fire( 'set:' + name, name, value, oldValue );\n\n\t\t\t\tif ( newValue === undefined ) {\n\t\t\t\t\tnewValue = value;\n\t\t\t\t}\n\n\t\t\t\t// Allow undefined as an initial value like A.define( 'x', undefined ) (#132).\n\t\t\t\t// Note: When properties map has no such own property, then its value is undefined.\n\t\t\t\tif ( oldValue !== newValue || !properties.has( name ) ) {\n\t\t\t\t\tproperties.set( name, newValue );\n\t\t\t\t\tthis.fire( 'change:' + name, name, newValue, oldValue );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tthis[ name ] = value;\n\t},\n\n\t/**\n\t * @inheritDoc\n\t */\n\tbind( ...bindProperties ) {\n\t\tif ( !bindProperties.length || !isStringArray( bindProperties ) ) {\n\t\t\t/**\n\t\t\t * All properties must be strings.\n\t\t\t *\n\t\t\t * @error observable-bind-wrong-properties\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'observable-bind-wrong-properties', this );\n\t\t}\n\n\t\tif ( ( new Set( bindProperties ) ).size !== bindProperties.length ) {\n\t\t\t/**\n\t\t\t * Properties must be unique.\n\t\t\t *\n\t\t\t * @error observable-bind-duplicate-properties\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'observable-bind-duplicate-properties', this );\n\t\t}\n\n\t\tinitObservable( this );\n\n\t\tconst boundProperties = this[ boundPropertiesSymbol ];\n\n\t\tbindProperties.forEach( propertyName => {\n\t\t\tif ( boundProperties.has( propertyName ) ) {\n\t\t\t\t/**\n\t\t\t\t * Cannot bind the same property more than once.\n\t\t\t\t *\n\t\t\t\t * @error observable-bind-rebind\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'observable-bind-rebind', this );\n\t\t\t}\n\t\t} );\n\n\t\tconst bindings = new Map();\n\n\t\t// @typedef {Object} Binding\n\t\t// @property {Array} property Property which is bound.\n\t\t// @property {Array} to Array of observable–property components of the binding (`{ observable: ..., property: .. }`).\n\t\t// @property {Array} callback A function which processes `to` components.\n\t\tbindProperties.forEach( a => {\n\t\t\tconst binding = { property: a, to: [] };\n\n\t\t\tboundProperties.set( a, binding );\n\t\t\tbindings.set( a, binding );\n\t\t} );\n\n\t\t// @typedef {Object} BindChain\n\t\t// @property {Function} to See {@link ~ObservableMixin#_bindTo}.\n\t\t// @property {Function} toMany See {@link ~ObservableMixin#_bindToMany}.\n\t\t// @property {module:utils/observablemixin~Observable} _observable The observable which initializes the binding.\n\t\t// @property {Array} _bindProperties Array of `_observable` properties to be bound.\n\t\t// @property {Array} _to Array of `to()` observable–properties (`{ observable: toObservable, properties: ...toProperties }`).\n\t\t// @property {Map} _bindings Stores bindings to be kept in\n\t\t// {@link ~ObservableMixin#_boundProperties}/{@link ~ObservableMixin#_boundObservables}\n\t\t// initiated in this binding chain.\n\t\treturn {\n\t\t\tto: bindTo,\n\t\t\ttoMany: bindToMany,\n\n\t\t\t_observable: this,\n\t\t\t_bindProperties: bindProperties,\n\t\t\t_to: [],\n\t\t\t_bindings: bindings\n\t\t};\n\t},\n\n\t/**\n\t * @inheritDoc\n\t */\n\tunbind( ...unbindProperties ) {\n\t\t// Nothing to do here if not inited yet.\n\t\tif ( !( this[ observablePropertiesSymbol ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst boundProperties = this[ boundPropertiesSymbol ];\n\t\tconst boundObservables = this[ boundObservablesSymbol ];\n\n\t\tif ( unbindProperties.length ) {\n\t\t\tif ( !isStringArray( unbindProperties ) ) {\n\t\t\t\t/**\n\t\t\t\t * Properties must be strings.\n\t\t\t\t *\n\t\t\t\t * @error observable-unbind-wrong-properties\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'observable-unbind-wrong-properties', this );\n\t\t\t}\n\n\t\t\tunbindProperties.forEach( propertyName => {\n\t\t\t\tconst binding = boundProperties.get( propertyName );\n\n\t\t\t\t// Nothing to do if the binding is not defined\n\t\t\t\tif ( !binding ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet toObservable, toProperty, toProperties, toPropertyBindings;\n\n\t\t\t\tbinding.to.forEach( to => {\n\t\t\t\t\t// TODO: ES6 destructuring.\n\t\t\t\t\ttoObservable = to[ 0 ];\n\t\t\t\t\ttoProperty = to[ 1 ];\n\t\t\t\t\ttoProperties = boundObservables.get( toObservable );\n\t\t\t\t\ttoPropertyBindings = toProperties[ toProperty ];\n\n\t\t\t\t\ttoPropertyBindings.delete( binding );\n\n\t\t\t\t\tif ( !toPropertyBindings.size ) {\n\t\t\t\t\t\tdelete toProperties[ toProperty ];\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !Object.keys( toProperties ).length ) {\n\t\t\t\t\t\tboundObservables.delete( toObservable );\n\t\t\t\t\t\tthis.stopListening( toObservable, 'change' );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tboundProperties.delete( propertyName );\n\t\t\t} );\n\t\t} else {\n\t\t\tboundObservables.forEach( ( bindings, boundObservable ) => {\n\t\t\t\tthis.stopListening( boundObservable, 'change' );\n\t\t\t} );\n\n\t\t\tboundObservables.clear();\n\t\t\tboundProperties.clear();\n\t\t}\n\t},\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdecorate( methodName ) {\n\t\tconst originalMethod = this[ methodName ];\n\n\t\tif ( !originalMethod ) {\n\t\t\t/**\n\t\t\t * Cannot decorate an undefined method.\n\t\t\t *\n\t\t\t * @error observablemixin-cannot-decorate-undefined\n\t\t\t * @param {Object} object The object which method should be decorated.\n\t\t\t * @param {String} methodName Name of the method which does not exist.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'observablemixin-cannot-decorate-undefined',\n\t\t\t\tthis,\n\t\t\t\t{ object: this, methodName }\n\t\t\t);\n\t\t}\n\n\t\tthis.on( methodName, ( evt, args ) => {\n\t\t\tevt.return = originalMethod.apply( this, args );\n\t\t} );\n\n\t\tthis[ methodName ] = function( ...args ) {\n\t\t\treturn this.fire( methodName, args );\n\t\t};\n\n\t\tthis[ methodName ][ _decoratedOriginal ] = originalMethod;\n\n\t\tif ( !this[ _decoratedMethods ] ) {\n\t\t\tthis[ _decoratedMethods ] = [];\n\t\t}\n\n\t\tthis[ _decoratedMethods ].push( methodName );\n\t}\n};\n\nextend( ObservableMixin, EmitterMixin );\n\n// Override the EmitterMixin stopListening method to be able to clean (and restore) decorated methods.\n// This is needed in case of:\n// 1. Have x.foo() decorated.\n// 2. Call x.stopListening()\n// 3. Call x.foo(). Problem: nothing happens (the original foo() method is not executed)\nObservableMixin.stopListening = function( emitter, event, callback ) {\n\t// Removing all listeners so let's clean the decorated methods to the original state.\n\tif ( !emitter && this[ _decoratedMethods ] ) {\n\t\tfor ( const methodName of this[ _decoratedMethods ] ) {\n\t\t\tthis[ methodName ] = this[ methodName ][ _decoratedOriginal ];\n\t\t}\n\n\t\tdelete this[ _decoratedMethods ];\n\t}\n\n\tEmitterMixin.stopListening.call( this, emitter, event, callback );\n};\n\nexport default ObservableMixin;\n\n// Init symbol properties needed for the observable mechanism to work.\n//\n// @private\n// @param {module:utils/observablemixin~ObservableMixin} observable\nfunction initObservable( observable ) {\n\t// Do nothing if already inited.\n\tif ( observable[ observablePropertiesSymbol ] ) {\n\t\treturn;\n\t}\n\n\t// The internal hash containing the observable's state.\n\t//\n\t// @private\n\t// @type {Map}\n\tObject.defineProperty( observable, observablePropertiesSymbol, {\n\t\tvalue: new Map()\n\t} );\n\n\t// Map containing bindings to external observables. It shares the binding objects\n\t// (`{ observable: A, property: 'a', to: ... }`) with {@link module:utils/observablemixin~ObservableMixin#_boundProperties} and\n\t// it is used to observe external observables to update own properties accordingly.\n\t// See {@link module:utils/observablemixin~ObservableMixin#bind}.\n\t//\n\t//\t\tA.bind( 'a', 'b', 'c' ).to( B, 'x', 'y', 'x' );\n\t//\t\tconsole.log( A._boundObservables );\n\t//\n\t//\t\t\tMap( {\n\t//\t\t\t\tB: {\n\t//\t\t\t\t\tx: Set( [\n\t//\t\t\t\t\t\t{ observable: A, property: 'a', to: [ [ B, 'x' ] ] },\n\t//\t\t\t\t\t\t{ observable: A, property: 'c', to: [ [ B, 'x' ] ] }\n\t//\t\t\t\t\t] ),\n\t//\t\t\t\t\ty: Set( [\n\t//\t\t\t\t\t\t{ observable: A, property: 'b', to: [ [ B, 'y' ] ] },\n\t//\t\t\t\t\t] )\n\t//\t\t\t\t}\n\t//\t\t\t} )\n\t//\n\t//\t\tA.bind( 'd' ).to( B, 'z' ).to( C, 'w' ).as( callback );\n\t//\t\tconsole.log( A._boundObservables );\n\t//\n\t//\t\t\tMap( {\n\t//\t\t\t\tB: {\n\t//\t\t\t\t\tx: Set( [\n\t//\t\t\t\t\t\t{ observable: A, property: 'a', to: [ [ B, 'x' ] ] },\n\t//\t\t\t\t\t\t{ observable: A, property: 'c', to: [ [ B, 'x' ] ] }\n\t//\t\t\t\t\t] ),\n\t//\t\t\t\t\ty: Set( [\n\t//\t\t\t\t\t\t{ observable: A, property: 'b', to: [ [ B, 'y' ] ] },\n\t//\t\t\t\t\t] ),\n\t//\t\t\t\t\tz: Set( [\n\t//\t\t\t\t\t\t{ observable: A, property: 'd', to: [ [ B, 'z' ], [ C, 'w' ] ], callback: callback }\n\t//\t\t\t\t\t] )\n\t//\t\t\t\t},\n\t//\t\t\t\tC: {\n\t//\t\t\t\t\tw: Set( [\n\t//\t\t\t\t\t\t{ observable: A, property: 'd', to: [ [ B, 'z' ], [ C, 'w' ] ], callback: callback }\n\t//\t\t\t\t\t] )\n\t//\t\t\t\t}\n\t//\t\t\t} )\n\t//\n\t// @private\n\t// @type {Map}\n\tObject.defineProperty( observable, boundObservablesSymbol, {\n\t\tvalue: new Map()\n\t} );\n\n\t// Object that stores which properties of this observable are bound and how. It shares\n\t// the binding objects (`{ observable: A, property: 'a', to: ... }`) with\n\t// {@link module:utils/observablemixin~ObservableMixin#_boundObservables}. This data structure is\n\t// a reverse of {@link module:utils/observablemixin~ObservableMixin#_boundObservables} and it is helpful for\n\t// {@link module:utils/observablemixin~ObservableMixin#unbind}.\n\t//\n\t// See {@link module:utils/observablemixin~ObservableMixin#bind}.\n\t//\n\t//\t\tA.bind( 'a', 'b', 'c' ).to( B, 'x', 'y', 'x' );\n\t//\t\tconsole.log( A._boundProperties );\n\t//\n\t//\t\t\tMap( {\n\t//\t\t\t\ta: { observable: A, property: 'a', to: [ [ B, 'x' ] ] },\n\t//\t\t\t\tb: { observable: A, property: 'b', to: [ [ B, 'y' ] ] },\n\t//\t\t\t\tc: { observable: A, property: 'c', to: [ [ B, 'x' ] ] }\n\t//\t\t\t} )\n\t//\n\t//\t\tA.bind( 'd' ).to( B, 'z' ).to( C, 'w' ).as( callback );\n\t//\t\tconsole.log( A._boundProperties );\n\t//\n\t//\t\t\tMap( {\n\t//\t\t\t\ta: { observable: A, property: 'a', to: [ [ B, 'x' ] ] },\n\t//\t\t\t\tb: { observable: A, property: 'b', to: [ [ B, 'y' ] ] },\n\t//\t\t\t\tc: { observable: A, property: 'c', to: [ [ B, 'x' ] ] },\n\t//\t\t\t\td: { observable: A, property: 'd', to: [ [ B, 'z' ], [ C, 'w' ] ], callback: callback }\n\t//\t\t\t} )\n\t//\n\t// @private\n\t// @type {Map}\n\tObject.defineProperty( observable, boundPropertiesSymbol, {\n\t\tvalue: new Map()\n\t} );\n}\n\n// A chaining for {@link module:utils/observablemixin~ObservableMixin#bind} providing `.to()` interface.\n//\n// @private\n// @param {...[Observable|String|Function]} args Arguments of the `.to( args )` binding.\nfunction bindTo( ...args ) {\n\tconst parsedArgs = parseBindToArgs( ...args );\n\tconst bindingsKeys = Array.from( this._bindings.keys() );\n\tconst numberOfBindings = bindingsKeys.length;\n\n\t// Eliminate A.bind( 'x' ).to( B, C )\n\tif ( !parsedArgs.callback && parsedArgs.to.length > 1 ) {\n\t\t/**\n\t\t * Binding multiple observables only possible with callback.\n\t\t *\n\t\t * @error observable-bind-to-no-callback\n\t\t */\n\t\tthrow new CKEditorError( 'observable-bind-to-no-callback', this );\n\t}\n\n\t// Eliminate A.bind( 'x', 'y' ).to( B, callback )\n\tif ( numberOfBindings > 1 && parsedArgs.callback ) {\n\t\t/**\n\t\t * Cannot bind multiple properties and use a callback in one binding.\n\t\t *\n\t\t * @error observable-bind-to-extra-callback\n\t\t */\n\t\tthrow new CKEditorError(\n\t\t\t'observable-bind-to-extra-callback',\n\t\t\tthis\n\t\t);\n\t}\n\n\tparsedArgs.to.forEach( to => {\n\t\t// Eliminate A.bind( 'x', 'y' ).to( B, 'a' )\n\t\tif ( to.properties.length && to.properties.length !== numberOfBindings ) {\n\t\t\t/**\n\t\t\t * The number of properties must match.\n\t\t\t *\n\t\t\t * @error observable-bind-to-properties-length\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'observable-bind-to-properties-length', this );\n\t\t}\n\n\t\t// When no to.properties specified, observing source properties instead i.e.\n\t\t// A.bind( 'x', 'y' ).to( B ) -> Observe B.x and B.y\n\t\tif ( !to.properties.length ) {\n\t\t\tto.properties = this._bindProperties;\n\t\t}\n\t} );\n\n\tthis._to = parsedArgs.to;\n\n\t// Fill {@link BindChain#_bindings} with callback. When the callback is set there's only one binding.\n\tif ( parsedArgs.callback ) {\n\t\tthis._bindings.get( bindingsKeys[ 0 ] ).callback = parsedArgs.callback;\n\t}\n\n\tattachBindToListeners( this._observable, this._to );\n\n\t// Update observable._boundProperties and observable._boundObservables.\n\tupdateBindToBound( this );\n\n\t// Set initial values of bound properties.\n\tthis._bindProperties.forEach( propertyName => {\n\t\tupdateBoundObservableProperty( this._observable, propertyName );\n\t} );\n}\n\n// Binds to an attribute in a set of iterable observables.\n//\n// @private\n// @param {Array.<Observable>} observables\n// @param {String} attribute\n// @param {Function} callback\nfunction bindToMany( observables, attribute, callback ) {\n\tif ( this._bindings.size > 1 ) {\n\t\t/**\n\t\t * Binding one attribute to many observables only possible with one attribute.\n\t\t *\n\t\t * @error observable-bind-to-many-not-one-binding\n\t\t */\n\t\tthrow new CKEditorError( 'observable-bind-to-many-not-one-binding', this );\n\t}\n\n\tthis.to(\n\t\t// Bind to #attribute of each observable...\n\t\t...getBindingTargets( observables, attribute ),\n\t\t// ...using given callback to parse attribute values.\n\t\tcallback\n\t);\n}\n\n// Returns an array of binding components for\n// {@link Observable#bind} from a set of iterable observables.\n//\n// @param {Array.<Observable>} observables\n// @param {String} attribute\n// @returns {Array.<String|Observable>}\nfunction getBindingTargets( observables, attribute ) {\n\tconst observableAndAttributePairs = observables.map( observable => [ observable, attribute ] );\n\n\t// Merge pairs to one-dimension array of observables and attributes.\n\treturn Array.prototype.concat.apply( [], observableAndAttributePairs );\n}\n\n// Check if all entries of the array are of `String` type.\n//\n// @private\n// @param {Array} arr An array to be checked.\n// @returns {Boolean}\nfunction isStringArray( arr ) {\n\treturn arr.every( a => typeof a == 'string' );\n}\n\n// Parses and validates {@link Observable#bind}`.to( args )` arguments and returns\n// an object with a parsed structure. For example\n//\n//\t\tA.bind( 'x' ).to( B, 'a', C, 'b', call );\n//\n// becomes\n//\n//\t\t{\n//\t\t\tto: [\n//\t\t\t\t{ observable: B, properties: [ 'a' ] },\n//\t\t\t\t{ observable: C, properties: [ 'b' ] },\n//\t\t\t],\n//\t\t\tcallback: call\n// \t\t}\n//\n// @private\n// @param {...*} args Arguments of {@link Observable#bind}`.to( args )`.\n// @returns {Object}\nfunction parseBindToArgs( ...args ) {\n\t// Eliminate A.bind( 'x' ).to()\n\tif ( !args.length ) {\n\t\t/**\n\t\t * Invalid argument syntax in `to()`.\n\t\t *\n\t\t * @error observable-bind-to-parse-error\n\t\t */\n\t\tthrow new CKEditorError( 'observable-bind-to-parse-error', null );\n\t}\n\n\tconst parsed = { to: [] };\n\tlet lastObservable;\n\n\tif ( typeof args[ args.length - 1 ] == 'function' ) {\n\t\tparsed.callback = args.pop();\n\t}\n\n\targs.forEach( a => {\n\t\tif ( typeof a == 'string' ) {\n\t\t\tlastObservable.properties.push( a );\n\t\t} else if ( typeof a == 'object' ) {\n\t\t\tlastObservable = { observable: a, properties: [] };\n\t\t\tparsed.to.push( lastObservable );\n\t\t} else {\n\t\t\tthrow new CKEditorError( 'observable-bind-to-parse-error', null );\n\t\t}\n\t} );\n\n\treturn parsed;\n}\n\n// Synchronizes {@link module:utils/observablemixin#_boundObservables} with {@link Binding}.\n//\n// @private\n// @param {Binding} binding A binding to store in {@link Observable#_boundObservables}.\n// @param {Observable} toObservable A observable, which is a new component of `binding`.\n// @param {String} toPropertyName A name of `toObservable`'s property, a new component of the `binding`.\nfunction updateBoundObservables( observable, binding, toObservable, toPropertyName ) {\n\tconst boundObservables = observable[ boundObservablesSymbol ];\n\tconst bindingsToObservable = boundObservables.get( toObservable );\n\tconst bindings = bindingsToObservable || {};\n\n\tif ( !bindings[ toPropertyName ] ) {\n\t\tbindings[ toPropertyName ] = new Set();\n\t}\n\n\t// Pass the binding to a corresponding Set in `observable._boundObservables`.\n\tbindings[ toPropertyName ].add( binding );\n\n\tif ( !bindingsToObservable ) {\n\t\tboundObservables.set( toObservable, bindings );\n\t}\n}\n\n// Synchronizes {@link Observable#_boundProperties} and {@link Observable#_boundObservables}\n// with {@link BindChain}.\n//\n// Assuming the following binding being created\n//\n// \t\tA.bind( 'a', 'b' ).to( B, 'x', 'y' );\n//\n// the following bindings were initialized by {@link Observable#bind} in {@link BindChain#_bindings}:\n//\n// \t\t{\n// \t\t\ta: { observable: A, property: 'a', to: [] },\n// \t\t\tb: { observable: A, property: 'b', to: [] },\n// \t\t}\n//\n// Iterate over all bindings in this chain and fill their `to` properties with\n// corresponding to( ... ) arguments (components of the binding), so\n//\n// \t\t{\n// \t\t\ta: { observable: A, property: 'a', to: [ B, 'x' ] },\n// \t\t\tb: { observable: A, property: 'b', to: [ B, 'y' ] },\n// \t\t}\n//\n// Then update the structure of {@link Observable#_boundObservables} with updated\n// binding, so it becomes:\n//\n// \t\tMap( {\n// \t\t\tB: {\n// \t\t\t\tx: Set( [\n// \t\t\t\t\t{ observable: A, property: 'a', to: [ [ B, 'x' ] ] }\n// \t\t\t\t] ),\n// \t\t\t\ty: Set( [\n// \t\t\t\t\t{ observable: A, property: 'b', to: [ [ B, 'y' ] ] },\n// \t\t\t\t] )\n//\t\t\t}\n// \t\t} )\n//\n// @private\n// @param {BindChain} chain The binding initialized by {@link Observable#bind}.\nfunction updateBindToBound( chain ) {\n\tlet toProperty;\n\n\tchain._bindings.forEach( ( binding, propertyName ) => {\n\t\t// Note: For a binding without a callback, this will run only once\n\t\t// like in A.bind( 'x', 'y' ).to( B, 'a', 'b' )\n\t\t// TODO: ES6 destructuring.\n\t\tchain._to.forEach( to => {\n\t\t\ttoProperty = to.properties[ binding.callback ? 0 : chain._bindProperties.indexOf( propertyName ) ];\n\n\t\t\tbinding.to.push( [ to.observable, toProperty ] );\n\t\t\tupdateBoundObservables( chain._observable, binding, to.observable, toProperty );\n\t\t} );\n\t} );\n}\n\n// Updates an property of a {@link Observable} with a value\n// determined by an entry in {@link Observable#_boundProperties}.\n//\n// @private\n// @param {Observable} observable A observable which property is to be updated.\n// @param {String} propertyName An property to be updated.\nfunction updateBoundObservableProperty( observable, propertyName ) {\n\tconst boundProperties = observable[ boundPropertiesSymbol ];\n\tconst binding = boundProperties.get( propertyName );\n\tlet propertyValue;\n\n\t// When a binding with callback is created like\n\t//\n\t// \t\tA.bind( 'a' ).to( B, 'b', C, 'c', callback );\n\t//\n\t// collect B.b and C.c, then pass them to callback to set A.a.\n\tif ( binding.callback ) {\n\t\tpropertyValue = binding.callback.apply( observable, binding.to.map( to => to[ 0 ][ to[ 1 ] ] ) );\n\t} else {\n\t\tpropertyValue = binding.to[ 0 ];\n\t\tpropertyValue = propertyValue[ 0 ][ propertyValue[ 1 ] ];\n\t}\n\n\tif ( Object.prototype.hasOwnProperty.call( observable, propertyName ) ) {\n\t\tobservable[ propertyName ] = propertyValue;\n\t} else {\n\t\tobservable.set( propertyName, propertyValue );\n\t}\n}\n\n// Starts listening to changes in {@link BindChain._to} observables to update\n// {@link BindChain._observable} {@link BindChain._bindProperties}. Also sets the\n// initial state of {@link BindChain._observable}.\n//\n// @private\n// @param {BindChain} chain The chain initialized by {@link Observable#bind}.\nfunction attachBindToListeners( observable, toBindings ) {\n\ttoBindings.forEach( to => {\n\t\tconst boundObservables = observable[ boundObservablesSymbol ];\n\t\tlet bindings;\n\n\t\t// If there's already a chain between the observables (`observable` listens to\n\t\t// `to.observable`), there's no need to create another `change` event listener.\n\t\tif ( !boundObservables.get( to.observable ) ) {\n\t\t\tobservable.listenTo( to.observable, 'change', ( evt, propertyName ) => {\n\t\t\t\tbindings = boundObservables.get( to.observable )[ propertyName ];\n\n\t\t\t\t// Note: to.observable will fire for any property change, react\n\t\t\t\t// to changes of properties which are bound only.\n\t\t\t\tif ( bindings ) {\n\t\t\t\t\tbindings.forEach( binding => {\n\t\t\t\t\t\tupdateBoundObservableProperty( observable, binding.property );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n}\n\n/**\n * An interface which adds \"observable properties\" and data binding functionality.\n *\n * Can be easily implemented by a class by mixing the {@link module:utils/observablemixin~ObservableMixin} mixin.\n *\n * Read more about the usage of this interface in the:\n * * {@glink framework/guides/architecture/core-editor-architecture#event-system-and-observables Event system and observables}\n * section of the {@glink framework/guides/architecture/core-editor-architecture Core editor architecture} guide,\n * * {@glink framework/guides/deep-dive/observables Observables deep dive} guide.\n *\n * @interface Observable\n * @extends module:utils/emittermixin~Emitter\n */\n\n/**\n * Fired when a property changed value.\n *\n *\t\tobservable.set( 'prop', 1 );\n *\n *\t\tobservable.on( 'change:prop', ( evt, propertyName, newValue, oldValue ) => {\n *\t\t\tconsole.log( `${ propertyName } has changed from ${ oldValue } to ${ newValue }` );\n *\t\t} );\n *\n *\t\tobservable.prop = 2; // -> 'prop has changed from 1 to 2'\n *\n * @event change:{property}\n * @param {String} name The property name.\n * @param {*} value The new property value.\n * @param {*} oldValue The previous property value.\n */\n\n/**\n * Fired when a property value is going to be set but is not set yet (before the `change` event is fired).\n *\n * You can control the final value of the property by using\n * the {@link module:utils/eventinfo~EventInfo#return event's `return` property}.\n *\n *\t\tobservable.set( 'prop', 1 );\n *\n *\t\tobservable.on( 'set:prop', ( evt, propertyName, newValue, oldValue ) => {\n *\t\t\tconsole.log( `Value is going to be changed from ${ oldValue } to ${ newValue }` );\n *\t\t\tconsole.log( `Current property value is ${ observable[ propertyName ] }` );\n *\n *\t\t\t// Let's override the value.\n *\t\t\tevt.return = 3;\n *\t\t} );\n *\n *\t\tobservable.on( 'change:prop', ( evt, propertyName, newValue, oldValue ) => {\n *\t\t\tconsole.log( `Value has changed from ${ oldValue } to ${ newValue }` );\n *\t\t} );\n *\n *\t\tobservable.prop = 2; // -> 'Value is going to be changed from 1 to 2'\n *\t\t // -> 'Current property value is 1'\n *\t\t // -> 'Value has changed from 1 to 3'\n *\n * **Note:** The event is fired even when the new value is the same as the old value.\n *\n * @event set:{property}\n * @param {String} name The property name.\n * @param {*} value The new property value.\n * @param {*} oldValue The previous property value.\n */\n\n/**\n * Creates and sets the value of an observable property of this object. Such a property becomes a part\n * of the state and is observable.\n *\n * It accepts also a single object literal containing key/value pairs with properties to be set.\n *\n * This method throws the `observable-set-cannot-override` error if the observable instance already\n * has a property with the given property name. This prevents from mistakenly overriding existing\n * properties and methods, but means that `foo.set( 'bar', 1 )` may be slightly slower than `foo.bar = 1`.\n *\n * @method #set\n * @param {String|Object} name The property's name or object with `name=>value` pairs.\n * @param {*} [value] The property's value (if `name` was passed in the first parameter).\n */\n\n/**\n * Binds {@link #set observable properties} to other objects implementing the\n * {@link module:utils/observablemixin~Observable} interface.\n *\n * Read more in the {@glink framework/guides/deep-dive/observables#property-bindings dedicated guide}\n * covering the topic of property bindings with some additional examples.\n *\n * Consider two objects: a `button` and an associated `command` (both `Observable`).\n *\n * A simple property binding could be as follows:\n *\n *\t\tbutton.bind( 'isEnabled' ).to( command, 'isEnabled' );\n *\n * or even shorter:\n *\n *\t\tbutton.bind( 'isEnabled' ).to( command );\n *\n * which works in the following way:\n *\n * * `button.isEnabled` **instantly equals** `command.isEnabled`,\n * * whenever `command.isEnabled` changes, `button.isEnabled` will immediately reflect its value.\n *\n * **Note**: To release the binding, use {@link module:utils/observablemixin~Observable#unbind}.\n *\n * You can also \"rename\" the property in the binding by specifying the new name in the `to()` chain:\n *\n *\t\tbutton.bind( 'isEnabled' ).to( command, 'isWorking' );\n *\n * It is possible to bind more than one property at a time to shorten the code:\n *\n *\t\tbutton.bind( 'isEnabled', 'value' ).to( command );\n *\n * which corresponds to:\n *\n *\t\tbutton.bind( 'isEnabled' ).to( command );\n *\t\tbutton.bind( 'value' ).to( command );\n *\n * The binding can include more than one observable, combining multiple data sources in a custom callback:\n *\n *\t\tbutton.bind( 'isEnabled' ).to( command, 'isEnabled', ui, 'isVisible',\n *\t\t\t( isCommandEnabled, isUIVisible ) => isCommandEnabled && isUIVisible );\n *\n * Using a custom callback allows processing the value before passing it to the target property:\n *\n *\t\tbutton.bind( 'isEnabled' ).to( command, 'value', value => value === 'heading1' );\n *\n * It is also possible to bind to the same property in an array of observables.\n * To bind a `button` to multiple commands (also `Observables`) so that each and every one of them\n * must be enabled for the button to become enabled, use the following code:\n *\n *\t\tbutton.bind( 'isEnabled' ).toMany( [ commandA, commandB, commandC ], 'isEnabled',\n *\t\t\t( isAEnabled, isBEnabled, isCEnabled ) => isAEnabled && isBEnabled && isCEnabled );\n *\n * @method #bind\n * @param {...String} bindProperties Observable properties that will be bound to other observable(s).\n * @returns {Object} The bind chain with the `to()` and `toMany()` methods.\n */\n\n/**\n * Removes the binding created with {@link #bind}.\n *\n *\t\t// Removes the binding for the 'a' property.\n *\t\tA.unbind( 'a' );\n *\n *\t\t// Removes bindings for all properties.\n *\t\tA.unbind();\n *\n * @method #unbind\n * @param {...String} [unbindProperties] Observable properties to be unbound. All the bindings will\n * be released if no properties are provided.\n */\n\n/**\n * Turns the given methods of this object into event-based ones. This means that the new method will fire an event\n * (named after the method) and the original action will be plugged as a listener to that event.\n *\n * Read more in the {@glink framework/guides/deep-dive/observables#decorating-object-methods dedicated guide}\n * covering the topic of decorating methods with some additional examples.\n *\n * Decorating the method does not change its behavior (it only adds an event),\n * but it allows to modify it later on by listening to the method's event.\n *\n * For example, to cancel the method execution the event can be {@link module:utils/eventinfo~EventInfo#stop stopped}:\n *\n *\t\tclass Foo {\n *\t\t\tconstructor() {\n *\t\t\t\tthis.decorate( 'method' );\n *\t\t\t}\n *\n *\t\t\tmethod() {\n *\t\t\t\tconsole.log( 'called!' );\n *\t\t\t}\n *\t\t}\n *\n *\t\tconst foo = new Foo();\n *\t\tfoo.on( 'method', ( evt ) => {\n *\t\t\tevt.stop();\n *\t\t}, { priority: 'high' } );\n *\n *\t\tfoo.method(); // Nothing is logged.\n *\n *\n * **Note**: The high {@link module:utils/priorities~PriorityString priority} listener\n * has been used to execute this particular callback before the one which calls the original method\n * (which uses the \"normal\" priority).\n *\n * It is also possible to change the returned value:\n *\n *\t\tfoo.on( 'method', ( evt ) => {\n *\t\t\tevt.return = 'Foo!';\n *\t\t} );\n *\n *\t\tfoo.method(); // -> 'Foo'\n *\n * Finally, it is possible to access and modify the arguments the method is called with:\n *\n *\t\tmethod( a, b ) {\n *\t\t\tconsole.log( `${ a }, ${ b }` );\n *\t\t}\n *\n *\t\t// ...\n *\n *\t\tfoo.on( 'method', ( evt, args ) => {\n *\t\t\targs[ 0 ] = 3;\n *\n *\t\t\tconsole.log( args[ 1 ] ); // -> 2\n *\t\t}, { priority: 'high' } );\n *\n *\t\tfoo.method( 1, 2 ); // -> '3, 2'\n *\n * @method #decorate\n * @param {String} methodName Name of the method to decorate.\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/mix\n */\n\n/**\n * Copies enumerable properties and symbols from the objects given as 2nd+ parameters to the\n * prototype of first object (a constructor).\n *\n *\t\tclass Editor {\n *\t\t\t...\n *\t\t}\n *\n *\t\tconst SomeMixin = {\n *\t\t\ta() {\n *\t\t\t\treturn 'a';\n *\t\t\t}\n *\t\t};\n *\n *\t\tmix( Editor, SomeMixin, ... );\n *\n *\t\tnew Editor().a(); // -> 'a'\n *\n * Note: Properties which already exist in the base class will not be overriden.\n *\n * @param {Function} [baseClass] Class which prototype will be extended.\n * @param {Object} [...mixins] Objects from which to get properties.\n */\nexport default function mix( baseClass, ...mixins ) {\n\tmixins.forEach( mixin => {\n\t\tObject.getOwnPropertyNames( mixin ).concat( Object.getOwnPropertySymbols( mixin ) )\n\t\t\t.forEach( key => {\n\t\t\t\tif ( key in baseClass.prototype ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst sourceDescriptor = Object.getOwnPropertyDescriptor( mixin, key );\n\t\t\t\tsourceDescriptor.enumerable = false;\n\n\t\t\t\tObject.defineProperty( baseClass.prototype, key, sourceDescriptor );\n\t\t\t} );\n\t} );\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module core/plugin\n */\n\nimport ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\n\n/**\n * The base class for CKEditor plugin classes.\n *\n * @implements module:core/plugin~PluginInterface\n * @mixes module:utils/observablemixin~ObservableMixin\n */\nexport default class Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor ) {\n\t\t/**\n\t\t * The editor instance.\n\t\t *\n\t\t * Note that most editors implement the {@link module:core/editor/editorwithui~EditorWithUI} interface in addition\n\t\t * to the base {@link module:core/editor/editor~Editor} interface. However, editors with an external UI\n\t\t * (i.e. Bootstrap-based) or a headless editor may not implement the {@link module:core/editor/editorwithui~EditorWithUI}\n\t\t * interface.\n\t\t *\n\t\t * Because of above, to make plugins more universal, it is recommended to split features into:\n\t\t * - The \"editing\" part that only uses the {@link module:core/editor/editor~Editor} interface.\n\t\t * - The \"UI\" part that uses both the {@link module:core/editor/editor~Editor} interface and\n\t\t * the {@link module:core/editor/editorwithui~EditorWithUI} interface.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:core/editor/editor~Editor} #editor\n\t\t */\n\t\tthis.editor = editor;\n\n\t\t/**\n\t\t * Flag indicating whether a plugin is enabled or disabled.\n\t\t * A disabled plugin will not transform text.\n\t\t *\n\t\t * Plugin can be simply disabled like that:\n\t\t *\n\t\t *\t\t// Disable the plugin so that no toolbars are visible.\n\t\t *\t\teditor.plugins.get( 'TextTransformation' ).isEnabled = false;\n\t\t *\n\t\t * You can also use {@link #forceDisabled} method.\n\t\t *\n\t\t * @observable\n\t\t * @readonly\n\t\t * @member {Boolean} #isEnabled\n\t\t */\n\t\tthis.set( 'isEnabled', true );\n\n\t\t/**\n\t\t * Holds identifiers for {@link #forceDisabled} mechanism.\n\t\t *\n\t\t * @type {Set.<String>}\n\t\t * @private\n\t\t */\n\t\tthis._disableStack = new Set();\n\t}\n\n\t/**\n\t * Disables the plugin.\n\t *\n\t * Plugin may be disabled by multiple features or algorithms (at once). When disabling a plugin, unique id should be passed\n\t * (e.g. feature name). The same identifier should be used when {@link #clearForceDisabled enabling back} the plugin.\n\t * The plugin becomes enabled only after all features {@link #clearForceDisabled enabled it back}.\n\t *\n\t * Disabling and enabling a plugin:\n\t *\n\t *\t\tplugin.isEnabled; // -> true\n\t *\t\tplugin.forceDisabled( 'MyFeature' );\n\t *\t\tplugin.isEnabled; // -> false\n\t *\t\tplugin.clearForceDisabled( 'MyFeature' );\n\t *\t\tplugin.isEnabled; // -> true\n\t *\n\t * Plugin disabled by multiple features:\n\t *\n\t *\t\tplugin.forceDisabled( 'MyFeature' );\n\t *\t\tplugin.forceDisabled( 'OtherFeature' );\n\t *\t\tplugin.clearForceDisabled( 'MyFeature' );\n\t *\t\tplugin.isEnabled; // -> false\n\t *\t\tplugin.clearForceDisabled( 'OtherFeature' );\n\t *\t\tplugin.isEnabled; // -> true\n\t *\n\t * Multiple disabling with the same identifier is redundant:\n\t *\n\t *\t\tplugin.forceDisabled( 'MyFeature' );\n\t *\t\tplugin.forceDisabled( 'MyFeature' );\n\t *\t\tplugin.clearForceDisabled( 'MyFeature' );\n\t *\t\tplugin.isEnabled; // -> true\n\t *\n\t * **Note:** some plugins or algorithms may have more complex logic when it comes to enabling or disabling certain plugins,\n\t * so the plugin might be still disabled after {@link #clearForceDisabled} was used.\n\t *\n\t * @param {String} id Unique identifier for disabling. Use the same id when {@link #clearForceDisabled enabling back} the plugin.\n\t */\n\tforceDisabled( id ) {\n\t\tthis._disableStack.add( id );\n\n\t\tif ( this._disableStack.size == 1 ) {\n\t\t\tthis.on( 'set:isEnabled', forceDisable, { priority: 'highest' } );\n\t\t\tthis.isEnabled = false;\n\t\t}\n\t}\n\n\t/**\n\t * Clears forced disable previously set through {@link #forceDisabled}. See {@link #forceDisabled}.\n\t *\n\t * @param {String} id Unique identifier, equal to the one passed in {@link #forceDisabled} call.\n\t */\n\tclearForceDisabled( id ) {\n\t\tthis._disableStack.delete( id );\n\n\t\tif ( this._disableStack.size == 0 ) {\n\t\t\tthis.off( 'set:isEnabled', forceDisable );\n\t\t\tthis.isEnabled = true;\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdestroy() {\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get isContextPlugin() {\n\t\treturn false;\n\t}\n}\n\nmix( Plugin, ObservableMixin );\n\n/**\n * The base interface for CKEditor plugins.\n *\n * In its minimal form a plugin can be a simple function that accepts {@link module:core/editor/editor~Editor the editor}\n * as a parameter:\n *\n *\t\t// A simple plugin that enables a data processor.\n *\t\tfunction MyPlugin( editor ) {\n *\t\t\teditor.data.processor = new MyDataProcessor();\n *\t\t}\n *\n * In most cases however, you will want to inherit from the {@link module:core/plugin~Plugin} class which implements the\n * {@link module:utils/observablemixin~ObservableMixin} and is, therefore, more convenient:\n *\n *\t\tclass MyPlugin extends Plugin {\n *\t\t\tinit() {\n *\t\t\t\t// `listenTo()` and `editor` are available thanks to `Plugin`.\n *\t\t\t\t// By using `listenTo()` you will ensure that the listener is removed when\n *\t\t\t\t// the plugin is destroyed.\n *\t\t\t\tthis.listenTo( this.editor.data, 'ready', () => {\n *\t\t\t\t\t// Do something when the data is ready.\n *\t\t\t\t} );\n *\t\t\t}\n *\t\t}\n *\n * The plugin can also implement methods (e.g. {@link module:core/plugin~PluginInterface#init `init()`} or\n * {@link module:core/plugin~PluginInterface#destroy `destroy()`}) which, when present, will be used to properly\n * initialize and destroy the plugin.\n *\n * **Note:** When defined as a plain function, the plugin acts as a constructor and will be\n * called in parallel with other plugins' {@link module:core/plugin~PluginInterface#constructor constructors}.\n * This means the code of that plugin will be executed **before** {@link module:core/plugin~PluginInterface#init `init()`} and\n * {@link module:core/plugin~PluginInterface#afterInit `afterInit()`} methods of other plugins and, for instance,\n * you cannot use it to extend other plugins' {@glink framework/guides/architecture/editing-engine#schema schema}\n * rules as they are defined later on during the `init()` stage.\n *\n * @interface PluginInterface\n */\n\n/**\n * Creates a new plugin instance. This is the first step of the plugin initialization.\n * See also {@link #init} and {@link #afterInit}.\n *\n * A plugin is always instantiated after its {@link module:core/plugin~PluginInterface.requires dependencies} and the\n * {@link #init} and {@link #afterInit} methods are called in the same order.\n *\n * Usually, you will want to put your plugin's initialization code in the {@link #init} method.\n * The constructor can be understood as \"before init\" and used in special cases, just like\n * {@link #afterInit} serves the special \"after init\" scenarios (e.g.the code which depends on other\n * plugins, but which does not {@link module:core/plugin~PluginInterface.requires explicitly require} them).\n *\n * @method #constructor\n * @param {module:core/editor/editor~Editor} editor\n */\n\n/**\n * An array of plugins required by this plugin.\n *\n * To keep the plugin class definition tight it is recommended to define this property as a static getter:\n *\n *\t\timport Image from './image.js';\n *\n *\t\texport default class ImageCaption {\n *\t\t\tstatic get requires() {\n *\t\t\t\treturn [ Image ];\n *\t\t\t}\n *\t\t}\n *\n * @static\n * @readonly\n * @member {Array.<Function>|undefined} module:core/plugin~PluginInterface.requires\n */\n\n/**\n * An optional name of the plugin. If set, the plugin will be available in\n * {@link module:core/plugincollection~PluginCollection#get} by its\n * name and its constructor. If not, then only by its constructor.\n *\n * The name should reflect the constructor name.\n *\n * To keep the plugin class definition tight, it is recommended to define this property as a static getter:\n *\n *\t\texport default class ImageCaption {\n *\t\t\tstatic get pluginName() {\n *\t\t\t\treturn 'ImageCaption';\n *\t\t\t}\n *\t\t}\n *\n * Note: The native `Function.name` property could not be used to keep the plugin name because\n * it will be mangled during code minification.\n *\n * Naming a plugin is necessary to enable removing it through the\n * {@link module:core/editor/editorconfig~EditorConfig#removePlugins `config.removePlugins`} option.\n *\n * @static\n * @readonly\n * @member {String|undefined} module:core/plugin~PluginInterface.pluginName\n */\n\n/**\n * The second stage (after plugin {@link #constructor}) of the plugin initialization.\n * Unlike the plugin constructor this method can be asynchronous.\n *\n * A plugin's `init()` method is called after its {@link module:core/plugin~PluginInterface.requires dependencies} are initialized,\n * so in the same order as the constructors of these plugins.\n *\n * **Note:** This method is optional. A plugin instance does not need to have it defined.\n *\n * @method #init\n * @returns {null|Promise}\n */\n\n/**\n * The third (and last) stage of the plugin initialization. See also {@link #constructor} and {@link #init}.\n *\n * **Note:** This method is optional. A plugin instance does not need to have it defined.\n *\n * @method #afterInit\n * @returns {null|Promise}\n */\n\n/**\n * Destroys the plugin.\n *\n * **Note:** This method is optional. A plugin instance does not need to have it defined.\n *\n * @method #destroy\n * @returns {null|Promise}\n */\n\n/**\n * A flag which defines if a plugin is allowed or not allowed to be used directly by a {@link module:core/context~Context}.\n *\n * @static\n * @readonly\n * @member {Boolean} module:core/plugin~PluginInterface.isContextPlugin\n */\n\n/**\n * An array of loaded plugins.\n *\n * @typedef {Array.<module:core/plugin~PluginInterface>} module:core/plugin~LoadedPlugins\n */\n\n// Helper function that forces plugin to be disabled.\nfunction forceDisable( evt ) {\n\tevt.return = false;\n\tevt.stop();\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module core/command\n */\n\nimport ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\n\n/**\n * The base class for CKEditor commands.\n *\n * Commands are the main way to manipulate editor contents and state. They are mostly used by UI elements (or by other\n * commands) to make changes in the model. Commands are available in every part of code that has access to\n * the {@link module:core/editor/editor~Editor editor} instance.\n *\n * Instances of registered commands can be retrieved from {@link module:core/editor/editor~Editor#commands `editor.commands`}.\n * The easiest way to execute a command is through {@link module:core/editor/editor~Editor#execute `editor.execute()`}.\n *\n * By default, commands are disabled when the editor is in {@link module:core/editor/editor~Editor#isReadOnly read-only} mode\n * but commands with the {@link module:core/command~Command#affectsData `affectsData`} flag set to `false` will not be disabled.\n *\n * @mixes module:utils/observablemixin~ObservableMixin\n */\nexport default class Command {\n\t/**\n\t * Creates a new `Command` instance.\n\t *\n\t * @param {module:core/editor/editor~Editor} editor Editor on which this command will be used.\n\t */\n\tconstructor( editor ) {\n\t\t/**\n\t\t * The editor on which this command will be used.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:core/editor/editor~Editor}\n\t\t */\n\t\tthis.editor = editor;\n\n\t\t/**\n\t\t * The value of the command. A concrete command class should define what it represents for it.\n\t\t *\n\t\t * For example, the `'bold'` command's value indicates whether the selection starts in a bolded text.\n\t\t * And the value of the `'link'` command may be an object with links details.\n\t\t *\n\t\t * It is possible for a command to have no value (e.g. for stateless actions such as `'uploadImage'`).\n\t\t *\n\t\t * A concrete command class should control this value by overriding the {@link #refresh `refresh()`} method.\n\t\t *\n\t\t * @observable\n\t\t * @readonly\n\t\t * @member #value\n\t\t */\n\t\tthis.set( 'value', undefined );\n\n\t\t/**\n\t\t * Flag indicating whether a command is enabled or disabled.\n\t\t * A disabled command will do nothing when executed.\n\t\t *\n\t\t * A concrete command class should control this value by overriding the {@link #refresh `refresh()`} method.\n\t\t *\n\t\t * It is possible to disable a command from \"outside\". For instance, in your integration you may want to disable\n\t\t * a certain set of commands for the time being. To do that, you can use the fact that `isEnabled` is observable\n\t\t * and it fires the `set:isEnabled` event every time anyone tries to modify its value:\n\t\t *\n\t\t *\t\tfunction disableCommand( cmd ) {\n\t\t *\t\t\tcmd.on( 'set:isEnabled', forceDisable, { priority: 'highest' } );\n\t\t *\n\t\t *\t\t\tcmd.isEnabled = false;\n\t\t *\n\t\t *\t\t\t// Make it possible to enable the command again.\n\t\t *\t\t\treturn () => {\n\t\t *\t\t\t\tcmd.off( 'set:isEnabled', forceDisable );\n\t\t *\t\t\t\tcmd.refresh();\n\t\t *\t\t\t};\n\t\t *\n\t\t *\t\t\tfunction forceDisable( evt ) {\n\t\t *\t\t\t\tevt.return = false;\n\t\t *\t\t\t\tevt.stop();\n\t\t *\t\t\t}\n\t\t *\t\t}\n\t\t *\n\t\t *\t\t// Usage:\n\t\t *\n\t\t *\t\t// Disabling the command.\n\t\t *\t\tconst enableBold = disableCommand( editor.commands.get( 'bold' ) );\n\t\t *\n\t\t *\t\t// Enabling the command again.\n\t\t *\t\tenableBold();\n\t\t *\n\t\t * @observable\n\t\t * @readonly\n\t\t * @member {Boolean} #isEnabled\n\t\t */\n\t\tthis.set( 'isEnabled', false );\n\n\t\t/**\n\t\t * A flag indicating whether a command execution changes the editor data or not.\n\t\t *\n\t\t * Commands with `affectsData` set to `false` will not be automatically disabled in\n\t\t * the {@link module:core/editor/editor~Editor#isReadOnly read-only mode} and\n\t\t * {@glink features/read-only#related-features other editor modes} with restricted user write permissions.\n\t\t *\n\t\t * **Note:** You do not have to set it for your every command. It is `true` by default.\n\t\t *\n\t\t * @readonly\n\t\t * @default true\n\t\t * @member {Boolean} #affectsData\n\t\t */\n\t\tthis.affectsData = true;\n\n\t\t/**\n\t\t * Holds identifiers for {@link #forceDisabled} mechanism.\n\t\t *\n\t\t * @type {Set.<String>}\n\t\t * @private\n\t\t */\n\t\tthis._disableStack = new Set();\n\n\t\tthis.decorate( 'execute' );\n\n\t\t// By default every command is refreshed when changes are applied to the model.\n\t\tthis.listenTo( this.editor.model.document, 'change', () => {\n\t\t\tthis.refresh();\n\t\t} );\n\n\t\tthis.on( 'execute', evt => {\n\t\t\tif ( !this.isEnabled ) {\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\n\t\t// By default commands are disabled when the editor is in read-only mode.\n\t\tthis.listenTo( editor, 'change:isReadOnly', ( evt, name, value ) => {\n\t\t\tif ( value && this.affectsData ) {\n\t\t\t\tthis.forceDisabled( 'readOnlyMode' );\n\t\t\t} else {\n\t\t\t\tthis.clearForceDisabled( 'readOnlyMode' );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Refreshes the command. The command should update its {@link #isEnabled} and {@link #value} properties\n\t * in this method.\n\t *\n\t * This method is automatically called when\n\t * {@link module:engine/model/document~Document#event:change any changes are applied to the document}.\n\t */\n\trefresh() {\n\t\tthis.isEnabled = true;\n\t}\n\n\t/**\n\t * Disables the command.\n\t *\n\t * Command may be disabled by multiple features or algorithms (at once). When disabling a command, unique id should be passed\n\t * (e.g. feature name). The same identifier should be used when {@link #clearForceDisabled enabling back} the command.\n\t * The command becomes enabled only after all features {@link #clearForceDisabled enabled it back}.\n\t *\n\t * Disabling and enabling a command:\n\t *\n\t *\t\tcommand.isEnabled; // -> true\n\t *\t\tcommand.forceDisabled( 'MyFeature' );\n\t *\t\tcommand.isEnabled; // -> false\n\t *\t\tcommand.clearForceDisabled( 'MyFeature' );\n\t *\t\tcommand.isEnabled; // -> true\n\t *\n\t * Command disabled by multiple features:\n\t *\n\t *\t\tcommand.forceDisabled( 'MyFeature' );\n\t *\t\tcommand.forceDisabled( 'OtherFeature' );\n\t *\t\tcommand.clearForceDisabled( 'MyFeature' );\n\t *\t\tcommand.isEnabled; // -> false\n\t *\t\tcommand.clearForceDisabled( 'OtherFeature' );\n\t *\t\tcommand.isEnabled; // -> true\n\t *\n\t * Multiple disabling with the same identifier is redundant:\n\t *\n\t *\t\tcommand.forceDisabled( 'MyFeature' );\n\t *\t\tcommand.forceDisabled( 'MyFeature' );\n\t *\t\tcommand.clearForceDisabled( 'MyFeature' );\n\t *\t\tcommand.isEnabled; // -> true\n\t *\n\t * **Note:** some commands or algorithms may have more complex logic when it comes to enabling or disabling certain commands,\n\t * so the command might be still disabled after {@link #clearForceDisabled} was used.\n\t *\n\t * @param {String} id Unique identifier for disabling. Use the same id when {@link #clearForceDisabled enabling back} the command.\n\t */\n\tforceDisabled( id ) {\n\t\tthis._disableStack.add( id );\n\n\t\tif ( this._disableStack.size == 1 ) {\n\t\t\tthis.on( 'set:isEnabled', forceDisable, { priority: 'highest' } );\n\t\t\tthis.isEnabled = false;\n\t\t}\n\t}\n\n\t/**\n\t * Clears forced disable previously set through {@link #forceDisabled}. See {@link #forceDisabled}.\n\t *\n\t * @param {String} id Unique identifier, equal to the one passed in {@link #forceDisabled} call.\n\t */\n\tclearForceDisabled( id ) {\n\t\tthis._disableStack.delete( id );\n\n\t\tif ( this._disableStack.size == 0 ) {\n\t\t\tthis.off( 'set:isEnabled', forceDisable );\n\t\t\tthis.refresh();\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * A command may accept parameters. They will be passed from {@link module:core/editor/editor~Editor#execute `editor.execute()`}\n\t * to the command.\n\t *\n\t * The `execute()` method will automatically abort when the command is disabled ({@link #isEnabled} is `false`).\n\t * This behavior is implemented by a high priority listener to the {@link #event:execute} event.\n\t *\n\t * In order to see how to disable a command from \"outside\" see the {@link #isEnabled} documentation.\n\t *\n\t * This method may return a value, which would be forwarded all the way down to the\n\t * {@link module:core/editor/editor~Editor#execute `editor.execute()`}.\n\t *\n\t * @fires execute\n\t */\n\texecute() {}\n\n\t/**\n\t * Destroys the command.\n\t */\n\tdestroy() {\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Event fired by the {@link #execute} method. The command action is a listener to this event so it's\n\t * possible to change/cancel the behavior of the command by listening to this event.\n\t *\n\t * See {@link module:utils/observablemixin~ObservableMixin#decorate} for more information and samples.\n\t *\n\t * **Note:** This event is fired even if command is disabled. However, it is automatically blocked\n\t * by a high priority listener in order to prevent command execution.\n\t *\n\t * @event execute\n\t */\n}\n\nmix( Command, ObservableMixin );\n\n// Helper function that forces command to be disabled.\nfunction forceDisable( evt ) {\n\tevt.return = false;\n\tevt.stop();\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\nimport Command from './command';\n\n/**\n * @module core/multicommand\n */\n\n/**\n * A CKEditor command that aggregates other commands.\n *\n * This command is used to proxy multiple commands. The multi-command is enabled when\n * at least one of its registered child commands is enabled.\n * When executing a multi-command the first command that is enabled will be executed.\n *\n *\t\tconst multiCommand = new MultiCommand( editor );\n *\n *\t\tconst commandFoo = new Command( editor );\n *\t\tconst commandBar = new Command( editor );\n *\n *\t\t// Register child commands.\n *\t\tmultiCommand.registerChildCommand( commandFoo );\n *\t\tmultiCommand.registerChildCommand( commandBar );\n *\n *\t\t// Enable one of the commands.\n *\t\tcommandBar.isEnabled = true;\n *\n *\t\tmultiCommand.execute(); // Will execute commandBar.\n *\n * @extends module:core/command~Command\n */\nexport default class MultiCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor ) {\n\t\tsuper( editor );\n\n\t\t/**\n\t\t * Registered child commands.\n\t\t *\n\t\t * @type {Array.<module:core/command~Command>}\n\t\t * @private\n\t\t */\n\t\tthis._childCommands = [];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\trefresh() {\n\t\t// Override base command refresh(): the command's state is changed when one of child commands changes states.\n\t}\n\n\t/**\n\t * Executes the first of it registered child commands.\n\t *\n\t * @returns {*} The value returned by the {@link module:core/command~Command#execute `command.execute()`}.\n\t */\n\texecute( ...args ) {\n\t\tconst command = this._getFirstEnabledCommand();\n\n\t\treturn command != null && command.execute( args );\n\t}\n\n\t/**\n\t * Registers a child command.\n\t *\n\t * @param {module:core/command~Command} command\n\t */\n\tregisterChildCommand( command ) {\n\t\tthis._childCommands.push( command );\n\n\t\t// Change multi command enabled state when one of registered commands changes state.\n\t\tcommand.on( 'change:isEnabled', () => this._checkEnabled() );\n\n\t\tthis._checkEnabled();\n\t}\n\n\t/**\n\t * Checks if any of child commands is enabled.\n\t *\n\t * @private\n\t */\n\t_checkEnabled() {\n\t\tthis.isEnabled = !!this._getFirstEnabledCommand();\n\t}\n\n\t/**\n\t * Returns a first enabled command or undefined if none of them is enabled.\n\t *\n\t * @returns {module:core/command~Command|undefined}\n\t * @private\n\t */\n\t_getFirstEnabledCommand() {\n\t\treturn this._childCommands.find( command => command.isEnabled );\n\t}\n}\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nexport default listCacheClear;\n","import eq from './eq.js';\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nexport default assocIndexOf;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nexport default listCacheDelete;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nexport default listCacheGet;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nexport default listCacheHas;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nexport default listCacheSet;\n","import listCacheClear from './_listCacheClear.js';\nimport listCacheDelete from './_listCacheDelete.js';\nimport listCacheGet from './_listCacheGet.js';\nimport listCacheHas from './_listCacheHas.js';\nimport listCacheSet from './_listCacheSet.js';\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nexport default ListCache;\n","import ListCache from './_ListCache.js';\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nexport default stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nexport default stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nexport default stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nexport default stackHas;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nexport default Map;\n","import getNative from './_getNative.js';\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nexport default nativeCreate;\n","import nativeCreate from './_nativeCreate.js';\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nexport default hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default hashDelete;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nexport default hashGet;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nexport default hashHas;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nexport default hashSet;\n","import hashClear from './_hashClear.js';\nimport hashDelete from './_hashDelete.js';\nimport hashGet from './_hashGet.js';\nimport hashHas from './_hashHas.js';\nimport hashSet from './_hashSet.js';\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nexport default Hash;\n","import Hash from './_Hash.js';\nimport ListCache from './_ListCache.js';\nimport Map from './_Map.js';\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nexport default mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nexport default isKeyable;\n","import isKeyable from './_isKeyable.js';\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nexport default getMapData;\n","import getMapData from './_getMapData.js';\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default mapCacheDelete;\n","import getMapData from './_getMapData.js';\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nexport default mapCacheGet;\n","import getMapData from './_getMapData.js';\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nexport default mapCacheHas;\n","import getMapData from './_getMapData.js';\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nexport default mapCacheSet;\n","import mapCacheClear from './_mapCacheClear.js';\nimport mapCacheDelete from './_mapCacheDelete.js';\nimport mapCacheGet from './_mapCacheGet.js';\nimport mapCacheHas from './_mapCacheHas.js';\nimport mapCacheSet from './_mapCacheSet.js';\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nexport default MapCache;\n","import ListCache from './_ListCache.js';\nimport Map from './_Map.js';\nimport MapCache from './_MapCache.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nexport default stackSet;\n","import ListCache from './_ListCache.js';\nimport stackClear from './_stackClear.js';\nimport stackDelete from './_stackDelete.js';\nimport stackGet from './_stackGet.js';\nimport stackHas from './_stackHas.js';\nimport stackSet from './_stackSet.js';\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nexport default Stack;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nexport default arrayEach;\n","import overArg from './_overArg.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nexport default nativeKeys;\n","import isPrototype from './_isPrototype.js';\nimport nativeKeys from './_nativeKeys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeys;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeys from './_baseKeys.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nexport default keys;\n","import copyObject from './_copyObject.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nexport default baseAssign;\n","import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nexport default baseAssignIn;\n","import root from './_root.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nexport default cloneBuffer;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nexport default copyArray;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nexport default arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nexport default stubArray;\n","import arrayFilter from './_arrayFilter.js';\nimport stubArray from './stubArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nexport default getSymbols;\n","import copyObject from './_copyObject.js';\nimport getSymbols from './_getSymbols.js';\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nexport default copySymbols;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nexport default arrayPush;\n","import arrayPush from './_arrayPush.js';\nimport getPrototype from './_getPrototype.js';\nimport getSymbols from './_getSymbols.js';\nimport stubArray from './stubArray.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nexport default getSymbolsIn;\n","import copyObject from './_copyObject.js';\nimport getSymbolsIn from './_getSymbolsIn.js';\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nexport default copySymbolsIn;\n","import arrayPush from './_arrayPush.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nexport default baseGetAllKeys;\n","import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbols from './_getSymbols.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nexport default getAllKeys;\n","import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbolsIn from './_getSymbolsIn.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nexport default getAllKeysIn;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nexport default DataView;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nexport default Promise;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nexport default Set;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nexport default WeakMap;\n","import DataView from './_DataView.js';\nimport Map from './_Map.js';\nimport Promise from './_Promise.js';\nimport Set from './_Set.js';\nimport WeakMap from './_WeakMap.js';\nimport baseGetTag from './_baseGetTag.js';\nimport toSource from './_toSource.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nexport default getTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nexport default initCloneArray;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nexport default Uint8Array;\n","import Uint8Array from './_Uint8Array.js';\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nexport default cloneArrayBuffer;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nexport default cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nexport default cloneRegExp;\n","import Symbol from './_Symbol.js';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nexport default cloneSymbol;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nexport default cloneTypedArray;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\nimport cloneDataView from './_cloneDataView.js';\nimport cloneRegExp from './_cloneRegExp.js';\nimport cloneSymbol from './_cloneSymbol.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nexport default initCloneByTag;\n","import isObject from './isObject.js';\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nexport default baseCreate;\n","import baseCreate from './_baseCreate.js';\nimport getPrototype from './_getPrototype.js';\nimport isPrototype from './_isPrototype.js';\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nexport default initCloneObject;\n","import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nexport default baseIsMap;\n","import baseIsMap from './_baseIsMap.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nexport default isMap;\n","import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nexport default baseIsSet;\n","import baseIsSet from './_baseIsSet.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nexport default isSet;\n","import Stack from './_Stack.js';\nimport arrayEach from './_arrayEach.js';\nimport assignValue from './_assignValue.js';\nimport baseAssign from './_baseAssign.js';\nimport baseAssignIn from './_baseAssignIn.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport copyArray from './_copyArray.js';\nimport copySymbols from './_copySymbols.js';\nimport copySymbolsIn from './_copySymbolsIn.js';\nimport getAllKeys from './_getAllKeys.js';\nimport getAllKeysIn from './_getAllKeysIn.js';\nimport getTag from './_getTag.js';\nimport initCloneArray from './_initCloneArray.js';\nimport initCloneByTag from './_initCloneByTag.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isMap from './isMap.js';\nimport isObject from './isObject.js';\nimport isSet from './isSet.js';\nimport keys from './keys.js';\nimport keysIn from './keysIn.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nexport default baseClone;\n","import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\nfunction cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n}\n\nexport default cloneDeepWith;\n","import isObjectLike from './isObjectLike.js';\nimport isPlainObject from './isPlainObject.js';\n\n/**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('<body>');\n * // => false\n */\nfunction isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n}\n\nexport default isElement;\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/config\n */\n\nimport { isPlainObject, isElement, cloneDeepWith } from 'lodash-es';\n\n/**\n * Handles a configuration dictionary.\n */\nexport default class Config {\n\t/**\n\t * Creates an instance of the {@link ~Config} class.\n\t *\n\t * @param {Object} [configurations] The initial configurations to be set. Usually, provided by the user.\n\t * @param {Object} [defaultConfigurations] The default configurations. Usually, provided by the system.\n\t */\n\tconstructor( configurations, defaultConfigurations ) {\n\t\t/**\n\t\t * Store for the whole configuration.\n\t\t *\n\t\t * @private\n\t\t * @member {Object}\n\t\t */\n\t\tthis._config = {};\n\n\t\t// Set default configuration.\n\t\tif ( defaultConfigurations ) {\n\t\t\t// Clone the configuration to make sure that the properties will not be shared\n\t\t\t// between editors and make the watchdog feature work correctly.\n\t\t\tthis.define( cloneConfig( defaultConfigurations ) );\n\t\t}\n\n\t\t// Set initial configuration.\n\t\tif ( configurations ) {\n\t\t\tthis._setObjectToTarget( this._config, configurations );\n\t\t}\n\t}\n\n\t/**\n\t * Set configuration values.\n\t *\n\t * It accepts both a name/value pair or an object, which properties and values will be used to set\n\t * configurations.\n\t *\n\t * It also accepts setting a \"deep configuration\" by using dots in the name. For example, `'resize.width'` sets\n\t * the value for the `width` configuration in the `resize` subset.\n\t *\n\t *\t\tconfig.set( 'width', 500 );\n\t *\t\tconfig.set( 'toolbar.collapsed', true );\n\t *\n\t *\t\t// Equivalent to:\n\t *\t\tconfig.set( {\n\t *\t\t\twidth: 500\n\t *\t\t\ttoolbar: {\n\t *\t\t\t\tcollapsed: true\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * Passing an object as the value will amend the configuration, not replace it.\n\t *\n\t *\t\tconfig.set( 'toolbar', {\n\t *\t\t\tcollapsed: true,\n\t *\t\t} );\n\t *\n\t *\t\tconfig.set( 'toolbar', {\n\t *\t\t\tcolor: 'red',\n\t *\t\t} );\n\t *\n\t *\t\tconfig.get( 'toolbar.collapsed' ); // true\n\t *\t\tconfig.get( 'toolbar.color' ); // 'red'\n\t *\n\t * @param {String|Object} name The configuration name or an object from which take properties as\n\t * configuration entries. Configuration names are case-sensitive.\n\t * @param {*} value The configuration value. Used if a name is passed.\n\t */\n\tset( name, value ) {\n\t\tthis._setToTarget( this._config, name, value );\n\t}\n\n\t/**\n\t * Does exactly the same as {@link #set} with one exception – passed configuration extends\n\t * existing one, but does not overwrite already defined values.\n\t *\n\t * This method is supposed to be called by plugin developers to setup plugin's configurations. It would be\n\t * rarely used for other needs.\n\t *\n\t * @param {String|Object} name The configuration name or an object from which take properties as\n\t * configuration entries. Configuration names are case-sensitive.\n\t * @param {*} value The configuration value. Used if a name is passed.\n\t */\n\tdefine( name, value ) {\n\t\tconst isDefine = true;\n\n\t\tthis._setToTarget( this._config, name, value, isDefine );\n\t}\n\n\t/**\n\t * Gets the value for a configuration entry.\n\t *\n\t *\t\tconfig.get( 'name' );\n\t *\n\t * Deep configurations can be retrieved by separating each part with a dot.\n\t *\n\t *\t\tconfig.get( 'toolbar.collapsed' );\n\t *\n\t * @param {String} name The configuration name. Configuration names are case-sensitive.\n\t * @returns {*} The configuration value or `undefined` if the configuration entry was not found.\n\t */\n\tget( name ) {\n\t\treturn this._getFromSource( this._config, name );\n\t}\n\n\t/**\n\t * Iterates over all top level configuration names.\n\t *\n\t * @returns {Iterable.<String>}\n\t */\n\t* names() {\n\t\tfor ( const name of Object.keys( this._config ) ) {\n\t\t\tyield name;\n\t\t}\n\t}\n\n\t/**\n\t * Saves passed configuration to the specified target (nested object).\n\t *\n\t * @private\n\t * @param {Object} target Nested config object.\n\t * @param {String|Object} name The configuration name or an object from which take properties as\n\t * configuration entries. Configuration names are case-sensitive.\n\t * @param {*} value The configuration value. Used if a name is passed.\n\t * @param {Boolean} [isDefine=false] Define if passed configuration should overwrite existing one.\n\t */\n\t_setToTarget( target, name, value, isDefine = false ) {\n\t\t// In case of an object, iterate through it and call `_setToTarget` again for each property.\n\t\tif ( isPlainObject( name ) ) {\n\t\t\tthis._setObjectToTarget( target, name, isDefine );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// The configuration name should be split into parts if it has dots. E.g. `resize.width` -> [`resize`, `width`].\n\t\tconst parts = name.split( '.' );\n\n\t\t// Take the name of the configuration out of the parts. E.g. `resize.width` -> `width`.\n\t\tname = parts.pop();\n\n\t\t// Iterate over parts to check if currently stored configuration has proper structure.\n\t\tfor ( const part of parts ) {\n\t\t\t// If there is no object for specified part then create one.\n\t\t\tif ( !isPlainObject( target[ part ] ) ) {\n\t\t\t\ttarget[ part ] = {};\n\t\t\t}\n\n\t\t\t// Nested object becomes a target.\n\t\t\ttarget = target[ part ];\n\t\t}\n\n\t\t// In case of value is an object.\n\t\tif ( isPlainObject( value ) ) {\n\t\t\t// We take care of proper config structure.\n\t\t\tif ( !isPlainObject( target[ name ] ) ) {\n\t\t\t\ttarget[ name ] = {};\n\t\t\t}\n\n\t\t\ttarget = target[ name ];\n\n\t\t\t// And iterate through this object calling `_setToTarget` again for each property.\n\t\t\tthis._setObjectToTarget( target, value, isDefine );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Do nothing if we are defining configuration for non empty name.\n\t\tif ( isDefine && typeof target[ name ] != 'undefined' ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttarget[ name ] = value;\n\t}\n\n\t/**\n\t * Get specified configuration from specified source (nested object).\n\t *\n\t * @private\n\t * @param {Object} source level of nested object.\n\t * @param {String} name The configuration name. Configuration names are case-sensitive.\n\t * @returns {*} The configuration value or `undefined` if the configuration entry was not found.\n\t */\n\t_getFromSource( source, name ) {\n\t\t// The configuration name should be split into parts if it has dots. E.g. `resize.width` -> [`resize`, `width`].\n\t\tconst parts = name.split( '.' );\n\n\t\t// Take the name of the configuration out of the parts. E.g. `resize.width` -> `width`.\n\t\tname = parts.pop();\n\n\t\t// Iterate over parts to check if currently stored configuration has proper structure.\n\t\tfor ( const part of parts ) {\n\t\t\tif ( !isPlainObject( source[ part ] ) ) {\n\t\t\t\tsource = null;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Nested object becomes a source.\n\t\t\tsource = source[ part ];\n\t\t}\n\n\t\t// Always returns undefined for non existing configuration.\n\t\treturn source ? cloneConfig( source[ name ] ) : undefined;\n\t}\n\n\t/**\n\t * Iterates through passed object and calls {@link #_setToTarget} method with object key and value for each property.\n\t *\n\t * @private\n\t * @param {Object} target Nested config object.\n\t * @param {Object} configuration Configuration data set\n\t * @param {Boolean} [isDefine] Defines if passed configuration is default configuration or not.\n\t */\n\t_setObjectToTarget( target, configuration, isDefine ) {\n\t\tObject.keys( configuration ).forEach( key => {\n\t\t\tthis._setToTarget( target, key, configuration[ key ], isDefine );\n\t\t} );\n\t}\n}\n\n// Clones configuration object or value.\n// @param {*} source Source configuration\n// @returns {*} Cloned configuration value.\nfunction cloneConfig( source ) {\n\treturn cloneDeepWith( source, leaveDOMReferences );\n}\n\n// A customized function for cloneDeepWith.\n// It will leave references to DOM Elements instead of cloning them.\n//\n// @param {*} value\n// @returns {Element|undefined}\nfunction leaveDOMReferences( value ) {\n\treturn isElement( value ) ? value : undefined;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/isiterable\n */\n\n/**\n * Checks if value implements iterator interface.\n *\n * @param {*} value The value to check.\n * @returns {Boolean} True if value implements iterator interface.\n */\nexport default function isIterable( value ) {\n\treturn !!( value && value[ Symbol.iterator ] );\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/collection\n */\n\nimport EmitterMixin from './emittermixin';\nimport CKEditorError from './ckeditorerror';\nimport uid from './uid';\nimport isIterable from './isiterable';\nimport mix from './mix';\n\n/**\n * Collections are ordered sets of objects. Items in the collection can be retrieved by their indexes\n * in the collection (like in an array) or by their ids.\n *\n * If an object without an `id` property is being added to the collection, the `id` property will be generated\n * automatically. Note that the automatically generated id is unique only within this single collection instance.\n *\n * By default an item in the collection is identified by its `id` property. The name of the identifier can be\n * configured through the constructor of the collection.\n *\n * @mixes module:utils/emittermixin~EmitterMixin\n */\nexport default class Collection {\n\t/**\n\t * Creates a new Collection instance.\n\t *\n\t * You can provide an iterable of initial items the collection will be created with:\n\t *\n\t *\t\tconst collection = new Collection( [ { id: 'John' }, { id: 'Mike' } ] );\n\t *\n\t *\t\tconsole.log( collection.get( 0 ) ); // -> { id: 'John' }\n\t *\t\tconsole.log( collection.get( 1 ) ); // -> { id: 'Mike' }\n\t *\t\tconsole.log( collection.get( 'Mike' ) ); // -> { id: 'Mike' }\n\t *\n\t * Or you can first create a collection and then add new items using the {@link #add} method:\n\t *\n\t *\t\tconst collection = new Collection();\n\t *\n\t *\t\tcollection.add( { id: 'John' } );\n\t *\t\tconsole.log( collection.get( 0 ) ); // -> { id: 'John' }\n\t *\n\t * Whatever option you choose, you can always pass a configuration object as the last argument\n\t * of the constructor:\n\t *\n\t *\t\tconst emptyCollection = new Collection( { idProperty: 'name' } );\n\t *\t\temptyCollection.add( { name: 'John' } );\n\t *\t\tconsole.log( collection.get( 'John' ) ); // -> { name: 'John' }\n\t *\n\t *\t\tconst nonEmptyCollection = new Collection( [ { name: 'John' } ], { idProperty: 'name' } );\n\t *\t\tnonEmptyCollection.add( { name: 'George' } );\n\t *\t\tconsole.log( collection.get( 'George' ) ); // -> { name: 'George' }\n\t *\t\tconsole.log( collection.get( 'John' ) ); // -> { name: 'John' }\n\t *\n\t * @param {Iterable.<Object>|Object} [initialItemsOrOptions] The initial items of the collection or\n\t * the options object.\n\t * @param {Object} [options={}] The options object, when the first argument is an array of initial items.\n\t * @param {String} [options.idProperty='id'] The name of the property which is used to identify an item.\n\t * Items that do not have such a property will be assigned one when added to the collection.\n\t */\n\tconstructor( initialItemsOrOptions = {}, options = {} ) {\n\t\tconst hasInitialItems = isIterable( initialItemsOrOptions );\n\n\t\tif ( !hasInitialItems ) {\n\t\t\toptions = initialItemsOrOptions;\n\t\t}\n\n\t\t/**\n\t\t * The internal list of items in the collection.\n\t\t *\n\t\t * @private\n\t\t * @member {Object[]}\n\t\t */\n\t\tthis._items = [];\n\n\t\t/**\n\t\t * The internal map of items in the collection.\n\t\t *\n\t\t * @private\n\t\t * @member {Map}\n\t\t */\n\t\tthis._itemMap = new Map();\n\n\t\t/**\n\t\t * The name of the property which is considered to identify an item.\n\t\t *\n\t\t * @private\n\t\t * @member {String}\n\t\t */\n\t\tthis._idProperty = options.idProperty || 'id';\n\n\t\t/**\n\t\t * A helper mapping external items of a bound collection ({@link #bindTo})\n\t\t * and actual items of this collection. It provides information\n\t\t * necessary to properly remove items bound to another collection.\n\t\t *\n\t\t * See {@link #_bindToInternalToExternalMap}.\n\t\t *\n\t\t * @protected\n\t\t * @member {WeakMap}\n\t\t */\n\t\tthis._bindToExternalToInternalMap = new WeakMap();\n\n\t\t/**\n\t\t * A helper mapping items of this collection to external items of a bound collection\n\t\t * ({@link #bindTo}). It provides information necessary to manage the bindings, e.g.\n\t\t * to avoid loops in two–way bindings.\n\t\t *\n\t\t * See {@link #_bindToExternalToInternalMap}.\n\t\t *\n\t\t * @protected\n\t\t * @member {WeakMap}\n\t\t */\n\t\tthis._bindToInternalToExternalMap = new WeakMap();\n\n\t\t/**\n\t\t * Stores indexes of skipped items from bound external collection.\n\t\t *\n\t\t * @private\n\t\t * @member {Array}\n\t\t */\n\t\tthis._skippedIndexesFromExternal = [];\n\n\t\t// Set the initial content of the collection (if provided in the constructor).\n\t\tif ( hasInitialItems ) {\n\t\t\tfor ( const item of initialItemsOrOptions ) {\n\t\t\t\tthis._items.push( item );\n\t\t\t\tthis._itemMap.set( this._getItemIdBeforeAdding( item ), item );\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * A collection instance this collection is bound to as a result\n\t\t * of calling {@link #bindTo} method.\n\t\t *\n\t\t * @protected\n\t\t * @member {module:utils/collection~Collection} #_bindToCollection\n\t\t */\n\t}\n\n\t/**\n\t * The number of items available in the collection.\n\t *\n\t * @member {Number} #length\n\t */\n\tget length() {\n\t\treturn this._items.length;\n\t}\n\n\t/**\n\t * Returns the first item from the collection or null when collection is empty.\n\t *\n\t * @returns {Object|null} The first item or `null` if collection is empty.\n\t */\n\tget first() {\n\t\treturn this._items[ 0 ] || null;\n\t}\n\n\t/**\n\t * Returns the last item from the collection or null when collection is empty.\n\t *\n\t * @returns {Object|null} The last item or `null` if collection is empty.\n\t */\n\tget last() {\n\t\treturn this._items[ this.length - 1 ] || null;\n\t}\n\n\t/**\n\t * Adds an item into the collection.\n\t *\n\t * If the item does not have an id, then it will be automatically generated and set on the item.\n\t *\n\t * @chainable\n\t * @param {Object} item\n\t * @param {Number} [index] The position of the item in the collection. The item\n\t * is pushed to the collection when `index` not specified.\n\t * @fires add\n\t * @fires change\n\t */\n\tadd( item, index ) {\n\t\treturn this.addMany( [ item ], index );\n\t}\n\n\t/**\n\t * Adds multiple items into the collection.\n\t *\n\t * Any item not containing an id will get an automatically generated one.\n\t *\n\t * @chainable\n\t * @param {Iterable.<Object>} item\n\t * @param {Number} [index] The position of the insertion. Items will be appended if no `index` is specified.\n\t * @fires add\n\t * @fires change\n\t */\n\taddMany( items, index ) {\n\t\tif ( index === undefined ) {\n\t\t\tindex = this._items.length;\n\t\t} else if ( index > this._items.length || index < 0 ) {\n\t\t\t/**\n\t\t\t * The `index` passed to {@link module:utils/collection~Collection#addMany `Collection#addMany()`}\n\t\t\t * is invalid. It must be a number between 0 and the collection's length.\n\t\t\t *\n\t\t\t * @error collection-add-item-invalid-index\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'collection-add-item-invalid-index', this );\n\t\t}\n\n\t\tfor ( let offset = 0; offset < items.length; offset++ ) {\n\t\t\tconst item = items[ offset ];\n\t\t\tconst itemId = this._getItemIdBeforeAdding( item );\n\t\t\tconst currentItemIndex = index + offset;\n\n\t\t\tthis._items.splice( currentItemIndex, 0, item );\n\t\t\tthis._itemMap.set( itemId, item );\n\n\t\t\tthis.fire( 'add', item, currentItemIndex );\n\t\t}\n\n\t\tthis.fire( 'change', {\n\t\t\tadded: items,\n\t\t\tremoved: [],\n\t\t\tindex\n\t\t} );\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Gets an item by its ID or index.\n\t *\n\t * @param {String|Number} idOrIndex The item ID or index in the collection.\n\t * @returns {Object|null} The requested item or `null` if such item does not exist.\n\t */\n\tget( idOrIndex ) {\n\t\tlet item;\n\n\t\tif ( typeof idOrIndex == 'string' ) {\n\t\t\titem = this._itemMap.get( idOrIndex );\n\t\t} else if ( typeof idOrIndex == 'number' ) {\n\t\t\titem = this._items[ idOrIndex ];\n\t\t} else {\n\t\t\t/**\n\t\t\t * An index or ID must be given.\n\t\t\t *\n\t\t\t * @error collection-get-invalid-arg\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'collection-get-invalid-arg', this );\n\t\t}\n\n\t\treturn item || null;\n\t}\n\n\t/**\n\t * Returns a Boolean indicating whether the collection contains an item.\n\t *\n\t * @param {Object|String} itemOrId The item or its ID in the collection.\n\t * @returns {Boolean} `true` if the collection contains the item, `false` otherwise.\n\t */\n\thas( itemOrId ) {\n\t\tif ( typeof itemOrId == 'string' ) {\n\t\t\treturn this._itemMap.has( itemOrId );\n\t\t} else { // Object\n\t\t\tconst idProperty = this._idProperty;\n\t\t\tconst id = itemOrId[ idProperty ];\n\n\t\t\treturn this._itemMap.has( id );\n\t\t}\n\t}\n\n\t/**\n\t * Gets an index of an item in the collection.\n\t * When an item is not defined in the collection, the index will equal -1.\n\t *\n\t * @param {Object|String} itemOrId The item or its ID in the collection.\n\t * @returns {Number} The index of a given item.\n\t */\n\tgetIndex( itemOrId ) {\n\t\tlet item;\n\n\t\tif ( typeof itemOrId == 'string' ) {\n\t\t\titem = this._itemMap.get( itemOrId );\n\t\t} else {\n\t\t\titem = itemOrId;\n\t\t}\n\n\t\treturn this._items.indexOf( item );\n\t}\n\n\t/**\n\t * Removes an item from the collection.\n\t *\n\t * @param {Object|Number|String} subject The item to remove, its ID or index in the collection.\n\t * @returns {Object} The removed item.\n\t * @fires remove\n\t * @fires change\n\t */\n\tremove( subject ) {\n\t\tconst [ item, index ] = this._remove( subject );\n\n\t\tthis.fire( 'change', {\n\t\t\tadded: [],\n\t\t\tremoved: [ item ],\n\t\t\tindex\n\t\t} );\n\n\t\treturn item;\n\t}\n\n\t/**\n\t * Executes the callback for each item in the collection and composes an array or values returned by this callback.\n\t *\n\t * @param {Function} callback\n\t * @param {Object} callback.item\n\t * @param {Number} callback.index\n\t * @param {Object} ctx Context in which the `callback` will be called.\n\t * @returns {Array} The result of mapping.\n\t */\n\tmap( callback, ctx ) {\n\t\treturn this._items.map( callback, ctx );\n\t}\n\n\t/**\n\t * Finds the first item in the collection for which the `callback` returns a true value.\n\t *\n\t * @param {Function} callback\n\t * @param {Object} callback.item\n\t * @param {Number} callback.index\n\t * @param {Object} ctx Context in which the `callback` will be called.\n\t * @returns {Object} The item for which `callback` returned a true value.\n\t */\n\tfind( callback, ctx ) {\n\t\treturn this._items.find( callback, ctx );\n\t}\n\n\t/**\n\t * Returns an array with items for which the `callback` returned a true value.\n\t *\n\t * @param {Function} callback\n\t * @param {Object} callback.item\n\t * @param {Number} callback.index\n\t * @param {Object} ctx Context in which the `callback` will be called.\n\t * @returns {Object[]} The array with matching items.\n\t */\n\tfilter( callback, ctx ) {\n\t\treturn this._items.filter( callback, ctx );\n\t}\n\n\t/**\n\t * Removes all items from the collection and destroys the binding created using\n\t * {@link #bindTo}.\n\t *\n\t * @fires remove\n\t * @fires change\n\t */\n\tclear() {\n\t\tif ( this._bindToCollection ) {\n\t\t\tthis.stopListening( this._bindToCollection );\n\t\t\tthis._bindToCollection = null;\n\t\t}\n\n\t\tconst removedItems = Array.from( this._items );\n\n\t\twhile ( this.length ) {\n\t\t\tthis._remove( 0 );\n\t\t}\n\n\t\tthis.fire( 'change', {\n\t\t\tadded: [],\n\t\t\tremoved: removedItems,\n\t\t\tindex: 0\n\t\t} );\n\t}\n\n\t/**\n\t * Binds and synchronizes the collection with another one.\n\t *\n\t * The binding can be a simple factory:\n\t *\n\t *\t\tclass FactoryClass {\n\t *\t\t\tconstructor( data ) {\n\t *\t\t\t\tthis.label = data.label;\n\t *\t\t\t}\n\t *\t\t}\n\t *\n\t *\t\tconst source = new Collection( { idProperty: 'label' } );\n\t *\t\tconst target = new Collection();\n\t *\n\t *\t\ttarget.bindTo( source ).as( FactoryClass );\n\t *\n\t *\t\tsource.add( { label: 'foo' } );\n\t *\t\tsource.add( { label: 'bar' } );\n\t *\n\t *\t\tconsole.log( target.length ); // 2\n\t *\t\tconsole.log( target.get( 1 ).label ); // 'bar'\n\t *\n\t *\t\tsource.remove( 0 );\n\t *\t\tconsole.log( target.length ); // 1\n\t *\t\tconsole.log( target.get( 0 ).label ); // 'bar'\n\t *\n\t * or the factory driven by a custom callback:\n\t *\n\t *\t\tclass FooClass {\n\t *\t\t\tconstructor( data ) {\n\t *\t\t\t\tthis.label = data.label;\n\t *\t\t\t}\n\t *\t\t}\n\t *\n\t *\t\tclass BarClass {\n\t *\t\t\tconstructor( data ) {\n\t *\t\t\t\tthis.label = data.label;\n\t *\t\t\t}\n\t *\t\t}\n\t *\n\t *\t\tconst source = new Collection( { idProperty: 'label' } );\n\t *\t\tconst target = new Collection();\n\t *\n\t *\t\ttarget.bindTo( source ).using( ( item ) => {\n\t *\t\t\tif ( item.label == 'foo' ) {\n\t *\t\t\t\treturn new FooClass( item );\n\t *\t\t\t} else {\n\t *\t\t\t\treturn new BarClass( item );\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t *\t\tsource.add( { label: 'foo' } );\n\t *\t\tsource.add( { label: 'bar' } );\n\t *\n\t *\t\tconsole.log( target.length ); // 2\n\t *\t\tconsole.log( target.get( 0 ) instanceof FooClass ); // true\n\t *\t\tconsole.log( target.get( 1 ) instanceof BarClass ); // true\n\t *\n\t * or the factory out of property name:\n\t *\n\t *\t\tconst source = new Collection( { idProperty: 'label' } );\n\t *\t\tconst target = new Collection();\n\t *\n\t *\t\ttarget.bindTo( source ).using( 'label' );\n\t *\n\t *\t\tsource.add( { label: { value: 'foo' } } );\n\t *\t\tsource.add( { label: { value: 'bar' } } );\n\t *\n\t *\t\tconsole.log( target.length ); // 2\n\t *\t\tconsole.log( target.get( 0 ).value ); // 'foo'\n\t *\t\tconsole.log( target.get( 1 ).value ); // 'bar'\n\t *\n\t * It's possible to skip specified items by returning falsy value:\n\t *\n\t *\t\tconst source = new Collection();\n\t *\t\tconst target = new Collection();\n\t *\n\t *\t\ttarget.bindTo( source ).using( item => {\n\t *\t\t\tif ( item.hidden ) {\n\t *\t\t\t\treturn null;\n\t *\t\t\t}\n\t *\n\t *\t\t\treturn item;\n\t *\t\t} );\n\t *\n\t *\t\tsource.add( { hidden: true } );\n\t *\t\tsource.add( { hidden: false } );\n\t *\n\t *\t\tconsole.log( source.length ); // 2\n\t *\t\tconsole.log( target.length ); // 1\n\t *\n\t * **Note**: {@link #clear} can be used to break the binding.\n\t *\n\t * @param {module:utils/collection~Collection} externalCollection A collection to be bound.\n\t * @returns {Object}\n\t * @returns {module:utils/collection~CollectionBindToChain} The binding chain object.\n\t */\n\tbindTo( externalCollection ) {\n\t\tif ( this._bindToCollection ) {\n\t\t\t/**\n\t\t\t * The collection cannot be bound more than once.\n\t\t\t *\n\t\t\t * @error collection-bind-to-rebind\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'collection-bind-to-rebind', this );\n\t\t}\n\n\t\tthis._bindToCollection = externalCollection;\n\n\t\treturn {\n\t\t\tas: Class => {\n\t\t\t\tthis._setUpBindToBinding( item => new Class( item ) );\n\t\t\t},\n\n\t\t\tusing: callbackOrProperty => {\n\t\t\t\tif ( typeof callbackOrProperty == 'function' ) {\n\t\t\t\t\tthis._setUpBindToBinding( item => callbackOrProperty( item ) );\n\t\t\t\t} else {\n\t\t\t\t\tthis._setUpBindToBinding( item => item[ callbackOrProperty ] );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Finalizes and activates a binding initiated by {#bindTo}.\n\t *\n\t * @protected\n\t * @param {Function} factory A function which produces collection items.\n\t */\n\t_setUpBindToBinding( factory ) {\n\t\tconst externalCollection = this._bindToCollection;\n\n\t\t// Adds the item to the collection once a change has been done to the external collection.\n\t\t//\n\t\t// @private\n\t\tconst addItem = ( evt, externalItem, index ) => {\n\t\t\tconst isExternalBoundToThis = externalCollection._bindToCollection == this;\n\t\t\tconst externalItemBound = externalCollection._bindToInternalToExternalMap.get( externalItem );\n\n\t\t\t// If an external collection is bound to this collection, which makes it a 2–way binding,\n\t\t\t// and the particular external collection item is already bound, don't add it here.\n\t\t\t// The external item has been created **out of this collection's item** and (re)adding it will\n\t\t\t// cause a loop.\n\t\t\tif ( isExternalBoundToThis && externalItemBound ) {\n\t\t\t\tthis._bindToExternalToInternalMap.set( externalItem, externalItemBound );\n\t\t\t\tthis._bindToInternalToExternalMap.set( externalItemBound, externalItem );\n\t\t\t} else {\n\t\t\t\tconst item = factory( externalItem );\n\n\t\t\t\t// When there is no item we need to remember skipped index first and then we can skip this item.\n\t\t\t\tif ( !item ) {\n\t\t\t\t\tthis._skippedIndexesFromExternal.push( index );\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Lets try to put item at the same index as index in external collection\n\t\t\t\t// but when there are a skipped items in one or both collections we need to recalculate this index.\n\t\t\t\tlet finalIndex = index;\n\n\t\t\t\t// When we try to insert item after some skipped items from external collection we need\n\t\t\t\t// to include this skipped items and decrease index.\n\t\t\t\t//\n\t\t\t\t// For the following example:\n\t\t\t\t// external -> [ 'A', 'B - skipped for internal', 'C - skipped for internal' ]\n\t\t\t\t// internal -> [ A ]\n\t\t\t\t//\n\t\t\t\t// Another item is been added at the end of external collection:\n\t\t\t\t// external.add( 'D' )\n\t\t\t\t// external -> [ 'A', 'B - skipped for internal', 'C - skipped for internal', 'D' ]\n\t\t\t\t//\n\t\t\t\t// We can't just add 'D' to internal at the same index as index in external because\n\t\t\t\t// this will produce empty indexes what is invalid:\n\t\t\t\t// internal -> [ 'A', empty, empty, 'D' ]\n\t\t\t\t//\n\t\t\t\t// So we need to include skipped items and decrease index\n\t\t\t\t// internal -> [ 'A', 'D' ]\n\t\t\t\tfor ( const skipped of this._skippedIndexesFromExternal ) {\n\t\t\t\t\tif ( index > skipped ) {\n\t\t\t\t\t\tfinalIndex--;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// We need to take into consideration that external collection could skip some items from\n\t\t\t\t// internal collection.\n\t\t\t\t//\n\t\t\t\t// For the following example:\n\t\t\t\t// internal -> [ 'A', 'B - skipped for external', 'C - skipped for external' ]\n\t\t\t\t// external -> [ A ]\n\t\t\t\t//\n\t\t\t\t// Another item is been added at the end of external collection:\n\t\t\t\t// external.add( 'D' )\n\t\t\t\t// external -> [ 'A', 'D' ]\n\t\t\t\t//\n\t\t\t\t// We need to include skipped items and place new item after them:\n\t\t\t\t// internal -> [ 'A', 'B - skipped for external', 'C - skipped for external', 'D' ]\n\t\t\t\tfor ( const skipped of externalCollection._skippedIndexesFromExternal ) {\n\t\t\t\t\tif ( finalIndex >= skipped ) {\n\t\t\t\t\t\tfinalIndex++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._bindToExternalToInternalMap.set( externalItem, item );\n\t\t\t\tthis._bindToInternalToExternalMap.set( item, externalItem );\n\t\t\t\tthis.add( item, finalIndex );\n\n\t\t\t\t// After adding new element to internal collection we need update indexes\n\t\t\t\t// of skipped items in external collection.\n\t\t\t\tfor ( let i = 0; i < externalCollection._skippedIndexesFromExternal.length; i++ ) {\n\t\t\t\t\tif ( finalIndex <= externalCollection._skippedIndexesFromExternal[ i ] ) {\n\t\t\t\t\t\texternalCollection._skippedIndexesFromExternal[ i ]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Load the initial content of the collection.\n\t\tfor ( const externalItem of externalCollection ) {\n\t\t\taddItem( null, externalItem, externalCollection.getIndex( externalItem ) );\n\t\t}\n\n\t\t// Synchronize the with collection as new items are added.\n\t\tthis.listenTo( externalCollection, 'add', addItem );\n\n\t\t// Synchronize the with collection as new items are removed.\n\t\tthis.listenTo( externalCollection, 'remove', ( evt, externalItem, index ) => {\n\t\t\tconst item = this._bindToExternalToInternalMap.get( externalItem );\n\n\t\t\tif ( item ) {\n\t\t\t\tthis.remove( item );\n\t\t\t}\n\n\t\t\t// After removing element from external collection we need update/remove indexes\n\t\t\t// of skipped items in internal collection.\n\t\t\tthis._skippedIndexesFromExternal = this._skippedIndexesFromExternal.reduce( ( result, skipped ) => {\n\t\t\t\tif ( index < skipped ) {\n\t\t\t\t\tresult.push( skipped - 1 );\n\t\t\t\t}\n\n\t\t\t\tif ( index > skipped ) {\n\t\t\t\t\tresult.push( skipped );\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t}, [] );\n\t\t} );\n\t}\n\n\t/**\n\t * Returns an unique id property for a given `item`.\n\t *\n\t * The method will generate new id and assign it to the `item` if it doesn't have any.\n\t *\n\t * @private\n\t * @param {Object} item Item to be added.\n\t * @returns {String}\n\t */\n\t_getItemIdBeforeAdding( item ) {\n\t\tconst idProperty = this._idProperty;\n\t\tlet itemId;\n\n\t\tif ( ( idProperty in item ) ) {\n\t\t\titemId = item[ idProperty ];\n\n\t\t\tif ( typeof itemId != 'string' ) {\n\t\t\t\t/**\n\t\t\t\t * This item's ID should be a string.\n\t\t\t\t *\n\t\t\t\t * @error collection-add-invalid-id\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'collection-add-invalid-id', this );\n\t\t\t}\n\n\t\t\tif ( this.get( itemId ) ) {\n\t\t\t\t/**\n\t\t\t\t * This item already exists in the collection.\n\t\t\t\t *\n\t\t\t\t * @error collection-add-item-already-exists\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'collection-add-item-already-exists', this );\n\t\t\t}\n\t\t} else {\n\t\t\titem[ idProperty ] = itemId = uid();\n\t\t}\n\n\t\treturn itemId;\n\t}\n\n\t/**\n\t * Core {@link #remove} method implementation shared in other functions.\n\t *\n\t * In contrast this method **does not** fire the {@link #event:change} event.\n\t *\n\t * @private\n\t * @param {Object} subject The item to remove, its id or index in the collection.\n\t * @returns {Array} Returns an array with the removed item and its index.\n\t * @fires remove\n\t */\n\t_remove( subject ) {\n\t\tlet index, id, item;\n\t\tlet itemDoesNotExist = false;\n\t\tconst idProperty = this._idProperty;\n\n\t\tif ( typeof subject == 'string' ) {\n\t\t\tid = subject;\n\t\t\titem = this._itemMap.get( id );\n\t\t\titemDoesNotExist = !item;\n\n\t\t\tif ( item ) {\n\t\t\t\tindex = this._items.indexOf( item );\n\t\t\t}\n\t\t} else if ( typeof subject == 'number' ) {\n\t\t\tindex = subject;\n\t\t\titem = this._items[ index ];\n\t\t\titemDoesNotExist = !item;\n\n\t\t\tif ( item ) {\n\t\t\t\tid = item[ idProperty ];\n\t\t\t}\n\t\t} else {\n\t\t\titem = subject;\n\t\t\tid = item[ idProperty ];\n\t\t\tindex = this._items.indexOf( item );\n\t\t\titemDoesNotExist = ( index == -1 || !this._itemMap.get( id ) );\n\t\t}\n\n\t\tif ( itemDoesNotExist ) {\n\t\t\t/**\n\t\t\t * Item not found.\n\t\t\t *\n\t\t\t * @error collection-remove-404\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'collection-remove-404', this );\n\t\t}\n\n\t\tthis._items.splice( index, 1 );\n\t\tthis._itemMap.delete( id );\n\n\t\tconst externalItem = this._bindToInternalToExternalMap.get( item );\n\t\tthis._bindToInternalToExternalMap.delete( item );\n\t\tthis._bindToExternalToInternalMap.delete( externalItem );\n\n\t\tthis.fire( 'remove', item, index );\n\n\t\treturn [ item, index ];\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * @returns {Iterable.<*>}\n\t */\n\t[ Symbol.iterator ]() {\n\t\treturn this._items[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Fired when an item is added to the collection.\n\t *\n\t * @event add\n\t * @param {Object} item The added item.\n\t */\n\n\t/**\n\t * Fired when the collection was changed due to adding or removing items.\n\t *\n\t * @event change\n\t * @param {Iterable.<Object>} added A list of added items.\n\t * @param {Iterable.<Object>} removed A list of removed items.\n\t * @param {Number} index An index where the addition or removal occurred.\n\t */\n\n\t/**\n\t * Fired when an item is removed from the collection.\n\t *\n\t * @event remove\n\t * @param {Object} item The removed item.\n\t * @param {Number} index Index from which item was removed.\n\t */\n}\n\nmix( Collection, EmitterMixin );\n\n/**\n * An object returned by the {@link module:utils/collection~Collection#bindTo `bindTo()`} method\n * providing functions that specify the type of the binding.\n *\n * See the {@link module:utils/collection~Collection#bindTo `bindTo()`} documentation for examples.\n *\n * @interface module:utils/collection~CollectionBindToChain\n */\n\n/**\n * Creates a callback or a property binding.\n *\n * @method #using\n * @param {Function|String} callbackOrProperty When the function is passed, it should return\n * the collection items. When the string is provided, the property value is used to create the bound collection items.\n */\n\n/**\n * Creates the class factory binding in which items of the source collection are passed to\n * the constructor of the specified class.\n *\n * @method #as\n * @param {Function} Class The class constructor used to create instances in the factory.\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module core/plugincollection\n */\n\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport EmitterMixin from '@ckeditor/ckeditor5-utils/src/emittermixin';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\n\n/**\n * Manages a list of CKEditor plugins, including loading, resolving dependencies and initialization.\n *\n * @mixes module:utils/emittermixin~EmitterMixin\n */\nexport default class PluginCollection {\n\t/**\n\t * Creates an instance of the plugin collection class.\n\t * Allows loading and initializing plugins and their dependencies.\n\t * Allows providing a list of already loaded plugins. These plugins will not be destroyed along with this collection.\n\t *\n\t * @param {module:core/editor/editor~Editor|module:core/context~Context} context\n\t * @param {Array.<Function>} [availablePlugins] Plugins (constructors) which the collection will be able to use\n\t * when {@link module:core/plugincollection~PluginCollection#init} is used with the plugin names (strings, instead of constructors).\n\t * Usually, the editor will pass its built-in plugins to the collection so they can later be\n\t * used in `config.plugins` or `config.removePlugins` by names.\n\t * @param {Iterable.<Array>} contextPlugins A list of already initialized plugins represented by a\n\t * `[ PluginConstructor, pluginInstance ]` pair.\n\t */\n\tconstructor( context, availablePlugins = [], contextPlugins = [] ) {\n\t\t/**\n\t\t * @protected\n\t\t * @type {module:core/editor/editor~Editor|module:core/context~Context}\n\t\t */\n\t\tthis._context = context;\n\n\t\t/**\n\t\t * @protected\n\t\t * @type {Map}\n\t\t */\n\t\tthis._plugins = new Map();\n\n\t\t/**\n\t\t * A map of plugin constructors that can be retrieved by their names.\n\t\t *\n\t\t * @protected\n\t\t * @type {Map.<String|Function,Function>}\n\t\t */\n\t\tthis._availablePlugins = new Map();\n\n\t\tfor ( const PluginConstructor of availablePlugins ) {\n\t\t\tif ( PluginConstructor.pluginName ) {\n\t\t\t\tthis._availablePlugins.set( PluginConstructor.pluginName, PluginConstructor );\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Map of {@link module:core/contextplugin~ContextPlugin context plugins} which can be retrieved by their constructors or instances.\n\t\t *\n\t\t * @protected\n\t\t * @type {Map<Function,Function>}\n\t\t */\n\t\tthis._contextPlugins = new Map();\n\n\t\tfor ( const [ PluginConstructor, pluginInstance ] of contextPlugins ) {\n\t\t\tthis._contextPlugins.set( PluginConstructor, pluginInstance );\n\t\t\tthis._contextPlugins.set( pluginInstance, PluginConstructor );\n\n\t\t\t// To make it possible to require a plugin by its name.\n\t\t\tif ( PluginConstructor.pluginName ) {\n\t\t\t\tthis._availablePlugins.set( PluginConstructor.pluginName, PluginConstructor );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * Returns `[ PluginConstructor, pluginInstance ]` pairs.\n\t *\n\t * @returns {Iterable.<Array>}\n\t */\n\t* [ Symbol.iterator ]() {\n\t\tfor ( const entry of this._plugins ) {\n\t\t\tif ( typeof entry[ 0 ] == 'function' ) {\n\t\t\t\tyield entry;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Gets the plugin instance by its constructor or name.\n\t *\n\t *\t\t// Check if 'Clipboard' plugin was loaded.\n\t *\t\tif ( editor.plugins.has( 'ClipboardPipeline' ) ) {\n\t *\t\t\t// Get clipboard plugin instance\n\t *\t\t\tconst clipboard = editor.plugins.get( 'ClipboardPipeline' );\n\t *\n\t *\t\t\tthis.listenTo( clipboard, 'inputTransformation', ( evt, data ) => {\n\t *\t\t\t\t// Do something on clipboard input.\n\t *\t\t\t} );\n\t *\t\t}\n\t *\n\t * **Note**: This method will throw an error if a plugin is not loaded. Use `{@link #has editor.plugins.has()}`\n\t * to check if a plugin is available.\n\t *\n\t * @param {Function|String} key The plugin constructor or {@link module:core/plugin~PluginInterface.pluginName name}.\n\t * @returns {module:core/plugin~PluginInterface}\n\t */\n\tget( key ) {\n\t\tconst plugin = this._plugins.get( key );\n\n\t\tif ( !plugin ) {\n\t\t\tlet pluginName = key;\n\n\t\t\tif ( typeof key == 'function' ) {\n\t\t\t\tpluginName = key.pluginName || key.name;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * The plugin is not loaded and could not be obtained.\n\t\t\t *\n\t\t\t * Plugin classes (constructors) need to be provided to the editor and must be loaded before they can be obtained from\n\t\t\t * the plugin collection.\n\t\t\t * This is usually done in CKEditor 5 builds by setting the {@link module:core/editor/editor~Editor.builtinPlugins}\n\t\t\t * property.\n\t\t\t *\n\t\t\t * **Note**: You can use `{@link module:core/plugincollection~PluginCollection#has editor.plugins.has()}`\n\t\t\t * to check if a plugin was loaded.\n\t\t\t *\n\t\t\t * @error plugincollection-plugin-not-loaded\n\t\t\t * @param {String} plugin The name of the plugin which is not loaded.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'plugincollection-plugin-not-loaded', this._context, { plugin: pluginName } );\n\t\t}\n\n\t\treturn plugin;\n\t}\n\n\t/**\n\t * Checks if a plugin is loaded.\n\t *\n\t *\t\t// Check if the 'Clipboard' plugin was loaded.\n\t *\t\tif ( editor.plugins.has( 'ClipboardPipeline' ) ) {\n\t *\t\t\t// Now use the clipboard plugin instance:\n\t *\t\t\tconst clipboard = editor.plugins.get( 'ClipboardPipeline' );\n\t *\n\t *\t\t\t// ...\n\t *\t\t}\n\t *\n\t * @param {Function|String} key The plugin constructor or {@link module:core/plugin~PluginInterface.pluginName name}.\n\t * @returns {Boolean}\n\t */\n\thas( key ) {\n\t\treturn this._plugins.has( key );\n\t}\n\n\t/**\n\t * Initializes a set of plugins and adds them to the collection.\n\t *\n\t * @param {Array.<Function|String>} plugins An array of {@link module:core/plugin~PluginInterface plugin constructors}\n\t * or {@link module:core/plugin~PluginInterface.pluginName plugin names}.\n\t * @param {Array.<String|Function>} [pluginsToRemove] Names of the plugins or plugin constructors\n\t * that should not be loaded (despite being specified in the `plugins` array).\n\t * @param {Array.<Function>} [pluginsSubstitutions] An array of {@link module:core/plugin~PluginInterface plugin constructors}\n\t * that will be used to replace plugins of the same names that were passed in `plugins` or that are in their dependency tree.\n\t * A useful option for replacing built-in plugins while creating tests (for mocking their APIs). Plugins that will be replaced\n\t * must follow these rules:\n\t * * The new plugin must be a class.\n\t * * The new plugin must be named.\n\t * * Both plugins must not depend on other plugins.\n\t * @returns {Promise.<module:core/plugin~LoadedPlugins>} A promise which gets resolved once all plugins are loaded\n\t * and available in the collection.\n\t */\n\tinit( plugins, pluginsToRemove = [], pluginsSubstitutions = [] ) {\n\t\t// Plugin initialization procedure consists of 2 main steps:\n\t\t// 1) collecting all available plugin constructors,\n\t\t// 2) verification whether all required plugins can be instantiated.\n\t\t//\n\t\t// In the first step, all plugin constructors, available in the provided `plugins` array and inside\n\t\t// plugin's dependencies (from the `Plugin.requires` array), are recursively collected and added to the existing\n\t\t// `this._availablePlugins` map, but without any verification at the given moment. Performing the verification\n\t\t// at this point (during the plugin constructor searching) would cause false errors to occur, that some plugin\n\t\t// is missing but in fact it may be defined further in the array as the dependency of other plugin. After\n\t\t// traversing the entire dependency tree, it will be checked if all required \"top level\" plugins are available.\n\t\t//\n\t\t// In the second step, the list of plugins that have not been explicitly removed is traversed to get all the\n\t\t// plugin constructors to be instantiated in the correct order and to validate against some rules. Finally, if\n\t\t// no plugin is missing and no other error has been found, they all will be instantiated.\n\t\tconst that = this;\n\t\tconst context = this._context;\n\n\t\tfindAvailablePluginConstructors( plugins );\n\n\t\tvalidatePlugins( plugins );\n\n\t\tconst pluginsToLoad = plugins.filter( plugin => !isPluginRemoved( plugin, pluginsToRemove ) );\n\n\t\tconst pluginConstructors = [ ...getPluginConstructors( pluginsToLoad ) ];\n\n\t\tsubstitutePlugins( pluginConstructors, pluginsSubstitutions );\n\n\t\tconst pluginInstances = loadPlugins( pluginConstructors );\n\n\t\treturn initPlugins( pluginInstances, 'init' )\n\t\t\t.then( () => initPlugins( pluginInstances, 'afterInit' ) )\n\t\t\t.then( () => pluginInstances );\n\n\t\tfunction isPluginConstructor( plugin ) {\n\t\t\treturn typeof plugin === 'function';\n\t\t}\n\n\t\tfunction isContextPlugin( plugin ) {\n\t\t\treturn isPluginConstructor( plugin ) && plugin.isContextPlugin;\n\t\t}\n\n\t\tfunction isPluginRemoved( plugin, pluginsToRemove ) {\n\t\t\treturn pluginsToRemove.some( removedPlugin => {\n\t\t\t\tif ( removedPlugin === plugin ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif ( getPluginName( plugin ) === removedPlugin ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif ( getPluginName( removedPlugin ) === plugin ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t} );\n\t\t}\n\n\t\tfunction getPluginName( plugin ) {\n\t\t\treturn isPluginConstructor( plugin ) ?\n\t\t\t\tplugin.pluginName || plugin.name :\n\t\t\t\tplugin;\n\t\t}\n\n\t\tfunction findAvailablePluginConstructors( plugins, processed = new Set() ) {\n\t\t\tplugins.forEach( plugin => {\n\t\t\t\tif ( !isPluginConstructor( plugin ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( processed.has( plugin ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tprocessed.add( plugin );\n\n\t\t\t\tif ( plugin.pluginName && !that._availablePlugins.has( plugin.pluginName ) ) {\n\t\t\t\t\tthat._availablePlugins.set( plugin.pluginName, plugin );\n\t\t\t\t}\n\n\t\t\t\tif ( plugin.requires ) {\n\t\t\t\t\tfindAvailablePluginConstructors( plugin.requires, processed );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tfunction getPluginConstructors( plugins, processed = new Set() ) {\n\t\t\treturn plugins\n\t\t\t\t.map( plugin => {\n\t\t\t\t\treturn isPluginConstructor( plugin ) ?\n\t\t\t\t\t\tplugin :\n\t\t\t\t\t\tthat._availablePlugins.get( plugin );\n\t\t\t\t} )\n\t\t\t\t.reduce( ( result, plugin ) => {\n\t\t\t\t\tif ( processed.has( plugin ) ) {\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\n\t\t\t\t\tprocessed.add( plugin );\n\n\t\t\t\t\tif ( plugin.requires ) {\n\t\t\t\t\t\tvalidatePlugins( plugin.requires, plugin );\n\n\t\t\t\t\t\tgetPluginConstructors( plugin.requires, processed ).forEach( plugin => result.add( plugin ) );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn result.add( plugin );\n\t\t\t\t}, new Set() );\n\t\t}\n\n\t\tfunction validatePlugins( plugins, parentPluginConstructor = null ) {\n\t\t\tplugins\n\t\t\t\t.map( plugin => {\n\t\t\t\t\treturn isPluginConstructor( plugin ) ?\n\t\t\t\t\t\tplugin :\n\t\t\t\t\t\tthat._availablePlugins.get( plugin ) || plugin;\n\t\t\t\t} )\n\t\t\t\t.forEach( plugin => {\n\t\t\t\t\tcheckMissingPlugin( plugin, parentPluginConstructor );\n\t\t\t\t\tcheckContextPlugin( plugin, parentPluginConstructor );\n\t\t\t\t\tcheckRemovedPlugin( plugin, parentPluginConstructor );\n\t\t\t\t} );\n\t\t}\n\n\t\tfunction checkMissingPlugin( plugin, parentPluginConstructor ) {\n\t\t\tif ( isPluginConstructor( plugin ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( parentPluginConstructor ) {\n\t\t\t\t/**\n\t\t\t\t * A required \"soft\" dependency was not found on the plugin list.\n\t\t\t\t *\n\t\t\t\t * When configuring the editor, either prior to building (via\n\t\t\t\t * {@link module:core/editor/editor~Editor.builtinPlugins `Editor.builtinPlugins`}) or when\n\t\t\t\t * creating a new instance of the editor (e.g. via\n\t\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#plugins `config.plugins`}), you need to provide\n\t\t\t\t * some of the dependencies for other plugins that you used.\n\t\t\t\t *\n\t\t\t\t * This error is thrown when one of these dependencies was not provided. The name of the missing plugin\n\t\t\t\t * can be found in `missingPlugin` and the plugin that required it in `requiredBy`.\n\t\t\t\t *\n\t\t\t\t * In order to resolve it, you need to import the missing plugin and add it to the\n\t\t\t\t * current list of plugins (`Editor.builtinPlugins` or `config.plugins`/`config.extraPlugins`).\n\t\t\t\t *\n\t\t\t\t * Soft requirements were introduced in version 26.0.0. If you happen to stumble upon this error\n\t\t\t\t * when upgrading to version 26.0.0, read also the\n\t\t\t\t * {@glink updating/migration-to-26 Migration to 26.0.0} guide.\n\t\t\t\t *\n\t\t\t\t * @error plugincollection-soft-required\n\t\t\t\t * @param {String} missingPlugin The name of the required plugin.\n\t\t\t\t * @param {String} requiredBy The name of the plugin that requires the other plugin.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'plugincollection-soft-required',\n\t\t\t\t\tcontext,\n\t\t\t\t\t{ missingPlugin: plugin, requiredBy: getPluginName( parentPluginConstructor ) }\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * A plugin is not available and could not be loaded.\n\t\t\t *\n\t\t\t * Plugin classes (constructors) need to be provided to the editor before they can be loaded by name.\n\t\t\t * This is usually done in CKEditor 5 builds by setting the {@link module:core/editor/editor~Editor.builtinPlugins}\n\t\t\t * property.\n\t\t\t *\n\t\t\t * **If you see this warning when using one of the {@glink installation/advanced/alternative-setups/predefined-builds\n\t\t\t * CKEditor 5 Builds}**,\n\t\t\t * it means that you try to enable a plugin which was not included in that build. This may be due to a typo\n\t\t\t * in the plugin name or simply because that plugin is not a part of this build. In the latter scenario,\n\t\t\t * read more about {@glink installation/getting-started/quick-start custom builds}.\n\t\t\t *\n\t\t\t * **If you see this warning when using one of the editor creators directly** (not a build), then it means\n\t\t\t * that you tried loading plugins by name. However, unlike CKEditor 4, CKEditor 5 does not implement a \"plugin loader\".\n\t\t\t * This means that CKEditor 5 does not know where to load the plugin modules from. Therefore, you need to\n\t\t\t * provide each plugin through a reference (as a constructor function). Check out the examples in\n\t\t\t * {@glink installation/advanced/alternative-setups/integrating-from-source \"Building from source\"}.\n\t\t\t *\n\t\t\t * @error plugincollection-plugin-not-found\n\t\t\t * @param {String} plugin The name of the plugin which could not be loaded.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'plugincollection-plugin-not-found',\n\t\t\t\tcontext,\n\t\t\t\t{ plugin }\n\t\t\t);\n\t\t}\n\n\t\tfunction checkContextPlugin( plugin, parentPluginConstructor ) {\n\t\t\tif ( !isContextPlugin( parentPluginConstructor ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isContextPlugin( plugin ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * If a plugin is a context plugin, all plugins it requires should also be context plugins\n\t\t\t * instead of plugins. In other words, if one plugin can be used in the context,\n\t\t\t * all its requirements should also be ready to be used in the context. Note that the context\n\t\t\t * provides only a part of the API provided by the editor. If one plugin needs a full\n\t\t\t * editor API, all plugins which require it are considered as plugins that need a full\n\t\t\t * editor API.\n\t\t\t *\n\t\t\t * @error plugincollection-context-required\n\t\t\t * @param {String} plugin The name of the required plugin.\n\t\t\t * @param {String} requiredBy The name of the parent plugin.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'plugincollection-context-required',\n\t\t\t\tcontext,\n\t\t\t\t{ plugin: getPluginName( plugin ), requiredBy: getPluginName( parentPluginConstructor ) }\n\t\t\t);\n\t\t}\n\n\t\tfunction checkRemovedPlugin( plugin, parentPluginConstructor ) {\n\t\t\tif ( !parentPluginConstructor ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( !isPluginRemoved( plugin, pluginsToRemove ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Cannot load a plugin because one of its dependencies is listed in the `removePlugins` option.\n\t\t\t *\n\t\t\t * @error plugincollection-required\n\t\t\t * @param {String} plugin The name of the required plugin.\n\t\t\t * @param {String} requiredBy The name of the parent plugin.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'plugincollection-required',\n\t\t\t\tcontext,\n\t\t\t\t{ plugin: getPluginName( plugin ), requiredBy: getPluginName( parentPluginConstructor ) }\n\t\t\t);\n\t\t}\n\n\t\tfunction loadPlugins( pluginConstructors ) {\n\t\t\treturn pluginConstructors.map( PluginConstructor => {\n\t\t\t\tconst pluginInstance = that._contextPlugins.get( PluginConstructor ) || new PluginConstructor( context );\n\n\t\t\t\tthat._add( PluginConstructor, pluginInstance );\n\n\t\t\t\treturn pluginInstance;\n\t\t\t} );\n\t\t}\n\n\t\tfunction initPlugins( pluginInstances, method ) {\n\t\t\treturn pluginInstances.reduce( ( promise, plugin ) => {\n\t\t\t\tif ( !plugin[ method ] ) {\n\t\t\t\t\treturn promise;\n\t\t\t\t}\n\n\t\t\t\tif ( that._contextPlugins.has( plugin ) ) {\n\t\t\t\t\treturn promise;\n\t\t\t\t}\n\n\t\t\t\treturn promise.then( plugin[ method ].bind( plugin ) );\n\t\t\t}, Promise.resolve() );\n\t\t}\n\n\t\t// Replaces plugin constructors with the specified set of plugins.\n\t\t//\n\t\t// @param {Array.<Function>} pluginConstructors\n\t\t// @param {Array.<Function>} pluginsSubstitutions\n\t\tfunction substitutePlugins( pluginConstructors, pluginsSubstitutions ) {\n\t\t\tfor ( const pluginItem of pluginsSubstitutions ) {\n\t\t\t\tif ( typeof pluginItem != 'function' ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * The plugin replacing an existing plugin must be a function.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-replace-plugin-invalid-type\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'plugincollection-replace-plugin-invalid-type', null, { pluginItem } );\n\t\t\t\t}\n\t\t\t\tconst pluginName = pluginItem.pluginName;\n\n\t\t\t\tif ( !pluginName ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * The plugin replacing an existing plugin must have a name.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-replace-plugin-missing-name\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'plugincollection-replace-plugin-missing-name', null, { pluginItem } );\n\t\t\t\t}\n\n\t\t\t\tif ( pluginItem.requires && pluginItem.requires.length ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * The plugin replacing an existing plugin cannot depend on other plugins.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-plugin-for-replacing-cannot-have-dependencies\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'plugincollection-plugin-for-replacing-cannot-have-dependencies', null, { pluginName } );\n\t\t\t\t}\n\n\t\t\t\tconst pluginToReplace = that._availablePlugins.get( pluginName );\n\n\t\t\t\tif ( !pluginToReplace ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * The replaced plugin does not exist in the\n\t\t\t\t\t * {@link module:core/plugincollection~PluginCollection available plugins} collection.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-plugin-for-replacing-not-exist\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'plugincollection-plugin-for-replacing-not-exist', null, { pluginName } );\n\t\t\t\t}\n\n\t\t\t\tconst indexInPluginConstructors = pluginConstructors.indexOf( pluginToReplace );\n\n\t\t\t\tif ( indexInPluginConstructors === -1 ) {\n\t\t\t\t\t// The Context feature can substitute plugins as well.\n\t\t\t\t\t// It may happen that the editor will be created with the given context, where the plugin for substitute\n\t\t\t\t\t// was already replaced. In such a case, we don't want to do it again.\n\t\t\t\t\tif ( that._contextPlugins.has( pluginToReplace ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t/**\n\t\t\t\t\t * The replaced plugin will not be loaded so it cannot be replaced.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-plugin-for-replacing-not-loaded\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'plugincollection-plugin-for-replacing-not-loaded', null, { pluginName } );\n\t\t\t\t}\n\n\t\t\t\tif ( pluginToReplace.requires && pluginToReplace.requires.length ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * The replaced plugin cannot depend on other plugins.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-replaced-plugin-cannot-have-dependencies\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'plugincollection-replaced-plugin-cannot-have-dependencies', null, { pluginName } );\n\t\t\t\t}\n\n\t\t\t\tpluginConstructors.splice( indexInPluginConstructors, 1, pluginItem );\n\t\t\t\tthat._availablePlugins.set( pluginName, pluginItem );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Destroys all loaded plugins.\n\t *\n\t * @returns {Promise}\n\t */\n\tdestroy() {\n\t\tconst promises = [];\n\n\t\tfor ( const [ , pluginInstance ] of this ) {\n\t\t\tif ( typeof pluginInstance.destroy == 'function' && !this._contextPlugins.has( pluginInstance ) ) {\n\t\t\t\tpromises.push( pluginInstance.destroy() );\n\t\t\t}\n\t\t}\n\n\t\treturn Promise.all( promises );\n\t}\n\n\t/**\n\t * Adds the plugin to the collection. Exposed mainly for testing purposes.\n\t *\n\t * @protected\n\t * @param {Function} PluginConstructor The plugin constructor.\n\t * @param {module:core/plugin~PluginInterface} plugin The instance of the plugin.\n\t */\n\t_add( PluginConstructor, plugin ) {\n\t\tthis._plugins.set( PluginConstructor, plugin );\n\n\t\tconst pluginName = PluginConstructor.pluginName;\n\n\t\tif ( !pluginName ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this._plugins.has( pluginName ) ) {\n\t\t\t/**\n\t\t\t * Two plugins with the same {@link module:core/plugin~PluginInterface.pluginName} were loaded.\n\t\t\t * This will lead to runtime conflicts between these plugins.\n\t\t\t *\n\t\t\t * In practice, this warning usually means that new plugins were added to an existing CKEditor 5 build.\n\t\t\t * Plugins should always be added to a source version of the editor (`@ckeditor/ckeditor5-editor-*`),\n\t\t\t * not to an editor imported from one of the `@ckeditor/ckeditor5-build-*` packages.\n\t\t\t *\n\t\t\t * Check your import paths and the list of plugins passed to\n\t\t\t * {@link module:core/editor/editor~Editor.create `Editor.create()`}\n\t\t\t * or specified in {@link module:core/editor/editor~Editor.builtinPlugins `Editor.builtinPlugins`}.\n\t\t\t *\n\t\t\t * The second option is that your `node_modules/` directory contains duplicated versions of the same\n\t\t\t * CKEditor 5 packages. Normally, on clean installations, npm deduplicates packages in `node_modules/`, so\n\t\t\t * it may be enough to call `rm -rf node_modules && npm i`. However, if you installed conflicting versions\n\t\t\t * of some packages, their dependencies may need to be installed in more than one version which may lead to this\n\t\t\t * warning.\n\t\t\t *\n\t\t\t * Technically speaking, this error occurs because after adding a plugin to an existing editor build\n\t\t\t * the dependencies of this plugin are being duplicated.\n\t\t\t * They are already built into that editor build and now get added for the second time as dependencies\n\t\t\t * of the plugin you are installing.\n\t\t\t *\n\t\t\t * Read more about {@glink installation/getting-started/installing-plugins installing plugins}.\n\t\t\t *\n\t\t\t * @error plugincollection-plugin-name-conflict\n\t\t\t * @param {String} pluginName The duplicated plugin name.\n\t\t\t * @param {Function} plugin1 The first plugin constructor.\n\t\t\t * @param {Function} plugin2 The second plugin constructor.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'plugincollection-plugin-name-conflict',\n\t\t\t\tnull,\n\t\t\t\t{ pluginName, plugin1: this._plugins.get( pluginName ).constructor, plugin2: PluginConstructor }\n\t\t\t);\n\t\t}\n\n\t\tthis._plugins.set( pluginName, plugin );\n\t}\n}\n\nmix( PluginCollection, EmitterMixin );\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/toarray\n */\n\n/**\n * Transforms any value to an array. If the provided value is already an array, it is returned unchanged.\n *\n * @param {*} data The value to transform to an array.\n * @returns {Array} An array created from data.\n */\nexport default function toArray( data ) {\n\treturn Array.isArray( data ) ? data : [ data ];\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* globals window */\n\n/**\n * @module utils/translation-service\n */\n\nimport CKEditorError from './ckeditorerror';\n\n/* istanbul ignore else */\nif ( !window.CKEDITOR_TRANSLATIONS ) {\n\twindow.CKEDITOR_TRANSLATIONS = {};\n}\n\n/**\n * Adds translations to existing ones or overrides the existing translations. These translations will later\n * be available for the {@link module:utils/locale~Locale#t `t()`} function.\n *\n * The `translations` is an object which consists of `messageId: translation` pairs. Note that the message ID can be\n * either constructed from the message string or from the message ID if it was passed\n * (this happens rarely and mostly for short messages or messages with placeholders).\n * Since the editor displays only the message string, the message ID can be found either in the source code or in the\n * built translations for another language.\n *\n *\t\tadd( 'pl', {\n *\t\t\t'Cancel': 'Anuluj',\n *\t\t\t'IMAGE': 'obraz', // Note that the `IMAGE` comes from the message ID, while the string can be `image`.\n *\t\t} );\n *\n * If the message is supposed to support various plural forms, make sure to provide an array with the singular form and all plural forms:\n *\n *\t\tadd( 'pl', {\n *\t \t\t'Add space': [ 'Dodaj spację', 'Dodaj %0 spacje', 'Dodaj %0 spacji' ]\n * \t\t} );\n *\n * You should also specify the third argument (the `getPluralForm()` function) that will be used to determine the plural form if no\n * language file was loaded for that language. All language files coming from CKEditor 5 sources will have this option set, so\n * these plural form rules will be reused by other translations added to the registered languages. The `getPluralForm()` function\n * can return either a Boolean or a number.\n *\n * \t\tadd( 'en', {\n *\t \t\t// ... Translations.\n * \t\t}, n => n !== 1 );\n * \t\tadd( 'pl', {\n *\t \t\t// ... Translations.\n * \t\t}, n => n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && ( n % 100 < 10 || n % 100 >= 20 ) ? 1 : 2 );\n *\n * All translations extend the global `window.CKEDITOR_TRANSLATIONS` object. An example of this object can be found below:\n *\n * \t\t{\n * \t\t\tpl: {\n *\t\t\t\tdictionary: {\n *\t\t\t\t\t'Cancel': 'Anuluj',\n *\t\t\t\t\t'Add space': [ 'Dodaj spację', 'Dodaj %0 spacje', 'Dodaj %0 spacji' ]\n *\t\t\t\t},\n *\t\t\t\t// A function that returns the plural form index.\n *\t\t\t\tgetPluralForm: n => n !==1\n *\t\t\t}\n *\t\t\t// Other languages.\n *\t\t}\n *\n * If you cannot import this function from this module (e.g. because you use a CKEditor 5 build), you can\n * still add translations by extending the global `window.CKEDITOR_TRANSLATIONS` object by using a function like\n * the one below:\n *\n *\t\tfunction addTranslations( language, translations, getPluralForm ) {\n *\t\t\tif ( !window.CKEDITOR_TRANSLATIONS ) {\n *\t\t\t\twindow.CKEDITOR_TRANSLATIONS = {};\n *\t\t\t}\n\n *\t\t\tif ( !window.CKEDITOR_TRANSLATIONS[ language ] ) {\n *\t\t\t\twindow.CKEDITOR_TRANSLATIONS[ language ] = {};\n *\t\t\t}\n *\n *\t\t\tconst languageTranslations = window.CKEDITOR_TRANSLATIONS[ language ];\n *\n * \t\t\tlanguageTranslations.dictionary = languageTranslations.dictionary || {};\n * \t\t\tlanguageTranslations.getPluralForm = getPluralForm || languageTranslations.getPluralForm;\n *\n *\t\t\t// Extend the dictionary for the given language.\n *\t\t\tObject.assign( languageTranslations.dictionary, translations );\n *\t\t}\n *\n * @param {String} language Target language.\n * @param {Object.<String,*>} translations An object with translations which will be added to the dictionary.\n * For each message ID the value should be either a translation or an array of translations if the message\n * should support plural forms.\n * @param {Function} getPluralForm A function that returns the plural form index (a number).\n */\nexport function add( language, translations, getPluralForm ) {\n\tif ( !window.CKEDITOR_TRANSLATIONS[ language ] ) {\n\t\twindow.CKEDITOR_TRANSLATIONS[ language ] = {};\n\t}\n\n\tconst languageTranslations = window.CKEDITOR_TRANSLATIONS[ language ];\n\n\tlanguageTranslations.dictionary = languageTranslations.dictionary || {};\n\tlanguageTranslations.getPluralForm = getPluralForm || languageTranslations.getPluralForm;\n\n\tObject.assign( languageTranslations.dictionary, translations );\n}\n\n/**\n * **Note:** This method is internal, use {@link module:utils/locale~Locale#t the `t()` function} instead to translate\n * the editor UI parts.\n *\n * This function is responsible for translating messages to the specified language. It uses translations added perviously\n * by {@link module:utils/translation-service~add} (a translations dictionary and the `getPluralForm()` function\n * to provide accurate translations of plural forms).\n *\n * When no translation is defined in the dictionary or the dictionary does not exist, this function returns\n * the original message string or the message plural depending on the number of elements.\n *\n *\t\ttranslate( 'pl', { string: 'Cancel' } ); // 'Cancel'\n *\n * The third optional argument is the number of elements, based on which the single form or one of the plural forms\n * should be picked when the message is supposed to support various plural forms.\n *\n * \t\ttranslate( 'en', { string: 'Add a space', plural: 'Add %0 spaces' }, 1 ); // 'Add a space'\n * \t\ttranslate( 'en', { string: 'Add a space', plural: 'Add %0 spaces' }, 3 ); // 'Add %0 spaces'\n *\n * The message should provide an ID using the `id` property when the message strings are not unique and their\n * translations should be different.\n *\n *\t\ttranslate( 'en', { string: 'image', id: 'ADD_IMAGE' } );\n *\t\ttranslate( 'en', { string: 'image', id: 'AN_IMAGE' } );\n *\n * @protected\n * @param {String} language Target language.\n * @param {module:utils/translation-service~Message} message A message that will be translated.\n * @param {Number} [quantity] The number of elements for which a plural form should be picked from the target language dictionary.\n * @returns {String} Translated sentence.\n */\nexport function _translate( language, message, quantity = 1 ) {\n\tif ( typeof quantity !== 'number' ) {\n\t\t/**\n\t\t * An incorrect value was passed to the translation function. This was probably caused\n\t\t * by an incorrect message interpolation of a plural form. Note that for messages supporting plural forms\n\t\t * the second argument of the `t()` function should always be a number or an array with a number as the first element.\n\t\t *\n\t\t * @error translation-service-quantity-not-a-number\n\t\t */\n\t\tthrow new CKEditorError( 'translation-service-quantity-not-a-number', null, { quantity } );\n\t}\n\n\tconst numberOfLanguages = getNumberOfLanguages();\n\n\tif ( numberOfLanguages === 1 ) {\n\t\t// Override the language to the only supported one.\n\t\t// This can't be done in the `Locale` class, because the translations comes after the `Locale` class initialization.\n\t\tlanguage = Object.keys( window.CKEDITOR_TRANSLATIONS )[ 0 ];\n\t}\n\n\tconst messageId = message.id || message.string;\n\n\tif ( numberOfLanguages === 0 || !hasTranslation( language, messageId ) ) {\n\t\tif ( quantity !== 1 ) {\n\t\t\t// Return the default plural form that was passed in the `message.plural` parameter.\n\t\t\treturn message.plural;\n\t\t}\n\n\t\treturn message.string;\n\t}\n\n\tconst dictionary = window.CKEDITOR_TRANSLATIONS[ language ].dictionary;\n\tconst getPluralForm = window.CKEDITOR_TRANSLATIONS[ language ].getPluralForm || ( n => n === 1 ? 0 : 1 );\n\n\tif ( typeof dictionary[ messageId ] === 'string' ) {\n\t\treturn dictionary[ messageId ];\n\t}\n\n\tconst pluralFormIndex = Number( getPluralForm( quantity ) );\n\n\t// Note: The `translate` function is not responsible for replacing `%0, %1, ...` with values.\n\treturn dictionary[ messageId ][ pluralFormIndex ];\n}\n\n/**\n * Clears dictionaries for test purposes.\n *\n * @protected\n */\nexport function _clear() {\n\twindow.CKEDITOR_TRANSLATIONS = {};\n}\n\n// Checks whether the dictionary exists and translation in that dictionary exists.\nfunction hasTranslation( language, messageId ) {\n\treturn (\n\t\t!!window.CKEDITOR_TRANSLATIONS[ language ] &&\n\t\t!!window.CKEDITOR_TRANSLATIONS[ language ].dictionary[ messageId ]\n\t);\n}\n\nfunction getNumberOfLanguages() {\n\treturn Object.keys( window.CKEDITOR_TRANSLATIONS ).length;\n}\n\n/**\n * The internationalization message interface. A message that implements this interface can be passed to the `t()` function\n * to be translated to the target UI language.\n *\n * @typedef {Object} module:utils/translation-service~Message\n *\n * @property {String} string The message string to translate. Acts as a default translation if the translation for a given language\n * is not defined. When the message is supposed to support plural forms, the string should be the English singular form of the message.\n * @property {String} [id] The message ID. If passed, the message ID is taken from this property instead of the `message.string`.\n * This property is useful when various messages share the same message string, for example, the `editor` string in `in the editor`\n * and `my editor` sentences.\n * @property {String} [plural] The plural form of the message. This property should be skipped when a message is not supposed\n * to support plural forms. Otherwise it should always be set to a string with the English plural form of the message.\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/language\n */\n\nconst RTL_LANGUAGE_CODES = [\n\t'ar', 'ara', // Arabic\n\t'fa', 'per', 'fas', // Persian\n\t'he', 'heb', // Hebrew\n\t'ku', 'kur', // Kurdish\n\t'ug', 'uig' // Uighur, Uyghur\n];\n\n/**\n * Helps determine whether a language text direction is LTR or RTL.\n *\n * @param {String} language The ISO 639-1 or ISO 639-2 language code.\n * @returns {'ltr'|'rtl'}\n */\nexport function getLanguageDirection( languageCode ) {\n\treturn RTL_LANGUAGE_CODES.includes( languageCode ) ? 'rtl' : 'ltr';\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/locale\n */\n\n/* globals console */\n\nimport toArray from './toarray';\nimport { _translate } from './translation-service';\nimport { getLanguageDirection } from './language';\n\n/**\n * Represents the localization services.\n */\nexport default class Locale {\n\t/**\n\t * Creates a new instance of the locale class. Learn more about\n\t * {@glink features/ui-language configuring the language of the editor}.\n\t *\n\t * @param {Object} [options] Locale configuration.\n\t * @param {String} [options.uiLanguage='en'] The editor UI language code in the\n\t * [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format. See {@link #uiLanguage}.\n\t * @param {String} [options.contentLanguage] The editor content language code in the\n\t * [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format. If not specified, the same as `options.language`.\n\t * See {@link #contentLanguage}.\n\t */\n\tconstructor( options = {} ) {\n\t\t/**\n\t\t * The editor UI language code in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.\n\t\t *\n\t\t * If the {@link #contentLanguage content language} was not specified in the `Locale` constructor,\n\t\t * it also defines the language of the content.\n\t\t *\n\t\t * @readonly\n\t\t * @member {String}\n\t\t */\n\t\tthis.uiLanguage = options.uiLanguage || 'en';\n\n\t\t/**\n\t\t * The editor content language code in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.\n\t\t *\n\t\t * Usually the same as the {@link #uiLanguage editor language}, it can be customized by passing an optional\n\t\t * argument to the `Locale` constructor.\n\t\t *\n\t\t * @readonly\n\t\t * @member {String}\n\t\t */\n\t\tthis.contentLanguage = options.contentLanguage || this.uiLanguage;\n\n\t\t/**\n\t\t * Text direction of the {@link #uiLanguage editor UI language}. Either `'ltr'` or `'rtl'`.\n\t\t *\n\t\t * @readonly\n\t\t * @member {String}\n\t\t */\n\t\tthis.uiLanguageDirection = getLanguageDirection( this.uiLanguage );\n\n\t\t/**\n\t\t * Text direction of the {@link #contentLanguage editor content language}.\n\t\t *\n\t\t * If the content language was passed directly to the `Locale` constructor, this property represents the\n\t\t * direction of that language.\n\t\t *\n\t\t * If the {@link #contentLanguage editor content language} was derived from the {@link #uiLanguage editor language},\n\t\t * the content language direction is the same as the {@link #uiLanguageDirection UI language direction}.\n\t\t *\n\t\t * The value is either `'ltr'` or `'rtl'`.\n\t\t *\n\t\t * @readonly\n\t\t * @member {String}\n\t\t */\n\t\tthis.contentLanguageDirection = getLanguageDirection( this.contentLanguage );\n\n\t\t/**\n\t\t * Translates the given message to the {@link #uiLanguage}. This method is also available in\n\t\t * {@link module:core/editor/editor~Editor#t `Editor`} and {@link module:ui/view~View#t `View`}.\n\t\t *\n\t\t * This method's context is statically bound to the `Locale` instance and **should always be called as a function**:\n\t\t *\n\t\t *\t\tconst t = locale.t;\n\t\t *\t\tt( 'Label' );\n\t\t *\n\t\t * The message can be either a string or an object implementing the {@link module:utils/translation-service~Message} interface.\n\t\t *\n\t\t * The message may contain placeholders (`%<index>`) for value(s) that are passed as a `values` parameter.\n\t\t * For an array of values, the `%<index>` will be changed to an element of that array at the given index.\n\t\t * For a single value passed as the second argument, only the `%0` placeholders will be changed to the provided value.\n\t\t *\n\t\t *\t\tt( 'Created file \"%0\" in %1ms.', [ fileName, timeTaken ] );\n\t\t * \t\tt( 'Created file \"%0\", fileName );\n\t\t *\n\t\t * The message supports plural forms. To specify the plural form, use the `plural` property. Singular or plural form\n\t\t * will be chosen depending on the first value from the passed `values`. The value of the `plural` property is used\n\t\t * as a default plural translation when the translation for the target language is missing.\n\t\t *\n\t\t *\t\tt( { string: 'Add a space', plural: 'Add %0 spaces' }, 1 ); // 'Add a space' for the English language.\n\t\t *\t\tt( { string: 'Add a space', plural: 'Add %0 spaces' }, 5 ); // 'Add 5 spaces' for the English language.\n\t\t *\t\tt( { string: '%1 a space', plural: '%1 %0 spaces' }, [ 2, 'Add' ] ); // 'Add 2 spaces' for the English language.\n\t\t *\n\t\t * \t\tt( { string: 'Add a space', plural: 'Add %0 spaces' }, 1 ); // 'Dodaj spację' for the Polish language.\n\t\t *\t\tt( { string: 'Add a space', plural: 'Add %0 spaces' }, 5 ); // 'Dodaj 5 spacji' for the Polish language.\n\t\t *\t\tt( { string: '%1 a space', plural: '%1 %0 spaces' }, [ 2, 'Add' ] ); // 'Dodaj 2 spacje' for the Polish language.\n\t\t *\n\t\t * * The message should provide an ID using the `id` property when the message strings are not unique and their\n\t\t * translations should be different.\n\t\t *\n\t\t *\t\ttranslate( 'en', { string: 'image', id: 'ADD_IMAGE' } );\n\t\t *\t\ttranslate( 'en', { string: 'image', id: 'AN_IMAGE' } );\n\t\t *\n\t\t * @method #t\n\t\t * @param {String|module:utils/translation-service~Message} message A message that will be localized (translated).\n\t\t * @param {String|Number|Array.<String|Number>} [values] A value or an array of values that will fill message placeholders.\n\t\t * For messages supporting plural forms the first value will determine the plural form.\n\t\t * @returns {String}\n\t\t */\n\t\tthis.t = ( message, values ) => this._t( message, values );\n\t}\n\n\t/**\n\t * The editor UI language code in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.\n\t *\n\t * **Note**: This property was deprecated. Please use {@link #uiLanguage} and {@link #contentLanguage}\n\t * properties instead.\n\t *\n\t * @deprecated\n\t * @member {String}\n\t */\n\tget language() {\n\t\t/**\n\t\t * The {@link module:utils/locale~Locale#language `Locale#language`} property was deprecated and will\n\t\t * be removed in the near future. Please use the {@link #uiLanguage} and {@link #contentLanguage} properties instead.\n\t\t *\n\t\t * @error locale-deprecated-language-property\n\t\t */\n\t\tconsole.warn(\n\t\t\t'locale-deprecated-language-property: ' +\n\t\t\t'The Locale#language property has been deprecated and will be removed in the near future. ' +\n\t\t\t'Please use #uiLanguage and #contentLanguage properties instead.' );\n\n\t\treturn this.uiLanguage;\n\t}\n\n\t/**\n\t * An unbound version of the {@link #t} method.\n\t *\n\t * @private\n\t * @param {String|module:utils/translation-service~Message} message\n\t * @param {Number|String|Array.<Number|String>} [values]\n\t * @returns {String}\n\t */\n\t_t( message, values = [] ) {\n\t\tvalues = toArray( values );\n\n\t\tif ( typeof message === 'string' ) {\n\t\t\tmessage = { string: message };\n\t\t}\n\n\t\tconst hasPluralForm = !!message.plural;\n\t\tconst quantity = hasPluralForm ? values[ 0 ] : 1;\n\n\t\tconst translatedString = _translate( this.uiLanguage, message, quantity );\n\n\t\treturn interpolateString( translatedString, values );\n\t}\n}\n\n// Fills the `%0, %1, ...` string placeholders with values.\nfunction interpolateString( string, values ) {\n\treturn string.replace( /%(\\d+)/g, ( match, index ) => {\n\t\treturn ( index < values.length ) ? values[ index ] : match;\n\t} );\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module core/context\n */\n\nimport Config from '@ckeditor/ckeditor5-utils/src/config';\nimport Collection from '@ckeditor/ckeditor5-utils/src/collection';\nimport PluginCollection from './plugincollection';\nimport Locale from '@ckeditor/ckeditor5-utils/src/locale';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n/**\n * Provides a common, higher-level environment for solutions that use multiple {@link module:core/editor/editor~Editor editors}\n * or plugins that work outside the editor. Use it instead of {@link module:core/editor/editor~Editor.create `Editor.create()`}\n * in advanced application integrations.\n *\n * All configuration options passed to a context will be used as default options for editor instances initialized in that context.\n *\n * {@link module:core/contextplugin~ContextPlugin Context plugins} passed to a context instance will be shared among all\n * editor instances initialized in this context. These will be the same plugin instances for all the editors.\n *\n * **Note:** The context can only be initialized with {@link module:core/contextplugin~ContextPlugin context plugins}\n * (e.g. [comments](https://ckeditor.com/collaboration/comments/)). Regular {@link module:core/plugin~Plugin plugins} require an\n * editor instance to work and cannot be added to a context.\n *\n * **Note:** You can add a context plugin to an editor instance, though.\n *\n * If you are using multiple editor instances on one page and use any context plugins, create a context to share the configuration and\n * plugins among these editors. Some plugins will use the information about all existing editors to better integrate between them.\n *\n * If you are using plugins that do not require an editor to work (e.g. [comments](https://ckeditor.com/collaboration/comments/)),\n * enable and configure them using the context.\n *\n * If you are using only a single editor on each page, use {@link module:core/editor/editor~Editor.create `Editor.create()`} instead.\n * In such case, a context instance will be created by the editor instance in a transparent way.\n *\n * See {@link module:core/context~Context.create `Context.create()`} for usage examples.\n */\nexport default class Context {\n\t/**\n\t * Creates a context instance with a given configuration.\n\t *\n\t * Usually not to be used directly. See the static {@link module:core/context~Context.create `create()`} method.\n\t *\n\t * @param {Object} [config={}] The context configuration.\n\t */\n\tconstructor( config ) {\n\t\t/**\n\t\t * Stores all the configurations specific to this context instance.\n\t\t *\n\t\t * @readonly\n\t\t * @type {module:utils/config~Config}\n\t\t */\n\t\tthis.config = new Config( config, this.constructor.defaultConfig );\n\n\t\tconst availablePlugins = this.constructor.builtinPlugins;\n\n\t\tthis.config.define( 'plugins', availablePlugins );\n\n\t\t/**\n\t\t * The plugins loaded and in use by this context instance.\n\t\t *\n\t\t * @readonly\n\t\t * @type {module:core/plugincollection~PluginCollection}\n\t\t */\n\t\tthis.plugins = new PluginCollection( this, availablePlugins );\n\n\t\tconst languageConfig = this.config.get( 'language' ) || {};\n\n\t\t/**\n\t\t * @readonly\n\t\t * @type {module:utils/locale~Locale}\n\t\t */\n\t\tthis.locale = new Locale( {\n\t\t\tuiLanguage: typeof languageConfig === 'string' ? languageConfig : languageConfig.ui,\n\t\t\tcontentLanguage: this.config.get( 'language.content' )\n\t\t} );\n\n\t\t/**\n\t\t * Shorthand for {@link module:utils/locale~Locale#t}.\n\t\t *\n\t\t * @see module:utils/locale~Locale#t\n\t\t * @method #t\n\t\t */\n\t\tthis.t = this.locale.t;\n\n\t\t/**\n\t\t * A list of editors that this context instance is injected to.\n\t\t *\n\t\t * @readonly\n\t\t * @type {module:utils/collection~Collection}\n\t\t */\n\t\tthis.editors = new Collection();\n\n\t\t/**\n\t\t * Reference to the editor which created the context.\n\t\t * Null when the context was created outside of the editor.\n\t\t *\n\t\t * It is used to destroy the context when removing the editor that has created the context.\n\t\t *\n\t\t * @private\n\t\t * @type {module:core/editor/editor~Editor|null}\n\t\t */\n\t\tthis._contextOwner = null;\n\t}\n\n\t/**\n\t * Loads and initializes plugins specified in the configuration.\n\t *\n\t * @returns {Promise.<module:core/plugin~LoadedPlugins>} A promise which resolves\n\t * once the initialization is completed, providing an array of loaded plugins.\n\t */\n\tinitPlugins() {\n\t\tconst plugins = this.config.get( 'plugins' ) || [];\n\t\tconst substitutePlugins = this.config.get( 'substitutePlugins' ) || [];\n\n\t\t// Plugins for substitution should be checked as well.\n\t\tfor ( const Plugin of plugins.concat( substitutePlugins ) ) {\n\t\t\tif ( typeof Plugin != 'function' ) {\n\t\t\t\t/**\n\t\t\t\t * Only a constructor function is allowed as a {@link module:core/contextplugin~ContextPlugin context plugin}.\n\t\t\t\t *\n\t\t\t\t * @error context-initplugins-constructor-only\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'context-initplugins-constructor-only',\n\t\t\t\t\tnull,\n\t\t\t\t\t{ Plugin }\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( Plugin.isContextPlugin !== true ) {\n\t\t\t\t/**\n\t\t\t\t * Only a plugin marked as a {@link module:core/contextplugin~ContextPlugin.isContextPlugin context plugin}\n\t\t\t\t * is allowed to be used with a context.\n\t\t\t\t *\n\t\t\t\t * @error context-initplugins-invalid-plugin\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'context-initplugins-invalid-plugin',\n\t\t\t\t\tnull,\n\t\t\t\t\t{ Plugin }\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn this.plugins.init( plugins, [], substitutePlugins );\n\t}\n\n\t/**\n\t * Destroys the context instance and all editors used with the context,\n\t * releasing all resources used by the context.\n\t *\n\t * @returns {Promise} A promise that resolves once the context instance is fully destroyed.\n\t */\n\tdestroy() {\n\t\treturn Promise.all( Array.from( this.editors, editor => editor.destroy() ) )\n\t\t\t.then( () => this.plugins.destroy() );\n\t}\n\n\t/**\n\t * Adds a reference to the editor which is used with this context.\n\t *\n\t * When the given editor has created the context, the reference to this editor will be stored\n\t * as a {@link ~Context#_contextOwner}.\n\t *\n\t * This method should only be used by the editor.\n\t *\n\t * @protected\n\t * @param {module:core/editor/editor~Editor} editor\n\t * @param {Boolean} isContextOwner Stores the given editor as a context owner.\n\t */\n\t_addEditor( editor, isContextOwner ) {\n\t\tif ( this._contextOwner ) {\n\t\t\t/**\n\t\t\t * Cannot add multiple editors to the context which is created by the editor.\n\t\t\t *\n\t\t\t * @error context-addeditor-private-context\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'context-addeditor-private-context' );\n\t\t}\n\n\t\tthis.editors.add( editor );\n\n\t\tif ( isContextOwner ) {\n\t\t\tthis._contextOwner = editor;\n\t\t}\n\t}\n\n\t/**\n\t * Removes a reference to the editor which was used with this context.\n\t * When the context was created by the given editor, the context will be destroyed.\n\t *\n\t * This method should only be used by the editor.\n\t *\n\t * @protected\n\t * @param {module:core/editor/editor~Editor} editor\n\t * @return {Promise} A promise that resolves once the editor is removed from the context or when the context was destroyed.\n\t */\n\t_removeEditor( editor ) {\n\t\tif ( this.editors.has( editor ) ) {\n\t\t\tthis.editors.remove( editor );\n\t\t}\n\n\t\tif ( this._contextOwner === editor ) {\n\t\t\treturn this.destroy();\n\t\t}\n\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Returns the context configuration which will be copied to the editors created using this context.\n\t *\n\t * The configuration returned by this method has the plugins configuration removed &mdash; plugins are shared with all editors\n\t * through another mechanism.\n\t *\n\t * This method should only be used by the editor.\n\t *\n\t * @protected\n\t * @returns {Object} Configuration as a plain object.\n\t */\n\t_getEditorConfig() {\n\t\tconst result = {};\n\n\t\tfor ( const name of this.config.names() ) {\n\t\t\tif ( ![ 'plugins', 'removePlugins', 'extraPlugins' ].includes( name ) ) {\n\t\t\t\tresult[ name ] = this.config.get( name );\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Creates and initializes a new context instance.\n\t *\n\t *\t\tconst commonConfig = { ... }; // Configuration for all the plugins and editors.\n\t *\t\tconst editorPlugins = [ ... ]; // Regular plugins here.\n\t *\n\t *\t\tContext\n\t *\t\t\t.create( {\n\t *\t\t\t\t// Only context plugins here.\n\t *\t\t\t\tplugins: [ ... ],\n\t *\n\t *\t\t\t\t// Configure the language for all the editors (it cannot be overwritten).\n\t *\t\t\t\tlanguage: { ... },\n\t *\n\t *\t\t\t\t// Configuration for context plugins.\n\t *\t\t\t\tcomments: { ... },\n\t *\t\t\t\t...\n\t *\n\t *\t\t\t\t// Default configuration for editor plugins.\n\t *\t\t\t\ttoolbar: { ... },\n\t *\t\t\t\timage: { ... },\n\t *\t\t\t\t...\n\t *\t\t\t} )\n\t *\t\t\t.then( context => {\n\t *\t\t\t\tconst promises = [];\n\t *\n\t *\t\t\t\tpromises.push( ClassicEditor.create(\n\t *\t\t\t\t\tdocument.getElementById( 'editor1' ),\n\t *\t\t\t\t\t{\n\t *\t\t\t\t\t\teditorPlugins,\n\t *\t\t\t\t\t\tcontext\n\t *\t\t\t\t\t}\n\t *\t\t\t\t) );\n\t *\n\t *\t\t\t\tpromises.push( ClassicEditor.create(\n\t *\t\t\t\t\tdocument.getElementById( 'editor2' ),\n\t *\t\t\t\t\t{\n\t *\t\t\t\t\t\teditorPlugins,\n\t *\t\t\t\t\t\tcontext,\n\t *\t\t\t\t\t\ttoolbar: { ... } // You can overwrite the configuration of the context.\n\t *\t\t\t\t\t}\n\t *\t\t\t\t) );\n\t *\n\t *\t\t\t\treturn Promise.all( promises );\n\t *\t\t\t} );\n\t *\n\t * @param {Object} [config] The context configuration.\n\t * @returns {Promise} A promise resolved once the context is ready. The promise resolves with the created context instance.\n\t */\n\tstatic create( config ) {\n\t\treturn new Promise( resolve => {\n\t\t\tconst context = new this( config );\n\n\t\t\tresolve( context.initPlugins().then( () => context ) );\n\t\t} );\n\t}\n}\n\n/**\n * An array of plugins built into the `Context` class.\n *\n * It is used in CKEditor 5 builds featuring `Context` to provide a list of context plugins which are later automatically initialized\n * during the context initialization.\n *\n * They will be automatically initialized by `Context` unless `config.plugins` is passed.\n *\n *\t\t// Build some context plugins into the Context class first.\n *\t\tContext.builtinPlugins = [ FooPlugin, BarPlugin ];\n *\n *\t\t// Normally, you need to define config.plugins, but since Context.builtinPlugins was\n *\t\t// defined, now you can call create() without any configuration.\n *\t\tContext\n *\t\t\t.create()\n *\t\t\t.then( context => {\n *\t\t\t\tcontext.plugins.get( FooPlugin ); // -> An instance of the Foo plugin.\n *\t\t\t\tcontext.plugins.get( BarPlugin ); // -> An instance of the Bar plugin.\n *\t\t\t} );\n *\n * See also {@link module:core/context~Context.defaultConfig `Context.defaultConfig`}\n * and {@link module:core/editor/editor~Editor.builtinPlugins `Editor.builtinPlugins`}.\n *\n * @static\n * @member {Array.<Function>} module:core/context~Context.builtinPlugins\n */\n\n/**\n * The default configuration which is built into the `Context` class.\n *\n * It is used in CKEditor 5 builds featuring `Context` to provide the default configuration options which are later used during the\n * context initialization.\n *\n *\t\tContext.defaultConfig = {\n *\t\t\tfoo: 1,\n *\t\t\tbar: 2\n *\t\t};\n *\n *\t\tContext\n *\t\t\t.create()\n *\t\t\t.then( context => {\n *\t\t\t\tcontext.config.get( 'foo' ); // -> 1\n *\t\t\t\tcontext.config.get( 'bar' ); // -> 2\n *\t\t\t} );\n *\n *\t\t// The default options can be overridden by the configuration passed to create().\n *\t\tContext\n *\t\t\t.create( { bar: 3 } )\n *\t\t\t.then( context => {\n *\t\t\t\tcontext.config.get( 'foo' ); // -> 1\n *\t\t\t\tcontext.config.get( 'bar' ); // -> 3\n *\t\t\t} );\n *\n * See also {@link module:core/context~Context.builtinPlugins `Context.builtinPlugins`}\n * and {@link module:core/editor/editor~Editor.defaultConfig `Editor.defaultConfig`}.\n *\n * @static\n * @member {Object} module:core/context~Context.defaultConfig\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module core/contextplugin\n */\n\nimport ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\n\n/**\n * The base class for {@link module:core/context~Context} plugin classes.\n *\n * A context plugin can either be initialized for an {@link module:core/editor/editor~Editor editor} or for\n * a {@link module:core/context~Context context}. In other words, it can either\n * work within one editor instance or with one or more editor instances that use a single context.\n * It is the context plugin's role to implement handling for both modes.\n *\n * There are a few rules for interaction between the editor plugins and context plugins:\n *\n * * A context plugin can require another context plugin.\n * * An {@link module:core/plugin~Plugin editor plugin} can require a context plugin.\n * * A context plugin MUST NOT require an {@link module:core/plugin~Plugin editor plugin}.\n *\n * @implements module:core/plugin~PluginInterface\n * @mixes module:utils/observablemixin~ObservableMixin\n */\nexport default class ContextPlugin {\n\t/**\n\t * Creates a new plugin instance.\n\t *\n\t * @param {module:core/context~Context|module:core/editor/editor~Editor} context\n\t */\n\tconstructor( context ) {\n\t\t/**\n\t\t * The context instance.\n\t\t *\n\t\t * @readonly\n\t\t * @type {module:core/context~Context|module:core/editor/editor~Editor}\n\t\t */\n\t\tthis.context = context;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdestroy() {\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get isContextPlugin() {\n\t\treturn true;\n\t}\n}\n\nmix( ContextPlugin, ObservableMixin );\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/comparearrays\n */\n\n/**\n * Compares how given arrays relate to each other. One array can be: same as another array, prefix of another array\n * or completely different. If arrays are different, first index at which they differ is returned. Otherwise,\n * a flag specifying the relation is returned. Flags are negative numbers, so whenever a number >= 0 is returned\n * it means that arrays differ.\n *\n *\t\tcompareArrays( [ 0, 2 ], [ 0, 2 ] );\t\t// 'same'\n *\t\tcompareArrays( [ 0, 2 ], [ 0, 2, 1 ] );\t\t// 'prefix'\n *\t\tcompareArrays( [ 0, 2 ], [ 0 ] );\t\t\t// 'extension'\n *\t\tcompareArrays( [ 0, 2 ], [ 1, 2 ] );\t\t// 0\n *\t\tcompareArrays( [ 0, 2 ], [ 0, 1 ] );\t\t// 1\n *\n * @param {Array} a Array that is compared.\n * @param {Array} b Array to compare with.\n * @returns {module:utils/comparearrays~ArrayRelation} How array `a` is related to `b`.\n */\nexport default function compareArrays( a, b ) {\n\tconst minLen = Math.min( a.length, b.length );\n\n\tfor ( let i = 0; i < minLen; i++ ) {\n\t\tif ( a[ i ] != b[ i ] ) {\n\t\t\t// The arrays are different.\n\t\t\treturn i;\n\t\t}\n\t}\n\n\t// Both arrays were same at all points.\n\tif ( a.length == b.length ) {\n\t\t// If their length is also same, they are the same.\n\t\treturn 'same';\n\t} else if ( a.length < b.length ) {\n\t\t// Compared array is shorter so it is a prefix of the other array.\n\t\treturn 'prefix';\n\t} else {\n\t\t// Compared array is longer so it is an extension of the other array.\n\t\treturn 'extension';\n\t}\n}\n\n/**\n * @typedef {'extension'|'same'|'prefix'} module:utils/comparearrays~ArrayRelation\n */\n","import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nexport default clone;\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/node\n */\n\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport EmitterMixin from '@ckeditor/ckeditor5-utils/src/emittermixin';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\nimport compareArrays from '@ckeditor/ckeditor5-utils/src/comparearrays';\nimport { clone } from 'lodash-es';\n\n// To check if component is loaded more than once.\nimport '@ckeditor/ckeditor5-utils/src/version';\n\n/**\n * Abstract view node class.\n *\n * This is an abstract class. Its constructor should not be used directly.\n * Use the {@link module:engine/view/downcastwriter~DowncastWriter} or {@link module:engine/view/upcastwriter~UpcastWriter}\n * to create new instances of view nodes.\n *\n * @abstract\n */\nexport default class Node {\n\t/**\n\t * Creates a tree view node.\n\t *\n\t * @protected\n\t * @param {module:engine/view/document~Document} document The document instance to which this node belongs.\n\t */\n\tconstructor( document ) {\n\t\t/**\n\t\t * The document instance to which this node belongs.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/document~Document}\n\t\t */\n\t\tthis.document = document;\n\n\t\t/**\n\t\t * Parent element. Null by default. Set by {@link module:engine/view/element~Element#_insertChild}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/element~Element|module:engine/view/documentfragment~DocumentFragment|null}\n\t\t */\n\t\tthis.parent = null;\n\t}\n\n\t/**\n\t * Index of the node in the parent element or null if the node has no parent.\n\t *\n\t * Accessing this property throws an error if this node's parent element does not contain it.\n\t * This means that view tree got broken.\n\t *\n\t * @readonly\n\t * @type {Number|null}\n\t */\n\tget index() {\n\t\tlet pos;\n\n\t\tif ( !this.parent ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// No parent or child doesn't exist in parent's children.\n\t\tif ( ( pos = this.parent.getChildIndex( this ) ) == -1 ) {\n\t\t\t/**\n\t\t\t * The node's parent does not contain this node. It means that the document tree is corrupted.\n\t\t\t *\n\t\t\t * @error view-node-not-found-in-parent\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-node-not-found-in-parent', this );\n\t\t}\n\n\t\treturn pos;\n\t}\n\n\t/**\n\t * Node's next sibling, or `null` if it is the last child.\n\t *\n\t * @readonly\n\t * @type {module:engine/view/node~Node|null}\n\t */\n\tget nextSibling() {\n\t\tconst index = this.index;\n\n\t\treturn ( index !== null && this.parent.getChild( index + 1 ) ) || null;\n\t}\n\n\t/**\n\t * Node's previous sibling, or `null` if it is the first child.\n\t *\n\t * @readonly\n\t * @type {module:engine/view/node~Node|null}\n\t */\n\tget previousSibling() {\n\t\tconst index = this.index;\n\n\t\treturn ( index !== null && this.parent.getChild( index - 1 ) ) || null;\n\t}\n\n\t/**\n\t * Top-most ancestor of the node. If the node has no parent it is the root itself.\n\t *\n\t * @readonly\n\t * @type {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment}\n\t */\n\tget root() {\n\t\tlet root = this; // eslint-disable-line consistent-this\n\n\t\twhile ( root.parent ) {\n\t\t\troot = root.parent;\n\t\t}\n\n\t\treturn root;\n\t}\n\n\t/**\n\t * Returns true if the node is in a tree rooted in the document (is a descendant of one of its roots).\n\t *\n\t * @returns {Boolean}\n\t */\n\tisAttached() {\n\t\treturn this.root.is( 'rootElement' );\n\t}\n\n\t/**\n\t * Gets a path to the node. The path is an array containing indices of consecutive ancestors of this node,\n\t * beginning from {@link module:engine/view/node~Node#root root}, down to this node's index.\n\t *\n\t *\t\tconst abc = downcastWriter.createText( 'abc' );\n\t *\t\tconst foo = downcastWriter.createText( 'foo' );\n\t *\t\tconst h1 = downcastWriter.createElement( 'h1', null, downcastWriter.createText( 'header' ) );\n\t *\t\tconst p = downcastWriter.createElement( 'p', null, [ abc, foo ] );\n\t *\t\tconst div = downcastWriter.createElement( 'div', null, [ h1, p ] );\n\t *\t\tfoo.getPath(); // Returns [ 1, 3 ]. `foo` is in `p` which is in `div`. `p` starts at offset 1, while `foo` at 3.\n\t *\t\th1.getPath(); // Returns [ 0 ].\n\t *\t\tdiv.getPath(); // Returns [].\n\t *\n\t * @returns {Array.<Number>} The path.\n\t */\n\tgetPath() {\n\t\tconst path = [];\n\t\tlet node = this; // eslint-disable-line consistent-this\n\n\t\twhile ( node.parent ) {\n\t\t\tpath.unshift( node.index );\n\t\t\tnode = node.parent;\n\t\t}\n\n\t\treturn path;\n\t}\n\n\t/**\n\t * Returns ancestors array of this node.\n\t *\n\t * @param {Object} options Options object.\n\t * @param {Boolean} [options.includeSelf=false] When set to `true` this node will be also included in parent's array.\n\t * @param {Boolean} [options.parentFirst=false] When set to `true`, array will be sorted from node's parent to root element,\n\t * otherwise root element will be the first item in the array.\n\t * @returns {Array} Array with ancestors.\n\t */\n\tgetAncestors( options = { includeSelf: false, parentFirst: false } ) {\n\t\tconst ancestors = [];\n\t\tlet parent = options.includeSelf ? this : this.parent;\n\n\t\twhile ( parent ) {\n\t\t\tancestors[ options.parentFirst ? 'push' : 'unshift' ]( parent );\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn ancestors;\n\t}\n\n\t/**\n\t * Returns a {@link module:engine/view/element~Element} or {@link module:engine/view/documentfragment~DocumentFragment}\n\t * which is a common ancestor of both nodes.\n\t *\n\t * @param {module:engine/view/node~Node} node The second node.\n\t * @param {Object} options Options object.\n\t * @param {Boolean} [options.includeSelf=false] When set to `true` both nodes will be considered \"ancestors\" too.\n\t * Which means that if e.g. node A is inside B, then their common ancestor will be B.\n\t * @returns {module:engine/view/element~Element|module:engine/view/documentfragment~DocumentFragment|null}\n\t */\n\tgetCommonAncestor( node, options = {} ) {\n\t\tconst ancestorsA = this.getAncestors( options );\n\t\tconst ancestorsB = node.getAncestors( options );\n\n\t\tlet i = 0;\n\n\t\twhile ( ancestorsA[ i ] == ancestorsB[ i ] && ancestorsA[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i === 0 ? null : ancestorsA[ i - 1 ];\n\t}\n\n\t/**\n\t * Returns whether this node is before given node. `false` is returned if nodes are in different trees (for example,\n\t * in different {@link module:engine/view/documentfragment~DocumentFragment}s).\n\t *\n\t * @param {module:engine/view/node~Node} node Node to compare with.\n\t * @returns {Boolean}\n\t */\n\tisBefore( node ) {\n\t\t// Given node is not before this node if they are same.\n\t\tif ( this == node ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Return `false` if it is impossible to compare nodes.\n\t\tif ( this.root !== node.root ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst thisPath = this.getPath();\n\t\tconst nodePath = node.getPath();\n\n\t\tconst result = compareArrays( thisPath, nodePath );\n\n\t\tswitch ( result ) {\n\t\t\tcase 'prefix':\n\t\t\t\treturn true;\n\n\t\t\tcase 'extension':\n\t\t\t\treturn false;\n\n\t\t\tdefault:\n\t\t\t\treturn thisPath[ result ] < nodePath[ result ];\n\t\t}\n\t}\n\n\t/**\n\t * Returns whether this node is after given node. `false` is returned if nodes are in different trees (for example,\n\t * in different {@link module:engine/view/documentfragment~DocumentFragment}s).\n\t *\n\t * @param {module:engine/view/node~Node} node Node to compare with.\n\t * @returns {Boolean}\n\t */\n\tisAfter( node ) {\n\t\t// Given node is not before this node if they are same.\n\t\tif ( this == node ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Return `false` if it is impossible to compare nodes.\n\t\tif ( this.root !== node.root ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// In other cases, just check if the `node` is before, and return the opposite.\n\t\treturn !this.isBefore( node );\n\t}\n\n\t/**\n\t * Removes node from parent.\n\t *\n\t * @protected\n\t */\n\t_remove() {\n\t\tthis.parent._removeChildren( this.index );\n\t}\n\n\t/**\n\t * @protected\n\t * @param {module:engine/view/document~ChangeType} type Type of the change.\n\t * @param {module:engine/view/node~Node} node Changed node.\n\t * @fires change\n\t */\n\t_fireChange( type, node ) {\n\t\tthis.fire( 'change:' + type, node );\n\n\t\tif ( this.parent ) {\n\t\t\tthis.parent._fireChange( type, node );\n\t\t}\n\t}\n\n\t/**\n\t * Custom toJSON method to solve child-parent circular dependencies.\n\t *\n\t * @returns {Object} Clone of this object with the parent property removed.\n\t */\n\ttoJSON() {\n\t\tconst json = clone( this );\n\n\t\t// Due to circular references we need to remove parent reference.\n\t\tdelete json.parent;\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Checks whether this object is of the given type.\n\t *\n\t * This method is useful when processing view objects that are of unknown type. For example, a function\n\t * may return a {@link module:engine/view/documentfragment~DocumentFragment} or a {@link module:engine/view/node~Node}\n\t * that can be either a text node or an element. This method can be used to check what kind of object is returned.\n\t *\n\t *\t\tsomeObject.is( 'element' ); // -> true if this is an element\n\t *\t\tsomeObject.is( 'node' ); // -> true if this is a node (a text node or an element)\n\t *\t\tsomeObject.is( 'documentFragment' ); // -> true if this is a document fragment\n\t *\n\t * Since this method is also available on a range of model objects, you can prefix the type of the object with\n\t * `model:` or `view:` to check, for example, if this is the model's or view's element:\n\t *\n\t *\t\tviewElement.is( 'view:element' ); // -> true\n\t *\t\tviewElement.is( 'model:element' ); // -> false\n\t *\n\t * By using this method it is also possible to check a name of an element:\n\t *\n\t *\t\timgElement.is( 'element', 'img' ); // -> true\n\t *\t\timgElement.is( 'view:element', 'img' ); // -> same as above, but more precise\n\t *\n\t * The list of view objects which implement the `is()` method:\n\t *\n\t * * {@link module:engine/view/attributeelement~AttributeElement#is `AttributeElement#is()`}\n\t * * {@link module:engine/view/containerelement~ContainerElement#is `ContainerElement#is()`}\n\t * * {@link module:engine/view/documentfragment~DocumentFragment#is `DocumentFragment#is()`}\n\t * * {@link module:engine/view/documentselection~DocumentSelection#is `DocumentSelection#is()`}\n\t * * {@link module:engine/view/editableelement~EditableElement#is `EditableElement#is()`}\n\t * * {@link module:engine/view/element~Element#is `Element#is()`}\n\t * * {@link module:engine/view/emptyelement~EmptyElement#is `EmptyElement#is()`}\n\t * * {@link module:engine/view/node~Node#is `Node#is()`}\n\t * * {@link module:engine/view/position~Position#is `Position#is()`}\n\t * * {@link module:engine/view/range~Range#is `Range#is()`}\n\t * * {@link module:engine/view/rooteditableelement~RootEditableElement#is `RootEditableElement#is()`}\n\t * * {@link module:engine/view/selection~Selection#is `Selection#is()`}\n\t * * {@link module:engine/view/text~Text#is `Text#is()`}\n\t * * {@link module:engine/view/textproxy~TextProxy#is `TextProxy#is()`}\n\t * * {@link module:engine/view/uielement~UIElement#is `UIElement#is()`}\n\t *\n\t * @method #is\n\t * @param {String} type Type to check.\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === 'node' || type === 'view:node';\n\t}\n\n\t/**\n\t * Clones this node.\n\t *\n\t * @protected\n\t * @method #_clone\n\t * @returns {module:engine/view/node~Node} Clone of this node.\n\t */\n\n\t/**\n\t * Checks if provided node is similar to this node.\n\t *\n\t * @method #isSimilar\n\t * @returns {Boolean} True if nodes are similar.\n\t */\n}\n\n/**\n * Fired when list of {@link module:engine/view/element~Element elements} children changes.\n *\n * Change event is bubbled – it is fired on all ancestors.\n *\n * @event change:children\n * @param {module:engine/view/node~Node} changedNode\n */\n\n/**\n * Fired when list of {@link module:engine/view/element~Element elements} attributes changes.\n *\n * Change event is bubbled – it is fired on all ancestors.\n *\n * @event change:attributes\n * @param {module:engine/view/node~Node} changedNode\n */\n\n/**\n * Fired when {@link module:engine/view/text~Text text nodes} data changes.\n *\n * Change event is bubbled – it is fired on all ancestors.\n *\n * @event change:text\n * @param {module:engine/view/node~Node} changedNode\n */\n\n/**\n * @event change\n */\n\nmix( Node, EmitterMixin );\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/text\n */\n\nimport Node from './node';\n\n/**\n * Tree view text node.\n *\n * The constructor of this class should not be used directly. To create a new text node instance\n * use the {@link module:engine/view/downcastwriter~DowncastWriter#createText `DowncastWriter#createText()`}\n * method when working on data downcasted from the model or the\n * {@link module:engine/view/upcastwriter~UpcastWriter#createText `UpcastWriter#createText()`}\n * method when working on non-semantic views.\n *\n * @extends module:engine/view/node~Node\n */\nexport default class Text extends Node {\n\t/**\n\t * Creates a tree view text node.\n\t *\n\t * @protected\n\t * @param {module:engine/view/document~Document} document The document instance to which this text node belongs.\n\t * @param {String} data The text's data.\n\t */\n\tconstructor( document, data ) {\n\t\tsuper( document );\n\n\t\t/**\n\t\t * The text content.\n\t\t *\n\t\t * Setting the data fires the {@link module:engine/view/node~Node#event:change:text change event}.\n\t\t *\n\t\t * @protected\n\t\t * @member {String} module:engine/view/text~Text#_textData\n\t\t */\n\t\tthis._textData = data;\n\t}\n\n\t/**\n\t * Checks whether this object is of the given type.\n\t *\n\t *\t\ttext.is( '$text' ); // -> true\n\t *\t\ttext.is( 'node' ); // -> true\n\t *\t\ttext.is( 'view:$text' ); // -> true\n\t *\t\ttext.is( 'view:node' ); // -> true\n\t *\n\t *\t\ttext.is( 'model:$text' ); // -> false\n\t *\t\ttext.is( 'element' ); // -> false\n\t *\t\ttext.is( 'range' ); // -> false\n\t *\n\t * {@link module:engine/view/node~Node#is Check the entire list of view objects} which implement the `is()` method.\n\t *\n\t * **Note:** Until version 20.0.0 this method wasn't accepting `'$text'` type. The legacy `'text'` type is still\n\t * accepted for backward compatibility.\n\t *\n\t * @param {String} type Type to check.\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === '$text' || type === 'view:$text' ||\n\t\t\t// This are legacy values kept for backward compatibility.\n\t\t\ttype === 'text' || type === 'view:text' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n\t\t\ttype === 'node' || type === 'view:node';\n\t}\n\n\t/**\n\t * The text content.\n\t *\n\t * @readonly\n\t * @type {String}\n\t */\n\tget data() {\n\t\treturn this._textData;\n\t}\n\n\t/**\n\t * The `_data` property is controlled by a getter and a setter.\n\t *\n\t * The getter is required when using the addition assignment operator on protected property:\n\t *\n\t *\t\tconst foo = downcastWriter.createText( 'foo' );\n\t *\t\tconst bar = downcastWriter.createText( 'bar' );\n\t *\n\t *\t\tfoo._data += bar.data; // executes: `foo._data = foo._data + bar.data`\n\t *\t\tconsole.log( foo.data ); // prints: 'foobar'\n\t *\n\t * If the protected getter didn't exist, `foo._data` will return `undefined` and result of the merge will be invalid.\n\t *\n\t * The setter sets data and fires the {@link module:engine/view/node~Node#event:change:text change event}.\n\t *\n\t * @protected\n\t * @type {String}\n\t */\n\tget _data() {\n\t\treturn this.data;\n\t}\n\n\tset _data( data ) {\n\t\tthis._fireChange( 'text', this );\n\n\t\tthis._textData = data;\n\t}\n\n\t/**\n\t * Checks if this text node is similar to other text node.\n\t * Both nodes should have the same data to be considered as similar.\n\t *\n\t * @param {module:engine/view/text~Text} otherNode Node to check if it is same as this node.\n\t * @returns {Boolean}\n\t */\n\tisSimilar( otherNode ) {\n\t\tif ( !( otherNode instanceof Text ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this === otherNode || this.data === otherNode.data;\n\t}\n\n\t/**\n\t * Clones this node.\n\t *\n\t * @protected\n\t * @returns {module:engine/view/text~Text} Text node that is a clone of this node.\n\t */\n\t_clone() {\n\t\treturn new Text( this.document, this.data );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // toString() {\n\t// @if CK_DEBUG_ENGINE // \treturn `#${ this.data }`;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // log() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ViewText: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // logExtended() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ViewText: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/textproxy\n */\n\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n/**\n * TextProxy is a wrapper for substring of {@link module:engine/view/text~Text}. Instance of this class is created by\n * {@link module:engine/view/treewalker~TreeWalker} when only a part of {@link module:engine/view/text~Text} needs to be returned.\n *\n * `TextProxy` has an API similar to {@link module:engine/view/text~Text Text} and allows to do most of the common tasks performed\n * on view nodes.\n *\n * **Note:** Some `TextProxy` instances may represent whole text node, not just a part of it.\n * See {@link module:engine/view/textproxy~TextProxy#isPartial}.\n *\n * **Note:** `TextProxy` is a readonly interface.\n *\n * **Note:** `TextProxy` instances are created on the fly basing on the current state of parent {@link module:engine/view/text~Text}.\n * Because of this it is highly unrecommended to store references to `TextProxy instances because they might get\n * invalidated due to operations on Document. Also TextProxy is not a {@link module:engine/view/node~Node} so it can not be\n * inserted as a child of {@link module:engine/view/element~Element}.\n *\n * `TextProxy` instances are created by {@link module:engine/view/treewalker~TreeWalker view tree walker}. You should not need to create\n * an instance of this class by your own.\n */\nexport default class TextProxy {\n\t/**\n\t * Creates a text proxy.\n\t *\n\t * @protected\n\t * @param {module:engine/view/text~Text} textNode Text node which part is represented by this text proxy.\n\t * @param {Number} offsetInText Offset in {@link module:engine/view/textproxy~TextProxy#textNode text node}\n\t * from which the text proxy starts.\n\t * @param {Number} length Text proxy length, that is how many text node's characters, starting from `offsetInText` it represents.\n\t * @constructor\n\t */\n\tconstructor( textNode, offsetInText, length ) {\n\t\t/**\n\t\t * Reference to the {@link module:engine/view/text~Text} element which TextProxy is a substring.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/text~Text} module:engine/view/textproxy~TextProxy#textNode\n\t\t */\n\t\tthis.textNode = textNode;\n\n\t\tif ( offsetInText < 0 || offsetInText > textNode.data.length ) {\n\t\t\t/**\n\t\t\t * Given offsetInText value is incorrect.\n\t\t\t *\n\t\t\t * @error view-textproxy-wrong-offsetintext\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-textproxy-wrong-offsetintext', this );\n\t\t}\n\n\t\tif ( length < 0 || offsetInText + length > textNode.data.length ) {\n\t\t\t/**\n\t\t\t * Given length value is incorrect.\n\t\t\t *\n\t\t\t * @error view-textproxy-wrong-length\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-textproxy-wrong-length', this );\n\t\t}\n\n\t\t/**\n\t\t * Text data represented by this text proxy.\n\t\t *\n\t\t * @readonly\n\t\t * @member {String} module:engine/view/textproxy~TextProxy#data\n\t\t */\n\t\tthis.data = textNode.data.substring( offsetInText, offsetInText + length );\n\n\t\t/**\n\t\t * Offset in the `textNode` where this `TextProxy` instance starts.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Number} module:engine/view/textproxy~TextProxy#offsetInText\n\t\t */\n\t\tthis.offsetInText = offsetInText;\n\t}\n\n\t/**\n\t * Offset size of this node.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget offsetSize() {\n\t\treturn this.data.length;\n\t}\n\n\t/**\n\t * Flag indicating whether `TextProxy` instance covers only part of the original {@link module:engine/view/text~Text text node}\n\t * (`true`) or the whole text node (`false`).\n\t *\n\t * This is `false` when text proxy starts at the very beginning of {@link module:engine/view/textproxy~TextProxy#textNode textNode}\n\t * ({@link module:engine/view/textproxy~TextProxy#offsetInText offsetInText} equals `0`) and text proxy sizes is equal to\n\t * text node size.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isPartial() {\n\t\treturn this.data.length !== this.textNode.data.length;\n\t}\n\n\t/**\n\t * Parent of this text proxy, which is same as parent of text node represented by this text proxy.\n\t *\n\t * @readonly\n\t * @type {module:engine/view/element~Element|module:engine/view/documentfragment~DocumentFragment|null}\n\t */\n\tget parent() {\n\t\treturn this.textNode.parent;\n\t}\n\n\t/**\n\t * Root of this text proxy, which is same as root of text node represented by this text proxy.\n\t *\n\t * @readonly\n\t * @type {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment}\n\t */\n\tget root() {\n\t\treturn this.textNode.root;\n\t}\n\n\t/**\n\t * {@link module:engine/view/document~Document View document} that owns this text proxy, or `null` if the text proxy is inside\n\t * {@link module:engine/view/documentfragment~DocumentFragment document fragment}.\n\t *\n\t * @readonly\n\t * @type {module:engine/view/document~Document|null}\n\t */\n\tget document() {\n\t\treturn this.textNode.document;\n\t}\n\n\t/**\n\t * Checks whether this object is of the given type.\n\t *\n\t *\t\ttextProxy.is( '$textProxy' ); // -> true\n\t *\t\ttextProxy.is( 'view:$textProxy' ); // -> true\n\t *\n\t *\t\ttextProxy.is( 'model:$textProxy' ); // -> false\n\t *\t\ttextProxy.is( 'element' ); // -> false\n\t *\t\ttextProxy.is( 'range' ); // -> false\n\t *\n\t * {@link module:engine/view/node~Node#is Check the entire list of view objects} which implement the `is()` method.\n\t *\n\t * **Note:** Until version 20.0.0 this method wasn't accepting `'$textProxy'` type. The legacy `'textProxy'` type is still\n\t * accepted for backward compatibility.\n\t *\n\t * @param {String} type Type to check.\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === '$textProxy' || type === 'view:$textProxy' ||\n\t\t\t// This are legacy values kept for backward compatibility.\n\t\t\ttype === 'textProxy' || type === 'view:textProxy';\n\t}\n\n\t/**\n\t * Returns ancestors array of this text proxy.\n\t *\n\t * @param {Object} options Options object.\n\t * @param {Boolean} [options.includeSelf=false] When set to `true` {#textNode} will be also included in parent's array.\n\t * @param {Boolean} [options.parentFirst=false] When set to `true`, array will be sorted from text proxy parent to\n\t * root element, otherwise root element will be the first item in the array.\n\t * @returns {Array} Array with ancestors.\n\t */\n\tgetAncestors( options = { includeSelf: false, parentFirst: false } ) {\n\t\tconst ancestors = [];\n\t\tlet parent = options.includeSelf ? this.textNode : this.parent;\n\n\t\twhile ( parent !== null ) {\n\t\t\tancestors[ options.parentFirst ? 'push' : 'unshift' ]( parent );\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn ancestors;\n\t}\n\n\t// @if CK_DEBUG_ENGINE // toString() {\n\t// @if CK_DEBUG_ENGINE // \treturn `#${ this.data }`;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // log() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ViewTextProxy: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // logExtended() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ViewTextProxy: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/tomap\n */\n\nimport objectToMap from './objecttomap';\nimport isIterable from './isiterable';\n\n/**\n * Transforms object or iterable to map. Iterable needs to be in the format acceptable by the `Map` constructor.\n *\n *\t\tmap = toMap( { 'foo': 1, 'bar': 2 } );\n *\t\tmap = toMap( [ [ 'foo', 1 ], [ 'bar', 2 ] ] );\n *\t\tmap = toMap( anotherMap );\n *\n * @param {Object|Iterable} data Object or iterable to transform.\n * @returns {Map} Map created from data.\n */\nexport default function toMap( data ) {\n\tif ( isIterable( data ) ) {\n\t\treturn new Map( data );\n\t} else {\n\t\treturn objectToMap( data );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/objecttomap\n */\n\n/**\n * Transforms object to map.\n *\n *\t\tconst map = objectToMap( { 'foo': 1, 'bar': 2 } );\n *\t\tmap.get( 'foo' ); // 1\n *\n * **Note**: For mixed data (`Object` or `Iterable`) there's a dedicated {@link module:utils/tomap~toMap} function.\n *\n * @param {Object} obj Object to transform.\n * @returns {Map} Map created from object.\n */\nexport default function objectToMap( obj ) {\n\tconst map = new Map();\n\n\tfor ( const key in obj ) {\n\t\tmap.set( key, obj[ key ] );\n\t}\n\n\treturn map;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/matcher\n */\n\nimport { isPlainObject } from 'lodash-es';\n\nimport { logWarning } from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n/**\n * View matcher class.\n * Instance of this class can be used to find {@link module:engine/view/element~Element elements} that match given pattern.\n */\nexport default class Matcher {\n\t/**\n\t * Creates new instance of Matcher.\n\t *\n\t * @param {String|RegExp|Object} [pattern] Match patterns. See {@link module:engine/view/matcher~Matcher#add add method} for\n\t * more information.\n\t */\n\tconstructor( ...pattern ) {\n\t\t/**\n\t\t * @private\n\t\t * @type {Array<String|RegExp|Object>}\n\t\t */\n\t\tthis._patterns = [];\n\n\t\tthis.add( ...pattern );\n\t}\n\n\t/**\n\t * Adds pattern or patterns to matcher instance.\n\t *\n\t *\t\t// String.\n\t *\t\tmatcher.add( 'div' );\n\t *\n\t *\t\t// Regular expression.\n\t *\t\tmatcher.add( /^\\w/ );\n\t *\n\t *\t\t// Single class.\n\t *\t\tmatcher.add( {\n\t *\t\t\tclasses: 'foobar'\n\t *\t\t} );\n\t *\n\t * See {@link module:engine/view/matcher~MatcherPattern} for more examples.\n\t *\n\t * Multiple patterns can be added in one call:\n\t *\n\t * \t\tmatcher.add( 'div', { classes: 'foobar' } );\n\t *\n\t * @param {Object|String|RegExp|Function} pattern Object describing pattern details. If string or regular expression\n\t * is provided it will be used to match element's name. Pattern can be also provided in a form\n\t * of a function - then this function will be called with each {@link module:engine/view/element~Element element} as a parameter.\n\t * Function's return value will be stored under `match` key of the object returned from\n\t * {@link module:engine/view/matcher~Matcher#match match} or {@link module:engine/view/matcher~Matcher#matchAll matchAll} methods.\n\t * @param {String|RegExp} [pattern.name] Name or regular expression to match element's name.\n\t * @param {Object} [pattern.attributes] Object with key-value pairs representing attributes to match. Each object key\n\t * represents attribute name. Value under that key can be either:\n\t * * `true` - then attribute is just required (can be empty),\n\t * * a string - then attribute has to be equal, or\n\t * * a regular expression - then attribute has to match the expression.\n\t * @param {String|RegExp|Array} [pattern.classes] Class name or array of class names to match. Each name can be\n\t * provided in a form of string or regular expression.\n\t * @param {Object} [pattern.styles] Object with key-value pairs representing styles to match. Each object key\n\t * represents style name. Value under that key can be either a string or a regular expression and it will be used\n\t * to match style value.\n\t */\n\tadd( ...pattern ) {\n\t\tfor ( let item of pattern ) {\n\t\t\t// String or RegExp pattern is used as element's name.\n\t\t\tif ( typeof item == 'string' || item instanceof RegExp ) {\n\t\t\t\titem = { name: item };\n\t\t\t}\n\n\t\t\tthis._patterns.push( item );\n\t\t}\n\t}\n\n\t/**\n\t * Matches elements for currently stored patterns. Returns match information about first found\n\t * {@link module:engine/view/element~Element element}, otherwise returns `null`.\n\t *\n\t * Example of returned object:\n\t *\n\t *\t\t{\n\t *\t\t\telement: <instance of found element>,\n\t *\t\t\tpattern: <pattern used to match found element>,\n\t *\t\t\tmatch: {\n\t *\t\t\t\tname: true,\n\t *\t\t\t\tattributes: [ 'title', 'href' ],\n\t *\t\t\t\tclasses: [ 'foo' ],\n\t *\t\t\t\tstyles: [ 'color', 'position' ]\n\t *\t\t\t}\n\t *\t\t}\n\t *\n\t * @see module:engine/view/matcher~Matcher#add\n\t * @see module:engine/view/matcher~Matcher#matchAll\n\t * @param {...module:engine/view/element~Element} element View element to match against stored patterns.\n\t * @returns {Object|null} result\n\t * @returns {module:engine/view/element~Element} result.element Matched view element.\n\t * @returns {Object|String|RegExp|Function} result.pattern Pattern that was used to find matched element.\n\t * @returns {Object} result.match Object representing matched element parts.\n\t * @returns {Boolean} [result.match.name] True if name of the element was matched.\n\t * @returns {Array} [result.match.attributes] Array with matched attribute names.\n\t * @returns {Array} [result.match.classes] Array with matched class names.\n\t * @returns {Array} [result.match.styles] Array with matched style names.\n\t */\n\tmatch( ...element ) {\n\t\tfor ( const singleElement of element ) {\n\t\t\tfor ( const pattern of this._patterns ) {\n\t\t\t\tconst match = isElementMatching( singleElement, pattern );\n\n\t\t\t\tif ( match ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\telement: singleElement,\n\t\t\t\t\t\tpattern,\n\t\t\t\t\t\tmatch\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Matches elements for currently stored patterns. Returns array of match information with all found\n\t * {@link module:engine/view/element~Element elements}. If no element is found - returns `null`.\n\t *\n\t * @see module:engine/view/matcher~Matcher#add\n\t * @see module:engine/view/matcher~Matcher#match\n\t * @param {...module:engine/view/element~Element} element View element to match against stored patterns.\n\t * @returns {Array.<Object>|null} Array with match information about found elements or `null`. For more information\n\t * see {@link module:engine/view/matcher~Matcher#match match method} description.\n\t */\n\tmatchAll( ...element ) {\n\t\tconst results = [];\n\n\t\tfor ( const singleElement of element ) {\n\t\t\tfor ( const pattern of this._patterns ) {\n\t\t\t\tconst match = isElementMatching( singleElement, pattern );\n\n\t\t\t\tif ( match ) {\n\t\t\t\t\tresults.push( {\n\t\t\t\t\t\telement: singleElement,\n\t\t\t\t\t\tpattern,\n\t\t\t\t\t\tmatch\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn results.length > 0 ? results : null;\n\t}\n\n\t/**\n\t * Returns the name of the element to match if there is exactly one pattern added to the matcher instance\n\t * and it matches element name defined by `string` (not `RegExp`). Otherwise, returns `null`.\n\t *\n\t * @returns {String|null} Element name trying to match.\n\t */\n\tgetElementName() {\n\t\tif ( this._patterns.length !== 1 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst pattern = this._patterns[ 0 ];\n\t\tconst name = pattern.name;\n\n\t\treturn ( typeof pattern != 'function' && name && !( name instanceof RegExp ) ) ? name : null;\n\t}\n}\n\n// Returns match information if {@link module:engine/view/element~Element element} is matching provided pattern.\n// If element cannot be matched to provided pattern - returns `null`.\n//\n// @param {module:engine/view/element~Element} element\n// @param {Object|String|RegExp|Function} pattern\n// @returns {Object|null} Returns object with match information or null if element is not matching.\nfunction isElementMatching( element, pattern ) {\n\t// If pattern is provided as function - return result of that function;\n\tif ( typeof pattern == 'function' ) {\n\t\treturn pattern( element );\n\t}\n\n\tconst match = {};\n\t// Check element's name.\n\tif ( pattern.name ) {\n\t\tmatch.name = matchName( pattern.name, element.name );\n\n\t\tif ( !match.name ) {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t// Check element's attributes.\n\tif ( pattern.attributes ) {\n\t\tmatch.attributes = matchAttributes( pattern.attributes, element );\n\n\t\tif ( !match.attributes ) {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t// Check element's classes.\n\tif ( pattern.classes ) {\n\t\tmatch.classes = matchClasses( pattern.classes, element );\n\n\t\tif ( !match.classes ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// Check element's styles.\n\tif ( pattern.styles ) {\n\t\tmatch.styles = matchStyles( pattern.styles, element );\n\n\t\tif ( !match.styles ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn match;\n}\n\n// Checks if name can be matched by provided pattern.\n//\n// @param {String|RegExp} pattern\n// @param {String} name\n// @returns {Boolean} Returns `true` if name can be matched, `false` otherwise.\nfunction matchName( pattern, name ) {\n\t// If pattern is provided as RegExp - test against this regexp.\n\tif ( pattern instanceof RegExp ) {\n\t\treturn !!name.match( pattern );\n\t}\n\n\treturn pattern === name;\n}\n\n// Checks if an array of key/value pairs can be matched against provided patterns.\n//\n// Patterns can be provided in a following ways:\n// \t- a boolean value matches any attribute with any value (or no value):\n//\n//\t\t\tpattern: true\n//\n//\t- a RegExp expression or object matches any attribute name:\n//\n//\t\t\tpattern: /h[1-6]/\n//\n//\t- an object matches any attribute that has the same name as the object item's key, where object item's value is:\n//\t\t- equal to `true`, which matches any attribute value:\n//\n//\t\t\tpattern: {\n//\t\t\t\trequired: true\n//\t\t\t}\n//\n//\t\t- a string that is equal to attribute value:\n//\n//\t\t\tpattern: {\n//\t\t\t\trel: 'nofollow'\n//\t\t\t}\n//\n//\t\t- a regular expression that matches attribute value,\n//\n//\t\t\tpattern: {\n//\t\t\t\tsrc: /https.*/\n//\t\t\t}\n//\n//\t- an array with items, where the item is:\n//\t\t- a string that is equal to attribute value:\n//\n//\t\t\tpattern: [ 'data-property-1', 'data-property-2' ],\n//\n//\t\t- an object with `key` and `value` property, where `key` is a regular expression matching attribute name and\n//\t\t `value` is either regular expression matching attribute value or a string equal to attribute value:\n//\n//\t\t\tpattern: [\n//\t\t\t\t{ key: /data-property-.*/, value: true },\n//\t\t\t\t// or:\n//\t\t\t\t{ key: /data-property-.*/, value: 'foobar' },\n//\t\t\t\t// or:\n//\t\t\t\t{ key: /data-property-.*/, value: /foo.*/ }\n//\t\t\t]\n//\n// @param {Object} patterns Object with information about attributes to match.\n// @param {Iterable.<String>} keys Attribute, style or class keys.\n// @param {Function} valueGetter A function providing value for a given item key.\n// @returns {Array|null} Returns array with matched attribute names or `null` if no attributes were matched.\nfunction matchPatterns( patterns, keys, valueGetter ) {\n\tconst normalizedPatterns = normalizePatterns( patterns );\n\tconst normalizedItems = Array.from( keys );\n\tconst match = [];\n\n\tnormalizedPatterns.forEach( ( [ patternKey, patternValue ] ) => {\n\t\tnormalizedItems.forEach( itemKey => {\n\t\t\tif (\n\t\t\t\tisKeyMatched( patternKey, itemKey ) &&\n\t\t\t\tisValueMatched( patternValue, itemKey, valueGetter )\n\t\t\t) {\n\t\t\t\tmatch.push( itemKey );\n\t\t\t}\n\t\t} );\n\t} );\n\n\t// Return matches only if there are at least as many of them as there are patterns.\n\t// The RegExp pattern can match more than one item.\n\tif ( !normalizedPatterns.length || match.length < normalizedPatterns.length ) {\n\t\treturn null;\n\t}\n\n\treturn match;\n}\n\n// Bring all the possible pattern forms to an array of arrays where first item is a key and second is a value.\n//\n// Examples:\n//\n// Boolean pattern value:\n//\n//\t\ttrue\n//\n// to\n//\n//\t\t[ [ true, true ] ]\n//\n// Textual pattern value:\n//\n//\t\t'attribute-name-or-class-or-style'\n//\n// to\n//\n//\t\t[ [ 'attribute-name-or-class-or-style', true ] ]\n//\n// Regular expression:\n//\n//\t\t/^data-.*$/\n//\n// to\n//\n//\t\t[ [ /^data-.*$/, true ] ]\n//\n// Objects (plain or with `key` and `value` specified explicitly):\n//\n//\t\t{\n//\t\t\tsrc: /^https:.*$/\n//\t\t}\n//\n// or\n//\n//\t\t[ {\n//\t\t\tkey: 'src',\n//\t\t\tvalue: /^https:.*$/\n//\t\t} ]\n//\n// to:\n//\n//\t\t[ [ 'src', /^https:.*$/ ] ]\n//\n// @param {Object|Array} patterns\n// @returns {Array|null} Returns an array of objects or null if provided patterns were not in an expected form.\nfunction normalizePatterns( patterns ) {\n\tif ( Array.isArray( patterns ) ) {\n\t\treturn patterns.map( pattern => {\n\t\t\tif ( isPlainObject( pattern ) ) {\n\t\t\t\tif ( pattern.key === undefined || pattern.value === undefined ) {\n\t\t\t\t\t// Documented at the end of matcher.js.\n\t\t\t\t\tlogWarning( 'matcher-pattern-missing-key-or-value', pattern );\n\t\t\t\t}\n\n\t\t\t\treturn [ pattern.key, pattern.value ];\n\t\t\t}\n\n\t\t\t// Assume the pattern is either String or RegExp.\n\t\t\treturn [ pattern, true ];\n\t\t} );\n\t}\n\n\tif ( isPlainObject( patterns ) ) {\n\t\treturn Object.entries( patterns );\n\t}\n\n\t// Other cases (true, string or regexp).\n\treturn [ [ patterns, true ] ];\n}\n\n// @param {String|RegExp} patternKey A pattern representing a key we want to match.\n// @param {String} itemKey An actual item key (e.g. `'src'`, `'background-color'`, `'ck-widget'`) we're testing against pattern.\n// @returns {Boolean}\nfunction isKeyMatched( patternKey, itemKey ) {\n\treturn patternKey === true ||\n\t\tpatternKey === itemKey ||\n\t\tpatternKey instanceof RegExp && itemKey.match( patternKey );\n}\n\n// @param {String|RegExp} patternValue A pattern representing a value we want to match.\n// @param {String} itemKey An item key, e.g. `background`, `href`, 'rel', etc.\n// @param {Function} valueGetter A function used to provide a value for a given `itemKey`.\n// @returns {Boolean}\nfunction isValueMatched( patternValue, itemKey, valueGetter ) {\n\tif ( patternValue === true ) {\n\t\treturn true;\n\t}\n\n\tconst itemValue = valueGetter( itemKey );\n\n\t// For now, the reducers are not returning the full tree of properties.\n\t// Casting to string preserves the old behavior until the root cause is fixed.\n\t// More can be found in https://github.com/ckeditor/ckeditor5/issues/10399.\n\treturn patternValue === itemValue ||\n\t\tpatternValue instanceof RegExp && !!String( itemValue ).match( patternValue );\n}\n\n// Checks if attributes of provided element can be matched against provided patterns.\n//\n// @param {Object} patterns Object with information about attributes to match. Each key of the object will be\n// used as attribute name. Value of each key can be a string or regular expression to match against attribute value.\n// @param {module:engine/view/element~Element} element Element which attributes will be tested.\n// @returns {Array|null} Returns array with matched attribute names or `null` if no attributes were matched.\nfunction matchAttributes( patterns, element ) {\n\tconst attributeKeys = new Set( element.getAttributeKeys() );\n\n\t// `style` and `class` attribute keys are deprecated. Only allow them in object pattern\n\t// for backward compatibility.\n\tif ( isPlainObject( patterns ) ) {\n\t\tif ( patterns.style !== undefined ) {\n\t\t\t// Documented at the end of matcher.js.\n\t\t\tlogWarning( 'matcher-pattern-deprecated-attributes-style-key', patterns );\n\t\t}\n\t\tif ( patterns.class !== undefined ) {\n\t\t\t// Documented at the end of matcher.js.\n\t\t\tlogWarning( 'matcher-pattern-deprecated-attributes-class-key', patterns );\n\t\t}\n\t} else {\n\t\tattributeKeys.delete( 'style' );\n\t\tattributeKeys.delete( 'class' );\n\t}\n\n\treturn matchPatterns( patterns, attributeKeys, key => element.getAttribute( key ) );\n}\n\n// Checks if classes of provided element can be matched against provided patterns.\n//\n// @param {Array.<String|RegExp>} patterns Array of strings or regular expressions to match against element's classes.\n// @param {module:engine/view/element~Element} element Element which classes will be tested.\n// @returns {Array|null} Returns array with matched class names or `null` if no classes were matched.\nfunction matchClasses( patterns, element ) {\n\t// We don't need `getter` here because patterns for classes are always normalized to `[ className, true ]`.\n\treturn matchPatterns( patterns, element.getClassNames() );\n}\n\n// Checks if styles of provided element can be matched against provided patterns.\n//\n// @param {Object} patterns Object with information about styles to match. Each key of the object will be\n// used as style name. Value of each key can be a string or regular expression to match against style value.\n// @param {module:engine/view/element~Element} element Element which styles will be tested.\n// @returns {Array|null} Returns array with matched style names or `null` if no styles were matched.\nfunction matchStyles( patterns, element ) {\n\treturn matchPatterns( patterns, element.getStyleNames( true ), key => element.getStyle( key ) );\n}\n\n/**\n * An entity that is a valid pattern recognized by a matcher. `MatcherPattern` is used by {@link ~Matcher} to recognize\n * if a view element fits in a group of view elements described by the pattern.\n *\n * `MatcherPattern` can be given as a `String`, a `RegExp`, an `Object` or a `Function`.\n *\n * If `MatcherPattern` is given as a `String` or `RegExp`, it will match any view element that has a matching name:\n *\n *\t\t// Match any element with name equal to 'div'.\n *\t\tconst pattern = 'div';\n *\n *\t\t// Match any element which name starts on 'p'.\n *\t\tconst pattern = /^p/;\n *\n * If `MatcherPattern` is given as an `Object`, all the object's properties will be matched with view element properties.\n * If the view element does not meet all of the object's pattern properties, the match will not happen.\n * Available `Object` matching properties:\n *\n * Matching view element:\n *\n *\t\t// Match view element's name using String:\n *\t\tconst pattern = { name: 'p' };\n *\n *\t\t// or by providing RegExp:\n *\t\tconst pattern = { name: /^(ul|ol)$/ };\n *\n *\t\t// The name can also be skipped to match any view element with matching attributes:\n *\t\tconst pattern = {\n *\t\t\tattributes: {\n *\t\t\t\t'title': true\n *\t\t\t}\n *\t\t};\n *\n * Matching view element attributes:\n *\n *\t\t// Match view element with any attribute value.\n *\t\tconst pattern = {\n *\t\t\tname: 'p',\n *\t\t\tattributes: true\n *\t\t};\n *\n *\t\t// Match view element which has matching attributes (String).\n *\t\tconst pattern = {\n *\t\t\tname: 'figure',\n *\t\t\tattributes: 'title' // Match title attribute (can be empty).\n *\t\t};\n *\n *\t\t// Match view element which has matching attributes (RegExp).\n *\t\tconst pattern = {\n *\t\t\tname: 'figure',\n *\t\t\tattributes: /^data-.*$/ // Match attributes starting with `data-` e.g. `data-foo` with any value (can be empty).\n *\t\t};\n *\n *\t\t// Match view element which has matching attributes (Object).\n *\t\tconst pattern = {\n *\t\t\tname: 'figure',\n *\t\t\tattributes: {\n *\t\t\t\ttitle: 'foobar', // Match `title` attribute with 'foobar' value.\n *\t\t\t\talt: true, // Match `alt` attribute with any value (can be empty).\n *\t\t\t\t'data-type': /^(jpg|png)$/ // Match `data-type` attribute with `jpg` or `png` value.\n *\t\t\t}\n *\t\t};\n *\n *\t\t// Match view element which has matching attributes (Array).\n *\t\tconst pattern = {\n *\t\t\tname: 'figure',\n *\t\t\tattributes: [\n *\t\t\t\t'title', // Match `title` attribute (can be empty).\n *\t\t\t\t/^data-*$/ // Match attributes starting with `data-` e.g. `data-foo` with any value (can be empty).\n *\t\t\t]\n *\t\t};\n *\n *\t\t// Match view element which has matching attributes (key-value pairs).\n *\t\tconst pattern = {\n *\t\t\tname: 'input',\n *\t\t\tattributes: [\n *\t\t\t\t{\n *\t\t\t\t\tkey: 'type', // Match `type` as an attribute key.\n *\t\t\t\t\tvalue: /^(text|number|date)$/\t // Match `text`, `number` or `date` values.\n *\t\t\t\t},\n *\t\t\t\t{\n *\t\t\t\t\tkey: /^data-.*$/, // Match attributes starting with `data-` e.g. `data-foo`.\n *\t\t\t\t\tvalue: true // Match any value (can be empty).\n *\t\t\t\t}\n *\t\t\t]\n *\t\t};\n *\n * Matching view element styles:\n *\n *\t\t// Match view element with any style.\n *\t\tconst pattern = {\n *\t\t\tname: 'p',\n *\t\t\tstyles: true\n *\t\t};\n *\n *\t\t// Match view element which has matching styles (String).\n *\t\tconst pattern = {\n *\t\t\tname: 'p',\n *\t\t\tstyles: 'color' // Match attributes with `color` style.\n *\t\t};\n *\n *\t\t// Match view element which has matching styles (RegExp).\n *\t\tconst pattern = {\n *\t\t\tname: 'p',\n *\t\t\tstyles: /^border.*$/ // Match view element with any border style.\n *\t\t};\n *\n *\t\t// Match view element which has matching styles (Object).\n *\t\tconst pattern = {\n *\t\t\tname: 'p',\n *\t\t\tstyles: {\n *\t\t\t\tcolor: /rgb\\((\\d{1,3}), (\\d{1,3}), (\\d{1,3})\\)/, // Match `color` in RGB format only.\n *\t\t\t\t'font-weight': 600, // Match `font-weight` only if it's `600`.\n *\t\t\t\t'text-decoration': true // Match any text decoration.\n *\t\t\t}\n *\t\t};\n *\n *\t\t// Match view element which has matching styles (Array).\n *\t\tconst pattern = {\n *\t\t\tname: 'p',\n *\t\t\tstyles: [\n *\t\t\t\t'color', // Match `color` with any value.\n *\t\t\t\t/^border.*$/ // Match all border properties.\n *\t\t\t]\n *\t\t};\n *\n *\t\t// Match view element which has matching styles (key-value pairs).\n *\t\tconst pattern = {\n *\t\t\tname: 'p',\n *\t\t\tstyles: [\n *\t\t\t\t{\n *\t\t\t\t\tkey: 'color', \t\t// Match `color` as an property key.\n *\t\t\t\t\tvalue: /rgb\\((\\d{1,3}), (\\d{1,3}), (\\d{1,3})\\)/\t\t// Match RGB format only.\n *\t\t\t\t},\n *\t\t\t\t{\n *\t\t\t\t\tkey: /^border.*$/, // Match any border style.\n *\t\t\t\t\tvalue: true // Match any value.\n *\t\t\t\t}\n *\t\t\t]\n *\t\t};\n *\n * Matching view element classes:\n *\n *\t\t// Match view element with any class.\n *\t\tconst pattern = {\n *\t\t\tname: 'p',\n *\t\t\tclasses: true\n *\t\t};\n *\n *\t\t// Match view element which has matching class (String).\n *\t\tconst pattern = {\n *\t\t\tname: 'p',\n *\t\t\tclasses: 'highlighted' // Match `highlighted` class.\n *\t\t};\n *\n *\t\t// Match view element which has matching classes (RegExp).\n *\t\tconst pattern = {\n *\t\t\tname: 'figure',\n *\t\t\tclasses: /^image-side-(left|right)$/ // Match `image-side-left` or `image-side-right` class.\n *\t\t};\n *\n *\t\t// Match view element which has matching classes (Object).\n *\t\tconst pattern = {\n *\t\t\tname: 'p',\n *\t\t\tclasses: {\n *\t\t\t\thighlighted: true, // Match `highlighted` class.\n *\t\t\t\tmarker: true // Match `marker` class.\n *\t\t\t}\n *\t\t};\n *\n *\t\t// Match view element which has matching classes (Array).\n *\t\tconst pattern = {\n *\t\t\tname: 'figure',\n *\t\t\tclasses: [\n *\t\t\t\t'image', // Match `image` class.\n *\t\t\t\t/^image-side-(left|right)$/ // Match `image-side-left` or `image-side-right` class.\n *\t\t\t]\n *\t\t};\n *\n *\t\t// Match view element which has matching classes (key-value pairs).\n *\t\tconst pattern = {\n *\t\t\tname: 'figure',\n *\t\t\tclasses: [\n *\t\t\t\t{\n *\t\t\t\t\tkey: 'image', // Match `image` class.\n *\t\t\t\t\tvalue: true\n *\t\t\t\t},\n *\t\t\t\t{\n *\t\t\t\t\tkey: /^image-side-(left|right)$/, // Match `image-side-left` or `image-side-right` class.\n *\t\t\t\t\tvalue: true\n *\t\t\t\t}\n *\t\t\t]\n *\t\t};\n *\n * Pattern can combine multiple properties allowing for more complex view element matching:\n *\n *\t\tconst pattern = {\n *\t\t\tname: 'span',\n *\t\t\tattributes: [ 'title' ],\n *\t\t\tstyles: {\n *\t\t\t\t'font-weight': 'bold'\n *\t\t\t},\n *\t\t\tclasses: 'highlighted'\n *\t\t};\n *\n * If `MatcherPattern` is given as a `Function`, the function takes a view element as a first and only parameter and\n * the function should decide whether that element matches. If so, it should return what part of the view element has been matched.\n * Otherwise, the function should return `null`. The returned result will be included in `match` property of the object\n * returned by {@link ~Matcher#match} call.\n *\n *\t\t// Match an empty <div> element.\n *\t\tconst pattern = element => {\n *\t\t\tif ( element.name == 'div' && element.childCount > 0 ) {\n *\t\t\t\t// Return which part of the element was matched.\n *\t\t\t\treturn { name: true };\n *\t\t\t}\n *\n *\t\t\treturn null;\n *\t\t};\n *\n *\t\t// Match a <p> element with big font (\"heading-like\" element).\n *\t\tconst pattern = element => {\n *\t\t\tif ( element.name == 'p' ) {\n *\t\t\t\tconst fontSize = element.getStyle( 'font-size' );\n *\t\t\t\tconst size = fontSize.match( /(\\d+)/px );\n *\n *\t\t\t\tif ( size && Number( size[ 1 ] ) > 26 ) {\n *\t\t\t\t\treturn { name: true, attribute: [ 'font-size' ] };\n *\t\t\t\t}\n *\t\t\t}\n *\n *\t\t\treturn null;\n *\t\t};\n *\n * `MatcherPattern` is defined in a way that it is a superset of {@link module:engine/view/elementdefinition~ElementDefinition},\n * that is, every `ElementDefinition` also can be used as a `MatcherPattern`.\n *\n * @typedef {String|RegExp|Object|Function} module:engine/view/matcher~MatcherPattern\n *\n * @property {String|RegExp} [name] View element name to match.\n * @property {Boolean|String|RegExp|Object|Array.<String|RegExp|Object>} [classes] View element's classes to match.\n * @property {Boolean|String|RegExp|Object|Array.<String|RegExp|Object>} [styles] View element's styles to match.\n * @property {Boolean|String|RegExp|Object|Array.<String|RegExp|Object>} [attributes] View element's attributes to match.\n */\n\n/**\n * The key-value matcher pattern is missing key or value. Both must be present.\n * Refer the documentation: {@link module:engine/view/matcher~MatcherPattern}.\n *\n * @param {Object} pattern Pattern with missing properties.\n * @error matcher-pattern-missing-key-or-value\n */\n\n/**\n * The key-value matcher pattern for `attributes` option is using deprecated `style` key.\n *\n * Use `styles` matcher pattern option instead:\n *\n * \t\t// Instead of:\n * \t\tconst pattern = {\n * \t\t\tattributes: {\n * \t\t\t\tkey1: 'value1',\n * \t\t\t\tkey2: 'value2',\n * \t\t\t\tstyle: /^border.*$/\n * \t\t\t}\n * \t\t}\n *\n * \t\t// Use:\n * \t\tconst pattern = {\n * \t\t\tattributes: {\n * \t\t\t\tkey1: 'value1',\n * \t\t\t\tkey2: 'value2'\n * \t\t\t},\n * \t\t\tstyles: /^border.*$/\n * \t\t}\n *\n * Refer to the {@glink updating/migration-to-29##migration-to-ckeditor-5-v2910 Migration to v29.1.0} guide\n * and {@link module:engine/view/matcher~MatcherPattern} documentation.\n *\n * @param {Object} pattern Pattern with missing properties.\n * @error matcher-pattern-deprecated-attributes-style-key\n */\n\n/**\n * The key-value matcher pattern for `attributes` option is using deprecated `class` key.\n *\n * Use `classes` matcher pattern option instead:\n *\n * \t\t// Instead of:\n * \t\tconst pattern = {\n * \t\t\tattributes: {\n * \t\t\t\tkey1: 'value1',\n * \t\t\t\tkey2: 'value2',\n * \t\t\t\tclass: 'foobar'\n * \t\t\t}\n * \t\t}\n *\n * \t\t// Use:\n * \t\tconst pattern = {\n * \t\t\tattributes: {\n * \t\t\t\tkey1: 'value1',\n * \t\t\t\tkey2: 'value2'\n * \t\t\t},\n * \t\t\tclasses: 'foobar'\n * \t\t}\n *\n * Refer to the {@glink updating/migration-to-29##migration-to-ckeditor-5-v2910 Migration to v29.1.0} guide\n * and the {@link module:engine/view/matcher~MatcherPattern} documentation.\n *\n * @param {Object} pattern Pattern with missing properties.\n * @error matcher-pattern-deprecated-attributes-class-key\n */\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n","import isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nexport default isKey;\n","import MapCache from './_MapCache.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nexport default memoize;\n","import memoizeCapped from './_memoizeCapped.js';\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nexport default stringToPath;\n","import memoize from './memoize.js';\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nexport default memoizeCapped;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nexport default arrayMap;\n","import Symbol from './_Symbol.js';\nimport arrayMap from './_arrayMap.js';\nimport isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default baseToString;\n","import baseToString from './_baseToString.js';\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nexport default toString;\n","import isArray from './isArray.js';\nimport isKey from './_isKey.js';\nimport stringToPath from './_stringToPath.js';\nimport toString from './toString.js';\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nexport default castPath;\n","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nexport default last;\n","import isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default toKey;\n","import castPath from './_castPath.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nexport default baseGet;\n","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nexport default baseSlice;\n","import baseGet from './_baseGet.js';\nimport baseSlice from './_baseSlice.js';\n\n/**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\nfunction parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n}\n\nexport default parent;\n","import castPath from './_castPath.js';\nimport last from './last.js';\nimport parent from './_parent.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\nfunction baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n}\n\nexport default baseUnset;\n","import baseUnset from './_baseUnset.js';\n\n/**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\nfunction unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n}\n\nexport default unset;\n","import baseGet from './_baseGet.js';\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nexport default get;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignMergeValue;\n","import createBaseFor from './_createBaseFor.js';\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nexport default baseFor;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nexport default createBaseFor;\n","import isArrayLike from './isArrayLike.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nexport default isArrayLikeObject;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nexport default safeGet;\n","import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nexport default toPlainObject;\n","import assignMergeValue from './_assignMergeValue.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\nimport copyArray from './_copyArray.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport isBuffer from './isBuffer.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isPlainObject from './isPlainObject.js';\nimport isTypedArray from './isTypedArray.js';\nimport safeGet from './_safeGet.js';\nimport toPlainObject from './toPlainObject.js';\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nexport default baseMergeDeep;\n","import Stack from './_Stack.js';\nimport assignMergeValue from './_assignMergeValue.js';\nimport baseFor from './_baseFor.js';\nimport baseMergeDeep from './_baseMergeDeep.js';\nimport isObject from './isObject.js';\nimport keysIn from './keysIn.js';\nimport safeGet from './_safeGet.js';\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nexport default baseMerge;\n","import baseMerge from './_baseMerge.js';\nimport createAssigner from './_createAssigner.js';\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nexport default merge;\n","import assignValue from './_assignValue.js';\nimport castPath from './_castPath.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nexport default baseSet;\n","import baseSet from './_baseSet.js';\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\n\nexport default set;\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/stylesmap\n */\n\nimport { get, isObject, merge, set, unset } from 'lodash-es';\n\n/**\n * Styles map. Allows handling (adding, removing, retrieving) a set of style rules (usually, of an element).\n *\n * The styles map is capable of normalizing style names so e.g. the following operations are possible:\n */\nexport default class StylesMap {\n\t/**\n\t * Creates Styles instance.\n\t *\n\t * @param {module:engine/view/stylesmap~StylesProcessor} styleProcessor\n\t */\n\tconstructor( styleProcessor ) {\n\t\t/**\n\t\t * Keeps an internal representation of styles map. Normalized styles are kept as object tree to allow unified modification and\n\t\t * value access model using lodash's get, set, unset, etc methods.\n\t\t *\n\t\t * When no style processor rules are defined it acts as simple key-value storage.\n\t\t *\n\t\t * @private\n\t\t * @type {Object}\n\t\t */\n\t\tthis._styles = {};\n\n\t\t/**\n\t\t * An instance of the {@link module:engine/view/stylesmap~StylesProcessor}.\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/view/stylesmap~StylesProcessor}\n\t\t */\n\t\tthis._styleProcessor = styleProcessor;\n\t}\n\n\t/**\n\t * Returns true if style map has no styles set.\n\t *\n\t * @type {Boolean}\n\t */\n\tget isEmpty() {\n\t\tconst entries = Object.entries( this._styles );\n\t\tconst from = Array.from( entries );\n\n\t\treturn !from.length;\n\t}\n\n\t/**\n\t * Number of styles defined.\n\t *\n\t * @type {Number}\n\t */\n\tget size() {\n\t\tif ( this.isEmpty ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn this.getStyleNames().length;\n\t}\n\n\t/**\n\t * Set styles map to a new value.\n\t *\n\t *\t\tstyles.setTo( 'border:1px solid blue;margin-top:1px;' );\n\t *\n\t * @param {String} inlineStyle\n\t */\n\tsetTo( inlineStyle ) {\n\t\tthis.clear();\n\n\t\tconst parsedStyles = Array.from( parseInlineStyles( inlineStyle ).entries() );\n\n\t\tfor ( const [ key, value ] of parsedStyles ) {\n\t\t\tthis._styleProcessor.toNormalizedForm( key, value, this._styles );\n\t\t}\n\t}\n\n\t/**\n\t * Checks if a given style is set.\n\t *\n\t *\t\tstyles.setTo( 'margin-left:1px;' );\n\t *\n\t *\t\tstyles.has( 'margin-left' ); // -> true\n\t *\t\tstyles.has( 'padding' ); // -> false\n\t *\n\t * **Note**: This check supports normalized style names.\n\t *\n\t *\t\t// Enable 'margin' shorthand processing:\n\t *\t\teditor.data.addStyleProcessorRules( addMarginRules );\n\t *\n\t *\t\tstyles.setTo( 'margin:2px;' );\n\t *\n\t *\t\tstyles.has( 'margin' ); // -> true\n\t *\t\tstyles.has( 'margin-top' ); // -> true\n\t *\t\tstyles.has( 'margin-left' ); // -> true\n\t *\n\t *\t\tstyles.remove( 'margin-top' );\n\t *\n\t *\t\tstyles.has( 'margin' ); // -> false\n\t *\t\tstyles.has( 'margin-top' ); // -> false\n\t *\t\tstyles.has( 'margin-left' ); // -> true\n\t *\n\t * @param {String} name Style name.\n\t * @returns {Boolean}\n\t */\n\thas( name ) {\n\t\tif ( this.isEmpty ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst styles = this._styleProcessor.getReducedForm( name, this._styles );\n\n\t\tconst propertyDescriptor = styles.find( ( [ property ] ) => property === name );\n\n\t\t// Only return a value if it is set;\n\t\treturn Array.isArray( propertyDescriptor );\n\t}\n\n\t/**\n\t * Sets a given style.\n\t *\n\t * Can insert one by one:\n\t *\n\t *\t\tstyles.set( 'color', 'blue' );\n\t *\t\tstyles.set( 'margin-right', '1em' );\n\t *\n\t * or many styles at once:\n\t *\n\t *\t\tstyles.set( {\n\t *\t\t\tcolor: 'blue',\n\t *\t\t\t'margin-right': '1em'\n\t *\t\t} );\n\t *\n\t * ***Note**:* This method uses {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules\n\t * enabled style processor rules} to normalize passed values.\n\t *\n\t *\t\t// Enable 'margin' shorthand processing:\n\t *\t\teditor.data.addStyleProcessorRules( addMarginRules );\n\t *\n\t *\t\tstyles.set( 'margin', '2px' );\n\t *\n\t * The above code will set margin to:\n\t *\n\t *\t\tstyles.getNormalized( 'margin' );\n\t *\t\t// -> { top: '2px', right: '2px', bottom: '2px', left: '2px' }\n\t *\n\t * Which makes it possible to retrieve a \"sub-value\":\n\t *\n\t *\t\tstyles.get( 'margin-left' ); // -> '2px'\n\t *\n\t * Or modify it:\n\t *\n\t *\t\tstyles.remove( 'margin-left' );\n\t *\n\t *\t\tstyles.getNormalized( 'margin' ); // -> { top: '1px', bottom: '1px', right: '1px' }\n\t *\t\tstyles.toString(); // -> 'margin-bottom:1px;margin-right:1px;margin-top:1px;'\n\t *\n\t * This method also allows to set normalized values directly (if a particular styles processor rule was enabled):\n\t *\n\t *\t\tstyles.set( 'border-color', { top: 'blue' } );\n\t *\t\tstyles.set( 'margin', { right: '2em' } );\n\t *\n\t *\t\tstyles.toString(); // -> 'border-color-top:blue;margin-right:2em;'\n\t *\n\t * @param {String|Object} nameOrObject Style property name or object with multiple properties.\n\t * @param {String|Object} valueOrObject Value to set.\n\t */\n\tset( nameOrObject, valueOrObject ) {\n\t\tif ( isObject( nameOrObject ) ) {\n\t\t\tfor ( const [ key, value ] of Object.entries( nameOrObject ) ) {\n\t\t\t\tthis._styleProcessor.toNormalizedForm( key, value, this._styles );\n\t\t\t}\n\t\t} else {\n\t\t\tthis._styleProcessor.toNormalizedForm( nameOrObject, valueOrObject, this._styles );\n\t\t}\n\t}\n\n\t/**\n\t * Removes given style.\n\t *\n\t *\t\tstyles.setTo( 'background:#f00;margin-right:2px;' );\n\t *\n\t *\t\tstyles.remove( 'background' );\n\t *\n\t *\t\tstyles.toString(); // -> 'margin-right:2px;'\n\t *\n\t * ***Note**:* This method uses {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules\n\t * enabled style processor rules} to normalize passed values.\n\t *\n\t *\t\t// Enable 'margin' shorthand processing:\n\t *\t\teditor.data.addStyleProcessorRules( addMarginRules );\n\t *\n\t *\t\tstyles.setTo( 'margin:1px' );\n\t *\n\t *\t\tstyles.remove( 'margin-top' );\n\t *\t\tstyles.remove( 'margin-right' );\n\t *\n\t *\t\tstyles.toString(); // -> 'margin-bottom:1px;margin-left:1px;'\n\t *\n\t * @param {String} name Style name.\n\t */\n\tremove( name ) {\n\t\tconst path = toPath( name );\n\n\t\tunset( this._styles, path );\n\t\tdelete this._styles[ name ];\n\n\t\tthis._cleanEmptyObjectsOnPath( path );\n\t}\n\n\t/**\n\t * Returns a normalized style object or a single value.\n\t *\n\t *\t\t// Enable 'margin' shorthand processing:\n\t *\t\teditor.data.addStyleProcessorRules( addMarginRules );\n\t *\n\t *\t\tconst styles = new Styles();\n\t *\t\tstyles.setTo( 'margin:1px 2px 3em;' );\n\t *\n\t *\t\tstyles.getNormalized( 'margin' );\n\t *\t\t// will log:\n\t *\t\t// {\n\t *\t\t// top: '1px',\n\t *\t\t// right: '2px',\n\t *\t\t// bottom: '3em',\n\t *\t\t// left: '2px' // normalized value from margin shorthand\n\t *\t\t// }\n\t *\n\t *\t\tstyles.getNormalized( 'margin-left' ); // -> '2px'\n\t *\n\t * **Note**: This method will only return normalized styles if a style processor was defined.\n\t *\n\t * @param {String} name Style name.\n\t * @returns {Object|String|undefined}\n\t */\n\tgetNormalized( name ) {\n\t\treturn this._styleProcessor.getNormalized( name, this._styles );\n\t}\n\n\t/**\n\t * Returns a normalized style string. Styles are sorted by name.\n\t *\n\t *\t\tstyles.set( 'margin' , '1px' );\n\t *\t\tstyles.set( 'background', '#f00' );\n\t *\n\t *\t\tstyles.toString(); // -> 'background:#f00;margin:1px;'\n\t *\n\t * **Note**: This method supports normalized styles if defined.\n\t *\n\t *\t\t// Enable 'margin' shorthand processing:\n\t *\t\teditor.data.addStyleProcessorRules( addMarginRules );\n\t *\n\t *\t\tstyles.set( 'margin' , '1px' );\n\t *\t\tstyles.set( 'background', '#f00' );\n\t *\t\tstyles.remove( 'margin-top' );\n\t *\t\tstyles.remove( 'margin-right' );\n\t *\n\t *\t\tstyles.toString(); // -> 'background:#f00;margin-bottom:1px;margin-left:1px;'\n\t *\n\t * @returns {String}\n\t */\n\ttoString() {\n\t\tif ( this.isEmpty ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn this._getStylesEntries()\n\t\t\t.map( arr => arr.join( ':' ) )\n\t\t\t.sort()\n\t\t\t.join( ';' ) + ';';\n\t}\n\n\t/**\n\t * Returns property as a value string or undefined if property is not set.\n\t *\n\t *\t\t// Enable 'margin' shorthand processing:\n\t *\t\teditor.data.addStyleProcessorRules( addMarginRules );\n\t *\n\t *\t\tconst styles = new Styles();\n\t *\t\tstyles.setTo( 'margin:1px;' );\n\t *\t\tstyles.set( 'margin-bottom', '3em' );\n\t *\n\t *\t\tstyles.getAsString( 'margin' ); // -> 'margin: 1px 1px 3em;'\n\t *\n\t * Note, however, that all sub-values must be set for the longhand property name to return a value:\n\t *\n\t *\t\tconst styles = new Styles();\n\t *\t\tstyles.setTo( 'margin:1px;' );\n\t *\t\tstyles.remove( 'margin-bottom' );\n\t *\n\t *\t\tstyles.getAsString( 'margin' ); // -> undefined\n\t *\n\t * In the above scenario, it is not possible to return a `margin` value, so `undefined` is returned.\n\t * Instead, you should use:\n\t *\n\t *\t\tconst styles = new Styles();\n\t *\t\tstyles.setTo( 'margin:1px;' );\n\t *\t\tstyles.remove( 'margin-bottom' );\n\t *\n\t *\t\tfor ( const styleName of styles.getStyleNames() ) {\n\t *\t\t\tconsole.log( styleName, styles.getAsString( styleName ) );\n\t *\t\t}\n\t *\t\t// 'margin-top', '1px'\n\t *\t\t// 'margin-right', '1px'\n\t *\t\t// 'margin-left', '1px'\n\t *\n\t * In general, it is recommend to iterate over style names like in the example above. This way, you will always get all\n\t * the currently set style values. So, if all the 4 margin values would be set\n\t * the for-of loop above would yield only `'margin'`, `'1px'`:\n\t *\n\t *\t\tconst styles = new Styles();\n\t *\t\tstyles.setTo( 'margin:1px;' );\n\t *\n\t *\t\tfor ( const styleName of styles.getStyleNames() ) {\n\t *\t\t\tconsole.log( styleName, styles.getAsString( styleName ) );\n\t *\t\t}\n\t *\t\t// 'margin', '1px'\n\t *\n\t * **Note**: To get a normalized version of a longhand property use the {@link #getNormalized `#getNormalized()`} method.\n\t *\n\t * @param {String} propertyName\n\t * @returns {String|undefined}\n\t */\n\tgetAsString( propertyName ) {\n\t\tif ( this.isEmpty ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this._styles[ propertyName ] && !isObject( this._styles[ propertyName ] ) ) {\n\t\t\t// Try return styles set directly - values that are not parsed.\n\t\t\treturn this._styles[ propertyName ];\n\t\t}\n\n\t\tconst styles = this._styleProcessor.getReducedForm( propertyName, this._styles );\n\n\t\tconst propertyDescriptor = styles.find( ( [ property ] ) => property === propertyName );\n\n\t\t// Only return a value if it is set;\n\t\tif ( Array.isArray( propertyDescriptor ) ) {\n\t\t\treturn propertyDescriptor[ 1 ];\n\t\t}\n\t}\n\n\t/**\n\t * Returns all style properties names as they would appear when using {@link #toString `#toString()`}.\n\t *\n\t * When `expand` is set to true and there's a shorthand style property set, it will also return all equivalent styles:\n\t *\n\t * \t\tstylesMap.setTo( 'margin: 1em' )\n\t *\n\t * will be expanded to:\n\t *\n\t * \t\t[ 'margin', 'margin-top', 'margin-right', 'margin-bottom', 'margin-left' ]\n\t *\n\t * @param {Boolean} [expand=false] Expand shorthand style properties and all return equivalent style representations.\n\t * @returns {Array.<String>}\n\t */\n\tgetStyleNames( expand = false ) {\n\t\tif ( this.isEmpty ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif ( expand ) {\n\t\t\treturn this._styleProcessor.getStyleNames( this._styles );\n\t\t}\n\n\t\tconst entries = this._getStylesEntries();\n\n\t\treturn entries.map( ( [ key ] ) => key );\n\t}\n\n\t/**\n\t * Removes all styles.\n\t */\n\tclear() {\n\t\tthis._styles = {};\n\t}\n\n\t/**\n\t * Returns normalized styles entries for further processing.\n\t *\n\t * @private\n\t * @returns {Array.<module:engine/view/stylesmap~PropertyDescriptor>}\n\t */\n\t_getStylesEntries() {\n\t\tconst parsed = [];\n\n\t\tconst keys = Object.keys( this._styles );\n\n\t\tfor ( const key of keys ) {\n\t\t\tparsed.push( ...this._styleProcessor.getReducedForm( key, this._styles ) );\n\t\t}\n\n\t\treturn parsed;\n\t}\n\n\t/**\n\t * Removes empty objects upon removing an entry from internal object.\n\t *\n\t * @param {String} path\n\t * @private\n\t */\n\t_cleanEmptyObjectsOnPath( path ) {\n\t\tconst pathParts = path.split( '.' );\n\t\tconst isChildPath = pathParts.length > 1;\n\n\t\tif ( !isChildPath ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst parentPath = pathParts.splice( 0, pathParts.length - 1 ).join( '.' );\n\n\t\tconst parentObject = get( this._styles, parentPath );\n\n\t\tif ( !parentObject ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isParentEmpty = !Array.from( Object.keys( parentObject ) ).length;\n\n\t\tif ( isParentEmpty ) {\n\t\t\tthis.remove( parentPath );\n\t\t}\n\t}\n}\n\n/**\n * Style processor is responsible for writing and reading a normalized styles object.\n */\nexport class StylesProcessor {\n\t/**\n\t * Creates StylesProcessor instance.\n\t *\n\t * @private\n\t */\n\tconstructor() {\n\t\tthis._normalizers = new Map();\n\t\tthis._extractors = new Map();\n\t\tthis._reducers = new Map();\n\t\tthis._consumables = new Map();\n\t}\n\n\t/**\n\t * Parse style string value to a normalized object and appends it to styles object.\n\t *\n\t *\t\tconst styles = {};\n\t *\n\t *\t\tstylesProcessor.toNormalizedForm( 'margin', '1px', styles );\n\t *\n\t *\t\t// styles will consist: { margin: { top: '1px', right: '1px', bottom: '1px', left: '1px; } }\n\t *\n\t * **Note**: To define normalizer callbacks use {@link #setNormalizer}.\n\t *\n\t * @param {String} name Name of style property.\n\t * @param {String} propertyValue Value of style property.\n\t * @param {Object} styles Object holding normalized styles.\n\t */\n\ttoNormalizedForm( name, propertyValue, styles ) {\n\t\tif ( isObject( propertyValue ) ) {\n\t\t\tappendStyleValue( styles, toPath( name ), propertyValue );\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this._normalizers.has( name ) ) {\n\t\t\tconst normalizer = this._normalizers.get( name );\n\n\t\t\tconst { path, value } = normalizer( propertyValue );\n\n\t\t\tappendStyleValue( styles, path, value );\n\t\t} else {\n\t\t\tappendStyleValue( styles, name, propertyValue );\n\t\t}\n\t}\n\n\t/**\n\t * Returns a normalized version of a style property.\n\t *\t\tconst styles = {\n\t *\t\t\tmargin: { top: '1px', right: '1px', bottom: '1px', left: '1px; },\n\t *\t\t\tbackground: { color: '#f00' }\n\t *\t\t};\n\t *\n\t *\t\tstylesProcessor.getNormalized( 'background' );\n\t *\t\t// will return: { color: '#f00' }\n\t *\n\t *\t\tstylesProcessor.getNormalized( 'margin-top' );\n\t *\t\t// will return: '1px'\n\t *\n\t * **Note**: In some cases extracting single value requires defining an extractor callback {@link #setExtractor}.\n\t *\n\t * @param {String} name Name of style property.\n\t * @param {Object} styles Object holding normalized styles.\n\t * @returns {*}\n\t */\n\tgetNormalized( name, styles ) {\n\t\tif ( !name ) {\n\t\t\treturn merge( {}, styles );\n\t\t}\n\n\t\t// Might be empty string.\n\t\tif ( styles[ name ] !== undefined ) {\n\t\t\treturn styles[ name ];\n\t\t}\n\n\t\tif ( this._extractors.has( name ) ) {\n\t\t\tconst extractor = this._extractors.get( name );\n\n\t\t\tif ( typeof extractor === 'string' ) {\n\t\t\t\treturn get( styles, extractor );\n\t\t\t}\n\n\t\t\tconst value = extractor( name, styles );\n\n\t\t\tif ( value ) {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\n\t\treturn get( styles, toPath( name ) );\n\t}\n\n\t/**\n\t * Returns a reduced form of style property form normalized object.\n\t *\n\t * For default margin reducer, the below code:\n\t *\n\t *\t\tstylesProcessor.getReducedForm( 'margin', {\n\t *\t\t\tmargin: { top: '1px', right: '1px', bottom: '2px', left: '1px; }\n\t *\t\t} );\n\t *\n\t * will return:\n\t *\n\t *\t\t[\n\t *\t\t\t[ 'margin', '1px 1px 2px' ]\n\t *\t\t]\n\t *\n\t * because it might be represented as a shorthand 'margin' value. However if one of margin long hand values is missing it should return:\n\t *\n\t *\t\t[\n\t *\t\t\t[ 'margin-top', '1px' ],\n\t *\t\t\t[ 'margin-right', '1px' ],\n\t *\t\t\t[ 'margin-bottom', '2px' ]\n\t *\t\t\t// the 'left' value is missing - cannot use 'margin' shorthand.\n\t *\t\t]\n\t *\n\t * **Note**: To define reducer callbacks use {@link #setReducer}.\n\t *\n\t * @param {String} name Name of style property.\n\t * @param {Object} styles Object holding normalized styles.\n\t * @returns {Array.<module:engine/view/stylesmap~PropertyDescriptor>}\n\t */\n\tgetReducedForm( name, styles ) {\n\t\tconst normalizedValue = this.getNormalized( name, styles );\n\n\t\t// Might be empty string.\n\t\tif ( normalizedValue === undefined ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif ( this._reducers.has( name ) ) {\n\t\t\tconst reducer = this._reducers.get( name );\n\n\t\t\treturn reducer( normalizedValue );\n\t\t}\n\n\t\treturn [ [ name, normalizedValue ] ];\n\t}\n\n\t/**\n\t * Return all style properties. Also expand shorthand properties (e.g. `margin`, `background`) if respective extractor is available.\n\t *\n\t * @param {Object} styles Object holding normalized styles.\n\t * @returns {Array.<String>}\n\t */\n\tgetStyleNames( styles ) {\n\t\t// Find all extractable styles that have a value.\n\t\tconst expandedStyleNames = Array.from( this._consumables.keys() ).filter( name => {\n\t\t\tconst style = this.getNormalized( name, styles );\n\n\t\t\tif ( style && typeof style == 'object' ) {\n\t\t\t\treturn Object.keys( style ).length;\n\t\t\t}\n\n\t\t\treturn style;\n\t\t} );\n\n\t\t// For simple styles (for example `color`) we don't have a map of those styles\n\t\t// but they are 1 to 1 with normalized object keys.\n\t\tconst styleNamesKeysSet = new Set( [\n\t\t\t...expandedStyleNames,\n\t\t\t...Object.keys( styles )\n\t\t] );\n\n\t\treturn Array.from( styleNamesKeysSet.values() );\n\t}\n\n\t/**\n\t * Returns related style names.\n\t *\n\t *\t\tstylesProcessor.getRelatedStyles( 'margin' );\n\t *\t\t// will return: [ 'margin-top', 'margin-right', 'margin-bottom', 'margin-left' ];\n\t *\n\t *\t\tstylesProcessor.getRelatedStyles( 'margin-top' );\n\t *\t\t// will return: [ 'margin' ];\n\t *\n\t * **Note**: To define new style relations load an existing style processor or use\n\t * {@link module:engine/view/stylesmap~StylesProcessor#setStyleRelation `StylesProcessor.setStyleRelation()`}.\n\t *\n\t * @param {String} name\n\t * @returns {Array.<String>}\n\t */\n\tgetRelatedStyles( name ) {\n\t\treturn this._consumables.get( name ) || [];\n\t}\n\n\t/**\n\t * Adds a normalizer method for a style property.\n\t *\n\t * A normalizer returns describing how the value should be normalized.\n\t *\n\t * For instance 'margin' style is a shorthand for four margin values:\n\t *\n\t * - 'margin-top'\n\t * - 'margin-right'\n\t * - 'margin-bottom'\n\t * - 'margin-left'\n\t *\n\t * and can be written in various ways if some values are equal to others. For instance `'margin: 1px 2em;'` is a shorthand for\n\t * `'margin-top: 1px;margin-right: 2em;margin-bottom: 1px;margin-left: 2em'`.\n\t *\n\t * A normalizer should parse various margin notations as a single object:\n\t *\n\t *\t\tconst styles = {\n\t *\t\t\tmargin: {\n\t *\t\t\t\ttop: '1px',\n\t *\t\t\t\tright: '2em',\n\t *\t\t\t\tbottom: '1px',\n\t *\t\t\t\tleft: '2em'\n\t *\t\t\t}\n\t *\t\t};\n\t *\n\t * Thus a normalizer for 'margin' style should return an object defining style path and value to store:\n\t *\n\t *\t\tconst returnValue = {\n\t *\t\t\tpath: 'margin',\n\t *\t\t\tvalue: {\n\t *\t\t\t\ttop: '1px',\n\t *\t\t\t\tright: '2em',\n\t *\t\t\t\tbottom: '1px',\n\t *\t\t\t\tleft: '2em'\n\t *\t\t\t}\n\t *\t\t};\n\t *\n\t * Additionally to fully support all margin notations there should be also defined 4 normalizers for longhand margin notations. Below\n\t * is an example for 'margin-top' style property normalizer:\n\t *\n\t *\t\tstylesProcessor.setNormalizer( 'margin-top', valueString => {\n\t *\t\t\treturn {\n\t *\t\t\t\tpath: 'margin.top',\n\t *\t\t\t\tvalue: valueString\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * @param {String} name\n\t * @param {Function} callback\n\t */\n\tsetNormalizer( name, callback ) {\n\t\tthis._normalizers.set( name, callback );\n\t}\n\n\t/**\n\t * Adds a extractor callback for a style property.\n\t *\n\t * Most normalized style values are stored as one level objects. It is assumed that `'margin-top'` style will be stored as:\n\t *\n\t *\t\tconst styles = {\n\t *\t\t\tmargin: {\n\t *\t\t\t\ttop: 'value'\n\t *\t\t\t}\n\t *\t\t}\n\t *\n\t * However, some styles can have conflicting notations and thus it might be harder to extract a style value from shorthand. For instance\n\t * the 'border-top-style' can be defined using `'border-top:solid'`, `'border-style:solid none none none'` or by `'border:solid'`\n\t * shorthands. The default border styles processors stores styles as:\n\t *\n\t *\t\tconst styles = {\n\t *\t\t\tborder: {\n\t *\t\t\t\tstyle: {\n\t *\t\t\t\t\ttop: 'solid'\n\t *\t\t\t\t}\n\t *\t\t\t}\n\t *\t\t}\n\t *\n\t * as it is better to modify border style independently from other values. On the other part the output of the border might be\n\t * desired as `border-top`, `border-left`, etc notation.\n\t *\n\t * In the above example a reducer should return a side border value that combines style, color and width:\n\t *\n\t *\t\tstyleProcessor.setExtractor( 'border-top', styles => {\n\t *\t\t\treturn {\n\t *\t\t\t\tcolor: styles.border.color.top,\n\t *\t\t\t\tstyle: styles.border.style.top,\n\t *\t\t\t\twidth: styles.border.width.top\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * @param {String} name\n\t * @param {Function|String} callbackOrPath Callback that return a requested value or path string for single values.\n\t */\n\tsetExtractor( name, callbackOrPath ) {\n\t\tthis._extractors.set( name, callbackOrPath );\n\t}\n\n\t/**\n\t * Adds a reducer callback for a style property.\n\t *\n\t * Reducer returns a minimal notation for given style name. For longhand properties it is not required to write a reducer as\n\t * by default the direct value from style path is taken.\n\t *\n\t * For shorthand styles a reducer should return minimal style notation either by returning single name-value tuple or multiple tuples\n\t * if a shorthand cannot be used. For instance for a margin shorthand a reducer might return:\n\t *\n\t *\t\tconst marginShortHandTuple = [\n\t *\t\t\t[ 'margin', '1px 1px 2px' ]\n\t *\t\t];\n\t *\n\t * or a longhand tuples for defined values:\n\t *\n\t *\t\t// Considering margin.bottom and margin.left are undefined.\n\t *\t\tconst marginLonghandsTuples = [\n\t *\t\t\t[ 'margin-top', '1px' ],\n\t *\t\t\t[ 'margin-right', '1px' ]\n\t *\t\t];\n\t *\n\t * A reducer obtains a normalized style value:\n\t *\n\t *\t\t// Simplified reducer that always outputs 4 values which are always present:\n\t *\t\tstylesProcessor.setReducer( 'margin', margin => {\n\t *\t\t\treturn [\n\t *\t\t\t\t[ 'margin', `${ margin.top } ${ margin.right } ${ margin.bottom } ${ margin.left }` ]\n\t *\t\t\t]\n\t *\t\t} );\n\t *\n\t * @param {String} name\n\t * @param {Function} callback\n\t */\n\tsetReducer( name, callback ) {\n\t\tthis._reducers.set( name, callback );\n\t}\n\n\t/**\n\t * Defines a style shorthand relation to other style notations.\n\t *\n\t *\t\tstylesProcessor.setStyleRelation( 'margin', [\n\t *\t\t\t'margin-top',\n\t *\t\t\t'margin-right',\n\t *\t\t\t'margin-bottom',\n\t *\t\t\t'margin-left'\n\t *\t\t] );\n\t *\n\t * This enables expanding of style names for shorthands. For instance, if defined,\n\t * {@link module:engine/conversion/viewconsumable~ViewConsumable view consumable} items are automatically created\n\t * for long-hand margin style notation alongside the `'margin'` item.\n\t *\n\t * This means that when an element being converted has a style `margin`, a converter for `margin-left` will work just\n\t * fine since the view consumable will contain a consumable `margin-left` item (thanks to the relation) and\n\t * `element.getStyle( 'margin-left' )` will work as well assuming that the style processor was correctly configured.\n\t * However, once `margin-left` is consumed, `margin` will not be consumable anymore.\n\t *\n\t * @param {String} shorthandName\n\t * @param {Array.<String>} styleNames\n\t */\n\tsetStyleRelation( shorthandName, styleNames ) {\n\t\tthis._mapStyleNames( shorthandName, styleNames );\n\n\t\tfor ( const alsoName of styleNames ) {\n\t\t\tthis._mapStyleNames( alsoName, [ shorthandName ] );\n\t\t}\n\t}\n\n\t/**\n\t * Set two-way binding of style names.\n\t *\n\t * @param {String} name\n\t * @param {Array.<String>} styleNames\n\t * @private\n\t */\n\t_mapStyleNames( name, styleNames ) {\n\t\tif ( !this._consumables.has( name ) ) {\n\t\t\tthis._consumables.set( name, [] );\n\t\t}\n\n\t\tthis._consumables.get( name ).push( ...styleNames );\n\t}\n}\n\n// Parses inline styles and puts property - value pairs into styles map.\n//\n// @param {String} stylesString Styles to parse.\n// @returns {Map.<String, String>} stylesMap Map of parsed properties and values.\nfunction parseInlineStyles( stylesString ) {\n\t// `null` if no quote was found in input string or last found quote was a closing quote. See below.\n\tlet quoteType = null;\n\tlet propertyNameStart = 0;\n\tlet propertyValueStart = 0;\n\tlet propertyName = null;\n\n\tconst stylesMap = new Map();\n\n\t// Do not set anything if input string is empty.\n\tif ( stylesString === '' ) {\n\t\treturn stylesMap;\n\t}\n\n\t// Fix inline styles that do not end with `;` so they are compatible with algorithm below.\n\tif ( stylesString.charAt( stylesString.length - 1 ) != ';' ) {\n\t\tstylesString = stylesString + ';';\n\t}\n\n\t// Seek the whole string for \"special characters\".\n\tfor ( let i = 0; i < stylesString.length; i++ ) {\n\t\tconst char = stylesString.charAt( i );\n\n\t\tif ( quoteType === null ) {\n\t\t\t// No quote found yet or last found quote was a closing quote.\n\t\t\tswitch ( char ) {\n\t\t\t\tcase ':':\n\t\t\t\t\t// Most of time colon means that property name just ended.\n\t\t\t\t\t// Sometimes however `:` is found inside property value (for example in background image url).\n\t\t\t\t\tif ( !propertyName ) {\n\t\t\t\t\t\t// Treat this as end of property only if property name is not already saved.\n\t\t\t\t\t\t// Save property name.\n\t\t\t\t\t\tpropertyName = stylesString.substr( propertyNameStart, i - propertyNameStart );\n\t\t\t\t\t\t// Save this point as the start of property value.\n\t\t\t\t\t\tpropertyValueStart = i + 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '\"':\n\t\t\t\tcase '\\'':\n\t\t\t\t\t// Opening quote found (this is an opening quote, because `quoteType` is `null`).\n\t\t\t\t\tquoteType = char;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ';': {\n\t\t\t\t\t// Property value just ended.\n\t\t\t\t\t// Use previously stored property value start to obtain property value.\n\t\t\t\t\tconst propertyValue = stylesString.substr( propertyValueStart, i - propertyValueStart );\n\n\t\t\t\t\tif ( propertyName ) {\n\t\t\t\t\t\t// Save parsed part.\n\t\t\t\t\t\tstylesMap.set( propertyName.trim(), propertyValue.trim() );\n\t\t\t\t\t}\n\n\t\t\t\t\tpropertyName = null;\n\n\t\t\t\t\t// Save this point as property name start. Property name starts immediately after previous property value ends.\n\t\t\t\t\tpropertyNameStart = i + 1;\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( char === quoteType ) {\n\t\t\t// If a quote char is found and it is a closing quote, mark this fact by `null`-ing `quoteType`.\n\t\t\tquoteType = null;\n\t\t}\n\t}\n\n\treturn stylesMap;\n}\n\n// Return lodash compatible path from style name.\nfunction toPath( name ) {\n\treturn name.replace( '-', '.' );\n}\n\n// Appends style definition to the styles object.\n//\n// @param {String} nameOrPath\n// @param {String|Object} valueOrObject\n// @private\nfunction appendStyleValue( stylesObject, nameOrPath, valueOrObject ) {\n\tlet valueToSet = valueOrObject;\n\n\tif ( isObject( valueOrObject ) ) {\n\t\tvalueToSet = merge( {}, get( stylesObject, nameOrPath ), valueOrObject );\n\t}\n\n\tset( stylesObject, nameOrPath, valueToSet );\n}\n\n/**\n * A CSS style property descriptor that contains tuplet of two strings:\n *\n * - first string describes property name\n * - second string describes property value\n *\n *\t\tconst marginDescriptor = [ 'margin', '2px 3em' ];\n *\t\tconst marginTopDescriptor = [ 'margin-top', '2px' ];\n *\n * @typedef {Array.<String, String>} module:engine/view/stylesmap~PropertyDescriptor\n */\n\n/**\n * An object describing values associated with the sides of a box, for instance margins, paddings,\n * border widths, border colors, etc.\n *\n *\t\tconst margin = {\n *\t\t\ttop: '1px',\n *\t\t\tright: '3px',\n *\t\t\tbottom: '3px',\n *\t\t\tleft: '7px'\n *\t\t};\n *\n *\t\tconst borderColor = {\n *\t\t\ttop: 'red',\n *\t\t\tright: 'blue',\n *\t\t\tbottom: 'blue',\n *\t\t\tleft: 'red'\n *\t\t};\n *\n * @typedef {Object} module:engine/view/stylesmap~BoxSides\n *\n * @property {String} top Top side value.\n * @property {String} right Right side value.\n * @property {String} bottom Bottom side value.\n * @property {String} left Left side value.\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/element\n */\n\nimport Node from './node';\nimport Text from './text';\nimport TextProxy from './textproxy';\nimport toMap from '@ckeditor/ckeditor5-utils/src/tomap';\nimport toArray from '@ckeditor/ckeditor5-utils/src/toarray';\nimport isIterable from '@ckeditor/ckeditor5-utils/src/isiterable';\nimport Matcher from './matcher';\nimport StylesMap from './stylesmap';\n\n// @if CK_DEBUG_ENGINE // const { convertMapToTags } = require( '../dev-utils/utils' );\n\n/**\n * View element.\n *\n * The editing engine does not define a fixed semantics of its elements (it is \"DTD-free\").\n * This is why the type of the {@link module:engine/view/element~Element} need to\n * be defined by the feature developer. When creating an element you should use one of the following methods:\n *\n * * {@link module:engine/view/downcastwriter~DowncastWriter#createContainerElement `downcastWriter#createContainerElement()`}\n * in order to create a {@link module:engine/view/containerelement~ContainerElement},\n * * {@link module:engine/view/downcastwriter~DowncastWriter#createAttributeElement `downcastWriter#createAttributeElement()`}\n * in order to create a {@link module:engine/view/attributeelement~AttributeElement},\n * * {@link module:engine/view/downcastwriter~DowncastWriter#createEmptyElement `downcastWriter#createEmptyElement()`}\n * in order to create a {@link module:engine/view/emptyelement~EmptyElement}.\n * * {@link module:engine/view/downcastwriter~DowncastWriter#createUIElement `downcastWriter#createUIElement()`}\n * in order to create a {@link module:engine/view/uielement~UIElement}.\n * * {@link module:engine/view/downcastwriter~DowncastWriter#createEditableElement `downcastWriter#createEditableElement()`}\n * in order to create a {@link module:engine/view/editableelement~EditableElement}.\n *\n * Note that for view elements which are not created from the model, like elements from mutations, paste or\n * {@link module:engine/controller/datacontroller~DataController#set data.set} it is not possible to define the type of the element.\n * In such cases the {@link module:engine/view/upcastwriter~UpcastWriter#createElement `UpcastWriter#createElement()`} method\n * should be used to create generic view elements.\n *\n * @extends module:engine/view/node~Node\n */\nexport default class Element extends Node {\n\t/**\n\t * Creates a view element.\n\t *\n\t * Attributes can be passed in various formats:\n\t *\n\t *\t\tnew Element( viewDocument, 'div', { class: 'editor', contentEditable: 'true' } ); // object\n\t *\t\tnew Element( viewDocument, 'div', [ [ 'class', 'editor' ], [ 'contentEditable', 'true' ] ] ); // map-like iterator\n\t *\t\tnew Element( viewDocument, 'div', mapOfAttributes ); // map\n\t *\n\t * @protected\n\t * @param {module:engine/view/document~Document} document The document instance to which this element belongs.\n\t * @param {String} name Node name.\n\t * @param {Object|Iterable} [attrs] Collection of attributes.\n\t * @param {module:engine/view/node~Node|Iterable.<module:engine/view/node~Node>} [children]\n\t * A list of nodes to be inserted into created element.\n\t */\n\tconstructor( document, name, attrs, children ) {\n\t\tsuper( document );\n\n\t\t/**\n\t\t * Name of the element.\n\t\t *\n\t\t * @readonly\n\t\t * @member {String}\n\t\t */\n\t\tthis.name = name;\n\n\t\t/**\n\t\t * Map of attributes, where attributes names are keys and attributes values are values.\n\t\t *\n\t\t * @protected\n\t\t * @member {Map} #_attrs\n\t\t */\n\t\tthis._attrs = parseAttributes( attrs );\n\n\t\t/**\n\t\t * Array of child nodes.\n\t\t *\n\t\t * @protected\n\t\t * @member {Array.<module:engine/view/node~Node>}\n\t\t */\n\t\tthis._children = [];\n\n\t\tif ( children ) {\n\t\t\tthis._insertChild( 0, children );\n\t\t}\n\n\t\t/**\n\t\t * Set of classes associated with element instance.\n\t\t *\n\t\t * @protected\n\t\t * @member {Set}\n\t\t */\n\t\tthis._classes = new Set();\n\n\t\tif ( this._attrs.has( 'class' ) ) {\n\t\t\t// Remove class attribute and handle it by class set.\n\t\t\tconst classString = this._attrs.get( 'class' );\n\t\t\tparseClasses( this._classes, classString );\n\t\t\tthis._attrs.delete( 'class' );\n\t\t}\n\n\t\t/**\n\t\t * Normalized styles.\n\t\t *\n\t\t * @protected\n\t\t * @member {module:engine/view/stylesmap~StylesMap} module:engine/view/element~Element#_styles\n\t\t */\n\t\tthis._styles = new StylesMap( this.document.stylesProcessor );\n\n\t\tif ( this._attrs.has( 'style' ) ) {\n\t\t\t// Remove style attribute and handle it by styles map.\n\t\t\tthis._styles.setTo( this._attrs.get( 'style' ) );\n\n\t\t\tthis._attrs.delete( 'style' );\n\t\t}\n\n\t\t/**\n\t\t * Map of custom properties.\n\t\t * Custom properties can be added to element instance, will be cloned but not rendered into DOM.\n\t\t *\n\t\t * @protected\n\t\t * @member {Map}\n\t\t */\n\t\tthis._customProperties = new Map();\n\n\t\t/**\n\t\t * Whether an element is allowed inside an AttributeElement and can be wrapped with\n\t\t * {@link module:engine/view/attributeelement~AttributeElement} by {@link module:engine/view/downcastwriter~DowncastWriter}.\n\t\t *\n\t\t * @protected\n\t\t * @member {Boolean}\n\t\t */\n\t\tthis._isAllowedInsideAttributeElement = false;\n\n\t\t/**\n\t\t * A list of attribute names that should be rendered in the editing pipeline even though filtering mechanisms\n\t\t * implemented in the {@link module:engine/view/domconverter~DomConverter} (for instance,\n\t\t * {@link module:engine/view/domconverter~DomConverter#shouldRenderAttribute}) would filter them out.\n\t\t *\n\t\t * These attributes can be specified as an option when the element is created by\n\t\t * the {@link module:engine/view/downcastwriter~DowncastWriter}. To check whether an unsafe an attribute should\n\t\t * be permitted, use the {@link #shouldRenderUnsafeAttribute} method.\n\t\t *\n\t\t * @private\n\t\t * @readonly\n\t\t * @member {Array.<String>}\n\t\t */\n\t\tthis._unsafeAttributesToRender = [];\n\t}\n\n\t/**\n\t * Number of element's children.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget childCount() {\n\t\treturn this._children.length;\n\t}\n\n\t/**\n\t * Is `true` if there are no nodes inside this element, `false` otherwise.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isEmpty() {\n\t\treturn this._children.length === 0;\n\t}\n\n\t/**\n\t * Whether the element is allowed inside an AttributeElement and can be wrapped with\n\t * {@link module:engine/view/attributeelement~AttributeElement} by {@link module:engine/view/downcastwriter~DowncastWriter}.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isAllowedInsideAttributeElement() {\n\t\treturn this._isAllowedInsideAttributeElement;\n\t}\n\n\t/**\n\t * Checks whether this object is of the given.\n\t *\n\t *\t\telement.is( 'element' ); // -> true\n\t *\t\telement.is( 'node' ); // -> true\n\t *\t\telement.is( 'view:element' ); // -> true\n\t *\t\telement.is( 'view:node' ); // -> true\n\t *\n\t *\t\telement.is( 'model:element' ); // -> false\n\t *\t\telement.is( 'documentSelection' ); // -> false\n\t *\n\t * Assuming that the object being checked is an element, you can also check its\n\t * {@link module:engine/view/element~Element#name name}:\n\t *\n\t *\t\telement.is( 'element', 'img' ); // -> true if this is an <img> element\n\t *\t\ttext.is( 'element', 'img' ); -> false\n\t *\n\t * {@link module:engine/view/node~Node#is Check the entire list of view objects} which implement the `is()` method.\n\t *\n\t * @param {String} type Type to check.\n\t * @param {String} [name] Element name.\n\t * @returns {Boolean}\n\t */\n\tis( type, name = null ) {\n\t\tif ( !name ) {\n\t\t\treturn type === 'element' || type === 'view:element' ||\n\t\t\t\t// From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n\t\t\t\ttype === 'node' || type === 'view:node';\n\t\t} else {\n\t\t\treturn name === this.name && ( type === 'element' || type === 'view:element' );\n\t\t}\n\t}\n\n\t/**\n\t * Gets child at the given index.\n\t *\n\t * @param {Number} index Index of child.\n\t * @returns {module:engine/view/node~Node} Child node.\n\t */\n\tgetChild( index ) {\n\t\treturn this._children[ index ];\n\t}\n\n\t/**\n\t * Gets index of the given child node. Returns `-1` if child node is not found.\n\t *\n\t * @param {module:engine/view/node~Node} node Child node.\n\t * @returns {Number} Index of the child node.\n\t */\n\tgetChildIndex( node ) {\n\t\treturn this._children.indexOf( node );\n\t}\n\n\t/**\n\t * Gets child nodes iterator.\n\t *\n\t * @returns {Iterable.<module:engine/view/node~Node>} Child nodes iterator.\n\t */\n\tgetChildren() {\n\t\treturn this._children[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Returns an iterator that contains the keys for attributes. Order of inserting attributes is not preserved.\n\t *\n\t * @returns {Iterable.<String>} Keys for attributes.\n\t */\n\t* getAttributeKeys() {\n\t\tif ( this._classes.size > 0 ) {\n\t\t\tyield 'class';\n\t\t}\n\n\t\tif ( !this._styles.isEmpty ) {\n\t\t\tyield 'style';\n\t\t}\n\n\t\tyield* this._attrs.keys();\n\t}\n\n\t/**\n\t * Returns iterator that iterates over this element's attributes.\n\t *\n\t * Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t *\n\t * @returns {Iterable.<*>}\n\t */\n\t* getAttributes() {\n\t\tyield* this._attrs.entries();\n\n\t\tif ( this._classes.size > 0 ) {\n\t\t\tyield [ 'class', this.getAttribute( 'class' ) ];\n\t\t}\n\n\t\tif ( !this._styles.isEmpty ) {\n\t\t\tyield [ 'style', this.getAttribute( 'style' ) ];\n\t\t}\n\t}\n\n\t/**\n\t * Gets attribute by key. If attribute is not present - returns undefined.\n\t *\n\t * @param {String} key Attribute key.\n\t * @returns {String|undefined} Attribute value.\n\t */\n\tgetAttribute( key ) {\n\t\tif ( key == 'class' ) {\n\t\t\tif ( this._classes.size > 0 ) {\n\t\t\t\treturn [ ...this._classes ].join( ' ' );\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif ( key == 'style' ) {\n\t\t\tconst inlineStyle = this._styles.toString();\n\n\t\t\treturn inlineStyle == '' ? undefined : inlineStyle;\n\t\t}\n\n\t\treturn this._attrs.get( key );\n\t}\n\n\t/**\n\t * Returns a boolean indicating whether an attribute with the specified key exists in the element.\n\t *\n\t * @param {String} key Attribute key.\n\t * @returns {Boolean} `true` if attribute with the specified key exists in the element, false otherwise.\n\t */\n\thasAttribute( key ) {\n\t\tif ( key == 'class' ) {\n\t\t\treturn this._classes.size > 0;\n\t\t}\n\n\t\tif ( key == 'style' ) {\n\t\t\treturn !this._styles.isEmpty;\n\t\t}\n\n\t\treturn this._attrs.has( key );\n\t}\n\n\t/**\n\t * Checks if this element is similar to other element.\n\t * Both elements should have the same name and attributes to be considered as similar. Two similar elements\n\t * can contain different set of children nodes.\n\t *\n\t * @param {module:engine/view/element~Element} otherElement\n\t * @returns {Boolean}\n\t */\n\tisSimilar( otherElement ) {\n\t\tif ( !( otherElement instanceof Element ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If exactly the same Element is provided - return true immediately.\n\t\tif ( this === otherElement ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Check element name.\n\t\tif ( this.name != otherElement.name ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check isAllowedInsideAttributeElement property.\n\t\tif ( this.isAllowedInsideAttributeElement != otherElement.isAllowedInsideAttributeElement ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check number of attributes, classes and styles.\n\t\tif ( this._attrs.size !== otherElement._attrs.size || this._classes.size !== otherElement._classes.size ||\n\t\t\tthis._styles.size !== otherElement._styles.size ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if attributes are the same.\n\t\tfor ( const [ key, value ] of this._attrs ) {\n\t\t\tif ( !otherElement._attrs.has( key ) || otherElement._attrs.get( key ) !== value ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Check if classes are the same.\n\t\tfor ( const className of this._classes ) {\n\t\t\tif ( !otherElement._classes.has( className ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Check if styles are the same.\n\t\tfor ( const property of this._styles.getStyleNames() ) {\n\t\t\tif (\n\t\t\t\t!otherElement._styles.has( property ) ||\n\t\t\t\totherElement._styles.getAsString( property ) !== this._styles.getAsString( property )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns true if class is present.\n\t * If more then one class is provided - returns true only when all classes are present.\n\t *\n\t *\t\telement.hasClass( 'foo' ); // Returns true if 'foo' class is present.\n\t *\t\telement.hasClass( 'foo', 'bar' ); // Returns true if 'foo' and 'bar' classes are both present.\n\t *\n\t * @param {...String} className\n\t */\n\thasClass( ...className ) {\n\t\tfor ( const name of className ) {\n\t\t\tif ( !this._classes.has( name ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns iterator that contains all class names.\n\t *\n\t * @returns {Iterable.<String>}\n\t */\n\tgetClassNames() {\n\t\treturn this._classes.keys();\n\t}\n\n\t/**\n\t * Returns style value for the given property mae.\n\t * If the style does not exist `undefined` is returned.\n\t *\n\t * **Note**: This method can work with normalized style names if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#getAsString `StylesMap#getAsString()`} for details.\n\t *\n\t * For an element with style set to `'margin:1px'`:\n\t *\n\t *\t\t// Enable 'margin' shorthand processing:\n\t *\t\teditor.data.addStyleProcessorRules( addMarginRules );\n\t *\n\t *\t\tconst element = view.change( writer => {\n\t *\t\t\tconst element = writer.createElement();\n\t *\t\t\twriter.setStyle( 'margin', '1px' );\n\t *\t\t\twriter.setStyle( 'margin-bottom', '3em' );\n\t *\n\t *\t\t\treturn element;\n\t *\t\t} );\n\t *\n\t *\t\telement.getStyle( 'margin' ); // -> 'margin: 1px 1px 3em;'\n\t *\n\t * @param {String} property\n\t * @returns {String|undefined}\n\t */\n\tgetStyle( property ) {\n\t\treturn this._styles.getAsString( property );\n\t}\n\n\t/**\n\t * Returns a normalized style object or single style value.\n\t *\n\t * For an element with style set to: margin:1px 2px 3em;\n\t *\n\t *\t\telement.getNormalizedStyle( 'margin' ) );\n\t *\n\t * will return:\n\t *\n\t *\t\t{\n\t *\t\t\ttop: '1px',\n\t *\t\t\tright: '2px',\n\t *\t\t\tbottom: '3em',\n\t *\t\t\tleft: '2px' // a normalized value from margin shorthand\n\t *\t\t}\n\t *\n\t * and reading for single style value:\n\t *\n\t *\t\tstyles.getNormalizedStyle( 'margin-left' );\n\t *\n\t * Will return a `2px` string.\n\t *\n\t * **Note**: This method will return normalized values only if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#getNormalized `StylesMap#getNormalized()`} for details.\n\t *\n\t *\n\t * @param {String} property Name of CSS property\n\t * @returns {Object|String|undefined}\n\t */\n\tgetNormalizedStyle( property ) {\n\t\treturn this._styles.getNormalized( property );\n\t}\n\n\t/**\n\t * Returns iterator that contains all style names.\n\t *\n\t * @param {Boolean} [expand=false] Expand shorthand style properties and return all equivalent style representations.\n\t * @returns {Iterable.<String>}\n\t */\n\tgetStyleNames( expand = false ) {\n\t\treturn this._styles.getStyleNames( expand );\n\t}\n\n\t/**\n\t * Returns true if style keys are present.\n\t * If more then one style property is provided - returns true only when all properties are present.\n\t *\n\t *\t\telement.hasStyle( 'color' ); // Returns true if 'border-top' style is present.\n\t *\t\telement.hasStyle( 'color', 'border-top' ); // Returns true if 'color' and 'border-top' styles are both present.\n\t *\n\t * @param {...String} property\n\t */\n\thasStyle( ...property ) {\n\t\tfor ( const name of property ) {\n\t\t\tif ( !this._styles.has( name ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns ancestor element that match specified pattern.\n\t * Provided patterns should be compatible with {@link module:engine/view/matcher~Matcher Matcher} as it is used internally.\n\t *\n\t * @see module:engine/view/matcher~Matcher\n\t * @param {Object|String|RegExp|Function} patterns Patterns used to match correct ancestor.\n\t * See {@link module:engine/view/matcher~Matcher}.\n\t * @returns {module:engine/view/element~Element|null} Found element or `null` if no matching ancestor was found.\n\t */\n\tfindAncestor( ...patterns ) {\n\t\tconst matcher = new Matcher( ...patterns );\n\t\tlet parent = this.parent;\n\n\t\twhile ( parent ) {\n\t\t\tif ( matcher.match( parent ) ) {\n\t\t\t\treturn parent;\n\t\t\t}\n\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns the custom property value for the given key.\n\t *\n\t * @param {String|Symbol} key\n\t * @returns {*}\n\t */\n\tgetCustomProperty( key ) {\n\t\treturn this._customProperties.get( key );\n\t}\n\n\t/**\n\t * Returns an iterator which iterates over this element's custom properties.\n\t * Iterator provides `[ key, value ]` pairs for each stored property.\n\t *\n\t * @returns {Iterable.<*>}\n\t */\n\t* getCustomProperties() {\n\t\tyield* this._customProperties.entries();\n\t}\n\n\t/**\n\t * Returns identity string based on element's name, styles, classes and other attributes.\n\t * Two elements that {@link #isSimilar are similar} will have same identity string.\n\t * It has the following format:\n\t *\n\t *\t\t'name class=\"class1,class2\" style=\"style1:value1;style2:value2\" attr1=\"val1\" attr2=\"val2\"'\n \t *\n\t * For example:\n\t *\n\t *\t\tconst element = writer.createContainerElement( 'foo', {\n\t *\t\t\tbanana: '10',\n\t *\t\t\tapple: '20',\n\t *\t\t\tstyle: 'color: red; border-color: white;',\n\t *\t\t\tclass: 'baz'\n\t *\t\t} );\n\t *\n\t *\t\t// returns 'foo class=\"baz\" style=\"border-color:white;color:red\" apple=\"20\" banana=\"10\"'\n\t *\t\telement.getIdentity();\n\t *\n\t * **Note**: Classes, styles and other attributes are sorted alphabetically.\n\t *\n\t * @returns {String}\n\t */\n\tgetIdentity() {\n\t\tconst classes = Array.from( this._classes ).sort().join( ',' );\n\t\tconst styles = this._styles.toString();\n\t\tconst attributes = Array.from( this._attrs ).map( i => `${ i[ 0 ] }=\"${ i[ 1 ] }\"` ).sort().join( ' ' );\n\n\t\treturn this.name +\n\t\t\t( classes == '' ? '' : ` class=\"${ classes }\"` ) +\n\t\t\t( !styles ? '' : ` style=\"${ styles }\"` ) +\n\t\t\t( attributes == '' ? '' : ` ${ attributes }` );\n\t}\n\n\t/**\n\t * Decides whether an unsafe attribute is whitelisted and should be rendered in the editing pipeline even though filtering mechanisms\n\t * like {@link module:engine/view/domconverter~DomConverter#shouldRenderAttribute} say it should not.\n\t *\n\t * Unsafe attribute names can be specified when creating an element via {@link module:engine/view/downcastwriter~DowncastWriter}.\n\t *\n\t * @param {String} attributeName The name of the attribute to be checked.\n\t * @returns {Boolean}\n\t */\n\tshouldRenderUnsafeAttribute( attributeName ) {\n\t\treturn this._unsafeAttributesToRender.includes( attributeName );\n\t}\n\n\t/**\n\t * Clones provided element.\n\t *\n\t * @protected\n\t * @param {Boolean} [deep=false] If set to `true` clones element and all its children recursively. When set to `false`,\n\t * element will be cloned without any children.\n\t * @returns {module:engine/view/element~Element} Clone of this element.\n\t */\n\t_clone( deep = false ) {\n\t\tconst childrenClone = [];\n\n\t\tif ( deep ) {\n\t\t\tfor ( const child of this.getChildren() ) {\n\t\t\t\tchildrenClone.push( child._clone( deep ) );\n\t\t\t}\n\t\t}\n\n\t\t// ContainerElement and AttributeElement should be also cloned properly.\n\t\tconst cloned = new this.constructor( this.document, this.name, this._attrs, childrenClone );\n\n\t\t// Classes and styles are cloned separately - this solution is faster than adding them back to attributes and\n\t\t// parse once again in constructor.\n\t\tcloned._classes = new Set( this._classes );\n\t\tcloned._styles.set( this._styles.getNormalized() );\n\n\t\t// Clone custom properties.\n\t\tcloned._customProperties = new Map( this._customProperties );\n\n\t\t// Clone filler offset method.\n\t\t// We can't define this method in a prototype because it's behavior which\n\t\t// is changed by e.g. toWidget() function from ckeditor5-widget. Perhaps this should be one of custom props.\n\t\tcloned.getFillerOffset = this.getFillerOffset;\n\n\t\tcloned._isAllowedInsideAttributeElement = this.isAllowedInsideAttributeElement;\n\n\t\treturn cloned;\n\t}\n\n\t/**\n\t * {@link module:engine/view/element~Element#_insertChild Insert} a child node or a list of child nodes at the end of this node\n\t * and sets the parent of these nodes to this element.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#insert\n\t * @protected\n\t * @param {module:engine/view/item~Item|Iterable.<module:engine/view/item~Item>} items Items to be inserted.\n\t * @fires module:engine/view/node~Node#change\n\t * @returns {Number} Number of appended nodes.\n\t */\n\t_appendChild( items ) {\n\t\treturn this._insertChild( this.childCount, items );\n\t}\n\n\t/**\n\t * Inserts a child node or a list of child nodes on the given index and sets the parent of these nodes to\n\t * this element.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#insert\n\t * @protected\n\t * @param {Number} index Position where nodes should be inserted.\n\t * @param {module:engine/view/item~Item|Iterable.<module:engine/view/item~Item>} items Items to be inserted.\n\t * @fires module:engine/view/node~Node#change\n\t * @returns {Number} Number of inserted nodes.\n\t */\n\t_insertChild( index, items ) {\n\t\tthis._fireChange( 'children', this );\n\t\tlet count = 0;\n\n\t\tconst nodes = normalize( this.document, items );\n\n\t\tfor ( const node of nodes ) {\n\t\t\t// If node that is being added to this element is already inside another element, first remove it from the old parent.\n\t\t\tif ( node.parent !== null ) {\n\t\t\t\tnode._remove();\n\t\t\t}\n\n\t\t\tnode.parent = this;\n\t\t\tnode.document = this.document;\n\n\t\t\tthis._children.splice( index, 0, node );\n\t\t\tindex++;\n\t\t\tcount++;\n\t\t}\n\n\t\treturn count;\n\t}\n\n\t/**\n\t * Removes number of child nodes starting at the given index and set the parent of these nodes to `null`.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#remove\n\t * @protected\n\t * @param {Number} index Number of the first node to remove.\n\t * @param {Number} [howMany=1] Number of nodes to remove.\n\t * @fires module:engine/view/node~Node#change\n\t * @returns {Array.<module:engine/view/node~Node>} The array of removed nodes.\n\t */\n\t_removeChildren( index, howMany = 1 ) {\n\t\tthis._fireChange( 'children', this );\n\n\t\tfor ( let i = index; i < index + howMany; i++ ) {\n\t\t\tthis._children[ i ].parent = null;\n\t\t}\n\n\t\treturn this._children.splice( index, howMany );\n\t}\n\n\t/**\n\t * Adds or overwrite attribute with a specified key and value.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#setAttribute\n\t * @protected\n\t * @param {String} key Attribute key.\n\t * @param {String} value Attribute value.\n\t * @fires module:engine/view/node~Node#change\n\t */\n\t_setAttribute( key, value ) {\n\t\tvalue = String( value );\n\n\t\tthis._fireChange( 'attributes', this );\n\n\t\tif ( key == 'class' ) {\n\t\t\tparseClasses( this._classes, value );\n\t\t} else if ( key == 'style' ) {\n\t\t\tthis._styles.setTo( value );\n\t\t} else {\n\t\t\tthis._attrs.set( key, value );\n\t\t}\n\t}\n\n\t/**\n\t * Removes attribute from the element.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#removeAttribute\n\t * @protected\n\t * @param {String} key Attribute key.\n\t * @returns {Boolean} Returns true if an attribute existed and has been removed.\n\t * @fires module:engine/view/node~Node#change\n\t */\n\t_removeAttribute( key ) {\n\t\tthis._fireChange( 'attributes', this );\n\n\t\t// Remove class attribute.\n\t\tif ( key == 'class' ) {\n\t\t\tif ( this._classes.size > 0 ) {\n\t\t\t\tthis._classes.clear();\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Remove style attribute.\n\t\tif ( key == 'style' ) {\n\t\t\tif ( !this._styles.isEmpty ) {\n\t\t\t\tthis._styles.clear();\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Remove other attributes.\n\t\treturn this._attrs.delete( key );\n\t}\n\n\t/**\n\t * Adds specified class.\n\t *\n\t *\t\telement._addClass( 'foo' ); // Adds 'foo' class.\n\t *\t\telement._addClass( [ 'foo', 'bar' ] ); // Adds 'foo' and 'bar' classes.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#addClass\n\t * @protected\n\t * @param {Array.<String>|String} className\n\t * @fires module:engine/view/node~Node#change\n\t */\n\t_addClass( className ) {\n\t\tthis._fireChange( 'attributes', this );\n\n\t\tfor ( const name of toArray( className ) ) {\n\t\t\tthis._classes.add( name );\n\t\t}\n\t}\n\n\t/**\n\t * Removes specified class.\n\t *\n\t *\t\telement._removeClass( 'foo' ); // Removes 'foo' class.\n\t *\t\telement._removeClass( [ 'foo', 'bar' ] ); // Removes both 'foo' and 'bar' classes.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#removeClass\n\t * @protected\n\t * @param {Array.<String>|String} className\n\t * @fires module:engine/view/node~Node#change\n\t */\n\t_removeClass( className ) {\n\t\tthis._fireChange( 'attributes', this );\n\n\t\tfor ( const name of toArray( className ) ) {\n\t\t\tthis._classes.delete( name );\n\t\t}\n\t}\n\n\t/**\n\t * Adds style to the element.\n\t *\n\t *\t\telement._setStyle( 'color', 'red' );\n\t *\t\telement._setStyle( {\n\t *\t\t\tcolor: 'red',\n\t *\t\t\tposition: 'fixed'\n\t *\t\t} );\n\t *\n\t * **Note**: This method can work with normalized style names if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#set `StylesMap#set()`} for details.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#setStyle\n\t * @protected\n\t * @param {String|Object} property Property name or object with key - value pairs.\n\t * @param {String} [value] Value to set. This parameter is ignored if object is provided as the first parameter.\n\t * @fires module:engine/view/node~Node#change\n\t */\n\t_setStyle( property, value ) {\n\t\tthis._fireChange( 'attributes', this );\n\n\t\tthis._styles.set( property, value );\n\t}\n\n\t/**\n\t * Removes specified style.\n\t *\n\t *\t\telement._removeStyle( 'color' ); // Removes 'color' style.\n\t *\t\telement._removeStyle( [ 'color', 'border-top' ] ); // Removes both 'color' and 'border-top' styles.\n\t *\n\t * **Note**: This method can work with normalized style names if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#remove `StylesMap#remove()`} for details.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#removeStyle\n\t * @protected\n\t * @param {Array.<String>|String} property\n\t * @fires module:engine/view/node~Node#change\n\t */\n\t_removeStyle( property ) {\n\t\tthis._fireChange( 'attributes', this );\n\n\t\tfor ( const name of toArray( property ) ) {\n\t\t\tthis._styles.remove( name );\n\t\t}\n\t}\n\n\t/**\n\t * Sets a custom property. Unlike attributes, custom properties are not rendered to the DOM,\n\t * so they can be used to add special data to elements.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#setCustomProperty\n\t * @protected\n\t * @param {String|Symbol} key\n\t * @param {*} value\n\t */\n\t_setCustomProperty( key, value ) {\n\t\tthis._customProperties.set( key, value );\n\t}\n\n\t/**\n\t * Removes the custom property stored under the given key.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#removeCustomProperty\n\t * @protected\n\t * @param {String|Symbol} key\n\t * @returns {Boolean} Returns true if property was removed.\n\t */\n\t_removeCustomProperty( key ) {\n\t\treturn this._customProperties.delete( key );\n\t}\n\n\t/**\n\t * Returns block {@link module:engine/view/filler filler} offset or `null` if block filler is not needed.\n\t *\n\t * @abstract\n\t * @method module:engine/view/element~Element#getFillerOffset\n\t */\n\n\t// @if CK_DEBUG_ENGINE // printTree( level = 0) {\n\t// @if CK_DEBUG_ENGINE // \tlet string = '';\n\n\t// @if CK_DEBUG_ENGINE //\tstring += '\\t'.repeat( level ) + `<${ this.name }${ convertMapToTags( this.getAttributes() ) }>`;\n\n\t// @if CK_DEBUG_ENGINE //\tfor ( const child of this.getChildren() ) {\n\t// @if CK_DEBUG_ENGINE //\t\tif ( child.is( '$text' ) ) {\n\t// @if CK_DEBUG_ENGINE //\t\t\tstring += '\\n' + '\\t'.repeat( level + 1 ) + child.data;\n\t// @if CK_DEBUG_ENGINE //\t\t} else {\n\t// @if CK_DEBUG_ENGINE //\t\t\tstring += '\\n' + child.printTree( level + 1 );\n\t// @if CK_DEBUG_ENGINE //\t\t}\n\t// @if CK_DEBUG_ENGINE //\t}\n\n\t// @if CK_DEBUG_ENGINE //\tif ( this.childCount ) {\n\t// @if CK_DEBUG_ENGINE //\t\tstring += '\\n' + '\\t'.repeat( level );\n\t// @if CK_DEBUG_ENGINE //\t}\n\n\t// @if CK_DEBUG_ENGINE //\tstring += `</${ this.name }>`;\n\n\t// @if CK_DEBUG_ENGINE //\treturn string;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // logTree() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( this.printTree() );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n// Parses attributes provided to the element constructor before they are applied to an element. If attributes are passed\n// as an object (instead of `Iterable`), the object is transformed to the map. Attributes with `null` value are removed.\n// Attributes with non-`String` value are converted to `String`.\n//\n// @param {Object|Iterable} attrs Attributes to parse.\n// @returns {Map} Parsed attributes.\nfunction parseAttributes( attrs ) {\n\tattrs = toMap( attrs );\n\n\tfor ( const [ key, value ] of attrs ) {\n\t\tif ( value === null ) {\n\t\t\tattrs.delete( key );\n\t\t} else if ( typeof value != 'string' ) {\n\t\t\tattrs.set( key, String( value ) );\n\t\t}\n\t}\n\n\treturn attrs;\n}\n\n// Parses class attribute and puts all classes into classes set.\n// Classes set s cleared before insertion.\n//\n// @param {Set.<String>} classesSet Set to insert parsed classes.\n// @param {String} classesString String with classes to parse.\nfunction parseClasses( classesSet, classesString ) {\n\tconst classArray = classesString.split( /\\s+/ );\n\tclassesSet.clear();\n\tclassArray.forEach( name => classesSet.add( name ) );\n}\n\n// Converts strings to Text and non-iterables to arrays.\n//\n// @param {String|module:engine/view/item~Item|Iterable.<String|module:engine/view/item~Item>}\n// @returns {Iterable.<module:engine/view/node~Node>}\nfunction normalize( document, nodes ) {\n\t// Separate condition because string is iterable.\n\tif ( typeof nodes == 'string' ) {\n\t\treturn [ new Text( document, nodes ) ];\n\t}\n\n\tif ( !isIterable( nodes ) ) {\n\t\tnodes = [ nodes ];\n\t}\n\n\t// Array.from to enable .map() on non-arrays.\n\treturn Array.from( nodes )\n\t\t.map( node => {\n\t\t\tif ( typeof node == 'string' ) {\n\t\t\t\treturn new Text( document, node );\n\t\t\t}\n\n\t\t\tif ( node instanceof TextProxy ) {\n\t\t\t\treturn new Text( document, node.data );\n\t\t\t}\n\n\t\t\treturn node;\n\t\t} );\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/containerelement\n */\n\nimport Element from './element';\n\n/**\n * Containers are elements which define document structure. They define boundaries for\n * {@link module:engine/view/attributeelement~AttributeElement attributes}. They are mostly used for block elements like `<p>` or `<div>`.\n *\n * Editing engine does not define a fixed HTML DTD. This is why a feature developer needs to choose between various\n * types (container element, {@link module:engine/view/attributeelement~AttributeElement attribute element},\n * {@link module:engine/view/emptyelement~EmptyElement empty element}, etc) when developing a feature.\n *\n * The container element should be your default choice when writing a converter, unless:\n *\n * * this element represents a model text attribute (then use {@link module:engine/view/attributeelement~AttributeElement}),\n * * this is an empty element like `<img>` (then use {@link module:engine/view/emptyelement~EmptyElement}),\n * * this is a root element,\n * * this is a nested editable element (then use {@link module:engine/view/editableelement~EditableElement}).\n *\n * To create a new container element instance use the\n * {@link module:engine/view/downcastwriter~DowncastWriter#createContainerElement `DowncastWriter#createContainerElement()`}\n * method.\n *\n * @extends module:engine/view/element~Element\n */\nexport default class ContainerElement extends Element {\n\t/**\n\t * Creates a container element.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#createContainerElement\n\t * @see module:engine/view/element~Element\n\t * @protected\n\t * @param {module:engine/view/document~Document} document The document instance to which this element belongs.\n\t * @param {String} name Node name.\n\t * @param {Object|Iterable} [attrs] Collection of attributes.\n\t * @param {module:engine/view/node~Node|Iterable.<module:engine/view/node~Node>} [children]\n\t * A list of nodes to be inserted into created element.\n\t */\n\tconstructor( document, name, attrs, children ) {\n\t\tsuper( document, name, attrs, children );\n\n\t\t/**\n\t\t * Returns block {@link module:engine/view/filler filler} offset or `null` if block filler is not needed.\n\t\t *\n\t\t * @method #getFillerOffset\n\t\t * @returns {Number|null} Block filler offset or `null` if block filler is not needed.\n\t\t */\n\t\tthis.getFillerOffset = getFillerOffset;\n\t}\n\n\t/**\n\t * Checks whether this object is of the given.\n\t *\n\t *\t\tcontainerElement.is( 'containerElement' ); // -> true\n\t *\t\tcontainerElement.is( 'element' ); // -> true\n\t *\t\tcontainerElement.is( 'node' ); // -> true\n\t *\t\tcontainerElement.is( 'view:containerElement' ); // -> true\n\t *\t\tcontainerElement.is( 'view:element' ); // -> true\n\t *\t\tcontainerElement.is( 'view:node' ); // -> true\n\t *\n\t *\t\tcontainerElement.is( 'model:element' ); // -> false\n\t *\t\tcontainerElement.is( 'documentFragment' ); // -> false\n\t *\n\t * Assuming that the object being checked is a container element, you can also check its\n\t * {@link module:engine/view/containerelement~ContainerElement#name name}:\n\t *\n\t *\t\tcontainerElement.is( 'element', 'div' ); // -> true if this is a div container element\n\t *\t\tcontainerElement.is( 'contaienrElement', 'div' ); // -> same as above\n\t *\t\ttext.is( 'element', 'div' ); -> false\n\t *\n\t * {@link module:engine/view/node~Node#is Check the entire list of view objects} which implement the `is()` method.\n\t *\n\t * @param {String} type Type to check.\n\t * @param {String} [name] Element name.\n\t * @returns {Boolean}\n\t */\n\tis( type, name = null ) {\n\t\tif ( !name ) {\n\t\t\treturn type === 'containerElement' || type === 'view:containerElement' ||\n\t\t\t\t// From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n\t\t\t\ttype === 'element' || type === 'view:element' ||\n\t\t\t\ttype === 'node' || type === 'view:node';\n\t\t} else {\n\t\t\treturn name === this.name && (\n\t\t\t\ttype === 'containerElement' || type === 'view:containerElement' ||\n\t\t\t\t// From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n\t\t\t\ttype === 'element' || type === 'view:element'\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * Returns block {@link module:engine/view/filler filler} offset or `null` if block filler is not needed.\n *\n * @returns {Number|null} Block filler offset or `null` if block filler is not needed.\n */\nexport function getFillerOffset() {\n\tconst children = [ ...this.getChildren() ];\n\tconst lastChild = children[ this.childCount - 1 ];\n\n\t// Block filler is required after a `<br>` if it's the last element in its container. See #1422.\n\tif ( lastChild && lastChild.is( 'element', 'br' ) ) {\n\t\treturn this.childCount;\n\t}\n\n\tfor ( const child of children ) {\n\t\t// If there's any non-UI element – don't render the bogus.\n\t\tif ( !child.is( 'uiElement' ) ) {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t// If there are only UI elements – render the bogus at the end of the element.\n\treturn this.childCount;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/editableelement\n */\n\nimport ContainerElement from './containerelement';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\nimport ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';\n\n/**\n * Editable element which can be a {@link module:engine/view/rooteditableelement~RootEditableElement root}\n * or nested editable area in the editor.\n *\n * Editable is automatically read-only when its {@link module:engine/view/document~Document Document} is read-only.\n *\n * The constructor of this class shouldn't be used directly. To create new `EditableElement` use the\n * {@link module:engine/view/downcastwriter~DowncastWriter#createEditableElement `downcastWriter#createEditableElement()`} method.\n *\n * @extends module:engine/view/containerelement~ContainerElement\n * @mixes module:utils/observablemixin~ObservableMixin\n */\nexport default class EditableElement extends ContainerElement {\n\t/**\n\t * Creates an editable element.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#createEditableElement\n\t * @protected\n\t */\n\tconstructor( document, name, attrs, children ) {\n\t\tsuper( document, name, attrs, children );\n\n\t\t/**\n\t\t * Whether the editable is in read-write or read-only mode.\n\t\t *\n\t\t * @observable\n\t\t * @member {Boolean} module:engine/view/editableelement~EditableElement#isReadOnly\n\t\t */\n\t\tthis.set( 'isReadOnly', false );\n\n\t\t/**\n\t\t * Whether the editable is focused.\n\t\t *\n\t\t * This property updates when {@link module:engine/view/document~Document#isFocused document.isFocused} or view\n\t\t * selection is changed.\n\t\t *\n\t\t * @readonly\n\t\t * @observable\n\t\t * @member {Boolean} module:engine/view/editableelement~EditableElement#isFocused\n\t\t */\n\t\tthis.set( 'isFocused', false );\n\n\t\tthis.bind( 'isReadOnly' ).to( document );\n\n\t\tthis.bind( 'isFocused' ).to(\n\t\t\tdocument,\n\t\t\t'isFocused',\n\t\t\tisFocused => isFocused && document.selection.editableElement == this\n\t\t);\n\n\t\t// Update focus state based on selection changes.\n\t\tthis.listenTo( document.selection, 'change', () => {\n\t\t\tthis.isFocused = document.isFocused && document.selection.editableElement == this;\n\t\t} );\n\t}\n\n\t/**\n\t * Checks whether this object is of the given.\n\t *\n\t *\t\teditableElement.is( 'editableElement' ); // -> true\n\t *\t\teditableElement.is( 'element' ); // -> true\n\t *\t\teditableElement.is( 'node' ); // -> true\n\t *\t\teditableElement.is( 'view:editableElement' ); // -> true\n\t *\t\teditableElement.is( 'view:element' ); // -> true\n\t *\t\teditableElement.is( 'view:node' ); // -> true\n\t *\n\t *\t\teditableElement.is( 'model:element' ); // -> false\n\t *\t\teditableElement.is( 'documentFragment' ); // -> false\n\t *\n\t * Assuming that the object being checked is an editbale element, you can also check its\n\t * {@link module:engine/view/editableelement~EditableElement#name name}:\n\t *\n\t *\t\teditableElement.is( 'element', 'div' ); // -> true if this is a div element\n\t *\t\teditableElement.is( 'editableElement', 'div' ); // -> same as above\n\t *\t\ttext.is( 'element', 'div' ); -> false\n\t *\n\t * {@link module:engine/view/node~Node#is Check the entire list of view objects} which implement the `is()` method.\n\t *\n\t * @param {String} type Type to check.\n\t * @param {String} [name] Element name.\n\t * @returns {Boolean}\n\t */\n\tis( type, name = null ) {\n\t\tif ( !name ) {\n\t\t\treturn type === 'editableElement' || type === 'view:editableElement' ||\n\t\t\t\t// From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n\t\t\t\ttype === 'containerElement' || type === 'view:containerElement' ||\n\t\t\t\ttype === 'element' || type === 'view:element' ||\n\t\t\t\ttype === 'node' || type === 'view:node';\n\t\t} else {\n\t\t\treturn name === this.name && (\n\t\t\t\ttype === 'editableElement' || type === 'view:editableElement' ||\n\t\t\t\t// From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n\t\t\t\ttype === 'containerElement' || type === 'view:containerElement' ||\n\t\t\t\ttype === 'element' || type === 'view:element'\n\t\t\t);\n\t\t}\n\t}\n\n\tdestroy() {\n\t\tthis.stopListening();\n\t}\n}\n\nmix( EditableElement, ObservableMixin );\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/rooteditableelement\n */\n\nimport EditableElement from './editableelement';\n\nconst rootNameSymbol = Symbol( 'rootName' );\n\n/**\n * Class representing a single root in the data view. A root can be either {@link ~RootEditableElement#isReadOnly editable or read-only},\n * but in both cases it is called \"an editable\". Roots can contain other {@link module:engine/view/editableelement~EditableElement\n * editable elements} making them \"nested editables\".\n *\n * @extends module:engine/view/editableelement~EditableElement\n */\nexport default class RootEditableElement extends EditableElement {\n\t/**\n\t * Creates root editable element.\n\t *\n\t * @param {module:engine/view/document~Document} document The document instance to which this element belongs.\n\t * @param {String} name Node name.\n\t */\n\tconstructor( document, name ) {\n\t\tsuper( document, name );\n\n\t\t/**\n\t\t * Name of this root inside {@link module:engine/view/document~Document} that is an owner of this root. If no\n\t\t * other name is set, `main` name is used.\n\t\t *\n\t\t * @readonly\n\t\t * @member {String}\n\t\t */\n\t\tthis.rootName = 'main';\n\t}\n\n\t/**\n\t * Checks whether this object is of the given.\n\t *\n\t *\t\trootEditableElement.is( 'rootElement' ); // -> true\n\t *\t\trootEditableElement.is( 'editableElement' ); // -> true\n\t *\t\trootEditableElement.is( 'element' ); // -> true\n\t *\t\trootEditableElement.is( 'node' ); // -> true\n\t *\t\trootEditableElement.is( 'view:editableElement' ); // -> true\n\t *\t\trootEditableElement.is( 'view:element' ); // -> true\n\t *\t\trootEditableElement.is( 'view:node' ); // -> true\n\t *\n\t *\t\trootEditableElement.is( 'model:element' ); // -> false\n\t *\t\trootEditableElement.is( 'documentFragment' ); // -> false\n\t *\n\t * Assuming that the object being checked is a root editable element, you can also check its\n\t * {@link module:engine/view/rooteditableelement~RootEditableElement#name name}:\n\t *\n\t *\t\trootEditableElement.is( 'element', 'div' ); // -> true if this is a div root editable element\n\t *\t\trootEditableElement.is( 'rootElement', 'div' ); // -> same as above\n\t *\t\ttext.is( 'element', 'div' ); -> false\n\t *\n\t * {@link module:engine/view/node~Node#is Check the entire list of view objects} which implement the `is()` method.\n\t *\n\t * @param {String} type Type to check.\n\t * @param {String} [name] Element name.\n\t * @returns {Boolean}\n\t */\n\tis( type, name = null ) {\n\t\tif ( !name ) {\n\t\t\treturn type === 'rootElement' || type === 'view:rootElement' ||\n\t\t\t\t// From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n\t\t\t\ttype === 'editableElement' || type === 'view:editableElement' ||\n\t\t\t\ttype === 'containerElement' || type === 'view:containerElement' ||\n\t\t\t\ttype === 'element' || type === 'view:element' ||\n\t\t\t\ttype === 'node' || type === 'view:node';\n\t\t} else {\n\t\t\treturn name === this.name && (\n\t\t\t\ttype === 'rootElement' || type === 'view:rootElement' ||\n\t\t\t\t// From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n\t\t\t\ttype === 'editableElement' || type === 'view:editableElement' ||\n\t\t\t\ttype === 'containerElement' || type === 'view:containerElement' ||\n\t\t\t\ttype === 'element' || type === 'view:element'\n\t\t\t);\n\t\t}\n\t}\n\n\tget rootName() {\n\t\treturn this.getCustomProperty( rootNameSymbol );\n\t}\n\n\tset rootName( rootName ) {\n\t\tthis._setCustomProperty( rootNameSymbol, rootName );\n\t}\n\n\t/**\n\t * Overrides old element name and sets new one.\n\t * This is needed because view roots are created before they are attached to the DOM.\n\t * The name of the root element is temporary at this stage. It has to be changed when the\n\t * view root element is attached to the DOM element.\n\t *\n\t * @protected\n\t * @param {String} name The new name of element.\n\t */\n\tset _name( name ) {\n\t\tthis.name = name;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/treewalker\n */\n\nimport Element from './element';\nimport Text from './text';\nimport TextProxy from './textproxy';\nimport Position from './position';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n/**\n * Position iterator class. It allows to iterate forward and backward over the document.\n */\nexport default class TreeWalker {\n\t/**\n\t * Creates a range iterator. All parameters are optional, but you have to specify either `boundaries` or `startPosition`.\n\t *\n\t * @constructor\n\t * @param {Object} options Object with configuration.\n\t * @param {module:engine/view/range~Range} [options.boundaries=null] Range to define boundaries of the iterator.\n\t * @param {module:engine/view/position~Position} [options.startPosition] Starting position.\n\t * @param {'forward'|'backward'} [options.direction='forward'] Walking direction.\n\t * @param {Boolean} [options.singleCharacters=false] Flag indicating whether all characters from\n\t * {@link module:engine/view/text~Text} should be returned as one {@link module:engine/view/text~Text} (`false`) ore one by one as\n\t * {@link module:engine/view/textproxy~TextProxy} (`true`).\n\t * @param {Boolean} [options.shallow=false] Flag indicating whether iterator should enter elements or not. If the\n\t * iterator is shallow child nodes of any iterated node will not be returned along with `elementEnd` tag.\n\t * @param {Boolean} [options.ignoreElementEnd=false] Flag indicating whether iterator should ignore `elementEnd`\n\t * tags. If the option is true walker will not return a parent node of start position. If this option is `true`\n\t * each {@link module:engine/view/element~Element} will be returned once, while if the option is `false` they might be returned\n\t * twice: for `'elementStart'` and `'elementEnd'`.\n\t */\n\tconstructor( options = {} ) {\n\t\tif ( !options.boundaries && !options.startPosition ) {\n\t\t\t/**\n\t\t\t * Neither boundaries nor starting position have been defined.\n\t\t\t *\n\t\t\t * @error view-tree-walker-no-start-position\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'view-tree-walker-no-start-position',\n\t\t\t\tnull\n\t\t\t);\n\t\t}\n\n\t\tif ( options.direction && options.direction != 'forward' && options.direction != 'backward' ) {\n\t\t\t/**\n\t\t\t * Only `backward` and `forward` direction allowed.\n\t\t\t *\n\t\t\t * @error view-tree-walker-unknown-direction\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-tree-walker-unknown-direction', options.startPosition, { direction: options.direction } );\n\t\t}\n\n\t\t/**\n\t\t * Iterator boundaries.\n\t\t *\n\t\t * When the iterator is walking `'forward'` on the end of boundary or is walking `'backward'`\n\t\t * on the start of boundary, then `{ done: true }` is returned.\n\t\t *\n\t\t * If boundaries are not defined they are set before first and after last child of the root node.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/range~Range} module:engine/view/treewalker~TreeWalker#boundaries\n\t\t */\n\t\tthis.boundaries = options.boundaries || null;\n\n\t\t/**\n\t\t * Iterator position. If start position is not defined then position depends on {@link #direction}. If direction is\n\t\t * `'forward'` position starts form the beginning, when direction is `'backward'` position starts from the end.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/position~Position} module:engine/view/treewalker~TreeWalker#position\n\t\t */\n\t\tif ( options.startPosition ) {\n\t\t\tthis.position = Position._createAt( options.startPosition );\n\t\t} else {\n\t\t\tthis.position = Position._createAt( options.boundaries[ options.direction == 'backward' ? 'end' : 'start' ] );\n\t\t}\n\n\t\t/**\n\t\t * Walking direction. Defaults `'forward'`.\n\t\t *\n\t\t * @readonly\n\t\t * @member {'backward'|'forward'} module:engine/view/treewalker~TreeWalker#direction\n\t\t */\n\t\tthis.direction = options.direction || 'forward';\n\n\t\t/**\n\t\t * Flag indicating whether all characters from {@link module:engine/view/text~Text} should be returned as one\n\t\t * {@link module:engine/view/text~Text} or one by one as {@link module:engine/view/textproxy~TextProxy}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Boolean} module:engine/view/treewalker~TreeWalker#singleCharacters\n\t\t */\n\t\tthis.singleCharacters = !!options.singleCharacters;\n\n\t\t/**\n\t\t * Flag indicating whether iterator should enter elements or not. If the iterator is shallow child nodes of any\n\t\t * iterated node will not be returned along with `elementEnd` tag.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Boolean} module:engine/view/treewalker~TreeWalker#shallow\n\t\t */\n\t\tthis.shallow = !!options.shallow;\n\n\t\t/**\n\t\t * Flag indicating whether iterator should ignore `elementEnd` tags. If set to `true`, walker will not\n\t\t * return a parent node of the start position. Each {@link module:engine/view/element~Element} will be returned once.\n\t\t * When set to `false` each element might be returned twice: for `'elementStart'` and `'elementEnd'`.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Boolean} module:engine/view/treewalker~TreeWalker#ignoreElementEnd\n\t\t */\n\t\tthis.ignoreElementEnd = !!options.ignoreElementEnd;\n\n\t\t/**\n\t\t * Start boundary parent.\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/view/node~Node} module:engine/view/treewalker~TreeWalker#_boundaryStartParent\n\t\t */\n\t\tthis._boundaryStartParent = this.boundaries ? this.boundaries.start.parent : null;\n\n\t\t/**\n\t\t * End boundary parent.\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/view/node~Node} module:engine/view/treewalker~TreeWalker#_boundaryEndParent\n\t\t */\n\t\tthis._boundaryEndParent = this.boundaries ? this.boundaries.end.parent : null;\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * @returns {Iterable.<module:engine/view/treewalker~TreeWalkerValue>}\n\t */\n\t[ Symbol.iterator ]() {\n\t\treturn this;\n\t}\n\n\t/**\n\t * Moves {@link #position} in the {@link #direction} skipping values as long as the callback function returns `true`.\n\t *\n\t * For example:\n\t *\n\t * \t\twalker.skip( value => value.type == 'text' ); // <p>{}foo</p> -> <p>foo[]</p>\n\t * \t\twalker.skip( value => true ); // Move the position to the end: <p>{}foo</p> -> <p>foo</p>[]\n\t * \t\twalker.skip( value => false ); // Do not move the position.\n\t *\n\t * @param {Function} skip Callback function. Gets {@link module:engine/view/treewalker~TreeWalkerValue} and should\n\t * return `true` if the value should be skipped or `false` if not.\n\t */\n\tskip( skip ) {\n\t\tlet done, value, prevPosition;\n\n\t\tdo {\n\t\t\tprevPosition = this.position;\n\n\t\t\t( { done, value } = this.next() );\n\t\t} while ( !done && skip( value ) );\n\n\t\tif ( !done ) {\n\t\t\tthis.position = prevPosition;\n\t\t}\n\t}\n\n\t/**\n\t * Gets the next tree walker's value.\n\t *\n\t * @returns {module:engine/view/treewalker~TreeWalkerValue} Object implementing iterator interface, returning\n\t * information about taken step.\n\t */\n\tnext() {\n\t\tif ( this.direction == 'forward' ) {\n\t\t\treturn this._next();\n\t\t} else {\n\t\t\treturn this._previous();\n\t\t}\n\t}\n\n\t/**\n\t * Makes a step forward in view. Moves the {@link #position} to the next position and returns the encountered value.\n\t *\n\t * @private\n\t * @returns {Object}\n\t * @returns {Boolean} return.done `true` if iterator is done, `false` otherwise.\n\t * @returns {module:engine/view/treewalker~TreeWalkerValue} return.value Information about taken step.\n\t */\n\t_next() {\n\t\tlet position = this.position.clone();\n\t\tconst previousPosition = this.position;\n\t\tconst parent = position.parent;\n\n\t\t// We are at the end of the root.\n\t\tif ( parent.parent === null && position.offset === parent.childCount ) {\n\t\t\treturn { done: true };\n\t\t}\n\n\t\t// We reached the walker boundary.\n\t\tif ( parent === this._boundaryEndParent && position.offset == this.boundaries.end.offset ) {\n\t\t\treturn { done: true };\n\t\t}\n\n\t\t// Get node just after current position.\n\t\tlet node;\n\n\t\t// Text is a specific parent because it contains string instead of child nodes.\n\t\tif ( parent instanceof Text ) {\n\t\t\tif ( position.isAtEnd ) {\n\t\t\t\t// Prevent returning \"elementEnd\" for Text node. Skip that value and return the next walker step.\n\t\t\t\tthis.position = Position._createAfter( parent );\n\n\t\t\t\treturn this._next();\n\t\t\t}\n\n\t\t\tnode = parent.data[ position.offset ];\n\t\t} else {\n\t\t\tnode = parent.getChild( position.offset );\n\t\t}\n\n\t\tif ( node instanceof Element ) {\n\t\t\tif ( !this.shallow ) {\n\t\t\t\tposition = new Position( node, 0 );\n\t\t\t} else {\n\t\t\t\tposition.offset++;\n\t\t\t}\n\n\t\t\tthis.position = position;\n\n\t\t\treturn this._formatReturnValue( 'elementStart', node, previousPosition, position, 1 );\n\t\t} else if ( node instanceof Text ) {\n\t\t\tif ( this.singleCharacters ) {\n\t\t\t\tposition = new Position( node, 0 );\n\t\t\t\tthis.position = position;\n\n\t\t\t\treturn this._next();\n\t\t\t} else {\n\t\t\t\tlet charactersCount = node.data.length;\n\t\t\t\tlet item;\n\n\t\t\t\t// If text stick out of walker range, we need to cut it and wrap in TextProxy.\n\t\t\t\tif ( node == this._boundaryEndParent ) {\n\t\t\t\t\tcharactersCount = this.boundaries.end.offset;\n\t\t\t\t\titem = new TextProxy( node, 0, charactersCount );\n\t\t\t\t\tposition = Position._createAfter( item );\n\t\t\t\t} else {\n\t\t\t\t\titem = new TextProxy( node, 0, node.data.length );\n\t\t\t\t\t// If not just keep moving forward.\n\t\t\t\t\tposition.offset++;\n\t\t\t\t}\n\n\t\t\t\tthis.position = position;\n\n\t\t\t\treturn this._formatReturnValue( 'text', item, previousPosition, position, charactersCount );\n\t\t\t}\n\t\t} else if ( typeof node == 'string' ) {\n\t\t\tlet textLength;\n\n\t\t\tif ( this.singleCharacters ) {\n\t\t\t\ttextLength = 1;\n\t\t\t} else {\n\t\t\t\t// Check if text stick out of walker range.\n\t\t\t\tconst endOffset = parent === this._boundaryEndParent ? this.boundaries.end.offset : parent.data.length;\n\n\t\t\t\ttextLength = endOffset - position.offset;\n\t\t\t}\n\n\t\t\tconst textProxy = new TextProxy( parent, position.offset, textLength );\n\n\t\t\tposition.offset += textLength;\n\t\t\tthis.position = position;\n\n\t\t\treturn this._formatReturnValue( 'text', textProxy, previousPosition, position, textLength );\n\t\t} else {\n\t\t\t// `node` is not set, we reached the end of current `parent`.\n\t\t\tposition = Position._createAfter( parent );\n\t\t\tthis.position = position;\n\n\t\t\tif ( this.ignoreElementEnd ) {\n\t\t\t\treturn this._next();\n\t\t\t} else {\n\t\t\t\treturn this._formatReturnValue( 'elementEnd', parent, previousPosition, position );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Makes a step backward in view. Moves the {@link #position} to the previous position and returns the encountered value.\n\t *\n\t * @private\n\t * @returns {Object}\n\t * @returns {Boolean} return.done True if iterator is done.\n\t * @returns {module:engine/view/treewalker~TreeWalkerValue} return.value Information about taken step.\n\t */\n\t_previous() {\n\t\tlet position = this.position.clone();\n\t\tconst previousPosition = this.position;\n\t\tconst parent = position.parent;\n\n\t\t// We are at the beginning of the root.\n\t\tif ( parent.parent === null && position.offset === 0 ) {\n\t\t\treturn { done: true };\n\t\t}\n\n\t\t// We reached the walker boundary.\n\t\tif ( parent == this._boundaryStartParent && position.offset == this.boundaries.start.offset ) {\n\t\t\treturn { done: true };\n\t\t}\n\n\t\t// Get node just before current position.\n\t\tlet node;\n\n\t\t// Text {@link module:engine/view/text~Text} element is a specific parent because contains string instead of child nodes.\n\t\tif ( parent instanceof Text ) {\n\t\t\tif ( position.isAtStart ) {\n\t\t\t\t// Prevent returning \"elementStart\" for Text node. Skip that value and return the next walker step.\n\t\t\t\tthis.position = Position._createBefore( parent );\n\n\t\t\t\treturn this._previous();\n\t\t\t}\n\n\t\t\tnode = parent.data[ position.offset - 1 ];\n\t\t} else {\n\t\t\tnode = parent.getChild( position.offset - 1 );\n\t\t}\n\n\t\tif ( node instanceof Element ) {\n\t\t\tif ( !this.shallow ) {\n\t\t\t\tposition = new Position( node, node.childCount );\n\t\t\t\tthis.position = position;\n\n\t\t\t\tif ( this.ignoreElementEnd ) {\n\t\t\t\t\treturn this._previous();\n\t\t\t\t} else {\n\t\t\t\t\treturn this._formatReturnValue( 'elementEnd', node, previousPosition, position );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tposition.offset--;\n\t\t\t\tthis.position = position;\n\n\t\t\t\treturn this._formatReturnValue( 'elementStart', node, previousPosition, position, 1 );\n\t\t\t}\n\t\t} else if ( node instanceof Text ) {\n\t\t\tif ( this.singleCharacters ) {\n\t\t\t\tposition = new Position( node, node.data.length );\n\t\t\t\tthis.position = position;\n\n\t\t\t\treturn this._previous();\n\t\t\t} else {\n\t\t\t\tlet charactersCount = node.data.length;\n\t\t\t\tlet item;\n\n\t\t\t\t// If text stick out of walker range, we need to cut it and wrap in TextProxy.\n\t\t\t\tif ( node == this._boundaryStartParent ) {\n\t\t\t\t\tconst offset = this.boundaries.start.offset;\n\n\t\t\t\t\titem = new TextProxy( node, offset, node.data.length - offset );\n\t\t\t\t\tcharactersCount = item.data.length;\n\t\t\t\t\tposition = Position._createBefore( item );\n\t\t\t\t} else {\n\t\t\t\t\titem = new TextProxy( node, 0, node.data.length );\n\t\t\t\t\t// If not just keep moving backward.\n\t\t\t\t\tposition.offset--;\n\t\t\t\t}\n\n\t\t\t\tthis.position = position;\n\n\t\t\t\treturn this._formatReturnValue( 'text', item, previousPosition, position, charactersCount );\n\t\t\t}\n\t\t} else if ( typeof node == 'string' ) {\n\t\t\tlet textLength;\n\n\t\t\tif ( !this.singleCharacters ) {\n\t\t\t\t// Check if text stick out of walker range.\n\t\t\t\tconst startOffset = parent === this._boundaryStartParent ? this.boundaries.start.offset : 0;\n\n\t\t\t\ttextLength = position.offset - startOffset;\n\t\t\t} else {\n\t\t\t\ttextLength = 1;\n\t\t\t}\n\n\t\t\tposition.offset -= textLength;\n\n\t\t\tconst textProxy = new TextProxy( parent, position.offset, textLength );\n\n\t\t\tthis.position = position;\n\n\t\t\treturn this._formatReturnValue( 'text', textProxy, previousPosition, position, textLength );\n\t\t} else {\n\t\t\t// `node` is not set, we reached the beginning of current `parent`.\n\t\t\tposition = Position._createBefore( parent );\n\t\t\tthis.position = position;\n\n\t\t\treturn this._formatReturnValue( 'elementStart', parent, previousPosition, position, 1 );\n\t\t}\n\t}\n\n\t/**\n\t * Format returned data and adjust `previousPosition` and `nextPosition` if reach the bound of the {@link module:engine/view/text~Text}.\n\t *\n\t * @private\n\t * @param {module:engine/view/treewalker~TreeWalkerValueType} type Type of step.\n\t * @param {module:engine/view/item~Item} item Item between old and new position.\n\t * @param {module:engine/view/position~Position} previousPosition Previous position of iterator.\n\t * @param {module:engine/view/position~Position} nextPosition Next position of iterator.\n\t * @param {Number} [length] Length of the item.\n\t * @returns {module:engine/view/treewalker~TreeWalkerValue}\n\t */\n\t_formatReturnValue( type, item, previousPosition, nextPosition, length ) {\n\t\t// Text is a specific parent, because contains string instead of children.\n\t\t// Walker doesn't enter to the Text except situations when walker is iterating over every single character,\n\t\t// or the bound starts/ends inside the Text. So when the position is at the beginning or at the end of the Text\n\t\t// we move it just before or just after Text.\n\t\tif ( item instanceof TextProxy ) {\n\t\t\t// Position is at the end of Text.\n\t\t\tif ( item.offsetInText + item.data.length == item.textNode.data.length ) {\n\t\t\t\tif ( this.direction == 'forward' && !( this.boundaries && this.boundaries.end.isEqual( this.position ) ) ) {\n\t\t\t\t\tnextPosition = Position._createAfter( item.textNode );\n\t\t\t\t\t// When we change nextPosition of returned value we need also update walker current position.\n\t\t\t\t\tthis.position = nextPosition;\n\t\t\t\t} else {\n\t\t\t\t\tpreviousPosition = Position._createAfter( item.textNode );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Position is at the begining ot the text.\n\t\t\tif ( item.offsetInText === 0 ) {\n\t\t\t\tif ( this.direction == 'backward' && !( this.boundaries && this.boundaries.start.isEqual( this.position ) ) ) {\n\t\t\t\t\tnextPosition = Position._createBefore( item.textNode );\n\t\t\t\t\t// When we change nextPosition of returned value we need also update walker current position.\n\t\t\t\t\tthis.position = nextPosition;\n\t\t\t\t} else {\n\t\t\t\t\tpreviousPosition = Position._createBefore( item.textNode );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tdone: false,\n\t\t\tvalue: {\n\t\t\t\ttype,\n\t\t\t\titem,\n\t\t\t\tpreviousPosition,\n\t\t\t\tnextPosition,\n\t\t\t\tlength\n\t\t\t}\n\t\t};\n\t}\n}\n\n/**\n * Type of the step made by {@link module:engine/view/treewalker~TreeWalker}.\n * Possible values: `'elementStart'` if walker is at the beginning of a node, `'elementEnd'` if walker is at the end\n * of node, or `'text'` if walker traversed over single and multiple characters.\n * For {@link module:engine/view/text~Text} `elementStart` and `elementEnd` is not returned.\n *\n * @typedef {String} module:engine/view/treewalker~TreeWalkerValueType\n */\n\n/**\n * Object returned by {@link module:engine/view/treewalker~TreeWalker} when traversing tree view.\n *\n * @typedef {Object} module:engine/view/treewalker~TreeWalkerValue\n * @property {module:engine/view/treewalker~TreeWalkerValueType} type\n * @property {module:engine/view/item~Item} item Item between the old and the new positions\n * of the tree walker.\n * @property {module:engine/view/position~Position} previousPosition Previous position of the iterator.\n * * Forward iteration: For `'elementEnd'` it is the last position inside the element. For all other types it is the\n * position before the item.\n * * Backward iteration: For `'elementStart'` it is the first position inside the element. For all other types it is\n * the position after item.\n * * If the position is at the beginning or at the end of the {@link module:engine/view/text~Text} it is always moved from the\n * inside of the text to its parent just before or just after that text.\n * @property {module:engine/view/position~Position} nextPosition Next position of the iterator.\n * * Forward iteration: For `'elementStart'` it is the first position inside the element. For all other types it is\n * the position after the item.\n * * Backward iteration: For `'elementEnd'` it is last position inside element. For all other types it is the position\n * before the item.\n * * If the position is at the beginning or at the end of the {@link module:engine/view/text~Text} it is always moved from the\n * inside of the text to its parent just before or just after that text.\n * @property {Number} [length] Length of the item. For `'elementStart'` it is `1`. For `'text'` it is\n * the length of that text. For `'elementEnd'` it is `undefined`.\n */\n\n/**\n * Tree walking directions.\n *\n * @typedef {'forward'|'backward'} module:engine/view/treewalker~TreeWalkerDirection\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/position\n */\n\nimport TreeWalker from './treewalker';\n\nimport compareArrays from '@ckeditor/ckeditor5-utils/src/comparearrays';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport EditableElement from './editableelement';\n\n// To check if component is loaded more than once.\nimport '@ckeditor/ckeditor5-utils/src/version';\n\n/**\n * Position in the view tree. Position is represented by its parent node and an offset in this parent.\n *\n * In order to create a new position instance use the `createPosition*()` factory methods available in:\n *\n * * {@link module:engine/view/view~View}\n * * {@link module:engine/view/downcastwriter~DowncastWriter}\n * * {@link module:engine/view/upcastwriter~UpcastWriter}\n */\nexport default class Position {\n\t/**\n\t * Creates a position.\n\t *\n\t * @param {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment} parent Position parent.\n\t * @param {Number} offset Position offset.\n\t */\n\tconstructor( parent, offset ) {\n\t\t/**\n\t\t * Position parent.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment}\n\t\t * module:engine/view/position~Position#parent\n\t\t */\n\t\tthis.parent = parent;\n\n\t\t/**\n\t\t * Position offset.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Number} module:engine/view/position~Position#offset\n\t\t */\n\t\tthis.offset = offset;\n\t}\n\n\t/**\n\t * Node directly after the position. Equals `null` when there is no node after position or position is located\n\t * inside text node.\n\t *\n\t * @readonly\n\t * @type {module:engine/view/node~Node|null}\n\t */\n\tget nodeAfter() {\n\t\tif ( this.parent.is( '$text' ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this.parent.getChild( this.offset ) || null;\n\t}\n\n\t/**\n\t * Node directly before the position. Equals `null` when there is no node before position or position is located\n\t * inside text node.\n\t *\n\t * @readonly\n\t * @type {module:engine/view/node~Node|null}\n\t */\n\tget nodeBefore() {\n\t\tif ( this.parent.is( '$text' ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this.parent.getChild( this.offset - 1 ) || null;\n\t}\n\n\t/**\n\t * Is `true` if position is at the beginning of its {@link module:engine/view/position~Position#parent parent}, `false` otherwise.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isAtStart() {\n\t\treturn this.offset === 0;\n\t}\n\n\t/**\n\t * Is `true` if position is at the end of its {@link module:engine/view/position~Position#parent parent}, `false` otherwise.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isAtEnd() {\n\t\tconst endOffset = this.parent.is( '$text' ) ? this.parent.data.length : this.parent.childCount;\n\n\t\treturn this.offset === endOffset;\n\t}\n\n\t/**\n\t * Position's root, that is the root of the position's parent element.\n\t *\n\t * @readonly\n\t * @type {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment}\n\t */\n\tget root() {\n\t\treturn this.parent.root;\n\t}\n\n\t/**\n\t * {@link module:engine/view/editableelement~EditableElement EditableElement} instance that contains this position, or `null` if\n\t * position is not inside an editable element.\n\t *\n\t * @type {module:engine/view/editableelement~EditableElement|null}\n\t */\n\tget editableElement() {\n\t\tlet editable = this.parent;\n\n\t\twhile ( !( editable instanceof EditableElement ) ) {\n\t\t\tif ( editable.parent ) {\n\t\t\t\teditable = editable.parent;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\treturn editable;\n\t}\n\n\t/**\n\t * Returns a new instance of Position with offset incremented by `shift` value.\n\t *\n\t * @param {Number} shift How position offset should get changed. Accepts negative values.\n\t * @returns {module:engine/view/position~Position} Shifted position.\n\t */\n\tgetShiftedBy( shift ) {\n\t\tconst shifted = Position._createAt( this );\n\n\t\tconst offset = shifted.offset + shift;\n\t\tshifted.offset = offset < 0 ? 0 : offset;\n\n\t\treturn shifted;\n\t}\n\n\t/**\n\t * Gets the farthest position which matches the callback using\n\t * {@link module:engine/view/treewalker~TreeWalker TreeWalker}.\n\t *\n\t * For example:\n\t *\n\t * \t\tgetLastMatchingPosition( value => value.type == 'text' ); // <p>{}foo</p> -> <p>foo[]</p>\n\t * \t\tgetLastMatchingPosition( value => value.type == 'text', { direction: 'backward' } ); // <p>foo[]</p> -> <p>{}foo</p>\n\t * \t\tgetLastMatchingPosition( value => false ); // Do not move the position.\n\t *\n\t * @param {Function} skip Callback function. Gets {@link module:engine/view/treewalker~TreeWalkerValue} and should\n\t * return `true` if the value should be skipped or `false` if not.\n\t * @param {Object} options Object with configuration options. See {@link module:engine/view/treewalker~TreeWalker}.\n\t *\n\t * @returns {module:engine/view/position~Position} The position after the last item which matches the `skip` callback test.\n\t */\n\tgetLastMatchingPosition( skip, options = {} ) {\n\t\toptions.startPosition = this;\n\n\t\tconst treeWalker = new TreeWalker( options );\n\t\ttreeWalker.skip( skip );\n\n\t\treturn treeWalker.position;\n\t}\n\n\t/**\n\t * Returns ancestors array of this position, that is this position's parent and it's ancestors.\n\t *\n\t * @returns {Array} Array with ancestors.\n\t */\n\tgetAncestors() {\n\t\tif ( this.parent.is( 'documentFragment' ) ) {\n\t\t\treturn [ this.parent ];\n\t\t} else {\n\t\t\treturn this.parent.getAncestors( { includeSelf: true } );\n\t\t}\n\t}\n\n\t/**\n\t * Returns a {@link module:engine/view/node~Node} or {@link module:engine/view/documentfragment~DocumentFragment}\n\t * which is a common ancestor of both positions.\n\t *\n\t * @param {module:engine/view/position~Position} position\n\t * @returns {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment|null}\n\t */\n\tgetCommonAncestor( position ) {\n\t\tconst ancestorsA = this.getAncestors();\n\t\tconst ancestorsB = position.getAncestors();\n\n\t\tlet i = 0;\n\n\t\twhile ( ancestorsA[ i ] == ancestorsB[ i ] && ancestorsA[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i === 0 ? null : ancestorsA[ i - 1 ];\n\t}\n\n\t/**\n\t * Checks whether this object is of the given type.\n\t *\n\t *\t\tposition.is( 'position' ); // -> true\n\t *\t\tposition.is( 'view:position' ); // -> true\n\t *\n\t *\t\tposition.is( 'model:position' ); // -> false\n\t *\t\tposition.is( 'element' ); // -> false\n\t *\t\tposition.is( 'range' ); // -> false\n\t *\n\t * {@link module:engine/view/node~Node#is Check the entire list of view objects} which implement the `is()` method.\n\t *\n\t * @param {String} type\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === 'position' || type === 'view:position';\n\t}\n\n\t/**\n\t * Checks whether this position equals given position.\n\t *\n\t * @param {module:engine/view/position~Position} otherPosition Position to compare with.\n\t * @returns {Boolean} True if positions are same.\n\t */\n\tisEqual( otherPosition ) {\n\t\treturn ( this.parent == otherPosition.parent && this.offset == otherPosition.offset );\n\t}\n\n\t/**\n\t * Checks whether this position is located before given position. When method returns `false` it does not mean that\n\t * this position is after give one. Two positions may be located inside separate roots and in that situation this\n\t * method will still return `false`.\n\t *\n\t * @see module:engine/view/position~Position#isAfter\n\t * @see module:engine/view/position~Position#compareWith\n\t * @param {module:engine/view/position~Position} otherPosition Position to compare with.\n\t * @returns {Boolean} Returns `true` if this position is before given position.\n\t */\n\tisBefore( otherPosition ) {\n\t\treturn this.compareWith( otherPosition ) == 'before';\n\t}\n\n\t/**\n\t * Checks whether this position is located after given position. When method returns `false` it does not mean that\n\t * this position is before give one. Two positions may be located inside separate roots and in that situation this\n\t * method will still return `false`.\n\t *\n\t * @see module:engine/view/position~Position#isBefore\n\t * @see module:engine/view/position~Position#compareWith\n\t * @param {module:engine/view/position~Position} otherPosition Position to compare with.\n\t * @returns {Boolean} Returns `true` if this position is after given position.\n\t */\n\tisAfter( otherPosition ) {\n\t\treturn this.compareWith( otherPosition ) == 'after';\n\t}\n\n\t/**\n\t * Checks whether this position is before, after or in same position that other position. Two positions may be also\n\t * different when they are located in separate roots.\n\t *\n\t * @param {module:engine/view/position~Position} otherPosition Position to compare with.\n\t * @returns {module:engine/view/position~PositionRelation}\n\t */\n\tcompareWith( otherPosition ) {\n\t\tif ( this.root !== otherPosition.root ) {\n\t\t\treturn 'different';\n\t\t}\n\n\t\tif ( this.isEqual( otherPosition ) ) {\n\t\t\treturn 'same';\n\t\t}\n\n\t\t// Get path from root to position's parent element.\n\t\tconst thisPath = this.parent.is( 'node' ) ? this.parent.getPath() : [];\n\t\tconst otherPath = otherPosition.parent.is( 'node' ) ? otherPosition.parent.getPath() : [];\n\n\t\t// Add the positions' offsets to the parents offsets.\n\t\tthisPath.push( this.offset );\n\t\totherPath.push( otherPosition.offset );\n\n\t\t// Compare both path arrays to find common ancestor.\n\t\tconst result = compareArrays( thisPath, otherPath );\n\n\t\tswitch ( result ) {\n\t\t\tcase 'prefix':\n\t\t\t\treturn 'before';\n\n\t\t\tcase 'extension':\n\t\t\t\treturn 'after';\n\n\t\t\tdefault:\n\t\t\t\treturn thisPath[ result ] < otherPath[ result ] ? 'before' : 'after';\n\t\t}\n\t}\n\n\t/**\n\t * Creates a {@link module:engine/view/treewalker~TreeWalker TreeWalker} instance with this positions as a start position.\n\t *\n\t * @param {Object} options Object with configuration options. See {@link module:engine/view/treewalker~TreeWalker}\n\t * @param {module:engine/view/range~Range} [options.boundaries=null] Range to define boundaries of the iterator.\n\t * @param {Boolean} [options.singleCharacters=false]\n\t * @param {Boolean} [options.shallow=false]\n\t * @param {Boolean} [options.ignoreElementEnd=false]\n\t */\n\tgetWalker( options = {} ) {\n\t\toptions.startPosition = this;\n\n\t\treturn new TreeWalker( options );\n\t}\n\n\tclone() {\n\t\treturn new Position( this.parent, this.offset );\n\t}\n\n\t/**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/view/position~Position position},\n\t * * parent element and offset (offset defaults to `0`),\n\t * * parent element and `'end'` (sets position at the end of that element),\n\t * * {@link module:engine/view/item~Item view item} and `'before'` or `'after'` (sets position before or after given view item).\n\t *\n\t * This method is a shortcut to other constructors such as:\n\t *\n\t * * {@link module:engine/view/position~Position._createBefore},\n\t * * {@link module:engine/view/position~Position._createAfter}.\n\t *\n\t * @protected\n\t * @param {module:engine/view/item~Item|module:engine/view/position~Position} itemOrPosition\n\t * @param {Number|'end'|'before'|'after'} [offset] Offset or one of the flags. Used only when\n\t * first parameter is a {@link module:engine/view/item~Item view item}.\n\t */\n\tstatic _createAt( itemOrPosition, offset ) {\n\t\tif ( itemOrPosition instanceof Position ) {\n\t\t\treturn new this( itemOrPosition.parent, itemOrPosition.offset );\n\t\t} else {\n\t\t\tconst node = itemOrPosition;\n\n\t\t\tif ( offset == 'end' ) {\n\t\t\t\toffset = node.is( '$text' ) ? node.data.length : node.childCount;\n\t\t\t} else if ( offset == 'before' ) {\n\t\t\t\treturn this._createBefore( node );\n\t\t\t} else if ( offset == 'after' ) {\n\t\t\t\treturn this._createAfter( node );\n\t\t\t} else if ( offset !== 0 && !offset ) {\n\t\t\t\t/**\n\t\t\t\t * {@link module:engine/view/view~View#createPositionAt `View#createPositionAt()`}\n\t\t\t\t * requires the offset to be specified when the first parameter is a view item.\n\t\t\t\t *\n\t\t\t\t * @error view-createpositionat-offset-required\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'view-createpositionat-offset-required', node );\n\t\t\t}\n\n\t\t\treturn new Position( node, offset );\n\t\t}\n\t}\n\n\t/**\n\t * Creates a new position after given view item.\n\t *\n\t * @protected\n\t * @param {module:engine/view/item~Item} item View item after which the position should be located.\n\t * @returns {module:engine/view/position~Position}\n\t */\n\tstatic _createAfter( item ) {\n\t\t// TextProxy is not a instance of Node so we need do handle it in specific way.\n\t\tif ( item.is( '$textProxy' ) ) {\n\t\t\treturn new Position( item.textNode, item.offsetInText + item.data.length );\n\t\t}\n\n\t\tif ( !item.parent ) {\n\t\t\t/**\n\t\t\t * You can not make a position after a root.\n\t\t\t *\n\t\t\t * @error view-position-after-root\n\t\t\t * @param {module:engine/view/node~Node} root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-position-after-root', item, { root: item } );\n\t\t}\n\n\t\treturn new Position( item.parent, item.index + 1 );\n\t}\n\n\t/**\n\t * Creates a new position before given view item.\n\t *\n\t * @protected\n\t * @param {module:engine/view/item~Item} item View item before which the position should be located.\n\t * @returns {module:engine/view/position~Position}\n\t */\n\tstatic _createBefore( item ) {\n\t\t// TextProxy is not a instance of Node so we need do handle it in specific way.\n\t\tif ( item.is( '$textProxy' ) ) {\n\t\t\treturn new Position( item.textNode, item.offsetInText );\n\t\t}\n\n\t\tif ( !item.parent ) {\n\t\t\t/**\n\t\t\t * You cannot make a position before a root.\n\t\t\t *\n\t\t\t * @error view-position-before-root\n\t\t\t * @param {module:engine/view/node~Node} root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-position-before-root', item, { root: item } );\n\t\t}\n\n\t\treturn new Position( item.parent, item.index );\n\t}\n}\n\n/**\n * A flag indicating whether this position is `'before'` or `'after'` or `'same'` as given position.\n * If positions are in different roots `'different'` flag is returned.\n *\n * @typedef {String} module:engine/view/position~PositionRelation\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/range\n */\n\nimport Position from './position';\nimport TreeWalker from './treewalker';\n\n/**\n * Range in the view tree. A range is represented by its start and end {@link module:engine/view/position~Position positions}.\n *\n * In order to create a new position instance use the `createPosition*()` factory methods available in:\n *\n * * {@link module:engine/view/view~View}\n * * {@link module:engine/view/downcastwriter~DowncastWriter}\n * * {@link module:engine/view/upcastwriter~UpcastWriter}\n */\nexport default class Range {\n\t/**\n\t * Creates a range spanning from `start` position to `end` position.\n\t *\n\t * **Note:** Constructor creates it's own {@link module:engine/view/position~Position} instances basing on passed values.\n\t *\n\t * @param {module:engine/view/position~Position} start Start position.\n\t * @param {module:engine/view/position~Position} [end] End position. If not set, range will be collapsed at the `start` position.\n\t */\n\tconstructor( start, end = null ) {\n\t\t/**\n\t\t * Start position.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/position~Position}\n\t\t */\n\t\tthis.start = start.clone();\n\n\t\t/**\n\t\t * End position.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/position~Position}\n\t\t */\n\t\tthis.end = end ? end.clone() : start.clone();\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * Iterates over all {@link module:engine/view/item~Item view items} that are in this range and returns\n\t * them together with additional information like length or {@link module:engine/view/position~Position positions},\n\t * grouped as {@link module:engine/view/treewalker~TreeWalkerValue}.\n\t *\n\t * This iterator uses {@link module:engine/view/treewalker~TreeWalker TreeWalker} with `boundaries` set to this range and\n\t * `ignoreElementEnd` option\n\t * set to `true`.\n\t *\n\t * @returns {Iterable.<module:engine/view/treewalker~TreeWalkerValue>}\n\t */\n\t* [ Symbol.iterator ]() {\n\t\tyield* new TreeWalker( { boundaries: this, ignoreElementEnd: true } );\n\t}\n\n\t/**\n\t * Returns whether the range is collapsed, that is it start and end positions are equal.\n\t *\n\t * @type {Boolean}\n\t */\n\tget isCollapsed() {\n\t\treturn this.start.isEqual( this.end );\n\t}\n\n\t/**\n\t * Returns whether this range is flat, that is if {@link module:engine/view/range~Range#start start} position and\n\t * {@link module:engine/view/range~Range#end end} position are in the same {@link module:engine/view/position~Position#parent parent}.\n\t *\n\t * @type {Boolean}\n\t */\n\tget isFlat() {\n\t\treturn this.start.parent === this.end.parent;\n\t}\n\n\t/**\n\t * Range root element.\n\t *\n\t * @type {module:engine/view/element~Element|module:engine/view/documentfragment~DocumentFragment}\n\t */\n\tget root() {\n\t\treturn this.start.root;\n\t}\n\n\t/**\n\t * Creates a maximal range that has the same content as this range but is expanded in both ways (at the beginning\n\t * and at the end).\n\t *\n\t * For example:\n\t *\n\t *\t\t<p>Foo</p><p><b>{Bar}</b></p> -> <p>Foo</p>[<p><b>Bar</b>]</p>\n\t *\t\t<p><b>foo</b>{bar}<span></span></p> -> <p><b>foo[</b>bar<span></span>]</p>\n\t *\n\t * Note that in the sample above:\n\t *\n\t * - `<p>` have type of {@link module:engine/view/containerelement~ContainerElement},\n\t * - `<b>` have type of {@link module:engine/view/attributeelement~AttributeElement},\n\t * - `<span>` have type of {@link module:engine/view/uielement~UIElement}.\n\t *\n\t * @returns {module:engine/view/range~Range} Enlarged range.\n\t */\n\tgetEnlarged() {\n\t\tlet start = this.start.getLastMatchingPosition( enlargeTrimSkip, { direction: 'backward' } );\n\t\tlet end = this.end.getLastMatchingPosition( enlargeTrimSkip );\n\n\t\t// Fix positions, in case if they are in Text node.\n\t\tif ( start.parent.is( '$text' ) && start.isAtStart ) {\n\t\t\tstart = Position._createBefore( start.parent );\n\t\t}\n\n\t\tif ( end.parent.is( '$text' ) && end.isAtEnd ) {\n\t\t\tend = Position._createAfter( end.parent );\n\t\t}\n\n\t\treturn new Range( start, end );\n\t}\n\n\t/**\n\t * Creates a minimum range that has the same content as this range but is trimmed in both ways (at the beginning\n\t * and at the end).\n\t *\n\t * For example:\n\t *\n\t *\t\t<p>Foo</p>[<p><b>Bar</b>]</p> -> <p>Foo</p><p><b>{Bar}</b></p>\n\t *\t\t<p><b>foo[</b>bar<span></span>]</p> -> <p><b>foo</b>{bar}<span></span></p>\n\t *\n\t * Note that in the sample above:\n\t *\n\t * - `<p>` have type of {@link module:engine/view/containerelement~ContainerElement},\n\t * - `<b>` have type of {@link module:engine/view/attributeelement~AttributeElement},\n\t * - `<span>` have type of {@link module:engine/view/uielement~UIElement}.\n\t *\n\t * @returns {module:engine/view/range~Range} Shrink range.\n\t */\n\tgetTrimmed() {\n\t\tlet start = this.start.getLastMatchingPosition( enlargeTrimSkip );\n\n\t\tif ( start.isAfter( this.end ) || start.isEqual( this.end ) ) {\n\t\t\treturn new Range( start, start );\n\t\t}\n\n\t\tlet end = this.end.getLastMatchingPosition( enlargeTrimSkip, { direction: 'backward' } );\n\t\tconst nodeAfterStart = start.nodeAfter;\n\t\tconst nodeBeforeEnd = end.nodeBefore;\n\n\t\t// Because TreeWalker prefers positions next to text node, we need to move them manually into these text nodes.\n\t\tif ( nodeAfterStart && nodeAfterStart.is( '$text' ) ) {\n\t\t\tstart = new Position( nodeAfterStart, 0 );\n\t\t}\n\n\t\tif ( nodeBeforeEnd && nodeBeforeEnd.is( '$text' ) ) {\n\t\t\tend = new Position( nodeBeforeEnd, nodeBeforeEnd.data.length );\n\t\t}\n\n\t\treturn new Range( start, end );\n\t}\n\n\t/**\n\t * Two ranges are equal if their start and end positions are equal.\n\t *\n\t * @param {module:engine/view/range~Range} otherRange Range to compare with.\n\t * @returns {Boolean} `true` if ranges are equal, `false` otherwise\n\t */\n\tisEqual( otherRange ) {\n\t\treturn this == otherRange || ( this.start.isEqual( otherRange.start ) && this.end.isEqual( otherRange.end ) );\n\t}\n\n\t/**\n\t * Checks whether this range contains given {@link module:engine/view/position~Position position}.\n\t *\n\t * @param {module:engine/view/position~Position} position Position to check.\n\t * @returns {Boolean} `true` if given {@link module:engine/view/position~Position position} is contained in this range,\n\t * `false` otherwise.\n\t */\n\tcontainsPosition( position ) {\n\t\treturn position.isAfter( this.start ) && position.isBefore( this.end );\n\t}\n\n\t/**\n\t * Checks whether this range contains given {@link module:engine/view/range~Range range}.\n\t *\n\t * @param {module:engine/view/range~Range} otherRange Range to check.\n\t * @param {Boolean} [loose=false] Whether the check is loose or strict. If the check is strict (`false`), compared range cannot\n\t * start or end at the same position as this range boundaries. If the check is loose (`true`), compared range can start, end or\n\t * even be equal to this range. Note that collapsed ranges are always compared in strict mode.\n\t * @returns {Boolean} `true` if given {@link module:engine/view/range~Range range} boundaries are contained by this range, `false`\n\t * otherwise.\n\t */\n\tcontainsRange( otherRange, loose = false ) {\n\t\tif ( otherRange.isCollapsed ) {\n\t\t\tloose = false;\n\t\t}\n\n\t\tconst containsStart = this.containsPosition( otherRange.start ) || ( loose && this.start.isEqual( otherRange.start ) );\n\t\tconst containsEnd = this.containsPosition( otherRange.end ) || ( loose && this.end.isEqual( otherRange.end ) );\n\n\t\treturn containsStart && containsEnd;\n\t}\n\n\t/**\n\t * Computes which part(s) of this {@link module:engine/view/range~Range range} is not a part of given\n\t * {@link module:engine/view/range~Range range}.\n\t * Returned array contains zero, one or two {@link module:engine/view/range~Range ranges}.\n\t *\n\t * Examples:\n\t *\n\t *\t\tlet foo = downcastWriter.createText( 'foo' );\n\t *\t\tlet img = downcastWriter.createContainerElement( 'img' );\n\t *\t\tlet bar = downcastWriter.createText( 'bar' );\n\t *\t\tlet p = downcastWriter.createContainerElement( 'p', null, [ foo, img, bar ] );\n\t *\n\t *\t\tlet range = view.createRange( view.createPositionAt( foo, 2 ), view.createPositionAt( bar, 1 ); // \"o\", img, \"b\" are in range.\n\t *\t\tlet otherRange = view.createRange( // \"oo\", img, \"ba\" are in range.\n\t *\t\t\tview.createPositionAt( foo, 1 ),\n\t *\t\t\tview.createPositionAt( bar, 2 )\n\t *\t\t);\n\t *\t\tlet transformed = range.getDifference( otherRange );\n\t *\t\t// transformed array has no ranges because `otherRange` contains `range`\n\t *\n\t *\t\totherRange = view.createRange( view.createPositionAt( foo, 1 ), view.createPositionAt( p, 2 ); // \"oo\", img are in range.\n\t *\t\ttransformed = range.getDifference( otherRange );\n\t *\t\t// transformed array has one range: from ( p, 2 ) to ( bar, 1 )\n\t *\n\t *\t\totherRange = view.createRange( view.createPositionAt( p, 1 ), view.createPositionAt( p, 2 ) ); // img is in range.\n\t *\t\ttransformed = range.getDifference( otherRange );\n\t *\t\t// transformed array has two ranges: from ( foo, 1 ) to ( p, 1 ) and from ( p, 2 ) to ( bar, 1 )\n\t *\n\t * @param {module:engine/view/range~Range} otherRange Range to differentiate against.\n\t * @returns {Array.<module:engine/view/range~Range>} The difference between ranges.\n\t */\n\tgetDifference( otherRange ) {\n\t\tconst ranges = [];\n\n\t\tif ( this.isIntersecting( otherRange ) ) {\n\t\t\t// Ranges intersect.\n\n\t\t\tif ( this.containsPosition( otherRange.start ) ) {\n\t\t\t\t// Given range start is inside this range. This means that we have to\n\t\t\t\t// add shrunken range - from the start to the middle of this range.\n\t\t\t\tranges.push( new Range( this.start, otherRange.start ) );\n\t\t\t}\n\n\t\t\tif ( this.containsPosition( otherRange.end ) ) {\n\t\t\t\t// Given range end is inside this range. This means that we have to\n\t\t\t\t// add shrunken range - from the middle of this range to the end.\n\t\t\t\tranges.push( new Range( otherRange.end, this.end ) );\n\t\t\t}\n\t\t} else {\n\t\t\t// Ranges do not intersect, return the original range.\n\t\t\tranges.push( this.clone() );\n\t\t}\n\n\t\treturn ranges;\n\t}\n\n\t/**\n\t * Returns an intersection of this {@link module:engine/view/range~Range range} and given {@link module:engine/view/range~Range range}.\n\t * Intersection is a common part of both of those ranges. If ranges has no common part, returns `null`.\n\t *\n\t * Examples:\n\t *\n\t *\t\tlet foo = downcastWriter.createText( 'foo' );\n\t *\t\tlet img = downcastWriter.createContainerElement( 'img' );\n\t *\t\tlet bar = downcastWriter.createText( 'bar' );\n\t *\t\tlet p = downcastWriter.createContainerElement( 'p', null, [ foo, img, bar ] );\n\t *\n\t *\t\tlet range = view.createRange( view.createPositionAt( foo, 2 ), view.createPositionAt( bar, 1 ); // \"o\", img, \"b\" are in range.\n\t *\t\tlet otherRange = view.createRange( view.createPositionAt( foo, 1 ), view.createPositionAt( p, 2 ); // \"oo\", img are in range.\n\t *\t\tlet transformed = range.getIntersection( otherRange ); // range from ( foo, 1 ) to ( p, 2 ).\n\t *\n\t *\t\totherRange = view.createRange( view.createPositionAt( bar, 1 ), view.createPositionAt( bar, 3 ); \"ar\" is in range.\n\t *\t\ttransformed = range.getIntersection( otherRange ); // null - no common part.\n\t *\n\t * @param {module:engine/view/range~Range} otherRange Range to check for intersection.\n\t * @returns {module:engine/view/range~Range|null} A common part of given ranges or `null` if ranges have no common part.\n\t */\n\tgetIntersection( otherRange ) {\n\t\tif ( this.isIntersecting( otherRange ) ) {\n\t\t\t// Ranges intersect, so a common range will be returned.\n\t\t\t// At most, it will be same as this range.\n\t\t\tlet commonRangeStart = this.start;\n\t\t\tlet commonRangeEnd = this.end;\n\n\t\t\tif ( this.containsPosition( otherRange.start ) ) {\n\t\t\t\t// Given range start is inside this range. This means thaNt we have to\n\t\t\t\t// shrink common range to the given range start.\n\t\t\t\tcommonRangeStart = otherRange.start;\n\t\t\t}\n\n\t\t\tif ( this.containsPosition( otherRange.end ) ) {\n\t\t\t\t// Given range end is inside this range. This means that we have to\n\t\t\t\t// shrink common range to the given range end.\n\t\t\t\tcommonRangeEnd = otherRange.end;\n\t\t\t}\n\n\t\t\treturn new Range( commonRangeStart, commonRangeEnd );\n\t\t}\n\n\t\t// Ranges do not intersect, so they do not have common part.\n\t\treturn null;\n\t}\n\n\t/**\n\t * Creates a {@link module:engine/view/treewalker~TreeWalker TreeWalker} instance with this range as a boundary.\n\t *\n\t * @param {Object} options Object with configuration options. See {@link module:engine/view/treewalker~TreeWalker}.\n\t * @param {module:engine/view/position~Position} [options.startPosition]\n\t * @param {Boolean} [options.singleCharacters=false]\n\t * @param {Boolean} [options.shallow=false]\n\t * @param {Boolean} [options.ignoreElementEnd=false]\n\t * @returns {module:engine/view/treewalker~TreeWalker}\n\t */\n\tgetWalker( options = {} ) {\n\t\toptions.boundaries = this;\n\n\t\treturn new TreeWalker( options );\n\t}\n\n\t/**\n\t * Returns a {@link module:engine/view/node~Node} or {@link module:engine/view/documentfragment~DocumentFragment}\n\t * which is a common ancestor of range's both ends (in which the entire range is contained).\n\t *\n\t * @returns {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment|null}\n\t */\n\tgetCommonAncestor() {\n\t\treturn this.start.getCommonAncestor( this.end );\n\t}\n\n\t/**\n\t * Returns an {@link module:engine/view/element~Element Element} contained by the range.\n\t * The element will be returned when it is the **only** node within the range and **fully–contained**\n\t * at the same time.\n\t *\n\t * @returns {module:engine/view/element~Element|null}\n\t */\n\tgetContainedElement() {\n\t\tif ( this.isCollapsed ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet nodeAfterStart = this.start.nodeAfter;\n\t\tlet nodeBeforeEnd = this.end.nodeBefore;\n\n\t\t// Handle the situation when the range position is at the beginning / at the end of a text node.\n\t\t// In such situation `.nodeAfter` and `.nodeBefore` are `null` but the range still might be spanning\n\t\t// over one element.\n\t\t//\n\t\t// <p>Foo{<span class=\"widget\"></span>}bar</p> vs <p>Foo[<span class=\"widget\"></span>]bar</p>\n\t\t//\n\t\t// These are basically the same range, only the difference is if the range position is at\n\t\t// at the end/at the beginning of a text node or just before/just after the text node.\n\t\t//\n\t\tif ( this.start.parent.is( '$text' ) && this.start.isAtEnd && this.start.parent.nextSibling ) {\n\t\t\tnodeAfterStart = this.start.parent.nextSibling;\n\t\t}\n\n\t\tif ( this.end.parent.is( '$text' ) && this.end.isAtStart && this.end.parent.previousSibling ) {\n\t\t\tnodeBeforeEnd = this.end.parent.previousSibling;\n\t\t}\n\n\t\tif ( nodeAfterStart && nodeAfterStart.is( 'element' ) && nodeAfterStart === nodeBeforeEnd ) {\n\t\t\treturn nodeAfterStart;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Clones this range.\n\t *\n\t * @returns {module:engine/view/range~Range}\n\t */\n\tclone() {\n\t\treturn new Range( this.start, this.end );\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all {@link module:engine/view/item~Item view items} that are in this range and returns\n\t * them.\n\t *\n\t * This method uses {@link module:engine/view/treewalker~TreeWalker} with `boundaries` set to this range and `ignoreElementEnd` option\n\t * set to `true`. However it returns only {@link module:engine/view/item~Item items},\n\t * not {@link module:engine/view/treewalker~TreeWalkerValue}.\n\t *\n\t * You may specify additional options for the tree walker. See {@link module:engine/view/treewalker~TreeWalker} for\n\t * a full list of available options.\n\t *\n\t * @param {Object} options Object with configuration options. See {@link module:engine/view/treewalker~TreeWalker}.\n\t * @returns {Iterable.<module:engine/view/item~Item>}\n\t */\n\t* getItems( options = {} ) {\n\t\toptions.boundaries = this;\n\t\toptions.ignoreElementEnd = true;\n\n\t\tconst treeWalker = new TreeWalker( options );\n\n\t\tfor ( const value of treeWalker ) {\n\t\t\tyield value.item;\n\t\t}\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all {@link module:engine/view/position~Position positions} that are boundaries or\n\t * contained in this range.\n\t *\n\t * This method uses {@link module:engine/view/treewalker~TreeWalker} with `boundaries` set to this range. However it returns only\n\t * {@link module:engine/view/position~Position positions}, not {@link module:engine/view/treewalker~TreeWalkerValue}.\n\t *\n\t * You may specify additional options for the tree walker. See {@link module:engine/view/treewalker~TreeWalker} for\n\t * a full list of available options.\n\t *\n\t * @param {Object} options Object with configuration options. See {@link module:engine/view/treewalker~TreeWalker}.\n\t * @returns {Iterable.<module:engine/view/position~Position>}\n\t */\n\t* getPositions( options = {} ) {\n\t\toptions.boundaries = this;\n\n\t\tconst treeWalker = new TreeWalker( options );\n\n\t\tyield treeWalker.position;\n\n\t\tfor ( const value of treeWalker ) {\n\t\t\tyield value.nextPosition;\n\t\t}\n\t}\n\n\t/**\n\t * Checks whether this object is of the given type.\n\t *\n\t *\t\trange.is( 'range' ); // -> true\n\t *\t\trange.is( 'view:range' ); // -> true\n\t *\n\t *\t\trange.is( 'model:range' ); // -> false\n\t *\t\trange.is( 'element' ); // -> false\n\t *\t\trange.is( 'selection' ); // -> false\n\t *\n\t * {@link module:engine/view/node~Node#is Check the entire list of view objects} which implement the `is()` method.\n\t *\n\t * @param {String} type\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === 'range' || type === 'view:range';\n\t}\n\n\t/**\n\t * Checks and returns whether this range intersects with the given range.\n\t *\n\t * @param {module:engine/view/range~Range} otherRange Range to compare with.\n\t * @returns {Boolean} True if ranges intersect.\n\t */\n\tisIntersecting( otherRange ) {\n\t\treturn this.start.isBefore( otherRange.end ) && this.end.isAfter( otherRange.start );\n\t}\n\n\t/**\n\t * Creates a range from the given parents and offsets.\n\t *\n\t * @protected\n\t * @param {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment} startElement Start position\n\t * parent element.\n\t * @param {Number} startOffset Start position offset.\n\t * @param {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment} endElement End position\n\t * parent element.\n\t * @param {Number} endOffset End position offset.\n\t * @returns {module:engine/view/range~Range} Created range.\n\t */\n\tstatic _createFromParentsAndOffsets( startElement, startOffset, endElement, endOffset ) {\n\t\treturn new this(\n\t\t\tnew Position( startElement, startOffset ),\n\t\t\tnew Position( endElement, endOffset )\n\t\t);\n\t}\n\n\t/**\n\t * Creates a new range, spreading from specified {@link module:engine/view/position~Position position} to a position moved by\n\t * given `shift`. If `shift` is a negative value, shifted position is treated as the beginning of the range.\n\t *\n\t * @protected\n\t * @param {module:engine/view/position~Position} position Beginning of the range.\n\t * @param {Number} shift How long the range should be.\n\t * @returns {module:engine/view/range~Range}\n\t */\n\tstatic _createFromPositionAndShift( position, shift ) {\n\t\tconst start = position;\n\t\tconst end = position.getShiftedBy( shift );\n\n\t\treturn shift > 0 ? new this( start, end ) : new this( end, start );\n\t}\n\n\t/**\n\t * Creates a range inside an {@link module:engine/view/element~Element element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * @protected\n\t * @param {module:engine/view/element~Element} element Element which is a parent for the range.\n\t * @returns {module:engine/view/range~Range}\n\t */\n\tstatic _createIn( element ) {\n\t\treturn this._createFromParentsAndOffsets( element, 0, element, element.childCount );\n\t}\n\n\t/**\n\t * Creates a range that starts before given {@link module:engine/view/item~Item view item} and ends after it.\n\t *\n\t * @protected\n\t * @param {module:engine/view/item~Item} item\n\t * @returns {module:engine/view/range~Range}\n\t */\n\tstatic _createOn( item ) {\n\t\tconst size = item.is( '$textProxy' ) ? item.offsetSize : 1;\n\n\t\treturn this._createFromPositionAndShift( Position._createBefore( item ), size );\n\t}\n}\n\n// Function used by getEnlarged and getTrimmed methods.\nfunction enlargeTrimSkip( value ) {\n\tif ( value.item.is( 'attributeElement' ) || value.item.is( 'uiElement' ) ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/count\n */\n\n/**\n * Returns the number of items return by the iterator.\n *\n *\t\tcount( [ 1, 2, 3, 4, 5 ] ); // 5;\n *\n * @param {Iterable.<*>} iterator Any iterator.\n * @returns {Number} Number of items returned by that iterator.\n */\nexport default function count( iterator ) {\n\tlet count = 0;\n\n\tfor ( const _ of iterator ) { // eslint-disable-line no-unused-vars\n\t\tcount++;\n\t}\n\n\treturn count;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/selection\n */\n\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport Range from './range';\nimport Position from './position';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\nimport EmitterMixin from '@ckeditor/ckeditor5-utils/src/emittermixin';\nimport Node from './node';\nimport count from '@ckeditor/ckeditor5-utils/src/count';\nimport isIterable from '@ckeditor/ckeditor5-utils/src/isiterable';\nimport DocumentSelection from './documentselection';\n\n/**\n * Class representing an arbirtary selection in the view.\n * See also {@link module:engine/view/documentselection~DocumentSelection}.\n *\n * New selection instances can be created via the constructor or one these methods:\n *\n * * {@link module:engine/view/view~View#createSelection `View#createSelection()`},\n * * {@link module:engine/view/upcastwriter~UpcastWriter#createSelection `UpcastWriter#createSelection()`}.\n *\n * A selection can consist of {@link module:engine/view/range~Range ranges} that can be set by using\n * the {@link module:engine/view/selection~Selection#setTo `Selection#setTo()`} method.\n */\nexport default class Selection {\n\t/**\n\t * Creates new selection instance.\n\t *\n\t * **Note**: The selection constructor is available as a factory method:\n\t *\n\t * * {@link module:engine/view/view~View#createSelection `View#createSelection()`},\n\t * * {@link module:engine/view/upcastwriter~UpcastWriter#createSelection `UpcastWriter#createSelection()`}.\n\t *\n\t * \t\t// Creates empty selection without ranges.\n\t *\t\tconst selection = writer.createSelection();\n\t *\n\t *\t\t// Creates selection at the given range.\n\t *\t\tconst range = writer.createRange( start, end );\n\t *\t\tconst selection = writer.createSelection( range );\n\t *\n\t *\t\t// Creates selection at the given ranges\n\t * \t\tconst ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t *\t\tconst selection = writer.createSelection( ranges );\n\t *\n\t *\t\t// Creates selection from the other selection.\n\t *\t\tconst otherSelection = writer.createSelection();\n\t *\t\tconst selection = writer.createSelection( otherSelection );\n\t *\n\t *\t\t// Creates selection from the document selection.\n\t *\t\tconst selection = writer.createSelection( editor.editing.view.document.selection );\n\t *\n\t * \t\t// Creates selection at the given position.\n\t *\t\tconst position = writer.createPositionFromPath( root, path );\n\t *\t\tconst selection = writer.createSelection( position );\n\t *\n\t *\t\t// Creates collapsed selection at the position of given item and offset.\n\t *\t\tconst paragraph = writer.createContainerElement( 'paragraph' );\n\t *\t\tconst selection = writer.createSelection( paragraph, offset );\n\t *\n\t *\t\t// Creates a range inside an {@link module:engine/view/element~Element element} which starts before the\n\t *\t\t// first child of that element and ends after the last child of that element.\n\t *\t\tconst selection = writer.createSelection( paragraph, 'in' );\n\t *\n\t *\t\t// Creates a range on an {@link module:engine/view/item~Item item} which starts before the item and ends\n\t *\t\t// just after the item.\n\t *\t\tconst selection = writer.createSelection( paragraph, 'on' );\n\t *\n\t * `Selection`'s constructor allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t *\t\t// Creates backward selection.\n\t *\t\tconst selection = writer.createSelection( range, { backward: true } );\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be properly handled by screen readers).\n\t *\n\t *\t\t// Creates fake selection with label.\n\t *\t\tconst selection = writer.createSelection( range, { fake: true, label: 'foo' } );\n\t *\n\t * @param {module:engine/view/selection~Selectable} [selectable=null]\n\t * @param {Number|'before'|'end'|'after'|'on'|'in'} [placeOrOffset] Offset or place when selectable is an `Item`.\n\t * @param {Object} [options]\n\t * @param {Boolean} [options.backward] Sets this selection instance to be backward.\n\t * @param {Boolean} [options.fake] Sets this selection instance to be marked as `fake`.\n\t * @param {String} [options.label] Label for the fake selection.\n\t */\n\tconstructor( selectable = null, placeOrOffset, options ) {\n\t\t/**\n\t\t * Stores all ranges that are selected.\n\t\t *\n\t\t * @protected\n\t\t * @member {Array.<module:engine/view/range~Range>}\n\t\t */\n\t\tthis._ranges = [];\n\n\t\t/**\n\t\t * Specifies whether the last added range was added as a backward or forward range.\n\t\t *\n\t\t * @protected\n\t\t * @member {Boolean}\n\t\t */\n\t\tthis._lastRangeBackward = false;\n\n\t\t/**\n\t\t * Specifies whether selection instance is fake.\n\t\t *\n\t\t * @private\n\t\t * @member {Boolean}\n\t\t */\n\t\tthis._isFake = false;\n\n\t\t/**\n\t\t * Fake selection's label.\n\t\t *\n\t\t * @private\n\t\t * @member {String}\n\t\t */\n\t\tthis._fakeSelectionLabel = '';\n\n\t\tthis.setTo( selectable, placeOrOffset, options );\n\t}\n\n\t/**\n\t * Returns true if selection instance is marked as `fake`.\n\t *\n\t * @see #setTo\n\t * @type {Boolean}\n\t */\n\tget isFake() {\n\t\treturn this._isFake;\n\t}\n\n\t/**\n\t * Returns fake selection label.\n\t *\n\t * @see #setTo\n\t * @type {String}\n\t */\n\tget fakeSelectionLabel() {\n\t\treturn this._fakeSelectionLabel;\n\t}\n\n\t/**\n\t * Selection anchor. Anchor may be described as a position where the selection starts. Together with\n\t * {@link #focus focus} they define the direction of selection, which is important\n\t * when expanding/shrinking selection. Anchor is always the start or end of the most recent added range.\n\t * It may be a bit unintuitive when there are multiple ranges in selection.\n\t *\n\t * @see #focus\n\t * @type {module:engine/view/position~Position}\n\t */\n\tget anchor() {\n\t\tif ( !this._ranges.length ) {\n\t\t\treturn null;\n\t\t}\n\t\tconst range = this._ranges[ this._ranges.length - 1 ];\n\t\tconst anchor = this._lastRangeBackward ? range.end : range.start;\n\n\t\treturn anchor.clone();\n\t}\n\n\t/**\n\t * Selection focus. Focus is a position where the selection ends.\n\t *\n\t * @see #anchor\n\t * @type {module:engine/view/position~Position}\n\t */\n\tget focus() {\n\t\tif ( !this._ranges.length ) {\n\t\t\treturn null;\n\t\t}\n\t\tconst range = this._ranges[ this._ranges.length - 1 ];\n\t\tconst focus = this._lastRangeBackward ? range.start : range.end;\n\n\t\treturn focus.clone();\n\t}\n\n\t/**\n\t * Returns whether the selection is collapsed. Selection is collapsed when there is exactly one range which is\n\t * collapsed.\n\t *\n\t * @type {Boolean}\n\t */\n\tget isCollapsed() {\n\t\treturn this.rangeCount === 1 && this._ranges[ 0 ].isCollapsed;\n\t}\n\n\t/**\n\t * Returns number of ranges in selection.\n\t *\n\t * @type {Number}\n\t */\n\tget rangeCount() {\n\t\treturn this._ranges.length;\n\t}\n\n\t/**\n\t * Specifies whether the {@link #focus} precedes {@link #anchor}.\n\t *\n\t * @type {Boolean}\n\t */\n\tget isBackward() {\n\t\treturn !this.isCollapsed && this._lastRangeBackward;\n\t}\n\n\t/**\n\t * {@link module:engine/view/editableelement~EditableElement EditableElement} instance that contains this selection, or `null`\n\t * if the selection is not inside an editable element.\n\t *\n\t * @type {module:engine/view/editableelement~EditableElement|null}\n\t */\n\tget editableElement() {\n\t\tif ( this.anchor ) {\n\t\t\treturn this.anchor.editableElement;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns an iterable that contains copies of all ranges added to the selection.\n\t *\n\t * @returns {Iterable.<module:engine/view/range~Range>}\n\t */\n\t* getRanges() {\n\t\tfor ( const range of this._ranges ) {\n\t\t\tyield range.clone();\n\t\t}\n\t}\n\n\t/**\n\t * Returns copy of the first range in the selection. First range is the one which\n\t * {@link module:engine/view/range~Range#start start} position {@link module:engine/view/position~Position#isBefore is before} start\n\t * position of all other ranges (not to confuse with the first range added to the selection).\n\t * Returns `null` if no ranges are added to selection.\n\t *\n\t * @returns {module:engine/view/range~Range|null}\n\t */\n\tgetFirstRange() {\n\t\tlet first = null;\n\n\t\tfor ( const range of this._ranges ) {\n\t\t\tif ( !first || range.start.isBefore( first.start ) ) {\n\t\t\t\tfirst = range;\n\t\t\t}\n\t\t}\n\n\t\treturn first ? first.clone() : null;\n\t}\n\n\t/**\n\t * Returns copy of the last range in the selection. Last range is the one which {@link module:engine/view/range~Range#end end}\n\t * position {@link module:engine/view/position~Position#isAfter is after} end position of all other ranges (not to confuse\n\t * with the last range added to the selection). Returns `null` if no ranges are added to selection.\n\t *\n\t * @returns {module:engine/view/range~Range|null}\n\t */\n\tgetLastRange() {\n\t\tlet last = null;\n\n\t\tfor ( const range of this._ranges ) {\n\t\t\tif ( !last || range.end.isAfter( last.end ) ) {\n\t\t\t\tlast = range;\n\t\t\t}\n\t\t}\n\n\t\treturn last ? last.clone() : null;\n\t}\n\n\t/**\n\t * Returns copy of the first position in the selection. First position is the position that\n\t * {@link module:engine/view/position~Position#isBefore is before} any other position in the selection ranges.\n\t * Returns `null` if no ranges are added to selection.\n\t *\n\t * @returns {module:engine/view/position~Position|null}\n\t */\n\tgetFirstPosition() {\n\t\tconst firstRange = this.getFirstRange();\n\n\t\treturn firstRange ? firstRange.start.clone() : null;\n\t}\n\n\t/**\n\t * Returns copy of the last position in the selection. Last position is the position that\n\t * {@link module:engine/view/position~Position#isAfter is after} any other position in the selection ranges.\n\t * Returns `null` if no ranges are added to selection.\n\t *\n\t * @returns {module:engine/view/position~Position|null}\n\t */\n\tgetLastPosition() {\n\t\tconst lastRange = this.getLastRange();\n\n\t\treturn lastRange ? lastRange.end.clone() : null;\n\t}\n\n\t/**\n\t * Checks whether, this selection is equal to given selection. Selections are equal if they have same directions,\n\t * same number of ranges and all ranges from one selection equal to a range from other selection.\n\t *\n\t * @param {module:engine/view/selection~Selection|module:engine/view/documentselection~DocumentSelection} otherSelection\n\t * Selection to compare with.\n\t * @returns {Boolean} `true` if selections are equal, `false` otherwise.\n\t */\n\tisEqual( otherSelection ) {\n\t\tif ( this.isFake != otherSelection.isFake ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this.isFake && this.fakeSelectionLabel != otherSelection.fakeSelectionLabel ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this.rangeCount != otherSelection.rangeCount ) {\n\t\t\treturn false;\n\t\t} else if ( this.rangeCount === 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( !this.anchor.isEqual( otherSelection.anchor ) || !this.focus.isEqual( otherSelection.focus ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor ( const thisRange of this._ranges ) {\n\t\t\tlet found = false;\n\n\t\t\tfor ( const otherRange of otherSelection._ranges ) {\n\t\t\t\tif ( thisRange.isEqual( otherRange ) ) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !found ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks whether this selection is similar to given selection. Selections are similar if they have same directions, same\n\t * number of ranges, and all {@link module:engine/view/range~Range#getTrimmed trimmed} ranges from one selection are\n\t * equal to any trimmed range from other selection.\n\t *\n\t * @param {module:engine/view/selection~Selection|module:engine/view/documentselection~DocumentSelection} otherSelection\n\t * Selection to compare with.\n\t * @returns {Boolean} `true` if selections are similar, `false` otherwise.\n\t */\n\tisSimilar( otherSelection ) {\n\t\tif ( this.isBackward != otherSelection.isBackward ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst numOfRangesA = count( this.getRanges() );\n\t\tconst numOfRangesB = count( otherSelection.getRanges() );\n\n\t\t// If selections have different number of ranges, they cannot be similar.\n\t\tif ( numOfRangesA != numOfRangesB ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If both selections have no ranges, they are similar.\n\t\tif ( numOfRangesA == 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Check if each range in one selection has a similar range in other selection.\n\t\tfor ( let rangeA of this.getRanges() ) {\n\t\t\trangeA = rangeA.getTrimmed();\n\n\t\t\tlet found = false;\n\n\t\t\tfor ( let rangeB of otherSelection.getRanges() ) {\n\t\t\t\trangeB = rangeB.getTrimmed();\n\n\t\t\t\tif ( rangeA.start.isEqual( rangeB.start ) && rangeA.end.isEqual( rangeB.end ) ) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// For `rangeA`, neither range in `otherSelection` was similar. So selections are not similar.\n\t\t\tif ( !found ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// There were no ranges that weren't matched. Selections are similar.\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns the selected element. {@link module:engine/view/element~Element Element} is considered as selected if there is only\n\t * one range in the selection, and that range contains exactly one element.\n\t * Returns `null` if there is no selected element.\n\t *\n\t * @returns {module:engine/view/element~Element|null}\n\t */\n\tgetSelectedElement() {\n\t\tif ( this.rangeCount !== 1 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this.getFirstRange().getContainedElement();\n\t}\n\n\t/**\n\t * Sets this selection's ranges and direction to the specified location based on the given\n\t * {@link module:engine/view/selection~Selectable selectable}.\n\t *\n\t *\t\t// Sets selection to the given range.\n\t *\t\tconst range = writer.createRange( start, end );\n\t *\t\tselection.setTo( range );\n\t *\n\t *\t\t// Sets selection to given ranges.\n\t * \t\tconst ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t *\t\tselection.setTo( range );\n\t *\n\t *\t\t// Sets selection to the other selection.\n\t *\t\tconst otherSelection = writer.createSelection();\n\t *\t\tselection.setTo( otherSelection );\n\t *\n\t *\t \t// Sets selection to contents of DocumentSelection.\n\t *\t\tselection.setTo( editor.editing.view.document.selection );\n\t *\n\t * \t\t// Sets collapsed selection at the given position.\n\t *\t\tconst position = writer.createPositionAt( root, path );\n\t *\t\tselection.setTo( position );\n\t *\n\t * \t\t// Sets collapsed selection at the position of given item and offset.\n\t *\t\tselection.setTo( paragraph, offset );\n\t *\n\t * Creates a range inside an {@link module:engine/view/element~Element element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t *\t\tselection.setTo( paragraph, 'in' );\n\t *\n\t * Creates a range on an {@link module:engine/view/item~Item item} which starts before the item and ends just after the item.\n\t *\n\t *\t\tselection.setTo( paragraph, 'on' );\n\t *\n\t * \t\t// Clears selection. Removes all ranges.\n\t *\t\tselection.setTo( null );\n\t *\n\t * `Selection#setTo()` method allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t *\t\t// Sets selection as backward.\n\t *\t\tselection.setTo( range, { backward: true } );\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be properly handled by screen readers).\n\t *\n\t *\t\t// Creates fake selection with label.\n\t *\t\tselection.setTo( range, { fake: true, label: 'foo' } );\n\t *\n\t * @fires change\n\t * @param {module:engine/view/selection~Selectable} selectable\n\t * @param {Number|'before'|'end'|'after'|'on'|'in'} [placeOrOffset] Sets place or offset of the selection.\n\t * @param {Object} [options]\n\t * @param {Boolean} [options.backward] Sets this selection instance to be backward.\n\t * @param {Boolean} [options.fake] Sets this selection instance to be marked as `fake`.\n\t * @param {String} [options.label] Label for the fake selection.\n\t */\n\tsetTo( selectable, placeOrOffset, options ) {\n\t\tif ( selectable === null ) {\n\t\t\tthis._setRanges( [] );\n\t\t\tthis._setFakeOptions( placeOrOffset );\n\t\t} else if ( selectable instanceof Selection || selectable instanceof DocumentSelection ) {\n\t\t\tthis._setRanges( selectable.getRanges(), selectable.isBackward );\n\t\t\tthis._setFakeOptions( { fake: selectable.isFake, label: selectable.fakeSelectionLabel } );\n\t\t} else if ( selectable instanceof Range ) {\n\t\t\tthis._setRanges( [ selectable ], placeOrOffset && placeOrOffset.backward );\n\t\t\tthis._setFakeOptions( placeOrOffset );\n\t\t} else if ( selectable instanceof Position ) {\n\t\t\tthis._setRanges( [ new Range( selectable ) ] );\n\t\t\tthis._setFakeOptions( placeOrOffset );\n\t\t} else if ( selectable instanceof Node ) {\n\t\t\tconst backward = !!options && !!options.backward;\n\t\t\tlet range;\n\n\t\t\tif ( placeOrOffset === undefined ) {\n\t\t\t\t/**\n\t\t\t\t * selection.setTo requires the second parameter when the first parameter is a node.\n\t\t\t\t *\n\t\t\t\t * @error view-selection-setto-required-second-parameter\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'view-selection-setto-required-second-parameter', this );\n\t\t\t} else if ( placeOrOffset == 'in' ) {\n\t\t\t\trange = Range._createIn( selectable );\n\t\t\t} else if ( placeOrOffset == 'on' ) {\n\t\t\t\trange = Range._createOn( selectable );\n\t\t\t} else {\n\t\t\t\trange = new Range( Position._createAt( selectable, placeOrOffset ) );\n\t\t\t}\n\n\t\t\tthis._setRanges( [ range ], backward );\n\t\t\tthis._setFakeOptions( options );\n\t\t} else if ( isIterable( selectable ) ) {\n\t\t\t// We assume that the selectable is an iterable of ranges.\n\t\t\t// Array.from() is used to prevent setting ranges to the old iterable\n\t\t\tthis._setRanges( selectable, placeOrOffset && placeOrOffset.backward );\n\t\t\tthis._setFakeOptions( placeOrOffset );\n\t\t} else {\n\t\t\t/**\n\t\t\t * Cannot set selection to given place.\n\t\t\t *\n\t\t\t * @error view-selection-setto-not-selectable\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-selection-setto-not-selectable', this );\n\t\t}\n\n\t\tthis.fire( 'change' );\n\t}\n\n\t/**\n\t * Moves {@link #focus} to the specified location.\n\t *\n\t * The location can be specified in the same form as {@link module:engine/view/view~View#createPositionAt view.createPositionAt()}\n\t * parameters.\n\t *\n\t * @fires change\n\t * @param {module:engine/view/item~Item|module:engine/view/position~Position} itemOrPosition\n\t * @param {Number|'end'|'before'|'after'} [offset] Offset or one of the flags. Used only when\n\t * first parameter is a {@link module:engine/view/item~Item view item}.\n\t */\n\tsetFocus( itemOrPosition, offset ) {\n\t\tif ( this.anchor === null ) {\n\t\t\t/**\n\t\t\t * Cannot set selection focus if there are no ranges in selection.\n\t\t\t *\n\t\t\t * @error view-selection-setfocus-no-ranges\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-selection-setfocus-no-ranges', this );\n\t\t}\n\n\t\tconst newFocus = Position._createAt( itemOrPosition, offset );\n\n\t\tif ( newFocus.compareWith( this.focus ) == 'same' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst anchor = this.anchor;\n\n\t\tthis._ranges.pop();\n\n\t\tif ( newFocus.compareWith( anchor ) == 'before' ) {\n\t\t\tthis._addRange( new Range( newFocus, anchor ), true );\n\t\t} else {\n\t\t\tthis._addRange( new Range( anchor, newFocus ) );\n\t\t}\n\n\t\tthis.fire( 'change' );\n\t}\n\n\t/**\n\t * Checks whether this object is of the given type.\n\t *\n\t *\t\tselection.is( 'selection' ); // -> true\n\t *\t\tselection.is( 'view:selection' ); // -> true\n\t *\n\t *\t\tselection.is( 'model:selection' ); // -> false\n\t *\t\tselection.is( 'element' ); // -> false\n\t *\t\tselection.is( 'range' ); // -> false\n\t *\n\t * {@link module:engine/view/node~Node#is Check the entire list of view objects} which implement the `is()` method.\n\t *\n\t * @param {String} type\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === 'selection' || type === 'view:selection';\n\t}\n\n\t/**\n\t * Replaces all ranges that were added to the selection with given array of ranges. Last range of the array\n\t * is treated like the last added range and is used to set {@link #anchor anchor} and {@link #focus focus}.\n\t * Accepts a flag describing in which way the selection is made.\n\t *\n\t * @private\n\t * @param {Iterable.<module:engine/view/range~Range>} newRanges Iterable object of ranges to set.\n\t * @param {Boolean} [isLastBackward=false] Flag describing if last added range was selected forward - from start to end\n\t * (`false`) or backward - from end to start (`true`). Defaults to `false`.\n\t */\n\t_setRanges( newRanges, isLastBackward = false ) {\n\t\t// New ranges should be copied to prevent removing them by setting them to `[]` first.\n\t\t// Only applies to situations when selection is set to the same selection or same selection's ranges.\n\t\tnewRanges = Array.from( newRanges );\n\n\t\tthis._ranges = [];\n\n\t\tfor ( const range of newRanges ) {\n\t\t\tthis._addRange( range );\n\t\t}\n\n\t\tthis._lastRangeBackward = !!isLastBackward;\n\t}\n\n\t/**\n\t * Sets this selection instance to be marked as `fake`. A fake selection does not render as browser native selection\n\t * over selected elements and is hidden to the user. This way, no native selection UI artifacts are displayed to\n\t * the user and selection over elements can be represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM (and be\n\t * properly handled by screen readers).\n\t *\n\t * @private\n\t * @param {Object} [options] Options.\n\t * @param {Boolean} [options.fake] If set to true selection will be marked as `fake`.\n\t * @param {String} [options.label=''] Fake selection label.\n\t */\n\t_setFakeOptions( options = {} ) {\n\t\tthis._isFake = !!options.fake;\n\t\tthis._fakeSelectionLabel = options.fake ? options.label || '' : '';\n\t}\n\n\t/**\n\t * Adds a range to the selection. Added range is copied. This means that passed range is not saved in the\n\t * selection instance and you can safely operate on it.\n\t *\n\t * Accepts a flag describing in which way the selection is made - passed range might be selected from\n\t * {@link module:engine/view/range~Range#start start} to {@link module:engine/view/range~Range#end end}\n\t * or from {@link module:engine/view/range~Range#end end} to {@link module:engine/view/range~Range#start start}.\n\t * The flag is used to set {@link #anchor anchor} and {@link #focus focus} properties.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-selection-range-intersects` if added range intersects\n\t * with ranges already stored in Selection instance.\n\t *\n\t * @private\n\t * @fires change\n\t * @param {module:engine/view/range~Range} range\n\t * @param {Boolean} [isBackward]\n\t */\n\t_addRange( range, isBackward = false ) {\n\t\tif ( !( range instanceof Range ) ) {\n\t\t\t/**\n\t\t\t * Selection range set to an object that is not an instance of {@link module:engine/view/range~Range}.\n\t\t\t *\n\t\t\t * @error view-selection-add-range-not-range\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'view-selection-add-range-not-range',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\n\t\tthis._pushRange( range );\n\t\tthis._lastRangeBackward = !!isBackward;\n\t}\n\n\t/**\n\t * Adds range to selection - creates copy of given range so it can be safely used and modified.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-selection-range-intersects` if added range intersects\n\t * with ranges already stored in selection instance.\n\t *\n\t * @private\n\t * @param {module:engine/view/range~Range} range\n\t */\n\t_pushRange( range ) {\n\t\tfor ( const storedRange of this._ranges ) {\n\t\t\tif ( range.isIntersecting( storedRange ) ) {\n\t\t\t\t/**\n\t\t\t\t * Trying to add a range that intersects with another range from selection.\n\t\t\t\t *\n\t\t\t\t * @error view-selection-range-intersects\n\t\t\t\t * @param {module:engine/view/range~Range} addedRange Range that was added to the selection.\n\t\t\t\t * @param {module:engine/view/range~Range} intersectingRange Range from selection that intersects with `addedRange`.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'view-selection-range-intersects',\n\t\t\t\t\tthis,\n\t\t\t\t\t{ addedRange: range, intersectingRange: storedRange }\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tthis._ranges.push( new Range( range.start, range.end ) );\n\t}\n\n\t/**\n\t * Fired whenever selection ranges are changed through {@link ~Selection Selection API}.\n\t *\n\t * @event change\n\t */\n}\n\nmix( Selection, EmitterMixin );\n\n/**\n * An entity that is used to set selection.\n *\n * See also {@link module:engine/view/selection~Selection#setTo}\n *\n * @typedef {\n * module:engine/view/selection~Selection|\n * module:engine/view/documentselection~DocumentSelection|\n * module:engine/view/position~Position|\n * Iterable.<module:engine/view/range~Range>|\n * module:engine/view/range~Range|\n * module:engine/view/item~Item|\n * null\n * } module:engine/view/selection~Selectable\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/documentselection\n */\n\nimport Selection from './selection';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\nimport EmitterMixin from '@ckeditor/ckeditor5-utils/src/emittermixin';\n\n/**\n * Class representing the document selection in the view.\n *\n * Its instance is available in {@link module:engine/view/document~Document#selection `Document#selection`}.\n *\n * It is similar to {@link module:engine/view/selection~Selection} but\n * it has a read-only API and can be modified only by the writer available in\n * the {@link module:engine/view/view~View#change `View#change()`} block\n * (so via {@link module:engine/view/downcastwriter~DowncastWriter#setSelection `DowncastWriter#setSelection()`}).\n */\nexport default class DocumentSelection {\n\t/**\n\t * Creates new DocumentSelection instance.\n\t *\n\t * \t\t// Creates empty selection without ranges.\n\t *\t\tconst selection = new DocumentSelection();\n\t *\n\t *\t\t// Creates selection at the given range.\n\t *\t\tconst range = writer.createRange( start, end );\n\t *\t\tconst selection = new DocumentSelection( range );\n\t *\n\t *\t\t// Creates selection at the given ranges\n\t * \t\tconst ranges = [ writer.createRange( start1, end2 ), writer.createRange( start2, end2 ) ];\n\t *\t\tconst selection = new DocumentSelection( ranges );\n\t *\n\t *\t\t// Creates selection from the other selection.\n\t *\t\tconst otherSelection = writer.createSelection();\n\t *\t\tconst selection = new DocumentSelection( otherSelection );\n\t *\n\t * \t\t// Creates selection at the given position.\n\t *\t\tconst position = writer.createPositionAt( root, offset );\n\t *\t\tconst selection = new DocumentSelection( position );\n\t *\n\t *\t\t// Creates collapsed selection at the position of given item and offset.\n\t *\t\tconst paragraph = writer.createContainerElement( 'paragraph' );\n\t *\t\tconst selection = new DocumentSelection( paragraph, offset );\n\t *\n\t *\t\t// Creates a range inside an {@link module:engine/view/element~Element element} which starts before the\n\t *\t\t// first child of that element and ends after the last child of that element.\n\t *\t\tconst selection = new DocumentSelection( paragraph, 'in' );\n\t *\n\t *\t\t// Creates a range on an {@link module:engine/view/item~Item item} which starts before the item and ends\n\t *\t\t// just after the item.\n\t *\t\tconst selection = new DocumentSelection( paragraph, 'on' );\n\t *\n\t * `Selection`'s constructor allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t *\t\t// Creates backward selection.\n\t *\t\tconst selection = new DocumentSelection( range, { backward: true } );\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be properly handled by screen readers).\n\t *\n\t *\t\t// Creates fake selection with label.\n\t *\t\tconst selection = new DocumentSelection( range, { fake: true, label: 'foo' } );\n\t *\n\t * @param {module:engine/view/selection~Selectable} [selectable=null]\n\t * @param {Number|'before'|'end'|'after'|'on'|'in'} [placeOrOffset] Offset or place when selectable is an `Item`.\n\t * @param {Object} [options]\n\t * @param {Boolean} [options.backward] Sets this selection instance to be backward.\n\t * @param {Boolean} [options.fake] Sets this selection instance to be marked as `fake`.\n\t * @param {String} [options.label] Label for the fake selection.\n\t */\n\tconstructor( selectable = null, placeOrOffset, options ) {\n\t\t/**\n\t\t * Selection is used internally (`DocumentSelection` is a proxy to that selection).\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/view/selection~Selection}\n\t\t */\n\t\tthis._selection = new Selection();\n\n\t\t// Delegate change event to be fired on DocumentSelection instance.\n\t\tthis._selection.delegate( 'change' ).to( this );\n\n\t\t// Set selection data.\n\t\tthis._selection.setTo( selectable, placeOrOffset, options );\n\t}\n\n\t/**\n\t * Returns true if selection instance is marked as `fake`.\n\t *\n\t * @see #_setTo\n\t * @type {Boolean}\n\t */\n\tget isFake() {\n\t\treturn this._selection.isFake;\n\t}\n\n\t/**\n\t * Returns fake selection label.\n\t *\n\t * @see #_setTo\n\t * @type {String}\n\t */\n\tget fakeSelectionLabel() {\n\t\treturn this._selection.fakeSelectionLabel;\n\t}\n\n\t/**\n\t * Selection anchor. Anchor may be described as a position where the selection starts. Together with\n\t * {@link #focus focus} they define the direction of selection, which is important\n\t * when expanding/shrinking selection. Anchor is always the start or end of the most recent added range.\n\t * It may be a bit unintuitive when there are multiple ranges in selection.\n\t *\n\t * @see #focus\n\t * @type {module:engine/view/position~Position}\n\t */\n\tget anchor() {\n\t\treturn this._selection.anchor;\n\t}\n\n\t/**\n\t * Selection focus. Focus is a position where the selection ends.\n\t *\n\t * @see #anchor\n\t * @type {module:engine/view/position~Position}\n\t */\n\tget focus() {\n\t\treturn this._selection.focus;\n\t}\n\n\t/**\n\t * Returns whether the selection is collapsed. Selection is collapsed when there is exactly one range which is\n\t * collapsed.\n\t *\n\t * @type {Boolean}\n\t */\n\tget isCollapsed() {\n\t\treturn this._selection.isCollapsed;\n\t}\n\n\t/**\n\t * Returns number of ranges in selection.\n\t *\n\t * @type {Number}\n\t */\n\tget rangeCount() {\n\t\treturn this._selection.rangeCount;\n\t}\n\n\t/**\n\t * Specifies whether the {@link #focus} precedes {@link #anchor}.\n\t *\n\t * @type {Boolean}\n\t */\n\tget isBackward() {\n\t\treturn this._selection.isBackward;\n\t}\n\n\t/**\n\t * {@link module:engine/view/editableelement~EditableElement EditableElement} instance that contains this selection, or `null`\n\t * if the selection is not inside an editable element.\n\t *\n\t * @type {module:engine/view/editableelement~EditableElement|null}\n\t */\n\tget editableElement() {\n\t\treturn this._selection.editableElement;\n\t}\n\n\t/**\n\t * Used for the compatibility with the {@link module:engine/view/selection~Selection#isEqual} method.\n\t *\n\t * @protected\n\t */\n\tget _ranges() {\n\t\treturn this._selection._ranges;\n\t}\n\n\t/**\n\t * Returns an iterable that contains copies of all ranges added to the selection.\n\t *\n\t * @returns {Iterable.<module:engine/view/range~Range>}\n\t */\n\t* getRanges() {\n\t\tyield* this._selection.getRanges();\n\t}\n\n\t/**\n\t * Returns copy of the first range in the selection. First range is the one which\n\t * {@link module:engine/view/range~Range#start start} position {@link module:engine/view/position~Position#isBefore is before} start\n\t * position of all other ranges (not to confuse with the first range added to the selection).\n\t * Returns `null` if no ranges are added to selection.\n\t *\n\t * @returns {module:engine/view/range~Range|null}\n\t */\n\tgetFirstRange() {\n\t\treturn this._selection.getFirstRange();\n\t}\n\n\t/**\n\t * Returns copy of the last range in the selection. Last range is the one which {@link module:engine/view/range~Range#end end}\n\t * position {@link module:engine/view/position~Position#isAfter is after} end position of all other ranges (not to confuse\n\t * with the last range added to the selection). Returns `null` if no ranges are added to selection.\n\t *\n\t * @returns {module:engine/view/range~Range|null}\n\t */\n\tgetLastRange() {\n\t\treturn this._selection.getLastRange();\n\t}\n\n\t/**\n\t * Returns copy of the first position in the selection. First position is the position that\n\t * {@link module:engine/view/position~Position#isBefore is before} any other position in the selection ranges.\n\t * Returns `null` if no ranges are added to selection.\n\t *\n\t * @returns {module:engine/view/position~Position|null}\n\t */\n\tgetFirstPosition() {\n\t\treturn this._selection.getFirstPosition();\n\t}\n\n\t/**\n\t * Returns copy of the last position in the selection. Last position is the position that\n\t * {@link module:engine/view/position~Position#isAfter is after} any other position in the selection ranges.\n\t * Returns `null` if no ranges are added to selection.\n\t *\n\t * @returns {module:engine/view/position~Position|null}\n\t */\n\tgetLastPosition() {\n\t\treturn this._selection.getLastPosition();\n\t}\n\n\t/**\n\t * Returns the selected element. {@link module:engine/view/element~Element Element} is considered as selected if there is only\n\t * one range in the selection, and that range contains exactly one element.\n\t * Returns `null` if there is no selected element.\n\t *\n\t * @returns {module:engine/view/element~Element|null}\n\t */\n\tgetSelectedElement() {\n\t\treturn this._selection.getSelectedElement();\n\t}\n\n\t/**\n\t * Checks whether, this selection is equal to given selection. Selections are equal if they have same directions,\n\t * same number of ranges and all ranges from one selection equal to a range from other selection.\n\t *\n\t * @param {module:engine/view/selection~Selection|module:engine/view/documentselection~DocumentSelection} otherSelection\n\t * Selection to compare with.\n\t * @returns {Boolean} `true` if selections are equal, `false` otherwise.\n\t */\n\tisEqual( otherSelection ) {\n\t\treturn this._selection.isEqual( otherSelection );\n\t}\n\n\t/**\n\t * Checks whether this selection is similar to given selection. Selections are similar if they have same directions, same\n\t * number of ranges, and all {@link module:engine/view/range~Range#getTrimmed trimmed} ranges from one selection are\n\t * equal to any trimmed range from other selection.\n\t *\n\t * @param {module:engine/view/selection~Selection|module:engine/view/documentselection~DocumentSelection} otherSelection\n\t * Selection to compare with.\n\t * @returns {Boolean} `true` if selections are similar, `false` otherwise.\n\t */\n\tisSimilar( otherSelection ) {\n\t\treturn this._selection.isSimilar( otherSelection );\n\t}\n\n\t/**\n\t * Checks whether this object is of the given type.\n\t *\n\t *\t\tdocSelection.is( 'selection' ); // -> true\n\t *\t\tdocSelection.is( 'documentSelection' ); // -> true\n\t *\t\tdocSelection.is( 'view:selection' ); // -> true\n\t *\t\tdocSelection.is( 'view:documentSelection' ); // -> true\n\t *\n\t *\t\tdocSelection.is( 'model:documentSelection' ); // -> false\n\t *\t\tdocSelection.is( 'element' ); // -> false\n\t *\t\tdocSelection.is( 'node' ); // -> false\n\t *\n\t * {@link module:engine/view/node~Node#is Check the entire list of view objects} which implement the `is()` method.\n\t *\n\t * @param {String} type\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === 'selection' ||\n\t\t\ttype == 'documentSelection' ||\n\t\t\ttype == 'view:selection' ||\n\t\t\ttype == 'view:documentSelection';\n\t}\n\n\t/**\n\t * Sets this selection's ranges and direction to the specified location based on the given\n\t * {@link module:engine/view/selection~Selectable selectable}.\n\t *\n\t *\t\t// Sets selection to the given range.\n\t *\t\tconst range = writer.createRange( start, end );\n\t *\t\tdocumentSelection._setTo( range );\n\t *\n\t *\t\t// Sets selection to given ranges.\n\t * \t\tconst ranges = [ writer.createRange( start1, end2 ), writer.createRange( start2, end2 ) ];\n\t *\t\tdocumentSelection._setTo( range );\n\t *\n\t *\t\t// Sets selection to the other selection.\n\t *\t\tconst otherSelection = writer.createSelection();\n\t *\t\tdocumentSelection._setTo( otherSelection );\n\t *\n\t * \t\t// Sets collapsed selection at the given position.\n\t *\t\tconst position = writer.createPositionAt( root, offset );\n\t *\t\tdocumentSelection._setTo( position );\n\t *\n\t * \t\t// Sets collapsed selection at the position of given item and offset.\n\t *\t\tdocumentSelection._setTo( paragraph, offset );\n\t *\n\t * Creates a range inside an {@link module:engine/view/element~Element element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t *\t\tdocumentSelection._setTo( paragraph, 'in' );\n\t *\n\t * Creates a range on an {@link module:engine/view/item~Item item} which starts before the item and ends just after the item.\n\t *\n\t *\t\tdocumentSelection._setTo( paragraph, 'on' );\n\t *\n\t * \t\t// Clears selection. Removes all ranges.\n\t *\t\tdocumentSelection._setTo( null );\n\t *\n\t * `Selection#_setTo()` method allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t *\t\t// Sets selection as backward.\n\t *\t\tdocumentSelection._setTo( range, { backward: true } );\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to des cribe fake selection in DOM\n\t * (and be properly handled by screen readers).\n\t *\n\t *\t\t// Creates fake selection with label.\n\t *\t\tdocumentSelection._setTo( range, { fake: true, label: 'foo' } );\n\t *\n\t * @protected\n\t * @fires change\n\t * @param {module:engine/view/selection~Selectable} selectable\n\t * @param {Number|'before'|'end'|'after'|'on'|'in'} [placeOrOffset] Sets place or offset of the selection.\n\t * @param {Object} [options]\n\t * @param {Boolean} [options.backward] Sets this selection instance to be backward.\n\t * @param {Boolean} [options.fake] Sets this selection instance to be marked as `fake`.\n\t * @param {String} [options.label] Label for the fake selection.\n\t */\n\t_setTo( selectable, placeOrOffset, options ) {\n\t\tthis._selection.setTo( selectable, placeOrOffset, options );\n\t}\n\n\t/**\n\t * Moves {@link #focus} to the specified location.\n\t *\n\t * The location can be specified in the same form as {@link module:engine/view/view~View#createPositionAt view.createPositionAt()}\n\t * parameters.\n\t *\n\t * @protected\n\t * @fires change\n\t * @param {module:engine/view/item~Item|module:engine/view/position~Position} itemOrPosition\n\t * @param {Number|'end'|'before'|'after'} [offset] Offset or one of the flags. Used only when\n\t * first parameter is a {@link module:engine/view/item~Item view item}.\n\t */\n\t_setFocus( itemOrPosition, offset ) {\n\t\tthis._selection.setFocus( itemOrPosition, offset );\n\t}\n\n\t/**\n\t * Fired whenever selection ranges are changed through {@link ~DocumentSelection Selection API}.\n\t *\n\t * @event change\n\t */\n}\n\nmix( DocumentSelection, EmitterMixin );\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/bubblingeventinfo\n */\n\nimport EventInfo from '@ckeditor/ckeditor5-utils/src/eventinfo';\n\n/**\n * The event object passed to bubbling event callbacks. It is used to provide information about the event as well as a tool to\n * manipulate it.\n *\n * @extends module:utils/eventinfo~EventInfo\n */\nexport default class BubblingEventInfo extends EventInfo {\n\t/**\n\t * @param {Object} source The emitter.\n\t * @param {String} name The event name.\n\t * @param {module:engine/view/range~Range} startRange The view range that the bubbling should start from.\n\t */\n\tconstructor( source, name, startRange ) {\n\t\tsuper( source, name );\n\n\t\t/**\n\t\t * The view range that the bubbling should start from.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/range~Range}\n\t\t */\n\t\tthis.startRange = startRange;\n\n\t\t/**\n\t\t * The current event phase.\n\t\t *\n\t\t * @protected\n\t\t * @member {'none'|'capturing'|'atTarget'|'bubbling'}\n\t\t */\n\t\tthis._eventPhase = 'none';\n\n\t\t/**\n\t\t * The current bubbling target.\n\t\t *\n\t\t * @protected\n\t\t * @member {module:engine/view/document~Document|module:engine/view/node~Node|null}\n\t\t */\n\t\tthis._currentTarget = null;\n\t}\n\n\t/**\n\t * The current event phase.\n\t *\n\t * @readonly\n\t * @member {'none'|'capturing'|'atTarget'|'bubbling'}\n\t */\n\tget eventPhase() {\n\t\treturn this._eventPhase;\n\t}\n\n\t/**\n\t * The current bubbling target.\n\t *\n\t * @readonly\n\t * @member {module:engine/view/document~Document|module:engine/view/node~Node|null}\n\t */\n\tget currentTarget() {\n\t\treturn this._currentTarget;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/bubblingemittermixin\n */\n\nimport EventInfo from '@ckeditor/ckeditor5-utils/src/eventinfo';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\nimport EmitterMixin from '@ckeditor/ckeditor5-utils/src/emittermixin';\nimport toArray from '@ckeditor/ckeditor5-utils/src/toarray';\n\nimport BubblingEventInfo from './bubblingeventinfo';\n\nconst contextsSymbol = Symbol( 'bubbling contexts' );\n\n/**\n * Bubbling emitter mixin for the view document as described in the\n * {@link ~BubblingEmitter} interface.\n *\n * @mixin BubblingEmitterMixin\n * @implements module:engine/view/observer/bubblingemittermixin~BubblingEmitter\n */\nconst BubblingEmitterMixin = {\n\t/**\n\t * @inheritDoc\n\t */\n\tfire( eventOrInfo, ...eventArgs ) {\n\t\ttry {\n\t\t\tconst eventInfo = eventOrInfo instanceof EventInfo ? eventOrInfo : new EventInfo( this, eventOrInfo );\n\t\t\tconst eventContexts = getBubblingContexts( this );\n\n\t\t\tif ( !eventContexts.size ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdateEventInfo( eventInfo, 'capturing', this );\n\n\t\t\t// The capture phase of the event.\n\t\t\tif ( fireListenerFor( eventContexts, '$capture', eventInfo, ...eventArgs ) ) {\n\t\t\t\treturn eventInfo.return;\n\t\t\t}\n\n\t\t\tconst startRange = eventInfo.startRange || this.selection.getFirstRange();\n\t\t\tconst selectedElement = startRange ? startRange.getContainedElement() : null;\n\t\t\tconst isCustomContext = selectedElement ? Boolean( getCustomContext( eventContexts, selectedElement ) ) : false;\n\n\t\t\tlet node = selectedElement || getDeeperRangeParent( startRange );\n\n\t\t\tupdateEventInfo( eventInfo, 'atTarget', node );\n\n\t\t\t// For the not yet bubbling event trigger for $text node if selection can be there and it's not a custom context selected.\n\t\t\tif ( !isCustomContext ) {\n\t\t\t\tif ( fireListenerFor( eventContexts, '$text', eventInfo, ...eventArgs ) ) {\n\t\t\t\t\treturn eventInfo.return;\n\t\t\t\t}\n\n\t\t\t\tupdateEventInfo( eventInfo, 'bubbling', node );\n\t\t\t}\n\n\t\t\twhile ( node ) {\n\t\t\t\t// Root node handling.\n\t\t\t\tif ( node.is( 'rootElement' ) ) {\n\t\t\t\t\tif ( fireListenerFor( eventContexts, '$root', eventInfo, ...eventArgs ) ) {\n\t\t\t\t\t\treturn eventInfo.return;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Element node handling.\n\t\t\t\telse if ( node.is( 'element' ) ) {\n\t\t\t\t\tif ( fireListenerFor( eventContexts, node.name, eventInfo, ...eventArgs ) ) {\n\t\t\t\t\t\treturn eventInfo.return;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Check custom contexts (i.e., a widget).\n\t\t\t\tif ( fireListenerFor( eventContexts, node, eventInfo, ...eventArgs ) ) {\n\t\t\t\t\treturn eventInfo.return;\n\t\t\t\t}\n\n\t\t\t\tnode = node.parent;\n\n\t\t\t\tupdateEventInfo( eventInfo, 'bubbling', node );\n\t\t\t}\n\n\t\t\tupdateEventInfo( eventInfo, 'bubbling', this );\n\n\t\t\t// Document context.\n\t\t\tfireListenerFor( eventContexts, '$document', eventInfo, ...eventArgs );\n\n\t\t\treturn eventInfo.return;\n\t\t} catch ( err ) {\n\t\t\t// @if CK_DEBUG // throw err;\n\t\t\t/* istanbul ignore next */\n\t\t\tCKEditorError.rethrowUnexpectedError( err, this );\n\t\t}\n\t},\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_addEventListener( event, callback, options ) {\n\t\tconst contexts = toArray( options.context || '$document' );\n\t\tconst eventContexts = getBubblingContexts( this );\n\n\t\tfor ( const context of contexts ) {\n\t\t\tlet emitter = eventContexts.get( context );\n\n\t\t\tif ( !emitter ) {\n\t\t\t\temitter = Object.create( EmitterMixin );\n\t\t\t\teventContexts.set( context, emitter );\n\t\t\t}\n\n\t\t\tthis.listenTo( emitter, event, callback, options );\n\t\t}\n\t},\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_removeEventListener( event, callback ) {\n\t\tconst eventContexts = getBubblingContexts( this );\n\n\t\tfor ( const emitter of eventContexts.values() ) {\n\t\t\tthis.stopListening( emitter, event, callback );\n\t\t}\n\t}\n};\n\nexport default BubblingEmitterMixin;\n\n// Update the event info bubbling fields.\n//\n// @param {module:utils/eventinfo~EventInfo} eventInfo The event info object to update.\n// @param {'none'|'capturing'|'atTarget'|'bubbling'} eventPhase The current event phase.\n// @param {module:engine/view/document~Document|module:engine/view/node~Node} currentTarget The current bubbling target.\nfunction updateEventInfo( eventInfo, eventPhase, currentTarget ) {\n\tif ( eventInfo instanceof BubblingEventInfo ) {\n\t\teventInfo._eventPhase = eventPhase;\n\t\teventInfo._currentTarget = currentTarget;\n\t}\n}\n\n// Fires the listener for the specified context. Returns `true` if event was stopped.\n//\n// @private\n// @param {Map.<String|Function, module:utils/emittermixin~Emitter>} eventContexts\n// @param {String|module:engine/view/node~Node} context\n// @param {module:utils/eventinfo~EventInfo} eventInfo The `EventInfo` object.\n// @param {...*} [eventArgs] Additional arguments to be passed to the callbacks.\n// @returns {Boolean} True if event stop was called.\nfunction fireListenerFor( eventContexts, context, eventInfo, ...eventArgs ) {\n\tconst emitter = typeof context == 'string' ? eventContexts.get( context ) : getCustomContext( eventContexts, context );\n\n\tif ( !emitter ) {\n\t\treturn false;\n\t}\n\n\temitter.fire( eventInfo, ...eventArgs );\n\n\treturn eventInfo.stop.called;\n}\n\n// Returns an emitter for a specified view node.\n//\n// @private\n// @param {Map.<String|Function, module:utils/emittermixin~Emitter>} eventContexts\n// @param {module:engine/view/node~Node} node\n// @returns {module:utils/emittermixin~Emitter|null}\nfunction getCustomContext( eventContexts, node ) {\n\tfor ( const [ context, emitter ] of eventContexts ) {\n\t\tif ( typeof context == 'function' && context( node ) ) {\n\t\t\treturn emitter;\n\t\t}\n\t}\n\n\treturn null;\n}\n\n// Returns bubbling contexts map for the source (emitter).\nfunction getBubblingContexts( source ) {\n\tif ( !source[ contextsSymbol ] ) {\n\t\tsource[ contextsSymbol ] = new Map();\n\t}\n\n\treturn source[ contextsSymbol ];\n}\n\n// Returns the deeper parent element for the range.\nfunction getDeeperRangeParent( range ) {\n\tif ( !range ) {\n\t\treturn null;\n\t}\n\n\tconst startParent = range.start.parent;\n\tconst endParent = range.end.parent;\n\n\tconst startPath = startParent.getPath();\n\tconst endPath = endParent.getPath();\n\n\treturn startPath.length > endPath.length ? startParent : endParent;\n}\n\n/**\n * Bubbling emitter for the view document.\n *\n * Bubbling emitter is triggering events in the context of specified {@link module:engine/view/element~Element view element} name,\n * predefined `'$text'`, `'$root'`, `'$document'` and `'$capture'` contexts, and context matchers provided as a function.\n *\n * Before bubbling starts, listeners for `'$capture'` context are triggered. Then the bubbling starts from the deeper selection\n * position (by firing event on the `'$text'` context) and propagates the view document tree up to the `'$root'` and finally\n * the listeners at `'$document'` context are fired (this is the default context).\n *\n * Examples:\n *\n *\t\t// Listeners registered in the context of the view element names:\n *\t\tthis.listenTo( viewDocument, 'enter', ( evt, data ) => {\n *\t\t\t// ...\n *\t\t}, { context: 'blockquote' } );\n *\n *\t\tthis.listenTo( viewDocument, 'enter', ( evt, data ) => {\n *\t\t\t// ...\n *\t\t}, { context: 'li' } );\n *\n *\t\t// Listeners registered in the context of the '$text' and '$root' nodes.\n *\t\tthis.listenTo( view.document, 'arrowKey', ( evt, data ) => {\n *\t\t\t// ...\n *\t\t}, { context: '$text', priority: 'high' } );\n *\n *\t\tthis.listenTo( view.document, 'arrowKey', ( evt, data ) => {\n *\t\t\t// ...\n *\t\t}, { context: '$root' } );\n *\n *\t\t// Listeners registered in the context of custom callback function.\n *\t\tthis.listenTo( view.document, 'arrowKey', ( evt, data ) => {\n *\t\t\t// ...\n *\t\t}, { context: isWidget } );\n *\n *\t\tthis.listenTo( view.document, 'arrowKey', ( evt, data ) => {\n *\t\t\t// ...\n *\t\t}, { context: isWidget, priority: 'high' } );\n *\n * Example flow for selection in text:\n *\n *\t\t<blockquote><p>Foo[]bar</p></blockquote>\n *\n * Fired events on contexts:\n * 1. `'$capture'`\n * 2. `'$text'`\n * 3. `'p'`\n * 4. `'blockquote'`\n * 5. `'$root'`\n * 6. `'$document'`\n *\n * Example flow for selection on element (i.e., Widget):\n *\n *\t\t<blockquote><p>Foo[<widget/>]bar</p></blockquote>\n *\n * Fired events on contexts:\n * 1. `'$capture'`\n * 2. *widget* (custom matcher)\n * 3. `'p'`\n * 4. `'blockquote'`\n * 5. `'$root'`\n * 6. `'$document'`\n *\n * There could be multiple listeners registered for the same context and at different priority levels:\n *\n *\t\t<p>Foo[]bar</p>\n *\n * 1. `'$capture'` at priorities:\n * 1. `'highest'`\n * 2. `'high'`\n * 3. `'normal'`\n * 4. `'low'`\n * 5. `'lowest'`\n * 2. `'$text'` at priorities:\n * 1. `'highest'`\n * 2. `'high'`\n * 3. `'normal'`\n * 4. `'low'`\n * 5. `'lowest'`\n * 3. `'p'` at priorities:\n * 1. `'highest'`\n * 2. `'high'`\n * 3. `'normal'`\n * 4. `'low'`\n * 5. `'lowest'`\n * 4. `'$root'` at priorities:\n * 1. `'highest'`\n * 2. `'high'`\n * 3. `'normal'`\n * 4. `'low'`\n * 5. `'lowest'`\n * 5. `'$document'` at priorities:\n * 1. `'highest'`\n * 2. `'high'`\n * 3. `'normal'`\n * 4. `'low'`\n * 5. `'lowest'`\n *\n * @interface BubblingEmitter\n * @extends module:utils/emittermixin~Emitter\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/document\n */\n\nimport DocumentSelection from './documentselection';\nimport Collection from '@ckeditor/ckeditor5-utils/src/collection';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\nimport BubblingEmitterMixin from './observer/bubblingemittermixin';\nimport ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';\n\n// @if CK_DEBUG_ENGINE // const { logDocument } = require( '../dev-utils/utils' );\n\n/**\n * Document class creates an abstract layer over the content editable area, contains a tree of view elements and\n * {@link module:engine/view/documentselection~DocumentSelection view selection} associated with this document.\n *\n * @mixes module:engine/view/observer/bubblingemittermixin~BubblingEmitterMixin\n * @mixes module:utils/observablemixin~ObservableMixin\n */\nexport default class Document {\n\t/**\n\t * Creates a Document instance.\n\t *\n\t * @param {module:engine/view/stylesmap~StylesProcessor} stylesProcessor The styles processor instance.\n\t */\n\tconstructor( stylesProcessor ) {\n\t\t/**\n\t\t * Selection done on this document.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/documentselection~DocumentSelection} module:engine/view/document~Document#selection\n\t\t */\n\t\tthis.selection = new DocumentSelection();\n\n\t\t/**\n\t\t * Roots of the view tree. Collection of the {@link module:engine/view/element~Element view elements}.\n\t\t *\n\t\t * View roots are created as a result of binding between {@link module:engine/view/document~Document#roots} and\n\t\t * {@link module:engine/model/document~Document#roots} and this is handled by\n\t\t * {@link module:engine/controller/editingcontroller~EditingController}, so to create view root we need to create\n\t\t * model root using {@link module:engine/model/document~Document#createRoot}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:utils/collection~Collection} module:engine/view/document~Document#roots\n\t\t */\n\t\tthis.roots = new Collection( { idProperty: 'rootName' } );\n\n\t\t/**\n\t\t * The styles processor instance used by this document when normalizing styles.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/stylesmap~StylesProcessor}\n\t\t */\n\t\tthis.stylesProcessor = stylesProcessor;\n\n\t\t/**\n\t\t * Defines whether document is in read-only mode.\n\t\t *\n\t\t * When document is read-ony then all roots are read-only as well and caret placed inside this root is hidden.\n\t\t *\n\t\t * @observable\n\t\t * @member {Boolean} #isReadOnly\n\t\t */\n\t\tthis.set( 'isReadOnly', false );\n\n\t\t/**\n\t\t * True if document is focused.\n\t\t *\n\t\t * This property is updated by the {@link module:engine/view/observer/focusobserver~FocusObserver}.\n\t\t * If the {@link module:engine/view/observer/focusobserver~FocusObserver} is disabled this property will not change.\n\t\t *\n\t\t * @readonly\n\t\t * @observable\n\t\t * @member {Boolean} module:engine/view/document~Document#isFocused\n\t\t */\n\t\tthis.set( 'isFocused', false );\n\n\t\t/**\n\t\t * `true` while the user is making a selection in the document (e.g. holding the mouse button and moving the cursor).\n\t\t * When they stop selecting, the property goes back to `false`.\n\t\t *\n\t\t * This property is updated by the {@link module:engine/view/observer/selectionobserver~SelectionObserver}.\n\t\t *\n\t\t * @readonly\n\t\t * @observable\n\t\t * @member {Boolean} module:engine/view/document~Document#isSelecting\n\t\t */\n\t\tthis.set( 'isSelecting', false );\n\n\t\t/**\n\t\t * True if composition is in progress inside the document.\n\t\t *\n\t\t * This property is updated by the {@link module:engine/view/observer/compositionobserver~CompositionObserver}.\n\t\t * If the {@link module:engine/view/observer/compositionobserver~CompositionObserver} is disabled this property will not change.\n\t\t *\n\t\t * @readonly\n\t\t * @observable\n\t\t * @member {Boolean} module:engine/view/document~Document#isComposing\n\t\t */\n\t\tthis.set( 'isComposing', false );\n\n\t\t/**\n\t\t * Post-fixer callbacks registered to the view document.\n\t\t *\n\t\t * @private\n\t\t * @member {Set}\n\t\t */\n\t\tthis._postFixers = new Set();\n\t}\n\n\t/**\n\t * Gets a {@link module:engine/view/document~Document#roots view root element} with the specified name. If the name is not\n\t * specific \"main\" root is returned.\n\t *\n\t * @param {String} [name='main'] Name of the root.\n\t * @returns {module:engine/view/rooteditableelement~RootEditableElement|null} The view root element with the specified name\n\t * or null when there is no root of given name.\n\t */\n\tgetRoot( name = 'main' ) {\n\t\treturn this.roots.get( name );\n\t}\n\n\t/**\n\t * Allows registering post-fixer callbacks. A post-fixers mechanism allows to update the view tree just before it is rendered\n\t * to the DOM.\n\t *\n\t * Post-fixers are executed right after all changes from the outermost change block were applied but\n\t * before the {@link module:engine/view/view~View#event:render render event} is fired. If a post-fixer callback made\n\t * a change, it should return `true`. When this happens, all post-fixers are fired again to check if something else should\n\t * not be fixed in the new document tree state.\n\t *\n\t * View post-fixers are useful when you want to apply some fixes whenever the view structure changes. Keep in mind that\n\t * changes executed in a view post-fixer should not break model-view mapping.\n\t *\n\t * The types of changes which should be safe:\n\t *\n\t * * adding or removing attribute from elements,\n\t * * changes inside of {@link module:engine/view/uielement~UIElement UI elements},\n\t * * {@link module:engine/controller/editingcontroller~EditingController#reconvertItem marking some of the model elements to be\n\t * re-converted}.\n\t *\n\t * Try to avoid changes which touch view structure:\n\t *\n\t * * you should not add or remove nor wrap or unwrap any view elements,\n\t * * you should not change the editor data model in a view post-fixer.\n\t *\n\t * As a parameter, a post-fixer callback receives a {@link module:engine/view/downcastwriter~DowncastWriter downcast writer}.\n\t *\n\t * Typically, a post-fixer will look like this:\n\t *\n\t *\t\teditor.editing.view.document.registerPostFixer( writer => {\n\t *\t\t\tif ( checkSomeCondition() ) {\n\t *\t\t\t\twriter.doSomething();\n\t *\n\t *\t\t\t\t// Let other post-fixers know that something changed.\n\t *\t\t\t\treturn true;\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * Note that nothing happens right after you register a post-fixer (e.g. execute such a code in the console).\n\t * That is because adding a post-fixer does not execute it.\n\t * The post-fixer will be executed as soon as any change in the document needs to cause its rendering.\n\t * If you want to re-render the editor's view after registering the post-fixer then you should do it manually by calling\n\t * {@link module:engine/view/view~View#forceRender `view.forceRender()`}.\n\t *\n\t * If you need to register a callback which is executed when DOM elements are already updated,\n\t * use {@link module:engine/view/view~View#event:render render event}.\n\t *\n\t * @param {Function} postFixer\n\t */\n\tregisterPostFixer( postFixer ) {\n\t\tthis._postFixers.add( postFixer );\n\t}\n\n\t/**\n\t * Destroys this instance. Makes sure that all observers are destroyed and listeners removed.\n\t */\n\tdestroy() {\n\t\tthis.roots.map( root => root.destroy() );\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Performs post-fixer loops. Executes post-fixer callbacks as long as none of them has done any changes to the model.\n\t *\n\t * @protected\n\t * @param {module:engine/view/downcastwriter~DowncastWriter} writer\n\t */\n\t_callPostFixers( writer ) {\n\t\tlet wasFixed = false;\n\n\t\tdo {\n\t\t\tfor ( const callback of this._postFixers ) {\n\t\t\t\twasFixed = callback( writer );\n\n\t\t\t\tif ( wasFixed ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} while ( wasFixed );\n\t}\n\n\t/**\n\t * Event fired whenever document content layout changes. It is fired whenever content is\n\t * {@link module:engine/view/view~View#event:render rendered}, but should be also fired by observers in case of\n\t * other actions which may change layout, for instance when image loads.\n\t *\n\t * @event layoutChanged\n\t */\n\n\t// @if CK_DEBUG_ENGINE // log( version ) {\n\t// @if CK_DEBUG_ENGINE //\tlogDocument( this, version );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\nmix( Document, BubblingEmitterMixin );\nmix( Document, ObservableMixin );\n\n/**\n * Enum representing type of the change.\n *\n * Possible values:\n *\n * * `children` - for child list changes,\n * * `attributes` - for element attributes changes,\n * * `text` - for text nodes changes.\n *\n * @typedef {String} module:engine/view/document~ChangeType\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/attributeelement\n */\n\nimport Element from './element';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n// Default attribute priority.\nconst DEFAULT_PRIORITY = 10;\n\n/**\n * Attribute elements are used to represent formatting elements in the view (think – `<b>`, `<span style=\"font-size: 2em\">`, etc.).\n * Most often they are created when downcasting model text attributes.\n *\n * Editing engine does not define a fixed HTML DTD. This is why a feature developer needs to choose between various\n * types (container element, {@link module:engine/view/attributeelement~AttributeElement attribute element},\n * {@link module:engine/view/emptyelement~EmptyElement empty element}, etc) when developing a feature.\n *\n * To create a new attribute element instance use the\n * {@link module:engine/view/downcastwriter~DowncastWriter#createAttributeElement `DowncastWriter#createAttributeElement()`} method.\n *\n * **Note:** Attribute elements by default can wrap {@link module:engine/view/text~Text},\n * {@link module:engine/view/emptyelement~EmptyElement}, {@link module:engine/view/uielement~UIElement},\n * {@link module:engine/view/rawelement~RawElement} and other attribute elements with higher priority. Other elements while placed inside\n * an attribute element will split it (or nest in case of an `AttributeElement`). This behavior can be modified by changing\n * the `isAllowedInsideAttributeElement` option while creating\n * {@link module:engine/view/downcastwriter~DowncastWriter#createContainerElement},\n * {@link module:engine/view/downcastwriter~DowncastWriter#createEmptyElement},\n * {@link module:engine/view/downcastwriter~DowncastWriter#createUIElement} or\n * {@link module:engine/view/downcastwriter~DowncastWriter#createRawElement}.\n *\n * @extends module:engine/view/element~Element\n */\nexport default class AttributeElement extends Element {\n\t/**\n\t * Creates an attribute element.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#createAttributeElement\n\t * @see module:engine/view/element~Element\n\t * @protected\n\t * @param {module:engine/view/document~Document} document The document instance to which this element belongs.\n\t * @param {String} name Node name.\n\t * @param {Object|Iterable} [attrs] Collection of attributes.\n\t * @param {module:engine/view/node~Node|Iterable.<module:engine/view/node~Node>} [children]\n\t * A list of nodes to be inserted into created element.\n\t */\n\tconstructor( document, name, attrs, children ) {\n\t\tsuper( document, name, attrs, children );\n\n\t\t/**\n\t\t * Returns block {@link module:engine/view/filler filler} offset or `null` if block filler is not needed.\n\t\t *\n\t\t * @method #getFillerOffset\n\t\t * @returns {Number|null} Block filler offset or `null` if block filler is not needed.\n\t\t */\n\t\tthis.getFillerOffset = getFillerOffset;\n\n\t\t/**\n\t\t * Element priority. Decides in what order elements are wrapped by {@link module:engine/view/downcastwriter~DowncastWriter}.\n\t\t *\n\t\t * @protected\n\t\t * @member {Number}\n\t\t */\n\t\tthis._priority = DEFAULT_PRIORITY;\n\n\t\t/**\n\t\t * Element identifier. If set, it is used by {@link module:engine/view/element~Element#isSimilar},\n\t\t * and then two elements are considered similar if, and only if they have the same `_id`.\n\t\t *\n\t\t * @protected\n\t\t * @member {String|Number}\n\t\t */\n\t\tthis._id = null;\n\n\t\t/**\n\t\t * Keeps all the attribute elements that have the same {@link module:engine/view/attributeelement~AttributeElement#id ids}\n\t\t * and still exist in the view tree.\n\t\t *\n\t\t * This property is managed by {@link module:engine/view/downcastwriter~DowncastWriter}.\n\t\t *\n\t\t * @protected\n\t\t * @member {Set.<module:engine/view/attributeelement~AttributeElement>|null}\n\t\t */\n\t\tthis._clonesGroup = null;\n\t}\n\n\t/**\n\t * Element priority. Decides in what order elements are wrapped by {@link module:engine/view/downcastwriter~DowncastWriter}.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget priority() {\n\t\treturn this._priority;\n\t}\n\n\t/**\n\t * Element identifier. If set, it is used by {@link module:engine/view/element~Element#isSimilar},\n\t * and then two elements are considered similar if, and only if they have the same `id`.\n\t *\n\t * @readonly\n\t * @type {String|Number}\n\t */\n\tget id() {\n\t\treturn this._id;\n\t}\n\n\t/**\n\t * Returns all {@link module:engine/view/attributeelement~AttributeElement attribute elements} that has the\n\t * same {@link module:engine/view/attributeelement~AttributeElement#id id} and are in the view tree (were not removed).\n\t *\n\t * Note: If this element has been removed from the tree, returned set will not include it.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError attribute-element-get-elements-with-same-id-no-id}\n\t * if this element has no `id`.\n\t *\n\t * @returns {Set.<module:engine/view/attributeelement~AttributeElement>} Set containing all the attribute elements\n\t * with the same `id` that were added and not removed from the view tree.\n\t */\n\tgetElementsWithSameId() {\n\t\tif ( this.id === null ) {\n\t\t\t/**\n\t\t\t * Cannot get elements with the same id for an attribute element without id.\n\t\t\t *\n\t\t\t * @error attribute-element-get-elements-with-same-id-no-id\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'attribute-element-get-elements-with-same-id-no-id',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\n\t\treturn new Set( this._clonesGroup );\n\t}\n\n\t/**\n\t * Checks whether this object is of the given.\n\t *\n\t *\t\tattributeElement.is( 'attributeElement' ); // -> true\n\t *\t\tattributeElement.is( 'element' ); // -> true\n\t *\t\tattributeElement.is( 'node' ); // -> true\n\t *\t\tattributeElement.is( 'view:attributeElement' ); // -> true\n\t *\t\tattributeElement.is( 'view:element' ); // -> true\n\t *\t\tattributeElement.is( 'view:node' ); // -> true\n\t *\n\t *\t\tattributeElement.is( 'model:element' ); // -> false\n\t *\t\tattributeElement.is( 'documentFragment' ); // -> false\n\t *\n\t * Assuming that the object being checked is an attribute element, you can also check its\n\t * {@link module:engine/view/attributeelement~AttributeElement#name name}:\n\t *\n\t *\t\tattributeElement.is( 'element', 'b' ); // -> true if this is a bold element\n\t *\t\tattributeElement.is( 'attributeElement', 'b' ); // -> same as above\n\t *\t\ttext.is( 'element', 'b' ); -> false\n\t *\n\t * {@link module:engine/view/node~Node#is Check the entire list of view objects} which implement the `is()` method.\n\t *\n\t * @param {String} type Type to check.\n\t * @param {String} [name] Element name.\n\t * @returns {Boolean}\n\t */\n\tis( type, name = null ) {\n\t\tif ( !name ) {\n\t\t\treturn type === 'attributeElement' || type === 'view:attributeElement' ||\n\t\t\t\t// From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n\t\t\t\ttype === 'element' || type === 'view:element' ||\n\t\t\t\ttype === 'node' || type === 'view:node';\n\t\t} else {\n\t\t\treturn name === this.name && (\n\t\t\t\ttype === 'attributeElement' || type === 'view:attributeElement' ||\n\t\t\t\t// From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n\t\t\t\ttype === 'element' || type === 'view:element'\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Checks if this element is similar to other element.\n\t *\n\t * If none of elements has set {@link module:engine/view/attributeelement~AttributeElement#id}, then both elements\n\t * should have the same name, attributes and priority to be considered as similar. Two similar elements can contain\n\t * different set of children nodes.\n\t *\n\t * If at least one element has {@link module:engine/view/attributeelement~AttributeElement#id} set, then both\n\t * elements have to have the same {@link module:engine/view/attributeelement~AttributeElement#id} value to be\n\t * considered similar.\n\t *\n\t * Similarity is important for {@link module:engine/view/downcastwriter~DowncastWriter}. For example:\n\t *\n\t * * two following similar elements can be merged together into one, longer element,\n\t * * {@link module:engine/view/downcastwriter~DowncastWriter#unwrap} checks similarity of passed element and processed element to\n\t * decide whether processed element should be unwrapped,\n\t * * etc.\n\t *\n\t * @param {module:engine/view/element~Element} otherElement\n\t * @returns {Boolean}\n\t */\n\tisSimilar( otherElement ) {\n\t\t// If any element has an `id` set, just compare the ids.\n\t\tif ( this.id !== null || otherElement.id !== null ) {\n\t\t\treturn this.id === otherElement.id;\n\t\t}\n\n\t\treturn super.isSimilar( otherElement ) && this.priority == otherElement.priority;\n\t}\n\n\t/**\n\t * Clones provided element with priority.\n\t *\n\t * @protected\n\t * @param {Boolean} deep If set to `true` clones element and all its children recursively. When set to `false`,\n\t * element will be cloned without any children.\n\t * @returns {module:engine/view/attributeelement~AttributeElement} Clone of this element.\n\t */\n\t_clone( deep ) {\n\t\tconst cloned = super._clone( deep );\n\n\t\t// Clone priority too.\n\t\tcloned._priority = this._priority;\n\n\t\t// And id too.\n\t\tcloned._id = this._id;\n\n\t\treturn cloned;\n\t}\n}\n\n/**\n * Default attribute priority.\n *\n * @member {Number} module:engine/view/attributeelement~AttributeElement.DEFAULT_PRIORITY\n */\nAttributeElement.DEFAULT_PRIORITY = DEFAULT_PRIORITY;\n\n// Returns block {@link module:engine/view/filler~Filler filler} offset or `null` if block filler is not needed.\n//\n// @returns {Number|null} Block filler offset or `null` if block filler is not needed.\nfunction getFillerOffset() {\n\t// <b>foo</b> does not need filler.\n\tif ( nonUiChildrenCount( this ) ) {\n\t\treturn null;\n\t}\n\n\tlet element = this.parent;\n\n\t// <p><b></b></p> needs filler -> <p><b><br></b></p>\n\twhile ( element && element.is( 'attributeElement' ) ) {\n\t\tif ( nonUiChildrenCount( element ) > 1 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\telement = element.parent;\n\t}\n\n\tif ( !element || nonUiChildrenCount( element ) > 1 ) {\n\t\treturn null;\n\t}\n\n\t// Render block filler at the end of element (after all ui elements).\n\treturn this.childCount;\n}\n\n// Returns total count of children that are not {@link module:engine/view/uielement~UIElement UIElements}.\n//\n// @param {module:engine/view/element~Element} element\n// @returns {Number}\nfunction nonUiChildrenCount( element ) {\n\treturn Array.from( element.getChildren() ).filter( element => !element.is( 'uiElement' ) ).length;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/emptyelement\n */\n\nimport Element from './element';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport Node from './node';\n\n/**\n * Empty element class. It is used to represent elements that cannot contain any child nodes (for example `<img>` elements).\n *\n * To create a new empty element use the\n * {@link module:engine/view/downcastwriter~DowncastWriter#createEmptyElement `downcastWriter#createEmptyElement()`} method.\n *\n * @extends module:engine/view/element~Element\n */\nexport default class EmptyElement extends Element {\n\t/**\n\t * Creates new instance of EmptyElement.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-emptyelement-cannot-add` when third parameter is passed,\n\t * to inform that usage of EmptyElement is incorrect (adding child nodes to EmptyElement is forbidden).\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#createEmptyElement\n\t * @protected\n\t * @param {module:engine/view/document~Document} document The document instance to which this element belongs.\n\t * @param {String} name Node name.\n\t * @param {Object|Iterable} [attrs] Collection of attributes.\n\t * @param {module:engine/view/node~Node|Iterable.<module:engine/view/node~Node>} [children]\n\t * A list of nodes to be inserted into created element.\n\t */\n\tconstructor( document, name, attrs, children ) {\n\t\tsuper( document, name, attrs, children );\n\n\t\t// Override the default of the base class.\n\t\tthis._isAllowedInsideAttributeElement = true;\n\n\t\t/**\n\t\t * Returns `null` because filler is not needed for EmptyElements.\n\t\t *\n\t\t * @method #getFillerOffset\n\t\t * @returns {null} Always returns null.\n\t\t */\n\t\tthis.getFillerOffset = getFillerOffset;\n\t}\n\n\t/**\n\t * Checks whether this object is of the given.\n\t *\n\t *\t\temptyElement.is( 'emptyElement' ); // -> true\n\t *\t\temptyElement.is( 'element' ); // -> true\n\t *\t\temptyElement.is( 'node' ); // -> true\n\t *\t\temptyElement.is( 'view:emptyElement' ); // -> true\n\t *\t\temptyElement.is( 'view:element' ); // -> true\n\t *\t\temptyElement.is( 'view:node' ); // -> true\n\t *\n\t *\t\temptyElement.is( 'model:element' ); // -> false\n\t *\t\temptyElement.is( 'documentFragment' ); // -> false\n\t *\n\t * Assuming that the object being checked is an empty element, you can also check its\n\t * {@link module:engine/view/emptyelement~EmptyElement#name name}:\n\t *\n\t *\t\temptyElement.is( 'element', 'img' ); // -> true if this is a img element\n\t *\t\temptyElement.is( 'emptyElement', 'img' ); // -> same as above\n\t *\t\ttext.is( 'element', 'img' ); -> false\n\t *\n\t * {@link module:engine/view/node~Node#is Check the entire list of view objects} which implement the `is()` method.\n\t *\n\t * @param {String} type Type to check.\n\t * @param {String} [name] Element name.\n\t * @returns {Boolean}\n\t */\n\tis( type, name = null ) {\n\t\tif ( !name ) {\n\t\t\treturn type === 'emptyElement' || type === 'view:emptyElement' ||\n\t\t\t\t// From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n\t\t\t\ttype === 'element' || type === 'view:element' ||\n\t\t\t\ttype === 'node' || type === 'view:node';\n\t\t} else {\n\t\t\treturn name === this.name && (\n\t\t\t\ttype === 'emptyElement' || type === 'view:emptyElement' ||\n\t\t\t\ttype === 'element' || type === 'view:element'\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Overrides {@link module:engine/view/element~Element#_insertChild} method.\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-emptyelement-cannot-add` to prevent\n\t * adding any child nodes to EmptyElement.\n\t *\n\t * @protected\n\t */\n\t_insertChild( index, nodes ) {\n\t\tif ( nodes && ( nodes instanceof Node || Array.from( nodes ).length > 0 ) ) {\n\t\t\t/**\n\t\t\t * Cannot add children to {@link module:engine/view/emptyelement~EmptyElement}.\n\t\t\t *\n\t\t\t * @error view-emptyelement-cannot-add\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'view-emptyelement-cannot-add',\n\t\t\t\t[ this, nodes ]\n\t\t\t);\n\t\t}\n\t}\n}\n\n// Returns `null` because block filler is not needed for EmptyElements.\n//\n// @returns {null}\nfunction getFillerOffset() {\n\treturn null;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* globals navigator:false */\n\n/**\n * @module utils/env\n */\n\nconst userAgent = navigator.userAgent.toLowerCase();\n\n/**\n * A namespace containing environment and browser information.\n *\n * @namespace\n */\nconst env = {\n\t/**\n\t * Indicates that the application is running on Macintosh.\n\t *\n\t * @static\n\t * @type {Boolean}\n\t */\n\tisMac: isMac( userAgent ),\n\n\t/**\n\t * Indicates that the application is running on Windows.\n\t *\n\t * @static\n\t * @type {Boolean}\n\t */\n\tisWindows: isWindows( userAgent ),\n\n\t/**\n\t * Indicates that the application is running in Firefox (Gecko).\n\t *\n\t * @static\n\t * @type {Boolean}\n\t */\n\tisGecko: isGecko( userAgent ),\n\n\t/**\n\t * Indicates that the application is running in Safari.\n\t *\n\t * @static\n\t * @type {Boolean}\n\t */\n\tisSafari: isSafari( userAgent ),\n\n\t/**\n\t * Indicates the the application is running in iOS.\n\t *\n\t * @static\n\t * @type {Boolean}\n\t */\n\tisiOS: isiOS( userAgent ),\n\n\t/**\n\t * Indicates that the application is running on Android mobile device.\n\t *\n\t * @static\n\t * @type {Boolean}\n\t */\n\tisAndroid: isAndroid( userAgent ),\n\n\t/**\n\t * Indicates that the application is running in a browser using the Blink engine.\n\t *\n\t * @static\n\t * @type {Boolean}\n\t */\n\tisBlink: isBlink( userAgent ),\n\n\t/**\n\t * Environment features information.\n\t *\n\t * @memberOf module:utils/env~env\n\t * @namespace\n\t */\n\tfeatures: {\n\t\t/**\n\t\t * Indicates that the environment supports ES2018 Unicode property escapes — like `\\p{P}` or `\\p{L}`.\n\t\t * More information about unicode properties might be found\n\t\t * [in Unicode Standard Annex #44](https://www.unicode.org/reports/tr44/#GC_Values_Table).\n\t\t *\n\t\t * @type {Boolean}\n\t\t */\n\t\tisRegExpUnicodePropertySupported: isRegExpUnicodePropertySupported()\n\t}\n};\n\nexport default env;\n\n/**\n * Checks if User Agent represented by the string is running on Macintosh.\n *\n * @param {String} userAgent **Lowercase** `navigator.userAgent` string.\n * @returns {Boolean} Whether User Agent is running on Macintosh or not.\n */\nexport function isMac( userAgent ) {\n\treturn userAgent.indexOf( 'macintosh' ) > -1;\n}\n\n/**\n * Checks if User Agent represented by the string is running on Windows.\n *\n * @param {String} userAgent **Lowercase** `navigator.userAgent` string.\n * @returns {Boolean} Whether User Agent is running on Windows or not.\n */\nexport function isWindows( userAgent ) {\n\treturn userAgent.indexOf( 'windows' ) > -1;\n}\n\n/**\n * Checks if User Agent represented by the string is Firefox (Gecko).\n *\n * @param {String} userAgent **Lowercase** `navigator.userAgent` string.\n * @returns {Boolean} Whether User Agent is Firefox or not.\n */\nexport function isGecko( userAgent ) {\n\treturn !!userAgent.match( /gecko\\/\\d+/ );\n}\n\n/**\n * Checks if User Agent represented by the string is Safari.\n *\n * @param {String} userAgent **Lowercase** `navigator.userAgent` string.\n * @returns {Boolean} Whether User Agent is Safari or not.\n */\nexport function isSafari( userAgent ) {\n\treturn userAgent.indexOf( ' applewebkit/' ) > -1 && userAgent.indexOf( 'chrome' ) === -1;\n}\n\n/**\n * Checks if User Agent represented by the string is running in iOS.\n *\n * @param {String} userAgent **Lowercase** `navigator.userAgent` string.\n * @returns {Boolean} Whether User Agent is running in iOS or not.\n */\nexport function isiOS( userAgent ) {\n\t// \"Request mobile site\" || \"Request desktop site\".\n\treturn !!userAgent.match( /iphone|ipad/i ) || ( isMac( userAgent ) && navigator.maxTouchPoints > 0 );\n}\n\n/**\n * Checks if User Agent represented by the string is Android mobile device.\n *\n * @param {String} userAgent **Lowercase** `navigator.userAgent` string.\n * @returns {Boolean} Whether User Agent is Safari or not.\n */\nexport function isAndroid( userAgent ) {\n\treturn userAgent.indexOf( 'android' ) > -1;\n}\n\n/**\n * Checks if User Agent represented by the string is Blink engine.\n *\n * @param {String} userAgent **Lowercase** `navigator.userAgent` string.\n * @returns {Boolean} Whether User Agent is Blink engine or not.\n */\nexport function isBlink( userAgent ) {\n\t// The Edge browser before switching to the Blink engine used to report itself as Chrome (and \"Edge/\")\n\t// but after switching to the Blink it replaced \"Edge/\" with \"Edg/\".\n\treturn userAgent.indexOf( 'chrome/' ) > -1 && userAgent.indexOf( 'edge/' ) < 0;\n}\n\n/**\n * Checks if the current environment supports ES2018 Unicode properties like `\\p{P}` or `\\p{L}`.\n * More information about unicode properties might be found\n * [in Unicode Standard Annex #44](https://www.unicode.org/reports/tr44/#GC_Values_Table).\n *\n * @returns {Boolean}\n */\nexport function isRegExpUnicodePropertySupported() {\n\tlet isSupported = false;\n\n\t// Feature detection for Unicode properties. Added in ES2018. Currently Firefox does not support it.\n\t// See https://github.com/ckeditor/ckeditor5-mention/issues/44#issuecomment-487002174.\n\n\ttry {\n\t\t// Usage of regular expression literal cause error during build (ckeditor/ckeditor5-dev#534).\n\t\tisSupported = 'ć'.search( new RegExp( '[\\\\p{L}]', 'u' ) ) === 0;\n\t} catch ( error ) {\n\t\t// Firefox throws a SyntaxError when the group is unsupported.\n\t}\n\n\treturn isSupported;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A set of utilities related to keyboard support.\n *\n * @module utils/keyboard\n */\n\nimport CKEditorError from './ckeditorerror';\nimport env from './env';\n\nconst modifiersToGlyphsMac = {\n\tctrl: '⌃',\n\tcmd: '⌘',\n\talt: '⌥',\n\tshift: '⇧'\n};\n\nconst modifiersToGlyphsNonMac = {\n\tctrl: 'Ctrl+',\n\talt: 'Alt+',\n\tshift: 'Shift+'\n};\n\n/**\n * An object with `keyName => keyCode` pairs for a set of known keys.\n *\n * Contains:\n *\n * * `a-z`,\n * * `0-9`,\n * * `f1-f12`,\n * * `` ` ``, `-`, `=`, `[`, `]`, `;`, `'`, `,`, `.`, `/`, `\\`,\n * * `arrow(left|up|right|bottom)`,\n * * `backspace`, `delete`, `enter`, `esc`, `tab`,\n * * `ctrl`, `cmd`, `shift`, `alt`.\n */\nexport const keyCodes = generateKnownKeyCodes();\n\nconst keyCodeNames = Object.fromEntries(\n\tObject.entries( keyCodes ).map( ( [ name, code ] ) => [ code, name.charAt( 0 ).toUpperCase() + name.slice( 1 ) ] )\n);\n\n/**\n * Converts a key name or {@link module:utils/keyboard~KeystrokeInfo keystroke info} into a key code.\n *\n * Note: Key names are matched with {@link module:utils/keyboard~keyCodes} in a case-insensitive way.\n *\n * @param {String|module:utils/keyboard~KeystrokeInfo} A key name (see {@link module:utils/keyboard~keyCodes})\n * or a keystroke data object.\n * @returns {Number} Key or keystroke code.\n */\nexport function getCode( key ) {\n\tlet keyCode;\n\n\tif ( typeof key == 'string' ) {\n\t\tkeyCode = keyCodes[ key.toLowerCase() ];\n\n\t\tif ( !keyCode ) {\n\t\t\t/**\n\t\t\t * Unknown key name. Only key names included in the {@link module:utils/keyboard~keyCodes} can be used.\n\t\t\t *\n\t\t\t * @error keyboard-unknown-key\n\t\t\t * @param {String} key\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'keyboard-unknown-key', null, { key } );\n\t\t}\n\t} else {\n\t\tkeyCode = key.keyCode +\n\t\t\t( key.altKey ? keyCodes.alt : 0 ) +\n\t\t\t( key.ctrlKey ? keyCodes.ctrl : 0 ) +\n\t\t\t( key.shiftKey ? keyCodes.shift : 0 ) +\n\t\t\t( key.metaKey ? keyCodes.cmd : 0 );\n\t}\n\n\treturn keyCode;\n}\n\n/**\n * Parses the keystroke and returns a keystroke code that will match the code returned by\n * {@link module:utils/keyboard~getCode} for the corresponding {@link module:utils/keyboard~KeystrokeInfo keystroke info}.\n *\n * The keystroke can be passed in two formats:\n *\n * * as a single string – e.g. `ctrl + A`,\n * * as an array of {@link module:utils/keyboard~keyCodes known key names} and key codes – e.g.:\n * * `[ 'ctrl', 32 ]` (ctrl + space),\n * * `[ 'ctrl', 'a' ]` (ctrl + A).\n *\n * Note: Key names are matched with {@link module:utils/keyboard~keyCodes} in a case-insensitive way.\n *\n * Note: Only keystrokes with a single non-modifier key are supported (e.g. `ctrl+A` is OK, but `ctrl+A+B` is not).\n *\n * Note: On macOS, keystroke handling is translating the `Ctrl` key to the `Cmd` key and handling only that keystroke.\n * For example, a registered keystroke `Ctrl+A` will be translated to `Cmd+A` on macOS. To disable the translation of some keystroke,\n * use the forced modifier: `Ctrl!+A` (note the exclamation mark).\n *\n * @param {String|Array.<Number|String>} keystroke The keystroke definition.\n * @returns {Number} Keystroke code.\n */\nexport function parseKeystroke( keystroke ) {\n\tif ( typeof keystroke == 'string' ) {\n\t\tkeystroke = splitKeystrokeText( keystroke );\n\t}\n\n\treturn keystroke\n\t\t.map( key => ( typeof key == 'string' ) ? getEnvKeyCode( key ) : key )\n\t\t.reduce( ( key, sum ) => sum + key, 0 );\n}\n\n/**\n * Translates any keystroke string text like `\"Ctrl+A\"` to an\n * environment–specific keystroke, i.e. `\"⌘A\"` on macOS.\n *\n * @param {String} keystroke The keystroke text.\n * @returns {String} The keystroke text specific for the environment.\n */\nexport function getEnvKeystrokeText( keystroke ) {\n\tlet keystrokeCode = parseKeystroke( keystroke );\n\n\tconst modifiersToGlyphs = Object.entries( env.isMac ? modifiersToGlyphsMac : modifiersToGlyphsNonMac );\n\n\tconst modifiers = modifiersToGlyphs.reduce( ( modifiers, [ name, glyph ] ) => {\n\t\t// Modifier keys are stored as a bit mask so extract those from the keystroke code.\n\t\tif ( ( keystrokeCode & keyCodes[ name ] ) != 0 ) {\n\t\t\tkeystrokeCode &= ~keyCodes[ name ];\n\t\t\tmodifiers += glyph;\n\t\t}\n\n\t\treturn modifiers;\n\t}, '' );\n\n\treturn modifiers + ( keystrokeCode ? keyCodeNames[ keystrokeCode ] : '' );\n}\n\n/**\n * Returns `true` if the provided key code represents one of the arrow keys.\n *\n * @param {Number} keyCode A key code as in {@link module:utils/keyboard~KeystrokeInfo#keyCode}.\n * @returns {Boolean}\n */\nexport function isArrowKeyCode( keyCode ) {\n\treturn keyCode == keyCodes.arrowright ||\n\t\tkeyCode == keyCodes.arrowleft ||\n\t\tkeyCode == keyCodes.arrowup ||\n\t\tkeyCode == keyCodes.arrowdown;\n}\n\n/**\n * Returns the direction in which the {@link module:engine/model/documentselection~DocumentSelection selection}\n * will move when the provided arrow key code is pressed considering the language direction of the editor content.\n *\n * For instance, in right–to–left (RTL) content languages, pressing the left arrow means moving the selection right (forward)\n * in the model structure. Similarly, pressing the right arrow moves the selection left (backward).\n *\n * @param {Number} keyCode A key code as in {@link module:utils/keyboard~KeystrokeInfo#keyCode}.\n * @param {'ltr'|'rtl'} contentLanguageDirection The content language direction, corresponding to\n * {@link module:utils/locale~Locale#contentLanguageDirection}.\n * @returns {'left'|'up'|'right'|'down'} Localized arrow direction.\n */\nexport function getLocalizedArrowKeyCodeDirection( keyCode, contentLanguageDirection ) {\n\tconst isLtrContent = contentLanguageDirection === 'ltr';\n\n\tswitch ( keyCode ) {\n\t\tcase keyCodes.arrowleft:\n\t\t\treturn isLtrContent ? 'left' : 'right';\n\n\t\tcase keyCodes.arrowright:\n\t\t\treturn isLtrContent ? 'right' : 'left';\n\n\t\tcase keyCodes.arrowup:\n\t\t\treturn 'up';\n\n\t\tcase keyCodes.arrowdown:\n\t\t\treturn 'down';\n\t}\n}\n\n// Converts a key name to the key code with mapping based on the env.\n//\n// See: {@link module:utils/keyboard~getCode}.\n//\n// @param {String} key The key name (see {@link module:utils/keyboard~keyCodes}).\n// @returns {Number} Key code.\nfunction getEnvKeyCode( key ) {\n\t// Don't remap modifier key for forced modifiers.\n\tif ( key.endsWith( '!' ) ) {\n\t\treturn getCode( key.slice( 0, -1 ) );\n\t}\n\n\tconst code = getCode( key );\n\n\treturn env.isMac && code == keyCodes.ctrl ? keyCodes.cmd : code;\n}\n\n/**\n * Determines if the provided key code moves the {@link module:engine/model/documentselection~DocumentSelection selection}\n * forward or backward considering the language direction of the editor content.\n *\n * For instance, in right–to–left (RTL) languages, pressing the left arrow means moving forward\n * in the model structure. Similarly, pressing the right arrow moves the selection backward.\n *\n * @param {Number} keyCode A key code as in {@link module:utils/keyboard~KeystrokeInfo#keyCode}.\n * @param {'ltr'|'rtl'} contentLanguageDirection The content language direction, corresponding to\n * {@link module:utils/locale~Locale#contentLanguageDirection}.\n * @returns {Boolean}\n */\nexport function isForwardArrowKeyCode( keyCode, contentLanguageDirection ) {\n\tconst localizedKeyCodeDirection = getLocalizedArrowKeyCodeDirection( keyCode, contentLanguageDirection );\n\n\treturn localizedKeyCodeDirection === 'down' || localizedKeyCodeDirection === 'right';\n}\n\nfunction generateKnownKeyCodes() {\n\tconst keyCodes = {\n\t\tarrowleft: 37,\n\t\tarrowup: 38,\n\t\tarrowright: 39,\n\t\tarrowdown: 40,\n\t\tbackspace: 8,\n\t\tdelete: 46,\n\t\tenter: 13,\n\t\tspace: 32,\n\t\tesc: 27,\n\t\ttab: 9,\n\n\t\t// The idea about these numbers is that they do not collide with any real key codes, so we can use them\n\t\t// like bit masks.\n\t\tctrl: 0x110000,\n\t\tshift: 0x220000,\n\t\talt: 0x440000,\n\t\tcmd: 0x880000\n\t};\n\n\t// a-z\n\tfor ( let code = 65; code <= 90; code++ ) {\n\t\tconst letter = String.fromCharCode( code );\n\n\t\tkeyCodes[ letter.toLowerCase() ] = code;\n\t}\n\n\t// 0-9\n\tfor ( let code = 48; code <= 57; code++ ) {\n\t\tkeyCodes[ code - 48 ] = code;\n\t}\n\n\t// F1-F12\n\tfor ( let code = 112; code <= 123; code++ ) {\n\t\tkeyCodes[ 'f' + ( code - 111 ) ] = code;\n\t}\n\n\t// other characters\n\tfor ( const char of '`-=[];\\',./\\\\' ) {\n\t\tkeyCodes[ char ] = char.charCodeAt( 0 );\n\t}\n\n\treturn keyCodes;\n}\n\nfunction splitKeystrokeText( keystroke ) {\n\treturn keystroke.split( '+' ).map( key => key.trim() );\n}\n\n/**\n * Information about the keystroke.\n *\n * @interface module:utils/keyboard~KeystrokeInfo\n */\n\n/**\n * The [key code](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode).\n *\n * @member {Number} module:utils/keyboard~KeystrokeInfo#keyCode\n */\n\n/**\n * Whether the <kbd>Alt</kbd> modifier was pressed.\n *\n * @member {Boolean} module:utils/keyboard~KeystrokeInfo#altKey\n */\n\n/**\n * Whether the <kbd>Ctrl</kbd> modifier was pressed.\n *\n * @member {Boolean} module:utils/keyboard~KeystrokeInfo#ctrlKey\n */\n\n/**\n * Whether the <kbd>Shift</kbd> modifier was pressed.\n *\n * @member {Boolean} module:utils/keyboard~KeystrokeInfo#shiftKey\n */\n\n/**\n * Whether the <kbd>Cmd</kbd> modifier was pressed.\n *\n * @member {Boolean} module:utils/keyboard~KeystrokeInfo#metaKey\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/uielement\n */\n\nimport Element from './element';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport Node from './node';\nimport { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';\n\n/**\n * UI element class. It should be used to represent editing UI which needs to be injected into the editing view\n * If possible, you should keep your UI outside the editing view. However, if that is not possible,\n * UI elements can be used.\n *\n * How a UI element is rendered is in your control (you pass a callback to\n * {@link module:engine/view/downcastwriter~DowncastWriter#createUIElement `downcastWriter#createUIElement()`}).\n * The editor will ignore your UI element – the selection cannot be placed in it, it is skipped (invisible) when\n * the user modifies the selection by using arrow keys and the editor does not listen to any mutations which\n * happen inside your UI elements.\n *\n * The limitation is that you cannot convert a model element to a UI element. UI elements need to be\n * created for {@link module:engine/model/markercollection~Marker markers} or as additinal elements\n * inside normal {@link module:engine/view/containerelement~ContainerElement container elements}.\n *\n * To create a new UI element use the\n * {@link module:engine/view/downcastwriter~DowncastWriter#createUIElement `downcastWriter#createUIElement()`} method.\n *\n * @extends module:engine/view/element~Element\n */\nexport default class UIElement extends Element {\n\t/**\n\t * Creates new instance of UIElement.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-uielement-cannot-add` when third parameter is passed,\n\t * to inform that usage of UIElement is incorrect (adding child nodes to UIElement is forbidden).\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#createUIElement\n\t * @protected\n\t * @param {module:engine/view/document~Document} document The document instance to which this element belongs.\n\t * @param {String} name Node name.\n\t * @param {Object|Iterable} [attributes] Collection of attributes.\n\t * @param {module:engine/view/node~Node|Iterable.<module:engine/view/node~Node>} [children]\n\t * A list of nodes to be inserted into created element.\n\t */\n\tconstructor( document, name, attributes, children ) {\n\t\tsuper( document, name, attributes, children );\n\n\t\t// Override the default of the base class.\n\t\tthis._isAllowedInsideAttributeElement = true;\n\n\t\t/**\n\t\t * Returns `null` because filler is not needed for UIElements.\n\t\t *\n\t\t * @method #getFillerOffset\n\t\t * @returns {null} Always returns null.\n\t\t */\n\t\tthis.getFillerOffset = getFillerOffset;\n\t}\n\n\t/**\n\t * Checks whether this object is of the given.\n\t *\n\t *\t\tuiElement.is( 'uiElement' ); // -> true\n\t *\t\tuiElement.is( 'element' ); // -> true\n\t *\t\tuiElement.is( 'node' ); // -> true\n\t *\t\tuiElement.is( 'view:uiElement' ); // -> true\n\t *\t\tuiElement.is( 'view:element' ); // -> true\n\t *\t\tuiElement.is( 'view:node' ); // -> true\n\t *\n\t *\t\tuiElement.is( 'model:element' ); // -> false\n\t *\t\tuiElement.is( 'documentFragment' ); // -> false\n\t *\n\t * Assuming that the object being checked is an ui element, you can also check its\n\t * {@link module:engine/view/uielement~UIElement#name name}:\n\t *\n\t *\t\tuiElement.is( 'element', 'span' ); // -> true if this is a span ui element\n\t *\t\tuiElement.is( 'uiElement', 'span' ); // -> same as above\n\t *\t\ttext.is( 'element', 'span' ); -> false\n\t *\n\t * {@link module:engine/view/node~Node#is Check the entire list of view objects} which implement the `is()` method.\n\t *\n\t * @param {String} type Type to check.\n\t * @param {String} [name] Element name.\n\t * @returns {Boolean}\n\t */\n\tis( type, name = null ) {\n\t\tif ( !name ) {\n\t\t\treturn type === 'uiElement' || type === 'view:uiElement' ||\n\t\t\t\t// From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n\t\t\t\ttype === 'element' || type === 'view:element' ||\n\t\t\t\ttype === 'node' || type === 'view:node';\n\t\t} else {\n\t\t\treturn name === this.name && (\n\t\t\t\ttype === 'uiElement' || type === 'view:uiElement' ||\n\t\t\t\ttype === 'element' || type === 'view:element'\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Overrides {@link module:engine/view/element~Element#_insertChild} method.\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-uielement-cannot-add` to prevent adding any child nodes\n\t * to UIElement.\n\t *\n\t * @protected\n\t */\n\t_insertChild( index, nodes ) {\n\t\tif ( nodes && ( nodes instanceof Node || Array.from( nodes ).length > 0 ) ) {\n\t\t\t/**\n\t\t\t * Cannot add children to {@link module:engine/view/uielement~UIElement}.\n\t\t\t *\n\t\t\t * @error view-uielement-cannot-add\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-uielement-cannot-add', this );\n\t\t}\n\t}\n\n\t/**\n\t * Renders this {@link module:engine/view/uielement~UIElement} to DOM. This method is called by\n\t * {@link module:engine/view/domconverter~DomConverter}.\n\t * Do not use inheritance to create custom rendering method, replace `render()` method instead:\n\t *\n\t *\t\tconst myUIElement = downcastWriter.createUIElement( 'span' );\n\t *\t\tmyUIElement.render = function( domDocument, domConverter ) {\n\t *\t\t\tconst domElement = this.toDomElement( domDocument );\n\t *\n\t *\t\t\tdomConverter.setContentOf( domElement, '<b>this is ui element</b>' );\n\t *\n\t *\t\t\treturn domElement;\n\t *\t\t};\n\t *\n\t * If changes in your UI element should trigger some editor UI update you should call\n\t * the {@link module:core/editor/editorui~EditorUI#update `editor.ui.update()`} method\n\t * after rendering your UI element.\n\t *\n\t * @param {Document} domDocument\n\t * @param {module:engine/view/domconverter~DomConverter} domConverter Instance of the DomConverter used to optimize the output.\n\t * @returns {HTMLElement}\n\t */\n\trender( domDocument ) {\n\t\t// Provide basic, default output.\n\t\treturn this.toDomElement( domDocument );\n\t}\n\n\t/**\n\t * Creates DOM element based on this view UIElement.\n\t * Note that each time this method is called new DOM element is created.\n\t *\n\t * @param {Document} domDocument\n\t * @returns {HTMLElement}\n\t */\n\ttoDomElement( domDocument ) {\n\t\tconst domElement = domDocument.createElement( this.name );\n\n\t\tfor ( const key of this.getAttributeKeys() ) {\n\t\t\tdomElement.setAttribute( key, this.getAttribute( key ) );\n\t\t}\n\n\t\treturn domElement;\n\t}\n}\n\n/**\n * This function injects UI element handling to the given {@link module:engine/view/document~Document document}.\n *\n * A callback is added to {@link module:engine/view/document~Document#event:keydown document keydown event}.\n * The callback handles the situation when right arrow key is pressed and selection is collapsed before a UI element.\n * Without this handler, it would be impossible to \"jump over\" UI element using right arrow key.\n *\n * @param {module:engine/view/view~View} view View controller to which the quirks handling will be injected.\n */\nexport function injectUiElementHandling( view ) {\n\tview.document.on( 'arrowKey', ( evt, data ) => jumpOverUiElement( evt, data, view.domConverter ), { priority: 'low' } );\n}\n\n// Returns `null` because block filler is not needed for UIElements.\n//\n// @returns {null}\nfunction getFillerOffset() {\n\treturn null;\n}\n\n// Selection cannot be placed in a `UIElement`. Whenever it is placed there, it is moved before it. This\n// causes a situation when it is impossible to jump over `UIElement` using right arrow key, because the selection\n// ends up in ui element (in DOM) and is moved back to the left. This handler fixes this situation.\nfunction jumpOverUiElement( evt, data, domConverter ) {\n\tif ( data.keyCode == keyCodes.arrowright ) {\n\t\tconst domSelection = data.domTarget.ownerDocument.defaultView.getSelection();\n\t\tconst domSelectionCollapsed = domSelection.rangeCount == 1 && domSelection.getRangeAt( 0 ).collapsed;\n\n\t\t// Jump over UI element if selection is collapsed or shift key is pressed. These are the cases when selection would extend.\n\t\tif ( domSelectionCollapsed || data.shiftKey ) {\n\t\t\tconst domParent = domSelection.focusNode;\n\t\t\tconst domOffset = domSelection.focusOffset;\n\n\t\t\tconst viewPosition = domConverter.domPositionToView( domParent, domOffset );\n\n\t\t\t// In case if dom element is not converted to view or is not mapped or something. Happens for example in some tests.\n\t\t\tif ( viewPosition === null ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Skip all following ui elements.\n\t\t\tlet jumpedOverAnyUiElement = false;\n\n\t\t\tconst nextViewPosition = viewPosition.getLastMatchingPosition( value => {\n\t\t\t\tif ( value.item.is( 'uiElement' ) ) {\n\t\t\t\t\t// Remember that there was at least one ui element.\n\t\t\t\t\tjumpedOverAnyUiElement = true;\n\t\t\t\t}\n\n\t\t\t\t// Jump over ui elements, jump over empty attribute elements, move up from inside of attribute element.\n\t\t\t\tif ( value.item.is( 'uiElement' ) || value.item.is( 'attributeElement' ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// Don't jump over text or don't get out of container element.\n\t\t\t\treturn false;\n\t\t\t} );\n\n\t\t\t// If anything has been skipped, fix position.\n\t\t\t// This `if` could be possibly omitted but maybe it is better not to mess with DOM selection if not needed.\n\t\t\tif ( jumpedOverAnyUiElement ) {\n\t\t\t\tconst newDomPosition = domConverter.viewPositionToDom( nextViewPosition );\n\n\t\t\t\tif ( domSelectionCollapsed ) {\n\t\t\t\t\t// Selection was collapsed, so collapse it at further position.\n\t\t\t\t\tdomSelection.collapse( newDomPosition.parent, newDomPosition.offset );\n\t\t\t\t} else {\n\t\t\t\t\t// Selection was not collapse, so extend it instead of collapsing.\n\t\t\t\t\tdomSelection.extend( newDomPosition.parent, newDomPosition.offset );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/rawelement\n */\n\nimport Element from './element';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport Node from './node';\n\n/**\n * The raw element class.\n *\n * The raw elements work as data containers (\"wrappers\", \"sandboxes\") but their children are not managed or\n * even recognized by the editor. This encapsulation allows integrations to maintain custom DOM structures\n * in the editor content without, for instance, worrying about compatibility with other editor features.\n * Raw elements are a perfect tool for integration with external frameworks and data sources.\n *\n * Unlike {@link module:engine/view/uielement~UIElement UI elements}, raw elements act like real editor\n * content (similar to {@link module:engine/view/containerelement~ContainerElement} or\n * {@link module:engine/view/emptyelement~EmptyElement}), they are considered by the editor selection and\n * {@link module:widget/utils~toWidget they can work as widgets}.\n *\n * To create a new raw element, use the\n * {@link module:engine/view/downcastwriter~DowncastWriter#createRawElement `downcastWriter#createRawElement()`} method.\n *\n * @extends module:engine/view/element~Element\n */\nexport default class RawElement extends Element {\n\t/**\n\t * Creates a new instance of a raw element.\n\t *\n\t * Throws the `view-rawelement-cannot-add` {@link module:utils/ckeditorerror~CKEditorError CKEditorError} when the `children`\n\t * parameter is passed to inform that the usage of `RawElement` is incorrect (adding child nodes to `RawElement` is forbidden).\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#createRawElement\n\t * @protected\n\t * @param {module:engine/view/document~Document} document The document instance to which this element belongs.\n\t * @param {String} name A node name.\n\t * @param {Object|Iterable} [attrs] The collection of attributes.\n\t * @param {module:engine/view/node~Node|Iterable.<module:engine/view/node~Node>} [children]\n\t * A list of nodes to be inserted into the created element.\n\t */\n\tconstructor( document, name, attrs, children ) {\n\t\tsuper( document, name, attrs, children );\n\n\t\t// Override the default of the base class.\n\t\tthis._isAllowedInsideAttributeElement = true;\n\n\t\t/**\n\t\t * Returns `null` because filler is not needed for raw elements.\n\t\t *\n\t\t * @method #getFillerOffset\n\t\t * @returns {null} Always returns null.\n\t\t */\n\t\tthis.getFillerOffset = getFillerOffset;\n\t}\n\n\t/**\n\t * Checks whether this object is of the given type or name.\n\t *\n\t *\t\trawElement.is( 'rawElement' ); // -> true\n\t *\t\trawElement.is( 'element' ); // -> true\n\t *\t\trawElement.is( 'node' ); // -> true\n\t *\t\trawElement.is( 'view:rawElement' ); // -> true\n\t *\t\trawElement.is( 'view:element' ); // -> true\n\t *\t\trawElement.is( 'view:node' ); // -> true\n\t *\n\t *\t\trawElement.is( 'model:element' ); // -> false\n\t *\t\trawElement.is( 'documentFragment' ); // -> false\n\t *\n\t * Assuming that the object being checked is a raw element, you can also check its\n\t * {@link module:engine/view/rawelement~RawElement#name name}:\n\t *\n\t *\t\trawElement.is( 'img' ); // -> true if this is an img element\n\t *\t\trawElement.is( 'rawElement', 'img' ); // -> same as above\n\t *\t\ttext.is( 'img' ); -> false\n\t *\n\t * {@link module:engine/view/node~Node#is Check the entire list of view objects} which implement the `is()` method.\n\t *\n\t * @param {String} type The type to check when the `name` parameter is present.\n\t * Otherwise, it acts like the `name` parameter.\n\t * @param {String} [name] The element name.\n\t * @returns {Boolean}\n\t */\n\tis( type, name = null ) {\n\t\tif ( !name ) {\n\t\t\treturn type === 'rawElement' || type === 'view:rawElement' ||\n\t\t\t\t// From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n\t\t\t\ttype === this.name || type === 'view:' + this.name ||\n\t\t\t\ttype === 'element' || type === 'view:element' ||\n\t\t\t\ttype === 'node' || type === 'view:node';\n\t\t} else {\n\t\t\treturn name === this.name && (\n\t\t\t\ttype === 'rawElement' || type === 'view:rawElement' ||\n\t\t\t\ttype === 'element' || type === 'view:element'\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Overrides the {@link module:engine/view/element~Element#_insertChild} method.\n\t * Throws the `view-rawelement-cannot-add` {@link module:utils/ckeditorerror~CKEditorError CKEditorError} to prevent\n\t * adding any child nodes to a raw element.\n\t *\n\t * @protected\n\t */\n\t_insertChild( index, nodes ) {\n\t\tif ( nodes && ( nodes instanceof Node || Array.from( nodes ).length > 0 ) ) {\n\t\t\t/**\n\t\t\t * Cannot add children to a {@link module:engine/view/rawelement~RawElement} instance.\n\t\t\t *\n\t\t\t * @error view-rawelement-cannot-add\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'view-rawelement-cannot-add',\n\t\t\t\t[ this, nodes ]\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * This allows rendering the children of a {@link module:engine/view/rawelement~RawElement} on the DOM level.\n\t * This method is called by the {@link module:engine/view/domconverter~DomConverter} with the raw DOM element\n\t * passed as an argument, leaving the number and shape of the children up to the integrator.\n\t *\n\t * This method **must be defined** for the raw element to work:\n\t *\n\t *\t\tconst myRawElement = downcastWriter.createRawElement( 'div' );\n\t *\n\t *\t\tmyRawElement.render = function( domElement, domConverter ) {\n\t *\t\t\tdomConverter.setContentOf( domElement, '<b>This is the raw content of myRawElement.</b>' );\n\t *\t\t};\n\t *\n\t * @method #render\n\t * @param {HTMLElement} domElement The native DOM element representing the raw view element.\n\t * @param {module:engine/view/domconverter~DomConverter} domConverter Instance of the DomConverter used to optimize the output.\n\t */\n}\n\n// Returns `null` because block filler is not needed for raw elements.\n//\n// @returns {null}\nfunction getFillerOffset() {\n\treturn null;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/documentfragment\n */\n\nimport Text from './text';\nimport TextProxy from './textproxy';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\nimport isIterable from '@ckeditor/ckeditor5-utils/src/isiterable';\nimport EmitterMixin from '@ckeditor/ckeditor5-utils/src/emittermixin';\n\n/**\n * Document fragment.\n *\n * To create a new document fragment instance use the\n * {@link module:engine/view/upcastwriter~UpcastWriter#createDocumentFragment `UpcastWriter#createDocumentFragment()`}\n * method.\n */\nexport default class DocumentFragment {\n\t/**\n\t * Creates new DocumentFragment instance.\n\t *\n\t * @protected\n\t * @param {module:engine/view/document~Document} document The document to which this document fragment belongs.\n\t * @param {module:engine/view/node~Node|Iterable.<module:engine/view/node~Node>} [children]\n\t * A list of nodes to be inserted into the created document fragment.\n\t */\n\tconstructor( document, children ) {\n\t\t/**\n\t\t * The document to which this document fragment belongs.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/document~Document}\n\t\t */\n\t\tthis.document = document;\n\n\t\t/**\n\t\t * Array of child nodes.\n\t\t *\n\t\t * @protected\n\t\t * @member {Array.<module:engine/view/element~Element>} module:engine/view/documentfragment~DocumentFragment#_children\n\t\t */\n\t\tthis._children = [];\n\n\t\tif ( children ) {\n\t\t\tthis._insertChild( 0, children );\n\t\t}\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * Iterates over nodes added to this document fragment.\n\t *\n\t * @returns {Iterable.<module:engine/view/node~Node>}\n\t */\n\t[ Symbol.iterator ]() {\n\t\treturn this._children[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Number of child nodes in this document fragment.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget childCount() {\n\t\treturn this._children.length;\n\t}\n\n\t/**\n\t * Is `true` if there are no nodes inside this document fragment, `false` otherwise.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isEmpty() {\n\t\treturn this.childCount === 0;\n\t}\n\n\t/**\n\t * Artificial root of `DocumentFragment`. Returns itself. Added for compatibility reasons.\n\t *\n\t * @readonly\n\t * @type {module:engine/model/documentfragment~DocumentFragment}\n\t */\n\tget root() {\n\t\treturn this;\n\t}\n\n\t/**\n\t * Artificial parent of `DocumentFragment`. Returns `null`. Added for compatibility reasons.\n\t *\n\t * @readonly\n\t * @type {null}\n\t */\n\tget parent() {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Checks whether this object is of the given type.\n\t *\n\t *\t\tdocFrag.is( 'documentFragment' ); // -> true\n\t *\t\tdocFrag.is( 'view:documentFragment' ); // -> true\n\t *\n\t *\t\tdocFrag.is( 'model:documentFragment' ); // -> false\n\t *\t\tdocFrag.is( 'element' ); // -> false\n\t *\t\tdocFrag.is( 'node' ); // -> false\n\t *\n\t * {@link module:engine/view/node~Node#is Check the entire list of view objects} which implement the `is()` method.\n\t *\n\t * @param {String} type\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === 'documentFragment' || type === 'view:documentFragment';\n\t}\n\n\t/**\n\t * {@link module:engine/view/documentfragment~DocumentFragment#_insertChild Insert} a child node or a list of child nodes at the end\n\t * and sets the parent of these nodes to this fragment.\n\t *\n\t * @param {module:engine/view/item~Item|Iterable.<module:engine/view/item~Item>} items Items to be inserted.\n\t * @returns {Number} Number of appended nodes.\n\t */\n\t_appendChild( items ) {\n\t\treturn this._insertChild( this.childCount, items );\n\t}\n\n\t/**\n\t * Gets child at the given index.\n\t *\n\t * @param {Number} index Index of child.\n\t * @returns {module:engine/view/node~Node} Child node.\n\t */\n\tgetChild( index ) {\n\t\treturn this._children[ index ];\n\t}\n\n\t/**\n\t * Gets index of the given child node. Returns `-1` if child node is not found.\n\t *\n\t * @param {module:engine/view/node~Node} node Child node.\n\t * @returns {Number} Index of the child node.\n\t */\n\tgetChildIndex( node ) {\n\t\treturn this._children.indexOf( node );\n\t}\n\n\t/**\n\t * Gets child nodes iterator.\n\t *\n\t * @returns {Iterable.<module:engine/view/node~Node>} Child nodes iterator.\n\t */\n\tgetChildren() {\n\t\treturn this._children[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Inserts a child node or a list of child nodes on the given index and sets the parent of these nodes to\n\t * this fragment.\n\t *\n\t * @param {Number} index Position where nodes should be inserted.\n\t * @param {module:engine/view/item~Item|Iterable.<module:engine/view/item~Item>} items Items to be inserted.\n\t * @returns {Number} Number of inserted nodes.\n\t */\n\t_insertChild( index, items ) {\n\t\tthis._fireChange( 'children', this );\n\t\tlet count = 0;\n\n\t\tconst nodes = normalize( this.document, items );\n\n\t\tfor ( const node of nodes ) {\n\t\t\t// If node that is being added to this element is already inside another element, first remove it from the old parent.\n\t\t\tif ( node.parent !== null ) {\n\t\t\t\tnode._remove();\n\t\t\t}\n\n\t\t\tnode.parent = this;\n\n\t\t\tthis._children.splice( index, 0, node );\n\t\t\tindex++;\n\t\t\tcount++;\n\t\t}\n\n\t\treturn count;\n\t}\n\n\t/**\n\t * Removes number of child nodes starting at the given index and set the parent of these nodes to `null`.\n\t *\n\t * @param {Number} index Number of the first node to remove.\n\t * @param {Number} [howMany=1] Number of nodes to remove.\n\t * @returns {Array.<module:engine/view/node~Node>} The array of removed nodes.\n\t */\n\t_removeChildren( index, howMany = 1 ) {\n\t\tthis._fireChange( 'children', this );\n\n\t\tfor ( let i = index; i < index + howMany; i++ ) {\n\t\t\tthis._children[ i ].parent = null;\n\t\t}\n\n\t\treturn this._children.splice( index, howMany );\n\t}\n\n\t/**\n\t * Fires `change` event with given type of the change.\n\t *\n\t * @private\n\t * @param {module:engine/view/document~ChangeType} type Type of the change.\n\t * @param {module:engine/view/node~Node} node Changed node.\n\t * @fires module:engine/view/node~Node#change\n\t */\n\t_fireChange( type, node ) {\n\t\tthis.fire( 'change:' + type, node );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // printTree() {\n\t// @if CK_DEBUG_ENGINE //\tlet string = 'ViewDocumentFragment: [';\n\n\t// @if CK_DEBUG_ENGINE //\tfor ( const child of this.getChildren() ) {\n\t// @if CK_DEBUG_ENGINE //\t\tif ( child.is( '$text' ) ) {\n\t// @if CK_DEBUG_ENGINE //\t\t\tstring += '\\n' + '\\t'.repeat( 1 ) + child.data;\n\t// @if CK_DEBUG_ENGINE //\t\t} else {\n\t// @if CK_DEBUG_ENGINE //\t\t\tstring += '\\n' + child.printTree( 1 );\n\t// @if CK_DEBUG_ENGINE //\t\t}\n\t// @if CK_DEBUG_ENGINE //\t}\n\n\t// @if CK_DEBUG_ENGINE //\tstring += '\\n]';\n\n\t// @if CK_DEBUG_ENGINE //\treturn string;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // logTree() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( this.printTree() );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\nmix( DocumentFragment, EmitterMixin );\n\n// Converts strings to Text and non-iterables to arrays.\n//\n// @param {String|module:engine/view/item~Item|Iterable.<String|module:engine/view/item~Item>}\n// @returns {Iterable.<module:engine/view/node~Node>}\nfunction normalize( document, nodes ) {\n\t// Separate condition because string is iterable.\n\tif ( typeof nodes == 'string' ) {\n\t\treturn [ new Text( document, nodes ) ];\n\t}\n\n\tif ( !isIterable( nodes ) ) {\n\t\tnodes = [ nodes ];\n\t}\n\n\t// Array.from to enable .map() on non-arrays.\n\treturn Array.from( nodes )\n\t\t.map( node => {\n\t\t\tif ( typeof node == 'string' ) {\n\t\t\t\treturn new Text( document, node );\n\t\t\t}\n\n\t\t\tif ( node instanceof TextProxy ) {\n\t\t\t\treturn new Text( document, node.data );\n\t\t\t}\n\n\t\t\treturn node;\n\t\t} );\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module module:engine/view/downcastwriter\n */\n\nimport Position from './position';\nimport Range from './range';\nimport Selection from './selection';\nimport ContainerElement from './containerelement';\nimport AttributeElement from './attributeelement';\nimport EmptyElement from './emptyelement';\nimport UIElement from './uielement';\nimport RawElement from './rawelement';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport DocumentFragment from './documentfragment';\nimport isIterable from '@ckeditor/ckeditor5-utils/src/isiterable';\nimport Text from './text';\nimport EditableElement from './editableelement';\nimport { isPlainObject } from 'lodash-es';\n\n/**\n * View downcast writer.\n *\n * It provides a set of methods used to manipulate view nodes.\n *\n * Do not create an instance of this writer manually. To modify a view structure, use\n * the {@link module:engine/view/view~View#change `View#change()`} block.\n *\n * The `DowncastWriter` is designed to work with semantic views which are the views that were/are being downcasted from the model.\n * To work with ordinary views (e.g. parsed from a pasted content) use the\n * {@link module:engine/view/upcastwriter~UpcastWriter upcast writer}.\n *\n * Read more about changing the view in the {@glink framework/guides/architecture/editing-engine#changing-the-view Changing the view}\n * section of the {@glink framework/guides/architecture/editing-engine Editing engine architecture} guide.\n */\nexport default class DowncastWriter {\n\t/**\n\t * @param {module:engine/view/document~Document} document The view document instance.\n\t */\n\tconstructor( document ) {\n\t\t/**\n\t\t * The view document instance in which this writer operates.\n\t\t *\n\t\t * @readonly\n\t\t * @type {module:engine/view/document~Document}\n\t\t */\n\t\tthis.document = document;\n\n\t\t/**\n\t\t * Holds references to the attribute groups that share the same {@link module:engine/view/attributeelement~AttributeElement#id id}.\n\t\t * The keys are `id`s, the values are `Set`s holding {@link module:engine/view/attributeelement~AttributeElement}s.\n\t\t *\n\t\t * @private\n\t\t * @type {Map.<String,Set>}\n\t\t */\n\t\tthis._cloneGroups = new Map();\n\n\t\t/**\n\t\t * The slot factory used by the `elementToStructure` downcast helper.\n\t\t *\n\t\t * @private\n\t\t * @type {Function|null}\n\t\t */\n\t\tthis._slotFactory = null;\n\t}\n\n\t/**\n\t * Sets {@link module:engine/view/documentselection~DocumentSelection selection's} ranges and direction to the\n\t * specified location based on the given {@link module:engine/view/selection~Selectable selectable}.\n\t *\n\t * Usage:\n\t *\n\t *\t\t// Sets selection to the given range.\n\t *\t\tconst range = writer.createRange( start, end );\n\t *\t\twriter.setSelection( range );\n\t *\n\t *\t\t// Sets backward selection to the given range.\n\t *\t\tconst range = writer.createRange( start, end );\n\t *\t\twriter.setSelection( range );\n\t *\n\t *\t\t// Sets selection to given ranges.\n\t * \t\tconst ranges = [ writer.createRange( start1, end2 ), writer.createRange( start2, end2 ) ];\n\t *\t\twriter.setSelection( range );\n\t *\n\t *\t\t// Sets selection to the other selection.\n\t *\t\tconst otherSelection = writer.createSelection();\n\t *\t\twriter.setSelection( otherSelection );\n\t *\n\t * \t\t// Sets collapsed selection at the given position.\n\t *\t\tconst position = writer.createPositionFromPath( root, path );\n\t *\t\twriter.setSelection( position );\n\t *\n\t * \t\t// Sets collapsed selection at the position of given item and offset.\n\t *\t\tconst paragraph = writer.createContainerElement( 'p' );\n\t *\t\twriter.setSelection( paragraph, offset );\n\t *\n\t * Creates a range inside an {@link module:engine/view/element~Element element} which starts before the first child of\n \t * that element and ends after the last child of that element.\n\t *\n\t * \t\twriter.setSelection( paragraph, 'in' );\n\t *\n\t * Creates a range on the {@link module:engine/view/item~Item item} which starts before the item and ends just after the item.\n\t *\n\t *\t\twriter.setSelection( paragraph, 'on' );\n\t *\n\t * \t\t// Removes all ranges.\n\t *\t\twriter.setSelection( null );\n\t *\n\t * `DowncastWriter#setSelection()` allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t *\t\t// Sets selection as backward.\n\t *\t\twriter.setSelection( range, { backward: true } );\n\t *\n\t *\t\t// Sets selection as fake.\n\t *\t\t// Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * \t\t// This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * \t\t// represented in other way, for example by applying proper CSS class.\n\t *\t\twriter.setSelection( range, { fake: true } );\n\t *\n\t * \t\t// Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * \t\t// (and be properly handled by screen readers).\n\t *\t\twriter.setSelection( range, { fake: true, label: 'foo' } );\n\t *\n\t * @param {module:engine/view/selection~Selectable} selectable\n\t * @param {Number|'before'|'end'|'after'|'on'|'in'} [placeOrOffset] Sets place or offset of the selection.\n\t * @param {Object} [options]\n\t * @param {Boolean} [options.backward] Sets this selection instance to be backward.\n\t * @param {Boolean} [options.fake] Sets this selection instance to be marked as `fake`.\n\t * @param {String} [options.label] Label for the fake selection.\n\t */\n\tsetSelection( selectable, placeOrOffset, options ) {\n\t\tthis.document.selection._setTo( selectable, placeOrOffset, options );\n\t}\n\n\t/**\n\t * Moves {@link module:engine/view/documentselection~DocumentSelection#focus selection's focus} to the specified location.\n\t *\n\t * The location can be specified in the same form as {@link module:engine/view/view~View#createPositionAt view.createPositionAt()}\n\t * parameters.\n\t *\n\t * @param {module:engine/view/item~Item|module:engine/view/position~Position} itemOrPosition\n\t * @param {Number|'end'|'before'|'after'} [offset] Offset or one of the flags. Used only when\n\t * first parameter is a {@link module:engine/view/item~Item view item}.\n\t */\n\tsetSelectionFocus( itemOrPosition, offset ) {\n\t\tthis.document.selection._setFocus( itemOrPosition, offset );\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/documentfragment~DocumentFragment} instance.\n\t *\n\t * @param {module:engine/view/node~Node|Iterable.<module:engine/view/node~Node>} [children]\n\t * A list of nodes to be inserted into the created document fragment.\n\t * @returns {module:engine/view/documentfragment~DocumentFragment} The created document fragment.\n\t */\n\tcreateDocumentFragment( children ) {\n\t\treturn new DocumentFragment( this.document, children );\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/text~Text text node}.\n\t *\n\t *\t\twriter.createText( 'foo' );\n\t *\n\t * @param {String} data The text's data.\n\t * @returns {module:engine/view/text~Text} The created text node.\n\t */\n\tcreateText( data ) {\n\t\treturn new Text( this.document, data );\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/attributeelement~AttributeElement}.\n\t *\n\t *\t\twriter.createAttributeElement( 'strong' );\n\t *\t\twriter.createAttributeElement( 'a', { href: 'foo.bar' } );\n\t *\n\t *\t\t// Make `<a>` element contain other attributes element so the `<a>` element is not broken.\n\t *\t\twriter.createAttributeElement( 'a', { href: 'foo.bar' }, { priority: 5 } );\n\t *\n\t *\t\t// Set `id` of a marker element so it is not joined or merged with \"normal\" elements.\n\t *\t\twriter.createAttributeElement( 'span', { class: 'my-marker' }, { id: 'marker:my' } );\n\t *\n\t * **Note:** By default an `AttributeElement` is split by a\n\t * {@link module:engine/view/containerelement~ContainerElement `ContainerElement`} but this behavior can be modified\n\t * with `isAllowedInsideAttributeElement` option set while {@link #createContainerElement creating the element}.\n\t *\n\t * @param {String} name Name of the element.\n\t * @param {Object} [attributes] Element's attributes.\n\t * @param {Object} [options] Element's options.\n\t * @param {Number} [options.priority] Element's {@link module:engine/view/attributeelement~AttributeElement#priority priority}.\n\t * @param {Number|String} [options.id] Element's {@link module:engine/view/attributeelement~AttributeElement#id id}.\n\t * @param {Array.<String>} [options.renderUnsafeAttributes] A list of attribute names that should be rendered in the editing\n\t * pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t * @returns {module:engine/view/attributeelement~AttributeElement} Created element.\n\t */\n\tcreateAttributeElement( name, attributes, options = {} ) {\n\t\tconst attributeElement = new AttributeElement( this.document, name, attributes );\n\n\t\tif ( typeof options.priority === 'number' ) {\n\t\t\tattributeElement._priority = options.priority;\n\t\t}\n\n\t\tif ( options.id ) {\n\t\t\tattributeElement._id = options.id;\n\t\t}\n\n\t\tif ( options.renderUnsafeAttributes ) {\n\t\t\tattributeElement._unsafeAttributesToRender.push( ...options.renderUnsafeAttributes );\n\t\t}\n\n\t\treturn attributeElement;\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/containerelement~ContainerElement}.\n\t *\n\t *\t\twriter.createContainerElement( 'p' );\n\t *\n\t *\t\t// Create element with custom attributes.\n\t *\t\twriter.createContainerElement( 'div', { id: 'foo-bar', 'data-baz': '123' } );\n\t *\n\t *\t\t// Create element with custom styles.\n\t *\t\twriter.createContainerElement( 'p', { style: 'font-weight: bold; padding-bottom: 10px' } );\n\t *\n\t *\t\t// Create element with custom classes.\n\t *\t\twriter.createContainerElement( 'p', { class: 'foo bar baz' } );\n\t *\n\t *\t\t// Create element with children.\n\t *\t\twriter.createContainerElement( 'figure', { class: 'image' }, [\n\t *\t\t\twriter.createEmptyElement( 'img' ),\n\t *\t\t\twriter.createContainerElement( 'figcaption' )\n\t *\t\t] );\n\t *\n\t *\t\t// Create element with specific options.\n\t *\t\twriter.createContainerElement( 'span', { class: 'placeholder' }, { isAllowedInsideAttributeElement: true } );\n\t *\n\t * @param {String} name Name of the element.\n\t * @param {Object} [attributes] Elements attributes.\n\t * @param {module:engine/view/node~Node|Iterable.<module:engine/view/node~Node>|Object} [childrenOrOptions]\n\t * A node or a list of nodes to be inserted into the created element. If no children were specified, element's `options`\n\t * can be passed in this argument.\n\t * @param {Object} [options] Element's options.\n\t * @param {Boolean} [options.isAllowedInsideAttributeElement=false] Whether an element is\n\t * {@link module:engine/view/element~Element#isAllowedInsideAttributeElement allowed inside an AttributeElement} and can be wrapped\n\t * with {@link module:engine/view/attributeelement~AttributeElement} by {@link module:engine/view/downcastwriter~DowncastWriter}.\n\t * @param {Array.<String>} [options.renderUnsafeAttributes] A list of attribute names that should be rendered in the editing\n\t * pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t * @returns {module:engine/view/containerelement~ContainerElement} Created element.\n\t */\n\tcreateContainerElement( name, attributes, childrenOrOptions = {}, options = {} ) {\n\t\tlet children = null;\n\n\t\tif ( isPlainObject( childrenOrOptions ) ) {\n\t\t\toptions = childrenOrOptions;\n\t\t} else {\n\t\t\tchildren = childrenOrOptions;\n\t\t}\n\n\t\tconst containerElement = new ContainerElement( this.document, name, attributes, children );\n\n\t\tif ( options.isAllowedInsideAttributeElement !== undefined ) {\n\t\t\tcontainerElement._isAllowedInsideAttributeElement = options.isAllowedInsideAttributeElement;\n\t\t}\n\n\t\tif ( options.renderUnsafeAttributes ) {\n\t\t\tcontainerElement._unsafeAttributesToRender.push( ...options.renderUnsafeAttributes );\n\t\t}\n\n\t\treturn containerElement;\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/editableelement~EditableElement}.\n\t *\n\t *\t\twriter.createEditableElement( 'div' );\n\t *\t\twriter.createEditableElement( 'div', { id: 'foo-1234' } );\n\t *\n\t * Note: The editable element is to be used in the editing pipeline. Usually, together with\n\t * {@link module:widget/utils~toWidgetEditable `toWidgetEditable()`}.\n\t *\n\t * @param {String} name Name of the element.\n\t * @param {Object} [attributes] Elements attributes.\n\t * @param {Object} [options] Element's options.\n\t * @param {Array.<String>} [options.renderUnsafeAttributes] A list of attribute names that should be rendered in the editing\n\t * pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t * @returns {module:engine/view/editableelement~EditableElement} Created element.\n\t */\n\tcreateEditableElement( name, attributes, options = {} ) {\n\t\tconst editableElement = new EditableElement( this.document, name, attributes );\n\t\teditableElement._document = this.document;\n\n\t\tif ( options.renderUnsafeAttributes ) {\n\t\t\teditableElement._unsafeAttributesToRender.push( ...options.renderUnsafeAttributes );\n\t\t}\n\n\t\treturn editableElement;\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/emptyelement~EmptyElement}.\n\t *\n\t *\t\twriter.createEmptyElement( 'img' );\n\t *\t\twriter.createEmptyElement( 'img', { id: 'foo-1234' } );\n\t *\n\t * @param {String} name Name of the element.\n\t * @param {Object} [attributes] Elements attributes.\n\t * @param {Object} [options] Element's options.\n\t * @param {Boolean} [options.isAllowedInsideAttributeElement=true] Whether an element is\n\t * {@link module:engine/view/element~Element#isAllowedInsideAttributeElement allowed inside an AttributeElement} and can be wrapped\n\t * with {@link module:engine/view/attributeelement~AttributeElement} by {@link module:engine/view/downcastwriter~DowncastWriter}.\n\t * @param {Array.<String>} [options.renderUnsafeAttributes] A list of attribute names that should be rendered in the editing\n\t * pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t * @returns {module:engine/view/emptyelement~EmptyElement} Created element.\n\t */\n\tcreateEmptyElement( name, attributes, options = {} ) {\n\t\tconst emptyElement = new EmptyElement( this.document, name, attributes );\n\n\t\tif ( options.isAllowedInsideAttributeElement !== undefined ) {\n\t\t\temptyElement._isAllowedInsideAttributeElement = options.isAllowedInsideAttributeElement;\n\t\t}\n\n\t\tif ( options.renderUnsafeAttributes ) {\n\t\t\temptyElement._unsafeAttributesToRender.push( ...options.renderUnsafeAttributes );\n\t\t}\n\n\t\treturn emptyElement;\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/uielement~UIElement}.\n\t *\n\t *\t\twriter.createUIElement( 'span' );\n\t *\t\twriter.createUIElement( 'span', { id: 'foo-1234' } );\n\t *\n\t * A custom render function can be provided as the third parameter:\n\t *\n\t *\t\twriter.createUIElement( 'span', null, function( domDocument ) {\n\t *\t\t\tconst domElement = this.toDomElement( domDocument );\n\t *\t\t\tdomElement.innerHTML = '<b>this is ui element</b>';\n\t *\n\t *\t\t\treturn domElement;\n\t *\t\t} );\n\t *\n\t * Unlike {@link #createRawElement raw elements}, UI elements are by no means editor content, for instance,\n\t * they are ignored by the editor selection system.\n\t *\n\t * You should not use UI elements as data containers. Check out {@link #createRawElement} instead.\n\t *\n\t * @param {String} name The name of the element.\n\t * @param {Object} [attributes] Element attributes.\n\t * @param {Function} [renderFunction] A custom render function.\n\t * @param {Object} [options] Element's options.\n\t * @param {Boolean} [options.isAllowedInsideAttributeElement=true] Whether an element is\n\t * {@link module:engine/view/element~Element#isAllowedInsideAttributeElement allowed inside an AttributeElement} and can be wrapped\n\t * with {@link module:engine/view/attributeelement~AttributeElement} by {@link module:engine/view/downcastwriter~DowncastWriter}.\n\t * @returns {module:engine/view/uielement~UIElement} The created element.\n\t */\n\tcreateUIElement( name, attributes, renderFunction, options = {} ) {\n\t\tconst uiElement = new UIElement( this.document, name, attributes );\n\n\t\tif ( renderFunction ) {\n\t\t\tuiElement.render = renderFunction;\n\t\t}\n\n\t\tif ( options.isAllowedInsideAttributeElement !== undefined ) {\n\t\t\tuiElement._isAllowedInsideAttributeElement = options.isAllowedInsideAttributeElement;\n\t\t}\n\n\t\treturn uiElement;\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/rawelement~RawElement}.\n\t *\n\t *\t\twriter.createRawElement( 'span', { id: 'foo-1234' }, function( domElement ) {\n\t *\t\t\tdomElement.innerHTML = '<b>This is the raw content of the raw element.</b>';\n\t *\t\t} );\n\t *\n\t * Raw elements work as data containers (\"wrappers\", \"sandboxes\") but their children are not managed or\n\t * even recognized by the editor. This encapsulation allows integrations to maintain custom DOM structures\n\t * in the editor content without, for instance, worrying about compatibility with other editor features.\n\t * Raw elements are a perfect tool for integration with external frameworks and data sources.\n\t *\n\t * Unlike {@link #createUIElement UI elements}, raw elements act like \"real\" editor content (similar to\n\t * {@link module:engine/view/containerelement~ContainerElement} or {@link module:engine/view/emptyelement~EmptyElement}),\n\t * and they are considered by the editor selection.\n\t *\n\t * You should not use raw elements to render the UI in the editor content. Check out {@link #createUIElement `#createUIElement()`}\n\t * instead.\n\t *\n\t * @param {String} name The name of the element.\n\t * @param {Object} [attributes] Element attributes.\n\t * @param {Function} [renderFunction] A custom render function.\n\t * @param {Object} [options] Element's options.\n\t * @param {Boolean} [options.isAllowedInsideAttributeElement=true] Whether an element is\n\t * {@link module:engine/view/element~Element#isAllowedInsideAttributeElement allowed inside an AttributeElement} and can be wrapped\n\t * with {@link module:engine/view/attributeelement~AttributeElement} by {@link module:engine/view/downcastwriter~DowncastWriter}.\n\t * @param {Array.<String>} [options.renderUnsafeAttributes] A list of attribute names that should be rendered in the editing\n\t * pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t * @returns {module:engine/view/rawelement~RawElement} The created element.\n\t */\n\tcreateRawElement( name, attributes, renderFunction, options = {} ) {\n\t\tconst rawElement = new RawElement( this.document, name, attributes );\n\n\t\trawElement.render = renderFunction || ( () => {} );\n\n\t\tif ( options.isAllowedInsideAttributeElement !== undefined ) {\n\t\t\trawElement._isAllowedInsideAttributeElement = options.isAllowedInsideAttributeElement;\n\t\t}\n\n\t\tif ( options.renderUnsafeAttributes ) {\n\t\t\trawElement._unsafeAttributesToRender.push( ...options.renderUnsafeAttributes );\n\t\t}\n\n\t\treturn rawElement;\n\t}\n\n\t/**\n\t * Adds or overwrites the element's attribute with a specified key and value.\n\t *\n\t *\t\twriter.setAttribute( 'href', 'http://ckeditor.com', linkElement );\n\t *\n\t * @param {String} key The attribute key.\n\t * @param {String} value The attribute value.\n\t * @param {module:engine/view/element~Element} element\n\t */\n\tsetAttribute( key, value, element ) {\n\t\telement._setAttribute( key, value );\n\t}\n\n\t/**\n\t * Removes attribute from the element.\n\t *\n\t *\t\twriter.removeAttribute( 'href', linkElement );\n\t *\n\t * @param {String} key Attribute key.\n\t * @param {module:engine/view/element~Element} element\n\t */\n\tremoveAttribute( key, element ) {\n\t\telement._removeAttribute( key );\n\t}\n\n\t/**\n\t * Adds specified class to the element.\n\t *\n\t *\t\twriter.addClass( 'foo', linkElement );\n\t *\t\twriter.addClass( [ 'foo', 'bar' ], linkElement );\n\t *\n\t * @param {Array.<String>|String} className\n\t * @param {module:engine/view/element~Element} element\n\t */\n\taddClass( className, element ) {\n\t\telement._addClass( className );\n\t}\n\n\t/**\n\t * Removes specified class from the element.\n\t *\n\t *\t\twriter.removeClass( 'foo', linkElement );\n\t *\t\twriter.removeClass( [ 'foo', 'bar' ], linkElement );\n\t *\n\t * @param {Array.<String>|String} className\n\t * @param {module:engine/view/element~Element} element\n\t */\n\tremoveClass( className, element ) {\n\t\telement._removeClass( className );\n\t}\n\n\t/**\n\t * Adds style to the element.\n\t *\n\t *\t\twriter.setStyle( 'color', 'red', element );\n\t *\t\twriter.setStyle( {\n\t *\t\t\tcolor: 'red',\n\t *\t\t\tposition: 'fixed'\n\t *\t\t}, element );\n\t *\n\t * **Note**: The passed style can be normalized if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#set `StylesMap#set()`} for details.\n\t *\n\t * @param {String|Object} property Property name or object with key - value pairs.\n\t * @param {String} [value] Value to set. This parameter is ignored if object is provided as the first parameter.\n\t * @param {module:engine/view/element~Element} element Element to set styles on.\n\t */\n\tsetStyle( property, value, element ) {\n\t\tif ( isPlainObject( property ) && element === undefined ) {\n\t\t\telement = value;\n\t\t}\n\n\t\telement._setStyle( property, value );\n\t}\n\n\t/**\n\t * Removes specified style from the element.\n\t *\n\t *\t\twriter.removeStyle( 'color', element ); // Removes 'color' style.\n\t *\t\twriter.removeStyle( [ 'color', 'border-top' ], element ); // Removes both 'color' and 'border-top' styles.\n\t *\n\t * **Note**: This method can work with normalized style names if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#remove `StylesMap#remove()`} for details.\n\t *\n\t * @param {Array.<String>|String} property\n\t * @param {module:engine/view/element~Element} element\n\t */\n\tremoveStyle( property, element ) {\n\t\telement._removeStyle( property );\n\t}\n\n\t/**\n\t * Sets a custom property on element. Unlike attributes, custom properties are not rendered to the DOM,\n\t * so they can be used to add special data to elements.\n\t *\n\t * @param {String|Symbol} key\n\t * @param {*} value\n\t * @param {module:engine/view/element~Element} element\n\t */\n\tsetCustomProperty( key, value, element ) {\n\t\telement._setCustomProperty( key, value );\n\t}\n\n\t/**\n\t * Removes a custom property stored under the given key.\n\t *\n\t * @param {String|Symbol} key\n\t * @param {module:engine/view/element~Element} element\n\t * @returns {Boolean} Returns true if property was removed.\n\t */\n\tremoveCustomProperty( key, element ) {\n\t\treturn element._removeCustomProperty( key );\n\t}\n\n\t/**\n\t * Breaks attribute elements at the provided position or at the boundaries of a provided range. It breaks attribute elements\n\t * up to their first ancestor that is a container element.\n\t *\n\t * In following examples `<p>` is a container, `<b>` and `<u>` are attribute elements:\n\t *\n\t *\t\t<p>foo<b><u>bar{}</u></b></p> -> <p>foo<b><u>bar</u></b>[]</p>\n\t *\t\t<p>foo<b><u>{}bar</u></b></p> -> <p>foo{}<b><u>bar</u></b></p>\n\t *\t\t<p>foo<b><u>b{}ar</u></b></p> -> <p>foo<b><u>b</u></b>[]<b><u>ar</u></b></p>\n\t *\t\t<p><b>fo{o</b><u>ba}r</u></p> -> <p><b>fo</b><b>o</b><u>ba</u><u>r</u></b></p>\n\t *\n\t * **Note:** {@link module:engine/view/documentfragment~DocumentFragment DocumentFragment} is treated like a container.\n\t *\n\t * **Note:** The difference between {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes breakAttributes()} and\n\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakContainer breakContainer()} is that `breakAttributes()` breaks all\n\t * {@link module:engine/view/attributeelement~AttributeElement attribute elements} that are ancestors of a given `position`,\n\t * up to the first encountered {@link module:engine/view/containerelement~ContainerElement container element}.\n\t * `breakContainer()` assumes that a given `position` is directly in the container element and breaks that container element.\n\t *\n\t * Throws the `view-writer-invalid-range-container` {@link module:utils/ckeditorerror~CKEditorError CKEditorError}\n\t * when the {@link module:engine/view/range~Range#start start}\n\t * and {@link module:engine/view/range~Range#end end} positions of a passed range are not placed inside same parent container.\n\t *\n\t * Throws the `view-writer-cannot-break-empty-element` {@link module:utils/ckeditorerror~CKEditorError CKEditorError}\n\t * when trying to break attributes inside an {@link module:engine/view/emptyelement~EmptyElement EmptyElement}.\n\t *\n\t * Throws the `view-writer-cannot-break-ui-element` {@link module:utils/ckeditorerror~CKEditorError CKEditorError}\n\t * when trying to break attributes inside a {@link module:engine/view/uielement~UIElement UIElement}.\n\t *\n\t * @see module:engine/view/attributeelement~AttributeElement\n\t * @see module:engine/view/containerelement~ContainerElement\n\t * @see module:engine/view/downcastwriter~DowncastWriter#breakContainer\n\t * @param {module:engine/view/position~Position|module:engine/view/range~Range} positionOrRange The position where\n\t * to break attribute elements.\n\t * @returns {module:engine/view/position~Position|module:engine/view/range~Range} The new position or range, after breaking the\n\t * attribute elements.\n\t */\n\tbreakAttributes( positionOrRange ) {\n\t\tif ( positionOrRange instanceof Position ) {\n\t\t\treturn this._breakAttributes( positionOrRange );\n\t\t} else {\n\t\t\treturn this._breakAttributesRange( positionOrRange );\n\t\t}\n\t}\n\n\t/**\n\t * Breaks a {@link module:engine/view/containerelement~ContainerElement container view element} into two, at the given position.\n\t * The position has to be directly inside the container element and cannot be in the root. It does not break the conrainer view element\n\t * if the position is at the beginning or at the end of its parent element.\n\t *\n\t *\t\t<p>foo^bar</p> -> <p>foo</p><p>bar</p>\n\t *\t\t<div><p>foo</p>^<p>bar</p></div> -> <div><p>foo</p></div><div><p>bar</p></div>\n\t *\t\t<p>^foobar</p> -> ^<p>foobar</p>\n\t *\t\t<p>foobar^</p> -> <p>foobar</p>^\n\t *\n\t * **Note:** The difference between {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes breakAttributes()} and\n\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakContainer breakContainer()} is that `breakAttributes()` breaks all\n\t * {@link module:engine/view/attributeelement~AttributeElement attribute elements} that are ancestors of a given `position`,\n\t * up to the first encountered {@link module:engine/view/containerelement~ContainerElement container element}.\n\t * `breakContainer()` assumes that the given `position` is directly in the container element and breaks that container element.\n\t *\n\t * @see module:engine/view/attributeelement~AttributeElement\n\t * @see module:engine/view/containerelement~ContainerElement\n\t * @see module:engine/view/downcastwriter~DowncastWriter#breakAttributes\n\t * @param {module:engine/view/position~Position} position The position where to break the element.\n\t * @returns {module:engine/view/position~Position} The position between broken elements. If an element has not been broken,\n\t * the returned position is placed either before or after it.\n\t */\n\tbreakContainer( position ) {\n\t\tconst element = position.parent;\n\n\t\tif ( !( element.is( 'containerElement' ) ) ) {\n\t\t\t/**\n\t\t\t * Trying to break an element which is not a container element.\n\t\t\t *\n\t\t\t * @error view-writer-break-non-container-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-break-non-container-element', this.document );\n\t\t}\n\n\t\tif ( !element.parent ) {\n\t\t\t/**\n\t\t\t * Trying to break root element.\n\t\t\t *\n\t\t\t * @error view-writer-break-root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-break-root', this.document );\n\t\t}\n\n\t\tif ( position.isAtStart ) {\n\t\t\treturn Position._createBefore( element );\n\t\t} else if ( !position.isAtEnd ) {\n\t\t\tconst newElement = element._clone( false );\n\n\t\t\tthis.insert( Position._createAfter( element ), newElement );\n\n\t\t\tconst sourceRange = new Range( position, Position._createAt( element, 'end' ) );\n\t\t\tconst targetPosition = new Position( newElement, 0 );\n\n\t\t\tthis.move( sourceRange, targetPosition );\n\t\t}\n\n\t\treturn Position._createAfter( element );\n\t}\n\n\t/**\n\t * Merges {@link module:engine/view/attributeelement~AttributeElement attribute elements}. It also merges text nodes if needed.\n\t * Only {@link module:engine/view/attributeelement~AttributeElement#isSimilar similar} attribute elements can be merged.\n\t *\n\t * In following examples `<p>` is a container and `<b>` is an attribute element:\n\t *\n\t *\t\t<p>foo[]bar</p> -> <p>foo{}bar</p>\n\t *\t\t<p><b>foo</b>[]<b>bar</b></p> -> <p><b>foo{}bar</b></p>\n\t *\t\t<p><b foo=\"bar\">a</b>[]<b foo=\"baz\">b</b></p> -> <p><b foo=\"bar\">a</b>[]<b foo=\"baz\">b</b></p>\n\t *\n\t * It will also take care about empty attributes when merging:\n\t *\n\t *\t\t<p><b>[]</b></p> -> <p>[]</p>\n\t *\t\t<p><b>foo</b><i>[]</i><b>bar</b></p> -> <p><b>foo{}bar</b></p>\n\t *\n\t * **Note:** Difference between {@link module:engine/view/downcastwriter~DowncastWriter#mergeAttributes mergeAttributes} and\n\t * {@link module:engine/view/downcastwriter~DowncastWriter#mergeContainers mergeContainers} is that `mergeAttributes` merges two\n\t * {@link module:engine/view/attributeelement~AttributeElement attribute elements} or {@link module:engine/view/text~Text text nodes}\n\t * while `mergeContainer` merges two {@link module:engine/view/containerelement~ContainerElement container elements}.\n\t *\n\t * @see module:engine/view/attributeelement~AttributeElement\n\t * @see module:engine/view/containerelement~ContainerElement\n\t * @see module:engine/view/downcastwriter~DowncastWriter#mergeContainers\n\t * @param {module:engine/view/position~Position} position Merge position.\n\t * @returns {module:engine/view/position~Position} Position after merge.\n\t */\n\tmergeAttributes( position ) {\n\t\tconst positionOffset = position.offset;\n\t\tconst positionParent = position.parent;\n\n\t\t// When inside text node - nothing to merge.\n\t\tif ( positionParent.is( '$text' ) ) {\n\t\t\treturn position;\n\t\t}\n\n\t\t// When inside empty attribute - remove it.\n\t\tif ( positionParent.is( 'attributeElement' ) && positionParent.childCount === 0 ) {\n\t\t\tconst parent = positionParent.parent;\n\t\t\tconst offset = positionParent.index;\n\n\t\t\tpositionParent._remove();\n\t\t\tthis._removeFromClonedElementsGroup( positionParent );\n\n\t\t\treturn this.mergeAttributes( new Position( parent, offset ) );\n\t\t}\n\n\t\tconst nodeBefore = positionParent.getChild( positionOffset - 1 );\n\t\tconst nodeAfter = positionParent.getChild( positionOffset );\n\n\t\t// Position should be placed between two nodes.\n\t\tif ( !nodeBefore || !nodeAfter ) {\n\t\t\treturn position;\n\t\t}\n\n\t\t// When position is between two text nodes.\n\t\tif ( nodeBefore.is( '$text' ) && nodeAfter.is( '$text' ) ) {\n\t\t\treturn mergeTextNodes( nodeBefore, nodeAfter );\n\t\t}\n\t\t// When position is between two same attribute elements.\n\t\telse if ( nodeBefore.is( 'attributeElement' ) && nodeAfter.is( 'attributeElement' ) && nodeBefore.isSimilar( nodeAfter ) ) {\n\t\t\t// Move all children nodes from node placed after selection and remove that node.\n\t\t\tconst count = nodeBefore.childCount;\n\t\t\tnodeBefore._appendChild( nodeAfter.getChildren() );\n\n\t\t\tnodeAfter._remove();\n\t\t\tthis._removeFromClonedElementsGroup( nodeAfter );\n\n\t\t\t// New position is located inside the first node, before new nodes.\n\t\t\t// Call this method recursively to merge again if needed.\n\t\t\treturn this.mergeAttributes( new Position( nodeBefore, count ) );\n\t\t}\n\n\t\treturn position;\n\t}\n\n\t/**\n\t * Merges two {@link module:engine/view/containerelement~ContainerElement container elements} that are before and after given position.\n\t * Precisely, the element after the position is removed and it's contents are moved to element before the position.\n\t *\n\t *\t\t<p>foo</p>^<p>bar</p> -> <p>foo^bar</p>\n\t *\t\t<div>foo</div>^<p>bar</p> -> <div>foo^bar</div>\n\t *\n\t * **Note:** Difference between {@link module:engine/view/downcastwriter~DowncastWriter#mergeAttributes mergeAttributes} and\n\t * {@link module:engine/view/downcastwriter~DowncastWriter#mergeContainers mergeContainers} is that `mergeAttributes` merges two\n\t * {@link module:engine/view/attributeelement~AttributeElement attribute elements} or {@link module:engine/view/text~Text text nodes}\n\t * while `mergeContainer` merges two {@link module:engine/view/containerelement~ContainerElement container elements}.\n\t *\n\t * @see module:engine/view/attributeelement~AttributeElement\n\t * @see module:engine/view/containerelement~ContainerElement\n\t * @see module:engine/view/downcastwriter~DowncastWriter#mergeAttributes\n\t * @param {module:engine/view/position~Position} position Merge position.\n\t * @returns {module:engine/view/position~Position} Position after merge.\n\t */\n\tmergeContainers( position ) {\n\t\tconst prev = position.nodeBefore;\n\t\tconst next = position.nodeAfter;\n\n\t\tif ( !prev || !next || !prev.is( 'containerElement' ) || !next.is( 'containerElement' ) ) {\n\t\t\t/**\n\t\t\t * Element before and after given position cannot be merged.\n\t\t\t *\n\t\t\t * @error view-writer-merge-containers-invalid-position\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-merge-containers-invalid-position', this.document );\n\t\t}\n\n\t\tconst lastChild = prev.getChild( prev.childCount - 1 );\n\t\tconst newPosition = lastChild instanceof Text ? Position._createAt( lastChild, 'end' ) : Position._createAt( prev, 'end' );\n\n\t\tthis.move( Range._createIn( next ), Position._createAt( prev, 'end' ) );\n\t\tthis.remove( Range._createOn( next ) );\n\n\t\treturn newPosition;\n\t}\n\n\t/**\n\t * Inserts a node or nodes at specified position. Takes care about breaking attributes before insertion\n\t * and merging them afterwards.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-insert-invalid-node` when nodes to insert\n\t * contains instances that are not {@link module:engine/view/text~Text Texts},\n\t * {@link module:engine/view/attributeelement~AttributeElement AttributeElements},\n\t * {@link module:engine/view/containerelement~ContainerElement ContainerElements},\n\t * {@link module:engine/view/emptyelement~EmptyElement EmptyElements},\n\t * {@link module:engine/view/rawelement~RawElement RawElements} or\n\t * {@link module:engine/view/uielement~UIElement UIElements}.\n\t *\n\t * @param {module:engine/view/position~Position} position Insertion position.\n\t * @param {module:engine/view/text~Text|module:engine/view/attributeelement~AttributeElement|\n\t * module:engine/view/containerelement~ContainerElement|module:engine/view/emptyelement~EmptyElement|\n\t * module:engine/view/rawelement~RawElement|module:engine/view/uielement~UIElement|\n\t * Iterable.<module:engine/view/text~Text|\n\t * module:engine/view/attributeelement~AttributeElement|module:engine/view/containerelement~ContainerElement|\n\t * module:engine/view/emptyelement~EmptyElement|module:engine/view/rawelement~RawElement|\n\t * module:engine/view/uielement~UIElement>} nodes Node or nodes to insert.\n\t * @returns {module:engine/view/range~Range} Range around inserted nodes.\n\t */\n\tinsert( position, nodes ) {\n\t\tnodes = isIterable( nodes ) ? [ ...nodes ] : [ nodes ];\n\n\t\t// Check if nodes to insert are instances of AttributeElements, ContainerElements, EmptyElements, UIElements or Text.\n\t\tvalidateNodesToInsert( nodes, this.document );\n\n\t\t// Group nodes in batches of nodes that require or do not require breaking an AttributeElements.\n\t\tconst nodeGroups = nodes.reduce( ( groups, node ) => {\n\t\t\tconst lastGroup = groups[ groups.length - 1 ];\n\n\t\t\t// Break attributes on nodes that do exist in the model tree so they can have attributes, other elements\n\t\t\t// can't have an attribute in model and won't get wrapped with an AttributeElement while down-casted.\n\t\t\tconst breakAttributes = !( node.is( 'uiElement' ) && node.isAllowedInsideAttributeElement );\n\n\t\t\tif ( !lastGroup || lastGroup.breakAttributes != breakAttributes ) {\n\t\t\t\tgroups.push( {\n\t\t\t\t\tbreakAttributes,\n\t\t\t\t\tnodes: [ node ]\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tlastGroup.nodes.push( node );\n\t\t\t}\n\n\t\t\treturn groups;\n\t\t}, [] );\n\n\t\t// Insert nodes in batches.\n\t\tlet start = null;\n\t\tlet end = position;\n\n\t\tfor ( const { nodes, breakAttributes } of nodeGroups ) {\n\t\t\tconst range = this._insertNodes( end, nodes, breakAttributes );\n\n\t\t\tif ( !start ) {\n\t\t\t\tstart = range.start;\n\t\t\t}\n\n\t\t\tend = range.end;\n\t\t}\n\n\t\t// When no nodes were inserted - return collapsed range.\n\t\tif ( !start ) {\n\t\t\treturn new Range( position );\n\t\t}\n\n\t\treturn new Range( start, end );\n\t}\n\n\t/**\n\t * Removes provided range from the container.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n\t * {@link module:engine/view/range~Range#start start} and {@link module:engine/view/range~Range#end end} positions are not placed inside\n\t * same parent container.\n\t *\n\t * @param {module:engine/view/range~Range|module:engine/view/item~Item} rangeOrItem Range to remove from container\n\t * or an {@link module:engine/view/item~Item item} to remove. If range is provided, after removing, it will be updated\n\t * to a collapsed range showing the new position.\n\t * @returns {module:engine/view/documentfragment~DocumentFragment} Document fragment containing removed nodes.\n\t */\n\tremove( rangeOrItem ) {\n\t\tconst range = rangeOrItem instanceof Range ? rangeOrItem : Range._createOn( rangeOrItem );\n\n\t\tvalidateRangeContainer( range, this.document );\n\n\t\t// If range is collapsed - nothing to remove.\n\t\tif ( range.isCollapsed ) {\n\t\t\treturn new DocumentFragment( this.document );\n\t\t}\n\n\t\t// Break attributes at range start and end.\n\t\tconst { start: breakStart, end: breakEnd } = this._breakAttributesRange( range, true );\n\t\tconst parentContainer = breakStart.parent;\n\n\t\tconst count = breakEnd.offset - breakStart.offset;\n\n\t\t// Remove nodes in range.\n\t\tconst removed = parentContainer._removeChildren( breakStart.offset, count );\n\n\t\tfor ( const node of removed ) {\n\t\t\tthis._removeFromClonedElementsGroup( node );\n\t\t}\n\n\t\t// Merge after removing.\n\t\tconst mergePosition = this.mergeAttributes( breakStart );\n\t\trange.start = mergePosition;\n\t\trange.end = mergePosition.clone();\n\n\t\t// Return removed nodes.\n\t\treturn new DocumentFragment( this.document, removed );\n\t}\n\n\t/**\n\t * Removes matching elements from given range.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n\t * {@link module:engine/view/range~Range#start start} and {@link module:engine/view/range~Range#end end} positions are not placed inside\n\t * same parent container.\n\t *\n\t * @param {module:engine/view/range~Range} range Range to clear.\n\t * @param {module:engine/view/element~Element} element Element to remove.\n\t */\n\tclear( range, element ) {\n\t\tvalidateRangeContainer( range, this.document );\n\n\t\t// Create walker on given range.\n\t\t// We walk backward because when we remove element during walk it modifies range end position.\n\t\tconst walker = range.getWalker( {\n\t\t\tdirection: 'backward',\n\t\t\tignoreElementEnd: true\n\t\t} );\n\n\t\t// Let's walk.\n\t\tfor ( const current of walker ) {\n\t\t\tconst item = current.item;\n\t\t\tlet rangeToRemove;\n\n\t\t\t// When current item matches to the given element.\n\t\t\tif ( item.is( 'element' ) && element.isSimilar( item ) ) {\n\t\t\t\t// Create range on this element.\n\t\t\t\trangeToRemove = Range._createOn( item );\n\t\t\t\t// When range starts inside Text or TextProxy element.\n\t\t\t} else if ( !current.nextPosition.isAfter( range.start ) && item.is( '$textProxy' ) ) {\n\t\t\t\t// We need to check if parent of this text matches to given element.\n\t\t\t\tconst parentElement = item.getAncestors().find( ancestor => {\n\t\t\t\t\treturn ancestor.is( 'element' ) && element.isSimilar( ancestor );\n\t\t\t\t} );\n\n\t\t\t\t// If it is then create range inside this element.\n\t\t\t\tif ( parentElement ) {\n\t\t\t\t\trangeToRemove = Range._createIn( parentElement );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we have found element to remove.\n\t\t\tif ( rangeToRemove ) {\n\t\t\t\t// We need to check if element range stick out of the given range and truncate if it is.\n\t\t\t\tif ( rangeToRemove.end.isAfter( range.end ) ) {\n\t\t\t\t\trangeToRemove.end = range.end;\n\t\t\t\t}\n\n\t\t\t\tif ( rangeToRemove.start.isBefore( range.start ) ) {\n\t\t\t\t\trangeToRemove.start = range.start;\n\t\t\t\t}\n\n\t\t\t\t// At the end we remove range with found element.\n\t\t\t\tthis.remove( rangeToRemove );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Moves nodes from provided range to target position.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n\t * {@link module:engine/view/range~Range#start start} and {@link module:engine/view/range~Range#end end} positions are not placed inside\n\t * same parent container.\n\t *\n\t * @param {module:engine/view/range~Range} sourceRange Range containing nodes to move.\n\t * @param {module:engine/view/position~Position} targetPosition Position to insert.\n\t * @returns {module:engine/view/range~Range} Range in target container. Inserted nodes are placed between\n\t * {@link module:engine/view/range~Range#start start} and {@link module:engine/view/range~Range#end end} positions.\n\t */\n\tmove( sourceRange, targetPosition ) {\n\t\tlet nodes;\n\n\t\tif ( targetPosition.isAfter( sourceRange.end ) ) {\n\t\t\ttargetPosition = this._breakAttributes( targetPosition, true );\n\n\t\t\tconst parent = targetPosition.parent;\n\t\t\tconst countBefore = parent.childCount;\n\n\t\t\tsourceRange = this._breakAttributesRange( sourceRange, true );\n\n\t\t\tnodes = this.remove( sourceRange );\n\n\t\t\ttargetPosition.offset += ( parent.childCount - countBefore );\n\t\t} else {\n\t\t\tnodes = this.remove( sourceRange );\n\t\t}\n\n\t\treturn this.insert( targetPosition, nodes );\n\t}\n\n\t/**\n\t * Wraps elements within range with provided {@link module:engine/view/attributeelement~AttributeElement AttributeElement}.\n\t * If a collapsed range is provided, it will be wrapped only if it is equal to view selection.\n\t *\n\t * If a collapsed range was passed and is same as selection, the selection\n\t * will be moved to the inside of the wrapped attribute element.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-invalid-range-container`\n\t * when {@link module:engine/view/range~Range#start}\n\t * and {@link module:engine/view/range~Range#end} positions are not placed inside same parent container.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t * an instance of {@link module:engine/view/attributeelement~AttributeElement AttributeElement}.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-nonselection-collapsed-range` when passed range\n\t * is collapsed and different than view selection.\n\t *\n\t * **Note:** Attribute elements by default can wrap {@link module:engine/view/text~Text},\n\t * {@link module:engine/view/emptyelement~EmptyElement}, {@link module:engine/view/uielement~UIElement},\n\t * {@link module:engine/view/rawelement~RawElement} and other attribute elements with higher priority. Other elements while placed\n\t * inside an attribute element will split it (or nest it in case of an `AttributeElement`). This behavior can be modified by changing\n\t * the `isAllowedInsideAttributeElement` option while using\n\t * {@link module:engine/view/downcastwriter~DowncastWriter#createContainerElement},\n\t * {@link module:engine/view/downcastwriter~DowncastWriter#createEmptyElement},\n\t * {@link module:engine/view/downcastwriter~DowncastWriter#createUIElement} or\n\t * {@link module:engine/view/downcastwriter~DowncastWriter#createRawElement}.\n\t *\n\t * @param {module:engine/view/range~Range} range Range to wrap.\n\t * @param {module:engine/view/attributeelement~AttributeElement} attribute Attribute element to use as wrapper.\n\t * @returns {module:engine/view/range~Range} range Range after wrapping, spanning over wrapping attribute element.\n\t */\n\twrap( range, attribute ) {\n\t\tif ( !( attribute instanceof AttributeElement ) ) {\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'view-writer-wrap-invalid-attribute',\n\t\t\t\tthis.document\n\t\t\t);\n\t\t}\n\n\t\tvalidateRangeContainer( range, this.document );\n\n\t\tif ( !range.isCollapsed ) {\n\t\t\t// Non-collapsed range. Wrap it with the attribute element.\n\t\t\treturn this._wrapRange( range, attribute );\n\t\t} else {\n\t\t\t// Collapsed range. Wrap position.\n\t\t\tlet position = range.start;\n\n\t\t\tif ( position.parent.is( 'element' ) && !_hasNonUiChildren( position.parent ) ) {\n\t\t\t\tposition = position.getLastMatchingPosition( value => value.item.is( 'uiElement' ) );\n\t\t\t}\n\n\t\t\tposition = this._wrapPosition( position, attribute );\n\t\t\tconst viewSelection = this.document.selection;\n\n\t\t\t// If wrapping position is equal to view selection, move view selection inside wrapping attribute element.\n\t\t\tif ( viewSelection.isCollapsed && viewSelection.getFirstPosition().isEqual( range.start ) ) {\n\t\t\t\tthis.setSelection( position );\n\t\t\t}\n\n\t\t\treturn new Range( position );\n\t\t}\n\t}\n\n\t/**\n\t * Unwraps nodes within provided range from attribute element.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n\t * {@link module:engine/view/range~Range#start start} and {@link module:engine/view/range~Range#end end} positions are not placed inside\n\t * same parent container.\n\t *\n\t * @param {module:engine/view/range~Range} range\n\t * @param {module:engine/view/attributeelement~AttributeElement} attribute\n\t */\n\tunwrap( range, attribute ) {\n\t\tif ( !( attribute instanceof AttributeElement ) ) {\n\t\t\t/**\n\t\t\t * The `attribute` passed to {@link module:engine/view/downcastwriter~DowncastWriter#unwrap `DowncastWriter#unwrap()`}\n\t\t\t * must be an instance of {@link module:engine/view/attributeelement~AttributeElement `AttributeElement`}.\n\t\t\t *\n\t\t\t * @error view-writer-unwrap-invalid-attribute\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'view-writer-unwrap-invalid-attribute',\n\t\t\t\tthis.document\n\t\t\t);\n\t\t}\n\n\t\tvalidateRangeContainer( range, this.document );\n\n\t\t// If range is collapsed - nothing to unwrap.\n\t\tif ( range.isCollapsed ) {\n\t\t\treturn range;\n\t\t}\n\n\t\t// Break attributes at range start and end.\n\t\tconst { start: breakStart, end: breakEnd } = this._breakAttributesRange( range, true );\n\t\tconst parentContainer = breakStart.parent;\n\n\t\t// Unwrap children located between break points.\n\t\tconst newRange = this._unwrapChildren( parentContainer, breakStart.offset, breakEnd.offset, attribute );\n\n\t\t// Merge attributes at the both ends and return a new range.\n\t\tconst start = this.mergeAttributes( newRange.start );\n\n\t\t// If start position was merged - move end position back.\n\t\tif ( !start.isEqual( newRange.start ) ) {\n\t\t\tnewRange.end.offset--;\n\t\t}\n\n\t\tconst end = this.mergeAttributes( newRange.end );\n\n\t\treturn new Range( start, end );\n\t}\n\n\t/**\n\t * Renames element by creating a copy of renamed element but with changed name and then moving contents of the\n\t * old element to the new one. Keep in mind that this will invalidate all {@link module:engine/view/position~Position positions} which\n\t * has renamed element as {@link module:engine/view/position~Position#parent a parent}.\n\t *\n\t * New element has to be created because `Element#tagName` property in DOM is readonly.\n\t *\n\t * Since this function creates a new element and removes the given one, the new element is returned to keep reference.\n\t *\n\t * @param {String} newName New name for element.\n\t * @param {module:engine/view/containerelement~ContainerElement} viewElement Element to be renamed.\n\t * @returns {module:engine/view/containerelement~ContainerElement} Element created due to rename.\n\t */\n\trename( newName, viewElement ) {\n\t\tconst newElement = new ContainerElement( this.document, newName, viewElement.getAttributes() );\n\n\t\tthis.insert( Position._createAfter( viewElement ), newElement );\n\t\tthis.move( Range._createIn( viewElement ), Position._createAt( newElement, 0 ) );\n\t\tthis.remove( Range._createOn( viewElement ) );\n\n\t\treturn newElement;\n\t}\n\n\t/**\n\t * Cleans up memory by removing obsolete cloned elements group from the writer.\n\t *\n\t * Should be used whenever all {@link module:engine/view/attributeelement~AttributeElement attribute elements}\n\t * with the same {@link module:engine/view/attributeelement~AttributeElement#id id} are going to be removed from the view and\n\t * the group will no longer be needed.\n\t *\n\t * Cloned elements group are not removed automatically in case if the group is still needed after all its elements\n\t * were removed from the view.\n\t *\n\t * Keep in mind that group names are equal to the `id` property of the attribute element.\n\t *\n\t * @param {String} groupName Name of the group to clear.\n\t */\n\tclearClonedElementsGroup( groupName ) {\n\t\tthis._cloneGroups.delete( groupName );\n\t}\n\n\t/**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/view/position~Position position},\n\t * * parent element and offset (offset defaults to `0`),\n\t * * parent element and `'end'` (sets position at the end of that element),\n\t * * {@link module:engine/view/item~Item view item} and `'before'` or `'after'` (sets position before or after given view item).\n\t *\n\t * This method is a shortcut to other constructors such as:\n\t *\n\t * * {@link #createPositionBefore},\n\t * * {@link #createPositionAfter},\n\t *\n\t * @param {module:engine/view/item~Item|module:engine/model/position~Position} itemOrPosition\n\t * @param {Number|'end'|'before'|'after'} [offset] Offset or one of the flags. Used only when\n\t * first parameter is a {@link module:engine/view/item~Item view item}.\n\t * @returns {module:engine/view/position~Position}\n\t */\n\tcreatePositionAt( itemOrPosition, offset ) {\n\t\treturn Position._createAt( itemOrPosition, offset );\n\t}\n\n\t/**\n\t * Creates a new position after given view item.\n\t *\n\t * @param {module:engine/view/item~Item} item View item after which the position should be located.\n\t * @returns {module:engine/view/position~Position}\n\t */\n\tcreatePositionAfter( item ) {\n\t\treturn Position._createAfter( item );\n\t}\n\n\t/**\n\t * Creates a new position before given view item.\n\t *\n\t * @param {module:engine/view/item~Item} item View item before which the position should be located.\n\t * @returns {module:engine/view/position~Position}\n\t */\n\tcreatePositionBefore( item ) {\n\t\treturn Position._createBefore( item );\n\t}\n\n\t/**\n\t * Creates a range spanning from `start` position to `end` position.\n\t *\n\t * **Note:** This factory method creates its own {@link module:engine/view/position~Position} instances basing on passed values.\n\t *\n\t * @param {module:engine/view/position~Position} start Start position.\n\t * @param {module:engine/view/position~Position} [end] End position. If not set, range will be collapsed at `start` position.\n\t * @returns {module:engine/view/range~Range}\n\t */\n\tcreateRange( start, end ) {\n\t\treturn new Range( start, end );\n\t}\n\n\t/**\n\t * Creates a range that starts before given {@link module:engine/view/item~Item view item} and ends after it.\n\t *\n\t * @param {module:engine/view/item~Item} item\n\t * @returns {module:engine/view/range~Range}\n\t */\n\tcreateRangeOn( item ) {\n\t\treturn Range._createOn( item );\n\t}\n\n\t/**\n\t * Creates a range inside an {@link module:engine/view/element~Element element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * @param {module:engine/view/element~Element} element Element which is a parent for the range.\n\t * @returns {module:engine/view/range~Range}\n\t */\n\tcreateRangeIn( element ) {\n\t\treturn Range._createIn( element );\n\t}\n\n\t/**\n\t * Creates new {@link module:engine/view/selection~Selection} instance.\n\t *\n\t * \t\t// Creates empty selection without ranges.\n\t *\t\tconst selection = writer.createSelection();\n\t *\n\t *\t\t// Creates selection at the given range.\n\t *\t\tconst range = writer.createRange( start, end );\n\t *\t\tconst selection = writer.createSelection( range );\n\t *\n\t *\t\t// Creates selection at the given ranges\n\t * \t\tconst ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t *\t\tconst selection = writer.createSelection( ranges );\n\t *\n\t *\t\t// Creates selection from the other selection.\n\t *\t\tconst otherSelection = writer.createSelection();\n\t *\t\tconst selection = writer.createSelection( otherSelection );\n\t *\n\t *\t\t// Creates selection from the document selection.\n\t *\t\tconst selection = writer.createSelection( editor.editing.view.document.selection );\n\t *\n\t * \t\t// Creates selection at the given position.\n\t *\t\tconst position = writer.createPositionFromPath( root, path );\n\t *\t\tconst selection = writer.createSelection( position );\n\t *\n\t *\t\t// Creates collapsed selection at the position of given item and offset.\n\t *\t\tconst paragraph = writer.createContainerElement( 'p' );\n\t *\t\tconst selection = writer.createSelection( paragraph, offset );\n\t *\n\t *\t\t// Creates a range inside an {@link module:engine/view/element~Element element} which starts before the\n\t *\t\t// first child of that element and ends after the last child of that element.\n\t *\t\tconst selection = writer.createSelection( paragraph, 'in' );\n\t *\n\t *\t\t// Creates a range on an {@link module:engine/view/item~Item item} which starts before the item and ends\n\t *\t\t// just after the item.\n\t *\t\tconst selection = writer.createSelection( paragraph, 'on' );\n\t *\n\t * `Selection`'s constructor allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t *\t\t// Creates backward selection.\n\t *\t\tconst selection = writer.createSelection( range, { backward: true } );\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be properly handled by screen readers).\n\t *\n\t *\t\t// Creates fake selection with label.\n\t *\t\tconst selection = writer.createSelection( range, { fake: true, label: 'foo' } );\n\t *\n\t * @param {module:engine/view/selection~Selectable} [selectable=null]\n\t * @param {Number|'before'|'end'|'after'|'on'|'in'} [placeOrOffset] Offset or place when selectable is an `Item`.\n\t * @param {Object} [options]\n\t * @param {Boolean} [options.backward] Sets this selection instance to be backward.\n\t * @param {Boolean} [options.fake] Sets this selection instance to be marked as `fake`.\n\t * @param {String} [options.label] Label for the fake selection.\n\t * @returns {module:engine/view/selection~Selection}\n\t */\n\tcreateSelection( selectable, placeOrOffset, options ) {\n\t\treturn new Selection( selectable, placeOrOffset, options );\n\t}\n\n\t/**\n\t * Creates placeholders for child elements of the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n\t * `elementToStructure()`} conversion helper.\n\t *\n\t *\t\tconst viewSlot = conversionApi.writer.createSlot();\n\t *\t\tconst viewPosition = conversionApi.writer.createPositionAt( viewElement, 0 );\n\t *\n\t *\t\tconversionApi.writer.insert( viewPosition, viewSlot );\n\t *\n\t * It could be filtered down to a specific subset of children (only `<foo>` model elements in this case):\n\t *\n\t *\t\tconst viewSlot = conversionApi.writer.createSlot( node => node.is( 'element', 'foo' ) );\n\t *\t\tconst viewPosition = conversionApi.writer.createPositionAt( viewElement, 0 );\n\t *\n\t *\t\tconversionApi.writer.insert( viewPosition, viewSlot );\n\t *\n\t * While providing a filtered slot, make sure to provide slots for all child nodes. A single node can not be downcasted into\n\t * multiple slots.\n\t *\n\t * **Note**: You should not change the order of nodes. View elements should be in the same order as model nodes.\n\t *\n\t * @param {'children'|module:engine/conversion/downcasthelpers~SlotFilter} [modeOrFilter='children'] The filter for child nodes.\n\t * @returns {module:engine/view/element~Element} The slot element to be placed in to the view structure while processing\n\t * {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure `elementToStructure()`}.\n\t */\n\tcreateSlot( modeOrFilter ) {\n\t\tif ( !this._slotFactory ) {\n\t\t\t/**\n\t\t\t * The `createSlot()` method is only allowed inside the `elementToStructure` downcast helper callback.\n\t\t\t *\n\t\t\t * @error view-writer-invalid-create-slot-context\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-invalid-create-slot-context', this.document );\n\t\t}\n\n\t\treturn this._slotFactory( this, modeOrFilter );\n\t}\n\n\t/**\n\t * Registers a slot factory.\n\t *\n\t * @protected\n\t * @param {Function} slotFactory The slot factory.\n\t */\n\t_registerSlotFactory( slotFactory ) {\n\t\tthis._slotFactory = slotFactory;\n\t}\n\n\t/**\n\t * Clears the registered slot factory.\n\t *\n\t * @protected\n\t */\n\t_clearSlotFactory() {\n\t\tthis._slotFactory = null;\n\t}\n\n\t/**\n\t * Inserts a node or nodes at the specified position. Takes care of breaking attributes before insertion\n\t * and merging them afterwards if requested by the breakAttributes param.\n\t *\n\t * @private\n\t * @param {module:engine/view/position~Position} position Insertion position.\n\t * @param {module:engine/view/text~Text|module:engine/view/attributeelement~AttributeElement|\n\t * module:engine/view/containerelement~ContainerElement|module:engine/view/emptyelement~EmptyElement|\n\t * module:engine/view/rawelement~RawElement|module:engine/view/uielement~UIElement|\n\t * Iterable.<module:engine/view/text~Text|\n\t * module:engine/view/attributeelement~AttributeElement|module:engine/view/containerelement~ContainerElement|\n\t * module:engine/view/emptyelement~EmptyElement|module:engine/view/rawelement~RawElement|\n\t * module:engine/view/uielement~UIElement>} nodes Node or nodes to insert.\n\t * @param {Boolean} breakAttributes Whether attributes should be broken.\n\t * @returns {module:engine/view/range~Range} Range around inserted nodes.\n\t */\n\t_insertNodes( position, nodes, breakAttributes ) {\n\t\tlet parentElement;\n\n\t\t// Break attributes on nodes that do exist in the model tree so they can have attributes, other elements\n\t\t// can't have an attribute in model and won't get wrapped with an AttributeElement while down-casted.\n\t\tif ( breakAttributes ) {\n\t\t\tparentElement = getParentContainer( position );\n\t\t} else {\n\t\t\tparentElement = position.parent.is( '$text' ) ? position.parent.parent : position.parent;\n\t\t}\n\n\t\tif ( !parentElement ) {\n\t\t\t/**\n\t\t\t * Position's parent container cannot be found.\n\t\t\t *\n\t\t\t * @error view-writer-invalid-position-container\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'view-writer-invalid-position-container',\n\t\t\t\tthis.document\n\t\t\t);\n\t\t}\n\n\t\tlet insertionPosition;\n\n\t\tif ( breakAttributes ) {\n\t\t\tinsertionPosition = this._breakAttributes( position, true );\n\t\t} else {\n\t\t\tinsertionPosition = position.parent.is( '$text' ) ? breakTextNode( position ) : position;\n\t\t}\n\n\t\tconst length = parentElement._insertChild( insertionPosition.offset, nodes );\n\n\t\tfor ( const node of nodes ) {\n\t\t\tthis._addToClonedElementsGroup( node );\n\t\t}\n\n\t\tconst endPosition = insertionPosition.getShiftedBy( length );\n\t\tconst start = this.mergeAttributes( insertionPosition );\n\n\t\t// If start position was merged - move end position.\n\t\tif ( !start.isEqual( insertionPosition ) ) {\n\t\t\tendPosition.offset--;\n\t\t}\n\n\t\tconst end = this.mergeAttributes( endPosition );\n\n\t\treturn new Range( start, end );\n\t}\n\n\t/**\n\t * Wraps children with provided `wrapElement`. Only children contained in `parent` element between\n\t * `startOffset` and `endOffset` will be wrapped.\n\t *\n\t * @private\n\t * @param {module:engine/view/element~Element} parent\n\t * @param {Number} startOffset\n\t * @param {Number} endOffset\n\t * @param {module:engine/view/element~Element} wrapElement\n\t */\n\t_wrapChildren( parent, startOffset, endOffset, wrapElement ) {\n\t\tlet i = startOffset;\n\t\tconst wrapPositions = [];\n\n\t\twhile ( i < endOffset ) {\n\t\t\tconst child = parent.getChild( i );\n\t\t\tconst isText = child.is( '$text' );\n\t\t\tconst isAttribute = child.is( 'attributeElement' );\n\t\t\tconst isAllowedInsideAttributeElement = child.isAllowedInsideAttributeElement;\n\n\t\t\t//\n\t\t\t// (In all examples, assume that `wrapElement` is `<span class=\"foo\">` element.)\n\t\t\t//\n\t\t\t// Check if `wrapElement` can be joined with the wrapped element. One of requirements is having same name.\n\t\t\t// If possible, join elements.\n\t\t\t//\n\t\t\t// <p><span class=\"bar\">abc</span></p> --> <p><span class=\"foo bar\">abc</span></p>\n\t\t\t//\n\t\t\tif ( isAttribute && this._wrapAttributeElement( wrapElement, child ) ) {\n\t\t\t\twrapPositions.push( new Position( parent, i ) );\n\t\t\t}\n\t\t\t//\n\t\t\t// Wrap the child if it is not an attribute element or if it is an attribute element that should be inside\n\t\t\t// `wrapElement` (due to priority).\n\t\t\t//\n\t\t\t// <p>abc</p> --> <p><span class=\"foo\">abc</span></p>\n\t\t\t// <p><strong>abc</strong></p> --> <p><span class=\"foo\"><strong>abc</strong></span></p>\n\t\t\telse if ( isText || isAllowedInsideAttributeElement || ( isAttribute && shouldABeOutsideB( wrapElement, child ) ) ) {\n\t\t\t\t// Clone attribute.\n\t\t\t\tconst newAttribute = wrapElement._clone();\n\n\t\t\t\t// Wrap current node with new attribute.\n\t\t\t\tchild._remove();\n\t\t\t\tnewAttribute._appendChild( child );\n\n\t\t\t\tparent._insertChild( i, newAttribute );\n\t\t\t\tthis._addToClonedElementsGroup( newAttribute );\n\n\t\t\t\twrapPositions.push( new Position( parent, i ) );\n\t\t\t}\n\t\t\t//\n\t\t\t// If other nested attribute is found and it wasn't wrapped (see above), continue wrapping inside it.\n\t\t\t//\n\t\t\t// <p><a href=\"foo.html\">abc</a></p> --> <p><a href=\"foo.html\"><span class=\"foo\">abc</span></a></p>\n\t\t\t//\n\t\t\telse if ( isAttribute ) {\n\t\t\t\tthis._wrapChildren( child, 0, child.childCount, wrapElement );\n\t\t\t}\n\n\t\t\ti++;\n\t\t}\n\n\t\t// Merge at each wrap.\n\t\tlet offsetChange = 0;\n\n\t\tfor ( const position of wrapPositions ) {\n\t\t\tposition.offset -= offsetChange;\n\n\t\t\t// Do not merge with elements outside selected children.\n\t\t\tif ( position.offset == startOffset ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst newPosition = this.mergeAttributes( position );\n\n\t\t\t// If nodes were merged - other merge offsets will change.\n\t\t\tif ( !newPosition.isEqual( position ) ) {\n\t\t\t\toffsetChange++;\n\t\t\t\tendOffset--;\n\t\t\t}\n\t\t}\n\n\t\treturn Range._createFromParentsAndOffsets( parent, startOffset, parent, endOffset );\n\t}\n\n\t/**\n\t * Unwraps children from provided `unwrapElement`. Only children contained in `parent` element between\n\t * `startOffset` and `endOffset` will be unwrapped.\n\t *\n\t * @private\n\t * @param {module:engine/view/element~Element} parent\n\t * @param {Number} startOffset\n\t * @param {Number} endOffset\n\t * @param {module:engine/view/element~Element} unwrapElement\n\t */\n\t_unwrapChildren( parent, startOffset, endOffset, unwrapElement ) {\n\t\tlet i = startOffset;\n\t\tconst unwrapPositions = [];\n\n\t\t// Iterate over each element between provided offsets inside parent.\n\t\t// We don't use tree walker or range iterator because we will be removing and merging potentially multiple nodes,\n\t\t// so it could get messy. It is safer to it manually in this case.\n\t\twhile ( i < endOffset ) {\n\t\t\tconst child = parent.getChild( i );\n\n\t\t\t// Skip all text nodes. There should be no container element's here either.\n\t\t\tif ( !child.is( 'attributeElement' ) ) {\n\t\t\t\ti++;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// (In all examples, assume that `unwrapElement` is `<span class=\"foo\">` element.)\n\t\t\t//\n\t\t\t// If the child is similar to the given attribute element, unwrap it - it will be completely removed.\n\t\t\t//\n\t\t\t// <p><span class=\"foo\">abc</span>xyz</p> --> <p>abcxyz</p>\n\t\t\t//\n\t\t\tif ( child.isSimilar( unwrapElement ) ) {\n\t\t\t\tconst unwrapped = child.getChildren();\n\t\t\t\tconst count = child.childCount;\n\n\t\t\t\t// Replace wrapper element with its children\n\t\t\t\tchild._remove();\n\t\t\t\tparent._insertChild( i, unwrapped );\n\n\t\t\t\tthis._removeFromClonedElementsGroup( child );\n\n\t\t\t\t// Save start and end position of moved items.\n\t\t\t\tunwrapPositions.push(\n\t\t\t\t\tnew Position( parent, i ),\n\t\t\t\t\tnew Position( parent, i + count )\n\t\t\t\t);\n\n\t\t\t\t// Skip elements that were unwrapped. Assuming there won't be another element to unwrap in child elements.\n\t\t\t\ti += count;\n\t\t\t\tendOffset += count - 1;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// If the child is not similar but is an attribute element, try partial unwrapping - remove the same attributes/styles/classes.\n\t\t\t// Partial unwrapping will happen only if the elements have the same name.\n\t\t\t//\n\t\t\t// <p><span class=\"foo bar\">abc</span>xyz</p> --> <p><span class=\"bar\">abc</span>xyz</p>\n\t\t\t// <p><i class=\"foo\">abc</i>xyz</p> --> <p><i class=\"foo\">abc</i>xyz</p>\n\t\t\t//\n\t\t\tif ( this._unwrapAttributeElement( unwrapElement, child ) ) {\n\t\t\t\tunwrapPositions.push(\n\t\t\t\t\tnew Position( parent, i ),\n\t\t\t\t\tnew Position( parent, i + 1 )\n\t\t\t\t);\n\n\t\t\t\ti++;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// If other nested attribute is found, look through it's children for elements to unwrap.\n\t\t\t//\n\t\t\t// <p><i><span class=\"foo\">abc</span></i><p> --> <p><i>abc</i><p>\n\t\t\t//\n\t\t\tthis._unwrapChildren( child, 0, child.childCount, unwrapElement );\n\n\t\t\ti++;\n\t\t}\n\n\t\t// Merge at each unwrap.\n\t\tlet offsetChange = 0;\n\n\t\tfor ( const position of unwrapPositions ) {\n\t\t\tposition.offset -= offsetChange;\n\n\t\t\t// Do not merge with elements outside selected children.\n\t\t\tif ( position.offset == startOffset || position.offset == endOffset ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst newPosition = this.mergeAttributes( position );\n\n\t\t\t// If nodes were merged - other merge offsets will change.\n\t\t\tif ( !newPosition.isEqual( position ) ) {\n\t\t\t\toffsetChange++;\n\t\t\t\tendOffset--;\n\t\t\t}\n\t\t}\n\n\t\treturn Range._createFromParentsAndOffsets( parent, startOffset, parent, endOffset );\n\t}\n\n\t/**\n\t * Helper function for `view.writer.wrap`. Wraps range with provided attribute element.\n\t * This method will also merge newly added attribute element with its siblings whenever possible.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t * an instance of {@link module:engine/view/attributeelement~AttributeElement AttributeElement}.\n\t *\n\t * @private\n\t * @param {module:engine/view/range~Range} range\n\t * @param {module:engine/view/attributeelement~AttributeElement} attribute\n\t * @returns {module:engine/view/range~Range} New range after wrapping, spanning over wrapping attribute element.\n\t */\n\t_wrapRange( range, attribute ) {\n\t\t// Break attributes at range start and end.\n\t\tconst { start: breakStart, end: breakEnd } = this._breakAttributesRange( range, true );\n\t\tconst parentContainer = breakStart.parent;\n\n\t\t// Wrap all children with attribute.\n\t\tconst newRange = this._wrapChildren( parentContainer, breakStart.offset, breakEnd.offset, attribute );\n\n\t\t// Merge attributes at the both ends and return a new range.\n\t\tconst start = this.mergeAttributes( newRange.start );\n\n\t\t// If start position was merged - move end position back.\n\t\tif ( !start.isEqual( newRange.start ) ) {\n\t\t\tnewRange.end.offset--;\n\t\t}\n\t\tconst end = this.mergeAttributes( newRange.end );\n\n\t\treturn new Range( start, end );\n\t}\n\n\t/**\n\t * Helper function for {@link #wrap}. Wraps position with provided attribute element.\n\t * This method will also merge newly added attribute element with its siblings whenever possible.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t * an instance of {@link module:engine/view/attributeelement~AttributeElement AttributeElement}.\n\t *\n\t * @private\n\t * @param {module:engine/view/position~Position} position\n\t * @param {module:engine/view/attributeelement~AttributeElement} attribute\n\t * @returns {module:engine/view/position~Position} New position after wrapping.\n\t */\n\t_wrapPosition( position, attribute ) {\n\t\t// Return same position when trying to wrap with attribute similar to position parent.\n\t\tif ( attribute.isSimilar( position.parent ) ) {\n\t\t\treturn movePositionToTextNode( position.clone() );\n\t\t}\n\n\t\t// When position is inside text node - break it and place new position between two text nodes.\n\t\tif ( position.parent.is( '$text' ) ) {\n\t\t\tposition = breakTextNode( position );\n\t\t}\n\n\t\t// Create fake element that will represent position, and will not be merged with other attributes.\n\t\tconst fakePosition = this.createAttributeElement();\n\t\tfakePosition._priority = Number.POSITIVE_INFINITY;\n\t\tfakePosition.isSimilar = () => false;\n\n\t\t// Insert fake element in position location.\n\t\tposition.parent._insertChild( position.offset, fakePosition );\n\n\t\t// Range around inserted fake attribute element.\n\t\tconst wrapRange = new Range( position, position.getShiftedBy( 1 ) );\n\n\t\t// Wrap fake element with attribute (it will also merge if possible).\n\t\tthis.wrap( wrapRange, attribute );\n\n\t\t// Remove fake element and place new position there.\n\t\tconst newPosition = new Position( fakePosition.parent, fakePosition.index );\n\t\tfakePosition._remove();\n\n\t\t// If position is placed between text nodes - merge them and return position inside.\n\t\tconst nodeBefore = newPosition.nodeBefore;\n\t\tconst nodeAfter = newPosition.nodeAfter;\n\n\t\tif ( nodeBefore instanceof Text && nodeAfter instanceof Text ) {\n\t\t\treturn mergeTextNodes( nodeBefore, nodeAfter );\n\t\t}\n\n\t\t// If position is next to text node - move position inside.\n\t\treturn movePositionToTextNode( newPosition );\n\t}\n\n\t/**\n\t * \tWraps one {@link module:engine/view/attributeelement~AttributeElement AttributeElement} into another by\n\t * \tmerging them if possible. When merging is possible - all attributes, styles and classes are moved from wrapper\n\t * \telement to element being wrapped.\n\t *\n\t * \t@private\n\t * \t@param {module:engine/view/attributeelement~AttributeElement} wrapper Wrapper AttributeElement.\n\t * \t@param {module:engine/view/attributeelement~AttributeElement} toWrap AttributeElement to wrap using wrapper element.\n\t * \t@returns {Boolean} Returns `true` if elements are merged.\n\t */\n\t_wrapAttributeElement( wrapper, toWrap ) {\n\t\tif ( !canBeJoined( wrapper, toWrap ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Can't merge if name or priority differs.\n\t\tif ( wrapper.name !== toWrap.name || wrapper.priority !== toWrap.priority ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if attributes can be merged.\n\t\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t\t// Classes and styles should be checked separately.\n\t\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If some attributes are different we cannot wrap.\n\t\t\tif ( toWrap.hasAttribute( key ) && toWrap.getAttribute( key ) !== wrapper.getAttribute( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Check if styles can be merged.\n\t\tfor ( const key of wrapper.getStyleNames() ) {\n\t\t\tif ( toWrap.hasStyle( key ) && toWrap.getStyle( key ) !== wrapper.getStyle( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Move all attributes/classes/styles from wrapper to wrapped AttributeElement.\n\t\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t\t// Classes and styles should be checked separately.\n\t\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Move only these attributes that are not present - other are similar.\n\t\t\tif ( !toWrap.hasAttribute( key ) ) {\n\t\t\t\tthis.setAttribute( key, wrapper.getAttribute( key ), toWrap );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const key of wrapper.getStyleNames() ) {\n\t\t\tif ( !toWrap.hasStyle( key ) ) {\n\t\t\t\tthis.setStyle( key, wrapper.getStyle( key ), toWrap );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const key of wrapper.getClassNames() ) {\n\t\t\tif ( !toWrap.hasClass( key ) ) {\n\t\t\t\tthis.addClass( key, toWrap );\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Unwraps {@link module:engine/view/attributeelement~AttributeElement AttributeElement} from another by removing\n\t * corresponding attributes, classes and styles. All attributes, classes and styles from wrapper should be present\n\t * inside element being unwrapped.\n\t *\n\t * @private\n\t * @param {module:engine/view/attributeelement~AttributeElement} wrapper Wrapper AttributeElement.\n\t * @param {module:engine/view/attributeelement~AttributeElement} toUnwrap AttributeElement to unwrap using wrapper element.\n\t * @returns {Boolean} Returns `true` if elements are unwrapped.\n\t **/\n\t_unwrapAttributeElement( wrapper, toUnwrap ) {\n\t\tif ( !canBeJoined( wrapper, toUnwrap ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Can't unwrap if name or priority differs.\n\t\tif ( wrapper.name !== toUnwrap.name || wrapper.priority !== toUnwrap.priority ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if AttributeElement has all wrapper attributes.\n\t\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t\t// Classes and styles should be checked separately.\n\t\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If some attributes are missing or different we cannot unwrap.\n\t\t\tif ( !toUnwrap.hasAttribute( key ) || toUnwrap.getAttribute( key ) !== wrapper.getAttribute( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Check if AttributeElement has all wrapper classes.\n\t\tif ( !toUnwrap.hasClass( ...wrapper.getClassNames() ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if AttributeElement has all wrapper styles.\n\t\tfor ( const key of wrapper.getStyleNames() ) {\n\t\t\t// If some styles are missing or different we cannot unwrap.\n\t\t\tif ( !toUnwrap.hasStyle( key ) || toUnwrap.getStyle( key ) !== wrapper.getStyle( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Remove all wrapper's attributes from unwrapped element.\n\t\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t\t// Classes and styles should be checked separately.\n\t\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tthis.removeAttribute( key, toUnwrap );\n\t\t}\n\n\t\t// Remove all wrapper's classes from unwrapped element.\n\t\tthis.removeClass( Array.from( wrapper.getClassNames() ), toUnwrap );\n\n\t\t// Remove all wrapper's styles from unwrapped element.\n\t\tthis.removeStyle( Array.from( wrapper.getStyleNames() ), toUnwrap );\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Helper function used by other `DowncastWriter` methods. Breaks attribute elements at the boundaries of given range.\n\t *\n\t * @private\n\t * @param {module:engine/view/range~Range} range Range which `start` and `end` positions will be used to break attributes.\n\t * @param {Boolean} [forceSplitText=false] If set to `true`, will break text nodes even if they are directly in container element.\n\t * This behavior will result in incorrect view state, but is needed by other view writing methods which then fixes view state.\n\t * @returns {module:engine/view/range~Range} New range with located at break positions.\n\t */\n\t_breakAttributesRange( range, forceSplitText = false ) {\n\t\tconst rangeStart = range.start;\n\t\tconst rangeEnd = range.end;\n\n\t\tvalidateRangeContainer( range, this.document );\n\n\t\t// Break at the collapsed position. Return new collapsed range.\n\t\tif ( range.isCollapsed ) {\n\t\t\tconst position = this._breakAttributes( range.start, forceSplitText );\n\n\t\t\treturn new Range( position, position );\n\t\t}\n\n\t\tconst breakEnd = this._breakAttributes( rangeEnd, forceSplitText );\n\t\tconst count = breakEnd.parent.childCount;\n\t\tconst breakStart = this._breakAttributes( rangeStart, forceSplitText );\n\n\t\t// Calculate new break end offset.\n\t\tbreakEnd.offset += breakEnd.parent.childCount - count;\n\n\t\treturn new Range( breakStart, breakEnd );\n\t}\n\n\t/**\n\t * Helper function used by other `DowncastWriter` methods. Breaks attribute elements at given position.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-empty-element` when break position\n\t * is placed inside {@link module:engine/view/emptyelement~EmptyElement EmptyElement}.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-ui-element` when break position\n\t * is placed inside {@link module:engine/view/uielement~UIElement UIElement}.\n\t *\n\t * @private\n\t * @param {module:engine/view/position~Position} position Position where to break attributes.\n\t * @param {Boolean} [forceSplitText=false] If set to `true`, will break text nodes even if they are directly in container element.\n\t * This behavior will result in incorrect view state, but is needed by other view writing methods which then fixes view state.\n\t * @returns {module:engine/view/position~Position} New position after breaking the attributes.\n\t */\n\t_breakAttributes( position, forceSplitText = false ) {\n\t\tconst positionOffset = position.offset;\n\t\tconst positionParent = position.parent;\n\n\t\t// If position is placed inside EmptyElement - throw an exception as we cannot break inside.\n\t\tif ( position.parent.is( 'emptyElement' ) ) {\n\t\t\t/**\n\t\t\t * Cannot break an `EmptyElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes `DowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-empty-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-cannot-break-empty-element', this.document );\n\t\t}\n\n\t\t// If position is placed inside UIElement - throw an exception as we cannot break inside.\n\t\tif ( position.parent.is( 'uiElement' ) ) {\n\t\t\t/**\n\t\t\t * Cannot break a `UIElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes `DowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-ui-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-cannot-break-ui-element', this.document );\n\t\t}\n\n\t\t// If position is placed inside RawElement - throw an exception as we cannot break inside.\n\t\tif ( position.parent.is( 'rawElement' ) ) {\n\t\t\t/**\n\t\t\t * Cannot break a `RawElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes `DowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-raw-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-cannot-break-raw-element', this.document );\n\t\t}\n\n\t\t// There are no attributes to break and text nodes breaking is not forced.\n\t\tif ( !forceSplitText && positionParent.is( '$text' ) && isContainerOrFragment( positionParent.parent ) ) {\n\t\t\treturn position.clone();\n\t\t}\n\n\t\t// Position's parent is container, so no attributes to break.\n\t\tif ( isContainerOrFragment( positionParent ) ) {\n\t\t\treturn position.clone();\n\t\t}\n\n\t\t// Break text and start again in new position.\n\t\tif ( positionParent.is( '$text' ) ) {\n\t\t\treturn this._breakAttributes( breakTextNode( position ), forceSplitText );\n\t\t}\n\n\t\tconst length = positionParent.childCount;\n\n\t\t// <p>foo<b><u>bar{}</u></b></p>\n\t\t// <p>foo<b><u>bar</u>[]</b></p>\n\t\t// <p>foo<b><u>bar</u></b>[]</p>\n\t\tif ( positionOffset == length ) {\n\t\t\tconst newPosition = new Position( positionParent.parent, positionParent.index + 1 );\n\n\t\t\treturn this._breakAttributes( newPosition, forceSplitText );\n\t\t} else {\n\t\t\t// <p>foo<b><u>{}bar</u></b></p>\n\t\t\t// <p>foo<b>[]<u>bar</u></b></p>\n\t\t\t// <p>foo{}<b><u>bar</u></b></p>\n\t\t\tif ( positionOffset === 0 ) {\n\t\t\t\tconst newPosition = new Position( positionParent.parent, positionParent.index );\n\n\t\t\t\treturn this._breakAttributes( newPosition, forceSplitText );\n\t\t\t}\n\t\t\t// <p>foo<b><u>b{}ar</u></b></p>\n\t\t\t// <p>foo<b><u>b[]ar</u></b></p>\n\t\t\t// <p>foo<b><u>b</u>[]<u>ar</u></b></p>\n\t\t\t// <p>foo<b><u>b</u></b>[]<b><u>ar</u></b></p>\n\t\t\telse {\n\t\t\t\tconst offsetAfter = positionParent.index + 1;\n\n\t\t\t\t// Break element.\n\t\t\t\tconst clonedNode = positionParent._clone();\n\n\t\t\t\t// Insert cloned node to position's parent node.\n\t\t\t\tpositionParent.parent._insertChild( offsetAfter, clonedNode );\n\t\t\t\tthis._addToClonedElementsGroup( clonedNode );\n\n\t\t\t\t// Get nodes to move.\n\t\t\t\tconst count = positionParent.childCount - positionOffset;\n\t\t\t\tconst nodesToMove = positionParent._removeChildren( positionOffset, count );\n\n\t\t\t\t// Move nodes to cloned node.\n\t\t\t\tclonedNode._appendChild( nodesToMove );\n\n\t\t\t\t// Create new position to work on.\n\t\t\t\tconst newPosition = new Position( positionParent.parent, offsetAfter );\n\n\t\t\t\treturn this._breakAttributes( newPosition, forceSplitText );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Stores the information that an {@link module:engine/view/attributeelement~AttributeElement attribute element} was\n\t * added to the tree. Saves the reference to the group in the given element and updates the group, so other elements\n\t * from the group now keep a reference to the given attribute element.\n\t *\n\t * The clones group can be obtained using {@link module:engine/view/attributeelement~AttributeElement#getElementsWithSameId}.\n\t *\n\t * Does nothing if added element has no {@link module:engine/view/attributeelement~AttributeElement#id id}.\n\t *\n\t * @private\n\t * @param {module:engine/view/attributeelement~AttributeElement} element Attribute element to save.\n\t */\n\t_addToClonedElementsGroup( element ) {\n\t\t// Add only if the element is in document tree.\n\t\tif ( !element.root.is( 'rootElement' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Traverse the element's children recursively to find other attribute elements that also might got inserted.\n\t\t// The loop is at the beginning so we can make fast returns later in the code.\n\t\tif ( element.is( 'element' ) ) {\n\t\t\tfor ( const child of element.getChildren() ) {\n\t\t\t\tthis._addToClonedElementsGroup( child );\n\t\t\t}\n\t\t}\n\n\t\tconst id = element.id;\n\n\t\tif ( !id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet group = this._cloneGroups.get( id );\n\n\t\tif ( !group ) {\n\t\t\tgroup = new Set();\n\t\t\tthis._cloneGroups.set( id, group );\n\t\t}\n\n\t\tgroup.add( element );\n\t\telement._clonesGroup = group;\n\t}\n\n\t/**\n\t * Removes all the information about the given {@link module:engine/view/attributeelement~AttributeElement attribute element}\n\t * from its clones group.\n\t *\n\t * Keep in mind, that the element will still keep a reference to the group (but the group will not keep a reference to it).\n\t * This allows to reference the whole group even if the element was already removed from the tree.\n\t *\n\t * Does nothing if the element has no {@link module:engine/view/attributeelement~AttributeElement#id id}.\n\t *\n\t * @private\n\t * @param {module:engine/view/attributeelement~AttributeElement} element Attribute element to remove.\n\t */\n\t_removeFromClonedElementsGroup( element ) {\n\t\t// Traverse the element's children recursively to find other attribute elements that also got removed.\n\t\t// The loop is at the beginning so we can make fast returns later in the code.\n\t\tif ( element.is( 'element' ) ) {\n\t\t\tfor ( const child of element.getChildren() ) {\n\t\t\t\tthis._removeFromClonedElementsGroup( child );\n\t\t\t}\n\t\t}\n\n\t\tconst id = element.id;\n\n\t\tif ( !id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst group = this._cloneGroups.get( id );\n\n\t\tif ( !group ) {\n\t\t\treturn;\n\t\t}\n\n\t\tgroup.delete( element );\n\t\t// Not removing group from element on purpose!\n\t\t// If other parts of code have reference to this element, they will be able to get references to other elements from the group.\n\t}\n}\n\n// Helper function for `view.writer.wrap`. Checks if given element has any children that are not ui elements.\nfunction _hasNonUiChildren( parent ) {\n\treturn Array.from( parent.getChildren() ).some( child => !child.is( 'uiElement' ) );\n}\n\n/**\n * The `attribute` passed to {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#wrap()`}\n * must be an instance of {@link module:engine/view/attributeelement~AttributeElement `AttributeElement`}.\n *\n * @error view-writer-wrap-invalid-attribute\n */\n\n// Returns first parent container of specified {@link module:engine/view/position~Position Position}.\n// Position's parent node is checked as first, then next parents are checked.\n// Note that {@link module:engine/view/documentfragment~DocumentFragment DocumentFragment} is treated like a container.\n//\n// @param {module:engine/view/position~Position} position Position used as a start point to locate parent container.\n// @returns {module:engine/view/containerelement~ContainerElement|module:engine/view/documentfragment~DocumentFragment|undefined}\n// Parent container element or `undefined` if container is not found.\nfunction getParentContainer( position ) {\n\tlet parent = position.parent;\n\n\twhile ( !isContainerOrFragment( parent ) ) {\n\t\tif ( !parent ) {\n\t\t\treturn undefined;\n\t\t}\n\t\tparent = parent.parent;\n\t}\n\n\treturn parent;\n}\n\n// Checks if first {@link module:engine/view/attributeelement~AttributeElement AttributeElement} provided to the function\n// can be wrapped outside second element. It is done by comparing elements'\n// {@link module:engine/view/attributeelement~AttributeElement#priority priorities}, if both have same priority\n// {@link module:engine/view/element~Element#getIdentity identities} are compared.\n//\n// @param {module:engine/view/attributeelement~AttributeElement} a\n// @param {module:engine/view/attributeelement~AttributeElement} b\n// @returns {Boolean}\nfunction shouldABeOutsideB( a, b ) {\n\tif ( a.priority < b.priority ) {\n\t\treturn true;\n\t} else if ( a.priority > b.priority ) {\n\t\treturn false;\n\t}\n\n\t// When priorities are equal and names are different - use identities.\n\treturn a.getIdentity() < b.getIdentity();\n}\n\n// Returns new position that is moved to near text node. Returns same position if there is no text node before of after\n// specified position.\n//\n//\t\t<p>foo[]</p> -> <p>foo{}</p>\n//\t\t<p>[]foo</p> -> <p>{}foo</p>\n//\n// @param {module:engine/view/position~Position} position\n// @returns {module:engine/view/position~Position} Position located inside text node or same position if there is no text nodes\n// before or after position location.\nfunction movePositionToTextNode( position ) {\n\tconst nodeBefore = position.nodeBefore;\n\n\tif ( nodeBefore && nodeBefore.is( '$text' ) ) {\n\t\treturn new Position( nodeBefore, nodeBefore.data.length );\n\t}\n\n\tconst nodeAfter = position.nodeAfter;\n\n\tif ( nodeAfter && nodeAfter.is( '$text' ) ) {\n\t\treturn new Position( nodeAfter, 0 );\n\t}\n\n\treturn position;\n}\n\n// Breaks text node into two text nodes when possible.\n//\n//\t\t<p>foo{}bar</p> -> <p>foo[]bar</p>\n//\t\t<p>{}foobar</p> -> <p>[]foobar</p>\n//\t\t<p>foobar{}</p> -> <p>foobar[]</p>\n//\n// @param {module:engine/view/position~Position} position Position that need to be placed inside text node.\n// @returns {module:engine/view/position~Position} New position after breaking text node.\nfunction breakTextNode( position ) {\n\tif ( position.offset == position.parent.data.length ) {\n\t\treturn new Position( position.parent.parent, position.parent.index + 1 );\n\t}\n\n\tif ( position.offset === 0 ) {\n\t\treturn new Position( position.parent.parent, position.parent.index );\n\t}\n\n\t// Get part of the text that need to be moved.\n\tconst textToMove = position.parent.data.slice( position.offset );\n\n\t// Leave rest of the text in position's parent.\n\tposition.parent._data = position.parent.data.slice( 0, position.offset );\n\n\t// Insert new text node after position's parent text node.\n\tposition.parent.parent._insertChild( position.parent.index + 1, new Text( position.root.document, textToMove ) );\n\n\t// Return new position between two newly created text nodes.\n\treturn new Position( position.parent.parent, position.parent.index + 1 );\n}\n\n// Merges two text nodes into first node. Removes second node and returns merge position.\n//\n// @param {module:engine/view/text~Text} t1 First text node to merge. Data from second text node will be moved at the end of\n// this text node.\n// @param {module:engine/view/text~Text} t2 Second text node to merge. This node will be removed after merging.\n// @returns {module:engine/view/position~Position} Position after merging text nodes.\nfunction mergeTextNodes( t1, t2 ) {\n\t// Merge text data into first text node and remove second one.\n\tconst nodeBeforeLength = t1.data.length;\n\tt1._data += t2.data;\n\tt2._remove();\n\n\treturn new Position( t1, nodeBeforeLength );\n}\n\n// Checks if provided nodes are valid to insert.\n//\n// Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-insert-invalid-node` when nodes to insert\n// contains instances that are not supported ones (see error description for valid ones.\n//\n// @param Iterable.<module:engine/view/text~Text|module:engine/view/element~Element> nodes\n// @param {Object} errorContext\nfunction validateNodesToInsert( nodes, errorContext ) {\n\tfor ( const node of nodes ) {\n\t\tif ( !validNodesToInsert.some( ( validNode => node instanceof validNode ) ) ) { // eslint-disable-line no-use-before-define\n\t\t\t/**\n\t\t\t * One of the nodes to be inserted is of an invalid type.\n\t\t\t *\n\t\t\t * Nodes to be inserted with {@link module:engine/view/downcastwriter~DowncastWriter#insert `DowncastWriter#insert()`} should be\n\t\t\t * of the following types:\n\t\t\t *\n\t\t\t * * {@link module:engine/view/attributeelement~AttributeElement AttributeElement},\n\t\t\t * * {@link module:engine/view/containerelement~ContainerElement ContainerElement},\n\t\t\t * * {@link module:engine/view/emptyelement~EmptyElement EmptyElement},\n\t\t\t * * {@link module:engine/view/uielement~UIElement UIElement},\n\t\t\t * * {@link module:engine/view/rawelement~RawElement RawElement},\n\t\t\t * * {@link module:engine/view/text~Text Text}.\n\t\t\t *\n\t\t\t * @error view-writer-insert-invalid-node-type\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-insert-invalid-node-type', errorContext );\n\t\t}\n\n\t\tif ( !node.is( '$text' ) ) {\n\t\t\tvalidateNodesToInsert( node.getChildren(), errorContext );\n\t\t}\n\t}\n}\n\nconst validNodesToInsert = [ Text, AttributeElement, ContainerElement, EmptyElement, RawElement, UIElement ];\n\n// Checks if node is ContainerElement or DocumentFragment, because in most cases they should be treated the same way.\n//\n// @param {module:engine/view/node~Node} node\n// @returns {Boolean} Returns `true` if node is instance of ContainerElement or DocumentFragment.\nfunction isContainerOrFragment( node ) {\n\treturn node && ( node.is( 'containerElement' ) || node.is( 'documentFragment' ) );\n}\n\n// Checks if {@link module:engine/view/range~Range#start range start} and {@link module:engine/view/range~Range#end range end} are placed\n// inside same {@link module:engine/view/containerelement~ContainerElement container element}.\n// Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when validation fails.\n//\n// @param {module:engine/view/range~Range} range\n// @param {Object} errorContext\nfunction validateRangeContainer( range, errorContext ) {\n\tconst startContainer = getParentContainer( range.start );\n\tconst endContainer = getParentContainer( range.end );\n\n\tif ( !startContainer || !endContainer || startContainer !== endContainer ) {\n\t\t/**\n\t\t * The container of the given range is invalid.\n\t\t *\n\t\t * This may happen if {@link module:engine/view/range~Range#start range start} and\n\t\t * {@link module:engine/view/range~Range#end range end} positions are not placed inside the same container element or\n\t\t * a parent container for these positions cannot be found.\n\t\t *\n\t\t * Methods like {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#remove()`},\n\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#clean()`},\n\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#wrap()`},\n\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#unwrap()`} need to be called\n\t\t * on a range that has its start and end positions located in the same container element. Both positions can be\n\t\t * nested within other elements (e.g. an attribute element) but the closest container ancestor must be the same.\n\t\t *\n\t\t * @error view-writer-invalid-range-container\n\t\t */\n\t\tthrow new CKEditorError( 'view-writer-invalid-range-container', errorContext );\n\t}\n}\n\n// Checks if two attribute elements can be joined together. Elements can be joined together if, and only if\n// they do not have ids specified.\n//\n// @private\n// @param {module:engine/view/element~Element} a\n// @param {module:engine/view/element~Element} b\n// @returns {Boolean}\nfunction canBeJoined( a, b ) {\n\treturn a.id === null && b.id === null;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/istext\n */\n\n/**\n * Checks if the object is a native DOM Text node.\n *\n * @param {*} obj\n * @returns {Boolean}\n */\nexport default function isText( obj ) {\n\treturn Object.prototype.toString.call( obj ) == '[object Text]';\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\nimport { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';\nimport isText from '@ckeditor/ckeditor5-utils/src/dom/istext';\n\n/**\n * Set of utilities related to handling block and inline fillers.\n *\n * Browsers do not allow to put caret in elements which does not have height. Because of it, we need to fill all\n * empty elements which should be selectable with elements or characters called \"fillers\". Unfortunately there is no one\n * universal filler, this is why two types are uses:\n *\n * * Block filler is an element which fill block elements, like `<p>`. CKEditor uses `<br>` as a block filler during the editing,\n * as browsers do natively. So instead of an empty `<p>` there will be `<p><br></p>`. The advantage of block filler is that\n * it is transparent for the selection, so when the caret is before the `<br>` and user presses right arrow he will be\n * moved to the next paragraph, not after the `<br>`. The disadvantage is that it breaks a block, so it can not be used\n * in the middle of a line of text. The {@link module:engine/view/filler~BR_FILLER `<br>` filler} can be replaced with any other\n * character in the data output, for instance {@link module:engine/view/filler~NBSP_FILLER non-breaking space} or\n * {@link module:engine/view/filler~MARKED_NBSP_FILLER marked non-breaking space}.\n *\n * * Inline filler is a filler which does not break a line of text, so it can be used inside the text, for instance in the empty\n * `<b>` surrendered by text: `foo<b></b>bar`, if we want to put the caret there. CKEditor uses a sequence of the zero-width\n * spaces as an {@link module:engine/view/filler~INLINE_FILLER inline filler} having the predetermined\n * {@link module:engine/view/filler~INLINE_FILLER_LENGTH length}. A sequence is used, instead of a single character to\n * avoid treating random zero-width spaces as the inline filler. Disadvantage of the inline filler is that it is not\n * transparent for the selection. The arrow key moves the caret between zero-width spaces characters, so the additional\n * code is needed to handle the caret.\n *\n * Both inline and block fillers are handled by the {@link module:engine/view/renderer~Renderer renderer} and are not present in the\n * view.\n *\n * @module engine/view/filler\n */\n\n/**\n * Non-breaking space filler creator. This function creates the `&nbsp;` text node.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~MARKED_NBSP_FILLER\n * @see module:engine/view/filler~BR_FILLER\n * @function\n */\nexport const NBSP_FILLER = domDocument => domDocument.createTextNode( '\\u00A0' );\n\n/**\n * Marked non-breaking space filler creator. This function creates the `<span data-cke-filler=\"true\">&nbsp;</span>` element.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~NBSP_FILLER\n * @see module:engine/view/filler~BR_FILLER\n * @function\n */\nexport const MARKED_NBSP_FILLER = domDocument => {\n\tconst span = domDocument.createElement( 'span' );\n\tspan.dataset.ckeFiller = true;\n\tspan.innerHTML = '\\u00A0';\n\n\treturn span;\n};\n\n/**\n * `<br>` filler creator. This function creates the `<br data-cke-filler=\"true\">` element.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~NBSP_FILLER\n * @see module:engine/view/filler~MARKED_NBSP_FILLER\n * @function\n */\nexport const BR_FILLER = domDocument => {\n\tconst fillerBr = domDocument.createElement( 'br' );\n\tfillerBr.dataset.ckeFiller = true;\n\n\treturn fillerBr;\n};\n\n/**\n * Length of the {@link module:engine/view/filler~INLINE_FILLER INLINE_FILLER}.\n */\nexport const INLINE_FILLER_LENGTH = 7;\n\n/**\n * Inline filler which is a sequence of the word joiners.\n *\n * @type {String}\n */\nexport const INLINE_FILLER = '\\u2060'.repeat( INLINE_FILLER_LENGTH );\n\n/**\n * Checks if the node is a text node which starts with the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n *\n *\t\tstartsWithFiller( document.createTextNode( INLINE_FILLER ) ); // true\n *\t\tstartsWithFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ); // true\n *\t\tstartsWithFiller( document.createTextNode( 'foo' ) ); // false\n *\t\tstartsWithFiller( document.createElement( 'p' ) ); // false\n *\n * @param {Node} domNode DOM node.\n * @returns {Boolean} True if the text node starts with the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n */\nexport function startsWithFiller( domNode ) {\n\treturn isText( domNode ) && ( domNode.data.substr( 0, INLINE_FILLER_LENGTH ) === INLINE_FILLER );\n}\n\n/**\n * Checks if the text node contains only the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n *\n *\t\tisInlineFiller( document.createTextNode( INLINE_FILLER ) ); // true\n *\t\tisInlineFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ); // false\n *\n * @param {Text} domText DOM text node.\n * @returns {Boolean} True if the text node contains only the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n */\nexport function isInlineFiller( domText ) {\n\treturn domText.data.length == INLINE_FILLER_LENGTH && startsWithFiller( domText );\n}\n\n/**\n * Get string data from the text node, removing an {@link module:engine/view/filler~INLINE_FILLER inline filler} from it,\n * if text node contains it.\n *\n *\t\tgetDataWithoutFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ) == 'foo' // true\n *\t\tgetDataWithoutFiller( document.createTextNode( 'foo' ) ) == 'foo' // true\n *\n * @param {Text} domText DOM text node, possible with inline filler.\n * @returns {String} Data without filler.\n */\nexport function getDataWithoutFiller( domText ) {\n\tif ( startsWithFiller( domText ) ) {\n\t\treturn domText.data.slice( INLINE_FILLER_LENGTH );\n\t} else {\n\t\treturn domText.data;\n\t}\n}\n\n/**\n * Assign key observer which move cursor from the end of the inline filler to the beginning of it when\n * the left arrow is pressed, so the filler does not break navigation.\n *\n * @param {module:engine/view/view~View} view View controller instance we should inject quirks handling on.\n */\nexport function injectQuirksHandling( view ) {\n\tview.document.on( 'arrowKey', jumpOverInlineFiller, { priority: 'low' } );\n}\n\n// Move cursor from the end of the inline filler to the beginning of it when, so the filler does not break navigation.\nfunction jumpOverInlineFiller( evt, data ) {\n\tif ( data.keyCode == keyCodes.arrowleft ) {\n\t\tconst domSelection = data.domTarget.ownerDocument.defaultView.getSelection();\n\n\t\tif ( domSelection.rangeCount == 1 && domSelection.getRangeAt( 0 ).collapsed ) {\n\t\t\tconst domParent = domSelection.getRangeAt( 0 ).startContainer;\n\t\t\tconst domOffset = domSelection.getRangeAt( 0 ).startOffset;\n\n\t\t\tif ( startsWithFiller( domParent ) && domOffset <= INLINE_FILLER_LENGTH ) {\n\t\t\t\tdomSelection.collapse( domParent, 0 );\n\t\t\t}\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/fastdiff\n */\n\n/**\n * Finds positions of the first and last change in the given string/array and generates a set of changes:\n *\n *\t\tfastDiff( '12a', '12xyza' );\n *\t\t// [ { index: 2, type: 'insert', values: [ 'x', 'y', 'z' ] } ]\n *\n *\t\tfastDiff( '12a', '12aa' );\n *\t\t// [ { index: 3, type: 'insert', values: [ 'a' ] } ]\n *\n *\t\tfastDiff( '12xyza', '12a' );\n *\t\t// [ { index: 2, type: 'delete', howMany: 3 } ]\n *\n *\t\tfastDiff( [ '1', '2', 'a', 'a' ], [ '1', '2', 'a' ] );\n *\t\t// [ { index: 3, type: 'delete', howMany: 1 } ]\n *\n *\t\tfastDiff( [ '1', '2', 'a', 'b', 'c', '3' ], [ '2', 'a', 'b' ] );\n *\t\t// [ { index: 0, type: 'insert', values: [ '2', 'a', 'b' ] }, { index: 3, type: 'delete', howMany: 6 } ]\n *\n * Passed arrays can contain any type of data, however to compare them correctly custom comparator function\n * should be passed as a third parameter:\n *\n *\t\tfastDiff( [ { value: 1 }, { value: 2 } ], [ { value: 1 }, { value: 3 } ], ( a, b ) => {\n *\t\t\treturn a.value === b.value;\n *\t\t} );\n *\t\t// [ { index: 1, type: 'insert', values: [ { value: 3 } ] }, { index: 2, type: 'delete', howMany: 1 } ]\n *\n * The resulted set of changes can be applied to the input in order to transform it into the output, for example:\n *\n *\t\tlet input = '12abc3';\n *\t\tconst output = '2ab';\n *\t\tconst changes = fastDiff( input, output );\n *\n *\t\tchanges.forEach( change => {\n *\t\t\tif ( change.type == 'insert' ) {\n *\t\t\t\tinput = input.substring( 0, change.index ) + change.values.join( '' ) + input.substring( change.index );\n *\t\t\t} else if ( change.type == 'delete' ) {\n *\t\t\t\tinput = input.substring( 0, change.index ) + input.substring( change.index + change.howMany );\n *\t\t\t}\n *\t\t} );\n *\n *\t\t// input equals output now\n *\n * or in case of arrays:\n *\n *\t\tlet input = [ '1', '2', 'a', 'b', 'c', '3' ];\n *\t\tconst output = [ '2', 'a', 'b' ];\n *\t\tconst changes = fastDiff( input, output );\n *\n *\t\tchanges.forEach( change => {\n *\t\t\tif ( change.type == 'insert' ) {\n *\t\t\t\tinput = input.slice( 0, change.index ).concat( change.values, input.slice( change.index ) );\n *\t\t\t} else if ( change.type == 'delete' ) {\n *\t\t\t\tinput = input.slice( 0, change.index ).concat( input.slice( change.index + change.howMany ) );\n *\t\t\t}\n *\t\t} );\n *\n *\t\t// input equals output now\n *\n * By passing `true` as the fourth parameter (`atomicChanges`) the output of this function will become compatible with\n * the {@link module:utils/diff~diff `diff()`} function:\n *\n *\t\tfastDiff( '12a', '12xyza' );\n *\t\t// [ 'equal', 'equal', 'insert', 'insert', 'insert', 'equal' ]\n *\n * The default output format of this function is compatible with the output format of\n * {@link module:utils/difftochanges~diffToChanges `diffToChanges()`}. The `diffToChanges()` input format is, in turn,\n * compatible with the output of {@link module:utils/diff~diff `diff()`}:\n *\n *\t\tconst a = '1234';\n *\t\tconst b = '12xyz34';\n *\n *\t\t// Both calls will return the same results (grouped changes format).\n *\t\tfastDiff( a, b );\n *\t\tdiffToChanges( diff( a, b ) );\n *\n *\t\t// Again, both calls will return the same results (atomic changes format).\n *\t\tfastDiff( a, b, null, true );\n *\t\tdiff( a, b );\n *\n *\n * @param {Array|String} a Input array or string.\n * @param {Array|String} b Input array or string.\n * @param {Function} [cmp] Optional function used to compare array values, by default `===` (strict equal operator) is used.\n * @param {Boolean} [atomicChanges=false] Whether an array of `inset|delete|equal` operations should\n * be returned instead of changes set. This makes this function compatible with {@link module:utils/diff~diff `diff()`}.\n * @returns {Array} Array of changes.\n */\nexport default function fastDiff( a, b, cmp, atomicChanges = false ) {\n\t// Set the comparator function.\n\tcmp = cmp || function( a, b ) {\n\t\treturn a === b;\n\t};\n\n\t// Convert the string (or any array-like object - eg. NodeList) to an array by using the slice() method because,\n\t// unlike Array.from(), it returns array of UTF-16 code units instead of the code points of a string.\n\t// One code point might be a surrogate pair of two code units. All text offsets are expected to be in code units.\n\t// See ckeditor/ckeditor5#3147.\n\t//\n\t// We need to make sure here that fastDiff() works identical to diff().\n\tif ( !Array.isArray( a ) ) {\n\t\ta = Array.prototype.slice.call( a );\n\t}\n\n\tif ( !Array.isArray( b ) ) {\n\t\tb = Array.prototype.slice.call( b );\n\t}\n\n\t// Find first and last change.\n\tconst changeIndexes = findChangeBoundaryIndexes( a, b, cmp );\n\n\t// Transform into changes array.\n\treturn atomicChanges ? changeIndexesToAtomicChanges( changeIndexes, b.length ) : changeIndexesToChanges( b, changeIndexes );\n}\n\n// Finds position of the first and last change in the given arrays. For example:\n//\n//\t\tconst indexes = findChangeBoundaryIndexes( [ '1', '2', '3', '4' ], [ '1', '3', '4', '2', '4' ] );\n//\t\tconsole.log( indexes ); // { firstIndex: 1, lastIndexOld: 3, lastIndexNew: 4 }\n//\n// The above indexes means that in the first array the modified part is `1[23]4` and in the second array it is `1[342]4`.\n// Based on such indexes, array with `insert`/`delete` operations which allows transforming first value into the second one\n// can be generated.\n//\n// @param {Array} arr1\n// @param {Array} arr2\n// @param {Function} cmp Comparator function.\n// @returns {Object}\n// @returns {Number} return.firstIndex Index of the first change in both values (always the same for both).\n// @returns {Number} result.lastIndexOld Index of the last common value in `arr1`.\n// @returns {Number} result.lastIndexNew Index of the last common value in `arr2`.\nfunction findChangeBoundaryIndexes( arr1, arr2, cmp ) {\n\t// Find the first difference between passed values.\n\tconst firstIndex = findFirstDifferenceIndex( arr1, arr2, cmp );\n\n\t// If arrays are equal return -1 indexes object.\n\tif ( firstIndex === -1 ) {\n\t\treturn { firstIndex: -1, lastIndexOld: -1, lastIndexNew: -1 };\n\t}\n\n\t// Remove the common part of each value and reverse them to make it simpler to find the last difference between them.\n\tconst oldArrayReversed = cutAndReverse( arr1, firstIndex );\n\tconst newArrayReversed = cutAndReverse( arr2, firstIndex );\n\n\t// Find the first difference between reversed values.\n\t// It should be treated as \"how many elements from the end the last difference occurred\".\n\t//\n\t// For example:\n\t//\n\t// \t\t\t\tinitial\t->\tafter cut\t-> reversed:\n\t// oldValue:\t'321ba'\t->\t'21ba'\t\t-> 'ab12'\n\t// newValue:\t'31xba'\t->\t'1xba'\t\t-> 'abx1'\n\t// lastIndex:\t\t\t\t\t\t\t-> 2\n\t//\n\t// So the last change occurred two characters from the end of the arrays.\n\tconst lastIndex = findFirstDifferenceIndex( oldArrayReversed, newArrayReversed, cmp );\n\n\t// Use `lastIndex` to calculate proper offset, starting from the beginning (`lastIndex` kind of starts from the end).\n\tconst lastIndexOld = arr1.length - lastIndex;\n\tconst lastIndexNew = arr2.length - lastIndex;\n\n\treturn { firstIndex, lastIndexOld, lastIndexNew };\n}\n\n// Returns a first index on which given arrays differ. If both arrays are the same, -1 is returned.\n//\n// @param {Array} arr1\n// @param {Array} arr2\n// @param {Function} cmp Comparator function.\n// @returns {Number}\nfunction findFirstDifferenceIndex( arr1, arr2, cmp ) {\n\tfor ( let i = 0; i < Math.max( arr1.length, arr2.length ); i++ ) {\n\t\tif ( arr1[ i ] === undefined || arr2[ i ] === undefined || !cmp( arr1[ i ], arr2[ i ] ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1; // Return -1 if arrays are equal.\n}\n\n// Returns a copy of the given array with `howMany` elements removed starting from the beginning and in reversed order.\n//\n// @param {Array} arr Array to be processed.\n// @param {Number} howMany How many elements from array beginning to remove.\n// @returns {Array} Shortened and reversed array.\nfunction cutAndReverse( arr, howMany ) {\n\treturn arr.slice( howMany ).reverse();\n}\n\n// Generates changes array based on change indexes from `findChangeBoundaryIndexes` function. This function will\n// generate array with 0 (no changes), 1 (deletion or insertion) or 2 records (insertion and deletion).\n//\n// @param {Array} newArray New array for which change indexes were calculated.\n// @param {Object} changeIndexes Change indexes object from `findChangeBoundaryIndexes` function.\n// @returns {Array.<Object>} Array of changes compatible with {@link module:utils/difftochanges~diffToChanges} format.\nfunction changeIndexesToChanges( newArray, changeIndexes ) {\n\tconst result = [];\n\tconst { firstIndex, lastIndexOld, lastIndexNew } = changeIndexes;\n\n\t// Order operations as 'insert', 'delete' array to keep compatibility with {@link module:utils/difftochanges~diffToChanges}\n\t// in most cases. However, 'diffToChanges' does not stick to any order so in some cases\n\t// (for example replacing '12345' with 'abcd') it will generate 'delete', 'insert' order.\n\tif ( lastIndexNew - firstIndex > 0 ) {\n\t\tresult.push( {\n\t\t\tindex: firstIndex,\n\t\t\ttype: 'insert',\n\t\t\tvalues: newArray.slice( firstIndex, lastIndexNew )\n\t\t} );\n\t}\n\n\tif ( lastIndexOld - firstIndex > 0 ) {\n\t\tresult.push( {\n\t\t\tindex: firstIndex + ( lastIndexNew - firstIndex ), // Increase index of what was inserted.\n\t\t\ttype: 'delete',\n\t\t\thowMany: lastIndexOld - firstIndex\n\t\t} );\n\t}\n\n\treturn result;\n}\n\n// Generates array with set `equal|insert|delete` operations based on change indexes from `findChangeBoundaryIndexes` function.\n//\n// @param {Object} changeIndexes Change indexes object from `findChangeBoundaryIndexes` function.\n// @param {Number} newLength Length of the new array on which `findChangeBoundaryIndexes` calculated change indexes.\n// @returns {Array.<String>} Array of changes compatible with {@link module:utils/diff~diff} format.\nfunction changeIndexesToAtomicChanges( changeIndexes, newLength ) {\n\tconst { firstIndex, lastIndexOld, lastIndexNew } = changeIndexes;\n\n\t// No changes.\n\tif ( firstIndex === -1 ) {\n\t\treturn Array( newLength ).fill( 'equal' );\n\t}\n\n\tlet result = [];\n\tif ( firstIndex > 0 ) {\n\t\tresult = result.concat( Array( firstIndex ).fill( 'equal' ) );\n\t}\n\n\tif ( lastIndexNew - firstIndex > 0 ) {\n\t\tresult = result.concat( Array( lastIndexNew - firstIndex ).fill( 'insert' ) );\n\t}\n\n\tif ( lastIndexOld - firstIndex > 0 ) {\n\t\tresult = result.concat( Array( lastIndexOld - firstIndex ).fill( 'delete' ) );\n\t}\n\n\tif ( lastIndexNew < newLength ) {\n\t\tresult = result.concat( Array( newLength - lastIndexNew ).fill( 'equal' ) );\n\t}\n\n\treturn result;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/diff\n */\n\nimport fastDiff from '../src/fastdiff';\n\n// The following code is based on the \"O(NP) Sequence Comparison Algorithm\"\n// by Sun Wu, Udi Manber, Gene Myers, Webb Miller.\n\n/**\n * Calculates the difference between two arrays or strings producing an array containing a list of changes\n * necessary to transform input into output.\n *\n *\t\tdiff( 'aba', 'acca' ); // [ 'equal', 'insert', 'insert', 'delete', 'equal' ]\n *\n * This function is based on the \"O(NP) Sequence Comparison Algorithm\" by Sun Wu, Udi Manber, Gene Myers, Webb Miller.\n * Unfortunately, while it gives the most precise results, its to complex for longer strings/arrow (above 200 items).\n * Therefore, `diff()` automatically switches to {@link module:utils/fastdiff~fastDiff `fastDiff()`} when detecting\n * such a scenario. The return formats of both functions are identical.\n *\n * @param {Array|String} a Input array or string.\n * @param {Array|String} b Output array or string.\n * @param {Function} [cmp] Optional function used to compare array values, by default === is used.\n * @returns {Array} Array of changes.\n */\nexport default function diff( a, b, cmp ) {\n\t// Set the comparator function.\n\tcmp = cmp || function( a, b ) {\n\t\treturn a === b;\n\t};\n\n\tconst aLength = a.length;\n\tconst bLength = b.length;\n\n\t// Perform `fastDiff` for longer strings/arrays (see #269).\n\tif ( aLength > 200 || bLength > 200 || aLength + bLength > 300 ) {\n\t\treturn diff.fastDiff( a, b, cmp, true );\n\t}\n\n\t// Temporary action type statics.\n\tlet _insert, _delete;\n\n\t// Swapped the arrays to use the shorter one as the first one.\n\tif ( bLength < aLength ) {\n\t\tconst tmp = a;\n\n\t\ta = b;\n\t\tb = tmp;\n\n\t\t// We swap the action types as well.\n\t\t_insert = 'delete';\n\t\t_delete = 'insert';\n\t} else {\n\t\t_insert = 'insert';\n\t\t_delete = 'delete';\n\t}\n\n\tconst m = a.length;\n\tconst n = b.length;\n\tconst delta = n - m;\n\n\t// Edit scripts, for each diagonal.\n\tconst es = {};\n\t// Furthest points, the furthest y we can get on each diagonal.\n\tconst fp = {};\n\n\tfunction snake( k ) {\n\t\t// We use -1 as an alternative below to handle initial values ( instead of filling the fp with -1 first ).\n\t\t// Furthest points (y) on the diagonal below k.\n\t\tconst y1 = ( fp[ k - 1 ] !== undefined ? fp[ k - 1 ] : -1 ) + 1;\n\t\t// Furthest points (y) on the diagonal above k.\n\t\tconst y2 = fp[ k + 1 ] !== undefined ? fp[ k + 1 ] : -1;\n\t\t// The way we should go to get further.\n\t\tconst dir = y1 > y2 ? -1 : 1;\n\n\t\t// Clone previous changes array (if any).\n\t\tif ( es[ k + dir ] ) {\n\t\t\tes[ k ] = es[ k + dir ].slice( 0 );\n\t\t}\n\n\t\t// Create changes array.\n\t\tif ( !es[ k ] ) {\n\t\t\tes[ k ] = [];\n\t\t}\n\n\t\t// Push the action.\n\t\tes[ k ].push( y1 > y2 ? _insert : _delete );\n\n\t\t// Set the beginning coordinates.\n\t\tlet y = Math.max( y1, y2 );\n\t\tlet x = y - k;\n\n\t\t// Traverse the diagonal as long as the values match.\n\t\twhile ( x < m && y < n && cmp( a[ x ], b[ y ] ) ) {\n\t\t\tx++;\n\t\t\ty++;\n\t\t\t// Push no change action.\n\t\t\tes[ k ].push( 'equal' );\n\t\t}\n\n\t\treturn y;\n\t}\n\n\tlet p = 0;\n\tlet k;\n\n\t// Traverse the graph until we reach the end of the longer string.\n\tdo {\n\t\t// Updates furthest points and edit scripts for diagonals below delta.\n\t\tfor ( k = -p; k < delta; k++ ) {\n\t\t\tfp[ k ] = snake( k );\n\t\t}\n\n\t\t// Updates furthest points and edit scripts for diagonals above delta.\n\t\tfor ( k = delta + p; k > delta; k-- ) {\n\t\t\tfp[ k ] = snake( k );\n\t\t}\n\n\t\t// Updates furthest point and edit script for the delta diagonal.\n\t\t// note that the delta diagonal is the one which goes through the sink (m, n).\n\t\tfp[ delta ] = snake( delta );\n\n\t\tp++;\n\t} while ( fp[ delta ] !== n );\n\n\t// Return the final list of edit changes.\n\t// We remove the first item that represents the action for the injected nulls.\n\treturn es[ delta ].slice( 1 );\n}\n\n// Store the API in static property to easily overwrite it in tests.\n// Too bad dependency injection does not work in Webpack + ES 6 (const) + Babel.\ndiff.fastDiff = fastDiff;\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/insertat\n */\n\n/**\n * Inserts node to the parent at given index.\n *\n * @param {Element} parentElement Parent element.\n * @param {Number} index Insertions index.\n * @param {Node} nodeToInsert Node to insert.\n */\nexport default function insertAt( parentElement, index, nodeToInsert ) {\n\tparentElement.insertBefore( nodeToInsert, parentElement.childNodes[ index ] || null );\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/remove\n */\n\n/**\n * Removes given node from parent.\n *\n * @param {Node} node Node to remove.\n */\nexport default function remove( node ) {\n\tconst parent = node.parentNode;\n\n\tif ( parent ) {\n\t\tparent.removeChild( node );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* globals Node */\n\n/**\n * @module utils/dom/iscomment\n */\n\n/**\n * Checks whether the object is a native DOM Comment node.\n *\n * @param {*} obj\n * @returns {Boolean}\n */\nexport default function isComment( obj ) {\n\treturn obj && obj.nodeType === Node.COMMENT_NODE;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/isnode\n */\n\n/**\n * Checks if the object is a native DOM Node.\n *\n * @param {*} obj\n * @returns {Boolean}\n */\nexport default function isNode( obj ) {\n\tif ( obj ) {\n\t\tif ( obj.defaultView ) {\n\t\t\treturn obj instanceof obj.defaultView.Document;\n\t\t} else if ( obj.ownerDocument && obj.ownerDocument.defaultView ) {\n\t\t\treturn obj instanceof obj.ownerDocument.defaultView.Node;\n\t\t}\n\t}\n\n\treturn false;\n}\n","import api from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./renderer.css\";\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* globals Node */\n\n/**\n * @module engine/view/renderer\n */\n\nimport ViewText from './text';\nimport ViewPosition from './position';\nimport { INLINE_FILLER, INLINE_FILLER_LENGTH, startsWithFiller, isInlineFiller } from './filler';\n\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\nimport diff from '@ckeditor/ckeditor5-utils/src/diff';\nimport insertAt from '@ckeditor/ckeditor5-utils/src/dom/insertat';\nimport remove from '@ckeditor/ckeditor5-utils/src/dom/remove';\nimport ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport isText from '@ckeditor/ckeditor5-utils/src/dom/istext';\nimport isComment from '@ckeditor/ckeditor5-utils/src/dom/iscomment';\nimport isNode from '@ckeditor/ckeditor5-utils/src/dom/isnode';\nimport fastDiff from '@ckeditor/ckeditor5-utils/src/fastdiff';\nimport env from '@ckeditor/ckeditor5-utils/src/env';\n\nimport '../../theme/renderer.css';\n\n/**\n * Renderer is responsible for updating the DOM structure and the DOM selection based on\n * the {@link module:engine/view/renderer~Renderer#markToSync information about updated view nodes}.\n * In other words, it renders the view to the DOM.\n *\n * Its main responsibility is to make only the necessary, minimal changes to the DOM. However, unlike in many\n * virtual DOM implementations, the primary reason for doing minimal changes is not the performance but ensuring\n * that native editing features such as text composition, autocompletion, spell checking, selection's x-index are\n * affected as little as possible.\n *\n * Renderer uses {@link module:engine/view/domconverter~DomConverter} to transform view nodes and positions\n * to and from the DOM.\n */\nexport default class Renderer {\n\t/**\n\t * Creates a renderer instance.\n\t *\n\t * @param {module:engine/view/domconverter~DomConverter} domConverter Converter instance.\n\t * @param {module:engine/view/documentselection~DocumentSelection} selection View selection.\n\t */\n\tconstructor( domConverter, selection ) {\n\t\t/**\n\t\t * Set of DOM Documents instances.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Set.<Document>}\n\t\t */\n\t\tthis.domDocuments = new Set();\n\n\t\t/**\n\t\t * Converter instance.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/domconverter~DomConverter}\n\t\t */\n\t\tthis.domConverter = domConverter;\n\n\t\t/**\n\t\t * Set of nodes which attributes changed and may need to be rendered.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Set.<module:engine/view/node~Node>}\n\t\t */\n\t\tthis.markedAttributes = new Set();\n\n\t\t/**\n\t\t * Set of elements which child lists changed and may need to be rendered.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Set.<module:engine/view/node~Node>}\n\t\t */\n\t\tthis.markedChildren = new Set();\n\n\t\t/**\n\t\t * Set of text nodes which text data changed and may need to be rendered.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Set.<module:engine/view/node~Node>}\n\t\t */\n\t\tthis.markedTexts = new Set();\n\n\t\t/**\n\t\t * View selection. Renderer updates DOM selection based on the view selection.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/documentselection~DocumentSelection}\n\t\t */\n\t\tthis.selection = selection;\n\n\t\t/**\n\t\t * Indicates if the view document is focused and selection can be rendered. Selection will not be rendered if\n\t\t * this is set to `false`.\n\t\t *\n\t\t * @member {Boolean}\n\t\t * @observable\n\t\t */\n\t\tthis.set( 'isFocused', false );\n\n\t\t/**\n\t\t * Indicates whether the user is making a selection in the document (e.g. holding the mouse button and moving the cursor).\n\t\t * When they stop selecting, the property goes back to `false`.\n\t\t *\n\t\t * Note: In some browsers, the renderer will stop rendering the selection and inline fillers while the user is making\n\t\t * a selection to avoid glitches in DOM selection\n\t\t * (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n\t\t *\n\t\t * @member {Boolean}\n\t\t * @observable\n\t\t */\n\t\tthis.set( 'isSelecting', false );\n\n\t\t// Rendering the selection and inline filler manipulation should be postponed in (non-Android) Blink until the user finishes\n\t\t// creating the selection in DOM to avoid accidental selection collapsing\n\t\t// (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n\t\t// When the user stops selecting, all pending changes should be rendered ASAP, though.\n\t\tif ( env.isBlink && !env.isAndroid ) {\n\t\t\tthis.on( 'change:isSelecting', () => {\n\t\t\t\tif ( !this.isSelecting ) {\n\t\t\t\t\tthis.render();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * The text node in which the inline filler was rendered.\n\t\t *\n\t\t * @private\n\t\t * @member {Text}\n\t\t */\n\t\tthis._inlineFiller = null;\n\n\t\t/**\n\t\t * DOM element containing fake selection.\n\t\t *\n\t\t * @private\n\t\t * @type {null|HTMLElement}\n\t\t */\n\t\tthis._fakeSelectionContainer = null;\n\t}\n\n\t/**\n\t * Marks a view node to be updated in the DOM by {@link #render `render()`}.\n\t *\n\t * Note that only view nodes whose parents have corresponding DOM elements need to be marked to be synchronized.\n\t *\n\t * @see #markedAttributes\n\t * @see #markedChildren\n\t * @see #markedTexts\n\t *\n\t * @param {module:engine/view/document~ChangeType} type Type of the change.\n\t * @param {module:engine/view/node~Node} node Node to be marked.\n\t */\n\tmarkToSync( type, node ) {\n\t\tif ( type === 'text' ) {\n\t\t\tif ( this.domConverter.mapViewToDom( node.parent ) ) {\n\t\t\t\tthis.markedTexts.add( node );\n\t\t\t}\n\t\t} else {\n\t\t\t// If the node has no DOM element it is not rendered yet,\n\t\t\t// its children/attributes do not need to be marked to be sync.\n\t\t\tif ( !this.domConverter.mapViewToDom( node ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( type === 'attributes' ) {\n\t\t\t\tthis.markedAttributes.add( node );\n\t\t\t} else if ( type === 'children' ) {\n\t\t\t\tthis.markedChildren.add( node );\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * Unknown type passed to Renderer.markToSync.\n\t\t\t\t *\n\t\t\t\t * @error view-renderer-unknown-type\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'view-renderer-unknown-type', this );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Renders all buffered changes ({@link #markedAttributes}, {@link #markedChildren} and {@link #markedTexts}) and\n\t * the current view selection (if needed) to the DOM by applying a minimal set of changes to it.\n\t *\n\t * Renderer tries not to break the text composition (e.g. IME) and x-index of the selection,\n\t * so it does as little as it is needed to update the DOM.\n\t *\n\t * Renderer also handles {@link module:engine/view/filler fillers}. Especially, it checks if the inline filler is needed\n\t * at the selection position and adds or removes it. To prevent breaking text composition inline filler will not be\n\t * removed as long as the selection is in the text node which needed it at first.\n\t */\n\trender() {\n\t\tlet inlineFillerPosition;\n\t\tconst isInlineFillerRenderingPossible = env.isBlink && !env.isAndroid ? !this.isSelecting : true;\n\n\t\t// Refresh mappings.\n\t\tfor ( const element of this.markedChildren ) {\n\t\t\tthis._updateChildrenMappings( element );\n\t\t}\n\n\t\t// Don't manipulate inline fillers while the selection is being made in (non-Android) Blink to prevent accidental\n\t\t// DOM selection collapsing\n\t\t// (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n\t\tif ( isInlineFillerRenderingPossible ) {\n\t\t\t// There was inline filler rendered in the DOM but it's not\n\t\t\t// at the selection position any more, so we can remove it\n\t\t\t// (cause even if it's needed, it must be placed in another location).\n\t\t\tif ( this._inlineFiller && !this._isSelectionInInlineFiller() ) {\n\t\t\t\tthis._removeInlineFiller();\n\t\t\t}\n\n\t\t\t// If we've got the filler, let's try to guess its position in the view.\n\t\t\tif ( this._inlineFiller ) {\n\t\t\t\tinlineFillerPosition = this._getInlineFillerPosition();\n\t\t\t}\n\t\t\t// Otherwise, if it's needed, create it at the selection position.\n\t\t\telse if ( this._needsInlineFillerAtSelection() ) {\n\t\t\t\tinlineFillerPosition = this.selection.getFirstPosition();\n\n\t\t\t\t// Do not use `markToSync` so it will be added even if the parent is already added.\n\t\t\t\tthis.markedChildren.add( inlineFillerPosition.parent );\n\t\t\t}\n\t\t}\n\t\t// Paranoid check: we make sure the inline filler has any parent so it can be mapped to view position\n\t\t// by DomConverter.\n\t\telse if ( this._inlineFiller && this._inlineFiller.parentNode ) {\n\t\t\t// While the user is making selection, preserve the inline filler at its original position.\n\t\t\tinlineFillerPosition = this.domConverter.domPositionToView( this._inlineFiller );\n\t\t}\n\n\t\tfor ( const element of this.markedAttributes ) {\n\t\t\tthis._updateAttrs( element );\n\t\t}\n\n\t\tfor ( const element of this.markedChildren ) {\n\t\t\tthis._updateChildren( element, { inlineFillerPosition } );\n\t\t}\n\n\t\tfor ( const node of this.markedTexts ) {\n\t\t\tif ( !this.markedChildren.has( node.parent ) && this.domConverter.mapViewToDom( node.parent ) ) {\n\t\t\t\tthis._updateText( node, { inlineFillerPosition } );\n\t\t\t}\n\t\t}\n\n\t\t// * Check whether the inline filler is required and where it really is in the DOM.\n\t\t// At this point in most cases it will be in the DOM, but there are exceptions.\n\t\t// For example, if the inline filler was deep in the created DOM structure, it will not be created.\n\t\t// Similarly, if it was removed at the beginning of this function and then neither text nor children were updated,\n\t\t// it will not be present. Fix those and similar scenarios.\n\t\t// * Don't manipulate inline fillers while the selection is being made in (non-Android) Blink to prevent accidental\n\t\t// DOM selection collapsing\n\t\t// (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n\t\tif ( isInlineFillerRenderingPossible ) {\n\t\t\tif ( inlineFillerPosition ) {\n\t\t\t\tconst fillerDomPosition = this.domConverter.viewPositionToDom( inlineFillerPosition );\n\t\t\t\tconst domDocument = fillerDomPosition.parent.ownerDocument;\n\n\t\t\t\tif ( !startsWithFiller( fillerDomPosition.parent ) ) {\n\t\t\t\t\t// Filler has not been created at filler position. Create it now.\n\t\t\t\t\tthis._inlineFiller = addInlineFiller( domDocument, fillerDomPosition.parent, fillerDomPosition.offset );\n\t\t\t\t} else {\n\t\t\t\t\t// Filler has been found, save it.\n\t\t\t\t\tthis._inlineFiller = fillerDomPosition.parent;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// There is no filler needed.\n\t\t\t\tthis._inlineFiller = null;\n\t\t\t}\n\t\t}\n\n\t\t// First focus the new editing host, then update the selection.\n\t\t// Otherwise, FF may throw an error (https://github.com/ckeditor/ckeditor5/issues/721).\n\t\tthis._updateFocus();\n\t\tthis._updateSelection();\n\n\t\tthis.markedTexts.clear();\n\t\tthis.markedAttributes.clear();\n\t\tthis.markedChildren.clear();\n\t}\n\n\t/**\n\t * Updates mappings of view element's children.\n\t *\n\t * Children that were replaced in the view structure by similar elements (same tag name) are treated as 'replaced'.\n\t * This means that their mappings can be updated so the new view elements are mapped to the existing DOM elements.\n\t * Thanks to that these elements do not need to be re-rendered completely.\n\t *\n\t * @private\n\t * @param {module:engine/view/node~Node} viewElement The view element whose children mappings will be updated.\n\t */\n\t_updateChildrenMappings( viewElement ) {\n\t\tconst domElement = this.domConverter.mapViewToDom( viewElement );\n\n\t\tif ( !domElement ) {\n\t\t\t// If there is no `domElement` it means that it was already removed from DOM and there is no need to process it.\n\t\t\treturn;\n\t\t}\n\n\t\t// Removing nodes from the DOM as we iterate can cause `actualDomChildren`\n\t\t// (which is a live-updating `NodeList`) to get out of sync with the\n\t\t// indices that we compute as we iterate over `actions`.\n\t\t// This would produce incorrect element mappings.\n\t\t//\n\t\t// Converting live list to an array to make the list static.\n\t\tconst actualDomChildren = Array.from(\n\t\t\tthis.domConverter.mapViewToDom( viewElement ).childNodes\n\t\t);\n\t\tconst expectedDomChildren = Array.from(\n\t\t\tthis.domConverter.viewChildrenToDom( viewElement, domElement.ownerDocument, { withChildren: false } )\n\t\t);\n\t\tconst diff = this._diffNodeLists( actualDomChildren, expectedDomChildren );\n\t\tconst actions = this._findReplaceActions( diff, actualDomChildren, expectedDomChildren );\n\n\t\tif ( actions.indexOf( 'replace' ) !== -1 ) {\n\t\t\tconst counter = { equal: 0, insert: 0, delete: 0 };\n\n\t\t\tfor ( const action of actions ) {\n\t\t\t\tif ( action === 'replace' ) {\n\t\t\t\t\tconst insertIndex = counter.equal + counter.insert;\n\t\t\t\t\tconst deleteIndex = counter.equal + counter.delete;\n\t\t\t\t\tconst viewChild = viewElement.getChild( insertIndex );\n\n\t\t\t\t\t// UIElement and RawElement are special cases. Their children are not stored in a view (#799)\n\t\t\t\t\t// so we cannot use them with replacing flow (since they use view children during rendering\n\t\t\t\t\t// which will always result in rendering empty elements).\n\t\t\t\t\tif ( viewChild && !( viewChild.is( 'uiElement' ) || viewChild.is( 'rawElement' ) ) ) {\n\t\t\t\t\t\tthis._updateElementMappings( viewChild, actualDomChildren[ deleteIndex ] );\n\t\t\t\t\t}\n\n\t\t\t\t\tremove( expectedDomChildren[ insertIndex ] );\n\t\t\t\t\tcounter.equal++;\n\t\t\t\t} else {\n\t\t\t\t\tcounter[ action ]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Updates mappings of a given view element.\n\t *\n\t * @private\n\t * @param {module:engine/view/node~Node} viewElement The view element whose mappings will be updated.\n\t * @param {Node} domElement The DOM element representing the given view element.\n\t */\n\t_updateElementMappings( viewElement, domElement ) {\n\t\t// Remap 'DomConverter' bindings.\n\t\tthis.domConverter.unbindDomElement( domElement );\n\t\tthis.domConverter.bindElements( domElement, viewElement );\n\n\t\t// View element may have children which needs to be updated, but are not marked, mark them to update.\n\t\tthis.markedChildren.add( viewElement );\n\n\t\t// Because we replace new view element mapping with the existing one, the corresponding DOM element\n\t\t// will not be rerendered. The new view element may have different attributes than the previous one.\n\t\t// Since its corresponding DOM element will not be rerendered, new attributes will not be added\n\t\t// to the DOM, so we need to mark it here to make sure its attributes gets updated. See #1427 for more\n\t\t// detailed case study.\n\t\t// Also there are cases where replaced element is removed from the view structure and then has\n\t\t// its attributes changed or removed. In such cases the element will not be present in `markedAttributes`\n\t\t// and also may be the same (`element.isSimilar()`) as the reused element not having its attributes updated.\n\t\t// To prevent such situations we always mark reused element to have its attributes rerenderd (#1560).\n\t\tthis.markedAttributes.add( viewElement );\n\t}\n\n\t/**\n\t * Gets the position of the inline filler based on the current selection.\n\t * Here, we assume that we know that the filler is needed and\n\t * {@link #_isSelectionInInlineFiller is at the selection position}, and, since it is needed,\n\t * it is somewhere at the selection position.\n\t *\n\t * Note: The filler position cannot be restored based on the filler's DOM text node, because\n\t * when this method is called (before rendering), the bindings will often be broken. View-to-DOM\n\t * bindings are only dependable after rendering.\n\t *\n\t * @private\n\t * @returns {module:engine/view/position~Position}\n\t */\n\t_getInlineFillerPosition() {\n\t\tconst firstPos = this.selection.getFirstPosition();\n\n\t\tif ( firstPos.parent.is( '$text' ) ) {\n\t\t\treturn ViewPosition._createBefore( this.selection.getFirstPosition().parent );\n\t\t} else {\n\t\t\treturn firstPos;\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` if the selection has not left the inline filler's text node.\n\t * If it is `true`, it means that the filler had been added for a reason and the selection did not\n\t * leave the filler's text node. For example, the user can be in the middle of a composition so it should not be touched.\n\t *\n\t * @private\n\t * @returns {Boolean} `true` if the inline filler and selection are in the same place.\n\t */\n\t_isSelectionInInlineFiller() {\n\t\tif ( this.selection.rangeCount != 1 || !this.selection.isCollapsed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Note, we can't check if selection's position equals position of the\n\t\t// this._inlineFiller node, because of #663. We may not be able to calculate\n\t\t// the filler's position in the view at this stage.\n\t\t// Instead, we check it the other way – whether selection is anchored in\n\t\t// that text node or next to it.\n\n\t\t// Possible options are:\n\t\t// \"FILLER{}\"\n\t\t// \"FILLERadded-text{}\"\n\t\tconst selectionPosition = this.selection.getFirstPosition();\n\t\tconst position = this.domConverter.viewPositionToDom( selectionPosition );\n\n\t\tif ( position && isText( position.parent ) && startsWithFiller( position.parent ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Removes the inline filler.\n\t *\n\t * @private\n\t */\n\t_removeInlineFiller() {\n\t\tconst domFillerNode = this._inlineFiller;\n\n\t\t// Something weird happened and the stored node doesn't contain the filler's text.\n\t\tif ( !startsWithFiller( domFillerNode ) ) {\n\t\t\t/**\n\t\t\t * The inline filler node was lost. Most likely, something overwrote the filler text node\n\t\t\t * in the DOM.\n\t\t\t *\n\t\t\t * @error view-renderer-filler-was-lost\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-renderer-filler-was-lost', this );\n\t\t}\n\n\t\tif ( isInlineFiller( domFillerNode ) ) {\n\t\t\tdomFillerNode.remove();\n\t\t} else {\n\t\t\tdomFillerNode.data = domFillerNode.data.substr( INLINE_FILLER_LENGTH );\n\t\t}\n\n\t\tthis._inlineFiller = null;\n\t}\n\n\t/**\n\t * Checks if the inline {@link module:engine/view/filler filler} should be added.\n\t *\n\t * @private\n\t * @returns {Boolean} `true` if the inline filler should be added.\n\t */\n\t_needsInlineFillerAtSelection() {\n\t\tif ( this.selection.rangeCount != 1 || !this.selection.isCollapsed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst selectionPosition = this.selection.getFirstPosition();\n\t\tconst selectionParent = selectionPosition.parent;\n\t\tconst selectionOffset = selectionPosition.offset;\n\n\t\t// If there is no DOM root we do not care about fillers.\n\t\tif ( !this.domConverter.mapViewToDom( selectionParent.root ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !( selectionParent.is( 'element' ) ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Prevent adding inline filler inside elements with contenteditable=false.\n\t\t// https://github.com/ckeditor/ckeditor5-engine/issues/1170\n\t\tif ( !isEditable( selectionParent ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// We have block filler, we do not need inline one.\n\t\tif ( selectionOffset === selectionParent.getFillerOffset() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst nodeBefore = selectionPosition.nodeBefore;\n\t\tconst nodeAfter = selectionPosition.nodeAfter;\n\n\t\tif ( nodeBefore instanceof ViewText || nodeAfter instanceof ViewText ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks if text needs to be updated and possibly updates it.\n\t *\n\t * @private\n\t * @param {module:engine/view/text~Text} viewText View text to update.\n\t * @param {Object} options\n\t * @param {module:engine/view/position~Position} options.inlineFillerPosition The position where the inline\n\t * filler should be rendered.\n\t */\n\t_updateText( viewText, options ) {\n\t\tconst domText = this.domConverter.findCorrespondingDomText( viewText );\n\t\tconst newDomText = this.domConverter.viewToDom( viewText, domText.ownerDocument );\n\n\t\tconst actualText = domText.data;\n\t\tlet expectedText = newDomText.data;\n\n\t\tconst filler = options.inlineFillerPosition;\n\n\t\tif ( filler && filler.parent == viewText.parent && filler.offset == viewText.index ) {\n\t\t\texpectedText = INLINE_FILLER + expectedText;\n\t\t}\n\n\t\tif ( actualText != expectedText ) {\n\t\t\tconst actions = fastDiff( actualText, expectedText );\n\n\t\t\tfor ( const action of actions ) {\n\t\t\t\tif ( action.type === 'insert' ) {\n\t\t\t\t\tdomText.insertData( action.index, action.values.join( '' ) );\n\t\t\t\t} else { // 'delete'\n\t\t\t\t\tdomText.deleteData( action.index, action.howMany );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if attribute list needs to be updated and possibly updates it.\n\t *\n\t * @private\n\t * @param {module:engine/view/element~Element} viewElement The view element to update.\n\t */\n\t_updateAttrs( viewElement ) {\n\t\tconst domElement = this.domConverter.mapViewToDom( viewElement );\n\n\t\tif ( !domElement ) {\n\t\t\t// If there is no `domElement` it means that 'viewElement' is outdated as its mapping was updated\n\t\t\t// in 'this._updateChildrenMappings()'. There is no need to process it as new view element which\n\t\t\t// replaced old 'viewElement' mapping was also added to 'this.markedAttributes'\n\t\t\t// in 'this._updateChildrenMappings()' so it will be processed separately.\n\t\t\treturn;\n\t\t}\n\n\t\tconst domAttrKeys = Array.from( domElement.attributes ).map( attr => attr.name );\n\t\tconst viewAttrKeys = viewElement.getAttributeKeys();\n\n\t\t// Add or overwrite attributes.\n\t\tfor ( const key of viewAttrKeys ) {\n\t\t\tthis.domConverter.setDomElementAttribute( domElement, key, viewElement.getAttribute( key ), viewElement );\n\t\t}\n\n\t\t// Remove from DOM attributes which do not exists in the view.\n\t\tfor ( const key of domAttrKeys ) {\n\t\t\t// All other attributes not present in the DOM should be removed.\n\t\t\tif ( !viewElement.hasAttribute( key ) ) {\n\t\t\t\tthis.domConverter.removeDomElementAttribute( domElement, key );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if elements child list needs to be updated and possibly updates it.\n\t *\n\t * @private\n\t * @param {module:engine/view/element~Element} viewElement View element to update.\n\t * @param {Object} options\n\t * @param {module:engine/view/position~Position} options.inlineFillerPosition The position where the inline\n\t * filler should be rendered.\n\t */\n\t_updateChildren( viewElement, options ) {\n\t\tconst domElement = this.domConverter.mapViewToDom( viewElement );\n\n\t\tif ( !domElement ) {\n\t\t\t// If there is no `domElement` it means that it was already removed from DOM.\n\t\t\t// There is no need to process it. It will be processed when re-inserted.\n\t\t\treturn;\n\t\t}\n\n\t\tconst inlineFillerPosition = options.inlineFillerPosition;\n\t\tconst actualDomChildren = this.domConverter.mapViewToDom( viewElement ).childNodes;\n\t\tconst expectedDomChildren = Array.from(\n\t\t\tthis.domConverter.viewChildrenToDom( viewElement, domElement.ownerDocument, { bind: true } )\n\t\t);\n\n\t\t// Inline filler element has to be created as it is present in the DOM, but not in the view. It is required\n\t\t// during diffing so text nodes could be compared correctly and also during rendering to maintain\n\t\t// proper order and indexes while updating the DOM.\n\t\tif ( inlineFillerPosition && inlineFillerPosition.parent === viewElement ) {\n\t\t\taddInlineFiller( domElement.ownerDocument, expectedDomChildren, inlineFillerPosition.offset );\n\t\t}\n\n\t\tconst diff = this._diffNodeLists( actualDomChildren, expectedDomChildren );\n\n\t\tlet i = 0;\n\t\tconst nodesToUnbind = new Set();\n\n\t\t// Handle deletions first.\n\t\t// This is to prevent a situation where an element that already exists in `actualDomChildren` is inserted at a different\n\t\t// index in `actualDomChildren`. Since `actualDomChildren` is a `NodeList`, this works like move, not like an insert,\n\t\t// and it disrupts the whole algorithm. See https://github.com/ckeditor/ckeditor5/issues/6367.\n\t\t//\n\t\t// It doesn't matter in what order we remove or add nodes, as long as we remove and add correct nodes at correct indexes.\n\t\tfor ( const action of diff ) {\n\t\t\tif ( action === 'delete' ) {\n\t\t\t\tnodesToUnbind.add( actualDomChildren[ i ] );\n\t\t\t\tremove( actualDomChildren[ i ] );\n\t\t\t} else if ( action === 'equal' ) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\n\t\ti = 0;\n\n\t\tfor ( const action of diff ) {\n\t\t\tif ( action === 'insert' ) {\n\t\t\t\tinsertAt( domElement, i, expectedDomChildren[ i ] );\n\t\t\t\ti++;\n\t\t\t} else if ( action === 'equal' ) {\n\t\t\t\t// Force updating text nodes inside elements which did not change and do not need to be re-rendered (#1125).\n\t\t\t\t// Do it here (not in the loop above) because only after insertions the `i` index is correct.\n\t\t\t\tthis._markDescendantTextToSync( this.domConverter.domToView( expectedDomChildren[ i ] ) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\n\t\t// Unbind removed nodes. When node does not have a parent it means that it was removed from DOM tree during\n\t\t// comparison with the expected DOM. We don't need to check child nodes, because if child node was reinserted,\n\t\t// it was moved to DOM tree out of the removed node.\n\t\tfor ( const node of nodesToUnbind ) {\n\t\t\tif ( !node.parentNode ) {\n\t\t\t\tthis.domConverter.unbindDomElement( node );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Shorthand for diffing two arrays or node lists of DOM nodes.\n\t *\n\t * @private\n\t * @param {Array.<Node>|NodeList} actualDomChildren Actual DOM children\n\t * @param {Array.<Node>|NodeList} expectedDomChildren Expected DOM children.\n\t * @returns {Array.<String>} The list of actions based on the {@link module:utils/diff~diff} function.\n\t */\n\t_diffNodeLists( actualDomChildren, expectedDomChildren ) {\n\t\tactualDomChildren = filterOutFakeSelectionContainer( actualDomChildren, this._fakeSelectionContainer );\n\n\t\treturn diff( actualDomChildren, expectedDomChildren, sameNodes.bind( null, this.domConverter ) );\n\t}\n\n\t/**\n\t * Finds DOM nodes that were replaced with the similar nodes (same tag name) in the view. All nodes are compared\n\t * within one `insert`/`delete` action group, for example:\n\t *\n\t * \t\tActual DOM:\t\t<p><b>Foo</b>Bar<i>Baz</i><b>Bax</b></p>\n\t * \t\tExpected DOM:\t<p>Bar<b>123</b><i>Baz</i><b>456</b></p>\n\t * \t\tInput actions:\t[ insert, insert, delete, delete, equal, insert, delete ]\n\t * \t\tOutput actions:\t[ insert, replace, delete, equal, replace ]\n\t *\n\t * @private\n\t * @param {Array.<String>} actions Actions array which is a result of the {@link module:utils/diff~diff} function.\n\t * @param {Array.<Node>|NodeList} actualDom Actual DOM children\n\t * @param {Array.<Node>} expectedDom Expected DOM children.\n\t * @returns {Array.<String>} Actions array modified with the `replace` actions.\n\t */\n\t_findReplaceActions( actions, actualDom, expectedDom ) {\n\t\t// If there is no both 'insert' and 'delete' actions, no need to check for replaced elements.\n\t\tif ( actions.indexOf( 'insert' ) === -1 || actions.indexOf( 'delete' ) === -1 ) {\n\t\t\treturn actions;\n\t\t}\n\n\t\tlet newActions = [];\n\t\tlet actualSlice = [];\n\t\tlet expectedSlice = [];\n\n\t\tconst counter = { equal: 0, insert: 0, delete: 0 };\n\n\t\tfor ( const action of actions ) {\n\t\t\tif ( action === 'insert' ) {\n\t\t\t\texpectedSlice.push( expectedDom[ counter.equal + counter.insert ] );\n\t\t\t} else if ( action === 'delete' ) {\n\t\t\t\tactualSlice.push( actualDom[ counter.equal + counter.delete ] );\n\t\t\t} else { // equal\n\t\t\t\tnewActions = newActions.concat( diff( actualSlice, expectedSlice, areSimilar ).map( x => x === 'equal' ? 'replace' : x ) );\n\t\t\t\tnewActions.push( 'equal' );\n\t\t\t\t// Reset stored elements on 'equal'.\n\t\t\t\tactualSlice = [];\n\t\t\t\texpectedSlice = [];\n\t\t\t}\n\t\t\tcounter[ action ]++;\n\t\t}\n\n\t\treturn newActions.concat( diff( actualSlice, expectedSlice, areSimilar ).map( x => x === 'equal' ? 'replace' : x ) );\n\t}\n\n\t/**\n\t * Marks text nodes to be synchronized.\n\t *\n\t * If a text node is passed, it will be marked. If an element is passed, all descendant text nodes inside it will be marked.\n\t *\n\t * @private\n\t * @param {module:engine/view/node~Node} viewNode View node to sync.\n\t */\n\t_markDescendantTextToSync( viewNode ) {\n\t\tif ( !viewNode ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( viewNode.is( '$text' ) ) {\n\t\t\tthis.markedTexts.add( viewNode );\n\t\t} else if ( viewNode.is( 'element' ) ) {\n\t\t\tfor ( const child of viewNode.getChildren() ) {\n\t\t\t\tthis._markDescendantTextToSync( child );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the selection needs to be updated and possibly updates it.\n\t *\n\t * @private\n\t */\n\t_updateSelection() {\n\t\t// Block updating DOM selection in (non-Android) Blink while the user is selecting to prevent accidental selection collapsing.\n\t\t// Note: Structural changes in DOM must trigger selection rendering, though. Nodes the selection was anchored\n\t\t// to, may disappear in DOM which would break the selection (e.g. in real-time collaboration scenarios).\n\t\t// https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723\n\t\tif ( env.isBlink && !env.isAndroid && this.isSelecting && !this.markedChildren.size ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there is no selection - remove DOM and fake selections.\n\t\tif ( this.selection.rangeCount === 0 ) {\n\t\t\tthis._removeDomSelection();\n\t\t\tthis._removeFakeSelection();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst domRoot = this.domConverter.mapViewToDom( this.selection.editableElement );\n\n\t\t// Do nothing if there is no focus, or there is no DOM element corresponding to selection's editable element.\n\t\tif ( !this.isFocused || !domRoot ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Render selection.\n\t\tif ( this.selection.isFake ) {\n\t\t\tthis._updateFakeSelection( domRoot );\n\t\t} else {\n\t\t\tthis._removeFakeSelection();\n\t\t\tthis._updateDomSelection( domRoot );\n\t\t}\n\t}\n\n\t/**\n\t * Updates the fake selection.\n\t *\n\t * @private\n\t * @param {HTMLElement} domRoot A valid DOM root where the fake selection container should be added.\n\t */\n\t_updateFakeSelection( domRoot ) {\n\t\tconst domDocument = domRoot.ownerDocument;\n\n\t\tif ( !this._fakeSelectionContainer ) {\n\t\t\tthis._fakeSelectionContainer = createFakeSelectionContainer( domDocument );\n\t\t}\n\n\t\tconst container = this._fakeSelectionContainer;\n\n\t\t// Bind fake selection container with the current selection *position*.\n\t\tthis.domConverter.bindFakeSelection( container, this.selection );\n\n\t\tif ( !this._fakeSelectionNeedsUpdate( domRoot ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !container.parentElement || container.parentElement != domRoot ) {\n\t\t\tdomRoot.appendChild( container );\n\t\t}\n\n\t\tcontainer.textContent = this.selection.fakeSelectionLabel || '\\u00A0';\n\n\t\tconst domSelection = domDocument.getSelection();\n\t\tconst domRange = domDocument.createRange();\n\n\t\tdomSelection.removeAllRanges();\n\t\tdomRange.selectNodeContents( container );\n\t\tdomSelection.addRange( domRange );\n\t}\n\n\t/**\n\t * Updates the DOM selection.\n\t *\n\t * @private\n\t * @param {HTMLElement} domRoot A valid DOM root where the DOM selection should be rendered.\n\t */\n\t_updateDomSelection( domRoot ) {\n\t\tconst domSelection = domRoot.ownerDocument.defaultView.getSelection();\n\n\t\t// Let's check whether DOM selection needs updating at all.\n\t\tif ( !this._domSelectionNeedsUpdate( domSelection ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Multi-range selection is not available in most browsers, and, at least in Chrome, trying to\n\t\t// set such selection, that is not continuous, throws an error. Because of that, we will just use anchor\n\t\t// and focus of view selection.\n\t\t// Since we are not supporting multi-range selection, we also do not need to check if proper editable is\n\t\t// selected. If there is any editable selected, it is okay (editable is taken from selection anchor).\n\t\tconst anchor = this.domConverter.viewPositionToDom( this.selection.anchor );\n\t\tconst focus = this.domConverter.viewPositionToDom( this.selection.focus );\n\n\t\tdomSelection.collapse( anchor.parent, anchor.offset );\n\t\tdomSelection.extend( focus.parent, focus.offset );\n\n\t\t// Firefox–specific hack (https://github.com/ckeditor/ckeditor5-engine/issues/1439).\n\t\tif ( env.isGecko ) {\n\t\t\tfixGeckoSelectionAfterBr( focus, domSelection );\n\t\t}\n\t}\n\n\t/**\n\t * Checks whether a given DOM selection needs to be updated.\n\t *\n\t * @private\n\t * @param {Selection} domSelection The DOM selection to check.\n\t * @returns {Boolean}\n\t */\n\t_domSelectionNeedsUpdate( domSelection ) {\n\t\tif ( !this.domConverter.isDomSelectionCorrect( domSelection ) ) {\n\t\t\t// Current DOM selection is in incorrect position. We need to update it.\n\t\t\treturn true;\n\t\t}\n\n\t\tconst oldViewSelection = domSelection && this.domConverter.domSelectionToView( domSelection );\n\n\t\tif ( oldViewSelection && this.selection.isEqual( oldViewSelection ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If selection is not collapsed, it does not need to be updated if it is similar.\n\t\tif ( !this.selection.isCollapsed && this.selection.isSimilar( oldViewSelection ) ) {\n\t\t\t// Selection did not changed and is correct, do not update.\n\t\t\treturn false;\n\t\t}\n\n\t\t// Selections are not similar.\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks whether the fake selection needs to be updated.\n\t *\n\t * @private\n\t * @param {HTMLElement} domRoot A valid DOM root where a new fake selection container should be added.\n\t * @returns {Boolean}\n\t */\n\t_fakeSelectionNeedsUpdate( domRoot ) {\n\t\tconst container = this._fakeSelectionContainer;\n\t\tconst domSelection = domRoot.ownerDocument.getSelection();\n\n\t\t// Fake selection needs to be updated if there's no fake selection container, or the container currently sits\n\t\t// in a different root.\n\t\tif ( !container || container.parentElement !== domRoot ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Make sure that the selection actually is within the fake selection.\n\t\tif ( domSelection.anchorNode !== container && !container.contains( domSelection.anchorNode ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn container.textContent !== this.selection.fakeSelectionLabel;\n\t}\n\n\t/**\n\t * Removes the DOM selection.\n\t *\n\t * @private\n\t */\n\t_removeDomSelection() {\n\t\tfor ( const doc of this.domDocuments ) {\n\t\t\tconst domSelection = doc.getSelection();\n\n\t\t\tif ( domSelection.rangeCount ) {\n\t\t\t\tconst activeDomElement = doc.activeElement;\n\t\t\t\tconst viewElement = this.domConverter.mapDomToView( activeDomElement );\n\n\t\t\t\tif ( activeDomElement && viewElement ) {\n\t\t\t\t\tdoc.getSelection().removeAllRanges();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Removes the fake selection.\n\t *\n\t * @private\n\t */\n\t_removeFakeSelection() {\n\t\tconst container = this._fakeSelectionContainer;\n\n\t\tif ( container ) {\n\t\t\tcontainer.remove();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if focus needs to be updated and possibly updates it.\n\t *\n\t * @private\n\t */\n\t_updateFocus() {\n\t\tif ( this.isFocused ) {\n\t\t\tconst editable = this.selection.editableElement;\n\n\t\t\tif ( editable ) {\n\t\t\t\tthis.domConverter.focus( editable );\n\t\t\t}\n\t\t}\n\t}\n}\n\nmix( Renderer, ObservableMixin );\n\n// Checks if provided element is editable.\n//\n// @private\n// @param {module:engine/view/element~Element} element\n// @returns {Boolean}\nfunction isEditable( element ) {\n\tif ( element.getAttribute( 'contenteditable' ) == 'false' ) {\n\t\treturn false;\n\t}\n\n\tconst parent = element.findAncestor( element => element.hasAttribute( 'contenteditable' ) );\n\n\treturn !parent || parent.getAttribute( 'contenteditable' ) == 'true';\n}\n\n// Adds inline filler at a given position.\n//\n// The position can be given as an array of DOM nodes and an offset in that array,\n// or a DOM parent element and an offset in that element.\n//\n// @private\n// @param {Document} domDocument\n// @param {Element|Array.<Node>} domParentOrArray\n// @param {Number} offset\n// @returns {Text} The DOM text node that contains an inline filler.\nfunction addInlineFiller( domDocument, domParentOrArray, offset ) {\n\tconst childNodes = domParentOrArray instanceof Array ? domParentOrArray : domParentOrArray.childNodes;\n\tconst nodeAfterFiller = childNodes[ offset ];\n\n\tif ( isText( nodeAfterFiller ) ) {\n\t\tnodeAfterFiller.data = INLINE_FILLER + nodeAfterFiller.data;\n\n\t\treturn nodeAfterFiller;\n\t} else {\n\t\tconst fillerNode = domDocument.createTextNode( INLINE_FILLER );\n\n\t\tif ( Array.isArray( domParentOrArray ) ) {\n\t\t\tchildNodes.splice( offset, 0, fillerNode );\n\t\t} else {\n\t\t\tinsertAt( domParentOrArray, offset, fillerNode );\n\t\t}\n\n\t\treturn fillerNode;\n\t}\n}\n\n// Whether two DOM nodes should be considered as similar.\n// Nodes are considered similar if they have the same tag name.\n//\n// @private\n// @param {Node} node1\n// @param {Node} node2\n// @returns {Boolean}\nfunction areSimilar( node1, node2 ) {\n\treturn isNode( node1 ) && isNode( node2 ) &&\n\t\t!isText( node1 ) && !isText( node2 ) &&\n\t\t!isComment( node1 ) && !isComment( node2 ) &&\n\t\tnode1.tagName.toLowerCase() === node2.tagName.toLowerCase();\n}\n\n// Whether two dom nodes should be considered as the same.\n// Two nodes which are considered the same are:\n//\n//\t\t* Text nodes with the same text.\n//\t\t* Element nodes represented by the same object.\n//\t\t* Two block filler elements.\n//\n// @private\n// @param {String} blockFillerMode Block filler mode, see {@link module:engine/view/domconverter~DomConverter#blockFillerMode}.\n// @param {Node} node1\n// @param {Node} node2\n// @returns {Boolean}\nfunction sameNodes( domConverter, actualDomChild, expectedDomChild ) {\n\t// Elements.\n\tif ( actualDomChild === expectedDomChild ) {\n\t\treturn true;\n\t}\n\t// Texts.\n\telse if ( isText( actualDomChild ) && isText( expectedDomChild ) ) {\n\t\treturn actualDomChild.data === expectedDomChild.data;\n\t}\n\t// Block fillers.\n\telse if ( domConverter.isBlockFiller( actualDomChild ) &&\n\t\tdomConverter.isBlockFiller( expectedDomChild ) ) {\n\t\treturn true;\n\t}\n\n\t// Not matching types.\n\treturn false;\n}\n\n// The following is a Firefox–specific hack (https://github.com/ckeditor/ckeditor5-engine/issues/1439).\n// When the native DOM selection is at the end of the block and preceded by <br /> e.g.\n//\n//\t\t<p>foo<br/>[]</p>\n//\n// which happens a lot when using the soft line break, the browser fails to (visually) move the\n// caret to the new line. A quick fix is as simple as force–refreshing the selection with the same range.\nfunction fixGeckoSelectionAfterBr( focus, domSelection ) {\n\tconst parent = focus.parent;\n\n\t// This fix works only when the focus point is at the very end of an element.\n\t// There is no point in running it in cases unrelated to the browser bug.\n\tif ( parent.nodeType != Node.ELEMENT_NODE || focus.offset != parent.childNodes.length - 1 ) {\n\t\treturn;\n\t}\n\n\tconst childAtOffset = parent.childNodes[ focus.offset ];\n\n\t// To stay on the safe side, the fix being as specific as possible, it targets only the\n\t// selection which is at the very end of the element and preceded by <br />.\n\tif ( childAtOffset && childAtOffset.tagName == 'BR' ) {\n\t\tdomSelection.addRange( domSelection.getRangeAt( 0 ) );\n\t}\n}\n\nfunction filterOutFakeSelectionContainer( domChildList, fakeSelectionContainer ) {\n\tconst childList = Array.from( domChildList );\n\n\tif ( childList.length == 0 || !fakeSelectionContainer ) {\n\t\treturn childList;\n\t}\n\n\tconst last = childList[ childList.length - 1 ];\n\n\tif ( last == fakeSelectionContainer ) {\n\t\tchildList.pop();\n\t}\n\n\treturn childList;\n}\n\n// Creates a fake selection container for a given document.\n//\n// @private\n// @param {Document} domDocument\n// @returns {HTMLElement}\nfunction createFakeSelectionContainer( domDocument ) {\n\tconst container = domDocument.createElement( 'div' );\n\n\tcontainer.className = 'ck-fake-selection-container';\n\n\tObject.assign( container.style, {\n\t\tposition: 'fixed',\n\t\ttop: 0,\n\t\tleft: '-9999px',\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/752.\n\t\twidth: '42px'\n\t} );\n\n\t// Fill it with a text node so we can update it later.\n\tcontainer.textContent = '\\u00A0';\n\n\treturn container;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* globals window, document */\n\n/**\n * @module utils/dom/global\n */\n\n/**\n * A helper (module) giving an access to the global DOM objects such as `window` and\n * `document`. Accessing these objects using this helper allows easy and bulletproof\n * testing, i.e. stubbing native properties:\n *\n *\t\timport global from 'ckeditor5/utils/dom/global.js';\n *\n *\t\t// This stub will work for any code using global module.\n *\t\ttestUtils.sinon.stub( global, 'window', {\n *\t\t\tinnerWidth: 10000\n *\t\t} );\n *\n *\t\tconsole.log( global.window.innerWidth );\n */\nexport default { window, document };\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/indexof\n */\n\n/**\n * Returns index of the node in the parent element.\n *\n * @param {Node} node Node which index is tested.\n * @returns {Number} Index of the node in the parent element. Returns 0 if node has no parent.\n */\nexport default function indexOf( node ) {\n\tlet index = 0;\n\n\twhile ( node.previousSibling ) {\n\t\tnode = node.previousSibling;\n\t\tindex++;\n\t}\n\n\treturn index;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* globals Node */\n\n/**\n * @module utils/dom/getancestors\n */\n\n/**\n * Returns all ancestors of given DOM node, starting from the top-most (root). Includes the given node itself. If the\n * node is a part of `DocumentFragment` that `DocumentFragment` will be returned. In contrary, if the node is\n * appended to a `Document`, that `Document` will not be returned (algorithms operating on DOM tree care for `Document#documentElement`\n * at most, which will be returned).\n *\n * @param {Node} node DOM node.\n * @returns {Array.<Node|DocumentFragment>} Array of given `node` parents.\n */\nexport default function getAncestors( node ) {\n\tconst nodes = [];\n\n\t// We are interested in `Node`s `DocumentFragment`s only.\n\twhile ( node && node.nodeType != Node.DOCUMENT_NODE ) {\n\t\tnodes.unshift( node );\n\t\tnode = node.parentNode;\n\t}\n\n\treturn nodes;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/domconverter\n */\n\n/* globals document, Node, NodeFilter, DOMParser, Text */\n\nimport ViewText from './text';\nimport ViewElement from './element';\nimport ViewUIElement from './uielement';\nimport ViewPosition from './position';\nimport ViewRange from './range';\nimport ViewSelection from './selection';\nimport ViewDocumentFragment from './documentfragment';\nimport ViewTreeWalker from './treewalker';\nimport Matcher from './matcher';\nimport {\n\tBR_FILLER, INLINE_FILLER_LENGTH, NBSP_FILLER, MARKED_NBSP_FILLER,\n\tgetDataWithoutFiller, isInlineFiller, startsWithFiller\n} from './filler';\n\nimport global from '@ckeditor/ckeditor5-utils/src/dom/global';\nimport { logWarning } from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport indexOf from '@ckeditor/ckeditor5-utils/src/dom/indexof';\nimport getAncestors from '@ckeditor/ckeditor5-utils/src/dom/getancestors';\nimport isText from '@ckeditor/ckeditor5-utils/src/dom/istext';\nimport isComment from '@ckeditor/ckeditor5-utils/src/dom/iscomment';\n\nconst BR_FILLER_REF = BR_FILLER( document ); // eslint-disable-line new-cap\nconst NBSP_FILLER_REF = NBSP_FILLER( document ); // eslint-disable-line new-cap\nconst MARKED_NBSP_FILLER_REF = MARKED_NBSP_FILLER( document ); // eslint-disable-line new-cap\nconst UNSAFE_ATTRIBUTE_NAME_PREFIX = 'data-ck-unsafe-attribute-';\nconst UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE = 'data-ck-unsafe-element';\nconst UNSAFE_ELEMENTS = [ 'script', 'style' ];\n\n/**\n * `DomConverter` is a set of tools to do transformations between DOM nodes and view nodes. It also handles\n * {@link module:engine/view/domconverter~DomConverter#bindElements bindings} between these nodes.\n *\n * An instance of the DOM converter is available under\n * {@link module:engine/view/view~View#domConverter `editor.editing.view.domConverter`}.\n *\n * The DOM converter does not check which nodes should be rendered (use {@link module:engine/view/renderer~Renderer}), does not keep the\n * state of a tree nor keeps the synchronization between the tree view and the DOM tree (use {@link module:engine/view/document~Document}).\n *\n * The DOM converter keeps DOM elements to view element bindings, so when the converter gets destroyed, the bindings are lost.\n * Two converters will keep separate binding maps, so one tree view can be bound with two DOM trees.\n */\nexport default class DomConverter {\n\t/**\n\t * Creates a DOM converter.\n\t *\n\t * @param {module:engine/view/document~Document} document The view document instance.\n\t * @param {Object} options An object with configuration options.\n\t * @param {module:engine/view/filler~BlockFillerMode} [options.blockFillerMode] The type of the block filler to use.\n\t * Default value depends on the options.renderingMode:\n\t * 'nbsp' when options.renderingMode == 'data',\n\t * 'br' when options.renderingMode == 'editing'.\n\t * @param {'data'|'editing'} [options.renderingMode='editing'] Whether to leave the View-to-DOM conversion result unchanged\n\t * or improve editing experience by filtering out interactive data.\n\t */\n\tconstructor( document, options = {} ) {\n\t\t/**\n\t\t * @readonly\n\t\t * @type {module:engine/view/document~Document}\n\t\t */\n\t\tthis.document = document;\n\n\t\t/**\n\t\t * Whether to leave the View-to-DOM conversion result unchanged or improve editing experience by filtering out interactive data.\n\t\t *\n\t\t * @member {'data'|'editing'} module:engine/view/domconverter~DomConverter#renderingMode\n\t\t */\n\t\tthis.renderingMode = options.renderingMode || 'editing';\n\n\t\t/**\n\t\t * The mode of a block filler used by the DOM converter.\n\t\t *\n\t\t * @member {'br'|'nbsp'|'markedNbsp'} module:engine/view/domconverter~DomConverter#blockFillerMode\n\t\t */\n\t\tthis.blockFillerMode = options.blockFillerMode || ( this.renderingMode === 'editing' ? 'br' : 'nbsp' );\n\n\t\t/**\n\t\t * Elements which are considered pre-formatted elements.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Array.<String>} module:engine/view/domconverter~DomConverter#preElements\n\t\t */\n\t\tthis.preElements = [ 'pre' ];\n\n\t\t/**\n\t\t * Elements which are considered block elements (and hence should be filled with a\n\t\t * {@link #isBlockFiller block filler}).\n\t\t *\n\t\t * Whether an element is considered a block element also affects handling of trailing whitespaces.\n\t\t *\n\t\t * You can extend this array if you introduce support for block elements which are not yet recognized here.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Array.<String>} module:engine/view/domconverter~DomConverter#blockElements\n\t\t */\n\t\tthis.blockElements = [\n\t\t\t'address', 'article', 'aside', 'blockquote', 'caption', 'center', 'dd', 'details', 'dir', 'div',\n\t\t\t'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header',\n\t\t\t'hgroup', 'legend', 'li', 'main', 'menu', 'nav', 'ol', 'p', 'pre', 'section', 'summary', 'table', 'tbody',\n\t\t\t'td', 'tfoot', 'th', 'thead', 'tr', 'ul'\n\t\t];\n\n\t\t/**\n\t\t * A list of elements that exist inline (in text) but their inner structure cannot be edited because\n\t\t * of the way they are rendered by the browser. They are mostly HTML form elements but there are other\n\t\t * elements such as `<img>` or `<iframe>` that also have non-editable children or no children whatsoever.\n\t\t *\n\t\t * Whether an element is considered an inline object has an impact on white space rendering (trimming)\n\t\t * around (and inside of it). In short, white spaces in text nodes next to inline objects are not trimmed.\n\t\t *\n\t\t * You can extend this array if you introduce support for inline object elements which are not yet recognized here.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Array.<String>} module:engine/view/domconverter~DomConverter#inlineObjectElements\n\t\t */\n\t\tthis.inlineObjectElements = [\n\t\t\t'object', 'iframe', 'input', 'button', 'textarea', 'select', 'option', 'video', 'embed', 'audio', 'img', 'canvas'\n\t\t];\n\n\t\t/**\n\t\t * The DOM-to-view mapping.\n\t\t *\n\t\t * @private\n\t\t * @member {WeakMap} module:engine/view/domconverter~DomConverter#_domToViewMapping\n\t\t */\n\t\tthis._domToViewMapping = new WeakMap();\n\n\t\t/**\n\t\t * The view-to-DOM mapping.\n\t\t *\n\t\t * @private\n\t\t * @member {WeakMap} module:engine/view/domconverter~DomConverter#_viewToDomMapping\n\t\t */\n\t\tthis._viewToDomMapping = new WeakMap();\n\n\t\t/**\n\t\t * Holds the mapping between fake selection containers and corresponding view selections.\n\t\t *\n\t\t * @private\n\t\t * @member {WeakMap} module:engine/view/domconverter~DomConverter#_fakeSelectionMapping\n\t\t */\n\t\tthis._fakeSelectionMapping = new WeakMap();\n\n\t\t/**\n\t\t * Matcher for view elements whose content should be treated as raw data\n\t\t * and not processed during the conversion from DOM nodes to view elements.\n\t\t *\n\t\t * @private\n\t\t * @type {module:engine/view/matcher~Matcher}\n\t\t */\n\t\tthis._rawContentElementMatcher = new Matcher();\n\n\t\t/**\n\t\t * A set of encountered raw content DOM nodes. It is used for preventing left trimming of the following text node.\n\t\t *\n\t\t * @private\n\t\t * @type {WeakSet.<Node>}\n\t\t */\n\t\tthis._encounteredRawContentDomNodes = new WeakSet();\n\t}\n\n\t/**\n\t * Binds a given DOM element that represents fake selection to a **position** of a\n\t * {@link module:engine/view/documentselection~DocumentSelection document selection}.\n\t * Document selection copy is stored and can be retrieved by the\n\t * {@link module:engine/view/domconverter~DomConverter#fakeSelectionToView} method.\n\t *\n\t * @param {HTMLElement} domElement\n\t * @param {module:engine/view/documentselection~DocumentSelection} viewDocumentSelection\n\t */\n\tbindFakeSelection( domElement, viewDocumentSelection ) {\n\t\tthis._fakeSelectionMapping.set( domElement, new ViewSelection( viewDocumentSelection ) );\n\t}\n\n\t/**\n\t * Returns a {@link module:engine/view/selection~Selection view selection} instance corresponding to a given\n\t * DOM element that represents fake selection. Returns `undefined` if binding to the given DOM element does not exist.\n\t *\n\t * @param {HTMLElement} domElement\n\t * @returns {module:engine/view/selection~Selection|undefined}\n\t */\n\tfakeSelectionToView( domElement ) {\n\t\treturn this._fakeSelectionMapping.get( domElement );\n\t}\n\n\t/**\n\t * Binds DOM and view elements, so it will be possible to get corresponding elements using\n\t * {@link module:engine/view/domconverter~DomConverter#mapDomToView} and\n\t * {@link module:engine/view/domconverter~DomConverter#mapViewToDom}.\n\t *\n\t * @param {HTMLElement} domElement The DOM element to bind.\n\t * @param {module:engine/view/element~Element} viewElement The view element to bind.\n\t */\n\tbindElements( domElement, viewElement ) {\n\t\tthis._domToViewMapping.set( domElement, viewElement );\n\t\tthis._viewToDomMapping.set( viewElement, domElement );\n\t}\n\n\t/**\n\t * Unbinds a given DOM element from the view element it was bound to. Unbinding is deep, meaning that all children of\n\t * the DOM element will be unbound too.\n\t *\n\t * @param {HTMLElement} domElement The DOM element to unbind.\n\t */\n\tunbindDomElement( domElement ) {\n\t\tconst viewElement = this._domToViewMapping.get( domElement );\n\n\t\tif ( viewElement ) {\n\t\t\tthis._domToViewMapping.delete( domElement );\n\t\t\tthis._viewToDomMapping.delete( viewElement );\n\n\t\t\tfor ( const child of domElement.childNodes ) {\n\t\t\t\tthis.unbindDomElement( child );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Binds DOM and view document fragments, so it will be possible to get corresponding document fragments using\n\t * {@link module:engine/view/domconverter~DomConverter#mapDomToView} and\n\t * {@link module:engine/view/domconverter~DomConverter#mapViewToDom}.\n\t *\n\t * @param {DocumentFragment} domFragment The DOM document fragment to bind.\n\t * @param {module:engine/view/documentfragment~DocumentFragment} viewFragment The view document fragment to bind.\n\t */\n\tbindDocumentFragments( domFragment, viewFragment ) {\n\t\tthis._domToViewMapping.set( domFragment, viewFragment );\n\t\tthis._viewToDomMapping.set( viewFragment, domFragment );\n\t}\n\n\t/**\n\t * Decides whether a given pair of attribute key and value should be passed further down the pipeline.\n\t *\n\t * @param {String} attributeKey\n\t * @param {String} attributeValue\n\t * @param {String} elementName Element name in lower case.\n\t * @returns {Boolean}\n\t */\n\tshouldRenderAttribute( attributeKey, attributeValue, elementName ) {\n\t\tif ( this.renderingMode === 'data' ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tattributeKey = attributeKey.toLowerCase();\n\n\t\tif ( attributeKey.startsWith( 'on' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (\n\t\t\tattributeKey === 'srcdoc' &&\n\t\t\tattributeValue.match( /\\bon\\S+\\s*=|javascript:|<\\s*\\/*script/i )\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (\n\t\t\telementName === 'img' &&\n\t\t\t( attributeKey === 'src' || attributeKey === 'srcset' )\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( elementName === 'source' && attributeKey === 'srcset' ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( attributeValue.match( /^\\s*(javascript:|data:(image\\/svg|text\\/x?html))/i ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Set `domElement`'s content using provided `html` argument. Apply necessary filtering for the editing pipeline.\n\t *\n\t * @param {Element} domElement DOM element that should have `html` set as its content.\n\t * @param {String} html Textual representation of the HTML that will be set on `domElement`.\n\t */\n\tsetContentOf( domElement, html ) {\n\t\t// For data pipeline we pass the HTML as-is.\n\t\tif ( this.renderingMode === 'data' ) {\n\t\t\tdomElement.innerHTML = html;\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst document = new DOMParser().parseFromString( html, 'text/html' );\n\t\tconst fragment = document.createDocumentFragment();\n\t\tconst bodyChildNodes = document.body.childNodes;\n\n\t\twhile ( bodyChildNodes.length > 0 ) {\n\t\t\tfragment.appendChild( bodyChildNodes[ 0 ] );\n\t\t}\n\n\t\tconst treeWalker = document.createTreeWalker( fragment, NodeFilter.SHOW_ELEMENT );\n\t\tconst nodes = [];\n\n\t\tlet currentNode;\n\n\t\t// eslint-disable-next-line no-cond-assign\n\t\twhile ( currentNode = treeWalker.nextNode() ) {\n\t\t\tnodes.push( currentNode );\n\t\t}\n\n\t\tfor ( const currentNode of nodes ) {\n\t\t\t// Go through nodes to remove those that are prohibited in editing pipeline.\n\t\t\tfor ( const attributeName of currentNode.getAttributeNames() ) {\n\t\t\t\tthis.setDomElementAttribute( currentNode, attributeName, currentNode.getAttribute( attributeName ) );\n\t\t\t}\n\n\t\t\tconst elementName = currentNode.tagName.toLowerCase();\n\n\t\t\t// There are certain nodes, that should be renamed to <span> in editing pipeline.\n\t\t\tif ( this._shouldRenameElement( elementName ) ) {\n\t\t\t\t_logUnsafeElement( elementName );\n\n\t\t\t\tcurrentNode.replaceWith( this._createReplacementDomElement( elementName, currentNode ) );\n\t\t\t}\n\t\t}\n\n\t\t// Empty the target element.\n\t\twhile ( domElement.firstChild ) {\n\t\t\tdomElement.firstChild.remove();\n\t\t}\n\n\t\tdomElement.append( fragment );\n\t}\n\n\t/**\n\t * Converts the view to the DOM. For all text nodes, not bound elements and document fragments new items will\n\t * be created. For bound elements and document fragments the method will return corresponding items.\n\t *\n\t * @param {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment} viewNode\n\t * View node or document fragment to transform.\n\t * @param {Document} domDocument Document which will be used to create DOM nodes.\n\t * @param {Object} [options] Conversion options.\n\t * @param {Boolean} [options.bind=false] Determines whether new elements will be bound.\n\t * @param {Boolean} [options.withChildren=true] If `true`, node's and document fragment's children will be converted too.\n\t * @returns {Node|DocumentFragment} Converted node or DocumentFragment.\n\t */\n\tviewToDom( viewNode, domDocument, options = {} ) {\n\t\tif ( viewNode.is( '$text' ) ) {\n\t\t\tconst textData = this._processDataFromViewText( viewNode );\n\n\t\t\treturn domDocument.createTextNode( textData );\n\t\t} else {\n\t\t\tif ( this.mapViewToDom( viewNode ) ) {\n\t\t\t\treturn this.mapViewToDom( viewNode );\n\t\t\t}\n\n\t\t\tlet domElement;\n\n\t\t\tif ( viewNode.is( 'documentFragment' ) ) {\n\t\t\t\t// Create DOM document fragment.\n\t\t\t\tdomElement = domDocument.createDocumentFragment();\n\n\t\t\t\tif ( options.bind ) {\n\t\t\t\t\tthis.bindDocumentFragments( domElement, viewNode );\n\t\t\t\t}\n\t\t\t} else if ( viewNode.is( 'uiElement' ) ) {\n\t\t\t\tif ( viewNode.name === '$comment' ) {\n\t\t\t\t\tdomElement = domDocument.createComment( viewNode.getCustomProperty( '$rawContent' ) );\n\t\t\t\t} else {\n\t\t\t\t\t// UIElement has its own render() method (see #799).\n\t\t\t\t\tdomElement = viewNode.render( domDocument, this );\n\t\t\t\t}\n\n\t\t\t\tif ( options.bind ) {\n\t\t\t\t\tthis.bindElements( domElement, viewNode );\n\t\t\t\t}\n\n\t\t\t\treturn domElement;\n\t\t\t} else {\n\t\t\t\t// Create DOM element.\n\t\t\t\tif ( this._shouldRenameElement( viewNode.name ) ) {\n\t\t\t\t\t_logUnsafeElement( viewNode.name );\n\n\t\t\t\t\tdomElement = this._createReplacementDomElement( viewNode.name );\n\t\t\t\t} else if ( viewNode.hasAttribute( 'xmlns' ) ) {\n\t\t\t\t\tdomElement = domDocument.createElementNS( viewNode.getAttribute( 'xmlns' ), viewNode.name );\n\t\t\t\t} else {\n\t\t\t\t\tdomElement = domDocument.createElement( viewNode.name );\n\t\t\t\t}\n\n\t\t\t\t// RawElement take care of their children in RawElement#render() method which can be customized\n\t\t\t\t// (see https://github.com/ckeditor/ckeditor5/issues/4469).\n\t\t\t\tif ( viewNode.is( 'rawElement' ) ) {\n\t\t\t\t\tviewNode.render( domElement, this );\n\t\t\t\t}\n\n\t\t\t\tif ( options.bind ) {\n\t\t\t\t\tthis.bindElements( domElement, viewNode );\n\t\t\t\t}\n\n\t\t\t\t// Copy element's attributes.\n\t\t\t\tfor ( const key of viewNode.getAttributeKeys() ) {\n\t\t\t\t\tthis.setDomElementAttribute( domElement, key, viewNode.getAttribute( key ), viewNode );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( options.withChildren !== false ) {\n\t\t\t\tfor ( const child of this.viewChildrenToDom( viewNode, domDocument, options ) ) {\n\t\t\t\t\tdomElement.appendChild( child );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn domElement;\n\t\t}\n\t}\n\n\t/**\n\t * Sets the attribute on a DOM element.\n\t *\n\t * **Note**: To remove the attribute, use {@link #removeDomElementAttribute}.\n\t *\n\t * @param {HTMLElement} domElement The DOM element the attribute should be set on.\n\t * @param {String} key The name of the attribute.\n\t * @param {String} value The value of the attribute.\n\t * @param {module:engine/view/element~Element} [relatedViewElement] The view element related to the `domElement` (if there is any).\n\t * It helps decide whether the attribute set is unsafe. For instance, view elements created via the\n\t * {@link module:engine/view/downcastwriter~DowncastWriter} methods can allow certain attributes that would normally be filtered out.\n\t */\n\tsetDomElementAttribute( domElement, key, value, relatedViewElement = null ) {\n\t\tconst shouldRenderAttribute = this.shouldRenderAttribute( key, value, domElement.tagName.toLowerCase() ) ||\n\t\t\trelatedViewElement && relatedViewElement.shouldRenderUnsafeAttribute( key );\n\n\t\tif ( !shouldRenderAttribute ) {\n\t\t\tlogWarning( 'domconverter-unsafe-attribute-detected', { domElement, key, value } );\n\t\t}\n\n\t\t// The old value was safe but the new value is unsafe.\n\t\tif ( domElement.hasAttribute( key ) && !shouldRenderAttribute ) {\n\t\t\tdomElement.removeAttribute( key );\n\t\t}\n\t\t// The old value was unsafe (but prefixed) but the new value will be safe (will be unprefixed).\n\t\telse if ( domElement.hasAttribute( UNSAFE_ATTRIBUTE_NAME_PREFIX + key ) && shouldRenderAttribute ) {\n\t\t\tdomElement.removeAttribute( UNSAFE_ATTRIBUTE_NAME_PREFIX + key );\n\t\t}\n\n\t\t// If the attribute should not be rendered, rename it (instead of removing) to give developers some idea of what\n\t\t// is going on (https://github.com/ckeditor/ckeditor5/issues/10801).\n\t\tdomElement.setAttribute( shouldRenderAttribute ? key : UNSAFE_ATTRIBUTE_NAME_PREFIX + key, value );\n\t}\n\n\t/**\n\t * Removes an attribute from a DOM element.\n\t *\n\t * **Note**: To set the attribute, use {@link #setDomElementAttribute}.\n\t *\n\t * @param {HTMLElement} domElement The DOM element the attribute should be removed from.\n\t * @param {String} key The name of the attribute.\n\t */\n\tremoveDomElementAttribute( domElement, key ) {\n\t\t// See #_createReplacementDomElement() to learn what this is.\n\t\tif ( key == UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdomElement.removeAttribute( key );\n\n\t\t// See setDomElementAttribute() to learn what this is.\n\t\tdomElement.removeAttribute( UNSAFE_ATTRIBUTE_NAME_PREFIX + key );\n\t}\n\n\t/**\n\t * Converts children of the view element to DOM using the\n\t * {@link module:engine/view/domconverter~DomConverter#viewToDom} method.\n\t * Additionally, this method adds block {@link module:engine/view/filler filler} to the list of children, if needed.\n\t *\n\t * @param {module:engine/view/element~Element|module:engine/view/documentfragment~DocumentFragment} viewElement Parent view element.\n\t * @param {Document} domDocument Document which will be used to create DOM nodes.\n\t * @param {Object} options See {@link module:engine/view/domconverter~DomConverter#viewToDom} options parameter.\n\t * @returns {Iterable.<Node>} DOM nodes.\n\t */\n\t* viewChildrenToDom( viewElement, domDocument, options = {} ) {\n\t\tconst fillerPositionOffset = viewElement.getFillerOffset && viewElement.getFillerOffset();\n\t\tlet offset = 0;\n\n\t\tfor ( const childView of viewElement.getChildren() ) {\n\t\t\tif ( fillerPositionOffset === offset ) {\n\t\t\t\tyield this._getBlockFiller( domDocument );\n\t\t\t}\n\n\t\t\tyield this.viewToDom( childView, domDocument, options );\n\n\t\t\toffset++;\n\t\t}\n\n\t\tif ( fillerPositionOffset === offset ) {\n\t\t\tyield this._getBlockFiller( domDocument );\n\t\t}\n\t}\n\n\t/**\n\t * Converts view {@link module:engine/view/range~Range} to DOM range.\n\t * Inline and block {@link module:engine/view/filler fillers} are handled during the conversion.\n\t *\n\t * @param {module:engine/view/range~Range} viewRange View range.\n\t * @returns {Range} DOM range.\n\t */\n\tviewRangeToDom( viewRange ) {\n\t\tconst domStart = this.viewPositionToDom( viewRange.start );\n\t\tconst domEnd = this.viewPositionToDom( viewRange.end );\n\n\t\tconst domRange = document.createRange();\n\t\tdomRange.setStart( domStart.parent, domStart.offset );\n\t\tdomRange.setEnd( domEnd.parent, domEnd.offset );\n\n\t\treturn domRange;\n\t}\n\n\t/**\n\t * Converts view {@link module:engine/view/position~Position} to DOM parent and offset.\n\t *\n\t * Inline and block {@link module:engine/view/filler fillers} are handled during the conversion.\n\t * If the converted position is directly before inline filler it is moved inside the filler.\n\t *\n\t * @param {module:engine/view/position~Position} viewPosition View position.\n\t * @returns {Object|null} position DOM position or `null` if view position could not be converted to DOM.\n\t * @returns {Node} position.parent DOM position parent.\n\t * @returns {Number} position.offset DOM position offset.\n\t */\n\tviewPositionToDom( viewPosition ) {\n\t\tconst viewParent = viewPosition.parent;\n\n\t\tif ( viewParent.is( '$text' ) ) {\n\t\t\tconst domParent = this.findCorrespondingDomText( viewParent );\n\n\t\t\tif ( !domParent ) {\n\t\t\t\t// Position is in a view text node that has not been rendered to DOM yet.\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tlet offset = viewPosition.offset;\n\n\t\t\tif ( startsWithFiller( domParent ) ) {\n\t\t\t\toffset += INLINE_FILLER_LENGTH;\n\t\t\t}\n\n\t\t\treturn { parent: domParent, offset };\n\t\t} else {\n\t\t\t// viewParent is instance of ViewElement.\n\t\t\tlet domParent, domBefore, domAfter;\n\n\t\t\tif ( viewPosition.offset === 0 ) {\n\t\t\t\tdomParent = this.mapViewToDom( viewParent );\n\n\t\t\t\tif ( !domParent ) {\n\t\t\t\t\t// Position is in a view element that has not been rendered to DOM yet.\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tdomAfter = domParent.childNodes[ 0 ];\n\t\t\t} else {\n\t\t\t\tconst nodeBefore = viewPosition.nodeBefore;\n\n\t\t\t\tdomBefore = nodeBefore.is( '$text' ) ?\n\t\t\t\t\tthis.findCorrespondingDomText( nodeBefore ) :\n\t\t\t\t\tthis.mapViewToDom( viewPosition.nodeBefore );\n\n\t\t\t\tif ( !domBefore ) {\n\t\t\t\t\t// Position is after a view element that has not been rendered to DOM yet.\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tdomParent = domBefore.parentNode;\n\t\t\t\tdomAfter = domBefore.nextSibling;\n\t\t\t}\n\n\t\t\t// If there is an inline filler at position return position inside the filler. We should never return\n\t\t\t// the position before the inline filler.\n\t\t\tif ( isText( domAfter ) && startsWithFiller( domAfter ) ) {\n\t\t\t\treturn { parent: domAfter, offset: INLINE_FILLER_LENGTH };\n\t\t\t}\n\n\t\t\tconst offset = domBefore ? indexOf( domBefore ) + 1 : 0;\n\n\t\t\treturn { parent: domParent, offset };\n\t\t}\n\t}\n\n\t/**\n\t * Converts DOM to view. For all text nodes, not bound elements and document fragments new items will\n\t * be created. For bound elements and document fragments function will return corresponding items. For\n\t * {@link module:engine/view/filler fillers} `null` will be returned.\n\t * For all DOM elements rendered by {@link module:engine/view/uielement~UIElement} that UIElement will be returned.\n\t *\n\t * @param {Node|DocumentFragment} domNode DOM node or document fragment to transform.\n\t * @param {Object} [options] Conversion options.\n\t * @param {Boolean} [options.bind=false] Determines whether new elements will be bound.\n\t * @param {Boolean} [options.withChildren=true] If `true`, node's and document fragment's children will be converted too.\n\t * @param {Boolean} [options.keepOriginalCase=false] If `false`, node's tag name will be converted to lower case.\n\t * @param {Boolean} [options.skipComments=false] If `false`, comment nodes will be converted to `$comment`\n\t * {@link module:engine/view/uielement~UIElement view UI elements}.\n\t * @returns {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment|null} Converted node or document fragment\n\t * or `null` if DOM node is a {@link module:engine/view/filler filler} or the given node is an empty text node.\n\t */\n\tdomToView( domNode, options = {} ) {\n\t\tif ( this.isBlockFiller( domNode ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// When node is inside a UIElement or a RawElement return that parent as it's view representation.\n\t\tconst hostElement = this.getHostViewElement( domNode );\n\n\t\tif ( hostElement ) {\n\t\t\treturn hostElement;\n\t\t}\n\n\t\tif ( isComment( domNode ) && options.skipComments ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( isText( domNode ) ) {\n\t\t\tif ( isInlineFiller( domNode ) ) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\tconst textData = this._processDataFromDomText( domNode );\n\n\t\t\t\treturn textData === '' ? null : new ViewText( this.document, textData );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( this.mapDomToView( domNode ) ) {\n\t\t\t\treturn this.mapDomToView( domNode );\n\t\t\t}\n\n\t\t\tlet viewElement;\n\n\t\t\tif ( this.isDocumentFragment( domNode ) ) {\n\t\t\t\t// Create view document fragment.\n\t\t\t\tviewElement = new ViewDocumentFragment( this.document );\n\n\t\t\t\tif ( options.bind ) {\n\t\t\t\t\tthis.bindDocumentFragments( domNode, viewElement );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Create view element.\n\t\t\t\tviewElement = this._createViewElement( domNode, options );\n\n\t\t\t\tif ( options.bind ) {\n\t\t\t\t\tthis.bindElements( domNode, viewElement );\n\t\t\t\t}\n\n\t\t\t\t// Copy element's attributes.\n\t\t\t\tconst attrs = domNode.attributes;\n\n\t\t\t\tif ( attrs ) {\n\t\t\t\t\tfor ( let i = attrs.length - 1; i >= 0; i-- ) {\n\t\t\t\t\t\tviewElement._setAttribute( attrs[ i ].name, attrs[ i ].value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Treat this element's content as a raw data if it was registered as such.\n\t\t\t\t// Comment node is also treated as an element with raw data.\n\t\t\t\tif ( this._isViewElementWithRawContent( viewElement, options ) || isComment( domNode ) ) {\n\t\t\t\t\tconst rawContent = isComment( domNode ) ? domNode.data : domNode.innerHTML;\n\n\t\t\t\t\tviewElement._setCustomProperty( '$rawContent', rawContent );\n\n\t\t\t\t\t// Store a DOM node to prevent left trimming of the following text node.\n\t\t\t\t\tthis._encounteredRawContentDomNodes.add( domNode );\n\n\t\t\t\t\treturn viewElement;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( options.withChildren !== false ) {\n\t\t\t\tfor ( const child of this.domChildrenToView( domNode, options ) ) {\n\t\t\t\t\tviewElement._appendChild( child );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn viewElement;\n\t\t}\n\t}\n\n\t/**\n\t * Converts children of the DOM element to view nodes using\n\t * the {@link module:engine/view/domconverter~DomConverter#domToView} method.\n\t * Additionally this method omits block {@link module:engine/view/filler filler}, if it exists in the DOM parent.\n\t *\n\t * @param {HTMLElement} domElement Parent DOM element.\n\t * @param {Object} options See {@link module:engine/view/domconverter~DomConverter#domToView} options parameter.\n\t * @returns {Iterable.<module:engine/view/node~Node>} View nodes.\n\t */\n\t* domChildrenToView( domElement, options = {} ) {\n\t\tfor ( let i = 0; i < domElement.childNodes.length; i++ ) {\n\t\t\tconst domChild = domElement.childNodes[ i ];\n\t\t\tconst viewChild = this.domToView( domChild, options );\n\n\t\t\tif ( viewChild !== null ) {\n\t\t\t\tyield viewChild;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Converts DOM selection to view {@link module:engine/view/selection~Selection}.\n\t * Ranges which cannot be converted will be omitted.\n\t *\n\t * @param {Selection} domSelection DOM selection.\n\t * @returns {module:engine/view/selection~Selection} View selection.\n\t */\n\tdomSelectionToView( domSelection ) {\n\t\t// DOM selection might be placed in fake selection container.\n\t\t// If container contains fake selection - return corresponding view selection.\n\t\tif ( domSelection.rangeCount === 1 ) {\n\t\t\tlet container = domSelection.getRangeAt( 0 ).startContainer;\n\n\t\t\t// The DOM selection might be moved to the text node inside the fake selection container.\n\t\t\tif ( isText( container ) ) {\n\t\t\t\tcontainer = container.parentNode;\n\t\t\t}\n\n\t\t\tconst viewSelection = this.fakeSelectionToView( container );\n\n\t\t\tif ( viewSelection ) {\n\t\t\t\treturn viewSelection;\n\t\t\t}\n\t\t}\n\n\t\tconst isBackward = this.isDomSelectionBackward( domSelection );\n\n\t\tconst viewRanges = [];\n\n\t\tfor ( let i = 0; i < domSelection.rangeCount; i++ ) {\n\t\t\t// DOM Range have correct start and end, no matter what is the DOM Selection direction. So we don't have to fix anything.\n\t\t\tconst domRange = domSelection.getRangeAt( i );\n\t\t\tconst viewRange = this.domRangeToView( domRange );\n\n\t\t\tif ( viewRange ) {\n\t\t\t\tviewRanges.push( viewRange );\n\t\t\t}\n\t\t}\n\n\t\treturn new ViewSelection( viewRanges, { backward: isBackward } );\n\t}\n\n\t/**\n\t * Converts DOM Range to view {@link module:engine/view/range~Range}.\n\t * If the start or end position can not be converted `null` is returned.\n\t *\n\t * @param {Range} domRange DOM range.\n\t * @returns {module:engine/view/range~Range|null} View range.\n\t */\n\tdomRangeToView( domRange ) {\n\t\tconst viewStart = this.domPositionToView( domRange.startContainer, domRange.startOffset );\n\t\tconst viewEnd = this.domPositionToView( domRange.endContainer, domRange.endOffset );\n\n\t\tif ( viewStart && viewEnd ) {\n\t\t\treturn new ViewRange( viewStart, viewEnd );\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Converts DOM parent and offset to view {@link module:engine/view/position~Position}.\n\t *\n\t * If the position is inside a {@link module:engine/view/filler filler} which has no corresponding view node,\n\t * position of the filler will be converted and returned.\n\t *\n\t * If the position is inside DOM element rendered by {@link module:engine/view/uielement~UIElement}\n\t * that position will be converted to view position before that UIElement.\n\t *\n\t * If structures are too different and it is not possible to find corresponding position then `null` will be returned.\n\t *\n\t * @param {Node} domParent DOM position parent.\n\t * @param {Number} [domOffset=0] DOM position offset. You can skip it when converting the inline filler node.\n\t * @returns {module:engine/view/position~Position} viewPosition View position.\n\t */\n\tdomPositionToView( domParent, domOffset = 0 ) {\n\t\tif ( this.isBlockFiller( domParent ) ) {\n\t\t\treturn this.domPositionToView( domParent.parentNode, indexOf( domParent ) );\n\t\t}\n\n\t\t// If position is somewhere inside UIElement or a RawElement - return position before that element.\n\t\tconst viewElement = this.mapDomToView( domParent );\n\n\t\tif ( viewElement && ( viewElement.is( 'uiElement' ) || viewElement.is( 'rawElement' ) ) ) {\n\t\t\treturn ViewPosition._createBefore( viewElement );\n\t\t}\n\n\t\tif ( isText( domParent ) ) {\n\t\t\tif ( isInlineFiller( domParent ) ) {\n\t\t\t\treturn this.domPositionToView( domParent.parentNode, indexOf( domParent ) );\n\t\t\t}\n\n\t\t\tconst viewParent = this.findCorrespondingViewText( domParent );\n\t\t\tlet offset = domOffset;\n\n\t\t\tif ( !viewParent ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( startsWithFiller( domParent ) ) {\n\t\t\t\toffset -= INLINE_FILLER_LENGTH;\n\t\t\t\toffset = offset < 0 ? 0 : offset;\n\t\t\t}\n\n\t\t\treturn new ViewPosition( viewParent, offset );\n\t\t}\n\t\t// domParent instanceof HTMLElement.\n\t\telse {\n\t\t\tif ( domOffset === 0 ) {\n\t\t\t\tconst viewParent = this.mapDomToView( domParent );\n\n\t\t\t\tif ( viewParent ) {\n\t\t\t\t\treturn new ViewPosition( viewParent, 0 );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst domBefore = domParent.childNodes[ domOffset - 1 ];\n\t\t\t\tconst viewBefore = isText( domBefore ) ?\n\t\t\t\t\tthis.findCorrespondingViewText( domBefore ) :\n\t\t\t\t\tthis.mapDomToView( domBefore );\n\n\t\t\t\t// TODO #663\n\t\t\t\tif ( viewBefore && viewBefore.parent ) {\n\t\t\t\t\treturn new ViewPosition( viewBefore.parent, viewBefore.index + 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/**\n\t * Returns corresponding view {@link module:engine/view/element~Element Element} or\n\t * {@link module:engine/view/documentfragment~DocumentFragment} for provided DOM element or\n\t * document fragment. If there is no view item {@link module:engine/view/domconverter~DomConverter#bindElements bound}\n\t * to the given DOM - `undefined` is returned.\n\t *\n\t * For all DOM elements rendered by a {@link module:engine/view/uielement~UIElement} or\n\t * a {@link module:engine/view/rawelement~RawElement}, the parent `UIElement` or `RawElement` will be returned.\n\t *\n\t * @param {DocumentFragment|Element} domElementOrDocumentFragment DOM element or document fragment.\n\t * @returns {module:engine/view/element~Element|module:engine/view/documentfragment~DocumentFragment|undefined}\n\t * Corresponding view element, document fragment or `undefined` if no element was bound.\n\t */\n\tmapDomToView( domElementOrDocumentFragment ) {\n\t\tconst hostElement = this.getHostViewElement( domElementOrDocumentFragment );\n\n\t\treturn hostElement || this._domToViewMapping.get( domElementOrDocumentFragment );\n\t}\n\n\t/**\n\t * Finds corresponding text node. Text nodes are not {@link module:engine/view/domconverter~DomConverter#bindElements bound},\n\t * corresponding text node is returned based on the sibling or parent.\n\t *\n\t * If the directly previous sibling is a {@link module:engine/view/domconverter~DomConverter#bindElements bound} element, it is used\n\t * to find the corresponding text node.\n\t *\n\t * If this is a first child in the parent and the parent is a {@link module:engine/view/domconverter~DomConverter#bindElements bound}\n\t * element, it is used to find the corresponding text node.\n\t *\n\t * For all text nodes rendered by a {@link module:engine/view/uielement~UIElement} or\n\t * a {@link module:engine/view/rawelement~RawElement}, the parent `UIElement` or `RawElement` will be returned.\n\t *\n\t * Otherwise `null` is returned.\n\t *\n\t * Note that for the block or inline {@link module:engine/view/filler filler} this method returns `null`.\n\t *\n\t * @param {Text} domText DOM text node.\n\t * @returns {module:engine/view/text~Text|null} Corresponding view text node or `null`, if it was not possible to find a\n\t * corresponding node.\n\t */\n\tfindCorrespondingViewText( domText ) {\n\t\tif ( isInlineFiller( domText ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// If DOM text was rendered by a UIElement or a RawElement - return this parent element.\n\t\tconst hostElement = this.getHostViewElement( domText );\n\n\t\tif ( hostElement ) {\n\t\t\treturn hostElement;\n\t\t}\n\n\t\tconst previousSibling = domText.previousSibling;\n\n\t\t// Try to use previous sibling to find the corresponding text node.\n\t\tif ( previousSibling ) {\n\t\t\tif ( !( this.isElement( previousSibling ) ) ) {\n\t\t\t\t// The previous is text or comment.\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst viewElement = this.mapDomToView( previousSibling );\n\n\t\t\tif ( viewElement ) {\n\t\t\t\tconst nextSibling = viewElement.nextSibling;\n\n\t\t\t\t// It might be filler which has no corresponding view node.\n\t\t\t\tif ( nextSibling instanceof ViewText ) {\n\t\t\t\t\treturn viewElement.nextSibling;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Try to use parent to find the corresponding text node.\n\t\telse {\n\t\t\tconst viewElement = this.mapDomToView( domText.parentNode );\n\n\t\t\tif ( viewElement ) {\n\t\t\t\tconst firstChild = viewElement.getChild( 0 );\n\n\t\t\t\t// It might be filler which has no corresponding view node.\n\t\t\t\tif ( firstChild instanceof ViewText ) {\n\t\t\t\t\treturn firstChild;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns corresponding DOM item for provided {@link module:engine/view/element~Element Element} or\n\t * {@link module:engine/view/documentfragment~DocumentFragment DocumentFragment}.\n\t * To find a corresponding text for {@link module:engine/view/text~Text view Text instance}\n\t * use {@link #findCorrespondingDomText}.\n\t *\n\t * @param {module:engine/view/element~Element|module:engine/view/documentfragment~DocumentFragment} viewNode\n\t * View element or document fragment.\n\t * @returns {Node|DocumentFragment|undefined} Corresponding DOM node or document fragment.\n\t */\n\tmapViewToDom( documentFragmentOrElement ) {\n\t\treturn this._viewToDomMapping.get( documentFragmentOrElement );\n\t}\n\n\t/**\n\t * Finds corresponding text node. Text nodes are not {@link module:engine/view/domconverter~DomConverter#bindElements bound},\n\t * corresponding text node is returned based on the sibling or parent.\n\t *\n\t * If the directly previous sibling is a {@link module:engine/view/domconverter~DomConverter#bindElements bound} element, it is used\n\t * to find the corresponding text node.\n\t *\n\t * If this is a first child in the parent and the parent is a {@link module:engine/view/domconverter~DomConverter#bindElements bound}\n\t * element, it is used to find the corresponding text node.\n\t *\n\t * Otherwise `null` is returned.\n\t *\n\t * @param {module:engine/view/text~Text} viewText View text node.\n\t * @returns {Text|null} Corresponding DOM text node or `null`, if it was not possible to find a corresponding node.\n\t */\n\tfindCorrespondingDomText( viewText ) {\n\t\tconst previousSibling = viewText.previousSibling;\n\n\t\t// Try to use previous sibling to find the corresponding text node.\n\t\tif ( previousSibling && this.mapViewToDom( previousSibling ) ) {\n\t\t\treturn this.mapViewToDom( previousSibling ).nextSibling;\n\t\t}\n\n\t\t// If this is a first node, try to use parent to find the corresponding text node.\n\t\tif ( !previousSibling && viewText.parent && this.mapViewToDom( viewText.parent ) ) {\n\t\t\treturn this.mapViewToDom( viewText.parent ).childNodes[ 0 ];\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Focuses DOM editable that is corresponding to provided {@link module:engine/view/editableelement~EditableElement}.\n\t *\n\t * @param {module:engine/view/editableelement~EditableElement} viewEditable\n\t */\n\tfocus( viewEditable ) {\n\t\tconst domEditable = this.mapViewToDom( viewEditable );\n\n\t\tif ( domEditable && domEditable.ownerDocument.activeElement !== domEditable ) {\n\t\t\t// Save the scrollX and scrollY positions before the focus.\n\t\t\tconst { scrollX, scrollY } = global.window;\n\t\t\tconst scrollPositions = [];\n\n\t\t\t// Save all scrollLeft and scrollTop values starting from domEditable up to\n\t\t\t// document#documentElement.\n\t\t\tforEachDomNodeAncestor( domEditable, node => {\n\t\t\t\tconst { scrollLeft, scrollTop } = node;\n\n\t\t\t\tscrollPositions.push( [ scrollLeft, scrollTop ] );\n\t\t\t} );\n\n\t\t\tdomEditable.focus();\n\n\t\t\t// Restore scrollLeft and scrollTop values starting from domEditable up to\n\t\t\t// document#documentElement.\n\t\t\t// https://github.com/ckeditor/ckeditor5-engine/issues/951\n\t\t\t// https://github.com/ckeditor/ckeditor5-engine/issues/957\n\t\t\tforEachDomNodeAncestor( domEditable, node => {\n\t\t\t\tconst [ scrollLeft, scrollTop ] = scrollPositions.shift();\n\n\t\t\t\tnode.scrollLeft = scrollLeft;\n\t\t\t\tnode.scrollTop = scrollTop;\n\t\t\t} );\n\n\t\t\t// Restore the scrollX and scrollY positions after the focus.\n\t\t\t// https://github.com/ckeditor/ckeditor5-engine/issues/951\n\t\t\tglobal.window.scrollTo( scrollX, scrollY );\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` when `node.nodeType` equals `Node.ELEMENT_NODE`.\n\t *\n\t * @param {Node} node Node to check.\n\t * @returns {Boolean}\n\t */\n\tisElement( node ) {\n\t\treturn node && node.nodeType == Node.ELEMENT_NODE;\n\t}\n\n\t/**\n\t * Returns `true` when `node.nodeType` equals `Node.DOCUMENT_FRAGMENT_NODE`.\n\t *\n\t * @param {Node} node Node to check.\n\t * @returns {Boolean}\n\t */\n\tisDocumentFragment( node ) {\n\t\treturn node && node.nodeType == Node.DOCUMENT_FRAGMENT_NODE;\n\t}\n\n\t/**\n\t * Checks if the node is an instance of the block filler for this DOM converter.\n\t *\n\t *\t\tconst converter = new DomConverter( viewDocument, { blockFillerMode: 'br' } );\n\t *\n\t *\t\tconverter.isBlockFiller( BR_FILLER( document ) ); // true\n\t *\t\tconverter.isBlockFiller( NBSP_FILLER( document ) ); // false\n\t *\n\t * **Note:**: For the `'nbsp'` mode the method also checks context of a node so it cannot be a detached node.\n\t *\n\t * **Note:** A special case in the `'nbsp'` mode exists where the `<br>` in `<p><br></p>` is treated as a block filler.\n\t *\n\t * @param {Node} domNode DOM node to check.\n\t * @returns {Boolean} True if a node is considered a block filler for given mode.\n\t */\n\tisBlockFiller( domNode ) {\n\t\tif ( this.blockFillerMode == 'br' ) {\n\t\t\treturn domNode.isEqualNode( BR_FILLER_REF );\n\t\t}\n\n\t\t// Special case for <p><br></p> in which <br> should be treated as filler even when we are not in the 'br' mode. See ckeditor5#5564.\n\t\tif ( domNode.tagName === 'BR' && hasBlockParent( domNode, this.blockElements ) && domNode.parentNode.childNodes.length === 1 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If not in 'br' mode, try recognizing both marked and regular nbsp block fillers.\n\t\treturn domNode.isEqualNode( MARKED_NBSP_FILLER_REF ) || isNbspBlockFiller( domNode, this.blockElements );\n\t}\n\n\t/**\n\t * Returns `true` if given selection is a backward selection, that is, if it's `focus` is before `anchor`.\n\t *\n\t * @param {Selection} DOM Selection instance to check.\n\t * @returns {Boolean}\n\t */\n\tisDomSelectionBackward( selection ) {\n\t\tif ( selection.isCollapsed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Since it takes multiple lines of code to check whether a \"DOM Position\" is before/after another \"DOM Position\",\n\t\t// we will use the fact that range will collapse if it's end is before it's start.\n\t\tconst range = document.createRange();\n\n\t\trange.setStart( selection.anchorNode, selection.anchorOffset );\n\t\trange.setEnd( selection.focusNode, selection.focusOffset );\n\n\t\tconst backward = range.collapsed;\n\n\t\trange.detach();\n\n\t\treturn backward;\n\t}\n\n\t/**\n\t * Returns a parent {@link module:engine/view/uielement~UIElement} or {@link module:engine/view/rawelement~RawElement}\n\t * that hosts the provided DOM node. Returns `null` if there is no such parent.\n\t *\n\t * @param {Node} domNode\n\t * @returns {module:engine/view/uielement~UIElement|module:engine/view/rawelement~RawElement|null}\n\t */\n\tgetHostViewElement( domNode ) {\n\t\tconst ancestors = getAncestors( domNode );\n\n\t\t// Remove domNode from the list.\n\t\tancestors.pop();\n\n\t\twhile ( ancestors.length ) {\n\t\t\tconst domNode = ancestors.pop();\n\t\t\tconst viewNode = this._domToViewMapping.get( domNode );\n\n\t\t\tif ( viewNode && ( viewNode.is( 'uiElement' ) || viewNode.is( 'rawElement' ) ) ) {\n\t\t\t\treturn viewNode;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Checks if the given selection's boundaries are at correct places.\n\t *\n\t * The following places are considered as incorrect for selection boundaries:\n\t *\n\t * * before or in the middle of an inline filler sequence,\n\t * * inside a DOM element which represents {@link module:engine/view/uielement~UIElement a view UI element},\n\t * * inside a DOM element which represents {@link module:engine/view/rawelement~RawElement a view raw element}.\n\t *\n\t * @param {Selection} domSelection The DOM selection object to be checked.\n\t * @returns {Boolean} `true` if the given selection is at a correct place, `false` otherwise.\n\t */\n\tisDomSelectionCorrect( domSelection ) {\n\t\treturn this._isDomSelectionPositionCorrect( domSelection.anchorNode, domSelection.anchorOffset ) &&\n\t\t\tthis._isDomSelectionPositionCorrect( domSelection.focusNode, domSelection.focusOffset );\n\t}\n\n\t/**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from DOM nodes to view elements.\n\t *\n\t * This is affecting how {@link module:engine/view/domconverter~DomConverter#domToView} and\n\t * {@link module:engine/view/domconverter~DomConverter#domChildrenToView} process DOM nodes.\n\t *\n\t * The raw data can be later accessed by a\n\t * {@link module:engine/view/element~Element#getCustomProperty custom property of a view element} called `\"$rawContent\"`.\n\t *\n\t * @param {module:engine/view/matcher~MatcherPattern} pattern Pattern matching a view element whose content should\n\t * be treated as raw data.\n\t */\n\tregisterRawContentMatcher( pattern ) {\n\t\tthis._rawContentElementMatcher.add( pattern );\n\t}\n\n\t/**\n\t * Returns the block {@link module:engine/view/filler filler} node based on the current {@link #blockFillerMode} setting.\n\t *\n\t * @private\n\t * @params {Document} domDocument\n\t * @returns {Node} filler\n\t */\n\t_getBlockFiller( domDocument ) {\n\t\tswitch ( this.blockFillerMode ) {\n\t\t\tcase 'nbsp':\n\t\t\t\treturn NBSP_FILLER( domDocument ); // eslint-disable-line new-cap\n\t\t\tcase 'markedNbsp':\n\t\t\t\treturn MARKED_NBSP_FILLER( domDocument ); // eslint-disable-line new-cap\n\t\t\tcase 'br':\n\t\t\t\treturn BR_FILLER( domDocument ); // eslint-disable-line new-cap\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given DOM position is a correct place for selection boundary. See {@link #isDomSelectionCorrect}.\n\t *\n\t * @private\n\t * @param {Element} domParent Position parent.\n\t * @param {Number} offset Position offset.\n\t * @returns {Boolean} `true` if given position is at a correct place for selection boundary, `false` otherwise.\n\t */\n\t_isDomSelectionPositionCorrect( domParent, offset ) {\n\t\t// If selection is before or in the middle of inline filler string, it is incorrect.\n\t\tif ( isText( domParent ) && startsWithFiller( domParent ) && offset < INLINE_FILLER_LENGTH ) {\n\t\t\t// Selection in a text node, at wrong position (before or in the middle of filler).\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this.isElement( domParent ) && startsWithFiller( domParent.childNodes[ offset ] ) ) {\n\t\t\t// Selection in an element node, before filler text node.\n\t\t\treturn false;\n\t\t}\n\n\t\tconst viewParent = this.mapDomToView( domParent );\n\n\t\t// The position is incorrect when anchored inside a UIElement or a RawElement.\n\t\t// Note: In case of UIElement and RawElement, mapDomToView() returns a parent element for any DOM child\n\t\t// so there's no need to perform any additional checks.\n\t\tif ( viewParent && ( viewParent.is( 'uiElement' ) || viewParent.is( 'rawElement' ) ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Takes text data from a given {@link module:engine/view/text~Text#data} and processes it so\n\t * it is correctly displayed in the DOM.\n\t *\n\t * Following changes are done:\n\t *\n\t * * a space at the beginning is changed to `&nbsp;` if this is the first text node in its container\n\t * element or if a previous text node ends with a space character,\n\t * * space at the end of the text node is changed to `&nbsp;` if there are two spaces at the end of a node or if next node\n\t * starts with a space or if it is the last text node in its container,\n\t * * remaining spaces are replaced to a chain of spaces and `&nbsp;` (e.g. `'x x'` becomes `'x &nbsp; x'`).\n\t *\n\t * Content of {@link #preElements} is not processed.\n\t *\n\t * @private\n\t * @param {module:engine/view/text~Text} node View text node to process.\n\t * @returns {String} Processed text data.\n\t */\n\t_processDataFromViewText( node ) {\n\t\tlet data = node.data;\n\n\t\t// If any of node ancestors has a name which is in `preElements` array, then currently processed\n\t\t// view text node is (will be) in preformatted element. We should not change whitespaces then.\n\t\tif ( node.getAncestors().some( parent => this.preElements.includes( parent.name ) ) ) {\n\t\t\treturn data;\n\t\t}\n\n\t\t// 1. Replace the first space with a nbsp if the previous node ends with a space or there is no previous node\n\t\t// (container element boundary).\n\t\tif ( data.charAt( 0 ) == ' ' ) {\n\t\t\tconst prevNode = this._getTouchingInlineViewNode( node, false );\n\t\t\tconst prevEndsWithSpace = prevNode && prevNode.is( '$textProxy' ) && this._nodeEndsWithSpace( prevNode );\n\n\t\t\tif ( prevEndsWithSpace || !prevNode ) {\n\t\t\t\tdata = '\\u00A0' + data.substr( 1 );\n\t\t\t}\n\t\t}\n\n\t\t// 2. Replace the last space with nbsp if there are two spaces at the end or if the next node starts with space or there is no\n\t\t// next node (container element boundary).\n\t\t//\n\t\t// Keep in mind that Firefox prefers $nbsp; before tag, not inside it:\n\t\t//\n\t\t// Foo <span>&nbsp;bar</span> <-- bad.\n\t\t// Foo&nbsp;<span> bar</span> <-- good.\n\t\t//\n\t\t// More here: https://github.com/ckeditor/ckeditor5-engine/issues/1747.\n\t\tif ( data.charAt( data.length - 1 ) == ' ' ) {\n\t\t\tconst nextNode = this._getTouchingInlineViewNode( node, true );\n\t\t\tconst nextStartsWithSpace = nextNode && nextNode.is( '$textProxy' ) && nextNode.data.charAt( 0 ) == ' ';\n\n\t\t\tif ( data.charAt( data.length - 2 ) == ' ' || !nextNode || nextStartsWithSpace ) {\n\t\t\t\tdata = data.substr( 0, data.length - 1 ) + '\\u00A0';\n\t\t\t}\n\t\t}\n\n\t\t// 3. Create space+nbsp pairs.\n\t\treturn data.replace( / {2}/g, ' \\u00A0' );\n\t}\n\n\t/**\n\t * Checks whether given node ends with a space character after changing appropriate space characters to `&nbsp;`s.\n\t *\n\t * @private\n\t * @param {module:engine/view/text~Text} node Node to check.\n\t * @returns {Boolean} `true` if given `node` ends with space, `false` otherwise.\n\t */\n\t_nodeEndsWithSpace( node ) {\n\t\tif ( node.getAncestors().some( parent => this.preElements.includes( parent.name ) ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst data = this._processDataFromViewText( node );\n\n\t\treturn data.charAt( data.length - 1 ) == ' ';\n\t}\n\n\t/**\n\t * Takes text data from native `Text` node and processes it to a correct {@link module:engine/view/text~Text view text node} data.\n\t *\n\t * Following changes are done:\n\t *\n\t * * multiple whitespaces are replaced to a single space,\n\t * * space at the beginning of a text node is removed if it is the first text node in its container\n\t * element or if the previous text node ends with a space character,\n\t * * space at the end of the text node is removed if there are two spaces at the end of a node or if next node\n\t * starts with a space or if it is the last text node in its container\n\t * * nbsps are converted to spaces.\n\t *\n\t * @param {Node} node DOM text node to process.\n\t * @returns {String} Processed data.\n\t * @private\n\t */\n\t_processDataFromDomText( node ) {\n\t\tlet data = node.data;\n\n\t\tif ( _hasDomParentOfType( node, this.preElements ) ) {\n\t\t\treturn getDataWithoutFiller( node );\n\t\t}\n\n\t\t// Change all consecutive whitespace characters (from the [ \\n\\t\\r] set –\n\t\t// see https://github.com/ckeditor/ckeditor5-engine/issues/822#issuecomment-311670249) to a single space character.\n\t\t// That's how multiple whitespaces are treated when rendered, so we normalize those whitespaces.\n\t\t// We're replacing 1+ (and not 2+) to also normalize singular \\n\\t\\r characters (#822).\n\t\tdata = data.replace( /[ \\n\\t\\r]{1,}/g, ' ' );\n\n\t\tconst prevNode = this._getTouchingInlineDomNode( node, false );\n\t\tconst nextNode = this._getTouchingInlineDomNode( node, true );\n\n\t\tconst shouldLeftTrim = this._checkShouldLeftTrimDomText( node, prevNode );\n\t\tconst shouldRightTrim = this._checkShouldRightTrimDomText( node, nextNode );\n\n\t\t// If the previous dom text node does not exist or it ends by whitespace character, remove space character from the beginning\n\t\t// of this text node. Such space character is treated as a whitespace.\n\t\tif ( shouldLeftTrim ) {\n\t\t\tdata = data.replace( /^ /, '' );\n\t\t}\n\n\t\t// If the next text node does not exist remove space character from the end of this text node.\n\t\tif ( shouldRightTrim ) {\n\t\t\tdata = data.replace( / $/, '' );\n\t\t}\n\n\t\t// At the beginning and end of a block element, Firefox inserts normal space + <br> instead of non-breaking space.\n\t\t// This means that the text node starts/end with normal space instead of non-breaking space.\n\t\t// This causes a problem because the normal space would be removed in `.replace` calls above. To prevent that,\n\t\t// the inline filler is removed only after the data is initially processed (by the `.replace` above). See ckeditor5#692.\n\t\tdata = getDataWithoutFiller( new Text( data ) );\n\n\t\t// At this point we should have removed all whitespaces from DOM text data.\n\t\t//\n\t\t// Now, We will reverse the process that happens in `_processDataFromViewText`.\n\t\t//\n\t\t// We have to change &nbsp; chars, that were in DOM text data because of rendering reasons, to spaces.\n\t\t// First, change all ` \\u00A0` pairs (space + &nbsp;) to two spaces. DOM converter changes two spaces from model/view to\n\t\t// ` \\u00A0` to ensure proper rendering. Since here we convert back, we recognize those pairs and change them back to ` `.\n\t\tdata = data.replace( / \\u00A0/g, ' ' );\n\n\t\tconst isNextNodeInlineObjectElement = nextNode && this.isElement( nextNode ) && nextNode.tagName != 'BR';\n\t\tconst isNextNodeStartingWithSpace = nextNode && isText( nextNode ) && nextNode.data.charAt( 0 ) == ' ';\n\n\t\t// Then, let's change the last nbsp to a space.\n\t\tif ( /( |\\u00A0)\\u00A0$/.test( data ) || !nextNode || isNextNodeInlineObjectElement || isNextNodeStartingWithSpace ) {\n\t\t\tdata = data.replace( /\\u00A0$/, ' ' );\n\t\t}\n\n\t\t// Then, change &nbsp; character that is at the beginning of the text node to space character.\n\t\t// We do that replacement only if this is the first node or the previous node ends on whitespace character.\n\t\tif ( shouldLeftTrim || prevNode && this.isElement( prevNode ) && prevNode.tagName != 'BR' ) {\n\t\t\tdata = data.replace( /^\\u00A0/, ' ' );\n\t\t}\n\n\t\t// At this point, all whitespaces should be removed and all &nbsp; created for rendering reasons should be\n\t\t// changed to normal space. All left &nbsp; are &nbsp; inserted intentionally.\n\t\treturn data;\n\t}\n\n\t/**\n\t * Helper function which checks if a DOM text node, preceded by the given `prevNode` should\n\t * be trimmed from the left side.\n\t *\n\t * @private\n\t * @param {Node} node\n\t * @param {Node} prevNode Either DOM text or `<br>` or one of `#inlineObjectElements`.\n\t */\n\t_checkShouldLeftTrimDomText( node, prevNode ) {\n\t\tif ( !prevNode ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( this.isElement( prevNode ) ) {\n\t\t\treturn prevNode.tagName === 'BR';\n\t\t}\n\n\t\t// Shouldn't left trim if previous node is a node that was encountered as a raw content node.\n\t\tif ( this._encounteredRawContentDomNodes.has( node.previousSibling ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn /[^\\S\\u00A0]/.test( prevNode.data.charAt( prevNode.data.length - 1 ) );\n\t}\n\n\t/**\n\t * Helper function which checks if a DOM text node, succeeded by the given `nextNode` should\n\t * be trimmed from the right side.\n\t *\n\t * @private\n\t * @param {Node} node\n\t * @param {Node} nextNode Either DOM text or `<br>` or one of `#inlineObjectElements`.\n\t */\n\t_checkShouldRightTrimDomText( node, nextNode ) {\n\t\tif ( nextNode ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn !startsWithFiller( node );\n\t}\n\n\t/**\n\t * Helper function. For given {@link module:engine/view/text~Text view text node}, it finds previous or next sibling\n\t * that is contained in the same container element. If there is no such sibling, `null` is returned.\n\t *\n\t * @private\n\t * @param {module:engine/view/text~Text} node Reference node.\n\t * @param {Boolean} getNext\n\t * @returns {module:engine/view/text~Text|module:engine/view/element~Element|null} Touching text node, an inline object\n\t * or `null` if there is no next or previous touching text node.\n\t */\n\t_getTouchingInlineViewNode( node, getNext ) {\n\t\tconst treeWalker = new ViewTreeWalker( {\n\t\t\tstartPosition: getNext ? ViewPosition._createAfter( node ) : ViewPosition._createBefore( node ),\n\t\t\tdirection: getNext ? 'forward' : 'backward'\n\t\t} );\n\n\t\tfor ( const value of treeWalker ) {\n\t\t\t// Found an inline object (for example an image).\n\t\t\tif ( value.item.is( 'element' ) && this.inlineObjectElements.includes( value.item.name ) ) {\n\t\t\t\treturn value.item;\n\t\t\t}\n\t\t\t// ViewContainerElement is found on a way to next ViewText node, so given `node` was first/last\n\t\t\t// text node in its container element.\n\t\t\telse if ( value.item.is( 'containerElement' ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t// <br> found – it works like a block boundary, so do not scan further.\n\t\t\telse if ( value.item.is( 'element', 'br' ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t// Found a text node in the same container element.\n\t\t\telse if ( value.item.is( '$textProxy' ) ) {\n\t\t\t\treturn value.item;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Helper function. For the given text node, it finds the closest touching node which is either\n\t * a text, `<br>` or an {@link #inlineObjectElements inline object}.\n\t *\n\t * If no such node is found, `null` is returned.\n\t *\n\t * For instance, in the following DOM structure:\n\t *\n\t *\t\t<p>foo<b>bar</b><br>bom</p>\n\t *\n\t * * `foo` doesn't have its previous touching inline node (`null` is returned),\n\t * * `foo`'s next touching inline node is `bar`\n\t * * `bar`'s next touching inline node is `<br>`\n\t *\n\t * This method returns text nodes and `<br>` elements because these types of nodes affect how\n\t * spaces in the given text node need to be converted.\n\t *\n\t * @private\n\t * @param {Text} node\n\t * @param {Boolean} getNext\n\t * @returns {Text|Element|null}\n\t */\n\t_getTouchingInlineDomNode( node, getNext ) {\n\t\tif ( !node.parentNode ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst stepInto = getNext ? 'firstChild' : 'lastChild';\n\t\tconst stepOver = getNext ? 'nextSibling' : 'previousSibling';\n\n\t\tlet skipChildren = true;\n\n\t\tdo {\n\t\t\tif ( !skipChildren && node[ stepInto ] ) {\n\t\t\t\tnode = node[ stepInto ];\n\t\t\t} else if ( node[ stepOver ] ) {\n\t\t\t\tnode = node[ stepOver ];\n\t\t\t\tskipChildren = false;\n\t\t\t} else {\n\t\t\t\tnode = node.parentNode;\n\t\t\t\tskipChildren = true;\n\t\t\t}\n\n\t\t\tif ( !node || this._isBlockElement( node ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} while (\n\t\t\t!( isText( node ) || node.tagName == 'BR' || this._isInlineObjectElement( node ) )\n\t\t);\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Returns `true` if a DOM node belongs to {@link #blockElements}. `false` otherwise.\n\t *\n\t * @private\n\t * @param {Node} node\n\t * @returns {Boolean}\n\t */\n\t_isBlockElement( node ) {\n\t\treturn this.isElement( node ) && this.blockElements.includes( node.tagName.toLowerCase() );\n\t}\n\n\t/**\n\t * Returns `true` if a DOM node belongs to {@link #inlineObjectElements}. `false` otherwise.\n\t *\n\t * @private\n\t * @param {Node} node\n\t * @returns {Boolean}\n\t */\n\t_isInlineObjectElement( node ) {\n\t\treturn this.isElement( node ) && this.inlineObjectElements.includes( node.tagName.toLowerCase() );\n\t}\n\n\t/**\n\t * Creates view element basing on the node type.\n\t *\n\t * @private\n\t * @param {Node} node DOM node to check.\n\t * @param {Object} options Conversion options. See {@link module:engine/view/domconverter~DomConverter#domToView} options parameter.\n\t * @returns {Element}\n\t */\n\t_createViewElement( node, options ) {\n\t\tif ( isComment( node ) ) {\n\t\t\treturn new ViewUIElement( this.document, '$comment' );\n\t\t}\n\n\t\tconst viewName = options.keepOriginalCase ? node.tagName : node.tagName.toLowerCase();\n\n\t\treturn new ViewElement( this.document, viewName );\n\t}\n\n\t/**\n\t * Checks if view element's content should be treated as a raw data.\n\t *\n\t * @private\n\t * @param {Element} viewElement View element to check.\n\t * @param {Object} options Conversion options. See {@link module:engine/view/domconverter~DomConverter#domToView} options parameter.\n\t * @returns {Boolean}\n\t */\n\t_isViewElementWithRawContent( viewElement, options ) {\n\t\treturn options.withChildren !== false && this._rawContentElementMatcher.match( viewElement );\n\t}\n\n\t/**\n\t * Checks whether a given element name should be renamed in a current rendering mode.\n\t *\n\t * @private\n\t * @param {String} elementName The name of view element.\n\t * @returns {Boolean}\n\t */\n\t_shouldRenameElement( elementName ) {\n\t\tconst name = elementName.toLowerCase();\n\n\t\treturn this.renderingMode === 'editing' && UNSAFE_ELEMENTS.includes( name );\n\t}\n\n\t/**\n\t * Return a <span> element with a special attribute holding the name of the original element.\n\t * Optionally, copy all the attributes of the original element if that element is provided.\n\t *\n\t * @private\n\t * @param {String} elementName The name of view element.\n\t * @param {Element} [originalDomElement] The original DOM element to copy attributes and content from.\n\t * @returns {Element}\n\t */\n\t_createReplacementDomElement( elementName, originalDomElement = null ) {\n\t\tconst newDomElement = document.createElement( 'span' );\n\n\t\t// Mark the span replacing a script as hidden.\n\t\tnewDomElement.setAttribute( UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE, elementName );\n\n\t\tif ( originalDomElement ) {\n\t\t\twhile ( originalDomElement.firstChild ) {\n\t\t\t\tnewDomElement.appendChild( originalDomElement.firstChild );\n\t\t\t}\n\n\t\t\tfor ( const attributeName of originalDomElement.getAttributeNames() ) {\n\t\t\t\tnewDomElement.setAttribute( attributeName, originalDomElement.getAttribute( attributeName ) );\n\t\t\t}\n\t\t}\n\n\t\treturn newDomElement;\n\t}\n}\n\n// Helper function.\n// Used to check if given native `Element` or `Text` node has parent with tag name from `types` array.\n//\n// @param {Node} node\n// @param {Array.<String>} types\n// @returns {Boolean} `true` if such parent exists or `false` if it does not.\nfunction _hasDomParentOfType( node, types ) {\n\tconst parents = getAncestors( node );\n\n\treturn parents.some( parent => parent.tagName && types.includes( parent.tagName.toLowerCase() ) );\n}\n\n// A helper that executes given callback for each DOM node's ancestor, starting from the given node\n// and ending in document#documentElement.\n//\n// @param {Node} node\n// @param {Function} callback A callback to be executed for each ancestor.\nfunction forEachDomNodeAncestor( node, callback ) {\n\twhile ( node && node != global.document ) {\n\t\tcallback( node );\n\t\tnode = node.parentNode;\n\t}\n}\n\n// Checks if given node is a nbsp block filler.\n//\n// A &nbsp; is a block filler only if it is a single child of a block element.\n//\n// @param {Node} domNode DOM node.\n// @param {Array.<String>} blockElements\n// @returns {Boolean}\nfunction isNbspBlockFiller( domNode, blockElements ) {\n\tconst isNBSP = domNode.isEqualNode( NBSP_FILLER_REF );\n\n\treturn isNBSP && hasBlockParent( domNode, blockElements ) && domNode.parentNode.childNodes.length === 1;\n}\n\n// Checks if domNode has block parent.\n//\n// @param {Node} domNode DOM node.\n// @param {Array.<String>} blockElements\n// @returns {Boolean}\nfunction hasBlockParent( domNode, blockElements ) {\n\tconst parent = domNode.parentNode;\n\n\treturn parent && parent.tagName && blockElements.includes( parent.tagName.toLowerCase() );\n}\n\n// Log to console the information about element that was replaced.\n// Check UNSAFE_ELEMENTS for all recognized unsafe elements.\n//\n// @param {String} elementName The name of the view element\nfunction _logUnsafeElement( elementName ) {\n\tif ( elementName === 'script' ) {\n\t\tlogWarning( 'domconverter-unsafe-script-element-detected' );\n\t}\n\n\tif ( elementName === 'style' ) {\n\t\tlogWarning( 'domconverter-unsafe-style-element-detected' );\n\t}\n}\n\n/**\n * Enum representing the type of the block filler.\n *\n * Possible values:\n *\n * * `br` &ndash; For the `<br data-cke-filler=\"true\">` block filler used in the editing view.\n * * `nbsp` &ndash; For the `&nbsp;` block fillers used in the data.\n * * `markedNbsp` &ndash; For the `&nbsp;` block fillers wrapped in `<span>` elements: `<span data-cke-filler=\"true\">&nbsp;</span>`\n * used in the data.\n *\n * @typedef {String} module:engine/view/filler~BlockFillerMode\n */\n\n/**\n * While rendering the editor content, the {@link module:engine/view/domconverter~DomConverter} detected a `<script>` element that may\n * disrupt the editing experience. To avoid this, the `<script>` element was replaced with `<span data-ck-unsafe-element=\"script\"></span>`.\n *\n * @error domconverter-unsafe-script-element-detected\n */\n\n/**\n * While rendering the editor content, the {@link module:engine/view/domconverter~DomConverter} detected a `<style>` element that may affect\n * the editing experience. To avoid this, the `<style>` element was replaced with `<span data-ck-unsafe-element=\"style\"></span>`.\n *\n * @error domconverter-unsafe-style-element-detected\n */\n\n/**\n * The {@link module:engine/view/domconverter~DomConverter} detected an interactive attribute in the\n * {@glink framework/guides/architecture/editing-engine#editing-pipeline editing pipeline}. For the best\n * editing experience, the attribute was renamed to `data-ck-unsafe-attribute-[original attribute name]`.\n *\n * If you are the author of the plugin that generated this attribute and you want it to be preserved\n * in the editing pipeline, you can configure this when creating the element\n * using {@link module:engine/view/downcastwriter~DowncastWriter} during the\n * {@glink framework/guides/architecture/editing-engine#conversion model–view conversion}. Methods such as\n * {@link module:engine/view/downcastwriter~DowncastWriter#createContainerElement},\n * {@link module:engine/view/downcastwriter~DowncastWriter#createAttributeElement}, or\n * {@link module:engine/view/downcastwriter~DowncastWriter#createEmptyElement}\n * accept an option that will disable filtering of specific attributes:\n *\n *\t\tconst paragraph = writer.createContainerElement( 'p',\n *\t\t\t{\n *\t\t\t\tclass: 'clickable-paragraph',\n *\t\t\t\tonclick: 'alert( \"Paragraph clicked!\" )'\n *\t\t\t},\n *\t\t\t{\n *\t\t\t\t// Make sure the \"onclick\" attribute will pass through.\n *\t\t\t\trenderUnsafeAttributes: [ 'onclick' ]\n *\t\t\t}\n *\t\t);\n *\n * @error domconverter-unsafe-attribute-detected\n * @param {HTMLElement} domElement The DOM element the attribute was set on.\n * @param {String} key The original name of the attribute\n * @param {String} value The value of the original attribute\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/iswindow\n */\n\n/**\n * Checks if the object is a native DOM Window.\n *\n * @param {*} obj\n * @returns {Boolean}\n */\nexport default function isWindow( obj ) {\n\tconst stringifiedObject = Object.prototype.toString.apply( obj );\n\n\t// Returns `true` for the `window` object in browser environments.\n\tif ( stringifiedObject == '[object Window]' ) {\n\t\treturn true;\n\t}\n\n\t// Returns `true` for the `window` object in the Electron environment.\n\tif ( stringifiedObject == '[object global]' ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/emittermixin\n */\n\nimport { default as EmitterMixin, _getEmitterListenedTo, _setEmitterId } from '../emittermixin';\nimport uid from '../uid';\nimport isNode from './isnode';\nimport isWindow from './iswindow';\nimport { extend } from 'lodash-es';\n\n/**\n * Mixin that injects the DOM events API into its host. It provides the API\n * compatible with {@link module:utils/emittermixin~EmitterMixin}.\n *\n * DOM emitter mixin is by default available in the {@link module:ui/view~View} class,\n * but it can also be mixed into any other class:\n *\n *\t\timport mix from '../utils/mix.js';\n *\t\timport DomEmitterMixin from '../utils/dom/emittermixin.js';\n *\n *\t\tclass SomeView {}\n *\t\tmix( SomeView, DomEmitterMixin );\n *\n *\t\tconst view = new SomeView();\n *\t\tview.listenTo( domElement, ( evt, domEvt ) => {\n *\t\t\tconsole.log( evt, domEvt );\n *\t\t} );\n *\n * @mixin EmitterMixin\n * @mixes module:utils/emittermixin~EmitterMixin\n * @implements module:utils/dom/emittermixin~Emitter\n */\nconst DomEmitterMixin = extend( {}, EmitterMixin, {\n\t/**\n\t * Registers a callback function to be executed when an event is fired in a specific Emitter or DOM Node.\n\t * It is backwards compatible with {@link module:utils/emittermixin~EmitterMixin#listenTo}.\n\t *\n\t * @param {module:utils/emittermixin~Emitter|Node} emitter The object that fires the event.\n\t * @param {String} event The name of the event.\n\t * @param {Function} callback The function to be called on event.\n\t * @param {Object} [options={}] Additional options.\n\t * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of this event callback. The higher\n\t * the priority value the sooner the callback will be fired. Events having the same priority are called in the\n\t * order they were added.\n\t * @param {Boolean} [options.useCapture=false] Indicates that events of this type will be dispatched to the registered\n\t * listener before being dispatched to any EventTarget beneath it in the DOM tree.\n\t * @param {Boolean} [options.usePassive=false] Indicates that the function specified by listener will never call preventDefault()\n\t * and prevents blocking browser's main thread by this event handler.\n\t */\n\tlistenTo( emitter, event, callback, options = {} ) {\n\t\t// Check if emitter is an instance of DOM Node. If so, use corresponding ProxyEmitter (or create one if not existing).\n\t\tif ( isNode( emitter ) || isWindow( emitter ) ) {\n\t\t\tconst proxyOptions = {\n\t\t\t\tcapture: !!options.useCapture,\n\t\t\t\tpassive: !!options.usePassive\n\t\t\t};\n\n\t\t\tconst proxyEmitter = this._getProxyEmitter( emitter, proxyOptions ) || new ProxyEmitter( emitter, proxyOptions );\n\n\t\t\tthis.listenTo( proxyEmitter, event, callback, options );\n\t\t} else {\n\t\t\t// Execute parent class method with Emitter (or ProxyEmitter) instance.\n\t\t\tEmitterMixin.listenTo.call( this, emitter, event, callback, options );\n\t\t}\n\t},\n\n\t/**\n\t * Stops listening for events. It can be used at different levels:\n\t * It is backwards compatible with {@link module:utils/emittermixin~EmitterMixin#listenTo}.\n\t *\n\t * * To stop listening to a specific callback.\n\t * * To stop listening to a specific event.\n\t * * To stop listening to all events fired by a specific object.\n\t * * To stop listening to all events fired by all object.\n\t *\n\t * @param {module:utils/emittermixin~Emitter|Node} [emitter] The object to stop listening to. If omitted, stops it for all objects.\n\t * @param {String} [event] (Requires the `emitter`) The name of the event to stop listening to. If omitted, stops it\n\t * for all events from `emitter`.\n\t * @param {Function} [callback] (Requires the `event`) The function to be removed from the call list for the given\n\t * `event`.\n\t */\n\tstopListening( emitter, event, callback ) {\n\t\t// Check if the emitter is an instance of DOM Node. If so, forward the call to the corresponding ProxyEmitters.\n\t\tif ( isNode( emitter ) || isWindow( emitter ) ) {\n\t\t\tconst proxyEmitters = this._getAllProxyEmitters( emitter );\n\n\t\t\tfor ( const proxy of proxyEmitters ) {\n\t\t\t\tthis.stopListening( proxy, event, callback );\n\t\t\t}\n\t\t} else {\n\t\t\t// Execute parent class method with Emitter (or ProxyEmitter) instance.\n\t\t\tEmitterMixin.stopListening.call( this, emitter, event, callback );\n\t\t}\n\t},\n\n\t/**\n\t * Retrieves ProxyEmitter instance for given DOM Node residing in this Host and given options.\n\t *\n\t * @private\n\t * @param {Node} node DOM Node of the ProxyEmitter.\n\t * @param {Object} [options] Additional options.\n\t * @param {Boolean} [options.useCapture=false] Indicates that events of this type will be dispatched to the registered\n\t * listener before being dispatched to any EventTarget beneath it in the DOM tree.\n\t * @param {Boolean} [options.usePassive=false] Indicates that the function specified by listener will never call preventDefault()\n\t * and prevents blocking browser's main thread by this event handler.\n\t * @returns {module:utils/dom/emittermixin~ProxyEmitter|null} ProxyEmitter instance bound to the DOM Node.\n\t */\n\t_getProxyEmitter( node, options ) {\n\t\treturn _getEmitterListenedTo( this, getProxyEmitterId( node, options ) );\n\t},\n\n\t/**\n\t * Retrieves all the ProxyEmitter instances for given DOM Node residing in this Host.\n\t *\n\t * @private\n\t * @param {Node} node DOM Node of the ProxyEmitter.\n\t * @returns {Array.<module:utils/dom/emittermixin~ProxyEmitter>}\n\t */\n\t_getAllProxyEmitters( node ) {\n\t\treturn [\n\t\t\t{ capture: false, passive: false },\n\t\t\t{ capture: false, passive: true },\n\t\t\t{ capture: true, passive: false },\n\t\t\t{ capture: true, passive: true }\n\t\t].map( options => this._getProxyEmitter( node, options ) ).filter( proxy => !!proxy );\n\t}\n} );\n\nexport default DomEmitterMixin;\n\n/**\n * Creates a ProxyEmitter instance. Such an instance is a bridge between a DOM Node firing events\n * and any Host listening to them. It is backwards compatible with {@link module:utils/emittermixin~EmitterMixin#on}.\n * There is a separate instance for each combination of modes (useCapture & usePassive). The mode is concatenated with\n * UID stored in HTMLElement to give each instance unique identifier.\n *\n * listenTo( click, ... )\n * +-----------------------------------------+\n * | stopListening( ... ) |\n * +----------------------------+ | addEventListener( click, ... )\n * | Host | | +---------------------------------------------+\n * +----------------------------+ | | removeEventListener( click, ... ) |\n * | _listeningTo: { | +----------v-------------+ |\n * | UID+mode: { | | ProxyEmitter | |\n * | emitter: ProxyEmitter, | +------------------------+ +------------v----------+\n * | callbacks: { | | events: { | | Node (HTMLElement) |\n * | click: [ callbacks ] | | click: [ callbacks ] | +-----------------------+\n * | } | | }, | | data-ck-expando: UID |\n * | } | | _domNode: Node, | +-----------------------+\n * | } | | _domListeners: {}, | |\n * | +------------------------+ | | _emitterId: UID+mode | |\n * | | DomEmitterMixin | | +--------------^---------+ |\n * | +------------------------+ | | | |\n * +--------------^-------------+ | +---------------------------------------------+\n * | | click (DOM Event)\n * +-----------------------------------------+\n * fire( click, DOM Event )\n *\n * @mixes module:utils/emittermixin~EmitterMixin\n * @implements module:utils/dom/emittermixin~Emitter\n * @private\n */\nclass ProxyEmitter {\n\t/**\n\t * @param {Node} node DOM Node that fires events.\n\t * @param {Object} [options] Additional options.\n\t * @param {Boolean} [options.useCapture=false] Indicates that events of this type will be dispatched to the registered\n\t * listener before being dispatched to any EventTarget beneath it in the DOM tree.\n\t * @param {Boolean} [options.usePassive=false] Indicates that the function specified by listener will never call preventDefault()\n\t * and prevents blocking browser's main thread by this event handler.\n\t */\n\tconstructor( node, options ) {\n\t\t// Set emitter ID to match DOM Node \"expando\" property.\n\t\t_setEmitterId( this, getProxyEmitterId( node, options ) );\n\n\t\t// Remember the DOM Node this ProxyEmitter is bound to.\n\t\tthis._domNode = node;\n\n\t\t// And given options.\n\t\tthis._options = options;\n\t}\n}\n\nextend( ProxyEmitter.prototype, EmitterMixin, {\n\t/**\n\t * Collection of native DOM listeners.\n\t *\n\t * @private\n\t * @member {Object} module:utils/dom/emittermixin~ProxyEmitter#_domListeners\n\t */\n\n\t/**\n\t * Registers a callback function to be executed when an event is fired.\n\t *\n\t * It attaches a native DOM listener to the DOM Node. When fired,\n\t * a corresponding Emitter event will also fire with DOM Event object as an argument.\n\t *\n\t * **Note**: This is automatically called by the\n\t * {@link module:utils/emittermixin~EmitterMixin#listenTo `EmitterMixin#listenTo()`}.\n\t *\n\t * @method module:utils/dom/emittermixin~ProxyEmitter#attach\n\t * @param {String} event The name of the event.\n\t */\n\tattach( event ) {\n\t\t// If the DOM Listener for given event already exist it is pointless\n\t\t// to attach another one.\n\t\tif ( this._domListeners && this._domListeners[ event ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst domListener = this._createDomListener( event );\n\n\t\t// Attach the native DOM listener to DOM Node.\n\t\tthis._domNode.addEventListener( event, domListener, this._options );\n\n\t\tif ( !this._domListeners ) {\n\t\t\tthis._domListeners = {};\n\t\t}\n\n\t\t// Store the native DOM listener in this ProxyEmitter. It will be helpful\n\t\t// when stopping listening to the event.\n\t\tthis._domListeners[ event ] = domListener;\n\t},\n\n\t/**\n\t * Stops executing the callback on the given event.\n\t *\n\t * **Note**: This is automatically called by the\n\t * {@link module:utils/emittermixin~EmitterMixin#stopListening `EmitterMixin#stopListening()`}.\n\t *\n\t * @method module:utils/dom/emittermixin~ProxyEmitter#detach\n\t * @param {String} event The name of the event.\n\t */\n\tdetach( event ) {\n\t\tlet events;\n\n\t\t// Remove native DOM listeners which are orphans. If no callbacks\n\t\t// are awaiting given event, detach native DOM listener from DOM Node.\n\t\t// See: {@link attach}.\n\n\t\tif ( this._domListeners[ event ] && ( !( events = this._events[ event ] ) || !events.callbacks.length ) ) {\n\t\t\tthis._domListeners[ event ].removeListener();\n\t\t}\n\t},\n\n\t/**\n\t * Adds callback to emitter for given event.\n\t *\n\t * @protected\n\t * @method module:utils/dom/emittermixin~ProxyEmitter#_addEventListener\n\t * @param {String} event The name of the event.\n\t * @param {Function} callback The function to be called on event.\n\t * @param {Object} [options={}] Additional options.\n\t * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of this event callback. The higher\n\t * the priority value the sooner the callback will be fired. Events having the same priority are called in the\n\t * order they were added.\n\t */\n\t_addEventListener( event, callback, options ) {\n\t\tthis.attach( event );\n\t\tEmitterMixin._addEventListener.call( this, event, callback, options );\n\t},\n\n\t/**\n\t * Removes callback from emitter for given event.\n\t *\n\t * @protected\n\t * @method module:utils/dom/emittermixin~ProxyEmitter#_removeEventListener\n\t * @param {String} event The name of the event.\n\t * @param {Function} callback The function to stop being called.\n\t */\n\t_removeEventListener( event, callback ) {\n\t\tEmitterMixin._removeEventListener.call( this, event, callback );\n\t\tthis.detach( event );\n\t},\n\n\t/**\n\t * Creates a native DOM listener callback. When the native DOM event\n\t * is fired it will fire corresponding event on this ProxyEmitter.\n\t * Note: A native DOM Event is passed as an argument.\n\t *\n\t * @private\n\t * @method module:utils/dom/emittermixin~ProxyEmitter#_createDomListener\n\t * @param {String} event The name of the event.\n\t * @returns {Function} The DOM listener callback.\n\t */\n\t_createDomListener( event ) {\n\t\tconst domListener = domEvt => {\n\t\t\tthis.fire( event, domEvt );\n\t\t};\n\n\t\t// Supply the DOM listener callback with a function that will help\n\t\t// detach it from the DOM Node, when it is no longer necessary.\n\t\t// See: {@link detach}.\n\t\tdomListener.removeListener = () => {\n\t\t\tthis._domNode.removeEventListener( event, domListener, this._options );\n\t\t\tdelete this._domListeners[ event ];\n\t\t};\n\n\t\treturn domListener;\n\t}\n} );\n\n// Gets an unique DOM Node identifier. The identifier will be set if not defined.\n//\n// @private\n// @param {Node} node\n// @returns {String} UID for given DOM Node.\nfunction getNodeUID( node ) {\n\treturn node[ 'data-ck-expando' ] || ( node[ 'data-ck-expando' ] = uid() );\n}\n\n// Gets id of the ProxyEmitter for the given node.\n//\n// Combines DOM Node identifier and additional options.\n//\n// @private\n// @param {Node} node\n// @param {Object} options Additional options.\n// @returns {String} ProxyEmitter id.\nfunction getProxyEmitterId( node, options ) {\n\tlet id = getNodeUID( node );\n\n\tfor ( const option of Object.keys( options ).sort() ) {\n\t\tif ( options[ option ] ) {\n\t\t\tid += '-' + option;\n\t\t}\n\t}\n\n\treturn id;\n}\n\n/**\n * Interface representing classes which mix in {@link module:utils/dom/emittermixin~EmitterMixin}.\n *\n * @interface Emitter\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/observer\n */\n\nimport DomEmitterMixin from '@ckeditor/ckeditor5-utils/src/dom/emittermixin';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\n\n/**\n * Abstract base observer class. Observers are classes which listen to DOM events, do the preliminary\n * processing and fire events on the {@link module:engine/view/document~Document} objects.\n * Observers can also add features to the view, for instance by updating its status or marking elements\n * which need a refresh on DOM events.\n *\n * @abstract\n */\nexport default class Observer {\n\t/**\n\t * Creates an instance of the observer.\n\t *\n\t * @param {module:engine/view/view~View} view\n\t */\n\tconstructor( view ) {\n\t\t/**\n\t\t * An instance of the view controller.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/view~View}\n\t\t */\n\t\tthis.view = view;\n\n\t\t/**\n\t\t * A reference to the {@link module:engine/view/document~Document} object.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/document~Document}\n\t\t */\n\t\tthis.document = view.document;\n\n\t\t/**\n\t\t * The state of the observer. If it is disabled, no events will be fired.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Boolean}\n\t\t */\n\t\tthis.isEnabled = false;\n\t}\n\n\t/**\n\t * Enables the observer. This method is called when the observer is registered to the\n\t * {@link module:engine/view/view~View} and after {@link module:engine/view/view~View#forceRender rendering}\n\t * (all observers are {@link #disable disabled} before rendering).\n\t *\n\t * A typical use case for disabling observers is that mutation observers need to be disabled for the rendering.\n\t * However, a child class may not need to be disabled, so it can implement an empty method.\n\t *\n\t * @see module:engine/view/observer/observer~Observer#disable\n\t */\n\tenable() {\n\t\tthis.isEnabled = true;\n\t}\n\n\t/**\n\t * Disables the observer. This method is called before\n\t * {@link module:engine/view/view~View#forceRender rendering} to prevent firing events during rendering.\n\t *\n\t * @see module:engine/view/observer/observer~Observer#enable\n\t */\n\tdisable() {\n\t\tthis.isEnabled = false;\n\t}\n\n\t/**\n\t * Disables and destroys the observer, among others removes event listeners created by the observer.\n\t */\n\tdestroy() {\n\t\tthis.disable();\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Checks whether a given DOM event should be ignored (should not be turned into a synthetic view document event).\n\t *\n\t * Currently, an event will be ignored only if its target or any of its ancestors has the `data-cke-ignore-events` attribute.\n\t * This attribute can be used inside the structures generated by\n\t * {@link module:engine/view/downcastwriter~DowncastWriter#createUIElement `DowncastWriter#createUIElement()`} to ignore events\n\t * fired within a UI that should be excluded from CKEditor 5's realms.\n\t *\n\t * @param {Node} domTarget The DOM event target to check (usually an element, sometimes a text node and\n\t * potentially sometimes a document, too).\n\t * @returns {Boolean} Whether this event should be ignored by the observer.\n\t */\n\tcheckShouldIgnoreEventFromTarget( domTarget ) {\n\t\tif ( domTarget && domTarget.nodeType === 3 ) {\n\t\t\tdomTarget = domTarget.parentNode;\n\t\t}\n\n\t\tif ( !domTarget || domTarget.nodeType !== 1 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn domTarget.matches( '[data-cke-ignore-events], [data-cke-ignore-events] *' );\n\t}\n\n\t/**\n\t * Starts observing the given root element.\n\t *\n\t * @method #observe\n\t * @param {HTMLElement} domElement\n\t * @param {String} name The name of the root element.\n\t */\n}\n\nmix( Observer, DomEmitterMixin );\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nexport default setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nexport default setCacheHas;\n","import MapCache from './_MapCache.js';\nimport setCacheAdd from './_setCacheAdd.js';\nimport setCacheHas from './_setCacheHas.js';\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nexport default SetCache;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nexport default arraySome;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nexport default cacheHas;\n","import SetCache from './_SetCache.js';\nimport arraySome from './_arraySome.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nexport default equalArrays;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nexport default mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nexport default setToArray;\n","import Symbol from './_Symbol.js';\nimport Uint8Array from './_Uint8Array.js';\nimport eq from './eq.js';\nimport equalArrays from './_equalArrays.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nexport default equalByTag;\n","import getAllKeys from './_getAllKeys.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nexport default equalObjects;\n","import Stack from './_Stack.js';\nimport equalArrays from './_equalArrays.js';\nimport equalByTag from './_equalByTag.js';\nimport equalObjects from './_equalObjects.js';\nimport getTag from './_getTag.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nexport default baseIsEqualDeep;\n","import baseIsEqualDeep from './_baseIsEqualDeep.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nexport default baseIsEqual;\n","import baseIsEqual from './_baseIsEqual.js';\n\n/**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\nfunction isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n}\n\nexport default isEqualWith;\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/mutationobserver\n */\n\n/* globals window */\n\nimport Observer from './observer';\nimport ViewSelection from '../selection';\nimport { startsWithFiller, getDataWithoutFiller } from '../filler';\nimport { isEqualWith } from 'lodash-es';\n\n/**\n * Mutation observer class observes changes in the DOM, fires {@link module:engine/view/document~Document#event:mutations} event, mark view\n * elements as changed and call {@link module:engine/view/renderer~Renderer#render}.\n * Because all mutated nodes are marked as \"to be rendered\" and the\n * {@link module:engine/view/renderer~Renderer#render} is called, all changes will be reverted, unless the mutation will be handled by the\n * {@link module:engine/view/document~Document#event:mutations} event listener. It means user will see only handled changes, and the editor\n * will block all changes which are not handled.\n *\n * Mutation Observer also take care of reducing number of mutations which are fired. It removes duplicates and\n * mutations on elements which do not have corresponding view elements. Also\n * {@link module:engine/view/observer/mutationobserver~MutatedText text mutation} is fired only if parent element do not change child list.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n *\n * @extends module:engine/view/observer/observer~Observer\n */\nexport default class MutationObserver extends Observer {\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\t/**\n\t\t * Native mutation observer config.\n\t\t *\n\t\t * @private\n\t\t * @member {Object}\n\t\t */\n\t\tthis._config = {\n\t\t\tchildList: true,\n\t\t\tcharacterData: true,\n\t\t\tcharacterDataOldValue: true,\n\t\t\tsubtree: true\n\t\t};\n\n\t\t/**\n\t\t * Reference to the {@link module:engine/view/view~View#domConverter}.\n\t\t *\n\t\t * @member {module:engine/view/domconverter~DomConverter}\n\t\t */\n\t\tthis.domConverter = view.domConverter;\n\n\t\t/**\n\t\t * Reference to the {@link module:engine/view/view~View#_renderer}.\n\t\t *\n\t\t * @member {module:engine/view/renderer~Renderer}\n\t\t */\n\t\tthis.renderer = view._renderer;\n\n\t\t/**\n\t\t * Observed DOM elements.\n\t\t *\n\t\t * @private\n\t\t * @member {Array.<HTMLElement>}\n\t\t */\n\t\tthis._domElements = [];\n\n\t\t/**\n\t\t * Native mutation observer.\n\t\t *\n\t\t * @private\n\t\t * @member {MutationObserver}\n\t\t */\n\t\tthis._mutationObserver = new window.MutationObserver( this._onMutations.bind( this ) );\n\t}\n\n\t/**\n\t * Synchronously fires {@link module:engine/view/document~Document#event:mutations} event with all mutations in record queue.\n\t * At the same time empties the queue so mutations will not be fired twice.\n\t */\n\tflush() {\n\t\tthis._onMutations( this._mutationObserver.takeRecords() );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tobserve( domElement ) {\n\t\tthis._domElements.push( domElement );\n\n\t\tif ( this.isEnabled ) {\n\t\t\tthis._mutationObserver.observe( domElement, this._config );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tenable() {\n\t\tsuper.enable();\n\n\t\tfor ( const domElement of this._domElements ) {\n\t\t\tthis._mutationObserver.observe( domElement, this._config );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdisable() {\n\t\tsuper.disable();\n\n\t\tthis._mutationObserver.disconnect();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdestroy() {\n\t\tsuper.destroy();\n\n\t\tthis._mutationObserver.disconnect();\n\t}\n\n\t/**\n\t * Handles mutations. Deduplicates, mark view elements to sync, fire event and call render.\n\t *\n\t * @private\n\t * @param {Array.<Object>} domMutations Array of native mutations.\n\t */\n\t_onMutations( domMutations ) {\n\t\t// As a result of this.flush() we can have an empty collection.\n\t\tif ( domMutations.length === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst domConverter = this.domConverter;\n\n\t\t// Use map and set for deduplication.\n\t\tconst mutatedTexts = new Map();\n\t\tconst mutatedElements = new Set();\n\n\t\t// Handle `childList` mutations first, so we will be able to check if the `characterData` mutation is in the\n\t\t// element with changed structure anyway.\n\t\tfor ( const mutation of domMutations ) {\n\t\t\tif ( mutation.type === 'childList' ) {\n\t\t\t\tconst element = domConverter.mapDomToView( mutation.target );\n\n\t\t\t\t// Do not collect mutations from UIElements and RawElements.\n\t\t\t\tif ( element && ( element.is( 'uiElement' ) || element.is( 'rawElement' ) ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( element && !this._isBogusBrMutation( mutation ) ) {\n\t\t\t\t\tmutatedElements.add( element );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Handle `characterData` mutations later, when we have the full list of nodes which changed structure.\n\t\tfor ( const mutation of domMutations ) {\n\t\t\tconst element = domConverter.mapDomToView( mutation.target );\n\n\t\t\t// Do not collect mutations from UIElements and RawElements.\n\t\t\tif ( element && ( element.is( 'uiElement' ) || element.is( 'rawElement' ) ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( mutation.type === 'characterData' ) {\n\t\t\t\tconst text = domConverter.findCorrespondingViewText( mutation.target );\n\n\t\t\t\tif ( text && !mutatedElements.has( text.parent ) ) {\n\t\t\t\t\t// Use text as a key, for deduplication. If there will be another mutation on the same text element\n\t\t\t\t\t// we will have only one in the map.\n\t\t\t\t\tmutatedTexts.set( text, {\n\t\t\t\t\t\ttype: 'text',\n\t\t\t\t\t\toldText: text.data,\n\t\t\t\t\t\tnewText: getDataWithoutFiller( mutation.target ),\n\t\t\t\t\t\tnode: text\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\t// When we added first letter to the text node which had only inline filler, for the DOM it is mutation\n\t\t\t\t// on text, but for the view, where filler text node did not existed, new text node was created, so we\n\t\t\t\t// need to fire 'children' mutation instead of 'text'.\n\t\t\t\telse if ( !text && startsWithFiller( mutation.target ) ) {\n\t\t\t\t\tmutatedElements.add( domConverter.mapDomToView( mutation.target.parentNode ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Now we build the list of mutations to fire and mark elements. We did not do it earlier to avoid marking the\n\t\t// same node multiple times in case of duplication.\n\n\t\t// List of mutations we will fire.\n\t\tconst viewMutations = [];\n\n\t\tfor ( const mutatedText of mutatedTexts.values() ) {\n\t\t\tthis.renderer.markToSync( 'text', mutatedText.node );\n\t\t\tviewMutations.push( mutatedText );\n\t\t}\n\n\t\tfor ( const viewElement of mutatedElements ) {\n\t\t\tconst domElement = domConverter.mapViewToDom( viewElement );\n\t\t\tconst viewChildren = Array.from( viewElement.getChildren() );\n\t\t\tconst newViewChildren = Array.from( domConverter.domChildrenToView( domElement, { withChildren: false } ) );\n\n\t\t\t// It may happen that as a result of many changes (sth was inserted and then removed),\n\t\t\t// both elements haven't really changed. #1031\n\t\t\tif ( !isEqualWith( viewChildren, newViewChildren, sameNodes ) ) {\n\t\t\t\tthis.renderer.markToSync( 'children', viewElement );\n\n\t\t\t\tviewMutations.push( {\n\t\t\t\t\ttype: 'children',\n\t\t\t\t\toldChildren: viewChildren,\n\t\t\t\t\tnewChildren: newViewChildren,\n\t\t\t\t\tnode: viewElement\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\t// Retrieve `domSelection` using `ownerDocument` of one of mutated nodes.\n\t\t// There should not be simultaneous mutation in multiple documents, so it's fine.\n\t\tconst domSelection = domMutations[ 0 ].target.ownerDocument.getSelection();\n\n\t\tlet viewSelection = null;\n\n\t\tif ( domSelection && domSelection.anchorNode ) {\n\t\t\t// If `domSelection` is inside a dom node that is already bound to a view node from view tree, get\n\t\t\t// corresponding selection in the view and pass it together with `viewMutations`. The `viewSelection` may\n\t\t\t// be used by features handling mutations.\n\t\t\t// Only one range is supported.\n\n\t\t\tconst viewSelectionAnchor = domConverter.domPositionToView( domSelection.anchorNode, domSelection.anchorOffset );\n\t\t\tconst viewSelectionFocus = domConverter.domPositionToView( domSelection.focusNode, domSelection.focusOffset );\n\n\t\t\t// Anchor and focus has to be properly mapped to view.\n\t\t\tif ( viewSelectionAnchor && viewSelectionFocus ) {\n\t\t\t\tviewSelection = new ViewSelection( viewSelectionAnchor );\n\t\t\t\tviewSelection.setFocus( viewSelectionFocus );\n\t\t\t}\n\t\t}\n\n\t\t// In case only non-relevant mutations were recorded it skips the event and force render (#5600).\n\t\tif ( viewMutations.length ) {\n\t\t\tthis.document.fire( 'mutations', viewMutations, viewSelection );\n\n\t\t\t// If nothing changes on `mutations` event, at this point we have \"dirty DOM\" (changed) and de-synched\n\t\t\t// view (which has not been changed). In order to \"reset DOM\" we render the view again.\n\t\t\tthis.view.forceRender();\n\t\t}\n\n\t\tfunction sameNodes( child1, child2 ) {\n\t\t\t// First level of comparison (array of children vs array of children) – use the Lodash's default behavior.\n\t\t\tif ( Array.isArray( child1 ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Elements.\n\t\t\tif ( child1 === child2 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t// Texts.\n\t\t\telse if ( child1.is( '$text' ) && child2.is( '$text' ) ) {\n\t\t\t\treturn child1.data === child2.data;\n\t\t\t}\n\n\t\t\t// Not matching types.\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Checks if mutation was generated by the browser inserting bogus br on the end of the block element.\n\t * Such mutations are generated while pressing space or performing native spellchecker correction\n\t * on the end of the block element in Firefox browser.\n\t *\n\t * @private\n\t * @param {Object} mutation Native mutation object.\n\t * @returns {Boolean}\n\t */\n\t_isBogusBrMutation( mutation ) {\n\t\tlet addedNode = null;\n\n\t\t// Check if mutation added only one node on the end of its parent.\n\t\tif ( mutation.nextSibling === null && mutation.removedNodes.length === 0 && mutation.addedNodes.length == 1 ) {\n\t\t\taddedNode = this.domConverter.domToView( mutation.addedNodes[ 0 ], {\n\t\t\t\twithChildren: false\n\t\t\t} );\n\t\t}\n\n\t\treturn addedNode && addedNode.is( 'element', 'br' );\n\t}\n}\n\n/**\n * Fired when mutation occurred. If tree view is not changed on this event, DOM will be reverted to the state before\n * mutation, so all changes which should be applied, should be handled on this event.\n *\n * Introduced by {@link module:engine/view/observer/mutationobserver~MutationObserver}.\n *\n * Note that because {@link module:engine/view/observer/mutationobserver~MutationObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/mutationobserver~MutationObserver\n * @event module:engine/view/document~Document#event:mutations\n * @param {Array.<module:engine/view/observer/mutationobserver~MutatedText|module:engine/view/observer/mutationobserver~MutatedChildren>}\n * viewMutations Array of mutations.\n * For mutated texts it will be {@link module:engine/view/observer/mutationobserver~MutatedText} and for mutated elements it will be\n * {@link module:engine/view/observer/mutationobserver~MutatedChildren}. You can recognize the type based on the `type` property.\n * @param {module:engine/view/selection~Selection|null} viewSelection View selection that is a result of converting DOM selection to view.\n * Keep in\n * mind that the DOM selection is already \"updated\", meaning that it already acknowledges changes done in mutation.\n */\n\n/**\n * Mutation item for text.\n *\n * @see module:engine/view/document~Document#event:mutations\n * @see module:engine/view/observer/mutationobserver~MutatedChildren\n *\n * @typedef {Object} module:engine/view/observer/mutationobserver~MutatedText\n *\n * @property {String} type For text mutations it is always 'text'.\n * @property {module:engine/view/text~Text} node Mutated text node.\n * @property {String} oldText Old text.\n * @property {String} newText New text.\n */\n\n/**\n * Mutation item for child nodes.\n *\n * @see module:engine/view/document~Document#event:mutations\n * @see module:engine/view/observer/mutationobserver~MutatedText\n *\n * @typedef {Object} module:engine/view/observer/mutationobserver~MutatedChildren\n *\n * @property {String} type For child nodes mutations it is always 'children'.\n * @property {module:engine/view/element~Element} node Parent of the mutated children.\n * @property {Array.<module:engine/view/node~Node>} oldChildren Old child nodes.\n * @property {Array.<module:engine/view/node~Node>} newChildren New child nodes.\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/domeventdata\n */\n\nimport { extend } from 'lodash-es';\n\n/**\n * Information about a DOM event in context of the {@link module:engine/view/document~Document}.\n * It wraps the native event, which usually should not be used as the wrapper contains\n * additional data (like key code for keyboard events).\n */\nexport default class DomEventData {\n\t/**\n\t * @param {module:engine/view/view~View} view The instance of the view controller.\n\t * @param {Event} domEvent The DOM event.\n\t * @param {Object} [additionalData] Additional properties that the instance should contain.\n\t */\n\tconstructor( view, domEvent, additionalData ) {\n\t\t/**\n\t\t * Instance of the view controller.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/view~View} module:engine/view/observer/observer~Observer.DomEvent#view\n\t\t */\n\t\tthis.view = view;\n\n\t\t/**\n\t\t * The instance of the document.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/document~Document} module:engine/view/observer/observer~Observer.DomEvent#document\n\t\t */\n\t\tthis.document = view.document;\n\n\t\t/**\n\t\t * The DOM event.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Event} module:engine/view/observer/observer~Observer.DomEvent#domEvent\n\t\t */\n\t\tthis.domEvent = domEvent;\n\n\t\t/**\n\t\t * The DOM target.\n\t\t *\n\t\t * @readonly\n\t\t * @member {HTMLElement} module:engine/view/observer/observer~Observer.DomEvent#target\n\t\t */\n\t\tthis.domTarget = domEvent.target;\n\n\t\textend( this, additionalData );\n\t}\n\n\t/**\n\t * The tree view element representing the target.\n\t *\n\t * @readonly\n\t * @type module:engine/view/element~Element\n\t */\n\tget target() {\n\t\treturn this.view.domConverter.mapDomToView( this.domTarget );\n\t}\n\n\t/**\n\t * Prevents the native's event default action.\n\t */\n\tpreventDefault() {\n\t\tthis.domEvent.preventDefault();\n\t}\n\n\t/**\n\t * Stops native event propagation.\n\t */\n\tstopPropagation() {\n\t\tthis.domEvent.stopPropagation();\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/domeventobserver\n */\n\nimport Observer from './observer';\nimport DomEventData from './domeventdata';\n\n/**\n * Base class for DOM event observers. This class handles\n * {@link module:engine/view/observer/observer~Observer#observe adding} listeners to DOM elements,\n * {@link module:engine/view/observer/observer~Observer#disable disabling} and\n * {@link module:engine/view/observer/observer~Observer#enable re-enabling} events.\n * Child class needs to define\n * {@link module:engine/view/observer/domeventobserver~DomEventObserver#domEventType DOM event type} and\n * {@link module:engine/view/observer/domeventobserver~DomEventObserver#onDomEvent callback}.\n *\n * For instance:\n *\n *\t\tclass ClickObserver extends DomEventObserver {\n *\t\t\t// It can also be defined as a normal property in the constructor.\n *\t\t\tget domEventType() {\n *\t\t\t\treturn 'click';\n *\t\t\t}\n *\n *\t\t\tonDomEvent( domEvent ) {\n *\t\t\t\tthis.fire( 'click', domEvent );\n *\t\t\t}\n *\t\t}\n *\n * @extends module:engine/view/observer/observer~Observer\n */\nexport default class DomEventObserver extends Observer {\n\t/**\n\t * Type of the DOM event the observer should listen to. Array of types can be defined\n\t * if the observer should listen to multiple DOM events.\n\t *\n\t * @readonly\n\t * @member {String|Array.<String>} #domEventType\n\t */\n\n\t/**\n\t * Callback which should be called when the DOM event occurred. Note that the callback will not be called if\n\t * observer {@link #isEnabled is not enabled}.\n\t *\n\t * @see #domEventType\n\t * @abstract\n\t * @method #onDomEvent\n\t */\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\t/**\n\t\t * If set to `true` DOM events will be listened on the capturing phase.\n\t\t * Default value is `false`.\n\t\t *\n\t\t * @member {Boolean}\n\t\t */\n\t\tthis.useCapture = false;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tobserve( domElement ) {\n\t\tconst types = typeof this.domEventType == 'string' ? [ this.domEventType ] : this.domEventType;\n\n\t\ttypes.forEach( type => {\n\t\t\tthis.listenTo( domElement, type, ( eventInfo, domEvent ) => {\n\t\t\t\tif ( this.isEnabled && !this.checkShouldIgnoreEventFromTarget( domEvent.target ) ) {\n\t\t\t\t\tthis.onDomEvent( domEvent );\n\t\t\t\t}\n\t\t\t}, { useCapture: this.useCapture } );\n\t\t} );\n\t}\n\n\t/**\n\t * Calls `Document#fire()` if observer {@link #isEnabled is enabled}.\n\t *\n\t * @see module:utils/emittermixin~EmitterMixin#fire\n\t * @param {String} eventType The event type (name).\n\t * @param {Event} domEvent The DOM event.\n\t * @param {Object} [additionalData] The additional data which should extend the\n\t * {@link module:engine/view/observer/domeventdata~DomEventData event data} object.\n\t */\n\tfire( eventType, domEvent, additionalData ) {\n\t\tif ( this.isEnabled ) {\n\t\t\tthis.document.fire( eventType, new DomEventData( this.view, domEvent, additionalData ) );\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/keyobserver\n */\n\nimport DomEventObserver from './domeventobserver';\nimport { getCode } from '@ckeditor/ckeditor5-utils/src/keyboard';\n\n/**\n * Observer for events connected with pressing keyboard keys.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n *\n * @extends module:engine/view/observer/domeventobserver~DomEventObserver\n */\nexport default class KeyObserver extends DomEventObserver {\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\tthis.domEventType = [ 'keydown', 'keyup' ];\n\t}\n\n\tonDomEvent( domEvt ) {\n\t\tthis.fire( domEvt.type, domEvt, {\n\t\t\tkeyCode: domEvt.keyCode,\n\n\t\t\taltKey: domEvt.altKey,\n\t\t\tctrlKey: domEvt.ctrlKey,\n\t\t\tshiftKey: domEvt.shiftKey,\n\t\t\tmetaKey: domEvt.metaKey,\n\n\t\t\tget keystroke() {\n\t\t\t\treturn getCode( this );\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * Fired when a key has been pressed.\n *\n * Introduced by {@link module:engine/view/observer/keyobserver~KeyObserver}.\n *\n * Note that because {@link module:engine/view/observer/keyobserver~KeyObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/keyobserver~KeyObserver\n * @event module:engine/view/document~Document#event:keydown\n * @param {module:engine/view/observer/keyobserver~KeyEventData} keyEventData\n */\n\n/**\n * Fired when a key has been released.\n *\n * Introduced by {@link module:engine/view/observer/keyobserver~KeyObserver}.\n *\n * Note that because {@link module:engine/view/observer/keyobserver~KeyObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/keyobserver~KeyObserver\n * @event module:engine/view/document~Document#event:keyup\n * @param {module:engine/view/observer/keyobserver~KeyEventData} keyEventData\n */\n\n/**\n * The value of both events - {@link module:engine/view/document~Document#event:keydown} and\n * {@link module:engine/view/document~Document#event:keyup}.\n *\n * @class module:engine/view/observer/keyobserver~KeyEventData\n * @extends module:engine/view/observer/domeventdata~DomEventData\n * @implements module:utils/keyboard~KeystrokeInfo\n */\n\n/**\n * Code of the whole keystroke. See {@link module:utils/keyboard~getCode}.\n *\n * @readonly\n * @member {Number} module:engine/view/observer/keyobserver~KeyEventData#keystroke\n */\n","import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n","import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/fakeselectionobserver\n */\n\nimport Observer from './observer';\nimport ViewSelection from '../selection';\nimport { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';\nimport { debounce } from 'lodash-es';\n\n/**\n * Fake selection observer class. If view selection is fake it is placed in dummy DOM container. This observer listens\n * on {@link module:engine/view/document~Document#event:keydown keydown} events and handles moving fake view selection to the correct place\n * if arrow keys are pressed.\n * Fires {@link module:engine/view/document~Document#event:selectionChange selectionChange event} simulating natural behaviour of\n * {@link module:engine/view/observer/selectionobserver~SelectionObserver SelectionObserver}.\n *\n * @extends module:engine/view/observer/observer~Observer\n */\nexport default class FakeSelectionObserver extends Observer {\n\t/**\n\t * Creates new FakeSelectionObserver instance.\n\t *\n\t * @param {module:engine/view/view~View} view\n\t */\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\t/**\n\t\t * Fires debounced event `selectionChangeDone`. It uses `lodash#debounce` method to delay function call.\n\t\t *\n\t\t * @private\n\t\t * @param {Object} data Selection change data.\n\t\t * @method #_fireSelectionChangeDoneDebounced\n\t\t */\n\t\tthis._fireSelectionChangeDoneDebounced = debounce( data => this.document.fire( 'selectionChangeDone', data ), 200 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tobserve() {\n\t\tconst document = this.document;\n\n\t\tdocument.on( 'arrowKey', ( eventInfo, data ) => {\n\t\t\tconst selection = document.selection;\n\n\t\t\tif ( selection.isFake && this.isEnabled ) {\n\t\t\t\t// Prevents default key down handling - no selection change will occur.\n\t\t\t\tdata.preventDefault();\n\t\t\t}\n\t\t}, { context: '$capture' } );\n\n\t\tdocument.on( 'arrowKey', ( eventInfo, data ) => {\n\t\t\tconst selection = document.selection;\n\n\t\t\tif ( selection.isFake && this.isEnabled ) {\n\t\t\t\tthis._handleSelectionMove( data.keyCode );\n\t\t\t}\n\t\t}, { priority: 'lowest' } );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdestroy() {\n\t\tsuper.destroy();\n\n\t\tthis._fireSelectionChangeDoneDebounced.cancel();\n\t}\n\n\t/**\n\t * Handles collapsing view selection according to given key code. If left or up key is provided - new selection will be\n\t * collapsed to left. If right or down key is pressed - new selection will be collapsed to right.\n\t *\n\t * This method fires {@link module:engine/view/document~Document#event:selectionChange} and\n\t * {@link module:engine/view/document~Document#event:selectionChangeDone} events imitating behaviour of\n\t * {@link module:engine/view/observer/selectionobserver~SelectionObserver}.\n\t *\n\t * @private\n\t * @param {Number} keyCode\n\t * @fires module:engine/view/document~Document#event:selectionChange\n\t * @fires module:engine/view/document~Document#event:selectionChangeDone\n\t */\n\t_handleSelectionMove( keyCode ) {\n\t\tconst selection = this.document.selection;\n\t\tconst newSelection = new ViewSelection( selection.getRanges(), { backward: selection.isBackward, fake: false } );\n\n\t\t// Left or up arrow pressed - move selection to start.\n\t\tif ( keyCode == keyCodes.arrowleft || keyCode == keyCodes.arrowup ) {\n\t\t\tnewSelection.setTo( newSelection.getFirstPosition() );\n\t\t}\n\n\t\t// Right or down arrow pressed - move selection to end.\n\t\tif ( keyCode == keyCodes.arrowright || keyCode == keyCodes.arrowdown ) {\n\t\t\tnewSelection.setTo( newSelection.getLastPosition() );\n\t\t}\n\n\t\tconst data = {\n\t\t\toldSelection: selection,\n\t\t\tnewSelection,\n\t\t\tdomSelection: null\n\t\t};\n\n\t\t// Fire dummy selection change event.\n\t\tthis.document.fire( 'selectionChange', data );\n\n\t\t// Call` #_fireSelectionChangeDoneDebounced` every time when `selectionChange` event is fired.\n\t\t// This function is debounced what means that `selectionChangeDone` event will be fired only when\n\t\t// defined int the function time will elapse since the last time the function was called.\n\t\t// So `selectionChangeDone` will be fired when selection will stop changing.\n\t\tthis._fireSelectionChangeDoneDebounced( data );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/selectionobserver\n */\n\n/* global setInterval, clearInterval */\n\nimport Observer from './observer';\nimport MutationObserver from './mutationobserver';\nimport { debounce } from 'lodash-es';\n\n/**\n * Selection observer class observes selection changes in the document. If a selection changes on the document this\n * observer checks if there are any mutations and if the DOM selection is different from the\n * {@link module:engine/view/document~Document#selection view selection}. The selection observer fires\n * {@link module:engine/view/document~Document#event:selectionChange} event only if a selection change was the only change in the document\n * and the DOM selection is different then the view selection.\n *\n * This observer also manages the {@link module:engine/view/document~Document#isSelecting} property of the view document.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n *\n * @see module:engine/view/observer/mutationobserver~MutationObserver\n * @extends module:engine/view/observer/observer~Observer\n */\nexport default class SelectionObserver extends Observer {\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\t/**\n\t\t * Instance of the mutation observer. Selection observer calls\n\t\t * {@link module:engine/view/observer/mutationobserver~MutationObserver#flush} to ensure that the mutations will be handled\n\t\t * before the {@link module:engine/view/document~Document#event:selectionChange} event is fired.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/observer/mutationobserver~MutationObserver}\n\t\t * module:engine/view/observer/selectionobserver~SelectionObserver#mutationObserver\n\t\t */\n\t\tthis.mutationObserver = view.getObserver( MutationObserver );\n\n\t\t/**\n\t\t * Reference to the view {@link module:engine/view/documentselection~DocumentSelection} object used to compare\n\t\t * new selection with it.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/documentselection~DocumentSelection}\n\t\t * module:engine/view/observer/selectionobserver~SelectionObserver#selection\n\t\t */\n\t\tthis.selection = this.document.selection;\n\n\t\t/* eslint-disable max-len */\n\t\t/**\n\t\t * Reference to the {@link module:engine/view/view~View#domConverter}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/domconverter~DomConverter} module:engine/view/observer/selectionobserver~SelectionObserver#domConverter\n\t\t */\n\t\t/* eslint-enable max-len */\n\t\tthis.domConverter = view.domConverter;\n\n\t\t/**\n\t\t * A set of documents which have added `selectionchange` listener to avoid adding a listener twice to the same\n\t\t * document.\n\t\t *\n\t\t * @private\n\t\t * @member {WeakSet.<Document>} module:engine/view/observer/selectionobserver~SelectionObserver#_documents\n\t\t */\n\t\tthis._documents = new WeakSet();\n\n\t\t/**\n\t\t * Fires debounced event `selectionChangeDone`. It uses `lodash#debounce` method to delay function call.\n\t\t *\n\t\t * @private\n\t\t * @param {Object} data Selection change data.\n\t\t * @method #_fireSelectionChangeDoneDebounced\n\t\t */\n\t\tthis._fireSelectionChangeDoneDebounced = debounce( data => this.document.fire( 'selectionChangeDone', data ), 200 );\n\n\t\t/**\n\t\t * When called, starts clearing the {@link #_loopbackCounter} counter in time intervals. When the number of selection\n\t\t * changes exceeds a certain limit within the interval of time, the observer will not fire `selectionChange` but warn about\n\t\t * possible infinite selection loop.\n\t\t *\n\t\t * @private\n\t\t * @member {Number} #_clearInfiniteLoopInterval\n\t\t */\n\t\tthis._clearInfiniteLoopInterval = setInterval( () => this._clearInfiniteLoop(), 1000 );\n\n\t\t/**\n\t\t * Unlocks the `isSelecting` state of the view document in case the selection observer did not record this fact\n\t\t * correctly (for whatever reason). It is a safeguard (paranoid check), that returns document to the normal state\n\t\t * after a certain period of time (debounced, postponed by each selectionchange event).\n\t\t *\n\t\t * @private\n\t\t * @method #_documentIsSelectingInactivityTimeoutDebounced\n\t\t */\n\t\tthis._documentIsSelectingInactivityTimeoutDebounced = debounce( () => ( this.document.isSelecting = false ), 5000 );\n\n\t\t/**\n\t\t * Private property to check if the code does not enter infinite loop.\n\t\t *\n\t\t * @private\n\t\t * @member {Number} module:engine/view/observer/selectionobserver~SelectionObserver#_loopbackCounter\n\t\t */\n\t\tthis._loopbackCounter = 0;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tobserve( domElement ) {\n\t\tconst domDocument = domElement.ownerDocument;\n\n\t\tconst startDocumentIsSelecting = () => {\n\t\t\tthis.document.isSelecting = true;\n\n\t\t\t// Let's activate the safety timeout each time the document enters the \"is selecting\" state.\n\t\t\tthis._documentIsSelectingInactivityTimeoutDebounced();\n\t\t};\n\n\t\tconst endDocumentIsSelecting = () => {\n\t\t\tthis.document.isSelecting = false;\n\n\t\t\t// The safety timeout can be canceled when the document leaves the \"is selecting\" state.\n\t\t\tthis._documentIsSelectingInactivityTimeoutDebounced.cancel();\n\t\t};\n\n\t\t// The document has the \"is selecting\" state while the user keeps making (extending) the selection\n\t\t// (e.g. by holding the mouse button and moving the cursor). The state resets when they either released\n\t\t// the mouse button or interrupted the process by pressing or releasing any key.\n\t\tthis.listenTo( domElement, 'selectstart', startDocumentIsSelecting, { priority: 'highest' } );\n\t\tthis.listenTo( domElement, 'keydown', endDocumentIsSelecting, { priority: 'highest' } );\n\t\tthis.listenTo( domElement, 'keyup', endDocumentIsSelecting, { priority: 'highest' } );\n\n\t\t// Add document-wide listeners only once. This method could be called for multiple editing roots.\n\t\tif ( this._documents.has( domDocument ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.listenTo( domDocument, 'mouseup', endDocumentIsSelecting, { priority: 'highest' } );\n\t\tthis.listenTo( domDocument, 'selectionchange', ( evt, domEvent ) => {\n\t\t\tthis._handleSelectionChange( domEvent, domDocument );\n\n\t\t\t// Defer the safety timeout when the selection changes (e.g. the user keeps extending the selection\n\t\t\t// using their mouse).\n\t\t\tthis._documentIsSelectingInactivityTimeoutDebounced();\n\t\t} );\n\n\t\tthis._documents.add( domDocument );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdestroy() {\n\t\tsuper.destroy();\n\n\t\tclearInterval( this._clearInfiniteLoopInterval );\n\t\tthis._fireSelectionChangeDoneDebounced.cancel();\n\t\tthis._documentIsSelectingInactivityTimeoutDebounced.cancel();\n\t}\n\n\t/**\n\t * Selection change listener. {@link module:engine/view/observer/mutationobserver~MutationObserver#flush Flush} mutations, check if\n\t * a selection changes and fires {@link module:engine/view/document~Document#event:selectionChange} event on every change\n\t * and {@link module:engine/view/document~Document#event:selectionChangeDone} when a selection stop changing.\n\t *\n\t * @private\n\t * @param {Event} domEvent DOM event.\n\t * @param {Document} domDocument DOM document.\n\t */\n\t_handleSelectionChange( domEvent, domDocument ) {\n\t\tif ( !this.isEnabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst domSelection = domDocument.defaultView.getSelection();\n\n\t\tif ( this.checkShouldIgnoreEventFromTarget( domSelection.anchorNode ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Ensure the mutation event will be before selection event on all browsers.\n\t\tthis.mutationObserver.flush();\n\n\t\t// If there were mutations then the view will be re-rendered by the mutation observer and the selection\n\t\t// will be updated, so the selections will equal and the event will not be fired, as expected.\n\t\tconst newViewSelection = this.domConverter.domSelectionToView( domSelection );\n\n\t\t// Do not convert selection change if the new view selection has no ranges in it.\n\t\t//\n\t\t// It means that the DOM selection is in some way incorrect. Ranges that were in the DOM selection could not be\n\t\t// converted to the view. This happens when the DOM selection was moved outside of the editable element.\n\t\tif ( newViewSelection.rangeCount == 0 ) {\n\t\t\tthis.view.hasDomSelection = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis.view.hasDomSelection = true;\n\n\t\tif ( this.selection.isEqual( newViewSelection ) && this.domConverter.isDomSelectionCorrect( domSelection ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Ensure we are not in the infinite loop (#400).\n\t\t// This counter is reset each second. 60 selection changes in 1 second is enough high number\n\t\t// to be very difficult (impossible) to achieve using just keyboard keys (during normal editor use).\n\t\tif ( ++this._loopbackCounter > 60 ) {\n\t\t\t// Selection change observer detected an infinite rendering loop.\n\t\t\t// Most probably you try to put the selection in the position which is not allowed\n\t\t\t// by the browser and browser fixes it automatically what causes `selectionchange` event on\n\t\t\t// which a loopback through a model tries to re-render the wrong selection and again.\n\t\t\t//\n\t\t\t// @if CK_DEBUG // console.warn( 'Selection change observer detected an infinite rendering loop.' );\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.selection.isSimilar( newViewSelection ) ) {\n\t\t\t// If selection was equal and we are at this point of algorithm, it means that it was incorrect.\n\t\t\t// Just re-render it, no need to fire any events, etc.\n\t\t\tthis.view.forceRender();\n\t\t} else {\n\t\t\tconst data = {\n\t\t\t\toldSelection: this.selection,\n\t\t\t\tnewSelection: newViewSelection,\n\t\t\t\tdomSelection\n\t\t\t};\n\n\t\t\t// Prepare data for new selection and fire appropriate events.\n\t\t\tthis.document.fire( 'selectionChange', data );\n\n\t\t\t// Call `#_fireSelectionChangeDoneDebounced` every time when `selectionChange` event is fired.\n\t\t\t// This function is debounced what means that `selectionChangeDone` event will be fired only when\n\t\t\t// defined int the function time will elapse since the last time the function was called.\n\t\t\t// So `selectionChangeDone` will be fired when selection will stop changing.\n\t\t\tthis._fireSelectionChangeDoneDebounced( data );\n\t\t}\n\t}\n\n\t/**\n\t * Clears `SelectionObserver` internal properties connected with preventing infinite loop.\n\t *\n\t * @protected\n\t */\n\t_clearInfiniteLoop() {\n\t\tthis._loopbackCounter = 0;\n\t}\n}\n\n/**\n * Fired when a selection has changed. This event is fired only when the selection change was the only change that happened\n * in the document, and the old selection is different then the new selection.\n *\n * Introduced by {@link module:engine/view/observer/selectionobserver~SelectionObserver}.\n *\n * Note that because {@link module:engine/view/observer/selectionobserver~SelectionObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/selectionobserver~SelectionObserver\n * @event module:engine/view/document~Document#event:selectionChange\n * @param {Object} data\n * @param {module:engine/view/documentselection~DocumentSelection} data.oldSelection Old View selection which is\n * {@link module:engine/view/document~Document#selection}.\n * @param {module:engine/view/selection~Selection} data.newSelection New View selection which is converted DOM selection.\n * @param {Selection} data.domSelection Native DOM selection.\n */\n\n/**\n * Fired when selection stops changing.\n *\n * Introduced by {@link module:engine/view/observer/selectionobserver~SelectionObserver}.\n *\n * Note that because {@link module:engine/view/observer/selectionobserver~SelectionObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/selectionobserver~SelectionObserver\n * @event module:engine/view/document~Document#event:selectionChangeDone\n * @param {Object} data\n * @param {module:engine/view/documentselection~DocumentSelection} data.oldSelection Old View selection which is\n * {@link module:engine/view/document~Document#selection}.\n * @param {module:engine/view/selection~Selection} data.newSelection New View selection which is converted DOM selection.\n * @param {Selection} data.domSelection Native DOM selection.\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/focusobserver\n */\n\n/* globals setTimeout, clearTimeout */\n\nimport DomEventObserver from './domeventobserver';\n\n/**\n * {@link module:engine/view/document~Document#event:focus Focus}\n * and {@link module:engine/view/document~Document#event:blur blur} events observer.\n * Focus observer handle also {@link module:engine/view/rooteditableelement~RootEditableElement#isFocused isFocused} property of the\n * {@link module:engine/view/rooteditableelement~RootEditableElement root elements}.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n *\n * @extends module:engine/view/observer/domeventobserver~DomEventObserver\n */\nexport default class FocusObserver extends DomEventObserver {\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\tthis.domEventType = [ 'focus', 'blur' ];\n\t\tthis.useCapture = true;\n\t\tconst document = this.document;\n\n\t\tdocument.on( 'focus', () => {\n\t\t\tdocument.isFocused = true;\n\n\t\t\t// Unfortunately native `selectionchange` event is fired asynchronously.\n\t\t\t// We need to wait until `SelectionObserver` handle the event and then render. Otherwise rendering will\n\t\t\t// overwrite new DOM selection with selection from the view.\n\t\t\t// See https://github.com/ckeditor/ckeditor5-engine/issues/795 for more details.\n\t\t\t// Long timeout is needed to solve #676 and https://github.com/ckeditor/ckeditor5-engine/issues/1157 issues.\n\t\t\t//\n\t\t\t// Using `view.change()` instead of `view.forceRender()` to prevent double rendering\n\t\t\t// in a situation where `selectionchange` already caused selection change.\n\t\t\tthis._renderTimeoutId = setTimeout( () => view.change( () => {} ), 50 );\n\t\t} );\n\n\t\tdocument.on( 'blur', ( evt, data ) => {\n\t\t\tconst selectedEditable = document.selection.editableElement;\n\n\t\t\tif ( selectedEditable === null || selectedEditable === data.target ) {\n\t\t\t\tdocument.isFocused = false;\n\n\t\t\t\t// Re-render the document to update view elements\n\t\t\t\t// (changing document.isFocused already marked view as changed since last rendering).\n\t\t\t\tview.change( () => {} );\n\t\t\t}\n\t\t} );\n\n\t\t/**\n\t\t * Identifier of the timeout currently used by focus listener to delay rendering execution.\n\t\t *\n\t\t * @private\n\t\t * @member {Number} #_renderTimeoutId\n\t\t */\n\t}\n\n\tonDomEvent( domEvent ) {\n\t\tthis.fire( domEvent.type, domEvent );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdestroy() {\n\t\tif ( this._renderTimeoutId ) {\n\t\t\tclearTimeout( this._renderTimeoutId );\n\t\t}\n\n\t\tsuper.destroy();\n\t}\n}\n\n/**\n * Fired when one of the editables gets focus.\n *\n * Introduced by {@link module:engine/view/observer/focusobserver~FocusObserver}.\n *\n * Note that because {@link module:engine/view/observer/focusobserver~FocusObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/focusobserver~FocusObserver\n * @event module:engine/view/document~Document#event:focus\n * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.\n */\n\n/**\n * Fired when one of the editables loses focus.\n *\n * Introduced by {@link module:engine/view/observer/focusobserver~FocusObserver}.\n *\n * Note that because {@link module:engine/view/observer/focusobserver~FocusObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/focusobserver~FocusObserver\n * @event module:engine/view/document~Document#event:blur\n * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/compositionobserver\n */\n\nimport DomEventObserver from './domeventobserver';\n\n/**\n * {@link module:engine/view/document~Document#event:compositionstart Compositionstart},\n * {@link module:engine/view/document~Document#event:compositionupdate compositionupdate} and\n * {@link module:engine/view/document~Document#event:compositionend compositionend} events observer.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n *\n * @extends module:engine/view/observer/domeventobserver~DomEventObserver\n */\nexport default class CompositionObserver extends DomEventObserver {\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\tthis.domEventType = [ 'compositionstart', 'compositionupdate', 'compositionend' ];\n\t\tconst document = this.document;\n\n\t\tdocument.on( 'compositionstart', () => {\n\t\t\tdocument.isComposing = true;\n\t\t} );\n\n\t\tdocument.on( 'compositionend', () => {\n\t\t\tdocument.isComposing = false;\n\t\t} );\n\t}\n\n\tonDomEvent( domEvent ) {\n\t\tthis.fire( domEvent.type, domEvent );\n\t}\n}\n\n/**\n * Fired when composition starts inside one of the editables.\n *\n * Introduced by {@link module:engine/view/observer/compositionobserver~CompositionObserver}.\n *\n * Note that because {@link module:engine/view/observer/compositionobserver~CompositionObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/compositionobserver~CompositionObserver\n * @event module:engine/view/document~Document#event:compositionstart\n * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.\n */\n\n/**\n * Fired when composition is updated inside one of the editables.\n *\n * Introduced by {@link module:engine/view/observer/compositionobserver~CompositionObserver}.\n *\n * Note that because {@link module:engine/view/observer/compositionobserver~CompositionObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/compositionobserver~CompositionObserver\n * @event module:engine/view/document~Document#event:compositionupdate\n * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.\n */\n\n/**\n * Fired when composition ends inside one of the editables.\n *\n * Introduced by {@link module:engine/view/observer/compositionobserver~CompositionObserver}.\n *\n * Note that because {@link module:engine/view/observer/compositionobserver~CompositionObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/compositionobserver~CompositionObserver\n * @event module:engine/view/document~Document#event:compositionend\n * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module engine/view/observer/inputobserver\n */\n\nimport DomEventObserver from './domeventobserver';\n\n/**\n * Observer for events connected with data input.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n *\n * @extends module:engine/view/observer/domeventobserver~DomEventObserver\n */\nexport default class InputObserver extends DomEventObserver {\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\tthis.domEventType = [ 'beforeinput' ];\n\t}\n\n\tonDomEvent( domEvent ) {\n\t\tthis.fire( domEvent.type, domEvent );\n\t}\n}\n\n/**\n * Fired before browser inputs (or deletes) some data.\n *\n * This event is available only on browsers which support DOM `beforeinput` event.\n *\n * Introduced by {@link module:engine/view/observer/inputobserver~InputObserver}.\n *\n * Note that because {@link module:engine/view/observer/inputobserver~InputObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @see module:engine/view/observer/inputobserver~InputObserver\n * @event module:engine/view/document~Document#event:beforeinput\n * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.\n */\n","import baseGetTag from './_baseGetTag.js';\nimport isArray from './isArray.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nexport default isString;\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/createelement\n */\n\nimport isIterable from '../isiterable';\nimport { isString } from 'lodash-es';\n\n/**\n * Creates element with attributes and children.\n *\n *\t\tcreateElement( document, 'p' ); // <p>\n *\t\tcreateElement( document, 'p', { class: 'foo' } ); // <p class=\"foo\">\n *\t\tcreateElement( document, 'p', null, 'foo' ); // <p>foo</p>\n *\t\tcreateElement( document, 'p', null, [ 'foo', createElement( document, 'img' ) ] ); // <p>foo<img></p>\n *\n * @param {Document} doc Document used to create element.\n * @param {String} name Name of the element.\n * @param {Object} [attributes] Object keys will become attributes keys and object values will became attributes values.\n * @param {Node|String|Array.<Node|String>} [children] Child or array of children. Strings will be automatically turned\n * into Text nodes.\n * @returns {Element} Created element.\n */\nexport default function createElement( doc, name, attributes = {}, children = [] ) {\n\tconst namespace = attributes && attributes.xmlns;\n\tconst element = namespace ? doc.createElementNS( namespace, name ) : doc.createElement( name );\n\n\tfor ( const key in attributes ) {\n\t\telement.setAttribute( key, attributes[ key ] );\n\t}\n\n\tif ( isString( children ) || !isIterable( children ) ) {\n\t\tchildren = [ children ];\n\t}\n\n\tfor ( let child of children ) {\n\t\tif ( isString( child ) ) {\n\t\t\tchild = doc.createTextNode( child );\n\t\t}\n\n\t\telement.appendChild( child );\n\t}\n\n\treturn element;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/isrange\n */\n\n/**\n * Checks if the object is a native DOM Range.\n *\n * @param {*} obj\n * @returns {Boolean}\n */\nexport default function isRange( obj ) {\n\treturn Object.prototype.toString.apply( obj ) == '[object Range]';\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/getborderwidths\n */\n\n/**\n * Returns an object containing CSS border widths of a specified HTML element.\n *\n * @param {HTMLElement} element An element which has CSS borders.\n * @returns {Object} An object containing `top`, `left`, `right` and `bottom` properties\n * with numerical values of the `border-[top,left,right,bottom]-width` CSS styles.\n */\nexport default function getBorderWidths( element ) {\n\t// Call getComputedStyle on the window the element document belongs to.\n\tconst style = element.ownerDocument.defaultView.getComputedStyle( element );\n\n\treturn {\n\t\ttop: parseInt( style.borderTopWidth, 10 ),\n\t\tright: parseInt( style.borderRightWidth, 10 ),\n\t\tbottom: parseInt( style.borderBottomWidth, 10 ),\n\t\tleft: parseInt( style.borderLeftWidth, 10 )\n\t};\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/rect\n */\n\nimport isRange from './isrange';\nimport isWindow from './iswindow';\nimport getBorderWidths from './getborderwidths';\nimport isText from './istext';\nimport { isElement } from 'lodash-es';\n\nconst rectProperties = [ 'top', 'right', 'bottom', 'left', 'width', 'height' ];\n\n/**\n * A helper class representing a `ClientRect` object, e.g. value returned by\n * the native `object.getBoundingClientRect()` method. Provides a set of methods\n * to manipulate the rect and compare it against other rect instances.\n */\nexport default class Rect {\n\t/**\n\t * Creates an instance of rect.\n\t *\n\t *\t\t// Rect of an HTMLElement.\n\t *\t\tconst rectA = new Rect( document.body );\n\t *\n\t *\t\t// Rect of a DOM Range.\n\t *\t\tconst rectB = new Rect( document.getSelection().getRangeAt( 0 ) );\n\t *\n\t *\t\t// Rect of a window (web browser viewport).\n\t *\t\tconst rectC = new Rect( window );\n\t *\n\t *\t\t// Rect out of an object.\n\t *\t\tconst rectD = new Rect( { top: 0, right: 10, bottom: 10, left: 0, width: 10, height: 10 } );\n\t *\n\t *\t\t// Rect out of another Rect instance.\n\t *\t\tconst rectE = new Rect( rectD );\n\t *\n\t *\t\t// Rect out of a ClientRect.\n\t *\t\tconst rectF = new Rect( document.body.getClientRects().item( 0 ) );\n\t *\n\t * **Note**: By default a rect of an HTML element includes its CSS borders and scrollbars (if any)\n\t * ant the rect of a `window` includes scrollbars too. Use {@link #excludeScrollbarsAndBorders}\n\t * to get the inner part of the rect.\n\t *\n\t * @param {HTMLElement|Range|Window|ClientRect|DOMRect|module:utils/dom/rect~Rect|Object} source A source object to create the rect.\n\t */\n\tconstructor( source ) {\n\t\tconst isSourceRange = isRange( source );\n\n\t\t/**\n\t\t * The object this rect is for.\n\t\t *\n\t\t * @protected\n\t\t * @readonly\n\t\t * @member {HTMLElement|Range|Window|ClientRect|DOMRect|module:utils/dom/rect~Rect|Object} #_source\n\t\t */\n\t\tObject.defineProperty( this, '_source', {\n\t\t\t// If the source is a Rect instance, copy it's #_source.\n\t\t\tvalue: source._source || source,\n\t\t\twritable: true,\n\t\t\tenumerable: false\n\t\t} );\n\n\t\tif ( isElement( source ) || isSourceRange ) {\n\t\t\t// The `Rect` class depends on `getBoundingClientRect` and `getClientRects` DOM methods. If the source\n\t\t\t// of a rect in an HTML element or a DOM range but it does not belong to any rendered DOM tree, these methods\n\t\t\t// will fail to obtain the geometry and the rect instance makes little sense to the features using it.\n\t\t\t// To get rid of this warning make sure the source passed to the constructor is a descendant of `window.document.body`.\n\t\t\t// @if CK_DEBUG // const sourceNode = isSourceRange ? source.startContainer : source;\n\t\t\t// @if CK_DEBUG // if ( !sourceNode.ownerDocument || !sourceNode.ownerDocument.body.contains( sourceNode ) ) {\n\t\t\t// @if CK_DEBUG // \tconsole.warn(\n\t\t\t// @if CK_DEBUG // \t\t'rect-source-not-in-dom: The source of this rect does not belong to any rendered DOM tree.',\n\t\t\t// @if CK_DEBUG // \t\t{ source } );\n\t\t\t// @if CK_DEBUG // }\n\n\t\t\tif ( isSourceRange ) {\n\t\t\t\tconst rangeRects = Rect.getDomRangeRects( source );\n\t\t\t\tcopyRectProperties( this, Rect.getBoundingRect( rangeRects ) );\n\t\t\t} else {\n\t\t\t\tcopyRectProperties( this, source.getBoundingClientRect() );\n\t\t\t}\n\t\t} else if ( isWindow( source ) ) {\n\t\t\tconst { innerWidth, innerHeight } = source;\n\n\t\t\tcopyRectProperties( this, {\n\t\t\t\ttop: 0,\n\t\t\t\tright: innerWidth,\n\t\t\t\tbottom: innerHeight,\n\t\t\t\tleft: 0,\n\t\t\t\twidth: innerWidth,\n\t\t\t\theight: innerHeight\n\t\t\t} );\n\t\t} else {\n\t\t\tcopyRectProperties( this, source );\n\t\t}\n\n\t\t/**\n\t\t * The \"top\" value of the rect.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Number} #top\n\t\t */\n\n\t\t/**\n\t\t * The \"right\" value of the rect.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Number} #right\n\t\t */\n\n\t\t/**\n\t\t * The \"bottom\" value of the rect.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Number} #bottom\n\t\t */\n\n\t\t/**\n\t\t * The \"left\" value of the rect.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Number} #left\n\t\t */\n\n\t\t/**\n\t\t * The \"width\" value of the rect.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Number} #width\n\t\t */\n\n\t\t/**\n\t\t * The \"height\" value of the rect.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Number} #height\n\t\t */\n\t}\n\n\t/**\n\t * Returns a clone of the rect.\n\t *\n\t * @returns {module:utils/dom/rect~Rect} A cloned rect.\n\t */\n\tclone() {\n\t\treturn new Rect( this );\n\t}\n\n\t/**\n\t * Moves the rect so that its upper–left corner lands in desired `[ x, y ]` location.\n\t *\n\t * @param {Number} x Desired horizontal location.\n\t * @param {Number} y Desired vertical location.\n\t * @returns {module:utils/dom/rect~Rect} A rect which has been moved.\n\t */\n\tmoveTo( x, y ) {\n\t\tthis.top = y;\n\t\tthis.right = x + this.width;\n\t\tthis.bottom = y + this.height;\n\t\tthis.left = x;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Moves the rect in–place by a dedicated offset.\n\t *\n\t * @param {Number} x A horizontal offset.\n\t * @param {Number} y A vertical offset\n\t * @returns {module:utils/dom/rect~Rect} A rect which has been moved.\n\t */\n\tmoveBy( x, y ) {\n\t\tthis.top += y;\n\t\tthis.right += x;\n\t\tthis.left += x;\n\t\tthis.bottom += y;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns a new rect a a result of intersection with another rect.\n\t *\n\t * @param {module:utils/dom/rect~Rect} anotherRect\n\t * @returns {module:utils/dom/rect~Rect}\n\t */\n\tgetIntersection( anotherRect ) {\n\t\tconst rect = {\n\t\t\ttop: Math.max( this.top, anotherRect.top ),\n\t\t\tright: Math.min( this.right, anotherRect.right ),\n\t\t\tbottom: Math.min( this.bottom, anotherRect.bottom ),\n\t\t\tleft: Math.max( this.left, anotherRect.left )\n\t\t};\n\n\t\trect.width = rect.right - rect.left;\n\t\trect.height = rect.bottom - rect.top;\n\n\t\tif ( rect.width < 0 || rect.height < 0 ) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn new Rect( rect );\n\t\t}\n\t}\n\n\t/**\n\t * Returns the area of intersection with another rect.\n\t *\n\t * @param {module:utils/dom/rect~Rect} anotherRect [description]\n\t * @returns {Number} Area of intersection.\n\t */\n\tgetIntersectionArea( anotherRect ) {\n\t\tconst rect = this.getIntersection( anotherRect );\n\n\t\tif ( rect ) {\n\t\t\treturn rect.getArea();\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the area of the rect.\n\t *\n\t * @returns {Number}\n\t */\n\tgetArea() {\n\t\treturn this.width * this.height;\n\t}\n\n\t/**\n\t * Returns a new rect, a part of the original rect, which is actually visible to the user,\n\t * e.g. an original rect cropped by parent element rects which have `overflow` set in CSS\n\t * other than `\"visible\"`.\n\t *\n\t * If there's no such visible rect, which is when the rect is limited by one or many of\n\t * the ancestors, `null` is returned.\n\t *\n\t * @returns {module:utils/dom/rect~Rect|null} A visible rect instance or `null`, if there's none.\n\t */\n\tgetVisible() {\n\t\tconst source = this._source;\n\t\tlet visibleRect = this.clone();\n\n\t\t// There's no ancestor to crop <body> with the overflow.\n\t\tif ( !isBody( source ) ) {\n\t\t\tlet parent = source.parentNode || source.commonAncestorContainer;\n\n\t\t\t// Check the ancestors all the way up to the <body>.\n\t\t\twhile ( parent && !isBody( parent ) ) {\n\t\t\t\tconst parentRect = new Rect( parent );\n\t\t\t\tconst intersectionRect = visibleRect.getIntersection( parentRect );\n\n\t\t\t\tif ( intersectionRect ) {\n\t\t\t\t\tif ( intersectionRect.getArea() < visibleRect.getArea() ) {\n\t\t\t\t\t\t// Reduce the visible rect to the intersection.\n\t\t\t\t\t\tvisibleRect = intersectionRect;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// There's no intersection, the rect is completely invisible.\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tparent = parent.parentNode;\n\t\t\t}\n\t\t}\n\n\t\treturn visibleRect;\n\t}\n\n\t/**\n\t * Checks if all property values ({@link #top}, {@link #left}, {@link #right},\n\t * {@link #bottom}, {@link #width} and {@link #height}) are the equal in both rect\n\t * instances.\n\t *\n\t * @param {module:utils/dom/rect~Rect} rect A rect instance to compare with.\n\t * @returns {Boolean} `true` when Rects are equal. `false` otherwise.\n\t */\n\tisEqual( anotherRect ) {\n\t\tfor ( const prop of rectProperties ) {\n\t\t\tif ( this[ prop ] !== anotherRect[ prop ] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks whether a rect fully contains another rect instance.\n\t *\n\t * @param {module:utils/dom/rect~Rect} anotherRect\n\t * @returns {Boolean} `true` if contains, `false` otherwise.\n\t */\n\tcontains( anotherRect ) {\n\t\tconst intersectRect = this.getIntersection( anotherRect );\n\n\t\treturn !!( intersectRect && intersectRect.isEqual( anotherRect ) );\n\t}\n\n\t/**\n\t * Excludes scrollbars and CSS borders from the rect.\n\t *\n\t * * Borders are removed when {@link #_source} is an HTML element.\n\t * * Scrollbars are excluded from HTML elements and the `window`.\n\t *\n\t * @returns {module:utils/dom/rect~Rect} A rect which has been updated.\n\t */\n\texcludeScrollbarsAndBorders() {\n\t\tconst source = this._source;\n\t\tlet scrollBarWidth, scrollBarHeight, direction;\n\n\t\tif ( isWindow( source ) ) {\n\t\t\tscrollBarWidth = source.innerWidth - source.document.documentElement.clientWidth;\n\t\t\tscrollBarHeight = source.innerHeight - source.document.documentElement.clientHeight;\n\t\t\tdirection = source.getComputedStyle( source.document.documentElement ).direction;\n\t\t} else {\n\t\t\tconst borderWidths = getBorderWidths( this._source );\n\n\t\t\tscrollBarWidth = source.offsetWidth - source.clientWidth - borderWidths.left - borderWidths.right;\n\t\t\tscrollBarHeight = source.offsetHeight - source.clientHeight - borderWidths.top - borderWidths.bottom;\n\t\t\tdirection = source.ownerDocument.defaultView.getComputedStyle( source ).direction;\n\n\t\t\tthis.left += borderWidths.left;\n\t\t\tthis.top += borderWidths.top;\n\t\t\tthis.right -= borderWidths.right;\n\t\t\tthis.bottom -= borderWidths.bottom;\n\t\t\tthis.width = this.right - this.left;\n\t\t\tthis.height = this.bottom - this.top;\n\t\t}\n\n\t\tthis.width -= scrollBarWidth;\n\n\t\tif ( direction === 'ltr' ) {\n\t\t\tthis.right -= scrollBarWidth;\n\t\t} else {\n\t\t\tthis.left += scrollBarWidth;\n\t\t}\n\n\t\tthis.height -= scrollBarHeight;\n\t\tthis.bottom -= scrollBarHeight;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns an array of rects of the given native DOM Range.\n\t *\n\t * @param {Range} range A native DOM range.\n\t * @returns {Array.<module:utils/dom/rect~Rect>} DOM Range rects.\n\t */\n\tstatic getDomRangeRects( range ) {\n\t\tconst rects = [];\n\t\t// Safari does not iterate over ClientRectList using for...of loop.\n\t\tconst clientRects = Array.from( range.getClientRects() );\n\n\t\tif ( clientRects.length ) {\n\t\t\tfor ( const rect of clientRects ) {\n\t\t\t\trects.push( new Rect( rect ) );\n\t\t\t}\n\t\t}\n\t\t// If there's no client rects for the Range, use parent container's bounding rect\n\t\t// instead and adjust rect's width to simulate the actual geometry of such range.\n\t\t// https://github.com/ckeditor/ckeditor5-utils/issues/153\n\t\t// https://github.com/ckeditor/ckeditor5-ui/issues/317\n\t\telse {\n\t\t\tlet startContainer = range.startContainer;\n\n\t\t\tif ( isText( startContainer ) ) {\n\t\t\t\tstartContainer = startContainer.parentNode;\n\t\t\t}\n\n\t\t\tconst rect = new Rect( startContainer.getBoundingClientRect() );\n\t\t\trect.right = rect.left;\n\t\t\trect.width = 0;\n\n\t\t\trects.push( rect );\n\t\t}\n\n\t\treturn rects;\n\t}\n\n\t/**\n\t * Returns a bounding rectangle that contains all the given `rects`.\n\t *\n\t * @param {Iterable.<module:utils/dom/rect~Rect>} rects A list of rectangles that should be contained in the result rectangle.\n\t * @returns {module:utils/dom/rect~Rect|null} Bounding rectangle or `null` if no `rects` were given.\n\t */\n\tstatic getBoundingRect( rects ) {\n\t\tconst boundingRectData = {\n\t\t\tleft: Number.POSITIVE_INFINITY,\n\t\t\ttop: Number.POSITIVE_INFINITY,\n\t\t\tright: Number.NEGATIVE_INFINITY,\n\t\t\tbottom: Number.NEGATIVE_INFINITY\n\t\t};\n\t\tlet rectangleCount = 0;\n\n\t\tfor ( const rect of rects ) {\n\t\t\trectangleCount++;\n\n\t\t\tboundingRectData.left = Math.min( boundingRectData.left, rect.left );\n\t\t\tboundingRectData.top = Math.min( boundingRectData.top, rect.top );\n\t\t\tboundingRectData.right = Math.max( boundingRectData.right, rect.right );\n\t\t\tboundingRectData.bottom = Math.max( boundingRectData.bottom, rect.bottom );\n\t\t}\n\n\t\tif ( rectangleCount == 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tboundingRectData.width = boundingRectData.right - boundingRectData.left;\n\t\tboundingRectData.height = boundingRectData.bottom - boundingRectData.top;\n\n\t\treturn new Rect( boundingRectData );\n\t}\n}\n\n// Acquires all the rect properties from the passed source.\n//\n// @private\n// @param {module:utils/dom/rect~Rect} rect\n// @param {ClientRect|module:utils/dom/rect~Rect|Object} source\nfunction copyRectProperties( rect, source ) {\n\tfor ( const p of rectProperties ) {\n\t\trect[ p ] = source[ p ];\n\t}\n}\n\n// Checks if provided object is a <body> HTML element.\n//\n// @private\n// @param {HTMLElement|Range} elementOrRange\n// @returns {Boolean}\nfunction isBody( elementOrRange ) {\n\tif ( !isElement( elementOrRange ) ) {\n\t\treturn false;\n\t}\n\n\treturn elementOrRange === elementOrRange.ownerDocument.body;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/resizeobserver\n */\n\n/* globals setTimeout, clearTimeout */\n\nimport mix from '../mix';\nimport global from './global';\nimport Rect from './rect';\nimport DomEmitterMixin from './emittermixin';\n\nconst RESIZE_CHECK_INTERVAL = 100;\n\n/**\n * A helper class which instances allow performing custom actions when native DOM elements are resized.\n *\n *\t\tconst editableElement = editor.editing.view.getDomRoot();\n *\n *\t\tconst observer = new ResizeObserver( editableElement, entry => {\n *\t\t\tconsole.log( 'The editable element has been resized in DOM.' );\n *\t\t\tconsole.log( entry.target ); // -> editableElement\n *\t\t\tconsole.log( entry.contentRect.width ); // -> e.g. '423px'\n *\t\t} );\n *\n * By default, it uses the [native DOM resize observer](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)\n * under the hood and in browsers that do not support the native API yet, a polyfilled observer is\n * used instead.\n */\nexport default class ResizeObserver {\n\t/**\n\t * Creates an instance of the `ResizeObserver` class.\n\t *\n\t * @param {HTMLElement} element A DOM element that is to be observed for resizing. Note that\n\t * the element must be visible (i.e. not detached from DOM) for the observer to work.\n\t * @param {Function} callback A function called when the observed element was resized. It passes\n\t * the [`ResizeObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry)\n\t * object with information about the resize event.\n\t */\n\tconstructor( element, callback ) {\n\t\t// **Note**: For the maximum performance, this class ensures only a single instance of the native\n\t\t// (or polyfilled) observer is used no matter how many instances of this class were created.\n\t\tif ( !ResizeObserver._observerInstance ) {\n\t\t\tResizeObserver._createObserver();\n\t\t}\n\n\t\t/**\n\t\t * The element observer by this observer.\n\t\t *\n\t\t * @readonly\n\t\t * @private\n\t\t * @member {HTMLElement}\n\t\t */\n\t\tthis._element = element;\n\n\t\t/**\n\t\t * The callback executed each time {@link #_element} is resized.\n\t\t *\n\t\t * @readonly\n\t\t * @private\n\t\t * @member {Function}\n\t\t */\n\t\tthis._callback = callback;\n\n\t\tResizeObserver._addElementCallback( element, callback );\n\t\tResizeObserver._observerInstance.observe( element );\n\t}\n\n\t/**\n\t * Destroys the observer which disables the `callback` passed to the {@link #constructor}.\n\t */\n\tdestroy() {\n\t\tResizeObserver._deleteElementCallback( this._element, this._callback );\n\t}\n\n\t/**\n\t * Registers a new resize callback for the DOM element.\n\t *\n\t * @private\n\t * @static\n\t * @param {HTMLElement} element\n\t * @param {Function} callback\n\t */\n\tstatic _addElementCallback( element, callback ) {\n\t\tif ( !ResizeObserver._elementCallbacks ) {\n\t\t\tResizeObserver._elementCallbacks = new Map();\n\t\t}\n\n\t\tlet callbacks = ResizeObserver._elementCallbacks.get( element );\n\n\t\tif ( !callbacks ) {\n\t\t\tcallbacks = new Set();\n\t\t\tResizeObserver._elementCallbacks.set( element, callbacks );\n\t\t}\n\n\t\tcallbacks.add( callback );\n\t}\n\n\t/**\n\t * Removes a resize callback from the DOM element. If no callbacks are left\n\t * for the element, it removes the element from the native observer.\n\t *\n\t * @private\n\t * @static\n\t * @param {HTMLElement} element\n\t * @param {Function} callback\n\t */\n\tstatic _deleteElementCallback( element, callback ) {\n\t\tconst callbacks = ResizeObserver._getElementCallbacks( element );\n\n\t\t// Remove the element callback. Check if exist first in case someone\n\t\t// called destroy() twice.\n\t\tif ( callbacks ) {\n\t\t\tcallbacks.delete( callback );\n\n\t\t\t// If no callbacks left for the element, also remove the element.\n\t\t\tif ( !callbacks.size ) {\n\t\t\t\tResizeObserver._elementCallbacks.delete( element );\n\t\t\t\tResizeObserver._observerInstance.unobserve( element );\n\t\t\t}\n\t\t}\n\n\t\tif ( ResizeObserver._elementCallbacks && !ResizeObserver._elementCallbacks.size ) {\n\t\t\tResizeObserver._observerInstance = null;\n\t\t\tResizeObserver._elementCallbacks = null;\n\t\t}\n\t}\n\n\t/**\n\t * Returns are registered resize callbacks for the DOM element.\n\t *\n\t * @private\n\t * @static\n\t * @param {HTMLElement} element\n\t * @returns {Set.<HTMLElement>|null}\n\t */\n\tstatic _getElementCallbacks( element ) {\n\t\tif ( !ResizeObserver._elementCallbacks ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn ResizeObserver._elementCallbacks.get( element );\n\t}\n\n\t/**\n\t * Creates the single native observer shared across all `ResizeObserver` instances.\n\t * If the browser does not support the native API, it creates a polyfill.\n\t *\n\t * @private\n\t * @static\n\t */\n\tstatic _createObserver() {\n\t\tlet ObserverConstructor;\n\n\t\t// TODO: One day, the `ResizeObserver` API will be supported in all modern web browsers.\n\t\t// When it happens, this module will no longer make sense and should be removed and\n\t\t// the native implementation should be used across the project to save bytes.\n\t\t// Check out https://caniuse.com/#feat=resizeobserver.\n\t\tif ( typeof global.window.ResizeObserver === 'function' ) {\n\t\t\tObserverConstructor = global.window.ResizeObserver;\n\t\t} else {\n\t\t\tObserverConstructor = ResizeObserverPolyfill;\n\t\t}\n\n\t\tResizeObserver._observerInstance = new ObserverConstructor( entries => {\n\t\t\tfor ( const entry of entries ) {\n\t\t\t\tconst callbacks = ResizeObserver._getElementCallbacks( entry.target );\n\n\t\t\t\tif ( callbacks ) {\n\t\t\t\t\tfor ( const callback of callbacks ) {\n\t\t\t\t\t\tcallback( entry );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * The single native observer instance (or polyfill in browsers that do not support the API)\n * shared across all {@link module:utils/dom/resizeobserver~ResizeObserver} instances.\n *\n * @static\n * @protected\n * @readonly\n * @property {Object|null} module:utils/dom/resizeobserver~ResizeObserver#_observerInstance\n */\nResizeObserver._observerInstance = null;\n\n/**\n * A mapping of native DOM elements and their callbacks shared across all\n * {@link module:utils/dom/resizeobserver~ResizeObserver} instances.\n *\n * @static\n * @private\n * @readonly\n * @property {Map.<HTMLElement,Set>|null} module:utils/dom/resizeobserver~ResizeObserver#_elementCallbacks\n */\nResizeObserver._elementCallbacks = null;\n\n/**\n * A polyfill class for the native [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver).\n *\n * @private\n * @mixes module:utils/domemittermixin~DomEmitterMixin\n */\nclass ResizeObserverPolyfill {\n\t/**\n\t * Creates an instance of the {@link module:utils/dom/resizeobserver~ResizeObserverPolyfill} class.\n\t *\n\t * It synchronously reacts to resize of the window to check if observed elements' geometry changed.\n\t *\n\t * Additionally, the polyfilled observer uses a timeout to check if observed elements' geometry has changed\n\t * in some other way (dynamic layouts, scrollbars showing up, etc.), so its response can also be asynchronous.\n\t *\n\t * @param {Function} callback A function called when any observed element was resized. Refer to the\n\t * native [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver) API to\n\t * learn more.\n\t */\n\tconstructor( callback ) {\n\t\t/**\n\t\t * A function called when any observed {@link #_elements element} was resized.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {Function}\n\t\t */\n\t\tthis._callback = callback;\n\n\t\t/**\n\t\t * DOM elements currently observed by the observer instance.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {Set}\n\t\t */\n\t\tthis._elements = new Set();\n\n\t\t/**\n\t\t * Cached DOM {@link #_elements elements} bounding rects to compare to upon the next check.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {Map.<HTMLElement,module:utils/dom/rect~Rect>}\n\t\t */\n\t\tthis._previousRects = new Map();\n\n\t\t/**\n\t\t * An UID of the current timeout upon which the observed elements rects\n\t\t * will be compared to the {@link #_previousRects previous rects} from the past.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {Map.<HTMLElement,module:utils/dom/rect~Rect>}\n\t\t */\n\t\tthis._periodicCheckTimeout = null;\n\t}\n\n\t/**\n\t * Starts observing a DOM element.\n\t *\n\t * Learn more in the\n\t * [native method documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe).\n\t *\n\t * @param {HTMLElement} element\n\t */\n\tobserve( element ) {\n\t\tthis._elements.add( element );\n\n\t\tthis._checkElementRectsAndExecuteCallback();\n\n\t\tif ( this._elements.size === 1 ) {\n\t\t\tthis._startPeriodicCheck();\n\t\t}\n\t}\n\n\t/**\n\t * Stops observing a DOM element.\n\t *\n\t * Learn more in the\n\t * [native method documentation](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/unobserve).\n\t *\n\t * @param {HTMLElement} element\n\t */\n\tunobserve( element ) {\n\t\tthis._elements.delete( element );\n\t\tthis._previousRects.delete( element );\n\n\t\tif ( !this._elements.size ) {\n\t\t\tthis._stopPeriodicCheck();\n\t\t}\n\t}\n\n\t/**\n\t * When called, the observer calls the {@link #_callback resize callback} for all observed\n\t * {@link #_elements elements} but also starts checking periodically for changes in the elements' geometry.\n\t * If some are detected, {@link #_callback resize callback} is called for relevant elements that were resized.\n\t *\n\t * @protected\n\t */\n\t_startPeriodicCheck() {\n\t\tconst periodicCheck = () => {\n\t\t\tthis._checkElementRectsAndExecuteCallback();\n\t\t\tthis._periodicCheckTimeout = setTimeout( periodicCheck, RESIZE_CHECK_INTERVAL );\n\t\t};\n\n\t\tthis.listenTo( global.window, 'resize', () => {\n\t\t\tthis._checkElementRectsAndExecuteCallback();\n\t\t} );\n\n\t\tthis._periodicCheckTimeout = setTimeout( periodicCheck, RESIZE_CHECK_INTERVAL );\n\t}\n\n\t/**\n\t * Stops checking for changes in all observed {@link #_elements elements} geometry.\n\t *\n\t * @protected\n\t */\n\t_stopPeriodicCheck() {\n\t\tclearTimeout( this._periodicCheckTimeout );\n\t\tthis.stopListening();\n\t\tthis._previousRects.clear();\n\t}\n\n\t/**\n\t * Checks if the geometry of any of the {@link #_elements element} has changed. If so, executes\n\t * the {@link #_callback resize callback} with element geometry data.\n\t *\n\t * @protected\n\t */\n\t_checkElementRectsAndExecuteCallback() {\n\t\tconst entries = [];\n\n\t\tfor ( const element of this._elements ) {\n\t\t\tif ( this._hasRectChanged( element ) ) {\n\t\t\t\tentries.push( {\n\t\t\t\t\ttarget: element,\n\t\t\t\t\tcontentRect: this._previousRects.get( element )\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\tif ( entries.length ) {\n\t\t\tthis._callback( entries );\n\t\t}\n\t}\n\n\t/**\n\t * Compares the DOM element geometry to the {@link #_previousRects cached geometry} from the past.\n\t * Returns `true` if geometry has changed or the element is checked for the first time.\n\t *\n\t * @protected\n\t * @param {HTMLElement} element\n\t * @returns {Boolean}\n\t */\n\t_hasRectChanged( element ) {\n\t\tif ( !element.ownerDocument.body.contains( element ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst currentRect = new Rect( element );\n\t\tconst previousRect = this._previousRects.get( element );\n\n\t\t// The first check should always yield true despite no Previous rect to compare to.\n\t\t// The native ResizeObserver does that and... that makes sense. Sort of.\n\t\tconst hasChanged = !previousRect || !previousRect.isEqual( currentRect );\n\n\t\tthis._previousRects.set( element, currentRect );\n\n\t\treturn hasChanged;\n\t}\n}\n\nmix( ResizeObserverPolyfill, DomEmitterMixin );\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/setdatainelement\n */\n\n/* globals HTMLTextAreaElement */\n\n/**\n * Sets data in a given element.\n *\n * @param {HTMLElement} el The element in which the data will be set.\n * @param {String} data The data string.\n */\nexport default function setDataInElement( el, data ) {\n\tif ( el instanceof HTMLTextAreaElement ) {\n\t\tel.value = data;\n\t}\n\n\tel.innerHTML = data;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/isvisible\n */\n\n/**\n * Checks whether the element is visible to the user in DOM:\n *\n * * connected to the root of the document,\n * * has no `display: none`,\n * * has no ancestors with `display: none`.\n *\n * **Note**: This helper does not check whether the element is hidden by cropping, overflow, etc..\n * To check that, use {@link module:utils/dom/rect~Rect} instead.\n *\n * @param {HTMLElement|null|undefined} element\n * @returns {Boolean}\n */\nexport default function isVisible( element ) {\n\treturn !!( element && element.getClientRects && element.getClientRects().length );\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/first\n */\n\n/**\n * Returns first item of the given `iterable`.\n *\n * @param {Iterable.<*>} iterable\n * @returns {*}\n */\nexport default function first( iterable ) {\n\tconst iteratorItem = iterable.next();\n\n\tif ( iteratorItem.done ) {\n\t\treturn null;\n\t}\n\n\treturn iteratorItem.value;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* global setTimeout, clearTimeout */\n\n/**\n * @module utils/focustracker\n */\n\nimport DomEmitterMixin from './dom/emittermixin';\nimport ObservableMixin from './observablemixin';\nimport CKEditorError from './ckeditorerror';\nimport mix from './mix';\n\n/**\n * Allows observing a group of `HTMLElement`s whether at least one of them is focused.\n *\n * Used by the {@link module:core/editor/editor~Editor} in order to track whether the focus is still within the application,\n * or were used outside of its UI.\n *\n * **Note** `focus` and `blur` listeners use event capturing, so it is only needed to register wrapper `HTMLElement`\n * which contain other `focusable` elements. But note that this wrapper element has to be focusable too\n * (have e.g. `tabindex=\"-1\"`).\n *\n * Check out the {@glink framework/guides/deep-dive/ui/focus-tracking \"Deep dive into focus tracking\" guide} to learn more.\n *\n * @mixes module:utils/dom/emittermixin~EmitterMixin\n * @mixes module:utils/observablemixin~ObservableMixin\n */\nexport default class FocusTracker {\n\tconstructor() {\n\t\t/**\n\t\t * True when one of the registered elements is focused.\n\t\t *\n\t\t * @readonly\n\t\t * @observable\n\t\t * @member {Boolean} #isFocused\n\t\t */\n\t\tthis.set( 'isFocused', false );\n\n\t\t/**\n\t\t * The currently focused element.\n\t\t *\n\t\t * While {@link #isFocused `isFocused`} remains `true`, the focus can\n\t\t * move between different UI elements. This property tracks those\n\t\t * elements and tells which one is currently focused.\n\t\t *\n\t\t * @readonly\n\t\t * @observable\n\t\t * @member {HTMLElement|null} #focusedElement\n\t\t */\n\t\tthis.set( 'focusedElement', null );\n\n\t\t/**\n\t\t * List of registered elements.\n\t\t *\n\t\t * @private\n\t\t * @member {Set.<HTMLElement>}\n\t\t */\n\t\tthis._elements = new Set();\n\n\t\t/**\n\t\t * Event loop timeout.\n\t\t *\n\t\t * @private\n\t\t * @member {Number}\n\t\t */\n\t\tthis._nextEventLoopTimeout = null;\n\t}\n\n\t/**\n\t * Starts tracking the specified element.\n\t *\n\t * @param {HTMLElement} element\n\t */\n\tadd( element ) {\n\t\tif ( this._elements.has( element ) ) {\n\t\t\t/**\n\t\t\t * This element is already tracked by {@link module:utils/focustracker~FocusTracker}.\n\t\t\t *\n\t\t\t * @error focustracker-add-element-already-exist\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'focustracker-add-element-already-exist', this );\n\t\t}\n\n\t\tthis.listenTo( element, 'focus', () => this._focus( element ), { useCapture: true } );\n\t\tthis.listenTo( element, 'blur', () => this._blur(), { useCapture: true } );\n\t\tthis._elements.add( element );\n\t}\n\n\t/**\n\t * Stops tracking the specified element and stops listening on this element.\n\t *\n\t * @param {HTMLElement} element\n\t */\n\tremove( element ) {\n\t\tif ( element === this.focusedElement ) {\n\t\t\tthis._blur( element );\n\t\t}\n\n\t\tif ( this._elements.has( element ) ) {\n\t\t\tthis.stopListening( element );\n\t\t\tthis._elements.delete( element );\n\t\t}\n\t}\n\n\t/**\n\t * Destroys the focus tracker by:\n\t * - Disabling all event listeners attached to tracked elements.\n\t * - Removing all tracked elements that were previously added.\n\t */\n\tdestroy() {\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Stores currently focused element and set {#isFocused} as `true`.\n\t *\n\t * @private\n\t * @param {HTMLElement} element Element which has been focused.\n\t */\n\t_focus( element ) {\n\t\tclearTimeout( this._nextEventLoopTimeout );\n\n\t\tthis.focusedElement = element;\n\t\tthis.isFocused = true;\n\t}\n\n\t/**\n\t * Clears currently focused element and set {@link #isFocused} as `false`.\n\t * This method uses `setTimeout` to change order of fires `blur` and `focus` events.\n\t *\n\t * @private\n\t * @fires blur\n\t */\n\t_blur() {\n\t\tclearTimeout( this._nextEventLoopTimeout );\n\n\t\tthis._nextEventLoopTimeout = setTimeout( () => {\n\t\t\tthis.focusedElement = null;\n\t\t\tthis.isFocused = false;\n\t\t}, 0 );\n\t}\n\n\t/**\n\t * @event focus\n\t */\n\n\t/**\n\t * @event blur\n\t */\n}\n\nmix( FocusTracker, DomEmitterMixin );\nmix( FocusTracker, ObservableMixin );\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/keystrokehandler\n */\n\nimport DomEmitterMixin from './dom/emittermixin';\nimport { getCode, parseKeystroke } from './keyboard';\n\n/**\n * Keystroke handler allows registering callbacks for given keystrokes.\n *\n * The most frequent use of this class is through the {@link module:core/editor/editor~Editor#keystrokes `editor.keystrokes`}\n * property. It allows listening to keystrokes executed in the editing view:\n *\n *\t\teditor.keystrokes.set( 'Ctrl+A', ( keyEvtData, cancel ) => {\n *\t\t\tconsole.log( 'Ctrl+A has been pressed' );\n *\t\t\tcancel();\n *\t\t} );\n *\n * However, this utility class can be used in various part of the UI. For instance, a certain {@link module:ui/view~View}\n * can use it like this:\n *\n *\t\tclass MyView extends View {\n *\t\t\tconstructor() {\n *\t\t\t\tthis.keystrokes = new KeystrokeHandler();\n *\n * \t\t\t\tthis.keystrokes.set( 'tab', handleTabKey );\n *\t\t\t}\n *\n *\t\t\trender() {\n *\t\t\t\tsuper.render();\n *\n *\t\t\t\tthis.keystrokes.listenTo( this.element );\n *\t\t\t}\n *\t\t}\n *\n * That keystroke handler will listen to `keydown` events fired in this view's main element.\n *\n */\nexport default class KeystrokeHandler {\n\t/**\n\t * Creates an instance of the keystroke handler.\n\t */\n\tconstructor() {\n\t\t/**\n\t\t * Listener used to listen to events for easier keystroke handler destruction.\n\t\t *\n\t\t * @protected\n\t\t * @member {module:utils/dom/emittermixin~Emitter}\n\t\t */\n\t\tthis._listener = Object.create( DomEmitterMixin );\n\t}\n\n\t/**\n\t * Starts listening for `keydown` events from a given emitter.\n\t *\n\t * @param {module:utils/emittermixin~Emitter} emitter\n\t */\n\tlistenTo( emitter ) {\n\t\t// The #_listener works here as a kind of dispatcher. It groups the events coming from the same\n\t\t// keystroke so the listeners can be attached to them with different priorities.\n\t\t//\n\t\t// E.g. all the keystrokes with the `keyCode` of 42 coming from the `emitter` are propagated\n\t\t// as a `_keydown:42` event by the `_listener`. If there's a callback created by the `set`\n\t\t// method for this 42 keystroke, it listens to the `_listener#_keydown:42` event only and interacts\n\t\t// only with other listeners of this particular event, thus making it possible to prioritize\n\t\t// the listeners and safely cancel execution, when needed. Instead of duplicating the Emitter logic,\n\t\t// the KeystrokeHandler re–uses it to do its job.\n\t\tthis._listener.listenTo( emitter, 'keydown', ( evt, keyEvtData ) => {\n\t\t\tthis._listener.fire( '_keydown:' + getCode( keyEvtData ), keyEvtData );\n\t\t} );\n\t}\n\n\t/**\n\t * Registers a handler for the specified keystroke.\n\t *\n\t * @param {String|Array.<String|Number>} keystroke Keystroke defined in a format accepted by\n\t * the {@link module:utils/keyboard~parseKeystroke} function.\n\t * @param {Function} callback A function called with the\n\t * {@link module:engine/view/observer/keyobserver~KeyEventData key event data} object and\n\t * a helper funcion to call both `preventDefault()` and `stopPropagation()` on the underlying event.\n\t * @param {Object} [options={}] Additional options.\n\t * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of the keystroke\n\t * callback. The higher the priority value the sooner the callback will be executed. Keystrokes having the same priority\n\t * are called in the order they were added.\n\t */\n\tset( keystroke, callback, options = {} ) {\n\t\tconst keyCode = parseKeystroke( keystroke );\n\t\tconst priority = options.priority;\n\n\t\t// Execute the passed callback on KeystrokeHandler#_keydown.\n\t\t// TODO: https://github.com/ckeditor/ckeditor5-utils/issues/144\n\t\tthis._listener.listenTo( this._listener, '_keydown:' + keyCode, ( evt, keyEvtData ) => {\n\t\t\tcallback( keyEvtData, () => {\n\t\t\t\t// Stop the event in the DOM: no listener in the web page\n\t\t\t\t// will be triggered by this event.\n\t\t\t\tkeyEvtData.preventDefault();\n\t\t\t\tkeyEvtData.stopPropagation();\n\n\t\t\t\t// Stop the event in the KeystrokeHandler: no more callbacks\n\t\t\t\t// will be executed for this keystroke.\n\t\t\t\tevt.stop();\n\t\t\t} );\n\n\t\t\t// Mark this keystroke as handled by the callback. See: #press.\n\t\t\tevt.return = true;\n\t\t}, { priority } );\n\t}\n\n\t/**\n\t * Triggers a keystroke handler for a specified key combination, if such a keystroke was {@link #set defined}.\n\t *\n\t * @param {module:engine/view/observer/keyobserver~KeyEventData} keyEvtData Key event data.\n\t * @returns {Boolean} Whether the keystroke was handled.\n\t */\n\tpress( keyEvtData ) {\n\t\treturn !!this._listener.fire( '_keydown:' + getCode( keyEvtData ), keyEvtData );\n\t}\n\n\t/**\n\t * Destroys the keystroke handler.\n\t */\n\tdestroy() {\n\t\tthis._listener.stopListening();\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/observer/arrowkeysobserver\n */\n\nimport Observer from './observer';\nimport BubblingEventInfo from './bubblingeventinfo';\n\nimport { isArrowKeyCode } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Arrow keys observer introduces the {@link module:engine/view/document~Document#event:arrowKey `Document#arrowKey`} event.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n *\n * @extends module:engine/view/observer/observer~Observer\n */\nexport default class ArrowKeysObserver extends Observer {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( view ) {\n\t\tsuper( view );\n\n\t\tthis.document.on( 'keydown', ( event, data ) => {\n\t\t\tif ( this.isEnabled && isArrowKeyCode( data.keyCode ) ) {\n\t\t\t\tconst eventInfo = new BubblingEventInfo( this.document, 'arrowKey', this.document.selection.getFirstRange() );\n\n\t\t\t\tthis.document.fire( eventInfo, data );\n\n\t\t\t\tif ( eventInfo.stop.called ) {\n\t\t\t\t\tevent.stop();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tobserve() {}\n}\n\n/**\n * Event fired when the user presses an arrow keys.\n *\n * Introduced by {@link module:engine/view/observer/arrowkeysobserver~ArrowKeysObserver}.\n *\n * Note that because {@link module:engine/view/observer/arrowkeysobserver~ArrowKeysObserver} is attached by the\n * {@link module:engine/view/view~View} this event is available by default.\n *\n * @event module:engine/view/document~Document#event:arrowKey\n * @param {module:engine/view/observer/domeventdata~DomEventData} data\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module utils/dom/scroll\n */\n\nimport isRange from './isrange';\nimport Rect from './rect';\nimport isText from './istext';\n\nconst utils = {};\n\n/**\n * Makes any page `HTMLElement` or `Range` (`target`) visible inside the browser viewport.\n * This helper will scroll all `target` ancestors and the web browser viewport to reveal the target to\n * the user. If the `target` is already visible, nothing will happen.\n *\n * @param {HTMLElement|Range} options.target A target, which supposed to become visible to the user.\n * @param {Number} [options.viewportOffset] An offset from the edge of the viewport (in pixels)\n * the `target` will be moved by when the viewport is scrolled. It enhances the user experience\n * by keeping the `target` some distance from the edge of the viewport and thus making it easier to\n * read or edit by the user.\n */\nexport function scrollViewportToShowTarget( { target, viewportOffset = 0 } ) {\n\tconst targetWindow = getWindow( target );\n\tlet currentWindow = targetWindow;\n\tlet currentFrame = null;\n\n\t// Iterate over all windows, starting from target's parent window up to window#top.\n\twhile ( currentWindow ) {\n\t\tlet firstAncestorToScroll;\n\n\t\t// Let's scroll target's ancestors first to reveal it. Then, once the ancestor scrolls\n\t\t// settled down, the algorithm can eventually scroll the viewport of the current window.\n\t\t//\n\t\t// Note: If the current window is target's **original** window (e.g. the first one),\n\t\t// start scrolling the closest parent of the target. If not, scroll the closest parent\n\t\t// of an iframe that resides in the current window.\n\t\tif ( currentWindow == targetWindow ) {\n\t\t\tfirstAncestorToScroll = getParentElement( target );\n\t\t} else {\n\t\t\tfirstAncestorToScroll = getParentElement( currentFrame );\n\t\t}\n\n\t\t// Scroll the target's ancestors first. Once done, scrolling the viewport is easy.\n\t\tscrollAncestorsToShowRect( firstAncestorToScroll, () => {\n\t\t\t// Note: If the target does not belong to the current window **directly**,\n\t\t\t// i.e. it resides in an iframe belonging to the window, obtain the target's rect\n\t\t\t// in the coordinates of the current window. By default, a Rect returns geometry\n\t\t\t// relative to the current window's viewport. To make it work in a parent window,\n\t\t\t// it must be shifted.\n\t\t\treturn getRectRelativeToWindow( target, currentWindow );\n\t\t} );\n\n\t\t// Obtain the rect of the target after it has been scrolled within its ancestors.\n\t\t// It's time to scroll the viewport.\n\t\tconst targetRect = getRectRelativeToWindow( target, currentWindow );\n\n\t\tscrollWindowToShowRect( currentWindow, targetRect, viewportOffset );\n\n\t\tif ( currentWindow.parent != currentWindow ) {\n\t\t\t// Keep the reference to the <iframe> element the \"previous current window\" was\n\t\t\t// rendered within. It will be useful to re–calculate the rect of the target\n\t\t\t// in the parent window's relative geometry. The target's rect must be shifted\n\t\t\t// by it's iframe's position.\n\t\t\tcurrentFrame = currentWindow.frameElement;\n\t\t\tcurrentWindow = currentWindow.parent;\n\n\t\t\t// If the current window has some parent but frameElement is inaccessible, then they have\n\t\t\t// different domains/ports and, due to security reasons, accessing and scrolling\n\t\t\t// the parent window won't be possible.\n\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/930.\n\t\t\tif ( !currentFrame ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tcurrentWindow = null;\n\t\t}\n\t}\n}\n\n/**\n * Makes any page `HTMLElement` or `Range` (target) visible within its scrollable ancestors,\n * e.g. if they have `overflow: scroll` CSS style.\n *\n * @param {HTMLElement|Range} target A target, which supposed to become visible to the user.\n */\nexport function scrollAncestorsToShowTarget( target ) {\n\tconst targetParent = getParentElement( target );\n\n\tscrollAncestorsToShowRect( targetParent, () => {\n\t\treturn new Rect( target );\n\t} );\n}\n\n// TODO: Using a property value shorthand in the top of the file\n// causes JSDoc to throw errors. See https://github.com/cksource/docs-builder/issues/75.\nObject.assign( utils, {\n\tscrollViewportToShowTarget,\n\tscrollAncestorsToShowTarget\n} );\n\n// Makes a given rect visible within its parent window.\n//\n// Note: Avoid the situation where the caret is still in the viewport, but totally\n// at the edge of it. In such situation, if it moved beyond the viewport in the next\n// action e.g. after paste, the scrolling would move it to the viewportOffset level\n// and it all would look like the caret visually moved up/down:\n//\n// 1.\n//\t\t| foo[]\n//\t\t| <--- N px of space below the caret\n//\t\t+---------------------------------...\n//\n// 2. *paste*\n// 3.\n//\t\t|\n//\t\t|\n//\t\t+-foo-----------------------------...\n//\t\t bar[] <--- caret below viewport, scrolling...\n//\n// 4. *scrolling*\n// 5.\n//\t\t|\n//\t\t| foo\n//\t\t| bar[] <--- caret precisely at the edge\n//\t\t+---------------------------------...\n//\n// To prevent this, this method checks the rects moved by the viewportOffset to cover\n// the upper/lower edge of the viewport. It makes sure if the action repeats, there's\n// no twitching – it's a purely visual improvement:\n//\n// 5. (after fix)\n//\t\t|\n//\t\t| foo\n//\t\t| bar[]\n//\t\t| <--- N px of space below the caret\n//\t\t+---------------------------------...\n//\n// @private\n// @param {Window} window A window which is scrolled to reveal the rect.\n// @param {module:utils/dom/rect~Rect} rect A rect which is to be revealed.\n// @param {Number} viewportOffset See scrollViewportToShowTarget.\nfunction scrollWindowToShowRect( window, rect, viewportOffset ) {\n\tconst targetShiftedDownRect = rect.clone().moveBy( 0, viewportOffset );\n\tconst targetShiftedUpRect = rect.clone().moveBy( 0, -viewportOffset );\n\tconst viewportRect = new Rect( window ).excludeScrollbarsAndBorders();\n\n\tconst rects = [ targetShiftedUpRect, targetShiftedDownRect ];\n\n\tif ( !rects.every( rect => viewportRect.contains( rect ) ) ) {\n\t\tlet { scrollX, scrollY } = window;\n\n\t\tif ( isAbove( targetShiftedUpRect, viewportRect ) ) {\n\t\t\tscrollY -= viewportRect.top - rect.top + viewportOffset;\n\t\t} else if ( isBelow( targetShiftedDownRect, viewportRect ) ) {\n\t\t\tscrollY += rect.bottom - viewportRect.bottom + viewportOffset;\n\t\t}\n\n\t\t// TODO: Web browsers scroll natively to place the target in the middle\n\t\t// of the viewport. It's not a very popular case, though.\n\t\tif ( isLeftOf( rect, viewportRect ) ) {\n\t\t\tscrollX -= viewportRect.left - rect.left + viewportOffset;\n\t\t} else if ( isRightOf( rect, viewportRect ) ) {\n\t\t\tscrollX += rect.right - viewportRect.right + viewportOffset;\n\t\t}\n\n\t\twindow.scrollTo( scrollX, scrollY );\n\t}\n}\n\n// Recursively scrolls element ancestors to visually reveal a rect.\n//\n// @private\n// @param {HTMLElement} A parent The first ancestors to start scrolling.\n// @param {Function} getRect A function which returns the Rect, which is to be revealed.\nfunction scrollAncestorsToShowRect( parent, getRect ) {\n\tconst parentWindow = getWindow( parent );\n\tlet parentRect, targetRect;\n\n\twhile ( parent != parentWindow.document.body ) {\n\t\ttargetRect = getRect();\n\t\tparentRect = new Rect( parent ).excludeScrollbarsAndBorders();\n\n\t\tif ( !parentRect.contains( targetRect ) ) {\n\t\t\tif ( isAbove( targetRect, parentRect ) ) {\n\t\t\t\tparent.scrollTop -= parentRect.top - targetRect.top;\n\t\t\t} else if ( isBelow( targetRect, parentRect ) ) {\n\t\t\t\tparent.scrollTop += targetRect.bottom - parentRect.bottom;\n\t\t\t}\n\n\t\t\tif ( isLeftOf( targetRect, parentRect ) ) {\n\t\t\t\tparent.scrollLeft -= parentRect.left - targetRect.left;\n\t\t\t} else if ( isRightOf( targetRect, parentRect ) ) {\n\t\t\t\tparent.scrollLeft += targetRect.right - parentRect.right;\n\t\t\t}\n\t\t}\n\n\t\tparent = parent.parentNode;\n\t}\n}\n\n// Determines if a given `Rect` extends beyond the bottom edge of the second `Rect`.\n//\n// @private\n// @param {module:utils/dom/rect~Rect} firstRect\n// @param {module:utils/dom/rect~Rect} secondRect\nfunction isBelow( firstRect, secondRect ) {\n\treturn firstRect.bottom > secondRect.bottom;\n}\n\n// Determines if a given `Rect` extends beyond the top edge of the second `Rect`.\n//\n// @private\n// @param {module:utils/dom/rect~Rect} firstRect\n// @param {module:utils/dom/rect~Rect} secondRect\nfunction isAbove( firstRect, secondRect ) {\n\treturn firstRect.top < secondRect.top;\n}\n\n// Determines if a given `Rect` extends beyond the left edge of the second `Rect`.\n//\n// @private\n// @param {module:utils/dom/rect~Rect} firstRect\n// @param {module:utils/dom/rect~Rect} secondRect\nfunction isLeftOf( firstRect, secondRect ) {\n\treturn firstRect.left < secondRect.left;\n}\n\n// Determines if a given `Rect` extends beyond the right edge of the second `Rect`.\n//\n// @private\n// @param {module:utils/dom/rect~Rect} firstRect\n// @param {module:utils/dom/rect~Rect} secondRect\nfunction isRightOf( firstRect, secondRect ) {\n\treturn firstRect.right > secondRect.right;\n}\n\n// Returns the closest window of an element or range.\n//\n// @private\n// @param {HTMLElement|Range} firstRect\n// @returns {Window}\nfunction getWindow( elementOrRange ) {\n\tif ( isRange( elementOrRange ) ) {\n\t\treturn elementOrRange.startContainer.ownerDocument.defaultView;\n\t} else {\n\t\treturn elementOrRange.ownerDocument.defaultView;\n\t}\n}\n\n// Returns the closest parent of an element or DOM range.\n//\n// @private\n// @param {HTMLElement|Range} firstRect\n// @returns {HTMLelement}\nfunction getParentElement( elementOrRange ) {\n\tif ( isRange( elementOrRange ) ) {\n\t\tlet parent = elementOrRange.commonAncestorContainer;\n\n\t\t// If a Range is attached to the Text, use the closest element ancestor.\n\t\tif ( isText( parent ) ) {\n\t\t\tparent = parent.parentNode;\n\t\t}\n\n\t\treturn parent;\n\t} else {\n\t\treturn elementOrRange.parentNode;\n\t}\n}\n\n// Returns the rect of an element or range residing in an iframe.\n// The result rect is relative to the geometry of the passed window instance.\n//\n// @private\n// @param {HTMLElement|Range} target Element or range which rect should be returned.\n// @param {Window} relativeWindow A window the rect should be relative to.\n// @returns {module:utils/dom/rect~Rect}\nfunction getRectRelativeToWindow( target, relativeWindow ) {\n\tconst targetWindow = getWindow( target );\n\tconst rect = new Rect( target );\n\n\tif ( targetWindow === relativeWindow ) {\n\t\treturn rect;\n\t} else {\n\t\tlet currentWindow = targetWindow;\n\n\t\twhile ( currentWindow != relativeWindow ) {\n\t\t\tconst frame = currentWindow.frameElement;\n\t\t\tconst frameRect = new Rect( frame ).excludeScrollbarsAndBorders();\n\n\t\t\trect.moveBy( frameRect.left, frameRect.top );\n\n\t\t\tcurrentWindow = currentWindow.parent;\n\t\t}\n\t}\n\n\treturn rect;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/view/view\n */\n\nimport Document from './document';\nimport DowncastWriter from './downcastwriter';\nimport Renderer from './renderer';\nimport DomConverter from './domconverter';\nimport Position from './position';\nimport Range from './range';\nimport Selection from './selection';\n\nimport MutationObserver from './observer/mutationobserver';\nimport KeyObserver from './observer/keyobserver';\nimport FakeSelectionObserver from './observer/fakeselectionobserver';\nimport SelectionObserver from './observer/selectionobserver';\nimport FocusObserver from './observer/focusobserver';\nimport CompositionObserver from './observer/compositionobserver';\nimport InputObserver from './observer/inputobserver';\nimport ArrowKeysObserver from './observer/arrowkeysobserver';\n\nimport ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\nimport { scrollViewportToShowTarget } from '@ckeditor/ckeditor5-utils/src/dom/scroll';\nimport { injectUiElementHandling } from './uielement';\nimport { injectQuirksHandling } from './filler';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport env from '@ckeditor/ckeditor5-utils/src/env';\n\n/**\n * Editor's view controller class. Its main responsibility is DOM - View management for editing purposes, to provide\n * abstraction over the DOM structure and events and hide all browsers quirks.\n *\n * View controller renders view document to DOM whenever view structure changes. To determine when view can be rendered,\n * all changes need to be done using the {@link module:engine/view/view~View#change} method, using\n * {@link module:engine/view/downcastwriter~DowncastWriter}:\n *\n *\t\tview.change( writer => {\n *\t\t\twriter.insert( position, writer.createText( 'foo' ) );\n *\t\t} );\n *\n * View controller also register {@link module:engine/view/observer/observer~Observer observers} which observes changes\n * on DOM and fire events on the {@link module:engine/view/document~Document Document}.\n * Note that the following observers are added by the class constructor and are always available:\n *\n * * {@link module:engine/view/observer/mutationobserver~MutationObserver},\n * * {@link module:engine/view/observer/selectionobserver~SelectionObserver},\n * * {@link module:engine/view/observer/focusobserver~FocusObserver},\n * * {@link module:engine/view/observer/keyobserver~KeyObserver},\n * * {@link module:engine/view/observer/fakeselectionobserver~FakeSelectionObserver}.\n * * {@link module:engine/view/observer/compositionobserver~CompositionObserver}.\n *\n * This class also {@link module:engine/view/view~View#attachDomRoot binds the DOM and the view elements}.\n *\n * If you do not need full a DOM - view management, and only want to transform a tree of view elements to a tree of DOM\n * elements you do not need this controller. You can use the {@link module:engine/view/domconverter~DomConverter DomConverter} instead.\n *\n * @mixes module:utils/observablemixin~ObservableMixin\n */\nexport default class View {\n\t/**\n\t * @param {module:engine/view/stylesmap~StylesProcessor} stylesProcessor The styles processor instance.\n\t */\n\tconstructor( stylesProcessor ) {\n\t\t/**\n\t\t * Instance of the {@link module:engine/view/document~Document} associated with this view controller.\n\t\t *\n\t\t * @readonly\n\t\t * @type {module:engine/view/document~Document}\n\t\t */\n\t\tthis.document = new Document( stylesProcessor );\n\n\t\t/**\n\t\t * Instance of the {@link module:engine/view/domconverter~DomConverter domConverter} used by\n\t\t * {@link module:engine/view/view~View#_renderer renderer}\n\t\t * and {@link module:engine/view/observer/observer~Observer observers}.\n\t\t *\n\t\t * @readonly\n\t\t * @type {module:engine/view/domconverter~DomConverter}\n\t\t */\n\t\tthis.domConverter = new DomConverter( this.document );\n\n\t\t/**\n\t\t * Roots of the DOM tree. Map on the `HTMLElement`s with roots names as keys.\n\t\t *\n\t\t * @readonly\n\t\t * @type {Map.<String, HTMLElement>}\n\t\t */\n\t\tthis.domRoots = new Map();\n\n\t\t/**\n\t\t * Used to prevent calling {@link #forceRender} and {@link #change} during rendering view to the DOM.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Boolean} #isRenderingInProgress\n\t\t */\n\t\tthis.set( 'isRenderingInProgress', false );\n\n\t\t/**\n\t\t * Informs whether the DOM selection is inside any of the DOM roots managed by the view.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Boolean} #hasDomSelection\n\t\t */\n\t\tthis.set( 'hasDomSelection', false );\n\n\t\t/**\n\t\t * Instance of the {@link module:engine/view/renderer~Renderer renderer}.\n\t\t *\n\t\t * @protected\n\t\t * @type {module:engine/view/renderer~Renderer}\n\t\t */\n\t\tthis._renderer = new Renderer( this.domConverter, this.document.selection );\n\t\tthis._renderer.bind( 'isFocused', 'isSelecting' ).to( this.document );\n\n\t\t/**\n\t\t * A DOM root attributes cache. It saves the initial values of DOM root attributes before the DOM element\n\t\t * is {@link module:engine/view/view~View#attachDomRoot attached} to the view so later on, when\n\t\t * the view is destroyed ({@link module:engine/view/view~View#detachDomRoot}), they can be easily restored.\n\t\t * This way, the DOM element can go back to the (clean) state as if the editing view never used it.\n\t\t *\n\t\t * @private\n\t\t * @member {WeakMap.<HTMLElement,Object>}\n\t\t */\n\t\tthis._initialDomRootAttributes = new WeakMap();\n\n\t\t/**\n\t\t * Map of registered {@link module:engine/view/observer/observer~Observer observers}.\n\t\t *\n\t\t * @private\n\t\t * @type {Map.<Function, module:engine/view/observer/observer~Observer>}\n\t\t */\n\t\tthis._observers = new Map();\n\n\t\t/**\n\t\t * Is set to `true` when {@link #change view changes} are currently in progress.\n\t\t *\n\t\t * @private\n\t\t * @type {Boolean}\n\t\t */\n\t\tthis._ongoingChange = false;\n\n\t\t/**\n\t\t * Used to prevent calling {@link #forceRender} and {@link #change} during rendering view to the DOM.\n\t\t *\n\t\t * @private\n\t\t * @type {Boolean}\n\t\t */\n\t\tthis._postFixersInProgress = false;\n\n\t\t/**\n\t\t * Internal flag to temporary disable rendering. See the usage in the {@link #_disableRendering}.\n\t\t *\n\t\t * @private\n\t\t * @type {Boolean}\n\t\t */\n\t\tthis._renderingDisabled = false;\n\n\t\t/**\n\t\t * Internal flag that disables rendering when there are no changes since the last rendering.\n\t\t * It stores information about changed selection and changed elements from attached document roots.\n\t\t *\n\t\t * @private\n\t\t * @type {Boolean}\n\t\t */\n\t\tthis._hasChangedSinceTheLastRendering = false;\n\n\t\t/**\n\t\t * DowncastWriter instance used in {@link #change change method} callbacks.\n\t\t *\n\t\t * @private\n\t\t * @type {module:engine/view/downcastwriter~DowncastWriter}\n\t\t */\n\t\tthis._writer = new DowncastWriter( this.document );\n\n\t\t// Add default observers.\n\t\tthis.addObserver( MutationObserver );\n\t\tthis.addObserver( SelectionObserver );\n\t\tthis.addObserver( FocusObserver );\n\t\tthis.addObserver( KeyObserver );\n\t\tthis.addObserver( FakeSelectionObserver );\n\t\tthis.addObserver( CompositionObserver );\n\t\tthis.addObserver( ArrowKeysObserver );\n\n\t\tif ( env.isAndroid ) {\n\t\t\tthis.addObserver( InputObserver );\n\t\t}\n\n\t\t// Inject quirks handlers.\n\t\tinjectQuirksHandling( this );\n\t\tinjectUiElementHandling( this );\n\n\t\t// Use 'normal' priority so that rendering is performed as first when using that priority.\n\t\tthis.on( 'render', () => {\n\t\t\tthis._render();\n\n\t\t\t// Informs that layout has changed after render.\n\t\t\tthis.document.fire( 'layoutChanged' );\n\n\t\t\t// Reset the `_hasChangedSinceTheLastRendering` flag after rendering.\n\t\t\tthis._hasChangedSinceTheLastRendering = false;\n\t\t} );\n\n\t\t// Listen to the document selection changes directly.\n\t\tthis.listenTo( this.document.selection, 'change', () => {\n\t\t\tthis._hasChangedSinceTheLastRendering = true;\n\t\t} );\n\n\t\t// Trigger re-render if only the focus changed.\n\t\tthis.listenTo( this.document, 'change:isFocused', () => {\n\t\t\tthis._hasChangedSinceTheLastRendering = true;\n\t\t} );\n\t}\n\n\t/**\n\t * Attaches a DOM root element to the view element and enable all observers on that element.\n\t * Also {@link module:engine/view/renderer~Renderer#markToSync mark element} to be synchronized\n\t * with the view what means that all child nodes will be removed and replaced with content of the view root.\n\t *\n\t * This method also will change view element name as the same as tag name of given dom root.\n\t * Name is always transformed to lower case.\n\t *\n\t * **Note:** Use {@link #detachDomRoot `detachDomRoot()`} to revert this action.\n\t *\n\t * @param {Element} domRoot DOM root element.\n\t * @param {String} [name='main'] Name of the root.\n\t */\n\tattachDomRoot( domRoot, name = 'main' ) {\n\t\tconst viewRoot = this.document.getRoot( name );\n\n\t\t// Set view root name the same as DOM root tag name.\n\t\tviewRoot._name = domRoot.tagName.toLowerCase();\n\n\t\tconst initialDomRootAttributes = {};\n\n\t\t// 1. Copy and cache the attributes to remember the state of the element before attaching.\n\t\t// The cached attributes will be restored in detachDomRoot() so the element goes to the\n\t\t// clean state as if the editing view never used it.\n\t\t// 2. Apply the attributes using the view writer, so they all go under the control of the engine.\n\t\t// The editing view takes over the attribute management completely because various\n\t\t// features (e.g. addPlaceholder()) require dynamic changes of those attributes and they\n\t\t// cannot be managed by the engine and the UI library at the same time.\n\t\tfor ( const { name, value } of Array.from( domRoot.attributes ) ) {\n\t\t\tinitialDomRootAttributes[ name ] = value;\n\n\t\t\t// Do not use writer.setAttribute() for the class attribute. The EditableUIView class\n\t\t\t// and its descendants could have already set some using the writer.addClass() on the view\n\t\t\t// document root. They haven't been rendered yet so they are not present in the DOM root.\n\t\t\t// Using writer.setAttribute( 'class', ... ) would override them completely.\n\t\t\tif ( name === 'class' ) {\n\t\t\t\tthis._writer.addClass( value.split( ' ' ), viewRoot );\n\t\t\t} else {\n\t\t\t\tthis._writer.setAttribute( name, value, viewRoot );\n\t\t\t}\n\t\t}\n\n\t\tthis._initialDomRootAttributes.set( domRoot, initialDomRootAttributes );\n\n\t\tconst updateContenteditableAttribute = () => {\n\t\t\tthis._writer.setAttribute( 'contenteditable', !viewRoot.isReadOnly, viewRoot );\n\n\t\t\tif ( viewRoot.isReadOnly ) {\n\t\t\t\tthis._writer.addClass( 'ck-read-only', viewRoot );\n\t\t\t} else {\n\t\t\t\tthis._writer.removeClass( 'ck-read-only', viewRoot );\n\t\t\t}\n\t\t};\n\n\t\t// Set initial value.\n\t\tupdateContenteditableAttribute();\n\n\t\tthis.domRoots.set( name, domRoot );\n\t\tthis.domConverter.bindElements( domRoot, viewRoot );\n\t\tthis._renderer.markToSync( 'children', viewRoot );\n\t\tthis._renderer.markToSync( 'attributes', viewRoot );\n\t\tthis._renderer.domDocuments.add( domRoot.ownerDocument );\n\n\t\tviewRoot.on( 'change:children', ( evt, node ) => this._renderer.markToSync( 'children', node ) );\n\t\tviewRoot.on( 'change:attributes', ( evt, node ) => this._renderer.markToSync( 'attributes', node ) );\n\t\tviewRoot.on( 'change:text', ( evt, node ) => this._renderer.markToSync( 'text', node ) );\n\t\tviewRoot.on( 'change:isReadOnly', () => this.change( updateContenteditableAttribute ) );\n\n\t\tviewRoot.on( 'change', () => {\n\t\t\tthis._hasChangedSinceTheLastRendering = true;\n\t\t} );\n\n\t\tfor ( const observer of this._observers.values() ) {\n\t\t\tobserver.observe( domRoot, name );\n\t\t}\n\t}\n\n\t/**\n\t * Detaches a DOM root element from the view element and restores its attributes to the state before\n\t * {@link #attachDomRoot `attachDomRoot()`}.\n\t *\n\t * @param {String} name Name of the root to detach.\n\t */\n\tdetachDomRoot( name ) {\n\t\tconst domRoot = this.domRoots.get( name );\n\n\t\t// Remove all root attributes so the DOM element is \"bare\".\n\t\tArray.from( domRoot.attributes ).forEach( ( { name } ) => domRoot.removeAttribute( name ) );\n\n\t\tconst initialDomRootAttributes = this._initialDomRootAttributes.get( domRoot );\n\n\t\t// Revert all view root attributes back to the state before attachDomRoot was called.\n\t\tfor ( const attribute in initialDomRootAttributes ) {\n\t\t\tdomRoot.setAttribute( attribute, initialDomRootAttributes[ attribute ] );\n\t\t}\n\n\t\tthis.domRoots.delete( name );\n\t\tthis.domConverter.unbindDomElement( domRoot );\n\t}\n\n\t/**\n\t * Gets DOM root element.\n\t *\n\t * @param {String} [name='main'] Name of the root.\n\t * @returns {Element} DOM root element instance.\n\t */\n\tgetDomRoot( name = 'main' ) {\n\t\treturn this.domRoots.get( name );\n\t}\n\n\t/**\n\t * Creates observer of the given type if not yet created, {@link module:engine/view/observer/observer~Observer#enable enables} it\n\t * and {@link module:engine/view/observer/observer~Observer#observe attaches} to all existing and future\n\t * {@link #domRoots DOM roots}.\n\t *\n\t * Note: Observers are recognized by their constructor (classes). A single observer will be instantiated and used only\n\t * when registered for the first time. This means that features and other components can register a single observer\n\t * multiple times without caring whether it has been already added or not.\n\t *\n\t * @param {Function} Observer The constructor of an observer to add.\n\t * Should create an instance inheriting from {@link module:engine/view/observer/observer~Observer}.\n\t * @returns {module:engine/view/observer/observer~Observer} Added observer instance.\n\t */\n\taddObserver( Observer ) {\n\t\tlet observer = this._observers.get( Observer );\n\n\t\tif ( observer ) {\n\t\t\treturn observer;\n\t\t}\n\n\t\tobserver = new Observer( this );\n\n\t\tthis._observers.set( Observer, observer );\n\n\t\tfor ( const [ name, domElement ] of this.domRoots ) {\n\t\t\tobserver.observe( domElement, name );\n\t\t}\n\n\t\tobserver.enable();\n\n\t\treturn observer;\n\t}\n\n\t/**\n\t * Returns observer of the given type or `undefined` if such observer has not been added yet.\n\t *\n\t * @param {Function} Observer The constructor of an observer to get.\n\t * @returns {module:engine/view/observer/observer~Observer|undefined} Observer instance or undefined.\n\t */\n\tgetObserver( Observer ) {\n\t\treturn this._observers.get( Observer );\n\t}\n\n\t/**\n\t * Disables all added observers.\n\t */\n\tdisableObservers() {\n\t\tfor ( const observer of this._observers.values() ) {\n\t\t\tobserver.disable();\n\t\t}\n\t}\n\n\t/**\n\t * Enables all added observers.\n\t */\n\tenableObservers() {\n\t\tfor ( const observer of this._observers.values() ) {\n\t\t\tobserver.enable();\n\t\t}\n\t}\n\n\t/**\n\t * Scrolls the page viewport and {@link #domRoots} with their ancestors to reveal the\n\t * caret, if not already visible to the user.\n\t */\n\tscrollToTheSelection() {\n\t\tconst range = this.document.selection.getFirstRange();\n\n\t\tif ( range ) {\n\t\t\tscrollViewportToShowTarget( {\n\t\t\t\ttarget: this.domConverter.viewRangeToDom( range ),\n\t\t\t\tviewportOffset: 20\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * It will focus DOM element representing {@link module:engine/view/editableelement~EditableElement EditableElement}\n\t * that is currently having selection inside.\n\t */\n\tfocus() {\n\t\tif ( !this.document.isFocused ) {\n\t\t\tconst editable = this.document.selection.editableElement;\n\n\t\t\tif ( editable ) {\n\t\t\t\tthis.domConverter.focus( editable );\n\t\t\t\tthis.forceRender();\n\t\t\t} else {\n\t\t\t\t// Before focusing view document, selection should be placed inside one of the view's editables.\n\t\t\t\t// Normally its selection will be converted from model document (which have default selection), but\n\t\t\t\t// when using view document on its own, we need to manually place selection before focusing it.\n\t\t\t\t//\n\t\t\t\t// @if CK_DEBUG // console.warn( 'There is no selection in any editable to focus.' );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * The `change()` method is the primary way of changing the view. You should use it to modify any node in the view tree.\n\t * It makes sure that after all changes are made the view is rendered to the DOM (assuming that the view will be changed\n\t * inside the callback). It prevents situations when the DOM is updated when the view state is not yet correct. It allows\n\t * to nest calls one inside another and still performs a single rendering after all those changes are made.\n\t * It also returns the return value of its callback.\n\t *\n\t *\t\tconst text = view.change( writer => {\n\t *\t\t\tconst newText = writer.createText( 'foo' );\n\t *\t\t\twriter.insert( position1, newText );\n\t *\n\t *\t\t\tview.change( writer => {\n\t *\t\t\t\twriter.insert( position2, writer.createText( 'bar' ) );\n\t *\t\t\t} );\n\t *\n\t * \t\t\twriter.remove( range );\n\t *\n\t * \t\t\treturn newText;\n\t *\t\t} );\n\t *\n\t * When the outermost change block is done and rendering to the DOM is over the\n\t * {@link module:engine/view/view~View#event:render `View#render`} event is fired.\n\t *\n\t * This method throws a `applying-view-changes-on-rendering` error when\n\t * the change block is used after rendering to the DOM has started.\n\t *\n\t * @param {Function} callback Callback function which may modify the view.\n\t * @returns {*} Value returned by the callback.\n\t */\n\tchange( callback ) {\n\t\tif ( this.isRenderingInProgress || this._postFixersInProgress ) {\n\t\t\t/**\n\t\t\t * Thrown when there is an attempt to make changes to the view tree when it is in incorrect state. This may\n\t\t\t * cause some unexpected behaviour and inconsistency between the DOM and the view.\n\t\t\t * This may be caused by:\n\t\t\t *\n\t\t\t * * calling {@link #change} or {@link #forceRender} during rendering process,\n\t\t\t * * calling {@link #change} or {@link #forceRender} inside of\n\t\t\t * {@link module:engine/view/document~Document#registerPostFixer post-fixer function}.\n\t\t\t *\n\t\t\t * @error cannot-change-view-tree\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'cannot-change-view-tree',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\n\t\ttry {\n\t\t\t// Recursive call to view.change() method - execute listener immediately.\n\t\t\tif ( this._ongoingChange ) {\n\t\t\t\treturn callback( this._writer );\n\t\t\t}\n\n\t\t\t// This lock will assure that all recursive calls to view.change() will end up in same block - one \"render\"\n\t\t\t// event for all nested calls.\n\t\t\tthis._ongoingChange = true;\n\t\t\tconst callbackResult = callback( this._writer );\n\t\t\tthis._ongoingChange = false;\n\n\t\t\t// This lock is used by editing controller to render changes from outer most model.change() once. As plugins might call\n\t\t\t// view.change() inside model.change() block - this will ensures that postfixers and rendering are called once after all\n\t\t\t// changes. Also, we don't need to render anything if there're no changes since last rendering.\n\t\t\tif ( !this._renderingDisabled && this._hasChangedSinceTheLastRendering ) {\n\t\t\t\tthis._postFixersInProgress = true;\n\t\t\t\tthis.document._callPostFixers( this._writer );\n\t\t\t\tthis._postFixersInProgress = false;\n\n\t\t\t\tthis.fire( 'render' );\n\t\t\t}\n\n\t\t\treturn callbackResult;\n\t\t} catch ( err ) {\n\t\t\t// @if CK_DEBUG // throw err;\n\t\t\t/* istanbul ignore next */\n\t\t\tCKEditorError.rethrowUnexpectedError( err, this );\n\t\t}\n\t}\n\n\t/**\n\t * Forces rendering {@link module:engine/view/document~Document view document} to DOM. If any view changes are\n\t * currently in progress, rendering will start after all {@link #change change blocks} are processed.\n\t *\n\t * Note that this method is dedicated for special cases. All view changes should be wrapped in the {@link #change}\n\t * block and the view will automatically check whether it needs to render DOM or not.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `applying-view-changes-on-rendering` when\n\t * trying to re-render when rendering to DOM has already started.\n\t */\n\tforceRender() {\n\t\tthis._hasChangedSinceTheLastRendering = true;\n\t\tthis.change( () => {} );\n\t}\n\n\t/**\n\t * Destroys this instance. Makes sure that all observers are destroyed and listeners removed.\n\t */\n\tdestroy() {\n\t\tfor ( const observer of this._observers.values() ) {\n\t\t\tobserver.destroy();\n\t\t}\n\n\t\tthis.document.destroy();\n\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/view/position~Position position},\n\t * * parent element and offset (offset defaults to `0`),\n\t * * parent element and `'end'` (sets position at the end of that element),\n\t * * {@link module:engine/view/item~Item view item} and `'before'` or `'after'` (sets position before or after given view item).\n\t *\n\t * This method is a shortcut to other constructors such as:\n\t *\n\t * * {@link #createPositionBefore},\n\t * * {@link #createPositionAfter},\n\t *\n\t * @param {module:engine/view/item~Item|module:engine/model/position~Position} itemOrPosition\n\t * @param {Number|'end'|'before'|'after'} [offset] Offset or one of the flags. Used only when\n\t * first parameter is a {@link module:engine/view/item~Item view item}.\n\t */\n\tcreatePositionAt( itemOrPosition, offset ) {\n\t\treturn Position._createAt( itemOrPosition, offset );\n\t}\n\n\t/**\n\t * Creates a new position after given view item.\n\t *\n\t * @param {module:engine/view/item~Item} item View item after which the position should be located.\n\t * @returns {module:engine/view/position~Position}\n\t */\n\tcreatePositionAfter( item ) {\n\t\treturn Position._createAfter( item );\n\t}\n\n\t/**\n\t * Creates a new position before given view item.\n\t *\n\t * @param {module:engine/view/item~Item} item View item before which the position should be located.\n\t * @returns {module:engine/view/position~Position}\n\t */\n\tcreatePositionBefore( item ) {\n\t\treturn Position._createBefore( item );\n\t}\n\n\t/**\n\t * Creates a range spanning from `start` position to `end` position.\n\t *\n\t * **Note:** This factory method creates it's own {@link module:engine/view/position~Position} instances basing on passed values.\n\t *\n\t * @param {module:engine/view/position~Position} start Start position.\n\t * @param {module:engine/view/position~Position} [end] End position. If not set, range will be collapsed at `start` position.\n\t * @returns {module:engine/view/range~Range}\n\t */\n\tcreateRange( start, end ) {\n\t\treturn new Range( start, end );\n\t}\n\n\t/**\n\t * Creates a range that starts before given {@link module:engine/view/item~Item view item} and ends after it.\n\t *\n\t * @param {module:engine/view/item~Item} item\n\t * @returns {module:engine/view/range~Range}\n\t */\n\tcreateRangeOn( item ) {\n\t\treturn Range._createOn( item );\n\t}\n\n\t/**\n\t * Creates a range inside an {@link module:engine/view/element~Element element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * @param {module:engine/view/element~Element} element Element which is a parent for the range.\n\t * @returns {module:engine/view/range~Range}\n\t */\n\tcreateRangeIn( element ) {\n\t\treturn Range._createIn( element );\n\t}\n\n\t/**\n\t Creates new {@link module:engine/view/selection~Selection} instance.\n\t *\n\t * \t\t// Creates empty selection without ranges.\n\t *\t\tconst selection = view.createSelection();\n\t *\n\t *\t\t// Creates selection at the given range.\n\t *\t\tconst range = view.createRange( start, end );\n\t *\t\tconst selection = view.createSelection( range );\n\t *\n\t *\t\t// Creates selection at the given ranges\n\t * \t\tconst ranges = [ view.createRange( start1, end2 ), view.createRange( star2, end2 ) ];\n\t *\t\tconst selection = view.createSelection( ranges );\n\t *\n\t *\t\t// Creates selection from the other selection.\n\t *\t\tconst otherSelection = view.createSelection();\n\t *\t\tconst selection = view.createSelection( otherSelection );\n\t *\n\t *\t\t// Creates selection from the document selection.\n\t *\t\tconst selection = view.createSelection( editor.editing.view.document.selection );\n\t *\n\t * \t\t// Creates selection at the given position.\n\t *\t\tconst position = view.createPositionFromPath( root, path );\n\t *\t\tconst selection = view.createSelection( position );\n\t *\n\t *\t\t// Creates collapsed selection at the position of given item and offset.\n\t *\t\tconst paragraph = view.createContainerElement( 'paragraph' );\n\t *\t\tconst selection = view.createSelection( paragraph, offset );\n\t *\n\t *\t\t// Creates a range inside an {@link module:engine/view/element~Element element} which starts before the\n\t *\t\t// first child of that element and ends after the last child of that element.\n\t *\t\tconst selection = view.createSelection( paragraph, 'in' );\n\t *\n\t *\t\t// Creates a range on an {@link module:engine/view/item~Item item} which starts before the item and ends\n\t *\t\t// just after the item.\n\t *\t\tconst selection = view.createSelection( paragraph, 'on' );\n\t *\n\t * `Selection`'s factory method allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t *\t\t// Creates backward selection.\n\t *\t\tconst selection = view.createSelection( range, { backward: true } );\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be properly handled by screen readers).\n\t *\n\t *\t\t// Creates fake selection with label.\n\t *\t\tconst selection = view.createSelection( range, { fake: true, label: 'foo' } );\n\t *\n\t * @param {module:engine/view/selection~Selectable} [selectable=null]\n\t * @param {Number|'before'|'end'|'after'|'on'|'in'} [placeOrOffset] Offset or place when selectable is an `Item`.\n\t * @param {Object} [options]\n\t * @param {Boolean} [options.backward] Sets this selection instance to be backward.\n\t * @param {Boolean} [options.fake] Sets this selection instance to be marked as `fake`.\n\t * @param {String} [options.label] Label for the fake selection.\n\t * @returns {module:engine/view/selection~Selection}\n\t */\n\tcreateSelection( selectable, placeOrOffset, options ) {\n\t\treturn new Selection( selectable, placeOrOffset, options );\n\t}\n\n\t/**\n\t * Disables or enables rendering. If the flag is set to `true` then the rendering will be disabled.\n\t * If the flag is set to `false` and if there was some change in the meantime, then the rendering action will be performed.\n\t *\n\t * @protected\n\t * @param {Boolean} flag A flag indicates whether the rendering should be disabled.\n\t */\n\t_disableRendering( flag ) {\n\t\tthis._renderingDisabled = flag;\n\n\t\tif ( flag == false ) {\n\t\t\t// Render when you stop blocking rendering.\n\t\t\tthis.change( () => {} );\n\t\t}\n\t}\n\n\t/**\n\t * Renders all changes. In order to avoid triggering the observers (e.g. mutations) all observers are disabled\n\t * before rendering and re-enabled after that.\n\t *\n\t * @private\n\t */\n\t_render() {\n\t\tthis.isRenderingInProgress = true;\n\t\tthis.disableObservers();\n\t\tthis._renderer.render();\n\t\tthis.enableObservers();\n\t\tthis.isRenderingInProgress = false;\n\t}\n\n\t/**\n\t * Fired after a topmost {@link module:engine/view/view~View#change change block} and all\n\t * {@link module:engine/view/document~Document#registerPostFixer post-fixers} are executed.\n\t *\n\t * Actual rendering is performed as a first listener on 'normal' priority.\n\t *\n\t *\t\tview.on( 'render', () => {\n\t *\t\t\t// Rendering to the DOM is complete.\n\t *\t\t} );\n\t *\n\t * This event is useful when you want to update interface elements after the rendering, e.g. position of the\n\t * balloon panel. If you wants to change view structure use\n\t * {@link module:engine/view/document~Document#registerPostFixer post-fixers}.\n\t *\n\t * @event module:engine/view/view~View#event:render\n\t */\n}\n\nmix( View, ObservableMixin );\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/node\n */\n\nimport toMap from '@ckeditor/ckeditor5-utils/src/tomap';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport compareArrays from '@ckeditor/ckeditor5-utils/src/comparearrays';\n// To check if component is loaded more than once.\nimport '@ckeditor/ckeditor5-utils/src/version';\n\n/**\n * Model node. Most basic structure of model tree.\n *\n * This is an abstract class that is a base for other classes representing different nodes in model.\n *\n * **Note:** If a node is detached from the model tree, you can manipulate it using it's API.\n * However, it is **very important** that nodes already attached to model tree should be only changed through\n * {@link module:engine/model/writer~Writer Writer API}.\n *\n * Changes done by `Node` methods, like {@link module:engine/model/element~Element#_insertChild _insertChild} or\n * {@link module:engine/model/node~Node#_setAttribute _setAttribute}\n * do not generate {@link module:engine/model/operation/operation~Operation operations}\n * which are essential for correct editor work if you modify nodes in {@link module:engine/model/document~Document document} root.\n *\n * The flow of working on `Node` (and classes that inherits from it) is as such:\n * 1. You can create a `Node` instance, modify it using it's API.\n * 2. Add `Node` to the model using `Batch` API.\n * 3. Change `Node` that was already added to the model using `Batch` API.\n *\n * Similarly, you cannot use `Batch` API on a node that has not been added to the model tree, with the exception\n * of {@link module:engine/model/writer~Writer#insert inserting} that node to the model tree.\n *\n * Be aware that using {@link module:engine/model/writer~Writer#remove remove from Batch API} does not allow to use `Node` API because\n * the information about `Node` is still kept in model document.\n *\n * In case of {@link module:engine/model/element~Element element node}, adding and removing children also counts as changing a node and\n * follows same rules.\n */\nexport default class Node {\n\t/**\n\t * Creates a model node.\n\t *\n\t * This is an abstract class, so this constructor should not be used directly.\n\t *\n\t * @abstract\n\t * @param {Object} [attrs] Node's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t */\n\tconstructor( attrs ) {\n\t\t/**\n\t\t * Parent of this node. It could be {@link module:engine/model/element~Element}\n\t\t * or {@link module:engine/model/documentfragment~DocumentFragment}.\n\t\t * Equals to `null` if the node has no parent.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment|null}\n\t\t */\n\t\tthis.parent = null;\n\n\t\t/**\n\t\t * Attributes set on this node.\n\t\t *\n\t\t * @private\n\t\t * @member {Map} module:engine/model/node~Node#_attrs\n\t\t */\n\t\tthis._attrs = toMap( attrs );\n\t}\n\n\t/**\n\t * Index of this node in it's parent or `null` if the node has no parent.\n\t *\n\t * Accessing this property throws an error if this node's parent element does not contain it.\n\t * This means that model tree got broken.\n\t *\n\t * @readonly\n\t * @type {Number|null}\n\t */\n\tget index() {\n\t\tlet pos;\n\n\t\tif ( !this.parent ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( ( pos = this.parent.getChildIndex( this ) ) === null ) {\n\t\t\tthrow new CKEditorError( 'model-node-not-found-in-parent', this );\n\t\t}\n\n\t\treturn pos;\n\t}\n\n\t/**\n\t * Offset at which this node starts in it's parent. It is equal to the sum of {@link #offsetSize offsetSize}\n\t * of all it's previous siblings. Equals to `null` if node has no parent.\n\t *\n\t * Accessing this property throws an error if this node's parent element does not contain it.\n\t * This means that model tree got broken.\n\t *\n\t * @readonly\n\t * @type {Number|null}\n\t */\n\tget startOffset() {\n\t\tlet pos;\n\n\t\tif ( !this.parent ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( ( pos = this.parent.getChildStartOffset( this ) ) === null ) {\n\t\t\tthrow new CKEditorError( 'model-node-not-found-in-parent', this );\n\t\t}\n\n\t\treturn pos;\n\t}\n\n\t/**\n\t * Offset size of this node. Represents how much \"offset space\" is occupied by the node in it's parent.\n\t * It is important for {@link module:engine/model/position~Position position}. When node has `offsetSize` greater than `1`, position\n\t * can be placed between that node start and end. `offsetSize` greater than `1` is for nodes that represents more\n\t * than one entity, i.e. {@link module:engine/model/text~Text text node}.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget offsetSize() {\n\t\treturn 1;\n\t}\n\n\t/**\n\t * Offset at which this node ends in it's parent. It is equal to the sum of this node's\n\t * {@link module:engine/model/node~Node#startOffset start offset} and {@link #offsetSize offset size}.\n\t * Equals to `null` if the node has no parent.\n\t *\n\t * @readonly\n\t * @type {Number|null}\n\t */\n\tget endOffset() {\n\t\tif ( !this.parent ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this.startOffset + this.offsetSize;\n\t}\n\n\t/**\n\t * Node's next sibling or `null` if the node is a last child of it's parent or if the node has no parent.\n\t *\n\t * @readonly\n\t * @type {module:engine/model/node~Node|null}\n\t */\n\tget nextSibling() {\n\t\tconst index = this.index;\n\n\t\treturn ( index !== null && this.parent.getChild( index + 1 ) ) || null;\n\t}\n\n\t/**\n\t * Node's previous sibling or `null` if the node is a first child of it's parent or if the node has no parent.\n\t *\n\t * @readonly\n\t * @type {module:engine/model/node~Node|null}\n\t */\n\tget previousSibling() {\n\t\tconst index = this.index;\n\n\t\treturn ( index !== null && this.parent.getChild( index - 1 ) ) || null;\n\t}\n\n\t/**\n\t * The top-most ancestor of the node. If node has no parent it is the root itself. If the node is a part\n\t * of {@link module:engine/model/documentfragment~DocumentFragment}, it's `root` is equal to that `DocumentFragment`.\n\t *\n\t * @readonly\n\t * @type {module:engine/model/node~Node|module:engine/model/documentfragment~DocumentFragment}\n\t */\n\tget root() {\n\t\tlet root = this; // eslint-disable-line consistent-this\n\n\t\twhile ( root.parent ) {\n\t\t\troot = root.parent;\n\t\t}\n\n\t\treturn root;\n\t}\n\n\t/**\n\t * Returns true if the node is in a tree rooted in the document (is a descendant of one of its roots).\n\t *\n\t * @returns {Boolean}\n\t */\n\tisAttached() {\n\t\treturn this.root.is( 'rootElement' );\n\t}\n\n\t/**\n\t * Gets path to the node. The path is an array containing starting offsets of consecutive ancestors of this node,\n\t * beginning from {@link module:engine/model/node~Node#root root}, down to this node's starting offset. The path can be used to\n\t * create {@link module:engine/model/position~Position Position} instance.\n\t *\n\t *\t\tconst abc = new Text( 'abc' );\n\t *\t\tconst foo = new Text( 'foo' );\n\t *\t\tconst h1 = new Element( 'h1', null, new Text( 'header' ) );\n\t *\t\tconst p = new Element( 'p', null, [ abc, foo ] );\n\t *\t\tconst div = new Element( 'div', null, [ h1, p ] );\n\t *\t\tfoo.getPath(); // Returns [ 1, 3 ]. `foo` is in `p` which is in `div`. `p` starts at offset 1, while `foo` at 3.\n\t *\t\th1.getPath(); // Returns [ 0 ].\n\t *\t\tdiv.getPath(); // Returns [].\n\t *\n\t * @returns {Array.<Number>} The path.\n\t */\n\tgetPath() {\n\t\tconst path = [];\n\t\tlet node = this; // eslint-disable-line consistent-this\n\n\t\twhile ( node.parent ) {\n\t\t\tpath.unshift( node.startOffset );\n\t\t\tnode = node.parent;\n\t\t}\n\n\t\treturn path;\n\t}\n\n\t/**\n\t * Returns ancestors array of this node.\n\t *\n\t * @param {Object} options Options object.\n\t * @param {Boolean} [options.includeSelf=false] When set to `true` this node will be also included in parent's array.\n\t * @param {Boolean} [options.parentFirst=false] When set to `true`, array will be sorted from node's parent to root element,\n\t * otherwise root element will be the first item in the array.\n\t * @returns {Array} Array with ancestors.\n\t */\n\tgetAncestors( options = { includeSelf: false, parentFirst: false } ) {\n\t\tconst ancestors = [];\n\t\tlet parent = options.includeSelf ? this : this.parent;\n\n\t\twhile ( parent ) {\n\t\t\tancestors[ options.parentFirst ? 'push' : 'unshift' ]( parent );\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn ancestors;\n\t}\n\n\t/**\n\t * Returns a {@link module:engine/model/element~Element} or {@link module:engine/model/documentfragment~DocumentFragment}\n\t * which is a common ancestor of both nodes.\n\t *\n\t * @param {module:engine/model/node~Node} node The second node.\n\t * @param {Object} options Options object.\n\t * @param {Boolean} [options.includeSelf=false] When set to `true` both nodes will be considered \"ancestors\" too.\n\t * Which means that if e.g. node A is inside B, then their common ancestor will be B.\n\t * @returns {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment|null}\n\t */\n\tgetCommonAncestor( node, options = {} ) {\n\t\tconst ancestorsA = this.getAncestors( options );\n\t\tconst ancestorsB = node.getAncestors( options );\n\n\t\tlet i = 0;\n\n\t\twhile ( ancestorsA[ i ] == ancestorsB[ i ] && ancestorsA[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i === 0 ? null : ancestorsA[ i - 1 ];\n\t}\n\n\t/**\n\t * Returns whether this node is before given node. `false` is returned if nodes are in different trees (for example,\n\t * in different {@link module:engine/model/documentfragment~DocumentFragment}s).\n\t *\n\t * @param {module:engine/model/node~Node} node Node to compare with.\n\t * @returns {Boolean}\n\t */\n\tisBefore( node ) {\n\t\t// Given node is not before this node if they are same.\n\t\tif ( this == node ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Return `false` if it is impossible to compare nodes.\n\t\tif ( this.root !== node.root ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst thisPath = this.getPath();\n\t\tconst nodePath = node.getPath();\n\n\t\tconst result = compareArrays( thisPath, nodePath );\n\n\t\tswitch ( result ) {\n\t\t\tcase 'prefix':\n\t\t\t\treturn true;\n\n\t\t\tcase 'extension':\n\t\t\t\treturn false;\n\n\t\t\tdefault:\n\t\t\t\treturn thisPath[ result ] < nodePath[ result ];\n\t\t}\n\t}\n\n\t/**\n\t * Returns whether this node is after given node. `false` is returned if nodes are in different trees (for example,\n\t * in different {@link module:engine/model/documentfragment~DocumentFragment}s).\n\t *\n\t * @param {module:engine/model/node~Node} node Node to compare with.\n\t * @returns {Boolean}\n\t */\n\tisAfter( node ) {\n\t\t// Given node is not before this node if they are same.\n\t\tif ( this == node ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Return `false` if it is impossible to compare nodes.\n\t\tif ( this.root !== node.root ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// In other cases, just check if the `node` is before, and return the opposite.\n\t\treturn !this.isBefore( node );\n\t}\n\n\t/**\n\t * Checks if the node has an attribute with given key.\n\t *\n\t * @param {String} key Key of attribute to check.\n\t * @returns {Boolean} `true` if attribute with given key is set on node, `false` otherwise.\n\t */\n\thasAttribute( key ) {\n\t\treturn this._attrs.has( key );\n\t}\n\n\t/**\n\t * Gets an attribute value for given key or `undefined` if that attribute is not set on node.\n\t *\n\t * @param {String} key Key of attribute to look for.\n\t * @returns {*} Attribute value or `undefined`.\n\t */\n\tgetAttribute( key ) {\n\t\treturn this._attrs.get( key );\n\t}\n\n\t/**\n\t * Returns iterator that iterates over this node's attributes.\n\t *\n\t * Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t *\n\t * @returns {Iterable.<*>}\n\t */\n\tgetAttributes() {\n\t\treturn this._attrs.entries();\n\t}\n\n\t/**\n\t * Returns iterator that iterates over this node's attribute keys.\n\t *\n\t * @returns {Iterable.<String>}\n\t */\n\tgetAttributeKeys() {\n\t\treturn this._attrs.keys();\n\t}\n\n\t/**\n\t * Converts `Node` to plain object and returns it.\n\t *\n\t * @returns {Object} `Node` converted to plain object.\n\t */\n\ttoJSON() {\n\t\tconst json = {};\n\n\t\t// Serializes attributes to the object.\n\t\t// attributes = { a: 'foo', b: 1, c: true }.\n\t\tif ( this._attrs.size ) {\n\t\t\tjson.attributes = Array.from( this._attrs ).reduce( ( result, attr ) => {\n\t\t\t\tresult[ attr[ 0 ] ] = attr[ 1 ];\n\n\t\t\t\treturn result;\n\t\t\t}, {} );\n\t\t}\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Checks whether this object is of the given type.\n\t *\n\t * This method is useful when processing model objects that are of unknown type. For example, a function\n\t * may return a {@link module:engine/model/documentfragment~DocumentFragment} or a {@link module:engine/model/node~Node}\n\t * that can be either a text node or an element. This method can be used to check what kind of object is returned.\n\t *\n\t *\t\tsomeObject.is( 'element' ); // -> true if this is an element\n\t *\t\tsomeObject.is( 'node' ); // -> true if this is a node (a text node or an element)\n\t *\t\tsomeObject.is( 'documentFragment' ); // -> true if this is a document fragment\n\t *\n\t * Since this method is also available on a range of view objects, you can prefix the type of the object with\n\t * `model:` or `view:` to check, for example, if this is the model's or view's element:\n\t *\n\t *\t\tmodelElement.is( 'model:element' ); // -> true\n\t *\t\tmodelElement.is( 'view:element' ); // -> false\n\t *\n\t * By using this method it is also possible to check a name of an element:\n\t *\n\t *\t\timageElement.is( 'element', 'imageBlock' ); // -> true\n\t *\t\timageElement.is( 'element', 'imageBlock' ); // -> same as above\n\t *\t\timageElement.is( 'model:element', 'imageBlock' ); // -> same as above, but more precise\n\t *\n\t * The list of model objects which implement the `is()` method:\n\t *\n\t * * {@link module:engine/model/node~Node#is `Node#is()`}\n\t * * {@link module:engine/model/text~Text#is `Text#is()`}\n\t * * {@link module:engine/model/element~Element#is `Element#is()`}\n\t * * {@link module:engine/model/rootelement~RootElement#is `RootElement#is()`}\n\t * * {@link module:engine/model/position~Position#is `Position#is()`}\n\t * * {@link module:engine/model/liveposition~LivePosition#is `LivePosition#is()`}\n\t * * {@link module:engine/model/range~Range#is `Range#is()`}\n\t * * {@link module:engine/model/liverange~LiveRange#is `LiveRange#is()`}\n\t * * {@link module:engine/model/documentfragment~DocumentFragment#is `DocumentFragment#is()`}\n\t * * {@link module:engine/model/selection~Selection#is `Selection#is()`}\n\t * * {@link module:engine/model/documentselection~DocumentSelection#is `DocumentSelection#is()`}\n\t * * {@link module:engine/model/markercollection~Marker#is `Marker#is()`}\n\t * * {@link module:engine/model/textproxy~TextProxy#is `TextProxy#is()`}\n\t *\n\t * @method #is\n\t * @param {String} type Type to check.\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === 'node' || type === 'model:node';\n\t}\n\n\t/**\n\t * Creates a copy of this node, that is a node with exactly same attributes, and returns it.\n\t *\n\t * @protected\n\t * @returns {module:engine/model/node~Node} Node with same attributes as this node.\n\t */\n\t_clone() {\n\t\treturn new Node( this._attrs );\n\t}\n\n\t/**\n\t * Removes this node from it's parent.\n\t *\n\t * @see module:engine/model/writer~Writer#remove\n\t * @protected\n\t */\n\t_remove() {\n\t\tthis.parent._removeChildren( this.index );\n\t}\n\n\t/**\n\t * Sets attribute on the node. If attribute with the same key already is set, it's value is overwritten.\n\t *\n\t * @see module:engine/model/writer~Writer#setAttribute\n\t * @protected\n\t * @param {String} key Key of attribute to set.\n\t * @param {*} value Attribute value.\n\t */\n\t_setAttribute( key, value ) {\n\t\tthis._attrs.set( key, value );\n\t}\n\n\t/**\n\t * Removes all attributes from the node and sets given attributes.\n\t *\n\t * @see module:engine/model/writer~Writer#setAttributes\n\t * @protected\n\t * @param {Object} [attrs] Attributes to set. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t */\n\t_setAttributesTo( attrs ) {\n\t\tthis._attrs = toMap( attrs );\n\t}\n\n\t/**\n\t * Removes an attribute with given key from the node.\n\t *\n\t * @see module:engine/model/writer~Writer#removeAttribute\n\t * @protected\n\t * @param {String} key Key of attribute to remove.\n\t * @returns {Boolean} `true` if the attribute was set on the element, `false` otherwise.\n\t */\n\t_removeAttribute( key ) {\n\t\treturn this._attrs.delete( key );\n\t}\n\n\t/**\n\t * Removes all attributes from the node.\n\t *\n\t * @see module:engine/model/writer~Writer#clearAttributes\n\t * @protected\n\t */\n\t_clearAttributes() {\n\t\tthis._attrs.clear();\n\t}\n}\n\n/**\n * The node's parent does not contain this node.\n *\n * @error model-node-not-found-in-parent\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/text\n */\n\nimport Node from './node';\n\n// @if CK_DEBUG_ENGINE // const { convertMapToStringifiedObject } = require( '../dev-utils/utils' );\n\n/**\n * Model text node. Type of {@link module:engine/model/node~Node node} that contains {@link module:engine/model/text~Text#data text data}.\n *\n * **Important:** see {@link module:engine/model/node~Node} to read about restrictions using `Text` and `Node` API.\n *\n * **Note:** keep in mind that `Text` instances might indirectly got removed from model tree when model is changed.\n * This happens when {@link module:engine/model/writer~Writer model writer} is used to change model and the text node is merged with\n * another text node. Then, both text nodes are removed and a new text node is inserted into the model. Because of\n * this behavior, keeping references to `Text` is not recommended. Instead, consider creating\n * {@link module:engine/model/liveposition~LivePosition live position} placed before the text node.\n *\n * @extends module:engine/model/node~Node\n */\nexport default class Text extends Node {\n\t/**\n\t * Creates a text node.\n\t *\n\t * **Note:** Constructor of this class shouldn't be used directly in the code.\n\t * Use the {@link module:engine/model/writer~Writer#createText} method instead.\n\t *\n\t * @protected\n\t * @param {String} data Node's text.\n\t * @param {Object} [attrs] Node's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t */\n\tconstructor( data, attrs ) {\n\t\tsuper( attrs );\n\n\t\t/**\n\t\t * Text data contained in this text node.\n\t\t *\n\t\t * @protected\n\t\t * @type {String}\n\t\t */\n\t\tthis._data = data || '';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tget offsetSize() {\n\t\treturn this.data.length;\n\t}\n\n\t/**\n\t * Returns a text data contained in the node.\n\t *\n\t * @readonly\n\t * @type {String}\n\t */\n\tget data() {\n\t\treturn this._data;\n\t}\n\n\t/**\n\t * Checks whether this object is of the given.\n\t *\n\t *\t\ttext.is( '$text' ); // -> true\n\t *\t\ttext.is( 'node' ); // -> true\n\t *\t\ttext.is( 'model:$text' ); // -> true\n\t *\t\ttext.is( 'model:node' ); // -> true\n\t *\n\t *\t\ttext.is( 'view:$text' ); // -> false\n\t *\t\ttext.is( 'documentSelection' ); // -> false\n\t *\n\t * {@link module:engine/model/node~Node#is Check the entire list of model objects} which implement the `is()` method.\n\t *\n\t * **Note:** Until version 20.0.0 this method wasn't accepting `'$text'` type. The legacy `'text'` type is still\n\t * accepted for backward compatibility.\n\t *\n\t * @param {String} type Type to check.\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === '$text' || type === 'model:$text' ||\n\t\t\t// This are legacy values kept for backward compatibility.\n\t\t\ttype === 'text' || type === 'model:text' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n\t\t\ttype === 'node' || type === 'model:node';\n\t}\n\n\t/**\n\t * Converts `Text` instance to plain object and returns it.\n\t *\n\t * @returns {Object} `Text` instance converted to plain object.\n\t */\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\n\t\tjson.data = this.data;\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Creates a copy of this text node and returns it. Created text node has same text data and attributes as original text node.\n\t *\n\t * @protected\n\t * @returns {module:engine/model/text~Text} `Text` instance created using given plain object.\n\t */\n\t_clone() {\n\t\treturn new Text( this.data, this.getAttributes() );\n\t}\n\n\t/**\n\t * Creates a `Text` instance from given plain object (i.e. parsed JSON string).\n\t *\n\t * @param {Object} json Plain object to be converted to `Text`.\n\t * @returns {module:engine/model/text~Text} `Text` instance created using given plain object.\n\t */\n\tstatic fromJSON( json ) {\n\t\treturn new Text( json.data, json.attributes );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // toString() {\n\t// @if CK_DEBUG_ENGINE // \treturn `#${ this.data }`;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // logExtended() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( `ModelText: ${ this }, attrs: ${ convertMapToStringifiedObject( this.getAttributes() ) }` );\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // log() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ModelText: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/textproxy\n */\n\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n// @if CK_DEBUG_ENGINE // const { convertMapToStringifiedObject } = require( '../dev-utils/utils' );\n\n/**\n * `TextProxy` represents a part of {@link module:engine/model/text~Text text node}.\n *\n * Since {@link module:engine/model/position~Position positions} can be placed between characters of a text node,\n * {@link module:engine/model/range~Range ranges} may contain only parts of text nodes. When {@link module:engine/model/range~Range#getItems\n * getting items}\n * contained in such range, we need to represent a part of that text node, since returning the whole text node would be incorrect.\n * `TextProxy` solves this issue.\n *\n * `TextProxy` has an API similar to {@link module:engine/model/text~Text Text} and allows to do most of the common tasks performed\n * on model nodes.\n *\n * **Note:** Some `TextProxy` instances may represent whole text node, not just a part of it.\n * See {@link module:engine/model/textproxy~TextProxy#isPartial}.\n *\n * **Note:** `TextProxy` is not an instance of {@link module:engine/model/node~Node node}. Keep this in mind when using it as a\n * parameter of methods.\n *\n * **Note:** `TextProxy` is a readonly interface. If you want to perform changes on model data represented by a `TextProxy`\n * use {@link module:engine/model/writer~Writer model writer API}.\n *\n * **Note:** `TextProxy` instances are created on the fly, basing on the current state of model. Because of this, it is\n * highly unrecommended to store references to `TextProxy` instances. `TextProxy` instances are not refreshed when\n * model changes, so they might get invalidated. Instead, consider creating {@link module:engine/model/liveposition~LivePosition live\n * position}.\n *\n * `TextProxy` instances are created by {@link module:engine/model/treewalker~TreeWalker model tree walker}. You should not need to create\n * an instance of this class by your own.\n */\nexport default class TextProxy {\n\t/**\n\t * Creates a text proxy.\n\t *\n\t * @protected\n\t * @param {module:engine/model/text~Text} textNode Text node which part is represented by this text proxy.\n\t * @param {Number} offsetInText Offset in {@link module:engine/model/textproxy~TextProxy#textNode text node} from which the text proxy\n\t * starts.\n\t * @param {Number} length Text proxy length, that is how many text node's characters, starting from `offsetInText` it represents.\n\t * @constructor\n\t */\n\tconstructor( textNode, offsetInText, length ) {\n\t\t/**\n\t\t * Text node which part is represented by this text proxy.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/text~Text}\n\t\t */\n\t\tthis.textNode = textNode;\n\n\t\tif ( offsetInText < 0 || offsetInText > textNode.offsetSize ) {\n\t\t\t/**\n\t\t\t * Given `offsetInText` value is incorrect.\n\t\t\t *\n\t\t\t * @error model-textproxy-wrong-offsetintext\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-textproxy-wrong-offsetintext', this );\n\t\t}\n\n\t\tif ( length < 0 || offsetInText + length > textNode.offsetSize ) {\n\t\t\t/**\n\t\t\t * Given `length` value is incorrect.\n\t\t\t *\n\t\t\t * @error model-textproxy-wrong-length\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-textproxy-wrong-length', this );\n\t\t}\n\n\t\t/**\n\t\t * Text data represented by this text proxy.\n\t\t *\n\t\t * @readonly\n\t\t * @member {String}\n\t\t */\n\t\tthis.data = textNode.data.substring( offsetInText, offsetInText + length );\n\n\t\t/**\n\t\t * Offset in {@link module:engine/model/textproxy~TextProxy#textNode text node} from which the text proxy starts.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Number}\n\t\t */\n\t\tthis.offsetInText = offsetInText;\n\t}\n\n\t/**\n\t * Offset at which this text proxy starts in it's parent.\n\t *\n\t * @see module:engine/model/node~Node#startOffset\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget startOffset() {\n\t\treturn this.textNode.startOffset !== null ? this.textNode.startOffset + this.offsetInText : null;\n\t}\n\n\t/**\n\t * Offset size of this text proxy. Equal to the number of characters represented by the text proxy.\n\t *\n\t * @see module:engine/model/node~Node#offsetSize\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget offsetSize() {\n\t\treturn this.data.length;\n\t}\n\n\t/**\n\t * Offset at which this text proxy ends in it's parent.\n\t *\n\t * @see module:engine/model/node~Node#endOffset\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget endOffset() {\n\t\treturn this.startOffset !== null ? this.startOffset + this.offsetSize : null;\n\t}\n\n\t/**\n\t * Flag indicating whether `TextProxy` instance covers only part of the original {@link module:engine/model/text~Text text node}\n\t * (`true`) or the whole text node (`false`).\n\t *\n\t * This is `false` when text proxy starts at the very beginning of {@link module:engine/model/textproxy~TextProxy#textNode textNode}\n\t * ({@link module:engine/model/textproxy~TextProxy#offsetInText offsetInText} equals `0`) and text proxy sizes is equal to\n\t * text node size.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isPartial() {\n\t\treturn this.offsetSize !== this.textNode.offsetSize;\n\t}\n\n\t/**\n\t * Parent of this text proxy, which is same as parent of text node represented by this text proxy.\n\t *\n\t * @readonly\n\t * @type {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment|null}\n\t */\n\tget parent() {\n\t\treturn this.textNode.parent;\n\t}\n\n\t/**\n\t * Root of this text proxy, which is same as root of text node represented by this text proxy.\n\t *\n\t * @readonly\n\t * @type {module:engine/model/node~Node|module:engine/model/documentfragment~DocumentFragment}\n\t */\n\tget root() {\n\t\treturn this.textNode.root;\n\t}\n\n\t/**\n\t * Checks whether this object is of the given.\n\t *\n\t *\t\ttextProxy.is( '$textProxy' ); // -> true\n\t *\t\ttextProxy.is( 'model:$textProxy' ); // -> true\n\t *\n\t *\t\ttextProxy.is( 'view:$textProxy' ); // -> false\n\t *\t\ttextProxy.is( 'range' ); // -> false\n\t *\n\t * {@link module:engine/model/node~Node#is Check the entire list of model objects} which implement the `is()` method.\n\t *\n\t * **Note:** Until version 20.0.0 this method wasn't accepting `'$textProxy'` type. The legacy `'textProxt'` type is still\n\t * accepted for backward compatibility.\n\t *\n\t * @param {String} type Type to check.\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === '$textProxy' || type === 'model:$textProxy' ||\n\t\t\t// This are legacy values kept for backward compatibility.\n\t\t\ttype === 'textProxy' || type === 'model:textProxy';\n\t}\n\n\t/**\n\t * Gets path to this text proxy.\n\t *\n\t * @see module:engine/model/node~Node#getPath\n\t * @returns {Array.<Number>}\n\t */\n\tgetPath() {\n\t\tconst path = this.textNode.getPath();\n\n\t\tif ( path.length > 0 ) {\n\t\t\tpath[ path.length - 1 ] += this.offsetInText;\n\t\t}\n\n\t\treturn path;\n\t}\n\n\t/**\n\t * Returns ancestors array of this text proxy.\n\t *\n\t * @param {Object} options Options object.\n\t * @param {Boolean} [options.includeSelf=false] When set to `true` this text proxy will be also included in parent's array.\n\t * @param {Boolean} [options.parentFirst=false] When set to `true`, array will be sorted from text proxy parent to root element,\n\t * otherwise root element will be the first item in the array.\n\t * @returns {Array} Array with ancestors.\n\t */\n\tgetAncestors( options = { includeSelf: false, parentFirst: false } ) {\n\t\tconst ancestors = [];\n\t\tlet parent = options.includeSelf ? this : this.parent;\n\n\t\twhile ( parent ) {\n\t\t\tancestors[ options.parentFirst ? 'push' : 'unshift' ]( parent );\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn ancestors;\n\t}\n\n\t/**\n\t * Checks if this text proxy has an attribute for given key.\n\t *\n\t * @param {String} key Key of attribute to check.\n\t * @returns {Boolean} `true` if attribute with given key is set on text proxy, `false` otherwise.\n\t */\n\thasAttribute( key ) {\n\t\treturn this.textNode.hasAttribute( key );\n\t}\n\n\t/**\n\t * Gets an attribute value for given key or `undefined` if that attribute is not set on text proxy.\n\t *\n\t * @param {String} key Key of attribute to look for.\n\t * @returns {*} Attribute value or `undefined`.\n\t */\n\tgetAttribute( key ) {\n\t\treturn this.textNode.getAttribute( key );\n\t}\n\n\t/**\n\t * Returns iterator that iterates over this node's attributes. Attributes are returned as arrays containing two\n\t * items. First one is attribute key and second is attribute value.\n\t *\n\t * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t *\n\t * @returns {Iterable.<*>}\n\t */\n\tgetAttributes() {\n\t\treturn this.textNode.getAttributes();\n\t}\n\n\t/**\n\t * Returns iterator that iterates over this node's attribute keys.\n\t *\n\t * @returns {Iterable.<String>}\n\t */\n\tgetAttributeKeys() {\n\t\treturn this.textNode.getAttributeKeys();\n\t}\n\n\t// @if CK_DEBUG_ENGINE // toString() {\n\t// @if CK_DEBUG_ENGINE // \treturn `#${ this.data }`;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // log() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ModelTextProxy: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // logExtended() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( `ModelTextProxy: ${ this }, ` +\n\t// @if CK_DEBUG_ENGINE // \t\t`attrs: ${ convertMapToStringifiedObject( this.getAttributes() ) }` );\n\t// @if CK_DEBUG_ENGINE // }\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/nodelist\n */\n\nimport Node from './node';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n/**\n * Provides an interface to operate on a list of {@link module:engine/model/node~Node nodes}. `NodeList` is used internally\n * in classes like {@link module:engine/model/element~Element Element}\n * or {@link module:engine/model/documentfragment~DocumentFragment DocumentFragment}.\n */\nexport default class NodeList {\n\t/**\n\t * Creates an empty node list.\n\t *\n\t * @protected\n\t * @param {Iterable.<module:engine/model/node~Node>} nodes Nodes contained in this node list.\n\t */\n\tconstructor( nodes ) {\n\t\t/**\n\t\t * Nodes contained in this node list.\n\t\t *\n\t\t * @private\n\t\t * @member {Array.<module:engine/model/node~Node>}\n\t\t */\n\t\tthis._nodes = [];\n\n\t\tif ( nodes ) {\n\t\t\tthis._insertNodes( 0, nodes );\n\t\t}\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * Iterates over all nodes contained inside this node list.\n\t *\n\t * @returns {Iterable.<module:engine/model/node~Node>}\n\t */\n\t[ Symbol.iterator ]() {\n\t\treturn this._nodes[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Number of nodes contained inside this node list.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget length() {\n\t\treturn this._nodes.length;\n\t}\n\n\t/**\n\t * Sum of {@link module:engine/model/node~Node#offsetSize offset sizes} of all nodes contained inside this node list.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget maxOffset() {\n\t\treturn this._nodes.reduce( ( sum, node ) => sum + node.offsetSize, 0 );\n\t}\n\n\t/**\n\t * Gets the node at the given index. Returns `null` if incorrect index was passed.\n\t *\n\t * @param {Number} index Index of node.\n\t * @returns {module:engine/model/node~Node|null} Node at given index.\n\t */\n\tgetNode( index ) {\n\t\treturn this._nodes[ index ] || null;\n\t}\n\n\t/**\n\t * Returns an index of the given node. Returns `null` if given node is not inside this node list.\n\t *\n\t * @param {module:engine/model/node~Node} node Child node to look for.\n\t * @returns {Number|null} Child node's index.\n\t */\n\tgetNodeIndex( node ) {\n\t\tconst index = this._nodes.indexOf( node );\n\n\t\treturn index == -1 ? null : index;\n\t}\n\n\t/**\n\t * Returns the starting offset of given node. Starting offset is equal to the sum of\n\t * {@link module:engine/model/node~Node#offsetSize offset sizes} of all nodes that are before this node in this node list.\n\t *\n\t * @param {module:engine/model/node~Node} node Node to look for.\n\t * @returns {Number|null} Node's starting offset.\n\t */\n\tgetNodeStartOffset( node ) {\n\t\tconst index = this.getNodeIndex( node );\n\n\t\treturn index === null ? null : this._nodes.slice( 0, index ).reduce( ( sum, node ) => sum + node.offsetSize, 0 );\n\t}\n\n\t/**\n\t * Converts index to offset in node list.\n\t *\n\t * Returns starting offset of a node that is at given index. Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError}\n\t * `model-nodelist-index-out-of-bounds` if given index is less than `0` or more than {@link #length}.\n\t *\n\t * @param {Number} index Node's index.\n\t * @returns {Number} Node's starting offset.\n\t */\n\tindexToOffset( index ) {\n\t\tif ( index == this._nodes.length ) {\n\t\t\treturn this.maxOffset;\n\t\t}\n\n\t\tconst node = this._nodes[ index ];\n\n\t\tif ( !node ) {\n\t\t\t/**\n\t\t\t * Given index cannot be found in the node list.\n\t\t\t *\n\t\t\t * @error model-nodelist-index-out-of-bounds\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-nodelist-index-out-of-bounds', this );\n\t\t}\n\n\t\treturn this.getNodeStartOffset( node );\n\t}\n\n\t/**\n\t * Converts offset in node list to index.\n\t *\n\t * Returns index of a node that occupies given offset. Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError}\n\t * `model-nodelist-offset-out-of-bounds` if given offset is less than `0` or more than {@link #maxOffset}.\n\t *\n\t * @param {Number} offset Offset to look for.\n\t * @returns {Number} Index of a node that occupies given offset.\n\t */\n\toffsetToIndex( offset ) {\n\t\tlet totalOffset = 0;\n\n\t\tfor ( const node of this._nodes ) {\n\t\t\tif ( offset >= totalOffset && offset < totalOffset + node.offsetSize ) {\n\t\t\t\treturn this.getNodeIndex( node );\n\t\t\t}\n\n\t\t\ttotalOffset += node.offsetSize;\n\t\t}\n\n\t\tif ( totalOffset != offset ) {\n\t\t\t/**\n\t\t\t * Given offset cannot be found in the node list.\n\t\t\t *\n\t\t\t * @error model-nodelist-offset-out-of-bounds\n\t\t\t * @param {Number} offset\n\t\t\t * @param {module:engine/model/nodelist~NodeList} nodeList Stringified node list.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-nodelist-offset-out-of-bounds',\n\t\t\t\tthis,\n\t\t\t\t{\n\t\t\t\t\toffset,\n\t\t\t\t\tnodeList: this\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\treturn this.length;\n\t}\n\n\t/**\n\t * Inserts given nodes at given index.\n\t *\n\t * @protected\n\t * @param {Number} index Index at which nodes should be inserted.\n\t * @param {Iterable.<module:engine/model/node~Node>} nodes Nodes to be inserted.\n\t */\n\t_insertNodes( index, nodes ) {\n\t\t// Validation.\n\t\tfor ( const node of nodes ) {\n\t\t\tif ( !( node instanceof Node ) ) {\n\t\t\t\t/**\n\t\t\t\t * Trying to insert an object which is not a Node instance.\n\t\t\t\t *\n\t\t\t\t * @error model-nodelist-insertnodes-not-node\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'model-nodelist-insertnodes-not-node', this );\n\t\t\t}\n\t\t}\n\n\t\tthis._nodes.splice( index, 0, ...nodes );\n\t}\n\n\t/**\n\t * Removes one or more nodes starting at the given index.\n\t *\n\t * @protected\n\t * @param {Number} indexStart Index of the first node to remove.\n\t * @param {Number} [howMany=1] Number of nodes to remove.\n\t * @returns {Array.<module:engine/model/node~Node>} Array containing removed nodes.\n\t */\n\t_removeNodes( indexStart, howMany = 1 ) {\n\t\treturn this._nodes.splice( indexStart, howMany );\n\t}\n\n\t/**\n\t * Converts `NodeList` instance to an array containing nodes that were inserted in the node list. Nodes\n\t * are also converted to their plain object representation.\n\t *\n\t * @returns {Array.<module:engine/model/node~Node>} `NodeList` instance converted to `Array`.\n\t */\n\ttoJSON() {\n\t\treturn this._nodes.map( node => node.toJSON() );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/element\n */\n\nimport Node from './node';\nimport NodeList from './nodelist';\nimport Text from './text';\nimport TextProxy from './textproxy';\nimport isIterable from '@ckeditor/ckeditor5-utils/src/isiterable';\n\n// @if CK_DEBUG_ENGINE // const { stringifyMap, convertMapToStringifiedObject, convertMapToTags } = require( '../dev-utils/utils' );\n\n/**\n * Model element. Type of {@link module:engine/model/node~Node node} that has a {@link module:engine/model/element~Element#name name} and\n * {@link module:engine/model/element~Element#getChildren child nodes}.\n *\n * **Important**: see {@link module:engine/model/node~Node} to read about restrictions using `Element` and `Node` API.\n *\n * @extends module:engine/model/node~Node\n */\nexport default class Element extends Node {\n\t/**\n\t * Creates a model element.\n\t *\n\t * **Note:** Constructor of this class shouldn't be used directly in the code.\n\t * Use the {@link module:engine/model/writer~Writer#createElement} method instead.\n\t *\n\t * @protected\n\t * @param {String} name Element's name.\n\t * @param {Object} [attrs] Element's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t * @param {module:engine/model/node~Node|Iterable.<module:engine/model/node~Node>} [children]\n\t * One or more nodes to be inserted as children of created element.\n\t */\n\tconstructor( name, attrs, children ) {\n\t\tsuper( attrs );\n\n\t\t/**\n\t\t * Element name.\n\t\t *\n\t\t * @readonly\n\t\t * @member {String} module:engine/model/element~Element#name\n\t\t */\n\t\tthis.name = name;\n\n\t\t/**\n\t\t * List of children nodes.\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/model/nodelist~NodeList} module:engine/model/element~Element#_children\n\t\t */\n\t\tthis._children = new NodeList();\n\n\t\tif ( children ) {\n\t\t\tthis._insertChild( 0, children );\n\t\t}\n\t}\n\n\t/**\n\t * Number of this element's children.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget childCount() {\n\t\treturn this._children.length;\n\t}\n\n\t/**\n\t * Sum of {@link module:engine/model/node~Node#offsetSize offset sizes} of all of this element's children.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget maxOffset() {\n\t\treturn this._children.maxOffset;\n\t}\n\n\t/**\n\t * Is `true` if there are no nodes inside this element, `false` otherwise.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isEmpty() {\n\t\treturn this.childCount === 0;\n\t}\n\n\t/**\n\t * Checks whether this object is of the given.\n\t *\n\t *\t\telement.is( 'element' ); // -> true\n\t *\t\telement.is( 'node' ); // -> true\n\t *\t\telement.is( 'model:element' ); // -> true\n\t *\t\telement.is( 'model:node' ); // -> true\n\t *\n\t *\t\telement.is( 'view:element' ); // -> false\n\t *\t\telement.is( 'documentSelection' ); // -> false\n\t *\n\t * Assuming that the object being checked is an element, you can also check its\n\t * {@link module:engine/model/element~Element#name name}:\n\t *\n\t *\t\telement.is( 'element', 'imageBlock' ); // -> true if this is an <imageBlock> element\n\t *\t\telement.is( 'element', 'imageBlock' ); // -> same as above\n\t *\t\ttext.is( 'element', 'imageBlock' ); -> false\n\t *\n\t * {@link module:engine/model/node~Node#is Check the entire list of model objects} which implement the `is()` method.\n\t *\n\t * @param {String} type Type to check.\n\t * @param {String} [name] Element name.\n\t * @returns {Boolean}\n\t */\n\tis( type, name = null ) {\n\t\tif ( !name ) {\n\t\t\treturn type === 'element' || type === 'model:element' ||\n\t\t\t\t// From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n\t\t\t\ttype === 'node' || type === 'model:node';\n\t\t}\n\n\t\treturn name === this.name && ( type === 'element' || type === 'model:element' );\n\t}\n\n\t/**\n\t * Gets the child at the given index.\n\t *\n\t * @param {Number} index Index of child.\n\t * @returns {module:engine/model/node~Node} Child node.\n\t */\n\tgetChild( index ) {\n\t\treturn this._children.getNode( index );\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all of this element's children.\n\t *\n\t * @returns {Iterable.<module:engine/model/node~Node>}\n\t */\n\tgetChildren() {\n\t\treturn this._children[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Returns an index of the given child node. Returns `null` if given node is not a child of this element.\n\t *\n\t * @param {module:engine/model/node~Node} node Child node to look for.\n\t * @returns {Number} Child node's index in this element.\n\t */\n\tgetChildIndex( node ) {\n\t\treturn this._children.getNodeIndex( node );\n\t}\n\n\t/**\n\t * Returns the starting offset of given child. Starting offset is equal to the sum of\n\t * {@link module:engine/model/node~Node#offsetSize offset sizes} of all node's siblings that are before it. Returns `null` if\n\t * given node is not a child of this element.\n\t *\n\t * @param {module:engine/model/node~Node} node Child node to look for.\n\t * @returns {Number} Child node's starting offset.\n\t */\n\tgetChildStartOffset( node ) {\n\t\treturn this._children.getNodeStartOffset( node );\n\t}\n\n\t/**\n\t * Returns index of a node that occupies given offset. If given offset is too low, returns `0`. If given offset is\n\t * too high, returns {@link module:engine/model/element~Element#getChildIndex index after last child}.\n\t *\n\t *\t\tconst textNode = new Text( 'foo' );\n\t *\t\tconst pElement = new Element( 'p' );\n\t *\t\tconst divElement = new Element( [ textNode, pElement ] );\n\t *\t\tdivElement.offsetToIndex( -1 ); // Returns 0, because offset is too low.\n\t *\t\tdivElement.offsetToIndex( 0 ); // Returns 0, because offset 0 is taken by `textNode` which is at index 0.\n\t *\t\tdivElement.offsetToIndex( 1 ); // Returns 0, because `textNode` has `offsetSize` equal to 3, so it occupies offset 1 too.\n\t *\t\tdivElement.offsetToIndex( 2 ); // Returns 0.\n\t *\t\tdivElement.offsetToIndex( 3 ); // Returns 1.\n\t *\t\tdivElement.offsetToIndex( 4 ); // Returns 2. There are no nodes at offset 4, so last available index is returned.\n\t *\n\t * @param {Number} offset Offset to look for.\n\t * @returns {Number}\n\t */\n\toffsetToIndex( offset ) {\n\t\treturn this._children.offsetToIndex( offset );\n\t}\n\n\t/**\n\t * Returns a descendant node by its path relative to this element.\n\t *\n\t *\t\t// <this>a<b>c</b></this>\n\t *\t\tthis.getNodeByPath( [ 0 ] ); // -> \"a\"\n\t *\t\tthis.getNodeByPath( [ 1 ] ); // -> <b>\n\t *\t\tthis.getNodeByPath( [ 1, 0 ] ); // -> \"c\"\n\t *\n\t * @param {Array.<Number>} relativePath Path of the node to find, relative to this element.\n\t * @returns {module:engine/model/node~Node}\n\t */\n\tgetNodeByPath( relativePath ) {\n\t\tlet node = this; // eslint-disable-line consistent-this\n\n\t\tfor ( const index of relativePath ) {\n\t\t\tnode = node.getChild( node.offsetToIndex( index ) );\n\t\t}\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Returns the parent element of the given name. Returns null if the element is not inside the desired parent.\n\t *\n\t * @param {String} parentName The name of the parent element to find.\n\t * @param {Object} [options] Options object.\n\t * @param {Boolean} [options.includeSelf=false] When set to `true` this node will be also included while searching.\n\t * @returns {module:engine/model/element~Element|null}\n\t */\n\tfindAncestor( parentName, options = { includeSelf: false } ) {\n\t\tlet parent = options.includeSelf ? this : this.parent;\n\n\t\twhile ( parent ) {\n\t\t\tif ( parent.name === parentName ) {\n\t\t\t\treturn parent;\n\t\t\t}\n\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Converts `Element` instance to plain object and returns it. Takes care of converting all of this element's children.\n\t *\n\t * @returns {Object} `Element` instance converted to plain object.\n\t */\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\n\t\tjson.name = this.name;\n\n\t\tif ( this._children.length > 0 ) {\n\t\t\tjson.children = [];\n\n\t\t\tfor ( const node of this._children ) {\n\t\t\t\tjson.children.push( node.toJSON() );\n\t\t\t}\n\t\t}\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Creates a copy of this element and returns it. Created element has the same name and attributes as the original element.\n\t * If clone is deep, the original element's children are also cloned. If not, then empty element is returned.\n\t *\n\t * @protected\n\t * @param {Boolean} [deep=false] If set to `true` clones element and all its children recursively. When set to `false`,\n\t * element will be cloned without any child.\n\t */\n\t_clone( deep = false ) {\n\t\tconst children = deep ? Array.from( this._children ).map( node => node._clone( true ) ) : null;\n\n\t\treturn new Element( this.name, this.getAttributes(), children );\n\t}\n\n\t/**\n\t * {@link module:engine/model/element~Element#_insertChild Inserts} one or more nodes at the end of this element.\n\t *\n\t * @see module:engine/model/writer~Writer#append\n\t * @protected\n\t * @param {module:engine/model/item~Item|Iterable.<module:engine/model/item~Item>} nodes Nodes to be inserted.\n\t */\n\t_appendChild( nodes ) {\n\t\tthis._insertChild( this.childCount, nodes );\n\t}\n\n\t/**\n\t * Inserts one or more nodes at the given index and sets {@link module:engine/model/node~Node#parent parent} of these nodes\n\t * to this element.\n\t *\n\t * @see module:engine/model/writer~Writer#insert\n\t * @protected\n\t * @param {Number} index Index at which nodes should be inserted.\n\t * @param {module:engine/model/item~Item|Iterable.<module:engine/model/item~Item>} items Items to be inserted.\n\t */\n\t_insertChild( index, items ) {\n\t\tconst nodes = normalize( items );\n\n\t\tfor ( const node of nodes ) {\n\t\t\t// If node that is being added to this element is already inside another element, first remove it from the old parent.\n\t\t\tif ( node.parent !== null ) {\n\t\t\t\tnode._remove();\n\t\t\t}\n\n\t\t\tnode.parent = this;\n\t\t}\n\n\t\tthis._children._insertNodes( index, nodes );\n\t}\n\n\t/**\n\t * Removes one or more nodes starting at the given index and sets\n\t * {@link module:engine/model/node~Node#parent parent} of these nodes to `null`.\n\t *\n\t * @see module:engine/model/writer~Writer#remove\n\t * @protected\n\t * @param {Number} index Index of the first node to remove.\n\t * @param {Number} [howMany=1] Number of nodes to remove.\n\t * @returns {Array.<module:engine/model/node~Node>} Array containing removed nodes.\n\t */\n\t_removeChildren( index, howMany = 1 ) {\n\t\tconst nodes = this._children._removeNodes( index, howMany );\n\n\t\tfor ( const node of nodes ) {\n\t\t\tnode.parent = null;\n\t\t}\n\n\t\treturn nodes;\n\t}\n\n\t/**\n\t * Creates an `Element` instance from given plain object (i.e. parsed JSON string).\n\t * Converts `Element` children to proper nodes.\n\t *\n\t * @param {Object} json Plain object to be converted to `Element`.\n\t * @returns {module:engine/model/element~Element} `Element` instance created using given plain object.\n\t */\n\tstatic fromJSON( json ) {\n\t\tlet children = null;\n\n\t\tif ( json.children ) {\n\t\t\tchildren = [];\n\n\t\t\tfor ( const child of json.children ) {\n\t\t\t\tif ( child.name ) {\n\t\t\t\t\t// If child has name property, it is an Element.\n\t\t\t\t\tchildren.push( Element.fromJSON( child ) );\n\t\t\t\t} else {\n\t\t\t\t\t// Otherwise, it is a Text node.\n\t\t\t\t\tchildren.push( Text.fromJSON( child ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new Element( json.name, json.attributes, children );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // toString() {\n\t// @if CK_DEBUG_ENGINE // \treturn `<${ this.rootName || this.name }>`;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // log() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ModelElement: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // logExtended() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( `ModelElement: ${ this }, ${ this.childCount } children,\n\t// @if CK_DEBUG_ENGINE //\t\tattrs: ${ convertMapToStringifiedObject( this.getAttributes() ) }` );\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // logAll() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( '--------------------' );\n\t// @if CK_DEBUG_ENGINE //\n\t// @if CK_DEBUG_ENGINE // \tthis.logExtended();\n\t// @if CK_DEBUG_ENGINE //\tconsole.log( 'List of children:' );\n\t// @if CK_DEBUG_ENGINE //\n\t// @if CK_DEBUG_ENGINE // \tfor ( const child of this.getChildren() ) {\n\t// @if CK_DEBUG_ENGINE // \t\tchild.log();\n\t// @if CK_DEBUG_ENGINE // \t}\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // printTree( level = 0) {\n\t// @if CK_DEBUG_ENGINE // \tlet string = '';\n\n\t// @if CK_DEBUG_ENGINE // \tstring += '\\t'.repeat( level );\n\t// @if CK_DEBUG_ENGINE // \tstring += `<${ this.rootName || this.name }${ convertMapToTags( this.getAttributes() ) }>`;\n\n\t// @if CK_DEBUG_ENGINE // \tfor ( const child of this.getChildren() ) {\n\t// @if CK_DEBUG_ENGINE // \t\tstring += '\\n';\n\n\t// @if CK_DEBUG_ENGINE // \t\tif ( child.is( '$text' ) ) {\n\t// @if CK_DEBUG_ENGINE // \t\t\tconst textAttrs = convertMapToTags( child._attrs );\n\n\t// @if CK_DEBUG_ENGINE // \t\t\tstring += '\\t'.repeat( level + 1 );\n\n\t// @if CK_DEBUG_ENGINE // \t\t\tif ( textAttrs !== '' ) {\n\t// @if CK_DEBUG_ENGINE // \t\t\t\tstring += `<$text${ textAttrs }>` + child.data + '</$text>';\n\t// @if CK_DEBUG_ENGINE // \t\t\t} else {\n\t// @if CK_DEBUG_ENGINE // \t\t\t\tstring += child.data;\n\t// @if CK_DEBUG_ENGINE // \t\t\t}\n\t// @if CK_DEBUG_ENGINE // \t\t} else {\n\t// @if CK_DEBUG_ENGINE // \t\t\tstring += child.printTree( level + 1 );\n\t// @if CK_DEBUG_ENGINE // \t\t}\n\t// @if CK_DEBUG_ENGINE // \t}\n\n\t// @if CK_DEBUG_ENGINE // \tif ( this.childCount ) {\n\t// @if CK_DEBUG_ENGINE // \t\tstring += '\\n' + '\\t'.repeat( level );\n\t// @if CK_DEBUG_ENGINE // \t}\n\n\t// @if CK_DEBUG_ENGINE // \tstring += `</${ this.rootName || this.name }>`;\n\n\t// @if CK_DEBUG_ENGINE // \treturn string;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // logTree() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( this.printTree() );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n// Converts strings to Text and non-iterables to arrays.\n//\n// @param {String|module:engine/model/item~Item|Iterable.<String|module:engine/model/item~Item>}\n// @returns {Iterable.<module:engine/model/node~Node>}\nfunction normalize( nodes ) {\n\t// Separate condition because string is iterable.\n\tif ( typeof nodes == 'string' ) {\n\t\treturn [ new Text( nodes ) ];\n\t}\n\n\tif ( !isIterable( nodes ) ) {\n\t\tnodes = [ nodes ];\n\t}\n\n\t// Array.from to enable .map() on non-arrays.\n\treturn Array.from( nodes )\n\t\t.map( node => {\n\t\t\tif ( typeof node == 'string' ) {\n\t\t\t\treturn new Text( node );\n\t\t\t}\n\n\t\t\tif ( node instanceof TextProxy ) {\n\t\t\t\treturn new Text( node.data, node.getAttributes() );\n\t\t\t}\n\n\t\t\treturn node;\n\t\t} );\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/treewalker\n */\n\nimport Text from './text';\nimport TextProxy from './textproxy';\nimport Element from './element';\nimport {\n\tdefault as Position,\n\tgetTextNodeAtPosition,\n\tgetNodeAfterPosition,\n\tgetNodeBeforePosition\n} from './position';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n/**\n * Position iterator class. It allows to iterate forward and backward over the document.\n */\nexport default class TreeWalker {\n\t/**\n\t * Creates a range iterator. All parameters are optional, but you have to specify either `boundaries` or `startPosition`.\n\t *\n\t * @constructor\n\t * @param {Object} [options={}] Object with configuration.\n\t * @param {'forward'|'backward'} [options.direction='forward'] Walking direction.\n\t * @param {module:engine/model/range~Range} [options.boundaries=null] Range to define boundaries of the iterator.\n\t * @param {module:engine/model/position~Position} [options.startPosition] Starting position.\n\t * @param {Boolean} [options.singleCharacters=false] Flag indicating whether all consecutive characters with the same attributes\n\t * should be returned one by one as multiple {@link module:engine/model/textproxy~TextProxy} (`true`) objects or as one\n\t * {@link module:engine/model/textproxy~TextProxy} (`false`).\n\t * @param {Boolean} [options.shallow=false] Flag indicating whether iterator should enter elements or not. If the\n\t * iterator is shallow child nodes of any iterated node will not be returned along with `elementEnd` tag.\n\t * @param {Boolean} [options.ignoreElementEnd=false] Flag indicating whether iterator should ignore `elementEnd`\n\t * tags. If the option is true walker will not return a parent node of start position. If this option is `true`\n\t * each {@link module:engine/model/element~Element} will be returned once, while if the option is `false` they might be returned\n\t * twice: for `'elementStart'` and `'elementEnd'`.\n\t */\n\tconstructor( options = {} ) {\n\t\tif ( !options.boundaries && !options.startPosition ) {\n\t\t\t/**\n\t\t\t * Neither boundaries nor starting position of a `TreeWalker` have been defined.\n\t\t\t *\n\t\t\t * @error model-tree-walker-no-start-position\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'model-tree-walker-no-start-position',\n\t\t\t\tnull\n\t\t\t);\n\t\t}\n\n\t\tconst direction = options.direction || 'forward';\n\n\t\tif ( direction != 'forward' && direction != 'backward' ) {\n\t\t\t/**\n\t\t\t * Only `backward` and `forward` direction allowed.\n\t\t\t *\n\t\t\t * @error model-tree-walker-unknown-direction\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-tree-walker-unknown-direction', options, { direction } );\n\t\t}\n\n\t\t/**\n\t\t * Walking direction. Defaults `'forward'`.\n\t\t *\n\t\t * @readonly\n\t\t * @member {'backward'|'forward'} module:engine/model/treewalker~TreeWalker#direction\n\t\t */\n\t\tthis.direction = direction;\n\n\t\t/**\n\t\t * Iterator boundaries.\n\t\t *\n\t\t * When the iterator is walking `'forward'` on the end of boundary or is walking `'backward'`\n\t\t * on the start of boundary, then `{ done: true }` is returned.\n\t\t *\n\t\t * If boundaries are not defined they are set before first and after last child of the root node.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/range~Range} module:engine/model/treewalker~TreeWalker#boundaries\n\t\t */\n\t\tthis.boundaries = options.boundaries || null;\n\n\t\t/**\n\t\t * Iterator position. This is always static position, even if the initial position was a\n\t\t * {@link module:engine/model/liveposition~LivePosition live position}. If start position is not defined then position depends\n\t\t * on {@link #direction}. If direction is `'forward'` position starts form the beginning, when direction\n\t\t * is `'backward'` position starts from the end.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/position~Position} module:engine/model/treewalker~TreeWalker#position\n\t\t */\n\t\tif ( options.startPosition ) {\n\t\t\tthis.position = options.startPosition.clone();\n\t\t} else {\n\t\t\tthis.position = Position._createAt( this.boundaries[ this.direction == 'backward' ? 'end' : 'start' ] );\n\t\t}\n\n\t\t// Reset position stickiness in case it was set to other value, as the stickiness is kept after cloning.\n\t\tthis.position.stickiness = 'toNone';\n\n\t\t/**\n\t\t * Flag indicating whether all consecutive characters with the same attributes should be\n\t\t * returned as one {@link module:engine/model/textproxy~TextProxy} (`true`) or one by one (`false`).\n\t\t *\n\t\t * @readonly\n\t\t * @member {Boolean} module:engine/model/treewalker~TreeWalker#singleCharacters\n\t\t */\n\t\tthis.singleCharacters = !!options.singleCharacters;\n\n\t\t/**\n\t\t * Flag indicating whether iterator should enter elements or not. If the iterator is shallow child nodes of any\n\t\t * iterated node will not be returned along with `elementEnd` tag.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Boolean} module:engine/model/treewalker~TreeWalker#shallow\n\t\t */\n\t\tthis.shallow = !!options.shallow;\n\n\t\t/**\n\t\t * Flag indicating whether iterator should ignore `elementEnd` tags. If the option is true walker will not\n\t\t * return a parent node of the start position. If this option is `true` each {@link module:engine/model/element~Element} will\n\t\t * be returned once, while if the option is `false` they might be returned twice:\n\t\t * for `'elementStart'` and `'elementEnd'`.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Boolean} module:engine/model/treewalker~TreeWalker#ignoreElementEnd\n\t\t */\n\t\tthis.ignoreElementEnd = !!options.ignoreElementEnd;\n\n\t\t/**\n\t\t * Start boundary cached for optimization purposes.\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/model/element~Element} module:engine/model/treewalker~TreeWalker#_boundaryStartParent\n\t\t */\n\t\tthis._boundaryStartParent = this.boundaries ? this.boundaries.start.parent : null;\n\n\t\t/**\n\t\t * End boundary cached for optimization purposes.\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/model/element~Element} module:engine/model/treewalker~TreeWalker#_boundaryEndParent\n\t\t */\n\t\tthis._boundaryEndParent = this.boundaries ? this.boundaries.end.parent : null;\n\n\t\t/**\n\t\t * Parent of the most recently visited node. Cached for optimization purposes.\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment}\n\t\t * module:engine/model/treewalker~TreeWalker#_visitedParent\n\t\t */\n\t\tthis._visitedParent = this.position.parent;\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * @returns {Iterable.<module:engine/model/treewalker~TreeWalkerValue>}\n\t */\n\t[ Symbol.iterator ]() {\n\t\treturn this;\n\t}\n\n\t/**\n\t * Moves {@link #position} in the {@link #direction} skipping values as long as the callback function returns `true`.\n\t *\n\t * For example:\n\t *\n\t * \t\twalker.skip( value => value.type == 'text' ); // <paragraph>[]foo</paragraph> -> <paragraph>foo[]</paragraph>\n\t * \t\twalker.skip( () => true ); // Move the position to the end: <paragraph>[]foo</paragraph> -> <paragraph>foo</paragraph>[]\n\t * \t\twalker.skip( () => false ); // Do not move the position.\n\t *\n\t * @param {Function} skip Callback function. Gets {@link module:engine/model/treewalker~TreeWalkerValue} and should\n\t * return `true` if the value should be skipped or `false` if not.\n\t */\n\tskip( skip ) {\n\t\tlet done, value, prevPosition, prevVisitedParent;\n\n\t\tdo {\n\t\t\tprevPosition = this.position;\n\t\t\tprevVisitedParent = this._visitedParent;\n\n\t\t\t( { done, value } = this.next() );\n\t\t} while ( !done && skip( value ) );\n\n\t\tif ( !done ) {\n\t\t\tthis.position = prevPosition;\n\t\t\tthis._visitedParent = prevVisitedParent;\n\t\t}\n\t}\n\n\t/**\n\t * Gets the next tree walker's value.\n\t *\n\t * @returns {module:engine/model/treewalker~TreeWalkerValue} Next tree walker's value.\n\t */\n\tnext() {\n\t\tif ( this.direction == 'forward' ) {\n\t\t\treturn this._next();\n\t\t} else {\n\t\t\treturn this._previous();\n\t\t}\n\t}\n\n\t/**\n\t * Makes a step forward in model. Moves the {@link #position} to the next position and returns the encountered value.\n\t *\n\t * @private\n\t * @returns {Object}\n\t * @returns {Boolean} return.done True if iterator is done.\n\t * @returns {module:engine/model/treewalker~TreeWalkerValue} return.value Information about taken step.\n\t */\n\t_next() {\n\t\tconst previousPosition = this.position;\n\t\tconst position = this.position.clone();\n\t\tconst parent = this._visitedParent;\n\n\t\t// We are at the end of the root.\n\t\tif ( parent.parent === null && position.offset === parent.maxOffset ) {\n\t\t\treturn { done: true };\n\t\t}\n\n\t\t// We reached the walker boundary.\n\t\tif ( parent === this._boundaryEndParent && position.offset == this.boundaries.end.offset ) {\n\t\t\treturn { done: true };\n\t\t}\n\n\t\t// Get node just after the current position.\n\t\t// Use a highly optimized version instead of checking the text node first and then getting the node after. See #6582.\n\t\tconst positionParent = position.parent;\n\t\tconst textNodeAtPosition = getTextNodeAtPosition( position, positionParent );\n\t\tconst node = textNodeAtPosition ? textNodeAtPosition : getNodeAfterPosition( position, positionParent, textNodeAtPosition );\n\n\t\tif ( node instanceof Element ) {\n\t\t\tif ( !this.shallow ) {\n\t\t\t\t// Manual operations on path internals for optimization purposes. Here and in the rest of the method.\n\t\t\t\tposition.path.push( 0 );\n\t\t\t\tthis._visitedParent = node;\n\t\t\t} else {\n\t\t\t\tposition.offset++;\n\t\t\t}\n\n\t\t\tthis.position = position;\n\n\t\t\treturn formatReturnValue( 'elementStart', node, previousPosition, position, 1 );\n\t\t} else if ( node instanceof Text ) {\n\t\t\tlet charactersCount;\n\n\t\t\tif ( this.singleCharacters ) {\n\t\t\t\tcharactersCount = 1;\n\t\t\t} else {\n\t\t\t\tlet offset = node.endOffset;\n\n\t\t\t\tif ( this._boundaryEndParent == parent && this.boundaries.end.offset < offset ) {\n\t\t\t\t\toffset = this.boundaries.end.offset;\n\t\t\t\t}\n\n\t\t\t\tcharactersCount = offset - position.offset;\n\t\t\t}\n\n\t\t\tconst offsetInTextNode = position.offset - node.startOffset;\n\t\t\tconst item = new TextProxy( node, offsetInTextNode, charactersCount );\n\n\t\t\tposition.offset += charactersCount;\n\t\t\tthis.position = position;\n\n\t\t\treturn formatReturnValue( 'text', item, previousPosition, position, charactersCount );\n\t\t} else {\n\t\t\t// `node` is not set, we reached the end of current `parent`.\n\t\t\tposition.path.pop();\n\t\t\tposition.offset++;\n\t\t\tthis.position = position;\n\t\t\tthis._visitedParent = parent.parent;\n\n\t\t\tif ( this.ignoreElementEnd ) {\n\t\t\t\treturn this._next();\n\t\t\t} else {\n\t\t\t\treturn formatReturnValue( 'elementEnd', parent, previousPosition, position );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Makes a step backward in model. Moves the {@link #position} to the previous position and returns the encountered value.\n\t *\n\t * @private\n\t * @returns {Object}\n\t * @returns {Boolean} return.done True if iterator is done.\n\t * @returns {module:engine/model/treewalker~TreeWalkerValue} return.value Information about taken step.\n\t */\n\t_previous() {\n\t\tconst previousPosition = this.position;\n\t\tconst position = this.position.clone();\n\t\tconst parent = this._visitedParent;\n\n\t\t// We are at the beginning of the root.\n\t\tif ( parent.parent === null && position.offset === 0 ) {\n\t\t\treturn { done: true };\n\t\t}\n\n\t\t// We reached the walker boundary.\n\t\tif ( parent == this._boundaryStartParent && position.offset == this.boundaries.start.offset ) {\n\t\t\treturn { done: true };\n\t\t}\n\n\t\t// Get node just before the current position.\n\t\t// Use a highly optimized version instead of checking the text node first and then getting the node before. See #6582.\n\t\tconst positionParent = position.parent;\n\t\tconst textNodeAtPosition = getTextNodeAtPosition( position, positionParent );\n\t\tconst node = textNodeAtPosition ? textNodeAtPosition : getNodeBeforePosition( position, positionParent, textNodeAtPosition );\n\n\t\tif ( node instanceof Element ) {\n\t\t\tposition.offset--;\n\n\t\t\tif ( !this.shallow ) {\n\t\t\t\tposition.path.push( node.maxOffset );\n\t\t\t\tthis.position = position;\n\t\t\t\tthis._visitedParent = node;\n\n\t\t\t\tif ( this.ignoreElementEnd ) {\n\t\t\t\t\treturn this._previous();\n\t\t\t\t} else {\n\t\t\t\t\treturn formatReturnValue( 'elementEnd', node, previousPosition, position );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.position = position;\n\n\t\t\t\treturn formatReturnValue( 'elementStart', node, previousPosition, position, 1 );\n\t\t\t}\n\t\t} else if ( node instanceof Text ) {\n\t\t\tlet charactersCount;\n\n\t\t\tif ( this.singleCharacters ) {\n\t\t\t\tcharactersCount = 1;\n\t\t\t} else {\n\t\t\t\tlet offset = node.startOffset;\n\n\t\t\t\tif ( this._boundaryStartParent == parent && this.boundaries.start.offset > offset ) {\n\t\t\t\t\toffset = this.boundaries.start.offset;\n\t\t\t\t}\n\n\t\t\t\tcharactersCount = position.offset - offset;\n\t\t\t}\n\n\t\t\tconst offsetInTextNode = position.offset - node.startOffset;\n\t\t\tconst item = new TextProxy( node, offsetInTextNode - charactersCount, charactersCount );\n\n\t\t\tposition.offset -= charactersCount;\n\t\t\tthis.position = position;\n\n\t\t\treturn formatReturnValue( 'text', item, previousPosition, position, charactersCount );\n\t\t} else {\n\t\t\t// `node` is not set, we reached the beginning of current `parent`.\n\t\t\tposition.path.pop();\n\t\t\tthis.position = position;\n\t\t\tthis._visitedParent = parent.parent;\n\n\t\t\treturn formatReturnValue( 'elementStart', parent, previousPosition, position, 1 );\n\t\t}\n\t}\n}\n\nfunction formatReturnValue( type, item, previousPosition, nextPosition, length ) {\n\treturn {\n\t\tdone: false,\n\t\tvalue: {\n\t\t\ttype,\n\t\t\titem,\n\t\t\tpreviousPosition,\n\t\t\tnextPosition,\n\t\t\tlength\n\t\t}\n\t};\n}\n\n/**\n * Type of the step made by {@link module:engine/model/treewalker~TreeWalker}.\n * Possible values: `'elementStart'` if walker is at the beginning of a node, `'elementEnd'` if walker is at the end of node,\n * or `'text'` if walker traversed over text.\n *\n * @typedef {'elementStart'|'elementEnd'|'text'} module:engine/model/treewalker~TreeWalkerValueType\n */\n\n/**\n * Object returned by {@link module:engine/model/treewalker~TreeWalker} when traversing tree model.\n *\n * @typedef {Object} module:engine/model/treewalker~TreeWalkerValue\n * @property {module:engine/model/treewalker~TreeWalkerValueType} type\n * @property {module:engine/model/item~Item} item Item between old and new positions of {@link module:engine/model/treewalker~TreeWalker}.\n * @property {module:engine/model/position~Position} previousPosition Previous position of the iterator.\n * * Forward iteration: For `'elementEnd'` it is the last position inside the element. For all other types it is the\n * position before the item.\n * * Backward iteration: For `'elementStart'` it is the first position inside the element. For all other types it is\n * the position after item.\n * @property {module:engine/model/position~Position} nextPosition Next position of the iterator.\n * * Forward iteration: For `'elementStart'` it is the first position inside the element. For all other types it is\n * the position after the item.\n * * Backward iteration: For `'elementEnd'` it is last position inside element. For all other types it is the position\n * before the item.\n * @property {Number} [length] Length of the item. For `'elementStart'` it is 1. For `'text'` it is\n * the length of the text. For `'elementEnd'` it is `undefined`.\n */\n\n/**\n * Tree walking directions.\n *\n * @typedef {'forward'|'backward'} module:engine/model/treewalker~TreeWalkerDirection\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/position\n */\n\nimport TreeWalker from './treewalker';\nimport compareArrays from '@ckeditor/ckeditor5-utils/src/comparearrays';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n// To check if component is loaded more than once.\nimport '@ckeditor/ckeditor5-utils/src/version';\n\n/**\n * Represents a position in the model tree.\n *\n * A position is represented by its {@link module:engine/model/position~Position#root} and\n * a {@link module:engine/model/position~Position#path} in that root.\n *\n * You can create position instances via its constructor or the `createPosition*()` factory methods of\n * {@link module:engine/model/model~Model} and {@link module:engine/model/writer~Writer}.\n *\n * **Note:** Position is based on offsets, not indexes. This means that a position between two text nodes\n * `foo` and `bar` has offset `3`, not `1`. See {@link module:engine/model/position~Position#path} for more information.\n *\n * Since a position in the model is represented by a {@link module:engine/model/position~Position#root position root} and\n * {@link module:engine/model/position~Position#path position path} it is possible to create positions placed in non-existing places.\n * This requirement is important for operational transformation algorithms.\n *\n * Also, {@link module:engine/model/operation/operation~Operation operations}\n * kept in the {@link module:engine/model/document~Document#history document history}\n * are storing positions (and ranges) which were correct when those operations were applied, but may not be correct\n * after the document has changed.\n *\n * When changes are applied to the model, it may also happen that {@link module:engine/model/position~Position#parent position parent}\n * will change even if position path has not changed. Keep in mind, that if a position leads to non-existing element,\n * {@link module:engine/model/position~Position#parent} and some other properties and methods will throw errors.\n *\n * In most cases, position with wrong path is caused by an error in code, but it is sometimes needed, as described above.\n */\nexport default class Position {\n\t/**\n\t * Creates a position.\n\t *\n\t * @param {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment} root Root of the position.\n\t * @param {Array.<Number>} path Position path. See {@link module:engine/model/position~Position#path}.\n\t * @param {module:engine/model/position~PositionStickiness} [stickiness='toNone'] Position stickiness.\n\t * See {@link module:engine/model/position~PositionStickiness}.\n\t */\n\tconstructor( root, path, stickiness = 'toNone' ) {\n\t\tif ( !root.is( 'element' ) && !root.is( 'documentFragment' ) ) {\n\t\t\t/**\n\t\t\t * Position root is invalid.\n\t\t\t *\n\t\t\t * Positions can only be anchored in elements or document fragments.\n\t\t\t *\n\t\t\t * @error model-position-root-invalid\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'model-position-root-invalid',\n\t\t\t\troot\n\t\t\t);\n\t\t}\n\n\t\tif ( !( path instanceof Array ) || path.length === 0 ) {\n\t\t\t/**\n\t\t\t * Position path must be an array with at least one item.\n\t\t\t *\n\t\t\t * @error model-position-path-incorrect-format\n\t\t\t * @param path\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'model-position-path-incorrect-format',\n\t\t\t\troot,\n\t\t\t\t{ path }\n\t\t\t);\n\t\t}\n\n\t\t// Normalize the root and path when element (not root) is passed.\n\t\tif ( root.is( 'rootElement' ) ) {\n\t\t\tpath = path.slice();\n\t\t} else {\n\t\t\tpath = [ ...root.getPath(), ...path ];\n\t\t\troot = root.root;\n\t\t}\n\n\t\t/**\n\t\t * Root of the position path.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment}\n\t\t * module:engine/model/position~Position#root\n\t\t */\n\t\tthis.root = root;\n\n\t\t/**\n\t\t * Position of the node in the tree. **Path contains offsets, not indexes.**\n\t\t *\n\t\t * Position can be placed before, after or in a {@link module:engine/model/node~Node node} if that node has\n\t\t * {@link module:engine/model/node~Node#offsetSize} greater than `1`. Items in position path are\n\t\t * {@link module:engine/model/node~Node#startOffset starting offsets} of position ancestors, starting from direct root children,\n\t\t * down to the position offset in it's parent.\n\t\t *\n\t\t *\t\t ROOT\n\t\t *\t\t |- P before: [ 0 ] after: [ 1 ]\n\t\t *\t\t |- UL before: [ 1 ] after: [ 2 ]\n\t\t *\t\t |- LI before: [ 1, 0 ] after: [ 1, 1 ]\n\t\t *\t\t | |- foo before: [ 1, 0, 0 ] after: [ 1, 0, 3 ]\n\t\t *\t\t |- LI before: [ 1, 1 ] after: [ 1, 2 ]\n\t\t *\t\t |- bar before: [ 1, 1, 0 ] after: [ 1, 1, 3 ]\n\t\t *\n\t\t * `foo` and `bar` are representing {@link module:engine/model/text~Text text nodes}. Since text nodes has offset size\n\t\t * greater than `1` you can place position offset between their start and end:\n\t\t *\n\t\t *\t\t ROOT\n\t\t *\t\t |- P\n\t\t *\t\t |- UL\n\t\t *\t\t |- LI\n\t\t *\t\t | |- f^o|o ^ has path: [ 1, 0, 1 ] | has path: [ 1, 0, 2 ]\n\t\t *\t\t |- LI\n\t\t *\t\t |- b^a|r ^ has path: [ 1, 1, 1 ] | has path: [ 1, 1, 2 ]\n\t\t *\n\t\t * @readonly\n\t\t * @member {Array.<Number>} module:engine/model/position~Position#path\n\t\t */\n\t\tthis.path = path;\n\n\t\t/**\n\t\t * Position stickiness. See {@link module:engine/model/position~PositionStickiness}.\n\t\t *\n\t\t * @member {module:engine/model/position~PositionStickiness} module:engine/model/position~Position#stickiness\n\t\t */\n\t\tthis.stickiness = stickiness;\n\t}\n\n\t/**\n\t * Offset at which this position is located in its {@link module:engine/model/position~Position#parent parent}. It is equal\n\t * to the last item in position {@link module:engine/model/position~Position#path path}.\n\t *\n\t * @type {Number}\n\t */\n\tget offset() {\n\t\treturn this.path[ this.path.length - 1 ];\n\t}\n\n\tset offset( newOffset ) {\n\t\tthis.path[ this.path.length - 1 ] = newOffset;\n\t}\n\n\t/**\n\t * Parent element of this position.\n\t *\n\t * Keep in mind that `parent` value is calculated when the property is accessed.\n\t * If {@link module:engine/model/position~Position#path position path}\n\t * leads to a non-existing element, `parent` property will throw error.\n\t *\n\t * Also it is a good idea to cache `parent` property if it is used frequently in an algorithm (i.e. in a long loop).\n\t *\n\t * @readonly\n\t * @type {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment}\n\t */\n\tget parent() {\n\t\tlet parent = this.root;\n\n\t\tfor ( let i = 0; i < this.path.length - 1; i++ ) {\n\t\t\tparent = parent.getChild( parent.offsetToIndex( this.path[ i ] ) );\n\n\t\t\tif ( !parent ) {\n\t\t\t\t/**\n\t\t\t\t * The position's path is incorrect. This means that a position does not point to\n\t\t\t\t * a correct place in the tree and hence, some of its methods and getters cannot work correctly.\n\t\t\t\t *\n\t\t\t\t * **Note**: Unlike DOM and view positions, in the model, the\n\t\t\t\t * {@link module:engine/model/position~Position#parent position's parent} is always an element or a document fragment.\n\t\t\t\t * The last offset in the {@link module:engine/model/position~Position#path position's path} is the point in this element\n\t\t\t\t * where this position points.\n\t\t\t\t *\n\t\t\t\t * Read more about model positions and offsets in\n\t\t\t\t * the {@glink framework/guides/architecture/editing-engine#indexes-and-offsets Editing engine architecture guide}.\n\t\t\t\t *\n\t\t\t\t * @error model-position-path-incorrect\n\t\t\t\t * @param {module:engine/model/position~Position} position The incorrect position.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'model-position-path-incorrect', this, { position: this } );\n\t\t\t}\n\t\t}\n\n\t\tif ( parent.is( '$text' ) ) {\n\t\t\tthrow new CKEditorError( 'model-position-path-incorrect', this, { position: this } );\n\t\t}\n\n\t\treturn parent;\n\t}\n\n\t/**\n\t * Position {@link module:engine/model/position~Position#offset offset} converted to an index in position's parent node. It is\n\t * equal to the {@link module:engine/model/node~Node#index index} of a node after this position. If position is placed\n\t * in text node, position index is equal to the index of that text node.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget index() {\n\t\treturn this.parent.offsetToIndex( this.offset );\n\t}\n\n\t/**\n\t * Returns {@link module:engine/model/text~Text text node} instance in which this position is placed or `null` if this\n\t * position is not in a text node.\n\t *\n\t * @readonly\n\t * @type {module:engine/model/text~Text|null}\n\t */\n\tget textNode() {\n\t\treturn getTextNodeAtPosition( this, this.parent );\n\t}\n\n\t/**\n\t * Node directly after this position or `null` if this position is in text node.\n\t *\n\t * @readonly\n\t * @type {module:engine/model/node~Node|null}\n\t */\n\tget nodeAfter() {\n\t\t// Cache the parent and reuse for performance reasons. See #6579 and #6582.\n\t\tconst parent = this.parent;\n\n\t\treturn getNodeAfterPosition( this, parent, getTextNodeAtPosition( this, parent ) );\n\t}\n\n\t/**\n\t * Node directly before this position or `null` if this position is in text node.\n\t *\n\t * @readonly\n\t * @type {module:engine/model/node~Node|null}\n\t */\n\tget nodeBefore() {\n\t\t// Cache the parent and reuse for performance reasons. See #6579 and #6582.\n\t\tconst parent = this.parent;\n\n\t\treturn getNodeBeforePosition( this, parent, getTextNodeAtPosition( this, parent ) );\n\t}\n\n\t/**\n\t * Is `true` if position is at the beginning of its {@link module:engine/model/position~Position#parent parent}, `false` otherwise.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isAtStart() {\n\t\treturn this.offset === 0;\n\t}\n\n\t/**\n\t * Is `true` if position is at the end of its {@link module:engine/model/position~Position#parent parent}, `false` otherwise.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isAtEnd() {\n\t\treturn this.offset == this.parent.maxOffset;\n\t}\n\n\t/**\n\t * Checks whether this position is before or after given position.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param {module:engine/model/position~Position} otherPosition Position to compare with.\n\t * @returns {module:engine/model/position~PositionRelation}\n\t */\n\tcompareWith( otherPosition ) {\n\t\tif ( this.root != otherPosition.root ) {\n\t\t\treturn 'different';\n\t\t}\n\n\t\tconst result = compareArrays( this.path, otherPosition.path );\n\n\t\tswitch ( result ) {\n\t\t\tcase 'same':\n\t\t\t\treturn 'same';\n\n\t\t\tcase 'prefix':\n\t\t\t\treturn 'before';\n\n\t\t\tcase 'extension':\n\t\t\t\treturn 'after';\n\n\t\t\tdefault:\n\t\t\t\treturn this.path[ result ] < otherPosition.path[ result ] ? 'before' : 'after';\n\t\t}\n\t}\n\n\t/**\n\t * Gets the farthest position which matches the callback using\n\t * {@link module:engine/model/treewalker~TreeWalker TreeWalker}.\n\t *\n\t * For example:\n\t *\n\t * \t\tgetLastMatchingPosition( value => value.type == 'text' );\n\t * \t\t// <paragraph>[]foo</paragraph> -> <paragraph>foo[]</paragraph>\n\t *\n\t * \t\tgetLastMatchingPosition( value => value.type == 'text', { direction: 'backward' } );\n\t * \t\t// <paragraph>foo[]</paragraph> -> <paragraph>[]foo</paragraph>\n\t *\n\t * \t\tgetLastMatchingPosition( value => false );\n\t * \t\t// Do not move the position.\n\t *\n\t * @param {Function} skip Callback function. Gets {@link module:engine/model/treewalker~TreeWalkerValue} and should\n\t * return `true` if the value should be skipped or `false` if not.\n\t * @param {Object} options Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.\n\t *\n\t * @returns {module:engine/model/position~Position} The position after the last item which matches the `skip` callback test.\n\t */\n\tgetLastMatchingPosition( skip, options = {} ) {\n\t\toptions.startPosition = this;\n\n\t\tconst treeWalker = new TreeWalker( options );\n\t\ttreeWalker.skip( skip );\n\n\t\treturn treeWalker.position;\n\t}\n\n\t/**\n\t * Returns a path to this position's parent. Parent path is equal to position {@link module:engine/model/position~Position#path path}\n\t * but without the last item.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @returns {Array.<Number>} Path to the parent.\n\t */\n\tgetParentPath() {\n\t\treturn this.path.slice( 0, -1 );\n\t}\n\n\t/**\n\t * Returns ancestors array of this position, that is this position's parent and its ancestors.\n\t *\n\t * @returns {Array.<module:engine/model/item~Item>} Array with ancestors.\n\t */\n\tgetAncestors() {\n\t\tconst parent = this.parent;\n\n\t\tif ( parent.is( 'documentFragment' ) ) {\n\t\t\treturn [ parent ];\n\t\t} else {\n\t\t\treturn parent.getAncestors( { includeSelf: true } );\n\t\t}\n\t}\n\n\t/**\n\t * Returns the parent element of the given name. Returns null if the position is not inside the desired parent.\n\t *\n\t * @param {String} parentName The name of the parent element to find.\n\t * @returns {module:engine/model/element~Element|null}\n\t */\n\tfindAncestor( parentName ) {\n\t\tconst parent = this.parent;\n\n\t\tif ( parent.is( 'element' ) ) {\n\t\t\treturn parent.findAncestor( parentName, { includeSelf: true } );\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns the slice of two position {@link #path paths} which is identical. The {@link #root roots}\n\t * of these two paths must be identical.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param {module:engine/model/position~Position} position The second position.\n\t * @returns {Array.<Number>} The common path.\n\t */\n\tgetCommonPath( position ) {\n\t\tif ( this.root != position.root ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// We find on which tree-level start and end have the lowest common ancestor\n\t\tconst cmp = compareArrays( this.path, position.path );\n\t\t// If comparison returned string it means that arrays are same.\n\t\tconst diffAt = ( typeof cmp == 'string' ) ? Math.min( this.path.length, position.path.length ) : cmp;\n\n\t\treturn this.path.slice( 0, diffAt );\n\t}\n\n\t/**\n\t * Returns an {@link module:engine/model/element~Element} or {@link module:engine/model/documentfragment~DocumentFragment}\n\t * which is a common ancestor of both positions. The {@link #root roots} of these two positions must be identical.\n\t *\n\t * @param {module:engine/model/position~Position} position The second position.\n\t * @returns {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment|null}\n\t */\n\tgetCommonAncestor( position ) {\n\t\tconst ancestorsA = this.getAncestors();\n\t\tconst ancestorsB = position.getAncestors();\n\n\t\tlet i = 0;\n\n\t\twhile ( ancestorsA[ i ] == ancestorsB[ i ] && ancestorsA[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i === 0 ? null : ancestorsA[ i - 1 ];\n\t}\n\n\t/**\n\t * Returns a new instance of `Position`, that has same {@link #parent parent} but it's offset\n\t * is shifted by `shift` value (can be a negative value).\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param {Number} shift Offset shift. Can be a negative value.\n\t * @returns {module:engine/model/position~Position} Shifted position.\n\t */\n\tgetShiftedBy( shift ) {\n\t\tconst shifted = this.clone();\n\n\t\tconst offset = shifted.offset + shift;\n\t\tshifted.offset = offset < 0 ? 0 : offset;\n\n\t\treturn shifted;\n\t}\n\n\t/**\n\t * Checks whether this position is after given position.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @see module:engine/model/position~Position#isBefore\n\t * @param {module:engine/model/position~Position} otherPosition Position to compare with.\n\t * @returns {Boolean} True if this position is after given position.\n\t */\n\tisAfter( otherPosition ) {\n\t\treturn this.compareWith( otherPosition ) == 'after';\n\t}\n\n\t/**\n\t * Checks whether this position is before given position.\n\t *\n\t * **Note:** watch out when using negation of the value returned by this method, because the negation will also\n\t * be `true` if positions are in different roots and you might not expect this. You should probably use\n\t * `a.isAfter( b ) || a.isEqual( b )` or `!a.isBefore( p ) && a.root == b.root` in most scenarios. If your\n\t * condition uses multiple `isAfter` and `isBefore` checks, build them so they do not use negated values, i.e.:\n\t *\n\t *\t\tif ( a.isBefore( b ) && c.isAfter( d ) ) {\n\t *\t\t\t// do A.\n\t *\t\t} else {\n\t *\t\t\t// do B.\n\t *\t\t}\n\t *\n\t * or, if you have only one if-branch:\n\t *\n\t *\t\tif ( !( a.isBefore( b ) && c.isAfter( d ) ) {\n\t *\t\t\t// do B.\n\t *\t\t}\n\t *\n\t * rather than:\n\t *\n\t *\t\tif ( !a.isBefore( b ) || && !c.isAfter( d ) ) {\n\t *\t\t\t// do B.\n\t *\t\t} else {\n\t *\t\t\t// do A.\n\t *\t\t}\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param {module:engine/model/position~Position} otherPosition Position to compare with.\n\t * @returns {Boolean} True if this position is before given position.\n\t */\n\tisBefore( otherPosition ) {\n\t\treturn this.compareWith( otherPosition ) == 'before';\n\t}\n\n\t/**\n\t * Checks whether this position is equal to given position.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param {module:engine/model/position~Position} otherPosition Position to compare with.\n\t * @returns {Boolean} True if positions are same.\n\t */\n\tisEqual( otherPosition ) {\n\t\treturn this.compareWith( otherPosition ) == 'same';\n\t}\n\n\t/**\n\t * Checks whether this position is touching given position. Positions touch when there are no text nodes\n\t * or empty nodes in a range between them. Technically, those positions are not equal but in many cases\n\t * they are very similar or even indistinguishable.\n\t *\n\t * @param {module:engine/model/position~Position} otherPosition Position to compare with.\n\t * @returns {Boolean} True if positions touch.\n\t */\n\tisTouching( otherPosition ) {\n\t\tlet left = null;\n\t\tlet right = null;\n\t\tconst compare = this.compareWith( otherPosition );\n\n\t\tswitch ( compare ) {\n\t\t\tcase 'same':\n\t\t\t\treturn true;\n\n\t\t\tcase 'before':\n\t\t\t\tleft = Position._createAt( this );\n\t\t\t\tright = Position._createAt( otherPosition );\n\t\t\t\tbreak;\n\n\t\t\tcase 'after':\n\t\t\t\tleft = Position._createAt( otherPosition );\n\t\t\t\tright = Position._createAt( this );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\n\t\t// Cached for optimization purposes.\n\t\tlet leftParent = left.parent;\n\n\t\twhile ( left.path.length + right.path.length ) {\n\t\t\tif ( left.isEqual( right ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif ( left.path.length > right.path.length ) {\n\t\t\t\tif ( left.offset !== leftParent.maxOffset ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tleft.path = left.path.slice( 0, -1 );\n\t\t\t\tleftParent = leftParent.parent;\n\t\t\t\tleft.offset++;\n\t\t\t} else {\n\t\t\t\tif ( right.offset !== 0 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tright.path = right.path.slice( 0, -1 );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks whether this object is of the given.\n\t *\n\t *\t\tposition.is( 'position' ); // -> true\n\t *\t\tposition.is( 'model:position' ); // -> true\n\t *\n\t *\t\tposition.is( 'view:position' ); // -> false\n\t *\t\tposition.is( 'documentSelection' ); // -> false\n\t *\n\t * {@link module:engine/model/node~Node#is Check the entire list of model objects} which implement the `is()` method.\n\t *\n\t * @param {String} type\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === 'position' || type === 'model:position';\n\t}\n\n\t/**\n\t * Checks if two positions are in the same parent.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param {module:engine/model/position~Position} position Position to compare with.\n\t * @returns {Boolean} `true` if positions have the same parent, `false` otherwise.\n\t */\n\thasSameParentAs( position ) {\n\t\tif ( this.root !== position.root ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst thisParentPath = this.getParentPath();\n\t\tconst posParentPath = position.getParentPath();\n\n\t\treturn compareArrays( thisParentPath, posParentPath ) == 'same';\n\t}\n\n\t/**\n\t * Returns a copy of this position that is transformed by given `operation`.\n\t *\n\t * The new position's parameters are updated accordingly to the effect of the `operation`.\n\t *\n\t * For example, if `n` nodes are inserted before the position, the returned position {@link ~Position#offset} will be\n\t * increased by `n`. If the position was in a merged element, it will be accordingly moved to the new element, etc.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param {module:engine/model/operation/operation~Operation} operation Operation to transform by.\n\t * @returns {module:engine/model/position~Position} Transformed position.\n\t */\n\tgetTransformedByOperation( operation ) {\n\t\tlet result;\n\n\t\tswitch ( operation.type ) {\n\t\t\tcase 'insert':\n\t\t\t\tresult = this._getTransformedByInsertOperation( operation );\n\t\t\t\tbreak;\n\t\t\tcase 'move':\n\t\t\tcase 'remove':\n\t\t\tcase 'reinsert':\n\t\t\t\tresult = this._getTransformedByMoveOperation( operation );\n\t\t\t\tbreak;\n\t\t\tcase 'split':\n\t\t\t\tresult = this._getTransformedBySplitOperation( operation );\n\t\t\t\tbreak;\n\t\t\tcase 'merge':\n\t\t\t\tresult = this._getTransformedByMergeOperation( operation );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tresult = Position._createAt( this );\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns a copy of this position transformed by an insert operation.\n\t *\n\t * @protected\n\t * @param {module:engine/model/operation/insertoperation~InsertOperation} operation\n\t * @returns {module:engine/model/position~Position}\n\t */\n\t_getTransformedByInsertOperation( operation ) {\n\t\treturn this._getTransformedByInsertion( operation.position, operation.howMany );\n\t}\n\n\t/**\n\t * Returns a copy of this position transformed by a move operation.\n\t *\n\t * @protected\n\t * @param {module:engine/model/operation/moveoperation~MoveOperation} operation\n\t * @returns {module:engine/model/position~Position}\n\t */\n\t_getTransformedByMoveOperation( operation ) {\n\t\treturn this._getTransformedByMove( operation.sourcePosition, operation.targetPosition, operation.howMany );\n\t}\n\n\t/**\n\t * Returns a copy of this position transformed by a split operation.\n\t *\n\t * @protected\n\t * @param {module:engine/model/operation/splitoperation~SplitOperation} operation\n\t * @returns {module:engine/model/position~Position}\n\t */\n\t_getTransformedBySplitOperation( operation ) {\n\t\tconst movedRange = operation.movedRange;\n\n\t\tconst isContained = movedRange.containsPosition( this ) ||\n\t\t\t( movedRange.start.isEqual( this ) && this.stickiness == 'toNext' );\n\n\t\tif ( isContained ) {\n\t\t\treturn this._getCombined( operation.splitPosition, operation.moveTargetPosition );\n\t\t} else {\n\t\t\tif ( operation.graveyardPosition ) {\n\t\t\t\treturn this._getTransformedByMove( operation.graveyardPosition, operation.insertionPosition, 1 );\n\t\t\t} else {\n\t\t\t\treturn this._getTransformedByInsertion( operation.insertionPosition, 1 );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns a copy of this position transformed by merge operation.\n\t *\n\t * @protected\n\t * @param {module:engine/model/operation/mergeoperation~MergeOperation} operation\n\t * @returns {module:engine/model/position~Position}\n\t */\n\t_getTransformedByMergeOperation( operation ) {\n\t\tconst movedRange = operation.movedRange;\n\t\tconst isContained = movedRange.containsPosition( this ) || movedRange.start.isEqual( this );\n\n\t\tlet pos;\n\n\t\tif ( isContained ) {\n\t\t\tpos = this._getCombined( operation.sourcePosition, operation.targetPosition );\n\n\t\t\tif ( operation.sourcePosition.isBefore( operation.targetPosition ) ) {\n\t\t\t\t// Above happens during OT when the merged element is moved before the merged-to element.\n\t\t\t\tpos = pos._getTransformedByDeletion( operation.deletionPosition, 1 );\n\t\t\t}\n\t\t} else if ( this.isEqual( operation.deletionPosition ) ) {\n\t\t\tpos = Position._createAt( operation.deletionPosition );\n\t\t} else {\n\t\t\tpos = this._getTransformedByMove( operation.deletionPosition, operation.graveyardPosition, 1 );\n\t\t}\n\n\t\treturn pos;\n\t}\n\n\t/**\n\t * Returns a copy of this position that is updated by removing `howMany` nodes starting from `deletePosition`.\n\t * It may happen that this position is in a removed node. If that is the case, `null` is returned instead.\n\t *\n\t * @protected\n\t * @param {module:engine/model/position~Position} deletePosition Position before the first removed node.\n\t * @param {Number} howMany How many nodes are removed.\n\t * @returns {module:engine/model/position~Position|null} Transformed position or `null`.\n\t */\n\t_getTransformedByDeletion( deletePosition, howMany ) {\n\t\tconst transformed = Position._createAt( this );\n\n\t\t// This position can't be affected if deletion was in a different root.\n\t\tif ( this.root != deletePosition.root ) {\n\t\t\treturn transformed;\n\t\t}\n\n\t\tif ( compareArrays( deletePosition.getParentPath(), this.getParentPath() ) == 'same' ) {\n\t\t\t// If nodes are removed from the node that is pointed by this position...\n\t\t\tif ( deletePosition.offset < this.offset ) {\n\t\t\t\t// And are removed from before an offset of that position...\n\t\t\t\tif ( deletePosition.offset + howMany > this.offset ) {\n\t\t\t\t\t// Position is in removed range, it's no longer in the tree.\n\t\t\t\t\treturn null;\n\t\t\t\t} else {\n\t\t\t\t\t// Decrement the offset accordingly.\n\t\t\t\t\ttransformed.offset -= howMany;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( compareArrays( deletePosition.getParentPath(), this.getParentPath() ) == 'prefix' ) {\n\t\t\t// If nodes are removed from a node that is on a path to this position...\n\t\t\tconst i = deletePosition.path.length - 1;\n\n\t\t\tif ( deletePosition.offset <= this.path[ i ] ) {\n\t\t\t\t// And are removed from before next node of that path...\n\t\t\t\tif ( deletePosition.offset + howMany > this.path[ i ] ) {\n\t\t\t\t\t// If the next node of that path is removed return null\n\t\t\t\t\t// because the node containing this position got removed.\n\t\t\t\t\treturn null;\n\t\t\t\t} else {\n\t\t\t\t\t// Otherwise, decrement index on that path.\n\t\t\t\t\ttransformed.path[ i ] -= howMany;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn transformed;\n\t}\n\n\t/**\n\t * Returns a copy of this position that is updated by inserting `howMany` nodes at `insertPosition`.\n\t *\n\t * @protected\n\t * @param {module:engine/model/position~Position} insertPosition Position where nodes are inserted.\n\t * @param {Number} howMany How many nodes are inserted.\n\t * @returns {module:engine/model/position~Position} Transformed position.\n\t */\n\t_getTransformedByInsertion( insertPosition, howMany ) {\n\t\tconst transformed = Position._createAt( this );\n\n\t\t// This position can't be affected if insertion was in a different root.\n\t\tif ( this.root != insertPosition.root ) {\n\t\t\treturn transformed;\n\t\t}\n\n\t\tif ( compareArrays( insertPosition.getParentPath(), this.getParentPath() ) == 'same' ) {\n\t\t\t// If nodes are inserted in the node that is pointed by this position...\n\t\t\tif ( insertPosition.offset < this.offset || ( insertPosition.offset == this.offset && this.stickiness != 'toPrevious' ) ) {\n\t\t\t\t// And are inserted before an offset of that position...\n\t\t\t\t// \"Push\" this positions offset.\n\t\t\t\ttransformed.offset += howMany;\n\t\t\t}\n\t\t} else if ( compareArrays( insertPosition.getParentPath(), this.getParentPath() ) == 'prefix' ) {\n\t\t\t// If nodes are inserted in a node that is on a path to this position...\n\t\t\tconst i = insertPosition.path.length - 1;\n\n\t\t\tif ( insertPosition.offset <= this.path[ i ] ) {\n\t\t\t\t// And are inserted before next node of that path...\n\t\t\t\t// \"Push\" the index on that path.\n\t\t\t\ttransformed.path[ i ] += howMany;\n\t\t\t}\n\t\t}\n\n\t\treturn transformed;\n\t}\n\n\t/**\n\t * Returns a copy of this position that is updated by moving `howMany` nodes from `sourcePosition` to `targetPosition`.\n\t *\n\t * @protected\n\t * @param {module:engine/model/position~Position} sourcePosition Position before the first element to move.\n\t * @param {module:engine/model/position~Position} targetPosition Position where moved elements will be inserted.\n\t * @param {Number} howMany How many consecutive nodes to move, starting from `sourcePosition`.\n\t * @returns {module:engine/model/position~Position} Transformed position.\n\t */\n\t_getTransformedByMove( sourcePosition, targetPosition, howMany ) {\n\t\t// Update target position, as it could be affected by nodes removal.\n\t\ttargetPosition = targetPosition._getTransformedByDeletion( sourcePosition, howMany );\n\n\t\tif ( sourcePosition.isEqual( targetPosition ) ) {\n\t\t\t// If `targetPosition` is equal to `sourcePosition` this isn't really any move. Just return position as it is.\n\t\t\treturn Position._createAt( this );\n\t\t}\n\n\t\t// Moving a range removes nodes from their original position. We acknowledge this by proper transformation.\n\t\tconst transformed = this._getTransformedByDeletion( sourcePosition, howMany );\n\n\t\tconst isMoved = transformed === null ||\n\t\t\t( sourcePosition.isEqual( this ) && this.stickiness == 'toNext' ) ||\n\t\t\t( sourcePosition.getShiftedBy( howMany ).isEqual( this ) && this.stickiness == 'toPrevious' );\n\n\t\tif ( isMoved ) {\n\t\t\t// This position is inside moved range (or sticks to it).\n\t\t\t// In this case, we calculate a combination of this position, move source position and target position.\n\t\t\treturn this._getCombined( sourcePosition, targetPosition );\n\t\t} else {\n\t\t\t// This position is not inside a removed range.\n\t\t\t//\n\t\t\t// In next step, we simply reflect inserting `howMany` nodes, which might further affect the position.\n\t\t\treturn transformed._getTransformedByInsertion( targetPosition, howMany );\n\t\t}\n\t}\n\n\t/**\n\t * Returns a new position that is a combination of this position and given positions.\n\t *\n\t * The combined position is a copy of this position transformed by moving a range starting at `source` position\n\t * to the `target` position. It is expected that this position is inside the moved range.\n\t *\n\t * Example:\n\t *\n\t *\t\tlet original = model.createPositionFromPath( root, [ 2, 3, 1 ] );\n\t *\t\tlet source = model.createPositionFromPath( root, [ 2, 2 ] );\n\t *\t\tlet target = model.createPositionFromPath( otherRoot, [ 1, 1, 3 ] );\n\t *\t\toriginal._getCombined( source, target ); // path is [ 1, 1, 4, 1 ], root is `otherRoot`\n\t *\n\t * Explanation:\n\t *\n\t * We have a position `[ 2, 3, 1 ]` and move some nodes from `[ 2, 2 ]` to `[ 1, 1, 3 ]`. The original position\n\t * was inside moved nodes and now should point to the new place. The moved nodes will be after\n\t * positions `[ 1, 1, 3 ]`, `[ 1, 1, 4 ]`, `[ 1, 1, 5 ]`. Since our position was in the second moved node,\n\t * the transformed position will be in a sub-tree of a node at `[ 1, 1, 4 ]`. Looking at original path, we\n\t * took care of `[ 2, 3 ]` part of it. Now we have to add the rest of the original path to the transformed path.\n\t * Finally, the transformed position will point to `[ 1, 1, 4, 1 ]`.\n\t *\n\t * @protected\n\t * @param {module:engine/model/position~Position} source Beginning of the moved range.\n\t * @param {module:engine/model/position~Position} target Position where the range is moved.\n\t * @returns {module:engine/model/position~Position} Combined position.\n\t */\n\t_getCombined( source, target ) {\n\t\tconst i = source.path.length - 1;\n\n\t\t// The first part of a path to combined position is a path to the place where nodes were moved.\n\t\tconst combined = Position._createAt( target );\n\t\tcombined.stickiness = this.stickiness;\n\n\t\t// Then we have to update the rest of the path.\n\n\t\t// Fix the offset because this position might be after `from` position and we have to reflect that.\n\t\tcombined.offset = combined.offset + this.path[ i ] - source.offset;\n\n\t\t// Then, add the rest of the path.\n\t\t// If this position is at the same level as `from` position nothing will get added.\n\t\tcombined.path = [ ...combined.path, ...this.path.slice( i + 1 ) ];\n\n\t\treturn combined;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\ttoJSON() {\n\t\treturn {\n\t\t\troot: this.root.toJSON(),\n\t\t\tpath: Array.from( this.path ),\n\t\t\tstickiness: this.stickiness\n\t\t};\n\t}\n\n\t/**\n\t * Returns a new position that is equal to current position.\n\t *\n\t * @returns {module:engine/model/position~Position}\n\t */\n\tclone() {\n\t\treturn new this.constructor( this.root, this.path, this.stickiness );\n\t}\n\n\t/**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/model/position~Position position},\n\t * * parent element and offset (offset defaults to `0`),\n\t * * parent element and `'end'` (sets position at the end of that element),\n\t * * {@link module:engine/model/item~Item model item} and `'before'` or `'after'` (sets position before or after given model item).\n\t *\n\t * This method is a shortcut to other factory methods such as:\n\t *\n\t * * {@link module:engine/model/position~Position._createBefore},\n\t * * {@link module:engine/model/position~Position._createAfter}.\n\t *\n\t * @param {module:engine/model/item~Item|module:engine/model/position~Position} itemOrPosition\n\t * @param {Number|'end'|'before'|'after'} [offset] Offset or one of the flags. Used only when the\n\t * first parameter is a {@link module:engine/model/item~Item model item}.\n\t * @param {module:engine/model/position~PositionStickiness} [stickiness='toNone'] Position stickiness. Used only when the\n\t * first parameter is a {@link module:engine/model/item~Item model item}.\n\t * @protected\n\t */\n\tstatic _createAt( itemOrPosition, offset, stickiness = 'toNone' ) {\n\t\tif ( itemOrPosition instanceof Position ) {\n\t\t\treturn new Position( itemOrPosition.root, itemOrPosition.path, itemOrPosition.stickiness );\n\t\t} else {\n\t\t\tconst node = itemOrPosition;\n\n\t\t\tif ( offset == 'end' ) {\n\t\t\t\toffset = node.maxOffset;\n\t\t\t} else if ( offset == 'before' ) {\n\t\t\t\treturn this._createBefore( node, stickiness );\n\t\t\t} else if ( offset == 'after' ) {\n\t\t\t\treturn this._createAfter( node, stickiness );\n\t\t\t} else if ( offset !== 0 && !offset ) {\n\t\t\t\t/**\n\t\t\t\t * {@link module:engine/model/model~Model#createPositionAt `Model#createPositionAt()`}\n\t\t\t\t * requires the offset to be specified when the first parameter is a model item.\n\t\t\t\t *\n\t\t\t\t * @error model-createpositionat-offset-required\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'model-createpositionat-offset-required', [ this, itemOrPosition ] );\n\t\t\t}\n\n\t\t\tif ( !node.is( 'element' ) && !node.is( 'documentFragment' ) ) {\n\t\t\t\t/**\n\t\t\t\t * Position parent have to be a model element or model document fragment.\n\t\t\t\t *\n\t\t\t\t * @error model-position-parent-incorrect\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'model-position-parent-incorrect',\n\t\t\t\t\t[ this, itemOrPosition ]\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst path = node.getPath();\n\n\t\t\tpath.push( offset );\n\n\t\t\treturn new this( node.root, path, stickiness );\n\t\t}\n\t}\n\n\t/**\n\t * Creates a new position, after given {@link module:engine/model/item~Item model item}.\n\t *\n\t * @param {module:engine/model/item~Item} item Item after which the position should be placed.\n\t * @param {module:engine/model/position~PositionStickiness} [stickiness='toNone'] Position stickiness.\n\t * @returns {module:engine/model/position~Position}\n\t * @protected\n\t */\n\tstatic _createAfter( item, stickiness ) {\n\t\tif ( !item.parent ) {\n\t\t\t/**\n\t\t\t * You can not make a position after a root element.\n\t\t\t *\n\t\t\t * @error model-position-after-root\n\t\t\t * @param {module:engine/model/item~Item} root\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'model-position-after-root',\n\t\t\t\t[ this, item ],\n\t\t\t\t{ root: item }\n\t\t\t);\n\t\t}\n\n\t\treturn this._createAt( item.parent, item.endOffset, stickiness );\n\t}\n\n\t/**\n\t * Creates a new position, before the given {@link module:engine/model/item~Item model item}.\n\t *\n\t * @param {module:engine/model/item~Item} item Item before which the position should be placed.\n\t * @param {module:engine/model/position~PositionStickiness} [stickiness='toNone'] Position stickiness.\n\t * @returns {module:engine/model/position~Position}\n\t * @protected\n\t */\n\tstatic _createBefore( item, stickiness ) {\n\t\tif ( !item.parent ) {\n\t\t\t/**\n\t\t\t * You can not make a position before a root element.\n\t\t\t *\n\t\t\t * @error model-position-before-root\n\t\t\t * @param {module:engine/model/item~Item} root\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'model-position-before-root',\n\t\t\t\titem,\n\t\t\t\t{ root: item }\n\t\t\t);\n\t\t}\n\n\t\treturn this._createAt( item.parent, item.startOffset, stickiness );\n\t}\n\n\t/**\n\t * Creates a `Position` instance from given plain object (i.e. parsed JSON string).\n\t *\n\t * @param {Object} json Plain object to be converted to `Position`.\n\t * @param {module:engine/model/document~Document} doc Document object that will be position owner.\n\t * @returns {module:engine/model/position~Position} `Position` instance created using given plain object.\n\t */\n\tstatic fromJSON( json, doc ) {\n\t\tif ( json.root === '$graveyard' ) {\n\t\t\tconst pos = new Position( doc.graveyard, json.path );\n\t\t\tpos.stickiness = json.stickiness;\n\n\t\t\treturn pos;\n\t\t}\n\n\t\tif ( !doc.getRoot( json.root ) ) {\n\t\t\t/**\n\t\t\t * Cannot create position for document. Root with specified name does not exist.\n\t\t\t *\n\t\t\t * @error model-position-fromjson-no-root\n\t\t\t * @param {String} rootName\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'model-position-fromjson-no-root',\n\t\t\t\tdoc,\n\t\t\t\t{ rootName: json.root }\n\t\t\t);\n\t\t}\n\n\t\treturn new Position( doc.getRoot( json.root ), json.path, json.stickiness );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // toString() {\n\t// @if CK_DEBUG_ENGINE // \treturn `${ this.root } [ ${ this.path.join( ', ' ) } ]`;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // log() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ModelPosition: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n/**\n * A flag indicating whether this position is `'before'` or `'after'` or `'same'` as given position.\n * If positions are in different roots `'different'` flag is returned.\n *\n * @typedef {String} module:engine/model/position~PositionRelation\n */\n\n/**\n * Represents how position is \"sticking\" with neighbour nodes. Used to define how position should be transformed (moved)\n * in edge cases. Possible values: `'toNone'`, `'toNext'`, `'toPrevious'`.\n *\n * Examples:\n *\n *\t\tInsert. Position is at | and nodes are inserted at the same position, marked as ^:\n *\n *\t\t- sticks to none: <p>f^|oo</p> -> <p>fbar|oo</p>\n *\t\t- sticks to next node: <p>f^|oo</p> -> <p>fbar|oo</p>\n *\t\t- sticks to previous node: <p>f|^oo</p> -> <p>f|baroo</p>\n *\n *\n *\t\tMove. Position is at | and range [oo] is moved to position ^:\n *\n *\t\t- sticks to none: <p>f|[oo]</p><p>b^ar</p> -> <p>f|</p><p>booar</p>\n *\t\t- sticks to none: <p>f[oo]|</p><p>b^ar</p> -> <p>f|</p><p>booar</p>\n *\n *\t\t- sticks to next node: <p>f|[oo]</p><p>b^ar</p> -> <p>f</p><p>b|ooar</p>\n *\t\t- sticks to next node: <p>f[oo]|</p><p>b^ar</p> -> <p>f|</p><p>booar</p>\n *\n *\t\t- sticks to previous node: <p>f|[oo]</p><p>b^ar</p> -> <p>f|</p><p>booar</p>\n *\t\t- sticks to previous node: <p>f[oo]|</p><p>b^ar</p> -> <p>f</p><p>boo|ar</p>\n *\n * @typedef {String} module:engine/model/position~PositionStickiness\n */\n\n/**\n * Returns a text node at the given position.\n *\n * This is a helper function optimized to reuse the position parent instance for performance reasons.\n *\n * Normally, you should use {@link module:engine/model/position~Position#textNode `Position#textNode`}.\n * If you start hitting performance issues with {@link module:engine/model/position~Position#parent `Position#parent`}\n * check if your algorithm does not access it multiple times (which can happen directly or indirectly via other position properties).\n *\n * See https://github.com/ckeditor/ckeditor5/issues/6579.\n *\n * See also:\n *\n * * {@link module:engine/model/position~getNodeAfterPosition}\n * * {@link module:engine/model/position~getNodeBeforePosition}\n *\n * @param {module:engine/model/position~Position} position\n * @param {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment} positionParent The parent of the\n * given position.\n * @returns {module:engine/model/text~Text|null}\n */\nexport function getTextNodeAtPosition( position, positionParent ) {\n\tconst node = positionParent.getChild( positionParent.offsetToIndex( position.offset ) );\n\n\tif ( node && node.is( '$text' ) && node.startOffset < position.offset ) {\n\t\treturn node;\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns the node after the given position.\n *\n * This is a helper function optimized to reuse the position parent instance and the calculation of the text node at the\n * specific position for performance reasons.\n *\n * Normally, you should use {@link module:engine/model/position~Position#nodeAfter `Position#nodeAfter`}.\n * If you start hitting performance issues with {@link module:engine/model/position~Position#parent `Position#parent`} and/or\n * {@link module:engine/model/position~Position#textNode `Position#textNode`}\n * check if your algorithm does not access those properties multiple times\n * (which can happen directly or indirectly via other position properties).\n *\n * See https://github.com/ckeditor/ckeditor5/issues/6579 and https://github.com/ckeditor/ckeditor5/issues/6582.\n *\n * See also:\n *\n * * {@link module:engine/model/position~getTextNodeAtPosition}\n * * {@link module:engine/model/position~getNodeBeforePosition}\n *\n * @param {module:engine/model/position~Position} position\n * @param {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment} positionParent The parent of the\n * given position.\n * @param {module:engine/model/text~Text|null} textNode Text node at the given position.\n * @returns {module:engine/model/node~Node|null}\n */\nexport function getNodeAfterPosition( position, positionParent, textNode ) {\n\tif ( textNode !== null ) {\n\t\treturn null;\n\t}\n\n\treturn positionParent.getChild( positionParent.offsetToIndex( position.offset ) );\n}\n\n/**\n * Returns the node before the given position.\n *\n * Refer to {@link module:engine/model/position~getNodeBeforePosition} for documentation on when to use this util method.\n *\n * See also:\n *\n * * {@link module:engine/model/position~getTextNodeAtPosition}\n * * {@link module:engine/model/position~getNodeAfterPosition}\n *\n * @param {module:engine/model/position~Position} position\n * @param {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment} positionParent The parent of the\n * given position.\n * @param {module:engine/model/text~Text|null} textNode Text node at the given position.\n * @returns {module:engine/model/node~Node|null}\n */\nexport function getNodeBeforePosition( position, positionParent, textNode ) {\n\tif ( textNode !== null ) {\n\t\treturn null;\n\t}\n\n\treturn positionParent.getChild( positionParent.offsetToIndex( position.offset ) - 1 );\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/range\n */\n\nimport Position from './position';\nimport TreeWalker from './treewalker';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport compareArrays from '@ckeditor/ckeditor5-utils/src/comparearrays';\n\n/**\n * Represents a range in the model tree.\n *\n * A range is defined by its {@link module:engine/model/range~Range#start} and {@link module:engine/model/range~Range#end}\n * positions.\n *\n * You can create range instances via its constructor or the `createRange*()` factory methods of\n * {@link module:engine/model/model~Model} and {@link module:engine/model/writer~Writer}.\n */\nexport default class Range {\n\t/**\n\t * Creates a range spanning from `start` position to `end` position.\n\t *\n\t * @param {module:engine/model/position~Position} start The start position.\n\t * @param {module:engine/model/position~Position} [end] The end position. If not set,\n\t * the range will be collapsed at the `start` position.\n\t */\n\tconstructor( start, end = null ) {\n\t\t/**\n\t\t * Start position.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/position~Position}\n\t\t */\n\t\tthis.start = Position._createAt( start );\n\n\t\t/**\n\t\t * End position.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/position~Position}\n\t\t */\n\t\tthis.end = end ? Position._createAt( end ) : Position._createAt( start );\n\n\t\t// If the range is collapsed, treat in a similar way as a position and set its boundaries stickiness to 'toNone'.\n\t\t// In other case, make the boundaries stick to the \"inside\" of the range.\n\t\tthis.start.stickiness = this.isCollapsed ? 'toNone' : 'toNext';\n\t\tthis.end.stickiness = this.isCollapsed ? 'toNone' : 'toPrevious';\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * Iterates over all {@link module:engine/model/item~Item items} that are in this range and returns\n\t * them together with additional information like length or {@link module:engine/model/position~Position positions},\n\t * grouped as {@link module:engine/model/treewalker~TreeWalkerValue}.\n\t * It iterates over all {@link module:engine/model/textproxy~TextProxy text contents} that are inside the range\n\t * and all the {@link module:engine/model/element~Element}s that are entered into when iterating over this range.\n\t *\n\t * This iterator uses {@link module:engine/model/treewalker~TreeWalker} with `boundaries` set to this range\n\t * and `ignoreElementEnd` option set to `true`.\n\t *\n\t * @returns {Iterable.<module:engine/model/treewalker~TreeWalkerValue>}\n\t */\n\t* [ Symbol.iterator ]() {\n\t\tyield* new TreeWalker( { boundaries: this, ignoreElementEnd: true } );\n\t}\n\n\t/**\n\t * Returns whether the range is collapsed, that is if {@link #start} and\n\t * {@link #end} positions are equal.\n\t *\n\t * @type {Boolean}\n\t */\n\tget isCollapsed() {\n\t\treturn this.start.isEqual( this.end );\n\t}\n\n\t/**\n\t * Returns whether this range is flat, that is if {@link #start} position and\n\t * {@link #end} position are in the same {@link module:engine/model/position~Position#parent}.\n\t *\n\t * @type {Boolean}\n\t */\n\tget isFlat() {\n\t\tconst startParentPath = this.start.getParentPath();\n\t\tconst endParentPath = this.end.getParentPath();\n\n\t\treturn compareArrays( startParentPath, endParentPath ) == 'same';\n\t}\n\n\t/**\n\t * Range root element.\n\t *\n\t * @type {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment}\n\t */\n\tget root() {\n\t\treturn this.start.root;\n\t}\n\n\t/**\n\t * Checks whether this range contains given {@link module:engine/model/position~Position position}.\n\t *\n\t * @param {module:engine/model/position~Position} position Position to check.\n\t * @returns {Boolean} `true` if given {@link module:engine/model/position~Position position} is contained\n\t * in this range,`false` otherwise.\n\t */\n\tcontainsPosition( position ) {\n\t\treturn position.isAfter( this.start ) && position.isBefore( this.end );\n\t}\n\n\t/**\n\t * Checks whether this range contains given {@link ~Range range}.\n\t *\n\t * @param {module:engine/model/range~Range} otherRange Range to check.\n\t * @param {Boolean} [loose=false] Whether the check is loose or strict. If the check is strict (`false`), compared range cannot\n\t * start or end at the same position as this range boundaries. If the check is loose (`true`), compared range can start, end or\n\t * even be equal to this range. Note that collapsed ranges are always compared in strict mode.\n\t * @returns {Boolean} `true` if given {@link ~Range range} boundaries are contained by this range, `false` otherwise.\n\t */\n\tcontainsRange( otherRange, loose = false ) {\n\t\tif ( otherRange.isCollapsed ) {\n\t\t\tloose = false;\n\t\t}\n\n\t\tconst containsStart = this.containsPosition( otherRange.start ) || ( loose && this.start.isEqual( otherRange.start ) );\n\t\tconst containsEnd = this.containsPosition( otherRange.end ) || ( loose && this.end.isEqual( otherRange.end ) );\n\n\t\treturn containsStart && containsEnd;\n\t}\n\n\t/**\n\t * Checks whether given {@link module:engine/model/item~Item} is inside this range.\n\t *\n\t * @param {module:engine/model/item~Item} item Model item to check.\n\t */\n\tcontainsItem( item ) {\n\t\tconst pos = Position._createBefore( item );\n\n\t\treturn this.containsPosition( pos ) || this.start.isEqual( pos );\n\t}\n\n\t/**\n\t * Checks whether this object is of the given.\n\t *\n\t *\t\trange.is( 'range' ); // -> true\n\t *\t\trange.is( 'model:range' ); // -> true\n\t *\n\t *\t\trange.is( 'view:range' ); // -> false\n\t *\t\trange.is( 'documentSelection' ); // -> false\n\t *\n\t * {@link module:engine/model/node~Node#is Check the entire list of model objects} which implement the `is()` method.\n\t *\n\t * @param {String} type\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === 'range' || type === 'model:range';\n\t}\n\n\t/**\n\t * Two ranges are equal if their {@link #start} and {@link #end} positions are equal.\n\t *\n\t * @param {module:engine/model/range~Range} otherRange Range to compare with.\n\t * @returns {Boolean} `true` if ranges are equal, `false` otherwise.\n\t */\n\tisEqual( otherRange ) {\n\t\treturn this.start.isEqual( otherRange.start ) && this.end.isEqual( otherRange.end );\n\t}\n\n\t/**\n\t * Checks and returns whether this range intersects with given range.\n\t *\n\t * @param {module:engine/model/range~Range} otherRange Range to compare with.\n\t * @returns {Boolean} `true` if ranges intersect, `false` otherwise.\n\t */\n\tisIntersecting( otherRange ) {\n\t\treturn this.start.isBefore( otherRange.end ) && this.end.isAfter( otherRange.start );\n\t}\n\n\t/**\n\t * Computes which part(s) of this {@link ~Range range} is not a part of given {@link ~Range range}.\n\t * Returned array contains zero, one or two {@link ~Range ranges}.\n\t *\n\t * Examples:\n\t *\n\t *\t\tlet range = model.createRange(\n\t *\t\t\tmodel.createPositionFromPath( root, [ 2, 7 ] ),\n\t *\t\t\tmodel.createPositionFromPath( root, [ 4, 0, 1 ] )\n\t *\t\t);\n\t *\t\tlet otherRange = model.createRange( model.createPositionFromPath( root, [ 1 ] ), model.createPositionFromPath( root, [ 5 ] ) );\n\t *\t\tlet transformed = range.getDifference( otherRange );\n\t *\t\t// transformed array has no ranges because `otherRange` contains `range`\n\t *\n\t *\t\totherRange = model.createRange( model.createPositionFromPath( root, [ 1 ] ), model.createPositionFromPath( root, [ 3 ] ) );\n\t *\t\ttransformed = range.getDifference( otherRange );\n\t *\t\t// transformed array has one range: from [ 3 ] to [ 4, 0, 1 ]\n\t *\n\t *\t\totherRange = model.createRange( model.createPositionFromPath( root, [ 3 ] ), model.createPositionFromPath( root, [ 4 ] ) );\n\t *\t\ttransformed = range.getDifference( otherRange );\n\t *\t\t// transformed array has two ranges: from [ 2, 7 ] to [ 3 ] and from [ 4 ] to [ 4, 0, 1 ]\n\t *\n\t * @param {module:engine/model/range~Range} otherRange Range to differentiate against.\n\t * @returns {Array.<module:engine/model/range~Range>} The difference between ranges.\n\t */\n\tgetDifference( otherRange ) {\n\t\tconst ranges = [];\n\n\t\tif ( this.isIntersecting( otherRange ) ) {\n\t\t\t// Ranges intersect.\n\n\t\t\tif ( this.containsPosition( otherRange.start ) ) {\n\t\t\t\t// Given range start is inside this range. This means that we have to\n\t\t\t\t// add shrunken range - from the start to the middle of this range.\n\t\t\t\tranges.push( new Range( this.start, otherRange.start ) );\n\t\t\t}\n\n\t\t\tif ( this.containsPosition( otherRange.end ) ) {\n\t\t\t\t// Given range end is inside this range. This means that we have to\n\t\t\t\t// add shrunken range - from the middle of this range to the end.\n\t\t\t\tranges.push( new Range( otherRange.end, this.end ) );\n\t\t\t}\n\t\t} else {\n\t\t\t// Ranges do not intersect, return the original range.\n\t\t\tranges.push( new Range( this.start, this.end ) );\n\t\t}\n\n\t\treturn ranges;\n\t}\n\n\t/**\n\t * Returns an intersection of this {@link ~Range range} and given {@link ~Range range}.\n\t * Intersection is a common part of both of those ranges. If ranges has no common part, returns `null`.\n\t *\n\t * Examples:\n\t *\n\t *\t\tlet range = model.createRange(\n\t *\t\t\tmodel.createPositionFromPath( root, [ 2, 7 ] ),\n\t *\t\t\tmodel.createPositionFromPath( root, [ 4, 0, 1 ] )\n\t *\t\t);\n\t *\t\tlet otherRange = model.createRange( model.createPositionFromPath( root, [ 1 ] ), model.createPositionFromPath( root, [ 2 ] ) );\n\t *\t\tlet transformed = range.getIntersection( otherRange ); // null - ranges have no common part\n\t *\n\t *\t\totherRange = model.createRange( model.createPositionFromPath( root, [ 3 ] ), model.createPositionFromPath( root, [ 5 ] ) );\n\t *\t\ttransformed = range.getIntersection( otherRange ); // range from [ 3 ] to [ 4, 0, 1 ]\n\t *\n\t * @param {module:engine/model/range~Range} otherRange Range to check for intersection.\n\t * @returns {module:engine/model/range~Range|null} A common part of given ranges or `null` if ranges have no common part.\n\t */\n\tgetIntersection( otherRange ) {\n\t\tif ( this.isIntersecting( otherRange ) ) {\n\t\t\t// Ranges intersect, so a common range will be returned.\n\t\t\t// At most, it will be same as this range.\n\t\t\tlet commonRangeStart = this.start;\n\t\t\tlet commonRangeEnd = this.end;\n\n\t\t\tif ( this.containsPosition( otherRange.start ) ) {\n\t\t\t\t// Given range start is inside this range. This means thaNt we have to\n\t\t\t\t// shrink common range to the given range start.\n\t\t\t\tcommonRangeStart = otherRange.start;\n\t\t\t}\n\n\t\t\tif ( this.containsPosition( otherRange.end ) ) {\n\t\t\t\t// Given range end is inside this range. This means that we have to\n\t\t\t\t// shrink common range to the given range end.\n\t\t\t\tcommonRangeEnd = otherRange.end;\n\t\t\t}\n\n\t\t\treturn new Range( commonRangeStart, commonRangeEnd );\n\t\t}\n\n\t\t// Ranges do not intersect, so they do not have common part.\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns a range created by joining this {@link ~Range range} with the given {@link ~Range range}.\n\t * If ranges have no common part, returns `null`.\n\t *\n\t * Examples:\n\t *\n\t *\t\tlet range = model.createRange(\n\t *\t\t\tmodel.createPositionFromPath( root, [ 2, 7 ] ),\n\t *\t\t\tmodel.createPositionFromPath( root, [ 4, 0, 1 ] )\n\t *\t\t);\n\t *\t\tlet otherRange = model.createRange(\n\t *\t\t\tmodel.createPositionFromPath( root, [ 1 ] ),\n\t *\t\t\tmodel.createPositionFromPath( root, [ 2 ] )\n \t *\t\t);\n\t *\t\tlet transformed = range.getJoined( otherRange ); // null - ranges have no common part\n\t *\n\t *\t\totherRange = model.createRange(\n\t *\t\t\tmodel.createPositionFromPath( root, [ 3 ] ),\n\t *\t\t\tmodel.createPositionFromPath( root, [ 5 ] )\n\t *\t\t);\n\t *\t\ttransformed = range.getJoined( otherRange ); // range from [ 2, 7 ] to [ 5 ]\n\t *\n\t * @param {module:engine/model/range~Range} otherRange Range to be joined.\n\t * @param {Boolean} [loose=false] Whether the intersection check is loose or strict. If the check is strict (`false`),\n\t * ranges are tested for intersection or whether start/end positions are equal. If the check is loose (`true`),\n\t * compared range is also checked if it's {@link module:engine/model/position~Position#isTouching touching} current range.\n\t * @returns {module:engine/model/range~Range|null} A sum of given ranges or `null` if ranges have no common part.\n\t */\n\tgetJoined( otherRange, loose = false ) {\n\t\tlet shouldJoin = this.isIntersecting( otherRange );\n\n\t\tif ( !shouldJoin ) {\n\t\t\tif ( this.start.isBefore( otherRange.start ) ) {\n\t\t\t\tshouldJoin = loose ? this.end.isTouching( otherRange.start ) : this.end.isEqual( otherRange.start );\n\t\t\t} else {\n\t\t\t\tshouldJoin = loose ? otherRange.end.isTouching( this.start ) : otherRange.end.isEqual( this.start );\n\t\t\t}\n\t\t}\n\n\t\tif ( !shouldJoin ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet startPosition = this.start;\n\t\tlet endPosition = this.end;\n\n\t\tif ( otherRange.start.isBefore( startPosition ) ) {\n\t\t\tstartPosition = otherRange.start;\n\t\t}\n\n\t\tif ( otherRange.end.isAfter( endPosition ) ) {\n\t\t\tendPosition = otherRange.end;\n\t\t}\n\n\t\treturn new Range( startPosition, endPosition );\n\t}\n\n\t/**\n\t * Computes and returns the smallest set of {@link #isFlat flat} ranges, that covers this range in whole.\n\t *\n\t * See an example of a model structure (`[` and `]` are range boundaries):\n\t *\n\t *\t\troot root\n\t *\t\t |- element DIV DIV P2 P3 DIV\n\t *\t\t | |- element H H P1 f o o b a r H P4\n\t *\t\t | | |- \"fir[st\" fir[st lorem se]cond ipsum\n\t *\t\t | |- element P1\n\t *\t\t | | |- \"lorem\" ||\n\t *\t\t |- element P2 ||\n\t *\t\t | |- \"foo\" VV\n\t *\t\t |- element P3\n\t *\t\t | |- \"bar\" root\n\t *\t\t |- element DIV DIV [P2 P3] DIV\n\t *\t\t | |- element H H [P1] f o o b a r H P4\n\t *\t\t | | |- \"se]cond\" fir[st] lorem [se]cond ipsum\n\t *\t\t | |- element P4\n\t *\t\t | | |- \"ipsum\"\n\t *\n\t * As it can be seen, letters contained in the range are: `stloremfoobarse`, spread across different parents.\n\t * We are looking for minimal set of flat ranges that contains the same nodes.\n\t *\n\t * Minimal flat ranges for above range `( [ 0, 0, 3 ], [ 3, 0, 2 ] )` will be:\n\t *\n\t *\t\t( [ 0, 0, 3 ], [ 0, 0, 5 ] ) = \"st\"\n\t *\t\t( [ 0, 1 ], [ 0, 2 ] ) = element P1 (\"lorem\")\n\t *\t\t( [ 1 ], [ 3 ] ) = element P2, element P3 (\"foobar\")\n\t *\t\t( [ 3, 0, 0 ], [ 3, 0, 2 ] ) = \"se\"\n\t *\n\t * **Note:** if an {@link module:engine/model/element~Element element} is not wholly contained in this range, it won't be returned\n\t * in any of the returned flat ranges. See in the example how `H` elements at the beginning and at the end of the range\n\t * were omitted. Only their parts that were wholly in the range were returned.\n\t *\n\t * **Note:** this method is not returning flat ranges that contain no nodes.\n\t *\n\t * @returns {Array.<module:engine/model/range~Range>} Array of flat ranges covering this range.\n\t */\n\tgetMinimalFlatRanges() {\n\t\tconst ranges = [];\n\t\tconst diffAt = this.start.getCommonPath( this.end ).length;\n\n\t\tconst pos = Position._createAt( this.start );\n\t\tlet posParent = pos.parent;\n\n\t\t// Go up.\n\t\twhile ( pos.path.length > diffAt + 1 ) {\n\t\t\tconst howMany = posParent.maxOffset - pos.offset;\n\n\t\t\tif ( howMany !== 0 ) {\n\t\t\t\tranges.push( new Range( pos, pos.getShiftedBy( howMany ) ) );\n\t\t\t}\n\n\t\t\tpos.path = pos.path.slice( 0, -1 );\n\t\t\tpos.offset++;\n\t\t\tposParent = posParent.parent;\n\t\t}\n\n\t\t// Go down.\n\t\twhile ( pos.path.length <= this.end.path.length ) {\n\t\t\tconst offset = this.end.path[ pos.path.length - 1 ];\n\t\t\tconst howMany = offset - pos.offset;\n\n\t\t\tif ( howMany !== 0 ) {\n\t\t\t\tranges.push( new Range( pos, pos.getShiftedBy( howMany ) ) );\n\t\t\t}\n\n\t\t\tpos.offset = offset;\n\t\t\tpos.path.push( 0 );\n\t\t}\n\n\t\treturn ranges;\n\t}\n\n\t/**\n\t * Creates a {@link module:engine/model/treewalker~TreeWalker TreeWalker} instance with this range as a boundary.\n\t *\n\t * For example, to iterate over all items in the entire document root:\n\t *\n\t *\t\t// Create a range spanning over the entire root content:\n\t *\t\tconst range = editor.model.createRangeIn( editor.model.document.getRoot() );\n\t *\n\t *\t\t// Iterate over all items in this range:\n\t *\t\tfor ( const value of range.getWalker() ) {\n\t *\t\t\tconsole.log( value.item );\n\t *\t\t}\n\t *\n\t * @param {Object} options Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.\n\t * @param {module:engine/model/position~Position} [options.startPosition]\n\t * @param {Boolean} [options.singleCharacters=false]\n\t * @param {Boolean} [options.shallow=false]\n\t * @param {Boolean} [options.ignoreElementEnd=false]\n\t * @returns {module:engine/model/treewalker~TreeWalker}\n\t */\n\tgetWalker( options = {} ) {\n\t\toptions.boundaries = this;\n\n\t\treturn new TreeWalker( options );\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all {@link module:engine/model/item~Item items} that are in this range and returns\n\t * them.\n\t *\n\t * This method uses {@link module:engine/model/treewalker~TreeWalker} with `boundaries` set to this range and `ignoreElementEnd` option\n\t * set to `true`. However it returns only {@link module:engine/model/item~Item model items},\n\t * not {@link module:engine/model/treewalker~TreeWalkerValue}.\n\t *\n\t * You may specify additional options for the tree walker. See {@link module:engine/model/treewalker~TreeWalker} for\n\t * a full list of available options.\n\t *\n\t * @param {Object} [options] Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.\n\t * @returns {Iterable.<module:engine/model/item~Item>}\n\t */\n\t* getItems( options = {} ) {\n\t\toptions.boundaries = this;\n\t\toptions.ignoreElementEnd = true;\n\n\t\tconst treeWalker = new TreeWalker( options );\n\n\t\tfor ( const value of treeWalker ) {\n\t\t\tyield value.item;\n\t\t}\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all {@link module:engine/model/position~Position positions} that are boundaries or\n\t * contained in this range.\n\t *\n\t * This method uses {@link module:engine/model/treewalker~TreeWalker} with `boundaries` set to this range. However it returns only\n\t * {@link module:engine/model/position~Position positions}, not {@link module:engine/model/treewalker~TreeWalkerValue}.\n\t *\n\t * You may specify additional options for the tree walker. See {@link module:engine/model/treewalker~TreeWalker} for\n\t * a full list of available options.\n\t *\n\t * @param {Object} options Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.\n\t * @returns {Iterable.<module:engine/model/position~Position>}\n\t */\n\t* getPositions( options = {} ) {\n\t\toptions.boundaries = this;\n\n\t\tconst treeWalker = new TreeWalker( options );\n\n\t\tyield treeWalker.position;\n\n\t\tfor ( const value of treeWalker ) {\n\t\t\tyield value.nextPosition;\n\t\t}\n\t}\n\n\t/**\n\t * Returns a range that is a result of transforming this range by given `operation`.\n\t *\n\t * **Note:** transformation may break one range into multiple ranges (for example, when a part of the range is\n\t * moved to a different part of document tree). For this reason, an array is returned by this method and it\n\t * may contain one or more `Range` instances.\n\t *\n\t * @param {module:engine/model/operation/operation~Operation} operation Operation to transform range by.\n\t * @returns {Array.<module:engine/model/range~Range>} Range which is the result of transformation.\n\t */\n\tgetTransformedByOperation( operation ) {\n\t\tswitch ( operation.type ) {\n\t\t\tcase 'insert':\n\t\t\t\treturn this._getTransformedByInsertOperation( operation );\n\t\t\tcase 'move':\n\t\t\tcase 'remove':\n\t\t\tcase 'reinsert':\n\t\t\t\treturn this._getTransformedByMoveOperation( operation );\n\t\t\tcase 'split':\n\t\t\t\treturn [ this._getTransformedBySplitOperation( operation ) ];\n\t\t\tcase 'merge':\n\t\t\t\treturn [ this._getTransformedByMergeOperation( operation ) ];\n\t\t}\n\n\t\treturn [ new Range( this.start, this.end ) ];\n\t}\n\n\t/**\n\t * Returns a range that is a result of transforming this range by multiple `operations`.\n\t *\n\t * @see ~Range#getTransformedByOperation\n\t * @param {Iterable.<module:engine/model/operation/operation~Operation>} operations Operations to transform the range by.\n\t * @returns {Array.<module:engine/model/range~Range>} Range which is the result of transformation.\n\t */\n\tgetTransformedByOperations( operations ) {\n\t\tconst ranges = [ new Range( this.start, this.end ) ];\n\n\t\tfor ( const operation of operations ) {\n\t\t\tfor ( let i = 0; i < ranges.length; i++ ) {\n\t\t\t\tconst result = ranges[ i ].getTransformedByOperation( operation );\n\n\t\t\t\tranges.splice( i, 1, ...result );\n\t\t\t\ti += result.length - 1;\n\t\t\t}\n\t\t}\n\n\t\t// It may happen that a range is split into two, and then the part of second \"piece\" is moved into first\n\t\t// \"piece\". In this case we will have incorrect third range, which should not be included in the result --\n\t\t// because it is already included in the first \"piece\". In this loop we are looking for all such ranges that\n\t\t// are inside other ranges and we simply remove them.\n\t\tfor ( let i = 0; i < ranges.length; i++ ) {\n\t\t\tconst range = ranges[ i ];\n\n\t\t\tfor ( let j = i + 1; j < ranges.length; j++ ) {\n\t\t\t\tconst next = ranges[ j ];\n\n\t\t\t\tif ( range.containsRange( next ) || next.containsRange( range ) || range.isEqual( next ) ) {\n\t\t\t\t\tranges.splice( j, 1 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn ranges;\n\t}\n\n\t/**\n\t * Returns an {@link module:engine/model/element~Element} or {@link module:engine/model/documentfragment~DocumentFragment}\n\t * which is a common ancestor of the range's both ends (in which the entire range is contained).\n\t *\n\t * @returns {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment|null}\n\t */\n\tgetCommonAncestor() {\n\t\treturn this.start.getCommonAncestor( this.end );\n\t}\n\n\t/**\n\t * Returns an {@link module:engine/model/element~Element Element} contained by the range.\n\t * The element will be returned when it is the **only** node within the range and **fully–contained**\n\t * at the same time.\n\t *\n\t * @returns {module:engine/model/element~Element|null}\n\t */\n\tgetContainedElement() {\n\t\tif ( this.isCollapsed ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst nodeAfterStart = this.start.nodeAfter;\n\t\tconst nodeBeforeEnd = this.end.nodeBefore;\n\n\t\tif ( nodeAfterStart && nodeAfterStart.is( 'element' ) && nodeAfterStart === nodeBeforeEnd ) {\n\t\t\treturn nodeAfterStart;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Converts `Range` to plain object and returns it.\n\t *\n\t * @returns {Object} `Node` converted to plain object.\n\t */\n\ttoJSON() {\n\t\treturn {\n\t\t\tstart: this.start.toJSON(),\n\t\t\tend: this.end.toJSON()\n\t\t};\n\t}\n\n\t/**\n\t * Returns a new range that is equal to current range.\n\t *\n\t * @returns {module:engine/model/range~Range}\n\t */\n\tclone() {\n\t\treturn new this.constructor( this.start, this.end );\n\t}\n\n\t/**\n\t * Returns a result of transforming a copy of this range by insert operation.\n\t *\n\t * One or more ranges may be returned as a result of this transformation.\n\t *\n\t * @protected\n\t * @param {module:engine/model/operation/insertoperation~InsertOperation} operation\n\t * @returns {Array.<module:engine/model/range~Range>}\n\t */\n\t_getTransformedByInsertOperation( operation, spread = false ) {\n\t\treturn this._getTransformedByInsertion( operation.position, operation.howMany, spread );\n\t}\n\n\t/**\n\t * Returns a result of transforming a copy of this range by move operation.\n\t *\n\t * One or more ranges may be returned as a result of this transformation.\n\t *\n\t * @protected\n\t * @param {module:engine/model/operation/moveoperation~MoveOperation} operation\n\t * @returns {Array.<module:engine/model/range~Range>}\n\t */\n\t_getTransformedByMoveOperation( operation, spread = false ) {\n\t\tconst sourcePosition = operation.sourcePosition;\n\t\tconst howMany = operation.howMany;\n\t\tconst targetPosition = operation.targetPosition;\n\n\t\treturn this._getTransformedByMove( sourcePosition, targetPosition, howMany, spread );\n\t}\n\n\t/**\n\t * Returns a result of transforming a copy of this range by split operation.\n\t *\n\t * Always one range is returned. The transformation is done in a way to not break the range.\n\t *\n\t * @protected\n\t * @param {module:engine/model/operation/splitoperation~SplitOperation} operation\n\t * @returns {module:engine/model/range~Range}\n\t */\n\t_getTransformedBySplitOperation( operation ) {\n\t\tconst start = this.start._getTransformedBySplitOperation( operation );\n\t\tlet end = this.end._getTransformedBySplitOperation( operation );\n\n\t\tif ( this.end.isEqual( operation.insertionPosition ) ) {\n\t\t\tend = this.end.getShiftedBy( 1 );\n\t\t}\n\n\t\t// Below may happen when range contains graveyard element used by split operation.\n\t\tif ( start.root != end.root ) {\n\t\t\t// End position was next to the moved graveyard element and was moved with it.\n\t\t\t// Fix it by using old `end` which has proper `root`.\n\t\t\tend = this.end.getShiftedBy( -1 );\n\t\t}\n\n\t\treturn new Range( start, end );\n\t}\n\n\t/**\n\t * Returns a result of transforming a copy of this range by merge operation.\n\t *\n\t * Always one range is returned. The transformation is done in a way to not break the range.\n\t *\n\t * @protected\n\t * @param {module:engine/model/operation/mergeoperation~MergeOperation} operation\n\t * @returns {module:engine/model/range~Range}\n\t */\n\t_getTransformedByMergeOperation( operation ) {\n\t\t// Special case when the marker is set on \"the closing tag\" of an element. Marker can be set like that during\n\t\t// transformations, especially when a content of a few block elements were removed. For example:\n\t\t//\n\t\t// {} is the transformed range, [] is the removed range.\n\t\t// <p>F[o{o</p><p>B}ar</p><p>Xy]z</p>\n\t\t//\n\t\t// <p>Fo{o</p><p>B}ar</p><p>z</p>\n\t\t// <p>F{</p><p>B}ar</p><p>z</p>\n\t\t// <p>F{</p>}<p>z</p>\n\t\t// <p>F{}z</p>\n\t\t//\n\t\tif ( this.start.isEqual( operation.targetPosition ) && this.end.isEqual( operation.deletionPosition ) ) {\n\t\t\treturn new Range( this.start );\n\t\t}\n\n\t\tlet start = this.start._getTransformedByMergeOperation( operation );\n\t\tlet end = this.end._getTransformedByMergeOperation( operation );\n\n\t\tif ( start.root != end.root ) {\n\t\t\t// This happens when the end position was next to the merged (deleted) element.\n\t\t\t// Then, the end position was moved to the graveyard root. In this case we need to fix\n\t\t\t// the range cause its boundaries would be in different roots.\n\t\t\tend = this.end.getShiftedBy( -1 );\n\t\t}\n\n\t\tif ( start.isAfter( end ) ) {\n\t\t\t// This happens in three following cases:\n\t\t\t//\n\t\t\t// Case 1: Merge operation source position is before the target position (due to some transformations, OT, etc.)\n\t\t\t// This means that start can be moved before the end of the range.\n\t\t\t//\n\t\t\t// Before: <p>a{a</p><p>b}b</p><p>cc</p>\n\t\t\t// Merge: <p>b}b</p><p>cca{a</p>\n\t\t\t// Fix: <p>{b}b</p><p>ccaa</p>\n\t\t\t//\n\t\t\t// Case 2: Range start is before merged node but not directly.\n\t\t\t// Result should include all nodes that were in the original range.\n\t\t\t//\n\t\t\t// Before: <p>aa</p>{<p>cc</p><p>b}b</p>\n\t\t\t// Merge: <p>aab}b</p>{<p>cc</p>\n\t\t\t// Fix: <p>aa{bb</p><p>cc</p>}\n\t\t\t//\n\t\t\t// The range is expanded by an additional `b` letter but it is better than dropping the whole `cc` paragraph.\n\t\t\t//\n\t\t\t// Case 3: Range start is directly before merged node.\n\t\t\t// Resulting range should include only nodes from the merged element:\n\t\t\t//\n\t\t\t// Before: <p>aa</p>{<p>b}b</p><p>cc</p>\n\t\t\t// Merge: <p>aab}b</p>{<p>cc</p>\n\t\t\t// Fix: <p>aa{b}b</p><p>cc</p>\n\t\t\t//\n\n\t\t\tif ( operation.sourcePosition.isBefore( operation.targetPosition ) ) {\n\t\t\t\t// Case 1.\n\t\t\t\tstart = Position._createAt( end );\n\t\t\t\tstart.offset = 0;\n\t\t\t} else {\n\t\t\t\tif ( !operation.deletionPosition.isEqual( start ) ) {\n\t\t\t\t\t// Case 2.\n\t\t\t\t\tend = operation.deletionPosition;\n\t\t\t\t}\n\n\t\t\t\t// In both case 2 and 3 start is at the end of the merge-to element.\n\t\t\t\tstart = operation.targetPosition;\n\t\t\t}\n\n\t\t\treturn new Range( start, end );\n\t\t}\n\n\t\treturn new Range( start, end );\n\t}\n\n\t/**\n\t * Returns an array containing one or two {@link ~Range ranges} that are a result of transforming this\n\t * {@link ~Range range} by inserting `howMany` nodes at `insertPosition`. Two {@link ~Range ranges} are\n\t * returned if the insertion was inside this {@link ~Range range} and `spread` is set to `true`.\n\t *\n\t * Examples:\n\t *\n\t *\t\tlet range = model.createRange(\n\t *\t\t\tmodel.createPositionFromPath( root, [ 2, 7 ] ),\n\t *\t\t\tmodel.createPositionFromPath( root, [ 4, 0, 1 ] )\n\t *\t\t);\n\t *\t\tlet transformed = range._getTransformedByInsertion( model.createPositionFromPath( root, [ 1 ] ), 2 );\n\t *\t\t// transformed array has one range from [ 4, 7 ] to [ 6, 0, 1 ]\n\t *\n\t *\t\ttransformed = range._getTransformedByInsertion( model.createPositionFromPath( root, [ 4, 0, 0 ] ), 4 );\n\t *\t\t// transformed array has one range from [ 2, 7 ] to [ 4, 0, 5 ]\n\t *\n\t *\t\ttransformed = range._getTransformedByInsertion( model.createPositionFromPath( root, [ 3, 2 ] ), 4 );\n\t *\t\t// transformed array has one range, which is equal to original range\n\t *\n\t *\t\ttransformed = range._getTransformedByInsertion( model.createPositionFromPath( root, [ 3, 2 ] ), 4, true );\n\t *\t\t// transformed array has two ranges: from [ 2, 7 ] to [ 3, 2 ] and from [ 3, 6 ] to [ 4, 0, 1 ]\n\t *\n\t * @protected\n\t * @param {module:engine/model/position~Position} insertPosition Position where nodes are inserted.\n\t * @param {Number} howMany How many nodes are inserted.\n\t * @param {Boolean} [spread] Flag indicating whether this {~Range range} should be spread if insertion\n\t * was inside the range. Defaults to `false`.\n\t * @returns {Array.<module:engine/model/range~Range>} Result of the transformation.\n\t */\n\t_getTransformedByInsertion( insertPosition, howMany, spread = false ) {\n\t\tif ( spread && this.containsPosition( insertPosition ) ) {\n\t\t\t// Range has to be spread. The first part is from original start to the spread point.\n\t\t\t// The other part is from spread point to the original end, but transformed by\n\t\t\t// insertion to reflect insertion changes.\n\n\t\t\treturn [\n\t\t\t\tnew Range( this.start, insertPosition ),\n\t\t\t\tnew Range(\n\t\t\t\t\tinsertPosition.getShiftedBy( howMany ),\n\t\t\t\t\tthis.end._getTransformedByInsertion( insertPosition, howMany )\n\t\t\t\t)\n\t\t\t];\n\t\t} else {\n\t\t\tconst range = new Range( this.start, this.end );\n\n\t\t\trange.start = range.start._getTransformedByInsertion( insertPosition, howMany );\n\t\t\trange.end = range.end._getTransformedByInsertion( insertPosition, howMany );\n\n\t\t\treturn [ range ];\n\t\t}\n\t}\n\n\t/**\n\t * Returns an array containing {@link ~Range ranges} that are a result of transforming this\n\t * {@link ~Range range} by moving `howMany` nodes from `sourcePosition` to `targetPosition`.\n\t *\n\t * @protected\n\t * @param {module:engine/model/position~Position} sourcePosition Position from which nodes are moved.\n\t * @param {module:engine/model/position~Position} targetPosition Position to where nodes are moved.\n\t * @param {Number} howMany How many nodes are moved.\n\t * @param {Boolean} [spread=false] Whether the range should be spread if the move points inside the range.\n\t * @returns {Array.<module:engine/model/range~Range>} Result of the transformation.\n\t */\n\t_getTransformedByMove( sourcePosition, targetPosition, howMany, spread = false ) {\n\t\t// Special case for transforming a collapsed range. Just transform it like a position.\n\t\tif ( this.isCollapsed ) {\n\t\t\tconst newPos = this.start._getTransformedByMove( sourcePosition, targetPosition, howMany );\n\n\t\t\treturn [ new Range( newPos ) ];\n\t\t}\n\n\t\t// Special case for transformation when a part of the range is moved towards the range.\n\t\t//\n\t\t// Examples:\n\t\t//\n\t\t// <div><p>ab</p><p>c[d</p></div><p>e]f</p> --> <div><p>ab</p></div><p>c[d</p><p>e]f</p>\n\t\t// <p>e[f</p><div><p>a]b</p><p>cd</p></div> --> <p>e[f</p><p>a]b</p><div><p>cd</p></div>\n\t\t//\n\t\t// Without this special condition, the default algorithm leaves an \"artifact\" range from one of `differenceSet` parts:\n\t\t//\n\t\t// <div><p>ab</p><p>c[d</p></div><p>e]f</p> --> <div><p>ab</p>{</div>}<p>c[d</p><p>e]f</p>\n\t\t//\n\t\t// This special case is applied only if the range is to be kept together (not spread).\n\t\tconst moveRange = Range._createFromPositionAndShift( sourcePosition, howMany );\n\t\tconst insertPosition = targetPosition._getTransformedByDeletion( sourcePosition, howMany );\n\n\t\tif ( this.containsPosition( targetPosition ) && !spread ) {\n\t\t\tif ( moveRange.containsPosition( this.start ) || moveRange.containsPosition( this.end ) ) {\n\t\t\t\tconst start = this.start._getTransformedByMove( sourcePosition, targetPosition, howMany );\n\t\t\t\tconst end = this.end._getTransformedByMove( sourcePosition, targetPosition, howMany );\n\n\t\t\t\treturn [ new Range( start, end ) ];\n\t\t\t}\n\t\t}\n\n\t\t// Default algorithm.\n\t\tlet result;\n\n\t\tconst differenceSet = this.getDifference( moveRange );\n\t\tlet difference = null;\n\n\t\tconst common = this.getIntersection( moveRange );\n\n\t\tif ( differenceSet.length == 1 ) {\n\t\t\t// `moveRange` and this range may intersect but may be separate.\n\t\t\tdifference = new Range(\n\t\t\t\tdifferenceSet[ 0 ].start._getTransformedByDeletion( sourcePosition, howMany ),\n\t\t\t\tdifferenceSet[ 0 ].end._getTransformedByDeletion( sourcePosition, howMany )\n\t\t\t);\n\t\t} else if ( differenceSet.length == 2 ) {\n\t\t\t// `moveRange` is inside this range.\n\t\t\tdifference = new Range(\n\t\t\t\tthis.start,\n\t\t\t\tthis.end._getTransformedByDeletion( sourcePosition, howMany )\n\t\t\t);\n\t\t} // else, `moveRange` contains this range.\n\n\t\tif ( difference ) {\n\t\t\tresult = difference._getTransformedByInsertion( insertPosition, howMany, common !== null || spread );\n\t\t} else {\n\t\t\tresult = [];\n\t\t}\n\n\t\tif ( common ) {\n\t\t\tconst transformedCommon = new Range(\n\t\t\t\tcommon.start._getCombined( moveRange.start, insertPosition ),\n\t\t\t\tcommon.end._getCombined( moveRange.start, insertPosition )\n\t\t\t);\n\n\t\t\tif ( result.length == 2 ) {\n\t\t\t\tresult.splice( 1, 0, transformedCommon );\n\t\t\t} else {\n\t\t\t\tresult.push( transformedCommon );\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns a copy of this range that is transformed by deletion of `howMany` nodes from `deletePosition`.\n\t *\n\t * If the deleted range is intersecting with the transformed range, the transformed range will be shrank.\n\t *\n\t * If the deleted range contains transformed range, `null` will be returned.\n\t *\n\t * @protected\n\t * @param {module:engine/model/position~Position} deletionPosition Position from which nodes are removed.\n\t * @param {Number} howMany How many nodes are removed.\n\t * @returns {module:engine/model/range~Range|null} Result of the transformation.\n\t */\n\t_getTransformedByDeletion( deletePosition, howMany ) {\n\t\tlet newStart = this.start._getTransformedByDeletion( deletePosition, howMany );\n\t\tlet newEnd = this.end._getTransformedByDeletion( deletePosition, howMany );\n\n\t\tif ( newStart == null && newEnd == null ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( newStart == null ) {\n\t\t\tnewStart = deletePosition;\n\t\t}\n\n\t\tif ( newEnd == null ) {\n\t\t\tnewEnd = deletePosition;\n\t\t}\n\n\t\treturn new Range( newStart, newEnd );\n\t}\n\n\t/**\n\t * Creates a new range, spreading from specified {@link module:engine/model/position~Position position} to a position moved by\n\t * given `shift`. If `shift` is a negative value, shifted position is treated as the beginning of the range.\n\t *\n\t * @protected\n\t * @param {module:engine/model/position~Position} position Beginning of the range.\n\t * @param {Number} shift How long the range should be.\n\t * @returns {module:engine/model/range~Range}\n\t */\n\tstatic _createFromPositionAndShift( position, shift ) {\n\t\tconst start = position;\n\t\tconst end = position.getShiftedBy( shift );\n\n\t\treturn shift > 0 ? new this( start, end ) : new this( end, start );\n\t}\n\n\t/**\n\t * Creates a range inside an {@link module:engine/model/element~Element element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * @protected\n\t * @param {module:engine/model/element~Element} element Element which is a parent for the range.\n\t * @returns {module:engine/model/range~Range}\n\t */\n\tstatic _createIn( element ) {\n\t\treturn new this( Position._createAt( element, 0 ), Position._createAt( element, element.maxOffset ) );\n\t}\n\n\t/**\n\t * Creates a range that starts before given {@link module:engine/model/item~Item model item} and ends after it.\n\t *\n\t * @protected\n\t * @param {module:engine/model/item~Item} item\n\t * @returns {module:engine/model/range~Range}\n\t */\n\tstatic _createOn( item ) {\n\t\treturn this._createFromPositionAndShift( Position._createBefore( item ), item.offsetSize );\n\t}\n\n\t/**\n\t * Combines all ranges from the passed array into a one range. At least one range has to be passed.\n\t * Passed ranges must not have common parts.\n\t *\n\t * The first range from the array is a reference range. If other ranges start or end on the exactly same position where\n\t * the reference range, they get combined into one range.\n\t *\n\t *\t\t[ ][] [ ][ ][ ][ ][] [ ] // Passed ranges, shown sorted\n\t *\t\t[ ] // The result of the function if the first range was a reference range.\n\t *\t [ ] // The result of the function if the third-to-seventh range was a reference range.\n\t *\t [ ] // The result of the function if the last range was a reference range.\n\t *\n\t * @param {Array.<module:engine/model/range~Range>} ranges Ranges to combine.\n\t * @returns {module:engine/model/range~Range} Combined range.\n\t */\n\tstatic _createFromRanges( ranges ) {\n\t\tif ( ranges.length === 0 ) {\n\t\t\t/**\n\t\t\t * At least one range has to be passed to\n\t\t\t * {@link module:engine/model/range~Range._createFromRanges `Range._createFromRanges()`}.\n\t\t\t *\n\t\t\t * @error range-create-from-ranges-empty-array\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'range-create-from-ranges-empty-array',\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if ( ranges.length == 1 ) {\n\t\t\treturn ranges[ 0 ].clone();\n\t\t}\n\n\t\t// 1. Set the first range in `ranges` array as a reference range.\n\t\t// If we are going to return just a one range, one of the ranges need to be the reference one.\n\t\t// Other ranges will be stuck to that range, if possible.\n\t\tconst ref = ranges[ 0 ];\n\n\t\t// 2. Sort all the ranges so it's easier to process them.\n\t\tranges.sort( ( a, b ) => {\n\t\t\treturn a.start.isAfter( b.start ) ? 1 : -1;\n\t\t} );\n\n\t\t// 3. Check at which index the reference range is now.\n\t\tconst refIndex = ranges.indexOf( ref );\n\n\t\t// 4. At this moment we don't need the original range.\n\t\t// We are going to modify the result and we need to return a new instance of Range.\n\t\t// We have to create a copy of the reference range.\n\t\tconst result = new this( ref.start, ref.end );\n\n\t\t// 5. Ranges should be checked and glued starting from the range that is closest to the reference range.\n\t\t// Since ranges are sorted, start with the range with index that is closest to reference range index.\n\t\tif ( refIndex > 0 ) {\n\t\t\tfor ( let i = refIndex - 1; true; i++ ) {\n\t\t\t\tif ( ranges[ i ].end.isEqual( result.start ) ) {\n\t\t\t\t\tresult.start = Position._createAt( ranges[ i ].start );\n\t\t\t\t} else {\n\t\t\t\t\t// If ranges are not starting/ending at the same position there is no point in looking further.\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// 6. Ranges should be checked and glued starting from the range that is closest to the reference range.\n\t\t// Since ranges are sorted, start with the range with index that is closest to reference range index.\n\t\tfor ( let i = refIndex + 1; i < ranges.length; i++ ) {\n\t\t\tif ( ranges[ i ].start.isEqual( result.end ) ) {\n\t\t\t\tresult.end = Position._createAt( ranges[ i ].end );\n\t\t\t} else {\n\t\t\t\t// If ranges are not starting/ending at the same position there is no point in looking further.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Creates a `Range` instance from given plain object (i.e. parsed JSON string).\n\t *\n\t * @param {Object} json Plain object to be converted to `Range`.\n\t * @param {module:engine/model/document~Document} doc Document object that will be range owner.\n\t * @returns {module:engine/model/range~Range} `Range` instance created using given plain object.\n\t */\n\tstatic fromJSON( json, doc ) {\n\t\treturn new this( Position.fromJSON( json.start, doc ), Position.fromJSON( json.end, doc ) );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // toString() {\n\t// @if CK_DEBUG_ENGINE // \treturn `${ this.root } [ ${ this.start.path.join( ', ' ) } ] - [ ${ this.end.path.join( ', ' ) } ]`;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // log() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ModelPosition: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/conversion/mapper\n */\n\nimport ModelPosition from '../model/position';\nimport ModelRange from '../model/range';\n\nimport ViewPosition from '../view/position';\nimport ViewRange from '../view/range';\nimport ViewText from '../view/text';\n\nimport EmitterMixin from '@ckeditor/ckeditor5-utils/src/emittermixin';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\n\n/**\n * Maps elements, positions and markers between the {@link module:engine/view/document~Document view} and\n * the {@link module:engine/model/model model}.\n *\n * The instance of the Mapper used for the editing pipeline is available in\n * {@link module:engine/controller/editingcontroller~EditingController#mapper `editor.editing.mapper`}.\n *\n * Mapper uses bound elements to find corresponding elements and positions, so, to get proper results,\n * all model elements should be {@link module:engine/conversion/mapper~Mapper#bindElements bound}.\n *\n * To map the complex model to/from view relations, you may provide custom callbacks for the\n * {@link module:engine/conversion/mapper~Mapper#event:modelToViewPosition modelToViewPosition event} and\n * {@link module:engine/conversion/mapper~Mapper#event:viewToModelPosition viewToModelPosition event} that are fired whenever\n * a position mapping request occurs.\n * Those events are fired by the {@link module:engine/conversion/mapper~Mapper#toViewPosition toViewPosition}\n * and {@link module:engine/conversion/mapper~Mapper#toModelPosition toModelPosition} methods. `Mapper` adds its own default callbacks\n * with `'lowest'` priority. To override default `Mapper` mapping, add custom callback with higher priority and\n * stop the event.\n * @mixes module:utils/emittermixin~EmitterMixin\n */\nexport default class Mapper {\n\t/**\n\t * Creates an instance of the mapper.\n\t */\n\tconstructor() {\n\t\t/**\n\t\t * Model element to view element mapping.\n\t\t *\n\t\t * @private\n\t\t * @member {WeakMap}\n\t\t */\n\t\tthis._modelToViewMapping = new WeakMap();\n\n\t\t/**\n\t\t * View element to model element mapping.\n\t\t *\n\t\t * @private\n\t\t * @member {WeakMap}\n\t\t */\n\t\tthis._viewToModelMapping = new WeakMap();\n\n\t\t/**\n\t\t * A map containing callbacks between view element names and functions evaluating length of view elements\n\t\t * in model.\n\t\t *\n\t\t * @private\n\t\t * @member {Map}\n\t\t */\n\t\tthis._viewToModelLengthCallbacks = new Map();\n\n\t\t/**\n\t\t * Model marker name to view elements mapping.\n\t\t *\n\t\t * Keys are `String`s while values are `Set`s with {@link module:engine/view/element~Element view elements}.\n\t\t * One marker (name) can be mapped to multiple elements.\n\t\t *\n\t\t * @private\n\t\t * @member {Map}\n\t\t */\n\t\tthis._markerNameToElements = new Map();\n\n\t\t/**\n\t\t * View element to model marker names mapping.\n\t\t *\n\t\t * This is reverse to {@link ~Mapper#_markerNameToElements} map.\n\t\t *\n\t\t * @private\n\t\t * @member {Map}\n\t\t */\n\t\tthis._elementToMarkerNames = new Map();\n\n\t\t/**\n\t\t * The map of removed view elements with their current root (used for deferred unbinding).\n\t\t *\n\t\t * @private\n\t\t * @member {Map.<module:engine/view/element~Element,module:engine/view/documentfragment~DocumentFragment>}\n\t\t */\n\t\tthis._deferredBindingRemovals = new Map();\n\n\t\t/**\n\t\t * Stores marker names of markers which have changed due to unbinding a view element (so it is assumed that the view element\n\t\t * has been removed, moved or renamed).\n\t\t *\n\t\t * @private\n\t\t * @member {Set.<module:engine/model/markercollection~Marker>}\n\t\t */\n\t\tthis._unboundMarkerNames = new Set();\n\n\t\t// Default mapper algorithm for mapping model position to view position.\n\t\tthis.on( 'modelToViewPosition', ( evt, data ) => {\n\t\t\tif ( data.viewPosition ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst viewContainer = this._modelToViewMapping.get( data.modelPosition.parent );\n\n\t\t\tif ( !viewContainer ) {\n\t\t\t\t/**\n\t\t\t\t * A model position could not be mapped to the view because the parent of the model position\n\t\t\t\t * does not have a mapped view element (might have not been converted yet or it has no converter).\n\t\t\t\t *\n\t\t\t\t * Make sure that the model element is correctly converted to the view.\n\t\t\t\t *\n\t\t\t\t * @error mapping-view-position-parent-not-found\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'mapping-view-position-parent-not-found', this, { modelPosition: data.modelPosition } );\n\t\t\t}\n\n\t\t\tdata.viewPosition = this.findPositionIn( viewContainer, data.modelPosition.offset );\n\t\t}, { priority: 'low' } );\n\n\t\t// Default mapper algorithm for mapping view position to model position.\n\t\tthis.on( 'viewToModelPosition', ( evt, data ) => {\n\t\t\tif ( data.modelPosition ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst viewBlock = this.findMappedViewAncestor( data.viewPosition );\n\t\t\tconst modelParent = this._viewToModelMapping.get( viewBlock );\n\t\t\tconst modelOffset = this._toModelOffset( data.viewPosition.parent, data.viewPosition.offset, viewBlock );\n\n\t\t\tdata.modelPosition = ModelPosition._createAt( modelParent, modelOffset );\n\t\t}, { priority: 'low' } );\n\t}\n\n\t/**\n\t * Marks model and view elements as corresponding. Corresponding elements can be retrieved by using\n\t * the {@link module:engine/conversion/mapper~Mapper#toModelElement toModelElement} and\n\t * {@link module:engine/conversion/mapper~Mapper#toViewElement toViewElement} methods.\n\t * The information that elements are bound is also used to translate positions.\n\t *\n\t * @param {module:engine/model/element~Element} modelElement Model element.\n\t * @param {module:engine/view/element~Element} viewElement View element.\n\t */\n\tbindElements( modelElement, viewElement ) {\n\t\tthis._modelToViewMapping.set( modelElement, viewElement );\n\t\tthis._viewToModelMapping.set( viewElement, modelElement );\n\t}\n\n\t/**\n\t * Unbinds the given {@link module:engine/view/element~Element view element} from the map.\n\t *\n\t * **Note:** view-to-model binding will be removed, if it existed. However, corresponding model-to-view binding\n\t * will be removed only if model element is still bound to the passed `viewElement`.\n\t *\n\t * This behavior allows for re-binding model element to another view element without fear of losing the new binding\n\t * when the previously bound view element is unbound.\n\t *\n\t * @param {module:engine/view/element~Element} viewElement View element to unbind.\n\t * @param {Object} [options={}] The options object.\n\t * @param {Boolean} [options.defer=false] Controls whether the binding should be removed immediately or deferred until a\n\t * {@link #flushDeferredBindings `flushDeferredBindings()`} call.\n\t */\n\tunbindViewElement( viewElement, options = {} ) {\n\t\tconst modelElement = this.toModelElement( viewElement );\n\n\t\tif ( this._elementToMarkerNames.has( viewElement ) ) {\n\t\t\tfor ( const markerName of this._elementToMarkerNames.get( viewElement ) ) {\n\t\t\t\tthis._unboundMarkerNames.add( markerName );\n\t\t\t}\n\t\t}\n\n\t\tif ( options.defer ) {\n\t\t\tthis._deferredBindingRemovals.set( viewElement, viewElement.root );\n\t\t} else {\n\t\t\tthis._viewToModelMapping.delete( viewElement );\n\n\t\t\tif ( this._modelToViewMapping.get( modelElement ) == viewElement ) {\n\t\t\t\tthis._modelToViewMapping.delete( modelElement );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Unbinds the given {@link module:engine/model/element~Element model element} from the map.\n\t *\n\t * **Note:** the model-to-view binding will be removed, if it existed. However, the corresponding view-to-model binding\n\t * will be removed only if the view element is still bound to the passed `modelElement`.\n\t *\n\t * This behavior lets for re-binding view element to another model element without fear of losing the new binding\n\t * when the previously bound model element is unbound.\n\t *\n\t * @param {module:engine/model/element~Element} modelElement Model element to unbind.\n\t */\n\tunbindModelElement( modelElement ) {\n\t\tconst viewElement = this.toViewElement( modelElement );\n\n\t\tthis._modelToViewMapping.delete( modelElement );\n\n\t\tif ( this._viewToModelMapping.get( viewElement ) == modelElement ) {\n\t\t\tthis._viewToModelMapping.delete( viewElement );\n\t\t}\n\t}\n\n\t/**\n\t * Binds the given marker name with the given {@link module:engine/view/element~Element view element}. The element\n\t * will be added to the current set of elements bound with the given marker name.\n\t *\n\t * @param {module:engine/view/element~Element} element Element to bind.\n\t * @param {String} name Marker name.\n\t */\n\tbindElementToMarker( element, name ) {\n\t\tconst elements = this._markerNameToElements.get( name ) || new Set();\n\t\telements.add( element );\n\n\t\tconst names = this._elementToMarkerNames.get( element ) || new Set();\n\t\tnames.add( name );\n\n\t\tthis._markerNameToElements.set( name, elements );\n\t\tthis._elementToMarkerNames.set( element, names );\n\t}\n\n\t/**\n\t * Unbinds an element from given marker name.\n\t *\n\t * @param {module:engine/view/element~Element} element Element to unbind.\n\t * @param {String} name Marker name.\n\t */\n\tunbindElementFromMarkerName( element, name ) {\n\t\tconst nameToElements = this._markerNameToElements.get( name );\n\n\t\tif ( nameToElements ) {\n\t\t\tnameToElements.delete( element );\n\n\t\t\tif ( nameToElements.size == 0 ) {\n\t\t\t\tthis._markerNameToElements.delete( name );\n\t\t\t}\n\t\t}\n\n\t\tconst elementToNames = this._elementToMarkerNames.get( element );\n\n\t\tif ( elementToNames ) {\n\t\t\telementToNames.delete( name );\n\n\t\t\tif ( elementToNames.size == 0 ) {\n\t\t\t\tthis._elementToMarkerNames.delete( element );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns all marker names of markers which have changed due to unbinding a view element (so it is assumed that the view element\n\t * has been removed, moved or renamed) since the last flush. After returning, the marker names list is cleared.\n\t *\n\t * @returns {Array.<String>}\n\t */\n\tflushUnboundMarkerNames() {\n\t\tconst markerNames = Array.from( this._unboundMarkerNames );\n\n\t\tthis._unboundMarkerNames.clear();\n\n\t\treturn markerNames;\n\t}\n\n\t/**\n\t * Unbinds all deferred binding removals of view elements that in the meantime were not re-attached to some root or document fragment.\n\t *\n\t * See: {@link #unbindViewElement `unbindViewElement()`}.\n\t */\n\tflushDeferredBindings() {\n\t\tfor ( const [ viewElement, root ] of this._deferredBindingRemovals ) {\n\t\t\t// Unbind it only if it wasn't re-attached to some root or document fragment.\n\t\t\tif ( viewElement.root == root ) {\n\t\t\t\tthis.unbindViewElement( viewElement );\n\t\t\t}\n\t\t}\n\n\t\tthis._deferredBindingRemovals = new Map();\n\t}\n\n\t/**\n\t * Removes all model to view and view to model bindings.\n\t */\n\tclearBindings() {\n\t\tthis._modelToViewMapping = new WeakMap();\n\t\tthis._viewToModelMapping = new WeakMap();\n\t\tthis._markerNameToElements = new Map();\n\t\tthis._elementToMarkerNames = new Map();\n\t\tthis._unboundMarkerNames = new Set();\n\t\tthis._deferredBindingRemovals = new Map();\n\t}\n\n\t/**\n\t * Gets the corresponding model element.\n\t *\n\t * **Note:** {@link module:engine/view/uielement~UIElement} does not have corresponding element in model.\n\t *\n\t * @param {module:engine/view/element~Element} viewElement View element.\n\t * @returns {module:engine/model/element~Element|undefined} Corresponding model element or `undefined` if not found.\n\t */\n\ttoModelElement( viewElement ) {\n\t\treturn this._viewToModelMapping.get( viewElement );\n\t}\n\n\t/**\n\t * Gets the corresponding view element.\n\t *\n\t * @param {module:engine/model/element~Element} modelElement Model element.\n\t * @returns {module:engine/view/element~Element|undefined} Corresponding view element or `undefined` if not found.\n\t */\n\ttoViewElement( modelElement ) {\n\t\treturn this._modelToViewMapping.get( modelElement );\n\t}\n\n\t/**\n\t * Gets the corresponding model range.\n\t *\n\t * @param {module:engine/view/range~Range} viewRange View range.\n\t * @returns {module:engine/model/range~Range} Corresponding model range.\n\t */\n\ttoModelRange( viewRange ) {\n\t\treturn new ModelRange( this.toModelPosition( viewRange.start ), this.toModelPosition( viewRange.end ) );\n\t}\n\n\t/**\n\t * Gets the corresponding view range.\n\t *\n\t * @param {module:engine/model/range~Range} modelRange Model range.\n\t * @returns {module:engine/view/range~Range} Corresponding view range.\n\t */\n\ttoViewRange( modelRange ) {\n\t\treturn new ViewRange( this.toViewPosition( modelRange.start ), this.toViewPosition( modelRange.end ) );\n\t}\n\n\t/**\n\t * Gets the corresponding model position.\n\t *\n\t * @fires viewToModelPosition\n\t * @param {module:engine/view/position~Position} viewPosition View position.\n\t * @returns {module:engine/model/position~Position} Corresponding model position.\n\t */\n\ttoModelPosition( viewPosition ) {\n\t\tconst data = {\n\t\t\tviewPosition,\n\t\t\tmapper: this\n\t\t};\n\n\t\tthis.fire( 'viewToModelPosition', data );\n\n\t\treturn data.modelPosition;\n\t}\n\n\t/**\n\t * Gets the corresponding view position.\n\t *\n\t * @fires modelToViewPosition\n\t * @param {module:engine/model/position~Position} modelPosition Model position.\n\t * @param {Object} [options] Additional options for position mapping process.\n\t * @param {Boolean} [options.isPhantom=false] Should be set to `true` if the model position to map is pointing to a place\n\t * in model tree which no longer exists. For example, it could be an end of a removed model range.\n\t * @returns {module:engine/view/position~Position} Corresponding view position.\n\t */\n\ttoViewPosition( modelPosition, options = { isPhantom: false } ) {\n\t\tconst data = {\n\t\t\tmodelPosition,\n\t\t\tmapper: this,\n\t\t\tisPhantom: options.isPhantom\n\t\t};\n\n\t\tthis.fire( 'modelToViewPosition', data );\n\n\t\treturn data.viewPosition;\n\t}\n\n\t/**\n\t * Gets all view elements bound to the given marker name.\n\t *\n\t * @param {String} name Marker name.\n\t * @returns {Set.<module:engine/view/element~Element>|null} View elements bound with the given marker name or `null`\n\t * if no elements are bound to the given marker name.\n\t */\n\tmarkerNameToElements( name ) {\n\t\tconst boundElements = this._markerNameToElements.get( name );\n\n\t\tif ( !boundElements ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst elements = new Set();\n\n\t\tfor ( const element of boundElements ) {\n\t\t\tif ( element.is( 'attributeElement' ) ) {\n\t\t\t\tfor ( const clone of element.getElementsWithSameId() ) {\n\t\t\t\t\telements.add( clone );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\telements.add( element );\n\t\t\t}\n\t\t}\n\n\t\treturn elements;\n\t}\n\n\t/**\n\t * Registers a callback that evaluates the length in the model of a view element with the given name.\n\t *\n\t * The callback is fired with one argument, which is a view element instance. The callback is expected to return\n\t * a number representing the length of the view element in the model.\n\t *\n\t *\t\t// List item in view may contain nested list, which have other list items. In model though,\n\t *\t\t// the lists are represented by flat structure. Because of those differences, length of list view element\n\t *\t\t// may be greater than one. In the callback it's checked how many nested list items are in evaluated list item.\n\t *\n\t *\t\tfunction getViewListItemLength( element ) {\n\t *\t\t\tlet length = 1;\n\t *\n\t *\t\t\tfor ( let child of element.getChildren() ) {\n\t *\t\t\t\tif ( child.name == 'ul' || child.name == 'ol' ) {\n\t *\t\t\t\t\tfor ( let item of child.getChildren() ) {\n\t *\t\t\t\t\t\tlength += getViewListItemLength( item );\n\t *\t\t\t\t\t}\n\t *\t\t\t\t}\n\t *\t\t\t}\n\t *\n\t *\t\t\treturn length;\n\t *\t\t}\n\t *\n\t *\t\tmapper.registerViewToModelLength( 'li', getViewListItemLength );\n\t *\n\t * @param {String} viewElementName Name of view element for which callback is registered.\n\t * @param {Function} lengthCallback Function return a length of view element instance in model.\n\t */\n\tregisterViewToModelLength( viewElementName, lengthCallback ) {\n\t\tthis._viewToModelLengthCallbacks.set( viewElementName, lengthCallback );\n\t}\n\n\t/**\n\t * For the given `viewPosition`, finds and returns the closest ancestor of this position that has a mapping to\n\t * the model.\n\t *\n\t * @param {module:engine/view/position~Position} viewPosition Position for which a mapped ancestor should be found.\n\t * @returns {module:engine/view/element~Element}\n\t */\n\tfindMappedViewAncestor( viewPosition ) {\n\t\tlet parent = viewPosition.parent;\n\n\t\twhile ( !this._viewToModelMapping.has( parent ) ) {\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn parent;\n\t}\n\n\t/**\n\t * Calculates model offset based on the view position and the block element.\n\t *\n\t * Example:\n\t *\n\t *\t\t<p>foo<b>ba|r</b></p> // _toModelOffset( b, 2, p ) -> 5\n\t *\n\t * Is a sum of:\n\t *\n\t *\t\t<p>foo|<b>bar</b></p> // _toModelOffset( p, 3, p ) -> 3\n\t *\t\t<p>foo<b>ba|r</b></p> // _toModelOffset( b, 2, b ) -> 2\n\t *\n\t * @private\n\t * @param {module:engine/view/element~Element} viewParent Position parent.\n\t * @param {Number} viewOffset Position offset.\n\t * @param {module:engine/view/element~Element} viewBlock Block used as a base to calculate offset.\n\t * @returns {Number} Offset in the model.\n\t */\n\t_toModelOffset( viewParent, viewOffset, viewBlock ) {\n\t\tif ( viewBlock != viewParent ) {\n\t\t\t// See example.\n\t\t\tconst offsetToParentStart = this._toModelOffset( viewParent.parent, viewParent.index, viewBlock );\n\t\t\tconst offsetInParent = this._toModelOffset( viewParent, viewOffset, viewParent );\n\n\t\t\treturn offsetToParentStart + offsetInParent;\n\t\t}\n\n\t\t// viewBlock == viewParent, so we need to calculate the offset in the parent element.\n\n\t\t// If the position is a text it is simple (\"ba|r\" -> 2).\n\t\tif ( viewParent.is( '$text' ) ) {\n\t\t\treturn viewOffset;\n\t\t}\n\n\t\t// If the position is in an element we need to sum lengths of siblings ( <b> bar </b> foo | -> 3 + 3 = 6 ).\n\t\tlet modelOffset = 0;\n\n\t\tfor ( let i = 0; i < viewOffset; i++ ) {\n\t\t\tmodelOffset += this.getModelLength( viewParent.getChild( i ) );\n\t\t}\n\n\t\treturn modelOffset;\n\t}\n\n\t/**\n\t * Gets the length of the view element in the model.\n\t *\n\t * The length is calculated as follows:\n\t * * if a {@link #registerViewToModelLength length mapping callback} is provided for the given `viewNode`, it is used to\n\t * evaluate the model length (`viewNode` is used as first and only parameter passed to the callback),\n\t * * length of a {@link module:engine/view/text~Text text node} is equal to the length of its\n\t * {@link module:engine/view/text~Text#data data},\n\t * * length of a {@link module:engine/view/uielement~UIElement ui element} is equal to 0,\n\t * * length of a mapped {@link module:engine/view/element~Element element} is equal to 1,\n\t * * length of a non-mapped {@link module:engine/view/element~Element element} is equal to the length of its children.\n\t *\n\t * Examples:\n\t *\n\t *\t\tfoo -> 3 // Text length is equal to its data length.\n\t *\t\t<p>foo</p> -> 1 // Length of an element which is mapped is by default equal to 1.\n\t *\t\t<b>foo</b> -> 3 // Length of an element which is not mapped is a length of its children.\n\t *\t\t<div><p>x</p><p>y</p></div> -> 2 // Assuming that <div> is not mapped and <p> are mapped.\n\t *\n\t * @param {module:engine/view/element~Element} viewNode View node.\n\t * @returns {Number} Length of the node in the tree model.\n\t */\n\tgetModelLength( viewNode ) {\n\t\tif ( this._viewToModelLengthCallbacks.get( viewNode.name ) ) {\n\t\t\tconst callback = this._viewToModelLengthCallbacks.get( viewNode.name );\n\n\t\t\treturn callback( viewNode );\n\t\t} else if ( this._viewToModelMapping.has( viewNode ) ) {\n\t\t\treturn 1;\n\t\t} else if ( viewNode.is( '$text' ) ) {\n\t\t\treturn viewNode.data.length;\n\t\t} else if ( viewNode.is( 'uiElement' ) ) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\tlet len = 0;\n\n\t\t\tfor ( const child of viewNode.getChildren() ) {\n\t\t\t\tlen += this.getModelLength( child );\n\t\t\t}\n\n\t\t\treturn len;\n\t\t}\n\t}\n\n\t/**\n\t * Finds the position in the view node (or in its children) with the expected model offset.\n\t *\n\t * Example:\n\t *\n\t *\t\t<p>fo<b>bar</b>bom</p> -> expected offset: 4\n\t *\n\t *\t\tfindPositionIn( p, 4 ):\n\t *\t\t<p>|fo<b>bar</b>bom</p> -> expected offset: 4, actual offset: 0\n\t *\t\t<p>fo|<b>bar</b>bom</p> -> expected offset: 4, actual offset: 2\n\t *\t\t<p>fo<b>bar</b>|bom</p> -> expected offset: 4, actual offset: 5 -> we are too far\n\t *\n\t *\t\tfindPositionIn( b, 4 - ( 5 - 3 ) ):\n\t *\t\t<p>fo<b>|bar</b>bom</p> -> expected offset: 2, actual offset: 0\n\t *\t\t<p>fo<b>bar|</b>bom</p> -> expected offset: 2, actual offset: 3 -> we are too far\n\t *\n\t *\t\tfindPositionIn( bar, 2 - ( 3 - 3 ) ):\n\t *\t\tWe are in the text node so we can simple find the offset.\n\t *\t\t<p>fo<b>ba|r</b>bom</p> -> expected offset: 2, actual offset: 2 -> position found\n\t *\n\t * @param {module:engine/view/element~Element} viewParent Tree view element in which we are looking for the position.\n\t * @param {Number} expectedOffset Expected offset.\n\t * @returns {module:engine/view/position~Position} Found position.\n\t */\n\tfindPositionIn( viewParent, expectedOffset ) {\n\t\t// Last scanned view node.\n\t\tlet viewNode;\n\t\t// Length of the last scanned view node.\n\t\tlet lastLength = 0;\n\n\t\tlet modelOffset = 0;\n\t\tlet viewOffset = 0;\n\n\t\t// In the text node it is simple: the offset in the model equals the offset in the text.\n\t\tif ( viewParent.is( '$text' ) ) {\n\t\t\treturn new ViewPosition( viewParent, expectedOffset );\n\t\t}\n\n\t\t// In other cases we add lengths of child nodes to find the proper offset.\n\n\t\t// If it is smaller we add the length.\n\t\twhile ( modelOffset < expectedOffset ) {\n\t\t\tviewNode = viewParent.getChild( viewOffset );\n\t\t\tlastLength = this.getModelLength( viewNode );\n\t\t\tmodelOffset += lastLength;\n\t\t\tviewOffset++;\n\t\t}\n\n\t\t// If it equals we found the position.\n\t\tif ( modelOffset == expectedOffset ) {\n\t\t\treturn this._moveViewPositionToTextNode( new ViewPosition( viewParent, viewOffset ) );\n\t\t}\n\t\t// If it is higher we need to enter last child.\n\t\telse {\n\t\t\t// ( modelOffset - lastLength ) is the offset to the child we enter,\n\t\t\t// so we subtract it from the expected offset to fine the offset in the child.\n\t\t\treturn this.findPositionIn( viewNode, expectedOffset - ( modelOffset - lastLength ) );\n\t\t}\n\t}\n\n\t/**\n\t * Because we prefer positions in the text nodes over positions next to text nodes, if the view position was next to a text node,\n\t * it moves it into the text node instead.\n\t *\n\t *\t\t<p>[]<b>foo</b></p> -> <p>[]<b>foo</b></p> // do not touch if position is not directly next to text\n\t *\t\t<p>foo[]<b>foo</b></p> -> <p>foo{}<b>foo</b></p> // move to text node\n\t *\t\t<p><b>[]foo</b></p> -> <p><b>{}foo</b></p> // move to text node\n\t *\n\t * @private\n\t * @param {module:engine/view/position~Position} viewPosition Position potentially next to the text node.\n\t * @returns {module:engine/view/position~Position} Position in the text node if possible.\n\t */\n\t_moveViewPositionToTextNode( viewPosition ) {\n\t\t// If the position is just after a text node, put it at the end of that text node.\n\t\t// If the position is just before a text node, put it at the beginning of that text node.\n\t\tconst nodeBefore = viewPosition.nodeBefore;\n\t\tconst nodeAfter = viewPosition.nodeAfter;\n\n\t\tif ( nodeBefore instanceof ViewText ) {\n\t\t\treturn new ViewPosition( nodeBefore, nodeBefore.data.length );\n\t\t} else if ( nodeAfter instanceof ViewText ) {\n\t\t\treturn new ViewPosition( nodeAfter, 0 );\n\t\t}\n\n\t\t// Otherwise, just return the given position.\n\t\treturn viewPosition;\n\t}\n\n\t/**\n\t * Fired for each model-to-view position mapping request. The purpose of this event is to enable custom model-to-view position\n\t * mapping. Callbacks added to this event take {@link module:engine/model/position~Position model position} and are expected to\n\t * calculate the {@link module:engine/view/position~Position view position}. The calculated view position should be added as\n\t * a `viewPosition` value in the `data` object that is passed as one of parameters to the event callback.\n\t *\n\t * \t\t// Assume that \"captionedImage\" model element is converted to <img> and following <span> elements in view,\n\t * \t\t// and the model element is bound to <img> element. Force mapping model positions inside \"captionedImage\" to that\n\t * \t\t// <span> element.\n\t *\t\tmapper.on( 'modelToViewPosition', ( evt, data ) => {\n\t *\t\t\tconst positionParent = modelPosition.parent;\n\t *\n\t *\t\t\tif ( positionParent.name == 'captionedImage' ) {\n\t *\t\t\t\tconst viewImg = data.mapper.toViewElement( positionParent );\n\t *\t\t\t\tconst viewCaption = viewImg.nextSibling; // The <span> element.\n\t *\n\t *\t\t\t\tdata.viewPosition = new ViewPosition( viewCaption, modelPosition.offset );\n\t *\n\t *\t\t\t\t// Stop the event if other callbacks should not modify calculated value.\n\t *\t\t\t\tevt.stop();\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * **Note:** keep in mind that sometimes a \"phantom\" model position is being converted. A \"phantom\" model position is\n\t * a position that points to a nonexistent place in model. Such a position might still be valid for conversion, though\n\t * (it would point to a correct place in the view when converted). One example of such a situation is when a range is\n\t * removed from the model, there may be a need to map the range's end (which is no longer a valid model position). To\n\t * handle such situations, check the `data.isPhantom` flag:\n\t *\n\t * \t\t// Assume that there is a \"customElement\" model element and whenever the position is before it,\n\t * \t\t// we want to move it to the inside of the view element bound to \"customElement\".\n\t *\t\tmapper.on( 'modelToViewPosition', ( evt, data ) => {\n\t *\t\t\tif ( data.isPhantom ) {\n\t *\t\t\t\treturn;\n\t *\t\t\t}\n\t *\n\t *\t\t\t// Below line might crash for phantom position that does not exist in model.\n\t *\t\t\tconst sibling = data.modelPosition.nodeBefore;\n\t *\n\t *\t\t\t// Check if this is the element we are interested in.\n\t *\t\t\tif ( !sibling.is( 'element', 'customElement' ) ) {\n\t *\t\t\t\treturn;\n\t *\t\t\t}\n\t *\n\t *\t\t\tconst viewElement = data.mapper.toViewElement( sibling );\n\t *\n\t *\t\t\tdata.viewPosition = new ViewPosition( sibling, 0 );\n\t *\n\t *\t\t\tevt.stop();\n\t *\t\t} );\n\t *\n\t * **Note:** the default mapping callback is provided with a `low` priority setting and does not cancel the event, so it is possible to\n\t * attach a custom callback after a default callback and also use `data.viewPosition` calculated by the default callback\n\t * (for example to fix it).\n\t *\n\t * **Note:** the default mapping callback will not fire if `data.viewPosition` is already set.\n\t *\n\t * **Note:** these callbacks are called **very often**. For efficiency reasons, it is advised to use them only when position\n\t * mapping between the given model and view elements is unsolvable by using just elements mapping and default algorithm.\n\t * Also, the condition that checks if a special case scenario happened should be as simple as possible.\n\t *\n\t * @event modelToViewPosition\n\t * @param {Object} data Data pipeline object that can store and pass data between callbacks. The callback should add\n\t * the `viewPosition` value to that object with calculated the {@link module:engine/view/position~Position view position}.\n\t * @param {module:engine/conversion/mapper~Mapper} data.mapper Mapper instance that fired the event.\n\t */\n\n\t/**\n\t * Fired for each view-to-model position mapping request. See {@link module:engine/conversion/mapper~Mapper#event:modelToViewPosition}.\n\t *\n\t * \t\t// See example in `modelToViewPosition` event description.\n\t * \t\t// This custom mapping will map positions from <span> element next to <img> to the \"captionedImage\" element.\n\t *\t\tmapper.on( 'viewToModelPosition', ( evt, data ) => {\n\t *\t\t\tconst positionParent = viewPosition.parent;\n\t *\n\t *\t\t\tif ( positionParent.hasClass( 'image-caption' ) ) {\n\t *\t\t\t\tconst viewImg = positionParent.previousSibling;\n\t *\t\t\t\tconst modelImg = data.mapper.toModelElement( viewImg );\n\t *\n\t *\t\t\t\tdata.modelPosition = new ModelPosition( modelImg, viewPosition.offset );\n\t *\t\t\t\tevt.stop();\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * **Note:** the default mapping callback is provided with a `low` priority setting and does not cancel the event, so it is possible to\n\t * attach a custom callback after the default callback and also use `data.modelPosition` calculated by the default callback\n\t * (for example to fix it).\n\t *\n\t * **Note:** the default mapping callback will not fire if `data.modelPosition` is already set.\n\t *\n\t * **Note:** these callbacks are called **very often**. For efficiency reasons, it is advised to use them only when position\n\t * mapping between the given model and view elements is unsolvable by using just elements mapping and default algorithm.\n\t * Also, the condition that checks if special case scenario happened should be as simple as possible.\n\t *\n\t * @event viewToModelPosition\n\t * @param {Object} data Data pipeline object that can store and pass data between callbacks. The callback should add\n\t * `modelPosition` value to that object with calculated {@link module:engine/model/position~Position model position}.\n\t * @param {module:engine/conversion/mapper~Mapper} data.mapper Mapper instance that fired the event.\n\t */\n}\n\nmix( Mapper, EmitterMixin );\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/conversion/modelconsumable\n */\n\nimport TextProxy from '../model/textproxy';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n/**\n * Manages a list of consumable values for the {@link module:engine/model/item~Item model items}.\n *\n * Consumables are various aspects of the model. A model item can be broken down into separate, single properties that might be\n * taken into consideration when converting that item.\n *\n * `ModelConsumable` is used by {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher} while analyzing the changed\n * parts of {@link module:engine/model/document~Document the document}. The added / changed / removed model items are broken down\n * into singular properties (the item itself and its attributes). All those parts are saved in `ModelConsumable`. Then,\n * during conversion, when the given part of a model item is converted (i.e. the view element has been inserted into the view,\n * but without attributes), the consumable value is removed from `ModelConsumable`.\n *\n * For model items, `ModelConsumable` stores consumable values of one of following types: `insert`, `addattribute:<attributeKey>`,\n * `changeattributes:<attributeKey>`, `removeattributes:<attributeKey>`.\n *\n * In most cases, it is enough to let th {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}\n * gather consumable values, so there is no need to use\n * the {@link module:engine/conversion/modelconsumable~ModelConsumable#add add method} directly.\n * However, it is important to understand how consumable values can be\n * {@link module:engine/conversion/modelconsumable~ModelConsumable#consume consumed}.\n * See {@link module:engine/conversion/downcasthelpers default downcast converters} for more information.\n *\n * Keep in mind that one conversion event may have multiple callbacks (converters) attached to it. Each of those is\n * able to convert one or more parts of the model. However, when one of those callbacks actually converts\n * something, the others should not, because they would duplicate the results. Using `ModelConsumable` helps to avoid\n * this situation, because callbacks should only convert these values that were not yet consumed from `ModelConsumable`.\n *\n * Consuming multiple values in a single callback:\n *\n *\t\t// Converter for custom `imageBlock` element that might have a `caption` element inside which changes\n *\t\t// how the image is displayed in the view:\n *\t\t//\n *\t\t// Model:\n *\t\t//\n *\t\t// [imageBlock]\n *\t\t// └─ [caption]\n *\t\t// └─ foo\n *\t\t//\n *\t\t// View:\n *\t\t//\n *\t\t// <figure>\n *\t\t// ├─ <img />\n *\t\t// └─ <caption>\n *\t\t// └─ foo\n *\t\tmodelConversionDispatcher.on( 'insert:imageBlock', ( evt, data, conversionApi ) => {\n *\t\t\t// First, consume the `imageBlock` element.\n *\t\t\tconversionApi.consumable.consume( data.item, 'insert' );\n *\n *\t\t\t// Just create normal image element for the view.\n *\t\t\t// Maybe it will be \"decorated\" later.\n *\t\t\tconst viewImage = new ViewElement( 'img' );\n *\t\t\tconst insertPosition = conversionApi.mapper.toViewPosition( data.range.start );\n *\t\t\tconst viewWriter = conversionApi.writer;\n *\n *\t\t\t// Check if the `imageBlock` element has children.\n *\t\t\tif ( data.item.childCount > 0 ) {\n *\t\t\t\tconst modelCaption = data.item.getChild( 0 );\n *\n *\t\t\t\t// `modelCaption` insertion change is consumed from consumable values.\n *\t\t\t\t// It will not be converted by other converters, but it's children (probably some text) will be.\n *\t\t\t\t// Through mapping, converters for text will know where to insert contents of `modelCaption`.\n *\t\t\t\tif ( conversionApi.consumable.consume( modelCaption, 'insert' ) ) {\n *\t\t\t\t\tconst viewCaption = new ViewElement( 'figcaption' );\n *\n *\t\t\t\t\tconst viewImageHolder = new ViewElement( 'figure', null, [ viewImage, viewCaption ] );\n *\n *\t\t\t\t\tconversionApi.mapper.bindElements( modelCaption, viewCaption );\n *\t\t\t\t\tconversionApi.mapper.bindElements( data.item, viewImageHolder );\n *\t\t\t\t\tviewWriter.insert( insertPosition, viewImageHolder );\n *\t\t\t\t}\n *\t\t\t} else {\n *\t\t\t\tconversionApi.mapper.bindElements( data.item, viewImage );\n *\t\t\t\tviewWriter.insert( insertPosition, viewImage );\n *\t\t\t}\n *\n *\t\t\tevt.stop();\n *\t\t} );\n */\nexport default class ModelConsumable {\n\t/**\n\t * Creates an empty consumables list.\n\t */\n\tconstructor() {\n\t\t/**\n\t\t * Contains list of consumable values.\n\t\t *\n\t\t * @private\n\t\t * @member {Map} module:engine/conversion/modelconsumable~ModelConsumable#_consumable\n\t\t */\n\t\tthis._consumable = new Map();\n\n\t\t/**\n\t\t * For each {@link module:engine/model/textproxy~TextProxy} added to `ModelConsumable`, this registry holds a parent\n\t\t * of that `TextProxy` and the start and end indices of that `TextProxy`. This allows identification of the `TextProxy`\n\t\t * instances that point to the same part of the model but are different instances. Each distinct `TextProxy`\n\t\t * is given a unique `Symbol` which is then registered as consumable. This process is transparent for the `ModelConsumable`\n\t\t * API user because whenever `TextProxy` is added, tested, consumed or reverted, the internal mechanisms of\n\t\t * `ModelConsumable` translate `TextProxy` to that unique `Symbol`.\n\t\t *\n\t\t * @private\n\t\t * @member {Map} module:engine/conversion/modelconsumable~ModelConsumable#_textProxyRegistry\n\t\t */\n\t\tthis._textProxyRegistry = new Map();\n\t}\n\n\t/**\n\t * Adds a consumable value to the consumables list and links it with a given model item.\n\t *\n\t *\t\tmodelConsumable.add( modelElement, 'insert' ); // Add `modelElement` insertion change to consumable values.\n\t *\t\tmodelConsumable.add( modelElement, 'addAttribute:bold' ); // Add `bold` attribute insertion on `modelElement` change.\n\t *\t\tmodelConsumable.add( modelElement, 'removeAttribute:bold' ); // Add `bold` attribute removal on `modelElement` change.\n\t *\t\tmodelConsumable.add( modelSelection, 'selection' ); // Add `modelSelection` to consumable values.\n\t *\t\tmodelConsumable.add( modelRange, 'range' ); // Add `modelRange` to consumable values.\n\t *\n\t * @param {module:engine/model/item~Item|module:engine/model/selection~Selection|module:engine/model/range~Range} item\n\t * Model item, range or selection that has the consumable.\n\t * @param {String} type Consumable type. Will be normalized to a proper form, that is either `<word>` or `<part>:<part>`.\n\t * Second colon and everything after will be cut. Passing event name is a safe and good practice.\n\t */\n\tadd( item, type ) {\n\t\ttype = _normalizeConsumableType( type );\n\n\t\tif ( item instanceof TextProxy ) {\n\t\t\titem = this._getSymbolForTextProxy( item );\n\t\t}\n\n\t\tif ( !this._consumable.has( item ) ) {\n\t\t\tthis._consumable.set( item, new Map() );\n\t\t}\n\n\t\tthis._consumable.get( item ).set( type, true );\n\t}\n\n\t/**\n\t * Removes a given consumable value from a given model item.\n\t *\n\t *\t\tmodelConsumable.consume( modelElement, 'insert' ); // Remove `modelElement` insertion change from consumable values.\n\t *\t\tmodelConsumable.consume( modelElement, 'addAttribute:bold' ); // Remove `bold` attribute insertion on `modelElement` change.\n\t *\t\tmodelConsumable.consume( modelElement, 'removeAttribute:bold' ); // Remove `bold` attribute removal on `modelElement` change.\n\t *\t\tmodelConsumable.consume( modelSelection, 'selection' ); // Remove `modelSelection` from consumable values.\n\t *\t\tmodelConsumable.consume( modelRange, 'range' ); // Remove 'modelRange' from consumable values.\n\t *\n\t * @param {module:engine/model/item~Item|module:engine/model/selection~Selection|module:engine/model/range~Range} item\n\t * Model item, range or selection from which consumable will be consumed.\n\t * @param {String} type Consumable type. Will be normalized to a proper form, that is either `<word>` or `<part>:<part>`.\n\t * Second colon and everything after will be cut. Passing event name is a safe and good practice.\n\t * @returns {Boolean} `true` if consumable value was available and was consumed, `false` otherwise.\n\t */\n\tconsume( item, type ) {\n\t\ttype = _normalizeConsumableType( type );\n\n\t\tif ( item instanceof TextProxy ) {\n\t\t\titem = this._getSymbolForTextProxy( item );\n\t\t}\n\n\t\tif ( this.test( item, type ) ) {\n\t\t\tthis._consumable.get( item ).set( type, false );\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Tests whether there is a consumable value of a given type connected with a given model item.\n\t *\n\t *\t\tmodelConsumable.test( modelElement, 'insert' ); // Check for `modelElement` insertion change.\n\t *\t\tmodelConsumable.test( modelElement, 'addAttribute:bold' ); // Check for `bold` attribute insertion on `modelElement` change.\n\t *\t\tmodelConsumable.test( modelElement, 'removeAttribute:bold' ); // Check for `bold` attribute removal on `modelElement` change.\n\t *\t\tmodelConsumable.test( modelSelection, 'selection' ); // Check if `modelSelection` is consumable.\n\t *\t\tmodelConsumable.test( modelRange, 'range' ); // Check if `modelRange` is consumable.\n\t *\n\t * @param {module:engine/model/item~Item|module:engine/model/selection~Selection|module:engine/model/range~Range} item\n\t * Model item, range or selection to be tested.\n\t * @param {String} type Consumable type. Will be normalized to a proper form, that is either `<word>` or `<part>:<part>`.\n\t * Second colon and everything after will be cut. Passing event name is a safe and good practice.\n\t * @returns {null|Boolean} `null` if such consumable was never added, `false` if the consumable values was\n\t * already consumed or `true` if it was added and not consumed yet.\n\t */\n\ttest( item, type ) {\n\t\ttype = _normalizeConsumableType( type );\n\n\t\tif ( item instanceof TextProxy ) {\n\t\t\titem = this._getSymbolForTextProxy( item );\n\t\t}\n\n\t\tconst itemConsumables = this._consumable.get( item );\n\n\t\tif ( itemConsumables === undefined ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst value = itemConsumables.get( type );\n\n\t\tif ( value === undefined ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn value;\n\t}\n\n\t/**\n\t * Reverts consuming of a consumable value.\n\t *\n\t *\t\tmodelConsumable.revert( modelElement, 'insert' ); // Revert consuming `modelElement` insertion change.\n\t *\t\tmodelConsumable.revert( modelElement, 'addAttribute:bold' ); // Revert consuming `bold` attribute insert from `modelElement`.\n\t *\t\tmodelConsumable.revert( modelElement, 'removeAttribute:bold' ); // Revert consuming `bold` attribute remove from `modelElement`.\n\t *\t\tmodelConsumable.revert( modelSelection, 'selection' ); // Revert consuming `modelSelection`.\n\t *\t\tmodelConsumable.revert( modelRange, 'range' ); // Revert consuming `modelRange`.\n\t *\n\t * @param {module:engine/model/item~Item|module:engine/model/selection~Selection|module:engine/model/range~Range} item\n\t * Model item, range or selection to be reverted.\n\t * @param {String} type Consumable type.\n\t * @returns {null|Boolean} `true` if consumable has been reversed, `false` otherwise. `null` if the consumable has\n\t * never been added.\n\t */\n\trevert( item, type ) {\n\t\ttype = _normalizeConsumableType( type );\n\n\t\tif ( item instanceof TextProxy ) {\n\t\t\titem = this._getSymbolForTextProxy( item );\n\t\t}\n\n\t\tconst test = this.test( item, type );\n\n\t\tif ( test === false ) {\n\t\t\tthis._consumable.get( item ).set( type, true );\n\n\t\t\treturn true;\n\t\t} else if ( test === true ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Verifies if all events from the specified group were consumed.\n\t *\n\t * @param {String} eventGroup The events group to verify.\n\t */\n\tverifyAllConsumed( eventGroup ) {\n\t\tconst items = [];\n\n\t\tfor ( const [ item, consumables ] of this._consumable ) {\n\t\t\tfor ( const [ event, canConsume ] of consumables ) {\n\t\t\t\tconst eventPrefix = event.split( ':' )[ 0 ];\n\n\t\t\t\tif ( canConsume && eventGroup == eventPrefix ) {\n\t\t\t\t\titems.push( {\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\titem: item.name || item.description\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( items.length ) {\n\t\t\t/**\n\t\t\t * Some of the {@link module:engine/model/item~Item model items} were not consumed while downcasting the model to view.\n\t\t\t *\n\t\t\t * This might be the effect of:\n\t\t\t *\n\t\t\t * * A missing converter for some model elements. Make sure that you registered downcast converters for all model elements.\n\t\t\t * * A custom converter that does not consume converted items. Make sure that you\n\t\t\t * {@link module:engine/conversion/modelconsumable~ModelConsumable#consume consumed} all model elements that you converted\n\t\t\t * from the model to the view.\n\t\t\t * * A custom converter that called `event.stop()`. When providing a custom converter, keep in mind that you should not stop\n\t\t\t * the event. If you stop it then the default converter at the `lowest` priority will not trigger the conversion of this node's\n\t\t\t * attributes and child nodes.\n\t\t\t *\n\t\t\t * @error conversion-model-consumable-not-consumed\n\t\t\t * @param {Array.<module:engine/model/item~Item>} items Items that were not consumed.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'conversion-model-consumable-not-consumed', null, { items } );\n\t\t}\n\t}\n\n\t/**\n\t * Gets a unique symbol for the passed {@link module:engine/model/textproxy~TextProxy} instance. All `TextProxy` instances that\n\t * have same parent, same start index and same end index will get the same symbol.\n\t *\n\t * Used internally to correctly consume `TextProxy` instances.\n\t *\n\t * @protected\n\t * @param {module:engine/model/textproxy~TextProxy} textProxy `TextProxy` instance to get a symbol for.\n\t * @returns {Symbol} Symbol representing all equal instances of `TextProxy`.\n\t */\n\t_getSymbolForTextProxy( textProxy ) {\n\t\tlet symbol = null;\n\n\t\tconst startMap = this._textProxyRegistry.get( textProxy.startOffset );\n\n\t\tif ( startMap ) {\n\t\t\tconst endMap = startMap.get( textProxy.endOffset );\n\n\t\t\tif ( endMap ) {\n\t\t\t\tsymbol = endMap.get( textProxy.parent );\n\t\t\t}\n\t\t}\n\n\t\tif ( !symbol ) {\n\t\t\tsymbol = this._addSymbolForTextProxy( textProxy );\n\t\t}\n\n\t\treturn symbol;\n\t}\n\n\t/**\n\t * Adds a symbol for the given {@link module:engine/model/textproxy~TextProxy} instance.\n\t *\n\t * Used internally to correctly consume `TextProxy` instances.\n\t *\n\t * @private\n\t * @param {module:engine/model/textproxy~TextProxy} textProxy Text proxy instance.\n\t * @returns {Symbol} Symbol generated for given `TextProxy`.\n\t */\n\t_addSymbolForTextProxy( textProxy ) {\n\t\tconst start = textProxy.startOffset;\n\t\tconst end = textProxy.endOffset;\n\t\tconst parent = textProxy.parent;\n\n\t\tconst symbol = Symbol( '$textProxy:' + textProxy.data );\n\t\tlet startMap, endMap;\n\n\t\tstartMap = this._textProxyRegistry.get( start );\n\n\t\tif ( !startMap ) {\n\t\t\tstartMap = new Map();\n\t\t\tthis._textProxyRegistry.set( start, startMap );\n\t\t}\n\n\t\tendMap = startMap.get( end );\n\n\t\tif ( !endMap ) {\n\t\t\tendMap = new Map();\n\t\t\tstartMap.set( end, endMap );\n\t\t}\n\n\t\tendMap.set( parent, symbol );\n\n\t\treturn symbol;\n\t}\n}\n\n// Returns a normalized consumable type name from the given string. A normalized consumable type name is a string that has\n// at most one colon, for example: `insert` or `addMarker:highlight`. If a string to normalize has more \"parts\" (more colons),\n// the further parts are dropped, for example: `addattribute:bold:$text` -> `addattributes:bold`.\n//\n// @param {String} type Consumable type.\n// @returns {String} Normalized consumable type.\nfunction _normalizeConsumableType( type ) {\n\tconst parts = type.split( ':' );\n\n\t// For inserts allow passing event name, it's stored in the context of a specified element so the element name is not needed.\n\tif ( parts[ 0 ] == 'insert' ) {\n\t\treturn parts[ 0 ];\n\t}\n\n\t// Markers are identified by the whole name (otherwise we would consume the whole markers group).\n\tif ( parts[ 0 ] == 'addMarker' || parts[ 0 ] == 'removeMarker' ) {\n\t\treturn type;\n\t}\n\n\treturn parts.length > 1 ? parts[ 0 ] + ':' + parts[ 1 ] : parts[ 0 ];\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/conversion/downcastdispatcher\n */\n\nimport Consumable from './modelconsumable';\nimport Range from '../model/range';\n\nimport EmitterMixin from '@ckeditor/ckeditor5-utils/src/emittermixin';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\n\n/**\n * The downcast dispatcher is a central point of downcasting (conversion from the model to the view), which is a process of reacting\n * to changes in the model and firing a set of events. The callbacks listening to these events are called converters. The\n * converters' role is to convert the model changes to changes in view (for example, adding view nodes or\n * changing attributes on view elements).\n *\n * During the conversion process, downcast dispatcher fires events basing on the state of the model and prepares\n * data for these events. It is important to understand that the events are connected with the changes done on the model,\n * for example: \"a node has been inserted\" or \"an attribute has changed\". This is in contrary to upcasting (a view-to-model conversion)\n * where you convert the view state (view nodes) to a model tree.\n *\n * The events are prepared basing on a diff created by the {@link module:engine/model/differ~Differ Differ}, which buffers them\n * and then passes to the downcast dispatcher as a diff between the old model state and the new model state.\n *\n * Note that because the changes are converted, there is a need to have a mapping between the model structure and the view structure.\n * To map positions and elements during the downcast (a model-to-view conversion), use {@link module:engine/conversion/mapper~Mapper}.\n *\n * Downcast dispatcher fires the following events for model tree changes:\n *\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert `insert`} &ndash;\n * If a range of nodes was inserted to the model tree.\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:remove `remove`} &ndash;\n * If a range of nodes was removed from the model tree.\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute`} &ndash;\n * If an attribute was added, changed or removed from a model node.\n *\n * For {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert `insert`}\n * and {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute`},\n * the downcast dispatcher generates {@link module:engine/conversion/modelconsumable~ModelConsumable consumables}.\n * These are used to have control over which changes have already been consumed. It is useful when some converters\n * overwrite others or convert multiple changes (for example, it converts an insertion of an element and also converts that\n * element's attributes during the insertion).\n *\n * Additionally, downcast dispatcher fires events for {@link module:engine/model/markercollection~Marker marker} changes:\n *\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker `addMarker`} &ndash; If a marker was added.\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:removeMarker `removeMarker`} &ndash; If a marker was\n * removed.\n *\n * Note that changing a marker is done through removing the marker from the old range and adding it to the new range,\n * so both of these events are fired.\n *\n * Finally, a downcast dispatcher also handles firing events for the {@link module:engine/model/selection model selection}\n * conversion:\n *\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:selection `selection`}\n * &ndash; Converts the selection from the model to the view.\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute`}\n * &ndash; Fired for every selection attribute.\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker `addMarker`}\n * &ndash; Fired for every marker that contains a selection.\n *\n * Unlike the model tree and the markers, the events for selection are not fired for changes but for a selection state.\n *\n * When providing custom listeners for a downcast dispatcher, remember to check whether a given change has not been\n * {@link module:engine/conversion/modelconsumable~ModelConsumable#consume consumed} yet.\n *\n * When providing custom listeners for a downcast dispatcher, keep in mind that you **should not** stop the event. If you stop it,\n * then the default converter at the `lowest` priority will not trigger the conversion of this node's attributes and child nodes.\n *\n * When providing custom listeners for a downcast dispatcher, remember to use the provided\n * {@link module:engine/view/downcastwriter~DowncastWriter view downcast writer} to apply changes to the view document.\n *\n * You can read more about conversion in the following guide:\n *\n * * {@glink framework/guides/deep-dive/conversion/downcast Downcast conversion}\n *\n * An example of a custom converter for the downcast dispatcher:\n *\n *\t\t// You will convert inserting a \"paragraph\" model element into the model.\n *\t\tdowncastDispatcher.on( 'insert:paragraph', ( evt, data, conversionApi ) => {\n *\t\t\t// Remember to check whether the change has not been consumed yet and consume it.\n *\t\t\tif ( !conversionApi.consumable.consume( data.item, 'insert' ) ) {\n *\t\t\t\treturn;\n *\t\t\t}\n *\n *\t\t\t// Translate the position in the model to a position in the view.\n *\t\t\tconst viewPosition = conversionApi.mapper.toViewPosition( data.range.start );\n *\n *\t\t\t// Create a <p> element that will be inserted into the view at the `viewPosition`.\n *\t\t\tconst viewElement = conversionApi.writer.createContainerElement( 'p' );\n *\n *\t\t\t// Bind the newly created view element to the model element so positions will map accordingly in the future.\n *\t\t\tconversionApi.mapper.bindElements( data.item, viewElement );\n *\n *\t\t\t// Add the newly created view element to the view.\n *\t\t\tconversionApi.writer.insert( viewPosition, viewElement );\n *\t\t} );\n */\nexport default class DowncastDispatcher {\n\t/**\n\t * Creates a downcast dispatcher instance.\n\t *\n\t * @see module:engine/conversion/downcastdispatcher~DowncastConversionApi\n\t * @param {Object} conversionApi Additional properties for an interface that will be passed to events fired\n\t * by the downcast dispatcher.\n\t */\n\tconstructor( conversionApi ) {\n\t\t/**\n\t\t * A template for an interface passed by the dispatcher to the event callbacks.\n\t\t *\n\t\t * @protected\n\t\t * @member {module:engine/conversion/downcastdispatcher~DowncastConversionApi}\n\t\t */\n\t\tthis._conversionApi = { dispatcher: this, ...conversionApi };\n\n\t\t/**\n\t\t * A map of already fired events for a given `ModelConsumable`.\n\t\t *\n\t\t * @private\n\t\t * @member {WeakMap.<module:engine/conversion/downcastdispatcher~DowncastConversionApi,Map>}\n\t\t */\n\t\tthis._firedEventsMap = new WeakMap();\n\t}\n\n\t/**\n\t * Converts changes buffered in the given {@link module:engine/model/differ~Differ model differ}\n\t * and fires conversion events based on it.\n\t *\n\t * @fires insert\n\t * @fires remove\n\t * @fires attribute\n\t * @fires addMarker\n \t * @fires removeMarker\n\t * @fires reduceChanges\n\t * @param {module:engine/model/differ~Differ} differ The differ object with buffered changes.\n\t * @param {module:engine/model/markercollection~MarkerCollection} markers Markers related to the model fragment to convert.\n\t * @param {module:engine/view/downcastwriter~DowncastWriter} writer The view writer that should be used to modify the view document.\n\t */\n\tconvertChanges( differ, markers, writer ) {\n\t\tconst conversionApi = this._createConversionApi( writer, differ.getRefreshedItems() );\n\n\t\t// Before the view is updated, remove markers which have changed.\n\t\tfor ( const change of differ.getMarkersToRemove() ) {\n\t\t\tthis._convertMarkerRemove( change.name, change.range, conversionApi );\n\t\t}\n\n\t\t// Let features modify the change list (for example to allow reconversion).\n\t\tconst changes = this._reduceChanges( differ.getChanges() );\n\n\t\t// Convert changes that happened on model tree.\n\t\tfor ( const entry of changes ) {\n\t\t\tif ( entry.type === 'insert' ) {\n\t\t\t\tthis._convertInsert( Range._createFromPositionAndShift( entry.position, entry.length ), conversionApi );\n\t\t\t} else if ( entry.type === 'reinsert' ) {\n\t\t\t\tthis._convertReinsert( Range._createFromPositionAndShift( entry.position, entry.length ), conversionApi );\n\t\t\t} else if ( entry.type === 'remove' ) {\n\t\t\t\tthis._convertRemove( entry.position, entry.length, entry.name, conversionApi );\n\t\t\t} else {\n\t\t\t\t// Defaults to 'attribute' change.\n\t\t\t\tthis._convertAttribute( entry.range, entry.attributeKey, entry.attributeOldValue, entry.attributeNewValue, conversionApi );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const markerName of conversionApi.mapper.flushUnboundMarkerNames() ) {\n\t\t\tconst markerRange = markers.get( markerName ).getRange();\n\n\t\t\tthis._convertMarkerRemove( markerName, markerRange, conversionApi );\n\t\t\tthis._convertMarkerAdd( markerName, markerRange, conversionApi );\n\t\t}\n\n\t\t// After the view is updated, convert markers which have changed.\n\t\tfor ( const change of differ.getMarkersToAdd() ) {\n\t\t\tthis._convertMarkerAdd( change.name, change.range, conversionApi );\n\t\t}\n\n\t\t// Remove mappings for all removed view elements.\n\t\tconversionApi.mapper.flushDeferredBindings();\n\n\t\t// Verify if all insert consumables were consumed.\n\t\tconversionApi.consumable.verifyAllConsumed( 'insert' );\n\t}\n\n\t/**\n\t * Starts a conversion of a model range and the provided markers.\n\t *\n\t * @fires insert\n\t * @fires attribute\n\t * @fires addMarker\n\t * @param {module:engine/model/range~Range} range The inserted range.\n\t * @param {Map<String,module:engine/model/range~Range>} markers The map of markers that should be down-casted.\n\t * @param {module:engine/view/downcastwriter~DowncastWriter} writer The view writer that should be used to modify the view document.\n\t * @param {Object} [options] Optional options object passed to `convertionApi.options`.\n\t */\n\tconvert( range, markers, writer, options = {} ) {\n\t\tconst conversionApi = this._createConversionApi( writer, undefined, options );\n\n\t\tthis._convertInsert( range, conversionApi );\n\n\t\tfor ( const [ name, range ] of markers ) {\n\t\t\tthis._convertMarkerAdd( name, range, conversionApi );\n\t\t}\n\n\t\t// Verify if all insert consumables were consumed.\n\t\tconversionApi.consumable.verifyAllConsumed( 'insert' );\n\t}\n\n\t/**\n\t * Starts the model selection conversion.\n\t *\n\t * Fires events for a given {@link module:engine/model/selection~Selection selection} to start the selection conversion.\n\t *\n\t * @fires selection\n\t * @fires addMarker\n\t * @fires attribute\n\t * @param {module:engine/model/selection~Selection} selection The selection to convert.\n\t * @param {module:engine/model/markercollection~MarkerCollection} markers Markers connected with the converted model.\n\t * @param {module:engine/view/downcastwriter~DowncastWriter} writer View writer that should be used to modify the view document.\n\t */\n\tconvertSelection( selection, markers, writer ) {\n\t\tconst markersAtSelection = Array.from( markers.getMarkersAtPosition( selection.getFirstPosition() ) );\n\n\t\tconst conversionApi = this._createConversionApi( writer );\n\n\t\tthis._addConsumablesForSelection( conversionApi.consumable, selection, markersAtSelection );\n\n\t\tthis.fire( 'selection', { selection }, conversionApi );\n\n\t\tif ( !selection.isCollapsed ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( const marker of markersAtSelection ) {\n\t\t\tconst markerRange = marker.getRange();\n\n\t\t\tif ( !shouldMarkerChangeBeConverted( selection.getFirstPosition(), marker, conversionApi.mapper ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst data = {\n\t\t\t\titem: selection,\n\t\t\t\tmarkerName: marker.name,\n\t\t\t\tmarkerRange\n\t\t\t};\n\n\t\t\tif ( conversionApi.consumable.test( selection, 'addMarker:' + marker.name ) ) {\n\t\t\t\tthis.fire( 'addMarker:' + marker.name, data, conversionApi );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const key of selection.getAttributeKeys() ) {\n\t\t\tconst data = {\n\t\t\t\titem: selection,\n\t\t\t\trange: selection.getFirstRange(),\n\t\t\t\tattributeKey: key,\n\t\t\t\tattributeOldValue: null,\n\t\t\t\tattributeNewValue: selection.getAttribute( key )\n\t\t\t};\n\n\t\t\t// Do not fire event if the attribute has been consumed.\n\t\t\tif ( conversionApi.consumable.test( selection, 'attribute:' + data.attributeKey ) ) {\n\t\t\t\tthis.fire( 'attribute:' + data.attributeKey + ':$text', data, conversionApi );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Fires insertion conversion of a range of nodes.\n\t *\n\t * For each node in the range, {@link #event:insert `insert` event is fired}. For each attribute on each node,\n\t * {@link #event:attribute `attribute` event is fired}.\n\t *\n\t * @protected\n\t * @fires insert\n\t * @fires attribute\n\t * @param {module:engine/model/range~Range} range The inserted range.\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi The conversion API object.\n\t * @param {Object} [options]\n\t * @param {Boolean} [options.doNotAddConsumables=false] Whether the ModelConsumable should not get populated\n\t * for items in the provided range.\n\t */\n\t_convertInsert( range, conversionApi, options = {} ) {\n\t\tif ( !options.doNotAddConsumables ) {\n\t\t\t// Collect a list of things that can be consumed, consisting of nodes and their attributes.\n\t\t\tthis._addConsumablesForInsert( conversionApi.consumable, Array.from( range ) );\n\t\t}\n\n\t\t// Fire a separate insert event for each node and text fragment contained in the range.\n\t\tfor ( const data of Array.from( range.getWalker( { shallow: true } ) ).map( walkerValueToEventData ) ) {\n\t\t\tthis._testAndFire( 'insert', data, conversionApi );\n\t\t}\n\t}\n\n\t/**\n\t * Fires conversion of a single node removal. Fires {@link #event:remove remove event} with provided data.\n\t *\n\t * @protected\n\t * @param {module:engine/model/position~Position} position Position from which node was removed.\n\t * @param {Number} length Offset size of removed node.\n\t * @param {String} name Name of removed node.\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi The conversion API object.\n\t */\n\t_convertRemove( position, length, name, conversionApi ) {\n\t\tthis.fire( 'remove:' + name, { position, length }, conversionApi );\n\t}\n\n\t/**\n\t * Starts a conversion of an attribute change on a given `range`.\n\t *\n\t * For each node in the given `range`, {@link #event:attribute attribute event} is fired with the passed data.\n\t *\n\t * @protected\n\t * @fires attribute\n\t * @param {module:engine/model/range~Range} range Changed range.\n\t * @param {String} key Key of the attribute that has changed.\n\t * @param {*} oldValue Attribute value before the change or `null` if the attribute has not been set before.\n\t * @param {*} newValue New attribute value or `null` if the attribute has been removed.\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi The conversion API object.\n\t */\n\t_convertAttribute( range, key, oldValue, newValue, conversionApi ) {\n\t\t// Create a list with attributes to consume.\n\t\tthis._addConsumablesForRange( conversionApi.consumable, range, `attribute:${ key }` );\n\n\t\t// Create a separate attribute event for each node in the range.\n\t\tfor ( const value of range ) {\n\t\t\tconst data = {\n\t\t\t\titem: value.item,\n\t\t\t\trange: Range._createFromPositionAndShift( value.previousPosition, value.length ),\n\t\t\t\tattributeKey: key,\n\t\t\t\tattributeOldValue: oldValue,\n\t\t\t\tattributeNewValue: newValue\n\t\t\t};\n\n\t\t\tthis._testAndFire( `attribute:${ key }`, data, conversionApi );\n\t\t}\n\t}\n\n\t/**\n\t * Fires re-insertion conversion (with a `reconversion` flag passed to `insert` events)\n\t * of a range of elements (only elements on the range depth, without children).\n\t *\n\t * For each node in the range on its depth (without children), {@link #event:insert `insert` event} is fired.\n\t * For each attribute on each node, {@link #event:attribute `attribute` event} is fired.\n\t *\n\t * @protected\n\t * @fires insert\n\t * @fires attribute\n\t * @param {module:engine/model/range~Range} range The range to reinsert.\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi The conversion API object.\n\t */\n\t_convertReinsert( range, conversionApi ) {\n\t\t// Convert the elements - without converting children.\n\t\tconst walkerValues = Array.from( range.getWalker( { shallow: true } ) );\n\n\t\t// Collect a list of things that can be consumed, consisting of nodes and their attributes.\n\t\tthis._addConsumablesForInsert( conversionApi.consumable, walkerValues );\n\n\t\t// Fire a separate insert event for each node and text fragment contained shallowly in the range.\n\t\tfor ( const data of walkerValues.map( walkerValueToEventData ) ) {\n\t\t\tthis._testAndFire( 'insert', { ...data, reconversion: true }, conversionApi );\n\t\t}\n\t}\n\n\t/**\n\t * Converts the added marker. Fires the {@link #event:addMarker `addMarker`} event for each item\n\t * in the marker's range. If the range is collapsed, a single event is dispatched. See the event description for more details.\n\t *\n\t * @protected\n\t * @fires addMarker\n\t * @param {String} markerName Marker name.\n\t * @param {module:engine/model/range~Range} markerRange The marker range.\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi The conversion API object.\n\t */\n\t_convertMarkerAdd( markerName, markerRange, conversionApi ) {\n\t\t// Do not convert if range is in graveyard.\n\t\tif ( markerRange.root.rootName == '$graveyard' ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// In markers' case, event name == consumable name.\n\t\tconst eventName = 'addMarker:' + markerName;\n\n\t\t//\n\t\t// First, fire an event for the whole marker.\n\t\t//\n\t\tconversionApi.consumable.add( markerRange, eventName );\n\n\t\tthis.fire( eventName, { markerName, markerRange }, conversionApi );\n\n\t\t//\n\t\t// Do not fire events for each item inside the range if the range got consumed.\n\t\t// Also consume the whole marker consumable if it wasn't consumed.\n\t\t//\n\t\tif ( !conversionApi.consumable.consume( markerRange, eventName ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t//\n\t\t// Then, fire an event for each item inside the marker range.\n\t\t//\n\t\tthis._addConsumablesForRange( conversionApi.consumable, markerRange, eventName );\n\n\t\tfor ( const item of markerRange.getItems() ) {\n\t\t\t// Do not fire event for already consumed items.\n\t\t\tif ( !conversionApi.consumable.test( item, eventName ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst data = { item, range: Range._createOn( item ), markerName, markerRange };\n\n\t\t\tthis.fire( eventName, data, conversionApi );\n\t\t}\n\t}\n\n\t/**\n\t * Fires the conversion of the marker removal. Fires the {@link #event:removeMarker `removeMarker`} event with the provided data.\n\t *\n\t * @protected\n\t * @fires removeMarker\n\t * @param {String} markerName Marker name.\n\t * @param {module:engine/model/range~Range} markerRange The marker range.\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi The conversion API object.\n\t */\n\t_convertMarkerRemove( markerName, markerRange, conversionApi ) {\n\t\t// Do not convert if range is in graveyard.\n\t\tif ( markerRange.root.rootName == '$graveyard' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fire( 'removeMarker:' + markerName, { markerName, markerRange }, conversionApi );\n\t}\n\n\t/**\n\t * Fires the reduction of changes buffered in the {@link module:engine/model/differ~Differ `Differ`}.\n\t *\n\t * Features can replace selected {@link module:engine/model/differ~DiffItem `DiffItem`}s with `reinsert` entries to trigger\n\t * reconversion. The {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n\t * `DowncastHelpers.elementToStructure()`} is using this event to trigger reconversion.\n\t *\n\t * @private\n\t * @fires reduceChanges\n\t * @param {Iterable.<module:engine/model/differ~DiffItem>} changes\n\t * @returns {Iterable.<module:engine/model/differ~DiffItem>}\n\t */\n\t_reduceChanges( changes ) {\n\t\tconst data = { changes };\n\n\t\tthis.fire( 'reduceChanges', data );\n\n\t\treturn data.changes;\n\t}\n\n\t/**\n\t * Populates provided {@link module:engine/conversion/modelconsumable~ModelConsumable} with values to consume from a given range,\n\t * assuming that the range has just been inserted to the model.\n\t *\n\t * @private\n\t * @param {module:engine/conversion/modelconsumable~ModelConsumable} consumable The consumable.\n\t * @param {Iterable.<module:engine/model/treewalker~TreeWalkerValue>} walkerValues The walker values for the inserted range.\n\t * @returns {module:engine/conversion/modelconsumable~ModelConsumable} The values to consume.\n\t */\n\t_addConsumablesForInsert( consumable, walkerValues ) {\n\t\tfor ( const value of walkerValues ) {\n\t\t\tconst item = value.item;\n\n\t\t\t// Add consumable if it wasn't there yet.\n\t\t\tif ( consumable.test( item, 'insert' ) === null ) {\n\t\t\t\tconsumable.add( item, 'insert' );\n\n\t\t\t\tfor ( const key of item.getAttributeKeys() ) {\n\t\t\t\t\tconsumable.add( item, 'attribute:' + key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn consumable;\n\t}\n\n\t/**\n\t * Populates provided {@link module:engine/conversion/modelconsumable~ModelConsumable} with values to consume for a given range.\n\t *\n\t * @private\n\t * @param {module:engine/conversion/modelconsumable~ModelConsumable} consumable The consumable.\n\t * @param {module:engine/model/range~Range} range The affected range.\n\t * @param {String} type Consumable type.\n\t * @returns {module:engine/conversion/modelconsumable~ModelConsumable} The values to consume.\n\t */\n\t_addConsumablesForRange( consumable, range, type ) {\n\t\tfor ( const item of range.getItems() ) {\n\t\t\tconsumable.add( item, type );\n\t\t}\n\n\t\treturn consumable;\n\t}\n\n\t/**\n\t * Populates provided {@link module:engine/conversion/modelconsumable~ModelConsumable} with selection consumable values.\n\t *\n\t * @private\n\t * @param {module:engine/conversion/modelconsumable~ModelConsumable} consumable The consumable.\n\t * @param {module:engine/model/selection~Selection} selection The selection to create the consumable from.\n\t * @param {Iterable.<module:engine/model/markercollection~Marker>} markers Markers that contain the selection.\n\t * @returns {module:engine/conversion/modelconsumable~ModelConsumable} The values to consume.\n\t */\n\t_addConsumablesForSelection( consumable, selection, markers ) {\n\t\tconsumable.add( selection, 'selection' );\n\n\t\tfor ( const marker of markers ) {\n\t\t\tconsumable.add( selection, 'addMarker:' + marker.name );\n\t\t}\n\n\t\tfor ( const key of selection.getAttributeKeys() ) {\n\t\t\tconsumable.add( selection, 'attribute:' + key );\n\t\t}\n\n\t\treturn consumable;\n\t}\n\n\t/**\n\t * Tests whether given event wasn't already fired and if so, fires it.\n\t *\n\t * @private\n\t * @fires insert\n\t * @fires attribute\n\t * @param {String} type Event type.\n\t * @param {Object} data Event data.\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi The conversion API object.\n\t */\n\t_testAndFire( type, data, conversionApi ) {\n\t\tconst eventName = getEventName( type, data );\n\t\tconst itemKey = data.item.is( '$textProxy' ) ? conversionApi.consumable._getSymbolForTextProxy( data.item ) : data.item;\n\n\t\tconst eventsFiredForConversion = this._firedEventsMap.get( conversionApi );\n\t\tconst eventsFiredForItem = eventsFiredForConversion.get( itemKey );\n\n\t\tif ( !eventsFiredForItem ) {\n\t\t\teventsFiredForConversion.set( itemKey, new Set( [ eventName ] ) );\n\t\t} else if ( !eventsFiredForItem.has( eventName ) ) {\n\t\t\teventsFiredForItem.add( eventName );\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fire( eventName, data, conversionApi );\n\t}\n\n\t/**\n\t * Fires not already fired events for setting attributes on just inserted item.\n\t *\n\t * @private\n\t * @param {module:engine/model/item~Item} item The model item to convert attributes for.\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi The conversion API object.\n\t */\n\t_testAndFireAddAttributes( item, conversionApi ) {\n\t\tconst data = {\n\t\t\titem,\n\t\t\trange: Range._createOn( item )\n\t\t};\n\n\t\tfor ( const key of data.item.getAttributeKeys() ) {\n\t\t\tdata.attributeKey = key;\n\t\t\tdata.attributeOldValue = null;\n\t\t\tdata.attributeNewValue = data.item.getAttribute( key );\n\n\t\t\tthis._testAndFire( `attribute:${ key }`, data, conversionApi );\n\t\t}\n\t}\n\n\t/**\n\t * Builds an instance of the {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi} from a template and a given\n\t * {@link module:engine/view/downcastwriter~DowncastWriter `DowncastWriter`} and options object.\n\t *\n\t * @private\n\t * @param {module:engine/view/downcastwriter~DowncastWriter} writer View writer that should be used to modify the view document.\n\t * @param {Set.<module:engine/model/element~Element>} [refreshedItems] A set of model elements that should not reuse their\n\t * previous view representations.\n\t * @param {Object} [options] Optional options passed to `convertionApi.options`.\n\t * @return {module:engine/conversion/downcastdispatcher~DowncastConversionApi} The conversion API object.\n\t */\n\t_createConversionApi( writer, refreshedItems = new Set(), options = {} ) {\n\t\tconst conversionApi = {\n\t\t\t...this._conversionApi,\n\t\t\tconsumable: new Consumable(),\n\t\t\twriter,\n\t\t\toptions,\n\t\t\tconvertItem: item => this._convertInsert( Range._createOn( item ), conversionApi ),\n\t\t\tconvertChildren: element => this._convertInsert( Range._createIn( element ), conversionApi, { doNotAddConsumables: true } ),\n\t\t\tconvertAttributes: item => this._testAndFireAddAttributes( item, conversionApi ),\n\t\t\tcanReuseView: viewElement => !refreshedItems.has( conversionApi.mapper.toModelElement( viewElement ) )\n\t\t};\n\n\t\tthis._firedEventsMap.set( conversionApi, new Map() );\n\n\t\treturn conversionApi;\n\t}\n\n\t/**\n\t * Fired to enable reducing (transforming) changes buffered in the {@link module:engine/model/differ~Differ `Differ`} before\n\t * {@link #convertChanges `convertChanges()`} will fire any conversion events.\n\t *\n\t * For instance, a feature can replace selected {@link module:engine/model/differ~DiffItem `DiffItem`}s with a `reinsert` entry\n\t * to trigger reconversion of an element when e.g. its attribute has changes.\n\t * The {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n\t * `DowncastHelpers.elementToStructure()`} helper is using this event to trigger reconversion of an element when the element,\n\t * its attributes or direct children changed.\n\t *\n\t * @param {Object} data\n\t * @param {Iterable.<module:engine/model/differ~DiffItem>} data.changes A buffered changes to get reduced.\n\t * @event reduceChanges\n\t */\n\n\t/**\n\t * Fired for inserted nodes.\n\t *\n\t * `insert` is a namespace for a class of events. Names of actually called events follow this pattern:\n\t * `insert:name`. `name` is either `'$text'`, when {@link module:engine/model/text~Text a text node} has been inserted,\n\t * or {@link module:engine/model/element~Element#name name} of inserted element.\n\t *\n\t * This way, the listeners can either listen to a general `insert` event or specific event (for example `insert:paragraph`).\n\t *\n\t * @event insert\n\t * @param {Object} data Additional information about the change.\n\t * @param {module:engine/model/item~Item} data.item The inserted item.\n\t * @param {module:engine/model/range~Range} data.range Range spanning over inserted item.\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi Conversion interface\n\t * to be used by callback, passed in the `DowncastDispatcher` constructor.\n\t */\n\n\t/**\n\t * Fired for removed nodes.\n\t *\n\t * `remove` is a namespace for a class of events. Names of actually called events follow this pattern:\n\t * `remove:name`. `name` is either `'$text'`, when a {@link module:engine/model/text~Text a text node} has been removed,\n\t * or the {@link module:engine/model/element~Element#name name} of removed element.\n\t *\n\t * This way, listeners can either listen to a general `remove` event or specific event (for example `remove:paragraph`).\n\t *\n\t * @event remove\n\t * @param {Object} data Additional information about the change.\n\t * @param {module:engine/model/position~Position} data.position Position from which the node has been removed.\n\t * @param {Number} data.length Offset size of the removed node.\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi Conversion interface\n\t * to be used by callback, passed in `DowncastDispatcher` constructor.\n\t */\n\n\t/**\n\t * Fired in the following cases:\n\t *\n\t * * when an attribute has been added, changed, or removed from a node,\n\t * * when a node with an attribute is inserted,\n\t * * when a collapsed model selection attribute is converted.\n\t *\n\t * `attribute` is a namespace for a class of events. Names of actually called events follow this pattern:\n\t * `attribute:attributeKey:name`. `attributeKey` is the key of added/changed/removed attribute.\n\t * `name` is either `'$text'` if change was on {@link module:engine/model/text~Text a text node},\n\t * or the {@link module:engine/model/element~Element#name name} of element which attribute has changed.\n\t *\n\t * This way listeners can either listen to a general `attribute:bold` event or specific event (for example `attribute:src:imageBlock`).\n\t *\n\t * @event attribute\n\t * @param {Object} data Additional information about the change.\n\t * @param {module:engine/model/item~Item|module:engine/model/documentselection~DocumentSelection} data.item Changed item\n\t * or converted selection.\n\t * @param {module:engine/model/range~Range} data.range Range spanning over changed item or selection range.\n\t * @param {String} data.attributeKey Attribute key.\n\t * @param {*} data.attributeOldValue Attribute value before the change. This is `null` when selection attribute is converted.\n\t * @param {*} data.attributeNewValue New attribute value.\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi Conversion interface\n\t * to be used by callback, passed in `DowncastDispatcher` constructor.\n\t */\n\n\t/**\n\t * Fired for {@link module:engine/model/selection~Selection selection} changes.\n\t *\n\t * @event selection\n\t * @param {module:engine/model/selection~Selection} selection Selection that is converted.\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi Conversion interface\n\t * to be used by callback, passed in `DowncastDispatcher` constructor.\n\t */\n\n\t/**\n\t * Fired when a new marker is added to the model. Also fired when a collapsed model selection that is inside a marker is converted.\n\t *\n\t * `addMarker` is a namespace for a class of events. Names of actually called events follow this pattern:\n\t * `addMarker:markerName`. By specifying certain marker names, you can make the events even more gradual. For example,\n\t * if markers are named `foo:abc`, `foo:bar`, then it is possible to listen to `addMarker:foo` or `addMarker:foo:abc` and\n\t * `addMarker:foo:bar` events.\n\t *\n\t * If the marker range is not collapsed:\n\t *\n\t * * the event is fired for each item in the marker range one by one,\n\t * * `conversionApi.consumable` includes each item of the marker range and the consumable value is same as the event name.\n\t *\n\t * If the marker range is collapsed:\n\t *\n\t * * there is only one event,\n\t * * `conversionApi.consumable` includes marker range with the event name.\n\t *\n\t * If the selection inside a marker is converted:\n\t *\n\t * * there is only one event,\n\t * * `conversionApi.consumable` includes the selection instance with the event name.\n\t *\n\t * @event addMarker\n\t * @param {Object} data Additional information about the change.\n\t * @param {module:engine/model/item~Item|module:engine/model/selection~Selection} data.item Item inside the new marker or\n\t * the selection that is being converted.\n\t * @param {module:engine/model/range~Range} [data.range] Range spanning over converted item. Available only in marker conversion, if\n\t * the marker range was not collapsed.\n\t * @param {module:engine/model/range~Range} data.markerRange Marker range.\n\t * @param {String} data.markerName Marker name.\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi Conversion interface\n\t * to be used by callback, passed in `DowncastDispatcher` constructor.\n\t */\n\n\t/**\n\t * Fired when a marker is removed from the model.\n\t *\n\t * `removeMarker` is a namespace for a class of events. Names of actually called events follow this pattern:\n\t * `removeMarker:markerName`. By specifying certain marker names, you can make the events even more gradual. For example,\n\t * if markers are named `foo:abc`, `foo:bar`, then it is possible to listen to `removeMarker:foo` or `removeMarker:foo:abc` and\n\t * `removeMarker:foo:bar` events.\n\t *\n\t * @event removeMarker\n\t * @param {Object} data Additional information about the change.\n\t * @param {module:engine/model/range~Range} data.markerRange Marker range.\n\t * @param {String} data.markerName Marker name.\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi Conversion interface\n\t * to be used by callback, passed in `DowncastDispatcher` constructor.\n\t */\n}\n\nmix( DowncastDispatcher, EmitterMixin );\n\n// Helper function, checks whether change of `marker` at `modelPosition` should be converted. Marker changes are not\n// converted if they happen inside an element with custom conversion method.\n//\n// @param {module:engine/model/position~Position} modelPosition\n// @param {module:engine/model/markercollection~Marker} marker\n// @param {module:engine/conversion/mapper~Mapper} mapper\n// @returns {Boolean}\nfunction shouldMarkerChangeBeConverted( modelPosition, marker, mapper ) {\n\tconst range = marker.getRange();\n\tconst ancestors = Array.from( modelPosition.getAncestors() );\n\tancestors.shift(); // Remove root element. It cannot be passed to `model.Range#containsItem`.\n\tancestors.reverse();\n\n\tconst hasCustomHandling = ancestors.some( element => {\n\t\tif ( range.containsItem( element ) ) {\n\t\t\tconst viewElement = mapper.toViewElement( element );\n\n\t\t\treturn !!viewElement.getCustomProperty( 'addHighlight' );\n\t\t}\n\t} );\n\n\treturn !hasCustomHandling;\n}\n\nfunction getEventName( type, data ) {\n\tconst name = data.item.name || '$text';\n\n\treturn `${ type }:${ name }`;\n}\n\nfunction walkerValueToEventData( value ) {\n\tconst item = value.item;\n\tconst itemRange = Range._createFromPositionAndShift( value.previousPosition, value.length );\n\n\treturn {\n\t\titem,\n\t\trange: itemRange\n\t};\n}\n\n/**\n * Conversion interface that is registered for given {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}\n * and is passed as one of parameters when {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher dispatcher}\n * fires its events.\n *\n * @interface module:engine/conversion/downcastdispatcher~DowncastConversionApi\n */\n\n/**\n * The {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher} instance.\n *\n * @member {module:engine/conversion/downcastdispatcher~DowncastDispatcher} #dispatcher\n */\n\n/**\n * Stores the information about what parts of a processed model item are still waiting to be handled. After a piece of a model item was\n * converted, an appropriate consumable value should be {@link module:engine/conversion/modelconsumable~ModelConsumable#consume consumed}.\n *\n * @member {module:engine/conversion/modelconsumable~ModelConsumable} #consumable\n */\n\n/**\n * The {@link module:engine/conversion/mapper~Mapper} instance.\n *\n * @member {module:engine/conversion/mapper~Mapper} #mapper\n */\n\n/**\n * The {@link module:engine/model/schema~Schema} instance set for the model that is downcast.\n *\n * @member {module:engine/model/schema~Schema} #schema\n */\n\n/**\n * The {@link module:engine/view/downcastwriter~DowncastWriter} instance used to manipulate the data during conversion.\n *\n * @member {module:engine/view/downcastwriter~DowncastWriter} #writer\n */\n\n/**\n * Triggers conversion of a specified item.\n * This conversion is triggered within (as a separate process of) the parent conversion.\n *\n * @method #convertItem\n * @param {module:engine/model/item~Item} item The model item to trigger nested insert conversion on.\n */\n\n/**\n * Triggers conversion of children of a specified element.\n *\n * @method #convertChildren\n * @param {module:engine/model/element~Element} element The model element to trigger children insert conversion on.\n */\n\n/**\n * Triggers conversion of attributes of a specified item.\n *\n * @method #convertAttributes\n * @param {module:engine/model/item~Item} item The model item to trigger attribute conversion on.\n */\n\n/**\n * An object with an additional configuration which can be used during the conversion process. Available only for data downcast conversion.\n *\n * @member {Object} #options\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/selection\n */\n\nimport Position from './position';\nimport Node from './node';\nimport Range from './range';\nimport EmitterMixin from '@ckeditor/ckeditor5-utils/src/emittermixin';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\nimport isIterable from '@ckeditor/ckeditor5-utils/src/isiterable';\n\n/**\n * Selection is a set of {@link module:engine/model/range~Range ranges}. It has a direction specified by its\n * {@link module:engine/model/selection~Selection#anchor anchor} and {@link module:engine/model/selection~Selection#focus focus}\n * (it can be {@link module:engine/model/selection~Selection#isBackward forward or backward}).\n * Additionally, selection may have its own attributes (think – whether text typed in in this selection\n * should have those attributes – e.g. whether you type a bolded text).\n *\n * @mixes module:utils/emittermixin~EmitterMixin\n */\nexport default class Selection {\n\t/**\n\t * Creates a new selection instance based on the given {@link module:engine/model/selection~Selectable selectable}\n\t * or creates an empty selection if no arguments were passed.\n\t *\n\t *\t\t// Creates empty selection without ranges.\n\t *\t\tconst selection = writer.createSelection();\n\t *\n\t *\t\t// Creates selection at the given range.\n\t *\t\tconst range = writer.createRange( start, end );\n\t *\t\tconst selection = writer.createSelection( range );\n\t *\n\t *\t\t// Creates selection at the given ranges\n\t *\t\tconst ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t *\t\tconst selection = writer.createSelection( ranges );\n\t *\n\t *\t\t// Creates selection from the other selection.\n\t *\t\t// Note: It doesn't copies selection attributes.\n\t *\t\tconst otherSelection = writer.createSelection();\n\t *\t\tconst selection = writer.createSelection( otherSelection );\n\t *\n\t *\t\t// Creates selection from the given document selection.\n\t *\t\t// Note: It doesn't copies selection attributes.\n\t *\t\tconst documentSelection = model.document.selection;\n\t *\t\tconst selection = writer.createSelection( documentSelection );\n\t *\n\t *\t\t// Creates selection at the given position.\n\t *\t\tconst position = writer.createPositionFromPath( root, path );\n\t *\t\tconst selection = writer.createSelection( position );\n\t *\n\t *\t\t// Creates selection at the given offset in the given element.\n\t *\t\tconst paragraph = writer.createElement( 'paragraph' );\n\t *\t\tconst selection = writer.createSelection( paragraph, offset );\n\t *\n\t *\t\t// Creates a range inside an {@link module:engine/model/element~Element element} which starts before the\n\t *\t\t// first child of that element and ends after the last child of that element.\n\t *\t\tconst selection = writer.createSelection( paragraph, 'in' );\n\t *\n\t *\t\t// Creates a range on an {@link module:engine/model/item~Item item} which starts before the item and ends\n\t *\t\t// just after the item.\n\t *\t\tconst selection = writer.createSelection( paragraph, 'on' );\n\t *\n\t * Selection's constructor allow passing additional options (`'backward'`) as the last argument.\n\t *\n\t *\t\t// Creates backward selection.\n\t *\t\tconst selection = writer.createSelection( range, { backward: true } );\n\t *\n\t * @param {module:engine/model/selection~Selectable} [selectable]\n\t * @param {Number|'before'|'end'|'after'|'on'|'in'} [placeOrOffset] Sets place or offset of the selection.\n\t * @param {Object} [options]\n\t * @param {Boolean} [options.backward] Sets this selection instance to be backward.\n\t */\n\tconstructor( selectable, placeOrOffset, options ) {\n\t\t/**\n\t\t * Specifies whether the last added range was added as a backward or forward range.\n\t\t *\n\t\t * @private\n\t\t * @type {Boolean}\n\t\t */\n\t\tthis._lastRangeBackward = false;\n\n\t\t/**\n\t\t * Stores selection ranges.\n\t\t *\n\t\t * @protected\n\t\t * @type {Array.<module:engine/model/range~Range>}\n\t\t */\n\t\tthis._ranges = [];\n\n\t\t/**\n\t\t * List of attributes set on current selection.\n\t\t *\n\t\t * @protected\n\t\t * @type {Map.<String,*>}\n\t\t */\n\t\tthis._attrs = new Map();\n\n\t\tif ( selectable ) {\n\t\t\tthis.setTo( selectable, placeOrOffset, options );\n\t\t}\n\t}\n\n\t/**\n\t * Selection anchor. Anchor is the position from which the selection was started. If a user is making a selection\n\t * by dragging the mouse, the anchor is where the user pressed the mouse button (the beginning of the selection).\n\t *\n\t * Anchor and {@link #focus} define the direction of the selection, which is important\n\t * when expanding/shrinking selection. The focus moves, while the anchor should remain in the same place.\n\t *\n\t * Anchor is always set to the {@link module:engine/model/range~Range#start start} or\n\t * {@link module:engine/model/range~Range#end end} position of the last of selection's ranges. Whether it is\n\t * the `start` or `end` depends on the specified `options.backward`. See the {@link #setTo `setTo()`} method.\n\t *\n\t * May be set to `null` if there are no ranges in the selection.\n\t *\n\t * @see #focus\n\t * @readonly\n\t * @type {module:engine/model/position~Position|null}\n\t */\n\tget anchor() {\n\t\tif ( this._ranges.length > 0 ) {\n\t\t\tconst range = this._ranges[ this._ranges.length - 1 ];\n\n\t\t\treturn this._lastRangeBackward ? range.end : range.start;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Selection focus. Focus is the position where the selection ends. If a user is making a selection\n\t * by dragging the mouse, the focus is where the mouse cursor is.\n\t *\n\t * May be set to `null` if there are no ranges in the selection.\n\t *\n\t * @see #anchor\n\t * @readonly\n\t * @type {module:engine/model/position~Position|null}\n\t */\n\tget focus() {\n\t\tif ( this._ranges.length > 0 ) {\n\t\t\tconst range = this._ranges[ this._ranges.length - 1 ];\n\n\t\t\treturn this._lastRangeBackward ? range.start : range.end;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Whether the selection is collapsed. Selection is collapsed when there is exactly one range in it\n\t * and it is collapsed.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isCollapsed() {\n\t\tconst length = this._ranges.length;\n\n\t\tif ( length === 1 ) {\n\t\t\treturn this._ranges[ 0 ].isCollapsed;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the number of ranges in the selection.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget rangeCount() {\n\t\treturn this._ranges.length;\n\t}\n\n\t/**\n\t * Specifies whether the selection's {@link #focus} precedes the selection's {@link #anchor}.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isBackward() {\n\t\treturn !this.isCollapsed && this._lastRangeBackward;\n\t}\n\n\t/**\n\t * Checks whether this selection is equal to the given selection. Selections are equal if they have the same directions,\n\t * the same number of ranges and all ranges from one selection equal to ranges from the another selection.\n\t *\n\t * @param {module:engine/model/selection~Selection|module:engine/model/documentselection~DocumentSelection} otherSelection\n\t * Selection to compare with.\n\t * @returns {Boolean} `true` if selections are equal, `false` otherwise.\n\t */\n\tisEqual( otherSelection ) {\n\t\tif ( this.rangeCount != otherSelection.rangeCount ) {\n\t\t\treturn false;\n\t\t} else if ( this.rangeCount === 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( !this.anchor.isEqual( otherSelection.anchor ) || !this.focus.isEqual( otherSelection.focus ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor ( const thisRange of this._ranges ) {\n\t\t\tlet found = false;\n\n\t\t\tfor ( const otherRange of otherSelection._ranges ) {\n\t\t\t\tif ( thisRange.isEqual( otherRange ) ) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !found ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns an iterable object that iterates over copies of selection ranges.\n\t *\n\t * @returns {Iterable.<module:engine/model/range~Range>}\n\t */\n\t* getRanges() {\n\t\tfor ( const range of this._ranges ) {\n\t\t\tyield new Range( range.start, range.end );\n\t\t}\n\t}\n\n\t/**\n\t * Returns a copy of the first range in the selection.\n\t * First range is the one which {@link module:engine/model/range~Range#start start} position\n\t * {@link module:engine/model/position~Position#isBefore is before} start position of all other ranges\n\t * (not to confuse with the first range added to the selection).\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t *\n\t * @returns {module:engine/model/range~Range|null}\n\t */\n\tgetFirstRange() {\n\t\tlet first = null;\n\n\t\tfor ( const range of this._ranges ) {\n\t\t\tif ( !first || range.start.isBefore( first.start ) ) {\n\t\t\t\tfirst = range;\n\t\t\t}\n\t\t}\n\n\t\treturn first ? new Range( first.start, first.end ) : null;\n\t}\n\n\t/**\n\t * Returns a copy of the last range in the selection.\n\t * Last range is the one which {@link module:engine/model/range~Range#end end} position\n\t * {@link module:engine/model/position~Position#isAfter is after} end position of all other ranges (not to confuse with the range most\n\t * recently added to the selection).\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t *\n\t * @returns {module:engine/model/range~Range|null}\n\t */\n\tgetLastRange() {\n\t\tlet last = null;\n\n\t\tfor ( const range of this._ranges ) {\n\t\t\tif ( !last || range.end.isAfter( last.end ) ) {\n\t\t\t\tlast = range;\n\t\t\t}\n\t\t}\n\n\t\treturn last ? new Range( last.start, last.end ) : null;\n\t}\n\n\t/**\n\t * Returns the first position in the selection.\n\t * First position is the position that {@link module:engine/model/position~Position#isBefore is before}\n\t * any other position in the selection.\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t *\n\t * @returns {module:engine/model/position~Position|null}\n\t */\n\tgetFirstPosition() {\n\t\tconst first = this.getFirstRange();\n\n\t\treturn first ? first.start.clone() : null;\n\t}\n\n\t/**\n\t * Returns the last position in the selection.\n\t * Last position is the position that {@link module:engine/model/position~Position#isAfter is after}\n\t * any other position in the selection.\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t *\n\t * @returns {module:engine/model/position~Position|null}\n\t */\n\tgetLastPosition() {\n\t\tconst lastRange = this.getLastRange();\n\n\t\treturn lastRange ? lastRange.end.clone() : null;\n\t}\n\n\t/**\n\t * Sets this selection's ranges and direction to the specified location based on the given\n\t * {@link module:engine/model/selection~Selectable selectable}.\n\t *\n\t *\t\t// Removes all selection's ranges.\n\t *\t\tselection.setTo( null );\n\t *\n\t *\t\t// Sets selection to the given range.\n\t *\t\tconst range = writer.createRange( start, end );\n\t *\t\tselection.setTo( range );\n\t *\n\t *\t\t// Sets selection to given ranges.\n\t *\t\tconst ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t *\t\tselection.setTo( ranges );\n\t *\n\t *\t\t// Sets selection to other selection.\n\t *\t\t// Note: It doesn't copies selection attributes.\n\t *\t\tconst otherSelection = writer.createSelection();\n\t *\t\tselection.setTo( otherSelection );\n\t *\n\t *\t\t// Sets selection to the given document selection.\n\t *\t\t// Note: It doesn't copies selection attributes.\n\t *\t\tconst documentSelection = new DocumentSelection( doc );\n\t *\t\tselection.setTo( documentSelection );\n\t *\n\t *\t\t// Sets collapsed selection at the given position.\n\t *\t\tconst position = writer.createPositionFromPath( root, path );\n\t *\t\tselection.setTo( position );\n\t *\n\t *\t\t// Sets collapsed selection at the position of the given node and an offset.\n\t *\t\tselection.setTo( paragraph, offset );\n\t *\n\t * Creates a range inside an {@link module:engine/model/element~Element element} which starts before the first child of\n \t * that element and ends after the last child of that element.\n\t *\n\t *\t\tselection.setTo( paragraph, 'in' );\n\t *\n\t * Creates a range on an {@link module:engine/model/item~Item item} which starts before the item and ends just after the item.\n\t *\n\t *\t\tselection.setTo( paragraph, 'on' );\n\t *\n\t * `Selection#setTo()`' method allow passing additional options (`backward`) as the last argument.\n\t *\n\t *\t\t// Sets backward selection.\n\t *\t\tconst selection = writer.createSelection( range, { backward: true } );\n\t *\n\t * @param {module:engine/model/selection~Selectable} selectable\n\t * @param {Number|'before'|'end'|'after'|'on'|'in'} [placeOrOffset] Sets place or offset of the selection.\n\t * @param {Object} [options]\n\t * @param {Boolean} [options.backward] Sets this selection instance to be backward.\n\t */\n\tsetTo( selectable, placeOrOffset, options ) {\n\t\tif ( selectable === null ) {\n\t\t\tthis._setRanges( [] );\n\t\t} else if ( selectable instanceof Selection ) {\n\t\t\tthis._setRanges( selectable.getRanges(), selectable.isBackward );\n\t\t} else if ( selectable && typeof selectable.getRanges == 'function' ) {\n\t\t\t// We assume that the selectable is a DocumentSelection.\n\t\t\t// It can't be imported here, because it would lead to circular imports.\n\t\t\tthis._setRanges( selectable.getRanges(), selectable.isBackward );\n\t\t} else if ( selectable instanceof Range ) {\n\t\t\tthis._setRanges( [ selectable ], !!placeOrOffset && !!placeOrOffset.backward );\n\t\t} else if ( selectable instanceof Position ) {\n\t\t\tthis._setRanges( [ new Range( selectable ) ] );\n\t\t} else if ( selectable instanceof Node ) {\n\t\t\tconst backward = !!options && !!options.backward;\n\t\t\tlet range;\n\n\t\t\tif ( placeOrOffset == 'in' ) {\n\t\t\t\trange = Range._createIn( selectable );\n\t\t\t} else if ( placeOrOffset == 'on' ) {\n\t\t\t\trange = Range._createOn( selectable );\n\t\t\t} else if ( placeOrOffset !== undefined ) {\n\t\t\t\trange = new Range( Position._createAt( selectable, placeOrOffset ) );\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * selection.setTo requires the second parameter when the first parameter is a node.\n\t\t\t\t *\n\t\t\t\t * @error model-selection-setto-required-second-parameter\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'model-selection-setto-required-second-parameter', [ this, selectable ] );\n\t\t\t}\n\n\t\t\tthis._setRanges( [ range ], backward );\n\t\t} else if ( isIterable( selectable ) ) {\n\t\t\t// We assume that the selectable is an iterable of ranges.\n\t\t\tthis._setRanges( selectable, placeOrOffset && !!placeOrOffset.backward );\n\t\t} else {\n\t\t\t/**\n\t\t\t * Cannot set the selection to the given place.\n\t\t\t *\n\t\t\t * Invalid parameters were specified when setting the selection. Common issues:\n\t\t\t *\n\t\t\t * * A {@link module:engine/model/textproxy~TextProxy} instance was passed instead of\n\t\t\t * a real {@link module:engine/model/text~Text}.\n\t\t\t * * View nodes were passed instead of model nodes.\n\t\t\t * * `null`/`undefined` was passed.\n\t\t\t *\n\t\t\t * @error model-selection-setto-not-selectable\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-selection-setto-not-selectable', [ this, selectable ] );\n\t\t}\n\t}\n\n\t/**\n\t * Replaces all ranges that were added to the selection with given array of ranges. Last range of the array\n\t * is treated like the last added range and is used to set {@link module:engine/model/selection~Selection#anchor} and\n\t * {@link module:engine/model/selection~Selection#focus}. Accepts a flag describing in which direction the selection is made.\n\t *\n\t * @protected\n\t * @fires change:range\n\t * @param {Iterable.<module:engine/model/range~Range>} newRanges Ranges to set.\n\t * @param {Boolean} [isLastBackward=false] Flag describing if last added range was selected forward - from start to end (`false`)\n\t * or backward - from end to start (`true`).\n\t */\n\t_setRanges( newRanges, isLastBackward = false ) {\n\t\tnewRanges = Array.from( newRanges );\n\n\t\t// Check whether there is any range in new ranges set that is different than all already added ranges.\n\t\tconst anyNewRange = newRanges.some( newRange => {\n\t\t\tif ( !( newRange instanceof Range ) ) {\n\t\t\t\t/**\n\t\t\t\t * Selection range set to an object that is not an instance of {@link module:engine/model/range~Range}.\n\t\t\t\t *\n\t\t\t\t * Only {@link module:engine/model/range~Range} instances can be used to set a selection.\n\t\t\t\t * Common mistakes leading to this error are:\n\t\t\t\t *\n\t\t\t\t * * using DOM `Range` object,\n\t\t\t\t * * incorrect CKEditor 5 installation with multiple `ckeditor5-engine` packages having different versions.\n\t\t\t\t *\n\t\t\t\t * @error model-selection-set-ranges-not-range\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'model-selection-set-ranges-not-range',\n\t\t\t\t\t[ this, newRanges ]\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn this._ranges.every( oldRange => {\n\t\t\t\treturn !oldRange.isEqual( newRange );\n\t\t\t} );\n\t\t} );\n\n\t\t// Don't do anything if nothing changed.\n\t\tif ( newRanges.length === this._ranges.length && !anyNewRange ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._removeAllRanges();\n\n\t\tfor ( const range of newRanges ) {\n\t\t\tthis._pushRange( range );\n\t\t}\n\n\t\tthis._lastRangeBackward = !!isLastBackward;\n\n\t\tthis.fire( 'change:range', { directChange: true } );\n\t}\n\n\t/**\n\t * Moves {@link module:engine/model/selection~Selection#focus} to the specified location.\n\t *\n\t * The location can be specified in the same form as\n\t * {@link module:engine/model/writer~Writer#createPositionAt writer.createPositionAt()} parameters.\n\t *\n\t * @fires change:range\n\t * @param {module:engine/model/item~Item|module:engine/model/position~Position} itemOrPosition\n\t * @param {Number|'end'|'before'|'after'} [offset] Offset or one of the flags. Used only when\n\t * first parameter is a {@link module:engine/model/item~Item model item}.\n\t */\n\tsetFocus( itemOrPosition, offset ) {\n\t\tif ( this.anchor === null ) {\n\t\t\t/**\n\t\t\t * Cannot set selection focus if there are no ranges in selection.\n\t\t\t *\n\t\t\t * @error model-selection-setfocus-no-ranges\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-selection-setfocus-no-ranges', [ this, itemOrPosition ] );\n\t\t}\n\n\t\tconst newFocus = Position._createAt( itemOrPosition, offset );\n\n\t\tif ( newFocus.compareWith( this.focus ) == 'same' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst anchor = this.anchor;\n\n\t\tif ( this._ranges.length ) {\n\t\t\tthis._popRange();\n\t\t}\n\n\t\tif ( newFocus.compareWith( anchor ) == 'before' ) {\n\t\t\tthis._pushRange( new Range( newFocus, anchor ) );\n\t\t\tthis._lastRangeBackward = true;\n\t\t} else {\n\t\t\tthis._pushRange( new Range( anchor, newFocus ) );\n\t\t\tthis._lastRangeBackward = false;\n\t\t}\n\n\t\tthis.fire( 'change:range', { directChange: true } );\n\t}\n\n\t/**\n\t * Gets an attribute value for given key or `undefined` if that attribute is not set on the selection.\n\t *\n\t * @param {String} key Key of attribute to look for.\n\t * @returns {*} Attribute value or `undefined`.\n\t */\n\tgetAttribute( key ) {\n\t\treturn this._attrs.get( key );\n\t}\n\n\t/**\n\t * Returns iterable that iterates over this selection's attributes.\n\t *\n\t * Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t *\n\t * @returns {Iterable.<*>}\n\t */\n\tgetAttributes() {\n\t\treturn this._attrs.entries();\n\t}\n\n\t/**\n\t * Returns iterable that iterates over this selection's attribute keys.\n\t *\n\t * @returns {Iterable.<String>}\n\t */\n\tgetAttributeKeys() {\n\t\treturn this._attrs.keys();\n\t}\n\n\t/**\n\t * Checks if the selection has an attribute for given key.\n\t *\n\t * @param {String} key Key of attribute to check.\n\t * @returns {Boolean} `true` if attribute with given key is set on selection, `false` otherwise.\n\t */\n\thasAttribute( key ) {\n\t\treturn this._attrs.has( key );\n\t}\n\n\t/**\n\t * Removes an attribute with given key from the selection.\n\t *\n\t * If given attribute was set on the selection, fires the {@link #event:change:range} event with\n\t * removed attribute key.\n\t *\n\t * @fires change:attribute\n\t * @param {String} key Key of attribute to remove.\n\t */\n\tremoveAttribute( key ) {\n\t\tif ( this.hasAttribute( key ) ) {\n\t\t\tthis._attrs.delete( key );\n\n\t\t\tthis.fire( 'change:attribute', { attributeKeys: [ key ], directChange: true } );\n\t\t}\n\t}\n\n\t/**\n\t * Sets attribute on the selection. If attribute with the same key already is set, it's value is overwritten.\n\t *\n\t * If the attribute value has changed, fires the {@link #event:change:range} event with\n\t * the attribute key.\n\t *\n\t * @fires change:attribute\n\t * @param {String} key Key of attribute to set.\n\t * @param {*} value Attribute value.\n\t */\n\tsetAttribute( key, value ) {\n\t\tif ( this.getAttribute( key ) !== value ) {\n\t\t\tthis._attrs.set( key, value );\n\n\t\t\tthis.fire( 'change:attribute', { attributeKeys: [ key ], directChange: true } );\n\t\t}\n\t}\n\n\t/**\n\t * Returns the selected element. {@link module:engine/model/element~Element Element} is considered as selected if there is only\n\t * one range in the selection, and that range contains exactly one element.\n\t * Returns `null` if there is no selected element.\n\t *\n\t * @returns {module:engine/model/element~Element|null}\n\t */\n\tgetSelectedElement() {\n\t\tif ( this.rangeCount !== 1 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this.getFirstRange().getContainedElement();\n\t}\n\n\t/**\n\t * Checks whether this object is of the given.\n\t *\n\t *\t\tselection.is( 'selection' ); // -> true\n\t *\t\tselection.is( 'model:selection' ); // -> true\n\t *\n\t *\t\tselection.is( 'view:selection' ); // -> false\n\t *\t\tselection.is( 'range' ); // -> false\n\t *\n\t * {@link module:engine/model/node~Node#is Check the entire list of model objects} which implement the `is()` method.\n\t *\n\t * @param {String} type\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === 'selection' || type === 'model:selection';\n\t}\n\n\t/**\n\t * Gets elements of type {@link module:engine/model/schema~Schema#isBlock \"block\"} touched by the selection.\n\t *\n\t * This method's result can be used for example to apply block styling to all blocks covered by this selection.\n\t *\n\t * **Note:** `getSelectedBlocks()` returns blocks that are nested in other non-block elements\n\t * but will not return blocks nested in other blocks.\n\t *\n\t * In this case the function will return exactly all 3 paragraphs (note: `<blockQuote>` is not a block itself):\n\t *\n\t *\t\t<paragraph>[a</paragraph>\n\t *\t\t<blockQuote>\n\t *\t\t\t<paragraph>b</paragraph>\n\t *\t\t</blockQuote>\n\t *\t\t<paragraph>c]d</paragraph>\n\t *\n\t * In this case the paragraph will also be returned, despite the collapsed selection:\n\t *\n\t *\t\t<paragraph>[]a</paragraph>\n\t *\n\t * In such a scenario, however, only blocks A, B & E will be returned as blocks C & D are nested in block B:\n\t *\n\t *\t\t[<blockA></blockA>\n\t *\t\t<blockB>\n\t *\t\t\t<blockC></blockC>\n\t *\t\t\t<blockD></blockD>\n\t *\t\t</blockB>\n\t *\t\t<blockE></blockE>]\n\t *\n\t * If the selection is inside a block all the inner blocks (A & B) are returned:\n\t *\n\t * \t\t<block>\n\t *\t\t\t<blockA>[a</blockA>\n\t * \t\t\t<blockB>b]</blockB>\n\t * \t\t</block>\n\t *\n\t * **Special case**: If a selection ends at the beginning of a block, that block is not returned as from user perspective\n\t * this block wasn't selected. See [#984](https://github.com/ckeditor/ckeditor5-engine/issues/984) for more details.\n\t *\n\t *\t\t<paragraph>[a</paragraph>\n\t *\t\t<paragraph>b</paragraph>\n\t *\t\t<paragraph>]c</paragraph> // this block will not be returned\n\t *\n\t * @returns {Iterable.<module:engine/model/element~Element>}\n\t */\n\t* getSelectedBlocks() {\n\t\tconst visited = new WeakSet();\n\n\t\tfor ( const range of this.getRanges() ) {\n\t\t\t// Get start block of range in case of a collapsed range.\n\t\t\tconst startBlock = getParentBlock( range.start, visited );\n\n\t\t\tif ( startBlock && isTopBlockInRange( startBlock, range ) ) {\n\t\t\t\tyield startBlock;\n\t\t\t}\n\n\t\t\tfor ( const value of range.getWalker() ) {\n\t\t\t\tconst block = value.item;\n\n\t\t\t\tif ( value.type == 'elementEnd' && isUnvisitedTopBlock( block, visited, range ) ) {\n\t\t\t\t\tyield block;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst endBlock = getParentBlock( range.end, visited );\n\n\t\t\t// #984. Don't return the end block if the range ends right at its beginning.\n\t\t\tif ( endBlock && !range.end.isTouching( Position._createAt( endBlock, 0 ) ) && isTopBlockInRange( endBlock, range ) ) {\n\t\t\t\tyield endBlock;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks whether the selection contains the entire content of the given element. This means that selection must start\n\t * at a position {@link module:engine/model/position~Position#isTouching touching} the element's start and ends at position\n\t * touching the element's end.\n\t *\n\t * By default, this method will check whether the entire content of the selection's current root is selected.\n\t * Useful to check if e.g. the user has just pressed <kbd>Ctrl</kbd> + <kbd>A</kbd>.\n\t *\n\t * @param {module:engine/model/element~Element} [element=this.anchor.root]\n\t * @returns {Boolean}\n\t */\n\tcontainsEntireContent( element = this.anchor.root ) {\n\t\tconst limitStartPosition = Position._createAt( element, 0 );\n\t\tconst limitEndPosition = Position._createAt( element, 'end' );\n\n\t\treturn limitStartPosition.isTouching( this.getFirstPosition() ) &&\n\t\t\tlimitEndPosition.isTouching( this.getLastPosition() );\n\t}\n\n\t/**\n\t * Adds given range to internal {@link #_ranges ranges array}. Throws an error\n\t * if given range is intersecting with any range that is already stored in this selection.\n\t *\n\t * @protected\n\t * @param {module:engine/model/range~Range} range Range to add.\n\t */\n\t_pushRange( range ) {\n\t\tthis._checkRange( range );\n\t\tthis._ranges.push( new Range( range.start, range.end ) );\n\t}\n\n\t/**\n\t * Checks if given range intersects with ranges that are already in the selection. Throws an error if it does.\n\t *\n\t * @protected\n\t * @param {module:engine/model/range~Range} range Range to check.\n\t */\n\t_checkRange( range ) {\n\t\tfor ( let i = 0; i < this._ranges.length; i++ ) {\n\t\t\tif ( range.isIntersecting( this._ranges[ i ] ) ) {\n\t\t\t\t/**\n\t\t\t\t * Trying to add a range that intersects with another range in the selection.\n\t\t\t\t *\n\t\t\t\t * @error model-selection-range-intersects\n\t\t\t\t * @param {module:engine/model/range~Range} addedRange Range that was added to the selection.\n\t\t\t\t * @param {module:engine/model/range~Range} intersectingRange Range in the selection that intersects with `addedRange`.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'model-selection-range-intersects',\n\t\t\t\t\t[ this, range ],\n\t\t\t\t\t{ addedRange: range, intersectingRange: this._ranges[ i ] }\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Deletes ranges from internal range array. Uses {@link #_popRange _popRange} to\n\t * ensure proper ranges removal.\n\t *\n\t * @protected\n\t */\n\t_removeAllRanges() {\n\t\twhile ( this._ranges.length > 0 ) {\n\t\t\tthis._popRange();\n\t\t}\n\t}\n\n\t/**\n\t * Removes most recently added range from the selection.\n\t *\n\t * @protected\n\t */\n\t_popRange() {\n\t\tthis._ranges.pop();\n\t}\n\n\t/**\n\t * Fired when selection range(s) changed.\n\t *\n\t * @event change:range\n\t * @param {Boolean} directChange In case of {@link module:engine/model/selection~Selection} class it is always set\n\t * to `true` which indicates that the selection change was caused by a direct use of selection's API.\n\t * The {@link module:engine/model/documentselection~DocumentSelection}, however, may change because its position\n\t * was directly changed through the {@link module:engine/model/writer~Writer writer} or because its position was\n\t * changed because the structure of the model has been changed (which means an indirect change).\n\t * The indirect change does not occur in case of normal (detached) selections because they are \"static\" (as \"not live\")\n\t * which mean that they are not updated once the document changes.\n\t */\n\n\t/**\n\t * Fired when selection attribute changed.\n\t *\n\t * @event change:attribute\n\t * @param {Boolean} directChange In case of {@link module:engine/model/selection~Selection} class it is always set\n\t * to `true` which indicates that the selection change was caused by a direct use of selection's API.\n\t * The {@link module:engine/model/documentselection~DocumentSelection}, however, may change because its attributes\n\t * were directly changed through the {@link module:engine/model/writer~Writer writer} or because its position was\n\t * changed in the model and its attributes were refreshed (which means an indirect change).\n\t * The indirect change does not occur in case of normal (detached) selections because they are \"static\" (as \"not live\")\n\t * which mean that they are not updated once the document changes.\n\t * @param {Array.<String>} attributeKeys Array containing keys of attributes that changed.\n\t */\n}\n\nmix( Selection, EmitterMixin );\n\n// Checks whether the given element extends $block in the schema and has a parent (is not a root).\n// Marks it as already visited.\nfunction isUnvisitedBlock( element, visited ) {\n\tif ( visited.has( element ) ) {\n\t\treturn false;\n\t}\n\n\tvisited.add( element );\n\n\treturn element.root.document.model.schema.isBlock( element ) && element.parent;\n}\n\n// Checks if the given element is a $block was not previously visited and is a top block in a range.\nfunction isUnvisitedTopBlock( element, visited, range ) {\n\treturn isUnvisitedBlock( element, visited ) && isTopBlockInRange( element, range );\n}\n\n// Finds the lowest element in position's ancestors which is a block.\n// It will search until first ancestor that is a limit element.\n// Marks all ancestors as already visited to not include any of them later on.\nfunction getParentBlock( position, visited ) {\n\tconst element = position.parent;\n\tconst schema = element.root.document.model.schema;\n\n\tconst ancestors = position.parent.getAncestors( { parentFirst: true, includeSelf: true } );\n\n\tlet hasParentLimit = false;\n\n\tconst block = ancestors.find( element => {\n\t\t// Stop searching after first parent node that is limit element.\n\t\tif ( hasParentLimit ) {\n\t\t\treturn false;\n\t\t}\n\n\t\thasParentLimit = schema.isLimit( element );\n\n\t\treturn !hasParentLimit && isUnvisitedBlock( element, visited );\n\t} );\n\n\t// Mark all ancestors of this position's parent, because find() might've stopped early and\n\t// the found block may be a child of another block.\n\tancestors.forEach( element => visited.add( element ) );\n\n\treturn block;\n}\n\n// Checks if the blocks is not nested in other block inside a range.\n//\n// @param {module:engine/model/element~Element} block Block to check.\n// @param {module:engine/model/range~Range} range Range to check.\nfunction isTopBlockInRange( block, range ) {\n\tconst parentBlock = findAncestorBlock( block );\n\n\tif ( !parentBlock ) {\n\t\treturn true;\n\t}\n\n\t// Add loose flag to check as parentRange can be equal to range.\n\tconst isParentInRange = range.containsRange( Range._createOn( parentBlock ), true );\n\n\treturn !isParentInRange;\n}\n\n// Returns first ancestor block of a node.\n//\n// @param {module:engine/model/node~Node} node\n// @returns {module:engine/model/node~Node|undefined}\nfunction findAncestorBlock( node ) {\n\tconst schema = node.root.document.model.schema;\n\n\tlet parent = node.parent;\n\n\twhile ( parent ) {\n\t\tif ( schema.isBlock( parent ) ) {\n\t\t\treturn parent;\n\t\t}\n\n\t\tparent = parent.parent;\n\t}\n}\n\n/**\n * An entity that is used to set selection.\n *\n * See also {@link module:engine/model/selection~Selection#setTo}\n *\n * @typedef {\n * module:engine/model/selection~Selection|\n * module:engine/model/documentselection~DocumentSelection|\n * module:engine/model/position~Position|\n * module:engine/model/range~Range|\n * module:engine/model/node~Node|\n * Iterable.<module:engine/model/range~Range>|\n * null\n * } module:engine/model/selection~Selectable\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/liverange\n */\n\nimport Range from './range';\nimport EmitterMixin from '@ckeditor/ckeditor5-utils/src/emittermixin';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\n\n/**\n * `LiveRange` is a type of {@link module:engine/model/range~Range Range}\n * that updates itself as {@link module:engine/model/document~Document document}\n * is changed through operations. It may be used as a bookmark.\n *\n * **Note:** Be very careful when dealing with `LiveRange`. Each `LiveRange` instance bind events that might\n * have to be unbound. Use {@link module:engine/model/liverange~LiveRange#detach detach} whenever you don't need `LiveRange` anymore.\n */\nexport default class LiveRange extends Range {\n\t/**\n\t * Creates a live range.\n\t *\n\t * @see module:engine/model/range~Range\n\t */\n\tconstructor( start, end ) {\n\t\tsuper( start, end );\n\n\t\tbindWithDocument.call( this );\n\t}\n\n\t/**\n\t * Unbinds all events previously bound by `LiveRange`. Use it whenever you don't need `LiveRange` instance\n\t * anymore (i.e. when leaving scope in which it was declared or before re-assigning variable that was\n\t * referring to it).\n\t */\n\tdetach() {\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Checks whether this object is of the given.\n\t *\n\t *\t\tliveRange.is( 'range' ); // -> true\n\t *\t\tliveRange.is( 'model:range' ); // -> true\n\t *\t\tliveRange.is( 'liveRange' ); // -> true\n\t *\t\tliveRange.is( 'model:liveRange' ); // -> true\n\t *\n\t *\t\tliveRange.is( 'view:range' ); // -> false\n\t *\t\tliveRange.is( 'documentSelection' ); // -> false\n\t *\n\t * {@link module:engine/model/node~Node#is Check the entire list of model objects} which implement the `is()` method.\n\t *\n\t * @param {String} type\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === 'liveRange' || type === 'model:liveRange' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n\t\t\ttype == 'range' || type === 'model:range';\n\t}\n\n\t/**\n\t * Creates a {@link module:engine/model/range~Range range instance} that is equal to this live range.\n\t *\n\t * @returns {module:engine/model/range~Range}\n\t */\n\ttoRange() {\n\t\treturn new Range( this.start, this.end );\n\t}\n\n\t/**\n\t * Creates a `LiveRange` instance that is equal to the given range.\n\t *\n\t * @param {module:engine/model/range~Range} range\n\t * @returns {module:engine/model/liverange~LiveRange}\n\t */\n\tstatic fromRange( range ) {\n\t\treturn new LiveRange( range.start, range.end );\n\t}\n\n\t/**\n\t * @see module:engine/model/range~Range._createIn\n\t * @static\n\t * @protected\n\t * @method module:engine/model/liverange~LiveRange._createIn\n\t * @param {module:engine/model/element~Element} element\n\t * @returns {module:engine/model/liverange~LiveRange}\n\t */\n\n\t/**\n\t * @see module:engine/model/range~Range._createOn\n\t * @static\n\t * @protected\n\t * @method module:engine/model/liverange~LiveRange._createOn\n\t * @param {module:engine/model/element~Element} element\n\t * @returns {module:engine/model/liverange~LiveRange}\n\t */\n\n\t/**\n\t * @see module:engine/model/range~Range._createFromPositionAndShift\n\t * @static\n\t * @protected\n\t * @method module:engine/model/liverange~LiveRange._createFromPositionAndShift\n\t * @param {module:engine/model/position~Position} position\n\t * @param {Number} shift\n\t * @returns {module:engine/model/liverange~LiveRange}\n\t */\n\n\t/**\n\t * Fired when `LiveRange` instance boundaries have changed due to changes in the\n\t * {@link module:engine/model/document~Document document}.\n\t *\n\t * @event change:range\n\t * @param {module:engine/model/range~Range} oldRange Range with start and end position equal to start and end position of this live\n\t * range before it got changed.\n\t * @param {Object} data Object with additional information about the change.\n\t * @param {module:engine/model/position~Position|null} data.deletionPosition Source position for remove and merge changes.\n\t * Available if the range was moved to the graveyard root, `null` otherwise.\n\t */\n\n\t/**\n\t * Fired when `LiveRange` instance boundaries have not changed after a change in {@link module:engine/model/document~Document document}\n\t * but the change took place inside the range, effectively changing its content.\n\t *\n\t * @event change:content\n\t * @param {module:engine/model/range~Range} range Range with start and end position equal to start and end position of\n\t * change range.\n\t * @param {Object} data Object with additional information about the change.\n\t * @param {null} data.deletionPosition Due to the nature of this event, this property is always set to `null`. It is passed\n\t * for compatibility with the {@link module:engine/model/liverange~LiveRange#event:change:range} event.\n\t */\n}\n\n// Binds this `LiveRange` to the {@link module:engine/model/document~Document document}\n// that owns this range's {@link module:engine/model/range~Range#root root}.\n//\n// @private\nfunction bindWithDocument() {\n\tthis.listenTo(\n\t\tthis.root.document.model,\n\t\t'applyOperation',\n\t\t( event, args ) => {\n\t\t\tconst operation = args[ 0 ];\n\n\t\t\tif ( !operation.isDocumentOperation ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttransform.call( this, operation );\n\t\t},\n\t\t{ priority: 'low' }\n\t);\n}\n\n// Updates this range accordingly to the updates applied to the model. Bases on change events.\n//\n// @private\n// @param {module:engine/model/operation/operation~Operation} operation Executed operation.\nfunction transform( operation ) {\n\t// Transform the range by the operation. Join the result ranges if needed.\n\tconst ranges = this.getTransformedByOperation( operation );\n\tconst result = Range._createFromRanges( ranges );\n\n\tconst boundariesChanged = !result.isEqual( this );\n\tconst contentChanged = doesOperationChangeRangeContent( this, operation );\n\n\tlet deletionPosition = null;\n\n\tif ( boundariesChanged ) {\n\t\t// If range boundaries have changed, fire `change:range` event.\n\t\t//\n\t\tif ( result.root.rootName == '$graveyard' ) {\n\t\t\t// If the range was moved to the graveyard root, set `deletionPosition`.\n\t\t\tif ( operation.type == 'remove' ) {\n\t\t\t\tdeletionPosition = operation.sourcePosition;\n\t\t\t} else {\n\t\t\t\t// Merge operation.\n\t\t\t\tdeletionPosition = operation.deletionPosition;\n\t\t\t}\n\t\t}\n\n\t\tconst oldRange = this.toRange();\n\n\t\tthis.start = result.start;\n\t\tthis.end = result.end;\n\n\t\tthis.fire( 'change:range', oldRange, { deletionPosition } );\n\t} else if ( contentChanged ) {\n\t\t// If range boundaries have not changed, but there was change inside the range, fire `change:content` event.\n\t\tthis.fire( 'change:content', this.toRange(), { deletionPosition } );\n\t}\n}\n\n// Checks whether given operation changes something inside the range (even if it does not change boundaries).\n//\n// @private\n// @param {module:engine/model/range~Range} range Range to check.\n// @param {module:engine/model/operation/operation~Operation} operation Executed operation.\n// @returns {Boolean}\nfunction doesOperationChangeRangeContent( range, operation ) {\n\tswitch ( operation.type ) {\n\t\tcase 'insert':\n\t\t\treturn range.containsPosition( operation.position );\n\t\tcase 'move':\n\t\tcase 'remove':\n\t\tcase 'reinsert':\n\t\tcase 'merge':\n\t\t\treturn range.containsPosition( operation.sourcePosition ) ||\n\t\t\t\trange.start.isEqual( operation.sourcePosition ) ||\n\t\t\t\trange.containsPosition( operation.targetPosition );\n\t\tcase 'split':\n\t\t\treturn range.containsPosition( operation.splitPosition ) || range.containsPosition( operation.insertionPosition );\n\t}\n\n\treturn false;\n}\n\nmix( LiveRange, EmitterMixin );\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/documentselection\n */\n\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\nimport EmitterMixin from '@ckeditor/ckeditor5-utils/src/emittermixin';\n\nimport Selection from './selection';\nimport LiveRange from './liverange';\nimport Text from './text';\nimport TextProxy from './textproxy';\nimport toMap from '@ckeditor/ckeditor5-utils/src/tomap';\nimport Collection from '@ckeditor/ckeditor5-utils/src/collection';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport uid from '@ckeditor/ckeditor5-utils/src/uid';\n\nconst storePrefix = 'selection:';\n\n/**\n * `DocumentSelection` is a special selection which is used as the\n * {@link module:engine/model/document~Document#selection document's selection}.\n * There can be only one instance of `DocumentSelection` per document.\n *\n * Document selection can only be changed by using the {@link module:engine/model/writer~Writer} instance\n * inside the {@link module:engine/model/model~Model#change `change()`} block, as it provides a secure way to modify model.\n *\n * `DocumentSelection` is automatically updated upon changes in the {@link module:engine/model/document~Document document}\n * to always contain valid ranges. Its attributes are inherited from the text unless set explicitly.\n *\n * Differences between {@link module:engine/model/selection~Selection} and `DocumentSelection` are:\n * * there is always a range in `DocumentSelection` - even if no ranges were added there is a \"default range\"\n * present in the selection,\n * * ranges added to this selection updates automatically when the document changes,\n * * attributes of `DocumentSelection` are updated automatically according to selection ranges.\n *\n * Since `DocumentSelection` uses {@link module:engine/model/liverange~LiveRange live ranges}\n * and is updated when {@link module:engine/model/document~Document document}\n * changes, it cannot be set on {@link module:engine/model/node~Node nodes}\n * that are inside {@link module:engine/model/documentfragment~DocumentFragment document fragment}.\n * If you need to represent a selection in document fragment,\n * use {@link module:engine/model/selection~Selection Selection class} instead.\n *\n * @mixes module:utils/emittermixin~EmitterMixin\n */\nexport default class DocumentSelection {\n\t/**\n\t * Creates an empty live selection for given {@link module:engine/model/document~Document}.\n\t *\n\t * @param {module:engine/model/document~Document} doc Document which owns this selection.\n\t */\n\tconstructor( doc ) {\n\t\t/**\n\t\t * Selection used internally by that class (`DocumentSelection` is a proxy to that selection).\n\t\t *\n\t\t * @protected\n\t\t */\n\t\tthis._selection = new LiveSelection( doc );\n\n\t\tthis._selection.delegate( 'change:range' ).to( this );\n\t\tthis._selection.delegate( 'change:attribute' ).to( this );\n\t\tthis._selection.delegate( 'change:marker' ).to( this );\n\t}\n\n\t/**\n\t * Returns whether the selection is collapsed. Selection is collapsed when there is exactly one range which is\n\t * collapsed.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isCollapsed() {\n\t\treturn this._selection.isCollapsed;\n\t}\n\n\t/**\n\t * Selection anchor. Anchor may be described as a position where the most recent part of the selection starts.\n\t * Together with {@link #focus} they define the direction of selection, which is important\n\t * when expanding/shrinking selection. Anchor is always {@link module:engine/model/range~Range#start start} or\n\t * {@link module:engine/model/range~Range#end end} position of the most recently added range.\n\t *\n\t * Is set to `null` if there are no ranges in selection.\n\t *\n\t * @see #focus\n\t * @readonly\n\t * @type {module:engine/model/position~Position|null}\n\t */\n\tget anchor() {\n\t\treturn this._selection.anchor;\n\t}\n\n\t/**\n\t * Selection focus. Focus is a position where the selection ends.\n\t *\n\t * Is set to `null` if there are no ranges in selection.\n\t *\n\t * @see #anchor\n\t * @readonly\n\t * @type {module:engine/model/position~Position|null}\n\t */\n\tget focus() {\n\t\treturn this._selection.focus;\n\t}\n\n\t/**\n\t * Returns number of ranges in selection.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget rangeCount() {\n\t\treturn this._selection.rangeCount;\n\t}\n\n\t/**\n\t * Describes whether `Documentselection` has own range(s) set, or if it is defaulted to\n\t * {@link module:engine/model/document~Document#_getDefaultRange document's default range}.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget hasOwnRange() {\n\t\treturn this._selection.hasOwnRange;\n\t}\n\n\t/**\n\t * Specifies whether the {@link #focus}\n\t * precedes {@link #anchor}.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isBackward() {\n\t\treturn this._selection.isBackward;\n\t}\n\n\t/**\n\t * Describes whether the gravity is overridden (using {@link module:engine/model/writer~Writer#overrideSelectionGravity}) or not.\n\t *\n\t * Note that the gravity remains overridden as long as will not be restored the same number of times as it was overridden.\n\t *\n\t * @readonly\n\t * @returns {Boolean}\n\t */\n\tget isGravityOverridden() {\n\t\treturn this._selection.isGravityOverridden;\n\t}\n\n\t/**\n\t * A collection of selection {@link module:engine/model/markercollection~Marker markers}.\n\t * Marker is a selection marker when selection range is inside the marker range.\n\t *\n\t * **Note**: Only markers from {@link ~DocumentSelection#observeMarkers observed markers groups} are collected.\n\t *\n\t * @readonly\n\t * @type {module:utils/collection~Collection}\n\t */\n\tget markers() {\n\t\treturn this._selection.markers;\n\t}\n\n\t/**\n\t * Used for the compatibility with the {@link module:engine/model/selection~Selection#isEqual} method.\n\t *\n\t * @protected\n\t */\n\tget _ranges() {\n\t\treturn this._selection._ranges;\n\t}\n\n\t/**\n\t * Returns an iterable that iterates over copies of selection ranges.\n\t *\n\t * @returns {Iterable.<module:engine/model/range~Range>}\n\t */\n\tgetRanges() {\n\t\treturn this._selection.getRanges();\n\t}\n\n\t/**\n\t * Returns the first position in the selection.\n\t * First position is the position that {@link module:engine/model/position~Position#isBefore is before}\n\t * any other position in the selection.\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t *\n\t * @returns {module:engine/model/position~Position|null}\n\t */\n\tgetFirstPosition() {\n\t\treturn this._selection.getFirstPosition();\n\t}\n\n\t/**\n\t * Returns the last position in the selection.\n\t * Last position is the position that {@link module:engine/model/position~Position#isAfter is after}\n\t * any other position in the selection.\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t *\n\t * @returns {module:engine/model/position~Position|null}\n\t */\n\tgetLastPosition() {\n\t\treturn this._selection.getLastPosition();\n\t}\n\n\t/**\n\t * Returns a copy of the first range in the selection.\n\t * First range is the one which {@link module:engine/model/range~Range#start start} position\n\t * {@link module:engine/model/position~Position#isBefore is before} start position of all other ranges\n\t * (not to confuse with the first range added to the selection).\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t *\n\t * @returns {module:engine/model/range~Range|null}\n\t */\n\tgetFirstRange() {\n\t\treturn this._selection.getFirstRange();\n\t}\n\n\t/**\n\t * Returns a copy of the last range in the selection.\n\t * Last range is the one which {@link module:engine/model/range~Range#end end} position\n\t * {@link module:engine/model/position~Position#isAfter is after} end position of all other ranges (not to confuse with the range most\n\t * recently added to the selection).\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t *\n\t * @returns {module:engine/model/range~Range|null}\n\t */\n\tgetLastRange() {\n\t\treturn this._selection.getLastRange();\n\t}\n\n\t/**\n\t * Gets elements of type {@link module:engine/model/schema~Schema#isBlock \"block\"} touched by the selection.\n\t *\n\t * This method's result can be used for example to apply block styling to all blocks covered by this selection.\n\t *\n\t * **Note:** `getSelectedBlocks()` returns blocks that are nested in other non-block elements\n\t * but will not return blocks nested in other blocks.\n\t *\n\t * In this case the function will return exactly all 3 paragraphs (note: `<blockQuote>` is not a block itself):\n\t *\n\t *\t\t<paragraph>[a</paragraph>\n\t *\t\t<blockQuote>\n\t *\t\t\t<paragraph>b</paragraph>\n\t *\t\t</blockQuote>\n\t *\t\t<paragraph>c]d</paragraph>\n\t *\n\t * In this case the paragraph will also be returned, despite the collapsed selection:\n\t *\n\t *\t\t<paragraph>[]a</paragraph>\n\t *\n\t * In such a scenario, however, only blocks A, B & E will be returned as blocks C & D are nested in block B:\n\t *\n\t *\t\t[<blockA></blockA>\n\t *\t\t<blockB>\n\t *\t\t\t<blockC></blockC>\n\t *\t\t\t<blockD></blockD>\n\t *\t\t</blockB>\n\t *\t\t<blockE></blockE>]\n\t *\n\t * If the selection is inside a block all the inner blocks (A & B) are returned:\n\t *\n\t * \t\t<block>\n\t *\t\t\t<blockA>[a</blockA>\n\t * \t\t\t<blockB>b]</blockB>\n\t * \t\t</block>\n\t *\n\t * **Special case**: If a selection ends at the beginning of a block, that block is not returned as from user perspective\n\t * this block wasn't selected. See [#984](https://github.com/ckeditor/ckeditor5-engine/issues/984) for more details.\n\t *\n\t *\t\t<paragraph>[a</paragraph>\n\t *\t\t<paragraph>b</paragraph>\n\t *\t\t<paragraph>]c</paragraph> // this block will not be returned\n\t *\n\t * @returns {Iterable.<module:engine/model/element~Element>}\n\t */\n\tgetSelectedBlocks() {\n\t\treturn this._selection.getSelectedBlocks();\n\t}\n\n\t/**\n\t * Returns the selected element. {@link module:engine/model/element~Element Element} is considered as selected if there is only\n\t * one range in the selection, and that range contains exactly one element.\n\t * Returns `null` if there is no selected element.\n\t *\n\t * @returns {module:engine/model/element~Element|null}\n\t */\n\tgetSelectedElement() {\n\t\treturn this._selection.getSelectedElement();\n\t}\n\n\t/**\n\t * Checks whether the selection contains the entire content of the given element. This means that selection must start\n\t * at a position {@link module:engine/model/position~Position#isTouching touching} the element's start and ends at position\n\t * touching the element's end.\n\t *\n\t * By default, this method will check whether the entire content of the selection's current root is selected.\n\t * Useful to check if e.g. the user has just pressed <kbd>Ctrl</kbd> + <kbd>A</kbd>.\n\t *\n\t * @param {module:engine/model/element~Element} [element=this.anchor.root]\n\t * @returns {Boolean}\n\t */\n\tcontainsEntireContent( element ) {\n\t\treturn this._selection.containsEntireContent( element );\n\t}\n\n\t/**\n\t * Unbinds all events previously bound by document selection.\n\t */\n\tdestroy() {\n\t\tthis._selection.destroy();\n\t}\n\n\t/**\n\t * Returns iterable that iterates over this selection's attribute keys.\n\t *\n\t * @returns {Iterable.<String>}\n\t */\n\tgetAttributeKeys() {\n\t\treturn this._selection.getAttributeKeys();\n\t}\n\n\t/**\n\t * Returns iterable that iterates over this selection's attributes.\n\t *\n\t * Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t *\n\t * @returns {Iterable.<*>}\n\t */\n\tgetAttributes() {\n\t\treturn this._selection.getAttributes();\n\t}\n\n\t/**\n\t * Gets an attribute value for given key or `undefined` if that attribute is not set on the selection.\n\t *\n\t * @param {String} key Key of attribute to look for.\n\t * @returns {*} Attribute value or `undefined`.\n\t */\n\tgetAttribute( key ) {\n\t\treturn this._selection.getAttribute( key );\n\t}\n\n\t/**\n\t * Checks if the selection has an attribute for given key.\n\t *\n\t * @param {String} key Key of attribute to check.\n\t * @returns {Boolean} `true` if attribute with given key is set on selection, `false` otherwise.\n\t */\n\thasAttribute( key ) {\n\t\treturn this._selection.hasAttribute( key );\n\t}\n\n\t/**\n\t * Refreshes selection attributes and markers according to the current position in the model.\n\t */\n\trefresh() {\n\t\tthis._selection._updateMarkers();\n\t\tthis._selection._updateAttributes( false );\n\t}\n\n\t/**\n\t * Registers a marker group prefix or a marker name to be collected in the\n\t * {@link ~DocumentSelection#markers selection markers collection}.\n\t *\n\t * See also {@link module:engine/model/markercollection~MarkerCollection#getMarkersGroup `MarkerCollection#getMarkersGroup()`}.\n\t *\n\t * @param {String} prefixOrName The marker group prefix or marker name.\n\t */\n\tobserveMarkers( prefixOrName ) {\n\t\tthis._selection.observeMarkers( prefixOrName );\n\t}\n\n\t/**\n\t * Checks whether this object is of the given type.\n\t *\n\t *\t\tselection.is( 'selection' ); // -> true\n\t *\t\tselection.is( 'documentSelection' ); // -> true\n\t *\t\tselection.is( 'model:selection' ); // -> true\n\t *\t\tselection.is( 'model:documentSelection' ); // -> true\n\t *\n\t *\t\tselection.is( 'view:selection' ); // -> false\n\t *\t\tselection.is( 'element' ); // -> false\n\t *\t\tselection.is( 'node' ); // -> false\n\t *\n\t * {@link module:engine/model/node~Node#is Check the entire list of model objects} which implement the `is()` method.\n\t *\n\t * @param {String} type\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === 'selection' ||\n\t\t\ttype == 'model:selection' ||\n\t\t\ttype == 'documentSelection' ||\n\t\t\ttype == 'model:documentSelection';\n\t}\n\n\t/**\n\t * Moves {@link module:engine/model/documentselection~DocumentSelection#focus} to the specified location.\n\t * Should be used only within the {@link module:engine/model/writer~Writer#setSelectionFocus} method.\n\t *\n\t * The location can be specified in the same form as\n\t * {@link module:engine/model/writer~Writer#createPositionAt writer.createPositionAt()} parameters.\n\t *\n\t * @see module:engine/model/writer~Writer#setSelectionFocus\n\t * @protected\n\t * @param {module:engine/model/item~Item|module:engine/model/position~Position} itemOrPosition\n\t * @param {Number|'end'|'before'|'after'} [offset] Offset or one of the flags. Used only when\n\t * first parameter is a {@link module:engine/model/item~Item model item}.\n\t */\n\t_setFocus( itemOrPosition, offset ) {\n\t\tthis._selection.setFocus( itemOrPosition, offset );\n\t}\n\n\t/**\n\t * Sets this selection's ranges and direction to the specified location based on the given\n\t * {@link module:engine/model/selection~Selectable selectable}.\n\t * Should be used only within the {@link module:engine/model/writer~Writer#setSelection} method.\n\t *\n\t * @see module:engine/model/writer~Writer#setSelection\n\t * @protected\n\t * @param {module:engine/model/selection~Selectable} selectable\n\t * @param {Number|'before'|'end'|'after'|'on'|'in'} [placeOrOffset] Sets place or offset of the selection.\n\t * @param {Object} [options]\n\t * @param {Boolean} [options.backward] Sets this selection instance to be backward.\n\t */\n\t_setTo( selectable, placeOrOffset, options ) {\n\t\tthis._selection.setTo( selectable, placeOrOffset, options );\n\t}\n\n\t/**\n\t * Sets attribute on the selection. If attribute with the same key already is set, it's value is overwritten.\n\t * Should be used only within the {@link module:engine/model/writer~Writer#setSelectionAttribute} method.\n\t *\n\t * @see module:engine/model/writer~Writer#setSelectionAttribute\n\t * @protected\n\t * @param {String} key Key of the attribute to set.\n\t * @param {*} value Attribute value.\n\t */\n\t_setAttribute( key, value ) {\n\t\tthis._selection.setAttribute( key, value );\n\t}\n\n\t/**\n\t * Removes an attribute with given key from the selection.\n\t * If the given attribute was set on the selection, fires the {@link module:engine/model/selection~Selection#event:change:range}\n\t * event with removed attribute key.\n\t * Should be used only within the {@link module:engine/model/writer~Writer#removeSelectionAttribute} method.\n\t *\n\t * @see module:engine/model/writer~Writer#removeSelectionAttribute\n\t * @protected\n\t * @param {String} key Key of the attribute to remove.\n\t */\n\t_removeAttribute( key ) {\n\t\tthis._selection.removeAttribute( key );\n\t}\n\n\t/**\n\t * Returns an iterable that iterates through all selection attributes stored in current selection's parent.\n\t *\n\t * @protected\n\t * @returns {Iterable.<*>}\n\t */\n\t_getStoredAttributes() {\n\t\treturn this._selection._getStoredAttributes();\n\t}\n\n\t/**\n\t * Temporarily changes the gravity of the selection from the left to the right.\n\t *\n\t * The gravity defines from which direction the selection inherits its attributes. If it's the default left\n\t * gravity, the selection (after being moved by the the user) inherits attributes from its left hand side.\n\t * This method allows to temporarily override this behavior by forcing the gravity to the right.\n\t *\n\t * It returns an unique identifier which is required to restore the gravity. It guarantees the symmetry\n\t * of the process.\n\t *\n\t * @see module:engine/model/writer~Writer#overrideSelectionGravity\n\t * @protected\n\t * @returns {String} The unique id which allows restoring the gravity.\n\t */\n\t_overrideGravity() {\n\t\treturn this._selection.overrideGravity();\n\t}\n\n\t/**\n\t * Restores the {@link ~DocumentSelection#_overrideGravity overridden gravity}.\n\t *\n\t * Restoring the gravity is only possible using the unique identifier returned by\n\t * {@link ~DocumentSelection#_overrideGravity}. Note that the gravity remains overridden as long as won't be restored\n\t * the same number of times it was overridden.\n\t *\n\t * @see module:engine/model/writer~Writer#restoreSelectionGravity\n\t * @protected\n\t * @param {String} uid The unique id returned by {@link #_overrideGravity}.\n\t */\n\t_restoreGravity( uid ) {\n\t\tthis._selection.restoreGravity( uid );\n\t}\n\n\t/**\n\t * Generates and returns an attribute key for selection attributes store, basing on original attribute key.\n\t *\n\t * @protected\n\t * @param {String} key Attribute key to convert.\n\t * @returns {String} Converted attribute key, applicable for selection store.\n\t */\n\tstatic _getStoreAttributeKey( key ) {\n\t\treturn storePrefix + key;\n\t}\n\n\t/**\n\t * Checks whether the given attribute key is an attribute stored on an element.\n\t *\n\t * @protected\n\t * @param {String} key\n\t * @returns {Boolean}\n\t */\n\tstatic _isStoreAttributeKey( key ) {\n\t\treturn key.startsWith( storePrefix );\n\t}\n}\n\nmix( DocumentSelection, EmitterMixin );\n\n/**\n * Fired when selection range(s) changed.\n *\n * @event change:range\n * @param {Boolean} directChange In case of {@link module:engine/model/selection~Selection} class it is always set\n * to `true` which indicates that the selection change was caused by a direct use of selection's API.\n * The {@link module:engine/model/documentselection~DocumentSelection}, however, may change because its position\n * was directly changed through the {@link module:engine/model/writer~Writer writer} or because its position was\n * changed because the structure of the model has been changed (which means an indirect change).\n * The indirect change does not occur in case of normal (detached) selections because they are \"static\" (as \"not live\")\n * which mean that they are not updated once the document changes.\n */\n\n/**\n * Fired when selection attribute changed.\n *\n * @event change:attribute\n * @param {Boolean} directChange In case of {@link module:engine/model/selection~Selection} class it is always set\n * to `true` which indicates that the selection change was caused by a direct use of selection's API.\n * The {@link module:engine/model/documentselection~DocumentSelection}, however, may change because its attributes\n * were directly changed through the {@link module:engine/model/writer~Writer writer} or because its position was\n * changed in the model and its attributes were refreshed (which means an indirect change).\n * The indirect change does not occur in case of normal (detached) selections because they are \"static\" (as \"not live\")\n * which mean that they are not updated once the document changes.\n * @param {Array.<String>} attributeKeys Array containing keys of attributes that changed.\n */\n\n/**\n * Fired when selection marker(s) changed.\n *\n * @event change:marker\n * @param {Boolean} directChange This is always set to `false` in case of `change:marker` event as there is no possibility\n * to change markers directly through {@link module:engine/model/documentselection~DocumentSelection} API.\n * See also {@link module:engine/model/documentselection~DocumentSelection#event:change:range} and\n * {@link module:engine/model/documentselection~DocumentSelection#event:change:attribute}.\n * @param {Array.<module:engine/model/markercollection~Marker>} oldMarkers Markers in which the selection was before the change.\n */\n\n// `LiveSelection` is used internally by {@link module:engine/model/documentselection~DocumentSelection} and shouldn't be used directly.\n//\n// LiveSelection` is automatically updated upon changes in the {@link module:engine/model/document~Document document}\n// to always contain valid ranges. Its attributes are inherited from the text unless set explicitly.\n//\n// Differences between {@link module:engine/model/selection~Selection} and `LiveSelection` are:\n// * there is always a range in `LiveSelection` - even if no ranges were added there is a \"default range\"\n// present in the selection,\n// * ranges added to this selection updates automatically when the document changes,\n// * attributes of `LiveSelection` are updated automatically according to selection ranges.\n//\n// @extends module:engine/model/selection~Selection\n//\nclass LiveSelection extends Selection {\n\t// Creates an empty live selection for given {@link module:engine/model/document~Document}.\n\t// @param {module:engine/model/document~Document} doc Document which owns this selection.\n\tconstructor( doc ) {\n\t\tsuper();\n\n\t\t// List of selection markers.\n\t\t// Marker is a selection marker when selection range is inside the marker range.\n\t\t//\n\t\t// @type {module:utils/collection~Collection}\n\t\tthis.markers = new Collection( { idProperty: 'name' } );\n\n\t\t// Document which owns this selection.\n\t\t//\n\t\t// @protected\n\t\t// @member {module:engine/model/model~Model}\n\t\tthis._model = doc.model;\n\n\t\t// Document which owns this selection.\n\t\t//\n\t\t// @protected\n\t\t// @member {module:engine/model/document~Document}\n\t\tthis._document = doc;\n\n\t\t// Keeps mapping of attribute name to priority with which the attribute got modified (added/changed/removed)\n\t\t// last time. Possible values of priority are: `'low'` and `'normal'`.\n\t\t//\n\t\t// Priorities are used by internal `LiveSelection` mechanisms. All attributes set using `LiveSelection`\n\t\t// attributes API are set with `'normal'` priority.\n\t\t//\n\t\t// @private\n\t\t// @member {Map} module:engine/model/liveselection~LiveSelection#_attributePriority\n\t\tthis._attributePriority = new Map();\n\n\t\t// Position to which the selection should be set if the last selection range was moved to the graveyard.\n\t\t// @private\n\t\t// @member {module:engine/model/position~Position} module:engine/model/liveselection~LiveSelection#_selectionRestorePosition\n\t\tthis._selectionRestorePosition = null;\n\n\t\t// Flag that informs whether the selection ranges have changed. It is changed on true when `LiveRange#change:range` event is fired.\n\t\t// @private\n\t\t// @member {Array} module:engine/model/liveselection~LiveSelection#_hasChangedRange\n\t\tthis._hasChangedRange = false;\n\n\t\t// Each overriding gravity adds an UID to the set and each removal removes it.\n\t\t// Gravity is overridden when there's at least one UID in the set.\n\t\t// Gravity is restored when the set is empty.\n\t\t// This is to prevent conflicts when gravity is overridden by more than one feature at the same time.\n\t\t// @private\n\t\t// @type {Set}\n\t\tthis._overriddenGravityRegister = new Set();\n\n\t\t// Prefixes of marker names that should affect `LiveSelection#markers` collection.\n\t\t// @private\n\t\t// @type {Set}\n\t\tthis._observedMarkers = new Set();\n\n\t\t// Ensure selection is correct after each operation.\n\t\tthis.listenTo( this._model, 'applyOperation', ( evt, args ) => {\n\t\t\tconst operation = args[ 0 ];\n\n\t\t\tif ( !operation.isDocumentOperation || operation.type == 'marker' || operation.type == 'rename' || operation.type == 'noop' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Fix selection if the last range was removed from it and we have a position to which we can restore the selection.\n\t\t\tif ( this._ranges.length == 0 && this._selectionRestorePosition ) {\n\t\t\t\tthis._fixGraveyardSelection( this._selectionRestorePosition );\n\t\t\t}\n\n\t\t\t// \"Forget\" the restore position even if it was not \"used\".\n\t\t\tthis._selectionRestorePosition = null;\n\n\t\t\tif ( this._hasChangedRange ) {\n\t\t\t\tthis._hasChangedRange = false;\n\t\t\t\tthis.fire( 'change:range', { directChange: false } );\n\t\t\t}\n\t\t}, { priority: 'lowest' } );\n\n\t\t// Ensure selection is correct and up to date after each range change.\n\t\tthis.on( 'change:range', () => {\n\t\t\tfor ( const range of this.getRanges() ) {\n\t\t\t\tif ( !this._document._validateSelectionRange( range ) ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * Range from {@link module:engine/model/documentselection~DocumentSelection document selection}\n\t\t\t\t\t * starts or ends at incorrect position.\n\t\t\t\t\t *\n\t\t\t\t\t * @error document-selection-wrong-position\n\t\t\t\t\t * @param {module:engine/model/range~Range} range\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t\t'document-selection-wrong-position',\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\t{ range }\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Update markers data stored by the selection after each marker change.\n\t\t// This handles only marker changes done through marker operations (not model tree changes).\n\t\tthis.listenTo( this._model.markers, 'update', ( evt, marker, oldRange, newRange ) => {\n\t\t\tthis._updateMarker( marker, newRange );\n\t\t} );\n\n\t\t// Ensure selection is up to date after each change block.\n\t\tthis.listenTo( this._document, 'change', ( evt, batch ) => {\n\t\t\tclearAttributesStoredInElement( this._model, batch );\n\t\t} );\n\t}\n\n\tget isCollapsed() {\n\t\tconst length = this._ranges.length;\n\n\t\treturn length === 0 ? this._document._getDefaultRange().isCollapsed : super.isCollapsed;\n\t}\n\n\tget anchor() {\n\t\treturn super.anchor || this._document._getDefaultRange().start;\n\t}\n\n\tget focus() {\n\t\treturn super.focus || this._document._getDefaultRange().end;\n\t}\n\n\tget rangeCount() {\n\t\treturn this._ranges.length ? this._ranges.length : 1;\n\t}\n\n\t// Describes whether `LiveSelection` has own range(s) set, or if it is defaulted to\n\t// {@link module:engine/model/document~Document#_getDefaultRange document's default range}.\n\t//\n\t// @readonly\n\t// @type {Boolean}\n\tget hasOwnRange() {\n\t\treturn this._ranges.length > 0;\n\t}\n\n\t// When set to `true` then selection attributes on node before the caret won't be taken\n\t// into consideration while updating selection attributes.\n\t//\n\t// @protected\n\t// @type {Boolean}\n\tget isGravityOverridden() {\n\t\treturn !!this._overriddenGravityRegister.size;\n\t}\n\n\t// Unbinds all events previously bound by live selection.\n\tdestroy() {\n\t\tfor ( let i = 0; i < this._ranges.length; i++ ) {\n\t\t\tthis._ranges[ i ].detach();\n\t\t}\n\n\t\tthis.stopListening();\n\t}\n\n\t* getRanges() {\n\t\tif ( this._ranges.length ) {\n\t\t\tyield* super.getRanges();\n\t\t} else {\n\t\t\tyield this._document._getDefaultRange();\n\t\t}\n\t}\n\n\tgetFirstRange() {\n\t\treturn super.getFirstRange() || this._document._getDefaultRange();\n\t}\n\n\tgetLastRange() {\n\t\treturn super.getLastRange() || this._document._getDefaultRange();\n\t}\n\n\tsetTo( selectable, optionsOrPlaceOrOffset, options ) {\n\t\tsuper.setTo( selectable, optionsOrPlaceOrOffset, options );\n\t\tthis._updateAttributes( true );\n\t\tthis._updateMarkers();\n\t}\n\n\tsetFocus( itemOrPosition, offset ) {\n\t\tsuper.setFocus( itemOrPosition, offset );\n\t\tthis._updateAttributes( true );\n\t\tthis._updateMarkers();\n\t}\n\n\tsetAttribute( key, value ) {\n\t\tif ( this._setAttribute( key, value ) ) {\n\t\t\t// Fire event with exact data.\n\t\t\tconst attributeKeys = [ key ];\n\t\t\tthis.fire( 'change:attribute', { attributeKeys, directChange: true } );\n\t\t}\n\t}\n\n\tremoveAttribute( key ) {\n\t\tif ( this._removeAttribute( key ) ) {\n\t\t\t// Fire event with exact data.\n\t\t\tconst attributeKeys = [ key ];\n\t\t\tthis.fire( 'change:attribute', { attributeKeys, directChange: true } );\n\t\t}\n\t}\n\n\toverrideGravity() {\n\t\tconst overrideUid = uid();\n\n\t\t// Remember that another overriding has been requested. It will need to be removed\n\t\t// before the gravity is to be restored.\n\t\tthis._overriddenGravityRegister.add( overrideUid );\n\n\t\tif ( this._overriddenGravityRegister.size === 1 ) {\n\t\t\tthis._updateAttributes( true );\n\t\t}\n\n\t\treturn overrideUid;\n\t}\n\n\trestoreGravity( uid ) {\n\t\tif ( !this._overriddenGravityRegister.has( uid ) ) {\n\t\t\t/**\n\t\t\t * Restoring gravity for an unknown UID is not possible. Make sure you are using a correct\n\t\t\t * UID obtained from the {@link module:engine/model/writer~Writer#overrideSelectionGravity} to restore.\n\t\t\t *\n\t\t\t * @error document-selection-gravity-wrong-restore\n\t\t\t * @param {String} uid The unique identifier returned by\n\t\t\t * {@link module:engine/model/documentselection~DocumentSelection#_overrideGravity}.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'document-selection-gravity-wrong-restore',\n\t\t\t\tthis,\n\t\t\t\t{ uid }\n\t\t\t);\n\t\t}\n\n\t\tthis._overriddenGravityRegister.delete( uid );\n\n\t\t// Restore gravity only when all overriding have been restored.\n\t\tif ( !this.isGravityOverridden ) {\n\t\t\tthis._updateAttributes( true );\n\t\t}\n\t}\n\n\tobserveMarkers( prefixOrName ) {\n\t\tthis._observedMarkers.add( prefixOrName );\n\t\tthis._updateMarkers();\n\t}\n\n\t_popRange() {\n\t\tthis._ranges.pop().detach();\n\t}\n\n\t_pushRange( range ) {\n\t\tconst liveRange = this._prepareRange( range );\n\n\t\t// `undefined` is returned when given `range` is in graveyard root.\n\t\tif ( liveRange ) {\n\t\t\tthis._ranges.push( liveRange );\n\t\t}\n\t}\n\n\t// Prepares given range to be added to selection. Checks if it is correct,\n\t// converts it to {@link module:engine/model/liverange~LiveRange LiveRange}\n\t// and sets listeners listening to the range's change event.\n\t//\n\t// @private\n\t// @param {module:engine/model/range~Range} range\n\t_prepareRange( range ) {\n\t\tthis._checkRange( range );\n\n\t\tif ( range.root == this._document.graveyard ) {\n\t\t\t// @if CK_DEBUG // console.warn( 'Trying to add a Range that is in the graveyard root. Range rejected.' );\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst liveRange = LiveRange.fromRange( range );\n\n\t\t// If selection range is moved to the graveyard remove it from the selection object.\n\t\t// Also, save some data that can be used to restore selection later, on `Model#applyOperation` event.\n\t\tliveRange.on( 'change:range', ( evt, oldRange, data ) => {\n\t\t\tthis._hasChangedRange = true;\n\n\t\t\tif ( liveRange.root == this._document.graveyard ) {\n\t\t\t\tthis._selectionRestorePosition = data.deletionPosition;\n\n\t\t\t\tconst index = this._ranges.indexOf( liveRange );\n\t\t\t\tthis._ranges.splice( index, 1 );\n\t\t\t\tliveRange.detach();\n\t\t\t}\n\t\t} );\n\n\t\treturn liveRange;\n\t}\n\n\t_updateMarkers() {\n\t\tif ( !this._observedMarkers.size ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst markers = [];\n\t\tlet changed = false;\n\n\t\tfor ( const marker of this._model.markers ) {\n\t\t\tconst markerGroup = marker.name.split( ':', 1 )[ 0 ];\n\n\t\t\tif ( !this._observedMarkers.has( markerGroup ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst markerRange = marker.getRange();\n\n\t\t\tfor ( const selectionRange of this.getRanges() ) {\n\t\t\t\tif ( markerRange.containsRange( selectionRange, !selectionRange.isCollapsed ) ) {\n\t\t\t\t\tmarkers.push( marker );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst oldMarkers = Array.from( this.markers );\n\n\t\tfor ( const marker of markers ) {\n\t\t\tif ( !this.markers.has( marker ) ) {\n\t\t\t\tthis.markers.add( marker );\n\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\n\t\tfor ( const marker of Array.from( this.markers ) ) {\n\t\t\tif ( !markers.includes( marker ) ) {\n\t\t\t\tthis.markers.remove( marker );\n\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\n\t\tif ( changed ) {\n\t\t\tthis.fire( 'change:marker', { oldMarkers, directChange: false } );\n\t\t}\n\t}\n\n\t_updateMarker( marker, markerRange ) {\n\t\tconst markerGroup = marker.name.split( ':', 1 )[ 0 ];\n\n\t\tif ( !this._observedMarkers.has( markerGroup ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet changed = false;\n\n\t\tconst oldMarkers = Array.from( this.markers );\n\t\tconst hasMarker = this.markers.has( marker );\n\n\t\tif ( !markerRange ) {\n\t\t\tif ( hasMarker ) {\n\t\t\t\tthis.markers.remove( marker );\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t} else {\n\t\t\tlet contained = false;\n\n\t\t\tfor ( const selectionRange of this.getRanges() ) {\n\t\t\t\tif ( markerRange.containsRange( selectionRange, !selectionRange.isCollapsed ) ) {\n\t\t\t\t\tcontained = true;\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( contained && !hasMarker ) {\n\t\t\t\tthis.markers.add( marker );\n\n\t\t\t\tchanged = true;\n\t\t\t} else if ( !contained && hasMarker ) {\n\t\t\t\tthis.markers.remove( marker );\n\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\n\t\tif ( changed ) {\n\t\t\tthis.fire( 'change:marker', { oldMarkers, directChange: false } );\n\t\t}\n\t}\n\n\t// Updates this selection attributes according to its ranges and the {@link module:engine/model/document~Document model document}.\n\t//\n\t// @protected\n\t// @param {Boolean} clearAll\n\t// @fires change:attribute\n\t_updateAttributes( clearAll ) {\n\t\tconst newAttributes = toMap( this._getSurroundingAttributes() );\n\t\tconst oldAttributes = toMap( this.getAttributes() );\n\n\t\tif ( clearAll ) {\n\t\t\t// If `clearAll` remove all attributes and reset priorities.\n\t\t\tthis._attributePriority = new Map();\n\t\t\tthis._attrs = new Map();\n\t\t} else {\n\t\t\t// If not, remove only attributes added with `low` priority.\n\t\t\tfor ( const [ key, priority ] of this._attributePriority ) {\n\t\t\t\tif ( priority == 'low' ) {\n\t\t\t\t\tthis._attrs.delete( key );\n\t\t\t\t\tthis._attributePriority.delete( key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._setAttributesTo( newAttributes );\n\n\t\t// Let's evaluate which attributes really changed.\n\t\tconst changed = [];\n\n\t\t// First, loop through all attributes that are set on selection right now.\n\t\t// Check which of them are different than old attributes.\n\t\tfor ( const [ newKey, newValue ] of this.getAttributes() ) {\n\t\t\tif ( !oldAttributes.has( newKey ) || oldAttributes.get( newKey ) !== newValue ) {\n\t\t\t\tchanged.push( newKey );\n\t\t\t}\n\t\t}\n\n\t\t// Then, check which of old attributes got removed.\n\t\tfor ( const [ oldKey ] of oldAttributes ) {\n\t\t\tif ( !this.hasAttribute( oldKey ) ) {\n\t\t\t\tchanged.push( oldKey );\n\t\t\t}\n\t\t}\n\n\t\t// Fire event with exact data (fire only if anything changed).\n\t\tif ( changed.length > 0 ) {\n\t\t\tthis.fire( 'change:attribute', { attributeKeys: changed, directChange: false } );\n\t\t}\n\t}\n\n\t// Internal method for setting `LiveSelection` attribute. Supports attribute priorities (through `directChange`\n\t// parameter).\n\t//\n\t// @private\n\t// @param {String} key Attribute key.\n\t// @param {*} value Attribute value.\n\t// @param {Boolean} [directChange=true] `true` if the change is caused by `Selection` API, `false` if change\n\t// is caused by `Batch` API.\n\t// @returns {Boolean} Whether value has changed.\n\t_setAttribute( key, value, directChange = true ) {\n\t\tconst priority = directChange ? 'normal' : 'low';\n\n\t\tif ( priority == 'low' && this._attributePriority.get( key ) == 'normal' ) {\n\t\t\t// Priority too low.\n\t\t\treturn false;\n\t\t}\n\n\t\tconst oldValue = super.getAttribute( key );\n\n\t\t// Don't do anything if value has not changed.\n\t\tif ( oldValue === value ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis._attrs.set( key, value );\n\n\t\t// Update priorities map.\n\t\tthis._attributePriority.set( key, priority );\n\n\t\treturn true;\n\t}\n\n\t// Internal method for removing `LiveSelection` attribute. Supports attribute priorities (through `directChange`\n\t// parameter).\n\t//\n\t// NOTE: Even if attribute is not present in the selection but is provided to this method, it's priority will\n\t// be changed according to `directChange` parameter.\n\t//\n\t// @private\n\t// @param {String} key Attribute key.\n\t// @param {Boolean} [directChange=true] `true` if the change is caused by `Selection` API, `false` if change\n\t// is caused by `Batch` API.\n\t// @returns {Boolean} Whether attribute was removed. May not be true if such attributes didn't exist or the\n\t// existing attribute had higher priority.\n\t_removeAttribute( key, directChange = true ) {\n\t\tconst priority = directChange ? 'normal' : 'low';\n\n\t\tif ( priority == 'low' && this._attributePriority.get( key ) == 'normal' ) {\n\t\t\t// Priority too low.\n\t\t\treturn false;\n\t\t}\n\n\t\t// Update priorities map.\n\t\tthis._attributePriority.set( key, priority );\n\n\t\t// Don't do anything if value has not changed.\n\t\tif ( !super.hasAttribute( key ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis._attrs.delete( key );\n\n\t\treturn true;\n\t}\n\n\t// Internal method for setting multiple `LiveSelection` attributes. Supports attribute priorities (through\n\t// `directChange` parameter).\n\t//\n\t// @private\n\t// @param {Map.<String,*>} attrs Iterable object containing attributes to be set.\n\t// @returns {Set.<String>} Changed attribute keys.\n\t_setAttributesTo( attrs ) {\n\t\tconst changed = new Set();\n\n\t\tfor ( const [ oldKey, oldValue ] of this.getAttributes() ) {\n\t\t\t// Do not remove attribute if attribute with same key and value is about to be set.\n\t\t\tif ( attrs.get( oldKey ) === oldValue ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// All rest attributes will be removed so changed attributes won't change .\n\t\t\tthis._removeAttribute( oldKey, false );\n\t\t}\n\n\t\tfor ( const [ key, value ] of attrs ) {\n\t\t\t// Attribute may not be set because of attributes or because same key/value is already added.\n\t\t\tconst gotAdded = this._setAttribute( key, value, false );\n\n\t\t\tif ( gotAdded ) {\n\t\t\t\tchanged.add( key );\n\t\t\t}\n\t\t}\n\n\t\treturn changed;\n\t}\n\n\t// Returns an iterable that iterates through all selection attributes stored in current selection's parent.\n\t//\n\t// @protected\n\t// @returns {Iterable.<*>}\n\t* _getStoredAttributes() {\n\t\tconst selectionParent = this.getFirstPosition().parent;\n\n\t\tif ( this.isCollapsed && selectionParent.isEmpty ) {\n\t\t\tfor ( const key of selectionParent.getAttributeKeys() ) {\n\t\t\t\tif ( key.startsWith( storePrefix ) ) {\n\t\t\t\t\tconst realKey = key.substr( storePrefix.length );\n\n\t\t\t\t\tyield [ realKey, selectionParent.getAttribute( key ) ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Checks model text nodes that are closest to the selection's first position and returns attributes of first\n\t// found element. If there are no text nodes in selection's first position parent, it returns selection\n\t// attributes stored in that parent.\n\t//\n\t// @private\n\t// @returns {Iterable.<*>} Collection of attributes.\n\t_getSurroundingAttributes() {\n\t\tconst position = this.getFirstPosition();\n\t\tconst schema = this._model.schema;\n\n\t\tlet attrs = null;\n\n\t\tif ( !this.isCollapsed ) {\n\t\t\t// 1. If selection is a range...\n\t\t\tconst range = this.getFirstRange();\n\n\t\t\t// ...look for a first character node in that range and take attributes from it.\n\t\t\tfor ( const value of range ) {\n\t\t\t\t// If the item is an object, we don't want to get attributes from its children.\n\t\t\t\tif ( value.item.is( 'element' ) && schema.isObject( value.item ) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( value.type == 'text' ) {\n\t\t\t\t\tattrs = value.item.getAttributes();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// 2. If the selection is a caret or the range does not contain a character node...\n\n\t\t\tconst nodeBefore = position.textNode ? position.textNode : position.nodeBefore;\n\t\t\tconst nodeAfter = position.textNode ? position.textNode : position.nodeAfter;\n\n\t\t\t// When gravity is overridden then don't take node before into consideration.\n\t\t\tif ( !this.isGravityOverridden ) {\n\t\t\t\t// ...look at the node before caret and take attributes from it if it is a character node.\n\t\t\t\tattrs = getAttrsIfCharacter( nodeBefore );\n\t\t\t}\n\n\t\t\t// 3. If not, look at the node after caret...\n\t\t\tif ( !attrs ) {\n\t\t\t\tattrs = getAttrsIfCharacter( nodeAfter );\n\t\t\t}\n\n\t\t\t// 4. If not, try to find the first character on the left, that is in the same node.\n\t\t\t// When gravity is overridden then don't take node before into consideration.\n\t\t\tif ( !this.isGravityOverridden && !attrs ) {\n\t\t\t\tlet node = nodeBefore;\n\n\t\t\t\twhile ( node && !schema.isInline( node ) && !attrs ) {\n\t\t\t\t\tnode = node.previousSibling;\n\t\t\t\t\tattrs = getAttrsIfCharacter( node );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// 5. If not found, try to find the first character on the right, that is in the same node.\n\t\t\tif ( !attrs ) {\n\t\t\t\tlet node = nodeAfter;\n\n\t\t\t\twhile ( node && !schema.isInline( node ) && !attrs ) {\n\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t\tattrs = getAttrsIfCharacter( node );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// 6. If not found, selection should retrieve attributes from parent.\n\t\t\tif ( !attrs ) {\n\t\t\t\tattrs = this._getStoredAttributes();\n\t\t\t}\n\t\t}\n\n\t\treturn attrs;\n\t}\n\n\t// Fixes the selection after all its ranges got removed.\n\t//\n\t// @private\n\t// @param {module:engine/model/position~Position} deletionPosition Position where the deletion happened.\n\t_fixGraveyardSelection( deletionPosition ) {\n\t\t// Find a range that is a correct selection range and is closest to the position where the deletion happened.\n\t\tconst selectionRange = this._model.schema.getNearestSelectionRange( deletionPosition );\n\n\t\t// If nearest valid selection range has been found - add it in the place of old range.\n\t\tif ( selectionRange ) {\n\t\t\t// Check the range, convert it to live range, bind events, etc.\n\t\t\tthis._pushRange( selectionRange );\n\t\t}\n\t\t// If nearest valid selection range cannot be found don't add any range. Selection will be set to the default range.\n\t}\n}\n\n// Helper function for {@link module:engine/model/liveselection~LiveSelection#_updateAttributes}.\n//\n// It takes model item, checks whether it is a text node (or text proxy) and, if so, returns it's attributes. If not, returns `null`.\n//\n// @param {module:engine/model/item~Item|null} node\n// @returns {Boolean}\nfunction getAttrsIfCharacter( node ) {\n\tif ( node instanceof TextProxy || node instanceof Text ) {\n\t\treturn node.getAttributes();\n\t}\n\n\treturn null;\n}\n\n// Removes selection attributes from element which is not empty anymore.\n//\n// @param {module:engine/model/model~Model} model\n// @param {module:engine/model/batch~Batch} batch\nfunction clearAttributesStoredInElement( model, batch ) {\n\tconst differ = model.document.differ;\n\n\tfor ( const entry of differ.getChanges() ) {\n\t\tif ( entry.type != 'insert' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst changeParent = entry.position.parent;\n\t\tconst isNoLongerEmpty = entry.length === changeParent.maxOffset;\n\n\t\tif ( isNoLongerEmpty ) {\n\t\t\tmodel.enqueueChange( batch, writer => {\n\t\t\t\tconst storedAttributes = Array.from( changeParent.getAttributeKeys() )\n\t\t\t\t\t.filter( key => key.startsWith( storePrefix ) );\n\n\t\t\t\tfor ( const key of storedAttributes ) {\n\t\t\t\t\twriter.removeAttribute( key, changeParent );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/conversion/conversionhelpers\n */\n\n/**\n * Base class for conversion helpers.\n */\nexport default class ConversionHelpers {\n\t/**\n\t * Creates a conversion helpers instance.\n\t *\n\t * @param {Array.<module:engine/conversion/downcastdispatcher~DowncastDispatcher|\n\t * module:engine/conversion/upcastdispatcher~UpcastDispatcher>} dispatchers\n\t */\n\tconstructor( dispatchers ) {\n\t\tthis._dispatchers = dispatchers;\n\t}\n\n\t/**\n\t * Registers a conversion helper.\n\t *\n\t * **Note**: See full usage example in the `{@link module:engine/conversion/conversion~Conversion#for conversion.for()}`\n\t * method description.\n\t *\n\t * @param {Function} conversionHelper The function to be called on event.\n\t * @returns {module:engine/conversion/downcasthelpers~DowncastHelpers|module:engine/conversion/upcasthelpers~UpcastHelpers}\n\t */\n\tadd( conversionHelper ) {\n\t\tfor ( const dispatcher of this._dispatchers ) {\n\t\t\tconversionHelper( dispatcher );\n\t\t}\n\n\t\treturn this;\n\t}\n}\n","import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nexport default cloneDeep;\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Contains downcast (model-to-view) converters for {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}.\n *\n * @module engine/conversion/downcasthelpers\n */\n\nimport ModelRange from '../model/range';\nimport ModelSelection from '../model/selection';\nimport ModelElement from '../model/element';\nimport ModelPosition from '../model/position';\n\nimport ViewAttributeElement from '../view/attributeelement';\nimport DocumentSelection from '../model/documentselection';\nimport ConversionHelpers from './conversionhelpers';\n\nimport { cloneDeep } from 'lodash-es';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport toArray from '@ckeditor/ckeditor5-utils/src/toarray';\n\n/**\n * Downcast conversion helper functions.\n *\n * Learn more about {@glink framework/guides/deep-dive/conversion/downcast downcast helpers}.\n *\n * @extends module:engine/conversion/conversionhelpers~ConversionHelpers\n */\nexport default class DowncastHelpers extends ConversionHelpers {\n\t/**\n\t * Model element to view element conversion helper.\n\t *\n\t * This conversion results in creating a view element. For example, model `<paragraph>Foo</paragraph>` becomes `<p>Foo</p>` in the view.\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).elementToElement( {\n\t *\t\t\tmodel: 'paragraph',\n\t *\t\t\tview: 'p'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).elementToElement( {\n\t *\t\t\tmodel: 'paragraph',\n\t *\t\t\tview: 'div',\n\t *\t\t\tconverterPriority: 'high'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).elementToElement( {\n\t *\t\t\tmodel: 'fancyParagraph',\n\t *\t\t\tview: {\n\t *\t\t\t\tname: 'p',\n\t *\t\t\t\tclasses: 'fancy'\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).elementToElement( {\n\t *\t\t\tmodel: 'heading',\n\t *\t\t\tview: ( modelElement, conversionApi ) => {\n\t *\t\t\t\tconst { writer } = conversionApi;\n\t *\n\t *\t\t\t\treturn writer.createContainerElement( 'h' + modelElement.getAttribute( 'level' ) );\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * The element-to-element conversion supports the reconversion mechanism. It can be enabled by using either the `attributes` or\n\t * the `children` props on a model description. You will find a couple examples below.\n\t *\n\t * In order to reconvert an element if any of its direct children have been added or removed, use the `children` property on a `model`\n\t * description. For example, this model:\n\t *\n\t *\t\t<box>\n\t *\t\t\t<paragraph>Some text.</paragraph>\n\t *\t\t</box>\n\t *\n\t * will be converted into this structure in the view:\n\t *\n\t *\t\t<div class=\"box\" data-type=\"single\">\n\t *\t\t\t<p>Some text.</p>\n\t *\t\t</div>\n\t *\n\t * But if more items were inserted in the model:\n\t *\n\t *\t\t<box>\n\t *\t\t\t<paragraph>Some text.</paragraph>\n\t *\t\t\t<paragraph>Other item.</paragraph>\n\t *\t\t</box>\n\t *\n\t * it will be converted into this structure in the view (note the element `data-type` change):\n\t *\n\t *\t\t<div class=\"box\" data-type=\"multiple\">\n\t *\t\t\t<p>Some text.</p>\n\t *\t\t\t<p>Other item.</p>\n\t *\t\t</div>\n\t *\n\t * Such a converter would look like this (note that the `paragraph` elements are converted separately):\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).elementToElement( {\n\t *\t\t\tmodel: {\n\t *\t \t\t\tname: 'box',\n\t *\t \t\t\tchildren: true\n\t *\t\t\t},\n\t *\t\t\tview: ( modelElement, conversionApi ) => {\n\t *\t\t\t\tconst { writer } = conversionApi;\n\t *\n\t *\t\t\t\treturn writer.createContainerElement( 'div', {\n\t *\t\t\t\t\tclass: 'box',\n\t *\t\t\t\t\t'data-type': modelElement.childCount == 1 ? 'single' : 'multiple'\n\t *\t\t\t\t} );\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * In order to reconvert element if any of its attributes have been updated, use the `attributes` property on a `model`\n\t * description. For example, this model:\n\t *\n\t *\t\t<heading level=\"2\">Some text.</heading>\n\t *\n\t * will be converted into this structure in the view:\n\t *\n\t *\t\t<h2>Some text.</h2>\n\t *\n\t * But if the `heading` element's `level` attribute has been updated to `3` for example, then\n\t * it will be converted into this structure in the view:\n\t *\n\t *\t\t<h3>Some text.</h3>\n\t *\n\t * Such a converter would look as follows:\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).elementToElement( {\n\t *\t\t\tmodel: {\n\t *\t \t\t\tname: 'heading',\n\t *\t \t\t\tattributes: 'level'\n\t *\t\t\t},\n\t *\t\t\tview: ( modelElement, conversionApi ) => {\n\t *\t\t\t\tconst { writer } = conversionApi;\n\t *\n\t *\t\t\t\treturn writer.createContainerElement( 'h' + modelElement.getAttribute( 'level' ) );\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * You can read more about the element-to-element conversion in the\n\t * {@glink framework/guides/deep-dive/conversion/downcast downcast conversion} guide.\n\t *\n\t * @method #elementToElement\n\t * @param {Object} config Conversion configuration.\n\t * @param {String|Object} config.model The description or a name of the model element to convert.\n\t * @param {String|Array.<String>} [config.model.attributes] The list of attribute names that should be consumed while creating\n\t * the view element. Note that the view will be reconverted if any of the listed attributes changes.\n \t * @param {Boolean} [config.model.children] Specifies whether the view element requires reconversion if the list\n\t * of the model child nodes changed.\n\t * @param {module:engine/view/elementdefinition~ElementDefinition|Function} config.view A view element definition or a function\n\t * that takes the model element and {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t * as parameters and returns a view container element.\n\t * @returns {module:engine/conversion/downcasthelpers~DowncastHelpers}\n\t */\n\telementToElement( config ) {\n\t\treturn this.add( downcastElementToElement( config ) );\n\t}\n\n\t/**\n\t * The model element to view structure (several elements) conversion helper.\n\t *\n\t * This conversion results in creating a view structure with one or more slots defined for the child nodes.\n\t * For example, a model `<table>` may become this structure in the view:\n\t *\n\t *\t\t<figure class=\"table\">\n\t *\t\t\t<table>\n\t *\t\t\t\t<tbody>${ slot for table rows }</tbody>\n\t *\t\t\t</table>\n\t *\t\t</figure>\n\t *\n\t * The children of the model's `<table>` element will be inserted into the `<tbody>` element.\n\t * If the `elementToElement()` helper was used, the children would be inserted into the `<figure>`.\n\t *\n\t * An example converter that converts the following model structure:\n\t *\n\t *\t\t<wrappedParagraph>Some text.</wrappedParagraph>\n\t *\n\t * into this structure in the view:\n\t *\n\t *\t\t<div class=\"wrapper\">\n\t *\t\t\t<p>Some text.</p>\n\t *\t\t</div>\n\t *\n\t * would look like this:\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).elementToStructure( {\n\t *\t\t\tmodel: 'wrappedParagraph',\n\t *\t\t\tview: ( modelElement, conversionApi ) => {\n\t *\t\t\t\tconst { writer } = conversionApi;\n\t *\n\t *\t\t\t\tconst wrapperViewElement = writer.createContainerElement( 'div', { class: 'wrapper' } );\n\t *\t\t\t\tconst paragraphViewElement = writer.createContainerElement( 'p' );\n\t *\n\t *\t\t\t\twriter.insert( writer.createPositionAt( wrapperViewElement, 0 ), paragraphViewElement );\n\t *\t\t\t\twriter.insert( writer.createPositionAt( paragraphViewElement, 0 ), writer.createSlot() );\n\t *\n\t *\t\t\t\treturn wrapperViewElement;\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * The `slorFor()` function can also take a callback that allows filtering which children of the model element\n\t * should be converted into this slot.\n\t *\n\t * Imagine a table feature where for this model structure:\n\t *\n\t *\t\t<table headingRows=\"1\">\n\t *\t\t\t<tableRow> ... table cells 1 ... </tableRow>\n\t *\t\t\t<tableRow> ... table cells 2 ... </tableRow>\n\t *\t\t\t<tableRow> ... table cells 3 ... </tableRow>\n\t *\t\t\t<caption>Caption text</caption>\n\t *\t\t</table>\n\t *\n\t * we want to generate this view structure:\n\t *\n\t *\t\t<figure class=\"table\">\n\t *\t\t\t<table>\n\t *\t\t\t\t<thead>\n\t *\t\t\t\t\t<tr> ... table cells 1 ... </tr>\n\t *\t\t\t\t</thead>\n\t *\t\t\t\t<tbody>\n\t *\t\t\t\t\t<tr> ... table cells 2 ... </tr>\n\t *\t\t\t\t\t<tr> ... table cells 3 ... </tr>\n\t *\t\t\t\t</tbody>\n\t *\t\t\t</table>\n\t *\t\t\t<figcaption>Caption text</figcaption>\n\t *\t\t</figure>\n\t *\n\t * The converter has to take the `headingRows` attribute into consideration when allocating the `<tableRow>` elements\n\t * into the `<tbody>` and `<thead>` elements. Hence, we need two slots and need to define proper filter callbacks for them.\n\t *\n\t * Additionally, all elements other than `<tableRow>` should be placed outside the `<table>` tag.\n\t * In the example above, this will handle the table caption.\n\t *\n\t * Such a converter would look like this:\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).elementToStructure( {\n\t *\t\t\tmodel: {\n\t *\t\t\t\tname: 'table',\n\t *\t\t\t\tattributes: [ 'headingRows' ]\n\t *\t\t\t},\n\t *\t\t\tview: ( modelElement, conversionApi ) => {\n\t *\t\t\t\tconst { writer } = conversionApi;\n\t *\n\t *\t\t\t\tconst figureElement = writer.createContainerElement( 'figure', { class: 'table' } );\n\t *\t\t\t\tconst tableElement = writer.createContainerElement( 'table' );\n\t *\n\t *\t\t\t\twriter.insert( writer.createPositionAt( figureElement, 0 ), tableElement );\n\t *\n\t *\t\t\t\tconst headingRows = modelElement.getAttribute( 'headingRows' ) || 0;\n\t *\n\t *\t\t\t\tif ( headingRows > 0 ) {\n\t *\t\t\t\t\tconst tableHead = writer.createContainerElement( 'thead' );\n\t *\n\t *\t\t\t\t\tconst headSlot = writer.createSlot( node => node.is( 'element', 'tableRow' ) && node.index < headingRows );\n\t *\n\t *\t\t\t\t\twriter.insert( writer.createPositionAt( tableElement, 'end' ), tableHead );\n\t *\t\t\t\t\twriter.insert( writer.createPositionAt( tableHead, 0 ), headSlot );\n\t *\t\t\t\t}\n\t *\n\t *\t\t\t\tif ( headingRows < tableUtils.getRows( table ) ) {\n\t *\t\t\t\t\tconst tableBody = writer.createContainerElement( 'tbody' );\n\t *\n\t *\t\t\t\t\tconst bodySlot = writer.createSlot( node => node.is( 'element', 'tableRow' ) && node.index >= headingRows );\n\t *\n\t *\t\t\t\t\twriter.insert( writer.createPositionAt( tableElement, 'end' ), tableBody );\n\t *\t\t\t\t\twriter.insert( writer.createPositionAt( tableBody, 0 ), bodySlot );\n\t *\t\t\t\t}\n\t *\n\t *\t\t\t\tconst restSlot = writer.createSlot( node => !node.is( 'element', 'tableRow' ) );\n\t *\n\t *\t\t\t\twriter.insert( writer.createPositionAt( figureElement, 'end' ), restSlot );\n\t *\n\t *\t\t\t\treturn figureElement;\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * Note: The children of a model element that's being converted must be allocated in the same order in the view\n\t * in which they are placed in the model.\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @method #elementToStructure\n\t * @param {Object} config Conversion configuration.\n \t * @param {String|Object} config.model The description or a name of the model element to convert.\n\t * @param {String} [config.model.name] The name of the model element to convert.\n \t * @param {String|Array.<String>} [config.model.attributes] The list of attribute names that should be consumed while creating\n\t * the view structure. Note that the view will be reconverted if any of the listed attributes will change.\n\t * @param {module:engine/conversion/downcasthelpers~StructureCreatorFunction} config.view A function\n\t * that takes the model element and {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast\n\t * conversion API} as parameters and returns a view container element with slots for model child nodes to be converted into.\n\t * @returns {module:engine/conversion/downcasthelpers~DowncastHelpers}\n\t */\n\telementToStructure( config ) {\n\t\treturn this.add( downcastElementToStructure( config ) );\n\t}\n\n\t/**\n\t * Model attribute to view element conversion helper.\n\t *\n\t * This conversion results in wrapping view nodes with a view attribute element. For example, a model text node with\n\t * `\"Foo\"` as data and the `bold` attribute becomes `<strong>Foo</strong>` in the view.\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).attributeToElement( {\n\t *\t\t\tmodel: 'bold',\n\t *\t\t\tview: 'strong'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).attributeToElement( {\n\t *\t\t\tmodel: 'bold',\n\t *\t\t\tview: 'b',\n\t *\t\t\tconverterPriority: 'high'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).attributeToElement( {\n\t *\t\t\tmodel: 'invert',\n\t *\t\t\tview: {\n\t *\t\t\t\tname: 'span',\n\t *\t\t\t\tclasses: [ 'font-light', 'bg-dark' ]\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).attributeToElement( {\n\t *\t\t\tmodel: {\n\t *\t\t\t\tkey: 'fontSize',\n\t *\t\t\t\tvalues: [ 'big', 'small' ]\n\t *\t\t\t},\n\t *\t\t\tview: {\n\t *\t\t\t\tbig: {\n\t *\t\t\t\t\tname: 'span',\n\t *\t\t\t\t\tstyles: {\n\t *\t\t\t\t\t\t'font-size': '1.2em'\n\t *\t\t\t\t\t}\n\t *\t\t\t\t},\n\t *\t\t\t\tsmall: {\n\t *\t\t\t\t\tname: 'span',\n\t *\t\t\t\t\tstyles: {\n\t *\t\t\t\t\t\t'font-size': '0.8em'\n\t *\t\t\t\t\t}\n\t *\t\t\t\t}\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).attributeToElement( {\n\t *\t\t\tmodel: 'bold',\n\t *\t\t\tview: ( modelAttributeValue, conversionApi ) => {\n\t *\t\t\t\tconst { writer } = conversionApi;\n\t *\n\t *\t\t\t\treturn writer.createAttributeElement( 'span', {\n\t *\t\t\t\t\tstyle: 'font-weight:' + modelAttributeValue\n\t *\t\t\t\t} );\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).attributeToElement( {\n\t *\t\t\tmodel: {\n\t *\t\t\t\tkey: 'color',\n\t *\t\t\t\tname: '$text'\n\t *\t\t\t},\n\t *\t\t\tview: ( modelAttributeValue, conversionApi ) => {\n\t *\t\t\t\tconst { writer } = conversionApi;\n\t *\n\t *\t\t\t\treturn writer.createAttributeElement( 'span', {\n\t *\t\t\t\t\tstyle: 'color:' + modelAttributeValue\n\t *\t\t\t\t} );\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @method #attributeToElement\n\t * @param {Object} config Conversion configuration.\n\t * @param {String|Object} config.model The key of the attribute to convert from or a `{ key, values }` object. `values` is an array\n\t * of `String`s with possible values if the model attribute is an enumerable.\n\t * @param {module:engine/view/elementdefinition~ElementDefinition|Function|Object} config.view A view element definition or a function\n\t * that takes the model attribute value and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as parameters and returns a view\n\t * attribute element. If `config.model.values` is given, `config.view` should be an object assigning values from `config.model.values`\n\t * to view element definitions or functions.\n\t * @param {module:utils/priorities~PriorityString} [config.converterPriority='normal'] Converter priority.\n\t * @returns {module:engine/conversion/downcasthelpers~DowncastHelpers}\n\t */\n\tattributeToElement( config ) {\n\t\treturn this.add( downcastAttributeToElement( config ) );\n\t}\n\n\t/**\n\t * Model attribute to view attribute conversion helper.\n\t *\n\t * This conversion results in adding an attribute to a view node, basing on an attribute from a model node. For example,\n\t * `<imageInline src='foo.jpg'></imageInline>` is converted to `<img src='foo.jpg'></img>`.\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t *\t\t\tmodel: 'source',\n\t *\t\t\tview: 'src'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t *\t\t\tmodel: 'source',\n\t *\t\t\tview: 'href',\n\t *\t\t\tconverterPriority: 'high'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t *\t\t\tmodel: {\n\t *\t\t\t\tname: 'imageInline',\n\t *\t\t\t\tkey: 'source'\n\t *\t\t\t},\n\t *\t\t\tview: 'src'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t *\t\t\tmodel: {\n\t *\t\t\t\tname: 'styled',\n\t *\t\t\t\tvalues: [ 'dark', 'light' ]\n\t *\t\t\t},\n\t *\t\t\tview: {\n\t *\t\t\t\tdark: {\n\t *\t\t\t\t\tkey: 'class',\n\t *\t\t\t\t\tvalue: [ 'styled', 'styled-dark' ]\n\t *\t\t\t\t},\n\t *\t\t\t\tlight: {\n\t *\t\t\t\t\tkey: 'class',\n\t *\t\t\t\t\tvalue: [ 'styled', 'styled-light' ]\n\t *\t\t\t\t}\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t *\t\t\tmodel: 'styled',\n\t *\t\t\tview: modelAttributeValue => ( {\n\t *\t\t\t\tkey: 'class',\n\t *\t\t\t\tvalue: 'styled-' + modelAttributeValue\n\t *\t\t\t} )\n\t *\t\t} );\n\t *\n\t * **Note**: Downcasting to a style property requires providing `value` as an object:\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t *\t\t\tmodel: 'lineHeight',\n\t *\t\t\tview: modelAttributeValue => ( {\n\t *\t\t\t\tkey: 'style',\n\t *\t\t\t\tvalue: {\n\t *\t\t\t\t\t'line-height': modelAttributeValue,\n\t *\t\t\t\t\t'border-bottom': '1px dotted #ba2'\n\t *\t\t\t\t}\n\t *\t\t\t} )\n\t *\t\t} );\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @method #attributeToAttribute\n\t * @param {Object} config Conversion configuration.\n\t * @param {String|Object} config.model The key of the attribute to convert from or a `{ key, values, [ name ] }` object describing\n\t * the attribute key, possible values and, optionally, an element name to convert from.\n\t * @param {String|Object|Function} config.view A view attribute key, or a `{ key, value }` object or a function that takes\n\t * the model attribute value and {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t * as parameters and returns a `{ key, value }` object. If the `key` is `'class'`, the `value` can be a `String` or an\n\t * array of `String`s. If the `key` is `'style'`, the `value` is an object with key-value pairs. In other cases, `value` is a `String`.\n\t * If `config.model.values` is set, `config.view` should be an object assigning values from `config.model.values` to\n\t * `{ key, value }` objects or a functions.\n\t * @param {module:utils/priorities~PriorityString} [config.converterPriority='normal'] Converter priority.\n\t * @returns {module:engine/conversion/downcasthelpers~DowncastHelpers}\n\t */\n\tattributeToAttribute( config ) {\n\t\treturn this.add( downcastAttributeToAttribute( config ) );\n\t}\n\n\t/**\n\t * Model marker to view element conversion helper.\n\t *\n\t * **Note**: This method should be used mainly for editing the downcast and it is recommended\n\t * to use the {@link #markerToData `#markerToData()`} helper instead.\n\t *\n\t * This helper may produce invalid HTML code (e.g. a span between table cells).\n\t * It should only be used when you are sure that the produced HTML will be semantically correct.\n\t *\n\t * This conversion results in creating a view element on the boundaries of the converted marker. If the converted marker\n\t * is collapsed, only one element is created. For example, a model marker set like this: `<paragraph>F[oo b]ar</paragraph>`\n\t * becomes `<p>F<span data-marker=\"search\"></span>oo b<span data-marker=\"search\"></span>ar</p>` in the view.\n\t *\n\t *\t\teditor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t *\t\t\tmodel: 'search',\n\t *\t\t\tview: 'marker-search'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t *\t\t\tmodel: 'search',\n\t *\t\t\tview: 'search-result',\n\t *\t\t\tconverterPriority: 'high'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t *\t\t\tmodel: 'search',\n\t *\t\t\tview: {\n\t *\t\t\t\tname: 'span',\n\t *\t\t\t\tattributes: {\n\t *\t\t\t\t\t'data-marker': 'search'\n\t *\t\t\t\t}\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t *\t\t\tmodel: 'search',\n\t *\t\t\tview: ( markerData, conversionApi ) => {\n\t *\t\t\t\tconst { writer } = conversionApi;\n\t *\n\t *\t\t\t\treturn writer.createUIElement( 'span', {\n\t *\t\t\t\t\t'data-marker': 'search',\n\t *\t\t\t\t\t'data-start': markerData.isOpening\n\t *\t\t\t\t} );\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * If a function is passed as the `config.view` parameter, it will be used to generate both boundary elements. The function\n\t * receives the `data` object and {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t * as a parameters and should return an instance of the\n\t * {@link module:engine/view/uielement~UIElement view UI element}. The `data` object and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi `conversionApi`} are passed from\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker}. Additionally,\n\t * the `data.isOpening` parameter is passed, which is set to `true` for the marker start boundary element, and `false` for\n\t * the marker end boundary element.\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @method #markerToElement\n\t * @param {Object} config Conversion configuration.\n\t * @param {String} config.model The name of the model marker (or model marker group) to convert.\n\t * @param {module:engine/view/elementdefinition~ElementDefinition|Function} config.view A view element definition or a function that\n\t * takes the model marker data and {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t * as a parameters and returns a view UI element.\n\t * @param {module:utils/priorities~PriorityString} [config.converterPriority='normal'] Converter priority.\n\t * @returns {module:engine/conversion/downcasthelpers~DowncastHelpers}\n\t */\n\tmarkerToElement( config ) {\n\t\treturn this.add( downcastMarkerToElement( config ) );\n\t}\n\n\t/**\n\t * Model marker to highlight conversion helper.\n\t *\n\t * This conversion results in creating a highlight on view nodes. For this kind of conversion,\n\t * the {@link module:engine/conversion/downcasthelpers~HighlightDescriptor} should be provided.\n\t *\n\t * For text nodes, a `<span>` {@link module:engine/view/attributeelement~AttributeElement} is created and it wraps all text nodes\n\t * in the converted marker range. For example, a model marker set like this: `<paragraph>F[oo b]ar</paragraph>` becomes\n\t * `<p>F<span class=\"comment\">oo b</span>ar</p>` in the view.\n\t *\n\t * {@link module:engine/view/containerelement~ContainerElement} may provide a custom way of handling highlight. Most often,\n\t * the element itself is given classes and attributes described in the highlight descriptor (instead of being wrapped in `<span>`).\n\t * For example, a model marker set like this:\n\t * `[<imageInline src=\"foo.jpg\"></imageInline>]` becomes `<img src=\"foo.jpg\" class=\"comment\"></img>` in the view.\n\t *\n\t * For container elements, the conversion is two-step. While the converter processes the highlight descriptor and passes it\n\t * to a container element, it is the container element instance itself that applies values from the highlight descriptor.\n\t * So, in a sense, the converter takes care of stating what should be applied on what, while the element decides how to apply that.\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).markerToHighlight( { model: 'comment', view: { classes: 'comment' } } );\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).markerToHighlight( {\n\t *\t\t\tmodel: 'comment',\n\t *\t\t\tview: { classes: 'comment' },\n\t *\t\t\tconverterPriority: 'high'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'downcast' ).markerToHighlight( {\n\t *\t\t\tmodel: 'comment',\n\t *\t\t\tview: ( data, conversionApi ) => {\n\t *\t\t\t\t// Assuming that the marker name is in a form of comment:commentType:commentId.\n\t *\t\t\t\tconst [ , commentType, commentId ] = data.markerName.split( ':' );\n\t *\n\t *\t\t\t\treturn {\n\t *\t\t\t\t\tclasses: [ 'comment', 'comment-' + commentType ],\n\t *\t\t\t\t\tattributes: { 'data-comment-id': commentId }\n\t *\t\t\t\t};\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * If a function is passed as the `config.view` parameter, it will be used to generate the highlight descriptor. The function\n\t * receives the `data` object and {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t * as the parameters and should return a\n\t * {@link module:engine/conversion/downcasthelpers~HighlightDescriptor highlight descriptor}.\n\t * The `data` object properties are passed from {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker}.\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @method #markerToHighlight\n\t * @param {Object} config Conversion configuration.\n\t * @param {String} config.model The name of the model marker (or model marker group) to convert.\n\t * @param {module:engine/conversion/downcasthelpers~HighlightDescriptor|Function} config.view A highlight descriptor\n\t * that will be used for highlighting or a function that takes the model marker data and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as a parameters\n\t * and returns a highlight descriptor.\n\t * @param {module:utils/priorities~PriorityString} [config.converterPriority='normal'] Converter priority.\n\t * @returns {module:engine/conversion/downcasthelpers~DowncastHelpers}\n\t */\n\tmarkerToHighlight( config ) {\n\t\treturn this.add( downcastMarkerToHighlight( config ) );\n\t}\n\n\t/**\n\t * Model marker converter for data downcast.\n\t *\n\t * This conversion creates a representation for model marker boundaries in the view:\n\t *\n\t * * If the marker boundary is before or after a model element, a view attribute is set on a corresponding view element.\n\t * * In other cases, a view element with the specified tag name is inserted at the corresponding view position.\n\t *\n\t * Typically, the marker names use the `group:uniqueId:otherData` convention. For example: `comment:e34zfk9k2n459df53sjl34:zx32c`.\n\t * The default configuration for this conversion is that the first part is the `group` part and the rest of\n\t * the marker name becomes the `name` part.\n\t *\n\t * Tag and attribute names and values are generated from the marker name:\n\t *\n\t * * The templates for attributes are `data-[group]-start-before=\"[name]\"`, `data-[group]-start-after=\"[name]\"`,\n\t * `data-[group]-end-before=\"[name]\"` and `data-[group]-end-after=\"[name]\"`.\n\t * * The templates for view elements are `<[group]-start name=\"[name]\">` and `<[group]-end name=\"[name]\">`.\n\t *\n\t * Attributes mark whether the given marker's start or end boundary is before or after the given element.\n\t * The `data-[group]-start-before` and `data-[group]-end-after` attributes are favored.\n\t * The other two are used when the former two cannot be used.\n\t *\n\t * The conversion configuration can take a function that will generate different group and name parts.\n\t * If such a function is set as the `config.view` parameter, it is passed a marker name and it is expected to return an object with two\n\t * properties: `group` and `name`. If the function returns a falsy value, the conversion will not take place.\n\t *\n\t * Basic usage:\n\t *\n\t *\t\t// Using the default conversion.\n\t *\t\t// In this case, all markers with names starting with 'comment:' will be converted.\n\t *\t\t// The `group` parameter will be set to `comment`.\n\t *\t\t// The `name` parameter will be the rest of the marker name (without the `:`).\n\t *\t\teditor.conversion.for( 'dataDowncast' ).markerToData( {\n\t *\t\t\tmodel: 'comment'\n\t *\t\t} );\n\t *\n\t * An example of a view that may be generated by this conversion (assuming a marker with the name `comment:commentId:uid` marked\n\t * by `[]`):\n\t *\n\t *\t\t// Model:\n\t *\t\t<paragraph>Foo[bar</paragraph>\n\t *\t\t<imageBlock src=\"abc.jpg\"></imageBlock>]\n\t *\n\t *\t\t// View:\n\t *\t\t<p>Foo<comment-start name=\"commentId:uid\"></comment-start>bar</p>\n\t *\t\t<figure data-comment-end-after=\"commentId:uid\" class=\"image\"><img src=\"abc.jpg\" /></figure>\n\t *\n\t * In the example above, the comment starts before \"bar\" and ends after the image.\n\t *\n\t * If the `name` part is empty, the following view may be generated:\n\t *\n\t *\t\t<p>Foo <myMarker-start></myMarker-start>bar</p>\n\t *\t\t<figure data-myMarker-end-after=\"\" class=\"image\"><img src=\"abc.jpg\" /></figure>\n\t *\n\t * **Note:** A situation where some markers have the `name` part and some do not, is incorrect and should be avoided.\n\t *\n\t * Examples where `data-group-start-after` and `data-group-end-before` are used:\n\t *\n\t *\t\t// Model:\n\t *\t\t<blockQuote>[]<paragraph>Foo</paragraph></blockQuote>\n\t *\n\t *\t\t// View:\n\t *\t\t<blockquote><p data-group-end-before=\"name\" data-group-start-before=\"name\">Foo</p></blockquote>\n\t *\n\t * Similarly, when a marker is collapsed after the last element:\n\t *\n\t *\t\t// Model:\n\t *\t\t<blockQuote><paragraph>Foo</paragraph>[]</blockQuote>\n\t *\n\t *\t\t// View:\n\t *\t\t<blockquote><p data-group-end-after=\"name\" data-group-start-after=\"name\">Foo</p></blockquote>\n\t *\n\t * When there are multiple markers from the same group stored in the same attribute of the same element, their\n\t * name parts are put together in the attribute value, for example: `data-group-start-before=\"name1,name2,name3\"`.\n\t *\n\t * Other examples of usage:\n\t *\n\t *\t\t// Using a custom function which is the same as the default conversion:\n\t *\t\teditor.conversion.for( 'dataDowncast' ).markerToData( {\n\t *\t\t\tmodel: 'comment'\n\t *\t\t\tview: markerName => ( {\n\t *\t\t\t\tgroup: 'comment',\n\t *\t\t\t\tname: markerName.substr( 8 ) // Removes 'comment:' part.\n\t *\t\t\t} )\n\t *\t\t} );\n\t *\n\t *\t\t// Using the converter priority:\n\t *\t\teditor.conversion.for( 'dataDowncast' ).markerToData( {\n\t *\t\t\tmodel: 'comment'\n\t *\t\t\tview: markerName => ( {\n\t *\t\t\t\tgroup: 'comment',\n\t *\t\t\t\tname: markerName.substr( 8 ) // Removes 'comment:' part.\n\t *\t\t\t} ),\n\t *\t\t\tconverterPriority: 'high'\n\t *\t\t} );\n\t *\n\t * This kind of conversion is useful for saving data into the database, so it should be used in the data conversion pipeline.\n\t *\n\t * See the {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} API guide to learn how to\n\t * add a converter to the conversion process.\n\t *\n\t * @method #markerToData\n\t * @param {Object} config Conversion configuration.\n\t * @param {String} config.model The name of the model marker (or the model marker group) to convert.\n\t * @param {Function} [config.view] A function that takes the model marker name and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as the parameters\n\t * and returns an object with the `group` and `name` properties.\n\t * @param {module:utils/priorities~PriorityString} [config.converterPriority='normal'] Converter priority.\n\t * @returns {module:engine/conversion/downcasthelpers~DowncastHelpers}\n\t */\n\tmarkerToData( config ) {\n\t\treturn this.add( downcastMarkerToData( config ) );\n\t}\n}\n\n/**\n * Function factory that creates a default downcast converter for text insertion changes.\n *\n * The converter automatically consumes the corresponding value from the consumables list and stops the event (see\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}).\n *\n *\t\tmodelDispatcher.on( 'insert:$text', insertText() );\n *\n * @returns {Function} Insert text event converter.\n */\nexport function insertText() {\n\treturn ( evt, data, conversionApi ) => {\n\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst viewPosition = conversionApi.mapper.toViewPosition( data.range.start );\n\t\tconst viewText = viewWriter.createText( data.item.data );\n\n\t\tviewWriter.insert( viewPosition, viewText );\n\t};\n}\n\n/**\n * Function factory that creates a default downcast converter for triggering attributes and children conversion.\n *\n * @returns {Function} The converter.\n */\nexport function insertAttributesAndChildren() {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconversionApi.convertAttributes( data.item );\n\n\t\t// Start converting children of the current item.\n\t\t// In case of reconversion children were already re-inserted or converted separately.\n\t\tif ( !data.reconversion && data.item.is( 'element' ) && !data.item.isEmpty ) {\n\t\t\tconversionApi.convertChildren( data.item );\n\t\t}\n\t};\n}\n\n/**\n * Function factory that creates a default downcast converter for node remove changes.\n *\n *\t\tmodelDispatcher.on( 'remove', remove() );\n *\n * @returns {Function} Remove event converter.\n */\nexport function remove() {\n\treturn ( evt, data, conversionApi ) => {\n\t\t// Find the view range start position by mapping the model position at which the remove happened.\n\t\tconst viewStart = conversionApi.mapper.toViewPosition( data.position );\n\n\t\tconst modelEnd = data.position.getShiftedBy( data.length );\n\t\tconst viewEnd = conversionApi.mapper.toViewPosition( modelEnd, { isPhantom: true } );\n\n\t\tconst viewRange = conversionApi.writer.createRange( viewStart, viewEnd );\n\n\t\t// Trim the range to remove in case some UI elements are on the view range boundaries.\n\t\tconst removed = conversionApi.writer.remove( viewRange.getTrimmed() );\n\n\t\t// After the range is removed, unbind all view elements from the model.\n\t\t// Range inside view document fragment is used to unbind deeply.\n\t\tfor ( const child of conversionApi.writer.createRangeIn( removed ).getItems() ) {\n\t\t\tconversionApi.mapper.unbindViewElement( child, { defer: true } );\n\t\t}\n\t};\n}\n\n/**\n * Creates a `<span>` {@link module:engine/view/attributeelement~AttributeElement view attribute element} from the information\n * provided by the {@link module:engine/conversion/downcasthelpers~HighlightDescriptor highlight descriptor} object. If the priority\n * is not provided in the descriptor, the default priority will be used.\n *\n * @param {module:engine/view/downcastwriter~DowncastWriter} writer\n * @param {module:engine/conversion/downcasthelpers~HighlightDescriptor} descriptor\n * @returns {module:engine/view/attributeelement~AttributeElement}\n */\nexport function createViewElementFromHighlightDescriptor( writer, descriptor ) {\n\tconst viewElement = writer.createAttributeElement( 'span', descriptor.attributes );\n\n\tif ( descriptor.classes ) {\n\t\tviewElement._addClass( descriptor.classes );\n\t}\n\n\tif ( typeof descriptor.priority === 'number' ) {\n\t\tviewElement._priority = descriptor.priority;\n\t}\n\n\tviewElement._id = descriptor.id;\n\n\treturn viewElement;\n}\n\n/**\n * Function factory that creates a converter which converts a non-collapsed {@link module:engine/model/selection~Selection model selection}\n * to a {@link module:engine/view/documentselection~DocumentSelection view selection}. The converter consumes appropriate\n * value from the `consumable` object and maps model positions from the selection to view positions.\n *\n *\t\tmodelDispatcher.on( 'selection', convertRangeSelection() );\n *\n * @returns {Function} Selection converter.\n */\nexport function convertRangeSelection() {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst selection = data.selection;\n\n\t\tif ( selection.isCollapsed ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !conversionApi.consumable.consume( selection, 'selection' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewRanges = [];\n\n\t\tfor ( const range of selection.getRanges() ) {\n\t\t\tconst viewRange = conversionApi.mapper.toViewRange( range );\n\t\t\tviewRanges.push( viewRange );\n\t\t}\n\n\t\tconversionApi.writer.setSelection( viewRanges, { backward: selection.isBackward } );\n\t};\n}\n\n/**\n * Function factory that creates a converter which converts a collapsed {@link module:engine/model/selection~Selection model selection} to\n * a {@link module:engine/view/documentselection~DocumentSelection view selection}. The converter consumes appropriate\n * value from the `consumable` object, maps the model selection position to the view position and breaks\n * {@link module:engine/view/attributeelement~AttributeElement attribute elements} at the selection position.\n *\n *\t\tmodelDispatcher.on( 'selection', convertCollapsedSelection() );\n *\n * An example of the view state before and after converting the collapsed selection:\n *\n *\t\t <p><strong>f^oo<strong>bar</p>\n *\t\t-> <p><strong>f</strong>^<strong>oo</strong>bar</p>\n *\n * By breaking attribute elements like `<strong>`, the selection is in a correct element. Then, when the selection attribute is\n * converted, broken attributes might be merged again, or the position where the selection is may be wrapped\n * with different, appropriate attribute elements.\n *\n * See also {@link module:engine/conversion/downcasthelpers~clearAttributes} which does a clean-up\n * by merging attributes.\n *\n * @returns {Function} Selection converter.\n */\nexport function convertCollapsedSelection() {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst selection = data.selection;\n\n\t\tif ( !selection.isCollapsed ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !conversionApi.consumable.consume( selection, 'selection' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst modelPosition = selection.getFirstPosition();\n\t\tconst viewPosition = conversionApi.mapper.toViewPosition( modelPosition );\n\t\tconst brokenPosition = viewWriter.breakAttributes( viewPosition );\n\n\t\tviewWriter.setSelection( brokenPosition );\n\t};\n}\n\n/**\n * Function factory that creates a converter which clears artifacts after the previous\n * {@link module:engine/model/selection~Selection model selection} conversion. It removes all empty\n * {@link module:engine/view/attributeelement~AttributeElement view attribute elements} and merges sibling attributes at all start and end\n * positions of all ranges.\n *\n *\t\t <p><strong>^</strong></p>\n *\t\t-> <p>^</p>\n *\n *\t\t <p><strong>foo</strong>^<strong>bar</strong>bar</p>\n *\t\t-> <p><strong>foo^bar<strong>bar</p>\n *\n *\t\t <p><strong>foo</strong><em>^</em><strong>bar</strong>bar</p>\n *\t\t-> <p><strong>foo^bar<strong>bar</p>\n *\n * This listener should be assigned before any converter for the new selection:\n *\n *\t\tmodelDispatcher.on( 'selection', clearAttributes() );\n *\n * See {@link module:engine/conversion/downcasthelpers~convertCollapsedSelection}\n * which does the opposite by breaking attributes in the selection position.\n *\n * @returns {Function} Selection converter.\n */\nexport function clearAttributes() {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst viewSelection = viewWriter.document.selection;\n\n\t\tfor ( const range of viewSelection.getRanges() ) {\n\t\t\t// Not collapsed selection should not have artifacts.\n\t\t\tif ( range.isCollapsed ) {\n\t\t\t\t// Position might be in the node removed by the view writer.\n\t\t\t\tif ( range.end.parent.isAttached() ) {\n\t\t\t\t\tconversionApi.writer.mergeAttributes( range.start );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tviewWriter.setSelection( null );\n\t};\n}\n\n/**\n * Function factory that creates a converter which converts the set/change/remove attribute changes from the model to the view.\n * It can also be used to convert selection attributes. In that case, an empty attribute element will be created and the\n * selection will be put inside it.\n *\n * Attributes from the model are converted to a view element that will be wrapping these view nodes that are bound to\n * model elements having the given attribute. This is useful for attributes like `bold` that may be set on text nodes in the model\n * but are represented as an element in the view:\n *\n *\t\t[paragraph] MODEL ====> VIEW <p>\n *\t\t\t|- a {bold: true} |- <b>\n *\t\t\t|- b {bold: true} | |- ab\n *\t\t\t|- c |- c\n *\n * Passed `Function` will be provided with the attribute value and then all the parameters of the\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute` event}.\n * It is expected that the function returns an {@link module:engine/view/element~Element}.\n * The result of the function will be the wrapping element.\n * When the provided `Function` does not return any element, no conversion will take place.\n *\n * The converter automatically consumes the corresponding value from the consumables list and stops the event (see\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}).\n *\n *\t\tmodelDispatcher.on( 'attribute:bold', wrap( ( modelAttributeValue, { writer } ) => {\n *\t\t\treturn writer.createAttributeElement( 'strong' );\n *\t\t} );\n *\n * @protected\n * @param {Function} elementCreator Function returning a view element that will be used for wrapping.\n * @returns {Function} Set/change attribute converter.\n */\nexport function wrap( elementCreator ) {\n\treturn ( evt, data, conversionApi ) => {\n\t\tif ( !conversionApi.consumable.test( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Recreate current wrapping node. It will be used to unwrap view range if the attribute value has changed\n\t\t// or the attribute was removed.\n\t\tconst oldViewElement = elementCreator( data.attributeOldValue, conversionApi );\n\n\t\t// Create node to wrap with.\n\t\tconst newViewElement = elementCreator( data.attributeNewValue, conversionApi );\n\n\t\tif ( !oldViewElement && !newViewElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconversionApi.consumable.consume( data.item, evt.name );\n\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst viewSelection = viewWriter.document.selection;\n\n\t\tif ( data.item instanceof ModelSelection || data.item instanceof DocumentSelection ) {\n\t\t\t// Selection attribute conversion.\n\t\t\tviewWriter.wrap( viewSelection.getFirstRange(), newViewElement );\n\t\t} else {\n\t\t\t// Node attribute conversion.\n\t\t\tlet viewRange = conversionApi.mapper.toViewRange( data.range );\n\n\t\t\t// First, unwrap the range from current wrapper.\n\t\t\tif ( data.attributeOldValue !== null && oldViewElement ) {\n\t\t\t\tviewRange = viewWriter.unwrap( viewRange, oldViewElement );\n\t\t\t}\n\n\t\t\tif ( data.attributeNewValue !== null && newViewElement ) {\n\t\t\t\tviewWriter.wrap( viewRange, newViewElement );\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Function factory that creates a converter which converts node insertion changes from the model to the view.\n * The function passed will be provided with all the parameters of the dispatcher's\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert `insert` event}.\n * It is expected that the function returns an {@link module:engine/view/element~Element}.\n * The result of the function will be inserted into the view.\n *\n * The converter automatically consumes the corresponding value from the consumables list and binds the model and view elements.\n *\n *\t\tdowncastDispatcher.on(\n *\t\t\t'insert:myElem',\n *\t\t\tinsertElement( ( modelItem, { writer } ) => {\n *\t\t\t\tconst text = writer.createText( 'myText' );\n *\t\t\t\tconst myElem = writer.createElement( 'myElem', { myAttr: 'my-' + modelItem.getAttribute( 'myAttr' ) }, text );\n *\n *\t\t\t\t// Do something fancy with `myElem` using `modelItem` or other parameters.\n *\n *\t\t\t\treturn myElem;\n *\t\t\t}\n *\t\t) );\n *\n * @protected\n * @param {Function} elementCreator Function returning a view element, which will be inserted.\n * @param {module:engine/conversion/downcasthelpers~ConsumerFunction} [consumer] Function defining element consumption process.\n * By default this function just consume passed item insertion.\n * @returns {Function} Insert element event converter.\n */\nexport function insertElement( elementCreator, consumer = defaultConsumer ) {\n\treturn ( evt, data, conversionApi ) => {\n\t\tif ( !consumer( data.item, conversionApi.consumable, { preflight: true } ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewElement = elementCreator( data.item, conversionApi );\n\n\t\tif ( !viewElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Consume an element insertion and all present attributes that are specified as a reconversion triggers.\n\t\tconsumer( data.item, conversionApi.consumable );\n\n\t\tconst viewPosition = conversionApi.mapper.toViewPosition( data.range.start );\n\n\t\tconversionApi.mapper.bindElements( data.item, viewElement );\n\t\tconversionApi.writer.insert( viewPosition, viewElement );\n\n\t\t// Convert attributes before converting children.\n\t\tconversionApi.convertAttributes( data.item );\n\n\t\t// Convert children or reinsert previous view elements.\n\t\treinsertOrConvertNodes( viewElement, data.item.getChildren(), conversionApi, { reconversion: data.reconversion } );\n\t};\n}\n\n/**\n * Function factory that creates a converter which converts a single model node insertion to a view structure.\n *\n * It is expected that the passed element creator function returns an {@link module:engine/view/element~Element} with attached slots\n * created with `writer.createSlot()` to indicate where child nodes should be converted.\n *\n * @see module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n *\n * @protected\n * @param {module:engine/conversion/downcasthelpers~StructureCreatorFunction} elementCreator Function returning a view structure,\n * which will be inserted.\n * @param {module:engine/conversion/downcasthelpers~ConsumerFunction} consumer A callback that is expected to consume all the consumables\n * that were used by the element creator.\n * @returns {Function} Insert element event converter.\n*/\nexport function insertStructure( elementCreator, consumer ) {\n\treturn ( evt, data, conversionApi ) => {\n\t\tif ( !consumer( data.item, conversionApi.consumable, { preflight: true } ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst slotsMap = new Map();\n\n\t\tconversionApi.writer._registerSlotFactory( createSlotFactory( data.item, slotsMap, conversionApi ) );\n\n\t\t// View creation.\n\t\tconst viewElement = elementCreator( data.item, conversionApi );\n\n\t\tconversionApi.writer._clearSlotFactory();\n\n\t\tif ( !viewElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if all children are covered by slots and there is no child that landed in multiple slots.\n\t\tvalidateSlotsChildren( data.item, slotsMap, conversionApi );\n\n\t\t// Consume an element insertion and all present attributes that are specified as a reconversion triggers.\n\t\tconsumer( data.item, conversionApi.consumable );\n\n\t\tconst viewPosition = conversionApi.mapper.toViewPosition( data.range.start );\n\n\t\tconversionApi.mapper.bindElements( data.item, viewElement );\n\t\tconversionApi.writer.insert( viewPosition, viewElement );\n\n\t\t// Convert attributes before converting children.\n\t\tconversionApi.convertAttributes( data.item );\n\n\t\t// Fill view slots with previous view elements or create new ones.\n\t\tfillSlots( viewElement, slotsMap, conversionApi, { reconversion: data.reconversion } );\n\t};\n}\n\n/**\n * Function factory that creates a converter which converts marker adding change to the\n * {@link module:engine/view/uielement~UIElement view UI element}.\n *\n * The view UI element that will be added to the view depends on the passed parameter. See {@link ~insertElement}.\n * In case of a non-collapsed range, the UI element will not wrap nodes but separate elements will be placed at the beginning\n * and at the end of the range.\n *\n * This converter binds created UI elements with the marker name using {@link module:engine/conversion/mapper~Mapper#bindElementToMarker}.\n *\n * @protected\n * @param {module:engine/view/uielement~UIElement|Function} elementCreator A view UI element or a function returning the view element\n * that will be inserted.\n * @returns {Function} Insert element event converter.\n */\nexport function insertUIElement( elementCreator ) {\n\treturn ( evt, data, conversionApi ) => {\n\t\t// Create two view elements. One will be inserted at the beginning of marker, one at the end.\n\t\t// If marker is collapsed, only \"opening\" element will be inserted.\n\t\tdata.isOpening = true;\n\t\tconst viewStartElement = elementCreator( data, conversionApi );\n\n\t\tdata.isOpening = false;\n\t\tconst viewEndElement = elementCreator( data, conversionApi );\n\n\t\tif ( !viewStartElement || !viewEndElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst markerRange = data.markerRange;\n\n\t\t// Marker that is collapsed has consumable build differently that non-collapsed one.\n\t\t// For more information see `addMarker` event description.\n\t\t// If marker's range is collapsed - check if it can be consumed.\n\t\tif ( markerRange.isCollapsed && !conversionApi.consumable.consume( markerRange, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If marker's range is not collapsed - consume all items inside.\n\t\tfor ( const value of markerRange ) {\n\t\t\tif ( !conversionApi.consumable.consume( value.item, evt.name ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tconst mapper = conversionApi.mapper;\n\t\tconst viewWriter = conversionApi.writer;\n\n\t\t// Add \"opening\" element.\n\t\tviewWriter.insert( mapper.toViewPosition( markerRange.start ), viewStartElement );\n\t\tconversionApi.mapper.bindElementToMarker( viewStartElement, data.markerName );\n\n\t\t// Add \"closing\" element only if range is not collapsed.\n\t\tif ( !markerRange.isCollapsed ) {\n\t\t\tviewWriter.insert( mapper.toViewPosition( markerRange.end ), viewEndElement );\n\t\t\tconversionApi.mapper.bindElementToMarker( viewEndElement, data.markerName );\n\t\t}\n\n\t\tevt.stop();\n\t};\n}\n\n// Function factory that returns a default downcast converter for removing a {@link module:engine/view/uielement~UIElement UI element}\n// based on marker remove change.\n//\n// This converter unbinds elements from the marker name.\n//\n// @returns {Function} Removed UI element converter.\nfunction removeUIElement() {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst elements = conversionApi.mapper.markerNameToElements( data.markerName );\n\n\t\tif ( !elements ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( const element of elements ) {\n\t\t\tconversionApi.mapper.unbindElementFromMarkerName( element, data.markerName );\n\t\t\tconversionApi.writer.clear( conversionApi.writer.createRangeOn( element ), element );\n\t\t}\n\n\t\tconversionApi.writer.clearClonedElementsGroup( data.markerName );\n\n\t\tevt.stop();\n\t};\n}\n\n// Function factory that creates a default converter for model markers.\n//\n// See {@link DowncastHelpers#markerToData} for more information what type of view is generated.\n//\n// This converter binds created UI elements and affected view elements with the marker name\n// using {@link module:engine/conversion/mapper~Mapper#bindElementToMarker}.\n//\n// @returns {Function} Add marker converter.\nfunction insertMarkerData( viewCreator ) {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst viewMarkerData = viewCreator( data.markerName, conversionApi );\n\n\t\tif ( !viewMarkerData ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst markerRange = data.markerRange;\n\n\t\tif ( !conversionApi.consumable.consume( markerRange, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Adding closing data first to keep the proper order in the view.\n\t\thandleMarkerBoundary( markerRange, false, conversionApi, data, viewMarkerData );\n\t\thandleMarkerBoundary( markerRange, true, conversionApi, data, viewMarkerData );\n\n\t\tevt.stop();\n\t};\n}\n\n// Helper function for `insertMarkerData()` that marks a marker boundary at the beginning or end of given `range`.\nfunction handleMarkerBoundary( range, isStart, conversionApi, data, viewMarkerData ) {\n\tconst modelPosition = isStart ? range.start : range.end;\n\tconst elementAfter = modelPosition.nodeAfter && modelPosition.nodeAfter.is( 'element' ) ? modelPosition.nodeAfter : null;\n\tconst elementBefore = modelPosition.nodeBefore && modelPosition.nodeBefore.is( 'element' ) ? modelPosition.nodeBefore : null;\n\n\tif ( elementAfter || elementBefore ) {\n\t\tlet modelElement;\n\t\tlet isBefore;\n\n\t\t// If possible, we want to add `data-group-start-before` and `data-group-end-after` attributes.\n\t\tif ( isStart && elementAfter || !isStart && !elementBefore ) {\n\t\t\t// [<elementAfter>...</elementAfter> -> <elementAfter data-group-start-before=\"...\">...</elementAfter>\n\t\t\t// <parent>]<elementAfter> -> <parent><elementAfter data-group-end-before=\"...\">\n\t\t\tmodelElement = elementAfter;\n\t\t\tisBefore = true;\n\t\t} else {\n\t\t\t// <elementBefore>...</elementBefore>] -> <elementBefore data-group-end-after=\"...\">...</elementBefore>\n\t\t\t// </elementBefore>[</parent> -> </elementBefore data-group-start-after=\"...\"></parent>\n\t\t\tmodelElement = elementBefore;\n\t\t\tisBefore = false;\n\t\t}\n\n\t\tconst viewElement = conversionApi.mapper.toViewElement( modelElement );\n\n\t\t// In rare circumstances, the model element may be not mapped to any view element and that would cause an error.\n\t\t// One of those situations is a soft break inside code block.\n\t\tif ( viewElement ) {\n\t\t\tinsertMarkerAsAttribute( viewElement, isStart, isBefore, conversionApi, data, viewMarkerData );\n\n\t\t\treturn;\n\t\t}\n\t}\n\n\tconst viewPosition = conversionApi.mapper.toViewPosition( modelPosition );\n\n\tinsertMarkerAsElement( viewPosition, isStart, conversionApi, data, viewMarkerData );\n}\n\n// Helper function for `insertMarkerData()` that marks a marker boundary in the view as an attribute on a view element.\nfunction insertMarkerAsAttribute( viewElement, isStart, isBefore, conversionApi, data, viewMarkerData ) {\n\tconst attributeName = `data-${ viewMarkerData.group }-${ isStart ? 'start' : 'end' }-${ isBefore ? 'before' : 'after' }`;\n\n\tconst markerNames = viewElement.hasAttribute( attributeName ) ? viewElement.getAttribute( attributeName ).split( ',' ) : [];\n\n\t// Adding marker name at the beginning to have the same order in the attribute as there is with marker elements.\n\tmarkerNames.unshift( viewMarkerData.name );\n\n\tconversionApi.writer.setAttribute( attributeName, markerNames.join( ',' ), viewElement );\n\tconversionApi.mapper.bindElementToMarker( viewElement, data.markerName );\n}\n\n// Helper function for `insertMarkerData()` that marks a marker boundary in the view as a separate view ui element.\nfunction insertMarkerAsElement( position, isStart, conversionApi, data, viewMarkerData ) {\n\tconst viewElementName = `${ viewMarkerData.group }-${ isStart ? 'start' : 'end' }`;\n\n\tconst attrs = viewMarkerData.name ? { 'name': viewMarkerData.name } : null;\n\tconst viewElement = conversionApi.writer.createUIElement( viewElementName, attrs );\n\n\tconversionApi.writer.insert( position, viewElement );\n\tconversionApi.mapper.bindElementToMarker( viewElement, data.markerName );\n}\n\n// Function factory that creates a converter for removing a model marker data added by the {@link #insertMarkerData} converter.\n//\n// @returns {Function} Remove marker converter.\nfunction removeMarkerData( viewCreator ) {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst viewData = viewCreator( data.markerName, conversionApi );\n\n\t\tif ( !viewData ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elements = conversionApi.mapper.markerNameToElements( data.markerName );\n\n\t\tif ( !elements ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( const element of elements ) {\n\t\t\tconversionApi.mapper.unbindElementFromMarkerName( element, data.markerName );\n\n\t\t\tif ( element.is( 'containerElement' ) ) {\n\t\t\t\tremoveMarkerFromAttribute( `data-${ viewData.group }-start-before`, element );\n\t\t\t\tremoveMarkerFromAttribute( `data-${ viewData.group }-start-after`, element );\n\t\t\t\tremoveMarkerFromAttribute( `data-${ viewData.group }-end-before`, element );\n\t\t\t\tremoveMarkerFromAttribute( `data-${ viewData.group }-end-after`, element );\n\t\t\t} else {\n\t\t\t\tconversionApi.writer.clear( conversionApi.writer.createRangeOn( element ), element );\n\t\t\t}\n\t\t}\n\n\t\tconversionApi.writer.clearClonedElementsGroup( data.markerName );\n\n\t\tevt.stop();\n\n\t\tfunction removeMarkerFromAttribute( attributeName, element ) {\n\t\t\tif ( element.hasAttribute( attributeName ) ) {\n\t\t\t\tconst markerNames = new Set( element.getAttribute( attributeName ).split( ',' ) );\n\t\t\t\tmarkerNames.delete( viewData.name );\n\n\t\t\t\tif ( markerNames.size == 0 ) {\n\t\t\t\t\tconversionApi.writer.removeAttribute( attributeName, element );\n\t\t\t\t} else {\n\t\t\t\t\tconversionApi.writer.setAttribute( attributeName, Array.from( markerNames ).join( ',' ), element );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Function factory that creates a converter which converts the set/change/remove attribute changes from the model to the view.\n//\n// Attributes from the model are converted to the view element attributes in the view. You may provide a custom function to generate\n// a key-value attribute pair to add/change/remove. If not provided, model attributes will be converted to view element\n// attributes on a one-to-one basis.\n//\n// *Note:** The provided attribute creator should always return the same `key` for a given attribute from the model.\n//\n// The converter automatically consumes the corresponding value from the consumables list and stops the event (see\n// {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}).\n//\n//\t\tmodelDispatcher.on( 'attribute:customAttr:myElem', changeAttribute( ( value, data ) => {\n//\t\t\t// Change attribute key from `customAttr` to `class` in the view.\n//\t\t\tconst key = 'class';\n//\t\t\tlet value = data.attributeNewValue;\n//\n//\t\t\t// Force attribute value to 'empty' if the model element is empty.\n//\t\t\tif ( data.item.childCount === 0 ) {\n//\t\t\t\tvalue = 'empty';\n//\t\t\t}\n//\n//\t\t\t// Return the key-value pair.\n//\t\t\treturn { key, value };\n//\t\t} ) );\n//\n// @param {Function} [attributeCreator] Function returning an object with two properties: `key` and `value`, which\n// represent the attribute key and attribute value to be set on a {@link module:engine/view/element~Element view element}.\n// The function is passed the model attribute value as the first parameter and additional data about the change as the second parameter.\n// @returns {Function} Set/change attribute converter.\nfunction changeAttribute( attributeCreator ) {\n\treturn ( evt, data, conversionApi ) => {\n\t\tif ( !conversionApi.consumable.test( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst oldAttribute = attributeCreator( data.attributeOldValue, conversionApi );\n\t\tconst newAttribute = attributeCreator( data.attributeNewValue, conversionApi );\n\n\t\tif ( !oldAttribute && !newAttribute ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconversionApi.consumable.consume( data.item, evt.name );\n\n\t\tconst viewElement = conversionApi.mapper.toViewElement( data.item );\n\t\tconst viewWriter = conversionApi.writer;\n\n\t\t// If model item cannot be mapped to a view element, it means item is not an `Element` instance but a `TextProxy` node.\n\t\t// Only elements can have attributes in a view so do not proceed for anything else (#1587).\n\t\tif ( !viewElement ) {\n\t\t\t/**\n\t\t\t * This error occurs when a {@link module:engine/model/textproxy~TextProxy text node's} attribute is to be downcasted\n\t\t\t * by an {@link module:engine/conversion/conversion~Conversion#attributeToAttribute `Attribute to Attribute converter`}.\n\t\t\t * In most cases it is caused by converters misconfiguration when only \"generic\" converter is defined:\n\t\t\t *\n\t\t\t *\t\teditor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t\t\t *\t\t\tmodel: 'attribute-name',\n\t\t\t *\t\t\tview: 'attribute-name'\n\t\t\t *\t\t} ) );\n\t\t\t *\n\t\t\t * and given attribute is used on text node, for example:\n\t\t\t *\n\t\t\t *\t\tmodel.change( writer => {\n\t\t\t *\t\t\twriter.insertText( 'Foo', { 'attribute-name': 'bar' }, parent, 0 );\n\t\t\t *\t\t} );\n\t\t\t *\n\t\t\t * In such cases, to convert the same attribute for both {@link module:engine/model/element~Element}\n\t\t\t * and {@link module:engine/model/textproxy~TextProxy `Text`} nodes, text specific\n\t\t\t * {@link module:engine/conversion/conversion~Conversion#attributeToElement `Attribute to Element converter`}\n\t\t\t * with higher {@link module:utils/priorities~PriorityString priority} must also be defined:\n\t\t\t *\n\t\t\t *\t\teditor.conversion.for( 'downcast' ).attributeToElement( {\n\t\t\t *\t\t\tmodel: {\n\t\t\t *\t\t\t\tkey: 'attribute-name',\n\t\t\t *\t\t\t\tname: '$text'\n\t\t\t *\t\t\t},\n\t\t\t *\t\t\tview: ( value, { writer } ) => {\n\t\t\t *\t\t\t\treturn writer.createAttributeElement( 'span', { 'attribute-name': value } );\n\t\t\t *\t\t\t},\n\t\t\t *\t\t\tconverterPriority: 'high'\n\t\t\t *\t\t} ) );\n\t\t\t *\n\t\t\t * @error conversion-attribute-to-attribute-on-text\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'conversion-attribute-to-attribute-on-text', conversionApi.dispatcher, data );\n\t\t}\n\n\t\t// First remove the old attribute if there was one.\n\t\tif ( data.attributeOldValue !== null && oldAttribute ) {\n\t\t\tif ( oldAttribute.key == 'class' ) {\n\t\t\t\tconst classes = toArray( oldAttribute.value );\n\n\t\t\t\tfor ( const className of classes ) {\n\t\t\t\t\tviewWriter.removeClass( className, viewElement );\n\t\t\t\t}\n\t\t\t} else if ( oldAttribute.key == 'style' ) {\n\t\t\t\tconst keys = Object.keys( oldAttribute.value );\n\n\t\t\t\tfor ( const key of keys ) {\n\t\t\t\t\tviewWriter.removeStyle( key, viewElement );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tviewWriter.removeAttribute( oldAttribute.key, viewElement );\n\t\t\t}\n\t\t}\n\n\t\t// Then set the new attribute.\n\t\tif ( data.attributeNewValue !== null && newAttribute ) {\n\t\t\tif ( newAttribute.key == 'class' ) {\n\t\t\t\tconst classes = toArray( newAttribute.value );\n\n\t\t\t\tfor ( const className of classes ) {\n\t\t\t\t\tviewWriter.addClass( className, viewElement );\n\t\t\t\t}\n\t\t\t} else if ( newAttribute.key == 'style' ) {\n\t\t\t\tconst keys = Object.keys( newAttribute.value );\n\n\t\t\t\tfor ( const key of keys ) {\n\t\t\t\t\tviewWriter.setStyle( key, newAttribute.value[ key ], viewElement );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tviewWriter.setAttribute( newAttribute.key, newAttribute.value, viewElement );\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Function factory that creates a converter which converts the text inside marker's range. The converter wraps the text with\n// {@link module:engine/view/attributeelement~AttributeElement} created from the provided descriptor.\n// See {link module:engine/conversion/downcasthelpers~createViewElementFromHighlightDescriptor}.\n//\n// It can also be used to convert the selection that is inside a marker. In that case, an empty attribute element will be\n// created and the selection will be put inside it.\n//\n// If the highlight descriptor does not provide the `priority` property, `10` will be used.\n//\n// If the highlight descriptor does not provide the `id` property, the name of the marker will be used.\n//\n// This converter binds the created {@link module:engine/view/attributeelement~AttributeElement attribute elemens} with the marker name\n// using the {@link module:engine/conversion/mapper~Mapper#bindElementToMarker} method.\n//\n// @param {module:engine/conversion/downcasthelpers~HighlightDescriptor|Function} highlightDescriptor\n// @returns {Function}\nfunction highlightText( highlightDescriptor ) {\n\treturn ( evt, data, conversionApi ) => {\n\t\tif ( !data.item ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !( data.item instanceof ModelSelection || data.item instanceof DocumentSelection ) && !data.item.is( '$textProxy' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst descriptor = prepareDescriptor( highlightDescriptor, data, conversionApi );\n\n\t\tif ( !descriptor ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst viewElement = createViewElementFromHighlightDescriptor( viewWriter, descriptor );\n\t\tconst viewSelection = viewWriter.document.selection;\n\n\t\tif ( data.item instanceof ModelSelection || data.item instanceof DocumentSelection ) {\n\t\t\tviewWriter.wrap( viewSelection.getFirstRange(), viewElement, viewSelection );\n\t\t} else {\n\t\t\tconst viewRange = conversionApi.mapper.toViewRange( data.range );\n\t\t\tconst rangeAfterWrap = viewWriter.wrap( viewRange, viewElement );\n\n\t\t\tfor ( const element of rangeAfterWrap.getItems() ) {\n\t\t\t\tif ( element.is( 'attributeElement' ) && element.isSimilar( viewElement ) ) {\n\t\t\t\t\tconversionApi.mapper.bindElementToMarker( element, data.markerName );\n\n\t\t\t\t\t// One attribute element is enough, because all of them are bound together by the view writer.\n\t\t\t\t\t// Mapper uses this binding to get all the elements no matter how many of them are registered in the mapper.\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Converter function factory. It creates a function which applies the marker's highlight to an element inside the marker's range.\n//\n// The converter checks if an element has the `addHighlight` function stored as a\n// {@link module:engine/view/element~Element#_setCustomProperty custom property} and, if so, uses it to apply the highlight.\n// In such case the converter will consume all element's children, assuming that they were handled by the element itself.\n//\n// When the `addHighlight` custom property is not present, the element is not converted in any special way.\n// This means that converters will proceed to convert the element's child nodes.\n//\n// If the highlight descriptor does not provide the `priority` property, `10` will be used.\n//\n// If the highlight descriptor does not provide the `id` property, the name of the marker will be used.\n//\n// This converter binds altered {@link module:engine/view/containerelement~ContainerElement container elements} with the marker name using\n// the {@link module:engine/conversion/mapper~Mapper#bindElementToMarker} method.\n//\n// @param {module:engine/conversion/downcasthelpers~HighlightDescriptor|Function} highlightDescriptor\n// @returns {Function}\nfunction highlightElement( highlightDescriptor ) {\n\treturn ( evt, data, conversionApi ) => {\n\t\tif ( !data.item ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !( data.item instanceof ModelElement ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst descriptor = prepareDescriptor( highlightDescriptor, data, conversionApi );\n\n\t\tif ( !descriptor ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !conversionApi.consumable.test( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewElement = conversionApi.mapper.toViewElement( data.item );\n\n\t\tif ( viewElement && viewElement.getCustomProperty( 'addHighlight' ) ) {\n\t\t\t// Consume element itself.\n\t\t\tconversionApi.consumable.consume( data.item, evt.name );\n\n\t\t\t// Consume all children nodes.\n\t\t\tfor ( const value of ModelRange._createIn( data.item ) ) {\n\t\t\t\tconversionApi.consumable.consume( value.item, evt.name );\n\t\t\t}\n\n\t\t\tviewElement.getCustomProperty( 'addHighlight' )( viewElement, descriptor, conversionApi.writer );\n\n\t\t\tconversionApi.mapper.bindElementToMarker( viewElement, data.markerName );\n\t\t}\n\t};\n}\n\n// Function factory that creates a converter which converts the removing model marker to the view.\n//\n// Both text nodes and elements are handled by this converter but they are handled a bit differently.\n//\n// Text nodes are unwrapped using the {@link module:engine/view/attributeelement~AttributeElement attribute element} created from the\n// provided highlight descriptor. See {link module:engine/conversion/downcasthelpers~HighlightDescriptor}.\n//\n// For elements, the converter checks if an element has the `removeHighlight` function stored as a\n// {@link module:engine/view/element~Element#_setCustomProperty custom property}. If so, it uses it to remove the highlight.\n// In such case, the children of that element will not be converted.\n//\n// When `removeHighlight` is not present, the element is not converted in any special way.\n// The converter will proceed to convert the element's child nodes instead.\n//\n// If the highlight descriptor does not provide the `priority` property, `10` will be used.\n//\n// If the highlight descriptor does not provide the `id` property, the name of the marker will be used.\n//\n// This converter unbinds elements from the marker name.\n//\n// @param {module:engine/conversion/downcasthelpers~HighlightDescriptor|Function} highlightDescriptor\n// @returns {Function}\nfunction removeHighlight( highlightDescriptor ) {\n\treturn ( evt, data, conversionApi ) => {\n\t\t// This conversion makes sense only for non-collapsed range.\n\t\tif ( data.markerRange.isCollapsed ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst descriptor = prepareDescriptor( highlightDescriptor, data, conversionApi );\n\n\t\tif ( !descriptor ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// View element that will be used to unwrap `AttributeElement`s.\n\t\tconst viewHighlightElement = createViewElementFromHighlightDescriptor( conversionApi.writer, descriptor );\n\n\t\t// Get all elements bound with given marker name.\n\t\tconst elements = conversionApi.mapper.markerNameToElements( data.markerName );\n\n\t\tif ( !elements ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( const element of elements ) {\n\t\t\tconversionApi.mapper.unbindElementFromMarkerName( element, data.markerName );\n\n\t\t\tif ( element.is( 'attributeElement' ) ) {\n\t\t\t\tconversionApi.writer.unwrap( conversionApi.writer.createRangeOn( element ), viewHighlightElement );\n\t\t\t} else {\n\t\t\t\t// if element.is( 'containerElement' ).\n\t\t\t\telement.getCustomProperty( 'removeHighlight' )( element, descriptor.id, conversionApi.writer );\n\t\t\t}\n\t\t}\n\n\t\tconversionApi.writer.clearClonedElementsGroup( data.markerName );\n\n\t\tevt.stop();\n\t};\n}\n\n// Model element to view element conversion helper.\n//\n// See {@link ~DowncastHelpers#elementToElement `.elementToElement()` downcast helper} for examples and config params description.\n//\n// @param {Object} config Conversion configuration.\n// @param {String|Object} config.model The description or a name of the model element to convert.\n// @param {String|Array.<String>} [config.model.attributes] List of attributes triggering element reconversion.\n// @param {Boolean} [config.model.children] Should reconvert element if the list of model child nodes changed.\n// @param {module:engine/view/elementdefinition~ElementDefinition|Function} config.view\n// @returns {Function} Conversion helper.\nfunction downcastElementToElement( config ) {\n\tconfig = cloneDeep( config );\n\n\tconfig.model = normalizeModelElementConfig( config.model );\n\tconfig.view = normalizeToElementConfig( config.view, 'container' );\n\n\t// Trigger reconversion on children list change if element is a subject to any reconversion.\n\t// This is required to be able to trigger Differ#refreshItem() on a direct child of the reconverted element.\n\tif ( config.model.attributes.length ) {\n\t\tconfig.model.children = true;\n\t}\n\n\treturn dispatcher => {\n\t\tdispatcher.on(\n\t\t\t'insert:' + config.model.name,\n\t\t\tinsertElement( config.view, createConsumer( config.model ) ),\n\t\t\t{ priority: config.converterPriority || 'normal' }\n\t\t);\n\n\t\tif ( config.model.children || config.model.attributes.length ) {\n\t\t\tdispatcher.on( 'reduceChanges', createChangeReducer( config.model ), { priority: 'low' } );\n\t\t}\n\t};\n}\n\n// Model element to view structure conversion helper.\n//\n// See {@link ~DowncastHelpers#elementToStructure `.elementToStructure()` downcast helper} for examples and config params description.\n//\n// @param {Object} config Conversion configuration.\n// @param {String|Object} config.model\n// @param {String} [config.model.name]\n// @param {Array.<String>} [config.model.attributes]\n// @param {module:engine/conversion/downcasthelpers~StructureCreatorFunction} config.view\n// @returns {Function} Conversion helper.\nfunction downcastElementToStructure( config ) {\n\tconfig = cloneDeep( config );\n\n\tconfig.model = normalizeModelElementConfig( config.model );\n\tconfig.view = normalizeToElementConfig( config.view, 'container' );\n\n\t// Trigger reconversion on children list change because it always needs to use slots to put children in proper places.\n\t// This is required to be able to trigger Differ#refreshItem() on a direct child of the reconverted element.\n\tconfig.model.children = true;\n\n\treturn dispatcher => {\n\t\tif ( dispatcher._conversionApi.schema.checkChild( config.model.name, '$text' ) ) {\n\t\t\t/**\n\t\t\t * This error occurs when a {@link module:engine/model/element~Element model element} is downcasted\n\t\t\t * via {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure} helper but the element was\n\t\t\t * allowed to host `$text` by the {@link module:engine/model/schema~Schema model schema}.\n\t\t\t *\n\t\t\t * For instance, this may be the result of `myElement` allowing the content of\n\t\t\t * {@glink framework/guides/deep-dive/schema#generic-items `$block`} in its schema definition:\n\t\t\t *\n\t\t\t *\t\t// Element definition in schema.\n\t\t\t *\t\tschema.register( 'myElement', {\n\t\t\t *\t\t\tallowContentOf: '$block',\n\t\t\t *\n\t\t\t *\t\t\t// ...\n\t\t\t *\t\t} );\n\t\t\t *\n\t\t\t *\t\t// ...\n\t\t\t *\n\t\t\t *\t\t// Conversion of myElement with the use of elementToStructure().\n\t\t\t *\t\teditor.conversion.for( 'downcast' ).elementToStructure( {\n\t\t\t *\t\t\tmodel: 'myElement',\n\t\t\t *\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t *\t\t\t\t// ...\n\t\t\t *\t\t\t}\n\t\t\t *\t\t} );\n\t\t\t *\n\t\t\t * In such case, {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`} helper\n\t\t\t * can be used instead to get around this problem:\n\t\t\t *\n\t\t\t *\t\teditor.conversion.for( 'downcast' ).elementToElement( {\n\t\t\t *\t\t\tmodel: 'myElement',\n\t\t\t *\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t *\t\t\t\t// ...\n\t\t\t *\t\t\t}\n\t\t\t *\t\t} );\n\t\t\t *\n\t\t\t * @error conversion-element-to-structure-disallowed-text\n\t\t\t * @param {String} elementName The name of the element the structure is to be created for.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'conversion-element-to-structure-disallowed-text', dispatcher, { elementName: config.model.name } );\n\t\t}\n\n\t\tdispatcher.on(\n\t\t\t'insert:' + config.model.name,\n\t\t\tinsertStructure( config.view, createConsumer( config.model ) ),\n\t\t\t{ priority: config.converterPriority || 'normal' }\n\t\t);\n\n\t\tdispatcher.on( 'reduceChanges', createChangeReducer( config.model ), { priority: 'low' } );\n\t};\n}\n\n// Model attribute to view element conversion helper.\n//\n// See {@link ~DowncastHelpers#attributeToElement `.attributeToElement()` downcast helper} for examples.\n//\n// @param {Object} config Conversion configuration.\n// @param {String|Object} config.model The key of the attribute to convert from or a `{ key, values }` object. `values` is an array\n// of `String`s with possible values if the model attribute is an enumerable.\n// @param {module:engine/view/elementdefinition~ElementDefinition|Function|Object} config.view A view element definition or a function\n// that takes the model attribute value and {@link module:engine/view/downcastwriter~DowncastWriter view downcast writer}\n// as parameters and returns a view attribute element. If `config.model.values` is\n// given, `config.view` should be an object assigning values from `config.model.values` to view element definitions or functions.\n// @param {module:utils/priorities~PriorityString} [config.converterPriority='normal'] Converter priority.\n// @returns {Function} Conversion helper.\nfunction downcastAttributeToElement( config ) {\n\tconfig = cloneDeep( config );\n\n\tconst modelKey = config.model.key ? config.model.key : config.model;\n\tlet eventName = 'attribute:' + modelKey;\n\n\tif ( config.model.name ) {\n\t\teventName += ':' + config.model.name;\n\t}\n\n\tif ( config.model.values ) {\n\t\tfor ( const modelValue of config.model.values ) {\n\t\t\tconfig.view[ modelValue ] = normalizeToElementConfig( config.view[ modelValue ], 'attribute' );\n\t\t}\n\t} else {\n\t\tconfig.view = normalizeToElementConfig( config.view, 'attribute' );\n\t}\n\n\tconst elementCreator = getFromAttributeCreator( config );\n\n\treturn dispatcher => {\n\t\tdispatcher.on( eventName, wrap( elementCreator ), { priority: config.converterPriority || 'normal' } );\n\t};\n}\n\n// Model attribute to view attribute conversion helper.\n//\n// See {@link ~DowncastHelpers#attributeToAttribute `.attributeToAttribute()` downcast helper} for examples.\n//\n// @param {Object} config Conversion configuration.\n// @param {String|Object} config.model The key of the attribute to convert from or a `{ key, values, [ name ] }` object describing\n// the attribute key, possible values and, optionally, an element name to convert from.\n// @param {String|Object|Function} config.view A view attribute key, or a `{ key, value }` object or a function that takes\n// the model attribute value and returns a `{ key, value }` object. If `key` is `'class'`, `value` can be a `String` or an\n// array of `String`s. If `key` is `'style'`, `value` is an object with key-value pairs. In other cases, `value` is a `String`.\n// If `config.model.values` is set, `config.view` should be an object assigning values from `config.model.values` to\n// `{ key, value }` objects or a functions.\n// @param {module:utils/priorities~PriorityString} [config.converterPriority='normal'] Converter priority.\n// @returns {Function} Conversion helper.\nfunction downcastAttributeToAttribute( config ) {\n\tconfig = cloneDeep( config );\n\n\tconst modelKey = config.model.key ? config.model.key : config.model;\n\tlet eventName = 'attribute:' + modelKey;\n\n\tif ( config.model.name ) {\n\t\teventName += ':' + config.model.name;\n\t}\n\n\tif ( config.model.values ) {\n\t\tfor ( const modelValue of config.model.values ) {\n\t\t\tconfig.view[ modelValue ] = normalizeToAttributeConfig( config.view[ modelValue ] );\n\t\t}\n\t} else {\n\t\tconfig.view = normalizeToAttributeConfig( config.view );\n\t}\n\n\tconst elementCreator = getFromAttributeCreator( config );\n\n\treturn dispatcher => {\n\t\tdispatcher.on( eventName, changeAttribute( elementCreator ), { priority: config.converterPriority || 'normal' } );\n\t};\n}\n\n// Model marker to view element conversion helper.\n//\n// See {@link ~DowncastHelpers#markerToElement `.markerToElement()` downcast helper} for examples.\n//\n// @param {Object} config Conversion configuration.\n// @param {String} config.model The name of the model marker (or model marker group) to convert.\n// @param {module:engine/view/elementdefinition~ElementDefinition|Function} config.view A view element definition or a function\n// that takes the model marker data as a parameter and returns a view UI element.\n// @param {module:utils/priorities~PriorityString} [config.converterPriority='normal'] Converter priority.\n// @returns {Function} Conversion helper.\nfunction downcastMarkerToElement( config ) {\n\tconfig = cloneDeep( config );\n\n\tconfig.view = normalizeToElementConfig( config.view, 'ui' );\n\n\treturn dispatcher => {\n\t\tdispatcher.on( 'addMarker:' + config.model, insertUIElement( config.view ), { priority: config.converterPriority || 'normal' } );\n\t\tdispatcher.on( 'removeMarker:' + config.model, removeUIElement( config.view ), { priority: config.converterPriority || 'normal' } );\n\t};\n}\n\n// Model marker to view data conversion helper.\n//\n// See {@link ~DowncastHelpers#markerToData `markerToData()` downcast helper} to learn more.\n//\n// @param {Object} config\n// @param {String} config.model\n// @param {Function} [config.view]\n// @param {module:utils/priorities~PriorityString} [config.converterPriority='normal']\n// @returns {Function} Conversion helper.\nfunction downcastMarkerToData( config ) {\n\tconfig = cloneDeep( config );\n\n\tconst group = config.model;\n\n\t// Default conversion.\n\tif ( !config.view ) {\n\t\tconfig.view = markerName => ( {\n\t\t\tgroup,\n\t\t\tname: markerName.substr( config.model.length + 1 )\n\t\t} );\n\t}\n\n\treturn dispatcher => {\n\t\tdispatcher.on( 'addMarker:' + group, insertMarkerData( config.view ), { priority: config.converterPriority || 'normal' } );\n\t\tdispatcher.on( 'removeMarker:' + group, removeMarkerData( config.view ), { priority: config.converterPriority || 'normal' } );\n\t};\n}\n\n// Model marker to highlight conversion helper.\n//\n// See {@link ~DowncastHelpers#markerToElement `.markerToElement()` downcast helper} for examples.\n//\n// @param {Object} config Conversion configuration.\n// @param {String} config.model The name of the model marker (or model marker group) to convert.\n// @param {module:engine/conversion/downcasthelpers~HighlightDescriptor|Function} config.view A highlight descriptor\n// that will be used for highlighting or a function that takes the model marker data as a parameter and returns a highlight descriptor.\n// @param {module:utils/priorities~PriorityString} [config.converterPriority='normal'] Converter priority.\n// @returns {Function} Conversion helper.\nfunction downcastMarkerToHighlight( config ) {\n\treturn dispatcher => {\n\t\tdispatcher.on( 'addMarker:' + config.model, highlightText( config.view ), { priority: config.converterPriority || 'normal' } );\n\t\tdispatcher.on( 'addMarker:' + config.model, highlightElement( config.view ), { priority: config.converterPriority || 'normal' } );\n\t\tdispatcher.on( 'removeMarker:' + config.model, removeHighlight( config.view ), { priority: config.converterPriority || 'normal' } );\n\t};\n}\n\n// Takes `config.model`, and converts it to an object with normalized structure.\n//\n// @param {String|Object} model Model configuration or element name.\n// @param {String} model.name\n// @param {Array.<String>} [model.attributes]\n// @param {Boolean} [model.children]\n// @returns {Object}\nfunction normalizeModelElementConfig( model ) {\n\tif ( typeof model == 'string' ) {\n\t\tmodel = { name: model };\n\t}\n\n\t// List of attributes that should trigger reconversion.\n\tif ( !model.attributes ) {\n\t\tmodel.attributes = [];\n\t} else if ( !Array.isArray( model.attributes ) ) {\n\t\tmodel.attributes = [ model.attributes ];\n\t}\n\n\t// Whether a children insertion/deletion should trigger reconversion.\n\tmodel.children = !!model.children;\n\n\treturn model;\n}\n\n// Takes `config.view`, and if it is an {@link module:engine/view/elementdefinition~ElementDefinition}, converts it\n// to a function (because lower level converters accept only element creator functions).\n//\n// @param {module:engine/view/elementdefinition~ElementDefinition|Function} view View configuration.\n// @param {'container'|'attribute'|'ui'} viewElementType View element type to create.\n// @returns {Function} Element creator function to use in lower level converters.\nfunction normalizeToElementConfig( view, viewElementType ) {\n\tif ( typeof view == 'function' ) {\n\t\t// If `view` is already a function, don't do anything.\n\t\treturn view;\n\t}\n\n\treturn ( modelData, conversionApi ) => createViewElementFromDefinition( view, conversionApi, viewElementType );\n}\n\n// Creates a view element instance from the provided {@link module:engine/view/elementdefinition~ElementDefinition} and class.\n//\n// @param {module:engine/view/elementdefinition~ElementDefinition} viewElementDefinition\n// @param {module:engine/view/downcastwriter~DowncastWriter} viewWriter\n// @param {'container'|'attribute'|'ui'} viewElementType\n// @returns {module:engine/view/element~Element}\nfunction createViewElementFromDefinition( viewElementDefinition, conversionApi, viewElementType ) {\n\tif ( typeof viewElementDefinition == 'string' ) {\n\t\t// If `viewElementDefinition` is given as a `String`, normalize it to an object with `name` property.\n\t\tviewElementDefinition = { name: viewElementDefinition };\n\t}\n\n\tlet element;\n\tconst viewWriter = conversionApi.writer;\n\tconst attributes = Object.assign( {}, viewElementDefinition.attributes );\n\n\tif ( viewElementType == 'container' ) {\n\t\telement = viewWriter.createContainerElement( viewElementDefinition.name, attributes );\n\t} else if ( viewElementType == 'attribute' ) {\n\t\tconst options = {\n\t\t\tpriority: viewElementDefinition.priority || ViewAttributeElement.DEFAULT_PRIORITY\n\t\t};\n\n\t\telement = viewWriter.createAttributeElement( viewElementDefinition.name, attributes, options );\n\t} else {\n\t\t// 'ui'.\n\t\telement = viewWriter.createUIElement( viewElementDefinition.name, attributes );\n\t}\n\n\tif ( viewElementDefinition.styles ) {\n\t\tconst keys = Object.keys( viewElementDefinition.styles );\n\n\t\tfor ( const key of keys ) {\n\t\t\tviewWriter.setStyle( key, viewElementDefinition.styles[ key ], element );\n\t\t}\n\t}\n\n\tif ( viewElementDefinition.classes ) {\n\t\tconst classes = viewElementDefinition.classes;\n\n\t\tif ( typeof classes == 'string' ) {\n\t\t\tviewWriter.addClass( classes, element );\n\t\t} else {\n\t\t\tfor ( const className of classes ) {\n\t\t\t\tviewWriter.addClass( className, element );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn element;\n}\n\nfunction getFromAttributeCreator( config ) {\n\tif ( config.model.values ) {\n\t\treturn ( modelAttributeValue, conversionApi ) => {\n\t\t\tconst view = config.view[ modelAttributeValue ];\n\n\t\t\tif ( view ) {\n\t\t\t\treturn view( modelAttributeValue, conversionApi );\n\t\t\t}\n\n\t\t\treturn null;\n\t\t};\n\t} else {\n\t\treturn config.view;\n\t}\n}\n\n// Takes the configuration, adds default parameters if they do not exist and normalizes other parameters to be used in downcast converters\n// for generating a view attribute.\n//\n// @param {Object} view View configuration.\nfunction normalizeToAttributeConfig( view ) {\n\tif ( typeof view == 'string' ) {\n\t\treturn modelAttributeValue => ( { key: view, value: modelAttributeValue } );\n\t} else if ( typeof view == 'object' ) {\n\t\t// { key, value, ... }\n\t\tif ( view.value ) {\n\t\t\treturn () => view;\n\t\t}\n\t\t// { key, ... }\n\t\telse {\n\t\t\treturn modelAttributeValue => ( { key: view.key, value: modelAttributeValue } );\n\t\t}\n\t} else {\n\t\t// function.\n\t\treturn view;\n\t}\n}\n\n// Helper function for `highlight`. Prepares the actual descriptor object using value passed to the converter.\nfunction prepareDescriptor( highlightDescriptor, data, conversionApi ) {\n\t// If passed descriptor is a creator function, call it. If not, just use passed value.\n\tconst descriptor = typeof highlightDescriptor == 'function' ?\n\t\thighlightDescriptor( data, conversionApi ) :\n\t\thighlightDescriptor;\n\n\tif ( !descriptor ) {\n\t\treturn null;\n\t}\n\n\t// Apply default descriptor priority.\n\tif ( !descriptor.priority ) {\n\t\tdescriptor.priority = 10;\n\t}\n\n\t// Default descriptor id is marker name.\n\tif ( !descriptor.id ) {\n\t\tdescriptor.id = data.markerName;\n\t}\n\n\treturn descriptor;\n}\n\n// Creates a function that checks a single differ diff item whether it should trigger reconversion.\n//\n// @param {Object} model A normalized `config.model` converter configuration.\n// @param {String} model.name The name of element.\n// @param {Array.<String>} model.attributes The list of attribute names that should trigger reconversion.\n// @param {Boolean} [model.children] Whether the child list change should trigger reconversion.\n// @returns {Function}\nfunction createChangeReducerCallback( model ) {\n\treturn ( node, change ) => {\n\t\tif ( !node.is( 'element', model.name ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( change.type == 'attribute' ) {\n\t\t\tif ( model.attributes.includes( change.attributeKey ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\t/* istanbul ignore else: This is always true because otherwise it would not register a reducer callback. */\n\t\t\tif ( model.children ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n}\n\n// Creates a `reduceChanges` event handler for reconversion.\n//\n// @param {Object} model A normalized `config.model` converter configuration.\n// @param {String} model.name The name of element.\n// @param {Array.<String>} model.attributes The list of attribute names that should trigger reconversion.\n// @param {Boolean} [model.children] Whether the child list change should trigger reconversion.\n// @returns {Function}\nfunction createChangeReducer( model ) {\n\tconst shouldReplace = createChangeReducerCallback( model );\n\n\treturn ( evt, data ) => {\n\t\tconst reducedChanges = [];\n\n\t\tif ( !data.reconvertedElements ) {\n\t\t\tdata.reconvertedElements = new Set();\n\t\t}\n\n\t\tfor ( const change of data.changes ) {\n\t\t\t// For attribute use node affected by the change.\n\t\t\t// For insert or remove use parent element because we need to check if it's added/removed child.\n\t\t\tconst node = change.position ? change.position.parent : change.range.start.nodeAfter;\n\n\t\t\tif ( !node || !shouldReplace( node, change ) ) {\n\t\t\t\treducedChanges.push( change );\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If it's already marked for reconversion, so skip this change, otherwise add the diff items.\n\t\t\tif ( !data.reconvertedElements.has( node ) ) {\n\t\t\t\tdata.reconvertedElements.add( node );\n\n\t\t\t\tconst position = ModelPosition._createBefore( node );\n\n\t\t\t\treducedChanges.push( {\n\t\t\t\t\ttype: 'remove',\n\t\t\t\t\tname: node.name,\n\t\t\t\t\tposition,\n\t\t\t\t\tlength: 1\n\t\t\t\t}, {\n\t\t\t\t\ttype: 'reinsert',\n\t\t\t\t\tname: node.name,\n\t\t\t\t\tposition,\n\t\t\t\t\tlength: 1\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\tdata.changes = reducedChanges;\n\t};\n}\n\n// Creates a function that checks if an element and its watched attributes can be consumed and consumes them.\n//\n// @param {Object} model A normalized `config.model` converter configuration.\n// @param {String} model.name The name of element.\n// @param {Array.<String>} model.attributes The list of attribute names that should trigger reconversion.\n// @param {Boolean} [model.children] Whether the child list change should trigger reconversion.\n// @returns {module:engine/conversion/downcasthelpers~ConsumerFunction}\nfunction createConsumer( model ) {\n\treturn ( node, consumable, options = {} ) => {\n\t\tconst events = [ 'insert' ];\n\n\t\t// Collect all set attributes that are triggering conversion.\n\t\tfor ( const attributeName of model.attributes ) {\n\t\t\tif ( node.hasAttribute( attributeName ) ) {\n\t\t\t\tevents.push( `attribute:${ attributeName }` );\n\t\t\t}\n\t\t}\n\n\t\tif ( !events.every( event => consumable.test( node, event ) ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !options.preflight ) {\n\t\t\tevents.forEach( event => consumable.consume( node, event ) );\n\t\t}\n\n\t\treturn true;\n\t};\n}\n\n// Creates a function that create view slots.\n//\n// @param {module:engine/model/element~Element} element\n// @param {Map.<module:engine/view/element~Element,Array.<module:engine/model/node~Node>>} slotsMap\n// @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi\n// @returns {Function} Exposed by writer as createSlot().\nfunction createSlotFactory( element, slotsMap, conversionApi ) {\n\treturn ( writer, modeOrFilter = 'children' ) => {\n\t\tconst slot = writer.createContainerElement( '$slot' );\n\n\t\tlet children = null;\n\n\t\tif ( modeOrFilter === 'children' ) {\n\t\t\tchildren = Array.from( element.getChildren() );\n\t\t} else if ( typeof modeOrFilter == 'function' ) {\n\t\t\tchildren = Array.from( element.getChildren() ).filter( element => modeOrFilter( element ) );\n\t\t} else {\n\t\t\t/**\n\t\t\t * Unknown slot mode was provided to `writer.createSlot()` in downcast converter.\n\t\t\t *\n\t\t\t * @error conversion-slot-mode-unknown\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'conversion-slot-mode-unknown', conversionApi.dispatcher, { modeOrFilter } );\n\t\t}\n\n\t\tslotsMap.set( slot, children );\n\n\t\treturn slot;\n\t};\n}\n\n// Checks if all children are covered by slots and there is no child that landed in multiple slots.\n//\n// @param {module:engine/model/element~Element}\n// @param {Map.<module:engine/view/element~Element,Array.<module:engine/model/node~Node>>} slotsMap\n// @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi\nfunction validateSlotsChildren( element, slotsMap, conversionApi ) {\n\tconst childrenInSlots = Array.from( slotsMap.values() ).flat();\n\tconst uniqueChildrenInSlots = new Set( childrenInSlots );\n\n\tif ( uniqueChildrenInSlots.size != childrenInSlots.length ) {\n\t\t/**\n\t\t * Filters provided to `writer.createSlot()` overlap (at least two filters accept the same child element).\n\t\t *\n\t\t * @error conversion-slot-filter-overlap\n\t\t * @param {module:engine/model/element~Element} element The element of which children would not be properly\n\t\t * allocated to multiple slots.\n\t\t */\n\t\tthrow new CKEditorError( 'conversion-slot-filter-overlap', conversionApi.dispatcher, { element } );\n\t}\n\n\tif ( uniqueChildrenInSlots.size != element.childCount ) {\n\t\t/**\n\t\t * Filters provided to `writer.createSlot()` are incomplete and exclude at least one children element (one of\n\t\t * the children elements would not be assigned to any of the slots).\n\t\t *\n\t\t * @error conversion-slot-filter-incomplete\n\t\t * @param {module:engine/model/element~Element} element The element of which children would not be properly\n\t\t * allocated to multiple slots.\n\t\t */\n\t\tthrow new CKEditorError( 'conversion-slot-filter-incomplete', conversionApi.dispatcher, { element } );\n\t}\n}\n\n// Fill slots with appropriate view elements.\n//\n// @param {module:engine/view/element~Element} viewElement\n// @param {Map.<module:engine/view/element~Element,Array.<module:engine/model/node~Node>>} slotsMap\n// @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi\n// @param {Object} options\n// @param {Boolean} [options.reconversion]\nfunction fillSlots( viewElement, slotsMap, conversionApi, options ) {\n\t// Set temporary position mapping to redirect child view elements into a proper slots.\n\tconversionApi.mapper.on( 'modelToViewPosition', toViewPositionMapping, { priority: 'highest' } );\n\n\tlet currentSlot = null;\n\tlet currentSlotNodes = null;\n\n\t// Fill slots with nested view nodes.\n\tfor ( [ currentSlot, currentSlotNodes ] of slotsMap ) {\n\t\treinsertOrConvertNodes( viewElement, currentSlotNodes, conversionApi, options );\n\n\t\tconversionApi.writer.move(\n\t\t\tconversionApi.writer.createRangeIn( currentSlot ),\n\t\t\tconversionApi.writer.createPositionBefore( currentSlot )\n\t\t);\n\t\tconversionApi.writer.remove( currentSlot );\n\t}\n\n\tconversionApi.mapper.off( 'modelToViewPosition', toViewPositionMapping );\n\n\tfunction toViewPositionMapping( evt, data ) {\n\t\tconst element = data.modelPosition.nodeAfter;\n\n\t\t// Find the proper offset within the slot.\n\t\tconst index = currentSlotNodes.indexOf( element );\n\n\t\tif ( index < 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdata.viewPosition = data.mapper.findPositionIn( currentSlot, index );\n\t}\n}\n\n// Inserts view representation of `nodes` into the `viewElement` either by bringing back just removed view nodes\n// or by triggering conversion for them.\n//\n// @param {module:engine/view/element~Element} viewElement\n// @param {Iterable.<module:engine/model/element~Element>} modelNodes\n// @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi\n// @param {Object} options\n// @param {Boolean} [options.reconversion]\nfunction reinsertOrConvertNodes( viewElement, modelNodes, conversionApi, options ) {\n\t// Fill with nested view nodes.\n\tfor ( const modelChildNode of modelNodes ) {\n\t\t// Try reinserting the view node for the specified model node...\n\t\tif ( !reinsertNode( viewElement.root, modelChildNode, conversionApi, options ) ) {\n\t\t\t// ...or else convert the model element to the view.\n\t\t\tconversionApi.convertItem( modelChildNode );\n\t\t}\n\t}\n}\n\n// Checks if the view for the given model element could be reused and reinserts it to the view.\n//\n// @param {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment} viewRoot\n// @param {module:engine/model/element~Element} modelElement\n// @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi\n// @param {Object} options\n// @param {Boolean} [options.reconversion]\n// @returns {Boolean} `false` if view element can't be reused.\nfunction reinsertNode( viewRoot, modelElement, conversionApi, options ) {\n\tconst { writer, mapper } = conversionApi;\n\n\t// Don't reinsert if this is not a reconversion...\n\tif ( !options.reconversion ) {\n\t\treturn false;\n\t}\n\n\tconst viewChildNode = mapper.toViewElement( modelElement );\n\n\t// ...or there is no view to reinsert or it was already inserted to the view structure...\n\tif ( !viewChildNode || viewChildNode.root == viewRoot ) {\n\t\treturn false;\n\t}\n\n\t// ...or it was strictly marked as not to be reused.\n\tif ( !conversionApi.canReuseView( viewChildNode ) ) {\n\t\treturn false;\n\t}\n\n\t// Otherwise reinsert the view node.\n\twriter.move(\n\t\twriter.createRangeOn( viewChildNode ),\n\t\tmapper.toViewPosition( ModelPosition._createBefore( modelElement ) )\n\t);\n\n\treturn true;\n}\n\n// The default consumer for insert events.\n// @param {module:engine/model/item~Item} item Model item.\n// @param {module:engine/conversion/modelconsumable~ModelConsumable} consumable The model consumable.\n// @param {Object} [options]\n// @param {Boolean} [options.preflight=false] Whether should consume or just check if can be consumed.\n// @returns {Boolean}\nfunction defaultConsumer( item, consumable, { preflight } = {} ) {\n\tif ( preflight ) {\n\t\treturn consumable.test( item, 'insert' );\n\t} else {\n\t\treturn consumable.consume( item, 'insert' );\n\t}\n}\n\n/**\n * An object describing how the marker highlight should be represented in the view.\n *\n * Each text node contained in a highlighted range will be wrapped in a `<span>`\n * {@link module:engine/view/attributeelement~AttributeElement view attribute element} with CSS class(es), attributes and a priority\n * described by this object.\n *\n * Additionally, each {@link module:engine/view/containerelement~ContainerElement container element} can handle displaying the highlight\n * separately by providing the `addHighlight` and `removeHighlight` custom properties. In this case:\n *\n * * The `HighlightDescriptor` object is passed to the `addHighlight` function upon conversion and should be used to apply the highlight to\n * the element.\n * * The descriptor `id` is passed to the `removeHighlight` function upon conversion and should be used to remove the highlight with the\n * given ID from the element.\n *\n * @typedef {Object} module:engine/conversion/downcasthelpers~HighlightDescriptor\n *\n * @property {String|Array.<String>} classes A CSS class or an array of classes to set. If the descriptor is used to\n * create an {@link module:engine/view/attributeelement~AttributeElement attribute element} over text nodes, these classes will be set\n * on that attribute element. If the descriptor is applied to an element, usually these classes will be set on that element, however,\n * this depends on how the element converts the descriptor.\n *\n * @property {String} [id] Descriptor identifier. If not provided, it defaults to the converted marker's name.\n *\n * @property {Number} [priority] Descriptor priority. If not provided, it defaults to `10`. If the descriptor is used to create\n * an {@link module:engine/view/attributeelement~AttributeElement attribute element}, it will be that element's\n * {@link module:engine/view/attributeelement~AttributeElement#priority priority}. If the descriptor is applied to an element,\n * the priority will be used to determine which descriptor is more important.\n *\n * @property {Object} [attributes] Attributes to set. If the descriptor is used to create\n * an {@link module:engine/view/attributeelement~AttributeElement attribute element} over text nodes, these attributes will be set on that\n * attribute element. If the descriptor is applied to an element, usually these attributes will be set on that element, however,\n * this depends on how the element converts the descriptor.\n */\n\n/**\n * A filtering function used to choose model child nodes to be downcasted into the specific view\n * {@link module:engine/view/downcastwriter~DowncastWriter#createSlot \"slot\"} while executing the\n * {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure `elementToStructure()`} converter.\n *\n * @callback module:engine/conversion/downcasthelpers~SlotFilter\n *\n * @param {module:engine/model/node~Node} node A model node.\n * @returns {Boolean} Whether the provided model node should be downcasted into this slot.\n *\n * @see module:engine/view/downcastwriter~DowncastWriter#createSlot\n * @see module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n * @see module:engine/conversion/downcasthelpers~insertStructure\n */\n\n/**\n * A function that takes the model element and {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast\n * conversion API} as parameters and returns a view container element with slots for model child nodes to be converted into.\n *\n * @callback module:engine/conversion/downcasthelpers~StructureCreatorFunction\n * @param {module:engine/model/element~Element} element The model element to be converted to the view structure.\n * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi The conversion interface.\n * @returns {module:engine/view/element~Element} The view structure with slots for model child nodes.\n *\n * @see module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n * @see module:engine/conversion/downcasthelpers~insertStructure\n */\n\n/**\n * A function that is expected to consume all the consumables that were used by the element creator.\n *\n * @callback module:engine/conversion/downcasthelpers~ConsumerFunction\n * @param {module:engine/model/element~Element} element The model element to be converted to the view structure.\n * @param {module:engine/conversion/modelconsumable~ModelConsumable} consumable The `ModelConsumable` same as in\n * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi#consumable `DowncastConversionApi.consumable`}.\n * @param {Object} [options]\n * @param {Boolean} [options.preflight=false] Whether should consume or just check if can be consumed.\n * @returns {Boolean} `true` if all consumable values were available and were consumed, `false` otherwise.\n *\n * @see module:engine/conversion/downcasthelpers~insertStructure\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/utils/autoparagraphing\n */\n\n/**\n * Fixes all empty roots.\n *\n * @protected\n * @param {module:engine/model/writer~Writer} writer The model writer.\n * @returns {Boolean} `true` if any change has been applied, `false` otherwise.\n */\nexport function autoParagraphEmptyRoots( writer ) {\n\tconst { schema, document } = writer.model;\n\n\tfor ( const rootName of document.getRootNames() ) {\n\t\tconst root = document.getRoot( rootName );\n\n\t\tif ( root.isEmpty && !schema.checkChild( root, '$text' ) ) {\n\t\t\t// If paragraph element is allowed in the root, create paragraph element.\n\t\t\tif ( schema.checkChild( root, 'paragraph' ) ) {\n\t\t\t\twriter.insertElement( 'paragraph', root );\n\n\t\t\t\t// Other roots will get fixed in the next post-fixer round. Those will be triggered\n\t\t\t\t// in the same batch no matter if this method was triggered by the post-fixing or not\n\t\t\t\t// (the above insertElement call will trigger the post-fixers).\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Checks if the given node wrapped with a paragraph would be accepted by the schema in the given position.\n *\n * @protected\n * @param {module:engine/model/position~Position} position The position at which to check.\n * @param {module:engine/model/node~Node|String} nodeOrType The child node or child type to check.\n * @param {module:engine/model/schema~Schema} schema A schema instance used for element validation.\n */\nexport function isParagraphable( position, nodeOrType, schema ) {\n\tconst context = schema.createContext( position );\n\n\t// When paragraph is allowed in this context...\n\tif ( !schema.checkChild( context, 'paragraph' ) ) {\n\t\treturn false;\n\t}\n\n\t// And a node would be allowed in this paragraph...\n\tif ( !schema.checkChild( context.push( 'paragraph' ), nodeOrType ) ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Inserts a new paragraph at the given position and returns a position inside that paragraph.\n *\n * @protected\n * @param {module:engine/model/position~Position} position The position where a paragraph should be inserted.\n * @param {module:engine/model/writer~Writer} writer The model writer.\n * @returns {module:engine/model/position~Position} Position inside the created paragraph.\n */\nexport function wrapInParagraph( position, writer ) {\n\tconst paragraph = writer.createElement( 'paragraph' );\n\n\twriter.insert( paragraph, position );\n\n\treturn writer.createPositionAt( paragraph, 0 );\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\nimport Matcher from '../view/matcher';\nimport ConversionHelpers from './conversionhelpers';\n\nimport { cloneDeep } from 'lodash-es';\n\nimport priorities from '@ckeditor/ckeditor5-utils/src/priorities';\nimport { isParagraphable, wrapInParagraph } from '../model/utils/autoparagraphing';\n\n/**\n * Contains the {@link module:engine/view/view view} to {@link module:engine/model/model model} converters for\n * {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher}.\n *\n * @module engine/conversion/upcasthelpers\n */\n\n/**\n * Upcast conversion helper functions.\n *\n * Learn more about {@glink framework/guides/deep-dive/conversion/upcast upcast helpers}.\n *\n * @extends module:engine/conversion/conversionhelpers~ConversionHelpers\n */\nexport default class UpcastHelpers extends ConversionHelpers {\n\t/**\n\t * View element to model element conversion helper.\n\t *\n\t * This conversion results in creating a model element. For example,\n\t * view `<p>Foo</p>` becomes `<paragraph>Foo</paragraph>` in the model.\n\t *\n\t * Keep in mind that the element will be inserted only if it is allowed\n\t * by {@link module:engine/model/schema~Schema schema} configuration.\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).elementToElement( {\n\t *\t\t\tview: 'p',\n\t *\t\t\tmodel: 'paragraph'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).elementToElement( {\n\t *\t\t\tview: 'p',\n\t *\t\t\tmodel: 'paragraph',\n\t *\t\t\tconverterPriority: 'high'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).elementToElement( {\n\t *\t\t\tview: {\n\t *\t\t\t\tname: 'p',\n\t *\t\t\t\tclasses: 'fancy'\n\t *\t\t\t},\n\t *\t\t\tmodel: 'fancyParagraph'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).elementToElement( {\n\t * \t\t\tview: {\n\t *\t\t\t\tname: 'p',\n\t *\t\t\t\tclasses: 'heading'\n\t * \t\t\t},\n\t * \t\t\tmodel: ( viewElement, conversionApi ) => {\n\t * \t\t\t\tconst modelWriter = conversionApi.writer;\n\t *\n\t * \t\t\t\treturn modelWriter.createElement( 'heading', { level: viewElement.getAttribute( 'data-level' ) } );\n\t * \t\t\t}\n\t * \t\t} );\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @method #elementToElement\n\t * @param {Object} config Conversion configuration.\n\t * @param {module:engine/view/matcher~MatcherPattern} [config.view] Pattern matching all view elements which should be converted. If not\n\t * set, the converter will fire for every view element.\n\t * @param {String|module:engine/model/element~Element|Function} config.model Name of the model element, a model element instance or a\n\t * function that takes a view element and {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi upcast conversion API}\n\t * and returns a model element. The model element will be inserted in the model.\n\t * @param {module:utils/priorities~PriorityString} [config.converterPriority='normal'] Converter priority.\n\t * @returns {module:engine/conversion/upcasthelpers~UpcastHelpers}\n\t */\n\telementToElement( config ) {\n\t\treturn this.add( upcastElementToElement( config ) );\n\t}\n\n\t/**\n\t * View element to model attribute conversion helper.\n\t *\n\t * This conversion results in setting an attribute on a model node. For example, view `<strong>Foo</strong>` becomes\n\t * `Foo` {@link module:engine/model/text~Text model text node} with `bold` attribute set to `true`.\n\t *\n\t * This helper is meant to set a model attribute on all the elements that are inside the converted element:\n\t *\n\t *\t\t<strong>Foo</strong> --> <strong><p>Foo</p></strong> --> <paragraph><$text bold=\"true\">Foo</$text></paragraph>\n\t *\n\t * Above is a sample of HTML code, that goes through autoparagraphing (first step) and then is converted (second step).\n\t * Even though `<strong>` is over `<p>` element, `bold=\"true\"` was added to the text. See\n\t * {@link module:engine/conversion/upcasthelpers~UpcastHelpers#attributeToAttribute} for comparison.\n\t *\n\t * Keep in mind that the attribute will be set only if it is allowed by {@link module:engine/model/schema~Schema schema} configuration.\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t *\t\t\tview: 'strong',\n\t *\t\t\tmodel: 'bold'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t *\t\t\tview: 'strong',\n\t *\t\t\tmodel: 'bold',\n\t *\t\t\tconverterPriority: 'high'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t *\t\t\tview: {\n\t *\t\t\t\tname: 'span',\n\t *\t\t\t\tclasses: 'bold'\n\t *\t\t\t},\n\t *\t\t\tmodel: 'bold'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t *\t\t\tview: {\n\t *\t\t\t\tname: 'span',\n\t *\t\t\t\tclasses: [ 'styled', 'styled-dark' ]\n\t *\t\t\t},\n\t *\t\t\tmodel: {\n\t *\t\t\t\tkey: 'styled',\n\t *\t\t\t\tvalue: 'dark'\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * \t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t *\t\t\tview: {\n\t *\t\t\t\tname: 'span',\n\t *\t\t\t\tstyles: {\n\t *\t\t\t\t\t'font-size': /[\\s\\S]+/\n\t *\t\t\t\t}\n\t *\t\t\t},\n\t *\t\t\tmodel: {\n\t *\t\t\t\tkey: 'fontSize',\n\t *\t\t\t\tvalue: ( viewElement, conversionApi ) => {\n\t *\t\t\t\t\tconst fontSize = viewElement.getStyle( 'font-size' );\n\t *\t\t\t\t\tconst value = fontSize.substr( 0, fontSize.length - 2 );\n\t *\n\t *\t\t\t\t\tif ( value <= 10 ) {\n\t *\t\t\t\t\t\treturn 'small';\n\t *\t\t\t\t\t} else if ( value > 12 ) {\n\t *\t\t\t\t\t\treturn 'big';\n\t *\t\t\t\t\t}\n\t *\n\t *\t\t\t\t\treturn null;\n\t *\t\t\t\t}\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @method #elementToAttribute\n\t * @param {Object} config Conversion configuration.\n\t * @param {module:engine/view/matcher~MatcherPattern} config.view Pattern matching all view elements which should be converted.\n\t * @param {String|Object} config.model Model attribute key or an object with `key` and `value` properties, describing\n\t * the model attribute. `value` property may be set as a function that takes a view element and\n\t * {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi upcast conversion API} and returns the value.\n\t * If `String` is given, the model attribute value will be set to `true`.\n\t * @param {module:utils/priorities~PriorityString} [config.converterPriority='low'] Converter priority.\n\t * @returns {module:engine/conversion/upcasthelpers~UpcastHelpers}\n\t */\n\telementToAttribute( config ) {\n\t\treturn this.add( upcastElementToAttribute( config ) );\n\t}\n\n\t/**\n\t * View attribute to model attribute conversion helper.\n\t *\n\t * This conversion results in setting an attribute on a model node. For example, view `<img src=\"foo.jpg\"></img>` becomes\n\t * `<imageBlock source=\"foo.jpg\"></imageBlock>` in the model.\n\t *\n\t * This helper is meant to convert view attributes from view elements which got converted to the model, so the view attribute\n\t * is set only on the corresponding model node:\n\t *\n\t *\t\t<div class=\"dark\"><div>foo</div></div> --> <div dark=\"true\"><div>foo</div></div>\n\t *\n\t * Above, `class=\"dark\"` attribute is added only to the `<div>` elements that has it. This is in contrary to\n\t * {@link module:engine/conversion/upcasthelpers~UpcastHelpers#elementToAttribute} which sets attributes for\n\t * all the children in the model:\n\t *\n\t *\t\t<strong>Foo</strong> --> <strong><p>Foo</p></strong> --> <paragraph><$text bold=\"true\">Foo</$text></paragraph>\n\t *\n\t * Above is a sample of HTML code, that goes through autoparagraphing (first step) and then is converted (second step).\n\t * Even though `<strong>` is over `<p>` element, `bold=\"true\"` was added to the text.\n\t *\n\t * Keep in mind that the attribute will be set only if it is allowed by {@link module:engine/model/schema~Schema schema} configuration.\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t *\t\t\tview: 'src',\n\t *\t\t\tmodel: 'source'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t *\t\t\tview: { key: 'src' },\n\t *\t\t\tmodel: 'source'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t *\t\t\tview: { key: 'src' },\n\t *\t\t\tmodel: 'source',\n\t *\t\t\tconverterPriority: 'normal'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t *\t\t\tview: {\n\t *\t\t\t\tkey: 'data-style',\n\t *\t\t\t\tvalue: /[\\s\\S]+/\n\t *\t\t\t},\n\t *\t\t\tmodel: 'styled'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t *\t\t\tview: {\n\t *\t\t\t\tname: 'img',\n\t *\t\t\t\tkey: 'class',\n\t *\t\t\t\tvalue: 'styled-dark'\n\t *\t\t\t},\n\t *\t\t\tmodel: {\n\t *\t\t\t\tkey: 'styled',\n\t *\t\t\t\tvalue: 'dark'\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t *\t\t\tview: {\n\t *\t\t\t\tkey: 'class',\n\t *\t\t\t\tvalue: /styled-[\\S]+/\n\t *\t\t\t},\n\t *\t\t\tmodel: {\n\t *\t\t\t\tkey: 'styled'\n\t *\t\t\t\tvalue: ( viewElement, conversionApi ) => {\n\t *\t\t\t\t\tconst regexp = /styled-([\\S]+)/;\n\t *\t\t\t\t\tconst match = viewElement.getAttribute( 'class' ).match( regexp );\n\t *\n\t *\t\t\t\t\treturn match[ 1 ];\n\t *\t\t\t\t}\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * Converting styles works a bit differently as it requires `view.styles` to be an object and by default\n\t * a model attribute will be set to `true` by such a converter. You can set the model attribute to any value by providing the `value`\n\t * callback that returns the desired value.\n\t *\n\t *\t\t// Default conversion of font-weight style will result in setting bold attribute to true.\n\t *\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t *\t\t\tview: {\n\t *\t\t\t\tstyles: {\n\t *\t\t\t\t\t'font-weight': 'bold'\n\t *\t\t\t\t}\n\t *\t\t\t},\n\t *\t\t\tmodel: 'bold'\n\t *\t\t} );\n\t *\n\t *\t\t// This converter will pass any style value to the `lineHeight` model attribute.\n\t *\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t *\t\t\tview: {\n\t *\t\t\t\tstyles: {\n\t *\t\t\t\t\t'line-height': /[\\s\\S]+/\n\t *\t\t\t\t}\n\t *\t\t\t},\n\t *\t\t\tmodel: {\n\t *\t\t\t\tkey: 'lineHeight',\n\t *\t\t\t\tvalue: ( viewElement, conversionApi ) => viewElement.getStyle( 'line-height' )\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @method #attributeToAttribute\n\t * @param {Object} config Conversion configuration.\n\t * @param {String|Object} config.view Specifies which view attribute will be converted. If a `String` is passed,\n\t * attributes with given key will be converted. If an `Object` is passed, it must have a required `key` property,\n\t * specifying view attribute key, and may have an optional `value` property, specifying view attribute value and optional `name`\n\t * property specifying a view element name from/on which the attribute should be converted. `value` can be given as a `String`,\n\t * a `RegExp` or a function callback, that takes view attribute value as the only parameter and returns `Boolean`.\n\t * @param {String|Object} config.model Model attribute key or an object with `key` and `value` properties, describing\n\t * the model attribute. `value` property may be set as a function that takes a view element and\n\t * {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi upcast conversion API} and returns the value.\n\t * If `String` is given, the model attribute value will be same as view attribute value.\n\t * @param {module:utils/priorities~PriorityString} [config.converterPriority='low'] Converter priority.\n\t * @returns {module:engine/conversion/upcasthelpers~UpcastHelpers}\n\t */\n\tattributeToAttribute( config ) {\n\t\treturn this.add( upcastAttributeToAttribute( config ) );\n\t}\n\n\t/**\n\t * View element to model marker conversion helper.\n\t *\n\t * This conversion results in creating a model marker. For example, if the marker was stored in a view as an element:\n\t * `<p>Fo<span data-marker=\"comment\" data-comment-id=\"7\"></span>o</p><p>B<span data-marker=\"comment\" data-comment-id=\"7\"></span>ar</p>`,\n\t * after the conversion is done, the marker will be available in\n\t * {@link module:engine/model/model~Model#markers model document markers}.\n\t *\n\t * **Note**: When this helper is used in the data upcast in combination with\n\t * {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToData `#markerToData()`} in the data downcast,\n\t * then invalid HTML code (e.g. a span between table cells) may be produced by the latter converter.\n\t *\n\t * In most of the cases, the {@link #dataToMarker} should be used instead.\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).elementToMarker( {\n\t *\t\t\tview: 'marker-search',\n\t *\t\t\tmodel: 'search'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).elementToMarker( {\n\t *\t\t\tview: 'marker-search',\n\t *\t\t\tmodel: 'search',\n\t *\t\t\tconverterPriority: 'high'\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).elementToMarker( {\n\t *\t\t\tview: 'marker-search',\n\t *\t\t\tmodel: ( viewElement, conversionApi ) => 'comment:' + viewElement.getAttribute( 'data-comment-id' )\n\t *\t\t} );\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).elementToMarker( {\n\t *\t\t\tview: {\n\t *\t\t\t\tname: 'span',\n\t *\t\t\t\tattributes: {\n\t *\t\t\t\t\t'data-marker': 'search'\n\t *\t\t\t\t}\n\t *\t\t\t},\n\t *\t\t\tmodel: 'search'\n\t *\t\t} );\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @method #elementToMarker\n\t * @param {Object} config Conversion configuration.\n\t * @param {module:engine/view/matcher~MatcherPattern} config.view Pattern matching all view elements which should be converted.\n\t * @param {String|Function} config.model Name of the model marker, or a function that takes a view element and returns\n\t * a model marker name.\n\t * @param {module:utils/priorities~PriorityString} [config.converterPriority='normal'] Converter priority.\n\t * @returns {module:engine/conversion/upcasthelpers~UpcastHelpers}\n\t */\n\telementToMarker( config ) {\n\t\treturn this.add( upcastElementToMarker( config ) );\n\t}\n\n\t/**\n\t * View-to-model marker conversion helper.\n\t *\n\t * Converts view data created by {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToData `#markerToData()`}\n\t * back to a model marker.\n\t *\n\t * This converter looks for specific view elements and view attributes that mark marker boundaries. See\n\t * {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToData `#markerToData()`} to learn what view data\n\t * is expected by this converter.\n\t *\n\t * The `config.view` property is equal to the marker group name to convert.\n\t *\n\t * By default, this converter creates markers with the `group:name` name convention (to match the default `markerToData` conversion).\n\t *\n\t * The conversion configuration can take a function that will generate a marker name.\n\t * If such function is set as the `config.model` parameter, it is passed the `name` part from the view element or attribute and it is\n\t * expected to return a string with the marker name.\n\t *\n\t * Basic usage:\n\t *\n\t *\t\t// Using the default conversion.\n\t *\t\t// In this case, all markers from the `comment` group will be converted.\n\t *\t\t// The conversion will look for `<comment-start>` and `<comment-end>` tags and\n\t *\t\t// `data-comment-start-before`, `data-comment-start-after`,\n\t *\t\t// `data-comment-end-before` and `data-comment-end-after` attributes.\n\t *\t\teditor.conversion.for( 'upcast' ).dataToMarker( {\n\t *\t\t\tview: 'comment'\n\t *\t\t} );\n\t *\n\t * An example of a model that may be generated by this conversion:\n\t *\n\t *\t\t// View:\n\t *\t\t<p>Foo<comment-start name=\"commentId:uid\"></comment-start>bar</p>\n\t *\t\t<figure data-comment-end-after=\"commentId:uid\" class=\"image\"><img src=\"abc.jpg\" /></figure>\n\t *\n\t *\t\t// Model:\n\t *\t\t<paragraph>Foo[bar</paragraph>\n\t *\t\t<imageBlock src=\"abc.jpg\"></imageBlock>]\n\t *\n\t * Where `[]` are boundaries of a marker that will receive the `comment:commentId:uid` name.\n\t *\n\t * Other examples of usage:\n\t *\n\t *\t\t// Using a custom function which is the same as the default conversion:\n\t *\t\teditor.conversion.for( 'upcast' ).dataToMarker( {\n\t *\t\t\tview: 'comment',\n\t *\t\t\tmodel: ( name, conversionApi ) => 'comment:' + name,\n\t *\t\t} );\n\t *\n\t *\t\t// Using the converter priority:\n\t *\t\teditor.conversion.for( 'upcast' ).dataToMarker( {\n\t *\t\t\tview: 'comment',\n\t *\t\t\tmodel: ( name, conversionApi ) => 'comment:' + name,\n\t *\t\t\tconverterPriority: 'high'\n\t *\t\t} );\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @method #dataToMarker\n\t * @param {Object} config Conversion configuration.\n\t * @param {String} config.view The marker group name to convert.\n\t * @param {Function} [config.model] A function that takes the `name` part from the view element or attribute and\n\t * {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi upcast conversion API} and returns the marker name.\n\t * @param {module:utils/priorities~PriorityString} [config.converterPriority='normal'] Converter priority.\n\t * @returns {module:engine/conversion/upcasthelpers~UpcastHelpers}\n\t */\n\tdataToMarker( config ) {\n\t\treturn this.add( upcastDataToMarker( config ) );\n\t}\n}\n\n/**\n * Function factory, creates a converter that converts {@link module:engine/view/documentfragment~DocumentFragment view document fragment}\n * or all children of {@link module:engine/view/element~Element} into\n * {@link module:engine/model/documentfragment~DocumentFragment model document fragment}.\n * This is the \"entry-point\" converter for upcast (view to model conversion). This converter starts the conversion of all children\n * of passed view document fragment. Those children {@link module:engine/view/node~Node view nodes} are then handled by other converters.\n *\n * This also a \"default\", last resort converter for all view elements that has not been converted by other converters.\n * When a view element is being converted to the model but it does not have converter specified, that view element\n * will be converted to {@link module:engine/model/documentfragment~DocumentFragment model document fragment} and returned.\n *\n * @returns {Function} Universal converter for view {@link module:engine/view/documentfragment~DocumentFragment fragments} and\n * {@link module:engine/view/element~Element elements} that returns\n * {@link module:engine/model/documentfragment~DocumentFragment model fragment} with children of converted view item.\n */\nexport function convertToModelFragment() {\n\treturn ( evt, data, conversionApi ) => {\n\t\t// Second argument in `consumable.consume` is discarded for ViewDocumentFragment but is needed for ViewElement.\n\t\tif ( !data.modelRange && conversionApi.consumable.consume( data.viewItem, { name: true } ) ) {\n\t\t\tconst { modelRange, modelCursor } = conversionApi.convertChildren( data.viewItem, data.modelCursor );\n\n\t\t\tdata.modelRange = modelRange;\n\t\t\tdata.modelCursor = modelCursor;\n\t\t}\n\t};\n}\n\n/**\n * Function factory, creates a converter that converts {@link module:engine/view/text~Text} to {@link module:engine/model/text~Text}.\n *\n * @returns {Function} {@link module:engine/view/text~Text View text} converter.\n */\nexport function convertText() {\n\treturn ( evt, data, { schema, consumable, writer } ) => {\n\t\tlet position = data.modelCursor;\n\n\t\t// When node is already converted then do nothing.\n\t\tif ( !consumable.test( data.viewItem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !schema.checkChild( position, '$text' ) ) {\n\t\t\tif ( !isParagraphable( position, '$text', schema ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tposition = wrapInParagraph( position, writer );\n\t\t}\n\n\t\tconsumable.consume( data.viewItem );\n\n\t\tconst text = writer.createText( data.viewItem.data );\n\n\t\twriter.insert( text, position );\n\n\t\tdata.modelRange = writer.createRange(\n\t\t\tposition,\n\t\t\tposition.getShiftedBy( text.offsetSize )\n\t\t);\n\t\tdata.modelCursor = data.modelRange.end;\n\t};\n}\n\n/**\n * Function factory, creates a callback function which converts a {@link module:engine/view/selection~Selection\n * view selection} taken from the {@link module:engine/view/document~Document#event:selectionChange} event\n * and sets in on the {@link module:engine/model/document~Document#selection model}.\n *\n * **Note**: because there is no view selection change dispatcher nor any other advanced view selection to model\n * conversion mechanism, the callback should be set directly on view document.\n *\n *\t\tview.document.on( 'selectionChange', convertSelectionChange( modelDocument, mapper ) );\n *\n * @param {module:engine/model/model~Model} model Data model.\n * @param {module:engine/conversion/mapper~Mapper} mapper Conversion mapper.\n * @returns {Function} {@link module:engine/view/document~Document#event:selectionChange} callback function.\n */\nexport function convertSelectionChange( model, mapper ) {\n\treturn ( evt, data ) => {\n\t\tconst viewSelection = data.newSelection;\n\n\t\tconst ranges = [];\n\n\t\tfor ( const viewRange of viewSelection.getRanges() ) {\n\t\t\tranges.push( mapper.toModelRange( viewRange ) );\n\t\t}\n\n\t\tconst modelSelection = model.createSelection( ranges, { backward: viewSelection.isBackward } );\n\n\t\tif ( !modelSelection.isEqual( model.document.selection ) ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.setSelection( modelSelection );\n\t\t\t} );\n\t\t}\n\t};\n}\n\n// View element to model element conversion helper.\n//\n// See {@link ~UpcastHelpers#elementToElement `.elementToElement()` upcast helper} for examples.\n//\n// @param {Object} config Conversion configuration.\n// @param {module:engine/view/matcher~MatcherPattern} [config.view] Pattern matching all view elements which should be converted. If not\n// set, the converter will fire for every view element.\n// @param {String|module:engine/model/element~Element|Function} config.model Name of the model element, a model element\n// instance or a function that takes a view element and returns a model element. The model element will be inserted in the model.\n// @param {module:utils/priorities~PriorityString} [config.converterPriority='normal'] Converter priority.\n// @returns {Function} Conversion helper.\nfunction upcastElementToElement( config ) {\n\tconfig = cloneDeep( config );\n\n\tconst converter = prepareToElementConverter( config );\n\n\tconst elementName = getViewElementNameFromConfig( config.view );\n\tconst eventName = elementName ? 'element:' + elementName : 'element';\n\n\treturn dispatcher => {\n\t\tdispatcher.on( eventName, converter, { priority: config.converterPriority || 'normal' } );\n\t};\n}\n\n// View element to model attribute conversion helper.\n//\n// See {@link ~UpcastHelpers#elementToAttribute `.elementToAttribute()` upcast helper} for examples.\n//\n// @param {Object} config Conversion configuration.\n// @param {module:engine/view/matcher~MatcherPattern} config.view Pattern matching all view elements which should be converted.\n// @param {String|Object} config.model Model attribute key or an object with `key` and `value` properties, describing\n// the model attribute. `value` property may be set as a function that takes a view element and returns the value.\n// If `String` is given, the model attribute value will be set to `true`.\n// @param {module:utils/priorities~PriorityString} [config.converterPriority='low'] Converter priority.\n// @returns {Function} Conversion helper.\nfunction upcastElementToAttribute( config ) {\n\tconfig = cloneDeep( config );\n\n\tnormalizeModelAttributeConfig( config );\n\n\tconst converter = prepareToAttributeConverter( config, false );\n\n\tconst elementName = getViewElementNameFromConfig( config.view );\n\tconst eventName = elementName ? 'element:' + elementName : 'element';\n\n\treturn dispatcher => {\n\t\tdispatcher.on( eventName, converter, { priority: config.converterPriority || 'low' } );\n\t};\n}\n\n// View attribute to model attribute conversion helper.\n//\n// See {@link ~UpcastHelpers#attributeToAttribute `.attributeToAttribute()` upcast helper} for examples.\n//\n// @param {Object} config Conversion configuration.\n// @param {String|Object} config.view Specifies which view attribute will be converted. If a `String` is passed,\n// attributes with given key will be converted. If an `Object` is passed, it must have a required `key` property,\n// specifying view attribute key, and may have an optional `value` property, specifying view attribute value and optional `name`\n// property specifying a view element name from/on which the attribute should be converted. `value` can be given as a `String`,\n// a `RegExp` or a function callback, that takes view attribute value as the only parameter and returns `Boolean`.\n// @param {String|Object} config.model Model attribute key or an object with `key` and `value` properties, describing\n// the model attribute. `value` property may be set as a function that takes a view element and returns the value.\n// If `String` is given, the model attribute value will be same as view attribute value.\n// @param {module:utils/priorities~PriorityString} [config.converterPriority='low'] Converter priority.\n// @returns {Function} Conversion helper.\nfunction upcastAttributeToAttribute( config ) {\n\tconfig = cloneDeep( config );\n\n\tlet viewKey = null;\n\n\tif ( typeof config.view == 'string' || config.view.key ) {\n\t\tviewKey = normalizeViewAttributeKeyValueConfig( config );\n\t}\n\n\tnormalizeModelAttributeConfig( config, viewKey );\n\n\tconst converter = prepareToAttributeConverter( config, true );\n\n\treturn dispatcher => {\n\t\tdispatcher.on( 'element', converter, { priority: config.converterPriority || 'low' } );\n\t};\n}\n\n// View element to model marker conversion helper.\n//\n// See {@link ~UpcastHelpers#elementToMarker `.elementToMarker()` upcast helper} for examples.\n//\n// @param {Object} config Conversion configuration.\n// @param {module:engine/view/matcher~MatcherPattern} config.view Pattern matching all view elements which should be converted.\n// @param {String|Function} config.model Name of the model marker, or a function that takes a view element and returns\n// a model marker name.\n// @param {module:utils/priorities~PriorityString} [config.converterPriority='normal'] Converter priority.\n// @returns {Function} Conversion helper.\nfunction upcastElementToMarker( config ) {\n\tconfig = cloneDeep( config );\n\n\tnormalizeElementToMarkerConfig( config );\n\n\treturn upcastElementToElement( config );\n}\n\n// View data to model marker conversion helper.\n//\n// See {@link ~UpcastHelpers#dataToMarker} to learn more.\n//\n// @param {Object} config\n// @param {String} config.view\n// @param {Function} [config.model]\n// @param {module:utils/priorities~PriorityString} [config.converterPriority='normal']\n// @returns {Function} Conversion helper.\nfunction upcastDataToMarker( config ) {\n\tconfig = cloneDeep( config );\n\n\t// Default conversion.\n\tif ( !config.model ) {\n\t\tconfig.model = name => {\n\t\t\treturn name ? config.view + ':' + name : config.view;\n\t\t};\n\t}\n\n\tconst converterStart = prepareToElementConverter( normalizeDataToMarkerConfig( config, 'start' ) );\n\tconst converterEnd = prepareToElementConverter( normalizeDataToMarkerConfig( config, 'end' ) );\n\n\treturn dispatcher => {\n\t\tdispatcher.on( 'element:' + config.view + '-start', converterStart, { priority: config.converterPriority || 'normal' } );\n\t\tdispatcher.on( 'element:' + config.view + '-end', converterEnd, { priority: config.converterPriority || 'normal' } );\n\n\t\t// Below is a hack that is needed to properly handle `converterPriority` for both elements and attributes.\n\t\t// Attribute conversion needs to be performed *after* element conversion.\n\t\t// This converter handles both element conversion and attribute conversion, which means that if a single\n\t\t// `config.converterPriority` is used, it will lead to problems. For example, if the `'high'` priority is used,\n\t\t// the attribute conversion will be performed before a lot of element upcast converters.\n\t\t// On the other hand, we want to support `config.converterPriority` and converter overwriting.\n\t\t//\n\t\t// To make it work, we need to do some extra processing for priority for attribute converter.\n\t\t// Priority `'low'` value should be the base value and then we will change it depending on `config.converterPriority` value.\n\t\t//\n\t\t// This hack probably would not be needed if attributes are upcasted separately.\n\t\t//\n\t\tconst basePriority = priorities.get( 'low' );\n\t\tconst maxPriority = priorities.get( 'highest' );\n\t\tconst priorityFactor = priorities.get( config.converterPriority ) / maxPriority; // Number in range [ -1, 1 ].\n\n\t\tdispatcher.on( 'element', upcastAttributeToMarker( config ), { priority: basePriority + priorityFactor } );\n\t};\n}\n\n// Function factory, returns a callback function which converts view attributes to a model marker.\n//\n// The converter looks for elements with `data-group-start-before`, `data-group-start-after`, `data-group-end-before`\n// and `data-group-end-after` attributes and inserts `$marker` model elements before/after those elements.\n// `group` part is specified in `config.view`.\n//\n// @param {Object} config\n// @param {String} config.view\n// @param {Function} [config.model]\n// @returns {Function} Marker converter.\nfunction upcastAttributeToMarker( config ) {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst attrName = `data-${ config.view }`;\n\n\t\t// Check if any attribute for the given view item can be consumed before changing the conversion data\n\t\t// and consuming view items with these attributes.\n\t\tif (\n\t\t\t!conversionApi.consumable.test( data.viewItem, { attributes: attrName + '-end-after' } ) &&\n\t\t\t!conversionApi.consumable.test( data.viewItem, { attributes: attrName + '-start-after' } ) &&\n\t\t\t!conversionApi.consumable.test( data.viewItem, { attributes: attrName + '-end-before' } ) &&\n\t\t\t!conversionApi.consumable.test( data.viewItem, { attributes: attrName + '-start-before' } )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// This converter wants to add a model element, marking a marker, before/after an element (or maybe even group of elements).\n\t\t// To do that, we can use `data.modelRange` which is set on an element (or a group of elements) that has been upcasted.\n\t\t// But, if the processed view element has not been upcasted yet (it does not have been converted), we need to\n\t\t// fire conversion for its children first, then we will have `data.modelRange` available.\n\t\tif ( !data.modelRange ) {\n\t\t\tObject.assign( data, conversionApi.convertChildren( data.viewItem, data.modelCursor ) );\n\t\t}\n\n\t\tif ( conversionApi.consumable.consume( data.viewItem, { attributes: attrName + '-end-after' } ) ) {\n\t\t\taddMarkerElements( data.modelRange.end, data.viewItem.getAttribute( attrName + '-end-after' ).split( ',' ) );\n\t\t}\n\n\t\tif ( conversionApi.consumable.consume( data.viewItem, { attributes: attrName + '-start-after' } ) ) {\n\t\t\taddMarkerElements( data.modelRange.end, data.viewItem.getAttribute( attrName + '-start-after' ).split( ',' ) );\n\t\t}\n\n\t\tif ( conversionApi.consumable.consume( data.viewItem, { attributes: attrName + '-end-before' } ) ) {\n\t\t\taddMarkerElements( data.modelRange.start, data.viewItem.getAttribute( attrName + '-end-before' ).split( ',' ) );\n\t\t}\n\n\t\tif ( conversionApi.consumable.consume( data.viewItem, { attributes: attrName + '-start-before' } ) ) {\n\t\t\taddMarkerElements( data.modelRange.start, data.viewItem.getAttribute( attrName + '-start-before' ).split( ',' ) );\n\t\t}\n\n\t\tfunction addMarkerElements( position, markerViewNames ) {\n\t\t\tfor ( const markerViewName of markerViewNames ) {\n\t\t\t\tconst markerName = config.model( markerViewName, conversionApi );\n\t\t\t\tconst element = conversionApi.writer.createElement( '$marker', { 'data-name': markerName } );\n\n\t\t\t\tconversionApi.writer.insert( element, position );\n\n\t\t\t\tif ( data.modelCursor.isEqual( position ) ) {\n\t\t\t\t\tdata.modelCursor = data.modelCursor.getShiftedBy( 1 );\n\t\t\t\t} else {\n\t\t\t\t\tdata.modelCursor = data.modelCursor._getTransformedByInsertion( position, 1 );\n\t\t\t\t}\n\n\t\t\t\tdata.modelRange = data.modelRange._getTransformedByInsertion( position, 1 )[ 0 ];\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Helper function for from-view-element conversion. Checks if `config.view` directly specifies converted view element's name\n// and if so, returns it.\n//\n// @param {Object} config Conversion view config.\n// @returns {String|null} View element name or `null` if name is not directly set.\nfunction getViewElementNameFromConfig( viewConfig ) {\n\tif ( typeof viewConfig == 'string' ) {\n\t\treturn viewConfig;\n\t}\n\n\tif ( typeof viewConfig == 'object' && typeof viewConfig.name == 'string' ) {\n\t\treturn viewConfig.name;\n\t}\n\n\treturn null;\n}\n\n// Helper for to-model-element conversion. Takes a config object and returns a proper converter function.\n//\n// @param {Object} config Conversion configuration.\n// @returns {Function} View to model converter.\nfunction prepareToElementConverter( config ) {\n\tconst matcher = new Matcher( config.view );\n\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst matcherResult = matcher.match( data.viewItem );\n\n\t\tif ( !matcherResult ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst match = matcherResult.match;\n\n\t\t// Force consuming element's name.\n\t\tmatch.name = true;\n\n\t\tif ( !conversionApi.consumable.test( data.viewItem, match ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modelElement = getModelElement( config.model, data.viewItem, conversionApi );\n\n\t\tif ( !modelElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !conversionApi.safeInsert( modelElement, data.modelCursor ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconversionApi.consumable.consume( data.viewItem, match );\n\t\tconversionApi.convertChildren( data.viewItem, modelElement );\n\t\tconversionApi.updateConversionResult( modelElement, data );\n\t};\n}\n\n// Helper function for upcasting-to-element converter. Takes the model configuration, the converted view element\n// and a writer instance and returns a model element instance to be inserted in the model.\n//\n// @param {String|Function|module:engine/model/element~Element} model Model conversion configuration.\n// @param {module:engine/view/node~Node} input The converted view node.\n// @param {module:engine/conversion/upcastdispatcher~UpcastConversionApi} conversionApi The upcast conversion API.\nfunction getModelElement( model, input, conversionApi ) {\n\tif ( model instanceof Function ) {\n\t\treturn model( input, conversionApi );\n\t} else {\n\t\treturn conversionApi.writer.createElement( model );\n\t}\n}\n\n// Helper function view-attribute-to-model-attribute helper. Normalizes `config.view` which was set as `String` or\n// as an `Object` with `key`, `value` and `name` properties. Normalized `config.view` has is compatible with\n// {@link module:engine/view/matcher~MatcherPattern}.\n//\n// @param {Object} config Conversion config.\n// @returns {String} Key of the converted view attribute.\nfunction normalizeViewAttributeKeyValueConfig( config ) {\n\tif ( typeof config.view == 'string' ) {\n\t\tconfig.view = { key: config.view };\n\t}\n\n\tconst key = config.view.key;\n\tlet normalized;\n\n\tif ( key == 'class' || key == 'style' ) {\n\t\tconst keyName = key == 'class' ? 'classes' : 'styles';\n\n\t\tnormalized = {\n\t\t\t[ keyName ]: config.view.value\n\t\t};\n\t} else {\n\t\tconst value = typeof config.view.value == 'undefined' ? /[\\s\\S]*/ : config.view.value;\n\n\t\tnormalized = {\n\t\t\tattributes: {\n\t\t\t\t[ key ]: value\n\t\t\t}\n\t\t};\n\t}\n\n\tif ( config.view.name ) {\n\t\tnormalized.name = config.view.name;\n\t}\n\n\tconfig.view = normalized;\n\n\treturn key;\n}\n\n// Helper function that normalizes `config.model` in from-model-attribute conversion. `config.model` can be set\n// as a `String`, an `Object` with only `key` property or an `Object` with `key` and `value` properties. Normalized\n// `config.model` is an `Object` with `key` and `value` properties.\n//\n// @param {Object} config Conversion config.\n// @param {String} viewAttributeKeyToCopy Key of the converted view attribute. If it is set, model attribute value\n// will be equal to view attribute value.\nfunction normalizeModelAttributeConfig( config, viewAttributeKeyToCopy = null ) {\n\tconst defaultModelValue = viewAttributeKeyToCopy === null ? true : viewElement => viewElement.getAttribute( viewAttributeKeyToCopy );\n\n\tconst key = typeof config.model != 'object' ? config.model : config.model.key;\n\tconst value = typeof config.model != 'object' || typeof config.model.value == 'undefined' ? defaultModelValue : config.model.value;\n\n\tconfig.model = { key, value };\n}\n\n// Helper for to-model-attribute conversion. Takes the model attribute name and conversion configuration and returns\n// a proper converter function.\n//\n// @param {String} modelAttributeKey The key of the model attribute to set on a model node.\n// @param {Object|Array.<Object>} config Conversion configuration. It is possible to provide multiple configurations in an array.\n// @param {Boolean} shallow If set to `true` the attribute will be set only on top-level nodes. Otherwise, it will be set\n// on all elements in the range.\nfunction prepareToAttributeConverter( config, shallow ) {\n\tconst matcher = new Matcher( config.view );\n\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst match = matcher.match( data.viewItem );\n\n\t\t// If there is no match, this callback should not do anything.\n\t\tif ( !match ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( onlyViewNameIsDefined( config.view, data.viewItem ) ) {\n\t\t\tmatch.match.name = true;\n\t\t} else {\n\t\t\t// Do not test or consume `name` consumable.\n\t\t\tdelete match.match.name;\n\t\t}\n\n\t\t// Try to consume appropriate values from consumable values list.\n\t\tif ( !conversionApi.consumable.test( data.viewItem, match.match ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modelKey = config.model.key;\n\t\tconst modelValue = typeof config.model.value == 'function' ?\n\t\t\tconfig.model.value( data.viewItem, conversionApi ) : config.model.value;\n\n\t\t// Do not convert if attribute building function returned falsy value.\n\t\tif ( modelValue === null ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Since we are converting to attribute we need a range on which we will set the attribute.\n\t\t// If the range is not created yet, let's create it by converting children of the current node first.\n\t\tif ( !data.modelRange ) {\n\t\t\t// Convert children and set conversion result as a current data.\n\t\t\tObject.assign( data, conversionApi.convertChildren( data.viewItem, data.modelCursor ) );\n\t\t}\n\n\t\t// Set attribute on current `output`. `Schema` is checked inside this helper function.\n\t\tconst attributeWasSet = setAttributeOn( data.modelRange, { key: modelKey, value: modelValue }, shallow, conversionApi );\n\n\t\t// It may happen that a converter will try to set an attribute that is not allowed in the given context.\n\t\t// In such a situation we cannot consume the attribute. See: https://github.com/ckeditor/ckeditor5/pull/9249#issuecomment-815658459.\n\t\tif ( attributeWasSet ) {\n\t\t\tconversionApi.consumable.consume( data.viewItem, match.match );\n\t\t}\n\t};\n}\n\n// Helper function that checks if element name should be consumed in attribute converters.\n//\n// @param {Object} config Conversion view config.\n// @returns {Boolean}\nfunction onlyViewNameIsDefined( viewConfig, viewItem ) {\n\t// https://github.com/ckeditor/ckeditor5-engine/issues/1786\n\tconst configToTest = typeof viewConfig == 'function' ? viewConfig( viewItem ) : viewConfig;\n\n\tif ( typeof configToTest == 'object' && !getViewElementNameFromConfig( configToTest ) ) {\n\t\treturn false;\n\t}\n\n\treturn !configToTest.classes && !configToTest.attributes && !configToTest.styles;\n}\n\n// Helper function for to-model-attribute converter. Sets model attribute on given range. Checks {@link module:engine/model/schema~Schema}\n// to ensure proper model structure.\n//\n// If any node on the given range has already defined an attribute with the same name, its value will not be updated.\n//\n// @param {module:engine/model/range~Range} modelRange Model range on which attribute should be set.\n// @param {Object} modelAttribute Model attribute to set.\n// @param {module:engine/conversion/upcastdispatcher~UpcastConversionApi} conversionApi Conversion API.\n// @param {Boolean} shallow If set to `true` the attribute will be set only on top-level nodes. Otherwise, it will be set\n// on all elements in the range.\n// @returns {Boolean} `true` if attribute was set on at least one node from given `modelRange`.\nfunction setAttributeOn( modelRange, modelAttribute, shallow, conversionApi ) {\n\tlet result = false;\n\n\t// Set attribute on each item in range according to Schema.\n\tfor ( const node of Array.from( modelRange.getItems( { shallow } ) ) ) {\n\t\t// Skip if not allowed.\n\t\tif ( !conversionApi.schema.checkAttribute( node, modelAttribute.key ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Mark the node as consumed even if the attribute will not be updated because it's in a valid context (schema)\n\t\t// and would be converted if the attribute wouldn't be present. See #8921.\n\t\tresult = true;\n\n\t\t// Do not override the attribute if it's already present.\n\t\tif ( node.hasAttribute( modelAttribute.key ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversionApi.writer.setAttribute( modelAttribute.key, modelAttribute.value, node );\n\t}\n\n\treturn result;\n}\n\n// Helper function for upcasting-to-marker conversion. Takes the config in a format requested by `upcastElementToMarker()`\n// function and converts it to a format that is supported by `upcastElementToElement()` function.\n//\n// @param {Object} config Conversion configuration.\nfunction normalizeElementToMarkerConfig( config ) {\n\tconst oldModel = config.model;\n\n\tconfig.model = ( viewElement, conversionApi ) => {\n\t\tconst markerName = typeof oldModel == 'string' ? oldModel : oldModel( viewElement, conversionApi );\n\n\t\treturn conversionApi.writer.createElement( '$marker', { 'data-name': markerName } );\n\t};\n}\n\n// Helper function for upcasting-to-marker conversion. Takes the config in a format requested by `upcastDataToMarker()`\n// function and converts it to a format that is supported by `upcastElementToElement()` function.\n//\n// @param {Object} config Conversion configuration.\nfunction normalizeDataToMarkerConfig( config, type ) {\n\tconst configForElements = {};\n\n\t// Upcast <markerGroup-start> and <markerGroup-end> elements.\n\tconfigForElements.view = config.view + '-' + type;\n\n\tconfigForElements.model = ( viewElement, conversionApi ) => {\n\t\tconst viewName = viewElement.getAttribute( 'name' );\n\t\tconst markerName = config.model( viewName, conversionApi );\n\n\t\treturn conversionApi.writer.createElement( '$marker', { 'data-name': markerName } );\n\t};\n\n\treturn configForElements;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/controller/editingcontroller\n */\n\nimport RootEditableElement from '../view/rooteditableelement';\nimport View from '../view/view';\nimport Mapper from '../conversion/mapper';\nimport DowncastDispatcher from '../conversion/downcastdispatcher';\nimport {\n\tclearAttributes,\n\tconvertCollapsedSelection,\n\tconvertRangeSelection,\n\tinsertAttributesAndChildren,\n\tinsertText,\n\tremove\n} from '../conversion/downcasthelpers';\n\nimport ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport { convertSelectionChange } from '../conversion/upcasthelpers';\n\n// @if CK_DEBUG_ENGINE // const { dumpTrees, initDocumentDumping } = require( '../dev-utils/utils' );\n\n/**\n * A controller for the editing pipeline. The editing pipeline controls the {@link ~EditingController#model model} rendering,\n * including selection handling. It also creates the {@link ~EditingController#view view} which builds a\n * browser-independent virtualization over the DOM elements. The editing controller also attaches default converters.\n *\n * @mixes module:utils/observablemixin~ObservableMixin\n */\nexport default class EditingController {\n\t/**\n\t * Creates an editing controller instance.\n\t *\n\t * @param {module:engine/model/model~Model} model Editing model.\n\t * @param {module:engine/view/stylesmap~StylesProcessor} stylesProcessor The styles processor instance.\n\t */\n\tconstructor( model, stylesProcessor ) {\n\t\t/**\n\t\t * Editor model.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/model~Model}\n\t\t */\n\t\tthis.model = model;\n\n\t\t/**\n\t\t * Editing view controller.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/view~View}\n\t\t */\n\t\tthis.view = new View( stylesProcessor );\n\n\t\t/**\n\t\t * A mapper that describes the model-view binding.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/conversion/mapper~Mapper}\n\t\t */\n\t\tthis.mapper = new Mapper();\n\n\t\t/**\n\t\t * Downcast dispatcher that converts changes from the model to the {@link #view editing view}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/conversion/downcastdispatcher~DowncastDispatcher} #downcastDispatcher\n\t\t */\n\t\tthis.downcastDispatcher = new DowncastDispatcher( {\n\t\t\tmapper: this.mapper,\n\t\t\tschema: model.schema\n\t\t} );\n\n\t\tconst doc = this.model.document;\n\t\tconst selection = doc.selection;\n\t\tconst markers = this.model.markers;\n\n\t\t// When plugins listen on model changes (on selection change, post fixers, etc.) and change the view as a result of\n\t\t// the model's change, they might trigger view rendering before the conversion is completed (e.g. before the selection\n\t\t// is converted). We disable rendering for the length of the outermost model change() block to prevent that.\n\t\t//\n\t\t// See https://github.com/ckeditor/ckeditor5-engine/issues/1528\n\t\tthis.listenTo( this.model, '_beforeChanges', () => {\n\t\t\tthis.view._disableRendering( true );\n\t\t}, { priority: 'highest' } );\n\n\t\tthis.listenTo( this.model, '_afterChanges', () => {\n\t\t\tthis.view._disableRendering( false );\n\t\t}, { priority: 'lowest' } );\n\n\t\t// Whenever model document is changed, convert those changes to the view (using model.Document#differ).\n\t\t// Do it on 'low' priority, so changes are converted after other listeners did their job.\n\t\t// Also convert model selection.\n\t\tthis.listenTo( doc, 'change', () => {\n\t\t\tthis.view.change( writer => {\n\t\t\t\tthis.downcastDispatcher.convertChanges( doc.differ, markers, writer );\n\t\t\t\tthis.downcastDispatcher.convertSelection( selection, markers, writer );\n\t\t\t} );\n\t\t}, { priority: 'low' } );\n\n\t\t// Convert selection from the view to the model when it changes in the view.\n\t\tthis.listenTo( this.view.document, 'selectionChange', convertSelectionChange( this.model, this.mapper ) );\n\n\t\t// Attach default model converters.\n\t\tthis.downcastDispatcher.on( 'insert:$text', insertText(), { priority: 'lowest' } );\n\t\tthis.downcastDispatcher.on( 'insert', insertAttributesAndChildren(), { priority: 'lowest' } );\n\t\tthis.downcastDispatcher.on( 'remove', remove(), { priority: 'low' } );\n\n\t\t// Attach default model selection converters.\n\t\tthis.downcastDispatcher.on( 'selection', clearAttributes(), { priority: 'high' } );\n\t\tthis.downcastDispatcher.on( 'selection', convertRangeSelection(), { priority: 'low' } );\n\t\tthis.downcastDispatcher.on( 'selection', convertCollapsedSelection(), { priority: 'low' } );\n\n\t\t// Binds {@link module:engine/view/document~Document#roots view roots collection} to\n\t\t// {@link module:engine/model/document~Document#roots model roots collection} so creating\n\t\t// model root automatically creates corresponding view root.\n\t\tthis.view.document.roots.bindTo( this.model.document.roots ).using( root => {\n\t\t\t// $graveyard is a special root that has no reflection in the view.\n\t\t\tif ( root.rootName == '$graveyard' ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst viewRoot = new RootEditableElement( this.view.document, root.name );\n\n\t\t\tviewRoot.rootName = root.rootName;\n\t\t\tthis.mapper.bindElements( root, viewRoot );\n\n\t\t\treturn viewRoot;\n\t\t} );\n\n\t\t// @if CK_DEBUG_ENGINE // initDocumentDumping( this.model.document );\n\t\t// @if CK_DEBUG_ENGINE // initDocumentDumping( this.view.document );\n\n\t\t// @if CK_DEBUG_ENGINE // dumpTrees( this.model.document, this.model.document.version );\n\t\t// @if CK_DEBUG_ENGINE // dumpTrees( this.view.document, this.model.document.version );\n\n\t\t// @if CK_DEBUG_ENGINE // this.model.document.on( 'change', () => {\n\t\t// @if CK_DEBUG_ENGINE //\tdumpTrees( this.view.document, this.model.document.version );\n\t\t// @if CK_DEBUG_ENGINE // }, { priority: 'lowest' } );\n\t}\n\n\t/**\n\t * Removes all event listeners attached to the `EditingController`. Destroys all objects created\n\t * by `EditingController` that need to be destroyed.\n\t */\n\tdestroy() {\n\t\tthis.view.destroy();\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Calling this method will refresh the marker by triggering the downcast conversion for it.\n\t *\n\t * Reconverting the marker is useful when you want to change its {@link module:engine/view/element~Element view element}\n\t * without changing any marker data. For instance:\n\t *\n\t *\t\tlet isCommentActive = false;\n\t *\n\t *\t\tmodel.conversion.markerToHighlight( {\n\t *\t\t\tmodel: 'comment',\n\t *\t\t\tview: data => {\n\t *\t\t\t\tconst classes = [ 'comment-marker' ];\n\t *\n\t *\t\t\t\tif ( isCommentActive ) {\n\t *\t\t\t\t\tclasses.push( 'comment-marker--active' );\n\t *\t\t\t\t}\n\t *\n\t *\t\t\t\treturn { classes };\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t *\t\t// ...\n\t *\n\t *\t\t// Change the property that indicates if marker is displayed as active or not.\n\t *\t\tisCommentActive = true;\n\t *\n\t *\t\t// Reconverting will downcast and synchronize the marker with the new isCommentActive state value.\n\t *\t\teditor.editing.reconvertMarker( 'comment' );\n\t *\n\t * **Note**: If you want to reconvert a model item, use {@link #reconvertItem} instead.\n\t *\n\t * @param {String|module:engine/model/markercollection~Marker} markerOrName Name of a marker to update, or a marker instance.\n\t */\n\treconvertMarker( markerOrName ) {\n\t\tconst markerName = typeof markerOrName == 'string' ? markerOrName : markerOrName.name;\n\t\tconst currentMarker = this.model.markers.get( markerName );\n\n\t\tif ( !currentMarker ) {\n\t\t\t/**\n\t\t\t * The marker with the provided name does not exist and cannot be reconverted.\n\t\t\t *\n\t\t\t * @error editingcontroller-reconvertmarker-marker-not-exist\n\t\t\t * @param {String} markerName The name of the reconverted marker.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'editingcontroller-reconvertmarker-marker-not-exist', this, { markerName } );\n\t\t}\n\n\t\tthis.model.change( () => {\n\t\t\tthis.model.markers._refresh( currentMarker );\n\t\t} );\n\t}\n\n\t/**\n\t * Calling this method will downcast a model item on demand (by requesting a refresh in the {@link module:engine/model/differ~Differ}).\n\t *\n\t * You can use it if you want the view representation of a specific item updated as a response to external modifications. For instance,\n\t * when the view structure depends not only on the associated model data but also on some external state.\n\t *\n\t * **Note**: If you want to reconvert a model marker, use {@link #reconvertMarker} instead.\n\t *\n\t * @param {module:engine/model/item~Item} item Item to refresh.\n\t */\n\treconvertItem( item ) {\n\t\tthis.model.change( () => {\n\t\t\tthis.model.document.differ._refreshItem( item );\n\t\t} );\n\t}\n}\n\nmix( EditingController, ObservableMixin );\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module core/commandcollection\n */\n\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n/**\n * Collection of commands. Its instance is available in {@link module:core/editor/editor~Editor#commands `editor.commands`}.\n */\nexport default class CommandCollection {\n\t/**\n\t * Creates collection instance.\n\t */\n\tconstructor() {\n\t\t/**\n\t\t * Command map.\n\t\t *\n\t\t * @private\n\t\t * @member {Map}\n\t\t */\n\t\tthis._commands = new Map();\n\t}\n\n\t/**\n\t * Registers a new command.\n\t *\n\t * @param {String} commandName The name of the command.\n\t * @param {module:core/command~Command} command\n\t */\n\tadd( commandName, command ) {\n\t\tthis._commands.set( commandName, command );\n\t}\n\n\t/**\n\t * Retrieves a command from the collection.\n\t *\n\t * @param {String} commandName The name of the command.\n\t * @returns {module:core/command~Command}\n\t */\n\tget( commandName ) {\n\t\treturn this._commands.get( commandName );\n\t}\n\n\t/**\n\t * Executes a command.\n\t *\n\t * @param {String} commandName The name of the command.\n\t * @param {*} [...commandParams] Command parameters.\n\t * @returns {*} The value returned by the {@link module:core/command~Command#execute `command.execute()`}.\n\t */\n\texecute( commandName, ...args ) {\n\t\tconst command = this.get( commandName );\n\n\t\tif ( !command ) {\n\t\t\t/**\n\t\t\t * Command does not exist.\n\t\t\t *\n\t\t\t * @error commandcollection-command-not-found\n\t\t\t * @param {String} commandName Name of the command.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'commandcollection-command-not-found', this, { commandName } );\n\t\t}\n\n\t\treturn command.execute( ...args );\n\t}\n\n\t/**\n\t * Returns iterator of command names.\n\t *\n\t * @returns {Iterable.<String>}\n\t */\n\t* names() {\n\t\tyield* this._commands.keys();\n\t}\n\n\t/**\n\t * Returns iterator of command instances.\n\t *\n\t * @returns {Iterable.<module:core/command~Command>}\n\t */\n\t* commands() {\n\t\tyield* this._commands.values();\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * Returns `[ commandName, commandInstance ]` pairs.\n\t *\n\t * @returns {Iterable.<Array>}\n\t */\n\t[ Symbol.iterator ]() {\n\t\treturn this._commands[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Destroys all collection commands.\n\t */\n\tdestroy() {\n\t\tfor ( const command of this.commands() ) {\n\t\t\tcommand.destroy();\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/conversion/viewconsumable\n */\n\nimport { isArray } from 'lodash-es';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n/**\n * Class used for handling consumption of view {@link module:engine/view/element~Element elements},\n * {@link module:engine/view/text~Text text nodes} and {@link module:engine/view/documentfragment~DocumentFragment document fragments}.\n * Element's name and its parts (attributes, classes and styles) can be consumed separately. Consuming an element's name\n * does not consume its attributes, classes and styles.\n * To add items for consumption use {@link module:engine/conversion/viewconsumable~ViewConsumable#add add method}.\n * To test items use {@link module:engine/conversion/viewconsumable~ViewConsumable#test test method}.\n * To consume items use {@link module:engine/conversion/viewconsumable~ViewConsumable#consume consume method}.\n * To revert already consumed items use {@link module:engine/conversion/viewconsumable~ViewConsumable#revert revert method}.\n *\n *\t\tviewConsumable.add( element, { name: true } ); // Adds element's name as ready to be consumed.\n *\t\tviewConsumable.add( textNode ); // Adds text node for consumption.\n *\t\tviewConsumable.add( docFragment ); // Adds document fragment for consumption.\n *\t\tviewConsumable.test( element, { name: true } ); // Tests if element's name can be consumed.\n *\t\tviewConsumable.test( textNode ); // Tests if text node can be consumed.\n *\t\tviewConsumable.test( docFragment ); // Tests if document fragment can be consumed.\n *\t\tviewConsumable.consume( element, { name: true } ); // Consume element's name.\n *\t\tviewConsumable.consume( textNode ); // Consume text node.\n *\t\tviewConsumable.consume( docFragment ); // Consume document fragment.\n *\t\tviewConsumable.revert( element, { name: true } ); // Revert already consumed element's name.\n *\t\tviewConsumable.revert( textNode ); // Revert already consumed text node.\n *\t\tviewConsumable.revert( docFragment ); // Revert already consumed document fragment.\n */\nexport default class ViewConsumable {\n\t/**\n\t * Creates new ViewConsumable.\n\t */\n\tconstructor() {\n\t\t/**\n\t\t * Map of consumable elements. If {@link module:engine/view/element~Element element} is used as a key,\n\t\t * {@link module:engine/conversion/viewconsumable~ViewElementConsumables ViewElementConsumables} instance is stored as value.\n\t\t * For {@link module:engine/view/text~Text text nodes} and\n\t\t * {@link module:engine/view/documentfragment~DocumentFragment document fragments} boolean value is stored as value.\n\t\t *\n\t\t * @protected\n\t\t * @member {Map.<module:engine/conversion/viewconsumable~ViewElementConsumables|Boolean>}\n\t\t*/\n\t\tthis._consumables = new Map();\n\t}\n\n\t/**\n\t * Adds {@link module:engine/view/element~Element view element}, {@link module:engine/view/text~Text text node} or\n\t * {@link module:engine/view/documentfragment~DocumentFragment document fragment} as ready to be consumed.\n\t *\n\t *\t\tviewConsumable.add( p, { name: true } ); // Adds element's name to consume.\n\t *\t\tviewConsumable.add( p, { attributes: 'name' } ); // Adds element's attribute.\n\t *\t\tviewConsumable.add( p, { classes: 'foobar' } ); // Adds element's class.\n\t *\t\tviewConsumable.add( p, { styles: 'color' } ); // Adds element's style\n\t *\t\tviewConsumable.add( p, { attributes: 'name', styles: 'color' } ); // Adds attribute and style.\n\t *\t\tviewConsumable.add( p, { classes: [ 'baz', 'bar' ] } ); // Multiple consumables can be provided.\n\t *\t\tviewConsumable.add( textNode ); // Adds text node to consume.\n\t *\t\tviewConsumable.add( docFragment ); // Adds document fragment to consume.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `viewconsumable-invalid-attribute` when `class` or `style`\n\t * attribute is provided - it should be handled separately by providing actual style/class.\n\t *\n\t *\t\tviewConsumable.add( p, { attributes: 'style' } ); // This call will throw an exception.\n\t *\t\tviewConsumable.add( p, { styles: 'color' } ); // This is properly handled style.\n\t *\n\t * @param {module:engine/view/element~Element|module:engine/view/text~Text|module:engine/view/documentfragment~DocumentFragment} element\n\t * @param {Object} [consumables] Used only if first parameter is {@link module:engine/view/element~Element view element} instance.\n\t * @param {Boolean} consumables.name If set to true element's name will be included.\n\t * @param {String|Array.<String>} consumables.attributes Attribute name or array of attribute names.\n\t * @param {String|Array.<String>} consumables.classes Class name or array of class names.\n\t * @param {String|Array.<String>} consumables.styles Style name or array of style names.\n\t */\n\tadd( element, consumables ) {\n\t\tlet elementConsumables;\n\n\t\t// For text nodes and document fragments just mark them as consumable.\n\t\tif ( element.is( '$text' ) || element.is( 'documentFragment' ) ) {\n\t\t\tthis._consumables.set( element, true );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// For elements create new ViewElementConsumables or update already existing one.\n\t\tif ( !this._consumables.has( element ) ) {\n\t\t\telementConsumables = new ViewElementConsumables( element );\n\t\t\tthis._consumables.set( element, elementConsumables );\n\t\t} else {\n\t\t\telementConsumables = this._consumables.get( element );\n\t\t}\n\n\t\telementConsumables.add( consumables );\n\t}\n\n\t/**\n\t * Tests if {@link module:engine/view/element~Element view element}, {@link module:engine/view/text~Text text node} or\n\t * {@link module:engine/view/documentfragment~DocumentFragment document fragment} can be consumed.\n\t * It returns `true` when all items included in method's call can be consumed. Returns `false` when\n\t * first already consumed item is found and `null` when first non-consumable item is found.\n\t *\n\t *\t\tviewConsumable.test( p, { name: true } ); // Tests element's name.\n\t *\t\tviewConsumable.test( p, { attributes: 'name' } ); // Tests attribute.\n\t *\t\tviewConsumable.test( p, { classes: 'foobar' } ); // Tests class.\n\t *\t\tviewConsumable.test( p, { styles: 'color' } ); // Tests style.\n\t *\t\tviewConsumable.test( p, { attributes: 'name', styles: 'color' } ); // Tests attribute and style.\n\t *\t\tviewConsumable.test( p, { classes: [ 'baz', 'bar' ] } ); // Multiple consumables can be tested.\n\t *\t\tviewConsumable.test( textNode ); // Tests text node.\n\t *\t\tviewConsumable.test( docFragment ); // Tests document fragment.\n\t *\n\t * Testing classes and styles as attribute will test if all added classes/styles can be consumed.\n\t *\n\t *\t\tviewConsumable.test( p, { attributes: 'class' } ); // Tests if all added classes can be consumed.\n\t *\t\tviewConsumable.test( p, { attributes: 'style' } ); // Tests if all added styles can be consumed.\n\t *\n\t * @param {module:engine/view/element~Element|module:engine/view/text~Text|module:engine/view/documentfragment~DocumentFragment} element\n\t * @param {Object} [consumables] Used only if first parameter is {@link module:engine/view/element~Element view element} instance.\n\t * @param {Boolean} consumables.name If set to true element's name will be included.\n\t * @param {String|Array.<String>} consumables.attributes Attribute name or array of attribute names.\n\t * @param {String|Array.<String>} consumables.classes Class name or array of class names.\n\t * @param {String|Array.<String>} consumables.styles Style name or array of style names.\n\t * @returns {Boolean|null} Returns `true` when all items included in method's call can be consumed. Returns `false`\n\t * when first already consumed item is found and `null` when first non-consumable item is found.\n\t */\n\ttest( element, consumables ) {\n\t\tconst elementConsumables = this._consumables.get( element );\n\n\t\tif ( elementConsumables === undefined ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// For text nodes and document fragments return stored boolean value.\n\t\tif ( element.is( '$text' ) || element.is( 'documentFragment' ) ) {\n\t\t\treturn elementConsumables;\n\t\t}\n\n\t\t// For elements test consumables object.\n\t\treturn elementConsumables.test( consumables );\n\t}\n\n\t/**\n\t * Consumes {@link module:engine/view/element~Element view element}, {@link module:engine/view/text~Text text node} or\n\t * {@link module:engine/view/documentfragment~DocumentFragment document fragment}.\n\t * It returns `true` when all items included in method's call can be consumed, otherwise returns `false`.\n\t *\n\t *\t\tviewConsumable.consume( p, { name: true } ); // Consumes element's name.\n\t *\t\tviewConsumable.consume( p, { attributes: 'name' } ); // Consumes element's attribute.\n\t *\t\tviewConsumable.consume( p, { classes: 'foobar' } ); // Consumes element's class.\n\t *\t\tviewConsumable.consume( p, { styles: 'color' } ); // Consumes element's style.\n\t *\t\tviewConsumable.consume( p, { attributes: 'name', styles: 'color' } ); // Consumes attribute and style.\n\t *\t\tviewConsumable.consume( p, { classes: [ 'baz', 'bar' ] } ); // Multiple consumables can be consumed.\n\t *\t\tviewConsumable.consume( textNode ); // Consumes text node.\n\t *\t\tviewConsumable.consume( docFragment ); // Consumes document fragment.\n\t *\n\t * Consuming classes and styles as attribute will test if all added classes/styles can be consumed.\n\t *\n\t *\t\tviewConsumable.consume( p, { attributes: 'class' } ); // Consume only if all added classes can be consumed.\n\t *\t\tviewConsumable.consume( p, { attributes: 'style' } ); // Consume only if all added styles can be consumed.\n\t *\n\t * @param {module:engine/view/element~Element|module:engine/view/text~Text|module:engine/view/documentfragment~DocumentFragment} element\n\t * @param {Object} [consumables] Used only if first parameter is {@link module:engine/view/element~Element view element} instance.\n\t * @param {Boolean} consumables.name If set to true element's name will be included.\n\t * @param {String|Array.<String>} consumables.attributes Attribute name or array of attribute names.\n\t * @param {String|Array.<String>} consumables.classes Class name or array of class names.\n\t * @param {String|Array.<String>} consumables.styles Style name or array of style names.\n\t * @returns {Boolean} Returns `true` when all items included in method's call can be consumed,\n\t * otherwise returns `false`.\n\t */\n\tconsume( element, consumables ) {\n\t\tif ( this.test( element, consumables ) ) {\n\t\t\tif ( element.is( '$text' ) || element.is( 'documentFragment' ) ) {\n\t\t\t\t// For text nodes and document fragments set value to false.\n\t\t\t\tthis._consumables.set( element, false );\n\t\t\t} else {\n\t\t\t\t// For elements - consume consumables object.\n\t\t\t\tthis._consumables.get( element ).consume( consumables );\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Reverts {@link module:engine/view/element~Element view element}, {@link module:engine/view/text~Text text node} or\n\t * {@link module:engine/view/documentfragment~DocumentFragment document fragment} so they can be consumed once again.\n\t * Method does not revert items that were never previously added for consumption, even if they are included in\n\t * method's call.\n\t *\n\t *\t\tviewConsumable.revert( p, { name: true } ); // Reverts element's name.\n\t *\t\tviewConsumable.revert( p, { attributes: 'name' } ); // Reverts element's attribute.\n\t *\t\tviewConsumable.revert( p, { classes: 'foobar' } ); // Reverts element's class.\n\t *\t\tviewConsumable.revert( p, { styles: 'color' } ); // Reverts element's style.\n\t *\t\tviewConsumable.revert( p, { attributes: 'name', styles: 'color' } ); // Reverts attribute and style.\n\t *\t\tviewConsumable.revert( p, { classes: [ 'baz', 'bar' ] } ); // Multiple names can be reverted.\n\t *\t\tviewConsumable.revert( textNode ); // Reverts text node.\n\t *\t\tviewConsumable.revert( docFragment ); // Reverts document fragment.\n\t *\n\t * Reverting classes and styles as attribute will revert all classes/styles that were previously added for\n\t * consumption.\n\t *\n\t *\t\tviewConsumable.revert( p, { attributes: 'class' } ); // Reverts all classes added for consumption.\n\t *\t\tviewConsumable.revert( p, { attributes: 'style' } ); // Reverts all styles added for consumption.\n\t *\n\t * @param {module:engine/view/element~Element|module:engine/view/text~Text|module:engine/view/documentfragment~DocumentFragment} element\n\t * @param {Object} [consumables] Used only if first parameter is {@link module:engine/view/element~Element view element} instance.\n\t * @param {Boolean} consumables.name If set to true element's name will be included.\n\t * @param {String|Array.<String>} consumables.attributes Attribute name or array of attribute names.\n\t * @param {String|Array.<String>} consumables.classes Class name or array of class names.\n\t * @param {String|Array.<String>} consumables.styles Style name or array of style names.\n\t */\n\trevert( element, consumables ) {\n\t\tconst elementConsumables = this._consumables.get( element );\n\n\t\tif ( elementConsumables !== undefined ) {\n\t\t\tif ( element.is( '$text' ) || element.is( 'documentFragment' ) ) {\n\t\t\t\t// For text nodes and document fragments - set consumable to true.\n\t\t\t\tthis._consumables.set( element, true );\n\t\t\t} else {\n\t\t\t\t// For elements - revert items from consumables object.\n\t\t\t\telementConsumables.revert( consumables );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Creates consumable object from {@link module:engine/view/element~Element view element}. Consumable object will include\n\t * element's name and all its attributes, classes and styles.\n\t *\n\t * @static\n\t * @param {module:engine/view/element~Element} element\n\t * @returns {Object} consumables\n\t */\n\tstatic consumablesFromElement( element ) {\n\t\tconst consumables = {\n\t\t\telement,\n\t\t\tname: true,\n\t\t\tattributes: [],\n\t\t\tclasses: [],\n\t\t\tstyles: []\n\t\t};\n\n\t\tconst attributes = element.getAttributeKeys();\n\n\t\tfor ( const attribute of attributes ) {\n\t\t\t// Skip classes and styles - will be added separately.\n\t\t\tif ( attribute == 'style' || attribute == 'class' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconsumables.attributes.push( attribute );\n\t\t}\n\n\t\tconst classes = element.getClassNames();\n\n\t\tfor ( const className of classes ) {\n\t\t\tconsumables.classes.push( className );\n\t\t}\n\n\t\tconst styles = element.getStyleNames();\n\n\t\tfor ( const style of styles ) {\n\t\t\tconsumables.styles.push( style );\n\t\t}\n\n\t\treturn consumables;\n\t}\n\n\t/**\n\t * Creates {@link module:engine/conversion/viewconsumable~ViewConsumable ViewConsumable} instance from\n\t * {@link module:engine/view/node~Node node} or {@link module:engine/view/documentfragment~DocumentFragment document fragment}.\n\t * Instance will contain all elements, child nodes, attributes, styles and classes added for consumption.\n\t *\n\t * @static\n\t * @param {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment} from View node or document fragment\n\t * from which `ViewConsumable` will be created.\n\t * @param {module:engine/conversion/viewconsumable~ViewConsumable} [instance] If provided, given `ViewConsumable` instance will be used\n\t * to add all consumables. It will be returned instead of a new instance.\n\t */\n\tstatic createFrom( from, instance ) {\n\t\tif ( !instance ) {\n\t\t\tinstance = new ViewConsumable( from );\n\t\t}\n\n\t\tif ( from.is( '$text' ) ) {\n\t\t\tinstance.add( from );\n\n\t\t\treturn instance;\n\t\t}\n\n\t\t// Add `from` itself, if it is an element.\n\t\tif ( from.is( 'element' ) ) {\n\t\t\tinstance.add( from, ViewConsumable.consumablesFromElement( from ) );\n\t\t}\n\n\t\tif ( from.is( 'documentFragment' ) ) {\n\t\t\tinstance.add( from );\n\t\t}\n\n\t\tfor ( const child of from.getChildren() ) {\n\t\t\tinstance = ViewConsumable.createFrom( child, instance );\n\t\t}\n\n\t\treturn instance;\n\t}\n}\n\n/**\n * This is a private helper-class for {@link module:engine/conversion/viewconsumable~ViewConsumable}.\n * It represents and manipulates consumable parts of a single {@link module:engine/view/element~Element}.\n *\n * @private\n */\nclass ViewElementConsumables {\n\t/**\n\t * Creates ViewElementConsumables instance.\n\t *\n\t * @param {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment} from View node or document fragment\n\t * from which `ViewElementConsumables` is being created.\n\t */\n\tconstructor( from ) {\n\t\t/**\n\t\t * @readonly\n\t\t * @member {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment}\n\t\t */\n\t\tthis.element = from;\n\n\t\t/**\n\t\t * Flag indicating if name of the element can be consumed.\n\t\t *\n\t\t * @private\n\t\t * @member {Boolean}\n\t\t */\n\t\tthis._canConsumeName = null;\n\n\t\t/**\n\t\t * Contains maps of element's consumables: attributes, classes and styles.\n\t\t *\n\t\t * @private\n\t\t * @member {Object}\n\t\t */\n\t\tthis._consumables = {\n\t\t\tattributes: new Map(),\n\t\t\tstyles: new Map(),\n\t\t\tclasses: new Map()\n\t\t};\n\t}\n\n\t/**\n\t * Adds consumable parts of the {@link module:engine/view/element~Element view element}.\n\t * Element's name itself can be marked to be consumed (when element's name is consumed its attributes, classes and\n\t * styles still could be consumed):\n\t *\n\t *\t\tconsumables.add( { name: true } );\n\t *\n\t * Attributes classes and styles:\n\t *\n\t *\t\tconsumables.add( { attributes: 'title', classes: 'foo', styles: 'color' } );\n\t *\t\tconsumables.add( { attributes: [ 'title', 'name' ], classes: [ 'foo', 'bar' ] );\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `viewconsumable-invalid-attribute` when `class` or `style`\n\t * attribute is provided - it should be handled separately by providing `style` and `class` in consumables object.\n\t *\n\t * @param {Object} consumables Object describing which parts of the element can be consumed.\n\t * @param {Boolean} consumables.name If set to `true` element's name will be added as consumable.\n\t * @param {String|Array.<String>} consumables.attributes Attribute name or array of attribute names to add as consumable.\n\t * @param {String|Array.<String>} consumables.classes Class name or array of class names to add as consumable.\n\t * @param {String|Array.<String>} consumables.styles Style name or array of style names to add as consumable.\n\t */\n\tadd( consumables ) {\n\t\tif ( consumables.name ) {\n\t\t\tthis._canConsumeName = true;\n\t\t}\n\n\t\tfor ( const type in this._consumables ) {\n\t\t\tif ( type in consumables ) {\n\t\t\t\tthis._add( type, consumables[ type ] );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Tests if parts of the {@link module:engine/view/node~Node view node} can be consumed.\n\t *\n\t * Element's name can be tested:\n\t *\n\t *\t\tconsumables.test( { name: true } );\n\t *\n\t * Attributes classes and styles:\n\t *\n\t *\t\tconsumables.test( { attributes: 'title', classes: 'foo', styles: 'color' } );\n\t *\t\tconsumables.test( { attributes: [ 'title', 'name' ], classes: [ 'foo', 'bar' ] );\n\t *\n\t * @param {Object} consumables Object describing which parts of the element should be tested.\n\t * @param {Boolean} consumables.name If set to `true` element's name will be tested.\n\t * @param {String|Array.<String>} consumables.attributes Attribute name or array of attribute names to test.\n\t * @param {String|Array.<String>} consumables.classes Class name or array of class names to test.\n\t * @param {String|Array.<String>} consumables.styles Style name or array of style names to test.\n\t * @returns {Boolean|null} `true` when all tested items can be consumed, `null` when even one of the items\n\t * was never marked for consumption and `false` when even one of the items was already consumed.\n\t */\n\ttest( consumables ) {\n\t\t// Check if name can be consumed.\n\t\tif ( consumables.name && !this._canConsumeName ) {\n\t\t\treturn this._canConsumeName;\n\t\t}\n\n\t\tfor ( const type in this._consumables ) {\n\t\t\tif ( type in consumables ) {\n\t\t\t\tconst value = this._test( type, consumables[ type ] );\n\n\t\t\t\tif ( value !== true ) {\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Return true only if all can be consumed.\n\t\treturn true;\n\t}\n\n\t/**\n\t * Consumes parts of {@link module:engine/view/element~Element view element}. This function does not check if consumable item\n\t * is already consumed - it consumes all consumable items provided.\n\t * Element's name can be consumed:\n\t *\n\t *\t\tconsumables.consume( { name: true } );\n\t *\n\t * Attributes classes and styles:\n\t *\n\t *\t\tconsumables.consume( { attributes: 'title', classes: 'foo', styles: 'color' } );\n\t *\t\tconsumables.consume( { attributes: [ 'title', 'name' ], classes: [ 'foo', 'bar' ] );\n\t *\n\t * @param {Object} consumables Object describing which parts of the element should be consumed.\n\t * @param {Boolean} consumables.name If set to `true` element's name will be consumed.\n\t * @param {String|Array.<String>} consumables.attributes Attribute name or array of attribute names to consume.\n\t * @param {String|Array.<String>} consumables.classes Class name or array of class names to consume.\n\t * @param {String|Array.<String>} consumables.styles Style name or array of style names to consume.\n\t */\n\tconsume( consumables ) {\n\t\tif ( consumables.name ) {\n\t\t\tthis._canConsumeName = false;\n\t\t}\n\n\t\tfor ( const type in this._consumables ) {\n\t\t\tif ( type in consumables ) {\n\t\t\t\tthis._consume( type, consumables[ type ] );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Revert already consumed parts of {@link module:engine/view/element~Element view Element}, so they can be consumed once again.\n\t * Element's name can be reverted:\n\t *\n\t *\t\tconsumables.revert( { name: true } );\n\t *\n\t * Attributes classes and styles:\n\t *\n\t *\t\tconsumables.revert( { attributes: 'title', classes: 'foo', styles: 'color' } );\n\t *\t\tconsumables.revert( { attributes: [ 'title', 'name' ], classes: [ 'foo', 'bar' ] );\n\t *\n\t * @param {Object} consumables Object describing which parts of the element should be reverted.\n\t * @param {Boolean} consumables.name If set to `true` element's name will be reverted.\n\t * @param {String|Array.<String>} consumables.attributes Attribute name or array of attribute names to revert.\n\t * @param {String|Array.<String>} consumables.classes Class name or array of class names to revert.\n\t * @param {String|Array.<String>} consumables.styles Style name or array of style names to revert.\n\t */\n\trevert( consumables ) {\n\t\tif ( consumables.name ) {\n\t\t\tthis._canConsumeName = true;\n\t\t}\n\n\t\tfor ( const type in this._consumables ) {\n\t\t\tif ( type in consumables ) {\n\t\t\t\tthis._revert( type, consumables[ type ] );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Helper method that adds consumables of a given type: attribute, class or style.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `viewconsumable-invalid-attribute` when `class` or `style`\n\t * type is provided - it should be handled separately by providing actual style/class type.\n\t *\n\t * @private\n\t * @param {String} type Type of the consumable item: `attributes`, `classes` or `styles`.\n\t * @param {String|Array.<String>} item Consumable item or array of items.\n\t */\n\t_add( type, item ) {\n\t\tconst items = isArray( item ) ? item : [ item ];\n\t\tconst consumables = this._consumables[ type ];\n\n\t\tfor ( const name of items ) {\n\t\t\tif ( type === 'attributes' && ( name === 'class' || name === 'style' ) ) {\n\t\t\t\t/**\n\t\t\t\t * Class and style attributes should be handled separately in\n\t\t\t\t * {@link module:engine/conversion/viewconsumable~ViewConsumable#add `ViewConsumable#add()`}.\n\t\t\t\t *\n\t\t\t\t * What you have done is trying to use:\n\t\t\t\t *\n\t\t\t\t *\t\tconsumables.add( { attributes: [ 'class', 'style' ] } );\n\t\t\t\t *\n\t\t\t\t * While each class and style should be registered separately:\n\t\t\t\t *\n\t\t\t\t *\t\tconsumables.add( { classes: 'some-class', styles: 'font-weight' } );\n\t\t\t\t *\n\t\t\t\t * @error viewconsumable-invalid-attribute\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'viewconsumable-invalid-attribute', this );\n\t\t\t}\n\n\t\t\tconsumables.set( name, true );\n\n\t\t\tif ( type === 'styles' ) {\n\t\t\t\tfor ( const alsoName of this.element.document.stylesProcessor.getRelatedStyles( name ) ) {\n\t\t\t\t\tconsumables.set( alsoName, true );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Helper method that tests consumables of a given type: attribute, class or style.\n\t *\n\t * @private\n\t * @param {String} type Type of the consumable item: `attributes`, `classes` or `styles`.\n\t * @param {String|Array.<String>} item Consumable item or array of items.\n\t * @returns {Boolean|null} Returns `true` if all items can be consumed, `null` when one of the items cannot be\n\t * consumed and `false` when one of the items is already consumed.\n\t */\n\t_test( type, item ) {\n\t\tconst items = isArray( item ) ? item : [ item ];\n\t\tconst consumables = this._consumables[ type ];\n\n\t\tfor ( const name of items ) {\n\t\t\tif ( type === 'attributes' && ( name === 'class' || name === 'style' ) ) {\n\t\t\t\tconst consumableName = name == 'class' ? 'classes' : 'styles';\n\n\t\t\t\t// Check all classes/styles if class/style attribute is tested.\n\t\t\t\tconst value = this._test( consumableName, [ ...this._consumables[ consumableName ].keys() ] );\n\n\t\t\t\tif ( value !== true ) {\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst value = consumables.get( name );\n\t\t\t\t// Return null if attribute is not found.\n\t\t\t\tif ( value === undefined ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tif ( !value ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Helper method that consumes items of a given type: attribute, class or style.\n\t *\n\t * @private\n\t * @param {String} type Type of the consumable item: `attributes`, `classes` or `styles`.\n\t * @param {String|Array.<String>} item Consumable item or array of items.\n\t */\n\t_consume( type, item ) {\n\t\tconst items = isArray( item ) ? item : [ item ];\n\t\tconst consumables = this._consumables[ type ];\n\n\t\tfor ( const name of items ) {\n\t\t\tif ( type === 'attributes' && ( name === 'class' || name === 'style' ) ) {\n\t\t\t\tconst consumableName = name == 'class' ? 'classes' : 'styles';\n\n\t\t\t\t// If class or style is provided for consumption - consume them all.\n\t\t\t\tthis._consume( consumableName, [ ...this._consumables[ consumableName ].keys() ] );\n\t\t\t} else {\n\t\t\t\tconsumables.set( name, false );\n\n\t\t\t\tif ( type == 'styles' ) {\n\t\t\t\t\tfor ( const toConsume of this.element.document.stylesProcessor.getRelatedStyles( name ) ) {\n\t\t\t\t\t\tconsumables.set( toConsume, false );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Helper method that reverts items of a given type: attribute, class or style.\n\t *\n\t * @private\n\t * @param {String} type Type of the consumable item: `attributes`, `classes` or , `styles`.\n\t * @param {String|Array.<String>} item Consumable item or array of items.\n\t */\n\t_revert( type, item ) {\n\t\tconst items = isArray( item ) ? item : [ item ];\n\t\tconst consumables = this._consumables[ type ];\n\n\t\tfor ( const name of items ) {\n\t\t\tif ( type === 'attributes' && ( name === 'class' || name === 'style' ) ) {\n\t\t\t\tconst consumableName = name == 'class' ? 'classes' : 'styles';\n\n\t\t\t\t// If class or style is provided for reverting - revert them all.\n\t\t\t\tthis._revert( consumableName, [ ...this._consumables[ consumableName ].keys() ] );\n\t\t\t} else {\n\t\t\t\tconst value = consumables.get( name );\n\n\t\t\t\tif ( value === false ) {\n\t\t\t\t\tconsumables.set( name, true );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/schema\n */\n\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\n\nimport Range from './range';\nimport Position from './position';\nimport Element from './element';\nimport Text from './text';\nimport TreeWalker from './treewalker';\n\n/**\n * The model's schema. It defines the allowed and disallowed structures of nodes as well as nodes' attributes.\n * The schema is usually defined by the features and based on them, the editing framework and features\n * make decisions on how to change and process the model.\n *\n * The instance of schema is available in {@link module:engine/model/model~Model#schema `editor.model.schema`}.\n *\n * Read more about the schema in:\n *\n * * The {@glink framework/guides/architecture/editing-engine#schema schema section} of the\n * {@glink framework/guides/architecture/editing-engine Introduction to the Editing engine architecture} guide.\n * * The {@glink framework/guides/deep-dive/schema Schema deep dive} guide.\n *\n * @mixes module:utils/observablemixin~ObservableMixin\n */\nexport default class Schema {\n\t/**\n\t * Creates a schema instance.\n\t */\n\tconstructor() {\n\t\tthis._sourceDefinitions = {};\n\n\t\t/**\n\t\t * A dictionary containing attribute properties.\n\t\t *\n\t\t * @private\n\t\t * @member {Object.<String,String>}\n\t\t */\n\t\tthis._attributeProperties = {};\n\n\t\tthis.decorate( 'checkChild' );\n\t\tthis.decorate( 'checkAttribute' );\n\n\t\tthis.on( 'checkAttribute', ( evt, args ) => {\n\t\t\targs[ 0 ] = new SchemaContext( args[ 0 ] );\n\t\t}, { priority: 'highest' } );\n\n\t\tthis.on( 'checkChild', ( evt, args ) => {\n\t\t\targs[ 0 ] = new SchemaContext( args[ 0 ] );\n\t\t\targs[ 1 ] = this.getDefinition( args[ 1 ] );\n\t\t}, { priority: 'highest' } );\n\t}\n\n\t/**\n\t * Registers a schema item. Can only be called once for every item name.\n\t *\n\t *\t\tschema.register( 'paragraph', {\n\t *\t\t\tinheritAllFrom: '$block'\n\t *\t\t} );\n\t *\n\t * @param {String} itemName\n\t * @param {module:engine/model/schema~SchemaItemDefinition} definition\n\t */\n\tregister( itemName, definition ) {\n\t\tif ( this._sourceDefinitions[ itemName ] ) {\n\t\t\t/**\n\t\t\t * A single item cannot be registered twice in the schema.\n\t\t\t *\n\t\t\t * This situation may happen when:\n\t\t\t *\n\t\t\t * * Two or more plugins called {@link #register `register()`} with the same name. This will usually mean that\n\t\t\t * there is a collision between plugins which try to use the same element in the model. Unfortunately,\n\t\t\t * the only way to solve this is by modifying one of these plugins to use a unique model element name.\n\t\t\t * * A single plugin was loaded twice. This happens when it is installed by npm/yarn in two versions\n\t\t\t * and usually means one or more of the following issues:\n\t\t\t * * a version mismatch (two of your dependencies require two different versions of this plugin),\n\t\t\t * * incorrect imports (this plugin is somehow imported twice in a way which confuses webpack),\n\t\t\t * * mess in `node_modules/` (`rm -rf node_modules/` may help).\n\t\t\t *\n\t\t\t * **Note:** Check the logged `itemName` to better understand which plugin was duplicated/conflicting.\n\t\t\t *\n\t\t\t * @param itemName The name of the model element that is being registered twice.\n\t\t\t * @error schema-cannot-register-item-twice\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'schema-cannot-register-item-twice',\n\t\t\t\tthis,\n\t\t\t\t{\n\t\t\t\t\titemName\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tthis._sourceDefinitions[ itemName ] = [\n\t\t\tObject.assign( {}, definition )\n\t\t];\n\n\t\tthis._clearCache();\n\t}\n\n\t/**\n\t * Extends a {@link #register registered} item's definition.\n\t *\n\t * Extending properties such as `allowIn` will add more items to the existing properties,\n\t * while redefining properties such as `isBlock` will override the previously defined ones.\n\t *\n\t *\t\tschema.register( 'foo', {\n\t *\t\t\tallowIn: '$root',\n\t *\t\t\tisBlock: true;\n\t *\t\t} );\n\t *\t\tschema.extend( 'foo', {\n\t *\t\t\tallowIn: 'blockQuote',\n\t *\t\t\tisBlock: false\n\t *\t\t} );\n\t *\n\t *\t\tschema.getDefinition( 'foo' );\n\t *\t\t//\t{\n\t *\t\t//\t\tallowIn: [ '$root', 'blockQuote' ],\n\t *\t\t// \t\tisBlock: false\n\t *\t\t//\t}\n\t *\n\t * @param {String} itemName\n\t * @param {module:engine/model/schema~SchemaItemDefinition} definition\n\t */\n\textend( itemName, definition ) {\n\t\tif ( !this._sourceDefinitions[ itemName ] ) {\n\t\t\t/**\n\t\t\t * Cannot extend an item which was not registered yet.\n\t\t\t *\n\t\t\t * This error happens when a plugin tries to extend the schema definition of an item which was not\n\t\t\t * {@link #register registered} yet.\n\t\t\t *\n\t\t\t * @param itemName The name of the model element which is being extended.\n\t\t\t * @error schema-cannot-extend-missing-item\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'schema-cannot-extend-missing-item', this, {\n\t\t\t\titemName\n\t\t\t} );\n\t\t}\n\n\t\tthis._sourceDefinitions[ itemName ].push( Object.assign( {}, definition ) );\n\n\t\tthis._clearCache();\n\t}\n\n\t/**\n\t * Returns data of all registered items.\n\t *\n\t * This method should normally be used for reflection purposes (e.g. defining a clone of a certain element,\n\t * checking a list of all block elements, etc).\n\t * Use specific methods (such as {@link #checkChild `checkChild()`} or {@link #isLimit `isLimit()`})\n\t * in other cases.\n\t *\n\t * @returns {Object.<String,module:engine/model/schema~SchemaCompiledItemDefinition>}\n\t */\n\tgetDefinitions() {\n\t\tif ( !this._compiledDefinitions ) {\n\t\t\tthis._compile();\n\t\t}\n\n\t\treturn this._compiledDefinitions;\n\t}\n\n\t/**\n\t * Returns a definition of the given item or `undefined` if an item is not registered.\n\t *\n\t * This method should normally be used for reflection purposes (e.g. defining a clone of a certain element,\n\t * checking a list of all block elements, etc).\n\t * Use specific methods (such as {@link #checkChild `checkChild()`} or {@link #isLimit `isLimit()`})\n\t * in other cases.\n\t *\n\t * @param {module:engine/model/item~Item|module:engine/model/schema~SchemaContextItem|String} item\n\t * @returns {module:engine/model/schema~SchemaCompiledItemDefinition}\n\t */\n\tgetDefinition( item ) {\n\t\tlet itemName;\n\n\t\tif ( typeof item == 'string' ) {\n\t\t\titemName = item;\n\t\t} else if ( item.is && ( item.is( '$text' ) || item.is( '$textProxy' ) ) ) {\n\t\t\titemName = '$text';\n\t\t}\n\t\t// Element or module:engine/model/schema~SchemaContextItem.\n\t\telse {\n\t\t\titemName = item.name;\n\t\t}\n\n\t\treturn this.getDefinitions()[ itemName ];\n\t}\n\n\t/**\n\t * Returns `true` if the given item is registered in the schema.\n\t *\n\t *\t\tschema.isRegistered( 'paragraph' ); // -> true\n\t *\t\tschema.isRegistered( editor.model.document.getRoot() ); // -> true\n\t *\t\tschema.isRegistered( 'foo' ); // -> false\n\t *\n\t * @param {module:engine/model/item~Item|module:engine/model/schema~SchemaContextItem|String} item\n \t * @returns {Boolean}\n\t */\n\tisRegistered( item ) {\n\t\treturn !!this.getDefinition( item );\n\t}\n\n\t/**\n\t * Returns `true` if the given item is defined to be\n\t * a block by the {@link module:engine/model/schema~SchemaItemDefinition}'s `isBlock` property.\n\t *\n\t *\t\tschema.isBlock( 'paragraph' ); // -> true\n\t *\t\tschema.isBlock( '$root' ); // -> false\n\t *\n\t *\t\tconst paragraphElement = writer.createElement( 'paragraph' );\n\t *\t\tschema.isBlock( paragraphElement ); // -> true\n\t *\n\t * See the {@glink framework/guides/deep-dive/schema#block-elements Block elements} section of\n\t * the {@glink framework/guides/deep-dive/schema Schema deep dive} guide for more details.\n\t *\n\t * @param {module:engine/model/item~Item|module:engine/model/schema~SchemaContextItem|String} item\n \t * @returns {Boolean}\n\t */\n\tisBlock( item ) {\n\t\tconst def = this.getDefinition( item );\n\n\t\treturn !!( def && def.isBlock );\n\t}\n\n\t/**\n\t * Returns `true` if the given item should be treated as a limit element.\n\t *\n\t * It considers an item to be a limit element if its\n\t * {@link module:engine/model/schema~SchemaItemDefinition}'s\n\t * {@link module:engine/model/schema~SchemaItemDefinition#isLimit `isLimit`} or\n\t * {@link module:engine/model/schema~SchemaItemDefinition#isObject `isObject`} property\n\t * was set to `true`.\n\t *\n\t *\t\tschema.isLimit( 'paragraph' ); // -> false\n\t *\t\tschema.isLimit( '$root' ); // -> true\n\t *\t\tschema.isLimit( editor.model.document.getRoot() ); // -> true\n\t *\t\tschema.isLimit( 'imageBlock' ); // -> true\n\t *\n\t * See the {@glink framework/guides/deep-dive/schema#limit-elements Limit elements} section of\n\t * the {@glink framework/guides/deep-dive/schema Schema deep dive} guide for more details.\n\t *\n\t * @param {module:engine/model/item~Item|module:engine/model/schema~SchemaContextItem|String} item\n \t * @returns {Boolean}\n\t */\n\tisLimit( item ) {\n\t\tconst def = this.getDefinition( item );\n\n\t\tif ( !def ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn !!( def.isLimit || def.isObject );\n\t}\n\n\t/**\n\t * Returns `true` if the given item should be treated as an object element.\n\t *\n\t * It considers an item to be an object element if its\n\t * {@link module:engine/model/schema~SchemaItemDefinition}'s\n\t * {@link module:engine/model/schema~SchemaItemDefinition#isObject `isObject`} property\n\t * was set to `true`.\n\t *\n\t *\t\tschema.isObject( 'paragraph' ); // -> false\n\t *\t\tschema.isObject( 'imageBlock' ); // -> true\n\t *\n\t *\t\tconst imageElement = writer.createElement( 'imageBlock' );\n\t *\t\tschema.isObject( imageElement ); // -> true\n\t *\n\t * See the {@glink framework/guides/deep-dive/schema#object-elements Object elements} section of\n\t * the {@glink framework/guides/deep-dive/schema Schema deep dive} guide for more details.\n\t *\n\t * @param {module:engine/model/item~Item|module:engine/model/schema~SchemaContextItem|String} item\n \t * @returns {Boolean}\n\t */\n\tisObject( item ) {\n\t\tconst def = this.getDefinition( item );\n\n\t\tif ( !def ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Note: Check out the implementation of #isLimit(), #isSelectable(), and #isContent()\n\t\t// to understand why these three constitute an object.\n\t\treturn !!( def.isObject || ( def.isLimit && def.isSelectable && def.isContent ) );\n\t}\n\n\t/**\n\t * Returns `true` if the given item is defined to be\n\t * an inline element by the {@link module:engine/model/schema~SchemaItemDefinition}'s `isInline` property.\n\t *\n\t *\t\tschema.isInline( 'paragraph' ); // -> false\n\t *\t\tschema.isInline( 'softBreak' ); // -> true\n\t *\n\t *\t\tconst text = writer.createText( 'foo' );\n\t *\t\tschema.isInline( text ); // -> true\n\t *\n\t * See the {@glink framework/guides/deep-dive/schema#inline-elements Inline elements} section of\n\t * the {@glink framework/guides/deep-dive/schema Schema deep dive} guide for more details.\n\t *\n\t * @param {module:engine/model/item~Item|module:engine/model/schema~SchemaContextItem|String} item\n\t * @returns {Boolean}\n\t */\n\tisInline( item ) {\n\t\tconst def = this.getDefinition( item );\n\n\t\treturn !!( def && def.isInline );\n\t}\n\n\t/**\n\t * Returns `true` if the given item is defined to be\n\t * a selectable element by the {@link module:engine/model/schema~SchemaItemDefinition}'s `isSelectable` property.\n\t *\n\t *\t\tschema.isSelectable( 'paragraph' ); // -> false\n\t *\t\tschema.isSelectable( 'heading1' ); // -> false\n\t *\t\tschema.isSelectable( 'imageBlock' ); // -> true\n\t *\t\tschema.isSelectable( 'tableCell' ); // -> true\n\t *\n\t *\t\tconst text = writer.createText( 'foo' );\n\t *\t\tschema.isSelectable( text ); // -> false\n\t *\n\t * See the {@glink framework/guides/deep-dive/schema#selectable-elements Selectable elements section} of\n\t * the {@glink framework/guides/deep-dive/schema Schema deep dive} guide for more details.\n\t *\n\t * @param {module:engine/model/item~Item|module:engine/model/schema~SchemaContextItem|String} item\n\t * @returns {Boolean}\n\t */\n\tisSelectable( item ) {\n\t\tconst def = this.getDefinition( item );\n\n\t\tif ( !def ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn !!( def.isSelectable || def.isObject );\n\t}\n\n\t/**\n\t * Returns `true` if the given item is defined to be\n\t * a content by the {@link module:engine/model/schema~SchemaItemDefinition}'s `isContent` property.\n\t *\n\t *\t\tschema.isContent( 'paragraph' ); // -> false\n\t *\t\tschema.isContent( 'heading1' ); // -> false\n\t *\t\tschema.isContent( 'imageBlock' ); // -> true\n\t *\t\tschema.isContent( 'horizontalLine' ); // -> true\n\t *\n\t *\t\tconst text = writer.createText( 'foo' );\n\t *\t\tschema.isContent( text ); // -> true\n\t *\n\t * See the {@glink framework/guides/deep-dive/schema#content-elements Content elements section} of\n\t * the {@glink framework/guides/deep-dive/schema Schema deep dive} guide for more details.\n\t *\n\t * @param {module:engine/model/item~Item|module:engine/model/schema~SchemaContextItem|String} item\n\t * @returns {Boolean}\n\t */\n\tisContent( item ) {\n\t\tconst def = this.getDefinition( item );\n\n\t\tif ( !def ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn !!( def.isContent || def.isObject );\n\t}\n\n\t/**\n\t * Checks whether the given node (`child`) can be a child of the given context.\n\t *\n\t *\t\tschema.checkChild( model.document.getRoot(), paragraph ); // -> false\n\t *\n\t *\t\tschema.register( 'paragraph', {\n\t *\t\t\tallowIn: '$root'\n\t *\t\t} );\n\t *\t\tschema.checkChild( model.document.getRoot(), paragraph ); // -> true\n\t *\n\t * Note: When verifying whether the given node can be a child of the given context, the\n\t * schema also verifies the entire context &mdash; from its root to its last element. Therefore, it is possible\n\t * for `checkChild()` to return `false` even though the context's last element can contain the checked child.\n\t * It happens if one of the context's elements does not allow its child.\n\t *\n\t * @fires checkChild\n\t * @param {module:engine/model/schema~SchemaContextDefinition} context The context in which the child will be checked.\n\t * @param {module:engine/model/node~Node|String} def The child to check.\n\t * @returns {Boolean}\n\t */\n\tcheckChild( context, def ) {\n\t\t// Note: context and child are already normalized here to a SchemaContext and SchemaCompiledItemDefinition.\n\t\tif ( !def ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this._checkContextMatch( def, context );\n\t}\n\n\t/**\n\t * Checks whether the given attribute can be applied in the given context (on the last\n\t * item of the context).\n\t *\n\t *\t\tschema.checkAttribute( textNode, 'bold' ); // -> false\n\t *\n\t *\t\tschema.extend( '$text', {\n\t *\t\t\tallowAttributes: 'bold'\n\t *\t\t} );\n\t *\t\tschema.checkAttribute( textNode, 'bold' ); // -> true\n\t *\n\t * @fires checkAttribute\n\t * @param {module:engine/model/schema~SchemaContextDefinition} context The context in which the attribute will be checked.\n\t * @param {String} attributeName\n\t * @returns {Boolean}\n\t */\n\tcheckAttribute( context, attributeName ) {\n\t\tconst def = this.getDefinition( context.last );\n\n\t\tif ( !def ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn def.allowAttributes.includes( attributeName );\n\t}\n\n\t/**\n\t * Checks whether the given element (`elementToMerge`) can be merged with the specified base element (`positionOrBaseElement`).\n\t *\n\t * In other words &mdash; whether `elementToMerge`'s children {@link #checkChild are allowed} in the `positionOrBaseElement`.\n\t *\n\t * This check ensures that elements merged with {@link module:engine/model/writer~Writer#merge `Writer#merge()`}\n\t * will be valid.\n\t *\n\t * Instead of elements, you can pass the instance of the {@link module:engine/model/position~Position} class as the\n\t * `positionOrBaseElement`. It means that the elements before and after the position will be checked whether they can be merged.\n\t *\n\t * @param {module:engine/model/position~Position|module:engine/model/element~Element} positionOrBaseElement The position or base\n\t * element to which the `elementToMerge` will be merged.\n\t * @param {module:engine/model/element~Element} elementToMerge The element to merge. Required if `positionOrBaseElement` is an element.\n\t * @returns {Boolean}\n\t */\n\tcheckMerge( positionOrBaseElement, elementToMerge = null ) {\n\t\tif ( positionOrBaseElement instanceof Position ) {\n\t\t\tconst nodeBefore = positionOrBaseElement.nodeBefore;\n\t\t\tconst nodeAfter = positionOrBaseElement.nodeAfter;\n\n\t\t\tif ( !( nodeBefore instanceof Element ) ) {\n\t\t\t\t/**\n\t\t\t\t * The node before the merge position must be an element.\n\t\t\t\t *\n\t\t\t\t * @error schema-check-merge-no-element-before\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'schema-check-merge-no-element-before',\n\t\t\t\t\tthis\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( !( nodeAfter instanceof Element ) ) {\n\t\t\t\t/**\n\t\t\t\t * The node after the merge position must be an element.\n\t\t\t\t *\n\t\t\t\t * @error schema-check-merge-no-element-after\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'schema-check-merge-no-element-after',\n\t\t\t\t\tthis\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn this.checkMerge( nodeBefore, nodeAfter );\n\t\t}\n\n\t\tfor ( const child of elementToMerge.getChildren() ) {\n\t\t\tif ( !this.checkChild( positionOrBaseElement, child ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Allows registering a callback to the {@link #checkChild} method calls.\n\t *\n\t * Callbacks allow you to implement rules which are not otherwise possible to achieve\n\t * by using the declarative API of {@link module:engine/model/schema~SchemaItemDefinition}.\n\t * For example, by using this method you can disallow elements in specific contexts.\n\t *\n\t * This method is a shorthand for using the {@link #event:checkChild} event. For even better control,\n\t * you can use that event instead.\n\t *\n\t * Example:\n\t *\n\t *\t\t// Disallow heading1 directly inside a blockQuote.\n\t *\t\tschema.addChildCheck( ( context, childDefinition ) => {\n\t *\t\t\tif ( context.endsWith( 'blockQuote' ) && childDefinition.name == 'heading1' ) {\n\t *\t\t\t\treturn false;\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * Which translates to:\n\t *\n\t *\t\tschema.on( 'checkChild', ( evt, args ) => {\n\t *\t\t\tconst context = args[ 0 ];\n\t *\t\t\tconst childDefinition = args[ 1 ];\n\t *\n\t *\t\t\tif ( context.endsWith( 'blockQuote' ) && childDefinition && childDefinition.name == 'heading1' ) {\n\t *\t\t\t\t// Prevent next listeners from being called.\n\t *\t\t\t\tevt.stop();\n\t *\t\t\t\t// Set the checkChild()'s return value.\n\t *\t\t\t\tevt.return = false;\n\t *\t\t\t}\n\t *\t\t}, { priority: 'high' } );\n\t *\n\t * @param {Function} callback The callback to be called. It is called with two parameters:\n\t * {@link module:engine/model/schema~SchemaContext} (context) instance and\n\t * {@link module:engine/model/schema~SchemaCompiledItemDefinition} (child-to-check definition).\n\t * The callback may return `true/false` to override `checkChild()`'s return value. If it does not return\n\t * a boolean value, the default algorithm (or other callbacks) will define `checkChild()`'s return value.\n\t */\n\taddChildCheck( callback ) {\n\t\tthis.on( 'checkChild', ( evt, [ ctx, childDef ] ) => {\n\t\t\t// checkChild() was called with a non-registered child.\n\t\t\t// In 99% cases such check should return false, so not to overcomplicate all callbacks\n\t\t\t// don't even execute them.\n\t\t\tif ( !childDef ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst retValue = callback( ctx, childDef );\n\n\t\t\tif ( typeof retValue == 'boolean' ) {\n\t\t\t\tevt.stop();\n\t\t\t\tevt.return = retValue;\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Allows registering a callback to the {@link #checkAttribute} method calls.\n\t *\n\t * Callbacks allow you to implement rules which are not otherwise possible to achieve\n\t * by using the declarative API of {@link module:engine/model/schema~SchemaItemDefinition}.\n\t * For example, by using this method you can disallow attribute if node to which it is applied\n\t * is contained within some other element (e.g. you want to disallow `bold` on `$text` within `heading1`).\n\t *\n\t * This method is a shorthand for using the {@link #event:checkAttribute} event. For even better control,\n\t * you can use that event instead.\n\t *\n\t * Example:\n\t *\n\t *\t\t// Disallow bold on $text inside heading1.\n\t *\t\tschema.addAttributeCheck( ( context, attributeName ) => {\n\t *\t\t\tif ( context.endsWith( 'heading1 $text' ) && attributeName == 'bold' ) {\n\t *\t\t\t\treturn false;\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * Which translates to:\n\t *\n\t *\t\tschema.on( 'checkAttribute', ( evt, args ) => {\n\t *\t\t\tconst context = args[ 0 ];\n\t *\t\t\tconst attributeName = args[ 1 ];\n\t *\n\t *\t\t\tif ( context.endsWith( 'heading1 $text' ) && attributeName == 'bold' ) {\n\t *\t\t\t\t// Prevent next listeners from being called.\n\t *\t\t\t\tevt.stop();\n\t *\t\t\t\t// Set the checkAttribute()'s return value.\n\t *\t\t\t\tevt.return = false;\n\t *\t\t\t}\n\t *\t\t}, { priority: 'high' } );\n\t *\n\t * @param {Function} callback The callback to be called. It is called with two parameters:\n\t * {@link module:engine/model/schema~SchemaContext} (context) instance and attribute name.\n\t * The callback may return `true/false` to override `checkAttribute()`'s return value. If it does not return\n\t * a boolean value, the default algorithm (or other callbacks) will define `checkAttribute()`'s return value.\n\t */\n\taddAttributeCheck( callback ) {\n\t\tthis.on( 'checkAttribute', ( evt, [ ctx, attributeName ] ) => {\n\t\t\tconst retValue = callback( ctx, attributeName );\n\n\t\t\tif ( typeof retValue == 'boolean' ) {\n\t\t\t\tevt.stop();\n\t\t\t\tevt.return = retValue;\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * This method allows assigning additional metadata to the model attributes. For example,\n\t * {@link module:engine/model/schema~AttributeProperties `AttributeProperties#isFormatting` property} is\n\t * used to mark formatting attributes (like `bold` or `italic`).\n\t *\n\t *\t\t// Mark bold as a formatting attribute.\n\t *\t\tschema.setAttributeProperties( 'bold', {\n\t *\t\t\tisFormatting: true\n\t *\t\t} );\n\t *\n\t *\t\t// Override code not to be considered a formatting markup.\n\t *\t\tschema.setAttributeProperties( 'code', {\n\t *\t\t\tisFormatting: false\n\t *\t\t} );\n\t *\n\t * Properties are not limited to members defined in the\n\t * {@link module:engine/model/schema~AttributeProperties `AttributeProperties` type} and you can also use custom properties:\n\t *\n\t *\t\tschema.setAttributeProperties( 'blockQuote', {\n\t *\t\t\tcustomProperty: 'value'\n\t *\t\t} );\n\t *\n\t * Subsequent calls with the same attribute will extend its custom properties:\n\t *\n\t *\t\tschema.setAttributeProperties( 'blockQuote', {\n\t *\t\t\tone: 1\n\t *\t\t} );\n\t *\n\t *\t\tschema.setAttributeProperties( 'blockQuote', {\n\t *\t\t\ttwo: 2\n\t *\t\t} );\n\t *\n\t *\t\tconsole.log( schema.getAttributeProperties( 'blockQuote' ) );\n\t *\t\t// Logs: { one: 1, two: 2 }\n\t *\n\t * @param {String} attributeName A name of the attribute to receive the properties.\n\t * @param {module:engine/model/schema~AttributeProperties} properties A dictionary of properties.\n\t */\n\tsetAttributeProperties( attributeName, properties ) {\n\t\tthis._attributeProperties[ attributeName ] = Object.assign( this.getAttributeProperties( attributeName ), properties );\n\t}\n\n\t/**\n\t * Returns properties associated with a given model attribute. See {@link #setAttributeProperties `setAttributeProperties()`}.\n\t *\n\t * @param {String} attributeName A name of the attribute.\n\t * @returns {module:engine/model/schema~AttributeProperties}\n\t */\n\tgetAttributeProperties( attributeName ) {\n\t\treturn this._attributeProperties[ attributeName ] || {};\n\t}\n\n\t/**\n\t * Returns the lowest {@link module:engine/model/schema~Schema#isLimit limit element} containing the entire\n\t * selection/range/position or the root otherwise.\n\t *\n\t * @param {module:engine/model/selection~Selection|module:engine/model/documentselection~DocumentSelection|\n\t * module:engine/model/range~Range|module:engine/model/position~Position} selectionOrRangeOrPosition\n\t * The selection/range/position to check.\n\t * @returns {module:engine/model/element~Element} The lowest limit element containing\n\t * the entire `selectionOrRangeOrPosition`.\n\t */\n\tgetLimitElement( selectionOrRangeOrPosition ) {\n\t\tlet element;\n\n\t\tif ( selectionOrRangeOrPosition instanceof Position ) {\n\t\t\telement = selectionOrRangeOrPosition.parent;\n\t\t} else {\n\t\t\tconst ranges = selectionOrRangeOrPosition instanceof Range ?\n\t\t\t\t[ selectionOrRangeOrPosition ] :\n\t\t\t\tArray.from( selectionOrRangeOrPosition.getRanges() );\n\n\t\t\t// Find the common ancestor for all selection's ranges.\n\t\t\telement = ranges\n\t\t\t\t.reduce( ( element, range ) => {\n\t\t\t\t\tconst rangeCommonAncestor = range.getCommonAncestor();\n\n\t\t\t\t\tif ( !element ) {\n\t\t\t\t\t\treturn rangeCommonAncestor;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn element.getCommonAncestor( rangeCommonAncestor, { includeSelf: true } );\n\t\t\t\t}, null );\n\t\t}\n\n\t\twhile ( !this.isLimit( element ) ) {\n\t\t\tif ( element.parent ) {\n\t\t\t\telement = element.parent;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn element;\n\t}\n\n\t/**\n\t * Checks whether the attribute is allowed in selection:\n\t *\n\t * * if the selection is not collapsed, then checks if the attribute is allowed on any of nodes in that range,\n\t * * if the selection is collapsed, then checks if on the selection position there's a text with the\n\t * specified attribute allowed.\n\t *\n\t * @param {module:engine/model/selection~Selection|module:engine/model/documentselection~DocumentSelection} selection\n\t * Selection which will be checked.\n\t * @param {String} attribute The name of the attribute to check.\n\t * @returns {Boolean}\n\t */\n\tcheckAttributeInSelection( selection, attribute ) {\n\t\tif ( selection.isCollapsed ) {\n\t\t\tconst firstPosition = selection.getFirstPosition();\n\t\t\tconst context = [\n\t\t\t\t...firstPosition.getAncestors(),\n\t\t\t\tnew Text( '', selection.getAttributes() )\n\t\t\t];\n\n\t\t\t// Check whether schema allows for a text with the attribute in the selection.\n\t\t\treturn this.checkAttribute( context, attribute );\n\t\t} else {\n\t\t\tconst ranges = selection.getRanges();\n\n\t\t\t// For all ranges, check nodes in them until you find a node that is allowed to have the attribute.\n\t\t\tfor ( const range of ranges ) {\n\t\t\t\tfor ( const value of range ) {\n\t\t\t\t\tif ( this.checkAttribute( value.item, attribute ) ) {\n\t\t\t\t\t\t// If we found a node that is allowed to have the attribute, return true.\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If we haven't found such node, return false.\n\t\treturn false;\n\t}\n\n\t/**\n\t * Transforms the given set of ranges into a set of ranges where the given attribute is allowed (and can be applied).\n\t *\n\t * @param {Array.<module:engine/model/range~Range>} ranges Ranges to be validated.\n\t * @param {String} attribute The name of the attribute to check.\n\t * @returns {Iterable.<module:engine/model/range~Range>} Ranges in which the attribute is allowed.\n\t */\n\t* getValidRanges( ranges, attribute ) {\n\t\tranges = convertToMinimalFlatRanges( ranges );\n\n\t\tfor ( const range of ranges ) {\n\t\t\tyield* this._getValidRangesForRange( range, attribute );\n\t\t}\n\t}\n\n\t/**\n\t * Basing on given `position`, finds and returns a {@link module:engine/model/range~Range range} which is\n\t * nearest to that `position` and is a correct range for selection.\n\t *\n\t * The correct selection range might be collapsed when it is located in a position where the text node can be placed.\n\t * Non-collapsed range is returned when selection can be placed around element marked as an \"object\" in\n\t * the {@link module:engine/model/schema~Schema schema}.\n\t *\n\t * Direction of searching for the nearest correct selection range can be specified as:\n\t *\n\t * * `both` - searching will be performed in both ways,\n\t * * `forward` - searching will be performed only forward,\n\t * * `backward` - searching will be performed only backward.\n\t *\n\t * When valid selection range cannot be found, `null` is returned.\n\t *\n\t * @param {module:engine/model/position~Position} position Reference position where new selection range should be looked for.\n\t * @param {'both'|'forward'|'backward'} [direction='both'] Search direction.\n\t * @returns {module:engine/model/range~Range|null} Nearest selection range or `null` if one cannot be found.\n\t */\n\tgetNearestSelectionRange( position, direction = 'both' ) {\n\t\t// Return collapsed range if provided position is valid.\n\t\tif ( this.checkChild( position, '$text' ) ) {\n\t\t\treturn new Range( position );\n\t\t}\n\n\t\tlet backwardWalker, forwardWalker;\n\n\t\t// Never leave a limit element.\n\t\tconst limitElement = position.getAncestors().reverse().find( item => this.isLimit( item ) ) || position.root;\n\n\t\tif ( direction == 'both' || direction == 'backward' ) {\n\t\t\tbackwardWalker = new TreeWalker( {\n\t\t\t\tboundaries: Range._createIn( limitElement ),\n\t\t\t\tstartPosition: position,\n\t\t\t\tdirection: 'backward'\n\t\t\t} );\n\t\t}\n\n\t\tif ( direction == 'both' || direction == 'forward' ) {\n\t\t\tforwardWalker = new TreeWalker( {\n\t\t\t\tboundaries: Range._createIn( limitElement ),\n\t\t\t\tstartPosition: position\n\t\t\t} );\n\t\t}\n\n\t\tfor ( const data of combineWalkers( backwardWalker, forwardWalker ) ) {\n\t\t\tconst type = ( data.walker == backwardWalker ? 'elementEnd' : 'elementStart' );\n\t\t\tconst value = data.value;\n\n\t\t\tif ( value.type == type && this.isObject( value.item ) ) {\n\t\t\t\treturn Range._createOn( value.item );\n\t\t\t}\n\n\t\t\tif ( this.checkChild( value.nextPosition, '$text' ) ) {\n\t\t\t\treturn new Range( value.nextPosition );\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Tries to find position ancestors that allow to insert a given node.\n\t * It starts searching from the given position and goes node by node to the top of the model tree\n\t * as long as a {@link module:engine/model/schema~Schema#isLimit limit element}, an\n\t * {@link module:engine/model/schema~Schema#isObject object element} or a topmost ancestor is not reached.\n\t *\n\t * @param {module:engine/model/position~Position} position The position that the search will start from.\n\t * @param {module:engine/model/node~Node|String} node The node for which an allowed parent should be found or its name.\n\t * @returns {module:engine/model/element~Element|null} element Allowed parent or null if nothing was found.\n\t */\n\tfindAllowedParent( position, node ) {\n\t\tlet parent = position.parent;\n\n\t\twhile ( parent ) {\n\t\t\tif ( this.checkChild( parent, node ) ) {\n\t\t\t\treturn parent;\n\t\t\t}\n\n\t\t\t// Do not split limit elements.\n\t\t\tif ( this.isLimit( parent ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Removes attributes disallowed by the schema.\n\t *\n\t * @param {Iterable.<module:engine/model/node~Node>} nodes Nodes that will be filtered.\n\t * @param {module:engine/model/writer~Writer} writer\n\t */\n\tremoveDisallowedAttributes( nodes, writer ) {\n\t\tfor ( const node of nodes ) {\n\t\t\t// When node is a `Text` it has no children, so just filter it out.\n\t\t\tif ( node.is( '$text' ) ) {\n\t\t\t\tremoveDisallowedAttributeFromNode( this, node, writer );\n\t\t\t}\n\t\t\t// In a case of `Element` iterates through positions between nodes inside this element\n\t\t\t// and filter out node before the current position, or position parent when position\n\t\t\t// is at start of an element. Using positions prevent from omitting merged nodes\n\t\t\t// see https://github.com/ckeditor/ckeditor5-engine/issues/1789.\n\t\t\telse {\n\t\t\t\tconst rangeInNode = Range._createIn( node );\n\t\t\t\tconst positionsInRange = rangeInNode.getPositions();\n\n\t\t\t\tfor ( const position of positionsInRange ) {\n\t\t\t\t\tconst item = position.nodeBefore || position.parent;\n\n\t\t\t\t\tremoveDisallowedAttributeFromNode( this, item, writer );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Creates an instance of the schema context.\n\t *\n\t * @param {module:engine/model/schema~SchemaContextDefinition} context\n\t * @returns {module:engine/model/schema~SchemaContext}\n\t */\n\tcreateContext( context ) {\n\t\treturn new SchemaContext( context );\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_clearCache() {\n\t\tthis._compiledDefinitions = null;\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_compile() {\n\t\tconst compiledDefinitions = {};\n\t\tconst sourceRules = this._sourceDefinitions;\n\t\tconst itemNames = Object.keys( sourceRules );\n\n\t\tfor ( const itemName of itemNames ) {\n\t\t\tcompiledDefinitions[ itemName ] = compileBaseItemRule( sourceRules[ itemName ], itemName );\n\t\t}\n\n\t\tfor ( const itemName of itemNames ) {\n\t\t\tcompileAllowChildren( compiledDefinitions, itemName );\n\t\t}\n\n\t\tfor ( const itemName of itemNames ) {\n\t\t\tcompileAllowContentOf( compiledDefinitions, itemName );\n\t\t}\n\n\t\tfor ( const itemName of itemNames ) {\n\t\t\tcompileAllowWhere( compiledDefinitions, itemName );\n\t\t}\n\n\t\tfor ( const itemName of itemNames ) {\n\t\t\tcompileAllowAttributesOf( compiledDefinitions, itemName );\n\t\t\tcompileInheritPropertiesFrom( compiledDefinitions, itemName );\n\t\t}\n\n\t\tfor ( const itemName of itemNames ) {\n\t\t\tcleanUpAllowIn( compiledDefinitions, itemName );\n\t\t\tsetupAllowChildren( compiledDefinitions, itemName );\n\t\t\tcleanUpAllowAttributes( compiledDefinitions, itemName );\n\t\t}\n\n\t\tthis._compiledDefinitions = compiledDefinitions;\n\t}\n\n\t/**\n\t * @private\n\t * @param {module:engine/model/schema~SchemaCompiledItemDefinition} def\n\t * @param {module:engine/model/schema~SchemaContext} context\n\t * @param {Number} contextItemIndex\n\t */\n\t_checkContextMatch( def, context, contextItemIndex = context.length - 1 ) {\n\t\tconst contextItem = context.getItem( contextItemIndex );\n\n\t\tif ( def.allowIn.includes( contextItem.name ) ) {\n\t\t\tif ( contextItemIndex == 0 ) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tconst parentRule = this.getDefinition( contextItem );\n\n\t\t\t\treturn this._checkContextMatch( parentRule, context, contextItemIndex - 1 );\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Takes a flat range and an attribute name. Traverses the range recursively and deeply to find and return all ranges\n\t * inside the given range on which the attribute can be applied.\n\t *\n\t * This is a helper function for {@link ~Schema#getValidRanges}.\n\t *\n\t * @private\n\t * @param {module:engine/model/range~Range} range The range to process.\n\t * @param {String} attribute The name of the attribute to check.\n\t * @returns {Iterable.<module:engine/model/range~Range>} Ranges in which the attribute is allowed.\n\t */\n\t* _getValidRangesForRange( range, attribute ) {\n\t\tlet start = range.start;\n\t\tlet end = range.start;\n\n\t\tfor ( const item of range.getItems( { shallow: true } ) ) {\n\t\t\tif ( item.is( 'element' ) ) {\n\t\t\t\tyield* this._getValidRangesForRange( Range._createIn( item ), attribute );\n\t\t\t}\n\n\t\t\tif ( !this.checkAttribute( item, attribute ) ) {\n\t\t\t\tif ( !start.isEqual( end ) ) {\n\t\t\t\t\tyield new Range( start, end );\n\t\t\t\t}\n\n\t\t\t\tstart = Position._createAfter( item );\n\t\t\t}\n\n\t\t\tend = Position._createAfter( item );\n\t\t}\n\n\t\tif ( !start.isEqual( end ) ) {\n\t\t\tyield new Range( start, end );\n\t\t}\n\t}\n}\n\nmix( Schema, ObservableMixin );\n\n/**\n * Event fired when the {@link #checkChild} method is called. It allows plugging in\n * additional behavior, for example implementing rules which cannot be defined using the declarative\n * {@link module:engine/model/schema~SchemaItemDefinition} interface.\n *\n * **Note:** The {@link #addChildCheck} method is a more handy way to register callbacks. Internally,\n * it registers a listener to this event but comes with a simpler API and it is the recommended choice\n * in most of the cases.\n *\n * The {@link #checkChild} method fires an event because it is\n * {@link module:utils/observablemixin~ObservableMixin#decorate decorated} with it. Thanks to that you can\n * use this event in various ways, but the most important use case is overriding standard behavior of the\n * `checkChild()` method. Let's see a typical listener template:\n *\n *\t\tschema.on( 'checkChild', ( evt, args ) => {\n *\t\t\tconst context = args[ 0 ];\n *\t\t\tconst childDefinition = args[ 1 ];\n *\t\t}, { priority: 'high' } );\n *\n * The listener is added with a `high` priority to be executed before the default method is really called. The `args` callback\n * parameter contains arguments passed to `checkChild( context, child )`. However, the `context` parameter is already\n * normalized to a {@link module:engine/model/schema~SchemaContext} instance and `child` to a\n * {@link module:engine/model/schema~SchemaCompiledItemDefinition} instance, so you do not have to worry about\n * the various ways how `context` and `child` may be passed to `checkChild()`.\n *\n * **Note:** `childDefinition` may be `undefined` if `checkChild()` was called with a non-registered element.\n *\n * So, in order to implement a rule \"disallow `heading1` in `blockQuote`\", you can add such a listener:\n *\n *\t\tschema.on( 'checkChild', ( evt, args ) => {\n *\t\t\tconst context = args[ 0 ];\n *\t\t\tconst childDefinition = args[ 1 ];\n *\n *\t\t\tif ( context.endsWith( 'blockQuote' ) && childDefinition && childDefinition.name == 'heading1' ) {\n *\t\t\t\t// Prevent next listeners from being called.\n *\t\t\t\tevt.stop();\n *\t\t\t\t// Set the checkChild()'s return value.\n *\t\t\t\tevt.return = false;\n *\t\t\t}\n *\t\t}, { priority: 'high' } );\n *\n * Allowing elements in specific contexts will be a far less common use case, because it is normally handled by the\n * `allowIn` rule from {@link module:engine/model/schema~SchemaItemDefinition}. But if you have a complex scenario\n * where `listItem` should be allowed only in element `foo` which must be in element `bar`, then this would be the way:\n *\n *\t\tschema.on( 'checkChild', ( evt, args ) => {\n *\t\t\tconst context = args[ 0 ];\n *\t\t\tconst childDefinition = args[ 1 ];\n *\n *\t\t\tif ( context.endsWith( 'bar foo' ) && childDefinition.name == 'listItem' ) {\n *\t\t\t\t// Prevent next listeners from being called.\n *\t\t\t\tevt.stop();\n *\t\t\t\t// Set the checkChild()'s return value.\n *\t\t\t\tevt.return = true;\n *\t\t\t}\n *\t\t}, { priority: 'high' } );\n *\n * @event checkChild\n * @param {Array} args The `checkChild()`'s arguments.\n */\n\n/**\n * Event fired when the {@link #checkAttribute} method is called. It allows plugging in\n * additional behavior, for example implementing rules which cannot be defined using the declarative\n * {@link module:engine/model/schema~SchemaItemDefinition} interface.\n *\n * **Note:** The {@link #addAttributeCheck} method is a more handy way to register callbacks. Internally,\n * it registers a listener to this event but comes with a simpler API and it is the recommended choice\n * in most of the cases.\n *\n * The {@link #checkAttribute} method fires an event because it is\n * {@link module:utils/observablemixin~ObservableMixin#decorate decorated} with it. Thanks to that you can\n * use this event in various ways, but the most important use case is overriding the standard behavior of the\n * `checkAttribute()` method. Let's see a typical listener template:\n *\n *\t\tschema.on( 'checkAttribute', ( evt, args ) => {\n *\t\t\tconst context = args[ 0 ];\n *\t\t\tconst attributeName = args[ 1 ];\n *\t\t}, { priority: 'high' } );\n *\n * The listener is added with a `high` priority to be executed before the default method is really called. The `args` callback\n * parameter contains arguments passed to `checkAttribute( context, attributeName )`. However, the `context` parameter is already\n * normalized to a {@link module:engine/model/schema~SchemaContext} instance, so you do not have to worry about\n * the various ways how `context` may be passed to `checkAttribute()`.\n *\n * So, in order to implement a rule \"disallow `bold` in a text which is in a `heading1`, you can add such a listener:\n *\n *\t\tschema.on( 'checkAttribute', ( evt, args ) => {\n *\t\t\tconst context = args[ 0 ];\n *\t\t\tconst attributeName = args[ 1 ];\n *\n *\t\t\tif ( context.endsWith( 'heading1 $text' ) && attributeName == 'bold' ) {\n *\t\t\t\t// Prevent next listeners from being called.\n *\t\t\t\tevt.stop();\n *\t\t\t\t// Set the checkAttribute()'s return value.\n *\t\t\t\tevt.return = false;\n *\t\t\t}\n *\t\t}, { priority: 'high' } );\n *\n * Allowing attributes in specific contexts will be a far less common use case, because it is normally handled by the\n * `allowAttributes` rule from {@link module:engine/model/schema~SchemaItemDefinition}. But if you have a complex scenario\n * where `bold` should be allowed only in element `foo` which must be in element `bar`, then this would be the way:\n *\n *\t\tschema.on( 'checkAttribute', ( evt, args ) => {\n *\t\t\tconst context = args[ 0 ];\n *\t\t\tconst attributeName = args[ 1 ];\n *\n *\t\t\tif ( context.endsWith( 'bar foo $text' ) && attributeName == 'bold' ) {\n *\t\t\t\t// Prevent next listeners from being called.\n *\t\t\t\tevt.stop();\n *\t\t\t\t// Set the checkAttribute()'s return value.\n *\t\t\t\tevt.return = true;\n *\t\t\t}\n *\t\t}, { priority: 'high' } );\n *\n * @event checkAttribute\n * @param {Array} args The `checkAttribute()`'s arguments.\n */\n\n/**\n * A definition of a {@link module:engine/model/schema~Schema schema} item.\n *\n * You can define the following rules:\n *\n * * {@link ~SchemaItemDefinition#allowIn `allowIn`} &ndash; Defines in which other items this item will be allowed.\n * * {@link ~SchemaItemDefinition#allowChildren `allowChildren`} &ndash; Defines which other items are allowed inside this item.\n * * {@link ~SchemaItemDefinition#allowAttributes `allowAttributes`} &ndash; Defines allowed attributes of the given item.\n * * {@link ~SchemaItemDefinition#allowContentOf `allowContentOf`} &ndash; Inherits \"allowed children\" from other items.\n * * {@link ~SchemaItemDefinition#allowWhere `allowWhere`} &ndash; Inherits \"allowed in\" from other items.\n * * {@link ~SchemaItemDefinition#allowAttributesOf `allowAttributesOf`} &ndash; Inherits attributes from other items.\n * * {@link ~SchemaItemDefinition#inheritTypesFrom `inheritTypesFrom`} &ndash; Inherits `is*` properties of other items.\n * * {@link ~SchemaItemDefinition#inheritAllFrom `inheritAllFrom`} &ndash;\n * A shorthand for `allowContentOf`, `allowWhere`, `allowAttributesOf`, `inheritTypesFrom`.\n *\n * # The `is*` properties\n *\n * There are a couple commonly used `is*` properties. Their role is to assign additional semantics to schema items.\n * You can define more properties but you will also need to implement support for them in the existing editor features.\n *\n * * {@link ~SchemaItemDefinition#isBlock `isBlock`} &ndash; Whether this item is paragraph-like.\n * Generally speaking, content is usually made out of blocks like paragraphs, list items, images, headings, etc.\n * * {@link ~SchemaItemDefinition#isInline `isInline`} &ndash; Whether an item is \"text-like\" and should be treated as an inline node.\n * Examples of inline elements: `$text`, `softBreak` (`<br>`), etc.\n * * {@link ~SchemaItemDefinition#isLimit `isLimit`} &ndash; It can be understood as whether this element\n * should not be split by <kbd>Enter</kbd>. Examples of limit elements: `$root`, table cell, image caption, etc.\n * In other words, all actions that happen inside a limit element are limited to its content.\n * All objects are treated as limit elements, too.\n * * {@link ~SchemaItemDefinition#isObject `isObject`} &ndash; Whether an item is \"self-contained\" and should be treated as a whole.\n * Examples of object elements: `imageBlock`, `table`, `video`, etc. An object is also a limit, so\n * {@link module:engine/model/schema~Schema#isLimit `isLimit()`} returns `true` for object elements automatically.\n *\n * Read more about the meaning of these types in the\n * {@glink framework/guides/deep-dive/schema#defining-additional-semantics dedicated section of the Schema deep dive} guide.\n *\n * # Generic items\n *\n * There are three basic generic items: `$root`, `$block` and `$text`.\n * They are defined as follows:\n *\n *\t\tthis.schema.register( '$root', {\n *\t\t\tisLimit: true\n *\t\t} );\n *\t\tthis.schema.register( '$block', {\n *\t\t\tallowIn: '$root',\n *\t\t\tisBlock: true\n *\t\t} );\n *\t\tthis.schema.register( '$text', {\n *\t\t\tallowIn: '$block',\n *\t\t\tisInline: true\n *\t\t} );\n *\n * They reflect typical editor content that is contained within one root, consists of several blocks\n * (paragraphs, lists items, headings, images) which, in turn, may contain text inside.\n *\n * By inheriting from the generic items you can define new items which will get extended by other editor features.\n * Read more about generic types in the {@glink framework/guides/deep-dive/schema Schema deep dive} guide.\n *\n * # Example definitions\n *\n * Allow `paragraph` in roots and block quotes:\n *\n *\t\tschema.register( 'paragraph', {\n *\t\t\tallowIn: [ '$root', 'blockQuote' ],\n *\t\t\tisBlock: true\n *\t\t} );\n *\n * Allow `paragraph` everywhere where `$block` is allowed (i.e. in `$root`):\n *\n *\t\tschema.register( 'paragraph', {\n *\t\t\tallowWhere: '$block',\n *\t\t\tisBlock: true\n *\t\t} );\n *\n * Allow `paragraph` inside a `$root` and allow `$text` as a `paragraph` child:\n *\n *\t\tschema.register( 'paragraph', {\n *\t\t\tallowIn: '$root',\n *\t\t\tallowChildren: '$text',\n *\t\t\tisBlock: true\n *\t\t} );\n *\n * Make `imageBlock` a block object, which is allowed everywhere where `$block` is.\n * Also, allow `src` and `alt` attributes in it:\n *\n *\t\tschema.register( 'imageBlock', {\n *\t\t\tallowWhere: '$block',\n *\t\t\tallowAttributes: [ 'src', 'alt' ],\n *\t\t\tisBlock: true,\n *\t\t\tisObject: true\n *\t\t} );\n *\n * Make `caption` allowed in `imageBlock` and make it allow all the content of `$block`s (usually, `$text`).\n * Also, mark it as a limit element so it cannot be split:\n *\n *\t\tschema.register( 'caption', {\n *\t\t\tallowIn: 'imageBlock',\n *\t\t\tallowContentOf: '$block',\n *\t\t\tisLimit: true\n *\t\t} );\n *\n * Make `listItem` inherit all from `$block` but also allow additional attributes:\n *\n *\t\tschema.register( 'listItem', {\n *\t\t\tinheritAllFrom: '$block',\n *\t\t\tallowAttributes: [ 'listType', 'listIndent' ]\n *\t\t} );\n *\n * Which translates to:\n *\n *\t\tschema.register( 'listItem', {\n *\t\t\tallowWhere: '$block',\n *\t\t\tallowContentOf: '$block',\n *\t\t\tallowAttributesOf: '$block',\n *\t\t\tinheritTypesFrom: '$block',\n *\t\t\tallowAttributes: [ 'listType', 'listIndent' ]\n *\t\t} );\n *\n * # Tips\n *\n * * Check schema definitions of existing features to see how they are defined.\n * * If you want to publish your feature so other developers can use it, try to use\n * generic items as much as possible.\n * * Keep your model clean. Limit it to the actual data and store information in a normalized way.\n * * Remember about defining the `is*` properties. They do not affect the allowed structures, but they can\n * affect how the editor features treat your elements.\n *\n * @typedef {Object} module:engine/model/schema~SchemaItemDefinition\n *\n * @property {String|Array.<String>} allowIn Defines in which other items this item will be allowed.\n * @property {String|Array.<String>} allowChildren Defines which other items are allowed inside this item.\n * @property {String|Array.<String>} allowAttributes Defines allowed attributes of the given item.\n * @property {String|Array.<String>} allowContentOf Inherits \"allowed children\" from other items.\n * @property {String|Array.<String>} allowWhere Inherits \"allowed in\" from other items.\n * @property {String|Array.<String>} allowAttributesOf Inherits attributes from other items.\n * @property {String|Array.<String>} inheritTypesFrom Inherits `is*` properties of other items.\n * @property {String} inheritAllFrom A shorthand for `allowContentOf`, `allowWhere`, `allowAttributesOf`, `inheritTypesFrom`.\n *\n * @property {Boolean} isBlock\n * Whether this item is paragraph-like. Generally speaking, content is usually made out of blocks\n * like paragraphs, list items, images, headings, etc. All these elements are marked as blocks. A block\n * should not allow another block inside. Note: There is also the `$block` generic item which has `isBlock` set to `true`.\n * Most block type items will inherit from `$block` (through `inheritAllFrom`).\n *\n * Read more about the block elements in the\n * {@glink framework/guides/deep-dive/schema#block-elements Block elements section} of\n * the {@glink framework/guides/deep-dive/schema Schema deep dive}.\n *\n * @property {Boolean} isInline\n * Whether an item is \"text-like\" and should be treated as an inline node. Examples of inline elements:\n * `$text`, `softBreak` (`<br>`), etc.\n *\n * Read more about the inline elements in the\n * {@glink framework/guides/deep-dive/schema#inline-elements Inline elements section} of the Schema deep dive guide.\n *\n * @property {Boolean} isLimit\n * It can be understood as whether this element should not be split by <kbd>Enter</kbd>.\n * Examples of limit elements: `$root`, table cell, image caption, etc. In other words, all actions that happen inside\n * a limit element are limited to its content.\n *\n * Read more about the limit elements in the\n * {@glink framework/guides/deep-dive/schema#limit-elements Limit elements section} of\n * the {@glink framework/guides/deep-dive/schema Schema deep dive} guide.\n *\n * @property {Boolean} isObject\n * Whether an item is \"self-contained\" and should be treated as a whole. Examples of object elements:\n * `imageBlock`, `table`, `video`, etc.\n *\n * **Note:** An object is also a limit, so\n * {@link module:engine/model/schema~Schema#isLimit `isLimit()`} returns `true` for object elements automatically.\n *\n * Read more about the object elements in the\n * {@glink framework/guides/deep-dive/schema#object-elements Object elements section} of the Schema deep dive guide.\n *\n * @property {Boolean} isSelectable\n * `true` when an element should be selectable as a whole by the user. Examples of selectable elements: `imageBlock`, `table`, `tableCell`,\n * etc.\n *\n * **Note:** An object is also a selectable element, so\n * {@link module:engine/model/schema~Schema#isSelectable `isSelectable()`} returns `true` for object elements automatically.\n *\n * Read more about selectable elements in the\n * {@glink framework/guides/deep-dive/schema#selectable-elements Selectable elements section} of\n * the {@glink framework/guides/deep-dive/schema Schema deep dive} guide.\n *\n * @property {Boolean} isContent\n * An item is a content when it always finds its way to the editor data output regardless of the number and type of its descendants.\n * Examples of content elements: `$text`, `imageBlock`, `table`, etc. (but not `paragraph`, `heading1` or `tableCell`).\n *\n * **Note:** An object is also a content element, so\n * {@link module:engine/model/schema~Schema#isContent `isContent()`} returns `true` for object elements automatically.\n *\n * Read more about content elements in the\n * {@glink framework/guides/deep-dive/schema#content-elements Content elements section} of\n * the {@glink framework/guides/deep-dive/schema Schema deep dive} guide.\n */\n\n/**\n * A simplified version of {@link module:engine/model/schema~SchemaItemDefinition} after\n * compilation by the {@link module:engine/model/schema~Schema schema}.\n * Rules fed to the schema by {@link module:engine/model/schema~Schema#register}\n * and {@link module:engine/model/schema~Schema#extend} methods are defined in the\n * {@link module:engine/model/schema~SchemaItemDefinition} format.\n * Later on, they are compiled to `SchemaCompiledItemDefinition` so when you use e.g.\n * the {@link module:engine/model/schema~Schema#getDefinition} method you get the compiled version.\n *\n * The compiled version contains only the following properties:\n *\n * * The `name` property,\n * * The `is*` properties,\n * * The `allowIn` array,\n * * The `allowChildren` array,\n * * The `allowAttributes` array.\n *\n * @typedef {Object} module:engine/model/schema~SchemaCompiledItemDefinition\n */\n\n/**\n * A schema context &mdash; a list of ancestors of a given position in the document.\n *\n * Considering such position:\n *\n *\t\t<$root>\n *\t\t\t<blockQuote>\n *\t\t\t\t<paragraph>\n *\t\t\t\t\t^\n *\t\t\t\t</paragraph>\n *\t\t\t</blockQuote>\n *\t\t</$root>\n *\n * The context of this position is its {@link module:engine/model/position~Position#getAncestors lists of ancestors}:\n *\n *\t\t[ rootElement, blockQuoteElement, paragraphElement ]\n *\n * Contexts are used in the {@link module:engine/model/schema~Schema#event:checkChild `Schema#checkChild`} and\n * {@link module:engine/model/schema~Schema#event:checkAttribute `Schema#checkAttribute`} events as a definition\n * of a place in the document where the check occurs. The context instances are created based on the first arguments\n * of the {@link module:engine/model/schema~Schema#checkChild `Schema#checkChild()`} and\n * {@link module:engine/model/schema~Schema#checkAttribute `Schema#checkAttribute()`} methods so when\n * using these methods you need to use {@link module:engine/model/schema~SchemaContextDefinition}s.\n */\nexport class SchemaContext {\n\t/**\n\t * Creates an instance of the context.\n\t *\n\t * @param {module:engine/model/schema~SchemaContextDefinition} context\n\t */\n\tconstructor( context ) {\n\t\tif ( context instanceof SchemaContext ) {\n\t\t\treturn context;\n\t\t}\n\n\t\tif ( typeof context == 'string' ) {\n\t\t\tcontext = [ context ];\n\t\t} else if ( !Array.isArray( context ) ) {\n\t\t\t// `context` is item or position.\n\t\t\t// Position#getAncestors() doesn't accept any parameters but it works just fine here.\n\t\t\tcontext = context.getAncestors( { includeSelf: true } );\n\t\t}\n\n\t\tthis._items = context.map( mapContextItem );\n\t}\n\n\t/**\n\t * The number of items.\n\t *\n\t * @type {Number}\n\t */\n\tget length() {\n\t\treturn this._items.length;\n\t}\n\n\t/**\n\t * The last item (the lowest node).\n\t *\n\t * @type {module:engine/model/schema~SchemaContextItem}\n\t */\n\tget last() {\n\t\treturn this._items[ this._items.length - 1 ];\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * Iterates over all context items.\n\t *\n\t * @returns {Iterable.<module:engine/model/schema~SchemaContextItem>}\n\t */\n\t[ Symbol.iterator ]() {\n\t\treturn this._items[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Returns a new schema context instance with an additional item.\n\t *\n\t * Item can be added as:\n\t *\n\t * \t\tconst context = new SchemaContext( [ '$root' ] );\n\t *\n\t * \t\t// An element.\n\t * \t\tconst fooElement = writer.createElement( 'fooElement' );\n\t * \t\tconst newContext = context.push( fooElement ); // [ '$root', 'fooElement' ]\n\t *\n\t * \t\t// A text node.\n\t * \t\tconst text = writer.createText( 'foobar' );\n\t * \t\tconst newContext = context.push( text ); // [ '$root', '$text' ]\n\t *\n\t * \t\t// A string (element name).\n\t * \t\tconst newContext = context.push( 'barElement' ); // [ '$root', 'barElement' ]\n\t *\n\t * **Note** {@link module:engine/model/node~Node} that is already in the model tree will be added as the only item\n\t * (without ancestors).\n\t *\n\t * @param {String|module:engine/model/node~Node|Array<String|module:engine/model/node~Node>} item An item that will be added\n\t * to the current context.\n\t * @returns {module:engine/model/schema~SchemaContext} A new schema context instance with an additional item.\n\t */\n\tpush( item ) {\n\t\tconst ctx = new SchemaContext( [ item ] );\n\n\t\tctx._items = [ ...this._items, ...ctx._items ];\n\n\t\treturn ctx;\n\t}\n\n\t/**\n\t * Gets an item on the given index.\n\t *\n\t * @returns {module:engine/model/schema~SchemaContextItem}\n\t */\n\tgetItem( index ) {\n\t\treturn this._items[ index ];\n\t}\n\n\t/**\n\t * Returns the names of items.\n\t *\n\t * @returns {Iterable.<String>}\n\t */\n\t* getNames() {\n\t\tyield* this._items.map( item => item.name );\n\t}\n\n\t/**\n\t * Checks whether the context ends with the given nodes.\n\t *\n\t *\t\tconst ctx = new SchemaContext( [ rootElement, paragraphElement, textNode ] );\n\t *\n\t *\t\tctx.endsWith( '$text' ); // -> true\n\t *\t\tctx.endsWith( 'paragraph $text' ); // -> true\n\t *\t\tctx.endsWith( '$root' ); // -> false\n\t *\t\tctx.endsWith( 'paragraph' ); // -> false\n\t *\n\t * @param {String} query\n\t * @returns {Boolean}\n\t */\n\tendsWith( query ) {\n\t\treturn Array.from( this.getNames() ).join( ' ' ).endsWith( query );\n\t}\n\n\t/**\n\t * Checks whether the context starts with the given nodes.\n\t *\n\t *\t\tconst ctx = new SchemaContext( [ rootElement, paragraphElement, textNode ] );\n\t *\n\t *\t\tctx.endsWith( '$root' ); // -> true\n\t *\t\tctx.endsWith( '$root paragraph' ); // -> true\n\t *\t\tctx.endsWith( '$text' ); // -> false\n\t *\t\tctx.endsWith( 'paragraph' ); // -> false\n\t *\n\t * @param {String} query\n\t * @returns {Boolean}\n\t */\n\tstartsWith( query ) {\n\t\treturn Array.from( this.getNames() ).join( ' ' ).startsWith( query );\n\t}\n}\n\n/**\n * The definition of a {@link module:engine/model/schema~SchemaContext schema context}.\n *\n * Contexts can be created in multiple ways:\n *\n * * By defining a **node** – in this cases this node and all its ancestors will be used.\n * * By defining a **position** in the document – in this case all its ancestors will be used.\n * * By defining an **array of nodes** – in this case this array defines the entire context.\n * * By defining a **name of node** - in this case node will be \"mocked\". It is not recommended because context\n * will be unrealistic (e.g. attributes of these nodes are not specified). However, at times this may be the only\n * way to define the context (e.g. when checking some hypothetical situation).\n * * By defining an **array of node names** (potentially, mixed with real nodes) – The same as **name of node**\n * but it is possible to create a path.\n * * By defining a {@link module:engine/model/schema~SchemaContext} instance - in this case the same instance as provided\n * will be return.\n *\n * Examples of context definitions passed to the {@link module:engine/model/schema~Schema#checkChild `Schema#checkChild()`}\n * method:\n *\n *\t\t// Assuming that we have a $root > blockQuote > paragraph structure, the following code\n *\t\t// will check node 'foo' in the following context:\n *\t\t// [ rootElement, blockQuoteElement, paragraphElement ]\n *\t\tconst contextDefinition = paragraphElement;\n * \t\tconst childToCheck = 'foo';\n *\t\tschema.checkChild( contextDefinition, childToCheck );\n *\n *\t\t// Also check in [ rootElement, blockQuoteElement, paragraphElement ].\n *\t\tschema.checkChild( model.createPositionAt( paragraphElement, 0 ), 'foo' );\n *\n *\t\t// Check in [ rootElement, paragraphElement ].\n *\t\tschema.checkChild( [ rootElement, paragraphElement ], 'foo' );\n *\n *\t\t// Check only fakeParagraphElement.\n *\t\tschema.checkChild( 'paragraph', 'foo' );\n *\n *\t\t// Check in [ fakeRootElement, fakeBarElement, paragraphElement ].\n *\t\tschema.checkChild( [ '$root', 'bar', paragraphElement ], 'foo' );\n *\n * All these `checkChild()` calls will fire {@link module:engine/model/schema~Schema#event:checkChild `Schema#checkChild`}\n * events in which `args[ 0 ]` is an instance of the context. Therefore, you can write a listener like this:\n *\n *\t\tschema.on( 'checkChild', ( evt, args ) => {\n *\t\t\tconst ctx = args[ 0 ];\n *\n *\t\t\tconsole.log( Array.from( ctx.getNames() ) );\n *\t\t} );\n *\n * Which will log the following:\n *\n *\t\t[ '$root', 'blockQuote', 'paragraph' ]\n *\t\t[ '$root', 'paragraph' ]\n *\t\t[ '$root', 'bar', 'paragraph' ]\n *\n * Note: When using the {@link module:engine/model/schema~Schema#checkAttribute `Schema#checkAttribute()`} method\n * you may want to check whether a text node may have an attribute. A {@link module:engine/model/text~Text} is a\n * correct way to define a context so you can do this:\n *\n *\t\tschema.checkAttribute( textNode, 'bold' );\n *\n * But sometimes you want to check whether a text at a given position might've had some attribute,\n * in which case you can create a context by mixing in an array of elements with a `'$text'` string:\n *\n *\t\t// Check in [ rootElement, paragraphElement, textNode ].\n *\t\tschema.checkChild( [ ...positionInParagraph.getAncestors(), '$text' ], 'bold' );\n *\n * @typedef {module:engine/model/node~Node|module:engine/model/position~Position|module:engine/model/schema~SchemaContext|\n * String|Array.<String|module:engine/model/node~Node>} module:engine/model/schema~SchemaContextDefinition\n */\n\n/**\n * An item of the {@link module:engine/model/schema~SchemaContext schema context}.\n *\n * It contains 3 properties:\n *\n * * `name` – the name of this item,\n * * `* getAttributeKeys()` – a generator of keys of item attributes,\n * * `getAttribute( keyName )` – a method to get attribute values.\n *\n * The context item interface is a highly simplified version of {@link module:engine/model/node~Node} and its role\n * is to expose only the information which schema checks are able to provide (which is the name of the node and\n * node's attributes).\n *\n *\t\tschema.on( 'checkChild', ( evt, args ) => {\n *\t\t\tconst ctx = args[ 0 ];\n *\t\t\tconst firstItem = ctx.getItem( 0 );\n *\n *\t\t\tconsole.log( firstItem.name ); // -> '$root'\n *\t\t\tconsole.log( firstItem.getAttribute( 'foo' ) ); // -> 'bar'\n *\t\t\tconsole.log( Array.from( firstItem.getAttributeKeys() ) ); // -> [ 'foo', 'faa' ]\n *\t\t} );\n *\n * @typedef {Object} module:engine/model/schema~SchemaContextItem\n */\n\n/**\n * A structure containing additional metadata describing the attribute.\n *\n * See {@link module:engine/model/schema~Schema#setAttributeProperties `Schema#setAttributeProperties()`} for usage examples.\n *\n * @typedef {Object} module:engine/model/schema~AttributeProperties\n * @property {Boolean} [isFormatting] Indicates that the attribute should be considered as a visual formatting, like `bold`, `italic` or\n * `fontSize` rather than semantic attribute (such as `src`, `listType`, etc.). For example, it is used by the \"Remove format\" feature.\n * @property {Boolean} [copyOnEnter] Indicates that given text attribute should be copied to the next block when enter is pressed.\n */\n\nfunction compileBaseItemRule( sourceItemRules, itemName ) {\n\tconst itemRule = {\n\t\tname: itemName,\n\n\t\tallowIn: [],\n\t\tallowContentOf: [],\n\t\tallowWhere: [],\n\n\t\tallowAttributes: [],\n\t\tallowAttributesOf: [],\n\n\t\tallowChildren: [],\n\n\t\tinheritTypesFrom: []\n\t};\n\n\tcopyTypes( sourceItemRules, itemRule );\n\n\tcopyProperty( sourceItemRules, itemRule, 'allowIn' );\n\tcopyProperty( sourceItemRules, itemRule, 'allowContentOf' );\n\tcopyProperty( sourceItemRules, itemRule, 'allowWhere' );\n\n\tcopyProperty( sourceItemRules, itemRule, 'allowAttributes' );\n\tcopyProperty( sourceItemRules, itemRule, 'allowAttributesOf' );\n\n\tcopyProperty( sourceItemRules, itemRule, 'allowChildren' );\n\n\tcopyProperty( sourceItemRules, itemRule, 'inheritTypesFrom' );\n\n\tmakeInheritAllWork( sourceItemRules, itemRule );\n\n\treturn itemRule;\n}\n\nfunction compileAllowChildren( compiledDefinitions, itemName ) {\n\tconst item = compiledDefinitions[ itemName ];\n\n\tfor ( const allowChildrenItem of item.allowChildren ) {\n\t\tconst allowedChildren = compiledDefinitions[ allowChildrenItem ];\n\n\t\t// The allowChildren property may point to an unregistered element.\n\t\tif ( !allowedChildren ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tallowedChildren.allowIn.push( itemName );\n\t}\n\n\t// The allowIn property already includes correct items, reset the allowChildren property\n\t// to avoid duplicates later when setting up compilation results.\n\titem.allowChildren.length = 0;\n}\n\nfunction compileAllowContentOf( compiledDefinitions, itemName ) {\n\tfor ( const allowContentOfItemName of compiledDefinitions[ itemName ].allowContentOf ) {\n\t\t// The allowContentOf property may point to an unregistered element.\n\t\tif ( compiledDefinitions[ allowContentOfItemName ] ) {\n\t\t\tconst allowedChildren = getAllowedChildren( compiledDefinitions, allowContentOfItemName );\n\n\t\t\tallowedChildren.forEach( allowedItem => {\n\t\t\t\tallowedItem.allowIn.push( itemName );\n\t\t\t} );\n\t\t}\n\t}\n\n\tdelete compiledDefinitions[ itemName ].allowContentOf;\n}\n\nfunction compileAllowWhere( compiledDefinitions, itemName ) {\n\tfor ( const allowWhereItemName of compiledDefinitions[ itemName ].allowWhere ) {\n\t\tconst inheritFrom = compiledDefinitions[ allowWhereItemName ];\n\n\t\t// The allowWhere property may point to an unregistered element.\n\t\tif ( inheritFrom ) {\n\t\t\tconst allowedIn = inheritFrom.allowIn;\n\n\t\t\tcompiledDefinitions[ itemName ].allowIn.push( ...allowedIn );\n\t\t}\n\t}\n\n\tdelete compiledDefinitions[ itemName ].allowWhere;\n}\n\nfunction compileAllowAttributesOf( compiledDefinitions, itemName ) {\n\tfor ( const allowAttributeOfItem of compiledDefinitions[ itemName ].allowAttributesOf ) {\n\t\tconst inheritFrom = compiledDefinitions[ allowAttributeOfItem ];\n\n\t\tif ( inheritFrom ) {\n\t\t\tconst inheritAttributes = inheritFrom.allowAttributes;\n\n\t\t\tcompiledDefinitions[ itemName ].allowAttributes.push( ...inheritAttributes );\n\t\t}\n\t}\n\n\tdelete compiledDefinitions[ itemName ].allowAttributesOf;\n}\n\nfunction compileInheritPropertiesFrom( compiledDefinitions, itemName ) {\n\tconst item = compiledDefinitions[ itemName ];\n\n\tfor ( const inheritPropertiesOfItem of item.inheritTypesFrom ) {\n\t\tconst inheritFrom = compiledDefinitions[ inheritPropertiesOfItem ];\n\n\t\tif ( inheritFrom ) {\n\t\t\tconst typeNames = Object.keys( inheritFrom ).filter( name => name.startsWith( 'is' ) );\n\n\t\t\tfor ( const name of typeNames ) {\n\t\t\t\tif ( !( name in item ) ) {\n\t\t\t\t\titem[ name ] = inheritFrom[ name ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tdelete item.inheritTypesFrom;\n}\n\n// Remove items which weren't registered (because it may break some checks or we'd need to complicate them).\n// Make sure allowIn doesn't contain repeated values.\nfunction cleanUpAllowIn( compiledDefinitions, itemName ) {\n\tconst itemRule = compiledDefinitions[ itemName ];\n\tconst existingItems = itemRule.allowIn.filter( itemToCheck => compiledDefinitions[ itemToCheck ] );\n\n\titemRule.allowIn = Array.from( new Set( existingItems ) );\n}\n\n// Setup allowChildren items based on allowIn.\nfunction setupAllowChildren( compiledDefinitions, itemName ) {\n\tconst itemRule = compiledDefinitions[ itemName ];\n\n\tfor ( const allowedParentItemName of itemRule.allowIn ) {\n\t\tconst allowedParentItem = compiledDefinitions[ allowedParentItemName ];\n\n\t\tallowedParentItem.allowChildren.push( itemName );\n\t}\n}\n\nfunction cleanUpAllowAttributes( compiledDefinitions, itemName ) {\n\tconst itemRule = compiledDefinitions[ itemName ];\n\n\titemRule.allowAttributes = Array.from( new Set( itemRule.allowAttributes ) );\n}\n\nfunction copyTypes( sourceItemRules, itemRule ) {\n\tfor ( const sourceItemRule of sourceItemRules ) {\n\t\tconst typeNames = Object.keys( sourceItemRule ).filter( name => name.startsWith( 'is' ) );\n\n\t\tfor ( const name of typeNames ) {\n\t\t\titemRule[ name ] = sourceItemRule[ name ];\n\t\t}\n\t}\n}\n\nfunction copyProperty( sourceItemRules, itemRule, propertyName ) {\n\tfor ( const sourceItemRule of sourceItemRules ) {\n\t\tif ( typeof sourceItemRule[ propertyName ] == 'string' ) {\n\t\t\titemRule[ propertyName ].push( sourceItemRule[ propertyName ] );\n\t\t} else if ( Array.isArray( sourceItemRule[ propertyName ] ) ) {\n\t\t\titemRule[ propertyName ].push( ...sourceItemRule[ propertyName ] );\n\t\t}\n\t}\n}\n\nfunction makeInheritAllWork( sourceItemRules, itemRule ) {\n\tfor ( const sourceItemRule of sourceItemRules ) {\n\t\tconst inheritFrom = sourceItemRule.inheritAllFrom;\n\n\t\tif ( inheritFrom ) {\n\t\t\titemRule.allowContentOf.push( inheritFrom );\n\t\t\titemRule.allowWhere.push( inheritFrom );\n\t\t\titemRule.allowAttributesOf.push( inheritFrom );\n\t\t\titemRule.inheritTypesFrom.push( inheritFrom );\n\t\t}\n\t}\n}\n\nfunction getAllowedChildren( compiledDefinitions, itemName ) {\n\tconst itemRule = compiledDefinitions[ itemName ];\n\n\treturn getValues( compiledDefinitions ).filter( def => def.allowIn.includes( itemRule.name ) );\n}\n\nfunction getValues( obj ) {\n\treturn Object.keys( obj ).map( key => obj[ key ] );\n}\n\nfunction mapContextItem( ctxItem ) {\n\tif ( typeof ctxItem == 'string' || ctxItem.is( 'documentFragment' ) ) {\n\t\treturn {\n\t\t\tname: typeof ctxItem == 'string' ? ctxItem : '$documentFragment',\n\n\t\t\t* getAttributeKeys() {},\n\n\t\t\tgetAttribute() {}\n\t\t};\n\t} else {\n\t\treturn {\n\t\t\t// '$text' means text nodes and text proxies.\n\t\t\tname: ctxItem.is( 'element' ) ? ctxItem.name : '$text',\n\n\t\t\t* getAttributeKeys() {\n\t\t\t\tyield* ctxItem.getAttributeKeys();\n\t\t\t},\n\n\t\t\tgetAttribute( key ) {\n\t\t\t\treturn ctxItem.getAttribute( key );\n\t\t\t}\n\t\t};\n\t}\n}\n\n// Generator function returning values from provided walkers, switching between them at each iteration. If only one walker\n// is provided it will return data only from that walker.\n//\n// @param {module:engine/module/treewalker~TreeWalker} [backward] Walker iterating in backward direction.\n// @param {module:engine/module/treewalker~TreeWalker} [forward] Walker iterating in forward direction.\n// @returns {Iterable.<Object>} Object returned at each iteration contains `value` and `walker` (informing which walker returned\n// given value) fields.\nfunction* combineWalkers( backward, forward ) {\n\tlet done = false;\n\n\twhile ( !done ) {\n\t\tdone = true;\n\n\t\tif ( backward ) {\n\t\t\tconst step = backward.next();\n\n\t\t\tif ( !step.done ) {\n\t\t\t\tdone = false;\n\t\t\t\tyield {\n\t\t\t\t\twalker: backward,\n\t\t\t\t\tvalue: step.value\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( forward ) {\n\t\t\tconst step = forward.next();\n\n\t\t\tif ( !step.done ) {\n\t\t\t\tdone = false;\n\t\t\t\tyield {\n\t\t\t\t\twalker: forward,\n\t\t\t\t\tvalue: step.value\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\n// Takes an array of non-intersecting ranges. For each of them gets minimal flat ranges covering that range and returns\n// all those minimal flat ranges.\n//\n// @param {Array.<module:engine/model/range~Range>} ranges Ranges to process.\n// @returns {Iterable.<module:engine/model/range~Range>} Minimal flat ranges of given `ranges`.\nfunction* convertToMinimalFlatRanges( ranges ) {\n\tfor ( const range of ranges ) {\n\t\tyield* range.getMinimalFlatRanges();\n\t}\n}\n\nfunction removeDisallowedAttributeFromNode( schema, node, writer ) {\n\tfor ( const attribute of node.getAttributeKeys() ) {\n\t\tif ( !schema.checkAttribute( node, attribute ) ) {\n\t\t\twriter.removeAttribute( attribute, node );\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/conversion/upcastdispatcher\n */\n\nimport ViewConsumable from './viewconsumable';\nimport ModelRange from '../model/range';\nimport ModelPosition from '../model/position';\nimport { SchemaContext } from '../model/schema';\nimport { isParagraphable, wrapInParagraph } from '../model/utils/autoparagraphing';\n\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport EmitterMixin from '@ckeditor/ckeditor5-utils/src/emittermixin';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\n\n/**\n * Upcast dispatcher is a central point of the view-to-model conversion, which is a process of\n * converting a given {@link module:engine/view/documentfragment~DocumentFragment view document fragment} or\n * {@link module:engine/view/element~Element view element} into a correct model structure.\n *\n * During the conversion process, the dispatcher fires events for all {@link module:engine/view/node~Node view nodes}\n * from the converted view document fragment.\n * Special callbacks called \"converters\" should listen to these events in order to convert the view nodes.\n *\n * The second parameter of the callback is the `data` object with the following properties:\n *\n * * `data.viewItem` contains a {@link module:engine/view/node~Node view node} or a\n * {@link module:engine/view/documentfragment~DocumentFragment view document fragment}\n * that is converted at the moment and might be handled by the callback.\n * * `data.modelRange` is used to point to the result\n * of the current conversion (e.g. the element that is being inserted)\n * and is always a {@link module:engine/model/range~Range} when the conversion succeeds.\n * * `data.modelCursor` is a {@link module:engine/model/position~Position position} on which the converter should insert\n * the newly created items.\n *\n * The third parameter of the callback is an instance of {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi}\n * which provides additional tools for converters.\n *\n * You can read more about conversion in the {@glink framework/guides/deep-dive/conversion/upcast Upcast conversion} guide.\n *\n * Examples of event-based converters:\n *\n *\t\t// A converter for links (<a>).\n *\t\teditor.data.upcastDispatcher.on( 'element:a', ( evt, data, conversionApi ) => {\n *\t\t\tif ( conversionApi.consumable.consume( data.viewItem, { name: true, attributes: [ 'href' ] } ) ) {\n *\t\t\t\t// The <a> element is inline and is represented by an attribute in the model.\n *\t\t\t\t// This is why you need to convert only children.\n *\t\t\t\tconst { modelRange } = conversionApi.convertChildren( data.viewItem, data.modelCursor );\n *\n *\t\t\t\tfor ( let item of modelRange.getItems() ) {\n *\t\t\t\t\tif ( conversionApi.schema.checkAttribute( item, 'linkHref' ) ) {\n *\t\t\t\t\t\tconversionApi.writer.setAttribute( 'linkHref', data.viewItem.getAttribute( 'href' ), item );\n *\t\t\t\t\t}\n *\t\t\t\t}\n *\t\t\t}\n *\t\t} );\n *\n *\t\t// Convert <p> element's font-size style.\n *\t\t// Note: You should use a low-priority observer in order to ensure that\n *\t\t// it is executed after the element-to-element converter.\n *\t\teditor.data.upcastDispatcher.on( 'element:p', ( evt, data, conversionApi ) => {\n *\t\t\tconst { consumable, schema, writer } = conversionApi;\n *\n *\t\t\tif ( !consumable.consume( data.viewItem, { style: 'font-size' } ) ) {\n *\t\t\t\treturn;\n *\t\t\t}\n *\n *\t\t\tconst fontSize = data.viewItem.getStyle( 'font-size' );\n *\n *\t\t\t// Do not go for the model element after data.modelCursor because it might happen\n *\t\t\t// that a single view element was converted to multiple model elements. Get all of them.\n *\t\t\tfor ( const item of data.modelRange.getItems( { shallow: true } ) ) {\n *\t\t\t\tif ( schema.checkAttribute( item, 'fontSize' ) ) {\n *\t\t\t\t\twriter.setAttribute( 'fontSize', fontSize, item );\n *\t\t\t\t}\n *\t\t\t}\n *\t\t}, { priority: 'low' } );\n *\n *\t\t// Convert all elements which have no custom converter into a paragraph (autoparagraphing).\n *\t\teditor.data.upcastDispatcher.on( 'element', ( evt, data, conversionApi ) => {\n *\t\t\t// Check if an element can be converted.\n *\t\t\tif ( !conversionApi.consumable.test( data.viewItem, { name: data.viewItem.name } ) ) {\n *\t\t\t\t// When an element is already consumed by higher priority converters, do nothing.\n *\t\t\t\treturn;\n *\t\t\t}\n *\n *\t\t\tconst paragraph = conversionApi.writer.createElement( 'paragraph' );\n *\n *\t\t\t// Try to safely insert a paragraph at the model cursor - it will find an allowed parent for the current element.\n *\t\t\tif ( !conversionApi.safeInsert( paragraph, data.modelCursor ) ) {\n *\t\t\t\t// When an element was not inserted, it means that you cannot insert a paragraph at this position.\n *\t\t\t\treturn;\n *\t\t\t}\n *\n *\t\t\t// Consume the inserted element.\n *\t\t\tconversionApi.consumable.consume( data.viewItem, { name: data.viewItem.name } ) );\n *\n *\t\t\t// Convert the children to a paragraph.\n *\t\t\tconst { modelRange } = conversionApi.convertChildren( data.viewItem, paragraph ) );\n *\n *\t\t\t// Update `modelRange` and `modelCursor` in the `data` as a conversion result.\n *\t\t\tconversionApi.updateConversionResult( paragraph, data );\n *\t\t}, { priority: 'low' } );\n *\n * @mixes module:utils/emittermixin~EmitterMixin\n * @fires viewCleanup\n * @fires element\n * @fires text\n * @fires documentFragment\n */\nexport default class UpcastDispatcher {\n\t/**\n\t * Creates an upcast dispatcher that operates using the passed API.\n\t *\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi\n\t * @param {Object} [conversionApi] Additional properties for an interface that will be passed to events fired\n\t * by the upcast dispatcher.\n\t */\n\tconstructor( conversionApi = {} ) {\n\t\t/**\n\t\t * The list of elements that were created during splitting.\n\t\t *\n\t\t * After the conversion process, the list is cleared.\n\t\t *\n\t\t * @private\n\t\t * @type {Map.<module:engine/model/element~Element,Array.<module:engine/model/element~Element>>}\n\t\t */\n\t\tthis._splitParts = new Map();\n\n\t\t/**\n\t\t * The list of cursor parent elements that were created during splitting.\n\t\t *\n\t\t * After the conversion process the list is cleared.\n\t\t *\n\t\t * @private\n\t\t * @type {Map.<module:engine/model/element~Element,Array.<module:engine/model/element~Element>>}\n\t\t */\n\t\tthis._cursorParents = new Map();\n\n\t\t/**\n\t\t * The position in the temporary structure where the converted content is inserted. The structure reflects the context of\n\t\t * the target position where the content will be inserted. This property is built based on the context parameter of the\n\t\t * convert method.\n\t\t *\n\t\t * @private\n\t\t * @type {module:engine/model/position~Position|null}\n\t\t */\n\t\tthis._modelCursor = null;\n\n\t\t/**\n\t\t * An interface passed by the dispatcher to the event callbacks.\n\t\t *\n\t\t * @member {module:engine/conversion/upcastdispatcher~UpcastConversionApi}\n\t\t */\n\t\tthis.conversionApi = Object.assign( {}, conversionApi );\n\n\t\t// The below methods are bound to this `UpcastDispatcher` instance and set on `conversionApi`.\n\t\t// This way only a part of `UpcastDispatcher` API is exposed.\n\t\tthis.conversionApi.convertItem = this._convertItem.bind( this );\n\t\tthis.conversionApi.convertChildren = this._convertChildren.bind( this );\n\t\tthis.conversionApi.safeInsert = this._safeInsert.bind( this );\n\t\tthis.conversionApi.updateConversionResult = this._updateConversionResult.bind( this );\n\t\t// Advanced API - use only if custom position handling is needed.\n\t\tthis.conversionApi.splitToAllowedParent = this._splitToAllowedParent.bind( this );\n\t\tthis.conversionApi.getSplitParts = this._getSplitParts.bind( this );\n\t}\n\n\t/**\n\t * Starts the conversion process. The entry point for the conversion.\n\t *\n\t * @fires element\n\t * @fires text\n\t * @fires documentFragment\n\t * @param {module:engine/view/documentfragment~DocumentFragment|module:engine/view/element~Element} viewItem\n\t * The part of the view to be converted.\n\t * @param {module:engine/model/writer~Writer} writer An instance of the model writer.\n\t * @param {module:engine/model/schema~SchemaContextDefinition} [context=['$root']] Elements will be converted according to this context.\n\t * @returns {module:engine/model/documentfragment~DocumentFragment} Model data that is the result of the conversion process\n\t * wrapped in `DocumentFragment`. Converted marker elements will be set as the document fragment's\n\t * {@link module:engine/model/documentfragment~DocumentFragment#markers static markers map}.\n\t */\n\tconvert( viewItem, writer, context = [ '$root' ] ) {\n\t\tthis.fire( 'viewCleanup', viewItem );\n\n\t\t// Create context tree and set position in the top element.\n\t\t// Items will be converted according to this position.\n\t\tthis._modelCursor = createContextTree( context, writer );\n\n\t\t// Store writer in conversion as a conversion API\n\t\t// to be sure that conversion process will use the same batch.\n\t\tthis.conversionApi.writer = writer;\n\n\t\t// Create consumable values list for conversion process.\n\t\tthis.conversionApi.consumable = ViewConsumable.createFrom( viewItem );\n\n\t\t// Custom data stored by converter for conversion process.\n\t\tthis.conversionApi.store = {};\n\n\t\t// Do the conversion.\n\t\tconst { modelRange } = this._convertItem( viewItem, this._modelCursor );\n\n\t\t// Conversion result is always a document fragment so let's create it.\n\t\tconst documentFragment = writer.createDocumentFragment();\n\n\t\t// When there is a conversion result.\n\t\tif ( modelRange ) {\n\t\t\t// Remove all empty elements that were create while splitting.\n\t\t\tthis._removeEmptyElements();\n\n\t\t\t// Move all items that were converted in context tree to the document fragment.\n\t\t\tfor ( const item of Array.from( this._modelCursor.parent.getChildren() ) ) {\n\t\t\t\twriter.append( item, documentFragment );\n\t\t\t}\n\n\t\t\t// Extract temporary markers elements from model and set as static markers collection.\n\t\t\tdocumentFragment.markers = extractMarkersFromModelFragment( documentFragment, writer );\n\t\t}\n\n\t\t// Clear context position.\n\t\tthis._modelCursor = null;\n\n\t\t// Clear split elements & parents lists.\n\t\tthis._splitParts.clear();\n\t\tthis._cursorParents.clear();\n\n\t\t// Clear conversion API.\n\t\tthis.conversionApi.writer = null;\n\t\tthis.conversionApi.store = null;\n\n\t\t// Return fragment as conversion result.\n\t\treturn documentFragment;\n\t}\n\n\t/**\n\t * @private\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#convertItem\n\t */\n\t_convertItem( viewItem, modelCursor ) {\n\t\tconst data = Object.assign( { viewItem, modelCursor, modelRange: null } );\n\n\t\tif ( viewItem.is( 'element' ) ) {\n\t\t\tthis.fire( 'element:' + viewItem.name, data, this.conversionApi );\n\t\t} else if ( viewItem.is( '$text' ) ) {\n\t\t\tthis.fire( 'text', data, this.conversionApi );\n\t\t} else {\n\t\t\tthis.fire( 'documentFragment', data, this.conversionApi );\n\t\t}\n\n\t\t// Handle incorrect conversion result.\n\t\tif ( data.modelRange && !( data.modelRange instanceof ModelRange ) ) {\n\t\t\t/**\n\t\t\t * Incorrect conversion result was dropped.\n\t\t\t *\n\t\t\t * {@link module:engine/model/range~Range Model range} should be a conversion result.\n\t\t\t *\n\t\t\t * @error view-conversion-dispatcher-incorrect-result\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-conversion-dispatcher-incorrect-result', this );\n\t\t}\n\n\t\treturn { modelRange: data.modelRange, modelCursor: data.modelCursor };\n\t}\n\n\t/**\n\t * @private\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#convertChildren\n\t */\n\t_convertChildren( viewItem, elementOrModelCursor ) {\n\t\tlet nextModelCursor = elementOrModelCursor.is( 'position' ) ?\n\t\t\telementOrModelCursor : ModelPosition._createAt( elementOrModelCursor, 0 );\n\n\t\tconst modelRange = new ModelRange( nextModelCursor );\n\n\t\tfor ( const viewChild of Array.from( viewItem.getChildren() ) ) {\n\t\t\tconst result = this._convertItem( viewChild, nextModelCursor );\n\n\t\t\tif ( result.modelRange instanceof ModelRange ) {\n\t\t\t\tmodelRange.end = result.modelRange.end;\n\t\t\t\tnextModelCursor = result.modelCursor;\n\t\t\t}\n\t\t}\n\n\t\treturn { modelRange, modelCursor: nextModelCursor };\n\t}\n\n\t/**\n\t * @private\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#safeInsert\n\t */\n\t_safeInsert( modelElement, position ) {\n\t\t// Find allowed parent for element that we are going to insert.\n\t\t// If current parent does not allow to insert element but one of the ancestors does\n\t\t// then split nodes to allowed parent.\n\t\tconst splitResult = this._splitToAllowedParent( modelElement, position );\n\n\t\t// When there is no split result it means that we can't insert element to model tree, so let's skip it.\n\t\tif ( !splitResult ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Insert element on allowed position.\n\t\tthis.conversionApi.writer.insert( modelElement, splitResult.position );\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * @private\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#updateConversionResult\n\t */\n\t_updateConversionResult( modelElement, data ) {\n\t\tconst parts = this._getSplitParts( modelElement );\n\n\t\tconst writer = this.conversionApi.writer;\n\n\t\t// Set conversion result range - only if not set already.\n\t\tif ( !data.modelRange ) {\n\t\t\tdata.modelRange = writer.createRange(\n\t\t\t\twriter.createPositionBefore( modelElement ),\n\t\t\t\twriter.createPositionAfter( parts[ parts.length - 1 ] )\n\t\t\t);\n\t\t}\n\n\t\tconst savedCursorParent = this._cursorParents.get( modelElement );\n\n\t\t// Now we need to check where the `modelCursor` should be.\n\t\tif ( savedCursorParent ) {\n\t\t\t// If we split parent to insert our element then we want to continue conversion in the new part of the split parent.\n\t\t\t//\n\t\t\t// before: <allowed><notAllowed>foo[]</notAllowed></allowed>\n\t\t\t// after: <allowed><notAllowed>foo</notAllowed> <converted></converted> <notAllowed>[]</notAllowed></allowed>\n\n\t\t\tdata.modelCursor = writer.createPositionAt( savedCursorParent, 0 );\n\t\t} else {\n\t\t\t// Otherwise just continue after inserted element.\n\n\t\t\tdata.modelCursor = data.modelRange.end;\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#splitToAllowedParent\n\t */\n\t_splitToAllowedParent( node, modelCursor ) {\n\t\tconst { schema, writer } = this.conversionApi;\n\n\t\t// Try to find allowed parent.\n\t\tlet allowedParent = schema.findAllowedParent( modelCursor, node );\n\n\t\tif ( allowedParent ) {\n\t\t\t// When current position parent allows to insert node then return this position.\n\t\t\tif ( allowedParent === modelCursor.parent ) {\n\t\t\t\treturn { position: modelCursor };\n\t\t\t}\n\n\t\t\t// When allowed parent is in context tree (it's outside the converted tree).\n\t\t\tif ( this._modelCursor.parent.getAncestors().includes( allowedParent ) ) {\n\t\t\t\tallowedParent = null;\n\t\t\t}\n\t\t}\n\n\t\tif ( !allowedParent ) {\n\t\t\t// Check if the node wrapped with a paragraph would be accepted by the schema.\n\t\t\tif ( !isParagraphable( modelCursor, node, schema ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tposition: wrapInParagraph( modelCursor, writer )\n\t\t\t};\n\t\t}\n\n\t\t// Split element to allowed parent.\n\t\tconst splitResult = this.conversionApi.writer.split( modelCursor, allowedParent );\n\n\t\t// Using the range returned by `model.Writer#split`, we will pair original elements with their split parts.\n\t\t//\n\t\t// The range returned from the writer spans \"over the split\" or, precisely saying, from the end of the original element (the one\n\t\t// that got split) to the beginning of the other part of that element:\n\t\t//\n\t\t// <limit><a><b><c>X[]Y</c></b><a></limit> ->\n\t\t// <limit><a><b><c>X[</c></b></a><a><b><c>]Y</c></b></a>\n\t\t//\n\t\t// After the split there cannot be any full node between the positions in `splitRange`. The positions are touching.\n\t\t// Also, because of how splitting works, it is easy to notice, that \"closing tags\" are in the reverse order than \"opening tags\".\n\t\t// Also, since we split all those elements, each of them has to have the other part.\n\t\t//\n\t\t// With those observations in mind, we will pair the original elements with their split parts by saving \"closing tags\" and matching\n\t\t// them with \"opening tags\" in the reverse order. For that we can use a stack.\n\t\tconst stack = [];\n\n\t\tfor ( const treeWalkerValue of splitResult.range.getWalker() ) {\n\t\t\tif ( treeWalkerValue.type == 'elementEnd' ) {\n\t\t\t\tstack.push( treeWalkerValue.item );\n\t\t\t} else {\n\t\t\t\t// There should not be any text nodes after the element is split, so the only other value is `elementStart`.\n\t\t\t\tconst originalPart = stack.pop();\n\t\t\t\tconst splitPart = treeWalkerValue.item;\n\n\t\t\t\tthis._registerSplitPair( originalPart, splitPart );\n\t\t\t}\n\t\t}\n\n\t\tconst cursorParent = splitResult.range.end.parent;\n\t\tthis._cursorParents.set( node, cursorParent );\n\n\t\treturn {\n\t\t\tposition: splitResult.position,\n\t\t\tcursorParent\n\t\t};\n\t}\n\n\t/**\n\t * Registers that a `splitPart` element is a split part of the `originalPart` element.\n\t *\n\t * The data set by this method is used by {@link #_getSplitParts} and {@link #_removeEmptyElements}.\n\t *\n\t * @private\n\t * @param {module:engine/model/element~Element} originalPart\n\t * @param {module:engine/model/element~Element} splitPart\n\t */\n\t_registerSplitPair( originalPart, splitPart ) {\n\t\tif ( !this._splitParts.has( originalPart ) ) {\n\t\t\tthis._splitParts.set( originalPart, [ originalPart ] );\n\t\t}\n\n\t\tconst list = this._splitParts.get( originalPart );\n\n\t\tthis._splitParts.set( splitPart, list );\n\t\tlist.push( splitPart );\n\t}\n\n\t/**\n\t * @private\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#getSplitParts\n\t */\n\t_getSplitParts( element ) {\n\t\tlet parts;\n\n\t\tif ( !this._splitParts.has( element ) ) {\n\t\t\tparts = [ element ];\n\t\t} else {\n\t\t\tparts = this._splitParts.get( element );\n\t\t}\n\n\t\treturn parts;\n\t}\n\n\t/**\n\t * Checks if there are any empty elements created while splitting and removes them.\n\t *\n\t * This method works recursively to re-check empty elements again after at least one element was removed in the initial call,\n\t * as some elements might have become empty after other empty elements were removed from them.\n\t *\n\t * @private\n\t */\n\t_removeEmptyElements() {\n\t\tlet anyRemoved = false;\n\n\t\tfor ( const element of this._splitParts.keys() ) {\n\t\t\tif ( element.isEmpty ) {\n\t\t\t\tthis.conversionApi.writer.remove( element );\n\t\t\t\tthis._splitParts.delete( element );\n\n\t\t\t\tanyRemoved = true;\n\t\t\t}\n\t\t}\n\n\t\tif ( anyRemoved ) {\n\t\t\tthis._removeEmptyElements();\n\t\t}\n\t}\n\n\t/**\n\t * Fired before the first conversion event, at the beginning of the upcast (view-to-model conversion) process.\n\t *\n\t * @event viewCleanup\n\t * @param {module:engine/view/documentfragment~DocumentFragment|module:engine/view/element~Element}\n\t * viewItem A part of the view to be converted.\n\t */\n\n\t/**\n\t * Fired when an {@link module:engine/view/element~Element} is converted.\n\t *\n\t * `element` is a namespace event for a class of events. Names of actually called events follow the pattern of\n\t * `element:<elementName>` where `elementName` is the name of the converted element. This way listeners may listen to\n\t * a conversion of all or just specific elements.\n\t *\n\t * @event element\n\t * @param {module:engine/conversion/upcastdispatcher~UpcastConversionData} data The conversion data. Keep in mind that this object is\n\t * shared by reference between all callbacks that will be called. This means that callbacks can override values if needed, and these\n\t * values will be available in other callbacks.\n\t * @param {module:engine/conversion/upcastdispatcher~UpcastConversionApi} conversionApi Conversion utilities to be used by the\n\t * callback.\n\t */\n\n\t/**\n\t * Fired when a {@link module:engine/view/text~Text} is converted.\n\t *\n\t * @event text\n\t * @see #event:element\n\t */\n\n\t/**\n\t * Fired when a {@link module:engine/view/documentfragment~DocumentFragment} is converted.\n\t *\n\t * @event documentFragment\n\t * @see #event:element\n\t */\n}\n\nmix( UpcastDispatcher, EmitterMixin );\n\n// Traverses given model item and searches elements which marks marker range. Found element is removed from\n// DocumentFragment but path of this element is stored in a Map which is then returned.\n//\n// @param {module:engine/view/documentfragment~DocumentFragment|module:engine/view/node~Node} modelItem Fragment of model.\n// @returns {Map<String, module:engine/model/range~Range>} List of static markers.\nfunction extractMarkersFromModelFragment( modelItem, writer ) {\n\tconst markerElements = new Set();\n\tconst markers = new Map();\n\n\t// Create ModelTreeWalker.\n\tconst range = ModelRange._createIn( modelItem ).getItems();\n\n\t// Walk through DocumentFragment and collect marker elements.\n\tfor ( const item of range ) {\n\t\t// Check if current element is a marker.\n\t\tif ( item.name == '$marker' ) {\n\t\t\tmarkerElements.add( item );\n\t\t}\n\t}\n\n\t// Walk through collected marker elements store its path and remove its from the DocumentFragment.\n\tfor ( const markerElement of markerElements ) {\n\t\tconst markerName = markerElement.getAttribute( 'data-name' );\n\t\tconst currentPosition = writer.createPositionBefore( markerElement );\n\n\t\t// When marker of given name is not stored it means that we have found the beginning of the range.\n\t\tif ( !markers.has( markerName ) ) {\n\t\t\tmarkers.set( markerName, new ModelRange( currentPosition.clone() ) );\n\t\t// Otherwise is means that we have found end of the marker range.\n\t\t} else {\n\t\t\tmarkers.get( markerName ).end = currentPosition.clone();\n\t\t}\n\n\t\t// Remove marker element from DocumentFragment.\n\t\twriter.remove( markerElement );\n\t}\n\n\treturn markers;\n}\n\n// Creates model fragment according to given context and returns position in the bottom (the deepest) element.\nfunction createContextTree( contextDefinition, writer ) {\n\tlet position;\n\n\tfor ( const item of new SchemaContext( contextDefinition ) ) {\n\t\tconst attributes = {};\n\n\t\tfor ( const key of item.getAttributeKeys() ) {\n\t\t\tattributes[ key ] = item.getAttribute( key );\n\t\t}\n\n\t\tconst current = writer.createElement( item.name, attributes );\n\n\t\tif ( position ) {\n\t\t\twriter.append( current, position );\n\t\t}\n\n\t\tposition = ModelPosition._createAt( current, 0 );\n\t}\n\n\treturn position;\n}\n\n/**\n * A set of conversion utilities available as the third parameter of the\n * {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher upcast dispatcher}'s events.\n *\n * @interface module:engine/conversion/upcastdispatcher~UpcastConversionApi\n */\n\n/**\n * Starts the conversion of a given item by firing an appropriate event.\n *\n * Every fired event is passed (as the first parameter) an object with the `modelRange` property. Every event may set and/or\n * modify that property. When all callbacks are done, the final value of the `modelRange` property is returned by this method.\n * The `modelRange` must be a {@link module:engine/model/range~Range model range} or `null` (as set by default).\n *\n * @method #convertItem\n * @fires module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n * @fires module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:text\n * @fires module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:documentFragment\n * @param {module:engine/view/item~Item} viewItem Item to convert.\n * @param {module:engine/model/position~Position} modelCursor The conversion position.\n * @returns {Object} result The conversion result.\n * @returns {module:engine/model/range~Range|null} result.modelRange The model range containing the result of the item conversion,\n * created and modified by callbacks attached to the fired event, or `null` if the conversion result was incorrect.\n * @returns {module:engine/model/position~Position} result.modelCursor The position where the conversion should be continued.\n */\n\n/**\n * Starts the conversion of all children of a given item by firing appropriate events for all the children.\n *\n * @method #convertChildren\n * @fires module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n * @fires module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:text\n * @fires module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:documentFragment\n * @param {module:engine/view/item~Item} viewItem An element whose children should be converted.\n * @param {module:engine/model/position~Position|module:engine/model/element~Element} positionOrElement A position or an element of\n * the conversion.\n * @returns {Object} result The conversion result.\n * @returns {module:engine/model/range~Range} result.modelRange The model range containing the results of the conversion of all children\n * of the given item. When no child was converted, the range is collapsed.\n * @returns {module:engine/model/position~Position} result.modelCursor The position where the conversion should be continued.\n */\n\n/**\n * Safely inserts an element to the document, checking the {@link module:engine/model/schema~Schema schema} to find an allowed parent for\n * an element that you are going to insert, starting from the given position. If the current parent does not allow to insert the element\n * but one of the ancestors does, then splits the nodes to allowed parent.\n *\n * If the schema allows to insert the node in a given position, nothing is split.\n *\n * If it was not possible to find an allowed parent, `false` is returned and nothing is split.\n *\n * Otherwise, ancestors are split.\n *\n * For instance, if `<imageBlock>` is not allowed in `<paragraph>` but is allowed in `$root`:\n *\n *\t\t<paragraph>foo[]bar</paragraph>\n *\n *\t\t-> safe insert for `<imageBlock>` will split ->\n *\n *\t\t<paragraph>foo</paragraph>[]<paragraph>bar</paragraph>\n *\n * Example usage:\n *\n *\t\tconst myElement = conversionApi.writer.createElement( 'myElement' );\n *\n *\t\tif ( !conversionApi.safeInsert( myElement, data.modelCursor ) ) {\n *\t\t\treturn;\n *\t\t}\n *\n * The split result is saved and {@link #updateConversionResult} should be used to update the\n * {@link module:engine/conversion/upcastdispatcher~UpcastConversionData conversion data}.\n *\n * @method #safeInsert\n * @param {module:engine/model/node~Node} node The node to insert.\n * @param {module:engine/model/position~Position} position The position where an element is going to be inserted.\n * @returns {Boolean} The split result. If it was not possible to find an allowed position, `false` is returned.\n */\n\n/**\n * Updates the conversion result and sets a proper {@link module:engine/conversion/upcastdispatcher~UpcastConversionData#modelRange} and\n * the next {@link module:engine/conversion/upcastdispatcher~UpcastConversionData#modelCursor} after the conversion.\n * Used together with {@link #safeInsert}, it enables you to easily convert elements without worrying if the node was split\n * during the conversion of its children.\n *\n * A usage example in converter code:\n *\n *\t\tconst myElement = conversionApi.writer.createElement( 'myElement' );\n *\n *\t\tif ( !conversionApi.safeInsert( myElement, data.modelCursor ) ) {\n *\t\t\treturn;\n *\t\t}\n *\n *\t\t// Children conversion may split `myElement`.\n *\t\tconversionApi.convertChildren( data.viewItem, myElement );\n *\n *\t\tconversionApi.updateConversionResult( myElement, data );\n *\n * @method #updateConversionResult\n * @param {module:engine/model/element~Element} element\n * @param {module:engine/conversion/upcastdispatcher~UpcastConversionData} data Conversion data.\n * @param {module:engine/conversion/upcastdispatcher~UpcastConversionApi} conversionApi Conversion utilities to be used by the callback.\n */\n\n/**\n * Checks the {@link module:engine/model/schema~Schema schema} to find an allowed parent for an element that is going to be inserted\n * starting from the given position. If the current parent does not allow inserting an element but one of the ancestors does, the method\n * splits nodes to allowed parent.\n *\n * If the schema allows inserting the node in the given position, nothing is split and an object with that position is returned.\n *\n * If it was not possible to find an allowed parent, `null` is returned and nothing is split.\n *\n * Otherwise, ancestors are split and an object with a position and the copy of the split element is returned.\n *\n * For instance, if `<imageBlock>` is not allowed in `<paragraph>` but is allowed in `$root`:\n *\n *\t\t<paragraph>foo[]bar</paragraph>\n *\n *\t\t-> split for `<imageBlock>` ->\n *\n *\t\t<paragraph>foo</paragraph>[]<paragraph>bar</paragraph>\n *\n * In the example above, the position between `<paragraph>` elements will be returned as `position` and the second `paragraph`\n * as `cursorParent`.\n *\n * **Note:** This is an advanced method. For most cases {@link #safeInsert} and {@link #updateConversionResult} should be used.\n *\n * @method #splitToAllowedParent\n * @param {module:engine/model/position~Position} position The position where the element is going to be inserted.\n * @param {module:engine/model/node~Node} node The node to insert.\n * @returns {Object|null} The split result. If it was not possible to find an allowed position, `null` is returned.\n * @returns {module:engine/model/position~Position} The position between split elements.\n * @returns {module:engine/model/element~Element} [cursorParent] The element inside which the cursor should be placed to\n * continue the conversion. When the element is not defined it means that there was no split.\n */\n\n/**\n * Returns all the split parts of the given `element` that were created during upcasting through using {@link #splitToAllowedParent}.\n * It enables you to easily track these elements and continue processing them after they are split during the conversion of their children.\n *\n *\t\t<paragraph>Foo<imageBlock />bar<imageBlock />baz</paragraph> ->\n *\t\t<paragraph>Foo</paragraph><imageBlock /><paragraph>bar</paragraph><imageBlock /><paragraph>baz</paragraph>\n *\n * For a reference to any of above paragraphs, the function will return all three paragraphs (the original element included),\n * sorted in the order of their creation (the original element is the first one).\n *\n * If the given `element` was not split, an array with a single element is returned.\n *\n * A usage example in the converter code:\n *\n *\t\tconst myElement = conversionApi.writer.createElement( 'myElement' );\n *\n *\t\t// Children conversion may split `myElement`.\n *\t\tconversionApi.convertChildren( data.viewItem, data.modelCursor );\n *\n *\t\tconst splitParts = conversionApi.getSplitParts( myElement );\n *\t\tconst lastSplitPart = splitParts[ splitParts.length - 1 ];\n *\n *\t\t// Setting `data.modelRange` basing on split parts:\n *\t\tdata.modelRange = conversionApi.writer.createRange(\n *\t\t\tconversionApi.writer.createPositionBefore( myElement ),\n *\t\t\tconversionApi.writer.createPositionAfter( lastSplitPart )\n *\t\t);\n *\n *\t\t// Setting `data.modelCursor` to continue after the last split element:\n *\t\tdata.modelCursor = conversionApi.writer.createPositionAfter( lastSplitPart );\n *\n * **Tip:** If you are unable to get a reference to the original element (for example because the code is split into multiple converters\n * or even classes) but it has already been converted, you may want to check the first element in `data.modelRange`. This is a common\n * situation if an attribute converter is separated from an element converter.\n *\n * **Note:** This is an advanced method. For most cases {@link #safeInsert} and {@link #updateConversionResult} should be used.\n *\n * @method #getSplitParts\n * @param {module:engine/model/element~Element} element\n * @returns {Array.<module:engine/model/element~Element>}\n */\n\n/**\n * Stores information about what parts of the processed view item are still waiting to be handled. After a piece of view item\n * was converted, an appropriate consumable value should be\n * {@link module:engine/conversion/viewconsumable~ViewConsumable#consume consumed}.\n *\n * @member {module:engine/conversion/viewconsumable~ViewConsumable} #consumable\n */\n\n/**\n * Custom data stored by converters for the conversion process. Custom properties of this object can be defined and use to\n * pass parameters between converters.\n *\n * The difference between this property and the `data` parameter of\n * {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element} is that the `data` parameters allow you\n * to pass parameters within a single event and `store` within the whole conversion.\n *\n * @member {Object} #store\n */\n\n/**\n * The model's schema instance.\n *\n * @member {module:engine/model/schema~Schema} #schema\n */\n\n/**\n * The {@link module:engine/model/writer~Writer} instance used to manipulate the data during conversion.\n *\n * @member {module:engine/model/writer~Writer} #writer\n */\n\n/**\n * Conversion data.\n *\n * **Note:** Keep in mind that this object is shared by reference between all conversion callbacks that will be called.\n * This means that callbacks can override values if needed, and these values will be available in other callbacks.\n *\n * @typedef {Object} module:engine/conversion/upcastdispatcher~UpcastConversionData\n *\n * @property {module:engine/view/item~Item} viewItem The converted item.\n * @property {module:engine/model/position~Position} modelCursor The position where the converter should start changes.\n * Change this value for the next converter to tell where the conversion should continue.\n * @property {module:engine/model/range~Range} [modelRange] The current state of conversion result. Every change to\n * the converted element should be reflected by setting or modifying this property.\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/dataprocessor/basichtmlwriter\n */\n\n/* globals document */\n\n/**\n * Basic HTML writer. It uses the native `innerHTML` property for basic conversion\n * from a document fragment to an HTML string.\n *\n * @implements module:engine/dataprocessor/htmlwriter~HtmlWriter\n */\nexport default class BasicHtmlWriter {\n\t/**\n\t * Returns an HTML string created from the document fragment.\n\t *\n\t * @param {DocumentFragment} fragment\n\t * @returns {String}\n\t */\n\tgetHtml( fragment ) {\n\t\tconst doc = document.implementation.createHTMLDocument( '' );\n\t\tconst container = doc.createElement( 'div' );\n\t\tcontainer.appendChild( fragment );\n\n\t\treturn container.innerHTML;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/dataprocessor/htmldataprocessor\n */\n\n/* globals document, DOMParser */\n\nimport BasicHtmlWriter from './basichtmlwriter';\nimport DomConverter from '../view/domconverter';\n\n/**\n * The HTML data processor class.\n * This data processor implementation uses HTML as input and output data.\n *\n * @implements module:engine/dataprocessor/dataprocessor~DataProcessor\n */\nexport default class HtmlDataProcessor {\n\t/**\n\t * Creates a new instance of the HTML data processor class.\n\t *\n\t * @param {module:engine/view/document~Document} document The view document instance.\n\t */\n\tconstructor( document ) {\n\t\t/**\n\t\t * A DOM parser instance used to parse an HTML string to an HTML document.\n\t\t *\n\t\t * @member {DOMParser}\n\t\t */\n\t\tthis.domParser = new DOMParser();\n\n\t\t/**\n\t\t * A DOM converter used to convert DOM elements to view elements.\n\t\t *\n\t\t * @member {module:engine/view/domconverter~DomConverter}\n\t\t */\n\t\tthis.domConverter = new DomConverter( document, { renderingMode: 'data' } );\n\n\t\t/**\n\t\t * A basic HTML writer instance used to convert DOM elements to an HTML string.\n\t\t *\n\t\t * @member {module:engine/dataprocessor/htmlwriter~HtmlWriter}\n\t\t */\n\t\tthis.htmlWriter = new BasicHtmlWriter();\n\t}\n\n\t/**\n\t * Converts a provided {@link module:engine/view/documentfragment~DocumentFragment document fragment}\n\t * to data format &mdash; in this case to an HTML string.\n\t *\n\t * @param {module:engine/view/documentfragment~DocumentFragment} viewFragment\n\t * @returns {String} HTML string.\n\t */\n\ttoData( viewFragment ) {\n\t\t// Convert view DocumentFragment to DOM DocumentFragment.\n\t\tconst domFragment = this.domConverter.viewToDom( viewFragment, document );\n\n\t\t// Convert DOM DocumentFragment to HTML output.\n\t\treturn this.htmlWriter.getHtml( domFragment );\n\t}\n\n\t/**\n\t * Converts the provided HTML string to a view tree.\n\t *\n\t * @param {String} data An HTML string.\n\t * @returns {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment|null} A converted view element.\n\t */\n\ttoView( data ) {\n\t\t// Convert input HTML data to DOM DocumentFragment.\n\t\tconst domFragment = this._toDom( data );\n\n\t\t// Convert DOM DocumentFragment to view DocumentFragment.\n\t\treturn this.domConverter.domToView( domFragment );\n\t}\n\n\t/**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from the DOM to the view elements.\n\t *\n\t * The raw data can be later accessed by a\n\t * {@link module:engine/view/element~Element#getCustomProperty custom property of a view element} called `\"$rawContent\"`.\n\t *\n\t * @param {module:engine/view/matcher~MatcherPattern} pattern Pattern matching all view elements whose content should\n\t * be treated as raw data.\n\t */\n\tregisterRawContentMatcher( pattern ) {\n\t\tthis.domConverter.registerRawContentMatcher( pattern );\n\t}\n\n\t/**\n\t * If the processor is set to use marked fillers, it will insert `&nbsp;` fillers wrapped in `<span>` elements\n\t * (`<span data-cke-filler=\"true\">&nbsp;</span>`) instead of regular `&nbsp;` characters.\n\t *\n\t * This mode allows for a more precise handling of the block fillers (so they do not leak into the editor content) but\n\t * bloats the editor data with additional markup.\n\t *\n\t * This mode may be required by some features and will be turned on by them automatically.\n\t *\n\t * @param {'default'|'marked'} type Whether to use the default or the marked `&nbsp;` block fillers.\n\t */\n\tuseFillerType( type ) {\n\t\tthis.domConverter.blockFillerMode = type == 'marked' ? 'markedNbsp' : 'nbsp';\n\t}\n\n\t/**\n\t * Converts an HTML string to its DOM representation. Returns a document fragment containing nodes parsed from\n\t * the provided data.\n\t *\n\t * @private\n\t * @param {String} data\n\t * @returns {DocumentFragment}\n\t */\n\t_toDom( data ) {\n\t\t// Wrap data with a <body> tag so leading non-layout nodes (like <script>, <style>, HTML comment)\n\t\t// will be preserved in the body collection.\n\t\t// Do it only for data that is not a full HTML document.\n\t\tif ( !data.match( /<(?:html|body|head|meta)(?:\\s[^>]*)?>/i ) ) {\n\t\t\tdata = `<body>${ data }</body>`;\n\t\t}\n\n\t\tconst document = this.domParser.parseFromString( data, 'text/html' );\n\t\tconst fragment = document.createDocumentFragment();\n\t\tconst bodyChildNodes = document.body.childNodes;\n\n\t\twhile ( bodyChildNodes.length > 0 ) {\n\t\t\tfragment.appendChild( bodyChildNodes[ 0 ] );\n\t\t}\n\n\t\treturn fragment;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/controller/datacontroller\n */\n\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\nimport ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\nimport Mapper from '../conversion/mapper';\n\nimport DowncastDispatcher from '../conversion/downcastdispatcher';\nimport { insertAttributesAndChildren, insertText } from '../conversion/downcasthelpers';\n\nimport UpcastDispatcher from '../conversion/upcastdispatcher';\nimport { convertText, convertToModelFragment } from '../conversion/upcasthelpers';\n\nimport ViewDocumentFragment from '../view/documentfragment';\nimport ViewDocument from '../view/document';\nimport ViewDowncastWriter from '../view/downcastwriter';\n\nimport ModelRange from '../model/range';\nimport { autoParagraphEmptyRoots } from '../model/utils/autoparagraphing';\nimport HtmlDataProcessor from '../dataprocessor/htmldataprocessor';\n\n/**\n * Controller for the data pipeline. The data pipeline controls how data is retrieved from the document\n * and set inside it. Hence, the controller features two methods which allow to {@link ~DataController#get get}\n * and {@link ~DataController#set set} data of the {@link ~DataController#model model}\n * using the given:\n *\n * * {@link module:engine/dataprocessor/dataprocessor~DataProcessor data processor},\n * * downcast converters,\n * * upcast converters.\n *\n * An instance of the data controller is always available in the {@link module:core/editor/editor~Editor#data `editor.data`}\n * property:\n *\n *\t\teditor.data.get( { rootName: 'customRoot' } ); // -> '<p>Hello!</p>'\n *\n * @mixes module:utils/observablemixin~ObservableMixin\n */\nexport default class DataController {\n\t/**\n\t * Creates a data controller instance.\n\t *\n\t * @param {module:engine/model/model~Model} model Data model.\n\t * @param {module:engine/view/stylesmap~StylesProcessor} stylesProcessor The styles processor instance.\n\t */\n\tconstructor( model, stylesProcessor ) {\n\t\t/**\n\t\t * Data model.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/model~Model}\n\t\t */\n\t\tthis.model = model;\n\n\t\t/**\n\t\t * Mapper used for the conversion. It has no permanent bindings, because these are created while getting data and\n\t\t * ae cleared directly after the data are converted. However, the mapper is defined as a class property, because\n\t\t * it needs to be passed to the `DowncastDispatcher` as a conversion API.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/conversion/mapper~Mapper}\n\t\t */\n\t\tthis.mapper = new Mapper();\n\n\t\t/**\n\t\t * Downcast dispatcher used by the {@link #get get method}. Downcast converters should be attached to it.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/conversion/downcastdispatcher~DowncastDispatcher}\n\t\t */\n\t\tthis.downcastDispatcher = new DowncastDispatcher( {\n\t\t\tmapper: this.mapper,\n\t\t\tschema: model.schema\n\t\t} );\n\t\tthis.downcastDispatcher.on( 'insert:$text', insertText(), { priority: 'lowest' } );\n\t\tthis.downcastDispatcher.on( 'insert', insertAttributesAndChildren(), { priority: 'lowest' } );\n\n\t\t/**\n\t\t * Upcast dispatcher used by the {@link #set set method}. Upcast converters should be attached to it.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/conversion/upcastdispatcher~UpcastDispatcher}\n\t\t */\n\t\tthis.upcastDispatcher = new UpcastDispatcher( {\n\t\t\tschema: model.schema\n\t\t} );\n\n\t\t/**\n\t\t * The view document used by the data controller.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/document~Document}\n\t\t */\n\t\tthis.viewDocument = new ViewDocument( stylesProcessor );\n\n\t\t/**\n\t\t * Styles processor used during the conversion.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/stylesmap~StylesProcessor}\n\t\t */\n\t\tthis.stylesProcessor = stylesProcessor;\n\n\t\t/**\n\t\t * Data processor used specifically for HTML conversion.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/dataprocessor/htmldataprocessor~HtmlDataProcessor} #htmlProcessor\n\t\t */\n\t\tthis.htmlProcessor = new HtmlDataProcessor( this.viewDocument );\n\n\t\t/**\n\t\t * Data processor used during the conversion.\n\t\t * Same instance as {@link #htmlProcessor} by default. Can be replaced at run time to handle different format, e.g. XML or Markdown.\n\t\t *\n\t\t * @member {module:engine/dataprocessor/dataprocessor~DataProcessor} #processor\n\t\t */\n\t\tthis.processor = this.htmlProcessor;\n\n\t\t/**\n\t\t * The view downcast writer just for data conversion purposes, i.e. to modify\n\t\t * the {@link #viewDocument}.\n\t\t *\n\t\t * @private\n\t\t * @readonly\n\t\t * @member {module:engine/view/downcastwriter~DowncastWriter}\n\t\t */\n\t\tthis._viewWriter = new ViewDowncastWriter( this.viewDocument );\n\n\t\t// Define default converters for text and elements.\n\t\t//\n\t\t// Note that if there is no default converter for the element it will be skipped, for instance `<b>foo</b>` will be\n\t\t// converted to nothing. We therefore add `convertToModelFragment` as a last converter so it converts children of that\n\t\t// element to the document fragment so `<b>foo</b>` will still be converted to `foo` even if there is no converter for `<b>`.\n\t\tthis.upcastDispatcher.on( 'text', convertText(), { priority: 'lowest' } );\n\t\tthis.upcastDispatcher.on( 'element', convertToModelFragment(), { priority: 'lowest' } );\n\t\tthis.upcastDispatcher.on( 'documentFragment', convertToModelFragment(), { priority: 'lowest' } );\n\n\t\tthis.decorate( 'init' );\n\t\tthis.decorate( 'set' );\n\t\tthis.decorate( 'get' );\n\n\t\t// Fire the `ready` event when the initialization has completed. Such low-level listener offers the possibility\n\t\t// to plug into the initialization pipeline without interrupting the initialization flow.\n\t\tthis.on( 'init', () => {\n\t\t\tthis.fire( 'ready' );\n\t\t}, { priority: 'lowest' } );\n\n\t\t// Fix empty roots after DataController is 'ready' (note that the init method could be decorated and stopped).\n\t\t// We need to handle this event because initial data could be empty and the post-fixer would not get triggered.\n\t\tthis.on( 'ready', () => {\n\t\t\tthis.model.enqueueChange( { isUndoable: false }, autoParagraphEmptyRoots );\n\t\t}, { priority: 'lowest' } );\n\t}\n\n\t/**\n\t * Returns the model's data converted by downcast dispatchers attached to {@link #downcastDispatcher} and\n\t * formatted by the {@link #processor data processor}.\n\t *\n\t * @fires get\n\t * @param {Object} [options] Additional configuration for the retrieved data. `DataController` provides two optional\n\t * properties: `rootName` and `trim`. Other properties of this object are specified by various editor features.\n\t * @param {String} [options.rootName='main'] Root name.\n\t * @param {String} [options.trim='empty'] Whether returned data should be trimmed. This option is set to `empty` by default,\n\t * which means whenever editor content is considered empty, an empty string will be returned. To turn off trimming completely\n\t * use `'none'`. In such cases the exact content will be returned (for example a `<p>&nbsp;</p>` for an empty editor).\n\t * @returns {String} Output data.\n\t */\n\tget( options = {} ) {\n\t\tconst { rootName = 'main', trim = 'empty' } = options;\n\n\t\tif ( !this._checkIfRootsExists( [ rootName ] ) ) {\n\t\t\t/**\n\t\t\t * Cannot get data from a non-existing root. This error is thrown when {@link #get DataController#get() method}\n\t\t\t * is called with a non-existent root name. For example, if there is an editor instance with only `main` root,\n\t\t\t * calling {@link #get} like:\n\t\t\t *\n\t\t\t *\t\tdata.get( { rootName: 'root2' } );\n\t\t\t *\n\t\t\t * will throw this error.\n\t\t\t *\n\t\t\t * @error datacontroller-get-non-existent-root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'datacontroller-get-non-existent-root', this );\n\t\t}\n\n\t\tconst root = this.model.document.getRoot( rootName );\n\n\t\tif ( trim === 'empty' && !this.model.hasContent( root, { ignoreWhitespaces: true } ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn this.stringify( root, options );\n\t}\n\n\t/**\n\t * Returns the content of the given {@link module:engine/model/element~Element model's element} or\n\t * {@link module:engine/model/documentfragment~DocumentFragment model document fragment} converted by the downcast converters\n\t * attached to the {@link #downcastDispatcher} and formatted by the {@link #processor data processor}.\n\t *\n\t * @param {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment} modelElementOrFragment\n\t * The element whose content will be stringified.\n\t * @param {Object} [options] Additional configuration passed to the conversion process.\n\t * @returns {String} Output data.\n\t */\n\tstringify( modelElementOrFragment, options = {} ) {\n\t\t// Model -> view.\n\t\tconst viewDocumentFragment = this.toView( modelElementOrFragment, options );\n\n\t\t// View -> data.\n\t\treturn this.processor.toData( viewDocumentFragment );\n\t}\n\n\t/**\n\t * Returns the content of the given {@link module:engine/model/element~Element model element} or\n\t * {@link module:engine/model/documentfragment~DocumentFragment model document fragment} converted by the downcast\n\t * converters attached to {@link #downcastDispatcher} into a\n\t * {@link module:engine/view/documentfragment~DocumentFragment view document fragment}.\n\t *\n\t * @param {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment} modelElementOrFragment\n\t * Element or document fragment whose content will be converted.\n\t * @param {Object} [options={}] Additional configuration that will be available through the\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi#options} during the conversion process.\n\t * @returns {module:engine/view/documentfragment~DocumentFragment} Output view DocumentFragment.\n\t */\n\ttoView( modelElementOrFragment, options = {} ) {\n\t\tconst viewDocument = this.viewDocument;\n\t\tconst viewWriter = this._viewWriter;\n\n\t\t// Clear bindings so the call to this method returns correct results.\n\t\tthis.mapper.clearBindings();\n\n\t\t// First, convert elements.\n\t\tconst modelRange = ModelRange._createIn( modelElementOrFragment );\n\t\tconst viewDocumentFragment = new ViewDocumentFragment( viewDocument );\n\n\t\tthis.mapper.bindElements( modelElementOrFragment, viewDocumentFragment );\n\n\t\t// Prepare list of markers.\n\t\t// For document fragment, simply take the markers assigned to this document fragment.\n\t\t// For model root, all markers in that root will be taken.\n\t\t// For model element, we need to check which markers are intersecting with this element and relatively modify the markers' ranges.\n\t\t// Collapsed markers at element boundary, although considered as not intersecting with the element, will also be returned.\n\t\tconst markers = modelElementOrFragment.is( 'documentFragment' ) ?\n\t\t\tmodelElementOrFragment.markers :\n\t\t\t_getMarkersRelativeToElement( modelElementOrFragment );\n\n\t\tthis.downcastDispatcher.convert( modelRange, markers, viewWriter, options );\n\n\t\treturn viewDocumentFragment;\n\t}\n\n\t/**\n\t * Sets the initial input data parsed by the {@link #processor data processor} and\n\t * converted by the {@link #upcastDispatcher view-to-model converters}.\n\t * Initial data can be only set to a document whose {@link module:engine/model/document~Document#version} is equal 0.\n\t *\n\t * **Note** This method is {@link module:utils/observablemixin~ObservableMixin#decorate decorated} which is\n\t * used by e.g. collaborative editing plugin that syncs remote data on init.\n\t *\n\t * When data is passed as a string, it is initialized on the default `main` root:\n\t *\n\t *\t\tdataController.init( '<p>Foo</p>' ); // Initializes data on the `main` root only, as no other is specified.\n\t *\n\t * To initialize data on a different root or multiple roots at once, an object containing `rootName` - `data` pairs should be passed:\n\t *\n\t *\t\tdataController.init( { main: '<p>Foo</p>', title: '<h1>Bar</h1>' } ); // Initializes data on both the `main` and `title` roots.\n\t *\n\t * @fires init\n\t * @param {String|Object.<String,String>} data Input data as a string or an object containing the `rootName` - `data`\n\t * pairs to initialize data on multiple roots at once.\n\t * @returns {Promise} Promise that is resolved after the data is set on the editor.\n\t */\n\tinit( data ) {\n\t\tif ( this.model.document.version ) {\n\t\t\t/**\n\t\t\t * Cannot set initial data to a non-empty {@link module:engine/model/document~Document}.\n\t\t\t * Initial data should be set once, during the {@link module:core/editor/editor~Editor} initialization,\n\t\t\t * when the {@link module:engine/model/document~Document#version} is equal 0.\n\t\t\t *\n\t\t\t * @error datacontroller-init-document-not-empty\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'datacontroller-init-document-not-empty', this );\n\t\t}\n\n\t\tlet initialData = {};\n\t\tif ( typeof data === 'string' ) {\n\t\t\tinitialData.main = data; // Default root is 'main'. To initiate data on a different root, object should be passed.\n\t\t} else {\n\t\t\tinitialData = data;\n\t\t}\n\n\t\tif ( !this._checkIfRootsExists( Object.keys( initialData ) ) ) {\n\t\t\t/**\n\t\t\t * Cannot init data on a non-existent root. This error is thrown when {@link #init DataController#init() method}\n\t\t\t * is called with non-existent root name. For example, if there is an editor instance with only `main` root,\n\t\t\t * calling {@link #init} like:\n\t\t\t *\n\t\t\t * \t\tdata.init( { main: '<p>Foo</p>', root2: '<p>Bar</p>' } );\n\t\t\t *\n\t\t\t * will throw this error.\n\t\t\t *\n\t\t\t * @error datacontroller-init-non-existent-root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'datacontroller-init-non-existent-root', this );\n\t\t}\n\n\t\tthis.model.enqueueChange( { isUndoable: false }, writer => {\n\t\t\tfor ( const rootName of Object.keys( initialData ) ) {\n\t\t\t\tconst modelRoot = this.model.document.getRoot( rootName );\n\t\t\t\twriter.insert( this.parse( initialData[ rootName ], modelRoot ), modelRoot, 0 );\n\t\t\t}\n\t\t} );\n\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Sets the input data parsed by the {@link #processor data processor} and\n\t * converted by the {@link #upcastDispatcher view-to-model converters}.\n\t * This method can be used any time to replace existing editor data with the new one without clearing the\n\t * {@link module:engine/model/document~Document#history document history}.\n\t *\n\t * This method also creates a batch with all the changes applied. If all you need is to parse data, use\n\t * the {@link #parse} method.\n\t *\n\t * When data is passed as a string it is set on the default `main` root:\n\t *\n\t *\t\tdataController.set( '<p>Foo</p>' ); // Sets data on the `main` root, as no other is specified.\n\t *\n\t * To set data on a different root or multiple roots at once, an object containing `rootName` - `data` pairs should be passed:\n\t *\n\t *\t\tdataController.set( { main: '<p>Foo</p>', title: '<h1>Bar</h1>' } ); // Sets data on the `main` and `title` roots as specified.\n\t *\n\t * To set the data with a preserved undo stack and add the change to the undo stack, set `{ isUndoable: true }` as a `batchType` option.\n\t *\n\t *\t\tdataController.set( '<p>Foo</p>', { batchType: { isUndoable: true } } );\n\t *\n\t * @fires set\n\t * @param {String|Object.<String,String>} data Input data as a string or an object containing the `rootName` - `data`\n\t * pairs to set data on multiple roots at once.\n\t * @param {Object} [options={}] Options for setting data.\n\t * @param {Object} [options.batchType] The batch type that will be used to create a batch for the changes applied by this method.\n\t * By default, the batch will be set as {@link module:engine/model/batch~Batch#isUndoable not undoable} and the undo stack will be\n\t * cleared after the new data is applied (all undo steps will be removed). If the batch type `isUndoable` flag is be set to `true`,\n\t * the undo stack will be preserved instead and not cleared when new data is applied.\n\t */\n\tset( data, options = {} ) {\n\t\tlet newData = {};\n\n\t\tif ( typeof data === 'string' ) {\n\t\t\tnewData.main = data; // The default root is 'main'. To set data on a different root, an object should be passed.\n\t\t} else {\n\t\t\tnewData = data;\n\t\t}\n\n\t\tif ( !this._checkIfRootsExists( Object.keys( newData ) ) ) {\n\t\t\t/**\n\t\t\t * Cannot set data on a non-existent root. This error is thrown when the {@link #set DataController#set() method}\n\t\t\t * is called with non-existent root name. For example, if there is an editor instance with only the default `main` root,\n\t\t\t * calling {@link #set} like:\n\t\t\t *\n\t\t\t * \t\tdata.set( { main: '<p>Foo</p>', root2: '<p>Bar</p>' } );\n\t\t\t *\n\t\t\t * will throw this error.\n\t\t\t *\n\t\t\t * @error datacontroller-set-non-existent-root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'datacontroller-set-non-existent-root', this );\n\t\t}\n\n\t\tthis.model.enqueueChange( options.batchType || {}, writer => {\n\t\t\twriter.setSelection( null );\n\t\t\twriter.removeSelectionAttribute( this.model.document.selection.getAttributeKeys() );\n\n\t\t\tfor ( const rootName of Object.keys( newData ) ) {\n\t\t\t\t// Save to model.\n\t\t\t\tconst modelRoot = this.model.document.getRoot( rootName );\n\n\t\t\t\twriter.remove( writer.createRangeIn( modelRoot ) );\n\t\t\t\twriter.insert( this.parse( newData[ rootName ], modelRoot ), modelRoot, 0 );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Returns the data parsed by the {@link #processor data processor} and then converted by upcast converters\n\t * attached to the {@link #upcastDispatcher}.\n\t *\n\t * @see #set\n\t * @param {String} data Data to parse.\n\t * @param {module:engine/model/schema~SchemaContextDefinition} [context='$root'] Base context in which the view will\n\t * be converted to the model. See: {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher#convert}.\n\t * @returns {module:engine/model/documentfragment~DocumentFragment} Parsed data.\n\t */\n\tparse( data, context = '$root' ) {\n\t\t// data -> view\n\t\tconst viewDocumentFragment = this.processor.toView( data );\n\n\t\t// view -> model\n\t\treturn this.toModel( viewDocumentFragment, context );\n\t}\n\n\t/**\n\t * Returns the result of the given {@link module:engine/view/element~Element view element} or\n\t * {@link module:engine/view/documentfragment~DocumentFragment view document fragment} converted by the\n\t * {@link #upcastDispatcher view-to-model converters}, wrapped by {@link module:engine/model/documentfragment~DocumentFragment}.\n\t *\n\t * When marker elements were converted during the conversion process, it will be set as a document fragment's\n\t * {@link module:engine/model/documentfragment~DocumentFragment#markers static markers map}.\n\t *\n\t * @param {module:engine/view/element~Element|module:engine/view/documentfragment~DocumentFragment} viewElementOrFragment\n\t * The element or document fragment whose content will be converted.\n\t * @param {module:engine/model/schema~SchemaContextDefinition} [context='$root'] Base context in which the view will\n\t * be converted to the model. See: {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher#convert}.\n\t * @returns {module:engine/model/documentfragment~DocumentFragment} Output document fragment.\n\t */\n\ttoModel( viewElementOrFragment, context = '$root' ) {\n\t\treturn this.model.change( writer => {\n\t\t\treturn this.upcastDispatcher.convert( viewElementOrFragment, writer, context );\n\t\t} );\n\t}\n\n\t/**\n\t * Adds the style processor normalization rules.\n\t *\n\t * You can implement your own rules as well as use one of the available processor rules:\n\t *\n\t * * background: {@link module:engine/view/styles/background~addBackgroundRules}\n\t * * border: {@link module:engine/view/styles/border~addBorderRules}\n\t * * margin: {@link module:engine/view/styles/margin~addMarginRules}\n\t * * padding: {@link module:engine/view/styles/padding~addPaddingRules}\n\t *\n\t * @param {Function} callback\n\t */\n\taddStyleProcessorRules( callback ) {\n\t\tcallback( this.stylesProcessor );\n\t}\n\n\t/**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} on an {@link #htmlProcessor htmlProcessor}\n\t * and a {@link #processor processor} for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from DOM to view elements.\n\t *\n\t * The raw data can be later accessed by the {@link module:engine/view/element~Element#getCustomProperty view element custom property}\n\t * `\"$rawContent\"`.\n\t *\n\t * @param {module:engine/view/matcher~MatcherPattern} pattern Pattern matching all view elements whose content should\n\t * be treated as a raw data.\n\t */\n\tregisterRawContentMatcher( pattern ) {\n\t\t// No need to register the pattern if both the `htmlProcessor` and `processor` are the same instances.\n\t\tif ( this.processor && this.processor !== this.htmlProcessor ) {\n\t\t\tthis.processor.registerRawContentMatcher( pattern );\n\t\t}\n\n\t\tthis.htmlProcessor.registerRawContentMatcher( pattern );\n\t}\n\n\t/**\n\t * Removes all event listeners set by the DataController.\n\t */\n\tdestroy() {\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Checks whether all provided root names are actually existing editor roots.\n\t *\n\t * @private\n\t * @param {Array.<String>} rootNames Root names to check.\n\t * @returns {Boolean} Whether all provided root names are existing editor roots.\n\t */\n\t_checkIfRootsExists( rootNames ) {\n\t\tfor ( const rootName of rootNames ) {\n\t\t\tif ( !this.model.document.getRootNames().includes( rootName ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Event fired once the data initialization has finished.\n\t *\n\t * @event ready\n\t */\n\n\t/**\n\t * An event fired after the {@link #init `init()` method} was run. It can be {@link #listenTo listened to} in order to adjust or modify\n\t * the initialization flow. However, if the `init` event is stopped or prevented, the {@link #event:ready `ready` event}\n\t * should be fired manually.\n\t *\n\t * The `init` event is fired by the decorated {@link #init} method.\n\t * See {@link module:utils/observablemixin~ObservableMixin#decorate} for more information and samples.\n\t *\n\t * @event init\n\t */\n\n\t/**\n\t * An event fired after {@link #set set() method} has been run.\n\t *\n\t * The `set` event is fired by the decorated {@link #set} method.\n\t * See {@link module:utils/observablemixin~ObservableMixin#decorate} for more information and samples.\n\t *\n\t * @event set\n\t */\n\n\t/**\n\t * Event fired after the {@link #get get() method} has been run.\n\t *\n\t * The `get` event is fired by the decorated {@link #get} method.\n\t * See {@link module:utils/observablemixin~ObservableMixin#decorate} for more information and samples.\n\t *\n\t * @event get\n\t */\n}\n\nmix( DataController, ObservableMixin );\n\n// Helper function for downcast conversion.\n//\n// Takes a document element (element that is added to a model document) and checks which markers are inside it. If the marker is collapsed\n// at element boundary, it is considered as contained inside the element and marker range is returned. Otherwise, if the marker is\n// intersecting with the element, the intersection is returned.\nfunction _getMarkersRelativeToElement( element ) {\n\tconst result = [];\n\tconst doc = element.root.document;\n\n\tif ( !doc ) {\n\t\treturn new Map();\n\t}\n\n\tconst elementRange = ModelRange._createIn( element );\n\n\tfor ( const marker of doc.model.markers ) {\n\t\tconst markerRange = marker.getRange();\n\n\t\tconst isMarkerCollapsed = markerRange.isCollapsed;\n\t\tconst isMarkerAtElementBoundary = markerRange.start.isEqual( elementRange.start ) || markerRange.end.isEqual( elementRange.end );\n\n\t\tif ( isMarkerCollapsed && isMarkerAtElementBoundary ) {\n\t\t\tresult.push( [ marker.name, markerRange ] );\n\t\t} else {\n\t\t\tconst updatedMarkerRange = elementRange.getIntersection( markerRange );\n\n\t\t\tif ( updatedMarkerRange ) {\n\t\t\t\tresult.push( [ marker.name, updatedMarkerRange ] );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Sort the markers in a stable fashion to ensure that the order in which they are\n\t// added to the model's marker collection does not affect how they are\n\t// downcast. One particular use case that we are targeting here, is one where\n\t// two markers are adjacent but not overlapping, such as an insertion/deletion\n\t// suggestion pair representing the replacement of a range of text. In this\n\t// case, putting the markers in DOM order causes the first marker's end to be\n\t// serialized right after the second marker's start, while putting the markers\n\t// in reverse DOM order causes it to be right before the second marker's\n\t// start. So, we sort these in a way that ensures non-intersecting ranges are in\n\t// reverse DOM order, and intersecting ranges are in something approximating\n\t// reverse DOM order (since reverse DOM order doesn't have a precise meaning\n\t// when working with intersecting ranges).\n\tresult.sort( ( [ n1, r1 ], [ n2, r2 ] ) => {\n\t\tif ( r1.end.compareWith( r2.start ) !== 'after' ) {\n\t\t\t// m1.end <= m2.start -- m1 is entirely <= m2\n\t\t\treturn 1;\n\t\t} else if ( r1.start.compareWith( r2.end ) !== 'before' ) {\n\t\t\t// m1.start >= m2.end -- m1 is entirely >= m2\n\t\t\treturn -1;\n\t\t} else {\n\t\t\t// they overlap, so use their start positions as the primary sort key and\n\t\t\t// end positions as the secondary sort key\n\t\t\tswitch ( r1.start.compareWith( r2.start ) ) {\n\t\t\t\tcase 'before':\n\t\t\t\t\treturn 1;\n\t\t\t\tcase 'after':\n\t\t\t\t\treturn -1;\n\t\t\t\tdefault:\n\t\t\t\t\tswitch ( r1.end.compareWith( r2.end ) ) {\n\t\t\t\t\t\tcase 'before':\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tcase 'after':\n\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn n2.localeCompare( n1 );\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} );\n\n\treturn new Map( result );\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/conversion/conversion\n */\n\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport UpcastHelpers from './upcasthelpers';\nimport DowncastHelpers from './downcasthelpers';\nimport toArray from '@ckeditor/ckeditor5-utils/src/toarray';\n\n/**\n * A utility class that helps add converters to upcast and downcast dispatchers.\n *\n * We recommend reading the {@glink framework/guides/deep-dive/conversion/intro editor conversion} guide first to\n * understand the core concepts of the conversion mechanisms.\n *\n * An instance of the conversion manager is available in the\n * {@link module:core/editor/editor~Editor#conversion `editor.conversion`} property\n * and by default has the following groups of dispatchers (i.e. directions of conversion):\n *\n * * `downcast` (editing and data downcasts)\n * * `editingDowncast`\n * * `dataDowncast`\n * * `upcast`\n *\n * # One-way converters\n *\n * To add a converter to a specific group, use the {@link module:engine/conversion/conversion~Conversion#for `for()`}\n * method:\n *\n *\t\t// Add a converter to editing downcast and data downcast.\n *\t\teditor.conversion.for( 'downcast' ).elementToElement( config ) );\n *\n *\t\t// Add a converter to the data pipepline only:\n *\t\teditor.conversion.for( 'dataDowncast' ).elementToElement( dataConversionConfig ) );\n *\n *\t\t// And a slightly different one for the editing pipeline:\n *\t\teditor.conversion.for( 'editingDowncast' ).elementToElement( editingConversionConfig ) );\n *\n * See {@link module:engine/conversion/conversion~Conversion#for `for()`} method documentation to learn more about\n * available conversion helpers and how to use your custom ones.\n *\n * # Two-way converters\n *\n * Besides using one-way converters via the `for()` method, you can also use other methods available in this\n * class to add two-way converters (upcast and downcast):\n *\n * * {@link module:engine/conversion/conversion~Conversion#elementToElement `elementToElement()`} &ndash;\n * Model element to view element and vice versa.\n * * {@link module:engine/conversion/conversion~Conversion#attributeToElement `attributeToElement()`} &ndash;\n * Model attribute to view element and vice versa.\n * * {@link module:engine/conversion/conversion~Conversion#attributeToAttribute `attributeToAttribute()`} &ndash;\n * Model attribute to view attribute and vice versa.\n */\nexport default class Conversion {\n\t/**\n\t * Creates a new conversion instance.\n\t *\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastDispatcher|\n\t * Array.<module:engine/conversion/downcastdispatcher~DowncastDispatcher>} downcastDispatchers\n\t * @param {module:engine/conversion/upcastdispatcher~UpcastDispatcher|\n\t * Array.<module:engine/conversion/upcastdispatcher~UpcastDispatcher>} upcastDispatchers\n\t */\n\tconstructor( downcastDispatchers, upcastDispatchers ) {\n\t\t/**\n\t\t * Maps dispatchers group name to ConversionHelpers instances.\n\t\t *\n\t\t * @private\n\t\t * @member {Map.<String,module:engine/conversion/conversionhelpers~ConversionHelpers>}\n\t\t */\n\t\tthis._helpers = new Map();\n\n\t\t// Define default 'downcast' & 'upcast' dispatchers groups. Those groups are always available as two-way converters needs them.\n\t\tthis._downcast = toArray( downcastDispatchers );\n\t\tthis._createConversionHelpers( { name: 'downcast', dispatchers: this._downcast, isDowncast: true } );\n\n\t\tthis._upcast = toArray( upcastDispatchers );\n\t\tthis._createConversionHelpers( { name: 'upcast', dispatchers: this._upcast, isDowncast: false } );\n\t}\n\n\t/**\n\t * Define an alias for registered dispatcher.\n\t *\n\t *\t\tconst conversion = new Conversion(\n\t *\t\t\t[ dataDowncastDispatcher, editingDowncastDispatcher ],\n\t *\t\t\tupcastDispatcher\n\t *\t\t);\n\t *\n\t *\t\tconversion.addAlias( 'dataDowncast', dataDowncastDispatcher );\n\t *\n\t * @param {String} alias An alias of a dispatcher.\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastDispatcher|\n\t * module:engine/conversion/upcastdispatcher~UpcastDispatcher} dispatcher Dispatcher which should have an alias.\n\t */\n\taddAlias( alias, dispatcher ) {\n\t\tconst isDowncast = this._downcast.includes( dispatcher );\n\t\tconst isUpcast = this._upcast.includes( dispatcher );\n\n\t\tif ( !isUpcast && !isDowncast ) {\n\t\t\t/**\n\t\t\t * Trying to register an alias for a dispatcher that nas not been registered.\n\t\t\t *\n\t\t\t * @error conversion-add-alias-dispatcher-not-registered\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'conversion-add-alias-dispatcher-not-registered',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\n\t\tthis._createConversionHelpers( { name: alias, dispatchers: [ dispatcher ], isDowncast } );\n\t}\n\n\t/**\n\t * Provides a chainable API to assign converters to a conversion dispatchers group.\n\t *\n\t * If the given group name has not been registered, the\n\t * {@link module:utils/ckeditorerror~CKEditorError `conversion-for-unknown-group` error} is thrown.\n\t *\n\t * You can use conversion helpers available directly in the `for()` chain or your custom ones via\n\t * the {@link module:engine/conversion/conversionhelpers~ConversionHelpers#add `add()`} method.\n\t *\n\t * # Using built-in conversion helpers\n\t *\n\t * The `for()` chain comes with a set of conversion helpers which you can use like this:\n\t *\n\t *\t\teditor.conversion.for( 'downcast' )\n\t *\t\t\t.elementToElement( config1 ) // Adds an element-to-element downcast converter.\n\t *\t\t\t.attributeToElement( config2 ); // Adds an attribute-to-element downcast converter.\n\t *\n\t *\t\teditor.conversion.for( 'upcast' )\n\t *\t\t\t.elementToAttribute( config3 ); // Adds an element-to-attribute upcast converter.\n\t *\n\t * Refer to the documentation of built-in conversion helpers to learn about their configuration options.\n\t *\n\t * * downcast (model-to-view) conversion helpers:\n\t *\n\t *\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`},\n\t *\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToElement `attributeToElement()`},\n\t *\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToAttribute `attributeToAttribute()`}.\n\t *\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToElement `markerToElement()`}.\n\t *\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToHighlight `markerToHighlight()`}.\n\t *\n\t * * upcast (view-to-model) conversion helpers:\n\t *\n\t *\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#elementToElement `elementToElement()`},\n\t *\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#elementToAttribute `elementToAttribute()`},\n\t *\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#attributeToAttribute `attributeToAttribute()`}.\n\t *\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#elementToMarker `elementToMarker()`}.\n\t *\n\t * # Using custom conversion helpers\n\t *\n\t * If you need to implement an atypical converter, you can do so by calling:\n\t *\n\t *\t\teditor.conversion.for( direction ).add( customHelper );\n\t *\n\t * The `.add()` method takes exactly one parameter, which is a function. This function should accept one parameter that\n\t * is a dispatcher instance. The function should add an actual converter to the passed dispatcher instance.\n\t *\n\t * Example:\n\t *\n\t *\t\teditor.conversion.for( 'upcast' ).add( dispatcher => {\n\t *\t\t\tdispatcher.on( 'element:a', ( evt, data, conversionApi ) => {\n\t *\t\t\t\t// Do something with a view <a> element.\n\t *\t\t\t} );\n\t *\t\t} );\n\t *\n\t * Refer to the documentation of {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher}\n\t * and {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher} to learn how to write\n\t * custom converters.\n\t *\n\t * @param {String} groupName The name of dispatchers group to add the converters to.\n\t * @returns {module:engine/conversion/downcasthelpers~DowncastHelpers|module:engine/conversion/upcasthelpers~UpcastHelpers}\n\t */\n\tfor( groupName ) {\n\t\tif ( !this._helpers.has( groupName ) ) {\n\t\t\t/**\n\t\t\t * Trying to add a converter to an unknown dispatchers group.\n\t\t\t *\n\t\t\t * @error conversion-for-unknown-group\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'conversion-for-unknown-group', this );\n\t\t}\n\n\t\treturn this._helpers.get( groupName );\n\t}\n\n\t/**\n\t * Sets up converters between the model and the view that convert a model element to a view element (and vice versa).\n\t * For example, the model `<paragraph>Foo</paragraph>` is turned into `<p>Foo</p>` in the view.\n\t *\n\t *\t\t// A simple conversion from the `paragraph` model element to the `<p>` view element (and vice versa).\n\t *\t\teditor.conversion.elementToElement( { model: 'paragraph', view: 'p' } );\n\t *\n\t *\t\t// Override other converters by specifying a converter definition with a higher priority.\n\t *\t\teditor.conversion.elementToElement( { model: 'paragraph', view: 'div', converterPriority: 'high' } );\n\t *\n\t *\t\t// View specified as an object instead of a string.\n\t *\t\teditor.conversion.elementToElement( {\n\t *\t\t\tmodel: 'fancyParagraph',\n\t *\t\t\tview: {\n\t *\t\t\t\tname: 'p',\n\t *\t\t\t\tclasses: 'fancy'\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t *\t\t// Use `upcastAlso` to define other view elements that should also be converted to a `paragraph` element.\n\t *\t\teditor.conversion.elementToElement( {\n\t *\t\t\tmodel: 'paragraph',\n\t *\t\t\tview: 'p',\n\t *\t\t\tupcastAlso: [\n\t *\t\t\t\t'div',\n\t *\t\t\t\t{\n\t *\t\t\t\t\t// Any element with the `display: block` style.\n\t *\t\t\t\t\tstyles: {\n\t *\t\t\t\t\t\tdisplay: 'block'\n\t *\t\t\t\t\t}\n\t *\t\t\t\t}\n\t *\t\t\t]\n\t *\t\t} );\n\t *\n\t *\t\t// `upcastAlso` set as callback enables a conversion of a wide range of different view elements.\n\t *\t\teditor.conversion.elementToElement( {\n\t *\t\t\tmodel: 'heading',\n\t *\t\t\tview: 'h2',\n\t *\t\t\t// Convert \"heading-like\" paragraphs to headings.\n\t *\t\t\tupcastAlso: viewElement => {\n\t *\t\t\t\tconst fontSize = viewElement.getStyle( 'font-size' );\n\t *\n\t *\t\t\t\tif ( !fontSize ) {\n\t *\t\t\t\t\treturn null;\n\t *\t\t\t\t}\n\t *\n\t *\t\t\t\tconst match = fontSize.match( /(\\d+)\\s*px/ );\n\t *\n\t *\t\t\t\tif ( !match ) {\n\t *\t\t\t\t\treturn null;\n\t *\t\t\t\t}\n\t *\n\t *\t\t\t\tconst size = Number( match[ 1 ] );\n\t *\n\t *\t\t\t\tif ( size > 26 ) {\n\t *\t\t\t\t\t// Returned value can be an object with the matched properties.\n\t *\t\t\t\t\t// These properties will be \"consumed\" during the conversion.\n\t *\t\t\t\t\t// See `engine.view.Matcher~MatcherPattern` and `engine.view.Matcher#match` for more details.\n\t *\n\t *\t\t\t\t\treturn { name: true, styles: [ 'font-size' ] };\n\t *\t\t\t\t}\n\t *\n\t *\t\t\t\treturn null;\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * `definition.model` is a `String` with a model element name to convert from or to.\n\t * See {@link module:engine/conversion/conversion~ConverterDefinition} to learn about other parameters.\n\t *\n\t * @param {module:engine/conversion/conversion~ConverterDefinition} definition The converter definition.\n\t */\n\telementToElement( definition ) {\n\t\t// Set up downcast converter.\n\t\tthis.for( 'downcast' ).elementToElement( definition );\n\n\t\t// Set up upcast converter.\n\t\tfor ( const { model, view } of _getAllUpcastDefinitions( definition ) ) {\n\t\t\tthis.for( 'upcast' )\n\t\t\t\t.elementToElement( {\n\t\t\t\t\tmodel,\n\t\t\t\t\tview,\n\t\t\t\t\tconverterPriority: definition.converterPriority\n\t\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Sets up converters between the model and the view that convert a model attribute to a view element (and vice versa).\n\t * For example, a model text node with `\"Foo\"` as data and the `bold` attribute will be turned to `<strong>Foo</strong>` in the view.\n\t *\n\t *\t\t// A simple conversion from the `bold=true` attribute to the `<strong>` view element (and vice versa).\n\t *\t\teditor.conversion.attributeToElement( { model: 'bold', view: 'strong' } );\n\t *\n\t *\t\t// Override other converters by specifying a converter definition with a higher priority.\n\t *\t\teditor.conversion.attributeToElement( { model: 'bold', view: 'b', converterPriority: 'high' } );\n\t *\n\t *\t\t// View specified as an object instead of a string.\n\t *\t\teditor.conversion.attributeToElement( {\n\t *\t\t\tmodel: 'bold',\n\t *\t\t\tview: {\n\t *\t\t\t\tname: 'span',\n\t *\t\t\t\tclasses: 'bold'\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t *\t\t// Use `config.model.name` to define the conversion only from a given node type, `$text` in this case.\n\t *\t\t// The same attribute on different elements may then be handled by a different converter.\n\t *\t\teditor.conversion.attributeToElement( {\n\t *\t\t\tmodel: {\n\t *\t\t\t\tkey: 'textDecoration',\n\t *\t\t\t\tvalues: [ 'underline', 'lineThrough' ],\n\t *\t\t\t\tname: '$text'\n\t *\t\t\t},\n\t *\t\t\tview: {\n\t *\t\t\t\tunderline: {\n\t *\t\t\t\t\tname: 'span',\n\t *\t\t\t\t\tstyles: {\n\t *\t\t\t\t\t\t'text-decoration': 'underline'\n\t *\t\t\t\t\t}\n\t *\t\t\t\t},\n\t *\t\t\t\tlineThrough: {\n\t *\t\t\t\t\tname: 'span',\n\t *\t\t\t\t\tstyles: {\n\t *\t\t\t\t\t\t'text-decoration': 'line-through'\n\t *\t\t\t\t\t}\n\t *\t\t\t\t}\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t *\t\t// Use `upcastAlso` to define other view elements that should also be converted to the `bold` attribute.\n\t *\t\teditor.conversion.attributeToElement( {\n\t *\t\t\tmodel: 'bold',\n\t *\t\t\tview: 'strong',\n\t *\t\t\tupcastAlso: [\n\t *\t\t\t\t'b',\n\t *\t\t\t\t{\n\t *\t\t\t\t\tname: 'span',\n\t *\t\t\t\t\tclasses: 'bold'\n\t *\t\t\t\t},\n\t *\t\t\t\t{\n\t *\t\t\t\t\tname: 'span',\n\t *\t\t\t\t\tstyles: {\n\t *\t\t\t\t\t\t'font-weight': 'bold'\n\t *\t\t\t\t\t}\n\t *\t\t\t\t},\n\t *\t\t\t\tviewElement => {\n\t *\t\t\t\t\tconst fontWeight = viewElement.getStyle( 'font-weight' );\n\t *\n\t *\t\t\t\t\tif ( viewElement.is( 'element', 'span' ) && fontWeight && /\\d+/.test() && Number( fontWeight ) > 500 ) {\n\t *\t\t\t\t\t\t// Returned value can be an object with the matched properties.\n\t *\t\t\t\t\t\t// These properties will be \"consumed\" during the conversion.\n\t *\t\t\t\t\t\t// See `engine.view.Matcher~MatcherPattern` and `engine.view.Matcher#match` for more details.\n\t *\n\t *\t\t\t\t\t\treturn {\n\t *\t\t\t\t\t\t\tname: true,\n\t *\t\t\t\t\t\t\tstyles: [ 'font-weight' ]\n\t *\t\t\t\t\t\t};\n\t *\t\t\t\t\t}\n\t *\t\t\t\t}\n\t *\t\t\t]\n\t *\t\t} );\n\t *\n\t *\t\t// Conversion from and to a model attribute key whose value is an enum (`fontSize=big|small`).\n\t *\t\t// `upcastAlso` set as callback enables a conversion of a wide range of different view elements.\n\t *\t\teditor.conversion.attributeToElement( {\n\t *\t\t\tmodel: {\n\t *\t\t\t\tkey: 'fontSize',\n\t *\t\t\t\tvalues: [ 'big', 'small' ]\n\t *\t\t\t},\n\t *\t\t\tview: {\n\t *\t\t\t\tbig: {\n\t *\t\t\t\t\tname: 'span',\n\t *\t\t\t\t\tstyles: {\n\t *\t\t\t\t\t\t'font-size': '1.2em'\n\t *\t\t\t\t\t}\n\t *\t\t\t\t},\n\t *\t\t\t\tsmall: {\n\t *\t\t\t\t\tname: 'span',\n\t *\t\t\t\t\tstyles: {\n\t *\t\t\t\t\t\t'font-size': '0.8em'\n\t *\t\t\t\t\t}\n\t *\t\t\t\t}\n\t *\t\t\t},\n\t *\t\t\tupcastAlso: {\n\t *\t\t\t\tbig: viewElement => {\n\t *\t\t\t\t\tconst fontSize = viewElement.getStyle( 'font-size' );\n\t *\n\t *\t\t\t\t\tif ( !fontSize ) {\n\t *\t\t\t\t\t\treturn null;\n\t *\t\t\t\t\t}\n\t *\n\t *\t\t\t\t\tconst match = fontSize.match( /(\\d+)\\s*px/ );\n\t *\n\t *\t\t\t\t\tif ( !match ) {\n\t *\t\t\t\t\t\treturn null;\n\t *\t\t\t\t\t}\n\t *\n\t *\t\t\t\t\tconst size = Number( match[ 1 ] );\n\t *\n\t *\t\t\t\t\tif ( viewElement.is( 'element', 'span' ) && size > 10 ) {\n\t *\t\t\t\t\t\t// Returned value can be an object with the matched properties.\n\t *\t\t\t\t\t\t// These properties will be \"consumed\" during the conversion.\n\t *\t\t\t\t\t\t// See `engine.view.Matcher~MatcherPattern` and `engine.view.Matcher#match` for more details.\n\t *\n\t *\t\t\t\t\t\treturn { name: true, styles: [ 'font-size' ] };\n\t *\t\t\t\t\t}\n\t *\n\t *\t\t\t\t\treturn null;\n\t *\t\t\t\t},\n\t *\t\t\t\tsmall: viewElement => {\n\t *\t\t\t\t\tconst fontSize = viewElement.getStyle( 'font-size' );\n\t *\n\t *\t\t\t\t\tif ( !fontSize ) {\n\t *\t\t\t\t\t\treturn null;\n\t *\t\t\t\t\t}\n\t *\n\t *\t\t\t\t\tconst match = fontSize.match( /(\\d+)\\s*px/ );\n\t *\n\t *\t\t\t\t\tif ( !match ) {\n\t *\t\t\t\t\t\treturn null;\n\t *\t\t\t\t\t}\n\t *\n\t *\t\t\t\t\tconst size = Number( match[ 1 ] );\n\t *\n\t *\t\t\t\t\tif ( viewElement.is( 'element', 'span' ) && size < 10 ) {\n\t *\t\t\t\t\t\t// Returned value can be an object with the matched properties.\n\t *\t\t\t\t\t\t// These properties will be \"consumed\" during the conversion.\n\t *\t\t\t\t\t\t// See `engine.view.Matcher~MatcherPattern` and `engine.view.Matcher#match` for more details.\n\t *\n\t *\t\t\t\t\t\treturn { name: true, styles: [ 'font-size' ] };\n\t *\t\t\t\t\t}\n\t *\n\t *\t\t\t\t\treturn null;\n\t *\t\t\t\t}\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * The `definition.model` parameter specifies which model attribute should be converted from or to. It can be a `{ key, value }` object\n\t * describing the attribute key and value to convert or a `String` specifying just the attribute key (in such a case\n\t * `value` is set to `true`).\n\t * See {@link module:engine/conversion/conversion~ConverterDefinition} to learn about other parameters.\n\t *\n\t * @param {module:engine/conversion/conversion~ConverterDefinition} definition The converter definition.\n\t */\n\tattributeToElement( definition ) {\n\t\t// Set up downcast converter.\n\t\tthis.for( 'downcast' ).attributeToElement( definition );\n\n\t\t// Set up upcast converter.\n\t\tfor ( const { model, view } of _getAllUpcastDefinitions( definition ) ) {\n\t\t\tthis.for( 'upcast' )\n\t\t\t\t.elementToAttribute( {\n\t\t\t\t\tview,\n\t\t\t\t\tmodel,\n\t\t\t\t\tconverterPriority: definition.converterPriority\n\t\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Sets up converters between the model and the view that convert a model attribute to a view attribute (and vice versa). For example,\n\t * `<imageBlock src='foo.jpg'></imageBlock>` is converted to `<img src='foo.jpg'></img>` (the same attribute key and value).\n\t * This type of converters is intended to be used with {@link module:engine/model/element~Element model element} nodes.\n\t * To convert the text attributes,\n\t * the {@link module:engine/conversion/conversion~Conversion#attributeToElement `attributeToElement converter`}should be set up.\n\t *\n\t *\t\t// A simple conversion from the `source` model attribute to the `src` view attribute (and vice versa).\n\t *\t\teditor.conversion.attributeToAttribute( { model: 'source', view: 'src' } );\n\t *\n\t *\t\t// Attribute values are strictly specified.\n\t *\t\teditor.conversion.attributeToAttribute( {\n\t *\t\t\tmodel: {\n\t *\t\t\t\tname: 'imageInline',\n\t *\t\t\t\tkey: 'aside',\n\t *\t\t\t\tvalues: [ 'aside' ]\n\t *\t\t\t},\n\t *\t\t\tview: {\n\t *\t\t\t\taside: {\n\t *\t\t\t\t\tname: 'img',\n\t *\t\t\t\t\tkey: 'class',\n\t *\t\t\t\t\tvalue: [ 'aside', 'half-size' ]\n\t *\t\t\t\t}\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t *\t\t// Set the style attribute.\n\t *\t\teditor.conversion.attributeToAttribute( {\n\t *\t\t\tmodel: {\n\t *\t\t\t\tname: 'imageInline',\n\t *\t\t\t\tkey: 'aside',\n\t *\t\t\t\tvalues: [ 'aside' ]\n\t *\t\t\t},\n\t *\t\t\tview: {\n\t *\t\t\t\taside: {\n\t *\t\t\t\t\tname: 'img',\n\t *\t\t\t\t\tkey: 'style',\n\t *\t\t\t\t\tvalue: {\n\t *\t\t\t\t\t\tfloat: 'right',\n\t *\t\t\t\t\t\twidth: '50%',\n\t *\t\t\t\t\t\tmargin: '5px'\n\t *\t\t\t\t\t}\n\t *\t\t\t\t}\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t *\t\t// Conversion from and to a model attribute key whose value is an enum (`align=right|center`).\n\t *\t\t// Use `upcastAlso` to define other view elements that should also be converted to the `align=right` attribute.\n\t *\t\teditor.conversion.attributeToAttribute( {\n\t *\t\t\tmodel: {\n\t *\t\t\t\tkey: 'align',\n\t *\t\t\t\tvalues: [ 'right', 'center' ]\n\t *\t\t\t},\n\t *\t\t\tview: {\n\t *\t\t\t\tright: {\n\t *\t\t\t\t\tkey: 'class',\n\t *\t\t\t\t\tvalue: 'align-right'\n\t *\t\t\t\t},\n\t *\t\t\t\tcenter: {\n\t *\t\t\t\t\tkey: 'class',\n\t *\t\t\t\t\tvalue: 'align-center'\n\t *\t\t\t\t}\n\t *\t\t\t},\n\t *\t\t\tupcastAlso: {\n\t *\t\t\t\tright: {\n\t *\t\t\t\t\tstyles: {\n\t *\t\t\t\t\t\t'text-align': 'right'\n\t *\t\t\t\t\t}\n\t *\t\t\t\t},\n\t *\t\t\t\tcenter: {\n\t *\t\t\t\t\tstyles: {\n\t *\t\t\t\t\t\t'text-align': 'center'\n\t *\t\t\t\t\t}\n\t *\t\t\t\t}\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * The `definition.model` parameter specifies which model attribute should be converted from and to.\n\t * It can be a `{ key, [ values ], [ name ] }` object or a `String`, which will be treated like `{ key: definition.model }`.\n\t * The `key` property is the model attribute key to convert from and to.\n\t * The `values` are the possible model attribute values. If the `values` parameter is not set, the model attribute value\n\t * will be the same as the view attribute value.\n\t * If `name` is set, the conversion will be set up only for model elements with the given name.\n\t *\n\t * The `definition.view` parameter specifies which view attribute should be converted from and to.\n\t * It can be a `{ key, value, [ name ] }` object or a `String`, which will be treated like `{ key: definition.view }`.\n\t * The `key` property is the view attribute key to convert from and to.\n\t * The `value` is the view attribute value to convert from and to. If `definition.value` is not set, the view attribute value will be\n\t * the same as the model attribute value.\n\t * If `key` is `'class'`, `value` can be a `String` or an array of `String`s.\n\t * If `key` is `'style'`, `value` is an object with key-value pairs.\n\t * In other cases, `value` is a `String`.\n\t * If `name` is set, the conversion will be set up only for model elements with the given name.\n\t * If `definition.model.values` is set, `definition.view` is an object that assigns values from `definition.model.values`\n\t * to `{ key, value, [ name ] }` objects.\n\t *\n\t * `definition.upcastAlso` specifies which other matching view elements should also be upcast to the given model configuration.\n\t * If `definition.model.values` is set, `definition.upcastAlso` should be an object assigning values from `definition.model.values`\n\t * to {@link module:engine/view/matcher~MatcherPattern}s or arrays of {@link module:engine/view/matcher~MatcherPattern}s.\n\t *\n\t * **Note:** `definition.model` and `definition.view` form should be mirrored, so the same types of parameters should\n\t * be given in both parameters.\n\t *\n\t * @param {Object} definition The converter definition.\n\t * @param {String|Object} definition.model The model attribute to convert from and to.\n\t * @param {String|Object} definition.view The view attribute to convert from and to.\n\t * @param {module:engine/view/matcher~MatcherPattern|Array.<module:engine/view/matcher~MatcherPattern>} [definition.upcastAlso]\n\t * Any view element matching `definition.upcastAlso` will also be converted to the given model attribute. `definition.upcastAlso`\n\t * is used only if `config.model.values` is specified.\n\t */\n\tattributeToAttribute( definition ) {\n\t\t// Set up downcast converter.\n\t\tthis.for( 'downcast' ).attributeToAttribute( definition );\n\n\t\t// Set up upcast converter.\n\t\tfor ( const { model, view } of _getAllUpcastDefinitions( definition ) ) {\n\t\t\tthis.for( 'upcast' )\n\t\t\t\t.attributeToAttribute( {\n\t\t\t\t\tview,\n\t\t\t\t\tmodel\n\t\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Creates and caches conversion helpers for given dispatchers group.\n\t *\n\t * @private\n\t * @param {Object} options\n\t * @param {String} options.name Group name.\n\t * @param {Array.<module:engine/conversion/downcastdispatcher~DowncastDispatcher|\n\t * module:engine/conversion/upcastdispatcher~UpcastDispatcher>} options.dispatchers\n\t * @param {Boolean} options.isDowncast\n\t */\n\t_createConversionHelpers( { name, dispatchers, isDowncast } ) {\n\t\tif ( this._helpers.has( name ) ) {\n\t\t\t/**\n\t\t\t * Trying to register a group name that has already been registered.\n\t\t\t *\n\t\t\t * @error conversion-group-exists\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'conversion-group-exists', this );\n\t\t}\n\n\t\tconst helpers = isDowncast ? new DowncastHelpers( dispatchers ) : new UpcastHelpers( dispatchers );\n\n\t\tthis._helpers.set( name, helpers );\n\t}\n}\n\n/**\n * Defines how the model should be converted from and to the view.\n *\n * @typedef {Object} module:engine/conversion/conversion~ConverterDefinition\n *\n * @property {*} [model] The model conversion definition. Describes the model element or model attribute to convert. This parameter differs\n * for different functions that accept `ConverterDefinition`. See the description of the function to learn how to set it.\n * @property {module:engine/view/elementdefinition~ElementDefinition|Object} view The definition of the view element to convert from and\n * to. If `model` describes multiple values, `view` is an object that assigns these values (`view` object keys) to view element definitions\n * (`view` object values).\n * @property {module:engine/view/matcher~MatcherPattern|Array.<module:engine/view/matcher~MatcherPattern>} [upcastAlso]\n * Any view element matching `upcastAlso` will also be converted to the model. If `model` describes multiple values, `upcastAlso`\n * is an object that assigns these values (`upcastAlso` object keys) to {@link module:engine/view/matcher~MatcherPattern}s\n * (`upcastAlso` object values).\n * @property {module:utils/priorities~PriorityString} [converterPriority] The converter priority.\n */\n\n// Helper function that creates a joint array out of an item passed in `definition.view` and items passed in\n// `definition.upcastAlso`.\n//\n// @param {module:engine/conversion/conversion~ConverterDefinition} definition\n// @returns {Array} Array containing view definitions.\nfunction* _getAllUpcastDefinitions( definition ) {\n\tif ( definition.model.values ) {\n\t\tfor ( const value of definition.model.values ) {\n\t\t\tconst model = { key: definition.model.key, value };\n\t\t\tconst view = definition.view[ value ];\n\t\t\tconst upcastAlso = definition.upcastAlso ? definition.upcastAlso[ value ] : undefined;\n\n\t\t\tyield* _getUpcastDefinition( model, view, upcastAlso );\n\t\t}\n\t} else {\n\t\tyield* _getUpcastDefinition( definition.model, definition.view, definition.upcastAlso );\n\t}\n}\n\nfunction* _getUpcastDefinition( model, view, upcastAlso ) {\n\tyield { model, view };\n\n\tif ( upcastAlso ) {\n\t\tfor ( const upcastAlsoItem of toArray( upcastAlso ) ) {\n\t\t\tyield { model, view: upcastAlsoItem };\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/batch\n */\n\nimport { logWarning } from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n/**\n * A batch instance groups model changes ({@link module:engine/model/operation/operation~Operation operations}). All operations\n * grouped in a single batch can be reverted together, so you can also think about a batch as of a single undo step. If you want\n * to extend a given undo step, you can add more changes to the batch using {@link module:engine/model/model~Model#enqueueChange}:\n *\n *\t\tmodel.enqueueChange( batch, writer => {\n *\t\t\twriter.insertText( 'foo', paragraph, 'end' );\n *\t\t} );\n *\n * @see module:engine/model/model~Model#enqueueChange\n * @see module:engine/model/model~Model#change\n */\nexport default class Batch {\n\t/**\n\t * Creates a batch instance.\n\t *\n\t * @see module:engine/model/model~Model#enqueueChange\n\t * @see module:engine/model/model~Model#change\n\t * @param {Object} [type] A set of flags that specify the type of the batch. Batch type can alter how some of the features work\n\t * when encountering a given `Batch` instance (for example, when a feature listens to applied operations).\n\t * @param {Boolean} [type.isUndoable=true] Whether a batch can be undone through undo feature.\n\t * @param {Boolean} [type.isLocal=true] Whether a batch includes operations created locally (`true`) or operations created on\n\t * other, remote editors (`false`).\n\t * @param {Boolean} [type.isUndo=false] Whether a batch was created by the undo feature and undoes other operations.\n\t * @param {Boolean} [type.isTyping=false] Whether a batch includes operations connected with a typing action.\n\t */\n\tconstructor( type = {} ) {\n\t\tif ( typeof type === 'string' ) {\n\t\t\ttype = type === 'transparent' ? { isUndoable: false } : {};\n\n\t\t\t/**\n\t\t\t * The string value for a `type` property of the `Batch` constructor has been deprecated and will be removed in the near future.\n\t\t\t * Please refer to the {@link module:engine/model/batch~Batch#constructor `Batch` constructor API documentation} for more\n\t\t\t * information.\n\t\t\t *\n\t\t\t * @error batch-constructor-deprecated-string-type\n\t\t\t */\n\t\t\tlogWarning( 'batch-constructor-deprecated-string-type' );\n\t\t}\n\n\t\tconst { isUndoable = true, isLocal = true, isUndo = false, isTyping = false } = type;\n\n\t\t/**\n\t\t * An array of operations that compose this batch.\n\t\t *\n\t\t * @readonly\n\t\t * @type {Array.<module:engine/model/operation/operation~Operation>}\n\t\t */\n\t\tthis.operations = [];\n\n\t\t/**\n\t\t * Whether the batch can be undone through the undo feature.\n\t\t *\n\t\t * @readonly\n\t\t * @type {Boolean}\n\t\t */\n\t\tthis.isUndoable = isUndoable;\n\n\t\t/**\n\t\t * Whether the batch includes operations created locally (`true`) or operations created on other, remote editors (`false`).\n\t\t *\n\t\t * @readonly\n\t\t * @type {Boolean}\n\t\t */\n\t\tthis.isLocal = isLocal;\n\n\t\t/**\n\t\t * Whether the batch was created by the undo feature and undoes other operations.\n\t\t *\n\t\t * @readonly\n\t\t * @type {Boolean}\n\t\t */\n\t\tthis.isUndo = isUndo;\n\n\t\t/**\n\t\t * Whether the batch includes operations connected with typing.\n\t\t *\n\t\t * @readonly\n\t\t * @type {Boolean}\n\t\t */\n\t\tthis.isTyping = isTyping;\n\t}\n\n\t/**\n\t * The type of the batch.\n\t *\n\t * **This property has been deprecated and is always set to the `'default'` value.**\n\t *\n\t * It can be one of the following values:\n\t * * `'default'` &ndash; All \"normal\" batches. This is the most commonly used type.\n\t * * `'transparent'` &ndash; A batch that should be ignored by other features, i.e. an initial batch or collaborative editing\n\t * changes.\n\t *\n\t * @deprecated\n\t * @type {'default'}\n\t */\n\tget type() {\n\t\t/**\n\t\t * The {@link module:engine/model/batch~Batch#type `Batch#type` } property has been deprecated and will be removed in the near\n\t\t * future. Use `Batch#isLocal`, `Batch#isUndoable`, `Batch#isUndo` and `Batch#isTyping` instead.\n\t\t *\n\t\t * @error batch-type-deprecated\n\t\t */\n\t\tlogWarning( 'batch-type-deprecated' );\n\n\t\treturn 'default';\n\t}\n\n\t/**\n\t * Returns the base version of this batch, which is equal to the base version of the first operation in the batch.\n\t * If there are no operations in the batch or neither operation has the base version set, it returns `null`.\n\t *\n\t * @readonly\n\t * @type {Number|null}\n\t */\n\tget baseVersion() {\n\t\tfor ( const op of this.operations ) {\n\t\t\tif ( op.baseVersion !== null ) {\n\t\t\t\treturn op.baseVersion;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Adds an operation to the batch instance.\n\t *\n\t * @param {module:engine/model/operation/operation~Operation} operation An operation to add.\n\t * @returns {module:engine/model/operation/operation~Operation} The added operation.\n\t */\n\taddOperation( operation ) {\n\t\toperation.batch = this;\n\t\tthis.operations.push( operation );\n\n\t\treturn operation;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/operation/operation\n */\n\n/**\n * Abstract base operation class.\n *\n * @abstract\n */\nexport default class Operation {\n\t/**\n\t * Base operation constructor.\n\t *\n\t * @param {Number|null} baseVersion Document {@link module:engine/model/document~Document#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */\n\tconstructor( baseVersion ) {\n\t\t/**\n\t\t * {@link module:engine/model/document~Document#version} on which operation can be applied. If you try to\n\t\t * {@link module:engine/model/model~Model#applyOperation apply} operation with different base version than the\n\t\t * {@link module:engine/model/document~Document#version document version} the\n\t\t * {@link module:utils/ckeditorerror~CKEditorError model-document-applyOperation-wrong-version} error is thrown.\n\t\t *\n\t\t * @member {Number}\n\t\t */\n\t\tthis.baseVersion = baseVersion;\n\n\t\t/**\n\t\t * Defines whether operation is executed on attached or detached {@link module:engine/model/item~Item items}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Boolean} #isDocumentOperation\n\t\t */\n\t\tthis.isDocumentOperation = this.baseVersion !== null;\n\n\t\t/**\n\t\t * {@link module:engine/model/batch~Batch Batch} to which the operation is added or `null` if the operation is not\n\t\t * added to any batch yet.\n\t\t *\n\t\t * @member {module:engine/model/batch~Batch|null} #batch\n\t\t */\n\t\tthis.batch = null;\n\n\t\t/**\n\t\t * Operation type.\n\t\t *\n\t\t * @readonly\n\t\t * @member {String} #type\n\t\t */\n\n\t\t/**\n\t\t * Creates and returns an operation that has the same parameters as this operation.\n\t\t *\n\t\t * @method #clone\n\t\t * @returns {module:engine/model/operation/operation~Operation} Clone of this operation.\n\t\t */\n\n\t\t/**\n\t\t * Creates and returns a reverse operation. Reverse operation when executed right after\n\t\t * the original operation will bring back tree model state to the point before the original\n\t\t * operation execution. In other words, it reverses changes done by the original operation.\n\t\t *\n\t\t * Keep in mind that tree model state may change since executing the original operation,\n\t\t * so reverse operation will be \"outdated\". In that case you will need to transform it by\n\t\t * all operations that were executed after the original operation.\n\t\t *\n\t\t * @method #getReversed\n\t\t * @returns {module:engine/model/operation/operation~Operation} Reversed operation.\n\t\t */\n\n\t\t/**\n\t\t * Executes the operation - modifications described by the operation properties will be applied to the model tree.\n\t\t *\n\t\t * @protected\n\t\t * @method #_execute\n\t\t */\n\t}\n\n\t/**\n\t * Checks whether the operation's parameters are correct and the operation can be correctly executed. Throws\n\t * an error if operation is not valid.\n\t *\n\t * @protected\n\t * @method #_validate\n\t */\n\t_validate() {\n\t}\n\n\t/**\n\t * Custom toJSON method to solve child-parent circular dependencies.\n\t *\n\t * @method #toJSON\n\t * @returns {Object} Clone of this object with the operation property replaced with string.\n\t */\n\ttoJSON() {\n\t\t// This method creates only a shallow copy, all nested objects should be defined separately.\n\t\t// See https://github.com/ckeditor/ckeditor5-engine/issues/1477.\n\t\tconst json = Object.assign( {}, this );\n\n\t\tjson.__className = this.constructor.className;\n\n\t\t// Remove reference to the parent `Batch` to avoid circular dependencies.\n\t\tdelete json.batch;\n\n\t\t// Only document operations are shared with other clients so it is not necessary to keep this information.\n\t\tdelete json.isDocumentOperation;\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Name of the operation class used for serialization.\n\t *\n\t * @type {String}\n\t */\n\tstatic get className() {\n\t\treturn 'Operation';\n\t}\n\n\t/**\n\t * Creates Operation object from deserilized object, i.e. from parsed JSON string.\n\t *\n\t * @param {Object} json Deserialized JSON object.\n\t * @param {module:engine/model/document~Document} doc Document on which this operation will be applied.\n\t * @returns {module:engine/model/operation/operation~Operation}\n\t */\n\tstatic fromJSON( json ) {\n\t\treturn new this( json.baseVersion );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // log() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( this.toString() );\n\t// @if CK_DEBUG_ENGINE // }\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module module:engine/model/documentfragment\n */\n\nimport NodeList from './nodelist';\nimport Element from './element';\nimport Text from './text';\nimport TextProxy from './textproxy';\nimport isIterable from '@ckeditor/ckeditor5-utils/src/isiterable';\n\n// @if CK_DEBUG_ENGINE // const { stringifyMap } = require( '../dev-utils/utils' );\n\n/**\n * DocumentFragment represents a part of model which does not have a common root but its top-level nodes\n * can be seen as siblings. In other words, it is a detached part of model tree, without a root.\n *\n * DocumentFragment has own {@link module:engine/model/markercollection~MarkerCollection}. Markers from this collection\n * will be set to the {@link module:engine/model/model~Model#markers model markers} by a\n * {@link module:engine/model/writer~Writer#insert} function.\n */\nexport default class DocumentFragment {\n\t/**\n\t * Creates an empty `DocumentFragment`.\n\t *\n\t * **Note:** Constructor of this class shouldn't be used directly in the code.\n\t * Use the {@link module:engine/model/writer~Writer#createDocumentFragment} method instead.\n\t *\n\t * @protected\n\t * @param {module:engine/model/node~Node|Iterable.<module:engine/model/node~Node>} [children]\n\t * Nodes to be contained inside the `DocumentFragment`.\n\t */\n\tconstructor( children ) {\n\t\t/**\n\t\t * DocumentFragment static markers map. This is a list of names and {@link module:engine/model/range~Range ranges}\n\t\t * which will be set as Markers to {@link module:engine/model/model~Model#markers model markers collection}\n\t\t * when DocumentFragment will be inserted to the document.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Map<String,module:engine/model/range~Range>} module:engine/model/documentfragment~DocumentFragment#markers\n\t\t */\n\t\tthis.markers = new Map();\n\n\t\t/**\n\t\t * List of nodes contained inside the document fragment.\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/model/nodelist~NodeList} module:engine/model/documentfragment~DocumentFragment#_children\n\t\t */\n\t\tthis._children = new NodeList();\n\n\t\tif ( children ) {\n\t\t\tthis._insertChild( 0, children );\n\t\t}\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all nodes contained inside this document fragment.\n\t *\n\t * @returns {Iterable.<module:engine/model/node~Node>}\n\t */\n\t[ Symbol.iterator ]() {\n\t\treturn this.getChildren();\n\t}\n\n\t/**\n\t * Number of this document fragment's children.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget childCount() {\n\t\treturn this._children.length;\n\t}\n\n\t/**\n\t * Sum of {@link module:engine/model/node~Node#offsetSize offset sizes} of all of this document fragment's children.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget maxOffset() {\n\t\treturn this._children.maxOffset;\n\t}\n\n\t/**\n\t * Is `true` if there are no nodes inside this document fragment, `false` otherwise.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isEmpty() {\n\t\treturn this.childCount === 0;\n\t}\n\n\t/**\n\t * Artificial root of `DocumentFragment`. Returns itself. Added for compatibility reasons.\n\t *\n\t * @readonly\n\t * @type {module:engine/model/documentfragment~DocumentFragment}\n\t */\n\tget root() {\n\t\treturn this;\n\t}\n\n\t/**\n\t * Artificial parent of `DocumentFragment`. Returns `null`. Added for compatibility reasons.\n\t *\n\t * @readonly\n\t * @type {null}\n\t */\n\tget parent() {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Checks whether this object is of the given type.\n\t *\n\t *\t\tdocFrag.is( 'documentFragment' ); // -> true\n\t *\t\tdocFrag.is( 'model:documentFragment' ); // -> true\n\t *\n\t *\t\tdocFrag.is( 'view:documentFragment' ); // -> false\n\t *\t\tdocFrag.is( 'element' ); // -> false\n\t *\t\tdocFrag.is( 'node' ); // -> false\n\t *\n\t * {@link module:engine/model/node~Node#is Check the entire list of model objects} which implement the `is()` method.\n\t *\n\t * @param {String} type\n\t * @returns {Boolean}\n\t */\n\tis( type ) {\n\t\treturn type === 'documentFragment' || type === 'model:documentFragment';\n\t}\n\n\t/**\n\t * Gets the child at the given index. Returns `null` if incorrect index was passed.\n\t *\n\t * @param {Number} index Index of child.\n\t * @returns {module:engine/model/node~Node|null} Child node.\n\t */\n\tgetChild( index ) {\n\t\treturn this._children.getNode( index );\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all of this document fragment's children.\n\t *\n\t * @returns {Iterable.<module:engine/model/node~Node>}\n\t */\n\tgetChildren() {\n\t\treturn this._children[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Returns an index of the given child node. Returns `null` if given node is not a child of this document fragment.\n\t *\n\t * @param {module:engine/model/node~Node} node Child node to look for.\n\t * @returns {Number|null} Child node's index.\n\t */\n\tgetChildIndex( node ) {\n\t\treturn this._children.getNodeIndex( node );\n\t}\n\n\t/**\n\t * Returns the starting offset of given child. Starting offset is equal to the sum of\n\t * {@link module:engine/model/node~Node#offsetSize offset sizes} of all node's siblings that are before it. Returns `null` if\n\t * given node is not a child of this document fragment.\n\t *\n\t * @param {module:engine/model/node~Node} node Child node to look for.\n\t * @returns {Number|null} Child node's starting offset.\n\t */\n\tgetChildStartOffset( node ) {\n\t\treturn this._children.getNodeStartOffset( node );\n\t}\n\n\t/**\n\t * Returns path to a `DocumentFragment`, which is an empty array. Added for compatibility reasons.\n\t *\n\t * @returns {Array}\n\t */\n\tgetPath() {\n\t\treturn [];\n\t}\n\n\t/**\n\t * Returns a descendant node by its path relative to this element.\n\t *\n\t *\t\t// <this>a<b>c</b></this>\n\t *\t\tthis.getNodeByPath( [ 0 ] ); // -> \"a\"\n\t *\t\tthis.getNodeByPath( [ 1 ] ); // -> <b>\n\t *\t\tthis.getNodeByPath( [ 1, 0 ] ); // -> \"c\"\n\t *\n\t * @param {Array.<Number>} relativePath Path of the node to find, relative to this element.\n\t * @returns {module:engine/model/node~Node|module:engine/model/documentfragment~DocumentFragment}\n\t */\n\tgetNodeByPath( relativePath ) {\n\t\tlet node = this; // eslint-disable-line consistent-this\n\n\t\tfor ( const index of relativePath ) {\n\t\t\tnode = node.getChild( node.offsetToIndex( index ) );\n\t\t}\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Converts offset \"position\" to index \"position\".\n\t *\n\t * Returns index of a node that occupies given offset. If given offset is too low, returns `0`. If given offset is\n\t * too high, returns index after last child}.\n\t *\n\t *\t\tconst textNode = new Text( 'foo' );\n\t *\t\tconst pElement = new Element( 'p' );\n\t *\t\tconst docFrag = new DocumentFragment( [ textNode, pElement ] );\n\t *\t\tdocFrag.offsetToIndex( -1 ); // Returns 0, because offset is too low.\n\t *\t\tdocFrag.offsetToIndex( 0 ); // Returns 0, because offset 0 is taken by `textNode` which is at index 0.\n\t *\t\tdocFrag.offsetToIndex( 1 ); // Returns 0, because `textNode` has `offsetSize` equal to 3, so it occupies offset 1 too.\n\t *\t\tdocFrag.offsetToIndex( 2 ); // Returns 0.\n\t *\t\tdocFrag.offsetToIndex( 3 ); // Returns 1.\n\t *\t\tdocFrag.offsetToIndex( 4 ); // Returns 2. There are no nodes at offset 4, so last available index is returned.\n\t *\n\t * @param {Number} offset Offset to look for.\n\t * @returns {Number} Index of a node that occupies given offset.\n\t */\n\toffsetToIndex( offset ) {\n\t\treturn this._children.offsetToIndex( offset );\n\t}\n\n\t/**\n\t * Converts `DocumentFragment` instance to plain object and returns it.\n\t * Takes care of converting all of this document fragment's children.\n\t *\n\t * @returns {Object} `DocumentFragment` instance converted to plain object.\n\t */\n\ttoJSON() {\n\t\tconst json = [];\n\n\t\tfor ( const node of this._children ) {\n\t\t\tjson.push( node.toJSON() );\n\t\t}\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Creates a `DocumentFragment` instance from given plain object (i.e. parsed JSON string).\n\t * Converts `DocumentFragment` children to proper nodes.\n\t *\n\t * @param {Object} json Plain object to be converted to `DocumentFragment`.\n\t * @returns {module:engine/model/documentfragment~DocumentFragment} `DocumentFragment` instance created using given plain object.\n\t */\n\tstatic fromJSON( json ) {\n\t\tconst children = [];\n\n\t\tfor ( const child of json ) {\n\t\t\tif ( child.name ) {\n\t\t\t\t// If child has name property, it is an Element.\n\t\t\t\tchildren.push( Element.fromJSON( child ) );\n\t\t\t} else {\n\t\t\t\t// Otherwise, it is a Text node.\n\t\t\t\tchildren.push( Text.fromJSON( child ) );\n\t\t\t}\n\t\t}\n\n\t\treturn new DocumentFragment( children );\n\t}\n\n\t/**\n\t * {@link #_insertChild Inserts} one or more nodes at the end of this document fragment.\n\t *\n\t * @protected\n\t * @param {module:engine/model/item~Item|Iterable.<module:engine/model/item~Item>} items Items to be inserted.\n\t */\n\t_appendChild( items ) {\n\t\tthis._insertChild( this.childCount, items );\n\t}\n\n\t/**\n\t * Inserts one or more nodes at the given index and sets {@link module:engine/model/node~Node#parent parent} of these nodes\n\t * to this document fragment.\n\t *\n\t * @protected\n\t * @param {Number} index Index at which nodes should be inserted.\n\t * @param {module:engine/model/item~Item|Iterable.<module:engine/model/item~Item>} items Items to be inserted.\n\t */\n\t_insertChild( index, items ) {\n\t\tconst nodes = normalize( items );\n\n\t\tfor ( const node of nodes ) {\n\t\t\t// If node that is being added to this element is already inside another element, first remove it from the old parent.\n\t\t\tif ( node.parent !== null ) {\n\t\t\t\tnode._remove();\n\t\t\t}\n\n\t\t\tnode.parent = this;\n\t\t}\n\n\t\tthis._children._insertNodes( index, nodes );\n\t}\n\n\t/**\n\t * Removes one or more nodes starting at the given index\n\t * and sets {@link module:engine/model/node~Node#parent parent} of these nodes to `null`.\n\t *\n\t * @protected\n\t * @param {Number} index Index of the first node to remove.\n\t * @param {Number} [howMany=1] Number of nodes to remove.\n\t * @returns {Array.<module:engine/model/node~Node>} Array containing removed nodes.\n\t */\n\t_removeChildren( index, howMany = 1 ) {\n\t\tconst nodes = this._children._removeNodes( index, howMany );\n\n\t\tfor ( const node of nodes ) {\n\t\t\tnode.parent = null;\n\t\t}\n\n\t\treturn nodes;\n\t}\n\n\t// @if CK_DEBUG_ENGINE // toString() {\n\t// @if CK_DEBUG_ENGINE // \treturn 'documentFragment';\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // log() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ModelDocumentFragment: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // printTree() {\n\t// @if CK_DEBUG_ENGINE //\tlet string = 'ModelDocumentFragment: [';\n\n\t// @if CK_DEBUG_ENGINE //\tfor ( const child of this.getChildren() ) {\n\t// @if CK_DEBUG_ENGINE //\t\tstring += '\\n';\n\n\t// @if CK_DEBUG_ENGINE //\t\tif ( child.is( '$text' ) ) {\n\t// @if CK_DEBUG_ENGINE //\t\t\tconst textAttrs = stringifyMap( child._attrs );\n\n\t// @if CK_DEBUG_ENGINE //\t\t\tstring += '\\t'.repeat( 1 );\n\n\t// @if CK_DEBUG_ENGINE //\t\t\tif ( textAttrs !== '' ) {\n\t// @if CK_DEBUG_ENGINE //\t\t\t\tstring += `<$text${ textAttrs }>` + child.data + '</$text>';\n\t// @if CK_DEBUG_ENGINE //\t\t\t} else {\n\t// @if CK_DEBUG_ENGINE //\t\t\t\tstring += child.data;\n\t// @if CK_DEBUG_ENGINE //\t\t\t}\n\t// @if CK_DEBUG_ENGINE //\t\t} else {\n\t// @if CK_DEBUG_ENGINE //\t\t\tstring += child.printTree( 1 );\n\t// @if CK_DEBUG_ENGINE //\t\t}\n\t// @if CK_DEBUG_ENGINE //\t}\n\n\t// @if CK_DEBUG_ENGINE //\tstring += '\\n]';\n\n\t// @if CK_DEBUG_ENGINE //\treturn string;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // logTree() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( this.printTree() );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n// Converts strings to Text and non-iterables to arrays.\n//\n// @param {String|module:engine/model/item~Item|Iterable.<module:engine/model/item~Item>}\n// @returns {Iterable.<module:engine/model/node~Node>}\nfunction normalize( nodes ) {\n\t// Separate condition because string is iterable.\n\tif ( typeof nodes == 'string' ) {\n\t\treturn [ new Text( nodes ) ];\n\t}\n\n\tif ( !isIterable( nodes ) ) {\n\t\tnodes = [ nodes ];\n\t}\n\n\t// Array.from to enable .map() on non-arrays.\n\treturn Array.from( nodes )\n\t\t.map( node => {\n\t\t\tif ( typeof node == 'string' ) {\n\t\t\t\treturn new Text( node );\n\t\t\t}\n\n\t\t\tif ( node instanceof TextProxy ) {\n\t\t\t\treturn new Text( node.data, node.getAttributes() );\n\t\t\t}\n\n\t\t\treturn node;\n\t\t} );\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/operation/utils\n */\n\nimport Node from '../node';\nimport Text from '../text';\nimport TextProxy from '../textproxy';\nimport Range from '../range';\nimport DocumentFragment from '../documentfragment';\nimport NodeList from '../nodelist';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n/**\n * Contains functions used for composing model tree by {@link module:engine/model/operation/operation~Operation operations}.\n * Those functions are built on top of {@link module:engine/model/node~Node node}, and it's child classes', APIs.\n *\n * @protected\n * @namespace utils\n */\n\n/**\n * Inserts given nodes at given position.\n *\n * @protected\n * @function module:engine/model/operation/utils~utils.insert\n * @param {module:engine/model/position~Position} position Position at which nodes should be inserted.\n * @param {module:engine/model/node~NodeSet} nodes Nodes to insert.\n * @returns {module:engine/model/range~Range} Range spanning over inserted elements.\n */\nexport function _insert( position, nodes ) {\n\tnodes = _normalizeNodes( nodes );\n\n\t// We have to count offset before inserting nodes because they can get merged and we would get wrong offsets.\n\tconst offset = nodes.reduce( ( sum, node ) => sum + node.offsetSize, 0 );\n\tconst parent = position.parent;\n\n\t// Insertion might be in a text node, we should split it if that's the case.\n\t_splitNodeAtPosition( position );\n\tconst index = position.index;\n\n\t// Insert nodes at given index. After splitting we have a proper index and insertion is between nodes,\n\t// using basic `Element` API.\n\tparent._insertChild( index, nodes );\n\n\t// Merge text nodes, if possible. Merging is needed only at points where inserted nodes \"touch\" \"old\" nodes.\n\t_mergeNodesAtIndex( parent, index + nodes.length );\n\t_mergeNodesAtIndex( parent, index );\n\n\treturn new Range( position, position.getShiftedBy( offset ) );\n}\n\n/**\n * Removed nodes in given range. Only {@link module:engine/model/range~Range#isFlat flat} ranges are accepted.\n *\n * @protected\n * @function module:engine/model/operation/utils~utils._remove\n * @param {module:engine/model/range~Range} range Range containing nodes to remove.\n * @returns {Array.<module:engine/model/node~Node>}\n */\nexport function _remove( range ) {\n\tif ( !range.isFlat ) {\n\t\t/**\n\t\t * Trying to remove a range which starts and ends in different element.\n\t\t *\n\t\t * @error operation-utils-remove-range-not-flat\n\t\t */\n\t\tthrow new CKEditorError(\n\t\t\t'operation-utils-remove-range-not-flat',\n\t\t\tthis\n\t\t);\n\t}\n\n\tconst parent = range.start.parent;\n\n\t// Range may be inside text nodes, we have to split them if that's the case.\n\t_splitNodeAtPosition( range.start );\n\t_splitNodeAtPosition( range.end );\n\n\t// Remove the text nodes using basic `Element` API.\n\tconst removed = parent._removeChildren( range.start.index, range.end.index - range.start.index );\n\n\t// Merge text nodes, if possible. After some nodes were removed, node before and after removed range will be\n\t// touching at the position equal to the removed range beginning. We check merging possibility there.\n\t_mergeNodesAtIndex( parent, range.start.index );\n\n\treturn removed;\n}\n\n/**\n * Moves nodes in given range to given target position. Only {@link module:engine/model/range~Range#isFlat flat} ranges are accepted.\n *\n * @protected\n * @function module:engine/model/operation/utils~utils.move\n * @param {module:engine/model/range~Range} sourceRange Range containing nodes to move.\n * @param {module:engine/model/position~Position} targetPosition Position to which nodes should be moved.\n * @returns {module:engine/model/range~Range} Range containing moved nodes.\n */\nexport function _move( sourceRange, targetPosition ) {\n\tif ( !sourceRange.isFlat ) {\n\t\t/**\n\t\t * Trying to move a range which starts and ends in different element.\n\t\t *\n\t\t * @error operation-utils-move-range-not-flat\n\t\t */\n\t\tthrow new CKEditorError(\n\t\t\t'operation-utils-move-range-not-flat',\n\t\t\tthis\n\t\t);\n\t}\n\n\tconst nodes = _remove( sourceRange );\n\n\t// We have to fix `targetPosition` because model changed after nodes from `sourceRange` got removed and\n\t// that change might have an impact on `targetPosition`.\n\ttargetPosition = targetPosition._getTransformedByDeletion( sourceRange.start, sourceRange.end.offset - sourceRange.start.offset );\n\n\treturn _insert( targetPosition, nodes );\n}\n\n/**\n * Sets given attribute on nodes in given range. The attributes are only set on top-level nodes of the range, not on its children.\n *\n * @protected\n * @function module:engine/model/operation/utils~utils._setAttribute\n * @param {module:engine/model/range~Range} range Range containing nodes that should have the attribute set. Must be a flat range.\n * @param {String} key Key of attribute to set.\n * @param {*} value Attribute value.\n */\nexport function _setAttribute( range, key, value ) {\n\t// Range might start or end in text nodes, so we have to split them.\n\t_splitNodeAtPosition( range.start );\n\t_splitNodeAtPosition( range.end );\n\n\t// Iterate over all items in the range.\n\tfor ( const item of range.getItems( { shallow: true } ) ) {\n\t\t// Iterator will return `TextProxy` instances but we know that those text proxies will\n\t\t// always represent full text nodes (this is guaranteed thanks to splitting we did before).\n\t\t// So, we can operate on those text proxies' text nodes.\n\t\tconst node = item.is( '$textProxy' ) ? item.textNode : item;\n\n\t\tif ( value !== null ) {\n\t\t\tnode._setAttribute( key, value );\n\t\t} else {\n\t\t\tnode._removeAttribute( key );\n\t\t}\n\n\t\t// After attributes changing it may happen that some text nodes can be merged. Try to merge with previous node.\n\t\t_mergeNodesAtIndex( node.parent, node.index );\n\t}\n\n\t// Try to merge last changed node with it's previous sibling (not covered by the loop above).\n\t_mergeNodesAtIndex( range.end.parent, range.end.index );\n}\n\n/**\n * Normalizes given object or an array of objects to an array of {@link module:engine/model/node~Node nodes}. See\n * {@link module:engine/model/node~NodeSet NodeSet} for details on how normalization is performed.\n *\n * @protected\n * @function module:engine/model/operation/utils~utils.normalizeNodes\n * @param {module:engine/model/node~NodeSet} nodes Objects to normalize.\n * @returns {Array.<module:engine/model/node~Node>} Normalized nodes.\n */\nexport function _normalizeNodes( nodes ) {\n\tconst normalized = [];\n\n\tif ( !( nodes instanceof Array ) ) {\n\t\tnodes = [ nodes ];\n\t}\n\n\t// Convert instances of classes other than Node.\n\tfor ( let i = 0; i < nodes.length; i++ ) {\n\t\tif ( typeof nodes[ i ] == 'string' ) {\n\t\t\tnormalized.push( new Text( nodes[ i ] ) );\n\t\t} else if ( nodes[ i ] instanceof TextProxy ) {\n\t\t\tnormalized.push( new Text( nodes[ i ].data, nodes[ i ].getAttributes() ) );\n\t\t} else if ( nodes[ i ] instanceof DocumentFragment || nodes[ i ] instanceof NodeList ) {\n\t\t\tfor ( const child of nodes[ i ] ) {\n\t\t\t\tnormalized.push( child );\n\t\t\t}\n\t\t} else if ( nodes[ i ] instanceof Node ) {\n\t\t\tnormalized.push( nodes[ i ] );\n\t\t}\n\t\t// Skip unrecognized type.\n\t}\n\n\t// Merge text nodes.\n\tfor ( let i = 1; i < normalized.length; i++ ) {\n\t\tconst node = normalized[ i ];\n\t\tconst prev = normalized[ i - 1 ];\n\n\t\tif ( node instanceof Text && prev instanceof Text && _haveSameAttributes( node, prev ) ) {\n\t\t\t// Doing this instead changing `prev.data` because `data` is readonly.\n\t\t\tnormalized.splice( i - 1, 2, new Text( prev.data + node.data, prev.getAttributes() ) );\n\t\t\ti--;\n\t\t}\n\t}\n\n\treturn normalized;\n}\n\n// Checks if nodes before and after given index in given element are {@link module:engine/model/text~Text text nodes} and\n// merges them into one node if they have same attributes.\n//\n// Merging is done by removing two text nodes and inserting a new text node containing data from both merged text nodes.\n//\n// @private\n// @param {module:engine/model/element~Element} element Parent element of nodes to merge.\n// @param {Number} index Index between nodes to merge.\nfunction _mergeNodesAtIndex( element, index ) {\n\tconst nodeBefore = element.getChild( index - 1 );\n\tconst nodeAfter = element.getChild( index );\n\n\t// Check if both of those nodes are text objects with same attributes.\n\tif ( nodeBefore && nodeAfter && nodeBefore.is( '$text' ) && nodeAfter.is( '$text' ) && _haveSameAttributes( nodeBefore, nodeAfter ) ) {\n\t\t// Append text of text node after index to the before one.\n\t\tconst mergedNode = new Text( nodeBefore.data + nodeAfter.data, nodeBefore.getAttributes() );\n\n\t\t// Remove separate text nodes.\n\t\telement._removeChildren( index - 1, 2 );\n\n\t\t// Insert merged text node.\n\t\telement._insertChild( index - 1, mergedNode );\n\t}\n}\n\n// Checks if given position is in a text node, and if so, splits the text node in two text nodes, each of them\n// containing a part of original text node.\n//\n// @private\n// @param {module:engine/model/position~Position} position Position at which node should be split.\nfunction _splitNodeAtPosition( position ) {\n\tconst textNode = position.textNode;\n\tconst element = position.parent;\n\n\tif ( textNode ) {\n\t\tconst offsetDiff = position.offset - textNode.startOffset;\n\t\tconst index = textNode.index;\n\n\t\telement._removeChildren( index, 1 );\n\n\t\tconst firstPart = new Text( textNode.data.substr( 0, offsetDiff ), textNode.getAttributes() );\n\t\tconst secondPart = new Text( textNode.data.substr( offsetDiff ), textNode.getAttributes() );\n\n\t\telement._insertChild( index, [ firstPart, secondPart ] );\n\t}\n}\n\n// Checks whether two given nodes have same attributes.\n//\n// @private\n// @param {module:engine/model/node~Node} nodeA Node to check.\n// @param {module:engine/model/node~Node} nodeB Node to check.\n// @returns {Boolean} `true` if nodes have same attributes, `false` otherwise.\nfunction _haveSameAttributes( nodeA, nodeB ) {\n\tconst iteratorA = nodeA.getAttributes();\n\tconst iteratorB = nodeB.getAttributes();\n\n\tfor ( const attr of iteratorA ) {\n\t\tif ( attr[ 1 ] !== nodeB.getAttribute( attr[ 0 ] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\titeratorB.next();\n\t}\n\n\treturn iteratorB.next().done;\n}\n\n/**\n * Value that can be normalized to an array of {@link module:engine/model/node~Node nodes}.\n *\n * Non-arrays are normalized as follows:\n * * {@link module:engine/model/node~Node Node} is left as is,\n * * {@link module:engine/model/textproxy~TextProxy TextProxy} and `String` are normalized to {@link module:engine/model/text~Text Text},\n * * {@link module:engine/model/nodelist~NodeList NodeList} is normalized to an array containing all nodes that are in that node list,\n * * {@link module:engine/model/documentfragment~DocumentFragment DocumentFragment} is normalized to an array containing all of it's\n * * children.\n *\n * Arrays are processed item by item like non-array values and flattened to one array. Normalization always results in\n * a flat array of {@link module:engine/model/node~Node nodes}. Consecutive text nodes (or items normalized to text nodes) will be\n * merged if they have same attributes.\n *\n * @typedef {module:engine/model/node~Node|module:engine/model/textproxy~TextProxy|String|\n * module:engine/model/nodelist~NodeList|module:engine/model/documentfragment~DocumentFragment|Iterable}\n * module:engine/model/node~NodeSet\n */\n","import baseIsEqual from './_baseIsEqual.js';\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nexport default isEqual;\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/operation/attributeoperation\n */\n\nimport Operation from './operation';\nimport Range from '../range';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport { _setAttribute } from './utils';\nimport { isEqual } from 'lodash-es';\n\n/**\n * Operation to change nodes' attribute.\n *\n * Using this class you can add, remove or change value of the attribute.\n *\n * @extends module:engine/model/operation/operation~Operation\n */\nexport default class AttributeOperation extends Operation {\n\t/**\n\t * Creates an operation that changes, removes or adds attributes.\n\t *\n\t * If only `newValue` is set, attribute will be added on a node. Note that all nodes in operation's range must not\n\t * have an attribute with the same key as the added attribute.\n\t *\n\t * If only `oldValue` is set, then attribute with given key will be removed. Note that all nodes in operation's range\n\t * must have an attribute with that key added.\n\t *\n\t * If both `newValue` and `oldValue` are set, then the operation will change the attribute value. Note that all nodes in\n\t * operation's ranges must already have an attribute with given key and `oldValue` as value\n\t *\n\t * @param {module:engine/model/range~Range} range Range on which the operation should be applied. Must be a flat range.\n\t * @param {String} key Key of an attribute to change or remove.\n\t * @param {*} oldValue Old value of the attribute with given key or `null`, if attribute was not set before.\n\t * @param {*} newValue New value of the attribute with given key or `null`, if operation should remove attribute.\n\t * @param {Number|null} baseVersion Document {@link module:engine/model/document~Document#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */\n\tconstructor( range, key, oldValue, newValue, baseVersion ) {\n\t\tsuper( baseVersion );\n\n\t\t/**\n\t\t * Range on which operation should be applied.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/range~Range}\n\t\t */\n\t\tthis.range = range.clone();\n\n\t\t/**\n\t\t * Key of an attribute to change or remove.\n\t\t *\n\t\t * @readonly\n\t\t * @member {String}\n\t\t */\n\t\tthis.key = key;\n\n\t\t/**\n\t\t * Old value of the attribute with given key or `null`, if attribute was not set before.\n\t\t *\n\t\t * @readonly\n\t\t * @member {*}\n\t\t */\n\t\tthis.oldValue = oldValue === undefined ? null : oldValue;\n\n\t\t/**\n\t\t * New value of the attribute with given key or `null`, if operation should remove attribute.\n\t\t *\n\t\t * @readonly\n\t\t * @member {*}\n\t\t */\n\t\tthis.newValue = newValue === undefined ? null : newValue;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tget type() {\n\t\tif ( this.oldValue === null ) {\n\t\t\treturn 'addAttribute';\n\t\t} else if ( this.newValue === null ) {\n\t\t\treturn 'removeAttribute';\n\t\t} else {\n\t\t\treturn 'changeAttribute';\n\t\t}\n\t}\n\n\t/**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t *\n\t * @returns {module:engine/model/operation/attributeoperation~AttributeOperation} Clone of this operation.\n\t */\n\tclone() {\n\t\treturn new AttributeOperation( this.range, this.key, this.oldValue, this.newValue, this.baseVersion );\n\t}\n\n\t/**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t *\n\t * @returns {module:engine/model/operation/attributeoperation~AttributeOperation}\n\t */\n\tgetReversed() {\n\t\treturn new AttributeOperation( this.range, this.key, this.newValue, this.oldValue, this.baseVersion + 1 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\n\t\tjson.range = this.range.toJSON();\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_validate() {\n\t\tif ( !this.range.isFlat ) {\n\t\t\t/**\n\t\t\t * The range to change is not flat.\n\t\t\t *\n\t\t\t * @error attribute-operation-range-not-flat\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'attribute-operation-range-not-flat', this );\n\t\t}\n\n\t\tfor ( const item of this.range.getItems( { shallow: true } ) ) {\n\t\t\tif ( this.oldValue !== null && !isEqual( item.getAttribute( this.key ), this.oldValue ) ) {\n\t\t\t\t/**\n\t\t\t\t * Changed node has different attribute value than operation's old attribute value.\n\t\t\t\t *\n\t\t\t\t * @error attribute-operation-wrong-old-value\n\t\t\t\t * @param {module:engine/model/item~Item} item\n\t\t\t\t * @param {String} key\n\t\t\t\t * @param {*} value\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'attribute-operation-wrong-old-value',\n\t\t\t\t\tthis,\n\t\t\t\t\t{ item, key: this.key, value: this.oldValue }\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( this.oldValue === null && this.newValue !== null && item.hasAttribute( this.key ) ) {\n\t\t\t\t/**\n\t\t\t\t * The attribute with given key already exists for the given node.\n\t\t\t\t *\n\t\t\t\t * @error attribute-operation-attribute-exists\n\t\t\t\t * @param {module:engine/model/node~Node} node\n\t\t\t\t * @param {String} key\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'attribute-operation-attribute-exists',\n\t\t\t\t\tthis,\n\t\t\t\t\t{ node: item, key: this.key }\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_execute() {\n\t\t// If value to set is same as old value, don't do anything.\n\t\tif ( !isEqual( this.oldValue, this.newValue ) ) {\n\t\t\t// Execution.\n\t\t\t_setAttribute( this.range, this.key, this.newValue );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get className() {\n\t\treturn 'AttributeOperation';\n\t}\n\n\t/**\n\t * Creates `AttributeOperation` object from deserilized object, i.e. from parsed JSON string.\n\t *\n\t * @param {Object} json Deserialized JSON object.\n\t * @param {module:engine/model/document~Document} document Document on which this operation will be applied.\n\t * @returns {module:engine/model/operation/attributeoperation~AttributeOperation}\n\t */\n\tstatic fromJSON( json, document ) {\n\t\treturn new AttributeOperation( Range.fromJSON( json.range, document ), json.key, json.oldValue, json.newValue, json.baseVersion );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // toString() {\n\t// @if CK_DEBUG_ENGINE // \treturn `AttributeOperation( ${ this.baseVersion } ): ` +\n\t// @if CK_DEBUG_ENGINE //\t\t`\"${ this.key }\": ${ JSON.stringify( this.oldValue ) }` +\n\t// @if CK_DEBUG_ENGINE //\t\t` -> ${ JSON.stringify( this.newValue ) }, ${ this.range }`;\n\t// @if CK_DEBUG_ENGINE // }\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/operation/detachoperation\n */\n\nimport Operation from './operation';\nimport Range from '../range';\nimport { _remove } from './utils';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n// @if CK_DEBUG_ENGINE // const ModelRange = require( '../range' ).default;\n\n/**\n * Operation to permanently remove node from detached root.\n * Note this operation is only a local operation and won't be send to the other clients.\n *\n * @extends module:engine/model/operation/operation~Operation\n */\nexport default class DetachOperation extends Operation {\n\t/**\n\t * Creates an insert operation.\n\t *\n\t * @param {module:engine/model/position~Position} sourcePosition\n\t * Position before the first {@link module:engine/model/item~Item model item} to move.\n\t * @param {Number} howMany Offset size of moved range. Moved range will start from `sourcePosition` and end at\n\t * `sourcePosition` with offset shifted by `howMany`.\n\t */\n\tconstructor( sourcePosition, howMany ) {\n\t\tsuper( null );\n\n\t\t/**\n\t\t * Position before the first {@link module:engine/model/item~Item model item} to detach.\n\t\t *\n\t\t * @member {module:engine/model/position~Position} #sourcePosition\n\t\t */\n\t\tthis.sourcePosition = sourcePosition.clone();\n\n\t\t/**\n\t\t * Offset size of moved range.\n\t\t *\n\t\t * @member {Number} #howMany\n\t\t */\n\t\tthis.howMany = howMany;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tget type() {\n\t\treturn 'detach';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\n\t\tjson.sourcePosition = this.sourcePosition.toJSON();\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_validate() {\n\t\tif ( this.sourcePosition.root.document ) {\n\t\t\t/**\n\t\t\t * Cannot detach document node.\n\t\t\t *\n\t\t\t * @error detach-operation-on-document-node\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'detach-operation-on-document-node', this );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_execute() {\n\t\t_remove( Range._createFromPositionAndShift( this.sourcePosition, this.howMany ) );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get className() {\n\t\treturn 'DetachOperation';\n\t}\n\n\t// @if CK_DEBUG_ENGINE // toString() {\n\t// @if CK_DEBUG_ENGINE // const range = ModelRange._createFromPositionAndShift( this.sourcePosition, this.howMany );\n\t// @if CK_DEBUG_ENGINE //\tconst nodes = Array.from( range.getItems() );\n\t// @if CK_DEBUG_ENGINE //\tconst nodeString = nodes.length > 1 ? `[ ${ nodes.length } ]` : nodes[ 0 ];\n\n\t// @if CK_DEBUG_ENGINE //\treturn `DetachOperation( ${ this.baseVersion } ): ${ nodeString } -> ${ range }`;\n\t// @if CK_DEBUG_ENGINE // }\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/operation/moveoperation\n */\n\nimport Operation from './operation';\nimport Position from '../position';\nimport Range from '../range';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport compareArrays from '@ckeditor/ckeditor5-utils/src/comparearrays';\nimport { _move } from './utils';\n\n// @if CK_DEBUG_ENGINE // const ModelRange = require( '../range' ).default;\n\n/**\n * Operation to move a range of {@link module:engine/model/item~Item model items}\n * to given {@link module:engine/model/position~Position target position}.\n *\n * @extends module:engine/model/operation/operation~Operation\n */\nexport default class MoveOperation extends Operation {\n\t/**\n\t * Creates a move operation.\n\t *\n\t * @param {module:engine/model/position~Position} sourcePosition\n\t * Position before the first {@link module:engine/model/item~Item model item} to move.\n\t * @param {Number} howMany Offset size of moved range. Moved range will start from `sourcePosition` and end at\n\t * `sourcePosition` with offset shifted by `howMany`.\n\t * @param {module:engine/model/position~Position} targetPosition Position at which moved nodes will be inserted.\n\t * @param {Number|null} baseVersion Document {@link module:engine/model/document~Document#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */\n\tconstructor( sourcePosition, howMany, targetPosition, baseVersion ) {\n\t\tsuper( baseVersion );\n\n\t\t/**\n\t\t * Position before the first {@link module:engine/model/item~Item model item} to move.\n\t\t *\n\t\t * @member {module:engine/model/position~Position} module:engine/model/operation/moveoperation~MoveOperation#sourcePosition\n\t\t */\n\t\tthis.sourcePosition = sourcePosition.clone();\n\t\t// `'toNext'` because `sourcePosition` is a bit like a start of the moved range.\n\t\tthis.sourcePosition.stickiness = 'toNext';\n\n\t\t/**\n\t\t * Offset size of moved range.\n\t\t *\n\t\t * @member {Number} module:engine/model/operation/moveoperation~MoveOperation#howMany\n\t\t */\n\t\tthis.howMany = howMany;\n\n\t\t/**\n\t\t * Position at which moved nodes will be inserted.\n\t\t *\n\t\t * @member {module:engine/model/position~Position} module:engine/model/operation/moveoperation~MoveOperation#targetPosition\n\t\t */\n\t\tthis.targetPosition = targetPosition.clone();\n\t\tthis.targetPosition.stickiness = 'toNone';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tget type() {\n\t\tif ( this.targetPosition.root.rootName == '$graveyard' ) {\n\t\t\treturn 'remove';\n\t\t} else if ( this.sourcePosition.root.rootName == '$graveyard' ) {\n\t\t\treturn 'reinsert';\n\t\t}\n\n\t\treturn 'move';\n\t}\n\n\t/**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t *\n\t * @returns {module:engine/model/operation/moveoperation~MoveOperation} Clone of this operation.\n\t */\n\tclone() {\n\t\treturn new this.constructor( this.sourcePosition, this.howMany, this.targetPosition, this.baseVersion );\n\t}\n\n\t/**\n\t * Returns the start position of the moved range after it got moved. This may be different than\n\t * {@link module:engine/model/operation/moveoperation~MoveOperation#targetPosition} in some cases, i.e. when a range is moved\n\t * inside the same parent but {@link module:engine/model/operation/moveoperation~MoveOperation#targetPosition targetPosition}\n\t * is after {@link module:engine/model/operation/moveoperation~MoveOperation#sourcePosition sourcePosition}.\n\t *\n\t *\t\t vv vv\n\t *\t\tabcdefg ===> adefbcg\n\t *\t\t ^ ^\n\t *\t\t targetPos\tmovedRangeStart\n\t *\t\t offset 6\toffset 4\n\t *\n\t * @returns {module:engine/model/position~Position}\n\t */\n\tgetMovedRangeStart() {\n\t\treturn this.targetPosition._getTransformedByDeletion( this.sourcePosition, this.howMany );\n\t}\n\n\t/**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t *\n\t * @returns {module:engine/model/operation/moveoperation~MoveOperation}\n\t */\n\tgetReversed() {\n\t\tconst newTargetPosition = this.sourcePosition._getTransformedByInsertion( this.targetPosition, this.howMany );\n\n\t\treturn new this.constructor( this.getMovedRangeStart(), this.howMany, newTargetPosition, this.baseVersion + 1 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_validate() {\n\t\tconst sourceElement = this.sourcePosition.parent;\n\t\tconst targetElement = this.targetPosition.parent;\n\t\tconst sourceOffset = this.sourcePosition.offset;\n\t\tconst targetOffset = this.targetPosition.offset;\n\n\t\t// Validate whether move operation has correct parameters.\n\t\t// Validation is pretty complex but move operation is one of the core ways to manipulate the document state.\n\t\t// We expect that many errors might be connected with one of scenarios described below.\n\t\tif ( sourceOffset + this.howMany > sourceElement.maxOffset ) {\n\t\t\t/**\n\t\t\t * The nodes which should be moved do not exist.\n\t\t\t *\n\t\t\t * @error move-operation-nodes-do-not-exist\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'move-operation-nodes-do-not-exist', this\n\t\t\t);\n\t\t} else if ( sourceElement === targetElement && sourceOffset < targetOffset && targetOffset < sourceOffset + this.howMany ) {\n\t\t\t/**\n\t\t\t * Trying to move a range of nodes into the middle of that range.\n\t\t\t *\n\t\t\t * @error move-operation-range-into-itself\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'move-operation-range-into-itself', this\n\t\t\t);\n\t\t} else if ( this.sourcePosition.root == this.targetPosition.root ) {\n\t\t\tif ( compareArrays( this.sourcePosition.getParentPath(), this.targetPosition.getParentPath() ) == 'prefix' ) {\n\t\t\t\tconst i = this.sourcePosition.path.length - 1;\n\n\t\t\t\tif ( this.targetPosition.path[ i ] >= sourceOffset && this.targetPosition.path[ i ] < sourceOffset + this.howMany ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * Trying to move a range of nodes into one of nodes from that range.\n\t\t\t\t\t *\n\t\t\t\t\t * @error move-operation-node-into-itself\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t\t'move-operation-node-into-itself', this\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_execute() {\n\t\t_move( Range._createFromPositionAndShift( this.sourcePosition, this.howMany ), this.targetPosition );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\n\t\tjson.sourcePosition = this.sourcePosition.toJSON();\n\t\tjson.targetPosition = this.targetPosition.toJSON();\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get className() {\n\t\treturn 'MoveOperation';\n\t}\n\n\t/**\n\t * Creates `MoveOperation` object from deserilized object, i.e. from parsed JSON string.\n\t *\n\t * @param {Object} json Deserialized JSON object.\n\t * @param {module:engine/model/document~Document} document Document on which this operation will be applied.\n\t * @returns {module:engine/model/operation/moveoperation~MoveOperation}\n\t */\n\tstatic fromJSON( json, document ) {\n\t\tconst sourcePosition = Position.fromJSON( json.sourcePosition, document );\n\t\tconst targetPosition = Position.fromJSON( json.targetPosition, document );\n\n\t\treturn new this( sourcePosition, json.howMany, targetPosition, json.baseVersion );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // toString() {\n\t// @if CK_DEBUG_ENGINE // \tconst range = ModelRange._createFromPositionAndShift( this.sourcePosition, this.howMany );\n\n\t// @if CK_DEBUG_ENGINE //\treturn `MoveOperation( ${ this.baseVersion } ): ${ range } -> ${ this.targetPosition }`;\n\t// @if CK_DEBUG_ENGINE // }\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/operation/insertoperation\n */\n\nimport Operation from './operation';\nimport Position from '../position';\nimport NodeList from '../nodelist';\nimport MoveOperation from './moveoperation';\nimport { _insert, _normalizeNodes } from './utils';\nimport Text from '../text';\nimport Element from '../element';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n/**\n * Operation to insert one or more nodes at given position in the model.\n *\n * @extends module:engine/model/operation/operation~Operation\n */\nexport default class InsertOperation extends Operation {\n\t/**\n\t * Creates an insert operation.\n\t *\n\t * @param {module:engine/model/position~Position} position Position of insertion.\n\t * @param {module:engine/model/node~NodeSet} nodes The list of nodes to be inserted.\n\t * @param {Number|null} baseVersion Document {@link module:engine/model/document~Document#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */\n\tconstructor( position, nodes, baseVersion ) {\n\t\tsuper( baseVersion );\n\n\t\t/**\n\t\t * Position of insertion.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/position~Position} module:engine/model/operation/insertoperation~InsertOperation#position\n\t\t */\n\t\tthis.position = position.clone();\n\t\tthis.position.stickiness = 'toNone';\n\n\t\t/**\n\t\t * List of nodes to insert.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/nodelist~NodeList} module:engine/model/operation/insertoperation~InsertOperation#nodeList\n\t\t */\n\t\tthis.nodes = new NodeList( _normalizeNodes( nodes ) );\n\n\t\t/**\n\t\t * Flag deciding how the operation should be transformed. If set to `true`, nodes might get additional attributes\n\t\t * during operational transformation. This happens when the operation insertion position is inside of a range\n\t\t * where attributes have changed.\n\t\t *\n\t\t * @member {Boolean} module:engine/model/operation/insertoperation~InsertOperation#shouldReceiveAttributes\n\t\t */\n\t\tthis.shouldReceiveAttributes = false;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tget type() {\n\t\treturn 'insert';\n\t}\n\n\t/**\n\t * Total offset size of inserted nodes.\n\t *\n\t * @returns {Number}\n\t */\n\tget howMany() {\n\t\treturn this.nodes.maxOffset;\n\t}\n\n\t/**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t *\n\t * @returns {module:engine/model/operation/insertoperation~InsertOperation} Clone of this operation.\n\t */\n\tclone() {\n\t\tconst nodes = new NodeList( [ ...this.nodes ].map( node => node._clone( true ) ) );\n\t\tconst insert = new InsertOperation( this.position, nodes, this.baseVersion );\n\n\t\tinsert.shouldReceiveAttributes = this.shouldReceiveAttributes;\n\n\t\treturn insert;\n\t}\n\n\t/**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t *\n\t * @returns {module:engine/model/operation/moveoperation~MoveOperation}\n\t */\n\tgetReversed() {\n\t\tconst graveyard = this.position.root.document.graveyard;\n\t\tconst gyPosition = new Position( graveyard, [ 0 ] );\n\n\t\treturn new MoveOperation( this.position, this.nodes.maxOffset, gyPosition, this.baseVersion + 1 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_validate() {\n\t\tconst targetElement = this.position.parent;\n\n\t\tif ( !targetElement || targetElement.maxOffset < this.position.offset ) {\n\t\t\t/**\n\t\t\t * Insertion position is invalid.\n\t\t\t *\n\t\t\t * @error insert-operation-position-invalid\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'insert-operation-position-invalid',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_execute() {\n\t\t// What happens here is that we want original nodes be passed to writer because we want original nodes\n\t\t// to be inserted to the model. But in InsertOperation, we want to keep those nodes as they were added\n\t\t// to the operation, not modified. For example, text nodes can get merged or cropped while Elements can\n\t\t// get children. It is important that InsertOperation has the copy of original nodes in intact state.\n\t\tconst originalNodes = this.nodes;\n\t\tthis.nodes = new NodeList( [ ...originalNodes ].map( node => node._clone( true ) ) );\n\n\t\t_insert( this.position, originalNodes );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\n\t\tjson.position = this.position.toJSON();\n\t\tjson.nodes = this.nodes.toJSON();\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get className() {\n\t\treturn 'InsertOperation';\n\t}\n\n\t/**\n\t * Creates `InsertOperation` object from deserilized object, i.e. from parsed JSON string.\n\t *\n\t * @param {Object} json Deserialized JSON object.\n\t * @param {module:engine/model/document~Document} document Document on which this operation will be applied.\n\t * @returns {module:engine/model/operation/insertoperation~InsertOperation}\n\t */\n\tstatic fromJSON( json, document ) {\n\t\tconst children = [];\n\n\t\tfor ( const child of json.nodes ) {\n\t\t\tif ( child.name ) {\n\t\t\t\t// If child has name property, it is an Element.\n\t\t\t\tchildren.push( Element.fromJSON( child ) );\n\t\t\t} else {\n\t\t\t\t// Otherwise, it is a Text node.\n\t\t\t\tchildren.push( Text.fromJSON( child ) );\n\t\t\t}\n\t\t}\n\n\t\tconst insert = new InsertOperation( Position.fromJSON( json.position, document ), children, json.baseVersion );\n\t\tinsert.shouldReceiveAttributes = json.shouldReceiveAttributes;\n\n\t\treturn insert;\n\t}\n\n\t// @if CK_DEBUG_ENGINE // toString() {\n\t// @if CK_DEBUG_ENGINE // \tconst nodeString = this.nodes.length > 1 ? `[ ${ this.nodes.length } ]` : this.nodes.getNode( 0 );\n\n\t// @if CK_DEBUG_ENGINE //\treturn `InsertOperation( ${ this.baseVersion } ): ${ nodeString } -> ${ this.position }`;\n\t// @if CK_DEBUG_ENGINE // }\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/operation/markeroperation\n */\n\nimport Operation from './operation';\nimport Range from '../range';\n\n/**\n * @extends module:engine/model/operation/operation~Operation\n */\nexport default class MarkerOperation extends Operation {\n\t/**\n\t * @param {String} name Marker name.\n\t * @param {module:engine/model/range~Range} oldRange Marker range before the change.\n\t * @param {module:engine/model/range~Range} newRange Marker range after the change.\n\t * @param {module:engine/model/markercollection~MarkerCollection} markers Marker collection on which change should be executed.\n\t * @param {Boolean} affectsData Specifies whether the marker operation affects the data produced by the data pipeline\n\t * (is persisted in the editor's data).\n\t * @param {Number|null} baseVersion Document {@link module:engine/model/document~Document#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */\n\tconstructor( name, oldRange, newRange, markers, affectsData, baseVersion ) {\n\t\tsuper( baseVersion );\n\n\t\t/**\n\t\t * Marker name.\n\t\t *\n\t\t * @readonly\n\t\t * @member {String}\n\t\t */\n\t\tthis.name = name;\n\n\t\t/**\n\t\t * Marker range before the change.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/range~Range}\n\t\t */\n\t\tthis.oldRange = oldRange ? oldRange.clone() : null;\n\n\t\t/**\n\t\t * Marker range after the change.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/range~Range}\n\t\t */\n\t\tthis.newRange = newRange ? newRange.clone() : null;\n\n\t\t/**\n\t\t * Specifies whether the marker operation affects the data produced by the data pipeline\n\t\t * (is persisted in the editor's data).\n\t\t *\n\t\t * @readonly\n\t\t * @member {Boolean}\n\t\t */\n\t\tthis.affectsData = affectsData;\n\n\t\t/**\n\t\t * Marker collection on which change should be executed.\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/model/markercollection~MarkerCollection}\n\t\t */\n\t\tthis._markers = markers;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tget type() {\n\t\treturn 'marker';\n\t}\n\n\t/**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t *\n\t * @returns {module:engine/model/operation/markeroperation~MarkerOperation} Clone of this operation.\n\t */\n\tclone() {\n\t\treturn new MarkerOperation( this.name, this.oldRange, this.newRange, this._markers, this.affectsData, this.baseVersion );\n\t}\n\n\t/**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t *\n\t * @returns {module:engine/model/operation/markeroperation~MarkerOperation}\n\t */\n\tgetReversed() {\n\t\treturn new MarkerOperation( this.name, this.newRange, this.oldRange, this._markers, this.affectsData, this.baseVersion + 1 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_execute() {\n\t\tconst type = this.newRange ? '_set' : '_remove';\n\n\t\tthis._markers[ type ]( this.name, this.newRange, true, this.affectsData );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\n\t\tif ( this.oldRange ) {\n\t\t\tjson.oldRange = this.oldRange.toJSON();\n\t\t}\n\n\t\tif ( this.newRange ) {\n\t\t\tjson.newRange = this.newRange.toJSON();\n\t\t}\n\n\t\tdelete json._markers;\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get className() {\n\t\treturn 'MarkerOperation';\n\t}\n\n\t/**\n\t * Creates `MarkerOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param {Object} json Deserialized JSON object.\n\t * @param {module:engine/model/document~Document} document Document on which this operation will be applied.\n\t * @returns {module:engine/model/operation/markeroperation~MarkerOperation}\n\t */\n\tstatic fromJSON( json, document ) {\n\t\treturn new MarkerOperation(\n\t\t\tjson.name,\n\t\t\tjson.oldRange ? Range.fromJSON( json.oldRange, document ) : null,\n\t\t\tjson.newRange ? Range.fromJSON( json.newRange, document ) : null,\n\t\t\tdocument.model.markers,\n\t\t\tjson.affectsData,\n\t\t\tjson.baseVersion\n\t\t);\n\t}\n\n\t// @if CK_DEBUG_ENGINE // toString() {\n\t// @if CK_DEBUG_ENGINE // \treturn `MarkerOperation( ${ this.baseVersion } ): ` +\n\t// @if CK_DEBUG_ENGINE //\t\t`\"${ this.name }\": ${ this.oldRange } -> ${ this.newRange }`;\n\t// @if CK_DEBUG_ENGINE // }\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/operation/renameoperation\n */\n\nimport Operation from './operation';\nimport Element from '../element';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport Position from '../position';\n\n/**\n * Operation to change element's name.\n *\n * Using this class you can change element's name.\n *\n * @extends module:engine/model/operation/operation~Operation\n */\nexport default class RenameOperation extends Operation {\n\t/**\n\t * Creates an operation that changes element's name.\n\t *\n\t * @param {module:engine/model/position~Position} position Position before an element to change.\n\t * @param {String} oldName Current name of the element.\n\t * @param {String} newName New name for the element.\n\t * @param {Number|null} baseVersion Document {@link module:engine/model/document~Document#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */\n\tconstructor( position, oldName, newName, baseVersion ) {\n\t\tsuper( baseVersion );\n\n\t\t/**\n\t\t * Position before an element to change.\n\t\t *\n\t\t * @member {module:engine/model/position~Position} module:engine/model/operation/renameoperation~RenameOperation#position\n\t\t */\n\t\tthis.position = position;\n\t\t// This position sticks to the next node because it is a position before the node that we want to change.\n\t\tthis.position.stickiness = 'toNext';\n\n\t\t/**\n\t\t * Current name of the element.\n\t\t *\n\t\t * @member {String} module:engine/model/operation/renameoperation~RenameOperation#oldName\n\t\t */\n\t\tthis.oldName = oldName;\n\n\t\t/**\n\t\t * New name for the element.\n\t\t *\n\t\t * @member {String} module:engine/model/operation/renameoperation~RenameOperation#newName\n\t\t */\n\t\tthis.newName = newName;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tget type() {\n\t\treturn 'rename';\n\t}\n\n\t/**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t *\n\t * @returns {module:engine/model/operation/renameoperation~RenameOperation} Clone of this operation.\n\t */\n\tclone() {\n\t\treturn new RenameOperation( this.position.clone(), this.oldName, this.newName, this.baseVersion );\n\t}\n\n\t/**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t *\n\t * @returns {module:engine/model/operation/renameoperation~RenameOperation}\n\t */\n\tgetReversed() {\n\t\treturn new RenameOperation( this.position.clone(), this.newName, this.oldName, this.baseVersion + 1 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_validate() {\n\t\tconst element = this.position.nodeAfter;\n\n\t\tif ( !( element instanceof Element ) ) {\n\t\t\t/**\n\t\t\t * Given position is invalid or node after it is not instance of Element.\n\t\t\t *\n\t\t\t * @error rename-operation-wrong-position\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'rename-operation-wrong-position',\n\t\t\t\tthis\n\t\t\t);\n\t\t} else if ( element.name !== this.oldName ) {\n\t\t\t/**\n\t\t\t * Element to change has different name than operation's old name.\n\t\t\t *\n\t\t\t * @error rename-operation-wrong-name\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'rename-operation-wrong-name',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_execute() {\n\t\tconst element = this.position.nodeAfter;\n\n\t\telement.name = this.newName;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\n\t\tjson.position = this.position.toJSON();\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get className() {\n\t\treturn 'RenameOperation';\n\t}\n\n\t/**\n\t * Creates `RenameOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param {Object} json Deserialized JSON object.\n\t * @param {module:engine/model/document~Document} document Document on which this operation will be applied.\n\t * @returns {module:engine/model/operation/attributeoperation~AttributeOperation}\n\t */\n\tstatic fromJSON( json, document ) {\n\t\treturn new RenameOperation( Position.fromJSON( json.position, document ), json.oldName, json.newName, json.baseVersion );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // toString() {\n\t// @if CK_DEBUG_ENGINE // \treturn `RenameOperation( ${ this.baseVersion } ): ` +\n\t// @if CK_DEBUG_ENGINE //\t\t`${ this.position }: \"${ this.oldName }\" -> \"${ this.newName }\"`;\n\t// @if CK_DEBUG_ENGINE // }\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module engine/model/operati