UNPKG

@ckeditor/ckeditor5-table

Version:

Table feature for CKEditor 5.

5 lines • 179 kB
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"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",Background:"Background",Border:"Border","Cell properties":"Cell properties","Center table":"Center table","Choose table type":"Choose table type",Color:"Color",Column:"Column","Content table":"Content table",Dashed:"Dashed","Delete column":"Delete column","Delete row":"Delete row",Dimensions:"Dimensions",Dotted:"Dotted",Double:"Double","Enter table caption":"Enter table caption",Groove:"Groove","Header column":"Header column","Header row":"Header row",Height:"Height","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","Insert a new table row (when in the last cell of a table)":"Insert a new table row (when in the last cell of a table)","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table","Insert table layout":"Insert table layout",Inset:"Inset","Justify cell text":"Justify cell text","Keystrokes that can be used in a table cell":"Keystrokes that can be used in a table cell","Layout table":"Layout table","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","Move the selection to the next cell":"Move the selection to the next cell","Move the selection to the previous cell":"Move the selection to the previous cell","Navigate through the table":"Navigate through the table",None:"None",Outset:"Outset",Padding:"Padding",Ridge:"Ridge",Row:"Row","Select column":"Select column","Select row":"Select row",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Style:"Style",Table:"Table","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table layout":"Table layout","Table properties":"Table properties","Table toolbar":"Table toolbar","Table type":"Table type","Table type options":"Table type options",'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".',"Vertical text alignment toolbar":"Vertical text alignment toolbar",Width:"Width"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})), /*! * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md. */(()=>{var e={21:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(o){e.setAttribute(o,t[o])})}},25:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(758),i=o.n(n),l=o(935),r=o.n(l)()(i());r.push([e.id,".ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}.ck-content figure.table:not(.layout-table){display:table}.ck-content figure.table:not(.layout-table)>table{height:100%;width:100%}.ck-content .table:not(.layout-table){margin:.9em auto}.ck-content figure.table:not(.layout-table)>table,.ck-content table.table:not(.layout-table){border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0}.ck-content figure.table:not(.layout-table)>table>tbody>tr>th,.ck-content figure.table:not(.layout-table)>table>thead>tr>th,.ck-content table.table:not(.layout-table)>tbody>tr>th,.ck-content table.table:not(.layout-table)>thead>tr>th{background:rgba(0,0,0,.05);font-weight:700}.ck-content figure.table:not(.layout-table)>table>tbody>tr>td,.ck-content figure.table:not(.layout-table)>table>tbody>tr>th,.ck-content figure.table:not(.layout-table)>table>thead>tr>td,.ck-content figure.table:not(.layout-table)>table>thead>tr>th,.ck-content table.table:not(.layout-table)>tbody>tr>td,.ck-content table.table:not(.layout-table)>tbody>tr>th,.ck-content table.table:not(.layout-table)>thead>tr>td,.ck-content table.table:not(.layout-table)>thead>tr>th{border:1px solid #bfbfbf;min-width:2em;padding:.4em}.ck-content figure.table:not(.layout-table)>table>tbody>tr>td>p:first-of-type,.ck-content figure.table:not(.layout-table)>table>tbody>tr>th>p:first-of-type,.ck-content figure.table:not(.layout-table)>table>thead>tr>td>p:first-of-type,.ck-content figure.table:not(.layout-table)>table>thead>tr>th>p:first-of-type,.ck-content table.table:not(.layout-table)>tbody>tr>td>p:first-of-type,.ck-content table.table:not(.layout-table)>tbody>tr>th>p:first-of-type,.ck-content table.table:not(.layout-table)>thead>tr>td>p:first-of-type,.ck-content table.table:not(.layout-table)>thead>tr>th>p:first-of-type{margin-top:0}.ck-content figure.table:not(.layout-table)>table>tbody>tr>td>p:last-of-type,.ck-content figure.table:not(.layout-table)>table>tbody>tr>th>p:last-of-type,.ck-content figure.table:not(.layout-table)>table>thead>tr>td>p:last-of-type,.ck-content figure.table:not(.layout-table)>table>thead>tr>th>p:last-of-type,.ck-content table.table:not(.layout-table)>tbody>tr>td>p:last-of-type,.ck-content table.table:not(.layout-table)>tbody>tr>th>p:last-of-type,.ck-content table.table:not(.layout-table)>thead>tr>td>p:last-of-type,.ck-content table.table:not(.layout-table)>thead>tr>th>p:last-of-type{margin-bottom:0}@media print{.ck-content figure.table:not(.layout-table):has(>table){display:block}.ck-content figure.table:not(.layout-table)>table{height:auto}}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}",""]);const a=r},51:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},103:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(758),i=o.n(n),l=o(935),r=o.n(l)()(i());r.push([e.id,'.ck-editor__editable.ck-editor__editable_inline>.ck-widget.ck-widget_with-selection-handle.layout-table:first-child{margin-top:var(--ck-spacing-large)}.ck-editor__editable.ck-editor__editable_inline>.ck-widget.ck-widget_with-selection-handle.layout-table:last-child,.ck-editor__editable.ck-editor__editable_inline>.ck-widget.ck-widget_with-selection-handle.layout-table:nth-last-child(2):has(+.ck-fake-selection-container){margin-bottom:var(--ck-spacing-large)}.ck-editor__editable .table.layout-table{display:table;margin:0}.ck-editor__editable .table.layout-table.ck-widget:hover{z-index:var(--ck-z-default)}.ck-editor__editable .table.layout-table.ck-widget:hover>.ck-widget__selection-handle{opacity:.75;visibility:visible}.ck-editor__editable .table.layout-table.ck-widget:hover>.ck-widget__selection-handle:hover{opacity:1}.ck-editor__editable .table.layout-table.ck-widget:has(.ck-widget.table:hover)>.ck-widget__selection-handle{opacity:0;visibility:hidden}.ck-editor__editable .table.layout-table.ck-widget.ck-widget_selected{z-index:var(--ck-z-default)}.ck-content figure.table.layout-table,.ck-content table.table.layout-table{margin-bottom:0;margin-top:0}.ck-content figure.table.layout-table>table,.ck-content table.table.layout-table{border-spacing:0}:root{--ck-table-layout-widget-type-around-button-size:16px;--ck-table-layout-widget-type-around-icon-width:10px;--ck-table-layout-widget-type-around-icon-height:8px;--ck-table-layout-widget-handler-icon-size:10px;--ck-table-layout-default-border-color:#d4d4d4}.ck-editor__editable .table.layout-table>table{border-collapse:revert;height:100%;width:100%}.ck-editor__editable .table.layout-table>table:not([style*="border:"],[style*=border-top],[style*=border-bottom],[style*=border-left],[style*=border-right],[style*=border-width],[style*=border-style],[style*=border-color]){border-color:transparent;border-width:0;outline:none}.ck-editor__editable .table.layout-table>table>tbody>tr>td{box-shadow:revert;min-width:2em;padding:revert;text-indent:1px}.ck-editor__editable .table.layout-table>table>tbody>tr>td[style*=" width:"],.ck-editor__editable .table.layout-table>table>tbody>tr>td[style*="\'width:"],.ck-editor__editable .table.layout-table>table>tbody>tr>td[style*=";width:"],.ck-editor__editable .table.layout-table>table>tbody>tr>td[style^="width:"]{min-width:auto}.ck-editor__editable .table.layout-table>table>tbody>tr>td:focus{background-color:transparent}.ck-editor__editable .table.layout-table>table>tbody>tr>td:not([style*="border:"],[style*=border-top],[style*=border-bottom],[style*=border-left],[style*=border-right],[style*=border-width],[style*=border-style],[style*=border-color]){border-color:transparent;border-width:0;outline:var(--ck-table-layout-default-border-color) 1px dashed;outline-offset:-1px}.ck-editor__editable .table.layout-table>table>tbody>tr>td:not([style*="border:"],[style*=border-top],[style*=border-bottom],[style*=border-left],[style*=border-right],[style*=border-width],[style*=border-style],[style*=border-color]):focus{outline:var(--ck-color-focus-border) 1px solid}.ck-editor__editable .table.layout-table>table>tbody>tr>td>.ck-table-bogus-paragraph{text-indent:0;width:calc(100% - 1px)}.ck-editor__editable .table.layout-table.ck-widget>.ck-widget__type-around{--ck-widget-type-around-button-size:var(--ck-table-layout-widget-type-around-button-size)}.ck-editor__editable .table.layout-table.ck-widget>.ck-widget__type-around>.ck-widget__type-around__button.ck-widget__type-around__button_after,.ck-editor__editable .table.layout-table.ck-widget>.ck-widget__type-around>.ck-widget__type-around__button.ck-widget__type-around__button_before{transform:translateY(0);z-index:2}.ck-editor__editable .table.layout-table.ck-widget>.ck-widget__type-around>.ck-widget__type-around__button.ck-widget__type-around__button_before{border-radius:0 0 100px 100px;left:min(10%,30px);margin-left:var(--ck-table-layout-widget-type-around-button-size)}.ck-editor__editable .table.layout-table.ck-widget>.ck-widget__type-around>.ck-widget__type-around__button.ck-widget__type-around__button_before:after{border-radius:0 0 100px 100px}.ck-editor__editable .table.layout-table.ck-widget>.ck-widget__type-around>.ck-widget__type-around__button.ck-widget__type-around__button_after,.ck-editor__editable .table.layout-table.ck-widget>.ck-widget__type-around>.ck-widget__type-around__button.ck-widget__type-around__button_after:after{border-radius:100px 100px 0 0}.ck-editor__editable .table.layout-table.ck-widget>.ck-widget__type-around>.ck-widget__type-around__button svg{height:var(--ck-table-layout-widget-type-around-icon-height);width:var(--ck-table-layout-widget-type-around-icon-width)}.ck-editor__editable .table.layout-table.ck-widget.ck-widget_with-selection-handle>.ck-widget__selection-handle{--ck-widget-handler-icon-size:var(--ck-table-layout-widget-handler-icon-size);transform:translateY(calc(0px - var(--ck-widget-outline-thickness)));z-index:3}.ck-editor__editable .table.layout-table.ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{top:0}.ck-editor__editable .table.layout-table.ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:0}',""]);const a=r},128:e=>{"use strict";var t={};e.exports=function(e,o){var n=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},175:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(758),i=o.n(n),l=o(935),r=o.n(l)()(i());r.push([e.id,":root{--ck-content-color-table-caption-background:#f7f7f7;--ck-content-color-table-caption-text:#333;--ck-color-table-caption-highlighted-background:#fd0}.ck-content .table>figcaption{background-color:var(--ck-content-color-table-caption-background);caption-side:top;color:var(--ck-content-color-table-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;overflow-wrap:anywhere;padding:.6em;text-align:center;word-break:normal}@media (forced-colors:active){.ck-content .table>figcaption{background-color:unset;color:unset}}@media (forced-colors:none){.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-content-color-table-caption-background)}}",""]);const a=r},218:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(758),i=o.n(n),l=o(935),r=o.n(l)()(i());r.push([e.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}",""]);const a=r},237:e=>{"use strict";e.exports=CKEditor5.dll},266:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(758),i=o.n(n),l=o(935),r=o.n(l)()(i());r.push([e.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)}",""]);const a=r},311:(e,t,o)=>{e.exports=o(237)("./src/ui.js")},331:(e,t,o)=>{e.exports=o(237)("./src/clipboard.js")},355:(e,t,o)=>{e.exports=o(237)("./src/icons.js")},363:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(758),i=o.n(n),l=o(935),r=o.n(l)()(i());r.push([e.id,":root{--ck-color-table-column-resizer-hover:var(--ck-color-base-active);--ck-table-column-resizer-width:7px;--ck-table-column-resizer-position-offset:calc(var(--ck-table-column-resizer-width)*-0.5 - 0.5px)}.ck-content .table .ck-table-resized{table-layout:fixed}.ck-content .table td,.ck-content .table th{overflow-wrap:break-word}.ck.ck-editor__editable .table td,.ck.ck-editor__editable .table th{position:relative}.ck.ck-editor__editable .table .ck-table-column-resizer{bottom:0;cursor:col-resize;position:absolute;right:var(--ck-table-column-resizer-position-offset);top:0;user-select:none;width:var(--ck-table-column-resizer-width);z-index:var(--ck-z-default)}.ck.ck-editor__editable .table[draggable] .ck-table-column-resizer,.ck.ck-editor__editable.ck-column-resize_disabled .table .ck-table-column-resizer{display:none}.ck.ck-editor__editable .table .ck-table-column-resizer:hover,.ck.ck-editor__editable .table .ck-table-column-resizer__active{background-color:var(--ck-color-table-column-resizer-hover);opacity:.25}.ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer{left:var(--ck-table-column-resizer-position-offset);right:unset}",""]);const a=r},584:(e,t,o)=>{e.exports=o(237)("./src/utils.js")},591:e=>{"use strict";var t=[];function o(e){for(var o=-1,n=0;n<t.length;n++)if(t[n].identifier===e){o=n;break}return o}function n(e,n){for(var l={},r=[],a=0;a<e.length;a++){var s=e[a],c=n.base?s[0]+n.base:s[0],d=l[c]||0,u="".concat(c," ").concat(d);l[c]=d+1;var b=o(u),h={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==b)t[b].references++,t[b].updater(h);else{var m=i(h,n);n.byIndex=a,t.splice(a,0,{identifier:u,updater:m,references:1})}r.push(u)}return r}function i(e,t){var o=t.domAPI(t);o.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;o.update(e=t)}else o.remove()}}e.exports=function(e,i){var l=n(e=e||[],i=i||{});return function(e){e=e||[];for(var r=0;r<l.length;r++){var a=o(l[r]);t[a].references--}for(var s=n(e,i),c=0;c<l.length;c++){var d=o(l[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}l=s}}},639:e=>{"use strict";var t,o=(t=[],function(e,o){return t[e]=o,t.filter(Boolean).join("\n")});function n(e,t,n,i){var l;if(n)l="";else{l="",i.supports&&(l+="@supports (".concat(i.supports,") {")),i.media&&(l+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(l+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),l+=i.css,r&&(l+="}"),i.media&&(l+="}"),i.supports&&(l+="}")}if(e.styleSheet)e.styleSheet.cssText=o(t,l);else{var a=document.createTextNode(l),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(a,s[t]):e.appendChild(a)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,o=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){n(o,t,!1,e)},remove:function(e){n(o,t,!0,e)}}}},712:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(758),i=o.n(n),l=o(935),r=o.n(l)()(i());r.push([e.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,.ck[dir=rtl] .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;margin:var(--ck-insert-table-dropdown-box-margin);min-height:var(--ck-insert-table-dropdown-box-height);min-width:var(--ck-insert-table-dropdown-box-width);outline:none;transition:none}@media (prefers-reduced-motion:reduce){.ck .ck-insert-table-dropdown-grid-box{transition:none}}.ck .ck-insert-table-dropdown-grid-box:focus{box-shadow:none}.ck .ck-insert-table-dropdown-grid-box.ck-on{background:var(--ck-color-focus-outer-shadow);border-color:var(--ck-color-focus-border)}",""]);const a=r},719:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(758),i=o.n(n),l=o(935),r=o.n(l)()(i());r.push([e.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;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}',""]);const a=r},758:e=>{"use strict";e.exports=function(e){return e[1]}},770:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(758),i=o.n(n),l=o(935),r=o.n(l)()(i());r.push([e.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-input-text:focus{z-index: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-top-left-radius:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-left:1px solid transparent}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-right:1px solid transparent}.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:1px solid var(--ck-color-input-border);border-radius:0;height:20px;width:20px}.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>.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-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);width:100%}.ck.ck-input-color .ck.ck-input-color__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-input-border)}[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}",""]);const a=r},782:(e,t,o)=>{e.exports=o(237)("./src/core.js")},783:(e,t,o)=>{e.exports=o(237)("./src/engine.js")},817:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(758),i=o.n(n),l=o(935),r=o.n(l)()(i());r.push([e.id,':root{--ck-color-table-focused-cell-background:rgba(158,201,250,.3);--ck-table-content-default-border-color:#d4d4d4}.ck-widget.table table[style*="border-style:none"],.ck-widget.table table[style*="border:none"]{outline:var(--ck-table-content-default-border-color) 1px dashed}.ck-widget.table td.ck-editor__nested-editable,.ck-widget.table th.ck-editor__nested-editable{outline:unset}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused:not(.ck-editor__editable_selected),.ck-widget.table td.ck-editor__nested-editable:not(.ck-editor__editable_selected):focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused:not(.ck-editor__editable_selected),.ck-widget.table th.ck-editor__nested-editable:not(.ck-editor__editable_selected):focus{background:var(--ck-color-table-focused-cell-background);outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}',""]);const a=r},839:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(758),i=o.n(n),l=o(935),r=o.n(l)()(i());r.push([e.id,".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>:not(.ck-label)+*{margin-inline-start: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)}",""]);const a=r},901:(e,t,o)=>{e.exports=o(237)("./src/widget.js")},911:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(758),i=o.n(n),l=o(935),r=o.n(l)()(i());r.push([e.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-form__row>:not(.ck-label,.ck-table-form__dimension-operator){flex-grow:1}.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{animation:ck-table-form-labeled-view-status-appear .15s ease both;background:var(--ck-color-base-error);border-radius:0;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-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: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)}@media (prefers-reduced-motion:reduce){.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:none}}.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}}',""]);const a=r},922:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(758),i=o.n(n),l=o(935),r=o.n(l)()(i());r.push([e.id,":root{--ck-form-default-width:340px}.ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form.ck-form_default-width{width:var(--ck-form-default-width)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-number,.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%}@media screen and (max-width:600px){.ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_with-submit{align-items:stretch;flex-direction:column;padding:0}.ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_with-submit>.ck{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_with-submit .ck-button_with-text{justify-content:center}.ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_large-bottom-padding{padding-bottom:var(--ck-spacing-large)}}[dir=ltr] .ck.ck-form.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-form.ck-responsive-form>:not(:last-child){margin-left:0}",""]);const a=r},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o="",n=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),n&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),n&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o}).join("")},t.i=function(e,o,n,i,l){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(n)for(var a=0;a<this.length;a++){var s=this[a][0];null!=s&&(r[s]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);n&&r[d[0]]||(void 0!==l&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=l),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var l=t[n]={id:n,exports:{}};return e[n](l,l.exports,o),l.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{InsertColumnCommand:()=>I,InsertRowCommand:()=>R,InsertTableCommand:()=>V,InsertTableLayoutCommand:()=>Bo,MergeCellCommand:()=>j,MergeCellsCommand:()=>Ce,PlainTableOutput:()=>yt,RemoveColumnCommand:()=>K,RemoveRowCommand:()=>$,SelectColumnCommand:()=>xe,SelectRowCommand:()=>Ae,SetHeaderColumnCommand:()=>q,SetHeaderRowCommand:()=>G,SplitCellCommand:()=>P,Table:()=>Ct,TableAlignmentCommand:()=>mn,TableBackgroundColorCommand:()=>sn,TableBorderColorCommand:()=>cn,TableBorderStyleCommand:()=>dn,TableBorderWidthCommand:()=>un,TableCaption:()=>Dn,TableCaptionEditing:()=>En,TableCaptionUI:()=>Ln,TableCellBackgroundColorCommand:()=>Co,TableCellBorderColorCommand:()=>Ao,TableCellBorderStyleCommand:()=>To,TableCellBorderWidthCommand:()=>xo,TableCellHeightCommand:()=>ko,TableCellHorizontalAlignmentCommand:()=>vo,TableCellPaddingCommand:()=>_o,TableCellProperties:()=>Io,TableCellPropertiesEditing:()=>Ro,TableCellPropertiesUI:()=>go,TableCellPropertiesView:()=>Qt,TableCellPropertyCommand:()=>po,TableCellVerticalAlignmentCommand:()=>yo,TableCellWidthCommand:()=>fo,TableCellWidthEditing:()=>wo,TableClipboard:()=>dt,TableColumnResize:()=>Yo,TableColumnResizeEditing:()=>qo,TableEditing:()=>Ye,TableHeightCommand:()=>hn,TableKeyboard:()=>mt,TableLayout:()=>rn,TableLayoutEditing:()=>on,TableLayoutUI:()=>Po,TableMouse:()=>ft,TableProperties:()=>An,TablePropertiesEditing:()=>fn,TablePropertiesUI:()=>Tn,TablePropertiesView:()=>Cn,TablePropertyCommand:()=>an,TableSelection:()=>st,TableToolbar:()=>Vt,TableTypeCommand:()=>Zo,TableUI:()=>it,TableUtils:()=>pe,TableWalker:()=>C,TableWidthCommand:()=>bn,TableWidthsCommand:()=>Uo,ToggleTableCaptionCommand:()=>Pn,_InsertTableView:()=>nt,_TABLE_COLUMN_MIN_WIDTH_AS_PERCENTAGE:()=>J,_TABLE_COLUMN_MIN_WIDTH_IN_PIXELS:()=>X,_TABLE_COLUMN_RESIZE_DISTANCE_THRESHOLD:()=>Z,_TABLE_COLUMN_WIDTH_PRECISION:()=>Y,_TABLE_DEFAULT_COLORS:()=>Ht,_TableColorInputView:()=>Pt,_TableMouseEventsObserver:()=>pt,_addDefaultUnitToNumericValue:()=>co,_adjustLastTableColumnIndex:()=>H,_adjustLastTableRowIndex:()=>M,_clamp:()=>re,_colorTableFieldValidator:()=>Ft,_convertParagraphInTableCell:()=>x,_createEmptyTableCell:()=>b,_createFilledArray:()=>ae,_cropTableToDimensions:()=>E,_downcastTable:()=>v,_downcastTableAttribute:()=>s,_downcastTableAttributeToStyle:()=>a,_downcastTableCell:()=>A,_downcastTableResizedClass:()=>Ko,_downcastTableRow:()=>T,_enableTableCellProperty:()=>m,_ensureParagraphInTableCell:()=>_,_fillTableOrCellToolbar:()=>Mt,_getBalloonTableCellPositionData:()=>ro,_getBalloonTablePositionData:()=>lo,_getBorderTableStyleLabels:()=>Bt,_getChangedResizedTables:()=>Q,_getDefaultTableValueAdjusted:()=>c,_getDomTableCellOuterWidth:()=>de,_getElementWidthInPixels:()=>ne,_getHorizontallyOverlappingTableCells:()=>W,_getLabeledTableColorInputCreator:()=>jt,_getLocalizedTableColorErrorText:()=>Wt,_getLocalizedTableLengthErrorText:()=>Dt,_getNormalizedDefaultTableBaseProperties:()=>uo,_getNormalizedDefaultTableCellProperties:()=>ho,_getNormalizedDefaultTableProperties:()=>bo,_getSelectedTableWidget:()=>At,_getSelectionAffectedTable:()=>g,_getSelectionAffectedTableWidget:()=>Tt,_getTableBorderBoxSingleValue:()=>so,_getTableCaptionFromModelElement:()=>Vn,_getTableCaptionFromModelSelection:()=>Rn,_getTableColumnEdgesIndexes:()=>ie,_getTableColumnElements:()=>he,_getTableColumnGroupElement:()=>be,_getTableColumnMinWidthAsPercentage:()=>ee,_getTableColumnsWidths:()=>me,_getTableOrCellBorderStyleDefinitions:()=>Nt,_getTableWidgetAncestor:()=>xt,_getTableWidthInPixels:()=>te,_getVerticallyOverlappingTableCells:()=>L,_injectTableCaptionPostFixer:()=>xn,_injectTableCellParagraphPostFixer:()=>Pe,_injectTableLayoutPostFixer:()=>Se,_isSingleTableParagraphWithoutAttributes:()=>S,_isTableHeadingColumnCell:()=>h,_isTableModelElement:()=>Sn,_lengthTableFieldValidator:()=>zt,_lineWidthTableFieldValidator:()=>Ot,_matchTableCaptionViewElement:()=>In,_normalizeTableColumnWidths:()=>ce,_removeEmptyTableColumns:()=>z,_removeEmptyTableRows:()=>O,_removeEmptyTableRowsColumns:()=>N,_repositionTableContextualBalloon:()=>io,_skipEmptyTableRow:()=>w,_splitTableCellHorizontally:()=>B,_splitTableCellVertically:()=>D,_sumArray:()=>se,_tableCellRefreshHandler:()=>Fe,_tableHeadingsRefreshHandler:()=>De,_toPrecision:()=>le,_translateTableColspanAttribute:()=>ge,_trimTableCellIfNeeded:()=>F,_upcastNormalizedTableStyleToAttribute:()=>l,_upcastTable:()=>f,_upcastTableBorderStyles:()=>r,_upcastTableColgroupElement:()=>$o,_upcastTableFigure:()=>p,_updateTableColumnElements:()=>ue,_updateTableNumericAttribute:()=>u});var e=o(782),t=o(901),i=o(584);function l(e,t){const{modelAttribute:o,styleName:n,attributeName:i,attributeType:l,viewElement:r,defaultValue:a,shouldUpcast:s=()=>!0,reduceBoxSides:u=!1}=t;e.for("upcast").attributeToAttribute({view:{name:r,styles:{[n]:/[\s\S]+/}},model:{key:o,value:(e,t,o)=>{if(!s(e))return;const i=c(a,"",o),l=e.getNormalizedStyle(n),r=u?d(l):l;if(i!==r)return r;t.consumable.consume(e,{styles:n})}}}),i&&e.for("upcast").attributeToAttribute({view:{name:r,attributes:{[i]:/.+/}},model:{key:o,value:(e,t,o)=>{if("figure"==e.name||e.hasStyle(n)||"table"==e.name&&"figure"==e.parent.name&&e.parent.hasStyle(n))return;const r=c(a,"",o);let s=e.getAttribute(i);if(s&&"length"==l&&!s.endsWith("px")&&(s+="px"),r!==s)return s;t.consumable.consume(e,{attributes:i})}}})}function r(e,t,o,n){e.for("upcast").add(e=>e.on("element:"+t,(e,t,i)=>{if(!t.modelRange)return;const l=["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(e=>t.viewItem.hasStyle(e));if(!l.length)return;const r={styles:l};if(!i.consumable.test(t.viewItem,r))return;const a=[...t.modelRange.getItems({shallow:!0})].pop(),s=a.findAncestor("table",{includeSelf:!0});let c=n;s&&"layout"==s.getAttribute("tableType")&&(c={style:"none",color:"",width:""}),i.consumable.consume(t.viewItem,r);const u={style:t.viewItem.getNormalizedStyle("border-style"),color:t.viewItem.getNormalizedStyle("border-color"),width:t.viewItem.getNormalizedStyle("border-width")},b={style:d(u.style),color:d(u.color),width:d(u.width)};b.style!==c.style&&i.writer.setAttribute(o.style,b.style,a),b.color!==c.color&&i.writer.setAttribute(o.color,b.color,a),b.width!==c.width&&i.writer.setAttribute(o.width,b.width,a)}))}function a(e,t){const{modelElement:o,modelAttribute:n,styleName:i}=t;e.for("downcast").attributeToAttribute({model:{name:o,key:n},view:e=>({key:"style",value:{[i]:e}})})}function s(e,t){const{modelAttribute:o,styleName:n}=t;e.for("downcast").add(e=>e.on(`attribute:${o}:table`,(e,t,o)=>{const{item:i,attributeNewValue:l}=t,{mapper:r,writer:a}=o;if(!o.consumable.consume(t.item,e.name))return;const s=[...r.toViewElement(i).getChildren()].find(e=>e.is("element","table"));l?a.setStyle(n,l,s):a.removeStyle(n,s)}))}function c(e,t,o){const n=o.modelRange&&(0,i.first)(o.modelRange.getItems({shallow:!0})),l=n&&n.is("element")&&n.findAncestor("table",{includeSelf:!0});return l&&"layout"===l.getAttribute("tableType")?t:e}function d(e){if(!e)return;const t=["top","right","bottom","left"];if(!t.every(t=>e[t]))return e;const o=e.top;return t.every(t=>e[t]===o)?o:e}function u(e,t,o,n,i=1){null!=t&&null!=i&&t>i?n.setAttribute(e,t,o):n.removeAttribute(e,o)}function b(e,t,o={}){const n=e.createElement("tableCell",o);return e.insertElement("paragraph",n),e.insert(n,t),n}function h(e,t){const o=t.parent.parent,n=parseInt(o.getAttribute("headingColumns")||"0"),{column:i}=e.getCellLocation(t);return!!n&&i<n}function m(e,t,o){const{modelAttribute:n}=o;e.extend("tableCell",{allowAttributes:[n]}),e.setAttributeProperties(n,{isFormatting:!0}),l(t,{viewElement:/^(td|th)$/,...o}),a(t,{modelElement:"tableCell",...o})}function g(e){const t=e.getSelectedElement();return t&&t.is("element","table")?t:e.getFirstPosition().findAncestor("table")}function p(){return e=>{e.on("element:figure",(e,t,o)=>{if(!o.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const n=function(e){for(const t of e.getChildren())if(t.is("element","table"))return t}(t.viewItem);if(!n||!o.consumable.test(n,{name:!0}))return;o.consumable.consume(t.viewItem,{name:!0,classes:"table"});const l=o.convertItem(n,t.modelCursor),r=(0,i.first)(l.modelRange.getItems());r?(o.convertChildren(t.viewItem,o.writer.createPositionAt(r,"end")),o.updateConversionResult(r,t)):o.consumable.revert(t.viewItem,{name:!0,classes:"table"})})}}function f(){return e=>{e.on("element:table",(e,t,o)=>{const n=t.viewItem;if(!o.consumable.test(n,{name:!0}))return;const{rows:i,headingRows:l,headingColumns:r}=function(e){let t,o=0;const n=[],i=[];let l;for(const r of Array.from(e.getChildren())){if("tbody"!==r.name&&"thead"!==r.name&&"tfoot"!==r.name)continue;"thead"!==r.name||l||(l=r);const e=Array.from(r.getChildren()).filter(e=>e.is("element","tr"));let a=null;for(const s of e){const e=Array.from(s.getChildren()).filter(e=>e.is("element","td")||e.is("element","th"));if(l&&r===l||"tbody"===r.name&&e.length>0&&(null===a||e.length===a)&&e.every(e=>e.is("element","th")))o++,n.push(s);else{i.push(s);const e=k(s);(!t||e<t)&&(t=e)}a=Math.max(a||0,e.length)}}return{headingRows:o,headingColumns:t||0,rows:[...n,...i]}}(n),a={};r&&(a.headingColumns=r),l&&(a.headingRows=l);const s=o.writer.createElement("table",a);if(o.safeInsert(s,t.modelCursor)){if(o.consumable.consume(n,{name:!0}),i.forEach(e=>o.convertItem(e,o.writer.createPositionAt(s,"end"))),o.convertChildren(n,o.writer.createPositionAt(s,"end")),s.isEmpty){const e=o.writer.createElement("tableRow");o.writer.insert(e,o.writer.createPositionAt(s,"end")),b(o.writer,o.writer.createPositionAt(e,"end"))}o.updateConversionResult(s,t)}})}}function w(){return e=>{e.on("element:tr",(e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()},{priority:"high"})}}function _(e){return t=>{t.on(`element:${e}`,(e,t,{writer:o})=>{if(!t.modelRange)return;const n=t.modelRange.start.nodeAfter,i=o.createPositionAt(n,0);if(t.viewItem.isEmpty)return void o.insertElement("paragraph",i);const l=Array.from(n.getChildren());if(l.every(e=>e.is("element","$marker"))){const e=o.createElement("paragraph");o.insert(e,o.createPositionAt(n,0));for(const t of l)o.move(o.createRangeOn(t),o.createPositionAt(e,"end"))}},{priority:"low"})}}function k(e){let t=0,o=0;const n=Array.from(e.getChildren()).filter(e=>"th"===e.name||"td"===e.name);for(;o<n.length&&"th"===n[o].name;){const e=n[o];t+=parseInt(e.getAttribute("colspan")||"1"),o++}return t}class C{_table;_startRow;_endRow;_startColumn;_endColumn;_includeAllSlots;_skipRows;_row;_rowIndex;_column;_cellIndex;_spannedCells;_nextCellAtColumn;_jumpedToStartRow=!1;constructor(e,t={}){this._table=e,this._startRow=void 0!==t.row?t.row:t.startRow||0,this._endRow=void 0!==t.row?t.row:t.endRow,this._startColumn=void 0!==t.column?t.column:t.startColumn||0,this._endColumn=void 0!==t.column?t.column:t.endColumn,this._includeAllSlots=!!t.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(){this._canJumpToStartRow()&&this._jumpToNonSpannedRowClosestToStartRow();const e=this._table.getChild(this._rowIndex);if(!e||this._isOverEndRow())return{done:!0,value:void 0};if(!e.is("element","tableRow"))return this._rowIndex++,this.next();if(this._isOverEndColumn())return this._advanceToNextRow();let t=null;const o=this._getSpanned();if(o)this._includeAllSlots&&!this._shouldSkipSlot()&&(t=this._formatOutValue(o.cell,o.row,o.column));else{const o=e.getChild(this._cellIndex);if(!o)return this._advanceToNextRow();const n=parseInt(o.getAttribute("colspan")||"1"),i=parseInt(o.getAttribute("rowspan")||"1");(n>1||i>1)&&this._recordSpans(o,i,n),this._shouldSkipSlot()||(t=this._formatOutValue(o)),this._nextCellAtColumn=this._column+n}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._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(e,t=this._row,o=this._column){return{done:!1,value:new y(this,e,t,o)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._row<this._startRow,o=this._column<this._startColumn,n=void 0!==this._endColumn&&this._column>this._endColumn;return e||t||o||n}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,o){const n={cell:e,row:this._row,column:this._column};for(let e=this._row;e<this._row+t;e++)for(let t=this._column;t<this._column+o;t++)e==this._row&&t==this._column||this._markSpannedCell(e,t,n)}_markSpannedCell(e,t,o){this._spannedCells.has(e)||this._spannedCells.set(e,new Map);this._spannedCells.get(e).set(t,o)}_canJumpToStartRow(){return!!this._startRow&&this._startRow>0&&!this._jumpedToStartRow}_jumpToNonSpannedRowClosestToStartRow(){const e=this._getRowLength(0);for(let t=this._startRow;!this._jumpedToStartRow;t--)e===this._getRowLength(t)&&(this._row=t,this._rowIndex=t,this._jumpedToStartRow=!0)}_getRowLength(e){return[...this._table.getChild(e).getChildren()].reduce((e,t)=>e+parseInt(t.getAttribute("colspan")||"1"),0)}}class y{cell;row;column;cellAnchorRow;cellAnchorColumn;_cellIndex;_rowIndex;_table;constructor(e,t,o,n){this.cell=t,this.row=e._row,this.column=e._column,this.cellAnchorRow=o,this.cellAnchorColumn=n,this._cellIndex=e._cellIndex,this._rowIndex=e._rowIndex,this._table=e._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 v(e,o){return(n,{writer:i})=>{const l=n.getAttribute("headingRows")||0,r=i.createContainerElement("table",null,[]),a=i.createContainerElement("figure",{class:"table"},r);l>0&&i.insert(i.createPositionAt(r,"end"),i.createContainerElement("thead",null,i.createSlot(e=>e.is("element","tableRow")&&e.index<l))),l<e.getRows(n)&&i.insert(i.createPositionAt(r,"end"),i.createContainerElement("tbody",null,i.createSlot(e=>e.is("element","tableRow")&&e.index>=l)));for(const{positionOffset:e,filter:t}of o.additionalSlots)i.insert(i.createPositionAt(r,e),i.createSlot(t));return i.insert(i.createPositionAt(r,"after"),i.createSlot(e=>!e.is("element","tableRow")&&!o.additionalSlots.some(({filter:t})=>t(e)))),o.asWidget?function(e,o){return o.setCustomProperty("table",!0,e),(0,t.toWidget)(e,o,{hasSelectionHandle:!0})}(a,i):a}}function T(){return(e,{writer:t})=>e.isEmpty?t.createEmptyElement("tr"):t.createContainerElement("tr")}function A(e={}){return(o,{writer:n})=>{const i=o.parent,l=i.parent,r=l.getChildIndex(i),a=new C(l,{row:r}),s=l.getAttribute("headingRows")||0,c=l.getAttribute("headingColumns")||0;let d=null;for(const i of a)if(i.cell==o){const o=i.row<s||i.column<c?"th":"td";d=e.asWidget?(0,t.toWidgetEditable)(n.createEditableElement(o),n,{withAriaRole:!1}):n.createContainerElement(o);break}return d}}function x(e={}){return(t,{writer:o})=>{if(!t.parent.is("element","tableCell"))return null;if(!S(t))return null;if(e.asWidget)return o.createContainerElement("span",{class:"ck-table-bogus-paragraph"});{const e=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,e),e}}}function S(e){return 1==e.parent.childCount&&!function(e){for(const t of e.getAttributeKeys())if(!t.startsWith("selection:")&&"htmlEmptyBlock"!=t)return!0;return!1}(e)}class V extends e.Command{refresh(){const e=this.editor.model,t=e.document.selection,o=e.schema;this.isEnabled=function(e,t){const o=e.getFirstPosition().parent,n=o===o.root?o:o.parent;return t.checkChild(n,"table")}(t,o)}execute(e={}){const t=this.editor,o=t.model,n=t.plugins.get("TableUtils"),i=t.config.get("table.defaultHeadings.rows"),l=t.config.get("table.defaultHeadings.columns");void 0===e.headingRows&&i&&(e.headingRows=i),void 0===e.headingColumns&&l&&(e.headingColumns=l),o.change(t=>{const i=n.createTable(t,e);o.insertObject(i,null,null,{findOptimalPosition:"auto"}),t.setSelection(t.createPositionAt(i.getNodeByPath([0,0,0]),0))})}}class R extends e.Command{order;constructor(e,t={}){super(e),this.order=t.order||"below"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),n="above"===this.order,i=o.getSelectionAffectedTableCells(t),l=o.getRowIndexes(i),r=n?l.first:l.last,a=i[0].findAncestor("table");o.insertRows(a,{at:n?r:r+1,copyStructureFromAbove:!n})}}class I extends e.Command{order;constructor(e,t={}){super(e),this.order=t.order||"right"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),n="left"===this.order,i=o.getSelectionAffectedTableCells(t),l=o.getColumnIndexes(i),r=n?l.first:l.last,a=i[0].findAncestor("table");o.insertColum